summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-09-16 17:02:14 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-09-16 17:02:14 +0000
commitfca010d7bfaeb7657a222ae31a1ac6d2ff8b22a9 (patch)
tree04c103f9b8023e9e39971635650fcf0621942487
parent7d7c6fcee69a56637940d72acf1f5aec3c5c78f4 (diff)
downloadgdb-fca010d7bfaeb7657a222ae31a1ac6d2ff8b22a9.tar.gz
Merge mainline to intercu branch - 2004-09-15
-rw-r--r--ChangeLog692
-rw-r--r--MAINTAINERS20
-rw-r--r--Makefile.def288
-rw-r--r--Makefile.in14846
-rw-r--r--Makefile.tpl1205
-rw-r--r--bfd/ChangeLog2458
-rw-r--r--bfd/Makefile.am65
-rw-r--r--bfd/Makefile.in670
-rw-r--r--bfd/acinclude.m410
-rw-r--r--bfd/aclocal.m4831
-rw-r--r--bfd/aix386-core.c6
-rw-r--r--bfd/aix5ppc-core.c14
-rw-r--r--bfd/aout-adobe.c30
-rw-r--r--bfd/aout-cris.c11
-rw-r--r--bfd/aout-target.h31
-rw-r--r--bfd/aout-tic30.c48
-rw-r--r--bfd/aoutf1.h10
-rw-r--r--bfd/aoutx.h111
-rw-r--r--bfd/archive.c66
-rw-r--r--bfd/archures.c15
-rw-r--r--bfd/bfd-in.h62
-rw-r--r--bfd/bfd-in2.h269
-rw-r--r--bfd/bfd.c240
-rw-r--r--bfd/bfdio.c138
-rw-r--r--bfd/binary.c17
-rw-r--r--bfd/bout.c23
-rw-r--r--bfd/cache.c157
-rw-r--r--bfd/cisco-core.c8
-rw-r--r--bfd/coff-alpha.c26
-rw-r--r--bfd/coff-arm.c101
-rw-r--r--bfd/coff-h8300.c10
-rw-r--r--bfd/coff-i386.c47
-rw-r--r--bfd/coff-i860.c8
-rw-r--r--bfd/coff-mcore.c30
-rw-r--r--bfd/coff-mips.c1249
-rw-r--r--bfd/coff-ppc.c44
-rw-r--r--bfd/coff-rs6000.c29
-rw-r--r--bfd/coff-sh.c168
-rw-r--r--bfd/coff-tic54x.c7
-rw-r--r--bfd/coff-tic80.c6
-rw-r--r--bfd/coff64-rs6000.c29
-rw-r--r--bfd/coffcode.h141
-rw-r--r--bfd/coffgen.c22
-rw-r--r--bfd/cofflink.c109
-rw-r--r--bfd/config.bfd72
-rw-r--r--bfd/config.in385
-rwxr-xr-xbfd/configure13704
-rw-r--r--bfd/configure.in72
-rw-r--r--bfd/cpu-arm.c41
-rw-r--r--bfd/cpu-crx.c39
-rw-r--r--bfd/cpu-h8300.c12
-rw-r--r--bfd/cpu-m68k.c9
-rw-r--r--bfd/cpu-ns32k.c6
-rw-r--r--bfd/cpu-sh.c233
-rw-r--r--bfd/doc/Makefile.in125
-rw-r--r--bfd/dwarf1.c10
-rw-r--r--bfd/dwarf2.c25
-rw-r--r--bfd/ecoff.c106
-rw-r--r--bfd/ecofflink.c53
-rw-r--r--bfd/elf-bfd.h100
-rw-r--r--bfd/elf-eh-frame.c87
-rw-r--r--bfd/elf-hppa.h25
-rw-r--r--bfd/elf-m10200.c20
-rw-r--r--bfd/elf-m10300.c456
-rw-r--r--bfd/elf.c809
-rw-r--r--bfd/elf32-arm.h1187
-rw-r--r--bfd/elf32-cr16c.c29
-rw-r--r--bfd/elf32-cris.c177
-rw-r--r--bfd/elf32-crx.c1327
-rw-r--r--bfd/elf32-d30v.c6
-rw-r--r--bfd/elf32-dlx.c4
-rw-r--r--bfd/elf32-frv.c1406
-rw-r--r--bfd/elf32-gen.c4
-rw-r--r--bfd/elf32-h8300.c18
-rw-r--r--bfd/elf32-hppa.c178
-rw-r--r--bfd/elf32-i370.c65
-rw-r--r--bfd/elf32-i386.c197
-rw-r--r--bfd/elf32-i860.c8
-rw-r--r--bfd/elf32-ip2k.c46
-rw-r--r--bfd/elf32-m32r.c205
-rw-r--r--bfd/elf32-m68hc11.c34
-rw-r--r--bfd/elf32-m68hc12.c8
-rw-r--r--bfd/elf32-m68hc1x.c37
-rw-r--r--bfd/elf32-m68k.c88
-rw-r--r--bfd/elf32-mcore.c25
-rw-r--r--bfd/elf32-mips.c211
-rw-r--r--bfd/elf32-msp430.c667
-rw-r--r--bfd/elf32-or32.c4
-rw-r--r--bfd/elf32-ppc.c314
-rw-r--r--bfd/elf32-s390.c125
-rw-r--r--bfd/elf32-sh-symbian.c627
-rw-r--r--bfd/elf32-sh.c394
-rw-r--r--bfd/elf32-sh64-com.c20
-rw-r--r--bfd/elf32-sh64.c39
-rw-r--r--bfd/elf32-sparc.c144
-rw-r--r--bfd/elf32-v850.c37
-rw-r--r--bfd/elf32-vax.c67
-rw-r--r--bfd/elf32-xstormy16.c24
-rw-r--r--bfd/elf32-xtensa.c324
-rw-r--r--bfd/elf64-alpha.c170
-rw-r--r--bfd/elf64-gen.c5
-rw-r--r--bfd/elf64-hppa.c48
-rw-r--r--bfd/elf64-mips.c16
-rw-r--r--bfd/elf64-mmix.c138
-rw-r--r--bfd/elf64-ppc.c2525
-rw-r--r--bfd/elf64-ppc.h8
-rw-r--r--bfd/elf64-s390.c123
-rw-r--r--bfd/elf64-sh64.c78
-rw-r--r--bfd/elf64-sparc.c149
-rw-r--r--bfd/elf64-x86-64.c188
-rw-r--r--bfd/elfarm-nabi.c225
-rw-r--r--bfd/elfcode.h10
-rw-r--r--bfd/elflink.c1140
-rw-r--r--bfd/elfn32-mips.c12
-rw-r--r--bfd/elfxx-ia64.c355
-rw-r--r--bfd/elfxx-mips.c370
-rw-r--r--bfd/elfxx-target.h53
-rw-r--r--bfd/hash.c54
-rw-r--r--bfd/hp300hpux.c6
-rw-r--r--bfd/hppabsd-core.c9
-rw-r--r--bfd/hpux-core.c45
-rw-r--r--bfd/i386linux.c12
-rw-r--r--bfd/i386msdos.c16
-rw-r--r--bfd/i386os9k.c17
-rw-r--r--bfd/ieee.c61
-rw-r--r--bfd/ihex.c51
-rw-r--r--bfd/irix-core.c6
-rw-r--r--bfd/libaout.h7
-rw-r--r--bfd/libbfd-in.h55
-rw-r--r--bfd/libbfd.c15
-rw-r--r--bfd/libbfd.h121
-rw-r--r--bfd/libcoff-in.h4
-rw-r--r--bfd/libcoff.h4
-rw-r--r--bfd/libecoff.h41
-rw-r--r--bfd/linker.c210
-rw-r--r--bfd/lynx-core.c9
-rw-r--r--bfd/m68klinux.c14
-rw-r--r--bfd/m88kopenbsd.c (renamed from gdb/config/i386/nm-interix.h)28
-rw-r--r--bfd/mach-o.c20
-rw-r--r--bfd/merge.c145
-rw-r--r--bfd/mmo.c34
-rw-r--r--bfd/netbsd-core.c97
-rw-r--r--bfd/nlm-target.h5
-rw-r--r--bfd/nlm32-alpha.c16
-rw-r--r--bfd/nlm32-ppc.c6
-rw-r--r--bfd/nlm32-sparc.c6
-rw-r--r--bfd/nlmcode.h24
-rw-r--r--bfd/oasys.c17
-rw-r--r--bfd/opncls.c207
-rw-r--r--bfd/osf-core.c6
-rw-r--r--bfd/pdp11.c162
-rw-r--r--bfd/pe-i386.c17
-rw-r--r--bfd/pe-mips.c42
-rw-r--r--bfd/peXXigen.c120
-rw-r--r--bfd/pef.c14
-rw-r--r--bfd/pei-i386.c17
-rw-r--r--bfd/peicode.h32
-rw-r--r--bfd/po/SRC-POTFILES.in1
-rw-r--r--bfd/po/fr.po5
-rw-r--r--bfd/ppcboot.c12
-rw-r--r--bfd/ptrace-core.c6
-rw-r--r--bfd/reloc.c128
-rw-r--r--bfd/reloc16.c13
-rw-r--r--bfd/riscix.c8
-rw-r--r--bfd/rs6000-core.c8
-rw-r--r--bfd/sco5-core.c11
-rw-r--r--bfd/section.c256
-rw-r--r--bfd/simple.c41
-rw-r--r--bfd/som.c239
-rw-r--r--bfd/som.h38
-rw-r--r--bfd/sparclinux.c14
-rw-r--r--bfd/srec.c25
-rw-r--r--bfd/stabs.c157
-rw-r--r--bfd/sunos.c139
-rw-r--r--bfd/syms.c22
-rw-r--r--bfd/targets.c35
-rw-r--r--bfd/tekhex.c13
-rw-r--r--bfd/trad-core.c9
-rw-r--r--bfd/versados.c11
-rw-r--r--bfd/version.h2
-rw-r--r--bfd/vms-gsd.c40
-rw-r--r--bfd/vms-misc.c6
-rw-r--r--bfd/vms-tir.c11
-rw-r--r--bfd/vms.c10
-rw-r--r--bfd/xcoff-target.h2
-rw-r--r--bfd/xcofflink.c180
-rw-r--r--bfd/xsym.c7
-rw-r--r--config-ml.in19
-rwxr-xr-xconfig.guess78
-rwxr-xr-xconfig.sub48
-rw-r--r--config/ChangeLog31
-rw-r--r--config/acx.m4120
-rw-r--r--config/mh-ppc-darwin6
-rw-r--r--config/mt-gnu (renamed from config/mt-linux)0
-rwxr-xr-xconfigure1511
-rw-r--r--configure.in638
-rw-r--r--gdb/ChangeLog7120
-rw-r--r--gdb/ChangeLog-20022
-rw-r--r--gdb/MAINTAINERS61
-rw-r--r--gdb/Makefile.in485
-rw-r--r--gdb/NEWS176
-rw-r--r--gdb/PROBLEMS83
-rw-r--r--gdb/README96
-rw-r--r--gdb/abug-rom.c2
-rw-r--r--gdb/acconfig.h9
-rw-r--r--gdb/acinclude.m432
-rw-r--r--gdb/aclocal.m432
-rw-r--r--gdb/ada-exp.y493
-rw-r--r--gdb/ada-lang.c9640
-rw-r--r--gdb/ada-lang.h362
-rw-r--r--gdb/ada-lex.l416
-rw-r--r--gdb/ada-tasks.c819
-rw-r--r--gdb/ada-typeprint.c159
-rw-r--r--gdb/ada-valprint.c305
-rw-r--r--gdb/aix-thread.c290
-rw-r--r--gdb/alpha-linux-tdep.c3
-rw-r--r--gdb/alpha-nat.c10
-rw-r--r--gdb/alpha-osf1-tdep.c2
-rw-r--r--gdb/alpha-tdep.c74
-rw-r--r--gdb/alpha-tdep.h11
-rw-r--r--gdb/alphabsd-nat.c18
-rw-r--r--gdb/alphafbsd-tdep.c5
-rw-r--r--gdb/alphanbsd-tdep.c22
-rw-r--r--gdb/amd64-linux-nat.c4
-rw-r--r--gdb/amd64-linux-tdep.c22
-rw-r--r--gdb/amd64-nat.c2
-rw-r--r--gdb/amd64-tdep.c96
-rw-r--r--gdb/amd64-tdep.h6
-rw-r--r--gdb/amd64bsd-nat.c16
-rw-r--r--gdb/amd64fbsd-nat.c98
-rw-r--r--gdb/amd64nbsd-tdep.c51
-rw-r--r--gdb/amd64obsd-nat.c75
-rw-r--r--gdb/amd64obsd-tdep.c63
-rw-r--r--gdb/annotate.c34
-rw-r--r--gdb/annotate.h10
-rw-r--r--gdb/arch-utils.c108
-rw-r--r--gdb/arch-utils.h40
-rw-r--r--gdb/arm-linux-nat.c81
-rw-r--r--gdb/arm-linux-tdep.c17
-rw-r--r--gdb/arm-tdep.c129
-rw-r--r--gdb/armnbsd-nat.c133
-rw-r--r--gdb/armnbsd-tdep.c30
-rw-r--r--gdb/avr-tdep.c20
-rw-r--r--gdb/blockframe.c261
-rw-r--r--gdb/breakpoint.c253
-rw-r--r--gdb/breakpoint.h19
-rw-r--r--gdb/bsd-kvm.c307
-rw-r--r--gdb/bsd-kvm.h (renamed from gdb/config/i386/xm-i386.h)22
-rw-r--r--gdb/buildsym.c3
-rw-r--r--gdb/c-exp.y114
-rw-r--r--gdb/c-lang.c109
-rw-r--r--gdb/c-lang.h4
-rw-r--r--gdb/c-typeprint.c5
-rw-r--r--gdb/charset.c4
-rw-r--r--gdb/cli/cli-cmds.c49
-rw-r--r--gdb/cli/cli-decode.c158
-rw-r--r--gdb/cli/cli-decode.h5
-rw-r--r--gdb/cli/cli-dump.c4
-rw-r--r--gdb/cli/cli-logging.c40
-rw-r--r--gdb/cli/cli-script.c28
-rw-r--r--gdb/cli/cli-setshow.c4
-rw-r--r--gdb/coffread.c25
-rw-r--r--gdb/command.h95
-rw-r--r--gdb/complaints.c22
-rw-r--r--gdb/config.in47
-rw-r--r--gdb/config/alpha/alpha-linux.mh3
-rw-r--r--gdb/config/alpha/alpha-linux.mt2
-rw-r--r--gdb/config/alpha/alpha-osf1.mh1
-rw-r--r--gdb/config/alpha/alpha-osf1.mt2
-rw-r--r--gdb/config/alpha/alpha-osf2.mh1
-rw-r--r--gdb/config/alpha/alpha-osf3.mh1
-rw-r--r--gdb/config/alpha/alpha.mt2
-rw-r--r--gdb/config/alpha/fbsd.mt2
-rw-r--r--gdb/config/alpha/nbsd.mt2
-rw-r--r--gdb/config/alpha/nm-linux.h8
-rw-r--r--gdb/config/alpha/nm-osf.h4
-rw-r--r--gdb/config/alpha/nm-osf2.h8
-rw-r--r--gdb/config/alpha/xm-alphaosf.h24
-rw-r--r--gdb/config/arm/embed.mt2
-rw-r--r--gdb/config/arm/linux.mh2
-rw-r--r--gdb/config/arm/linux.mt2
-rw-r--r--gdb/config/arm/nbsd.mt2
-rw-r--r--gdb/config/arm/nbsdaout.mh1
-rw-r--r--gdb/config/arm/nbsdelf.mh3
-rw-r--r--gdb/config/arm/nm-linux.h4
-rw-r--r--gdb/config/arm/nm-nbsdaout.h2
-rw-r--r--gdb/config/arm/tm-arm.h2
-rw-r--r--gdb/config/arm/tm-embed.h3
-rw-r--r--gdb/config/arm/wince.mt2
-rw-r--r--gdb/config/arm/xm-linux.h28
-rw-r--r--gdb/config/cris/cris.mt2
-rw-r--r--gdb/config/cris/tm-cris.h2
-rw-r--r--gdb/config/djgpp/fnchange.lst27
-rw-r--r--gdb/config/frv/frv.mt2
-rw-r--r--gdb/config/frv/tm-frv.h5
-rw-r--r--gdb/config/h8300/h8300.mt2
-rw-r--r--gdb/config/i386/cygwin.mt2
-rw-r--r--gdb/config/i386/embed.mt3
-rw-r--r--gdb/config/i386/fbsd.mh6
-rw-r--r--gdb/config/i386/fbsd.mt2
-rw-r--r--gdb/config/i386/fbsd64.mh6
-rw-r--r--gdb/config/i386/fbsd64.mt3
-rw-r--r--gdb/config/i386/go32.mt3
-rw-r--r--gdb/config/i386/i386.mt2
-rw-r--r--gdb/config/i386/i386aout.mt3
-rw-r--r--gdb/config/i386/i386gnu.mh1
-rw-r--r--gdb/config/i386/i386gnu.mt1
-rw-r--r--gdb/config/i386/i386lynx.mh2
-rw-r--r--gdb/config/i386/i386lynx.mt2
-rw-r--r--gdb/config/i386/i386nw.mt3
-rw-r--r--gdb/config/i386/i386sco.mh8
-rw-r--r--gdb/config/i386/i386sco4.mh7
-rw-r--r--gdb/config/i386/i386sco5.mh9
-rw-r--r--gdb/config/i386/i386sol2.mh10
-rw-r--r--gdb/config/i386/i386sol2.mt7
-rw-r--r--gdb/config/i386/i386v.mh3
-rw-r--r--gdb/config/i386/i386v.mt3
-rw-r--r--gdb/config/i386/i386v4.mh4
-rw-r--r--gdb/config/i386/i386v42mp.mh4
-rw-r--r--gdb/config/i386/interix.mh6
-rw-r--r--gdb/config/i386/interix.mt3
-rw-r--r--gdb/config/i386/linux.mh2
-rw-r--r--gdb/config/i386/linux.mt4
-rw-r--r--gdb/config/i386/linux64.mh1
-rw-r--r--gdb/config/i386/linux64.mt4
-rw-r--r--gdb/config/i386/nbsd.mt2
-rw-r--r--gdb/config/i386/nbsd64.mh3
-rw-r--r--gdb/config/i386/nbsd64.mt2
-rw-r--r--gdb/config/i386/nbsdaout.mh1
-rw-r--r--gdb/config/i386/nbsdelf.mh8
-rw-r--r--gdb/config/i386/ncr3000.mh11
-rw-r--r--gdb/config/i386/ncr3000.mt1
-rw-r--r--gdb/config/i386/nm-i386.h4
-rw-r--r--gdb/config/i386/nm-i386gnu.h3
-rw-r--r--gdb/config/i386/nm-i386sco4.h2
-rw-r--r--gdb/config/i386/nm-i386sco5.h4
-rw-r--r--gdb/config/i386/nm-i386v.h5
-rw-r--r--gdb/config/i386/nm-i386v4.h5
-rw-r--r--gdb/config/i386/nm-i386v42mp.h4
-rw-r--r--gdb/config/i386/nm-linux64.h6
-rw-r--r--gdb/config/i386/nm-nbsdaout.h2
-rw-r--r--gdb/config/i386/nm-nto.h6
-rw-r--r--gdb/config/i386/nto.mh4
-rw-r--r--gdb/config/i386/nto.mt2
-rw-r--r--gdb/config/i386/obsd.mh7
-rw-r--r--gdb/config/i386/obsd.mt2
-rw-r--r--gdb/config/i386/obsd64.mh7
-rw-r--r--gdb/config/i386/obsd64.mt4
-rw-r--r--gdb/config/i386/obsdaout.mh1
-rw-r--r--gdb/config/i386/tm-cygwin.h7
-rw-r--r--gdb/config/i386/tm-go32.h28
-rw-r--r--gdb/config/i386/tm-i386.h25
-rw-r--r--gdb/config/i386/tm-i386lynx.h29
-rw-r--r--gdb/config/i386/tm-i386sol2.h7
-rw-r--r--gdb/config/i386/tm-linux.h5
-rw-r--r--gdb/config/i386/tm-nbsd.h27
-rw-r--r--gdb/config/i386/tm-nto.h6
-rw-r--r--gdb/config/i386/tm-vxworks.h28
-rw-r--r--gdb/config/i386/vxworks.mt2
-rw-r--r--gdb/config/i386/xm-go32.h1
-rw-r--r--gdb/config/i386/xm-i386sco.h31
-rw-r--r--gdb/config/i386/xm-i386v.h43
-rw-r--r--gdb/config/i386/xm-i386v4.h28
-rw-r--r--gdb/config/i386/xm-nbsd.h25
-rw-r--r--gdb/config/ia64/aix.mh2
-rw-r--r--gdb/config/ia64/aix.mt2
-rw-r--r--gdb/config/ia64/ia64.mt2
-rw-r--r--gdb/config/ia64/linux.mh2
-rw-r--r--gdb/config/ia64/linux.mt2
-rw-r--r--gdb/config/ia64/nm-linux.h12
-rw-r--r--gdb/config/ia64/tm-aix.h5
-rw-r--r--gdb/config/ia64/tm-ia64.h2
-rw-r--r--gdb/config/ia64/tm-linux.h7
-rw-r--r--gdb/config/ia64/xm-aix.h28
-rw-r--r--gdb/config/m68k/3b1.mh12
-rw-r--r--gdb/config/m68k/3b1.mt3
-rw-r--r--gdb/config/m68k/cisco.mt2
-rw-r--r--gdb/config/m68k/delta68.mh5
-rw-r--r--gdb/config/m68k/delta68.mt3
-rw-r--r--gdb/config/m68k/dpx2.mh6
-rw-r--r--gdb/config/m68k/dpx2.mt3
-rw-r--r--gdb/config/m68k/linux.mh2
-rw-r--r--gdb/config/m68k/linux.mt2
-rw-r--r--gdb/config/m68k/m68klynx.mh6
-rw-r--r--gdb/config/m68k/m68klynx.mt4
-rw-r--r--gdb/config/m68k/m68kv4.mh7
-rw-r--r--gdb/config/m68k/m68kv4.mt3
-rw-r--r--gdb/config/m68k/monitor.mt2
-rw-r--r--gdb/config/m68k/nbsd.mt3
-rw-r--r--gdb/config/m68k/nbsdaout.mh5
-rw-r--r--gdb/config/m68k/nbsdaout.mt3
-rw-r--r--gdb/config/m68k/nbsdelf.mh5
-rw-r--r--gdb/config/m68k/nm-delta68.h22
-rw-r--r--gdb/config/m68k/nm-dpx2.h29
-rw-r--r--gdb/config/m68k/nm-linux.h4
-rw-r--r--gdb/config/m68k/nm-m68klynx.h26
-rw-r--r--gdb/config/m68k/nm-nbsd.h27
-rw-r--r--gdb/config/m68k/nm-nbsdaout.h11
-rw-r--r--gdb/config/m68k/nm-sun2.h34
-rw-r--r--gdb/config/m68k/nm-sun3.h34
-rw-r--r--gdb/config/m68k/nm-sysv4.h23
-rw-r--r--gdb/config/m68k/obsd.mh6
-rw-r--r--gdb/config/m68k/obsd.mt3
-rw-r--r--gdb/config/m68k/os68k.mt2
-rw-r--r--gdb/config/m68k/st2000.mt1
-rw-r--r--gdb/config/m68k/sun2os3.mh4
-rw-r--r--gdb/config/m68k/sun2os3.mt7
-rw-r--r--gdb/config/m68k/sun2os4.mh4
-rw-r--r--gdb/config/m68k/sun2os4.mt3
-rw-r--r--gdb/config/m68k/sun3os3.mh4
-rw-r--r--gdb/config/m68k/sun3os3.mt8
-rw-r--r--gdb/config/m68k/sun3os4.mh4
-rw-r--r--gdb/config/m68k/sun3os4.mt3
-rw-r--r--gdb/config/m68k/tm-3b1.h33
-rw-r--r--gdb/config/m68k/tm-cisco.h9
-rw-r--r--gdb/config/m68k/tm-delta68.h109
-rw-r--r--gdb/config/m68k/tm-dpx2.h35
-rw-r--r--gdb/config/m68k/tm-linux.h30
-rw-r--r--gdb/config/m68k/tm-m68k.h22
-rw-r--r--gdb/config/m68k/tm-m68klynx.h39
-rw-r--r--gdb/config/m68k/tm-m68kv4.h67
-rw-r--r--gdb/config/m68k/tm-monitor.h2
-rw-r--r--gdb/config/m68k/tm-nbsd.h49
-rw-r--r--gdb/config/m68k/tm-os68k.h2
-rw-r--r--gdb/config/m68k/tm-sun2.h24
-rw-r--r--gdb/config/m68k/tm-sun2os4.h21
-rw-r--r--gdb/config/m68k/tm-sun3.h89
-rw-r--r--gdb/config/m68k/tm-sun3os4.h22
-rw-r--r--gdb/config/m68k/tm-vx68.h13
-rw-r--r--gdb/config/m68k/vxworks68.mt2
-rw-r--r--gdb/config/m68k/xm-3b1.h82
-rw-r--r--gdb/config/m68k/xm-delta68.h35
-rw-r--r--gdb/config/m68k/xm-dpx2.h22
-rw-r--r--gdb/config/m68k/xm-linux.h34
-rw-r--r--gdb/config/m68k/xm-m68k.h21
-rw-r--r--gdb/config/m68k/xm-m68kv4.h29
-rw-r--r--gdb/config/m68k/xm-nbsd.h22
-rw-r--r--gdb/config/m68k/xm-sun2.h77
-rw-r--r--gdb/config/m68k/xm-sun3.h71
-rw-r--r--gdb/config/m68k/xm-sun3os4.h22
-rw-r--r--gdb/config/m88k/obsd.mh3
-rw-r--r--gdb/config/m88k/obsd.mt2
-rw-r--r--gdb/config/mips/decstation.mh4
-rw-r--r--gdb/config/mips/embed.mt2
-rw-r--r--gdb/config/mips/irix5.mh3
-rw-r--r--gdb/config/mips/irix5.mt2
-rw-r--r--gdb/config/mips/irix6.mh3
-rw-r--r--gdb/config/mips/irix6.mt2
-rw-r--r--gdb/config/mips/linux.mt2
-rw-r--r--gdb/config/mips/littlemips.mh3
-rw-r--r--gdb/config/mips/mipsv4.mh6
-rw-r--r--gdb/config/mips/mipsv4.mt3
-rw-r--r--gdb/config/mips/nbsd.mh2
-rw-r--r--gdb/config/mips/nbsd.mt2
-rw-r--r--gdb/config/mips/news-mips.mh3
-rw-r--r--gdb/config/mips/nm-irix5.h7
-rw-r--r--gdb/config/mips/nm-mips.h34
-rw-r--r--gdb/config/mips/nm-nbsd.h28
-rw-r--r--gdb/config/mips/nm-news-mips.h43
-rw-r--r--gdb/config/mips/nm-riscos.h60
-rw-r--r--gdb/config/mips/riscos.mh16
-rw-r--r--gdb/config/mips/tm-irix5.h47
-rw-r--r--gdb/config/mips/tm-irix6.h45
-rw-r--r--gdb/config/mips/tm-linux.h5
-rw-r--r--gdb/config/mips/tm-mips.h9
-rw-r--r--gdb/config/mips/tm-mipsv4.h37
-rw-r--r--gdb/config/mips/tm-nbsd.h5
-rw-r--r--gdb/config/mips/vxmips.mt2
-rw-r--r--gdb/config/mips/wince.mt2
-rw-r--r--gdb/config/mips/xm-irix5.h34
-rw-r--r--gdb/config/mips/xm-mips.h59
-rw-r--r--gdb/config/mips/xm-mipsv4.h22
-rw-r--r--gdb/config/mips/xm-riscos.h25
-rw-r--r--gdb/config/nm-bsd.h6
-rw-r--r--gdb/config/nm-gnu.h4
-rw-r--r--gdb/config/nm-linux.h8
-rw-r--r--gdb/config/nm-nbsd.h7
-rw-r--r--gdb/config/nm-sysv4.h6
-rw-r--r--gdb/config/ns32k/nbsdaout.mh1
-rw-r--r--gdb/config/ns32k/nbsdaout.mt2
-rw-r--r--gdb/config/ns32k/xm-nbsd.h22
-rw-r--r--gdb/config/pa/hppa.mt2
-rw-r--r--gdb/config/pa/hppa64.mt2
-rw-r--r--gdb/config/pa/hppahpux.mh2
-rw-r--r--gdb/config/pa/hppahpux.mt2
-rw-r--r--gdb/config/pa/hpux1020.mh2
-rw-r--r--gdb/config/pa/hpux11.mh2
-rw-r--r--gdb/config/pa/hpux11w.mh2
-rw-r--r--gdb/config/pa/linux.mh8
-rw-r--r--gdb/config/pa/linux.mt3
-rw-r--r--gdb/config/pa/nm-hppah.h44
-rw-r--r--gdb/config/pa/nm-linux.h (renamed from gdb/config/ia64/xm-linux.h)18
-rw-r--r--gdb/config/pa/obsd.mh3
-rw-r--r--gdb/config/pa/obsd.mt3
-rw-r--r--gdb/config/pa/tm-hppa.h175
-rw-r--r--gdb/config/pa/tm-hppa64.h33
-rw-r--r--gdb/config/pa/tm-hppah.h15
-rw-r--r--gdb/config/pa/tm-linux.h (renamed from gdb/config/i386/nm-nbsd.h)19
-rw-r--r--gdb/config/pa/xm-hppah.h27
-rw-r--r--gdb/config/powerpc/aix.mh9
-rw-r--r--gdb/config/powerpc/aix.mt2
-rw-r--r--gdb/config/powerpc/aix432.mh19
-rw-r--r--gdb/config/powerpc/linux.mh1
-rw-r--r--gdb/config/powerpc/linux.mt2
-rw-r--r--gdb/config/powerpc/nbsd.mh6
-rw-r--r--gdb/config/powerpc/nbsd.mt2
-rw-r--r--gdb/config/powerpc/nm-aix.h1
-rw-r--r--gdb/config/powerpc/nm-linux.h4
-rw-r--r--gdb/config/powerpc/obsd.mh3
-rw-r--r--gdb/config/powerpc/obsd.mt4
-rw-r--r--gdb/config/powerpc/ppc-eabi.mt2
-rw-r--r--gdb/config/powerpc/ppc-sim.mt2
-rw-r--r--gdb/config/powerpc/ppc64-linux.mh1
-rw-r--r--gdb/config/powerpc/tm-nbsd.h26
-rw-r--r--gdb/config/powerpc/tm-ppc-aix.h27
-rw-r--r--gdb/config/powerpc/tm-ppcle-eabi.h28
-rw-r--r--gdb/config/powerpc/tm-ppcle-sim.h26
-rw-r--r--gdb/config/powerpc/vxworks.mt2
-rw-r--r--gdb/config/powerpc/xm-aix.h31
-rw-r--r--gdb/config/powerpc/xm-linux.h28
-rw-r--r--gdb/config/rs6000/aix4.mh2
-rw-r--r--gdb/config/rs6000/aix4.mt2
-rw-r--r--gdb/config/rs6000/nm-rs6000.h4
-rw-r--r--gdb/config/rs6000/nm-rs6000ly.h26
-rw-r--r--gdb/config/rs6000/rs6000.mh2
-rw-r--r--gdb/config/rs6000/rs6000.mt2
-rw-r--r--gdb/config/rs6000/rs6000lynx.mh2
-rw-r--r--gdb/config/rs6000/rs6000lynx.mt2
-rw-r--r--gdb/config/rs6000/tm-rs6000-aix4.h27
-rw-r--r--gdb/config/rs6000/tm-rs6000.h7
-rw-r--r--gdb/config/rs6000/xm-aix4.h27
-rw-r--r--gdb/config/rs6000/xm-rs6000.h94
-rw-r--r--gdb/config/s390/nm-linux.h1
-rw-r--r--gdb/config/s390/s390.mt2
-rw-r--r--gdb/config/sh/embed.mt4
-rw-r--r--gdb/config/sh/linux.mt4
-rw-r--r--gdb/config/sh/nbsd.mh2
-rw-r--r--gdb/config/sh/nbsd.mt4
-rw-r--r--gdb/config/sh/nm-nbsd.h28
-rw-r--r--gdb/config/sh/tm-sh.h2
-rw-r--r--gdb/config/sh/wince.mt4
-rw-r--r--gdb/config/sparc/fbsd.mt1
-rw-r--r--gdb/config/sparc/linux.mt4
-rw-r--r--gdb/config/sparc/linux64.mt4
-rw-r--r--gdb/config/sparc/nbsd.mt2
-rw-r--r--gdb/config/sparc/nbsd64.mh4
-rw-r--r--gdb/config/sparc/nbsd64.mt2
-rw-r--r--gdb/config/sparc/nbsdelf.mh4
-rw-r--r--gdb/config/sparc/obsd.mt2
-rw-r--r--gdb/config/sparc/obsd64.mt4
-rw-r--r--gdb/config/sparc/sol2-64.mt5
-rw-r--r--gdb/config/sparc/sol2.mh3
-rw-r--r--gdb/config/sparc/sol2.mt4
-rw-r--r--gdb/config/sparc/tm-fbsd.h27
-rw-r--r--gdb/config/sparc/tm-linux.h29
-rw-r--r--gdb/config/sparc/tm-nbsd.h30
-rw-r--r--gdb/config/sparc/tm-nbsd64.h27
-rw-r--r--gdb/config/sparc/tm-sol2.h5
-rw-r--r--gdb/config/sparc/tm-vxworks.h31
-rw-r--r--gdb/config/sparc/vxworks.mt2
-rw-r--r--gdb/config/tm-linux.h7
-rw-r--r--gdb/config/tm-nto.h26
-rw-r--r--gdb/config/tm-sunos.h32
-rw-r--r--gdb/config/vax/nbsd.mt3
-rw-r--r--gdb/config/vax/nbsdaout.mh6
-rw-r--r--gdb/config/vax/nbsdelf.mh5
-rw-r--r--gdb/config/vax/nm-nbsdaout.h (renamed from gdb/config/arm/nm-nbsd.h)15
-rw-r--r--gdb/config/vax/nm-vax.h23
-rw-r--r--gdb/config/vax/obsd.mh5
-rw-r--r--gdb/config/vax/tm-vaxbsd.h35
-rw-r--r--gdb/config/vax/vax.mh4
-rw-r--r--gdb/config/vax/vax.mt3
-rw-r--r--gdb/config/vax/vaxbsd.mh13
-rw-r--r--gdb/config/vax/vaxult.mh6
-rw-r--r--gdb/config/vax/vaxult2.mh6
-rw-r--r--gdb/config/vax/xm-vax.h80
-rw-r--r--gdb/config/vax/xm-vaxbsd.h7
-rw-r--r--gdb/config/vax/xm-vaxult.h10
-rw-r--r--gdb/config/vax/xm-vaxult2.h9
-rw-r--r--gdb/config/xm-aix4.h91
-rw-r--r--gdb/config/xm-nbsd.h26
-rw-r--r--gdb/config/xm-sysv4.h29
-rwxr-xr-xgdb/configure1814
-rw-r--r--gdb/configure.host107
-rw-r--r--gdb/configure.in283
-rw-r--r--gdb/configure.tgt72
-rw-r--r--gdb/core-aout.c8
-rw-r--r--gdb/core-regset.c2
-rw-r--r--gdb/corefile.c27
-rw-r--r--gdb/corelow.c67
-rw-r--r--gdb/cp-support.c2
-rw-r--r--gdb/cp-support.h2
-rw-r--r--gdb/cp-valprint.c12
-rw-r--r--gdb/cpu32bug-rom.c2
-rw-r--r--gdb/cris-tdep.c74
-rw-r--r--gdb/d10v-tdep.c32
-rw-r--r--gdb/dbug-rom.c2
-rw-r--r--gdb/dbxread.c134
-rw-r--r--gdb/dcache.c2
-rw-r--r--gdb/defs.h178
-rw-r--r--gdb/delta68-nat.c90
-rw-r--r--gdb/demangle.c2
-rw-r--r--gdb/dictionary.c10
-rw-r--r--gdb/doc/ChangeLog204
-rw-r--r--gdb/doc/annotate.texinfo2
-rw-r--r--gdb/doc/gdb.texinfo385
-rw-r--r--gdb/doc/gdbint.texinfo215
-rw-r--r--gdb/doc/observer.texi45
-rw-r--r--gdb/doc/stabs.texinfo4
-rw-r--r--gdb/doublest.c92
-rw-r--r--gdb/doublest.h8
-rw-r--r--gdb/dpx2-nat.c83
-rw-r--r--gdb/dsrec.c16
-rw-r--r--gdb/dummy-frame.c368
-rw-r--r--gdb/dummy-frame.h44
-rw-r--r--gdb/dve3900-rom.c4
-rw-r--r--gdb/dwarf2-frame.c56
-rw-r--r--gdb/dwarf2expr.c44
-rw-r--r--gdb/dwarf2expr.h43
-rw-r--r--gdb/dwarf2loc.c39
-rw-r--r--gdb/dwarf2read.c414
-rw-r--r--gdb/dwarfread.c27
-rw-r--r--gdb/elfread.c12
-rw-r--r--gdb/eval.c39
-rw-r--r--gdb/event-top.c119
-rw-r--r--gdb/exec.c34
-rw-r--r--gdb/expression.h2
-rw-r--r--gdb/f-exp.y5
-rw-r--r--gdb/f-lang.c8
-rw-r--r--gdb/fbsd-proc.c29
-rw-r--r--gdb/findvar.c26
-rw-r--r--gdb/frame-base.c12
-rw-r--r--gdb/frame-unwind.c46
-rw-r--r--gdb/frame-unwind.h13
-rw-r--r--gdb/frame.c1253
-rw-r--r--gdb/frame.h206
-rw-r--r--gdb/frv-linux-tdep.c94
-rw-r--r--gdb/frv-tdep.c241
-rw-r--r--gdb/frv-tdep.h22
-rw-r--r--gdb/gcore.c2
-rw-r--r--gdb/gdb-events.c121
-rw-r--r--gdb/gdb-events.h37
-rwxr-xr-xgdb/gdb-events.sh140
-rw-r--r--gdb/gdb_curses.h8
-rwxr-xr-xgdb/gdb_mbuild.sh2
-rw-r--r--gdb/gdb_ptrace.h114
-rw-r--r--gdb/gdbarch.c2890
-rw-r--r--gdb/gdbarch.h1259
-rwxr-xr-xgdb/gdbarch.sh661
-rw-r--r--gdb/gdbcore.h28
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/Makefile.in2
-rw-r--r--gdb/gdbthread.h16
-rw-r--r--gdb/gdbtypes.c352
-rw-r--r--gdb/gdbtypes.h84
-rw-r--r--gdb/gnu-nat.c9
-rw-r--r--gdb/go32-nat.c10
-rw-r--r--gdb/h8300-tdep.c17
-rw-r--r--gdb/hppa-hpux-tdep.c1443
-rw-r--r--gdb/hppa-linux-nat.c376
-rw-r--r--gdb/hppa-linux-tdep.c592
-rw-r--r--gdb/hppa-tdep.c2024
-rw-r--r--gdb/hppa-tdep.h176
-rw-r--r--gdb/hppabsd-nat.c119
-rw-r--r--gdb/hppabsd-tdep.c137
-rw-r--r--gdb/hppah-nat.c46
-rw-r--r--gdb/hpread.c75
-rw-r--r--gdb/hpux-thread.c25
-rw-r--r--gdb/i386-cygwin-tdep.c16
-rw-r--r--gdb/i386-interix-nat.c190
-rw-r--r--gdb/i386-interix-tdep.c358
-rw-r--r--gdb/i386-linux-nat.c64
-rw-r--r--gdb/i386-linux-tdep.c56
-rw-r--r--gdb/i386-nto-tdep.c29
-rw-r--r--gdb/i386-sol2-tdep.c26
-rw-r--r--gdb/i386-tdep.c531
-rw-r--r--gdb/i386-tdep.h48
-rw-r--r--gdb/i386bsd-nat.c156
-rw-r--r--gdb/i386bsd-tdep.c32
-rw-r--r--gdb/i386fbsd-nat.c46
-rw-r--r--gdb/i386gnu-nat.c32
-rw-r--r--gdb/i386ly-tdep.c2
-rw-r--r--gdb/i386nbsd-nat.c82
-rw-r--r--gdb/i386nbsd-tdep.c40
-rw-r--r--gdb/i386obsd-tdep.c80
-rw-r--r--gdb/i386v-nat.c4
-rw-r--r--gdb/i386v4-nat.c23
-rw-r--r--gdb/i387-tdep.c37
-rw-r--r--gdb/ia64-aix-nat.c60
-rw-r--r--gdb/ia64-linux-nat.c63
-rw-r--r--gdb/ia64-tdep.c19
-rw-r--r--gdb/inf-child.c241
-rw-r--r--gdb/inf-child.h (renamed from gdb/config/i386/tm-fbsd.h)17
-rw-r--r--gdb/inf-ptrace.c685
-rw-r--r--gdb/inf-ptrace.h (renamed from gdb/config/powerpc/nm-nbsd.h)16
-rw-r--r--gdb/infcall.c343
-rw-r--r--gdb/infcmd.c257
-rw-r--r--gdb/inferior.h33
-rw-r--r--gdb/inflow.c13
-rw-r--r--gdb/infptrace.c385
-rw-r--r--gdb/infrun.c1243
-rw-r--r--gdb/inftarg.c118
-rw-r--r--gdb/infttrace.c18
-rw-r--r--gdb/infttrace.h9
-rw-r--r--gdb/interps.c52
-rw-r--r--gdb/irix5-nat.c67
-rw-r--r--gdb/jv-lang.c67
-rw-r--r--gdb/kod.c19
-rw-r--r--gdb/language.c269
-rw-r--r--gdb/language.h156
-rw-r--r--gdb/libunwind-frame.c16
-rw-r--r--gdb/lin-lwp.c13
-rw-r--r--gdb/linespec.c2
-rw-r--r--gdb/linux-nat.c6
-rw-r--r--gdb/lynx-nat.c12
-rw-r--r--gdb/m2-lang.c8
-rw-r--r--gdb/m32r-rom.c36
-rw-r--r--gdb/m32r-tdep.c20
-rw-r--r--gdb/m68hc11-tdep.c70
-rw-r--r--gdb/m68k-tdep.c459
-rw-r--r--gdb/m68k-tdep.h61
-rw-r--r--gdb/m68kbsd-nat.c228
-rw-r--r--gdb/m68kbsd-tdep.c228
-rw-r--r--gdb/m68klinux-nat.c38
-rw-r--r--gdb/m68klinux-tdep.c194
-rw-r--r--gdb/m68knbsd-nat.c103
-rw-r--r--gdb/m88k-tdep.c895
-rw-r--r--gdb/m88k-tdep.h (renamed from gdb/config/i386/tm-linux64.h)47
-rw-r--r--gdb/m88kbsd-nat.c94
-rw-r--r--gdb/main.c26
-rw-r--r--gdb/maint.c27
-rw-r--r--gdb/mcore-tdep.c40
-rw-r--r--gdb/mdebugread.c138
-rw-r--r--gdb/memattr.c8
-rw-r--r--gdb/mi/gdb-mi.el568
-rw-r--r--gdb/mi/mi-cmd-break.c4
-rw-r--r--gdb/mi/mi-cmd-env.c2
-rw-r--r--gdb/mi/mi-cmd-file.c65
-rw-r--r--gdb/mi/mi-cmd-stack.c9
-rw-r--r--gdb/mi/mi-cmd-var.c5
-rw-r--r--gdb/mi/mi-cmds.c2
-rw-r--r--gdb/mi/mi-cmds.h2
-rw-r--r--gdb/mi/mi-interp.c111
-rw-r--r--gdb/mi/mi-main.c129
-rw-r--r--gdb/minimon.h601
-rw-r--r--gdb/minsyms.c2
-rw-r--r--gdb/mips-linux-tdep.c128
-rw-r--r--gdb/mips-nat.c254
-rw-r--r--gdb/mips-tdep.c1378
-rw-r--r--gdb/mips-tdep.h5
-rw-r--r--gdb/mipsnbsd-nat.c15
-rw-r--r--gdb/mipsnbsd-tdep.c35
-rw-r--r--gdb/mipsnbsd-tdep.h7
-rw-r--r--gdb/mipsread.c30
-rw-r--r--gdb/mipsv4-nat.c47
-rw-r--r--gdb/mn10300-tdep.c199
-rw-r--r--gdb/monitor.c28
-rw-r--r--gdb/nlm/Makefile.in2
-rw-r--r--gdb/nlmread.c13
-rw-r--r--gdb/ns32k-tdep.c86
-rw-r--r--gdb/ns32k-tdep.h2
-rw-r--r--gdb/ns32knbsd-nat.c15
-rw-r--r--gdb/nto-procfs.c5
-rw-r--r--gdb/nto-tdep.c17
-rw-r--r--gdb/objc-exp.y7
-rw-r--r--gdb/objc-lang.c8
-rw-r--r--gdb/objfiles.c34
-rw-r--r--gdb/objfiles.h33
-rw-r--r--gdb/observer.c59
-rw-r--r--gdb/observer.h35
-rwxr-xr-xgdb/observer.sh157
-rw-r--r--gdb/ocd.c13
-rw-r--r--gdb/ocd.h3
-rw-r--r--gdb/osabi.c19
-rw-r--r--gdb/p-exp.y7
-rw-r--r--gdb/p-lang.c8
-rw-r--r--gdb/p-valprint.c2
-rw-r--r--gdb/pa64solib.c49
-rw-r--r--gdb/parse.c58
-rw-r--r--gdb/parser-defs.h2
-rwxr-xr-xgdb/po/gdbtext38
-rw-r--r--gdb/ppc-bdm.c58
-rw-r--r--gdb/ppc-linux-nat.c440
-rw-r--r--gdb/ppc-linux-tdep.c78
-rw-r--r--gdb/ppc-sysv-tdep.c56
-rw-r--r--gdb/ppc-tdep.h282
-rw-r--r--gdb/ppcbug-rom.c2
-rw-r--r--gdb/ppcnbsd-nat.c95
-rw-r--r--gdb/ppcnbsd-tdep.c162
-rw-r--r--gdb/ppcobsd-nat.c98
-rw-r--r--gdb/ppcobsd-tdep.c178
-rw-r--r--gdb/ppcobsd-tdep.h54
-rw-r--r--gdb/printcmd.c26
-rw-r--r--gdb/proc-api.c4
-rw-r--r--gdb/proc-why.c2
-rw-r--r--gdb/procfs.c314
-rw-r--r--gdb/rdi-share/ardi.c6
-rw-r--r--gdb/regcache.c363
-rw-r--r--gdb/regcache.h51
-rw-r--r--gdb/regset.c46
-rw-r--r--gdb/regset.h30
-rw-r--r--gdb/remote-e7000.c32
-rw-r--r--gdb/remote-est.c2
-rw-r--r--gdb/remote-hms.c2
-rw-r--r--gdb/remote-m32r-sdi.c669
-rw-r--r--gdb/remote-mips.c124
-rw-r--r--gdb/remote-rdi.c54
-rw-r--r--gdb/remote-rdp.c9
-rw-r--r--gdb/remote-sds.c26
-rw-r--r--gdb/remote-sim.c32
-rw-r--r--gdb/remote-st.c5
-rw-r--r--gdb/remote-utils.c9
-rw-r--r--gdb/remote-vx.c30
-rw-r--r--gdb/remote-vx68.c55
-rw-r--r--gdb/remote-vxmips.c76
-rw-r--r--gdb/remote.c245
-rw-r--r--gdb/remote.h4
-rw-r--r--gdb/rom68k-rom.c4
-rw-r--r--gdb/rs6000-nat.c134
-rw-r--r--gdb/rs6000-tdep.c1219
-rw-r--r--gdb/s390-tdep.c42
-rw-r--r--gdb/scm-lang.c14
-rw-r--r--gdb/sentinel-frame.c3
-rw-r--r--gdb/ser-go32.c110
-rw-r--r--gdb/ser-tcp.c7
-rw-r--r--gdb/ser-unix.c20
-rw-r--r--gdb/serial.c19
-rw-r--r--gdb/serial.h5
-rw-r--r--gdb/sh-tdep.c18
-rw-r--r--gdb/sh3-rom.c2
-rw-r--r--gdb/sh64-tdep.c35
-rw-r--r--gdb/shnbsd-nat.c9
-rw-r--r--gdb/shnbsd-tdep.c39
-rw-r--r--gdb/sol-thread.c765
-rw-r--r--gdb/solib-aix5.c2
-rw-r--r--gdb/solib-frv.c36
-rw-r--r--gdb/solib-irix.c14
-rw-r--r--gdb/solib-osf.c1
-rw-r--r--gdb/solib-sunos.c109
-rw-r--r--gdb/solib-svr4.c132
-rw-r--r--gdb/solib.c44
-rw-r--r--gdb/somread.c3
-rw-r--r--gdb/somsolib.c52
-rw-r--r--gdb/source.c194
-rw-r--r--gdb/source.h3
-rw-r--r--gdb/sparc-linux-tdep.c9
-rw-r--r--gdb/sparc-nat.c14
-rw-r--r--gdb/sparc-sol2-tdep.c10
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/sparc64-sol2-tdep.c8
-rw-r--r--gdb/sparc64-tdep.c18
-rw-r--r--gdb/sparc64fbsd-tdep.c14
-rw-r--r--gdb/sparc64nbsd-nat.c39
-rw-r--r--gdb/sparc64nbsd-tdep.c14
-rw-r--r--gdb/sparc64obsd-tdep.c41
-rw-r--r--gdb/sparcnbsd-nat.c37
-rw-r--r--gdb/sparcnbsd-tdep.c21
-rw-r--r--gdb/sparcobsd-tdep.c8
-rw-r--r--gdb/stabsread.c62
-rw-r--r--gdb/stack.c192
-rw-r--r--gdb/standalone.c580
-rw-r--r--gdb/sun3-nat.c166
-rw-r--r--gdb/symfile-mem.c146
-rw-r--r--gdb/symfile.c372
-rw-r--r--gdb/symfile.h9
-rw-r--r--gdb/symmisc.c24
-rw-r--r--gdb/symtab.c120
-rw-r--r--gdb/symtab.h23
-rw-r--r--gdb/target.c63
-rw-r--r--gdb/target.h41
-rw-r--r--gdb/testsuite/ChangeLog1043
-rw-r--r--gdb/testsuite/Makefile.in5
-rw-r--r--gdb/testsuite/config/hppro.exp24
-rw-r--r--gdb/testsuite/config/sparclet.exp388
-rw-r--r--gdb/testsuite/config/udi.exp110
-rwxr-xr-xgdb/testsuite/configure12
-rw-r--r--gdb/testsuite/configure.in14
-rw-r--r--gdb/testsuite/gdb.ada/gnat_ada.gin (renamed from gdb/testsuite/gdb.ada/gnat_ada.gpr.in)0
-rw-r--r--gdb/testsuite/gdb.ada/null_record.exp4
-rw-r--r--gdb/testsuite/gdb.arch/e500-prologue.c54
-rw-r--r--gdb/testsuite/gdb.arch/e500-prologue.exp82
-rw-r--r--gdb/testsuite/gdb.arch/e500-regs.exp4
-rw-r--r--gdb/testsuite/gdb.arch/i386-cpuid.h77
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.c79
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp76
-rw-r--r--gdb/testsuite/gdb.arch/i386-sse.c90
-rw-r--r--gdb/testsuite/gdb.arch/i386-sse.exp92
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.c14
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.exp12
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-aix-prologue.c55
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp82
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp60
-rw-r--r--gdb/testsuite/gdb.asm/pa.inc44
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp101
-rw-r--r--gdb/testsuite/gdb.base/annota3.exp111
-rw-r--r--gdb/testsuite/gdb.base/attach.exp644
-rw-r--r--gdb/testsuite/gdb.base/auxv.c21
-rw-r--r--gdb/testsuite/gdb.base/auxv.exp10
-rw-r--r--gdb/testsuite/gdb.base/bigcore.c16
-rw-r--r--gdb/testsuite/gdb.base/bigcore.exp33
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp8
-rw-r--r--gdb/testsuite/gdb.base/call-sc.c83
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp500
-rw-r--r--gdb/testsuite/gdb.base/charset.c1
-rw-r--r--gdb/testsuite/gdb.base/charset.exp3
-rw-r--r--gdb/testsuite/gdb.base/complex.c22
-rw-r--r--gdb/testsuite/gdb.base/coremaker.c20
-rw-r--r--gdb/testsuite/gdb.base/coremaker2.c20
-rw-r--r--gdb/testsuite/gdb.base/define.exp36
-rw-r--r--gdb/testsuite/gdb.base/dump.exp69
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp496
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp12
-rw-r--r--gdb/testsuite/gdb.base/float.exp6
-rw-r--r--gdb/testsuite/gdb.base/foll-fork.exp3
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.c4
-rw-r--r--gdb/testsuite/gdb.base/gcore.c20
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp5
-rw-r--r--gdb/testsuite/gdb.base/gdb1476.c12
-rw-r--r--gdb/testsuite/gdb.base/gdb1476.exp72
-rw-r--r--gdb/testsuite/gdb.base/lineinc.c30
-rw-r--r--gdb/testsuite/gdb.base/lineinc.exp126
-rw-r--r--gdb/testsuite/gdb.base/lineinc1.h1
-rw-r--r--gdb/testsuite/gdb.base/lineinc2.h2
-rw-r--r--gdb/testsuite/gdb.base/lineinc3.h2
-rw-r--r--gdb/testsuite/gdb.base/logical.exp589
-rw-r--r--gdb/testsuite/gdb.base/long_long.c109
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp424
-rw-r--r--gdb/testsuite/gdb.base/pending.exp39
-rw-r--r--gdb/testsuite/gdb.base/radix.exp276
-rw-r--r--gdb/testsuite/gdb.base/remote.exp7
-rw-r--r--gdb/testsuite/gdb.base/restore.c41
-rw-r--r--gdb/testsuite/gdb.base/restore.exp39
-rw-r--r--gdb/testsuite/gdb.base/sep-proc.c (renamed from gdb/config/arm/xm-nbsd.h)20
-rw-r--r--gdb/testsuite/gdb.base/sep.c (renamed from gdb/m68knbsd-tdep.c)32
-rw-r--r--gdb/testsuite/gdb.base/sep.exp68
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp6
-rw-r--r--gdb/testsuite/gdb.base/sigaltstack.c97
-rw-r--r--gdb/testsuite/gdb.base/sigaltstack.exp105
-rw-r--r--gdb/testsuite/gdb.base/sigbpt.c (renamed from gdb/config/s390/tm-linux.h)51
-rw-r--r--gdb/testsuite/gdb.base/sigbpt.exp266
-rw-r--r--gdb/testsuite/gdb.base/siginfo.c69
-rw-r--r--gdb/testsuite/gdb.base/siginfo.exp98
-rw-r--r--gdb/testsuite/gdb.base/signals.exp678
-rw-r--r--gdb/testsuite/gdb.base/signull.c88
-rw-r--r--gdb/testsuite/gdb.base/signull.exp122
-rw-r--r--gdb/testsuite/gdb.base/sigstep.c68
-rw-r--r--gdb/testsuite/gdb.base/sigstep.exp423
-rw-r--r--gdb/testsuite/gdb.base/sizeof.exp56
-rw-r--r--gdb/testsuite/gdb.base/step-test.exp134
-rw-r--r--gdb/testsuite/gdb.base/store.exp87
-rw-r--r--gdb/testsuite/gdb.base/structs.exp100
-rw-r--r--gdb/testsuite/gdb.base/structs2.exp12
-rw-r--r--gdb/testsuite/gdb.base/unload.c58
-rw-r--r--gdb/testsuite/gdb.base/unload.exp144
-rw-r--r--gdb/testsuite/gdb.base/unloadshr.c (renamed from gdb/config/m68k/tm-st2000.h)17
-rw-r--r--gdb/testsuite/gdb.base/whatis.c24
-rw-r--r--gdb/testsuite/gdb.base/whatis.exp19
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp740
-rw-r--r--gdb/testsuite/gdb.cp/ctti.exp26
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp133
-rw-r--r--gdb/testsuite/gdb.cp/inherit.exp703
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp14
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp6
-rw-r--r--gdb/testsuite/gdb.cp/pr-1553.cc53
-rw-r--r--gdb/testsuite/gdb.cp/pr-574.cc20
-rw-r--r--gdb/testsuite/gdb.cp/printmethod.cc20
-rw-r--r--gdb/testsuite/gdb.cp/psmang1.cc20
-rw-r--r--gdb/testsuite/gdb.cp/psmang2.cc20
-rw-r--r--gdb/testsuite/gdb.cp/ref-types.cc20
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp26
-rw-r--r--gdb/testsuite/gdb.cp/templates.exp10
-rw-r--r--gdb/testsuite/gdb.cp/try_catch.cc20
-rw-r--r--gdb/testsuite/gdb.cp/userdef.cc20
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.cc20
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp504
-rw-r--r--gdb/testsuite/gdb.fortran/Makefile.in34
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp26
-rw-r--r--gdb/testsuite/gdb.gdb/observer.exp144
-rw-r--r--gdb/testsuite/gdb.gdb/selftest.exp (renamed from gdb/testsuite/gdb.base/selftest.exp)27
-rw-r--r--gdb/testsuite/gdb.gdb/xfullpath.exp26
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp154
-rw-r--r--gdb/testsuite/gdb.java/jmain.exp67
-rw-r--r--gdb/testsuite/gdb.java/jmain.java7
-rw-r--r--gdb/testsuite/gdb.java/jmisc.exp4
-rw-r--r--gdb/testsuite/gdb.java/jmisc1.exp4
-rw-r--r--gdb/testsuite/gdb.java/jmisc2.exp91
-rw-r--r--gdb/testsuite/gdb.mi/basics.c22
-rw-r--r--gdb/testsuite/gdb.mi/gdb792.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-break.exp61
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp45
-rw-r--r--gdb/testsuite/gdb.mi/mi-console.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-disassemble.exp59
-rw-r--r--gdb/testsuite/gdb.mi/mi-eval.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi-file.exp32
-rw-r--r--gdb/testsuite/gdb.mi/mi-hack-cli.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-read-memory.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-regs.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-return.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi-simplerun.exp52
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp14
-rw-r--r--gdb/testsuite/gdb.mi/mi-stepi.exp36
-rw-r--r--gdb/testsuite/gdb.mi/mi-until.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-block.exp29
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp75
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp38
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-display.exp28
-rw-r--r--gdb/testsuite/gdb.mi/mi-watch.exp32
-rw-r--r--gdb/testsuite/gdb.mi/mi2-basics.exp3
-rw-r--r--gdb/testsuite/gdb.mi/mi2-break.exp61
-rw-r--r--gdb/testsuite/gdb.mi/mi2-cli.exp45
-rw-r--r--gdb/testsuite/gdb.mi/mi2-console.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi2-disassemble.exp59
-rw-r--r--gdb/testsuite/gdb.mi/mi2-eval.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi2-file.exp22
-rw-r--r--gdb/testsuite/gdb.mi/mi2-hack-cli.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi2-read-memory.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi2-regs.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi2-return.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi2-simplerun.exp52
-rw-r--r--gdb/testsuite/gdb.mi/mi2-stack.exp14
-rw-r--r--gdb/testsuite/gdb.mi/mi2-stepi.exp36
-rw-r--r--gdb/testsuite/gdb.mi/mi2-until.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-block.exp29
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-child.exp75
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-cmd.exp38
-rw-r--r--gdb/testsuite/gdb.mi/mi2-var-display.exp28
-rw-r--r--gdb/testsuite/gdb.mi/mi2-watch.exp32
-rw-r--r--gdb/testsuite/gdb.mi/pthreads.c1
-rw-r--r--gdb/testsuite/gdb.mi/var-cmd.c21
-rw-r--r--gdb/testsuite/gdb.stabs/exclfwd.exp72
-rw-r--r--gdb/testsuite/gdb.stabs/exclfwd.h (renamed from gdb/config/arm/tm-nbsd.h)18
-rw-r--r--gdb/testsuite/gdb.stabs/exclfwd1.c (renamed from gdb/config/alpha/xm-alphalinux.h)30
-rw-r--r--gdb/testsuite/gdb.stabs/exclfwd2.c (renamed from gdb/config/i386/nm-i386lynx.h)24
-rw-r--r--gdb/testsuite/gdb.stabs/weird.exp2
-rw-r--r--gdb/testsuite/gdb.threads/bp_in_thread.exp (renamed from gdb/testsuite/gdb.cp/pr-1553.exp)45
-rw-r--r--gdb/testsuite/gdb.threads/killed.c20
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.c68
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.exp127
-rw-r--r--gdb/testsuite/gdb.threads/pthread_cond_wait.c76
-rw-r--r--gdb/testsuite/gdb.threads/pthread_cond_wait.exp73
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.c3
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.exp7
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.c21
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.c73
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.exp95
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.c75
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.exp96
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads.exp125
-rw-r--r--gdb/testsuite/lib/compiler.c41
-rw-r--r--gdb/testsuite/lib/compiler.cc39
-rw-r--r--gdb/testsuite/lib/cp-support.exp469
-rw-r--r--gdb/testsuite/lib/gdb.exp289
-rw-r--r--gdb/testsuite/lib/insight-support.exp318
-rw-r--r--gdb/testsuite/lib/java.exp19
-rw-r--r--gdb/thread-db.c107
-rw-r--r--gdb/thread.c80
-rw-r--r--gdb/top.c319
-rw-r--r--gdb/tracepoint.c91
-rw-r--r--gdb/tracepoint.h10
-rw-r--r--gdb/trad-frame.c37
-rw-r--r--gdb/trad-frame.h15
-rw-r--r--gdb/tramp-frame.c26
-rw-r--r--gdb/tramp-frame.h30
-rw-r--r--gdb/tui/tui-hooks.c44
-rw-r--r--gdb/tui/tui-io.c10
-rw-r--r--gdb/tui/tui-win.c8
-rw-r--r--gdb/tui/tui.c28
-rw-r--r--gdb/ui-out.c4
-rw-r--r--gdb/utils.c346
-rw-r--r--gdb/uw-thread.c14
-rw-r--r--gdb/v850-tdep.c49
-rw-r--r--gdb/v850ice.c10
-rw-r--r--gdb/valarith.c10
-rw-r--r--gdb/valops.c96
-rw-r--r--gdb/valprint.c249
-rw-r--r--gdb/value.h4
-rw-r--r--gdb/values.c95
-rw-r--r--gdb/varobj.c12
-rw-r--r--gdb/vax-nat.c106
-rw-r--r--gdb/vax-tdep.c617
-rw-r--r--gdb/vax-tdep.h46
-rw-r--r--gdb/vaxbsd-nat.c138
-rw-r--r--gdb/vaxnbsd-tdep.c75
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/vx-share/wait.h6
-rw-r--r--gdb/win32-nat.c257
-rw-r--r--gdb/wince.c30
-rw-r--r--gdb/xcoffread.c7
-rw-r--r--gdb/xcoffsolib.c12
-rw-r--r--gdb/xmodem.c275
-rw-r--r--gdb/xmodem.h32
-rw-r--r--gdb/xstormy16-tdep.c137
-rw-r--r--include/ChangeLog2199
-rw-r--r--include/ansidecl.h26
-rw-r--r--include/bfdlink.h16
-rw-r--r--include/bin-bugs.h2
-rw-r--r--include/coff/ChangeLog14
-rw-r--r--include/coff/ecoff.h28
-rw-r--r--include/coff/internal.h1
-rw-r--r--include/coff/mips.h30
-rw-r--r--include/coff/symconst.h2
-rw-r--r--include/demangle.h2
-rw-r--r--include/dis-asm.h1
-rw-r--r--include/elf/ChangeLog59
-rw-r--r--include/elf/arm.h13
-rw-r--r--include/elf/common.h10
-rw-r--r--include/elf/crx.h53
-rw-r--r--include/elf/i386.h3
-rw-r--r--include/elf/m32r.h5
-rw-r--r--include/elf/mips.h9
-rw-r--r--include/elf/msp430.h4
-rw-r--r--include/elf/sh.h75
-rw-r--r--include/gdb/ChangeLog20
-rw-r--r--include/gdb/callback.h11
-rw-r--r--include/gdb/sim-ppc.h771
-rw-r--r--include/gdb/sim-sh.h15
-rw-r--r--include/hashtab.h13
-rw-r--r--include/libiberty.h47
-rw-r--r--include/obstack.h4
-rw-r--r--include/opcode/ChangeLog67
-rw-r--r--include/opcode/arm.h385
-rw-r--r--include/opcode/avr.h15
-rw-r--r--include/opcode/crx.h395
-rw-r--r--include/opcode/h8300.h2
-rw-r--r--include/opcode/i386.h226
-rw-r--r--include/opcode/m68k.h63
-rw-r--r--include/opcode/msp430.h107
-rw-r--r--include/opcode/ppc.h2
-rw-r--r--libiberty/ChangeLog73
-rw-r--r--libiberty/Makefile.in3
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure270
-rw-r--r--libiberty/configure.ac39
-rw-r--r--libiberty/cp-demangle.c2
-rw-r--r--libiberty/cp-demangle.h20
-rw-r--r--libiberty/hashtab.c251
-rw-r--r--libiberty/lrealpath.c30
-rw-r--r--libiberty/mkstemps.c6
-rw-r--r--libiberty/pex-win32.c7
-rw-r--r--libiberty/strerror.c6
-rw-r--r--libiberty/testsuite/demangle-expected5
-rw-r--r--libiberty/vasprintf.c3
-rw-r--r--libtool.m44
-rw-r--r--ltcf-c.sh6
-rw-r--r--ltcf-cxx.sh6
-rw-r--r--ltcf-gcj.sh6
-rwxr-xr-xltconfig11
-rwxr-xr-xmissing129
-rw-r--r--opcodes/ChangeLog270
-rw-r--r--opcodes/Makefile.am7
-rw-r--r--opcodes/Makefile.in310
-rw-r--r--opcodes/aclocal.m4821
-rw-r--r--opcodes/arc-ext.c4
-rw-r--r--opcodes/arm-opc.h2
-rw-r--r--opcodes/config.in188
-rwxr-xr-xopcodes/configure9859
-rw-r--r--opcodes/configure.in15
-rw-r--r--opcodes/crx-dis.c700
-rw-r--r--opcodes/crx-opc.c675
-rw-r--r--opcodes/disassemble.c9
-rw-r--r--opcodes/frv-desc.c4
-rw-r--r--opcodes/frv-desc.h2
-rw-r--r--opcodes/frv-opc.c2
-rw-r--r--opcodes/frv-opc.h2
-rw-r--r--opcodes/h8300-dis.c47
-rw-r--r--opcodes/h8500-dis.c32
-rw-r--r--opcodes/i386-dis.c248
-rw-r--r--opcodes/ia64-asmtab.c4460
-rw-r--r--opcodes/ia64-gen.c8
-rw-r--r--opcodes/ia64-opc-a.c3
-rw-r--r--opcodes/m68k-dis.c565
-rw-r--r--opcodes/m68k-opc.c4140
-rw-r--r--opcodes/mips-opc.c45
-rw-r--r--opcodes/po/fr.po5
-rw-r--r--opcodes/ppc-opc.c77
-rw-r--r--opcodes/s390-opc.txt18
-rw-r--r--opcodes/sh-dis.c181
-rw-r--r--opcodes/sh-opc.h341
-rw-r--r--opcodes/sparc-opc.c164
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/armemu.c6
-rw-r--r--sim/common/ChangeLog51
-rw-r--r--sim/common/Makefile.in4
-rw-r--r--sim/common/callback.c59
-rw-r--r--sim/common/dv-glue.c4
-rw-r--r--sim/common/hw-tree.c2
-rw-r--r--sim/common/run.c9
-rw-r--r--sim/common/sim-basics.h4
-rw-r--r--sim/common/sim-load.c8
-rw-r--r--sim/common/sim-options.c4
-rw-r--r--sim/common/syscall.c4
-rw-r--r--sim/d10v/ChangeLog5
-rw-r--r--sim/d10v/interp.c6
-rw-r--r--sim/frv/ChangeLog5
-rw-r--r--sim/frv/arch.c2
-rw-r--r--sim/frv/arch.h2
-rw-r--r--sim/frv/cpu.c2
-rw-r--r--sim/frv/cpu.h2
-rw-r--r--sim/frv/cpuall.h2
-rw-r--r--sim/frv/decode.c2
-rw-r--r--sim/frv/decode.h2
-rw-r--r--sim/frv/model.c2
-rw-r--r--sim/frv/sem.c2
-rw-r--r--sim/h8300/ChangeLog16
-rw-r--r--sim/h8300/compile.c67
-rw-r--r--sim/m32r/ChangeLog4
-rw-r--r--sim/m32r/Makefile.in17
-rw-r--r--sim/m68hc11/ChangeLog5
-rw-r--r--sim/m68hc11/interp.c5
-rw-r--r--sim/mips/ChangeLog39
-rwxr-xr-xsim/mips/configure4
-rw-r--r--sim/mips/configure.in4
-rw-r--r--sim/mips/interp.c2
-rw-r--r--sim/mips/mips.igen95
-rw-r--r--sim/mips/sb1.igen94
-rw-r--r--sim/mips/sim-main.h2
-rw-r--r--sim/mn10200/ChangeLog4
-rw-r--r--sim/mn10200/interp.c6
-rw-r--r--sim/mn10300/ChangeLog89
-rw-r--r--sim/mn10300/Makefile.in52
-rw-r--r--sim/mn10300/am33-2.igen2285
-rw-r--r--sim/mn10300/am33.igen456
-rw-r--r--sim/mn10300/configure.in16
-rw-r--r--sim/mn10300/gencode.c163
-rw-r--r--sim/mn10300/interp.c1515
-rw-r--r--sim/mn10300/mn10300.igen241
-rw-r--r--sim/mn10300/mn10300_sim.h331
-rw-r--r--sim/mn10300/op_utils.c2
-rw-r--r--sim/mn10300/simops.c3239
-rw-r--r--sim/ppc/ChangeLog95
-rw-r--r--sim/ppc/Makefile.in413
-rwxr-xr-xsim/ppc/configure2
-rw-r--r--sim/ppc/configure.in2
-rw-r--r--sim/ppc/e500_registers.h7
-rw-r--r--sim/ppc/gdb-sim.c1295
-rw-r--r--sim/ppc/hw_htab.c6
-rw-r--r--sim/ppc/hw_init.c4
-rw-r--r--sim/ppc/sim_callbacks.h4
-rw-r--r--sim/ppc/sim_calls.c74
-rw-r--r--sim/ppc/tree.c2
-rw-r--r--sim/sh/ChangeLog43
-rw-r--r--sim/sh/gencode.c440
-rw-r--r--sim/sh/interp.c348
-rw-r--r--sim/testsuite/ChangeLog17
-rw-r--r--sim/testsuite/lib/sim-defs.exp21
-rw-r--r--sim/testsuite/sim/h8300/ChangeLog13
-rw-r--r--sim/testsuite/sim/h8300/band.s6
-rw-r--r--sim/testsuite/sim/h8300/biand.s4
-rw-r--r--sim/testsuite/sim/h8300/bset.s4
-rw-r--r--sim/testsuite/sim/h8300/div.s12
-rw-r--r--sim/testsuite/sim/h8300/mul.s16
-rw-r--r--sim/testsuite/sim/mips/ChangeLog35
-rw-r--r--sim/testsuite/sim/mips/basic.exp11
-rw-r--r--sim/testsuite/sim/mips/fpu64-ps-sb1.s72
-rw-r--r--sim/testsuite/sim/mips/fpu64-ps.s367
-rw-r--r--sim/testsuite/sim/mips/mdmx-ob-sb1.s102
-rw-r--r--sim/testsuite/sim/mips/mdmx-ob.s631
-rw-r--r--sim/testsuite/sim/mips/utils-fpu.inc105
-rw-r--r--sim/testsuite/sim/mips/utils-mdmx.inc72
-rw-r--r--sim/testsuite/sim/sh/ChangeLog30
-rw-r--r--sim/testsuite/sim/sh/allinsn.exp26
-rw-r--r--sim/testsuite/sim/sh/bandor.s120
-rw-r--r--sim/testsuite/sim/sh/bandornot.s120
-rw-r--r--sim/testsuite/sim/sh/bclr.s139
-rw-r--r--sim/testsuite/sim/sh/bld.s121
-rw-r--r--sim/testsuite/sim/sh/bldnot.s102
-rw-r--r--sim/testsuite/sim/sh/bset.s139
-rw-r--r--sim/testsuite/sim/sh/bst.s142
-rw-r--r--sim/testsuite/sim/sh/bxor.s120
-rw-r--r--sim/testsuite/sim/sh/clip.s89
-rw-r--r--sim/testsuite/sim/sh/div.s199
-rw-r--r--sim/testsuite/sim/sh/fail.s13
-rw-r--r--sim/testsuite/sim/sh/fsca.s97
-rw-r--r--sim/testsuite/sim/sh/fsrra.s62
-rw-r--r--sim/testsuite/sim/sh/mov.s118
-rw-r--r--sim/testsuite/sim/sh/movi.s47
-rw-r--r--sim/testsuite/sim/sh/movua.s68
-rw-r--r--sim/testsuite/sim/sh/mulr.s162
-rw-r--r--sim/testsuite/sim/sh/pass.s14
-rw-r--r--sim/testsuite/sim/sh/pushpop.s146
-rw-r--r--sim/testsuite/sim/sh/resbank.s268
-rw-r--r--sim/testsuite/sim/sh/testutils.inc26
-rw-r--r--src-release4
1285 files changed, 119036 insertions, 71593 deletions
diff --git a/ChangeLog b/ChangeLog
index 76cea3506d7..1a8463701e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,641 @@
+2004-09-09 Daniel Berlin <dberlin@dberlin.org>
+
+ * Makefile.def: Remove libbanshee.
+ * Makefile.tpl: Ditto.
+ * configure.in: Ditto.
+ * Makefile.in: Regen.
+ * configure: Ditto.
+
+2004-09-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * missing: Import latest version from master repository.
+
+2004-09-04 Nick Clifton <nickc@redhat.com>
+
+ * config.sub: Import latest version from master repository.
+ * config.guess: Likewise.
+ This includes these changes:
+
+ 2004-08-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.sub: Handle crisv32, alias etraxfs.
+ * config.guess (crisv32:Linux:*:*): Handle.
+
+ 2004-08-13 Brad Smith <brad@comstyle.com>
+
+ * config.guess (*:OpenBSD:*:*): Remove defunct MIPS machines.
+ (sgi:OpenBSD:*:*): Emit mips64, not mipseb.
+
+ 2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.guess (*:Darwin:*:*): If uname -p reports "unknown",
+ assume the processor is a powerpc. This is because coreutils
+ uname (at least versions 4.5.7 through 5.2.1) outputs "unknown"
+ in this case, due to a MacOS X bug that causes
+ sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
+ to return a negative number.
+ Problem reported by Petter Reinholdtsen in:
+ http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
+
+ 2004-07-19 Ben Elliston <bje@gnu.org>
+
+ * config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine.
+
+ 2004-06-24 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Update copyright years.
+ * config.sub: Likewise.
+
+ 2004-06-22 Robert Millan <robertmh@gnu.org>
+
+ * config.guess (*:FreeBSD:*:*): Remove check for glibc (unneeded
+ since GNU/kFreeBSD systems match *:GNU/*:*:* instead).
+
+ 2004-06-22 Stanley F. Quayle <stan@stanq.com>
+
+ * config.guess (*:*VMS:*:*): New entry. Replaces
+ Alpha:OpenVMS:*. Recognize and advertise all VMS flavors as dec
+ manufacturer.
+
+ 2004-06-22 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Cray fixes from Wendy Palm <wendyp@cray.com>.
+ * config.sub: Likewise.
+
+ 2004-06-22 Ben Elliston <bje@gnu.org>
+
+ Reported by Hans-Peter Nilsson <hp@bitrange.com>:
+ * config.sub: Correctly handle mmix-knuth and mmix-knuth-mmixware.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (pegasos:OpenBSD:*:*): Remove.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ From Wouter Verhelst <wouter@grep.be>:
+ * config.guess (M68*:*:R3V[5678]:*): Detect R3V8.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (luna88k:OpenBSD:*:*): New.
+
+ 2004-03-12 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * config.guess (m32r*:Linux:*:*): New case.
+ * config.sub: Handle m32rle.
+
+ 2004-03-12 Ben Elliston <bje@wasabisystems.com>
+
+ From Jens Petersen <petersen@redhat.com>:
+ * config.sub: Handle sparcv8.
+
+ 2004-03-03 Ben Elliston <bje@wasabisystems.com>
+
+ From Tom Smith <smith@cag.lkg.hp.com>:
+ * config.guess: Version suffixes are equally significant on Tru64
+ V4.* and V5.*, so do not ignore them on V5.*. Handle a version
+ prefix of "P" (patched kernel).
+
+ 2004-02-23 Tal Agmon <Tal.Agmon@nsc.com>
+
+ * config.sub: Add support for National Semiconductor CRX target.
+
+2004-09-03 Jan Beulich <jbeulich@novell.com>
+
+ * configure.in: Remove target-libstdc++-v3 from noconfigdirs for
+ *-*-netware, but add target-libmudflap.
+ Consolidate *-*-netware targets (of which really only i?86 exists)
+ into a single entry.
+ * configure: Likewise.
+
+2004-09-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (sorry): Remove.
+ (clean-stage[+id+], clean-stage[+id+]-module): New targets.
+ (cleanstrap targets): Depend on distclean, not distclean-stage1.
+ (do-clean): Clean per-stage directories too.
+ (do-distclean): Run distclean-stage1 too.
+ (.NOTPARALLEL): Enable during toplevel bootstrap.
+ (stage[+id+]-bubble): Enable parallel execution during
+ the recursive invocation.
+ * Makefile.in: Regenerate.
+
+ Sync from gcc (moving the Makefile.in change to Makefile.tpl):
+
+ 2004-08-31 Robert Bowdidge <bowdidge@apple.com>
+
+ * Makefile.in: Move BOOT_CFLAGS above host makefile fragment include.
+ * configure.in: add test for powerpc-*-darwin* to specify makefile frag
+ * configure: regenerate
+ * config/mh-ppc-darwin: create file, override BOOT_CFLAGS for
+ -mdynamic-no-pic
+
+2004-08-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Move BOOT_CFLAGS above host makefile fragment
+ include.
+ * configure.in: Fix indentation.
+ * configure: Regenerate.
+
+2004-08-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (build_modules): Add fixincludes.
+ (dependencies): Make gcc depend on fixincludes.
+ * configure.in (build_tools): Add fixincludes.
+ (build_configdirs): Always include build_libs.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-08-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bootstrap stages): Add 'lean' parameter.
+ * Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into
+ phony targets; do not generate timestamp files.
+ (distclean-stageN): Remove references to their timestamp files.
+ (restageN, touch-stageN): Remove.
+ (stageN-bubble): Rewritten.
+ (compare): Support lean bootstraps.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Only warn when bootstrapping but
+ build != host or build != target. Support lean bootstraps.
+ * configure: Regenerate.
+
+ Sync from gcc:
+ 2004-08-26 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Give a better error message if GMP/MPFR are missing
+ and a language needing them has been requested.
+ * configure: Regenerated.
+
+ 2004-08-25 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Print a list of available language front-ends if
+ a requested one is missing. Tidy stray tab characters.
+ * configure: Regenerated.
+
+2004-08-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+ * Makefile.def (bootstrap-stage): Rename extra_*_flags to
+ stage_*_flags.
+ * Makefile.tpl (configure-[+module+], all-[+module+]): Exit
+ for bootstrapped modules if toplevel bootstrap is going.
+ (GCC bootstrap): Generate per-stage targets for all bootstrapped
+ modules. Adjust for changes in Makefile.def. Enable several
+ rules even in non-bootstrap mode, just to avoid peppering the
+ template with unnecessary "@if/@endif gcc-bootstrap" pairs.
+ (stage-[+prev+]-bubble): Remove.
+
+ * Makefile.def (Dependencies): Depend on all-build-bison,
+ all-build-flex, all-build-byacc, all-build-texinfo, rather
+ than the host variations.
+ * Makefile.tpl (BUILD_DIR_PREFIX): Remove. Replace throughout
+ with BUILD_SUBDIR.
+ (BISON): Update for recent Bisons.
+ (YACC): Fix typo.
+ (cross): Depend on all-build.
+ (all): Do not depend on all-build.
+ (prebootstrap): Remove.
+ (dep-kind): Accept separate prefixes for MODULE and ON variables.
+ (Prebootstrap dependencies): Add them to the per-stage targets
+ and to all-prebootstrap.
+ * configure.in (build_configdirs): Always enable build_tools.
+ (BUILD_DIR_PREFIX): Remove.
+
+ * Makefile.def (gcc): Add target variable.
+ (gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags.
+ * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*)
+ in the recursive `make', instead of hardwiring `all'.
+ (Autogenerated TARGET-* variables): New.
+
+2004-08-17 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: In noconfigdirs check, match GNU/k*BSD with GNU/Linux
+ (instead of FreeBSD).
+ * configure: Regenerate.
+
+2004-08-12 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.def, configure.in, src-release: Remove useless, bogus
+ references to tix.
+ * Makefile.in, configure: Regenerate.
+
+ * src-release: Stop distributing mmalloc with gdb (which doesn't
+ use it).
+ * Makefile.def: GDB doesn't depend on mmalloc anymore.
+ * Makefile.in: Regenerate.
+
+2004-08-09 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in (arm*-*-eabi*): New target.
+ * configure: Regenerate.
+
+2004-08-01 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: Turn mt-linux into mt-gnu. Use mt-gnu and enable
+ libmudflap for all GNU-based systems (with Glibc).
+ * configure: Regenerate.
+
+2004-08-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bfd, opcodes, gcc, zlib): Mark as bootstrap module.
+ (bison, byacc, flex, texinfo): Do not mark as bootstrap module.
+ (Dependencies): New section.
+ * Makefile.tpl (Dependencies): Generate from Makefile.def.
+ (configure-target-[+module+]): Depend on maybe-all-gcc
+ (all-prebootstrap): New name of all-bootstrap. Changed throughout.
+ (toplevel profiledbootstrap): Fix dependencies.
+ * Makefile.in: Regenerate.
+
+2004-08-03 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in (arm*-*-symbianelf*): Add ${libgcj} and
+ target-libiberty to noconfigdirs.
+
+2004-08-03 Paul Brook <paul@codesourcery.com>
+
+ * configure.in: Check for MPFR as well as GMP.
+ * configure: Regenerate.
+
+2004-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host-modules): Add gcc.
+ * Makefile.in: Regenerate.
+ * Makefile.tpl (sorry): New rule.
+ (configure-host, all-host, [+make_target+]-host, do-check,
+ install-host): Do not add gcc as a special case.
+ (host modules): Add a small special-casing for gcc. Export
+ extra_make_flags through the environment.
+ (maybe-configure-gcc, configure-gcc, maybe-all-gcc, all-gcc,
+ maybe-check-gcc, check-gcc, maybe-install-gcc, install-gcc,
+ other recursive targets for gcc): Remove.
+
+ (all, do-[+make_target+], do-check): Wrap between unstage and stage.
+ (stage, unstage): New rules.
+ (stage[+id+]-start, stage[+id+]-end, [+compare-target+],
+ distclean-stage[+id+]): Use stage_current.
+ ([+bootstrap-target+], profiledbootstrap): Do not invoke manually
+ the stage*-start rules.
+
+2004-07-19 Robert Millan <robertmh@gnu.org>
+
+ Synced from gcc:
+
+ 2004-04-26 Robert Millan <robertmh@gnu.org>
+
+ Add patches from libtool CVS.
+ * libtool.m4: Add kfreebsd*-gnu and knetbsd*-gnu.
+ * ltconfig: Likewise.
+ * ltcf-c.sh: Likewise.
+ * ltcf-cxx.sh: Likewise.
+ * ltcf-gcj.sh: Likewise.
+
+2004-07-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Add noconfigdirs for crx-*-*.
+ * configure: Regenerate.
+
+2004-07-12 Paolo Bonzini <bonzini@gnu.org>
+
+ Synced from gcc:
+
+ 2004-07-09 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.in: Build libmudflap by default on FreeBSD.
+ * configure: Regenerated.
+
+ 2004-07-09 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in: Do not build libmudflap by default on non-GNU/Linux
+ systems.
+ * configure: Regenerated.
+
+ 2004-07-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/16344
+ * Makefile.tpl (profiledbootstrap): Build runtime libraries with
+ feedback based compiler.
+ * Makefile.in: Rebuilt.
+
+ 2004-07-05 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Do not prepend $srcdir to /dev/null in
+ makefile fragments.
+ * configure: Regenerate.
+
+2004-07-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.def (host_modules): Set bootstrap=true for flex.
+ * Makefile.tpl (all-gcc): Depend on texinfo and flex.
+ * Makefile.in: Rebuilt.
+
+2004-07-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (build_modules): Add bison, byacc, flex,
+ m4, texinfo.
+ (flags_to_pass): Add FLEX.
+ * Makefile.tpl (BUILD_DIR_PREFIX, BASE_EXPORTS): New.
+ (BUILD_EXPORTS, HOST_EXPORTS, BASE_TARGET_EXPORTS): Include it.
+ (DEFAULT_YACC, USUAL_YACC, DEFAULT_LEX, USUAL_LEX, DEFAULT_M4,
+ DEFAULT_MAKEINFO): Remove.
+ (CONFIGURED_YACC, CONFIGURED_FLEX, CONFIGURED_BISON,
+ CONFIGURED_LEX, CONFIGURED_M4, CONFIGURED_MAKEINFO): Substitute.
+ (YACC, FLEX, BISON, LEX, M4, MAKEINFO): Define to look into
+ objdir or else use configured tool.
+ (all-build): New.
+ (all): Depend on it.
+ (Build module dependencies): Add.
+ * Makefile.in: Regenerate.
+ * configure.in: Better support for multiple build modules,
+ matching what is done for host/target modules. Do not look
+ for "plausible" locations of build tools if Canadian cross.
+ Use autoconf's AC_PROG_CC to find a C compiler. Define
+ BUILD_DIR_PREFIX. Look for flex, makeinfo and m4.
+ * configure: Regenerate.
+
+2004-06-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (HOST_EXPORTS): Fix pasto.
+ * Makefile.in: Regenerate.
+
+2004-06-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (configure-build-[+module+],
+ configure-[+module+], configure-target-[+module+]): Pass
+ [+extra_configure_args+].
+ (all-build-[+module+], all-[+module+], check-[+module+],
+ install-[+module+], [+make_target+]-[+module+],
+ all-target-[+module+], check-target-[+module+],
+ install-target-[+module+], [+make_target+]-target-[+module+]):
+ Pass [+extra_make_args+].
+ (HOST_EXPORTS): Include the former GCC_HOST_EXPORTS.
+ (GCC_HOST_EXPORTS): Remove.
+ (configure-gcc, all-gcc, GCC_STRAP_TARGETS, profiledbootstrap,
+ cross, check-gcc, check-gcc-c++, install-gcc,
+ gcc-no-fixedincludes, [+make_target+]-gcc, stage[+id+]-bubble):
+ Replace GCC_HOST_EXPORTS with HOST_EXPORTS.
+ * Makefile.in: Regenerate.
+
+2004-06-21 Christopher Faylor <cgf@alum.bu.edu>
+
+ * configure.in: Check for srcdir/winsup rather than build directory
+ winsup.
+ * configure: Regenerate.
+
+2004-06-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.in: Don't build Cygwin native newlib if winsup
+ directory is missing. Emit warning instead.
+ * configure: Regenerate.
+
+2004-06-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (touch-stage[+id+]): New.
+ (restage[+prev+]): Depend on touch-stage[+id+].
+
+ * Makefile.tpl (RECURSE_FLAGS_TO_PASS): New.
+ Use it throughout.
+
+ * Makefile.def: Add profile and feedback bootstrap stages.
+ Remove next field from bootstrap stages.
+ * Makefile.tpl (LN, LN_S): Substitute.
+ (stageN-start, stageN-end): Use double-colon rules, to
+ provide a hook for additional setup commands.
+ (distclean-stageN-gcc, restageN): Create dependencies from
+ [+prev+], not from [+next+].
+ (stageN-bubble): Add commands for successive stages from
+ [+prev+], using double-colon rules.
+ (all-stageN-gcc): Fix typo.
+ (stagefeedback-start, profiledbootstrap): New.
+ * Makefile.in: Regenerate.
+ * configure.in: Call ACX_PROG_LN.
+ * configure: Regenerate.
+
+2004-06-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Fix --enable-bootstrap breakage introduced in trees
+ without gcc.
+ * configure: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Fix typo.
+ * Makefile.in: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Remove new- prefix from toplevel
+ bootstrap targets.
+ * configure: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ Merge this patch from the gcc tree:
+
+ 2004-05-30 Andreas Jaeger <aj@suse.de>
+ Jim Wilson <wilson@specifixinc.com>
+
+ * config-ml.in: Pass FFLAGS and ADAFLAGS for multilibs, handle F77
+ like CC.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all.normal): Rename to all.
+ (all): Replace with a rule to pick the default
+ target from configure.
+ (all-gcc, configure-gcc): Use conditionals to
+ do nothing when toplevel bootstrap is going on.
+ (GCC directory bootstrap) [gcc-bootstrap]: Disable.
+ (Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
+ * configure.in: Support --enable-bootstrap.
+
+ * Makefile.def: Remove new- prefix from toplevel
+ bootstrap targets.
+ * Makefile.tpl: Likewise.
+
+ * Makefile.def: Add bootstrap_stage 4. Add bootstrap2
+ target.
+
+ * Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS)
+ $(RECURSE_FLAGS) to recursive invocation of make.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-05-27 Daniel Jacobowitz <dan@debian.org>
+
+ * configure.in: Fix sed invocation for GFORTRAN_FOR_TARGET.
+ * configure: Regenerate.
+
+2004-05-25 Daniel Jacobowitz <drow@false.org>
+
+ * Makefile.tpl (BUILD_EXPORTS, HOST_EXPORTS, GCC_HOST_EXPORTS)
+ (STAGE_HOST_EXPORTS, BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS)
+ (NORMAL_TARGET_EXPORTS): New macros. Use them in all the recursive
+ targets.
+ * Makefile.in: Regenerate.
+
+2005-05-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Test the ability to symlink directories.
+ * configure: Regenerate.
+
+ * Makefile.def (bootstrap-stage): New definitions.
+ * Makefile.tpl (configure-stage1-gcc,
+ configure-stage2-gcc, configure-stage3-gcc,
+ all-stage1-gcc, all-stage2-gcc, all-stage3-gcc,
+ new-bootstrap, new-cleanstrap, new-restage1, new-restage2,
+ new-restage3, compare): Autogenerate, see Makefile.in
+ entry for behavioral changes.
+ (distclean-stage1, new-stage1-start, new-stage1-end,
+ new-stage1-bubble, distclean-stage2, new-stage2-start,
+ new-stage2-end, new-stage2-bubble, distclean-stage3,
+ new-stage3-start, new-stage3-end): New autogenerated targets.
+ (objext, prebootstrap, BOOT_CFLAGS,
+ POSTSTAGE1_FLAGS_TO_PASS): Move above the autogenerated
+ targets.
+
+ * Makefile.in: Regenerate.
+ (distclean-stage1, new-stage1-start, new-stage1-end,
+ new-stage1-bubble, distclean-stage2, new-stage2-start,
+ new-stage2-end, new-stage2-bubble, distclean-stage3,
+ new-stage3-start, new-stage3-end): New targets.
+ (all-stage1-gcc): Move prebootstrap dependency from here...
+ (configure-stage1-gcc): ...to here.
+ (new-bootstrap): Use bubble targets.
+ (new-cleanstrap, new-restage1, new-restage2, new-restage3):
+ Use per-stage distclean targets.
+ (configure-stage1-gcc, configure-stage2-gcc,
+ configure-stage3-gcc, all-stage1-gcc,
+ all-stage2-gcc, all-stage3-gcc, new-bootstrap):
+ Use new-stageN-start to prepare the tree.
+
+2004-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host_modules): add libcpp.
+ * Makefile.tpl: Add dependencies on and for libcpp.
+ * Makefile.in: Regenerate.
+ * configure.in: Add libcpp host module.
+ * configure: Regenerate.
+
+2004-05-17 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.def, Makefile.tpl, configure.in: Remove all mention
+ of libf2c.
+ * configure, Makefile.in: Regenerate.
+
+2004-05-13 Diego Novillo <dnovillo@redhat.com>
+
+ Merge from tree-ssa-20020619-branch.
+
+ * Makefile.def: Add libbanshee, libmudflap and libgfortran.
+ * Makefile.tpl (BUILD_CONFIGDIRS): Add libbanshee.
+ (HOST_GMPLIBS): Define.
+ (HOST_GMPINC): Define.
+ (TARGET_LIB_PATH): Add libmudflap.
+ (GFORTRAN_FOR_TARGET): Define.
+ (configure-build*): Export GFORTRAN.
+ (configure-gcc): Export GMPLIBS and GMPINC.
+ (all-gcc): Add maybe-all-libbanshee.
+ (configure-target-libgfortran): Define.
+ * Makefile.in: Regenerate.
+ * configure.in (host_libs): Add libbanshee.
+ (target_libraries): Add target-libmudflap and target-libgfortran.
+ Add --with-libbanshee.
+ Handle --disable-libmudflap.
+ (*-*-freebsd*): Use with_gmp.
+ Add $(libgcj) to noconfigdirs.
+ * configure: Regenerate.
+ * depcomp: New file.
+ * MAINTAINERS: Add tree-ssa maintainers.
+
+2004-04-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/acx.m4: Fix fastcompare support for new-bootstrap.
+ * configure: Regenerate.
+
+2004-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert:
+ 2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (flags_to_pass): Remove *dir variables that
+ are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
+ as well as prefix and exec_prefix.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host_modules): Mark with the bootstrap
+ flag packages on which gcc depends.
+ * Makefile.tpl (all-bootstrap): Use it.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (flags_to_pass): Remove *dir variables that
+ are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
+ as well as prefix and exec_prefix.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
+ * configure: Regenerate.
+ * config/acx.m4: Mutuate ACX_PROG_CMP_IGNORE_INITIAL from gcc.
+ * gcc/Makefile.tpl (compare): Use the result of the test.
+ * gcc/Makefile.in: Regenerate.
+
+2004-04-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all-stage1-gcc, all-stage2-gcc, all-stage3-gcc):
+ Always relocate gcc and prev-gcc to the original names, even
+ if the build fails.
+ (new-cleanstrap, new-restage1, new-restage2, new-restage3):
+ New targets.
+
+2004-04-19 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in (mips*-*-irix5*): Enable ld.
+ * configure: Regenerate.
+
+2004-04-15 James E Wilson <wilson@specifixinc.com>
+
+ * Makefile.tpl (configure-[+module+], configure-gcc,
+ configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc):
+ Set and export LDFLAGS.
+ * Makefile.in: Regenerate.
+
+2004-04-09 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/14871
+ * Makefile.tpl: If we don't have built-in-tree target tools,
+ use the ones found by configure rather than hacking around with
+ program_transform_name.
+ * configure.in: Give Makefile.tpl the information necessary
+ to do that.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-04-06 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/14760
+ * configure.in: When computing baseargs, strip *all* copies of
+ offending options. Also, don't match/substitute the trailing space,
+ so that this actually works when two similar options are separated by
+ only one space.
+ * configure: Regenerate.
+
+2004-04-06 David Edelsohn <edelsohn@gnu.org>
+
+ * configure.in (powerpc-*-aix*): Remove target-libada from noconfigdirs.
+ (rs6000-*-aix*): Same.
+ * configure: Regenerate.
+
2004-03-25 Stan Shebs <shebs@apple.com>
Remove MPW support, no longer used.
@@ -60,10 +698,10 @@
* Makefile.in: Regenerate.
2004-03-15 Paolo Bonzini <bonzini@gnu.org>
- Nathanael Nerode <neroden@gcc.gnu.org>
+ Nathanael Nerode <neroden@gcc.gnu.org>
* configure.in (DEFAULT_YACC, DEFAULT_M4, DEFAULT_LEX):
- Set with AC_CHECK_PROGS.
+ Set with AC_CHECK_PROGS.
* configure.in: Fix comment typo from last patch.
* configure: Regenerate.
@@ -75,14 +713,14 @@
* configure: Regenerate.
2004-03-12 Eric Botcazou <ebotcazou@gcc.gnu.org>
- Paolo Bonzini <bonzini@gnu.org>
+ Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/14522
* configure.in: Cope with shells that do not support unquoted ^
* configure: Regenerate.
2004-03-11 Eric Botcazou <ebotcazou@gcc.gnu.org>
- Paolo Bonzini <bonzini@gnu.org>
+ Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/14522
* configure.in: Cope with shell that do not support nesting
@@ -157,7 +795,7 @@
Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/6637, PR ada/5911
- Merge with libada-branch:
+ Merge with libada-branch:
* configure.in, Makefile.tpl, Makefile.def: Add target-libada,
with appropriate dependencies. Add --enable-libada configure switch.
* configure, Makefile.in: Regenerate.
@@ -170,14 +808,14 @@
2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
* COPYING.NEWLIB: Update Red Hat license to 2004.
-
+
2004-01-23 DJ Delorie <dj@redhat.com>
* Makefile.def (target_modules) [libiberty]: Don't stage.
* Makefile.in: Rebuilt.
2004-01-23 Jeff Johnston <jjohnstn@redhat.com>
-
+
* COPYING.NEWLIB: Update to include copyrights for new
iconv code.
@@ -229,7 +867,7 @@
* configure: Regenerated.
2003-12-21 Bernardo Innocenti <bernie@develer.com>
-
+
* configure.in (*-*-uclinux): Exclude newlib, libgloss and rda.
* configure: Regenerated.
@@ -249,7 +887,7 @@
2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Add license info for long long routines added to
+ * COPYING.NEWLIB: Add license info for long long routines added to
stdlib.
2003-11-14 Arnaud Charlet <charlet@act-europe.fr>
@@ -329,7 +967,7 @@
2003-09-04 Robert Millan <robertmh@gnu.org>
* configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
-
+
2003-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Ensure arguments to sed are properly spaced.
@@ -360,7 +998,7 @@
* configure.in: When testing with_libs and with_headers, treat
'no' as unset. Based on a patch by Dan Kegel <dank@kegel.com>.
* configure: Regenerate.
-
+
* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for
make, shell, etc.
(baseargs): Likewise.
@@ -492,14 +1130,14 @@
* configure.in: Update testsuite_flags to new location.
* configure. Regenerate.
-
+
2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.tpl: Remove BUILD_CC stuff.
* Makefile.in: Regenerate.
2003-06-14 H.J. Lu <hongjiu.lu@intel.com>
-
+
* config.guess: Update to 2003-06-12 version.
* config.sub: Update to 2003-06-13 version.
@@ -508,7 +1146,7 @@
* 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.
@@ -573,10 +1211,10 @@
2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
+ * 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
newlib or libgloss.
* Makefile.in: Regenerate.
@@ -594,7 +1232,7 @@
2003-05-19 Nathanael Nerode <neroden@gcc.gnu.org>
* configure.in: Switch more things to use maybe dependencies.
- * Makefile.tpl: Switch more things to use maybe dependencies.
+ * Makefile.tpl: Switch more things to use maybe dependencies.
Factor out common code from autogen IF statements.
* configure: Regenerate.
* Makefile.in: Regenerate.
@@ -640,8 +1278,8 @@
2003-05-02 Chris Demetriou <cgd@broadcom.com>
- * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later.
- * Makefile.in: Regenerate.
+ * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later.
+ * Makefile.in: Regenerate.
2003-04-27 Daniel Jacobowitz <drow@mvista.com>
@@ -888,8 +1526,8 @@
2003-01-07 Christopher Faylor <cgf@redhat.com>
- * configure.in: Add AC_PREREQ for consistency.
- * configure: Regenerate.
+ * configure.in: Add AC_PREREQ for consistency.
+ * configure: Regenerate.
2003-01-06 Andrew Cagney <ac131313@redhat.com>
@@ -1060,9 +1698,9 @@
2002-12-12 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Update list of alternate Regent of California
- licenses and discuss official revoking of advertising clause.
- * COPYING.LIBGLOSS: Ditto.
+ * COPYING.NEWLIB: Update list of alternate Regent of California
+ licenses and discuss official revoking of advertising clause.
+ * COPYING.LIBGLOSS: Ditto.
2002-12-12 Alexandre Oliva <aoliva@redhat.com>
@@ -3181,7 +3819,7 @@ Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
Bad merge removed these two changes.
Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com)
- Martin Heller (Ing.-Buero_Heller@t-online.de)
+ Martin Heller (Ing.-Buero_Heller@t-online.de)
* config.guess (interix Alpha): Add.
@@ -5490,8 +6128,8 @@ Mon Jun 24 15:01:12 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
Sun Jun 23 22:41:54 1996 Geoffrey Noer <noer@cygnus.com>
* configure.in: enable dosrel for cygwin32-hosted builds,
- remove diff from the list of things not buildable
- via Canadian Cross
+ remove diff from the list of things not buildable
+ via Canadian Cross
Sat Jun 22 11:39:01 1996 Jason Merrill <jason@yorick.cygnus.com>
diff --git a/MAINTAINERS b/MAINTAINERS
index 71942684b28..8c9696b9fcb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4,7 +4,7 @@ Please do not make ChangeLog entries.
COPYING, COPYING.LIB, README
http://gnu.org.
-Makefile.in; configure; configure.in; src-release
+Makefile.*; configure; configure.in; src-release
Please notify the following of any committed patches.
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
@@ -21,8 +21,7 @@ cgen/; cgen parts of opcodes/, sim/ & include/
May need separate opcodes/ or sim/ approval for
commits of regenerated files there.
-config.guess; config.sub; dejagnu/config.guess; dejagnu/config.sub;
-readline/support/config.sub; readline/support/config.guess
+config.guess; config.sub; readline/support/config.{sub,guess}
config: http://savannah.gnu.org/projects/config
Patches to config-patches@gnu.org.
Changes need to be done in tandem with the official CONFIG
@@ -36,10 +35,6 @@ readline/support/config.sub; readline/support/config.guess
dejagnu/
dejagnu: http://www.gnu.org/software/dejagnu/
Patches to bug-dejagnu@gnu.org
- Avoid making changes to the local repository; please send
- patches upstream. Important and approved patches can be
- checked into the src repository, otheriwse patches will be
- imported from the next release.
gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/
gdb: http://sources.redhat.com/gdb/
@@ -59,8 +54,8 @@ libiberty/; libiberty's part of include/
Otherwise, changes are automatically merged, usually within
a day.
-ltconfig; ltmain.sh
- libtool: http://gnu.org
+ltconfig; ltmain.sh; ltcf-*.sh
+ libtool: http://www.gnu.org/software/libtool/
Changes need to be done in tandem with the official LIBTOOL
sources or submitted to the master file maintainer and brought
in via a merge.
@@ -80,7 +75,7 @@ newlib/; libgloss/
http://sources.redhat.com/newlib/
Patches to newlib@sources.redhat.com.
-sid/; SID's part of cgen/ & dejagnu/
+sid/; SID's part of cgen/
sid: http://sources.redhat.com/sid/
Patches to sid@sources.redhat.com
@@ -100,9 +95,8 @@ winsup/
General discussion cygwin@sources.redhat.com.
See also winsup/MAINTAINERS.
-expect/; config-ml.in; setup.com; missing; makefile.vms; utils/;
-config/; config.if; makefile.vms; missing; ylwrap; mkdep; etc/;
-install-sh; intl/
+config-ml.in; setup.com; missing; makefile.vms; utils/; config/;
+config.if; makefile.vms; missing; ylwrap; mkdep; etc/; install-sh; intl/
Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry.
modules file
diff --git a/Makefile.def b/Makefile.def
index 5a68098157b..366405a1852 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -25,14 +25,21 @@ AutoGen definitions Makefile.tpl;
// that recursive target in its Makefile.
build_modules= { module= libiberty; };
+build_modules= { module= bison; };
+build_modules= { module= byacc; };
+build_modules= { module= flex; };
+build_modules= { module= m4; };
+build_modules= { module= texinfo; };
+build_modules= { module= fixincludes;
+ extra_configure_args='--target=$(target)'; };
host_modules= { module= ash; };
host_modules= { module= autoconf; };
host_modules= { module= automake; };
host_modules= { module= bash; };
-host_modules= { module= bfd; };
-host_modules= { module= opcodes; };
-host_modules= { module= binutils; };
+host_modules= { module= bfd; bootstrap=true; };
+host_modules= { module= opcodes; bootstrap=true; };
+host_modules= { module= binutils; bootstrap=true; };
host_modules= { module= bison; no_check_cross= true; };
host_modules= { module= byacc; no_check_cross= true; };
host_modules= { module= bzip2; };
@@ -45,7 +52,10 @@ host_modules= { module= fileutils; };
host_modules= { module= findutils; };
host_modules= { module= find; };
host_modules= { module= flex; no_check_cross= true; };
-host_modules= { module= gas; };
+host_modules= { module= gas; bootstrap=true; };
+host_modules= { module= gcc; bootstrap=true;
+ target="`if [ -f gcc/stage_last ]; then echo quickstrap ; else echo all; fi`";
+ extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gawk; };
host_modules= { module= gettext; };
host_modules= { module= gnuserv; };
@@ -53,13 +63,14 @@ host_modules= { module= gprof; };
host_modules= { module= gzip; };
host_modules= { module= hello; };
host_modules= { module= indent; };
-host_modules= { module= intl; };
+host_modules= { module= intl; bootstrap=true; };
host_modules= { module= tcl;
missing=mostlyclean; };
host_modules= { module= itcl; };
-host_modules= { module= ld; };
+host_modules= { module= ld; bootstrap=true; };
+host_modules= { module= libcpp; bootstrap=true; };
host_modules= { module= libgui; };
-host_modules= { module= libiberty; };
+host_modules= { module= libiberty; bootstrap=true; };
host_modules= { module= libtool; };
host_modules= { module= m4; };
host_modules= { module= make; };
@@ -83,12 +94,11 @@ host_modules= { module= time; };
host_modules= { module= uudecode; };
host_modules= { module= wdiff; };
host_modules= { module= zip; no_check_cross=true; };
-host_modules= { module= zlib; no_install=true; no_check=true; };
-host_modules= { module= gdb; with_x=true; };
-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= zlib; no_install=true; no_check=true; bootstrap=true; };
+host_modules= { module= gdb; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= expect; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= guile; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= tk; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
host_modules= { module= libtermcap; no_check=true;
missing=mostlyclean;
missing=clean;
@@ -97,8 +107,9 @@ host_modules= { module= libtermcap; no_check=true;
host_modules= { module= utils; no_check=true; };
target_modules = { module= libstdc++-v3; raw_cxx=true; };
+target_modules = { module= libmudflap; };
target_modules = { module= newlib; };
-target_modules = { module= libf2c; };
+target_modules = { module= libgfortran; };
target_modules = { module= libobjc; };
target_modules = { module= libtermcap; no_check=true; stage=true;
missing=mostlyclean;
@@ -173,6 +184,7 @@ flags_to_pass = { flag= BISON ; };
flags_to_pass = { flag= CC_FOR_BUILD ; };
flags_to_pass = { flag= CXX_FOR_BUILD ; };
flags_to_pass = { flag= EXPECT ; };
+flags_to_pass = { flag= FLEX ; };
flags_to_pass = { flag= INSTALL ; };
flags_to_pass = { flag= INSTALL_DATA ; };
flags_to_pass = { flag= INSTALL_PROGRAM ; };
@@ -202,9 +214,257 @@ flags_to_pass = { flag= CXX_FOR_TARGET ; };
flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
flags_to_pass = { flag= GCJ_FOR_TARGET ; };
+flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
flags_to_pass = { flag= LD_FOR_TARGET ; };
flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
+
+// Inter-module dependencies
+
+// Build modules
+dependencies = { module=all-build-bison; on=all-build-texinfo; };
+dependencies = { module=all-build-byacc; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-bison; };
+dependencies = { module=all-build-flex; on=all-build-byacc; };
+dependencies = { module=all-build-flex; on=all-build-m4; };
+dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
+dependencies = { module=all-build-m4; on=all-build-texinfo; };
+dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
+
+// Host modules specific to gcc.
+dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=configure-binutils; };
+dependencies = { module=configure-gcc; on=configure-gas; };
+dependencies = { module=configure-gcc; on=configure-ld; };
+dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
+dependencies = { module=all-gcc; on=all-intl; };
+dependencies = { module=all-gcc; on=all-build-texinfo; };
+dependencies = { module=all-gcc; on=all-build-bison; };
+dependencies = { module=all-gcc; on=all-build-byacc; };
+dependencies = { module=all-gcc; on=all-build-flex; };
+dependencies = { module=all-gcc; on=all-build-libiberty; };
+dependencies = { module=all-gcc; on=all-build-fixincludes; };
+dependencies = { module=all-gcc; on=all-binutils; };
+dependencies = { module=all-gcc; on=all-gas; };
+dependencies = { module=all-gcc; on=all-ld; };
+dependencies = { module=all-gcc; on=all-zlib; };
+dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
+dependencies = { module=all-gcc; on=all-build-libiberty; };
+
+dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
+dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
+dependencies = { module=all-libcpp; on=all-intl; };
+
+// Host modules specific to gdb.
+dependencies = { module=configure-gdb; on=configure-itcl; };
+dependencies = { module=configure-gdb; on=configure-tcl; };
+dependencies = { module=configure-gdb; on=configure-tk; };
+dependencies = { module=configure-gdb; on=configure-sim; };
+dependencies = { module=all-gdb; on=all-libiberty; };
+dependencies = { module=all-gdb; on=all-opcodes; };
+dependencies = { module=all-gdb; on=all-bfd; };
+dependencies = { module=all-gdb; on=all-readline; };
+dependencies = { module=all-gdb; on=all-build-bison; };
+dependencies = { module=all-gdb; on=all-build-byacc; };
+dependencies = { module=all-gdb; on=all-sim; };
+dependencies = { module=install-gdb; on=install-tcl; };
+dependencies = { module=install-gdb; on=install-tk; };
+dependencies = { module=install-gdb; on=install-itcl; };
+dependencies = { module=install-gdb; on=install-libgui; };
+
+dependencies = { module=configure-libgui; on=configure-tcl; };
+dependencies = { module=configure-libgui; on=configure-tk; };
+dependencies = { module=all-libgui; on=all-tcl; };
+dependencies = { module=all-libgui; on=all-tk; };
+dependencies = { module=all-libgui; on=all-itcl; };
+
+// Host modules specific to binutils.
+dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
+dependencies = { module=all-bfd; on=all-libiberty; };
+dependencies = { module=all-bfd; on=all-intl; };
+
+dependencies = { module=all-binutils; on=all-libiberty; };
+dependencies = { module=all-binutils; on=all-opcodes; };
+dependencies = { module=all-binutils; on=all-bfd; };
+dependencies = { module=all-binutils; on=all-build-flex; };
+dependencies = { module=all-binutils; on=all-build-bison; };
+dependencies = { module=all-binutils; on=all-build-byacc; };
+dependencies = { module=all-binutils; on=all-intl; };
+
+// We put install-opcodes before install-binutils because the installed
+// binutils might be on PATH, and they might need the shared opcodes
+// library.
+dependencies = { module=install-binutils; on=install-opcodes; };
+
+// libopcodes depends on libbfd
+dependencies = { module=install-opcodes; on=install-bfd; };
+
+dependencies = { module=all-gas; on=all-libiberty; };
+dependencies = { module=all-gas; on=all-opcodes; };
+dependencies = { module=all-gas; on=all-bfd; };
+dependencies = { module=all-gas; on=all-intl; };
+dependencies = { module=all-gprof; on=all-libiberty; };
+dependencies = { module=all-gprof; on=all-bfd; };
+dependencies = { module=all-gprof; on=all-opcodes; };
+dependencies = { module=all-gprof; on=all-intl; };
+dependencies = { module=all-ld; on=all-libiberty; };
+dependencies = { module=all-ld; on=all-bfd; };
+dependencies = { module=all-ld; on=all-opcodes; };
+dependencies = { module=all-ld; on=all-build-bison; };
+dependencies = { module=all-ld; on=all-build-byacc; };
+dependencies = { module=all-ld; on=all-build-flex; };
+dependencies = { module=all-ld; on=all-intl; };
+
+dependencies = { module=all-opcodes; on=all-bfd; };
+dependencies = { module=all-opcodes; on=all-libiberty; };
+
+// Other host modules in the 'src' repository.
+dependencies = { module=all-dejagnu; on=all-tcl; };
+dependencies = { module=all-dejagnu; on=all-expect; };
+dependencies = { module=all-dejagnu; on=all-tk; };
+dependencies = { module=configure-expect; on=configure-tcl; };
+dependencies = { module=configure-expect; on=configure-tk; };
+dependencies = { module=all-expect; on=all-tcl; };
+dependencies = { module=all-expect; on=all-tk; };
+
+// We put install-tcl before install-itcl because itcl wants to run a
+// program on installation which uses the Tcl libraries.
+dependencies = { module=configure-itcl; on=configure-tcl; };
+dependencies = { module=configure-itcl; on=configure-tk; };
+dependencies = { module=all-itcl; on=all-tcl; };
+dependencies = { module=all-itcl; on=all-tk; };
+dependencies = { module=install-itcl; on=install-tcl; };
+
+dependencies = { module=configure-tk; on=configure-tcl; };
+dependencies = { module=all-tk; on=all-tcl; };
+
+dependencies = { module=all-sid; on=all-libiberty; };
+dependencies = { module=all-sid; on=all-bfd; };
+dependencies = { module=all-sid; on=all-opcodes; };
+dependencies = { module=all-sid; on=all-tcl; };
+dependencies = { module=all-sid; on=all-tk; };
+dependencies = { module=install-sid; on=install-tcl; };
+dependencies = { module=install-sid; on=install-tk; };
+
+dependencies = { module=all-sim; on=all-libiberty; };
+dependencies = { module=all-sim; on=all-bfd; };
+dependencies = { module=all-sim; on=all-opcodes; };
+dependencies = { module=all-sim; on=all-readline; };
+dependencies = { module=all-sim; on=configure-gdb; };
+
+// Other host modules.
+dependencies = { module=all-fastjar; on=all-zlib; };
+dependencies = { module=all-fastjar; on=all-build-texinfo; };
+dependencies = { module=all-fastjar; on=all-libiberty; };
+
+// Warning, these are not well tested.
+dependencies = { module=all-autoconf; on=all-m4; };
+dependencies = { module=all-autoconf; on=all-build-texinfo; };
+dependencies = { module=all-automake; on=all-m4; };
+dependencies = { module=all-automake; on=all-build-texinfo; };
+dependencies = { module=all-automake; on=all-autoconf; };
+dependencies = { module=all-bison; on=all-intl; };
+dependencies = { module=all-bison; on=all-build-texinfo; };
+dependencies = { module=all-diff; on=all-intl; };
+dependencies = { module=all-diff; on=all-build-texinfo; };
+dependencies = { module=all-fileutils; on=all-intl; };
+dependencies = { module=all-fileutils; on=all-build-texinfo; };
+dependencies = { module=all-flex; on=all-build-bison; };
+dependencies = { module=all-flex; on=all-build-byacc; };
+dependencies = { module=all-flex; on=all-intl; };
+dependencies = { module=all-flex; on=all-m4; };
+dependencies = { module=all-flex; on=all-build-texinfo; };
+dependencies = { module=all-gzip; on=all-intl; };
+dependencies = { module=all-gzip; on=all-zlib; };
+dependencies = { module=all-gzip; on=all-build-texinfo; };
+dependencies = { module=all-hello; on=all-intl; };
+dependencies = { module=all-hello; on=all-build-texinfo; };
+dependencies = { module=all-m4; on=all-intl; };
+dependencies = { module=all-m4; on=all-build-texinfo; };
+dependencies = { module=all-make; on=all-intl; };
+dependencies = { module=all-make; on=all-build-texinfo; };
+dependencies = { module=all-patch; on=all-build-texinfo; };
+dependencies = { module=all-make; on=all-build-texinfo; };
+dependencies = { module=all-prms; on=all-libiberty; };
+dependencies = { module=all-recode; on=all-build-texinfo; };
+dependencies = { module=all-sed; on=all-build-texinfo; };
+dependencies = { module=all-send-pr; on=all-prms; };
+dependencies = { module=all-tar; on=all-build-texinfo; };
+dependencies = { module=all-uudecode; on=all-build-texinfo; };
+
+// Target modules. These can also have dependencies on the language
+// environment (e.g. on libstdc++).
+lang_env_dependencies = { module=boehm-gc; };
+lang_env_dependencies = { module=gperf; cxx=true; };
+lang_env_dependencies = { module=libada; };
+lang_env_dependencies = { module=libgfortran; };
+lang_env_dependencies = { module=libffi; };
+lang_env_dependencies = { module=libjava; cxx=true; };
+lang_env_dependencies = { module=libobjc; };
+lang_env_dependencies = { module=libstdc++-v3; };
+lang_env_dependencies = { module=zlib; };
+
+dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
+dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
+dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
+dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
+dependencies = { module=configure-target-libjava; on=configure-target-qthreads; };
+dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
+dependencies = { module=all-target-libjava; on=all-fastjar; };
+dependencies = { module=all-target-libjava; on=all-target-zlib; };
+dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
+dependencies = { module=all-target-libjava; on=all-target-qthreads; };
+dependencies = { module=all-target-libjava; on=all-target-libffi; };
+dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
+dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
+
+// Target modules in the 'src' repository.
+lang_env_dependencies = { module=examples; };
+lang_env_dependencies = { module=libtermcap; };
+lang_env_dependencies = { module=rda; };
+lang_env_dependencies = { module=winsup; };
+lang_env_dependencies = { module=qthreads; };
+
+dependencies = { module=all-target-libgloss; on=configure-target-newlib; };
+dependencies = { module=all-target-winsup; on=all-target-libiberty; };
+dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
+
+// Toplevel bootstrap
+bootstrap_stage = {
+ id=1 ;
+ stage_configure_flags='--disable-intermodule \
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
+ stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)"' ; };
+bootstrap_stage = {
+ id=2 ; prev=1 ;
+ bootstrap_target=bootstrap2 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags="" ; };
+bootstrap_stage = {
+ id=3 ; prev=2 ; lean=1 ;
+ compare_target=compare ;
+ bootstrap_target=bootstrap ;
+ cleanstrap_target=cleanstrap ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags="" ; };
+bootstrap_stage = {
+ id=4 ; prev=3 ; lean=2 ;
+ compare_target=compare3 ;
+ bootstrap_target=bootstrap4 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags="" ; };
+bootstrap_stage = {
+ id=profile ; prev=1 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"' ; };
+bootstrap_stage = {
+ id=feedback ; prev=1 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-use"' ; };
diff --git a/Makefile.in b/Makefile.in
index 593566086b5..8047c004da8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+# 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -65,6 +65,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
+LN = @LN@
+LN_S = @LN_S@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
@@ -109,11 +111,72 @@ BUILD_SUBDIR = @build_subdir@
# directories built for the build system.
BUILD_CONFIGARGS = @build_configargs@
+# This is the list of variables to export in the environment when
+# configuring any subdirectory. It must also be exported whenever
+# recursing into a build directory in case that directory's Makefile
+# re-runs configure.
+BASE_EXPORTS = \
+ FLEX="$(FLEX)"; export FLEX; \
+ LEX="$(LEX)"; export LEX; \
+ BISON="$(BISON)"; export BISON; \
+ YACC="$(YACC)"; export YACC; \
+ M4="$(M4)"; export M4; \
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
+
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the build system.
+BUILD_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+ NM="$(NM_FOR_BUILD)"; export NM; \
+ RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;
+
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
# directories built for the host system.
HOST_CONFIGARGS = @host_configargs@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ 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; \
+ LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
+ GMPINC="$(HOST_GMPINC)"; export GMPINC;
+
+# Similar, for later GCC stages.
+STAGE_HOST_EXPORTS = \
+ $(HOST_EXPORTS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
+ CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
# This is set by the configure script to the list of directories which
# should be built using the target tools.
@@ -123,6 +186,38 @@ TARGET_SUBDIR = @target_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the target.
TARGET_CONFIGARGS = @target_configargs@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+BASE_TARGET_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+ NM="$(NM_FOR_TARGET)"; export NM; \
+ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES;
+
+RAW_CXX_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
+ CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
+
+NORMAL_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX="$(CXX_FOR_TARGET)"; export CXX;
+
+# Where to find GMP
+HOST_GMPLIBS = @gmplibs@
+HOST_GMPINC = @gmpinc@
# ----------------------------------------------
# Programs producing files for the BUILD machine
@@ -150,42 +245,51 @@ CXX_FOR_BUILD = $(CXX)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
-BISON=@BISON@
-USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -L $$s/bison/ ; \
+# Flags to pass to stage2 and later makes. They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+
+CONFIGURED_BISON = @CONFIGURED_BISON@
+BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
else \
- echo bison ; \
+ echo ${CONFIGURED_BISON} ; \
fi`
-DEFAULT_YACC = @DEFAULT_YACC@
-YACC=@YACC@
-USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -y -L $$s/bison/ ; \
- elif [ -f $$r/byacc/byacc ] ; then \
- echo $$r/byacc/byacc ; \
+CONFIGURED_YACC = @CONFIGURED_YACC@
+YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \
+ elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \
else \
- echo ${DEFAULT_YACC} ; \
+ echo ${CONFIGURED_YACC} ; \
fi`
-DEFAULT_LEX = @DEFAULT_LEX@
-LEX=@LEX@
-USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
- then echo $$r/flex/flex ; \
- else echo ${DEFAULT_LEX} ; fi`
+CONFIGURED_FLEX = @CONFIGURED_FLEX@
+FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
+ else echo ${CONFIGURED_FLEX} ; fi`
+
+CONFIGURED_LEX = @CONFIGURED_LEX@
+LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
+ else echo ${CONFIGURED_LEX} ; fi`
-DEFAULT_M4 = @DEFAULT_M4@
-M4 = `if [ -f $$r/m4/m4 ] ; \
- then echo $$r/m4/m4 ; \
- else echo ${DEFAULT_M4} ; fi`
+CONFIGURED_M4 = @CONFIGURED_M4@
+M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \
+ else echo ${CONFIGURED_M4} ; fi`
# For an installed makeinfo, we require it to be from texinfo 4.2 or
-# higher, else we use the "missing" dummy.
-MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
- then echo $$r/texinfo/makeinfo/makeinfo ; \
- else if (makeinfo --version \
+# higher, else we use the "missing" dummy. We also pass the subdirectory
+# makeinfo even if only the Makefile is there, because Texinfo builds its
+# manual when made, and it requires its own version.
+CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
+MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
+ else if (${CONFIGURED_MAKEINFO} --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
- then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
+ then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -241,11 +345,12 @@ PICFLAG =
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
+TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libmudflap/.libs
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
+CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
@@ -253,11 +358,12 @@ USUAL_AR_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \
else \
- echo ar | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_AR_FOR_TARGET) ; \
fi; \
fi`
AS_FOR_TARGET=@AS_FOR_TARGET@
+CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \
echo $$r/gas/as-new ; \
@@ -267,7 +373,7 @@ USUAL_AS_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \
else \
- echo as | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_AS_FOR_TARGET) ; \
fi; \
fi`
@@ -293,6 +399,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
+CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
@@ -300,13 +407,15 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \
else \
- echo dlltool | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
fi; \
fi`
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
+GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
+CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
USUAL_LD_FOR_TARGET = ` \
if [ -f $$r/ld/ld-new ] ; then \
echo $$r/ld/ld-new ; \
@@ -316,13 +425,14 @@ USUAL_LD_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \
else \
- echo ld | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_LD_FOR_TARGET) ; \
fi; \
fi`
LDFLAGS_FOR_TARGET =
NM_FOR_TARGET=@NM_FOR_TARGET@
+CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \
if [ -f $$r/binutils/nm-new ] ; then \
echo $$r/binutils/nm-new ; \
@@ -332,11 +442,12 @@ USUAL_NM_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \
else \
- echo nm | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_NM_FOR_TARGET) ; \
fi; \
fi`
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
@@ -348,11 +459,12 @@ USUAL_RANLIB_FOR_TARGET = ` \
echo ranlib; \
fi; \
else \
- echo ranlib | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
fi; \
fi`
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
+CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
@@ -360,7 +472,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \
else \
- echo windres | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
fi; \
fi`
@@ -372,8 +484,7 @@ PICFLAG_FOR_TARGET =
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+@default_target@:
#### host and target specific makefile fragments come in here.
@target_makefile_frag@
@@ -414,6 +525,7 @@ BASE_FLAGS_TO_PASS = \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
@@ -439,6 +551,7 @@ BASE_FLAGS_TO_PASS = \
"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
+ "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
@@ -457,6 +570,8 @@ RECURSE_FLAGS = \
CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
+RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)
+
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
EXTRA_HOST_FLAGS = \
@@ -528,7 +643,7 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
.PHONY: configure-host
-configure-host: maybe-configure-gcc \
+configure-host: \
maybe-configure-ash \
maybe-configure-autoconf \
maybe-configure-automake \
@@ -549,6 +664,7 @@ configure-host: maybe-configure-gcc \
maybe-configure-find \
maybe-configure-flex \
maybe-configure-gas \
+ maybe-configure-gcc \
maybe-configure-gawk \
maybe-configure-gettext \
maybe-configure-gnuserv \
@@ -560,6 +676,7 @@ configure-host: maybe-configure-gcc \
maybe-configure-tcl \
maybe-configure-itcl \
maybe-configure-ld \
+ maybe-configure-libcpp \
maybe-configure-libgui \
maybe-configure-libiberty \
maybe-configure-libtool \
@@ -590,14 +707,14 @@ configure-host: maybe-configure-gcc \
maybe-configure-expect \
maybe-configure-guile \
maybe-configure-tk \
- maybe-configure-tix \
maybe-configure-libtermcap \
maybe-configure-utils
.PHONY: configure-target
configure-target: \
maybe-configure-target-libstdc++-v3 \
+ maybe-configure-target-libmudflap \
maybe-configure-target-newlib \
- maybe-configure-target-libf2c \
+ maybe-configure-target-libgfortran \
maybe-configure-target-libobjc \
maybe-configure-target-libtermcap \
maybe-configure-target-winsup \
@@ -613,12 +730,21 @@ configure-target: \
maybe-configure-target-rda \
maybe-configure-target-libada
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
-
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all: unstage all-host all-target stage
+
+.PHONY: all-build
+all-build: \
+ maybe-all-build-libiberty \
+ maybe-all-build-bison \
+ maybe-all-build-byacc \
+ maybe-all-build-flex \
+ maybe-all-build-m4 \
+ maybe-all-build-texinfo \
+ maybe-all-build-fixincludes
.PHONY: all-host
-all-host: maybe-all-gcc \
+all-host: \
maybe-all-ash \
maybe-all-autoconf \
maybe-all-automake \
@@ -639,6 +765,7 @@ all-host: maybe-all-gcc \
maybe-all-find \
maybe-all-flex \
maybe-all-gas \
+ maybe-all-gcc \
maybe-all-gawk \
maybe-all-gettext \
maybe-all-gnuserv \
@@ -650,6 +777,7 @@ all-host: maybe-all-gcc \
maybe-all-tcl \
maybe-all-itcl \
maybe-all-ld \
+ maybe-all-libcpp \
maybe-all-libgui \
maybe-all-libiberty \
maybe-all-libtool \
@@ -680,14 +808,14 @@ all-host: maybe-all-gcc \
maybe-all-expect \
maybe-all-guile \
maybe-all-tk \
- maybe-all-tix \
maybe-all-libtermcap \
maybe-all-utils
.PHONY: all-target
all-target: \
maybe-all-target-libstdc++-v3 \
+ maybe-all-target-libmudflap \
maybe-all-target-newlib \
- maybe-all-target-libf2c \
+ maybe-all-target-libgfortran \
maybe-all-target-libobjc \
maybe-all-target-libtermcap \
maybe-all-target-winsup \
@@ -709,10 +837,10 @@ all-target: \
# but it may do additional work as well).
.PHONY: do-info
-do-info: info-host info-target
+do-info: unstage info-host info-target stage
.PHONY: info-host
-info-host: maybe-info-gcc \
+info-host: \
maybe-info-ash \
maybe-info-autoconf \
maybe-info-automake \
@@ -733,6 +861,7 @@ info-host: maybe-info-gcc \
maybe-info-find \
maybe-info-flex \
maybe-info-gas \
+ maybe-info-gcc \
maybe-info-gawk \
maybe-info-gettext \
maybe-info-gnuserv \
@@ -744,6 +873,7 @@ info-host: maybe-info-gcc \
maybe-info-tcl \
maybe-info-itcl \
maybe-info-ld \
+ maybe-info-libcpp \
maybe-info-libgui \
maybe-info-libiberty \
maybe-info-libtool \
@@ -774,15 +904,15 @@ info-host: maybe-info-gcc \
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-libmudflap \
maybe-info-target-newlib \
- maybe-info-target-libf2c \
+ maybe-info-target-libgfortran \
maybe-info-target-libobjc \
maybe-info-target-libtermcap \
maybe-info-target-winsup \
@@ -799,10 +929,10 @@ info-target: \
maybe-info-target-libada
.PHONY: do-dvi
-do-dvi: dvi-host dvi-target
+do-dvi: unstage dvi-host dvi-target stage
.PHONY: dvi-host
-dvi-host: maybe-dvi-gcc \
+dvi-host: \
maybe-dvi-ash \
maybe-dvi-autoconf \
maybe-dvi-automake \
@@ -823,6 +953,7 @@ dvi-host: maybe-dvi-gcc \
maybe-dvi-find \
maybe-dvi-flex \
maybe-dvi-gas \
+ maybe-dvi-gcc \
maybe-dvi-gawk \
maybe-dvi-gettext \
maybe-dvi-gnuserv \
@@ -834,6 +965,7 @@ dvi-host: maybe-dvi-gcc \
maybe-dvi-tcl \
maybe-dvi-itcl \
maybe-dvi-ld \
+ maybe-dvi-libcpp \
maybe-dvi-libgui \
maybe-dvi-libiberty \
maybe-dvi-libtool \
@@ -864,15 +996,15 @@ dvi-host: maybe-dvi-gcc \
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-libmudflap \
maybe-dvi-target-newlib \
- maybe-dvi-target-libf2c \
+ maybe-dvi-target-libgfortran \
maybe-dvi-target-libobjc \
maybe-dvi-target-libtermcap \
maybe-dvi-target-winsup \
@@ -889,10 +1021,10 @@ dvi-target: \
maybe-dvi-target-libada
.PHONY: do-TAGS
-do-TAGS: TAGS-host TAGS-target
+do-TAGS: unstage TAGS-host TAGS-target stage
.PHONY: TAGS-host
-TAGS-host: maybe-TAGS-gcc \
+TAGS-host: \
maybe-TAGS-ash \
maybe-TAGS-autoconf \
maybe-TAGS-automake \
@@ -913,6 +1045,7 @@ TAGS-host: maybe-TAGS-gcc \
maybe-TAGS-find \
maybe-TAGS-flex \
maybe-TAGS-gas \
+ maybe-TAGS-gcc \
maybe-TAGS-gawk \
maybe-TAGS-gettext \
maybe-TAGS-gnuserv \
@@ -924,6 +1057,7 @@ TAGS-host: maybe-TAGS-gcc \
maybe-TAGS-tcl \
maybe-TAGS-itcl \
maybe-TAGS-ld \
+ maybe-TAGS-libcpp \
maybe-TAGS-libgui \
maybe-TAGS-libiberty \
maybe-TAGS-libtool \
@@ -954,15 +1088,15 @@ TAGS-host: maybe-TAGS-gcc \
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-libmudflap \
maybe-TAGS-target-newlib \
- maybe-TAGS-target-libf2c \
+ maybe-TAGS-target-libgfortran \
maybe-TAGS-target-libobjc \
maybe-TAGS-target-libtermcap \
maybe-TAGS-target-winsup \
@@ -979,10 +1113,10 @@ TAGS-target: \
maybe-TAGS-target-libada
.PHONY: do-install-info
-do-install-info: install-info-host install-info-target
+do-install-info: unstage install-info-host install-info-target stage
.PHONY: install-info-host
-install-info-host: maybe-install-info-gcc \
+install-info-host: \
maybe-install-info-ash \
maybe-install-info-autoconf \
maybe-install-info-automake \
@@ -1003,6 +1137,7 @@ install-info-host: maybe-install-info-gcc \
maybe-install-info-find \
maybe-install-info-flex \
maybe-install-info-gas \
+ maybe-install-info-gcc \
maybe-install-info-gawk \
maybe-install-info-gettext \
maybe-install-info-gnuserv \
@@ -1014,6 +1149,7 @@ install-info-host: maybe-install-info-gcc \
maybe-install-info-tcl \
maybe-install-info-itcl \
maybe-install-info-ld \
+ maybe-install-info-libcpp \
maybe-install-info-libgui \
maybe-install-info-libiberty \
maybe-install-info-libtool \
@@ -1044,15 +1180,15 @@ install-info-host: maybe-install-info-gcc \
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-libmudflap \
maybe-install-info-target-newlib \
- maybe-install-info-target-libf2c \
+ maybe-install-info-target-libgfortran \
maybe-install-info-target-libobjc \
maybe-install-info-target-libtermcap \
maybe-install-info-target-winsup \
@@ -1069,10 +1205,10 @@ install-info-target: \
maybe-install-info-target-libada
.PHONY: do-installcheck
-do-installcheck: installcheck-host installcheck-target
+do-installcheck: unstage installcheck-host installcheck-target stage
.PHONY: installcheck-host
-installcheck-host: maybe-installcheck-gcc \
+installcheck-host: \
maybe-installcheck-ash \
maybe-installcheck-autoconf \
maybe-installcheck-automake \
@@ -1093,6 +1229,7 @@ installcheck-host: maybe-installcheck-gcc \
maybe-installcheck-find \
maybe-installcheck-flex \
maybe-installcheck-gas \
+ maybe-installcheck-gcc \
maybe-installcheck-gawk \
maybe-installcheck-gettext \
maybe-installcheck-gnuserv \
@@ -1104,6 +1241,7 @@ installcheck-host: maybe-installcheck-gcc \
maybe-installcheck-tcl \
maybe-installcheck-itcl \
maybe-installcheck-ld \
+ maybe-installcheck-libcpp \
maybe-installcheck-libgui \
maybe-installcheck-libiberty \
maybe-installcheck-libtool \
@@ -1134,15 +1272,15 @@ installcheck-host: maybe-installcheck-gcc \
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-libmudflap \
maybe-installcheck-target-newlib \
- maybe-installcheck-target-libf2c \
+ maybe-installcheck-target-libgfortran \
maybe-installcheck-target-libobjc \
maybe-installcheck-target-libtermcap \
maybe-installcheck-target-winsup \
@@ -1159,10 +1297,10 @@ installcheck-target: \
maybe-installcheck-target-libada
.PHONY: do-mostlyclean
-do-mostlyclean: mostlyclean-host mostlyclean-target
+do-mostlyclean: unstage mostlyclean-host mostlyclean-target stage
.PHONY: mostlyclean-host
-mostlyclean-host: maybe-mostlyclean-gcc \
+mostlyclean-host: \
maybe-mostlyclean-ash \
maybe-mostlyclean-autoconf \
maybe-mostlyclean-automake \
@@ -1183,6 +1321,7 @@ mostlyclean-host: maybe-mostlyclean-gcc \
maybe-mostlyclean-find \
maybe-mostlyclean-flex \
maybe-mostlyclean-gas \
+ maybe-mostlyclean-gcc \
maybe-mostlyclean-gawk \
maybe-mostlyclean-gettext \
maybe-mostlyclean-gnuserv \
@@ -1194,6 +1333,7 @@ mostlyclean-host: maybe-mostlyclean-gcc \
maybe-mostlyclean-tcl \
maybe-mostlyclean-itcl \
maybe-mostlyclean-ld \
+ maybe-mostlyclean-libcpp \
maybe-mostlyclean-libgui \
maybe-mostlyclean-libiberty \
maybe-mostlyclean-libtool \
@@ -1224,15 +1364,15 @@ mostlyclean-host: maybe-mostlyclean-gcc \
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-libmudflap \
maybe-mostlyclean-target-newlib \
- maybe-mostlyclean-target-libf2c \
+ maybe-mostlyclean-target-libgfortran \
maybe-mostlyclean-target-libobjc \
maybe-mostlyclean-target-libtermcap \
maybe-mostlyclean-target-winsup \
@@ -1249,10 +1389,10 @@ mostlyclean-target: \
maybe-mostlyclean-target-libada
.PHONY: do-clean
-do-clean: clean-host clean-target
+do-clean: unstage clean-host clean-target stage
.PHONY: clean-host
-clean-host: maybe-clean-gcc \
+clean-host: \
maybe-clean-ash \
maybe-clean-autoconf \
maybe-clean-automake \
@@ -1273,6 +1413,7 @@ clean-host: maybe-clean-gcc \
maybe-clean-find \
maybe-clean-flex \
maybe-clean-gas \
+ maybe-clean-gcc \
maybe-clean-gawk \
maybe-clean-gettext \
maybe-clean-gnuserv \
@@ -1284,6 +1425,7 @@ clean-host: maybe-clean-gcc \
maybe-clean-tcl \
maybe-clean-itcl \
maybe-clean-ld \
+ maybe-clean-libcpp \
maybe-clean-libgui \
maybe-clean-libiberty \
maybe-clean-libtool \
@@ -1314,15 +1456,15 @@ clean-host: maybe-clean-gcc \
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-libmudflap \
maybe-clean-target-newlib \
- maybe-clean-target-libf2c \
+ maybe-clean-target-libgfortran \
maybe-clean-target-libobjc \
maybe-clean-target-libtermcap \
maybe-clean-target-winsup \
@@ -1339,10 +1481,10 @@ clean-target: \
maybe-clean-target-libada
.PHONY: do-distclean
-do-distclean: distclean-host distclean-target
+do-distclean: unstage distclean-host distclean-target stage
.PHONY: distclean-host
-distclean-host: maybe-distclean-gcc \
+distclean-host: \
maybe-distclean-ash \
maybe-distclean-autoconf \
maybe-distclean-automake \
@@ -1363,6 +1505,7 @@ distclean-host: maybe-distclean-gcc \
maybe-distclean-find \
maybe-distclean-flex \
maybe-distclean-gas \
+ maybe-distclean-gcc \
maybe-distclean-gawk \
maybe-distclean-gettext \
maybe-distclean-gnuserv \
@@ -1374,6 +1517,7 @@ distclean-host: maybe-distclean-gcc \
maybe-distclean-tcl \
maybe-distclean-itcl \
maybe-distclean-ld \
+ maybe-distclean-libcpp \
maybe-distclean-libgui \
maybe-distclean-libiberty \
maybe-distclean-libtool \
@@ -1404,15 +1548,15 @@ distclean-host: maybe-distclean-gcc \
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-libmudflap \
maybe-distclean-target-newlib \
- maybe-distclean-target-libf2c \
+ maybe-distclean-target-libgfortran \
maybe-distclean-target-libobjc \
maybe-distclean-target-libtermcap \
maybe-distclean-target-winsup \
@@ -1429,10 +1573,10 @@ distclean-target: \
maybe-distclean-target-libada
.PHONY: do-maintainer-clean
-do-maintainer-clean: maintainer-clean-host maintainer-clean-target
+do-maintainer-clean: unstage maintainer-clean-host maintainer-clean-target stage
.PHONY: maintainer-clean-host
-maintainer-clean-host: maybe-maintainer-clean-gcc \
+maintainer-clean-host: \
maybe-maintainer-clean-ash \
maybe-maintainer-clean-autoconf \
maybe-maintainer-clean-automake \
@@ -1453,6 +1597,7 @@ maintainer-clean-host: maybe-maintainer-clean-gcc \
maybe-maintainer-clean-find \
maybe-maintainer-clean-flex \
maybe-maintainer-clean-gas \
+ maybe-maintainer-clean-gcc \
maybe-maintainer-clean-gawk \
maybe-maintainer-clean-gettext \
maybe-maintainer-clean-gnuserv \
@@ -1464,6 +1609,7 @@ maintainer-clean-host: maybe-maintainer-clean-gcc \
maybe-maintainer-clean-tcl \
maybe-maintainer-clean-itcl \
maybe-maintainer-clean-ld \
+ maybe-maintainer-clean-libcpp \
maybe-maintainer-clean-libgui \
maybe-maintainer-clean-libiberty \
maybe-maintainer-clean-libtool \
@@ -1494,15 +1640,15 @@ maintainer-clean-host: maybe-maintainer-clean-gcc \
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-libmudflap \
maybe-maintainer-clean-target-newlib \
- maybe-maintainer-clean-target-libf2c \
+ maybe-maintainer-clean-target-libgfortran \
maybe-maintainer-clean-target-libobjc \
maybe-maintainer-clean-target-libtermcap \
maybe-maintainer-clean-target-winsup \
@@ -1579,7 +1725,7 @@ clean-target-libgcc:
check: do-check
# Only include modules actually being configured and built.
-do-check: maybe-check-gcc \
+do-check: unstage \
maybe-check-ash \
maybe-check-autoconf \
maybe-check-automake \
@@ -1600,6 +1746,7 @@ do-check: maybe-check-gcc \
maybe-check-find \
maybe-check-flex \
maybe-check-gas \
+ maybe-check-gcc \
maybe-check-gawk \
maybe-check-gettext \
maybe-check-gnuserv \
@@ -1611,6 +1758,7 @@ do-check: maybe-check-gcc \
maybe-check-tcl \
maybe-check-itcl \
maybe-check-ld \
+ maybe-check-libcpp \
maybe-check-libgui \
maybe-check-libiberty \
maybe-check-libtool \
@@ -1641,12 +1789,12 @@ do-check: maybe-check-gcc \
maybe-check-expect \
maybe-check-guile \
maybe-check-tk \
- maybe-check-tix \
maybe-check-libtermcap \
maybe-check-utils \
maybe-check-target-libstdc++-v3 \
+ maybe-check-target-libmudflap \
maybe-check-target-newlib \
- maybe-check-target-libf2c \
+ maybe-check-target-libgfortran \
maybe-check-target-libobjc \
maybe-check-target-libtermcap \
maybe-check-target-winsup \
@@ -1660,7 +1808,7 @@ do-check: maybe-check-gcc \
maybe-check-target-boehm-gc \
maybe-check-target-qthreads \
maybe-check-target-rda \
- maybe-check-target-libada
+ maybe-check-target-libada stage
# Automated reporting of test results.
@@ -1721,6 +1869,7 @@ install-host-nogcc: \
maybe-install-tcl \
maybe-install-itcl \
maybe-install-ld \
+ maybe-install-libcpp \
maybe-install-libgui \
maybe-install-libiberty \
maybe-install-libtool \
@@ -1751,12 +1900,11 @@ install-host-nogcc: \
maybe-install-expect \
maybe-install-guile \
maybe-install-tk \
- maybe-install-tix \
maybe-install-libtermcap \
maybe-install-utils
.PHONY: install-host
-install-host: maybe-install-gcc \
+install-host: \
maybe-install-ash \
maybe-install-autoconf \
maybe-install-automake \
@@ -1777,6 +1925,7 @@ install-host: maybe-install-gcc \
maybe-install-find \
maybe-install-flex \
maybe-install-gas \
+ maybe-install-gcc \
maybe-install-gawk \
maybe-install-gettext \
maybe-install-gnuserv \
@@ -1788,6 +1937,7 @@ install-host: maybe-install-gcc \
maybe-install-tcl \
maybe-install-itcl \
maybe-install-ld \
+ maybe-install-libcpp \
maybe-install-libgui \
maybe-install-libiberty \
maybe-install-libtool \
@@ -1818,15 +1968,15 @@ install-host: maybe-install-gcc \
maybe-install-expect \
maybe-install-guile \
maybe-install-tk \
- maybe-install-tix \
maybe-install-libtermcap \
maybe-install-utils
.PHONY: install-target
install-target: \
maybe-install-target-libstdc++-v3 \
+ maybe-install-target-libmudflap \
maybe-install-target-newlib \
- maybe-install-target-libf2c \
+ maybe-install-target-libgfortran \
maybe-install-target-libobjc \
maybe-install-target-libtermcap \
maybe-install-target-winsup \
@@ -1850,6 +2000,7 @@ install.all: install-no-fixedincludes
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}` ; export r ; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
else \
@@ -1898,25 +2049,14 @@ TAGS: do-TAGS
.PHONY: configure-build-libiberty maybe-configure-build-libiberty
maybe-configure-build-libiberty:
+@if build-libiberty
+maybe-configure-build-libiberty: configure-build-libiberty
configure-build-libiberty:
@test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
- NM="$(NM_FOR_BUILD)"; export NM; \
- RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
+ $(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/libiberty; \
cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
case $(srcdir) in \
@@ -1955,15 +2095,412 @@ configure-build-libiberty:
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) $${srcdiroption} \
- --with-build-subdir="$(BUILD_SUBDIR)" \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
|| exit 1
+@endif build-libiberty
.PHONY: all-build-libiberty maybe-all-build-libiberty
maybe-all-build-libiberty:
+@if build-libiberty
+TARGET-build-libiberty=all
+maybe-all-build-libiberty: all-build-libiberty
all-build-libiberty: configure-build-libiberty
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all)
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/libiberty && \
+ $(MAKE) $(TARGET-build-libiberty))
+@endif build-libiberty
+
+.PHONY: configure-build-bison maybe-configure-build-bison
+maybe-configure-build-bison:
+@if build-bison
+maybe-configure-build-bison: configure-build-bison
+configure-build-bison:
+ @test ! -f $(BUILD_SUBDIR)/bison/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/bison; \
+ cd "$(BUILD_SUBDIR)/bison" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/bison "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/bison"; \
+ libsrcdir="$$s/bison"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-bison
+
+.PHONY: all-build-bison maybe-all-build-bison
+maybe-all-build-bison:
+@if build-bison
+TARGET-build-bison=all
+maybe-all-build-bison: all-build-bison
+all-build-bison: configure-build-bison
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/bison && \
+ $(MAKE) $(TARGET-build-bison))
+@endif build-bison
+
+.PHONY: configure-build-byacc maybe-configure-build-byacc
+maybe-configure-build-byacc:
+@if build-byacc
+maybe-configure-build-byacc: configure-build-byacc
+configure-build-byacc:
+ @test ! -f $(BUILD_SUBDIR)/byacc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/byacc ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/byacc; \
+ cd "$(BUILD_SUBDIR)/byacc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/byacc "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/byacc"; \
+ libsrcdir="$$s/byacc"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-byacc
+
+.PHONY: all-build-byacc maybe-all-build-byacc
+maybe-all-build-byacc:
+@if build-byacc
+TARGET-build-byacc=all
+maybe-all-build-byacc: all-build-byacc
+all-build-byacc: configure-build-byacc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/byacc && \
+ $(MAKE) $(TARGET-build-byacc))
+@endif build-byacc
+
+.PHONY: configure-build-flex maybe-configure-build-flex
+maybe-configure-build-flex:
+@if build-flex
+maybe-configure-build-flex: configure-build-flex
+configure-build-flex:
+ @test ! -f $(BUILD_SUBDIR)/flex/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/flex; \
+ cd "$(BUILD_SUBDIR)/flex" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/flex "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/flex"; \
+ libsrcdir="$$s/flex"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-flex
+
+.PHONY: all-build-flex maybe-all-build-flex
+maybe-all-build-flex:
+@if build-flex
+TARGET-build-flex=all
+maybe-all-build-flex: all-build-flex
+all-build-flex: configure-build-flex
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/flex && \
+ $(MAKE) $(TARGET-build-flex))
+@endif build-flex
+
+.PHONY: configure-build-m4 maybe-configure-build-m4
+maybe-configure-build-m4:
+@if build-m4
+maybe-configure-build-m4: configure-build-m4
+configure-build-m4:
+ @test ! -f $(BUILD_SUBDIR)/m4/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/m4; \
+ cd "$(BUILD_SUBDIR)/m4" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/m4 "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/m4"; \
+ libsrcdir="$$s/m4"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-m4
+
+.PHONY: all-build-m4 maybe-all-build-m4
+maybe-all-build-m4:
+@if build-m4
+TARGET-build-m4=all
+maybe-all-build-m4: all-build-m4
+all-build-m4: configure-build-m4
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/m4 && \
+ $(MAKE) $(TARGET-build-m4))
+@endif build-m4
+
+.PHONY: configure-build-texinfo maybe-configure-build-texinfo
+maybe-configure-build-texinfo:
+@if build-texinfo
+maybe-configure-build-texinfo: configure-build-texinfo
+configure-build-texinfo:
+ @test ! -f $(BUILD_SUBDIR)/texinfo/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/texinfo; \
+ cd "$(BUILD_SUBDIR)/texinfo" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/texinfo "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/texinfo"; \
+ libsrcdir="$$s/texinfo"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-texinfo
+
+.PHONY: all-build-texinfo maybe-all-build-texinfo
+maybe-all-build-texinfo:
+@if build-texinfo
+TARGET-build-texinfo=all
+maybe-all-build-texinfo: all-build-texinfo
+all-build-texinfo: configure-build-texinfo
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/texinfo && \
+ $(MAKE) $(TARGET-build-texinfo))
+@endif build-texinfo
+
+.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes
+maybe-configure-build-fixincludes:
+@if build-fixincludes
+maybe-configure-build-fixincludes: configure-build-fixincludes
+configure-build-fixincludes:
+ @test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
+ cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/fixincludes "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+ libsrcdir="$$s/fixincludes"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-fixincludes
+
+.PHONY: all-build-fixincludes maybe-all-build-fixincludes
+maybe-all-build-fixincludes:
+@if build-fixincludes
+TARGET-build-fixincludes=all
+maybe-all-build-fixincludes: all-build-fixincludes
+all-build-fixincludes: configure-build-fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/fixincludes && \
+ $(MAKE) $(TARGET-build-fixincludes))
+@endif build-fixincludes
# --------------------------------------
@@ -1972,26 +2509,14 @@ all-build-libiberty: configure-build-libiberty
.PHONY: configure-ash maybe-configure-ash
maybe-configure-ash:
+@if ash
+maybe-configure-ash: configure-ash
configure-ash:
@test ! -f ash/Makefile || exit 0; \
[ -d ash ] || mkdir ash; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in ash; \
cd ash || exit 1; \
case $(srcdir) in \
@@ -2006,41 +2531,56 @@ configure-ash:
libsrcdir="$$s/ash";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif ash
.PHONY: all-ash maybe-all-ash
maybe-all-ash:
+@if ash
+maybe-all-ash: all-ash
all-ash: configure-ash
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif ash
.PHONY: check-ash maybe-check-ash
maybe-check-ash:
+@if ash
+maybe-check-ash: check-ash
check-ash:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif ash
.PHONY: install-ash maybe-install-ash
maybe-install-ash:
+@if ash
+maybe-install-ash: install-ash
install-ash: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif ash
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-ash info-ash
maybe-info-ash:
+@if ash
+maybe-info-ash: info-ash
info-ash: \
configure-ash
@@ -2048,7 +2588,8 @@ info-ash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in ash" ; \
@@ -2060,9 +2601,12 @@ info-ash: \
info) \
|| exit 1
+@endif ash
.PHONY: maybe-dvi-ash dvi-ash
maybe-dvi-ash:
+@if ash
+maybe-dvi-ash: dvi-ash
dvi-ash: \
configure-ash
@@ -2070,7 +2614,8 @@ dvi-ash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in ash" ; \
@@ -2082,9 +2627,12 @@ dvi-ash: \
dvi) \
|| exit 1
+@endif ash
.PHONY: maybe-TAGS-ash TAGS-ash
maybe-TAGS-ash:
+@if ash
+maybe-TAGS-ash: TAGS-ash
TAGS-ash: \
configure-ash
@@ -2092,7 +2640,8 @@ TAGS-ash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in ash" ; \
@@ -2104,9 +2653,12 @@ TAGS-ash: \
TAGS) \
|| exit 1
+@endif ash
.PHONY: maybe-install-info-ash install-info-ash
maybe-install-info-ash:
+@if ash
+maybe-install-info-ash: install-info-ash
install-info-ash: \
configure-ash \
@@ -2115,7 +2667,8 @@ install-info-ash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in ash" ; \
@@ -2127,9 +2680,12 @@ install-info-ash: \
install-info) \
|| exit 1
+@endif ash
.PHONY: maybe-installcheck-ash installcheck-ash
maybe-installcheck-ash:
+@if ash
+maybe-installcheck-ash: installcheck-ash
installcheck-ash: \
configure-ash
@@ -2137,7 +2693,8 @@ installcheck-ash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in ash" ; \
@@ -2149,16 +2706,20 @@ installcheck-ash: \
installcheck) \
|| exit 1
+@endif ash
.PHONY: maybe-mostlyclean-ash mostlyclean-ash
maybe-mostlyclean-ash:
+@if ash
+maybe-mostlyclean-ash: mostlyclean-ash
mostlyclean-ash:
@[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in ash" ; \
@@ -2170,16 +2731,20 @@ mostlyclean-ash:
mostlyclean) \
|| exit 1
+@endif ash
.PHONY: maybe-clean-ash clean-ash
maybe-clean-ash:
+@if ash
+maybe-clean-ash: clean-ash
clean-ash:
@[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in ash" ; \
@@ -2191,16 +2756,20 @@ clean-ash:
clean) \
|| exit 1
+@endif ash
.PHONY: maybe-distclean-ash distclean-ash
maybe-distclean-ash:
+@if ash
+maybe-distclean-ash: distclean-ash
distclean-ash:
@[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in ash" ; \
@@ -2212,16 +2781,20 @@ distclean-ash:
distclean) \
|| exit 1
+@endif ash
.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
maybe-maintainer-clean-ash:
+@if ash
+maybe-maintainer-clean-ash: maintainer-clean-ash
maintainer-clean-ash:
@[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in ash" ; \
@@ -2233,30 +2806,19 @@ maintainer-clean-ash:
maintainer-clean) \
|| exit 1
+@endif ash
.PHONY: configure-autoconf maybe-configure-autoconf
maybe-configure-autoconf:
+@if autoconf
+maybe-configure-autoconf: configure-autoconf
configure-autoconf:
@test ! -f autoconf/Makefile || exit 0; \
[ -d autoconf ] || mkdir autoconf; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in autoconf; \
cd autoconf || exit 1; \
case $(srcdir) in \
@@ -2271,41 +2833,56 @@ configure-autoconf:
libsrcdir="$$s/autoconf";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif autoconf
.PHONY: all-autoconf maybe-all-autoconf
maybe-all-autoconf:
+@if autoconf
+maybe-all-autoconf: all-autoconf
all-autoconf: configure-autoconf
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif autoconf
.PHONY: check-autoconf maybe-check-autoconf
maybe-check-autoconf:
+@if autoconf
+maybe-check-autoconf: check-autoconf
check-autoconf:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif autoconf
.PHONY: install-autoconf maybe-install-autoconf
maybe-install-autoconf:
+@if autoconf
+maybe-install-autoconf: install-autoconf
install-autoconf: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif autoconf
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-autoconf info-autoconf
maybe-info-autoconf:
+@if autoconf
+maybe-info-autoconf: info-autoconf
info-autoconf: \
configure-autoconf
@@ -2313,7 +2890,8 @@ info-autoconf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in autoconf" ; \
@@ -2325,9 +2903,12 @@ info-autoconf: \
info) \
|| exit 1
+@endif autoconf
.PHONY: maybe-dvi-autoconf dvi-autoconf
maybe-dvi-autoconf:
+@if autoconf
+maybe-dvi-autoconf: dvi-autoconf
dvi-autoconf: \
configure-autoconf
@@ -2335,7 +2916,8 @@ dvi-autoconf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in autoconf" ; \
@@ -2347,9 +2929,12 @@ dvi-autoconf: \
dvi) \
|| exit 1
+@endif autoconf
.PHONY: maybe-TAGS-autoconf TAGS-autoconf
maybe-TAGS-autoconf:
+@if autoconf
+maybe-TAGS-autoconf: TAGS-autoconf
TAGS-autoconf: \
configure-autoconf
@@ -2357,7 +2942,8 @@ TAGS-autoconf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in autoconf" ; \
@@ -2369,9 +2955,12 @@ TAGS-autoconf: \
TAGS) \
|| exit 1
+@endif autoconf
.PHONY: maybe-install-info-autoconf install-info-autoconf
maybe-install-info-autoconf:
+@if autoconf
+maybe-install-info-autoconf: install-info-autoconf
install-info-autoconf: \
configure-autoconf \
@@ -2380,7 +2969,8 @@ install-info-autoconf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in autoconf" ; \
@@ -2392,9 +2982,12 @@ install-info-autoconf: \
install-info) \
|| exit 1
+@endif autoconf
.PHONY: maybe-installcheck-autoconf installcheck-autoconf
maybe-installcheck-autoconf:
+@if autoconf
+maybe-installcheck-autoconf: installcheck-autoconf
installcheck-autoconf: \
configure-autoconf
@@ -2402,7 +2995,8 @@ installcheck-autoconf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in autoconf" ; \
@@ -2414,16 +3008,20 @@ installcheck-autoconf: \
installcheck) \
|| exit 1
+@endif autoconf
.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
maybe-mostlyclean-autoconf:
+@if autoconf
+maybe-mostlyclean-autoconf: mostlyclean-autoconf
mostlyclean-autoconf:
@[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in autoconf" ; \
@@ -2435,16 +3033,20 @@ mostlyclean-autoconf:
mostlyclean) \
|| exit 1
+@endif autoconf
.PHONY: maybe-clean-autoconf clean-autoconf
maybe-clean-autoconf:
+@if autoconf
+maybe-clean-autoconf: clean-autoconf
clean-autoconf:
@[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in autoconf" ; \
@@ -2456,16 +3058,20 @@ clean-autoconf:
clean) \
|| exit 1
+@endif autoconf
.PHONY: maybe-distclean-autoconf distclean-autoconf
maybe-distclean-autoconf:
+@if autoconf
+maybe-distclean-autoconf: distclean-autoconf
distclean-autoconf:
@[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in autoconf" ; \
@@ -2477,16 +3083,20 @@ distclean-autoconf:
distclean) \
|| exit 1
+@endif autoconf
.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
maybe-maintainer-clean-autoconf:
+@if autoconf
+maybe-maintainer-clean-autoconf: maintainer-clean-autoconf
maintainer-clean-autoconf:
@[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in autoconf" ; \
@@ -2498,30 +3108,19 @@ maintainer-clean-autoconf:
maintainer-clean) \
|| exit 1
+@endif autoconf
.PHONY: configure-automake maybe-configure-automake
maybe-configure-automake:
+@if automake
+maybe-configure-automake: configure-automake
configure-automake:
@test ! -f automake/Makefile || exit 0; \
[ -d automake ] || mkdir automake; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in automake; \
cd automake || exit 1; \
case $(srcdir) in \
@@ -2536,41 +3135,56 @@ configure-automake:
libsrcdir="$$s/automake";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif automake
.PHONY: all-automake maybe-all-automake
maybe-all-automake:
+@if automake
+maybe-all-automake: all-automake
all-automake: configure-automake
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif automake
.PHONY: check-automake maybe-check-automake
maybe-check-automake:
+@if automake
+maybe-check-automake: check-automake
check-automake:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif automake
.PHONY: install-automake maybe-install-automake
maybe-install-automake:
+@if automake
+maybe-install-automake: install-automake
install-automake: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif automake
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-automake info-automake
maybe-info-automake:
+@if automake
+maybe-info-automake: info-automake
info-automake: \
configure-automake
@@ -2578,7 +3192,8 @@ info-automake: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in automake" ; \
@@ -2590,9 +3205,12 @@ info-automake: \
info) \
|| exit 1
+@endif automake
.PHONY: maybe-dvi-automake dvi-automake
maybe-dvi-automake:
+@if automake
+maybe-dvi-automake: dvi-automake
dvi-automake: \
configure-automake
@@ -2600,7 +3218,8 @@ dvi-automake: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in automake" ; \
@@ -2612,9 +3231,12 @@ dvi-automake: \
dvi) \
|| exit 1
+@endif automake
.PHONY: maybe-TAGS-automake TAGS-automake
maybe-TAGS-automake:
+@if automake
+maybe-TAGS-automake: TAGS-automake
TAGS-automake: \
configure-automake
@@ -2622,7 +3244,8 @@ TAGS-automake: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in automake" ; \
@@ -2634,9 +3257,12 @@ TAGS-automake: \
TAGS) \
|| exit 1
+@endif automake
.PHONY: maybe-install-info-automake install-info-automake
maybe-install-info-automake:
+@if automake
+maybe-install-info-automake: install-info-automake
install-info-automake: \
configure-automake \
@@ -2645,7 +3271,8 @@ install-info-automake: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in automake" ; \
@@ -2657,9 +3284,12 @@ install-info-automake: \
install-info) \
|| exit 1
+@endif automake
.PHONY: maybe-installcheck-automake installcheck-automake
maybe-installcheck-automake:
+@if automake
+maybe-installcheck-automake: installcheck-automake
installcheck-automake: \
configure-automake
@@ -2667,7 +3297,8 @@ installcheck-automake: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in automake" ; \
@@ -2679,16 +3310,20 @@ installcheck-automake: \
installcheck) \
|| exit 1
+@endif automake
.PHONY: maybe-mostlyclean-automake mostlyclean-automake
maybe-mostlyclean-automake:
+@if automake
+maybe-mostlyclean-automake: mostlyclean-automake
mostlyclean-automake:
@[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in automake" ; \
@@ -2700,16 +3335,20 @@ mostlyclean-automake:
mostlyclean) \
|| exit 1
+@endif automake
.PHONY: maybe-clean-automake clean-automake
maybe-clean-automake:
+@if automake
+maybe-clean-automake: clean-automake
clean-automake:
@[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in automake" ; \
@@ -2721,16 +3360,20 @@ clean-automake:
clean) \
|| exit 1
+@endif automake
.PHONY: maybe-distclean-automake distclean-automake
maybe-distclean-automake:
+@if automake
+maybe-distclean-automake: distclean-automake
distclean-automake:
@[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in automake" ; \
@@ -2742,16 +3385,20 @@ distclean-automake:
distclean) \
|| exit 1
+@endif automake
.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
maybe-maintainer-clean-automake:
+@if automake
+maybe-maintainer-clean-automake: maintainer-clean-automake
maintainer-clean-automake:
@[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in automake" ; \
@@ -2763,30 +3410,19 @@ maintainer-clean-automake:
maintainer-clean) \
|| exit 1
+@endif automake
.PHONY: configure-bash maybe-configure-bash
maybe-configure-bash:
+@if bash
+maybe-configure-bash: configure-bash
configure-bash:
@test ! -f bash/Makefile || exit 0; \
[ -d bash ] || mkdir bash; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in bash; \
cd bash || exit 1; \
case $(srcdir) in \
@@ -2801,41 +3437,56 @@ configure-bash:
libsrcdir="$$s/bash";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif bash
.PHONY: all-bash maybe-all-bash
maybe-all-bash:
+@if bash
+maybe-all-bash: all-bash
all-bash: configure-bash
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif bash
.PHONY: check-bash maybe-check-bash
maybe-check-bash:
+@if bash
+maybe-check-bash: check-bash
check-bash:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif bash
.PHONY: install-bash maybe-install-bash
maybe-install-bash:
+@if bash
+maybe-install-bash: install-bash
install-bash: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif bash
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bash info-bash
maybe-info-bash:
+@if bash
+maybe-info-bash: info-bash
info-bash: \
configure-bash
@@ -2843,7 +3494,8 @@ info-bash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in bash" ; \
@@ -2855,9 +3507,12 @@ info-bash: \
info) \
|| exit 1
+@endif bash
.PHONY: maybe-dvi-bash dvi-bash
maybe-dvi-bash:
+@if bash
+maybe-dvi-bash: dvi-bash
dvi-bash: \
configure-bash
@@ -2865,7 +3520,8 @@ dvi-bash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in bash" ; \
@@ -2877,9 +3533,12 @@ dvi-bash: \
dvi) \
|| exit 1
+@endif bash
.PHONY: maybe-TAGS-bash TAGS-bash
maybe-TAGS-bash:
+@if bash
+maybe-TAGS-bash: TAGS-bash
TAGS-bash: \
configure-bash
@@ -2887,7 +3546,8 @@ TAGS-bash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in bash" ; \
@@ -2899,9 +3559,12 @@ TAGS-bash: \
TAGS) \
|| exit 1
+@endif bash
.PHONY: maybe-install-info-bash install-info-bash
maybe-install-info-bash:
+@if bash
+maybe-install-info-bash: install-info-bash
install-info-bash: \
configure-bash \
@@ -2910,7 +3573,8 @@ install-info-bash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in bash" ; \
@@ -2922,9 +3586,12 @@ install-info-bash: \
install-info) \
|| exit 1
+@endif bash
.PHONY: maybe-installcheck-bash installcheck-bash
maybe-installcheck-bash:
+@if bash
+maybe-installcheck-bash: installcheck-bash
installcheck-bash: \
configure-bash
@@ -2932,7 +3599,8 @@ installcheck-bash: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in bash" ; \
@@ -2944,16 +3612,20 @@ installcheck-bash: \
installcheck) \
|| exit 1
+@endif bash
.PHONY: maybe-mostlyclean-bash mostlyclean-bash
maybe-mostlyclean-bash:
+@if bash
+maybe-mostlyclean-bash: mostlyclean-bash
mostlyclean-bash:
@[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in bash" ; \
@@ -2965,16 +3637,20 @@ mostlyclean-bash:
mostlyclean) \
|| exit 1
+@endif bash
.PHONY: maybe-clean-bash clean-bash
maybe-clean-bash:
+@if bash
+maybe-clean-bash: clean-bash
clean-bash:
@[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in bash" ; \
@@ -2986,16 +3662,20 @@ clean-bash:
clean) \
|| exit 1
+@endif bash
.PHONY: maybe-distclean-bash distclean-bash
maybe-distclean-bash:
+@if bash
+maybe-distclean-bash: distclean-bash
distclean-bash:
@[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in bash" ; \
@@ -3007,16 +3687,20 @@ distclean-bash:
distclean) \
|| exit 1
+@endif bash
.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
maybe-maintainer-clean-bash:
+@if bash
+maybe-maintainer-clean-bash: maintainer-clean-bash
maintainer-clean-bash:
@[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in bash" ; \
@@ -3028,30 +3712,20 @@ maintainer-clean-bash:
maintainer-clean) \
|| exit 1
+@endif bash
.PHONY: configure-bfd maybe-configure-bfd
maybe-configure-bfd:
+@if bfd
+maybe-configure-bfd: configure-bfd
configure-bfd:
- @test ! -f bfd/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f bfd/Makefile || exit 0; \
[ -d bfd ] || mkdir bfd; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in bfd; \
cd bfd || exit 1; \
case $(srcdir) in \
@@ -3066,41 +3740,57 @@ configure-bfd:
libsrcdir="$$s/bfd";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif bfd
.PHONY: all-bfd maybe-all-bfd
maybe-all-bfd:
+@if bfd
+maybe-all-bfd: all-bfd
all-bfd: configure-bfd
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif bfd
.PHONY: check-bfd maybe-check-bfd
maybe-check-bfd:
+@if bfd
+maybe-check-bfd: check-bfd
check-bfd:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif bfd
.PHONY: install-bfd maybe-install-bfd
maybe-install-bfd:
+@if bfd
+maybe-install-bfd: install-bfd
install-bfd: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif bfd
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bfd info-bfd
maybe-info-bfd:
+@if bfd
+maybe-info-bfd: info-bfd
info-bfd: \
configure-bfd
@@ -3108,7 +3798,8 @@ info-bfd: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in bfd" ; \
@@ -3120,9 +3811,12 @@ info-bfd: \
info) \
|| exit 1
+@endif bfd
.PHONY: maybe-dvi-bfd dvi-bfd
maybe-dvi-bfd:
+@if bfd
+maybe-dvi-bfd: dvi-bfd
dvi-bfd: \
configure-bfd
@@ -3130,7 +3824,8 @@ dvi-bfd: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in bfd" ; \
@@ -3142,9 +3837,12 @@ dvi-bfd: \
dvi) \
|| exit 1
+@endif bfd
.PHONY: maybe-TAGS-bfd TAGS-bfd
maybe-TAGS-bfd:
+@if bfd
+maybe-TAGS-bfd: TAGS-bfd
TAGS-bfd: \
configure-bfd
@@ -3152,7 +3850,8 @@ TAGS-bfd: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in bfd" ; \
@@ -3164,9 +3863,12 @@ TAGS-bfd: \
TAGS) \
|| exit 1
+@endif bfd
.PHONY: maybe-install-info-bfd install-info-bfd
maybe-install-info-bfd:
+@if bfd
+maybe-install-info-bfd: install-info-bfd
install-info-bfd: \
configure-bfd \
@@ -3175,7 +3877,8 @@ install-info-bfd: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in bfd" ; \
@@ -3187,9 +3890,12 @@ install-info-bfd: \
install-info) \
|| exit 1
+@endif bfd
.PHONY: maybe-installcheck-bfd installcheck-bfd
maybe-installcheck-bfd:
+@if bfd
+maybe-installcheck-bfd: installcheck-bfd
installcheck-bfd: \
configure-bfd
@@ -3197,7 +3903,8 @@ installcheck-bfd: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in bfd" ; \
@@ -3209,16 +3916,20 @@ installcheck-bfd: \
installcheck) \
|| exit 1
+@endif bfd
.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
maybe-mostlyclean-bfd:
+@if bfd
+maybe-mostlyclean-bfd: mostlyclean-bfd
mostlyclean-bfd:
@[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in bfd" ; \
@@ -3230,16 +3941,20 @@ mostlyclean-bfd:
mostlyclean) \
|| exit 1
+@endif bfd
.PHONY: maybe-clean-bfd clean-bfd
maybe-clean-bfd:
+@if bfd
+maybe-clean-bfd: clean-bfd
clean-bfd:
@[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in bfd" ; \
@@ -3251,16 +3966,20 @@ clean-bfd:
clean) \
|| exit 1
+@endif bfd
.PHONY: maybe-distclean-bfd distclean-bfd
maybe-distclean-bfd:
+@if bfd
+maybe-distclean-bfd: distclean-bfd
distclean-bfd:
@[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in bfd" ; \
@@ -3272,16 +3991,20 @@ distclean-bfd:
distclean) \
|| exit 1
+@endif bfd
.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
maybe-maintainer-clean-bfd:
+@if bfd
+maybe-maintainer-clean-bfd: maintainer-clean-bfd
maintainer-clean-bfd:
@[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in bfd" ; \
@@ -3293,30 +4016,20 @@ maintainer-clean-bfd:
maintainer-clean) \
|| exit 1
+@endif bfd
.PHONY: configure-opcodes maybe-configure-opcodes
maybe-configure-opcodes:
+@if opcodes
+maybe-configure-opcodes: configure-opcodes
configure-opcodes:
- @test ! -f opcodes/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f opcodes/Makefile || exit 0; \
[ -d opcodes ] || mkdir opcodes; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in opcodes; \
cd opcodes || exit 1; \
case $(srcdir) in \
@@ -3331,41 +4044,57 @@ configure-opcodes:
libsrcdir="$$s/opcodes";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif opcodes
.PHONY: all-opcodes maybe-all-opcodes
maybe-all-opcodes:
+@if opcodes
+maybe-all-opcodes: all-opcodes
all-opcodes: configure-opcodes
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif opcodes
.PHONY: check-opcodes maybe-check-opcodes
maybe-check-opcodes:
+@if opcodes
+maybe-check-opcodes: check-opcodes
check-opcodes:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif opcodes
.PHONY: install-opcodes maybe-install-opcodes
maybe-install-opcodes:
+@if opcodes
+maybe-install-opcodes: install-opcodes
install-opcodes: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif opcodes
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-opcodes info-opcodes
maybe-info-opcodes:
+@if opcodes
+maybe-info-opcodes: info-opcodes
info-opcodes: \
configure-opcodes
@@ -3373,7 +4102,8 @@ info-opcodes: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in opcodes" ; \
@@ -3385,9 +4115,12 @@ info-opcodes: \
info) \
|| exit 1
+@endif opcodes
.PHONY: maybe-dvi-opcodes dvi-opcodes
maybe-dvi-opcodes:
+@if opcodes
+maybe-dvi-opcodes: dvi-opcodes
dvi-opcodes: \
configure-opcodes
@@ -3395,7 +4128,8 @@ dvi-opcodes: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in opcodes" ; \
@@ -3407,9 +4141,12 @@ dvi-opcodes: \
dvi) \
|| exit 1
+@endif opcodes
.PHONY: maybe-TAGS-opcodes TAGS-opcodes
maybe-TAGS-opcodes:
+@if opcodes
+maybe-TAGS-opcodes: TAGS-opcodes
TAGS-opcodes: \
configure-opcodes
@@ -3417,7 +4154,8 @@ TAGS-opcodes: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in opcodes" ; \
@@ -3429,9 +4167,12 @@ TAGS-opcodes: \
TAGS) \
|| exit 1
+@endif opcodes
.PHONY: maybe-install-info-opcodes install-info-opcodes
maybe-install-info-opcodes:
+@if opcodes
+maybe-install-info-opcodes: install-info-opcodes
install-info-opcodes: \
configure-opcodes \
@@ -3440,7 +4181,8 @@ install-info-opcodes: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in opcodes" ; \
@@ -3452,9 +4194,12 @@ install-info-opcodes: \
install-info) \
|| exit 1
+@endif opcodes
.PHONY: maybe-installcheck-opcodes installcheck-opcodes
maybe-installcheck-opcodes:
+@if opcodes
+maybe-installcheck-opcodes: installcheck-opcodes
installcheck-opcodes: \
configure-opcodes
@@ -3462,7 +4207,8 @@ installcheck-opcodes: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in opcodes" ; \
@@ -3474,16 +4220,20 @@ installcheck-opcodes: \
installcheck) \
|| exit 1
+@endif opcodes
.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes
maybe-mostlyclean-opcodes:
+@if opcodes
+maybe-mostlyclean-opcodes: mostlyclean-opcodes
mostlyclean-opcodes:
@[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in opcodes" ; \
@@ -3495,16 +4245,20 @@ mostlyclean-opcodes:
mostlyclean) \
|| exit 1
+@endif opcodes
.PHONY: maybe-clean-opcodes clean-opcodes
maybe-clean-opcodes:
+@if opcodes
+maybe-clean-opcodes: clean-opcodes
clean-opcodes:
@[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in opcodes" ; \
@@ -3516,16 +4270,20 @@ clean-opcodes:
clean) \
|| exit 1
+@endif opcodes
.PHONY: maybe-distclean-opcodes distclean-opcodes
maybe-distclean-opcodes:
+@if opcodes
+maybe-distclean-opcodes: distclean-opcodes
distclean-opcodes:
@[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in opcodes" ; \
@@ -3537,16 +4295,20 @@ distclean-opcodes:
distclean) \
|| exit 1
+@endif opcodes
.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes
maybe-maintainer-clean-opcodes:
+@if opcodes
+maybe-maintainer-clean-opcodes: maintainer-clean-opcodes
maintainer-clean-opcodes:
@[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in opcodes" ; \
@@ -3558,30 +4320,20 @@ maintainer-clean-opcodes:
maintainer-clean) \
|| exit 1
+@endif opcodes
.PHONY: configure-binutils maybe-configure-binutils
maybe-configure-binutils:
+@if binutils
+maybe-configure-binutils: configure-binutils
configure-binutils:
- @test ! -f binutils/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f binutils/Makefile || exit 0; \
[ -d binutils ] || mkdir binutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in binutils; \
cd binutils || exit 1; \
case $(srcdir) in \
@@ -3596,41 +4348,57 @@ configure-binutils:
libsrcdir="$$s/binutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif binutils
.PHONY: all-binutils maybe-all-binutils
maybe-all-binutils:
+@if binutils
+maybe-all-binutils: all-binutils
all-binutils: configure-binutils
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif binutils
.PHONY: check-binutils maybe-check-binutils
maybe-check-binutils:
+@if binutils
+maybe-check-binutils: check-binutils
check-binutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif binutils
.PHONY: install-binutils maybe-install-binutils
maybe-install-binutils:
+@if binutils
+maybe-install-binutils: install-binutils
install-binutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif binutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-binutils info-binutils
maybe-info-binutils:
+@if binutils
+maybe-info-binutils: info-binutils
info-binutils: \
configure-binutils
@@ -3638,7 +4406,8 @@ info-binutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in binutils" ; \
@@ -3650,9 +4419,12 @@ info-binutils: \
info) \
|| exit 1
+@endif binutils
.PHONY: maybe-dvi-binutils dvi-binutils
maybe-dvi-binutils:
+@if binutils
+maybe-dvi-binutils: dvi-binutils
dvi-binutils: \
configure-binutils
@@ -3660,7 +4432,8 @@ dvi-binutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in binutils" ; \
@@ -3672,9 +4445,12 @@ dvi-binutils: \
dvi) \
|| exit 1
+@endif binutils
.PHONY: maybe-TAGS-binutils TAGS-binutils
maybe-TAGS-binutils:
+@if binutils
+maybe-TAGS-binutils: TAGS-binutils
TAGS-binutils: \
configure-binutils
@@ -3682,7 +4458,8 @@ TAGS-binutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in binutils" ; \
@@ -3694,9 +4471,12 @@ TAGS-binutils: \
TAGS) \
|| exit 1
+@endif binutils
.PHONY: maybe-install-info-binutils install-info-binutils
maybe-install-info-binutils:
+@if binutils
+maybe-install-info-binutils: install-info-binutils
install-info-binutils: \
configure-binutils \
@@ -3705,7 +4485,8 @@ install-info-binutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in binutils" ; \
@@ -3717,9 +4498,12 @@ install-info-binutils: \
install-info) \
|| exit 1
+@endif binutils
.PHONY: maybe-installcheck-binutils installcheck-binutils
maybe-installcheck-binutils:
+@if binutils
+maybe-installcheck-binutils: installcheck-binutils
installcheck-binutils: \
configure-binutils
@@ -3727,7 +4511,8 @@ installcheck-binutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in binutils" ; \
@@ -3739,16 +4524,20 @@ installcheck-binutils: \
installcheck) \
|| exit 1
+@endif binutils
.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils
maybe-mostlyclean-binutils:
+@if binutils
+maybe-mostlyclean-binutils: mostlyclean-binutils
mostlyclean-binutils:
@[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in binutils" ; \
@@ -3760,16 +4549,20 @@ mostlyclean-binutils:
mostlyclean) \
|| exit 1
+@endif binutils
.PHONY: maybe-clean-binutils clean-binutils
maybe-clean-binutils:
+@if binutils
+maybe-clean-binutils: clean-binutils
clean-binutils:
@[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in binutils" ; \
@@ -3781,16 +4574,20 @@ clean-binutils:
clean) \
|| exit 1
+@endif binutils
.PHONY: maybe-distclean-binutils distclean-binutils
maybe-distclean-binutils:
+@if binutils
+maybe-distclean-binutils: distclean-binutils
distclean-binutils:
@[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in binutils" ; \
@@ -3802,16 +4599,20 @@ distclean-binutils:
distclean) \
|| exit 1
+@endif binutils
.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils
maybe-maintainer-clean-binutils:
+@if binutils
+maybe-maintainer-clean-binutils: maintainer-clean-binutils
maintainer-clean-binutils:
@[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in binutils" ; \
@@ -3823,30 +4624,19 @@ maintainer-clean-binutils:
maintainer-clean) \
|| exit 1
+@endif binutils
.PHONY: configure-bison maybe-configure-bison
maybe-configure-bison:
+@if bison
+maybe-configure-bison: configure-bison
configure-bison:
@test ! -f bison/Makefile || exit 0; \
[ -d bison ] || mkdir bison; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in bison; \
cd bison || exit 1; \
case $(srcdir) in \
@@ -3861,19 +4651,26 @@ configure-bison:
libsrcdir="$$s/bison";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif bison
.PHONY: all-bison maybe-all-bison
maybe-all-bison:
+@if bison
+maybe-all-bison: all-bison
all-bison: configure-bison
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif bison
.PHONY: check-bison maybe-check-bison
maybe-check-bison:
+@if bison
+maybe-check-bison: check-bison
# This module is only tested in a native toolchain.
check-bison:
@@ -3881,24 +4678,32 @@ check-bison:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(HOST_EXPORTS) \
+ (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
+@endif bison
.PHONY: install-bison maybe-install-bison
maybe-install-bison:
+@if bison
+maybe-install-bison: install-bison
install-bison: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif bison
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bison info-bison
maybe-info-bison:
+@if bison
+maybe-info-bison: info-bison
info-bison: \
configure-bison
@@ -3906,7 +4711,8 @@ info-bison: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in bison" ; \
@@ -3918,9 +4724,12 @@ info-bison: \
info) \
|| exit 1
+@endif bison
.PHONY: maybe-dvi-bison dvi-bison
maybe-dvi-bison:
+@if bison
+maybe-dvi-bison: dvi-bison
dvi-bison: \
configure-bison
@@ -3928,7 +4737,8 @@ dvi-bison: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in bison" ; \
@@ -3940,9 +4750,12 @@ dvi-bison: \
dvi) \
|| exit 1
+@endif bison
.PHONY: maybe-TAGS-bison TAGS-bison
maybe-TAGS-bison:
+@if bison
+maybe-TAGS-bison: TAGS-bison
TAGS-bison: \
configure-bison
@@ -3950,7 +4763,8 @@ TAGS-bison: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in bison" ; \
@@ -3962,9 +4776,12 @@ TAGS-bison: \
TAGS) \
|| exit 1
+@endif bison
.PHONY: maybe-install-info-bison install-info-bison
maybe-install-info-bison:
+@if bison
+maybe-install-info-bison: install-info-bison
install-info-bison: \
configure-bison \
@@ -3973,7 +4790,8 @@ install-info-bison: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in bison" ; \
@@ -3985,9 +4803,12 @@ install-info-bison: \
install-info) \
|| exit 1
+@endif bison
.PHONY: maybe-installcheck-bison installcheck-bison
maybe-installcheck-bison:
+@if bison
+maybe-installcheck-bison: installcheck-bison
installcheck-bison: \
configure-bison
@@ -3995,7 +4816,8 @@ installcheck-bison: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in bison" ; \
@@ -4007,16 +4829,20 @@ installcheck-bison: \
installcheck) \
|| exit 1
+@endif bison
.PHONY: maybe-mostlyclean-bison mostlyclean-bison
maybe-mostlyclean-bison:
+@if bison
+maybe-mostlyclean-bison: mostlyclean-bison
mostlyclean-bison:
@[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in bison" ; \
@@ -4028,16 +4854,20 @@ mostlyclean-bison:
mostlyclean) \
|| exit 1
+@endif bison
.PHONY: maybe-clean-bison clean-bison
maybe-clean-bison:
+@if bison
+maybe-clean-bison: clean-bison
clean-bison:
@[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in bison" ; \
@@ -4049,16 +4879,20 @@ clean-bison:
clean) \
|| exit 1
+@endif bison
.PHONY: maybe-distclean-bison distclean-bison
maybe-distclean-bison:
+@if bison
+maybe-distclean-bison: distclean-bison
distclean-bison:
@[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in bison" ; \
@@ -4070,16 +4904,20 @@ distclean-bison:
distclean) \
|| exit 1
+@endif bison
.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison
maybe-maintainer-clean-bison:
+@if bison
+maybe-maintainer-clean-bison: maintainer-clean-bison
maintainer-clean-bison:
@[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in bison" ; \
@@ -4091,30 +4929,19 @@ maintainer-clean-bison:
maintainer-clean) \
|| exit 1
+@endif bison
.PHONY: configure-byacc maybe-configure-byacc
maybe-configure-byacc:
+@if byacc
+maybe-configure-byacc: configure-byacc
configure-byacc:
@test ! -f byacc/Makefile || exit 0; \
[ -d byacc ] || mkdir byacc; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in byacc; \
cd byacc || exit 1; \
case $(srcdir) in \
@@ -4129,19 +4956,26 @@ configure-byacc:
libsrcdir="$$s/byacc";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif byacc
.PHONY: all-byacc maybe-all-byacc
maybe-all-byacc:
+@if byacc
+maybe-all-byacc: all-byacc
all-byacc: configure-byacc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif byacc
.PHONY: check-byacc maybe-check-byacc
maybe-check-byacc:
+@if byacc
+maybe-check-byacc: check-byacc
# This module is only tested in a native toolchain.
check-byacc:
@@ -4149,24 +4983,32 @@ check-byacc:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(HOST_EXPORTS) \
+ (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
+@endif byacc
.PHONY: install-byacc maybe-install-byacc
maybe-install-byacc:
+@if byacc
+maybe-install-byacc: install-byacc
install-byacc: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif byacc
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-byacc info-byacc
maybe-info-byacc:
+@if byacc
+maybe-info-byacc: info-byacc
info-byacc: \
configure-byacc
@@ -4174,7 +5016,8 @@ info-byacc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in byacc" ; \
@@ -4186,9 +5029,12 @@ info-byacc: \
info) \
|| exit 1
+@endif byacc
.PHONY: maybe-dvi-byacc dvi-byacc
maybe-dvi-byacc:
+@if byacc
+maybe-dvi-byacc: dvi-byacc
dvi-byacc: \
configure-byacc
@@ -4196,7 +5042,8 @@ dvi-byacc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in byacc" ; \
@@ -4208,9 +5055,12 @@ dvi-byacc: \
dvi) \
|| exit 1
+@endif byacc
.PHONY: maybe-TAGS-byacc TAGS-byacc
maybe-TAGS-byacc:
+@if byacc
+maybe-TAGS-byacc: TAGS-byacc
TAGS-byacc: \
configure-byacc
@@ -4218,7 +5068,8 @@ TAGS-byacc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in byacc" ; \
@@ -4230,9 +5081,12 @@ TAGS-byacc: \
TAGS) \
|| exit 1
+@endif byacc
.PHONY: maybe-install-info-byacc install-info-byacc
maybe-install-info-byacc:
+@if byacc
+maybe-install-info-byacc: install-info-byacc
install-info-byacc: \
configure-byacc \
@@ -4241,7 +5095,8 @@ install-info-byacc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in byacc" ; \
@@ -4253,9 +5108,12 @@ install-info-byacc: \
install-info) \
|| exit 1
+@endif byacc
.PHONY: maybe-installcheck-byacc installcheck-byacc
maybe-installcheck-byacc:
+@if byacc
+maybe-installcheck-byacc: installcheck-byacc
installcheck-byacc: \
configure-byacc
@@ -4263,7 +5121,8 @@ installcheck-byacc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in byacc" ; \
@@ -4275,16 +5134,20 @@ installcheck-byacc: \
installcheck) \
|| exit 1
+@endif byacc
.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
maybe-mostlyclean-byacc:
+@if byacc
+maybe-mostlyclean-byacc: mostlyclean-byacc
mostlyclean-byacc:
@[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in byacc" ; \
@@ -4296,16 +5159,20 @@ mostlyclean-byacc:
mostlyclean) \
|| exit 1
+@endif byacc
.PHONY: maybe-clean-byacc clean-byacc
maybe-clean-byacc:
+@if byacc
+maybe-clean-byacc: clean-byacc
clean-byacc:
@[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in byacc" ; \
@@ -4317,16 +5184,20 @@ clean-byacc:
clean) \
|| exit 1
+@endif byacc
.PHONY: maybe-distclean-byacc distclean-byacc
maybe-distclean-byacc:
+@if byacc
+maybe-distclean-byacc: distclean-byacc
distclean-byacc:
@[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in byacc" ; \
@@ -4338,16 +5209,20 @@ distclean-byacc:
distclean) \
|| exit 1
+@endif byacc
.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
maybe-maintainer-clean-byacc:
+@if byacc
+maybe-maintainer-clean-byacc: maintainer-clean-byacc
maintainer-clean-byacc:
@[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in byacc" ; \
@@ -4359,30 +5234,19 @@ maintainer-clean-byacc:
maintainer-clean) \
|| exit 1
+@endif byacc
.PHONY: configure-bzip2 maybe-configure-bzip2
maybe-configure-bzip2:
+@if bzip2
+maybe-configure-bzip2: configure-bzip2
configure-bzip2:
@test ! -f bzip2/Makefile || exit 0; \
[ -d bzip2 ] || mkdir bzip2; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in bzip2; \
cd bzip2 || exit 1; \
case $(srcdir) in \
@@ -4397,41 +5261,56 @@ configure-bzip2:
libsrcdir="$$s/bzip2";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif bzip2
.PHONY: all-bzip2 maybe-all-bzip2
maybe-all-bzip2:
+@if bzip2
+maybe-all-bzip2: all-bzip2
all-bzip2: configure-bzip2
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif bzip2
.PHONY: check-bzip2 maybe-check-bzip2
maybe-check-bzip2:
+@if bzip2
+maybe-check-bzip2: check-bzip2
check-bzip2:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif bzip2
.PHONY: install-bzip2 maybe-install-bzip2
maybe-install-bzip2:
+@if bzip2
+maybe-install-bzip2: install-bzip2
install-bzip2: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif bzip2
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bzip2 info-bzip2
maybe-info-bzip2:
+@if bzip2
+maybe-info-bzip2: info-bzip2
info-bzip2: \
configure-bzip2
@@ -4439,7 +5318,8 @@ info-bzip2: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in bzip2" ; \
@@ -4451,9 +5331,12 @@ info-bzip2: \
info) \
|| exit 1
+@endif bzip2
.PHONY: maybe-dvi-bzip2 dvi-bzip2
maybe-dvi-bzip2:
+@if bzip2
+maybe-dvi-bzip2: dvi-bzip2
dvi-bzip2: \
configure-bzip2
@@ -4461,7 +5344,8 @@ dvi-bzip2: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in bzip2" ; \
@@ -4473,9 +5357,12 @@ dvi-bzip2: \
dvi) \
|| exit 1
+@endif bzip2
.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
maybe-TAGS-bzip2:
+@if bzip2
+maybe-TAGS-bzip2: TAGS-bzip2
TAGS-bzip2: \
configure-bzip2
@@ -4483,7 +5370,8 @@ TAGS-bzip2: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in bzip2" ; \
@@ -4495,9 +5383,12 @@ TAGS-bzip2: \
TAGS) \
|| exit 1
+@endif bzip2
.PHONY: maybe-install-info-bzip2 install-info-bzip2
maybe-install-info-bzip2:
+@if bzip2
+maybe-install-info-bzip2: install-info-bzip2
install-info-bzip2: \
configure-bzip2 \
@@ -4506,7 +5397,8 @@ install-info-bzip2: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in bzip2" ; \
@@ -4518,9 +5410,12 @@ install-info-bzip2: \
install-info) \
|| exit 1
+@endif bzip2
.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
maybe-installcheck-bzip2:
+@if bzip2
+maybe-installcheck-bzip2: installcheck-bzip2
installcheck-bzip2: \
configure-bzip2
@@ -4528,7 +5423,8 @@ installcheck-bzip2: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in bzip2" ; \
@@ -4540,16 +5436,20 @@ installcheck-bzip2: \
installcheck) \
|| exit 1
+@endif bzip2
.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
maybe-mostlyclean-bzip2:
+@if bzip2
+maybe-mostlyclean-bzip2: mostlyclean-bzip2
mostlyclean-bzip2:
@[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in bzip2" ; \
@@ -4561,16 +5461,20 @@ mostlyclean-bzip2:
mostlyclean) \
|| exit 1
+@endif bzip2
.PHONY: maybe-clean-bzip2 clean-bzip2
maybe-clean-bzip2:
+@if bzip2
+maybe-clean-bzip2: clean-bzip2
clean-bzip2:
@[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in bzip2" ; \
@@ -4582,16 +5486,20 @@ clean-bzip2:
clean) \
|| exit 1
+@endif bzip2
.PHONY: maybe-distclean-bzip2 distclean-bzip2
maybe-distclean-bzip2:
+@if bzip2
+maybe-distclean-bzip2: distclean-bzip2
distclean-bzip2:
@[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in bzip2" ; \
@@ -4603,16 +5511,20 @@ distclean-bzip2:
distclean) \
|| exit 1
+@endif bzip2
.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
maybe-maintainer-clean-bzip2:
+@if bzip2
+maybe-maintainer-clean-bzip2: maintainer-clean-bzip2
maintainer-clean-bzip2:
@[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in bzip2" ; \
@@ -4624,30 +5536,19 @@ maintainer-clean-bzip2:
maintainer-clean) \
|| exit 1
+@endif bzip2
.PHONY: configure-dejagnu maybe-configure-dejagnu
maybe-configure-dejagnu:
+@if dejagnu
+maybe-configure-dejagnu: configure-dejagnu
configure-dejagnu:
@test ! -f dejagnu/Makefile || exit 0; \
[ -d dejagnu ] || mkdir dejagnu; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in dejagnu; \
cd dejagnu || exit 1; \
case $(srcdir) in \
@@ -4662,41 +5563,56 @@ configure-dejagnu:
libsrcdir="$$s/dejagnu";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif dejagnu
.PHONY: all-dejagnu maybe-all-dejagnu
maybe-all-dejagnu:
+@if dejagnu
+maybe-all-dejagnu: all-dejagnu
all-dejagnu: configure-dejagnu
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif dejagnu
.PHONY: check-dejagnu maybe-check-dejagnu
maybe-check-dejagnu:
+@if dejagnu
+maybe-check-dejagnu: check-dejagnu
check-dejagnu:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif dejagnu
.PHONY: install-dejagnu maybe-install-dejagnu
maybe-install-dejagnu:
+@if dejagnu
+maybe-install-dejagnu: install-dejagnu
install-dejagnu: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif dejagnu
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-dejagnu info-dejagnu
maybe-info-dejagnu:
+@if dejagnu
+maybe-info-dejagnu: info-dejagnu
info-dejagnu: \
configure-dejagnu
@@ -4704,7 +5620,8 @@ info-dejagnu: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in dejagnu" ; \
@@ -4716,9 +5633,12 @@ info-dejagnu: \
info) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-dvi-dejagnu dvi-dejagnu
maybe-dvi-dejagnu:
+@if dejagnu
+maybe-dvi-dejagnu: dvi-dejagnu
dvi-dejagnu: \
configure-dejagnu
@@ -4726,7 +5646,8 @@ dvi-dejagnu: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in dejagnu" ; \
@@ -4738,9 +5659,12 @@ dvi-dejagnu: \
dvi) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
maybe-TAGS-dejagnu:
+@if dejagnu
+maybe-TAGS-dejagnu: TAGS-dejagnu
TAGS-dejagnu: \
configure-dejagnu
@@ -4748,7 +5672,8 @@ TAGS-dejagnu: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in dejagnu" ; \
@@ -4760,9 +5685,12 @@ TAGS-dejagnu: \
TAGS) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-install-info-dejagnu install-info-dejagnu
maybe-install-info-dejagnu:
+@if dejagnu
+maybe-install-info-dejagnu: install-info-dejagnu
install-info-dejagnu: \
configure-dejagnu \
@@ -4771,7 +5699,8 @@ install-info-dejagnu: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in dejagnu" ; \
@@ -4783,9 +5712,12 @@ install-info-dejagnu: \
install-info) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu
maybe-installcheck-dejagnu:
+@if dejagnu
+maybe-installcheck-dejagnu: installcheck-dejagnu
installcheck-dejagnu: \
configure-dejagnu
@@ -4793,7 +5725,8 @@ installcheck-dejagnu: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in dejagnu" ; \
@@ -4805,16 +5738,20 @@ installcheck-dejagnu: \
installcheck) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu
maybe-mostlyclean-dejagnu:
+@if dejagnu
+maybe-mostlyclean-dejagnu: mostlyclean-dejagnu
mostlyclean-dejagnu:
@[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in dejagnu" ; \
@@ -4826,16 +5763,20 @@ mostlyclean-dejagnu:
mostlyclean) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-clean-dejagnu clean-dejagnu
maybe-clean-dejagnu:
+@if dejagnu
+maybe-clean-dejagnu: clean-dejagnu
clean-dejagnu:
@[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in dejagnu" ; \
@@ -4847,16 +5788,20 @@ clean-dejagnu:
clean) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-distclean-dejagnu distclean-dejagnu
maybe-distclean-dejagnu:
+@if dejagnu
+maybe-distclean-dejagnu: distclean-dejagnu
distclean-dejagnu:
@[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in dejagnu" ; \
@@ -4868,16 +5813,20 @@ distclean-dejagnu:
distclean) \
|| exit 1
+@endif dejagnu
.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu
maybe-maintainer-clean-dejagnu:
+@if dejagnu
+maybe-maintainer-clean-dejagnu: maintainer-clean-dejagnu
maintainer-clean-dejagnu:
@[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in dejagnu" ; \
@@ -4889,30 +5838,19 @@ maintainer-clean-dejagnu:
maintainer-clean) \
|| exit 1
+@endif dejagnu
.PHONY: configure-diff maybe-configure-diff
maybe-configure-diff:
+@if diff
+maybe-configure-diff: configure-diff
configure-diff:
@test ! -f diff/Makefile || exit 0; \
[ -d diff ] || mkdir diff; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in diff; \
cd diff || exit 1; \
case $(srcdir) in \
@@ -4927,41 +5865,56 @@ configure-diff:
libsrcdir="$$s/diff";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif diff
.PHONY: all-diff maybe-all-diff
maybe-all-diff:
+@if diff
+maybe-all-diff: all-diff
all-diff: configure-diff
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif diff
.PHONY: check-diff maybe-check-diff
maybe-check-diff:
+@if diff
+maybe-check-diff: check-diff
check-diff:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif diff
.PHONY: install-diff maybe-install-diff
maybe-install-diff:
+@if diff
+maybe-install-diff: install-diff
install-diff: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif diff
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-diff info-diff
maybe-info-diff:
+@if diff
+maybe-info-diff: info-diff
info-diff: \
configure-diff
@@ -4969,7 +5922,8 @@ info-diff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in diff" ; \
@@ -4981,9 +5935,12 @@ info-diff: \
info) \
|| exit 1
+@endif diff
.PHONY: maybe-dvi-diff dvi-diff
maybe-dvi-diff:
+@if diff
+maybe-dvi-diff: dvi-diff
dvi-diff: \
configure-diff
@@ -4991,7 +5948,8 @@ dvi-diff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in diff" ; \
@@ -5003,9 +5961,12 @@ dvi-diff: \
dvi) \
|| exit 1
+@endif diff
.PHONY: maybe-TAGS-diff TAGS-diff
maybe-TAGS-diff:
+@if diff
+maybe-TAGS-diff: TAGS-diff
TAGS-diff: \
configure-diff
@@ -5013,7 +5974,8 @@ TAGS-diff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in diff" ; \
@@ -5025,9 +5987,12 @@ TAGS-diff: \
TAGS) \
|| exit 1
+@endif diff
.PHONY: maybe-install-info-diff install-info-diff
maybe-install-info-diff:
+@if diff
+maybe-install-info-diff: install-info-diff
install-info-diff: \
configure-diff \
@@ -5036,7 +6001,8 @@ install-info-diff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in diff" ; \
@@ -5048,9 +6014,12 @@ install-info-diff: \
install-info) \
|| exit 1
+@endif diff
.PHONY: maybe-installcheck-diff installcheck-diff
maybe-installcheck-diff:
+@if diff
+maybe-installcheck-diff: installcheck-diff
installcheck-diff: \
configure-diff
@@ -5058,7 +6027,8 @@ installcheck-diff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in diff" ; \
@@ -5070,16 +6040,20 @@ installcheck-diff: \
installcheck) \
|| exit 1
+@endif diff
.PHONY: maybe-mostlyclean-diff mostlyclean-diff
maybe-mostlyclean-diff:
+@if diff
+maybe-mostlyclean-diff: mostlyclean-diff
mostlyclean-diff:
@[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in diff" ; \
@@ -5091,16 +6065,20 @@ mostlyclean-diff:
mostlyclean) \
|| exit 1
+@endif diff
.PHONY: maybe-clean-diff clean-diff
maybe-clean-diff:
+@if diff
+maybe-clean-diff: clean-diff
clean-diff:
@[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in diff" ; \
@@ -5112,16 +6090,20 @@ clean-diff:
clean) \
|| exit 1
+@endif diff
.PHONY: maybe-distclean-diff distclean-diff
maybe-distclean-diff:
+@if diff
+maybe-distclean-diff: distclean-diff
distclean-diff:
@[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in diff" ; \
@@ -5133,16 +6115,20 @@ distclean-diff:
distclean) \
|| exit 1
+@endif diff
.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
maybe-maintainer-clean-diff:
+@if diff
+maybe-maintainer-clean-diff: maintainer-clean-diff
maintainer-clean-diff:
@[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in diff" ; \
@@ -5154,30 +6140,19 @@ maintainer-clean-diff:
maintainer-clean) \
|| exit 1
+@endif diff
.PHONY: configure-dosutils maybe-configure-dosutils
maybe-configure-dosutils:
+@if dosutils
+maybe-configure-dosutils: configure-dosutils
configure-dosutils:
@test ! -f dosutils/Makefile || exit 0; \
[ -d dosutils ] || mkdir dosutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in dosutils; \
cd dosutils || exit 1; \
case $(srcdir) in \
@@ -5192,37 +6167,51 @@ configure-dosutils:
libsrcdir="$$s/dosutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif dosutils
.PHONY: all-dosutils maybe-all-dosutils
maybe-all-dosutils:
+@if dosutils
+maybe-all-dosutils: all-dosutils
all-dosutils: configure-dosutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif dosutils
.PHONY: check-dosutils maybe-check-dosutils
maybe-check-dosutils:
+@if dosutils
+maybe-check-dosutils: check-dosutils
check-dosutils:
+@endif dosutils
.PHONY: install-dosutils maybe-install-dosutils
maybe-install-dosutils:
+@if dosutils
+maybe-install-dosutils: install-dosutils
install-dosutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif dosutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-dosutils info-dosutils
maybe-info-dosutils:
+@if dosutils
+maybe-info-dosutils: info-dosutils
info-dosutils: \
configure-dosutils
@@ -5230,7 +6219,8 @@ info-dosutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in dosutils" ; \
@@ -5242,9 +6232,12 @@ info-dosutils: \
info) \
|| exit 1
+@endif dosutils
.PHONY: maybe-dvi-dosutils dvi-dosutils
maybe-dvi-dosutils:
+@if dosutils
+maybe-dvi-dosutils: dvi-dosutils
dvi-dosutils: \
configure-dosutils
@@ -5252,7 +6245,8 @@ dvi-dosutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in dosutils" ; \
@@ -5264,9 +6258,12 @@ dvi-dosutils: \
dvi) \
|| exit 1
+@endif dosutils
.PHONY: maybe-TAGS-dosutils TAGS-dosutils
maybe-TAGS-dosutils:
+@if dosutils
+maybe-TAGS-dosutils: TAGS-dosutils
TAGS-dosutils: \
configure-dosutils
@@ -5274,7 +6271,8 @@ TAGS-dosutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in dosutils" ; \
@@ -5286,9 +6284,12 @@ TAGS-dosutils: \
TAGS) \
|| exit 1
+@endif dosutils
.PHONY: maybe-install-info-dosutils install-info-dosutils
maybe-install-info-dosutils:
+@if dosutils
+maybe-install-info-dosutils: install-info-dosutils
install-info-dosutils: \
configure-dosutils \
@@ -5297,7 +6298,8 @@ install-info-dosutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in dosutils" ; \
@@ -5309,9 +6311,12 @@ install-info-dosutils: \
install-info) \
|| exit 1
+@endif dosutils
.PHONY: maybe-installcheck-dosutils installcheck-dosutils
maybe-installcheck-dosutils:
+@if dosutils
+maybe-installcheck-dosutils: installcheck-dosutils
installcheck-dosutils: \
configure-dosutils
@@ -5319,7 +6324,8 @@ installcheck-dosutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in dosutils" ; \
@@ -5331,16 +6337,20 @@ installcheck-dosutils: \
installcheck) \
|| exit 1
+@endif dosutils
.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
maybe-mostlyclean-dosutils:
+@if dosutils
+maybe-mostlyclean-dosutils: mostlyclean-dosutils
mostlyclean-dosutils:
@[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in dosutils" ; \
@@ -5352,16 +6362,20 @@ mostlyclean-dosutils:
mostlyclean) \
|| exit 1
+@endif dosutils
.PHONY: maybe-clean-dosutils clean-dosutils
maybe-clean-dosutils:
+@if dosutils
+maybe-clean-dosutils: clean-dosutils
clean-dosutils:
@[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in dosutils" ; \
@@ -5373,16 +6387,20 @@ clean-dosutils:
clean) \
|| exit 1
+@endif dosutils
.PHONY: maybe-distclean-dosutils distclean-dosutils
maybe-distclean-dosutils:
+@if dosutils
+maybe-distclean-dosutils: distclean-dosutils
distclean-dosutils:
@[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in dosutils" ; \
@@ -5394,16 +6412,20 @@ distclean-dosutils:
distclean) \
|| exit 1
+@endif dosutils
.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
maybe-maintainer-clean-dosutils:
+@if dosutils
+maybe-maintainer-clean-dosutils: maintainer-clean-dosutils
maintainer-clean-dosutils:
@[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in dosutils" ; \
@@ -5415,30 +6437,19 @@ maintainer-clean-dosutils:
maintainer-clean) \
|| exit 1
+@endif dosutils
.PHONY: configure-etc maybe-configure-etc
maybe-configure-etc:
+@if etc
+maybe-configure-etc: configure-etc
configure-etc:
@test ! -f etc/Makefile || exit 0; \
[ -d etc ] || mkdir etc; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in etc; \
cd etc || exit 1; \
case $(srcdir) in \
@@ -5453,41 +6464,56 @@ configure-etc:
libsrcdir="$$s/etc";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif etc
.PHONY: all-etc maybe-all-etc
maybe-all-etc:
+@if etc
+maybe-all-etc: all-etc
all-etc: configure-etc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif etc
.PHONY: check-etc maybe-check-etc
maybe-check-etc:
+@if etc
+maybe-check-etc: check-etc
check-etc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif etc
.PHONY: install-etc maybe-install-etc
maybe-install-etc:
+@if etc
+maybe-install-etc: install-etc
install-etc: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif etc
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-etc info-etc
maybe-info-etc:
+@if etc
+maybe-info-etc: info-etc
info-etc: \
configure-etc
@@ -5495,7 +6521,8 @@ info-etc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in etc" ; \
@@ -5507,9 +6534,12 @@ info-etc: \
info) \
|| exit 1
+@endif etc
.PHONY: maybe-dvi-etc dvi-etc
maybe-dvi-etc:
+@if etc
+maybe-dvi-etc: dvi-etc
dvi-etc: \
configure-etc
@@ -5517,7 +6547,8 @@ dvi-etc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in etc" ; \
@@ -5529,9 +6560,12 @@ dvi-etc: \
dvi) \
|| exit 1
+@endif etc
.PHONY: maybe-TAGS-etc TAGS-etc
maybe-TAGS-etc:
+@if etc
+maybe-TAGS-etc: TAGS-etc
TAGS-etc: \
configure-etc
@@ -5539,7 +6573,8 @@ TAGS-etc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in etc" ; \
@@ -5551,9 +6586,12 @@ TAGS-etc: \
TAGS) \
|| exit 1
+@endif etc
.PHONY: maybe-install-info-etc install-info-etc
maybe-install-info-etc:
+@if etc
+maybe-install-info-etc: install-info-etc
install-info-etc: \
configure-etc \
@@ -5562,7 +6600,8 @@ install-info-etc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in etc" ; \
@@ -5574,9 +6613,12 @@ install-info-etc: \
install-info) \
|| exit 1
+@endif etc
.PHONY: maybe-installcheck-etc installcheck-etc
maybe-installcheck-etc:
+@if etc
+maybe-installcheck-etc: installcheck-etc
installcheck-etc: \
configure-etc
@@ -5584,7 +6626,8 @@ installcheck-etc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in etc" ; \
@@ -5596,16 +6639,20 @@ installcheck-etc: \
installcheck) \
|| exit 1
+@endif etc
.PHONY: maybe-mostlyclean-etc mostlyclean-etc
maybe-mostlyclean-etc:
+@if etc
+maybe-mostlyclean-etc: mostlyclean-etc
mostlyclean-etc:
@[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in etc" ; \
@@ -5617,16 +6664,20 @@ mostlyclean-etc:
mostlyclean) \
|| exit 1
+@endif etc
.PHONY: maybe-clean-etc clean-etc
maybe-clean-etc:
+@if etc
+maybe-clean-etc: clean-etc
clean-etc:
@[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in etc" ; \
@@ -5638,16 +6689,20 @@ clean-etc:
clean) \
|| exit 1
+@endif etc
.PHONY: maybe-distclean-etc distclean-etc
maybe-distclean-etc:
+@if etc
+maybe-distclean-etc: distclean-etc
distclean-etc:
@[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in etc" ; \
@@ -5659,16 +6714,20 @@ distclean-etc:
distclean) \
|| exit 1
+@endif etc
.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc
maybe-maintainer-clean-etc:
+@if etc
+maybe-maintainer-clean-etc: maintainer-clean-etc
maintainer-clean-etc:
@[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in etc" ; \
@@ -5680,30 +6739,19 @@ maintainer-clean-etc:
maintainer-clean) \
|| exit 1
+@endif etc
.PHONY: configure-fastjar maybe-configure-fastjar
maybe-configure-fastjar:
+@if fastjar
+maybe-configure-fastjar: configure-fastjar
configure-fastjar:
@test ! -f fastjar/Makefile || exit 0; \
[ -d fastjar ] || mkdir fastjar; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in fastjar; \
cd fastjar || exit 1; \
case $(srcdir) in \
@@ -5718,19 +6766,26 @@ configure-fastjar:
libsrcdir="$$s/fastjar";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif fastjar
.PHONY: all-fastjar maybe-all-fastjar
maybe-all-fastjar:
+@if fastjar
+maybe-all-fastjar: all-fastjar
all-fastjar: configure-fastjar
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif fastjar
.PHONY: check-fastjar maybe-check-fastjar
maybe-check-fastjar:
+@if fastjar
+maybe-check-fastjar: check-fastjar
# This module is only tested in a native toolchain.
check-fastjar:
@@ -5738,24 +6793,32 @@ check-fastjar:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(HOST_EXPORTS) \
+ (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
+@endif fastjar
.PHONY: install-fastjar maybe-install-fastjar
maybe-install-fastjar:
+@if fastjar
+maybe-install-fastjar: install-fastjar
install-fastjar: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif fastjar
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-fastjar info-fastjar
maybe-info-fastjar:
+@if fastjar
+maybe-info-fastjar: info-fastjar
info-fastjar: \
configure-fastjar
@@ -5763,7 +6826,8 @@ info-fastjar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in fastjar" ; \
@@ -5775,9 +6839,12 @@ info-fastjar: \
info) \
|| exit 1
+@endif fastjar
.PHONY: maybe-dvi-fastjar dvi-fastjar
maybe-dvi-fastjar:
+@if fastjar
+maybe-dvi-fastjar: dvi-fastjar
dvi-fastjar: \
configure-fastjar
@@ -5785,7 +6852,8 @@ dvi-fastjar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in fastjar" ; \
@@ -5797,9 +6865,12 @@ dvi-fastjar: \
dvi) \
|| exit 1
+@endif fastjar
.PHONY: maybe-TAGS-fastjar TAGS-fastjar
maybe-TAGS-fastjar:
+@if fastjar
+maybe-TAGS-fastjar: TAGS-fastjar
TAGS-fastjar: \
configure-fastjar
@@ -5807,7 +6878,8 @@ TAGS-fastjar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in fastjar" ; \
@@ -5819,9 +6891,12 @@ TAGS-fastjar: \
TAGS) \
|| exit 1
+@endif fastjar
.PHONY: maybe-install-info-fastjar install-info-fastjar
maybe-install-info-fastjar:
+@if fastjar
+maybe-install-info-fastjar: install-info-fastjar
install-info-fastjar: \
configure-fastjar \
@@ -5830,7 +6905,8 @@ install-info-fastjar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in fastjar" ; \
@@ -5842,9 +6918,12 @@ install-info-fastjar: \
install-info) \
|| exit 1
+@endif fastjar
.PHONY: maybe-installcheck-fastjar installcheck-fastjar
maybe-installcheck-fastjar:
+@if fastjar
+maybe-installcheck-fastjar: installcheck-fastjar
installcheck-fastjar: \
configure-fastjar
@@ -5852,7 +6931,8 @@ installcheck-fastjar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in fastjar" ; \
@@ -5864,16 +6944,20 @@ installcheck-fastjar: \
installcheck) \
|| exit 1
+@endif fastjar
.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar
maybe-mostlyclean-fastjar:
+@if fastjar
+maybe-mostlyclean-fastjar: mostlyclean-fastjar
mostlyclean-fastjar:
@[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in fastjar" ; \
@@ -5885,16 +6969,20 @@ mostlyclean-fastjar:
mostlyclean) \
|| exit 1
+@endif fastjar
.PHONY: maybe-clean-fastjar clean-fastjar
maybe-clean-fastjar:
+@if fastjar
+maybe-clean-fastjar: clean-fastjar
clean-fastjar:
@[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in fastjar" ; \
@@ -5906,16 +6994,20 @@ clean-fastjar:
clean) \
|| exit 1
+@endif fastjar
.PHONY: maybe-distclean-fastjar distclean-fastjar
maybe-distclean-fastjar:
+@if fastjar
+maybe-distclean-fastjar: distclean-fastjar
distclean-fastjar:
@[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in fastjar" ; \
@@ -5927,16 +7019,20 @@ distclean-fastjar:
distclean) \
|| exit 1
+@endif fastjar
.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar
maybe-maintainer-clean-fastjar:
+@if fastjar
+maybe-maintainer-clean-fastjar: maintainer-clean-fastjar
maintainer-clean-fastjar:
@[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in fastjar" ; \
@@ -5948,30 +7044,19 @@ maintainer-clean-fastjar:
maintainer-clean) \
|| exit 1
+@endif fastjar
.PHONY: configure-fileutils maybe-configure-fileutils
maybe-configure-fileutils:
+@if fileutils
+maybe-configure-fileutils: configure-fileutils
configure-fileutils:
@test ! -f fileutils/Makefile || exit 0; \
[ -d fileutils ] || mkdir fileutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in fileutils; \
cd fileutils || exit 1; \
case $(srcdir) in \
@@ -5986,41 +7071,56 @@ configure-fileutils:
libsrcdir="$$s/fileutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif fileutils
.PHONY: all-fileutils maybe-all-fileutils
maybe-all-fileutils:
+@if fileutils
+maybe-all-fileutils: all-fileutils
all-fileutils: configure-fileutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif fileutils
.PHONY: check-fileutils maybe-check-fileutils
maybe-check-fileutils:
+@if fileutils
+maybe-check-fileutils: check-fileutils
check-fileutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif fileutils
.PHONY: install-fileutils maybe-install-fileutils
maybe-install-fileutils:
+@if fileutils
+maybe-install-fileutils: install-fileutils
install-fileutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif fileutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-fileutils info-fileutils
maybe-info-fileutils:
+@if fileutils
+maybe-info-fileutils: info-fileutils
info-fileutils: \
configure-fileutils
@@ -6028,7 +7128,8 @@ info-fileutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in fileutils" ; \
@@ -6040,9 +7141,12 @@ info-fileutils: \
info) \
|| exit 1
+@endif fileutils
.PHONY: maybe-dvi-fileutils dvi-fileutils
maybe-dvi-fileutils:
+@if fileutils
+maybe-dvi-fileutils: dvi-fileutils
dvi-fileutils: \
configure-fileutils
@@ -6050,7 +7154,8 @@ dvi-fileutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in fileutils" ; \
@@ -6062,9 +7167,12 @@ dvi-fileutils: \
dvi) \
|| exit 1
+@endif fileutils
.PHONY: maybe-TAGS-fileutils TAGS-fileutils
maybe-TAGS-fileutils:
+@if fileutils
+maybe-TAGS-fileutils: TAGS-fileutils
TAGS-fileutils: \
configure-fileutils
@@ -6072,7 +7180,8 @@ TAGS-fileutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in fileutils" ; \
@@ -6084,9 +7193,12 @@ TAGS-fileutils: \
TAGS) \
|| exit 1
+@endif fileutils
.PHONY: maybe-install-info-fileutils install-info-fileutils
maybe-install-info-fileutils:
+@if fileutils
+maybe-install-info-fileutils: install-info-fileutils
install-info-fileutils: \
configure-fileutils \
@@ -6095,7 +7207,8 @@ install-info-fileutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in fileutils" ; \
@@ -6107,9 +7220,12 @@ install-info-fileutils: \
install-info) \
|| exit 1
+@endif fileutils
.PHONY: maybe-installcheck-fileutils installcheck-fileutils
maybe-installcheck-fileutils:
+@if fileutils
+maybe-installcheck-fileutils: installcheck-fileutils
installcheck-fileutils: \
configure-fileutils
@@ -6117,7 +7233,8 @@ installcheck-fileutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in fileutils" ; \
@@ -6129,16 +7246,20 @@ installcheck-fileutils: \
installcheck) \
|| exit 1
+@endif fileutils
.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
maybe-mostlyclean-fileutils:
+@if fileutils
+maybe-mostlyclean-fileutils: mostlyclean-fileutils
mostlyclean-fileutils:
@[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in fileutils" ; \
@@ -6150,16 +7271,20 @@ mostlyclean-fileutils:
mostlyclean) \
|| exit 1
+@endif fileutils
.PHONY: maybe-clean-fileutils clean-fileutils
maybe-clean-fileutils:
+@if fileutils
+maybe-clean-fileutils: clean-fileutils
clean-fileutils:
@[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in fileutils" ; \
@@ -6171,16 +7296,20 @@ clean-fileutils:
clean) \
|| exit 1
+@endif fileutils
.PHONY: maybe-distclean-fileutils distclean-fileutils
maybe-distclean-fileutils:
+@if fileutils
+maybe-distclean-fileutils: distclean-fileutils
distclean-fileutils:
@[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in fileutils" ; \
@@ -6192,16 +7321,20 @@ distclean-fileutils:
distclean) \
|| exit 1
+@endif fileutils
.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
maybe-maintainer-clean-fileutils:
+@if fileutils
+maybe-maintainer-clean-fileutils: maintainer-clean-fileutils
maintainer-clean-fileutils:
@[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in fileutils" ; \
@@ -6213,30 +7346,19 @@ maintainer-clean-fileutils:
maintainer-clean) \
|| exit 1
+@endif fileutils
.PHONY: configure-findutils maybe-configure-findutils
maybe-configure-findutils:
+@if findutils
+maybe-configure-findutils: configure-findutils
configure-findutils:
@test ! -f findutils/Makefile || exit 0; \
[ -d findutils ] || mkdir findutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in findutils; \
cd findutils || exit 1; \
case $(srcdir) in \
@@ -6251,41 +7373,56 @@ configure-findutils:
libsrcdir="$$s/findutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif findutils
.PHONY: all-findutils maybe-all-findutils
maybe-all-findutils:
+@if findutils
+maybe-all-findutils: all-findutils
all-findutils: configure-findutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif findutils
.PHONY: check-findutils maybe-check-findutils
maybe-check-findutils:
+@if findutils
+maybe-check-findutils: check-findutils
check-findutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif findutils
.PHONY: install-findutils maybe-install-findutils
maybe-install-findutils:
+@if findutils
+maybe-install-findutils: install-findutils
install-findutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif findutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-findutils info-findutils
maybe-info-findutils:
+@if findutils
+maybe-info-findutils: info-findutils
info-findutils: \
configure-findutils
@@ -6293,7 +7430,8 @@ info-findutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in findutils" ; \
@@ -6305,9 +7443,12 @@ info-findutils: \
info) \
|| exit 1
+@endif findutils
.PHONY: maybe-dvi-findutils dvi-findutils
maybe-dvi-findutils:
+@if findutils
+maybe-dvi-findutils: dvi-findutils
dvi-findutils: \
configure-findutils
@@ -6315,7 +7456,8 @@ dvi-findutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in findutils" ; \
@@ -6327,9 +7469,12 @@ dvi-findutils: \
dvi) \
|| exit 1
+@endif findutils
.PHONY: maybe-TAGS-findutils TAGS-findutils
maybe-TAGS-findutils:
+@if findutils
+maybe-TAGS-findutils: TAGS-findutils
TAGS-findutils: \
configure-findutils
@@ -6337,7 +7482,8 @@ TAGS-findutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in findutils" ; \
@@ -6349,9 +7495,12 @@ TAGS-findutils: \
TAGS) \
|| exit 1
+@endif findutils
.PHONY: maybe-install-info-findutils install-info-findutils
maybe-install-info-findutils:
+@if findutils
+maybe-install-info-findutils: install-info-findutils
install-info-findutils: \
configure-findutils \
@@ -6360,7 +7509,8 @@ install-info-findutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in findutils" ; \
@@ -6372,9 +7522,12 @@ install-info-findutils: \
install-info) \
|| exit 1
+@endif findutils
.PHONY: maybe-installcheck-findutils installcheck-findutils
maybe-installcheck-findutils:
+@if findutils
+maybe-installcheck-findutils: installcheck-findutils
installcheck-findutils: \
configure-findutils
@@ -6382,7 +7535,8 @@ installcheck-findutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in findutils" ; \
@@ -6394,16 +7548,20 @@ installcheck-findutils: \
installcheck) \
|| exit 1
+@endif findutils
.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
maybe-mostlyclean-findutils:
+@if findutils
+maybe-mostlyclean-findutils: mostlyclean-findutils
mostlyclean-findutils:
@[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in findutils" ; \
@@ -6415,16 +7573,20 @@ mostlyclean-findutils:
mostlyclean) \
|| exit 1
+@endif findutils
.PHONY: maybe-clean-findutils clean-findutils
maybe-clean-findutils:
+@if findutils
+maybe-clean-findutils: clean-findutils
clean-findutils:
@[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in findutils" ; \
@@ -6436,16 +7598,20 @@ clean-findutils:
clean) \
|| exit 1
+@endif findutils
.PHONY: maybe-distclean-findutils distclean-findutils
maybe-distclean-findutils:
+@if findutils
+maybe-distclean-findutils: distclean-findutils
distclean-findutils:
@[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in findutils" ; \
@@ -6457,16 +7623,20 @@ distclean-findutils:
distclean) \
|| exit 1
+@endif findutils
.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
maybe-maintainer-clean-findutils:
+@if findutils
+maybe-maintainer-clean-findutils: maintainer-clean-findutils
maintainer-clean-findutils:
@[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in findutils" ; \
@@ -6478,30 +7648,19 @@ maintainer-clean-findutils:
maintainer-clean) \
|| exit 1
+@endif findutils
.PHONY: configure-find maybe-configure-find
maybe-configure-find:
+@if find
+maybe-configure-find: configure-find
configure-find:
@test ! -f find/Makefile || exit 0; \
[ -d find ] || mkdir find; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in find; \
cd find || exit 1; \
case $(srcdir) in \
@@ -6516,41 +7675,56 @@ configure-find:
libsrcdir="$$s/find";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif find
.PHONY: all-find maybe-all-find
maybe-all-find:
+@if find
+maybe-all-find: all-find
all-find: configure-find
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif find
.PHONY: check-find maybe-check-find
maybe-check-find:
+@if find
+maybe-check-find: check-find
check-find:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd find && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif find
.PHONY: install-find maybe-install-find
maybe-install-find:
+@if find
+maybe-install-find: install-find
install-find: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd find && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif find
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-find info-find
maybe-info-find:
+@if find
+maybe-info-find: info-find
info-find: \
configure-find
@@ -6558,7 +7732,8 @@ info-find: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in find" ; \
@@ -6570,9 +7745,12 @@ info-find: \
info) \
|| exit 1
+@endif find
.PHONY: maybe-dvi-find dvi-find
maybe-dvi-find:
+@if find
+maybe-dvi-find: dvi-find
dvi-find: \
configure-find
@@ -6580,7 +7758,8 @@ dvi-find: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in find" ; \
@@ -6592,9 +7771,12 @@ dvi-find: \
dvi) \
|| exit 1
+@endif find
.PHONY: maybe-TAGS-find TAGS-find
maybe-TAGS-find:
+@if find
+maybe-TAGS-find: TAGS-find
TAGS-find: \
configure-find
@@ -6602,7 +7784,8 @@ TAGS-find: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in find" ; \
@@ -6614,9 +7797,12 @@ TAGS-find: \
TAGS) \
|| exit 1
+@endif find
.PHONY: maybe-install-info-find install-info-find
maybe-install-info-find:
+@if find
+maybe-install-info-find: install-info-find
install-info-find: \
configure-find \
@@ -6625,7 +7811,8 @@ install-info-find: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in find" ; \
@@ -6637,9 +7824,12 @@ install-info-find: \
install-info) \
|| exit 1
+@endif find
.PHONY: maybe-installcheck-find installcheck-find
maybe-installcheck-find:
+@if find
+maybe-installcheck-find: installcheck-find
installcheck-find: \
configure-find
@@ -6647,7 +7837,8 @@ installcheck-find: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in find" ; \
@@ -6659,16 +7850,20 @@ installcheck-find: \
installcheck) \
|| exit 1
+@endif find
.PHONY: maybe-mostlyclean-find mostlyclean-find
maybe-mostlyclean-find:
+@if find
+maybe-mostlyclean-find: mostlyclean-find
mostlyclean-find:
@[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in find" ; \
@@ -6680,16 +7875,20 @@ mostlyclean-find:
mostlyclean) \
|| exit 1
+@endif find
.PHONY: maybe-clean-find clean-find
maybe-clean-find:
+@if find
+maybe-clean-find: clean-find
clean-find:
@[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in find" ; \
@@ -6701,16 +7900,20 @@ clean-find:
clean) \
|| exit 1
+@endif find
.PHONY: maybe-distclean-find distclean-find
maybe-distclean-find:
+@if find
+maybe-distclean-find: distclean-find
distclean-find:
@[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in find" ; \
@@ -6722,16 +7925,20 @@ distclean-find:
distclean) \
|| exit 1
+@endif find
.PHONY: maybe-maintainer-clean-find maintainer-clean-find
maybe-maintainer-clean-find:
+@if find
+maybe-maintainer-clean-find: maintainer-clean-find
maintainer-clean-find:
@[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in find" ; \
@@ -6743,30 +7950,19 @@ maintainer-clean-find:
maintainer-clean) \
|| exit 1
+@endif find
.PHONY: configure-flex maybe-configure-flex
maybe-configure-flex:
+@if flex
+maybe-configure-flex: configure-flex
configure-flex:
@test ! -f flex/Makefile || exit 0; \
[ -d flex ] || mkdir flex; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in flex; \
cd flex || exit 1; \
case $(srcdir) in \
@@ -6781,19 +7977,26 @@ configure-flex:
libsrcdir="$$s/flex";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif flex
.PHONY: all-flex maybe-all-flex
maybe-all-flex:
+@if flex
+maybe-all-flex: all-flex
all-flex: configure-flex
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif flex
.PHONY: check-flex maybe-check-flex
maybe-check-flex:
+@if flex
+maybe-check-flex: check-flex
# This module is only tested in a native toolchain.
check-flex:
@@ -6801,24 +8004,32 @@ check-flex:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(HOST_EXPORTS) \
+ (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
+@endif flex
.PHONY: install-flex maybe-install-flex
maybe-install-flex:
+@if flex
+maybe-install-flex: install-flex
install-flex: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif flex
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-flex info-flex
maybe-info-flex:
+@if flex
+maybe-info-flex: info-flex
info-flex: \
configure-flex
@@ -6826,7 +8037,8 @@ info-flex: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in flex" ; \
@@ -6838,9 +8050,12 @@ info-flex: \
info) \
|| exit 1
+@endif flex
.PHONY: maybe-dvi-flex dvi-flex
maybe-dvi-flex:
+@if flex
+maybe-dvi-flex: dvi-flex
dvi-flex: \
configure-flex
@@ -6848,7 +8063,8 @@ dvi-flex: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in flex" ; \
@@ -6860,9 +8076,12 @@ dvi-flex: \
dvi) \
|| exit 1
+@endif flex
.PHONY: maybe-TAGS-flex TAGS-flex
maybe-TAGS-flex:
+@if flex
+maybe-TAGS-flex: TAGS-flex
TAGS-flex: \
configure-flex
@@ -6870,7 +8089,8 @@ TAGS-flex: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in flex" ; \
@@ -6882,9 +8102,12 @@ TAGS-flex: \
TAGS) \
|| exit 1
+@endif flex
.PHONY: maybe-install-info-flex install-info-flex
maybe-install-info-flex:
+@if flex
+maybe-install-info-flex: install-info-flex
install-info-flex: \
configure-flex \
@@ -6893,7 +8116,8 @@ install-info-flex: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in flex" ; \
@@ -6905,9 +8129,12 @@ install-info-flex: \
install-info) \
|| exit 1
+@endif flex
.PHONY: maybe-installcheck-flex installcheck-flex
maybe-installcheck-flex:
+@if flex
+maybe-installcheck-flex: installcheck-flex
installcheck-flex: \
configure-flex
@@ -6915,7 +8142,8 @@ installcheck-flex: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in flex" ; \
@@ -6927,16 +8155,20 @@ installcheck-flex: \
installcheck) \
|| exit 1
+@endif flex
.PHONY: maybe-mostlyclean-flex mostlyclean-flex
maybe-mostlyclean-flex:
+@if flex
+maybe-mostlyclean-flex: mostlyclean-flex
mostlyclean-flex:
@[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in flex" ; \
@@ -6948,16 +8180,20 @@ mostlyclean-flex:
mostlyclean) \
|| exit 1
+@endif flex
.PHONY: maybe-clean-flex clean-flex
maybe-clean-flex:
+@if flex
+maybe-clean-flex: clean-flex
clean-flex:
@[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in flex" ; \
@@ -6969,16 +8205,20 @@ clean-flex:
clean) \
|| exit 1
+@endif flex
.PHONY: maybe-distclean-flex distclean-flex
maybe-distclean-flex:
+@if flex
+maybe-distclean-flex: distclean-flex
distclean-flex:
@[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in flex" ; \
@@ -6990,16 +8230,20 @@ distclean-flex:
distclean) \
|| exit 1
+@endif flex
.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex
maybe-maintainer-clean-flex:
+@if flex
+maybe-maintainer-clean-flex: maintainer-clean-flex
maintainer-clean-flex:
@[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in flex" ; \
@@ -7011,30 +8255,20 @@ maintainer-clean-flex:
maintainer-clean) \
|| exit 1
+@endif flex
.PHONY: configure-gas maybe-configure-gas
maybe-configure-gas:
+@if gas
+maybe-configure-gas: configure-gas
configure-gas:
- @test ! -f gas/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f gas/Makefile || exit 0; \
[ -d gas ] || mkdir gas; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gas; \
cd gas || exit 1; \
case $(srcdir) in \
@@ -7049,41 +8283,57 @@ configure-gas:
libsrcdir="$$s/gas";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gas
.PHONY: all-gas maybe-all-gas
maybe-all-gas:
+@if gas
+maybe-all-gas: all-gas
all-gas: configure-gas
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gas
.PHONY: check-gas maybe-check-gas
maybe-check-gas:
+@if gas
+maybe-check-gas: check-gas
check-gas:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gas
.PHONY: install-gas maybe-install-gas
maybe-install-gas:
+@if gas
+maybe-install-gas: install-gas
install-gas: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gas
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gas info-gas
maybe-info-gas:
+@if gas
+maybe-info-gas: info-gas
info-gas: \
configure-gas
@@ -7091,7 +8341,8 @@ info-gas: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gas" ; \
@@ -7103,9 +8354,12 @@ info-gas: \
info) \
|| exit 1
+@endif gas
.PHONY: maybe-dvi-gas dvi-gas
maybe-dvi-gas:
+@if gas
+maybe-dvi-gas: dvi-gas
dvi-gas: \
configure-gas
@@ -7113,7 +8367,8 @@ dvi-gas: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gas" ; \
@@ -7125,9 +8380,12 @@ dvi-gas: \
dvi) \
|| exit 1
+@endif gas
.PHONY: maybe-TAGS-gas TAGS-gas
maybe-TAGS-gas:
+@if gas
+maybe-TAGS-gas: TAGS-gas
TAGS-gas: \
configure-gas
@@ -7135,7 +8393,8 @@ TAGS-gas: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gas" ; \
@@ -7147,9 +8406,12 @@ TAGS-gas: \
TAGS) \
|| exit 1
+@endif gas
.PHONY: maybe-install-info-gas install-info-gas
maybe-install-info-gas:
+@if gas
+maybe-install-info-gas: install-info-gas
install-info-gas: \
configure-gas \
@@ -7158,7 +8420,8 @@ install-info-gas: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gas" ; \
@@ -7170,9 +8433,12 @@ install-info-gas: \
install-info) \
|| exit 1
+@endif gas
.PHONY: maybe-installcheck-gas installcheck-gas
maybe-installcheck-gas:
+@if gas
+maybe-installcheck-gas: installcheck-gas
installcheck-gas: \
configure-gas
@@ -7180,7 +8446,8 @@ installcheck-gas: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gas" ; \
@@ -7192,16 +8459,20 @@ installcheck-gas: \
installcheck) \
|| exit 1
+@endif gas
.PHONY: maybe-mostlyclean-gas mostlyclean-gas
maybe-mostlyclean-gas:
+@if gas
+maybe-mostlyclean-gas: mostlyclean-gas
mostlyclean-gas:
@[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gas" ; \
@@ -7213,16 +8484,20 @@ mostlyclean-gas:
mostlyclean) \
|| exit 1
+@endif gas
.PHONY: maybe-clean-gas clean-gas
maybe-clean-gas:
+@if gas
+maybe-clean-gas: clean-gas
clean-gas:
@[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gas" ; \
@@ -7234,16 +8509,20 @@ clean-gas:
clean) \
|| exit 1
+@endif gas
.PHONY: maybe-distclean-gas distclean-gas
maybe-distclean-gas:
+@if gas
+maybe-distclean-gas: distclean-gas
distclean-gas:
@[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gas" ; \
@@ -7255,16 +8534,20 @@ distclean-gas:
distclean) \
|| exit 1
+@endif gas
.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas
maybe-maintainer-clean-gas:
+@if gas
+maybe-maintainer-clean-gas: maintainer-clean-gas
maintainer-clean-gas:
@[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gas" ; \
@@ -7276,30 +8559,324 @@ maintainer-clean-gas:
maintainer-clean) \
|| exit 1
+@endif gas
+
+
+.PHONY: configure-gcc maybe-configure-gcc
+maybe-configure-gcc:
+@if gcc
+maybe-configure-gcc: configure-gcc
+configure-gcc:
+ @test -f stage_last && exit 0; \
+ test ! -f gcc/Makefile || exit 0; \
+ [ -d gcc ] || mkdir gcc; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring in gcc; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gcc
+
+.PHONY: all-gcc maybe-all-gcc
+maybe-all-gcc:
+@if gcc
+maybe-all-gcc: all-gcc
+all-gcc: configure-gcc
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd gcc && $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ `if [ -f gcc/stage_last ]; then echo quickstrap ; else echo all; fi` )
+@endif gcc
+
+.PHONY: check-gcc maybe-check-gcc
+maybe-check-gcc:
+@if gcc
+maybe-check-gcc: check-gcc
+
+check-gcc:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd gcc && $(MAKE) $(FLAGS_TO_PASS)$(EXTRA_GCC_FLAGS) check)
+
+@endif gcc
+
+.PHONY: install-gcc maybe-install-gcc
+maybe-install-gcc:
+@if gcc
+maybe-install-gcc: install-gcc
+
+install-gcc: installdirs
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd gcc && $(MAKE) $(FLAGS_TO_PASS)$(EXTRA_GCC_FLAGS) install)
+
+@endif gcc
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gcc info-gcc
+maybe-info-gcc:
+@if gcc
+maybe-info-gcc: info-gcc
+
+info-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-dvi-gcc dvi-gcc
+maybe-dvi-gcc:
+@if gcc
+maybe-dvi-gcc: dvi-gcc
+
+dvi-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-TAGS-gcc TAGS-gcc
+maybe-TAGS-gcc:
+@if gcc
+maybe-TAGS-gcc: TAGS-gcc
+
+TAGS-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-install-info-gcc install-info-gcc
+maybe-install-info-gcc:
+@if gcc
+maybe-install-info-gcc: install-info-gcc
+
+install-info-gcc: \
+ configure-gcc \
+ info-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-installcheck-gcc installcheck-gcc
+maybe-installcheck-gcc:
+@if gcc
+maybe-installcheck-gcc: installcheck-gcc
+
+installcheck-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
+maybe-mostlyclean-gcc:
+@if gcc
+maybe-mostlyclean-gcc: mostlyclean-gcc
+
+mostlyclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-clean-gcc clean-gcc
+maybe-clean-gcc:
+@if gcc
+maybe-clean-gcc: clean-gcc
+
+clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-distclean-gcc distclean-gcc
+maybe-distclean-gcc:
+@if gcc
+maybe-distclean-gcc: distclean-gcc
+
+distclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
+
+.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
+maybe-maintainer-clean-gcc:
+@if gcc
+maybe-maintainer-clean-gcc: maintainer-clean-gcc
+
+maintainer-clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(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
+
+@endif gcc
.PHONY: configure-gawk maybe-configure-gawk
maybe-configure-gawk:
+@if gawk
+maybe-configure-gawk: configure-gawk
configure-gawk:
@test ! -f gawk/Makefile || exit 0; \
[ -d gawk ] || mkdir gawk; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gawk; \
cd gawk || exit 1; \
case $(srcdir) in \
@@ -7314,41 +8891,56 @@ configure-gawk:
libsrcdir="$$s/gawk";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gawk
.PHONY: all-gawk maybe-all-gawk
maybe-all-gawk:
+@if gawk
+maybe-all-gawk: all-gawk
all-gawk: configure-gawk
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gawk
.PHONY: check-gawk maybe-check-gawk
maybe-check-gawk:
+@if gawk
+maybe-check-gawk: check-gawk
check-gawk:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gawk
.PHONY: install-gawk maybe-install-gawk
maybe-install-gawk:
+@if gawk
+maybe-install-gawk: install-gawk
install-gawk: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gawk
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gawk info-gawk
maybe-info-gawk:
+@if gawk
+maybe-info-gawk: info-gawk
info-gawk: \
configure-gawk
@@ -7356,7 +8948,8 @@ info-gawk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gawk" ; \
@@ -7368,9 +8961,12 @@ info-gawk: \
info) \
|| exit 1
+@endif gawk
.PHONY: maybe-dvi-gawk dvi-gawk
maybe-dvi-gawk:
+@if gawk
+maybe-dvi-gawk: dvi-gawk
dvi-gawk: \
configure-gawk
@@ -7378,7 +8974,8 @@ dvi-gawk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gawk" ; \
@@ -7390,9 +8987,12 @@ dvi-gawk: \
dvi) \
|| exit 1
+@endif gawk
.PHONY: maybe-TAGS-gawk TAGS-gawk
maybe-TAGS-gawk:
+@if gawk
+maybe-TAGS-gawk: TAGS-gawk
TAGS-gawk: \
configure-gawk
@@ -7400,7 +9000,8 @@ TAGS-gawk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gawk" ; \
@@ -7412,9 +9013,12 @@ TAGS-gawk: \
TAGS) \
|| exit 1
+@endif gawk
.PHONY: maybe-install-info-gawk install-info-gawk
maybe-install-info-gawk:
+@if gawk
+maybe-install-info-gawk: install-info-gawk
install-info-gawk: \
configure-gawk \
@@ -7423,7 +9027,8 @@ install-info-gawk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gawk" ; \
@@ -7435,9 +9040,12 @@ install-info-gawk: \
install-info) \
|| exit 1
+@endif gawk
.PHONY: maybe-installcheck-gawk installcheck-gawk
maybe-installcheck-gawk:
+@if gawk
+maybe-installcheck-gawk: installcheck-gawk
installcheck-gawk: \
configure-gawk
@@ -7445,7 +9053,8 @@ installcheck-gawk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gawk" ; \
@@ -7457,16 +9066,20 @@ installcheck-gawk: \
installcheck) \
|| exit 1
+@endif gawk
.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
maybe-mostlyclean-gawk:
+@if gawk
+maybe-mostlyclean-gawk: mostlyclean-gawk
mostlyclean-gawk:
@[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gawk" ; \
@@ -7478,16 +9091,20 @@ mostlyclean-gawk:
mostlyclean) \
|| exit 1
+@endif gawk
.PHONY: maybe-clean-gawk clean-gawk
maybe-clean-gawk:
+@if gawk
+maybe-clean-gawk: clean-gawk
clean-gawk:
@[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gawk" ; \
@@ -7499,16 +9116,20 @@ clean-gawk:
clean) \
|| exit 1
+@endif gawk
.PHONY: maybe-distclean-gawk distclean-gawk
maybe-distclean-gawk:
+@if gawk
+maybe-distclean-gawk: distclean-gawk
distclean-gawk:
@[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gawk" ; \
@@ -7520,16 +9141,20 @@ distclean-gawk:
distclean) \
|| exit 1
+@endif gawk
.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
maybe-maintainer-clean-gawk:
+@if gawk
+maybe-maintainer-clean-gawk: maintainer-clean-gawk
maintainer-clean-gawk:
@[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gawk" ; \
@@ -7541,30 +9166,19 @@ maintainer-clean-gawk:
maintainer-clean) \
|| exit 1
+@endif gawk
.PHONY: configure-gettext maybe-configure-gettext
maybe-configure-gettext:
+@if gettext
+maybe-configure-gettext: configure-gettext
configure-gettext:
@test ! -f gettext/Makefile || exit 0; \
[ -d gettext ] || mkdir gettext; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gettext; \
cd gettext || exit 1; \
case $(srcdir) in \
@@ -7579,41 +9193,56 @@ configure-gettext:
libsrcdir="$$s/gettext";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gettext
.PHONY: all-gettext maybe-all-gettext
maybe-all-gettext:
+@if gettext
+maybe-all-gettext: all-gettext
all-gettext: configure-gettext
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gettext
.PHONY: check-gettext maybe-check-gettext
maybe-check-gettext:
+@if gettext
+maybe-check-gettext: check-gettext
check-gettext:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gettext
.PHONY: install-gettext maybe-install-gettext
maybe-install-gettext:
+@if gettext
+maybe-install-gettext: install-gettext
install-gettext: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gettext
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gettext info-gettext
maybe-info-gettext:
+@if gettext
+maybe-info-gettext: info-gettext
info-gettext: \
configure-gettext
@@ -7621,7 +9250,8 @@ info-gettext: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gettext" ; \
@@ -7633,9 +9263,12 @@ info-gettext: \
info) \
|| exit 1
+@endif gettext
.PHONY: maybe-dvi-gettext dvi-gettext
maybe-dvi-gettext:
+@if gettext
+maybe-dvi-gettext: dvi-gettext
dvi-gettext: \
configure-gettext
@@ -7643,7 +9276,8 @@ dvi-gettext: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gettext" ; \
@@ -7655,9 +9289,12 @@ dvi-gettext: \
dvi) \
|| exit 1
+@endif gettext
.PHONY: maybe-TAGS-gettext TAGS-gettext
maybe-TAGS-gettext:
+@if gettext
+maybe-TAGS-gettext: TAGS-gettext
TAGS-gettext: \
configure-gettext
@@ -7665,7 +9302,8 @@ TAGS-gettext: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gettext" ; \
@@ -7677,9 +9315,12 @@ TAGS-gettext: \
TAGS) \
|| exit 1
+@endif gettext
.PHONY: maybe-install-info-gettext install-info-gettext
maybe-install-info-gettext:
+@if gettext
+maybe-install-info-gettext: install-info-gettext
install-info-gettext: \
configure-gettext \
@@ -7688,7 +9329,8 @@ install-info-gettext: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gettext" ; \
@@ -7700,9 +9342,12 @@ install-info-gettext: \
install-info) \
|| exit 1
+@endif gettext
.PHONY: maybe-installcheck-gettext installcheck-gettext
maybe-installcheck-gettext:
+@if gettext
+maybe-installcheck-gettext: installcheck-gettext
installcheck-gettext: \
configure-gettext
@@ -7710,7 +9355,8 @@ installcheck-gettext: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gettext" ; \
@@ -7722,16 +9368,20 @@ installcheck-gettext: \
installcheck) \
|| exit 1
+@endif gettext
.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
maybe-mostlyclean-gettext:
+@if gettext
+maybe-mostlyclean-gettext: mostlyclean-gettext
mostlyclean-gettext:
@[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gettext" ; \
@@ -7743,16 +9393,20 @@ mostlyclean-gettext:
mostlyclean) \
|| exit 1
+@endif gettext
.PHONY: maybe-clean-gettext clean-gettext
maybe-clean-gettext:
+@if gettext
+maybe-clean-gettext: clean-gettext
clean-gettext:
@[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gettext" ; \
@@ -7764,16 +9418,20 @@ clean-gettext:
clean) \
|| exit 1
+@endif gettext
.PHONY: maybe-distclean-gettext distclean-gettext
maybe-distclean-gettext:
+@if gettext
+maybe-distclean-gettext: distclean-gettext
distclean-gettext:
@[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gettext" ; \
@@ -7785,16 +9443,20 @@ distclean-gettext:
distclean) \
|| exit 1
+@endif gettext
.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
maybe-maintainer-clean-gettext:
+@if gettext
+maybe-maintainer-clean-gettext: maintainer-clean-gettext
maintainer-clean-gettext:
@[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gettext" ; \
@@ -7806,30 +9468,19 @@ maintainer-clean-gettext:
maintainer-clean) \
|| exit 1
+@endif gettext
.PHONY: configure-gnuserv maybe-configure-gnuserv
maybe-configure-gnuserv:
+@if gnuserv
+maybe-configure-gnuserv: configure-gnuserv
configure-gnuserv:
@test ! -f gnuserv/Makefile || exit 0; \
[ -d gnuserv ] || mkdir gnuserv; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gnuserv; \
cd gnuserv || exit 1; \
case $(srcdir) in \
@@ -7844,41 +9495,56 @@ configure-gnuserv:
libsrcdir="$$s/gnuserv";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gnuserv
.PHONY: all-gnuserv maybe-all-gnuserv
maybe-all-gnuserv:
+@if gnuserv
+maybe-all-gnuserv: all-gnuserv
all-gnuserv: configure-gnuserv
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gnuserv
.PHONY: check-gnuserv maybe-check-gnuserv
maybe-check-gnuserv:
+@if gnuserv
+maybe-check-gnuserv: check-gnuserv
check-gnuserv:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gnuserv
.PHONY: install-gnuserv maybe-install-gnuserv
maybe-install-gnuserv:
+@if gnuserv
+maybe-install-gnuserv: install-gnuserv
install-gnuserv: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gnuserv
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gnuserv info-gnuserv
maybe-info-gnuserv:
+@if gnuserv
+maybe-info-gnuserv: info-gnuserv
info-gnuserv: \
configure-gnuserv
@@ -7886,7 +9552,8 @@ info-gnuserv: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gnuserv" ; \
@@ -7898,9 +9565,12 @@ info-gnuserv: \
info) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-dvi-gnuserv dvi-gnuserv
maybe-dvi-gnuserv:
+@if gnuserv
+maybe-dvi-gnuserv: dvi-gnuserv
dvi-gnuserv: \
configure-gnuserv
@@ -7908,7 +9578,8 @@ dvi-gnuserv: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gnuserv" ; \
@@ -7920,9 +9591,12 @@ dvi-gnuserv: \
dvi) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
maybe-TAGS-gnuserv:
+@if gnuserv
+maybe-TAGS-gnuserv: TAGS-gnuserv
TAGS-gnuserv: \
configure-gnuserv
@@ -7930,7 +9604,8 @@ TAGS-gnuserv: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gnuserv" ; \
@@ -7942,9 +9617,12 @@ TAGS-gnuserv: \
TAGS) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-install-info-gnuserv install-info-gnuserv
maybe-install-info-gnuserv:
+@if gnuserv
+maybe-install-info-gnuserv: install-info-gnuserv
install-info-gnuserv: \
configure-gnuserv \
@@ -7953,7 +9631,8 @@ install-info-gnuserv: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gnuserv" ; \
@@ -7965,9 +9644,12 @@ install-info-gnuserv: \
install-info) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
maybe-installcheck-gnuserv:
+@if gnuserv
+maybe-installcheck-gnuserv: installcheck-gnuserv
installcheck-gnuserv: \
configure-gnuserv
@@ -7975,7 +9657,8 @@ installcheck-gnuserv: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gnuserv" ; \
@@ -7987,16 +9670,20 @@ installcheck-gnuserv: \
installcheck) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
maybe-mostlyclean-gnuserv:
+@if gnuserv
+maybe-mostlyclean-gnuserv: mostlyclean-gnuserv
mostlyclean-gnuserv:
@[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gnuserv" ; \
@@ -8008,16 +9695,20 @@ mostlyclean-gnuserv:
mostlyclean) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-clean-gnuserv clean-gnuserv
maybe-clean-gnuserv:
+@if gnuserv
+maybe-clean-gnuserv: clean-gnuserv
clean-gnuserv:
@[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gnuserv" ; \
@@ -8029,16 +9720,20 @@ clean-gnuserv:
clean) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-distclean-gnuserv distclean-gnuserv
maybe-distclean-gnuserv:
+@if gnuserv
+maybe-distclean-gnuserv: distclean-gnuserv
distclean-gnuserv:
@[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gnuserv" ; \
@@ -8050,16 +9745,20 @@ distclean-gnuserv:
distclean) \
|| exit 1
+@endif gnuserv
.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
maybe-maintainer-clean-gnuserv:
+@if gnuserv
+maybe-maintainer-clean-gnuserv: maintainer-clean-gnuserv
maintainer-clean-gnuserv:
@[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gnuserv" ; \
@@ -8071,30 +9770,19 @@ maintainer-clean-gnuserv:
maintainer-clean) \
|| exit 1
+@endif gnuserv
.PHONY: configure-gprof maybe-configure-gprof
maybe-configure-gprof:
+@if gprof
+maybe-configure-gprof: configure-gprof
configure-gprof:
@test ! -f gprof/Makefile || exit 0; \
[ -d gprof ] || mkdir gprof; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gprof; \
cd gprof || exit 1; \
case $(srcdir) in \
@@ -8109,41 +9797,56 @@ configure-gprof:
libsrcdir="$$s/gprof";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gprof
.PHONY: all-gprof maybe-all-gprof
maybe-all-gprof:
+@if gprof
+maybe-all-gprof: all-gprof
all-gprof: configure-gprof
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gprof
.PHONY: check-gprof maybe-check-gprof
maybe-check-gprof:
+@if gprof
+maybe-check-gprof: check-gprof
check-gprof:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gprof
.PHONY: install-gprof maybe-install-gprof
maybe-install-gprof:
+@if gprof
+maybe-install-gprof: install-gprof
install-gprof: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gprof
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gprof info-gprof
maybe-info-gprof:
+@if gprof
+maybe-info-gprof: info-gprof
info-gprof: \
configure-gprof
@@ -8151,7 +9854,8 @@ info-gprof: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gprof" ; \
@@ -8163,9 +9867,12 @@ info-gprof: \
info) \
|| exit 1
+@endif gprof
.PHONY: maybe-dvi-gprof dvi-gprof
maybe-dvi-gprof:
+@if gprof
+maybe-dvi-gprof: dvi-gprof
dvi-gprof: \
configure-gprof
@@ -8173,7 +9880,8 @@ dvi-gprof: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gprof" ; \
@@ -8185,9 +9893,12 @@ dvi-gprof: \
dvi) \
|| exit 1
+@endif gprof
.PHONY: maybe-TAGS-gprof TAGS-gprof
maybe-TAGS-gprof:
+@if gprof
+maybe-TAGS-gprof: TAGS-gprof
TAGS-gprof: \
configure-gprof
@@ -8195,7 +9906,8 @@ TAGS-gprof: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gprof" ; \
@@ -8207,9 +9919,12 @@ TAGS-gprof: \
TAGS) \
|| exit 1
+@endif gprof
.PHONY: maybe-install-info-gprof install-info-gprof
maybe-install-info-gprof:
+@if gprof
+maybe-install-info-gprof: install-info-gprof
install-info-gprof: \
configure-gprof \
@@ -8218,7 +9933,8 @@ install-info-gprof: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gprof" ; \
@@ -8230,9 +9946,12 @@ install-info-gprof: \
install-info) \
|| exit 1
+@endif gprof
.PHONY: maybe-installcheck-gprof installcheck-gprof
maybe-installcheck-gprof:
+@if gprof
+maybe-installcheck-gprof: installcheck-gprof
installcheck-gprof: \
configure-gprof
@@ -8240,7 +9959,8 @@ installcheck-gprof: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gprof" ; \
@@ -8252,16 +9972,20 @@ installcheck-gprof: \
installcheck) \
|| exit 1
+@endif gprof
.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof
maybe-mostlyclean-gprof:
+@if gprof
+maybe-mostlyclean-gprof: mostlyclean-gprof
mostlyclean-gprof:
@[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gprof" ; \
@@ -8273,16 +9997,20 @@ mostlyclean-gprof:
mostlyclean) \
|| exit 1
+@endif gprof
.PHONY: maybe-clean-gprof clean-gprof
maybe-clean-gprof:
+@if gprof
+maybe-clean-gprof: clean-gprof
clean-gprof:
@[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gprof" ; \
@@ -8294,16 +10022,20 @@ clean-gprof:
clean) \
|| exit 1
+@endif gprof
.PHONY: maybe-distclean-gprof distclean-gprof
maybe-distclean-gprof:
+@if gprof
+maybe-distclean-gprof: distclean-gprof
distclean-gprof:
@[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gprof" ; \
@@ -8315,16 +10047,20 @@ distclean-gprof:
distclean) \
|| exit 1
+@endif gprof
.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof
maybe-maintainer-clean-gprof:
+@if gprof
+maybe-maintainer-clean-gprof: maintainer-clean-gprof
maintainer-clean-gprof:
@[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gprof" ; \
@@ -8336,30 +10072,19 @@ maintainer-clean-gprof:
maintainer-clean) \
|| exit 1
+@endif gprof
.PHONY: configure-gzip maybe-configure-gzip
maybe-configure-gzip:
+@if gzip
+maybe-configure-gzip: configure-gzip
configure-gzip:
@test ! -f gzip/Makefile || exit 0; \
[ -d gzip ] || mkdir gzip; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gzip; \
cd gzip || exit 1; \
case $(srcdir) in \
@@ -8374,41 +10099,56 @@ configure-gzip:
libsrcdir="$$s/gzip";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gzip
.PHONY: all-gzip maybe-all-gzip
maybe-all-gzip:
+@if gzip
+maybe-all-gzip: all-gzip
all-gzip: configure-gzip
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif gzip
.PHONY: check-gzip maybe-check-gzip
maybe-check-gzip:
+@if gzip
+maybe-check-gzip: check-gzip
check-gzip:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif gzip
.PHONY: install-gzip maybe-install-gzip
maybe-install-gzip:
+@if gzip
+maybe-install-gzip: install-gzip
install-gzip: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif gzip
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gzip info-gzip
maybe-info-gzip:
+@if gzip
+maybe-info-gzip: info-gzip
info-gzip: \
configure-gzip
@@ -8416,7 +10156,8 @@ info-gzip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gzip" ; \
@@ -8428,9 +10169,12 @@ info-gzip: \
info) \
|| exit 1
+@endif gzip
.PHONY: maybe-dvi-gzip dvi-gzip
maybe-dvi-gzip:
+@if gzip
+maybe-dvi-gzip: dvi-gzip
dvi-gzip: \
configure-gzip
@@ -8438,7 +10182,8 @@ dvi-gzip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gzip" ; \
@@ -8450,9 +10195,12 @@ dvi-gzip: \
dvi) \
|| exit 1
+@endif gzip
.PHONY: maybe-TAGS-gzip TAGS-gzip
maybe-TAGS-gzip:
+@if gzip
+maybe-TAGS-gzip: TAGS-gzip
TAGS-gzip: \
configure-gzip
@@ -8460,7 +10208,8 @@ TAGS-gzip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gzip" ; \
@@ -8472,9 +10221,12 @@ TAGS-gzip: \
TAGS) \
|| exit 1
+@endif gzip
.PHONY: maybe-install-info-gzip install-info-gzip
maybe-install-info-gzip:
+@if gzip
+maybe-install-info-gzip: install-info-gzip
install-info-gzip: \
configure-gzip \
@@ -8483,7 +10235,8 @@ install-info-gzip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gzip" ; \
@@ -8495,9 +10248,12 @@ install-info-gzip: \
install-info) \
|| exit 1
+@endif gzip
.PHONY: maybe-installcheck-gzip installcheck-gzip
maybe-installcheck-gzip:
+@if gzip
+maybe-installcheck-gzip: installcheck-gzip
installcheck-gzip: \
configure-gzip
@@ -8505,7 +10261,8 @@ installcheck-gzip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gzip" ; \
@@ -8517,16 +10274,20 @@ installcheck-gzip: \
installcheck) \
|| exit 1
+@endif gzip
.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
maybe-mostlyclean-gzip:
+@if gzip
+maybe-mostlyclean-gzip: mostlyclean-gzip
mostlyclean-gzip:
@[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gzip" ; \
@@ -8538,16 +10299,20 @@ mostlyclean-gzip:
mostlyclean) \
|| exit 1
+@endif gzip
.PHONY: maybe-clean-gzip clean-gzip
maybe-clean-gzip:
+@if gzip
+maybe-clean-gzip: clean-gzip
clean-gzip:
@[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gzip" ; \
@@ -8559,16 +10324,20 @@ clean-gzip:
clean) \
|| exit 1
+@endif gzip
.PHONY: maybe-distclean-gzip distclean-gzip
maybe-distclean-gzip:
+@if gzip
+maybe-distclean-gzip: distclean-gzip
distclean-gzip:
@[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gzip" ; \
@@ -8580,16 +10349,20 @@ distclean-gzip:
distclean) \
|| exit 1
+@endif gzip
.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
maybe-maintainer-clean-gzip:
+@if gzip
+maybe-maintainer-clean-gzip: maintainer-clean-gzip
maintainer-clean-gzip:
@[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gzip" ; \
@@ -8601,30 +10374,19 @@ maintainer-clean-gzip:
maintainer-clean) \
|| exit 1
+@endif gzip
.PHONY: configure-hello maybe-configure-hello
maybe-configure-hello:
+@if hello
+maybe-configure-hello: configure-hello
configure-hello:
@test ! -f hello/Makefile || exit 0; \
[ -d hello ] || mkdir hello; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in hello; \
cd hello || exit 1; \
case $(srcdir) in \
@@ -8639,41 +10401,56 @@ configure-hello:
libsrcdir="$$s/hello";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif hello
.PHONY: all-hello maybe-all-hello
maybe-all-hello:
+@if hello
+maybe-all-hello: all-hello
all-hello: configure-hello
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif hello
.PHONY: check-hello maybe-check-hello
maybe-check-hello:
+@if hello
+maybe-check-hello: check-hello
check-hello:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif hello
.PHONY: install-hello maybe-install-hello
maybe-install-hello:
+@if hello
+maybe-install-hello: install-hello
install-hello: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif hello
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-hello info-hello
maybe-info-hello:
+@if hello
+maybe-info-hello: info-hello
info-hello: \
configure-hello
@@ -8681,7 +10458,8 @@ info-hello: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in hello" ; \
@@ -8693,9 +10471,12 @@ info-hello: \
info) \
|| exit 1
+@endif hello
.PHONY: maybe-dvi-hello dvi-hello
maybe-dvi-hello:
+@if hello
+maybe-dvi-hello: dvi-hello
dvi-hello: \
configure-hello
@@ -8703,7 +10484,8 @@ dvi-hello: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in hello" ; \
@@ -8715,9 +10497,12 @@ dvi-hello: \
dvi) \
|| exit 1
+@endif hello
.PHONY: maybe-TAGS-hello TAGS-hello
maybe-TAGS-hello:
+@if hello
+maybe-TAGS-hello: TAGS-hello
TAGS-hello: \
configure-hello
@@ -8725,7 +10510,8 @@ TAGS-hello: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in hello" ; \
@@ -8737,9 +10523,12 @@ TAGS-hello: \
TAGS) \
|| exit 1
+@endif hello
.PHONY: maybe-install-info-hello install-info-hello
maybe-install-info-hello:
+@if hello
+maybe-install-info-hello: install-info-hello
install-info-hello: \
configure-hello \
@@ -8748,7 +10537,8 @@ install-info-hello: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in hello" ; \
@@ -8760,9 +10550,12 @@ install-info-hello: \
install-info) \
|| exit 1
+@endif hello
.PHONY: maybe-installcheck-hello installcheck-hello
maybe-installcheck-hello:
+@if hello
+maybe-installcheck-hello: installcheck-hello
installcheck-hello: \
configure-hello
@@ -8770,7 +10563,8 @@ installcheck-hello: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in hello" ; \
@@ -8782,16 +10576,20 @@ installcheck-hello: \
installcheck) \
|| exit 1
+@endif hello
.PHONY: maybe-mostlyclean-hello mostlyclean-hello
maybe-mostlyclean-hello:
+@if hello
+maybe-mostlyclean-hello: mostlyclean-hello
mostlyclean-hello:
@[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in hello" ; \
@@ -8803,16 +10601,20 @@ mostlyclean-hello:
mostlyclean) \
|| exit 1
+@endif hello
.PHONY: maybe-clean-hello clean-hello
maybe-clean-hello:
+@if hello
+maybe-clean-hello: clean-hello
clean-hello:
@[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in hello" ; \
@@ -8824,16 +10626,20 @@ clean-hello:
clean) \
|| exit 1
+@endif hello
.PHONY: maybe-distclean-hello distclean-hello
maybe-distclean-hello:
+@if hello
+maybe-distclean-hello: distclean-hello
distclean-hello:
@[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in hello" ; \
@@ -8845,16 +10651,20 @@ distclean-hello:
distclean) \
|| exit 1
+@endif hello
.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
maybe-maintainer-clean-hello:
+@if hello
+maybe-maintainer-clean-hello: maintainer-clean-hello
maintainer-clean-hello:
@[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in hello" ; \
@@ -8866,30 +10676,19 @@ maintainer-clean-hello:
maintainer-clean) \
|| exit 1
+@endif hello
.PHONY: configure-indent maybe-configure-indent
maybe-configure-indent:
+@if indent
+maybe-configure-indent: configure-indent
configure-indent:
@test ! -f indent/Makefile || exit 0; \
[ -d indent ] || mkdir indent; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in indent; \
cd indent || exit 1; \
case $(srcdir) in \
@@ -8904,41 +10703,56 @@ configure-indent:
libsrcdir="$$s/indent";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif indent
.PHONY: all-indent maybe-all-indent
maybe-all-indent:
+@if indent
+maybe-all-indent: all-indent
all-indent: configure-indent
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif indent
.PHONY: check-indent maybe-check-indent
maybe-check-indent:
+@if indent
+maybe-check-indent: check-indent
check-indent:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif indent
.PHONY: install-indent maybe-install-indent
maybe-install-indent:
+@if indent
+maybe-install-indent: install-indent
install-indent: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif indent
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-indent info-indent
maybe-info-indent:
+@if indent
+maybe-info-indent: info-indent
info-indent: \
configure-indent
@@ -8946,7 +10760,8 @@ info-indent: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in indent" ; \
@@ -8958,9 +10773,12 @@ info-indent: \
info) \
|| exit 1
+@endif indent
.PHONY: maybe-dvi-indent dvi-indent
maybe-dvi-indent:
+@if indent
+maybe-dvi-indent: dvi-indent
dvi-indent: \
configure-indent
@@ -8968,7 +10786,8 @@ dvi-indent: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in indent" ; \
@@ -8980,9 +10799,12 @@ dvi-indent: \
dvi) \
|| exit 1
+@endif indent
.PHONY: maybe-TAGS-indent TAGS-indent
maybe-TAGS-indent:
+@if indent
+maybe-TAGS-indent: TAGS-indent
TAGS-indent: \
configure-indent
@@ -8990,7 +10812,8 @@ TAGS-indent: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in indent" ; \
@@ -9002,9 +10825,12 @@ TAGS-indent: \
TAGS) \
|| exit 1
+@endif indent
.PHONY: maybe-install-info-indent install-info-indent
maybe-install-info-indent:
+@if indent
+maybe-install-info-indent: install-info-indent
install-info-indent: \
configure-indent \
@@ -9013,7 +10839,8 @@ install-info-indent: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in indent" ; \
@@ -9025,9 +10852,12 @@ install-info-indent: \
install-info) \
|| exit 1
+@endif indent
.PHONY: maybe-installcheck-indent installcheck-indent
maybe-installcheck-indent:
+@if indent
+maybe-installcheck-indent: installcheck-indent
installcheck-indent: \
configure-indent
@@ -9035,7 +10865,8 @@ installcheck-indent: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in indent" ; \
@@ -9047,16 +10878,20 @@ installcheck-indent: \
installcheck) \
|| exit 1
+@endif indent
.PHONY: maybe-mostlyclean-indent mostlyclean-indent
maybe-mostlyclean-indent:
+@if indent
+maybe-mostlyclean-indent: mostlyclean-indent
mostlyclean-indent:
@[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in indent" ; \
@@ -9068,16 +10903,20 @@ mostlyclean-indent:
mostlyclean) \
|| exit 1
+@endif indent
.PHONY: maybe-clean-indent clean-indent
maybe-clean-indent:
+@if indent
+maybe-clean-indent: clean-indent
clean-indent:
@[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in indent" ; \
@@ -9089,16 +10928,20 @@ clean-indent:
clean) \
|| exit 1
+@endif indent
.PHONY: maybe-distclean-indent distclean-indent
maybe-distclean-indent:
+@if indent
+maybe-distclean-indent: distclean-indent
distclean-indent:
@[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in indent" ; \
@@ -9110,16 +10953,20 @@ distclean-indent:
distclean) \
|| exit 1
+@endif indent
.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
maybe-maintainer-clean-indent:
+@if indent
+maybe-maintainer-clean-indent: maintainer-clean-indent
maintainer-clean-indent:
@[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in indent" ; \
@@ -9131,30 +10978,20 @@ maintainer-clean-indent:
maintainer-clean) \
|| exit 1
+@endif indent
.PHONY: configure-intl maybe-configure-intl
maybe-configure-intl:
+@if intl
+maybe-configure-intl: configure-intl
configure-intl:
- @test ! -f intl/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f intl/Makefile || exit 0; \
[ -d intl ] || mkdir intl; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in intl; \
cd intl || exit 1; \
case $(srcdir) in \
@@ -9169,41 +11006,57 @@ configure-intl:
libsrcdir="$$s/intl";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif intl
.PHONY: all-intl maybe-all-intl
maybe-all-intl:
+@if intl
+maybe-all-intl: all-intl
all-intl: configure-intl
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif intl
.PHONY: check-intl maybe-check-intl
maybe-check-intl:
+@if intl
+maybe-check-intl: check-intl
check-intl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif intl
.PHONY: install-intl maybe-install-intl
maybe-install-intl:
+@if intl
+maybe-install-intl: install-intl
install-intl: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif intl
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-intl info-intl
maybe-info-intl:
+@if intl
+maybe-info-intl: info-intl
info-intl: \
configure-intl
@@ -9211,7 +11064,8 @@ info-intl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in intl" ; \
@@ -9223,9 +11077,12 @@ info-intl: \
info) \
|| exit 1
+@endif intl
.PHONY: maybe-dvi-intl dvi-intl
maybe-dvi-intl:
+@if intl
+maybe-dvi-intl: dvi-intl
dvi-intl: \
configure-intl
@@ -9233,7 +11090,8 @@ dvi-intl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in intl" ; \
@@ -9245,9 +11103,12 @@ dvi-intl: \
dvi) \
|| exit 1
+@endif intl
.PHONY: maybe-TAGS-intl TAGS-intl
maybe-TAGS-intl:
+@if intl
+maybe-TAGS-intl: TAGS-intl
TAGS-intl: \
configure-intl
@@ -9255,7 +11116,8 @@ TAGS-intl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in intl" ; \
@@ -9267,9 +11129,12 @@ TAGS-intl: \
TAGS) \
|| exit 1
+@endif intl
.PHONY: maybe-install-info-intl install-info-intl
maybe-install-info-intl:
+@if intl
+maybe-install-info-intl: install-info-intl
install-info-intl: \
configure-intl \
@@ -9278,7 +11143,8 @@ install-info-intl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in intl" ; \
@@ -9290,9 +11156,12 @@ install-info-intl: \
install-info) \
|| exit 1
+@endif intl
.PHONY: maybe-installcheck-intl installcheck-intl
maybe-installcheck-intl:
+@if intl
+maybe-installcheck-intl: installcheck-intl
installcheck-intl: \
configure-intl
@@ -9300,7 +11169,8 @@ installcheck-intl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in intl" ; \
@@ -9312,16 +11182,20 @@ installcheck-intl: \
installcheck) \
|| exit 1
+@endif intl
.PHONY: maybe-mostlyclean-intl mostlyclean-intl
maybe-mostlyclean-intl:
+@if intl
+maybe-mostlyclean-intl: mostlyclean-intl
mostlyclean-intl:
@[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in intl" ; \
@@ -9333,16 +11207,20 @@ mostlyclean-intl:
mostlyclean) \
|| exit 1
+@endif intl
.PHONY: maybe-clean-intl clean-intl
maybe-clean-intl:
+@if intl
+maybe-clean-intl: clean-intl
clean-intl:
@[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in intl" ; \
@@ -9354,16 +11232,20 @@ clean-intl:
clean) \
|| exit 1
+@endif intl
.PHONY: maybe-distclean-intl distclean-intl
maybe-distclean-intl:
+@if intl
+maybe-distclean-intl: distclean-intl
distclean-intl:
@[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in intl" ; \
@@ -9375,16 +11257,20 @@ distclean-intl:
distclean) \
|| exit 1
+@endif intl
.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl
maybe-maintainer-clean-intl:
+@if intl
+maybe-maintainer-clean-intl: maintainer-clean-intl
maintainer-clean-intl:
@[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in intl" ; \
@@ -9396,30 +11282,19 @@ maintainer-clean-intl:
maintainer-clean) \
|| exit 1
+@endif intl
.PHONY: configure-tcl maybe-configure-tcl
maybe-configure-tcl:
+@if tcl
+maybe-configure-tcl: configure-tcl
configure-tcl:
@test ! -f tcl/Makefile || exit 0; \
[ -d tcl ] || mkdir tcl; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in tcl; \
cd tcl || exit 1; \
case $(srcdir) in \
@@ -9434,41 +11309,56 @@ configure-tcl:
libsrcdir="$$s/tcl";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif tcl
.PHONY: all-tcl maybe-all-tcl
maybe-all-tcl:
+@if tcl
+maybe-all-tcl: all-tcl
all-tcl: configure-tcl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif tcl
.PHONY: check-tcl maybe-check-tcl
maybe-check-tcl:
+@if tcl
+maybe-check-tcl: check-tcl
check-tcl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif tcl
.PHONY: install-tcl maybe-install-tcl
maybe-install-tcl:
+@if tcl
+maybe-install-tcl: install-tcl
install-tcl: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif tcl
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tcl info-tcl
maybe-info-tcl:
+@if tcl
+maybe-info-tcl: info-tcl
info-tcl: \
configure-tcl
@@ -9476,7 +11366,8 @@ info-tcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in tcl" ; \
@@ -9488,9 +11379,12 @@ info-tcl: \
info) \
|| exit 1
+@endif tcl
.PHONY: maybe-dvi-tcl dvi-tcl
maybe-dvi-tcl:
+@if tcl
+maybe-dvi-tcl: dvi-tcl
dvi-tcl: \
configure-tcl
@@ -9498,7 +11392,8 @@ dvi-tcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in tcl" ; \
@@ -9510,9 +11405,12 @@ dvi-tcl: \
dvi) \
|| exit 1
+@endif tcl
.PHONY: maybe-TAGS-tcl TAGS-tcl
maybe-TAGS-tcl:
+@if tcl
+maybe-TAGS-tcl: TAGS-tcl
TAGS-tcl: \
configure-tcl
@@ -9520,7 +11418,8 @@ TAGS-tcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in tcl" ; \
@@ -9532,9 +11431,12 @@ TAGS-tcl: \
TAGS) \
|| exit 1
+@endif tcl
.PHONY: maybe-install-info-tcl install-info-tcl
maybe-install-info-tcl:
+@if tcl
+maybe-install-info-tcl: install-info-tcl
install-info-tcl: \
configure-tcl \
@@ -9543,7 +11445,8 @@ install-info-tcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in tcl" ; \
@@ -9555,9 +11458,12 @@ install-info-tcl: \
install-info) \
|| exit 1
+@endif tcl
.PHONY: maybe-installcheck-tcl installcheck-tcl
maybe-installcheck-tcl:
+@if tcl
+maybe-installcheck-tcl: installcheck-tcl
installcheck-tcl: \
configure-tcl
@@ -9565,7 +11471,8 @@ installcheck-tcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in tcl" ; \
@@ -9577,23 +11484,30 @@ installcheck-tcl: \
installcheck) \
|| exit 1
+@endif tcl
.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl
maybe-mostlyclean-tcl:
+@if tcl
+maybe-mostlyclean-tcl: mostlyclean-tcl
# tcl doesn't support mostlyclean.
mostlyclean-tcl:
+@endif tcl
.PHONY: maybe-clean-tcl clean-tcl
maybe-clean-tcl:
+@if tcl
+maybe-clean-tcl: clean-tcl
clean-tcl:
@[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in tcl" ; \
@@ -9605,16 +11519,20 @@ clean-tcl:
clean) \
|| exit 1
+@endif tcl
.PHONY: maybe-distclean-tcl distclean-tcl
maybe-distclean-tcl:
+@if tcl
+maybe-distclean-tcl: distclean-tcl
distclean-tcl:
@[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in tcl" ; \
@@ -9626,16 +11544,20 @@ distclean-tcl:
distclean) \
|| exit 1
+@endif tcl
.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl
maybe-maintainer-clean-tcl:
+@if tcl
+maybe-maintainer-clean-tcl: maintainer-clean-tcl
maintainer-clean-tcl:
@[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in tcl" ; \
@@ -9647,30 +11569,19 @@ maintainer-clean-tcl:
maintainer-clean) \
|| exit 1
+@endif tcl
.PHONY: configure-itcl maybe-configure-itcl
maybe-configure-itcl:
+@if itcl
+maybe-configure-itcl: configure-itcl
configure-itcl:
@test ! -f itcl/Makefile || exit 0; \
[ -d itcl ] || mkdir itcl; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in itcl; \
cd itcl || exit 1; \
case $(srcdir) in \
@@ -9685,41 +11596,56 @@ configure-itcl:
libsrcdir="$$s/itcl";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif itcl
.PHONY: all-itcl maybe-all-itcl
maybe-all-itcl:
+@if itcl
+maybe-all-itcl: all-itcl
all-itcl: configure-itcl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif itcl
.PHONY: check-itcl maybe-check-itcl
maybe-check-itcl:
+@if itcl
+maybe-check-itcl: check-itcl
check-itcl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif itcl
.PHONY: install-itcl maybe-install-itcl
maybe-install-itcl:
+@if itcl
+maybe-install-itcl: install-itcl
install-itcl: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif itcl
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-itcl info-itcl
maybe-info-itcl:
+@if itcl
+maybe-info-itcl: info-itcl
info-itcl: \
configure-itcl
@@ -9727,7 +11653,8 @@ info-itcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in itcl" ; \
@@ -9739,9 +11666,12 @@ info-itcl: \
info) \
|| exit 1
+@endif itcl
.PHONY: maybe-dvi-itcl dvi-itcl
maybe-dvi-itcl:
+@if itcl
+maybe-dvi-itcl: dvi-itcl
dvi-itcl: \
configure-itcl
@@ -9749,7 +11679,8 @@ dvi-itcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in itcl" ; \
@@ -9761,9 +11692,12 @@ dvi-itcl: \
dvi) \
|| exit 1
+@endif itcl
.PHONY: maybe-TAGS-itcl TAGS-itcl
maybe-TAGS-itcl:
+@if itcl
+maybe-TAGS-itcl: TAGS-itcl
TAGS-itcl: \
configure-itcl
@@ -9771,7 +11705,8 @@ TAGS-itcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in itcl" ; \
@@ -9783,9 +11718,12 @@ TAGS-itcl: \
TAGS) \
|| exit 1
+@endif itcl
.PHONY: maybe-install-info-itcl install-info-itcl
maybe-install-info-itcl:
+@if itcl
+maybe-install-info-itcl: install-info-itcl
install-info-itcl: \
configure-itcl \
@@ -9794,7 +11732,8 @@ install-info-itcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in itcl" ; \
@@ -9806,9 +11745,12 @@ install-info-itcl: \
install-info) \
|| exit 1
+@endif itcl
.PHONY: maybe-installcheck-itcl installcheck-itcl
maybe-installcheck-itcl:
+@if itcl
+maybe-installcheck-itcl: installcheck-itcl
installcheck-itcl: \
configure-itcl
@@ -9816,7 +11758,8 @@ installcheck-itcl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in itcl" ; \
@@ -9828,16 +11771,20 @@ installcheck-itcl: \
installcheck) \
|| exit 1
+@endif itcl
.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl
maybe-mostlyclean-itcl:
+@if itcl
+maybe-mostlyclean-itcl: mostlyclean-itcl
mostlyclean-itcl:
@[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in itcl" ; \
@@ -9849,16 +11796,20 @@ mostlyclean-itcl:
mostlyclean) \
|| exit 1
+@endif itcl
.PHONY: maybe-clean-itcl clean-itcl
maybe-clean-itcl:
+@if itcl
+maybe-clean-itcl: clean-itcl
clean-itcl:
@[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in itcl" ; \
@@ -9870,16 +11821,20 @@ clean-itcl:
clean) \
|| exit 1
+@endif itcl
.PHONY: maybe-distclean-itcl distclean-itcl
maybe-distclean-itcl:
+@if itcl
+maybe-distclean-itcl: distclean-itcl
distclean-itcl:
@[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in itcl" ; \
@@ -9891,16 +11846,20 @@ distclean-itcl:
distclean) \
|| exit 1
+@endif itcl
.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl
maybe-maintainer-clean-itcl:
+@if itcl
+maybe-maintainer-clean-itcl: maintainer-clean-itcl
maintainer-clean-itcl:
@[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in itcl" ; \
@@ -9912,30 +11871,20 @@ maintainer-clean-itcl:
maintainer-clean) \
|| exit 1
+@endif itcl
.PHONY: configure-ld maybe-configure-ld
maybe-configure-ld:
+@if ld
+maybe-configure-ld: configure-ld
configure-ld:
- @test ! -f ld/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f ld/Makefile || exit 0; \
[ -d ld ] || mkdir ld; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in ld; \
cd ld || exit 1; \
case $(srcdir) in \
@@ -9950,41 +11899,57 @@ configure-ld:
libsrcdir="$$s/ld";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif ld
.PHONY: all-ld maybe-all-ld
maybe-all-ld:
+@if ld
+maybe-all-ld: all-ld
all-ld: configure-ld
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif ld
.PHONY: check-ld maybe-check-ld
maybe-check-ld:
+@if ld
+maybe-check-ld: check-ld
check-ld:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif ld
.PHONY: install-ld maybe-install-ld
maybe-install-ld:
+@if ld
+maybe-install-ld: install-ld
install-ld: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif ld
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-ld info-ld
maybe-info-ld:
+@if ld
+maybe-info-ld: info-ld
info-ld: \
configure-ld
@@ -9992,7 +11957,8 @@ info-ld: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in ld" ; \
@@ -10004,9 +11970,12 @@ info-ld: \
info) \
|| exit 1
+@endif ld
.PHONY: maybe-dvi-ld dvi-ld
maybe-dvi-ld:
+@if ld
+maybe-dvi-ld: dvi-ld
dvi-ld: \
configure-ld
@@ -10014,7 +11983,8 @@ dvi-ld: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in ld" ; \
@@ -10026,9 +11996,12 @@ dvi-ld: \
dvi) \
|| exit 1
+@endif ld
.PHONY: maybe-TAGS-ld TAGS-ld
maybe-TAGS-ld:
+@if ld
+maybe-TAGS-ld: TAGS-ld
TAGS-ld: \
configure-ld
@@ -10036,7 +12009,8 @@ TAGS-ld: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in ld" ; \
@@ -10048,9 +12022,12 @@ TAGS-ld: \
TAGS) \
|| exit 1
+@endif ld
.PHONY: maybe-install-info-ld install-info-ld
maybe-install-info-ld:
+@if ld
+maybe-install-info-ld: install-info-ld
install-info-ld: \
configure-ld \
@@ -10059,7 +12036,8 @@ install-info-ld: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in ld" ; \
@@ -10071,9 +12049,12 @@ install-info-ld: \
install-info) \
|| exit 1
+@endif ld
.PHONY: maybe-installcheck-ld installcheck-ld
maybe-installcheck-ld:
+@if ld
+maybe-installcheck-ld: installcheck-ld
installcheck-ld: \
configure-ld
@@ -10081,7 +12062,8 @@ installcheck-ld: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in ld" ; \
@@ -10093,16 +12075,20 @@ installcheck-ld: \
installcheck) \
|| exit 1
+@endif ld
.PHONY: maybe-mostlyclean-ld mostlyclean-ld
maybe-mostlyclean-ld:
+@if ld
+maybe-mostlyclean-ld: mostlyclean-ld
mostlyclean-ld:
@[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in ld" ; \
@@ -10114,16 +12100,20 @@ mostlyclean-ld:
mostlyclean) \
|| exit 1
+@endif ld
.PHONY: maybe-clean-ld clean-ld
maybe-clean-ld:
+@if ld
+maybe-clean-ld: clean-ld
clean-ld:
@[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in ld" ; \
@@ -10135,16 +12125,20 @@ clean-ld:
clean) \
|| exit 1
+@endif ld
.PHONY: maybe-distclean-ld distclean-ld
maybe-distclean-ld:
+@if ld
+maybe-distclean-ld: distclean-ld
distclean-ld:
@[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in ld" ; \
@@ -10156,16 +12150,20 @@ distclean-ld:
distclean) \
|| exit 1
+@endif ld
.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld
maybe-maintainer-clean-ld:
+@if ld
+maybe-maintainer-clean-ld: maintainer-clean-ld
maintainer-clean-ld:
@[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in ld" ; \
@@ -10177,30 +12175,323 @@ maintainer-clean-ld:
maintainer-clean) \
|| exit 1
+@endif ld
+
+
+.PHONY: configure-libcpp maybe-configure-libcpp
+maybe-configure-libcpp:
+@if libcpp
+maybe-configure-libcpp: configure-libcpp
+configure-libcpp:
+ @test -f stage_last && exit 0; \
+ test ! -f libcpp/Makefile || exit 0; \
+ [ -d libcpp ] || mkdir libcpp; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring in libcpp; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libcpp
+
+.PHONY: all-libcpp maybe-all-libcpp
+maybe-all-libcpp:
+@if libcpp
+maybe-all-libcpp: all-libcpp
+all-libcpp: configure-libcpp
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd libcpp && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif libcpp
+
+.PHONY: check-libcpp maybe-check-libcpp
+maybe-check-libcpp:
+@if libcpp
+maybe-check-libcpp: check-libcpp
+
+check-libcpp:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd libcpp && $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libcpp
+
+.PHONY: install-libcpp maybe-install-libcpp
+maybe-install-libcpp:
+@if libcpp
+maybe-install-libcpp: install-libcpp
+
+install-libcpp: installdirs
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ (cd libcpp && $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libcpp
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libcpp info-libcpp
+maybe-info-libcpp:
+@if libcpp
+maybe-info-libcpp: info-libcpp
+
+info-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-dvi-libcpp dvi-libcpp
+maybe-dvi-libcpp:
+@if libcpp
+maybe-dvi-libcpp: dvi-libcpp
+
+dvi-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-TAGS-libcpp TAGS-libcpp
+maybe-TAGS-libcpp:
+@if libcpp
+maybe-TAGS-libcpp: TAGS-libcpp
+
+TAGS-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-install-info-libcpp install-info-libcpp
+maybe-install-info-libcpp:
+@if libcpp
+maybe-install-info-libcpp: install-info-libcpp
+
+install-info-libcpp: \
+ configure-libcpp \
+ info-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-installcheck-libcpp installcheck-libcpp
+maybe-installcheck-libcpp:
+@if libcpp
+maybe-installcheck-libcpp: installcheck-libcpp
+
+installcheck-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-mostlyclean-libcpp mostlyclean-libcpp
+maybe-mostlyclean-libcpp:
+@if libcpp
+maybe-mostlyclean-libcpp: mostlyclean-libcpp
+
+mostlyclean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-clean-libcpp clean-libcpp
+maybe-clean-libcpp:
+@if libcpp
+maybe-clean-libcpp: clean-libcpp
+
+clean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-distclean-libcpp distclean-libcpp
+maybe-distclean-libcpp:
+@if libcpp
+maybe-distclean-libcpp: distclean-libcpp
+
+distclean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
+
+.PHONY: maybe-maintainer-clean-libcpp maintainer-clean-libcpp
+maybe-maintainer-clean-libcpp:
+@if libcpp
+maybe-maintainer-clean-libcpp: maintainer-clean-libcpp
+
+maintainer-clean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libcpp" ; \
+ (cd libcpp && \
+ $(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
+
+@endif libcpp
.PHONY: configure-libgui maybe-configure-libgui
maybe-configure-libgui:
+@if libgui
+maybe-configure-libgui: configure-libgui
configure-libgui:
@test ! -f libgui/Makefile || exit 0; \
[ -d libgui ] || mkdir libgui; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in libgui; \
cd libgui || exit 1; \
case $(srcdir) in \
@@ -10215,41 +12506,56 @@ configure-libgui:
libsrcdir="$$s/libgui";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif libgui
.PHONY: all-libgui maybe-all-libgui
maybe-all-libgui:
+@if libgui
+maybe-all-libgui: all-libgui
all-libgui: configure-libgui
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif libgui
.PHONY: check-libgui maybe-check-libgui
maybe-check-libgui:
+@if libgui
+maybe-check-libgui: check-libgui
check-libgui:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif libgui
.PHONY: install-libgui maybe-install-libgui
maybe-install-libgui:
+@if libgui
+maybe-install-libgui: install-libgui
install-libgui: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif libgui
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libgui info-libgui
maybe-info-libgui:
+@if libgui
+maybe-info-libgui: info-libgui
info-libgui: \
configure-libgui
@@ -10257,7 +12563,8 @@ info-libgui: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in libgui" ; \
@@ -10269,9 +12576,12 @@ info-libgui: \
info) \
|| exit 1
+@endif libgui
.PHONY: maybe-dvi-libgui dvi-libgui
maybe-dvi-libgui:
+@if libgui
+maybe-dvi-libgui: dvi-libgui
dvi-libgui: \
configure-libgui
@@ -10279,7 +12589,8 @@ dvi-libgui: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in libgui" ; \
@@ -10291,9 +12602,12 @@ dvi-libgui: \
dvi) \
|| exit 1
+@endif libgui
.PHONY: maybe-TAGS-libgui TAGS-libgui
maybe-TAGS-libgui:
+@if libgui
+maybe-TAGS-libgui: TAGS-libgui
TAGS-libgui: \
configure-libgui
@@ -10301,7 +12615,8 @@ TAGS-libgui: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in libgui" ; \
@@ -10313,9 +12628,12 @@ TAGS-libgui: \
TAGS) \
|| exit 1
+@endif libgui
.PHONY: maybe-install-info-libgui install-info-libgui
maybe-install-info-libgui:
+@if libgui
+maybe-install-info-libgui: install-info-libgui
install-info-libgui: \
configure-libgui \
@@ -10324,7 +12642,8 @@ install-info-libgui: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in libgui" ; \
@@ -10336,9 +12655,12 @@ install-info-libgui: \
install-info) \
|| exit 1
+@endif libgui
.PHONY: maybe-installcheck-libgui installcheck-libgui
maybe-installcheck-libgui:
+@if libgui
+maybe-installcheck-libgui: installcheck-libgui
installcheck-libgui: \
configure-libgui
@@ -10346,7 +12668,8 @@ installcheck-libgui: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in libgui" ; \
@@ -10358,16 +12681,20 @@ installcheck-libgui: \
installcheck) \
|| exit 1
+@endif libgui
.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui
maybe-mostlyclean-libgui:
+@if libgui
+maybe-mostlyclean-libgui: mostlyclean-libgui
mostlyclean-libgui:
@[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in libgui" ; \
@@ -10379,16 +12706,20 @@ mostlyclean-libgui:
mostlyclean) \
|| exit 1
+@endif libgui
.PHONY: maybe-clean-libgui clean-libgui
maybe-clean-libgui:
+@if libgui
+maybe-clean-libgui: clean-libgui
clean-libgui:
@[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in libgui" ; \
@@ -10400,16 +12731,20 @@ clean-libgui:
clean) \
|| exit 1
+@endif libgui
.PHONY: maybe-distclean-libgui distclean-libgui
maybe-distclean-libgui:
+@if libgui
+maybe-distclean-libgui: distclean-libgui
distclean-libgui:
@[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in libgui" ; \
@@ -10421,16 +12756,20 @@ distclean-libgui:
distclean) \
|| exit 1
+@endif libgui
.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui
maybe-maintainer-clean-libgui:
+@if libgui
+maybe-maintainer-clean-libgui: maintainer-clean-libgui
maintainer-clean-libgui:
@[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in libgui" ; \
@@ -10442,30 +12781,20 @@ maintainer-clean-libgui:
maintainer-clean) \
|| exit 1
+@endif libgui
.PHONY: configure-libiberty maybe-configure-libiberty
maybe-configure-libiberty:
+@if libiberty
+maybe-configure-libiberty: configure-libiberty
configure-libiberty:
- @test ! -f libiberty/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f libiberty/Makefile || exit 0; \
[ -d libiberty ] || mkdir libiberty; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in libiberty; \
cd libiberty || exit 1; \
case $(srcdir) in \
@@ -10480,41 +12809,57 @@ configure-libiberty:
libsrcdir="$$s/libiberty";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif libiberty
.PHONY: all-libiberty maybe-all-libiberty
maybe-all-libiberty:
+@if libiberty
+maybe-all-libiberty: all-libiberty
all-libiberty: configure-libiberty
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif libiberty
.PHONY: check-libiberty maybe-check-libiberty
maybe-check-libiberty:
+@if libiberty
+maybe-check-libiberty: check-libiberty
check-libiberty:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif libiberty
.PHONY: install-libiberty maybe-install-libiberty
maybe-install-libiberty:
+@if libiberty
+maybe-install-libiberty: install-libiberty
install-libiberty: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif libiberty
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libiberty info-libiberty
maybe-info-libiberty:
+@if libiberty
+maybe-info-libiberty: info-libiberty
info-libiberty: \
configure-libiberty
@@ -10522,7 +12867,8 @@ info-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in libiberty" ; \
@@ -10534,9 +12880,12 @@ info-libiberty: \
info) \
|| exit 1
+@endif libiberty
.PHONY: maybe-dvi-libiberty dvi-libiberty
maybe-dvi-libiberty:
+@if libiberty
+maybe-dvi-libiberty: dvi-libiberty
dvi-libiberty: \
configure-libiberty
@@ -10544,7 +12893,8 @@ dvi-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in libiberty" ; \
@@ -10556,9 +12906,12 @@ dvi-libiberty: \
dvi) \
|| exit 1
+@endif libiberty
.PHONY: maybe-TAGS-libiberty TAGS-libiberty
maybe-TAGS-libiberty:
+@if libiberty
+maybe-TAGS-libiberty: TAGS-libiberty
TAGS-libiberty: \
configure-libiberty
@@ -10566,7 +12919,8 @@ TAGS-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in libiberty" ; \
@@ -10578,9 +12932,12 @@ TAGS-libiberty: \
TAGS) \
|| exit 1
+@endif libiberty
.PHONY: maybe-install-info-libiberty install-info-libiberty
maybe-install-info-libiberty:
+@if libiberty
+maybe-install-info-libiberty: install-info-libiberty
install-info-libiberty: \
configure-libiberty \
@@ -10589,7 +12946,8 @@ install-info-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in libiberty" ; \
@@ -10601,9 +12959,12 @@ install-info-libiberty: \
install-info) \
|| exit 1
+@endif libiberty
.PHONY: maybe-installcheck-libiberty installcheck-libiberty
maybe-installcheck-libiberty:
+@if libiberty
+maybe-installcheck-libiberty: installcheck-libiberty
installcheck-libiberty: \
configure-libiberty
@@ -10611,7 +12972,8 @@ installcheck-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in libiberty" ; \
@@ -10623,16 +12985,20 @@ installcheck-libiberty: \
installcheck) \
|| exit 1
+@endif libiberty
.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty
maybe-mostlyclean-libiberty:
+@if libiberty
+maybe-mostlyclean-libiberty: mostlyclean-libiberty
mostlyclean-libiberty:
@[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in libiberty" ; \
@@ -10644,16 +13010,20 @@ mostlyclean-libiberty:
mostlyclean) \
|| exit 1
+@endif libiberty
.PHONY: maybe-clean-libiberty clean-libiberty
maybe-clean-libiberty:
+@if libiberty
+maybe-clean-libiberty: clean-libiberty
clean-libiberty:
@[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in libiberty" ; \
@@ -10665,16 +13035,20 @@ clean-libiberty:
clean) \
|| exit 1
+@endif libiberty
.PHONY: maybe-distclean-libiberty distclean-libiberty
maybe-distclean-libiberty:
+@if libiberty
+maybe-distclean-libiberty: distclean-libiberty
distclean-libiberty:
@[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in libiberty" ; \
@@ -10686,16 +13060,20 @@ distclean-libiberty:
distclean) \
|| exit 1
+@endif libiberty
.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty
maybe-maintainer-clean-libiberty:
+@if libiberty
+maybe-maintainer-clean-libiberty: maintainer-clean-libiberty
maintainer-clean-libiberty:
@[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in libiberty" ; \
@@ -10707,30 +13085,19 @@ maintainer-clean-libiberty:
maintainer-clean) \
|| exit 1
+@endif libiberty
.PHONY: configure-libtool maybe-configure-libtool
maybe-configure-libtool:
+@if libtool
+maybe-configure-libtool: configure-libtool
configure-libtool:
@test ! -f libtool/Makefile || exit 0; \
[ -d libtool ] || mkdir libtool; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in libtool; \
cd libtool || exit 1; \
case $(srcdir) in \
@@ -10745,41 +13112,56 @@ configure-libtool:
libsrcdir="$$s/libtool";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif libtool
.PHONY: all-libtool maybe-all-libtool
maybe-all-libtool:
+@if libtool
+maybe-all-libtool: all-libtool
all-libtool: configure-libtool
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif libtool
.PHONY: check-libtool maybe-check-libtool
maybe-check-libtool:
+@if libtool
+maybe-check-libtool: check-libtool
check-libtool:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif libtool
.PHONY: install-libtool maybe-install-libtool
maybe-install-libtool:
+@if libtool
+maybe-install-libtool: install-libtool
install-libtool: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif libtool
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libtool info-libtool
maybe-info-libtool:
+@if libtool
+maybe-info-libtool: info-libtool
info-libtool: \
configure-libtool
@@ -10787,7 +13169,8 @@ info-libtool: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in libtool" ; \
@@ -10799,9 +13182,12 @@ info-libtool: \
info) \
|| exit 1
+@endif libtool
.PHONY: maybe-dvi-libtool dvi-libtool
maybe-dvi-libtool:
+@if libtool
+maybe-dvi-libtool: dvi-libtool
dvi-libtool: \
configure-libtool
@@ -10809,7 +13195,8 @@ dvi-libtool: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in libtool" ; \
@@ -10821,9 +13208,12 @@ dvi-libtool: \
dvi) \
|| exit 1
+@endif libtool
.PHONY: maybe-TAGS-libtool TAGS-libtool
maybe-TAGS-libtool:
+@if libtool
+maybe-TAGS-libtool: TAGS-libtool
TAGS-libtool: \
configure-libtool
@@ -10831,7 +13221,8 @@ TAGS-libtool: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in libtool" ; \
@@ -10843,9 +13234,12 @@ TAGS-libtool: \
TAGS) \
|| exit 1
+@endif libtool
.PHONY: maybe-install-info-libtool install-info-libtool
maybe-install-info-libtool:
+@if libtool
+maybe-install-info-libtool: install-info-libtool
install-info-libtool: \
configure-libtool \
@@ -10854,7 +13248,8 @@ install-info-libtool: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in libtool" ; \
@@ -10866,9 +13261,12 @@ install-info-libtool: \
install-info) \
|| exit 1
+@endif libtool
.PHONY: maybe-installcheck-libtool installcheck-libtool
maybe-installcheck-libtool:
+@if libtool
+maybe-installcheck-libtool: installcheck-libtool
installcheck-libtool: \
configure-libtool
@@ -10876,7 +13274,8 @@ installcheck-libtool: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in libtool" ; \
@@ -10888,16 +13287,20 @@ installcheck-libtool: \
installcheck) \
|| exit 1
+@endif libtool
.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
maybe-mostlyclean-libtool:
+@if libtool
+maybe-mostlyclean-libtool: mostlyclean-libtool
mostlyclean-libtool:
@[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in libtool" ; \
@@ -10909,16 +13312,20 @@ mostlyclean-libtool:
mostlyclean) \
|| exit 1
+@endif libtool
.PHONY: maybe-clean-libtool clean-libtool
maybe-clean-libtool:
+@if libtool
+maybe-clean-libtool: clean-libtool
clean-libtool:
@[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in libtool" ; \
@@ -10930,16 +13337,20 @@ clean-libtool:
clean) \
|| exit 1
+@endif libtool
.PHONY: maybe-distclean-libtool distclean-libtool
maybe-distclean-libtool:
+@if libtool
+maybe-distclean-libtool: distclean-libtool
distclean-libtool:
@[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in libtool" ; \
@@ -10951,16 +13362,20 @@ distclean-libtool:
distclean) \
|| exit 1
+@endif libtool
.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
maybe-maintainer-clean-libtool:
+@if libtool
+maybe-maintainer-clean-libtool: maintainer-clean-libtool
maintainer-clean-libtool:
@[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in libtool" ; \
@@ -10972,30 +13387,19 @@ maintainer-clean-libtool:
maintainer-clean) \
|| exit 1
+@endif libtool
.PHONY: configure-m4 maybe-configure-m4
maybe-configure-m4:
+@if m4
+maybe-configure-m4: configure-m4
configure-m4:
@test ! -f m4/Makefile || exit 0; \
[ -d m4 ] || mkdir m4; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in m4; \
cd m4 || exit 1; \
case $(srcdir) in \
@@ -11010,41 +13414,56 @@ configure-m4:
libsrcdir="$$s/m4";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif m4
.PHONY: all-m4 maybe-all-m4
maybe-all-m4:
+@if m4
+maybe-all-m4: all-m4
all-m4: configure-m4
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif m4
.PHONY: check-m4 maybe-check-m4
maybe-check-m4:
+@if m4
+maybe-check-m4: check-m4
check-m4:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif m4
.PHONY: install-m4 maybe-install-m4
maybe-install-m4:
+@if m4
+maybe-install-m4: install-m4
install-m4: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif m4
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-m4 info-m4
maybe-info-m4:
+@if m4
+maybe-info-m4: info-m4
info-m4: \
configure-m4
@@ -11052,7 +13471,8 @@ info-m4: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in m4" ; \
@@ -11064,9 +13484,12 @@ info-m4: \
info) \
|| exit 1
+@endif m4
.PHONY: maybe-dvi-m4 dvi-m4
maybe-dvi-m4:
+@if m4
+maybe-dvi-m4: dvi-m4
dvi-m4: \
configure-m4
@@ -11074,7 +13497,8 @@ dvi-m4: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in m4" ; \
@@ -11086,9 +13510,12 @@ dvi-m4: \
dvi) \
|| exit 1
+@endif m4
.PHONY: maybe-TAGS-m4 TAGS-m4
maybe-TAGS-m4:
+@if m4
+maybe-TAGS-m4: TAGS-m4
TAGS-m4: \
configure-m4
@@ -11096,7 +13523,8 @@ TAGS-m4: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in m4" ; \
@@ -11108,9 +13536,12 @@ TAGS-m4: \
TAGS) \
|| exit 1
+@endif m4
.PHONY: maybe-install-info-m4 install-info-m4
maybe-install-info-m4:
+@if m4
+maybe-install-info-m4: install-info-m4
install-info-m4: \
configure-m4 \
@@ -11119,7 +13550,8 @@ install-info-m4: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in m4" ; \
@@ -11131,9 +13563,12 @@ install-info-m4: \
install-info) \
|| exit 1
+@endif m4
.PHONY: maybe-installcheck-m4 installcheck-m4
maybe-installcheck-m4:
+@if m4
+maybe-installcheck-m4: installcheck-m4
installcheck-m4: \
configure-m4
@@ -11141,7 +13576,8 @@ installcheck-m4: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in m4" ; \
@@ -11153,16 +13589,20 @@ installcheck-m4: \
installcheck) \
|| exit 1
+@endif m4
.PHONY: maybe-mostlyclean-m4 mostlyclean-m4
maybe-mostlyclean-m4:
+@if m4
+maybe-mostlyclean-m4: mostlyclean-m4
mostlyclean-m4:
@[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in m4" ; \
@@ -11174,16 +13614,20 @@ mostlyclean-m4:
mostlyclean) \
|| exit 1
+@endif m4
.PHONY: maybe-clean-m4 clean-m4
maybe-clean-m4:
+@if m4
+maybe-clean-m4: clean-m4
clean-m4:
@[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in m4" ; \
@@ -11195,16 +13639,20 @@ clean-m4:
clean) \
|| exit 1
+@endif m4
.PHONY: maybe-distclean-m4 distclean-m4
maybe-distclean-m4:
+@if m4
+maybe-distclean-m4: distclean-m4
distclean-m4:
@[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in m4" ; \
@@ -11216,16 +13664,20 @@ distclean-m4:
distclean) \
|| exit 1
+@endif m4
.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4
maybe-maintainer-clean-m4:
+@if m4
+maybe-maintainer-clean-m4: maintainer-clean-m4
maintainer-clean-m4:
@[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in m4" ; \
@@ -11237,30 +13689,19 @@ maintainer-clean-m4:
maintainer-clean) \
|| exit 1
+@endif m4
.PHONY: configure-make maybe-configure-make
maybe-configure-make:
+@if make
+maybe-configure-make: configure-make
configure-make:
@test ! -f make/Makefile || exit 0; \
[ -d make ] || mkdir make; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in make; \
cd make || exit 1; \
case $(srcdir) in \
@@ -11275,41 +13716,56 @@ configure-make:
libsrcdir="$$s/make";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif make
.PHONY: all-make maybe-all-make
maybe-all-make:
+@if make
+maybe-all-make: all-make
all-make: configure-make
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif make
.PHONY: check-make maybe-check-make
maybe-check-make:
+@if make
+maybe-check-make: check-make
check-make:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd make && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif make
.PHONY: install-make maybe-install-make
maybe-install-make:
+@if make
+maybe-install-make: install-make
install-make: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd make && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif make
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-make info-make
maybe-info-make:
+@if make
+maybe-info-make: info-make
info-make: \
configure-make
@@ -11317,7 +13773,8 @@ info-make: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in make" ; \
@@ -11329,9 +13786,12 @@ info-make: \
info) \
|| exit 1
+@endif make
.PHONY: maybe-dvi-make dvi-make
maybe-dvi-make:
+@if make
+maybe-dvi-make: dvi-make
dvi-make: \
configure-make
@@ -11339,7 +13799,8 @@ dvi-make: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in make" ; \
@@ -11351,9 +13812,12 @@ dvi-make: \
dvi) \
|| exit 1
+@endif make
.PHONY: maybe-TAGS-make TAGS-make
maybe-TAGS-make:
+@if make
+maybe-TAGS-make: TAGS-make
TAGS-make: \
configure-make
@@ -11361,7 +13825,8 @@ TAGS-make: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in make" ; \
@@ -11373,9 +13838,12 @@ TAGS-make: \
TAGS) \
|| exit 1
+@endif make
.PHONY: maybe-install-info-make install-info-make
maybe-install-info-make:
+@if make
+maybe-install-info-make: install-info-make
install-info-make: \
configure-make \
@@ -11384,7 +13852,8 @@ install-info-make: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in make" ; \
@@ -11396,9 +13865,12 @@ install-info-make: \
install-info) \
|| exit 1
+@endif make
.PHONY: maybe-installcheck-make installcheck-make
maybe-installcheck-make:
+@if make
+maybe-installcheck-make: installcheck-make
installcheck-make: \
configure-make
@@ -11406,7 +13878,8 @@ installcheck-make: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in make" ; \
@@ -11418,16 +13891,20 @@ installcheck-make: \
installcheck) \
|| exit 1
+@endif make
.PHONY: maybe-mostlyclean-make mostlyclean-make
maybe-mostlyclean-make:
+@if make
+maybe-mostlyclean-make: mostlyclean-make
mostlyclean-make:
@[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in make" ; \
@@ -11439,16 +13916,20 @@ mostlyclean-make:
mostlyclean) \
|| exit 1
+@endif make
.PHONY: maybe-clean-make clean-make
maybe-clean-make:
+@if make
+maybe-clean-make: clean-make
clean-make:
@[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in make" ; \
@@ -11460,16 +13941,20 @@ clean-make:
clean) \
|| exit 1
+@endif make
.PHONY: maybe-distclean-make distclean-make
maybe-distclean-make:
+@if make
+maybe-distclean-make: distclean-make
distclean-make:
@[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in make" ; \
@@ -11481,16 +13966,20 @@ distclean-make:
distclean) \
|| exit 1
+@endif make
.PHONY: maybe-maintainer-clean-make maintainer-clean-make
maybe-maintainer-clean-make:
+@if make
+maybe-maintainer-clean-make: maintainer-clean-make
maintainer-clean-make:
@[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in make" ; \
@@ -11502,30 +13991,19 @@ maintainer-clean-make:
maintainer-clean) \
|| exit 1
+@endif make
.PHONY: configure-mmalloc maybe-configure-mmalloc
maybe-configure-mmalloc:
+@if mmalloc
+maybe-configure-mmalloc: configure-mmalloc
configure-mmalloc:
@test ! -f mmalloc/Makefile || exit 0; \
[ -d mmalloc ] || mkdir mmalloc; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in mmalloc; \
cd mmalloc || exit 1; \
case $(srcdir) in \
@@ -11540,37 +14018,51 @@ configure-mmalloc:
libsrcdir="$$s/mmalloc";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif mmalloc
.PHONY: all-mmalloc maybe-all-mmalloc
maybe-all-mmalloc:
+@if mmalloc
+maybe-all-mmalloc: all-mmalloc
all-mmalloc: configure-mmalloc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif mmalloc
.PHONY: check-mmalloc maybe-check-mmalloc
maybe-check-mmalloc:
+@if mmalloc
+maybe-check-mmalloc: check-mmalloc
check-mmalloc:
+@endif mmalloc
.PHONY: install-mmalloc maybe-install-mmalloc
maybe-install-mmalloc:
+@if mmalloc
+maybe-install-mmalloc: install-mmalloc
install-mmalloc: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif mmalloc
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-mmalloc info-mmalloc
maybe-info-mmalloc:
+@if mmalloc
+maybe-info-mmalloc: info-mmalloc
info-mmalloc: \
configure-mmalloc
@@ -11578,7 +14070,8 @@ info-mmalloc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in mmalloc" ; \
@@ -11590,9 +14083,12 @@ info-mmalloc: \
info) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-dvi-mmalloc dvi-mmalloc
maybe-dvi-mmalloc:
+@if mmalloc
+maybe-dvi-mmalloc: dvi-mmalloc
dvi-mmalloc: \
configure-mmalloc
@@ -11600,7 +14096,8 @@ dvi-mmalloc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in mmalloc" ; \
@@ -11612,9 +14109,12 @@ dvi-mmalloc: \
dvi) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
maybe-TAGS-mmalloc:
+@if mmalloc
+maybe-TAGS-mmalloc: TAGS-mmalloc
TAGS-mmalloc: \
configure-mmalloc
@@ -11622,7 +14122,8 @@ TAGS-mmalloc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in mmalloc" ; \
@@ -11634,9 +14135,12 @@ TAGS-mmalloc: \
TAGS) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-install-info-mmalloc install-info-mmalloc
maybe-install-info-mmalloc:
+@if mmalloc
+maybe-install-info-mmalloc: install-info-mmalloc
install-info-mmalloc: \
configure-mmalloc \
@@ -11645,7 +14149,8 @@ install-info-mmalloc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in mmalloc" ; \
@@ -11657,9 +14162,12 @@ install-info-mmalloc: \
install-info) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
maybe-installcheck-mmalloc:
+@if mmalloc
+maybe-installcheck-mmalloc: installcheck-mmalloc
installcheck-mmalloc: \
configure-mmalloc
@@ -11667,7 +14175,8 @@ installcheck-mmalloc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in mmalloc" ; \
@@ -11679,16 +14188,20 @@ installcheck-mmalloc: \
installcheck) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
maybe-mostlyclean-mmalloc:
+@if mmalloc
+maybe-mostlyclean-mmalloc: mostlyclean-mmalloc
mostlyclean-mmalloc:
@[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in mmalloc" ; \
@@ -11700,16 +14213,20 @@ mostlyclean-mmalloc:
mostlyclean) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-clean-mmalloc clean-mmalloc
maybe-clean-mmalloc:
+@if mmalloc
+maybe-clean-mmalloc: clean-mmalloc
clean-mmalloc:
@[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in mmalloc" ; \
@@ -11721,16 +14238,20 @@ clean-mmalloc:
clean) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-distclean-mmalloc distclean-mmalloc
maybe-distclean-mmalloc:
+@if mmalloc
+maybe-distclean-mmalloc: distclean-mmalloc
distclean-mmalloc:
@[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in mmalloc" ; \
@@ -11742,16 +14263,20 @@ distclean-mmalloc:
distclean) \
|| exit 1
+@endif mmalloc
.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
maybe-maintainer-clean-mmalloc:
+@if mmalloc
+maybe-maintainer-clean-mmalloc: maintainer-clean-mmalloc
maintainer-clean-mmalloc:
@[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in mmalloc" ; \
@@ -11763,30 +14288,19 @@ maintainer-clean-mmalloc:
maintainer-clean) \
|| exit 1
+@endif mmalloc
.PHONY: configure-patch maybe-configure-patch
maybe-configure-patch:
+@if patch
+maybe-configure-patch: configure-patch
configure-patch:
@test ! -f patch/Makefile || exit 0; \
[ -d patch ] || mkdir patch; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in patch; \
cd patch || exit 1; \
case $(srcdir) in \
@@ -11801,41 +14315,56 @@ configure-patch:
libsrcdir="$$s/patch";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif patch
.PHONY: all-patch maybe-all-patch
maybe-all-patch:
+@if patch
+maybe-all-patch: all-patch
all-patch: configure-patch
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif patch
.PHONY: check-patch maybe-check-patch
maybe-check-patch:
+@if patch
+maybe-check-patch: check-patch
check-patch:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif patch
.PHONY: install-patch maybe-install-patch
maybe-install-patch:
+@if patch
+maybe-install-patch: install-patch
install-patch: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif patch
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-patch info-patch
maybe-info-patch:
+@if patch
+maybe-info-patch: info-patch
info-patch: \
configure-patch
@@ -11843,7 +14372,8 @@ info-patch: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in patch" ; \
@@ -11855,9 +14385,12 @@ info-patch: \
info) \
|| exit 1
+@endif patch
.PHONY: maybe-dvi-patch dvi-patch
maybe-dvi-patch:
+@if patch
+maybe-dvi-patch: dvi-patch
dvi-patch: \
configure-patch
@@ -11865,7 +14398,8 @@ dvi-patch: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in patch" ; \
@@ -11877,9 +14411,12 @@ dvi-patch: \
dvi) \
|| exit 1
+@endif patch
.PHONY: maybe-TAGS-patch TAGS-patch
maybe-TAGS-patch:
+@if patch
+maybe-TAGS-patch: TAGS-patch
TAGS-patch: \
configure-patch
@@ -11887,7 +14424,8 @@ TAGS-patch: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in patch" ; \
@@ -11899,9 +14437,12 @@ TAGS-patch: \
TAGS) \
|| exit 1
+@endif patch
.PHONY: maybe-install-info-patch install-info-patch
maybe-install-info-patch:
+@if patch
+maybe-install-info-patch: install-info-patch
install-info-patch: \
configure-patch \
@@ -11910,7 +14451,8 @@ install-info-patch: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in patch" ; \
@@ -11922,9 +14464,12 @@ install-info-patch: \
install-info) \
|| exit 1
+@endif patch
.PHONY: maybe-installcheck-patch installcheck-patch
maybe-installcheck-patch:
+@if patch
+maybe-installcheck-patch: installcheck-patch
installcheck-patch: \
configure-patch
@@ -11932,7 +14477,8 @@ installcheck-patch: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in patch" ; \
@@ -11944,16 +14490,20 @@ installcheck-patch: \
installcheck) \
|| exit 1
+@endif patch
.PHONY: maybe-mostlyclean-patch mostlyclean-patch
maybe-mostlyclean-patch:
+@if patch
+maybe-mostlyclean-patch: mostlyclean-patch
mostlyclean-patch:
@[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in patch" ; \
@@ -11965,16 +14515,20 @@ mostlyclean-patch:
mostlyclean) \
|| exit 1
+@endif patch
.PHONY: maybe-clean-patch clean-patch
maybe-clean-patch:
+@if patch
+maybe-clean-patch: clean-patch
clean-patch:
@[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in patch" ; \
@@ -11986,16 +14540,20 @@ clean-patch:
clean) \
|| exit 1
+@endif patch
.PHONY: maybe-distclean-patch distclean-patch
maybe-distclean-patch:
+@if patch
+maybe-distclean-patch: distclean-patch
distclean-patch:
@[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in patch" ; \
@@ -12007,16 +14565,20 @@ distclean-patch:
distclean) \
|| exit 1
+@endif patch
.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
maybe-maintainer-clean-patch:
+@if patch
+maybe-maintainer-clean-patch: maintainer-clean-patch
maintainer-clean-patch:
@[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in patch" ; \
@@ -12028,30 +14590,19 @@ maintainer-clean-patch:
maintainer-clean) \
|| exit 1
+@endif patch
.PHONY: configure-perl maybe-configure-perl
maybe-configure-perl:
+@if perl
+maybe-configure-perl: configure-perl
configure-perl:
@test ! -f perl/Makefile || exit 0; \
[ -d perl ] || mkdir perl; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in perl; \
cd perl || exit 1; \
case $(srcdir) in \
@@ -12066,41 +14617,56 @@ configure-perl:
libsrcdir="$$s/perl";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif perl
.PHONY: all-perl maybe-all-perl
maybe-all-perl:
+@if perl
+maybe-all-perl: all-perl
all-perl: configure-perl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif perl
.PHONY: check-perl maybe-check-perl
maybe-check-perl:
+@if perl
+maybe-check-perl: check-perl
check-perl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif perl
.PHONY: install-perl maybe-install-perl
maybe-install-perl:
+@if perl
+maybe-install-perl: install-perl
install-perl: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif perl
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-perl info-perl
maybe-info-perl:
+@if perl
+maybe-info-perl: info-perl
info-perl: \
configure-perl
@@ -12108,7 +14674,8 @@ info-perl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in perl" ; \
@@ -12120,9 +14687,12 @@ info-perl: \
info) \
|| exit 1
+@endif perl
.PHONY: maybe-dvi-perl dvi-perl
maybe-dvi-perl:
+@if perl
+maybe-dvi-perl: dvi-perl
dvi-perl: \
configure-perl
@@ -12130,7 +14700,8 @@ dvi-perl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in perl" ; \
@@ -12142,9 +14713,12 @@ dvi-perl: \
dvi) \
|| exit 1
+@endif perl
.PHONY: maybe-TAGS-perl TAGS-perl
maybe-TAGS-perl:
+@if perl
+maybe-TAGS-perl: TAGS-perl
TAGS-perl: \
configure-perl
@@ -12152,7 +14726,8 @@ TAGS-perl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in perl" ; \
@@ -12164,9 +14739,12 @@ TAGS-perl: \
TAGS) \
|| exit 1
+@endif perl
.PHONY: maybe-install-info-perl install-info-perl
maybe-install-info-perl:
+@if perl
+maybe-install-info-perl: install-info-perl
install-info-perl: \
configure-perl \
@@ -12175,7 +14753,8 @@ install-info-perl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in perl" ; \
@@ -12187,9 +14766,12 @@ install-info-perl: \
install-info) \
|| exit 1
+@endif perl
.PHONY: maybe-installcheck-perl installcheck-perl
maybe-installcheck-perl:
+@if perl
+maybe-installcheck-perl: installcheck-perl
installcheck-perl: \
configure-perl
@@ -12197,7 +14779,8 @@ installcheck-perl: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in perl" ; \
@@ -12209,16 +14792,20 @@ installcheck-perl: \
installcheck) \
|| exit 1
+@endif perl
.PHONY: maybe-mostlyclean-perl mostlyclean-perl
maybe-mostlyclean-perl:
+@if perl
+maybe-mostlyclean-perl: mostlyclean-perl
mostlyclean-perl:
@[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in perl" ; \
@@ -12230,16 +14817,20 @@ mostlyclean-perl:
mostlyclean) \
|| exit 1
+@endif perl
.PHONY: maybe-clean-perl clean-perl
maybe-clean-perl:
+@if perl
+maybe-clean-perl: clean-perl
clean-perl:
@[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in perl" ; \
@@ -12251,16 +14842,20 @@ clean-perl:
clean) \
|| exit 1
+@endif perl
.PHONY: maybe-distclean-perl distclean-perl
maybe-distclean-perl:
+@if perl
+maybe-distclean-perl: distclean-perl
distclean-perl:
@[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in perl" ; \
@@ -12272,16 +14867,20 @@ distclean-perl:
distclean) \
|| exit 1
+@endif perl
.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
maybe-maintainer-clean-perl:
+@if perl
+maybe-maintainer-clean-perl: maintainer-clean-perl
maintainer-clean-perl:
@[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in perl" ; \
@@ -12293,30 +14892,19 @@ maintainer-clean-perl:
maintainer-clean) \
|| exit 1
+@endif perl
.PHONY: configure-prms maybe-configure-prms
maybe-configure-prms:
+@if prms
+maybe-configure-prms: configure-prms
configure-prms:
@test ! -f prms/Makefile || exit 0; \
[ -d prms ] || mkdir prms; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in prms; \
cd prms || exit 1; \
case $(srcdir) in \
@@ -12331,41 +14919,56 @@ configure-prms:
libsrcdir="$$s/prms";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif prms
.PHONY: all-prms maybe-all-prms
maybe-all-prms:
+@if prms
+maybe-all-prms: all-prms
all-prms: configure-prms
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif prms
.PHONY: check-prms maybe-check-prms
maybe-check-prms:
+@if prms
+maybe-check-prms: check-prms
check-prms:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif prms
.PHONY: install-prms maybe-install-prms
maybe-install-prms:
+@if prms
+maybe-install-prms: install-prms
install-prms: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif prms
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-prms info-prms
maybe-info-prms:
+@if prms
+maybe-info-prms: info-prms
info-prms: \
configure-prms
@@ -12373,7 +14976,8 @@ info-prms: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in prms" ; \
@@ -12385,9 +14989,12 @@ info-prms: \
info) \
|| exit 1
+@endif prms
.PHONY: maybe-dvi-prms dvi-prms
maybe-dvi-prms:
+@if prms
+maybe-dvi-prms: dvi-prms
dvi-prms: \
configure-prms
@@ -12395,7 +15002,8 @@ dvi-prms: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in prms" ; \
@@ -12407,9 +15015,12 @@ dvi-prms: \
dvi) \
|| exit 1
+@endif prms
.PHONY: maybe-TAGS-prms TAGS-prms
maybe-TAGS-prms:
+@if prms
+maybe-TAGS-prms: TAGS-prms
TAGS-prms: \
configure-prms
@@ -12417,7 +15028,8 @@ TAGS-prms: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in prms" ; \
@@ -12429,9 +15041,12 @@ TAGS-prms: \
TAGS) \
|| exit 1
+@endif prms
.PHONY: maybe-install-info-prms install-info-prms
maybe-install-info-prms:
+@if prms
+maybe-install-info-prms: install-info-prms
install-info-prms: \
configure-prms \
@@ -12440,7 +15055,8 @@ install-info-prms: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in prms" ; \
@@ -12452,9 +15068,12 @@ install-info-prms: \
install-info) \
|| exit 1
+@endif prms
.PHONY: maybe-installcheck-prms installcheck-prms
maybe-installcheck-prms:
+@if prms
+maybe-installcheck-prms: installcheck-prms
installcheck-prms: \
configure-prms
@@ -12462,7 +15081,8 @@ installcheck-prms: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in prms" ; \
@@ -12474,16 +15094,20 @@ installcheck-prms: \
installcheck) \
|| exit 1
+@endif prms
.PHONY: maybe-mostlyclean-prms mostlyclean-prms
maybe-mostlyclean-prms:
+@if prms
+maybe-mostlyclean-prms: mostlyclean-prms
mostlyclean-prms:
@[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in prms" ; \
@@ -12495,16 +15119,20 @@ mostlyclean-prms:
mostlyclean) \
|| exit 1
+@endif prms
.PHONY: maybe-clean-prms clean-prms
maybe-clean-prms:
+@if prms
+maybe-clean-prms: clean-prms
clean-prms:
@[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in prms" ; \
@@ -12516,16 +15144,20 @@ clean-prms:
clean) \
|| exit 1
+@endif prms
.PHONY: maybe-distclean-prms distclean-prms
maybe-distclean-prms:
+@if prms
+maybe-distclean-prms: distclean-prms
distclean-prms:
@[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in prms" ; \
@@ -12537,16 +15169,20 @@ distclean-prms:
distclean) \
|| exit 1
+@endif prms
.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
maybe-maintainer-clean-prms:
+@if prms
+maybe-maintainer-clean-prms: maintainer-clean-prms
maintainer-clean-prms:
@[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in prms" ; \
@@ -12558,30 +15194,19 @@ maintainer-clean-prms:
maintainer-clean) \
|| exit 1
+@endif prms
.PHONY: configure-rcs maybe-configure-rcs
maybe-configure-rcs:
+@if rcs
+maybe-configure-rcs: configure-rcs
configure-rcs:
@test ! -f rcs/Makefile || exit 0; \
[ -d rcs ] || mkdir rcs; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in rcs; \
cd rcs || exit 1; \
case $(srcdir) in \
@@ -12596,41 +15221,56 @@ configure-rcs:
libsrcdir="$$s/rcs";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif rcs
.PHONY: all-rcs maybe-all-rcs
maybe-all-rcs:
+@if rcs
+maybe-all-rcs: all-rcs
all-rcs: configure-rcs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif rcs
.PHONY: check-rcs maybe-check-rcs
maybe-check-rcs:
+@if rcs
+maybe-check-rcs: check-rcs
check-rcs:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif rcs
.PHONY: install-rcs maybe-install-rcs
maybe-install-rcs:
+@if rcs
+maybe-install-rcs: install-rcs
install-rcs: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif rcs
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-rcs info-rcs
maybe-info-rcs:
+@if rcs
+maybe-info-rcs: info-rcs
info-rcs: \
configure-rcs
@@ -12638,7 +15278,8 @@ info-rcs: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in rcs" ; \
@@ -12650,9 +15291,12 @@ info-rcs: \
info) \
|| exit 1
+@endif rcs
.PHONY: maybe-dvi-rcs dvi-rcs
maybe-dvi-rcs:
+@if rcs
+maybe-dvi-rcs: dvi-rcs
dvi-rcs: \
configure-rcs
@@ -12660,7 +15304,8 @@ dvi-rcs: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in rcs" ; \
@@ -12672,9 +15317,12 @@ dvi-rcs: \
dvi) \
|| exit 1
+@endif rcs
.PHONY: maybe-TAGS-rcs TAGS-rcs
maybe-TAGS-rcs:
+@if rcs
+maybe-TAGS-rcs: TAGS-rcs
TAGS-rcs: \
configure-rcs
@@ -12682,7 +15330,8 @@ TAGS-rcs: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in rcs" ; \
@@ -12694,9 +15343,12 @@ TAGS-rcs: \
TAGS) \
|| exit 1
+@endif rcs
.PHONY: maybe-install-info-rcs install-info-rcs
maybe-install-info-rcs:
+@if rcs
+maybe-install-info-rcs: install-info-rcs
install-info-rcs: \
configure-rcs \
@@ -12705,7 +15357,8 @@ install-info-rcs: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in rcs" ; \
@@ -12717,9 +15370,12 @@ install-info-rcs: \
install-info) \
|| exit 1
+@endif rcs
.PHONY: maybe-installcheck-rcs installcheck-rcs
maybe-installcheck-rcs:
+@if rcs
+maybe-installcheck-rcs: installcheck-rcs
installcheck-rcs: \
configure-rcs
@@ -12727,7 +15383,8 @@ installcheck-rcs: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in rcs" ; \
@@ -12739,16 +15396,20 @@ installcheck-rcs: \
installcheck) \
|| exit 1
+@endif rcs
.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
maybe-mostlyclean-rcs:
+@if rcs
+maybe-mostlyclean-rcs: mostlyclean-rcs
mostlyclean-rcs:
@[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in rcs" ; \
@@ -12760,16 +15421,20 @@ mostlyclean-rcs:
mostlyclean) \
|| exit 1
+@endif rcs
.PHONY: maybe-clean-rcs clean-rcs
maybe-clean-rcs:
+@if rcs
+maybe-clean-rcs: clean-rcs
clean-rcs:
@[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in rcs" ; \
@@ -12781,16 +15446,20 @@ clean-rcs:
clean) \
|| exit 1
+@endif rcs
.PHONY: maybe-distclean-rcs distclean-rcs
maybe-distclean-rcs:
+@if rcs
+maybe-distclean-rcs: distclean-rcs
distclean-rcs:
@[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in rcs" ; \
@@ -12802,16 +15471,20 @@ distclean-rcs:
distclean) \
|| exit 1
+@endif rcs
.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
maybe-maintainer-clean-rcs:
+@if rcs
+maybe-maintainer-clean-rcs: maintainer-clean-rcs
maintainer-clean-rcs:
@[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in rcs" ; \
@@ -12823,30 +15496,19 @@ maintainer-clean-rcs:
maintainer-clean) \
|| exit 1
+@endif rcs
.PHONY: configure-readline maybe-configure-readline
maybe-configure-readline:
+@if readline
+maybe-configure-readline: configure-readline
configure-readline:
@test ! -f readline/Makefile || exit 0; \
[ -d readline ] || mkdir readline; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in readline; \
cd readline || exit 1; \
case $(srcdir) in \
@@ -12861,41 +15523,56 @@ configure-readline:
libsrcdir="$$s/readline";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif readline
.PHONY: all-readline maybe-all-readline
maybe-all-readline:
+@if readline
+maybe-all-readline: all-readline
all-readline: configure-readline
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif readline
.PHONY: check-readline maybe-check-readline
maybe-check-readline:
+@if readline
+maybe-check-readline: check-readline
check-readline:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif readline
.PHONY: install-readline maybe-install-readline
maybe-install-readline:
+@if readline
+maybe-install-readline: install-readline
install-readline: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif readline
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-readline info-readline
maybe-info-readline:
+@if readline
+maybe-info-readline: info-readline
info-readline: \
configure-readline
@@ -12903,7 +15580,8 @@ info-readline: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in readline" ; \
@@ -12915,9 +15593,12 @@ info-readline: \
info) \
|| exit 1
+@endif readline
.PHONY: maybe-dvi-readline dvi-readline
maybe-dvi-readline:
+@if readline
+maybe-dvi-readline: dvi-readline
dvi-readline: \
configure-readline
@@ -12925,7 +15606,8 @@ dvi-readline: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in readline" ; \
@@ -12937,9 +15619,12 @@ dvi-readline: \
dvi) \
|| exit 1
+@endif readline
.PHONY: maybe-TAGS-readline TAGS-readline
maybe-TAGS-readline:
+@if readline
+maybe-TAGS-readline: TAGS-readline
TAGS-readline: \
configure-readline
@@ -12947,7 +15632,8 @@ TAGS-readline: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in readline" ; \
@@ -12959,9 +15645,12 @@ TAGS-readline: \
TAGS) \
|| exit 1
+@endif readline
.PHONY: maybe-install-info-readline install-info-readline
maybe-install-info-readline:
+@if readline
+maybe-install-info-readline: install-info-readline
install-info-readline: \
configure-readline \
@@ -12970,7 +15659,8 @@ install-info-readline: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in readline" ; \
@@ -12982,9 +15672,12 @@ install-info-readline: \
install-info) \
|| exit 1
+@endif readline
.PHONY: maybe-installcheck-readline installcheck-readline
maybe-installcheck-readline:
+@if readline
+maybe-installcheck-readline: installcheck-readline
installcheck-readline: \
configure-readline
@@ -12992,7 +15685,8 @@ installcheck-readline: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in readline" ; \
@@ -13004,16 +15698,20 @@ installcheck-readline: \
installcheck) \
|| exit 1
+@endif readline
.PHONY: maybe-mostlyclean-readline mostlyclean-readline
maybe-mostlyclean-readline:
+@if readline
+maybe-mostlyclean-readline: mostlyclean-readline
mostlyclean-readline:
@[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in readline" ; \
@@ -13025,16 +15723,20 @@ mostlyclean-readline:
mostlyclean) \
|| exit 1
+@endif readline
.PHONY: maybe-clean-readline clean-readline
maybe-clean-readline:
+@if readline
+maybe-clean-readline: clean-readline
clean-readline:
@[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in readline" ; \
@@ -13046,16 +15748,20 @@ clean-readline:
clean) \
|| exit 1
+@endif readline
.PHONY: maybe-distclean-readline distclean-readline
maybe-distclean-readline:
+@if readline
+maybe-distclean-readline: distclean-readline
distclean-readline:
@[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in readline" ; \
@@ -13067,16 +15773,20 @@ distclean-readline:
distclean) \
|| exit 1
+@endif readline
.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
maybe-maintainer-clean-readline:
+@if readline
+maybe-maintainer-clean-readline: maintainer-clean-readline
maintainer-clean-readline:
@[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in readline" ; \
@@ -13088,30 +15798,19 @@ maintainer-clean-readline:
maintainer-clean) \
|| exit 1
+@endif readline
.PHONY: configure-release maybe-configure-release
maybe-configure-release:
+@if release
+maybe-configure-release: configure-release
configure-release:
@test ! -f release/Makefile || exit 0; \
[ -d release ] || mkdir release; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in release; \
cd release || exit 1; \
case $(srcdir) in \
@@ -13126,33 +15825,46 @@ configure-release:
libsrcdir="$$s/release";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif release
.PHONY: all-release maybe-all-release
maybe-all-release:
+@if release
+maybe-all-release: all-release
all-release: configure-release
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif release
.PHONY: check-release maybe-check-release
maybe-check-release:
+@if release
+maybe-check-release: check-release
check-release:
+@endif release
.PHONY: install-release maybe-install-release
maybe-install-release:
+@if release
+maybe-install-release: install-release
install-release:
+@endif release
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-release info-release
maybe-info-release:
+@if release
+maybe-info-release: info-release
info-release: \
configure-release
@@ -13160,7 +15872,8 @@ info-release: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in release" ; \
@@ -13172,9 +15885,12 @@ info-release: \
info) \
|| exit 1
+@endif release
.PHONY: maybe-dvi-release dvi-release
maybe-dvi-release:
+@if release
+maybe-dvi-release: dvi-release
dvi-release: \
configure-release
@@ -13182,7 +15898,8 @@ dvi-release: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in release" ; \
@@ -13194,9 +15911,12 @@ dvi-release: \
dvi) \
|| exit 1
+@endif release
.PHONY: maybe-TAGS-release TAGS-release
maybe-TAGS-release:
+@if release
+maybe-TAGS-release: TAGS-release
TAGS-release: \
configure-release
@@ -13204,7 +15924,8 @@ TAGS-release: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in release" ; \
@@ -13216,9 +15937,12 @@ TAGS-release: \
TAGS) \
|| exit 1
+@endif release
.PHONY: maybe-install-info-release install-info-release
maybe-install-info-release:
+@if release
+maybe-install-info-release: install-info-release
install-info-release: \
configure-release \
@@ -13227,7 +15951,8 @@ install-info-release: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in release" ; \
@@ -13239,9 +15964,12 @@ install-info-release: \
install-info) \
|| exit 1
+@endif release
.PHONY: maybe-installcheck-release installcheck-release
maybe-installcheck-release:
+@if release
+maybe-installcheck-release: installcheck-release
installcheck-release: \
configure-release
@@ -13249,7 +15977,8 @@ installcheck-release: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in release" ; \
@@ -13261,16 +15990,20 @@ installcheck-release: \
installcheck) \
|| exit 1
+@endif release
.PHONY: maybe-mostlyclean-release mostlyclean-release
maybe-mostlyclean-release:
+@if release
+maybe-mostlyclean-release: mostlyclean-release
mostlyclean-release:
@[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in release" ; \
@@ -13282,16 +16015,20 @@ mostlyclean-release:
mostlyclean) \
|| exit 1
+@endif release
.PHONY: maybe-clean-release clean-release
maybe-clean-release:
+@if release
+maybe-clean-release: clean-release
clean-release:
@[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in release" ; \
@@ -13303,16 +16040,20 @@ clean-release:
clean) \
|| exit 1
+@endif release
.PHONY: maybe-distclean-release distclean-release
maybe-distclean-release:
+@if release
+maybe-distclean-release: distclean-release
distclean-release:
@[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in release" ; \
@@ -13324,16 +16065,20 @@ distclean-release:
distclean) \
|| exit 1
+@endif release
.PHONY: maybe-maintainer-clean-release maintainer-clean-release
maybe-maintainer-clean-release:
+@if release
+maybe-maintainer-clean-release: maintainer-clean-release
maintainer-clean-release:
@[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in release" ; \
@@ -13345,30 +16090,19 @@ maintainer-clean-release:
maintainer-clean) \
|| exit 1
+@endif release
.PHONY: configure-recode maybe-configure-recode
maybe-configure-recode:
+@if recode
+maybe-configure-recode: configure-recode
configure-recode:
@test ! -f recode/Makefile || exit 0; \
[ -d recode ] || mkdir recode; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in recode; \
cd recode || exit 1; \
case $(srcdir) in \
@@ -13383,41 +16117,56 @@ configure-recode:
libsrcdir="$$s/recode";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif recode
.PHONY: all-recode maybe-all-recode
maybe-all-recode:
+@if recode
+maybe-all-recode: all-recode
all-recode: configure-recode
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif recode
.PHONY: check-recode maybe-check-recode
maybe-check-recode:
+@if recode
+maybe-check-recode: check-recode
check-recode:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif recode
.PHONY: install-recode maybe-install-recode
maybe-install-recode:
+@if recode
+maybe-install-recode: install-recode
install-recode: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif recode
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-recode info-recode
maybe-info-recode:
+@if recode
+maybe-info-recode: info-recode
info-recode: \
configure-recode
@@ -13425,7 +16174,8 @@ info-recode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in recode" ; \
@@ -13437,9 +16187,12 @@ info-recode: \
info) \
|| exit 1
+@endif recode
.PHONY: maybe-dvi-recode dvi-recode
maybe-dvi-recode:
+@if recode
+maybe-dvi-recode: dvi-recode
dvi-recode: \
configure-recode
@@ -13447,7 +16200,8 @@ dvi-recode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in recode" ; \
@@ -13459,9 +16213,12 @@ dvi-recode: \
dvi) \
|| exit 1
+@endif recode
.PHONY: maybe-TAGS-recode TAGS-recode
maybe-TAGS-recode:
+@if recode
+maybe-TAGS-recode: TAGS-recode
TAGS-recode: \
configure-recode
@@ -13469,7 +16226,8 @@ TAGS-recode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in recode" ; \
@@ -13481,9 +16239,12 @@ TAGS-recode: \
TAGS) \
|| exit 1
+@endif recode
.PHONY: maybe-install-info-recode install-info-recode
maybe-install-info-recode:
+@if recode
+maybe-install-info-recode: install-info-recode
install-info-recode: \
configure-recode \
@@ -13492,7 +16253,8 @@ install-info-recode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in recode" ; \
@@ -13504,9 +16266,12 @@ install-info-recode: \
install-info) \
|| exit 1
+@endif recode
.PHONY: maybe-installcheck-recode installcheck-recode
maybe-installcheck-recode:
+@if recode
+maybe-installcheck-recode: installcheck-recode
installcheck-recode: \
configure-recode
@@ -13514,7 +16279,8 @@ installcheck-recode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in recode" ; \
@@ -13526,16 +16292,20 @@ installcheck-recode: \
installcheck) \
|| exit 1
+@endif recode
.PHONY: maybe-mostlyclean-recode mostlyclean-recode
maybe-mostlyclean-recode:
+@if recode
+maybe-mostlyclean-recode: mostlyclean-recode
mostlyclean-recode:
@[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in recode" ; \
@@ -13547,16 +16317,20 @@ mostlyclean-recode:
mostlyclean) \
|| exit 1
+@endif recode
.PHONY: maybe-clean-recode clean-recode
maybe-clean-recode:
+@if recode
+maybe-clean-recode: clean-recode
clean-recode:
@[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in recode" ; \
@@ -13568,16 +16342,20 @@ clean-recode:
clean) \
|| exit 1
+@endif recode
.PHONY: maybe-distclean-recode distclean-recode
maybe-distclean-recode:
+@if recode
+maybe-distclean-recode: distclean-recode
distclean-recode:
@[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in recode" ; \
@@ -13589,16 +16367,20 @@ distclean-recode:
distclean) \
|| exit 1
+@endif recode
.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
maybe-maintainer-clean-recode:
+@if recode
+maybe-maintainer-clean-recode: maintainer-clean-recode
maintainer-clean-recode:
@[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in recode" ; \
@@ -13610,30 +16392,19 @@ maintainer-clean-recode:
maintainer-clean) \
|| exit 1
+@endif recode
.PHONY: configure-sed maybe-configure-sed
maybe-configure-sed:
+@if sed
+maybe-configure-sed: configure-sed
configure-sed:
@test ! -f sed/Makefile || exit 0; \
[ -d sed ] || mkdir sed; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in sed; \
cd sed || exit 1; \
case $(srcdir) in \
@@ -13648,41 +16419,56 @@ configure-sed:
libsrcdir="$$s/sed";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif sed
.PHONY: all-sed maybe-all-sed
maybe-all-sed:
+@if sed
+maybe-all-sed: all-sed
all-sed: configure-sed
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif sed
.PHONY: check-sed maybe-check-sed
maybe-check-sed:
+@if sed
+maybe-check-sed: check-sed
check-sed:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif sed
.PHONY: install-sed maybe-install-sed
maybe-install-sed:
+@if sed
+maybe-install-sed: install-sed
install-sed: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif sed
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sed info-sed
maybe-info-sed:
+@if sed
+maybe-info-sed: info-sed
info-sed: \
configure-sed
@@ -13690,7 +16476,8 @@ info-sed: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in sed" ; \
@@ -13702,9 +16489,12 @@ info-sed: \
info) \
|| exit 1
+@endif sed
.PHONY: maybe-dvi-sed dvi-sed
maybe-dvi-sed:
+@if sed
+maybe-dvi-sed: dvi-sed
dvi-sed: \
configure-sed
@@ -13712,7 +16502,8 @@ dvi-sed: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in sed" ; \
@@ -13724,9 +16515,12 @@ dvi-sed: \
dvi) \
|| exit 1
+@endif sed
.PHONY: maybe-TAGS-sed TAGS-sed
maybe-TAGS-sed:
+@if sed
+maybe-TAGS-sed: TAGS-sed
TAGS-sed: \
configure-sed
@@ -13734,7 +16528,8 @@ TAGS-sed: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in sed" ; \
@@ -13746,9 +16541,12 @@ TAGS-sed: \
TAGS) \
|| exit 1
+@endif sed
.PHONY: maybe-install-info-sed install-info-sed
maybe-install-info-sed:
+@if sed
+maybe-install-info-sed: install-info-sed
install-info-sed: \
configure-sed \
@@ -13757,7 +16555,8 @@ install-info-sed: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in sed" ; \
@@ -13769,9 +16568,12 @@ install-info-sed: \
install-info) \
|| exit 1
+@endif sed
.PHONY: maybe-installcheck-sed installcheck-sed
maybe-installcheck-sed:
+@if sed
+maybe-installcheck-sed: installcheck-sed
installcheck-sed: \
configure-sed
@@ -13779,7 +16581,8 @@ installcheck-sed: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in sed" ; \
@@ -13791,16 +16594,20 @@ installcheck-sed: \
installcheck) \
|| exit 1
+@endif sed
.PHONY: maybe-mostlyclean-sed mostlyclean-sed
maybe-mostlyclean-sed:
+@if sed
+maybe-mostlyclean-sed: mostlyclean-sed
mostlyclean-sed:
@[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in sed" ; \
@@ -13812,16 +16619,20 @@ mostlyclean-sed:
mostlyclean) \
|| exit 1
+@endif sed
.PHONY: maybe-clean-sed clean-sed
maybe-clean-sed:
+@if sed
+maybe-clean-sed: clean-sed
clean-sed:
@[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in sed" ; \
@@ -13833,16 +16644,20 @@ clean-sed:
clean) \
|| exit 1
+@endif sed
.PHONY: maybe-distclean-sed distclean-sed
maybe-distclean-sed:
+@if sed
+maybe-distclean-sed: distclean-sed
distclean-sed:
@[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in sed" ; \
@@ -13854,16 +16669,20 @@ distclean-sed:
distclean) \
|| exit 1
+@endif sed
.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
maybe-maintainer-clean-sed:
+@if sed
+maybe-maintainer-clean-sed: maintainer-clean-sed
maintainer-clean-sed:
@[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in sed" ; \
@@ -13875,30 +16694,19 @@ maintainer-clean-sed:
maintainer-clean) \
|| exit 1
+@endif sed
.PHONY: configure-send-pr maybe-configure-send-pr
maybe-configure-send-pr:
+@if send-pr
+maybe-configure-send-pr: configure-send-pr
configure-send-pr:
@test ! -f send-pr/Makefile || exit 0; \
[ -d send-pr ] || mkdir send-pr; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in send-pr; \
cd send-pr || exit 1; \
case $(srcdir) in \
@@ -13913,41 +16721,56 @@ configure-send-pr:
libsrcdir="$$s/send-pr";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif send-pr
.PHONY: all-send-pr maybe-all-send-pr
maybe-all-send-pr:
+@if send-pr
+maybe-all-send-pr: all-send-pr
all-send-pr: configure-send-pr
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif send-pr
.PHONY: check-send-pr maybe-check-send-pr
maybe-check-send-pr:
+@if send-pr
+maybe-check-send-pr: check-send-pr
check-send-pr:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif send-pr
.PHONY: install-send-pr maybe-install-send-pr
maybe-install-send-pr:
+@if send-pr
+maybe-install-send-pr: install-send-pr
install-send-pr: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif send-pr
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-send-pr info-send-pr
maybe-info-send-pr:
+@if send-pr
+maybe-info-send-pr: info-send-pr
info-send-pr: \
configure-send-pr
@@ -13955,7 +16778,8 @@ info-send-pr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in send-pr" ; \
@@ -13967,9 +16791,12 @@ info-send-pr: \
info) \
|| exit 1
+@endif send-pr
.PHONY: maybe-dvi-send-pr dvi-send-pr
maybe-dvi-send-pr:
+@if send-pr
+maybe-dvi-send-pr: dvi-send-pr
dvi-send-pr: \
configure-send-pr
@@ -13977,7 +16804,8 @@ dvi-send-pr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in send-pr" ; \
@@ -13989,9 +16817,12 @@ dvi-send-pr: \
dvi) \
|| exit 1
+@endif send-pr
.PHONY: maybe-TAGS-send-pr TAGS-send-pr
maybe-TAGS-send-pr:
+@if send-pr
+maybe-TAGS-send-pr: TAGS-send-pr
TAGS-send-pr: \
configure-send-pr
@@ -13999,7 +16830,8 @@ TAGS-send-pr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in send-pr" ; \
@@ -14011,9 +16843,12 @@ TAGS-send-pr: \
TAGS) \
|| exit 1
+@endif send-pr
.PHONY: maybe-install-info-send-pr install-info-send-pr
maybe-install-info-send-pr:
+@if send-pr
+maybe-install-info-send-pr: install-info-send-pr
install-info-send-pr: \
configure-send-pr \
@@ -14022,7 +16857,8 @@ install-info-send-pr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ 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" ; \
@@ -14034,9 +16870,12 @@ install-info-send-pr: \
install-info) \
|| exit 1
+@endif send-pr
.PHONY: maybe-installcheck-send-pr installcheck-send-pr
maybe-installcheck-send-pr:
+@if send-pr
+maybe-installcheck-send-pr: installcheck-send-pr
installcheck-send-pr: \
configure-send-pr
@@ -14044,7 +16883,8 @@ installcheck-send-pr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in send-pr" ; \
@@ -14056,16 +16896,20 @@ installcheck-send-pr: \
installcheck) \
|| exit 1
+@endif send-pr
.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
maybe-mostlyclean-send-pr:
+@if send-pr
+maybe-mostlyclean-send-pr: mostlyclean-send-pr
mostlyclean-send-pr:
@[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in send-pr" ; \
@@ -14077,16 +16921,20 @@ mostlyclean-send-pr:
mostlyclean) \
|| exit 1
+@endif send-pr
.PHONY: maybe-clean-send-pr clean-send-pr
maybe-clean-send-pr:
+@if send-pr
+maybe-clean-send-pr: clean-send-pr
clean-send-pr:
@[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in send-pr" ; \
@@ -14098,16 +16946,20 @@ clean-send-pr:
clean) \
|| exit 1
+@endif send-pr
.PHONY: maybe-distclean-send-pr distclean-send-pr
maybe-distclean-send-pr:
+@if send-pr
+maybe-distclean-send-pr: distclean-send-pr
distclean-send-pr:
@[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in send-pr" ; \
@@ -14119,16 +16971,20 @@ distclean-send-pr:
distclean) \
|| exit 1
+@endif send-pr
.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
maybe-maintainer-clean-send-pr:
+@if send-pr
+maybe-maintainer-clean-send-pr: maintainer-clean-send-pr
maintainer-clean-send-pr:
@[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ 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" ; \
@@ -14140,30 +16996,19 @@ maintainer-clean-send-pr:
maintainer-clean) \
|| exit 1
+@endif send-pr
.PHONY: configure-shellutils maybe-configure-shellutils
maybe-configure-shellutils:
+@if shellutils
+maybe-configure-shellutils: configure-shellutils
configure-shellutils:
@test ! -f shellutils/Makefile || exit 0; \
[ -d shellutils ] || mkdir shellutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in shellutils; \
cd shellutils || exit 1; \
case $(srcdir) in \
@@ -14178,41 +17023,56 @@ configure-shellutils:
libsrcdir="$$s/shellutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif shellutils
.PHONY: all-shellutils maybe-all-shellutils
maybe-all-shellutils:
+@if shellutils
+maybe-all-shellutils: all-shellutils
all-shellutils: configure-shellutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif shellutils
.PHONY: check-shellutils maybe-check-shellutils
maybe-check-shellutils:
+@if shellutils
+maybe-check-shellutils: check-shellutils
check-shellutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif shellutils
.PHONY: install-shellutils maybe-install-shellutils
maybe-install-shellutils:
+@if shellutils
+maybe-install-shellutils: install-shellutils
install-shellutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif shellutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-shellutils info-shellutils
maybe-info-shellutils:
+@if shellutils
+maybe-info-shellutils: info-shellutils
info-shellutils: \
configure-shellutils
@@ -14220,7 +17080,8 @@ info-shellutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in shellutils" ; \
@@ -14232,9 +17093,12 @@ info-shellutils: \
info) \
|| exit 1
+@endif shellutils
.PHONY: maybe-dvi-shellutils dvi-shellutils
maybe-dvi-shellutils:
+@if shellutils
+maybe-dvi-shellutils: dvi-shellutils
dvi-shellutils: \
configure-shellutils
@@ -14242,7 +17106,8 @@ dvi-shellutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in shellutils" ; \
@@ -14254,9 +17119,12 @@ dvi-shellutils: \
dvi) \
|| exit 1
+@endif shellutils
.PHONY: maybe-TAGS-shellutils TAGS-shellutils
maybe-TAGS-shellutils:
+@if shellutils
+maybe-TAGS-shellutils: TAGS-shellutils
TAGS-shellutils: \
configure-shellutils
@@ -14264,7 +17132,8 @@ TAGS-shellutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in shellutils" ; \
@@ -14276,9 +17145,12 @@ TAGS-shellutils: \
TAGS) \
|| exit 1
+@endif shellutils
.PHONY: maybe-install-info-shellutils install-info-shellutils
maybe-install-info-shellutils:
+@if shellutils
+maybe-install-info-shellutils: install-info-shellutils
install-info-shellutils: \
configure-shellutils \
@@ -14287,7 +17159,8 @@ install-info-shellutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in shellutils" ; \
@@ -14299,9 +17172,12 @@ install-info-shellutils: \
install-info) \
|| exit 1
+@endif shellutils
.PHONY: maybe-installcheck-shellutils installcheck-shellutils
maybe-installcheck-shellutils:
+@if shellutils
+maybe-installcheck-shellutils: installcheck-shellutils
installcheck-shellutils: \
configure-shellutils
@@ -14309,7 +17185,8 @@ installcheck-shellutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in shellutils" ; \
@@ -14321,16 +17198,20 @@ installcheck-shellutils: \
installcheck) \
|| exit 1
+@endif shellutils
.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
maybe-mostlyclean-shellutils:
+@if shellutils
+maybe-mostlyclean-shellutils: mostlyclean-shellutils
mostlyclean-shellutils:
@[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in shellutils" ; \
@@ -14342,16 +17223,20 @@ mostlyclean-shellutils:
mostlyclean) \
|| exit 1
+@endif shellutils
.PHONY: maybe-clean-shellutils clean-shellutils
maybe-clean-shellutils:
+@if shellutils
+maybe-clean-shellutils: clean-shellutils
clean-shellutils:
@[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in shellutils" ; \
@@ -14363,16 +17248,20 @@ clean-shellutils:
clean) \
|| exit 1
+@endif shellutils
.PHONY: maybe-distclean-shellutils distclean-shellutils
maybe-distclean-shellutils:
+@if shellutils
+maybe-distclean-shellutils: distclean-shellutils
distclean-shellutils:
@[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in shellutils" ; \
@@ -14384,16 +17273,20 @@ distclean-shellutils:
distclean) \
|| exit 1
+@endif shellutils
.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
maybe-maintainer-clean-shellutils:
+@if shellutils
+maybe-maintainer-clean-shellutils: maintainer-clean-shellutils
maintainer-clean-shellutils:
@[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in shellutils" ; \
@@ -14405,30 +17298,19 @@ maintainer-clean-shellutils:
maintainer-clean) \
|| exit 1
+@endif shellutils
.PHONY: configure-sid maybe-configure-sid
maybe-configure-sid:
+@if sid
+maybe-configure-sid: configure-sid
configure-sid:
@test ! -f sid/Makefile || exit 0; \
[ -d sid ] || mkdir sid; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in sid; \
cd sid || exit 1; \
case $(srcdir) in \
@@ -14443,41 +17325,56 @@ configure-sid:
libsrcdir="$$s/sid";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif sid
.PHONY: all-sid maybe-all-sid
maybe-all-sid:
+@if sid
+maybe-all-sid: all-sid
all-sid: configure-sid
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif sid
.PHONY: check-sid maybe-check-sid
maybe-check-sid:
+@if sid
+maybe-check-sid: check-sid
check-sid:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif sid
.PHONY: install-sid maybe-install-sid
maybe-install-sid:
+@if sid
+maybe-install-sid: install-sid
install-sid: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif sid
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sid info-sid
maybe-info-sid:
+@if sid
+maybe-info-sid: info-sid
info-sid: \
configure-sid
@@ -14485,7 +17382,8 @@ info-sid: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in sid" ; \
@@ -14497,9 +17395,12 @@ info-sid: \
info) \
|| exit 1
+@endif sid
.PHONY: maybe-dvi-sid dvi-sid
maybe-dvi-sid:
+@if sid
+maybe-dvi-sid: dvi-sid
dvi-sid: \
configure-sid
@@ -14507,7 +17408,8 @@ dvi-sid: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in sid" ; \
@@ -14519,9 +17421,12 @@ dvi-sid: \
dvi) \
|| exit 1
+@endif sid
.PHONY: maybe-TAGS-sid TAGS-sid
maybe-TAGS-sid:
+@if sid
+maybe-TAGS-sid: TAGS-sid
TAGS-sid: \
configure-sid
@@ -14529,7 +17434,8 @@ TAGS-sid: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in sid" ; \
@@ -14541,9 +17447,12 @@ TAGS-sid: \
TAGS) \
|| exit 1
+@endif sid
.PHONY: maybe-install-info-sid install-info-sid
maybe-install-info-sid:
+@if sid
+maybe-install-info-sid: install-info-sid
install-info-sid: \
configure-sid \
@@ -14552,7 +17461,8 @@ install-info-sid: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in sid" ; \
@@ -14564,9 +17474,12 @@ install-info-sid: \
install-info) \
|| exit 1
+@endif sid
.PHONY: maybe-installcheck-sid installcheck-sid
maybe-installcheck-sid:
+@if sid
+maybe-installcheck-sid: installcheck-sid
installcheck-sid: \
configure-sid
@@ -14574,7 +17487,8 @@ installcheck-sid: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in sid" ; \
@@ -14586,16 +17500,20 @@ installcheck-sid: \
installcheck) \
|| exit 1
+@endif sid
.PHONY: maybe-mostlyclean-sid mostlyclean-sid
maybe-mostlyclean-sid:
+@if sid
+maybe-mostlyclean-sid: mostlyclean-sid
mostlyclean-sid:
@[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in sid" ; \
@@ -14607,16 +17525,20 @@ mostlyclean-sid:
mostlyclean) \
|| exit 1
+@endif sid
.PHONY: maybe-clean-sid clean-sid
maybe-clean-sid:
+@if sid
+maybe-clean-sid: clean-sid
clean-sid:
@[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in sid" ; \
@@ -14628,16 +17550,20 @@ clean-sid:
clean) \
|| exit 1
+@endif sid
.PHONY: maybe-distclean-sid distclean-sid
maybe-distclean-sid:
+@if sid
+maybe-distclean-sid: distclean-sid
distclean-sid:
@[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in sid" ; \
@@ -14649,16 +17575,20 @@ distclean-sid:
distclean) \
|| exit 1
+@endif sid
.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid
maybe-maintainer-clean-sid:
+@if sid
+maybe-maintainer-clean-sid: maintainer-clean-sid
maintainer-clean-sid:
@[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in sid" ; \
@@ -14670,30 +17600,19 @@ maintainer-clean-sid:
maintainer-clean) \
|| exit 1
+@endif sid
.PHONY: configure-sim maybe-configure-sim
maybe-configure-sim:
+@if sim
+maybe-configure-sim: configure-sim
configure-sim:
@test ! -f sim/Makefile || exit 0; \
[ -d sim ] || mkdir sim; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in sim; \
cd sim || exit 1; \
case $(srcdir) in \
@@ -14708,41 +17627,56 @@ configure-sim:
libsrcdir="$$s/sim";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif sim
.PHONY: all-sim maybe-all-sim
maybe-all-sim:
+@if sim
+maybe-all-sim: all-sim
all-sim: configure-sim
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif sim
.PHONY: check-sim maybe-check-sim
maybe-check-sim:
+@if sim
+maybe-check-sim: check-sim
check-sim:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif sim
.PHONY: install-sim maybe-install-sim
maybe-install-sim:
+@if sim
+maybe-install-sim: install-sim
install-sim: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif sim
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sim info-sim
maybe-info-sim:
+@if sim
+maybe-info-sim: info-sim
info-sim: \
configure-sim
@@ -14750,7 +17684,8 @@ info-sim: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in sim" ; \
@@ -14762,9 +17697,12 @@ info-sim: \
info) \
|| exit 1
+@endif sim
.PHONY: maybe-dvi-sim dvi-sim
maybe-dvi-sim:
+@if sim
+maybe-dvi-sim: dvi-sim
dvi-sim: \
configure-sim
@@ -14772,7 +17710,8 @@ dvi-sim: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in sim" ; \
@@ -14784,9 +17723,12 @@ dvi-sim: \
dvi) \
|| exit 1
+@endif sim
.PHONY: maybe-TAGS-sim TAGS-sim
maybe-TAGS-sim:
+@if sim
+maybe-TAGS-sim: TAGS-sim
TAGS-sim: \
configure-sim
@@ -14794,7 +17736,8 @@ TAGS-sim: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in sim" ; \
@@ -14806,9 +17749,12 @@ TAGS-sim: \
TAGS) \
|| exit 1
+@endif sim
.PHONY: maybe-install-info-sim install-info-sim
maybe-install-info-sim:
+@if sim
+maybe-install-info-sim: install-info-sim
install-info-sim: \
configure-sim \
@@ -14817,7 +17763,8 @@ install-info-sim: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in sim" ; \
@@ -14829,9 +17776,12 @@ install-info-sim: \
install-info) \
|| exit 1
+@endif sim
.PHONY: maybe-installcheck-sim installcheck-sim
maybe-installcheck-sim:
+@if sim
+maybe-installcheck-sim: installcheck-sim
installcheck-sim: \
configure-sim
@@ -14839,7 +17789,8 @@ installcheck-sim: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in sim" ; \
@@ -14851,16 +17802,20 @@ installcheck-sim: \
installcheck) \
|| exit 1
+@endif sim
.PHONY: maybe-mostlyclean-sim mostlyclean-sim
maybe-mostlyclean-sim:
+@if sim
+maybe-mostlyclean-sim: mostlyclean-sim
mostlyclean-sim:
@[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in sim" ; \
@@ -14872,16 +17827,20 @@ mostlyclean-sim:
mostlyclean) \
|| exit 1
+@endif sim
.PHONY: maybe-clean-sim clean-sim
maybe-clean-sim:
+@if sim
+maybe-clean-sim: clean-sim
clean-sim:
@[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in sim" ; \
@@ -14893,16 +17852,20 @@ clean-sim:
clean) \
|| exit 1
+@endif sim
.PHONY: maybe-distclean-sim distclean-sim
maybe-distclean-sim:
+@if sim
+maybe-distclean-sim: distclean-sim
distclean-sim:
@[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in sim" ; \
@@ -14914,16 +17877,20 @@ distclean-sim:
distclean) \
|| exit 1
+@endif sim
.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim
maybe-maintainer-clean-sim:
+@if sim
+maybe-maintainer-clean-sim: maintainer-clean-sim
maintainer-clean-sim:
@[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in sim" ; \
@@ -14935,30 +17902,19 @@ maintainer-clean-sim:
maintainer-clean) \
|| exit 1
+@endif sim
.PHONY: configure-tar maybe-configure-tar
maybe-configure-tar:
+@if tar
+maybe-configure-tar: configure-tar
configure-tar:
@test ! -f tar/Makefile || exit 0; \
[ -d tar ] || mkdir tar; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in tar; \
cd tar || exit 1; \
case $(srcdir) in \
@@ -14973,41 +17929,56 @@ configure-tar:
libsrcdir="$$s/tar";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif tar
.PHONY: all-tar maybe-all-tar
maybe-all-tar:
+@if tar
+maybe-all-tar: all-tar
all-tar: configure-tar
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif tar
.PHONY: check-tar maybe-check-tar
maybe-check-tar:
+@if tar
+maybe-check-tar: check-tar
check-tar:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif tar
.PHONY: install-tar maybe-install-tar
maybe-install-tar:
+@if tar
+maybe-install-tar: install-tar
install-tar: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif tar
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tar info-tar
maybe-info-tar:
+@if tar
+maybe-info-tar: info-tar
info-tar: \
configure-tar
@@ -15015,7 +17986,8 @@ info-tar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in tar" ; \
@@ -15027,9 +17999,12 @@ info-tar: \
info) \
|| exit 1
+@endif tar
.PHONY: maybe-dvi-tar dvi-tar
maybe-dvi-tar:
+@if tar
+maybe-dvi-tar: dvi-tar
dvi-tar: \
configure-tar
@@ -15037,7 +18012,8 @@ dvi-tar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in tar" ; \
@@ -15049,9 +18025,12 @@ dvi-tar: \
dvi) \
|| exit 1
+@endif tar
.PHONY: maybe-TAGS-tar TAGS-tar
maybe-TAGS-tar:
+@if tar
+maybe-TAGS-tar: TAGS-tar
TAGS-tar: \
configure-tar
@@ -15059,7 +18038,8 @@ TAGS-tar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in tar" ; \
@@ -15071,9 +18051,12 @@ TAGS-tar: \
TAGS) \
|| exit 1
+@endif tar
.PHONY: maybe-install-info-tar install-info-tar
maybe-install-info-tar:
+@if tar
+maybe-install-info-tar: install-info-tar
install-info-tar: \
configure-tar \
@@ -15082,7 +18065,8 @@ install-info-tar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in tar" ; \
@@ -15094,9 +18078,12 @@ install-info-tar: \
install-info) \
|| exit 1
+@endif tar
.PHONY: maybe-installcheck-tar installcheck-tar
maybe-installcheck-tar:
+@if tar
+maybe-installcheck-tar: installcheck-tar
installcheck-tar: \
configure-tar
@@ -15104,7 +18091,8 @@ installcheck-tar: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in tar" ; \
@@ -15116,16 +18104,20 @@ installcheck-tar: \
installcheck) \
|| exit 1
+@endif tar
.PHONY: maybe-mostlyclean-tar mostlyclean-tar
maybe-mostlyclean-tar:
+@if tar
+maybe-mostlyclean-tar: mostlyclean-tar
mostlyclean-tar:
@[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in tar" ; \
@@ -15137,16 +18129,20 @@ mostlyclean-tar:
mostlyclean) \
|| exit 1
+@endif tar
.PHONY: maybe-clean-tar clean-tar
maybe-clean-tar:
+@if tar
+maybe-clean-tar: clean-tar
clean-tar:
@[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in tar" ; \
@@ -15158,16 +18154,20 @@ clean-tar:
clean) \
|| exit 1
+@endif tar
.PHONY: maybe-distclean-tar distclean-tar
maybe-distclean-tar:
+@if tar
+maybe-distclean-tar: distclean-tar
distclean-tar:
@[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in tar" ; \
@@ -15179,16 +18179,20 @@ distclean-tar:
distclean) \
|| exit 1
+@endif tar
.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
maybe-maintainer-clean-tar:
+@if tar
+maybe-maintainer-clean-tar: maintainer-clean-tar
maintainer-clean-tar:
@[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in tar" ; \
@@ -15200,30 +18204,19 @@ maintainer-clean-tar:
maintainer-clean) \
|| exit 1
+@endif tar
.PHONY: configure-texinfo maybe-configure-texinfo
maybe-configure-texinfo:
+@if texinfo
+maybe-configure-texinfo: configure-texinfo
configure-texinfo:
@test ! -f texinfo/Makefile || exit 0; \
[ -d texinfo ] || mkdir texinfo; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in texinfo; \
cd texinfo || exit 1; \
case $(srcdir) in \
@@ -15238,37 +18231,51 @@ configure-texinfo:
libsrcdir="$$s/texinfo";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif texinfo
.PHONY: all-texinfo maybe-all-texinfo
maybe-all-texinfo:
+@if texinfo
+maybe-all-texinfo: all-texinfo
all-texinfo: configure-texinfo
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif texinfo
.PHONY: check-texinfo maybe-check-texinfo
maybe-check-texinfo:
+@if texinfo
+maybe-check-texinfo: check-texinfo
check-texinfo:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif texinfo
.PHONY: install-texinfo maybe-install-texinfo
maybe-install-texinfo:
+@if texinfo
+maybe-install-texinfo: install-texinfo
install-texinfo:
+@endif texinfo
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-texinfo info-texinfo
maybe-info-texinfo:
+@if texinfo
+maybe-info-texinfo: info-texinfo
info-texinfo: \
configure-texinfo
@@ -15276,7 +18283,8 @@ info-texinfo: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in texinfo" ; \
@@ -15288,9 +18296,12 @@ info-texinfo: \
info) \
|| exit 1
+@endif texinfo
.PHONY: maybe-dvi-texinfo dvi-texinfo
maybe-dvi-texinfo:
+@if texinfo
+maybe-dvi-texinfo: dvi-texinfo
dvi-texinfo: \
configure-texinfo
@@ -15298,7 +18309,8 @@ dvi-texinfo: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in texinfo" ; \
@@ -15310,9 +18322,12 @@ dvi-texinfo: \
dvi) \
|| exit 1
+@endif texinfo
.PHONY: maybe-TAGS-texinfo TAGS-texinfo
maybe-TAGS-texinfo:
+@if texinfo
+maybe-TAGS-texinfo: TAGS-texinfo
TAGS-texinfo: \
configure-texinfo
@@ -15320,7 +18335,8 @@ TAGS-texinfo: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in texinfo" ; \
@@ -15332,9 +18348,12 @@ TAGS-texinfo: \
TAGS) \
|| exit 1
+@endif texinfo
.PHONY: maybe-install-info-texinfo install-info-texinfo
maybe-install-info-texinfo:
+@if texinfo
+maybe-install-info-texinfo: install-info-texinfo
install-info-texinfo: \
configure-texinfo \
@@ -15343,7 +18362,8 @@ install-info-texinfo: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in texinfo" ; \
@@ -15355,9 +18375,12 @@ install-info-texinfo: \
install-info) \
|| exit 1
+@endif texinfo
.PHONY: maybe-installcheck-texinfo installcheck-texinfo
maybe-installcheck-texinfo:
+@if texinfo
+maybe-installcheck-texinfo: installcheck-texinfo
installcheck-texinfo: \
configure-texinfo
@@ -15365,7 +18388,8 @@ installcheck-texinfo: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in texinfo" ; \
@@ -15377,16 +18401,20 @@ installcheck-texinfo: \
installcheck) \
|| exit 1
+@endif texinfo
.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo
maybe-mostlyclean-texinfo:
+@if texinfo
+maybe-mostlyclean-texinfo: mostlyclean-texinfo
mostlyclean-texinfo:
@[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in texinfo" ; \
@@ -15398,16 +18426,20 @@ mostlyclean-texinfo:
mostlyclean) \
|| exit 1
+@endif texinfo
.PHONY: maybe-clean-texinfo clean-texinfo
maybe-clean-texinfo:
+@if texinfo
+maybe-clean-texinfo: clean-texinfo
clean-texinfo:
@[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in texinfo" ; \
@@ -15419,16 +18451,20 @@ clean-texinfo:
clean) \
|| exit 1
+@endif texinfo
.PHONY: maybe-distclean-texinfo distclean-texinfo
maybe-distclean-texinfo:
+@if texinfo
+maybe-distclean-texinfo: distclean-texinfo
distclean-texinfo:
@[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in texinfo" ; \
@@ -15440,16 +18476,20 @@ distclean-texinfo:
distclean) \
|| exit 1
+@endif texinfo
.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo
maybe-maintainer-clean-texinfo:
+@if texinfo
+maybe-maintainer-clean-texinfo: maintainer-clean-texinfo
maintainer-clean-texinfo:
@[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in texinfo" ; \
@@ -15461,30 +18501,19 @@ maintainer-clean-texinfo:
maintainer-clean) \
|| exit 1
+@endif texinfo
.PHONY: configure-textutils maybe-configure-textutils
maybe-configure-textutils:
+@if textutils
+maybe-configure-textutils: configure-textutils
configure-textutils:
@test ! -f textutils/Makefile || exit 0; \
[ -d textutils ] || mkdir textutils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in textutils; \
cd textutils || exit 1; \
case $(srcdir) in \
@@ -15499,41 +18528,56 @@ configure-textutils:
libsrcdir="$$s/textutils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif textutils
.PHONY: all-textutils maybe-all-textutils
maybe-all-textutils:
+@if textutils
+maybe-all-textutils: all-textutils
all-textutils: configure-textutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif textutils
.PHONY: check-textutils maybe-check-textutils
maybe-check-textutils:
+@if textutils
+maybe-check-textutils: check-textutils
check-textutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif textutils
.PHONY: install-textutils maybe-install-textutils
maybe-install-textutils:
+@if textutils
+maybe-install-textutils: install-textutils
install-textutils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif textutils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-textutils info-textutils
maybe-info-textutils:
+@if textutils
+maybe-info-textutils: info-textutils
info-textutils: \
configure-textutils
@@ -15541,7 +18585,8 @@ info-textutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in textutils" ; \
@@ -15553,9 +18598,12 @@ info-textutils: \
info) \
|| exit 1
+@endif textutils
.PHONY: maybe-dvi-textutils dvi-textutils
maybe-dvi-textutils:
+@if textutils
+maybe-dvi-textutils: dvi-textutils
dvi-textutils: \
configure-textutils
@@ -15563,7 +18611,8 @@ dvi-textutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in textutils" ; \
@@ -15575,9 +18624,12 @@ dvi-textutils: \
dvi) \
|| exit 1
+@endif textutils
.PHONY: maybe-TAGS-textutils TAGS-textutils
maybe-TAGS-textutils:
+@if textutils
+maybe-TAGS-textutils: TAGS-textutils
TAGS-textutils: \
configure-textutils
@@ -15585,7 +18637,8 @@ TAGS-textutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in textutils" ; \
@@ -15597,9 +18650,12 @@ TAGS-textutils: \
TAGS) \
|| exit 1
+@endif textutils
.PHONY: maybe-install-info-textutils install-info-textutils
maybe-install-info-textutils:
+@if textutils
+maybe-install-info-textutils: install-info-textutils
install-info-textutils: \
configure-textutils \
@@ -15608,7 +18664,8 @@ install-info-textutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in textutils" ; \
@@ -15620,9 +18677,12 @@ install-info-textutils: \
install-info) \
|| exit 1
+@endif textutils
.PHONY: maybe-installcheck-textutils installcheck-textutils
maybe-installcheck-textutils:
+@if textutils
+maybe-installcheck-textutils: installcheck-textutils
installcheck-textutils: \
configure-textutils
@@ -15630,7 +18690,8 @@ installcheck-textutils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in textutils" ; \
@@ -15642,16 +18703,20 @@ installcheck-textutils: \
installcheck) \
|| exit 1
+@endif textutils
.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
maybe-mostlyclean-textutils:
+@if textutils
+maybe-mostlyclean-textutils: mostlyclean-textutils
mostlyclean-textutils:
@[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in textutils" ; \
@@ -15663,16 +18728,20 @@ mostlyclean-textutils:
mostlyclean) \
|| exit 1
+@endif textutils
.PHONY: maybe-clean-textutils clean-textutils
maybe-clean-textutils:
+@if textutils
+maybe-clean-textutils: clean-textutils
clean-textutils:
@[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in textutils" ; \
@@ -15684,16 +18753,20 @@ clean-textutils:
clean) \
|| exit 1
+@endif textutils
.PHONY: maybe-distclean-textutils distclean-textutils
maybe-distclean-textutils:
+@if textutils
+maybe-distclean-textutils: distclean-textutils
distclean-textutils:
@[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in textutils" ; \
@@ -15705,16 +18778,20 @@ distclean-textutils:
distclean) \
|| exit 1
+@endif textutils
.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
maybe-maintainer-clean-textutils:
+@if textutils
+maybe-maintainer-clean-textutils: maintainer-clean-textutils
maintainer-clean-textutils:
@[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in textutils" ; \
@@ -15726,30 +18803,19 @@ maintainer-clean-textutils:
maintainer-clean) \
|| exit 1
+@endif textutils
.PHONY: configure-time maybe-configure-time
maybe-configure-time:
+@if time
+maybe-configure-time: configure-time
configure-time:
@test ! -f time/Makefile || exit 0; \
[ -d time ] || mkdir time; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in time; \
cd time || exit 1; \
case $(srcdir) in \
@@ -15764,41 +18830,56 @@ configure-time:
libsrcdir="$$s/time";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif time
.PHONY: all-time maybe-all-time
maybe-all-time:
+@if time
+maybe-all-time: all-time
all-time: configure-time
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif time
.PHONY: check-time maybe-check-time
maybe-check-time:
+@if time
+maybe-check-time: check-time
check-time:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd time && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif time
.PHONY: install-time maybe-install-time
maybe-install-time:
+@if time
+maybe-install-time: install-time
install-time: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd time && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif time
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-time info-time
maybe-info-time:
+@if time
+maybe-info-time: info-time
info-time: \
configure-time
@@ -15806,7 +18887,8 @@ info-time: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in time" ; \
@@ -15818,9 +18900,12 @@ info-time: \
info) \
|| exit 1
+@endif time
.PHONY: maybe-dvi-time dvi-time
maybe-dvi-time:
+@if time
+maybe-dvi-time: dvi-time
dvi-time: \
configure-time
@@ -15828,7 +18913,8 @@ dvi-time: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in time" ; \
@@ -15840,9 +18926,12 @@ dvi-time: \
dvi) \
|| exit 1
+@endif time
.PHONY: maybe-TAGS-time TAGS-time
maybe-TAGS-time:
+@if time
+maybe-TAGS-time: TAGS-time
TAGS-time: \
configure-time
@@ -15850,7 +18939,8 @@ TAGS-time: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in time" ; \
@@ -15862,9 +18952,12 @@ TAGS-time: \
TAGS) \
|| exit 1
+@endif time
.PHONY: maybe-install-info-time install-info-time
maybe-install-info-time:
+@if time
+maybe-install-info-time: install-info-time
install-info-time: \
configure-time \
@@ -15873,7 +18966,8 @@ install-info-time: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in time" ; \
@@ -15885,9 +18979,12 @@ install-info-time: \
install-info) \
|| exit 1
+@endif time
.PHONY: maybe-installcheck-time installcheck-time
maybe-installcheck-time:
+@if time
+maybe-installcheck-time: installcheck-time
installcheck-time: \
configure-time
@@ -15895,7 +18992,8 @@ installcheck-time: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in time" ; \
@@ -15907,16 +19005,20 @@ installcheck-time: \
installcheck) \
|| exit 1
+@endif time
.PHONY: maybe-mostlyclean-time mostlyclean-time
maybe-mostlyclean-time:
+@if time
+maybe-mostlyclean-time: mostlyclean-time
mostlyclean-time:
@[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in time" ; \
@@ -15928,16 +19030,20 @@ mostlyclean-time:
mostlyclean) \
|| exit 1
+@endif time
.PHONY: maybe-clean-time clean-time
maybe-clean-time:
+@if time
+maybe-clean-time: clean-time
clean-time:
@[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in time" ; \
@@ -15949,16 +19055,20 @@ clean-time:
clean) \
|| exit 1
+@endif time
.PHONY: maybe-distclean-time distclean-time
maybe-distclean-time:
+@if time
+maybe-distclean-time: distclean-time
distclean-time:
@[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in time" ; \
@@ -15970,16 +19080,20 @@ distclean-time:
distclean) \
|| exit 1
+@endif time
.PHONY: maybe-maintainer-clean-time maintainer-clean-time
maybe-maintainer-clean-time:
+@if time
+maybe-maintainer-clean-time: maintainer-clean-time
maintainer-clean-time:
@[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in time" ; \
@@ -15991,30 +19105,19 @@ maintainer-clean-time:
maintainer-clean) \
|| exit 1
+@endif time
.PHONY: configure-uudecode maybe-configure-uudecode
maybe-configure-uudecode:
+@if uudecode
+maybe-configure-uudecode: configure-uudecode
configure-uudecode:
@test ! -f uudecode/Makefile || exit 0; \
[ -d uudecode ] || mkdir uudecode; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in uudecode; \
cd uudecode || exit 1; \
case $(srcdir) in \
@@ -16029,41 +19132,56 @@ configure-uudecode:
libsrcdir="$$s/uudecode";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif uudecode
.PHONY: all-uudecode maybe-all-uudecode
maybe-all-uudecode:
+@if uudecode
+maybe-all-uudecode: all-uudecode
all-uudecode: configure-uudecode
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif uudecode
.PHONY: check-uudecode maybe-check-uudecode
maybe-check-uudecode:
+@if uudecode
+maybe-check-uudecode: check-uudecode
check-uudecode:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif uudecode
.PHONY: install-uudecode maybe-install-uudecode
maybe-install-uudecode:
+@if uudecode
+maybe-install-uudecode: install-uudecode
install-uudecode: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif uudecode
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-uudecode info-uudecode
maybe-info-uudecode:
+@if uudecode
+maybe-info-uudecode: info-uudecode
info-uudecode: \
configure-uudecode
@@ -16071,7 +19189,8 @@ info-uudecode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in uudecode" ; \
@@ -16083,9 +19202,12 @@ info-uudecode: \
info) \
|| exit 1
+@endif uudecode
.PHONY: maybe-dvi-uudecode dvi-uudecode
maybe-dvi-uudecode:
+@if uudecode
+maybe-dvi-uudecode: dvi-uudecode
dvi-uudecode: \
configure-uudecode
@@ -16093,7 +19215,8 @@ dvi-uudecode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in uudecode" ; \
@@ -16105,9 +19228,12 @@ dvi-uudecode: \
dvi) \
|| exit 1
+@endif uudecode
.PHONY: maybe-TAGS-uudecode TAGS-uudecode
maybe-TAGS-uudecode:
+@if uudecode
+maybe-TAGS-uudecode: TAGS-uudecode
TAGS-uudecode: \
configure-uudecode
@@ -16115,7 +19241,8 @@ TAGS-uudecode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in uudecode" ; \
@@ -16127,9 +19254,12 @@ TAGS-uudecode: \
TAGS) \
|| exit 1
+@endif uudecode
.PHONY: maybe-install-info-uudecode install-info-uudecode
maybe-install-info-uudecode:
+@if uudecode
+maybe-install-info-uudecode: install-info-uudecode
install-info-uudecode: \
configure-uudecode \
@@ -16138,7 +19268,8 @@ install-info-uudecode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in uudecode" ; \
@@ -16150,9 +19281,12 @@ install-info-uudecode: \
install-info) \
|| exit 1
+@endif uudecode
.PHONY: maybe-installcheck-uudecode installcheck-uudecode
maybe-installcheck-uudecode:
+@if uudecode
+maybe-installcheck-uudecode: installcheck-uudecode
installcheck-uudecode: \
configure-uudecode
@@ -16160,7 +19294,8 @@ installcheck-uudecode: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in uudecode" ; \
@@ -16172,16 +19307,20 @@ installcheck-uudecode: \
installcheck) \
|| exit 1
+@endif uudecode
.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
maybe-mostlyclean-uudecode:
+@if uudecode
+maybe-mostlyclean-uudecode: mostlyclean-uudecode
mostlyclean-uudecode:
@[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in uudecode" ; \
@@ -16193,16 +19332,20 @@ mostlyclean-uudecode:
mostlyclean) \
|| exit 1
+@endif uudecode
.PHONY: maybe-clean-uudecode clean-uudecode
maybe-clean-uudecode:
+@if uudecode
+maybe-clean-uudecode: clean-uudecode
clean-uudecode:
@[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in uudecode" ; \
@@ -16214,16 +19357,20 @@ clean-uudecode:
clean) \
|| exit 1
+@endif uudecode
.PHONY: maybe-distclean-uudecode distclean-uudecode
maybe-distclean-uudecode:
+@if uudecode
+maybe-distclean-uudecode: distclean-uudecode
distclean-uudecode:
@[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in uudecode" ; \
@@ -16235,16 +19382,20 @@ distclean-uudecode:
distclean) \
|| exit 1
+@endif uudecode
.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
maybe-maintainer-clean-uudecode:
+@if uudecode
+maybe-maintainer-clean-uudecode: maintainer-clean-uudecode
maintainer-clean-uudecode:
@[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in uudecode" ; \
@@ -16256,30 +19407,19 @@ maintainer-clean-uudecode:
maintainer-clean) \
|| exit 1
+@endif uudecode
.PHONY: configure-wdiff maybe-configure-wdiff
maybe-configure-wdiff:
+@if wdiff
+maybe-configure-wdiff: configure-wdiff
configure-wdiff:
@test ! -f wdiff/Makefile || exit 0; \
[ -d wdiff ] || mkdir wdiff; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in wdiff; \
cd wdiff || exit 1; \
case $(srcdir) in \
@@ -16294,41 +19434,56 @@ configure-wdiff:
libsrcdir="$$s/wdiff";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif wdiff
.PHONY: all-wdiff maybe-all-wdiff
maybe-all-wdiff:
+@if wdiff
+maybe-all-wdiff: all-wdiff
all-wdiff: configure-wdiff
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif wdiff
.PHONY: check-wdiff maybe-check-wdiff
maybe-check-wdiff:
+@if wdiff
+maybe-check-wdiff: check-wdiff
check-wdiff:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
+@endif wdiff
.PHONY: install-wdiff maybe-install-wdiff
maybe-install-wdiff:
+@if wdiff
+maybe-install-wdiff: install-wdiff
install-wdiff: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif wdiff
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-wdiff info-wdiff
maybe-info-wdiff:
+@if wdiff
+maybe-info-wdiff: info-wdiff
info-wdiff: \
configure-wdiff
@@ -16336,7 +19491,8 @@ info-wdiff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in wdiff" ; \
@@ -16348,9 +19504,12 @@ info-wdiff: \
info) \
|| exit 1
+@endif wdiff
.PHONY: maybe-dvi-wdiff dvi-wdiff
maybe-dvi-wdiff:
+@if wdiff
+maybe-dvi-wdiff: dvi-wdiff
dvi-wdiff: \
configure-wdiff
@@ -16358,7 +19517,8 @@ dvi-wdiff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in wdiff" ; \
@@ -16370,9 +19530,12 @@ dvi-wdiff: \
dvi) \
|| exit 1
+@endif wdiff
.PHONY: maybe-TAGS-wdiff TAGS-wdiff
maybe-TAGS-wdiff:
+@if wdiff
+maybe-TAGS-wdiff: TAGS-wdiff
TAGS-wdiff: \
configure-wdiff
@@ -16380,7 +19543,8 @@ TAGS-wdiff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in wdiff" ; \
@@ -16392,9 +19556,12 @@ TAGS-wdiff: \
TAGS) \
|| exit 1
+@endif wdiff
.PHONY: maybe-install-info-wdiff install-info-wdiff
maybe-install-info-wdiff:
+@if wdiff
+maybe-install-info-wdiff: install-info-wdiff
install-info-wdiff: \
configure-wdiff \
@@ -16403,7 +19570,8 @@ install-info-wdiff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in wdiff" ; \
@@ -16415,9 +19583,12 @@ install-info-wdiff: \
install-info) \
|| exit 1
+@endif wdiff
.PHONY: maybe-installcheck-wdiff installcheck-wdiff
maybe-installcheck-wdiff:
+@if wdiff
+maybe-installcheck-wdiff: installcheck-wdiff
installcheck-wdiff: \
configure-wdiff
@@ -16425,7 +19596,8 @@ installcheck-wdiff: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in wdiff" ; \
@@ -16437,16 +19609,20 @@ installcheck-wdiff: \
installcheck) \
|| exit 1
+@endif wdiff
.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
maybe-mostlyclean-wdiff:
+@if wdiff
+maybe-mostlyclean-wdiff: mostlyclean-wdiff
mostlyclean-wdiff:
@[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in wdiff" ; \
@@ -16458,16 +19634,20 @@ mostlyclean-wdiff:
mostlyclean) \
|| exit 1
+@endif wdiff
.PHONY: maybe-clean-wdiff clean-wdiff
maybe-clean-wdiff:
+@if wdiff
+maybe-clean-wdiff: clean-wdiff
clean-wdiff:
@[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in wdiff" ; \
@@ -16479,16 +19659,20 @@ clean-wdiff:
clean) \
|| exit 1
+@endif wdiff
.PHONY: maybe-distclean-wdiff distclean-wdiff
maybe-distclean-wdiff:
+@if wdiff
+maybe-distclean-wdiff: distclean-wdiff
distclean-wdiff:
@[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in wdiff" ; \
@@ -16500,16 +19684,20 @@ distclean-wdiff:
distclean) \
|| exit 1
+@endif wdiff
.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
maybe-maintainer-clean-wdiff:
+@if wdiff
+maybe-maintainer-clean-wdiff: maintainer-clean-wdiff
maintainer-clean-wdiff:
@[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in wdiff" ; \
@@ -16521,30 +19709,19 @@ maintainer-clean-wdiff:
maintainer-clean) \
|| exit 1
+@endif wdiff
.PHONY: configure-zip maybe-configure-zip
maybe-configure-zip:
+@if zip
+maybe-configure-zip: configure-zip
configure-zip:
@test ! -f zip/Makefile || exit 0; \
[ -d zip ] || mkdir zip; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in zip; \
cd zip || exit 1; \
case $(srcdir) in \
@@ -16559,19 +19736,26 @@ configure-zip:
libsrcdir="$$s/zip";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif zip
.PHONY: all-zip maybe-all-zip
maybe-all-zip:
+@if zip
+maybe-all-zip: all-zip
all-zip: configure-zip
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif zip
.PHONY: check-zip maybe-check-zip
maybe-check-zip:
+@if zip
+maybe-check-zip: check-zip
# This module is only tested in a native toolchain.
check-zip:
@@ -16579,24 +19763,32 @@ check-zip:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(HOST_EXPORTS) \
+ (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
+@endif zip
.PHONY: install-zip maybe-install-zip
maybe-install-zip:
+@if zip
+maybe-install-zip: install-zip
install-zip: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif zip
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-zip info-zip
maybe-info-zip:
+@if zip
+maybe-info-zip: info-zip
info-zip: \
configure-zip
@@ -16604,7 +19796,8 @@ info-zip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in zip" ; \
@@ -16616,9 +19809,12 @@ info-zip: \
info) \
|| exit 1
+@endif zip
.PHONY: maybe-dvi-zip dvi-zip
maybe-dvi-zip:
+@if zip
+maybe-dvi-zip: dvi-zip
dvi-zip: \
configure-zip
@@ -16626,7 +19822,8 @@ dvi-zip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in zip" ; \
@@ -16638,9 +19835,12 @@ dvi-zip: \
dvi) \
|| exit 1
+@endif zip
.PHONY: maybe-TAGS-zip TAGS-zip
maybe-TAGS-zip:
+@if zip
+maybe-TAGS-zip: TAGS-zip
TAGS-zip: \
configure-zip
@@ -16648,7 +19848,8 @@ TAGS-zip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in zip" ; \
@@ -16660,9 +19861,12 @@ TAGS-zip: \
TAGS) \
|| exit 1
+@endif zip
.PHONY: maybe-install-info-zip install-info-zip
maybe-install-info-zip:
+@if zip
+maybe-install-info-zip: install-info-zip
install-info-zip: \
configure-zip \
@@ -16671,7 +19875,8 @@ install-info-zip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in zip" ; \
@@ -16683,9 +19888,12 @@ install-info-zip: \
install-info) \
|| exit 1
+@endif zip
.PHONY: maybe-installcheck-zip installcheck-zip
maybe-installcheck-zip:
+@if zip
+maybe-installcheck-zip: installcheck-zip
installcheck-zip: \
configure-zip
@@ -16693,7 +19901,8 @@ installcheck-zip: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in zip" ; \
@@ -16705,16 +19914,20 @@ installcheck-zip: \
installcheck) \
|| exit 1
+@endif zip
.PHONY: maybe-mostlyclean-zip mostlyclean-zip
maybe-mostlyclean-zip:
+@if zip
+maybe-mostlyclean-zip: mostlyclean-zip
mostlyclean-zip:
@[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in zip" ; \
@@ -16726,16 +19939,20 @@ mostlyclean-zip:
mostlyclean) \
|| exit 1
+@endif zip
.PHONY: maybe-clean-zip clean-zip
maybe-clean-zip:
+@if zip
+maybe-clean-zip: clean-zip
clean-zip:
@[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in zip" ; \
@@ -16747,16 +19964,20 @@ clean-zip:
clean) \
|| exit 1
+@endif zip
.PHONY: maybe-distclean-zip distclean-zip
maybe-distclean-zip:
+@if zip
+maybe-distclean-zip: distclean-zip
distclean-zip:
@[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in zip" ; \
@@ -16768,16 +19989,20 @@ distclean-zip:
distclean) \
|| exit 1
+@endif zip
.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
maybe-maintainer-clean-zip:
+@if zip
+maybe-maintainer-clean-zip: maintainer-clean-zip
maintainer-clean-zip:
@[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in zip" ; \
@@ -16789,30 +20014,20 @@ maintainer-clean-zip:
maintainer-clean) \
|| exit 1
+@endif zip
.PHONY: configure-zlib maybe-configure-zlib
maybe-configure-zlib:
+@if zlib
+maybe-configure-zlib: configure-zlib
configure-zlib:
- @test ! -f zlib/Makefile || exit 0; \
+ @test -f stage_last && exit 0; \
+ test ! -f zlib/Makefile || exit 0; \
[ -d zlib ] || mkdir zlib; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in zlib; \
cd zlib || exit 1; \
case $(srcdir) in \
@@ -16827,33 +20042,47 @@ configure-zlib:
libsrcdir="$$s/zlib";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif zlib
.PHONY: all-zlib maybe-all-zlib
maybe-all-zlib:
+@if zlib
+maybe-all-zlib: all-zlib
all-zlib: configure-zlib
- @r=`${PWD_COMMAND}`; export r; \
+ @test -f stage_last && exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif zlib
.PHONY: check-zlib maybe-check-zlib
maybe-check-zlib:
+@if zlib
+maybe-check-zlib: check-zlib
check-zlib:
+@endif zlib
.PHONY: install-zlib maybe-install-zlib
maybe-install-zlib:
+@if zlib
+maybe-install-zlib: install-zlib
install-zlib:
+@endif zlib
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-zlib info-zlib
maybe-info-zlib:
+@if zlib
+maybe-info-zlib: info-zlib
info-zlib: \
configure-zlib
@@ -16861,7 +20090,8 @@ info-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in zlib" ; \
@@ -16873,9 +20103,12 @@ info-zlib: \
info) \
|| exit 1
+@endif zlib
.PHONY: maybe-dvi-zlib dvi-zlib
maybe-dvi-zlib:
+@if zlib
+maybe-dvi-zlib: dvi-zlib
dvi-zlib: \
configure-zlib
@@ -16883,7 +20116,8 @@ dvi-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in zlib" ; \
@@ -16895,9 +20129,12 @@ dvi-zlib: \
dvi) \
|| exit 1
+@endif zlib
.PHONY: maybe-TAGS-zlib TAGS-zlib
maybe-TAGS-zlib:
+@if zlib
+maybe-TAGS-zlib: TAGS-zlib
TAGS-zlib: \
configure-zlib
@@ -16905,7 +20142,8 @@ TAGS-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in zlib" ; \
@@ -16917,9 +20155,12 @@ TAGS-zlib: \
TAGS) \
|| exit 1
+@endif zlib
.PHONY: maybe-install-info-zlib install-info-zlib
maybe-install-info-zlib:
+@if zlib
+maybe-install-info-zlib: install-info-zlib
install-info-zlib: \
configure-zlib \
@@ -16928,7 +20169,8 @@ install-info-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in zlib" ; \
@@ -16940,9 +20182,12 @@ install-info-zlib: \
install-info) \
|| exit 1
+@endif zlib
.PHONY: maybe-installcheck-zlib installcheck-zlib
maybe-installcheck-zlib:
+@if zlib
+maybe-installcheck-zlib: installcheck-zlib
installcheck-zlib: \
configure-zlib
@@ -16950,7 +20195,8 @@ installcheck-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in zlib" ; \
@@ -16962,16 +20208,20 @@ installcheck-zlib: \
installcheck) \
|| exit 1
+@endif zlib
.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib
maybe-mostlyclean-zlib:
+@if zlib
+maybe-mostlyclean-zlib: mostlyclean-zlib
mostlyclean-zlib:
@[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in zlib" ; \
@@ -16983,16 +20233,20 @@ mostlyclean-zlib:
mostlyclean) \
|| exit 1
+@endif zlib
.PHONY: maybe-clean-zlib clean-zlib
maybe-clean-zlib:
+@if zlib
+maybe-clean-zlib: clean-zlib
clean-zlib:
@[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in zlib" ; \
@@ -17004,16 +20258,20 @@ clean-zlib:
clean) \
|| exit 1
+@endif zlib
.PHONY: maybe-distclean-zlib distclean-zlib
maybe-distclean-zlib:
+@if zlib
+maybe-distclean-zlib: distclean-zlib
distclean-zlib:
@[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in zlib" ; \
@@ -17025,16 +20283,20 @@ distclean-zlib:
distclean) \
|| exit 1
+@endif zlib
.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib
maybe-maintainer-clean-zlib:
+@if zlib
+maybe-maintainer-clean-zlib: maintainer-clean-zlib
maintainer-clean-zlib:
@[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in zlib" ; \
@@ -17046,30 +20308,19 @@ maintainer-clean-zlib:
maintainer-clean) \
|| exit 1
+@endif zlib
.PHONY: configure-gdb maybe-configure-gdb
maybe-configure-gdb:
+@if gdb
+maybe-configure-gdb: configure-gdb
configure-gdb:
@test ! -f gdb/Makefile || exit 0; \
[ -d gdb ] || mkdir gdb; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in gdb; \
cd gdb || exit 1; \
case $(srcdir) in \
@@ -17084,41 +20335,56 @@ configure-gdb:
libsrcdir="$$s/gdb";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif gdb
.PHONY: all-gdb maybe-all-gdb
maybe-all-gdb:
+@if gdb
+maybe-all-gdb: all-gdb
all-gdb: configure-gdb
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif gdb
.PHONY: check-gdb maybe-check-gdb
maybe-check-gdb:
+@if gdb
+maybe-check-gdb: check-gdb
check-gdb:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(HOST_EXPORTS) \
+ (cd gdb && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+@endif gdb
.PHONY: install-gdb maybe-install-gdb
maybe-install-gdb:
+@if gdb
+maybe-install-gdb: install-gdb
install-gdb: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(HOST_EXPORTS) \
+ (cd gdb && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+@endif gdb
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gdb info-gdb
maybe-info-gdb:
+@if gdb
+maybe-info-gdb: info-gdb
info-gdb: \
configure-gdb
@@ -17126,7 +20392,8 @@ info-gdb: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in gdb" ; \
@@ -17138,9 +20405,12 @@ info-gdb: \
info) \
|| exit 1
+@endif gdb
.PHONY: maybe-dvi-gdb dvi-gdb
maybe-dvi-gdb:
+@if gdb
+maybe-dvi-gdb: dvi-gdb
dvi-gdb: \
configure-gdb
@@ -17148,7 +20418,8 @@ dvi-gdb: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in gdb" ; \
@@ -17160,9 +20431,12 @@ dvi-gdb: \
dvi) \
|| exit 1
+@endif gdb
.PHONY: maybe-TAGS-gdb TAGS-gdb
maybe-TAGS-gdb:
+@if gdb
+maybe-TAGS-gdb: TAGS-gdb
TAGS-gdb: \
configure-gdb
@@ -17170,7 +20444,8 @@ TAGS-gdb: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in gdb" ; \
@@ -17182,9 +20457,12 @@ TAGS-gdb: \
TAGS) \
|| exit 1
+@endif gdb
.PHONY: maybe-install-info-gdb install-info-gdb
maybe-install-info-gdb:
+@if gdb
+maybe-install-info-gdb: install-info-gdb
install-info-gdb: \
configure-gdb \
@@ -17193,7 +20471,8 @@ install-info-gdb: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in gdb" ; \
@@ -17205,9 +20484,12 @@ install-info-gdb: \
install-info) \
|| exit 1
+@endif gdb
.PHONY: maybe-installcheck-gdb installcheck-gdb
maybe-installcheck-gdb:
+@if gdb
+maybe-installcheck-gdb: installcheck-gdb
installcheck-gdb: \
configure-gdb
@@ -17215,7 +20497,8 @@ installcheck-gdb: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in gdb" ; \
@@ -17227,16 +20510,20 @@ installcheck-gdb: \
installcheck) \
|| exit 1
+@endif gdb
.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb
maybe-mostlyclean-gdb:
+@if gdb
+maybe-mostlyclean-gdb: mostlyclean-gdb
mostlyclean-gdb:
@[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in gdb" ; \
@@ -17248,16 +20535,20 @@ mostlyclean-gdb:
mostlyclean) \
|| exit 1
+@endif gdb
.PHONY: maybe-clean-gdb clean-gdb
maybe-clean-gdb:
+@if gdb
+maybe-clean-gdb: clean-gdb
clean-gdb:
@[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in gdb" ; \
@@ -17269,16 +20560,20 @@ clean-gdb:
clean) \
|| exit 1
+@endif gdb
.PHONY: maybe-distclean-gdb distclean-gdb
maybe-distclean-gdb:
+@if gdb
+maybe-distclean-gdb: distclean-gdb
distclean-gdb:
@[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in gdb" ; \
@@ -17290,16 +20585,20 @@ distclean-gdb:
distclean) \
|| exit 1
+@endif gdb
.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb
maybe-maintainer-clean-gdb:
+@if gdb
+maybe-maintainer-clean-gdb: maintainer-clean-gdb
maintainer-clean-gdb:
@[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in gdb" ; \
@@ -17311,30 +20610,19 @@ maintainer-clean-gdb:
maintainer-clean) \
|| exit 1
+@endif gdb
.PHONY: configure-expect maybe-configure-expect
maybe-configure-expect:
+@if expect
+maybe-configure-expect: configure-expect
configure-expect:
@test ! -f expect/Makefile || exit 0; \
[ -d expect ] || mkdir expect; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in expect; \
cd expect || exit 1; \
case $(srcdir) in \
@@ -17349,41 +20637,56 @@ configure-expect:
libsrcdir="$$s/expect";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif expect
.PHONY: all-expect maybe-all-expect
maybe-all-expect:
+@if expect
+maybe-all-expect: all-expect
all-expect: configure-expect
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif expect
.PHONY: check-expect maybe-check-expect
maybe-check-expect:
+@if expect
+maybe-check-expect: check-expect
check-expect:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(HOST_EXPORTS) \
+ (cd expect && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+@endif expect
.PHONY: install-expect maybe-install-expect
maybe-install-expect:
+@if expect
+maybe-install-expect: install-expect
install-expect: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(HOST_EXPORTS) \
+ (cd expect && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+@endif expect
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-expect info-expect
maybe-info-expect:
+@if expect
+maybe-info-expect: info-expect
info-expect: \
configure-expect
@@ -17391,7 +20694,8 @@ info-expect: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in expect" ; \
@@ -17403,9 +20707,12 @@ info-expect: \
info) \
|| exit 1
+@endif expect
.PHONY: maybe-dvi-expect dvi-expect
maybe-dvi-expect:
+@if expect
+maybe-dvi-expect: dvi-expect
dvi-expect: \
configure-expect
@@ -17413,7 +20720,8 @@ dvi-expect: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in expect" ; \
@@ -17425,9 +20733,12 @@ dvi-expect: \
dvi) \
|| exit 1
+@endif expect
.PHONY: maybe-TAGS-expect TAGS-expect
maybe-TAGS-expect:
+@if expect
+maybe-TAGS-expect: TAGS-expect
TAGS-expect: \
configure-expect
@@ -17435,7 +20746,8 @@ TAGS-expect: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in expect" ; \
@@ -17447,9 +20759,12 @@ TAGS-expect: \
TAGS) \
|| exit 1
+@endif expect
.PHONY: maybe-install-info-expect install-info-expect
maybe-install-info-expect:
+@if expect
+maybe-install-info-expect: install-info-expect
install-info-expect: \
configure-expect \
@@ -17458,7 +20773,8 @@ install-info-expect: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in expect" ; \
@@ -17470,9 +20786,12 @@ install-info-expect: \
install-info) \
|| exit 1
+@endif expect
.PHONY: maybe-installcheck-expect installcheck-expect
maybe-installcheck-expect:
+@if expect
+maybe-installcheck-expect: installcheck-expect
installcheck-expect: \
configure-expect
@@ -17480,7 +20799,8 @@ installcheck-expect: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in expect" ; \
@@ -17492,16 +20812,20 @@ installcheck-expect: \
installcheck) \
|| exit 1
+@endif expect
.PHONY: maybe-mostlyclean-expect mostlyclean-expect
maybe-mostlyclean-expect:
+@if expect
+maybe-mostlyclean-expect: mostlyclean-expect
mostlyclean-expect:
@[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in expect" ; \
@@ -17513,16 +20837,20 @@ mostlyclean-expect:
mostlyclean) \
|| exit 1
+@endif expect
.PHONY: maybe-clean-expect clean-expect
maybe-clean-expect:
+@if expect
+maybe-clean-expect: clean-expect
clean-expect:
@[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in expect" ; \
@@ -17534,16 +20862,20 @@ clean-expect:
clean) \
|| exit 1
+@endif expect
.PHONY: maybe-distclean-expect distclean-expect
maybe-distclean-expect:
+@if expect
+maybe-distclean-expect: distclean-expect
distclean-expect:
@[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in expect" ; \
@@ -17555,16 +20887,20 @@ distclean-expect:
distclean) \
|| exit 1
+@endif expect
.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect
maybe-maintainer-clean-expect:
+@if expect
+maybe-maintainer-clean-expect: maintainer-clean-expect
maintainer-clean-expect:
@[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in expect" ; \
@@ -17576,30 +20912,19 @@ maintainer-clean-expect:
maintainer-clean) \
|| exit 1
+@endif expect
.PHONY: configure-guile maybe-configure-guile
maybe-configure-guile:
+@if guile
+maybe-configure-guile: configure-guile
configure-guile:
@test ! -f guile/Makefile || exit 0; \
[ -d guile ] || mkdir guile; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in guile; \
cd guile || exit 1; \
case $(srcdir) in \
@@ -17614,41 +20939,56 @@ configure-guile:
libsrcdir="$$s/guile";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif guile
.PHONY: all-guile maybe-all-guile
maybe-all-guile:
+@if guile
+maybe-all-guile: all-guile
all-guile: configure-guile
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif guile
.PHONY: check-guile maybe-check-guile
maybe-check-guile:
+@if guile
+maybe-check-guile: check-guile
check-guile:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(HOST_EXPORTS) \
+ (cd guile && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+@endif guile
.PHONY: install-guile maybe-install-guile
maybe-install-guile:
+@if guile
+maybe-install-guile: install-guile
install-guile: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(HOST_EXPORTS) \
+ (cd guile && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+@endif guile
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-guile info-guile
maybe-info-guile:
+@if guile
+maybe-info-guile: info-guile
info-guile: \
configure-guile
@@ -17656,7 +20996,8 @@ info-guile: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in guile" ; \
@@ -17668,9 +21009,12 @@ info-guile: \
info) \
|| exit 1
+@endif guile
.PHONY: maybe-dvi-guile dvi-guile
maybe-dvi-guile:
+@if guile
+maybe-dvi-guile: dvi-guile
dvi-guile: \
configure-guile
@@ -17678,7 +21022,8 @@ dvi-guile: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in guile" ; \
@@ -17690,9 +21035,12 @@ dvi-guile: \
dvi) \
|| exit 1
+@endif guile
.PHONY: maybe-TAGS-guile TAGS-guile
maybe-TAGS-guile:
+@if guile
+maybe-TAGS-guile: TAGS-guile
TAGS-guile: \
configure-guile
@@ -17700,7 +21048,8 @@ TAGS-guile: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in guile" ; \
@@ -17712,9 +21061,12 @@ TAGS-guile: \
TAGS) \
|| exit 1
+@endif guile
.PHONY: maybe-install-info-guile install-info-guile
maybe-install-info-guile:
+@if guile
+maybe-install-info-guile: install-info-guile
install-info-guile: \
configure-guile \
@@ -17723,7 +21075,8 @@ install-info-guile: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in guile" ; \
@@ -17735,9 +21088,12 @@ install-info-guile: \
install-info) \
|| exit 1
+@endif guile
.PHONY: maybe-installcheck-guile installcheck-guile
maybe-installcheck-guile:
+@if guile
+maybe-installcheck-guile: installcheck-guile
installcheck-guile: \
configure-guile
@@ -17745,7 +21101,8 @@ installcheck-guile: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in guile" ; \
@@ -17757,16 +21114,20 @@ installcheck-guile: \
installcheck) \
|| exit 1
+@endif guile
.PHONY: maybe-mostlyclean-guile mostlyclean-guile
maybe-mostlyclean-guile:
+@if guile
+maybe-mostlyclean-guile: mostlyclean-guile
mostlyclean-guile:
@[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in guile" ; \
@@ -17778,16 +21139,20 @@ mostlyclean-guile:
mostlyclean) \
|| exit 1
+@endif guile
.PHONY: maybe-clean-guile clean-guile
maybe-clean-guile:
+@if guile
+maybe-clean-guile: clean-guile
clean-guile:
@[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in guile" ; \
@@ -17799,16 +21164,20 @@ clean-guile:
clean) \
|| exit 1
+@endif guile
.PHONY: maybe-distclean-guile distclean-guile
maybe-distclean-guile:
+@if guile
+maybe-distclean-guile: distclean-guile
distclean-guile:
@[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in guile" ; \
@@ -17820,16 +21189,20 @@ distclean-guile:
distclean) \
|| exit 1
+@endif guile
.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile
maybe-maintainer-clean-guile:
+@if guile
+maybe-maintainer-clean-guile: maintainer-clean-guile
maintainer-clean-guile:
@[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in guile" ; \
@@ -17841,30 +21214,19 @@ maintainer-clean-guile:
maintainer-clean) \
|| exit 1
+@endif guile
.PHONY: configure-tk maybe-configure-tk
maybe-configure-tk:
+@if tk
+maybe-configure-tk: configure-tk
configure-tk:
@test ! -f tk/Makefile || exit 0; \
[ -d tk ] || mkdir tk; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in tk; \
cd tk || exit 1; \
case $(srcdir) in \
@@ -17879,41 +21241,56 @@ configure-tk:
libsrcdir="$$s/tk";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif tk
.PHONY: all-tk maybe-all-tk
maybe-all-tk:
+@if tk
+maybe-all-tk: all-tk
all-tk: configure-tk
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif tk
.PHONY: check-tk maybe-check-tk
maybe-check-tk:
+@if tk
+maybe-check-tk: check-tk
check-tk:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(HOST_EXPORTS) \
+ (cd tk && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+@endif tk
.PHONY: install-tk maybe-install-tk
maybe-install-tk:
+@if tk
+maybe-install-tk: install-tk
install-tk: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(HOST_EXPORTS) \
+ (cd tk && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+@endif tk
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tk info-tk
maybe-info-tk:
+@if tk
+maybe-info-tk: info-tk
info-tk: \
configure-tk
@@ -17921,7 +21298,8 @@ info-tk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in tk" ; \
@@ -17933,9 +21311,12 @@ info-tk: \
info) \
|| exit 1
+@endif tk
.PHONY: maybe-dvi-tk dvi-tk
maybe-dvi-tk:
+@if tk
+maybe-dvi-tk: dvi-tk
dvi-tk: \
configure-tk
@@ -17943,7 +21324,8 @@ dvi-tk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in tk" ; \
@@ -17955,9 +21337,12 @@ dvi-tk: \
dvi) \
|| exit 1
+@endif tk
.PHONY: maybe-TAGS-tk TAGS-tk
maybe-TAGS-tk:
+@if tk
+maybe-TAGS-tk: TAGS-tk
TAGS-tk: \
configure-tk
@@ -17965,7 +21350,8 @@ TAGS-tk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in tk" ; \
@@ -17977,9 +21363,12 @@ TAGS-tk: \
TAGS) \
|| exit 1
+@endif tk
.PHONY: maybe-install-info-tk install-info-tk
maybe-install-info-tk:
+@if tk
+maybe-install-info-tk: install-info-tk
install-info-tk: \
configure-tk \
@@ -17988,7 +21377,8 @@ install-info-tk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in tk" ; \
@@ -18000,9 +21390,12 @@ install-info-tk: \
install-info) \
|| exit 1
+@endif tk
.PHONY: maybe-installcheck-tk installcheck-tk
maybe-installcheck-tk:
+@if tk
+maybe-installcheck-tk: installcheck-tk
installcheck-tk: \
configure-tk
@@ -18010,7 +21403,8 @@ installcheck-tk: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in tk" ; \
@@ -18022,16 +21416,20 @@ installcheck-tk: \
installcheck) \
|| exit 1
+@endif tk
.PHONY: maybe-mostlyclean-tk mostlyclean-tk
maybe-mostlyclean-tk:
+@if tk
+maybe-mostlyclean-tk: mostlyclean-tk
mostlyclean-tk:
@[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in tk" ; \
@@ -18043,16 +21441,20 @@ mostlyclean-tk:
mostlyclean) \
|| exit 1
+@endif tk
.PHONY: maybe-clean-tk clean-tk
maybe-clean-tk:
+@if tk
+maybe-clean-tk: clean-tk
clean-tk:
@[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in tk" ; \
@@ -18064,16 +21466,20 @@ clean-tk:
clean) \
|| exit 1
+@endif tk
.PHONY: maybe-distclean-tk distclean-tk
maybe-distclean-tk:
+@if tk
+maybe-distclean-tk: distclean-tk
distclean-tk:
@[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in tk" ; \
@@ -18085,16 +21491,20 @@ distclean-tk:
distclean) \
|| exit 1
+@endif tk
.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk
maybe-maintainer-clean-tk:
+@if tk
+maybe-maintainer-clean-tk: maintainer-clean-tk
maintainer-clean-tk:
@[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in tk" ; \
@@ -18106,295 +21516,19 @@ maintainer-clean-tk:
maintainer-clean) \
|| exit 1
-
-
-.PHONY: configure-tix maybe-configure-tix
-maybe-configure-tix:
-configure-tix:
- @test ! -f tix/Makefile || exit 0; \
- [ -d tix ] || mkdir tix; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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 \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/tix"; \
- libsrcdir="$$s/tix";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/tix"; \
- libsrcdir="$$s/tix";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-.PHONY: all-tix maybe-all-tix
-maybe-all-tix:
-all-tix: configure-tix
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
-
-.PHONY: check-tix maybe-check-tix
-maybe-check-tix:
-
-check-tix:
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
-
-
-.PHONY: install-tix maybe-install-tix
-maybe-install-tix:
-
-install-tix: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
-
-
-# Other targets (info, dvi, etc.)
-
-.PHONY: maybe-info-tix info-tix
-maybe-info-tix:
-
-info-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-dvi-tix dvi-tix
-maybe-dvi-tix:
-
-dvi-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-TAGS-tix TAGS-tix
-maybe-TAGS-tix:
-
-TAGS-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-install-info-tix install-info-tix
-maybe-install-info-tix:
-
-install-info-tix: \
- configure-tix \
- info-tix
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-installcheck-tix installcheck-tix
-maybe-installcheck-tix:
-
-installcheck-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-mostlyclean-tix mostlyclean-tix
-maybe-mostlyclean-tix:
-
-mostlyclean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-clean-tix clean-tix
-maybe-clean-tix:
-
-clean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-distclean-tix distclean-tix
-maybe-distclean-tix:
-
-distclean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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-maintainer-clean-tix maintainer-clean-tix
-maybe-maintainer-clean-tix:
-
-maintainer-clean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export 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
-
+@endif tk
.PHONY: configure-libtermcap maybe-configure-libtermcap
maybe-configure-libtermcap:
+@if libtermcap
+maybe-configure-libtermcap: configure-libtermcap
configure-libtermcap:
@test ! -f libtermcap/Makefile || exit 0; \
[ -d libtermcap ] || mkdir libtermcap; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in libtermcap; \
cd libtermcap || exit 1; \
case $(srcdir) in \
@@ -18409,37 +21543,51 @@ configure-libtermcap:
libsrcdir="$$s/libtermcap";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif libtermcap
.PHONY: all-libtermcap maybe-all-libtermcap
maybe-all-libtermcap:
+@if libtermcap
+maybe-all-libtermcap: all-libtermcap
all-libtermcap: configure-libtermcap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif libtermcap
.PHONY: check-libtermcap maybe-check-libtermcap
maybe-check-libtermcap:
+@if libtermcap
+maybe-check-libtermcap: check-libtermcap
check-libtermcap:
+@endif libtermcap
.PHONY: install-libtermcap maybe-install-libtermcap
maybe-install-libtermcap:
+@if libtermcap
+maybe-install-libtermcap: install-libtermcap
install-libtermcap: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif libtermcap
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libtermcap info-libtermcap
maybe-info-libtermcap:
+@if libtermcap
+maybe-info-libtermcap: info-libtermcap
info-libtermcap: \
configure-libtermcap
@@ -18447,7 +21595,8 @@ info-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in libtermcap" ; \
@@ -18459,9 +21608,12 @@ info-libtermcap: \
info) \
|| exit 1
+@endif libtermcap
.PHONY: maybe-dvi-libtermcap dvi-libtermcap
maybe-dvi-libtermcap:
+@if libtermcap
+maybe-dvi-libtermcap: dvi-libtermcap
dvi-libtermcap: \
configure-libtermcap
@@ -18469,7 +21621,8 @@ dvi-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in libtermcap" ; \
@@ -18481,9 +21634,12 @@ dvi-libtermcap: \
dvi) \
|| exit 1
+@endif libtermcap
.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
maybe-TAGS-libtermcap:
+@if libtermcap
+maybe-TAGS-libtermcap: TAGS-libtermcap
TAGS-libtermcap: \
configure-libtermcap
@@ -18491,7 +21647,8 @@ TAGS-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in libtermcap" ; \
@@ -18503,9 +21660,12 @@ TAGS-libtermcap: \
TAGS) \
|| exit 1
+@endif libtermcap
.PHONY: maybe-install-info-libtermcap install-info-libtermcap
maybe-install-info-libtermcap:
+@if libtermcap
+maybe-install-info-libtermcap: install-info-libtermcap
install-info-libtermcap: \
configure-libtermcap \
@@ -18514,7 +21674,8 @@ install-info-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in libtermcap" ; \
@@ -18526,9 +21687,12 @@ install-info-libtermcap: \
install-info) \
|| exit 1
+@endif libtermcap
.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap
maybe-installcheck-libtermcap:
+@if libtermcap
+maybe-installcheck-libtermcap: installcheck-libtermcap
installcheck-libtermcap: \
configure-libtermcap
@@ -18536,7 +21700,8 @@ installcheck-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in libtermcap" ; \
@@ -18548,58 +21713,59 @@ installcheck-libtermcap: \
installcheck) \
|| exit 1
+@endif libtermcap
.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap
maybe-mostlyclean-libtermcap:
+@if libtermcap
+maybe-mostlyclean-libtermcap: mostlyclean-libtermcap
# libtermcap doesn't support mostlyclean.
mostlyclean-libtermcap:
+@endif libtermcap
.PHONY: maybe-clean-libtermcap clean-libtermcap
maybe-clean-libtermcap:
+@if libtermcap
+maybe-clean-libtermcap: clean-libtermcap
# libtermcap doesn't support clean.
clean-libtermcap:
+@endif libtermcap
.PHONY: maybe-distclean-libtermcap distclean-libtermcap
maybe-distclean-libtermcap:
+@if libtermcap
+maybe-distclean-libtermcap: distclean-libtermcap
# libtermcap doesn't support distclean.
distclean-libtermcap:
+@endif libtermcap
.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
maybe-maintainer-clean-libtermcap:
+@if libtermcap
+maybe-maintainer-clean-libtermcap: maintainer-clean-libtermcap
# libtermcap doesn't support maintainer-clean.
maintainer-clean-libtermcap:
+@endif libtermcap
.PHONY: configure-utils maybe-configure-utils
maybe-configure-utils:
+@if utils
+maybe-configure-utils: configure-utils
configure-utils:
@test ! -f utils/Makefile || exit 0; \
[ -d utils ] || mkdir utils; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in utils; \
cd utils || exit 1; \
case $(srcdir) in \
@@ -18614,37 +21780,51 @@ configure-utils:
libsrcdir="$$s/utils";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif utils
.PHONY: all-utils maybe-all-utils
maybe-all-utils:
+@if utils
+maybe-all-utils: all-utils
all-utils: configure-utils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(HOST_EXPORTS) \
+ (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif utils
.PHONY: check-utils maybe-check-utils
maybe-check-utils:
+@if utils
+maybe-check-utils: check-utils
check-utils:
+@endif utils
.PHONY: install-utils maybe-install-utils
maybe-install-utils:
+@if utils
+maybe-install-utils: install-utils
install-utils: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
+@endif utils
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-utils info-utils
maybe-info-utils:
+@if utils
+maybe-info-utils: info-utils
info-utils: \
configure-utils
@@ -18652,7 +21832,8 @@ info-utils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in utils" ; \
@@ -18664,9 +21845,12 @@ info-utils: \
info) \
|| exit 1
+@endif utils
.PHONY: maybe-dvi-utils dvi-utils
maybe-dvi-utils:
+@if utils
+maybe-dvi-utils: dvi-utils
dvi-utils: \
configure-utils
@@ -18674,7 +21858,8 @@ dvi-utils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in utils" ; \
@@ -18686,9 +21871,12 @@ dvi-utils: \
dvi) \
|| exit 1
+@endif utils
.PHONY: maybe-TAGS-utils TAGS-utils
maybe-TAGS-utils:
+@if utils
+maybe-TAGS-utils: TAGS-utils
TAGS-utils: \
configure-utils
@@ -18696,7 +21884,8 @@ TAGS-utils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in utils" ; \
@@ -18708,9 +21897,12 @@ TAGS-utils: \
TAGS) \
|| exit 1
+@endif utils
.PHONY: maybe-install-info-utils install-info-utils
maybe-install-info-utils:
+@if utils
+maybe-install-info-utils: install-info-utils
install-info-utils: \
configure-utils \
@@ -18719,7 +21911,8 @@ install-info-utils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in utils" ; \
@@ -18731,9 +21924,12 @@ install-info-utils: \
install-info) \
|| exit 1
+@endif utils
.PHONY: maybe-installcheck-utils installcheck-utils
maybe-installcheck-utils:
+@if utils
+maybe-installcheck-utils: installcheck-utils
installcheck-utils: \
configure-utils
@@ -18741,7 +21937,8 @@ installcheck-utils: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in utils" ; \
@@ -18753,16 +21950,20 @@ installcheck-utils: \
installcheck) \
|| exit 1
+@endif utils
.PHONY: maybe-mostlyclean-utils mostlyclean-utils
maybe-mostlyclean-utils:
+@if utils
+maybe-mostlyclean-utils: mostlyclean-utils
mostlyclean-utils:
@[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in utils" ; \
@@ -18774,16 +21975,20 @@ mostlyclean-utils:
mostlyclean) \
|| exit 1
+@endif utils
.PHONY: maybe-clean-utils clean-utils
maybe-clean-utils:
+@if utils
+maybe-clean-utils: clean-utils
clean-utils:
@[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in utils" ; \
@@ -18795,16 +22000,20 @@ clean-utils:
clean) \
|| exit 1
+@endif utils
.PHONY: maybe-distclean-utils distclean-utils
maybe-distclean-utils:
+@if utils
+maybe-distclean-utils: distclean-utils
distclean-utils:
@[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in utils" ; \
@@ -18816,16 +22025,20 @@ distclean-utils:
distclean) \
|| exit 1
+@endif utils
.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
maybe-maintainer-clean-utils:
+@if utils
+maybe-maintainer-clean-utils: maintainer-clean-utils
maintainer-clean-utils:
@[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in utils" ; \
@@ -18837,6 +22050,7 @@ maintainer-clean-utils:
maintainer-clean) \
|| exit 1
+@endif utils
@@ -18846,6 +22060,8 @@ maintainer-clean-utils:
.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
maybe-configure-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-configure-target-libstdc++-v3: configure-target-libstdc++-v3
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
@@ -18859,22 +22075,7 @@ configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
case $(srcdir) in \
@@ -18891,44 +22092,60 @@ configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
maybe-all-target-libstdc++-v3:
+@if target-libstdc++-v3
+TARGET-target-libstdc++-v3=all
+maybe-all-target-libstdc++-v3: all-target-libstdc++-v3
all-target-libstdc++-v3: configure-target-libstdc++-v3
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libstdc++-v3))
+@endif target-libstdc++-v3
.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3
maybe-check-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-check-target-libstdc++-v3: check-target-libstdc++-v3
check-target-libstdc++-v3:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+@endif target-libstdc++-v3
.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3
maybe-install-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-target-libstdc++-v3: install-target-libstdc++-v3
install-target-libstdc++-v3: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libstdc++-v3
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
maybe-info-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-info-target-libstdc++-v3: info-target-libstdc++-v3
info-target-libstdc++-v3: \
configure-target-libstdc++-v3
@@ -18936,6 +22153,7 @@ info-target-libstdc++-v3: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -18945,12 +22163,15 @@ info-target-libstdc++-v3: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3
maybe-dvi-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-dvi-target-libstdc++-v3: dvi-target-libstdc++-v3
dvi-target-libstdc++-v3: \
configure-target-libstdc++-v3
@@ -18958,6 +22179,7 @@ dvi-target-libstdc++-v3: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -18967,12 +22189,15 @@ dvi-target-libstdc++-v3: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
maybe-TAGS-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-TAGS-target-libstdc++-v3: TAGS-target-libstdc++-v3
TAGS-target-libstdc++-v3: \
configure-target-libstdc++-v3
@@ -18980,6 +22205,7 @@ TAGS-target-libstdc++-v3: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -18989,12 +22215,15 @@ TAGS-target-libstdc++-v3: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3
maybe-install-info-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-info-target-libstdc++-v3: install-info-target-libstdc++-v3
install-info-target-libstdc++-v3: \
configure-target-libstdc++-v3 \
@@ -19003,6 +22232,7 @@ install-info-target-libstdc++-v3: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19012,12 +22242,15 @@ install-info-target-libstdc++-v3: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3
maybe-installcheck-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-installcheck-target-libstdc++-v3: installcheck-target-libstdc++-v3
installcheck-target-libstdc++-v3: \
configure-target-libstdc++-v3
@@ -19025,6 +22258,7 @@ installcheck-target-libstdc++-v3: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19034,18 +22268,22 @@ installcheck-target-libstdc++-v3: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3
maybe-mostlyclean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-mostlyclean-target-libstdc++-v3: mostlyclean-target-libstdc++-v3
mostlyclean-target-libstdc++-v3:
@[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19055,18 +22293,22 @@ mostlyclean-target-libstdc++-v3:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3
maybe-clean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-clean-target-libstdc++-v3: clean-target-libstdc++-v3
clean-target-libstdc++-v3:
@[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19076,18 +22318,22 @@ clean-target-libstdc++-v3:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3
maybe-distclean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-distclean-target-libstdc++-v3: distclean-target-libstdc++-v3
distclean-target-libstdc++-v3:
@[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19097,18 +22343,22 @@ distclean-target-libstdc++-v3:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libstdc++-v3
.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3
maybe-maintainer-clean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-maintainer-clean-target-libstdc++-v3: maintainer-clean-target-libstdc++-v3
maintainer-clean-target-libstdc++-v3:
@[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -19118,13 +22368,332 @@ maintainer-clean-target-libstdc++-v3:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libstdc++-v3
+
+
+.PHONY: configure-target-libmudflap maybe-configure-target-libmudflap
+maybe-configure-target-libmudflap:
+@if target-libmudflap
+maybe-configure-target-libmudflap: configure-target-libmudflap
+
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libmudflap/multilib.out: multilib.out
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
+ rm -f $(TARGET_SUBDIR)/libmudflap/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libmudflap/multilib.out
+
+configure-target-libmudflap: $(TARGET_SUBDIR)/libmudflap/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libmudflap/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libmudflap; \
+ cd "$(TARGET_SUBDIR)/libmudflap" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(TARGET_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libmudflap"; \
+ libsrcdir="$$s/libmudflap"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
+ || exit 1
+@endif target-libmudflap
+
+.PHONY: all-target-libmudflap maybe-all-target-libmudflap
+maybe-all-target-libmudflap:
+@if target-libmudflap
+TARGET-target-libmudflap=all
+maybe-all-target-libmudflap: all-target-libmudflap
+all-target-libmudflap: configure-target-libmudflap
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libmudflap))
+@endif target-libmudflap
+
+.PHONY: check-target-libmudflap maybe-check-target-libmudflap
+maybe-check-target-libmudflap:
+@if target-libmudflap
+maybe-check-target-libmudflap: check-target-libmudflap
+
+check-target-libmudflap:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libmudflap
+
+.PHONY: install-target-libmudflap maybe-install-target-libmudflap
+maybe-install-target-libmudflap:
+@if target-libmudflap
+maybe-install-target-libmudflap: install-target-libmudflap
+
+install-target-libmudflap: installdirs
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libmudflap
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libmudflap info-target-libmudflap
+maybe-info-target-libmudflap:
+@if target-libmudflap
+maybe-info-target-libmudflap: info-target-libmudflap
+
+info-target-libmudflap: \
+ configure-target-libmudflap
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-dvi-target-libmudflap dvi-target-libmudflap
+maybe-dvi-target-libmudflap:
+@if target-libmudflap
+maybe-dvi-target-libmudflap: dvi-target-libmudflap
+
+dvi-target-libmudflap: \
+ configure-target-libmudflap
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-TAGS-target-libmudflap TAGS-target-libmudflap
+maybe-TAGS-target-libmudflap:
+@if target-libmudflap
+maybe-TAGS-target-libmudflap: TAGS-target-libmudflap
+
+TAGS-target-libmudflap: \
+ configure-target-libmudflap
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-install-info-target-libmudflap install-info-target-libmudflap
+maybe-install-info-target-libmudflap:
+@if target-libmudflap
+maybe-install-info-target-libmudflap: install-info-target-libmudflap
+
+install-info-target-libmudflap: \
+ configure-target-libmudflap \
+ info-target-libmudflap
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+@endif target-libmudflap
+
+.PHONY: maybe-installcheck-target-libmudflap installcheck-target-libmudflap
+maybe-installcheck-target-libmudflap:
+@if target-libmudflap
+maybe-installcheck-target-libmudflap: installcheck-target-libmudflap
+
+installcheck-target-libmudflap: \
+ configure-target-libmudflap
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-mostlyclean-target-libmudflap mostlyclean-target-libmudflap
+maybe-mostlyclean-target-libmudflap:
+@if target-libmudflap
+maybe-mostlyclean-target-libmudflap: mostlyclean-target-libmudflap
+
+mostlyclean-target-libmudflap:
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-clean-target-libmudflap clean-target-libmudflap
+maybe-clean-target-libmudflap:
+@if target-libmudflap
+maybe-clean-target-libmudflap: clean-target-libmudflap
+
+clean-target-libmudflap:
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-distclean-target-libmudflap distclean-target-libmudflap
+maybe-distclean-target-libmudflap:
+@if target-libmudflap
+maybe-distclean-target-libmudflap: distclean-target-libmudflap
+
+distclean-target-libmudflap:
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
+
+.PHONY: maybe-maintainer-clean-target-libmudflap maintainer-clean-target-libmudflap
+maybe-maintainer-clean-target-libmudflap:
+@if target-libmudflap
+maybe-maintainer-clean-target-libmudflap: maintainer-clean-target-libmudflap
+
+maintainer-clean-target-libmudflap:
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(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
+
+@endif target-libmudflap
.PHONY: configure-target-newlib maybe-configure-target-newlib
maybe-configure-target-newlib:
+@if target-newlib
+maybe-configure-target-newlib: configure-target-newlib
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
@@ -19138,21 +22707,7 @@ configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/newlib; \
cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
case $(srcdir) in \
@@ -19169,44 +22724,60 @@ configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-newlib
.PHONY: all-target-newlib maybe-all-target-newlib
maybe-all-target-newlib:
+@if target-newlib
+TARGET-target-newlib=all
+maybe-all-target-newlib: all-target-newlib
all-target-newlib: configure-target-newlib
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
+@endif target-newlib
.PHONY: check-target-newlib maybe-check-target-newlib
maybe-check-target-newlib:
+@if target-newlib
+maybe-check-target-newlib: check-target-newlib
check-target-newlib:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-newlib
.PHONY: install-target-newlib maybe-install-target-newlib
maybe-install-target-newlib:
+@if target-newlib
+maybe-install-target-newlib: install-target-newlib
install-target-newlib: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-newlib
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-newlib info-target-newlib
maybe-info-target-newlib:
+@if target-newlib
+maybe-info-target-newlib: info-target-newlib
info-target-newlib: \
configure-target-newlib
@@ -19214,6 +22785,7 @@ info-target-newlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19223,12 +22795,15 @@ info-target-newlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-dvi-target-newlib dvi-target-newlib
maybe-dvi-target-newlib:
+@if target-newlib
+maybe-dvi-target-newlib: dvi-target-newlib
dvi-target-newlib: \
configure-target-newlib
@@ -19236,6 +22811,7 @@ dvi-target-newlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19245,12 +22821,15 @@ dvi-target-newlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
maybe-TAGS-target-newlib:
+@if target-newlib
+maybe-TAGS-target-newlib: TAGS-target-newlib
TAGS-target-newlib: \
configure-target-newlib
@@ -19258,6 +22837,7 @@ TAGS-target-newlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19267,12 +22847,15 @@ TAGS-target-newlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-install-info-target-newlib install-info-target-newlib
maybe-install-info-target-newlib:
+@if target-newlib
+maybe-install-info-target-newlib: install-info-target-newlib
install-info-target-newlib: \
configure-target-newlib \
@@ -19281,6 +22864,7 @@ install-info-target-newlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -19290,12 +22874,15 @@ install-info-target-newlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
maybe-installcheck-target-newlib:
+@if target-newlib
+maybe-installcheck-target-newlib: installcheck-target-newlib
installcheck-target-newlib: \
configure-target-newlib
@@ -19303,6 +22890,7 @@ installcheck-target-newlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19312,18 +22900,22 @@ installcheck-target-newlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
maybe-mostlyclean-target-newlib:
+@if target-newlib
+maybe-mostlyclean-target-newlib: mostlyclean-target-newlib
mostlyclean-target-newlib:
@[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19333,18 +22925,22 @@ mostlyclean-target-newlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-clean-target-newlib clean-target-newlib
maybe-clean-target-newlib:
+@if target-newlib
+maybe-clean-target-newlib: clean-target-newlib
clean-target-newlib:
@[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19354,18 +22950,22 @@ clean-target-newlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-distclean-target-newlib distclean-target-newlib
maybe-distclean-target-newlib:
+@if target-newlib
+maybe-distclean-target-newlib: distclean-target-newlib
distclean-target-newlib:
@[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19375,18 +22975,22 @@ distclean-target-newlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-newlib
.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
maybe-maintainer-clean-target-newlib:
+@if target-newlib
+maybe-maintainer-clean-target-newlib: maintainer-clean-target-newlib
maintainer-clean-target-newlib:
@[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -19396,43 +23000,32 @@ maintainer-clean-target-newlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-newlib
-.PHONY: configure-target-libf2c maybe-configure-target-libf2c
-maybe-configure-target-libf2c:
+.PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
+maybe-configure-target-libgfortran:
+@if target-libgfortran
+maybe-configure-target-libgfortran: configure-target-libgfortran
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
- rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
+$(TARGET_SUBDIR)/libgfortran/multilib.out: multilib.out
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+ rm -f $(TARGET_SUBDIR)/libgfortran/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libgfortran/multilib.out
-configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
+configure-target-libgfortran: $(TARGET_SUBDIR)/libgfortran/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libf2c; \
- cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
+ cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) \
topdir=$(srcdir) ;; \
@@ -19442,245 +23035,297 @@ configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
*) topdir="../../$(srcdir)" ;; \
esac ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libf2c"; \
- libsrcdir="$$s/libf2c"; \
+ srcdiroption="--srcdir=$${topdir}/libgfortran"; \
+ libsrcdir="$$s/libgfortran"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libgfortran
-.PHONY: all-target-libf2c maybe-all-target-libf2c
-maybe-all-target-libf2c:
-all-target-libf2c: configure-target-libf2c
+.PHONY: all-target-libgfortran maybe-all-target-libgfortran
+maybe-all-target-libgfortran:
+@if target-libgfortran
+TARGET-target-libgfortran=all
+maybe-all-target-libgfortran: all-target-libgfortran
+all-target-libgfortran: configure-target-libgfortran
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
+@endif target-libgfortran
-.PHONY: check-target-libf2c maybe-check-target-libf2c
-maybe-check-target-libf2c:
+.PHONY: check-target-libgfortran maybe-check-target-libgfortran
+maybe-check-target-libgfortran:
+@if target-libgfortran
+maybe-check-target-libgfortran: check-target-libgfortran
-check-target-libf2c:
+check-target-libgfortran:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libgfortran
-.PHONY: install-target-libf2c maybe-install-target-libf2c
-maybe-install-target-libf2c:
+.PHONY: install-target-libgfortran maybe-install-target-libgfortran
+maybe-install-target-libgfortran:
+@if target-libgfortran
+maybe-install-target-libgfortran: install-target-libgfortran
-install-target-libf2c: installdirs
+install-target-libgfortran: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgfortran
# Other targets (info, dvi, etc.)
-.PHONY: maybe-info-target-libf2c info-target-libf2c
-maybe-info-target-libf2c:
+.PHONY: maybe-info-target-libgfortran info-target-libgfortran
+maybe-info-target-libgfortran:
+@if target-libgfortran
+maybe-info-target-libgfortran: info-target-libgfortran
-info-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+info-target-libgfortran: \
+ configure-target-libgfortran
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c
-maybe-dvi-target-libf2c:
+.PHONY: maybe-dvi-target-libgfortran dvi-target-libgfortran
+maybe-dvi-target-libgfortran:
+@if target-libgfortran
+maybe-dvi-target-libgfortran: dvi-target-libgfortran
-dvi-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+dvi-target-libgfortran: \
+ configure-target-libgfortran
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c
-maybe-TAGS-target-libf2c:
+.PHONY: maybe-TAGS-target-libgfortran TAGS-target-libgfortran
+maybe-TAGS-target-libgfortran:
+@if target-libgfortran
+maybe-TAGS-target-libgfortran: TAGS-target-libgfortran
-TAGS-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+TAGS-target-libgfortran: \
+ configure-target-libgfortran
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c
-maybe-install-info-target-libf2c:
+.PHONY: maybe-install-info-target-libgfortran install-info-target-libgfortran
+maybe-install-info-target-libgfortran:
+@if target-libgfortran
+maybe-install-info-target-libgfortran: install-info-target-libgfortran
-install-info-target-libf2c: \
- configure-target-libf2c \
- info-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+install-info-target-libgfortran: \
+ configure-target-libgfortran \
+ info-target-libgfortran
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(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) \
+ install-info) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c
-maybe-installcheck-target-libf2c:
+.PHONY: maybe-installcheck-target-libgfortran installcheck-target-libgfortran
+maybe-installcheck-target-libgfortran:
+@if target-libgfortran
+maybe-installcheck-target-libgfortran: installcheck-target-libgfortran
-installcheck-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+installcheck-target-libgfortran: \
+ configure-target-libgfortran
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c
-maybe-mostlyclean-target-libf2c:
+.PHONY: maybe-mostlyclean-target-libgfortran mostlyclean-target-libgfortran
+maybe-mostlyclean-target-libgfortran:
+@if target-libgfortran
+maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran
-mostlyclean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+mostlyclean-target-libgfortran:
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-clean-target-libf2c clean-target-libf2c
-maybe-clean-target-libf2c:
+.PHONY: maybe-clean-target-libgfortran clean-target-libgfortran
+maybe-clean-target-libgfortran:
+@if target-libgfortran
+maybe-clean-target-libgfortran: clean-target-libgfortran
-clean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+clean-target-libgfortran:
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c
-maybe-distclean-target-libf2c:
+.PHONY: maybe-distclean-target-libgfortran distclean-target-libgfortran
+maybe-distclean-target-libgfortran:
+@if target-libgfortran
+maybe-distclean-target-libgfortran: distclean-target-libgfortran
-distclean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+distclean-target-libgfortran:
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libgfortran
-.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c
-maybe-maintainer-clean-target-libf2c:
+.PHONY: maybe-maintainer-clean-target-libgfortran maintainer-clean-target-libgfortran
+maybe-maintainer-clean-target-libgfortran:
+@if target-libgfortran
+maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran
-maintainer-clean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+maintainer-clean-target-libgfortran:
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgfortran" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
$(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) \
+ maintainer-clean) \
|| exit 1
+@endif target-libgfortran
.PHONY: configure-target-libobjc maybe-configure-target-libobjc
maybe-configure-target-libobjc:
+@if target-libobjc
+maybe-configure-target-libobjc: configure-target-libobjc
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
@@ -19694,21 +23339,7 @@ configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libobjc; \
cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
case $(srcdir) in \
@@ -19725,44 +23356,60 @@ configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libobjc
.PHONY: all-target-libobjc maybe-all-target-libobjc
maybe-all-target-libobjc:
+@if target-libobjc
+TARGET-target-libobjc=all
+maybe-all-target-libobjc: all-target-libobjc
all-target-libobjc: configure-target-libobjc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libobjc))
+@endif target-libobjc
.PHONY: check-target-libobjc maybe-check-target-libobjc
maybe-check-target-libobjc:
+@if target-libobjc
+maybe-check-target-libobjc: check-target-libobjc
check-target-libobjc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libobjc
.PHONY: install-target-libobjc maybe-install-target-libobjc
maybe-install-target-libobjc:
+@if target-libobjc
+maybe-install-target-libobjc: install-target-libobjc
install-target-libobjc: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libobjc
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libobjc info-target-libobjc
maybe-info-target-libobjc:
+@if target-libobjc
+maybe-info-target-libobjc: info-target-libobjc
info-target-libobjc: \
configure-target-libobjc
@@ -19770,6 +23417,7 @@ info-target-libobjc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19779,12 +23427,15 @@ info-target-libobjc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
maybe-dvi-target-libobjc:
+@if target-libobjc
+maybe-dvi-target-libobjc: dvi-target-libobjc
dvi-target-libobjc: \
configure-target-libobjc
@@ -19792,6 +23443,7 @@ dvi-target-libobjc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19801,12 +23453,15 @@ dvi-target-libobjc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc
maybe-TAGS-target-libobjc:
+@if target-libobjc
+maybe-TAGS-target-libobjc: TAGS-target-libobjc
TAGS-target-libobjc: \
configure-target-libobjc
@@ -19814,6 +23469,7 @@ TAGS-target-libobjc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19823,12 +23479,15 @@ TAGS-target-libobjc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc
maybe-install-info-target-libobjc:
+@if target-libobjc
+maybe-install-info-target-libobjc: install-info-target-libobjc
install-info-target-libobjc: \
configure-target-libobjc \
@@ -19837,6 +23496,7 @@ install-info-target-libobjc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -19846,12 +23506,15 @@ install-info-target-libobjc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc
maybe-installcheck-target-libobjc:
+@if target-libobjc
+maybe-installcheck-target-libobjc: installcheck-target-libobjc
installcheck-target-libobjc: \
configure-target-libobjc
@@ -19859,6 +23522,7 @@ installcheck-target-libobjc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19868,18 +23532,22 @@ installcheck-target-libobjc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc
maybe-mostlyclean-target-libobjc:
+@if target-libobjc
+maybe-mostlyclean-target-libobjc: mostlyclean-target-libobjc
mostlyclean-target-libobjc:
@[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19889,18 +23557,22 @@ mostlyclean-target-libobjc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-clean-target-libobjc clean-target-libobjc
maybe-clean-target-libobjc:
+@if target-libobjc
+maybe-clean-target-libobjc: clean-target-libobjc
clean-target-libobjc:
@[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19910,18 +23582,22 @@ clean-target-libobjc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc
maybe-distclean-target-libobjc:
+@if target-libobjc
+maybe-distclean-target-libobjc: distclean-target-libobjc
distclean-target-libobjc:
@[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -19931,18 +23607,22 @@ distclean-target-libobjc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libobjc
.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc
maybe-maintainer-clean-target-libobjc:
+@if target-libobjc
+maybe-maintainer-clean-target-libobjc: maintainer-clean-target-libobjc
maintainer-clean-target-libobjc:
@[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -19952,13 +23632,16 @@ maintainer-clean-target-libobjc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libobjc
.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
maybe-configure-target-libtermcap:
+@if target-libtermcap
+maybe-configure-target-libtermcap: configure-target-libtermcap
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
@@ -19972,21 +23655,7 @@ configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
case $(srcdir) in \
@@ -20025,40 +23694,55 @@ configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libtermcap
.PHONY: all-target-libtermcap maybe-all-target-libtermcap
maybe-all-target-libtermcap:
+@if target-libtermcap
+TARGET-target-libtermcap=all
+maybe-all-target-libtermcap: all-target-libtermcap
all-target-libtermcap: configure-target-libtermcap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libtermcap))
+@endif target-libtermcap
.PHONY: check-target-libtermcap maybe-check-target-libtermcap
maybe-check-target-libtermcap:
+@if target-libtermcap
+maybe-check-target-libtermcap: check-target-libtermcap
# Dummy target for uncheckable module.
check-target-libtermcap:
+@endif target-libtermcap
.PHONY: install-target-libtermcap maybe-install-target-libtermcap
maybe-install-target-libtermcap:
+@if target-libtermcap
+maybe-install-target-libtermcap: install-target-libtermcap
install-target-libtermcap: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libtermcap
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libtermcap info-target-libtermcap
maybe-info-target-libtermcap:
+@if target-libtermcap
+maybe-info-target-libtermcap: info-target-libtermcap
info-target-libtermcap: \
configure-target-libtermcap
@@ -20066,6 +23750,7 @@ info-target-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20075,12 +23760,15 @@ info-target-libtermcap: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libtermcap
.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap
maybe-dvi-target-libtermcap:
+@if target-libtermcap
+maybe-dvi-target-libtermcap: dvi-target-libtermcap
dvi-target-libtermcap: \
configure-target-libtermcap
@@ -20088,6 +23776,7 @@ dvi-target-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20097,12 +23786,15 @@ dvi-target-libtermcap: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libtermcap
.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
maybe-TAGS-target-libtermcap:
+@if target-libtermcap
+maybe-TAGS-target-libtermcap: TAGS-target-libtermcap
TAGS-target-libtermcap: \
configure-target-libtermcap
@@ -20110,6 +23802,7 @@ TAGS-target-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20119,12 +23812,15 @@ TAGS-target-libtermcap: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libtermcap
.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap
maybe-install-info-target-libtermcap:
+@if target-libtermcap
+maybe-install-info-target-libtermcap: install-info-target-libtermcap
install-info-target-libtermcap: \
configure-target-libtermcap \
@@ -20133,6 +23829,7 @@ install-info-target-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20142,12 +23839,15 @@ install-info-target-libtermcap: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libtermcap
.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap
maybe-installcheck-target-libtermcap:
+@if target-libtermcap
+maybe-installcheck-target-libtermcap: installcheck-target-libtermcap
installcheck-target-libtermcap: \
configure-target-libtermcap
@@ -20155,6 +23855,7 @@ installcheck-target-libtermcap: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20164,41 +23865,56 @@ installcheck-target-libtermcap: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libtermcap
.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap
maybe-mostlyclean-target-libtermcap:
+@if target-libtermcap
+maybe-mostlyclean-target-libtermcap: mostlyclean-target-libtermcap
# libtermcap doesn't support mostlyclean.
mostlyclean-target-libtermcap:
+@endif target-libtermcap
.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap
maybe-clean-target-libtermcap:
+@if target-libtermcap
+maybe-clean-target-libtermcap: clean-target-libtermcap
# libtermcap doesn't support clean.
clean-target-libtermcap:
+@endif target-libtermcap
.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap
maybe-distclean-target-libtermcap:
+@if target-libtermcap
+maybe-distclean-target-libtermcap: distclean-target-libtermcap
# libtermcap doesn't support distclean.
distclean-target-libtermcap:
+@endif target-libtermcap
.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap
maybe-maintainer-clean-target-libtermcap:
+@if target-libtermcap
+maybe-maintainer-clean-target-libtermcap: maintainer-clean-target-libtermcap
# libtermcap doesn't support maintainer-clean.
maintainer-clean-target-libtermcap:
+@endif target-libtermcap
.PHONY: configure-target-winsup maybe-configure-target-winsup
maybe-configure-target-winsup:
+@if target-winsup
+maybe-configure-target-winsup: configure-target-winsup
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
@@ -20212,21 +23928,7 @@ configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/winsup; \
cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
case $(srcdir) in \
@@ -20243,44 +23945,60 @@ configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-winsup
.PHONY: all-target-winsup maybe-all-target-winsup
maybe-all-target-winsup:
+@if target-winsup
+TARGET-target-winsup=all
+maybe-all-target-winsup: all-target-winsup
all-target-winsup: configure-target-winsup
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-winsup))
+@endif target-winsup
.PHONY: check-target-winsup maybe-check-target-winsup
maybe-check-target-winsup:
+@if target-winsup
+maybe-check-target-winsup: check-target-winsup
check-target-winsup:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-winsup
.PHONY: install-target-winsup maybe-install-target-winsup
maybe-install-target-winsup:
+@if target-winsup
+maybe-install-target-winsup: install-target-winsup
install-target-winsup: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-winsup
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-winsup info-target-winsup
maybe-info-target-winsup:
+@if target-winsup
+maybe-info-target-winsup: info-target-winsup
info-target-winsup: \
configure-target-winsup
@@ -20288,6 +24006,7 @@ info-target-winsup: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20297,12 +24016,15 @@ info-target-winsup: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-dvi-target-winsup dvi-target-winsup
maybe-dvi-target-winsup:
+@if target-winsup
+maybe-dvi-target-winsup: dvi-target-winsup
dvi-target-winsup: \
configure-target-winsup
@@ -20310,6 +24032,7 @@ dvi-target-winsup: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20319,12 +24042,15 @@ dvi-target-winsup: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
maybe-TAGS-target-winsup:
+@if target-winsup
+maybe-TAGS-target-winsup: TAGS-target-winsup
TAGS-target-winsup: \
configure-target-winsup
@@ -20332,6 +24058,7 @@ TAGS-target-winsup: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20341,12 +24068,15 @@ TAGS-target-winsup: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-install-info-target-winsup install-info-target-winsup
maybe-install-info-target-winsup:
+@if target-winsup
+maybe-install-info-target-winsup: install-info-target-winsup
install-info-target-winsup: \
configure-target-winsup \
@@ -20355,6 +24085,7 @@ install-info-target-winsup: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20364,12 +24095,15 @@ install-info-target-winsup: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup
maybe-installcheck-target-winsup:
+@if target-winsup
+maybe-installcheck-target-winsup: installcheck-target-winsup
installcheck-target-winsup: \
configure-target-winsup
@@ -20377,6 +24111,7 @@ installcheck-target-winsup: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20386,18 +24121,22 @@ installcheck-target-winsup: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup
maybe-mostlyclean-target-winsup:
+@if target-winsup
+maybe-mostlyclean-target-winsup: mostlyclean-target-winsup
mostlyclean-target-winsup:
@[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20407,18 +24146,22 @@ mostlyclean-target-winsup:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-clean-target-winsup clean-target-winsup
maybe-clean-target-winsup:
+@if target-winsup
+maybe-clean-target-winsup: clean-target-winsup
clean-target-winsup:
@[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20428,18 +24171,22 @@ clean-target-winsup:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-distclean-target-winsup distclean-target-winsup
maybe-distclean-target-winsup:
+@if target-winsup
+maybe-distclean-target-winsup: distclean-target-winsup
distclean-target-winsup:
@[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20449,18 +24196,22 @@ distclean-target-winsup:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-winsup
.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup
maybe-maintainer-clean-target-winsup:
+@if target-winsup
+maybe-maintainer-clean-target-winsup: maintainer-clean-target-winsup
maintainer-clean-target-winsup:
@[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20470,13 +24221,16 @@ maintainer-clean-target-winsup:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-winsup
.PHONY: configure-target-libgloss maybe-configure-target-libgloss
maybe-configure-target-libgloss:
+@if target-libgloss
+maybe-configure-target-libgloss: configure-target-libgloss
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
@@ -20490,21 +24244,7 @@ configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgloss; \
cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
case $(srcdir) in \
@@ -20521,40 +24261,55 @@ configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libgloss
.PHONY: all-target-libgloss maybe-all-target-libgloss
maybe-all-target-libgloss:
+@if target-libgloss
+TARGET-target-libgloss=all
+maybe-all-target-libgloss: all-target-libgloss
all-target-libgloss: configure-target-libgloss
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgloss))
+@endif target-libgloss
.PHONY: check-target-libgloss maybe-check-target-libgloss
maybe-check-target-libgloss:
+@if target-libgloss
+maybe-check-target-libgloss: check-target-libgloss
# Dummy target for uncheckable module.
check-target-libgloss:
+@endif target-libgloss
.PHONY: install-target-libgloss maybe-install-target-libgloss
maybe-install-target-libgloss:
+@if target-libgloss
+maybe-install-target-libgloss: install-target-libgloss
install-target-libgloss: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgloss
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libgloss info-target-libgloss
maybe-info-target-libgloss:
+@if target-libgloss
+maybe-info-target-libgloss: info-target-libgloss
info-target-libgloss: \
configure-target-libgloss
@@ -20562,6 +24317,7 @@ info-target-libgloss: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20571,12 +24327,15 @@ info-target-libgloss: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss
maybe-dvi-target-libgloss:
+@if target-libgloss
+maybe-dvi-target-libgloss: dvi-target-libgloss
dvi-target-libgloss: \
configure-target-libgloss
@@ -20584,6 +24343,7 @@ dvi-target-libgloss: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20593,12 +24353,15 @@ dvi-target-libgloss: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
maybe-TAGS-target-libgloss:
+@if target-libgloss
+maybe-TAGS-target-libgloss: TAGS-target-libgloss
TAGS-target-libgloss: \
configure-target-libgloss
@@ -20606,6 +24369,7 @@ TAGS-target-libgloss: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20615,12 +24379,15 @@ TAGS-target-libgloss: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss
maybe-install-info-target-libgloss:
+@if target-libgloss
+maybe-install-info-target-libgloss: install-info-target-libgloss
install-info-target-libgloss: \
configure-target-libgloss \
@@ -20629,6 +24396,7 @@ install-info-target-libgloss: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20638,12 +24406,15 @@ install-info-target-libgloss: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss
maybe-installcheck-target-libgloss:
+@if target-libgloss
+maybe-installcheck-target-libgloss: installcheck-target-libgloss
installcheck-target-libgloss: \
configure-target-libgloss
@@ -20651,6 +24422,7 @@ installcheck-target-libgloss: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20660,18 +24432,22 @@ installcheck-target-libgloss: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss
maybe-mostlyclean-target-libgloss:
+@if target-libgloss
+maybe-mostlyclean-target-libgloss: mostlyclean-target-libgloss
mostlyclean-target-libgloss:
@[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20681,18 +24457,22 @@ mostlyclean-target-libgloss:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-clean-target-libgloss clean-target-libgloss
maybe-clean-target-libgloss:
+@if target-libgloss
+maybe-clean-target-libgloss: clean-target-libgloss
clean-target-libgloss:
@[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20702,18 +24482,22 @@ clean-target-libgloss:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss
maybe-distclean-target-libgloss:
+@if target-libgloss
+maybe-distclean-target-libgloss: distclean-target-libgloss
distclean-target-libgloss:
@[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20723,18 +24507,22 @@ distclean-target-libgloss:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libgloss
.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss
maybe-maintainer-clean-target-libgloss:
+@if target-libgloss
+maybe-maintainer-clean-target-libgloss: maintainer-clean-target-libgloss
maintainer-clean-target-libgloss:
@[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20744,13 +24532,16 @@ maintainer-clean-target-libgloss:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libgloss
.PHONY: configure-target-libiberty maybe-configure-target-libiberty
maybe-configure-target-libiberty:
+@if target-libiberty
+maybe-configure-target-libiberty: configure-target-libiberty
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
@@ -20764,21 +24555,7 @@ configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libiberty; \
cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
case $(srcdir) in \
@@ -20795,44 +24572,60 @@ configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libiberty
.PHONY: all-target-libiberty maybe-all-target-libiberty
maybe-all-target-libiberty:
+@if target-libiberty
+TARGET-target-libiberty=all
+maybe-all-target-libiberty: all-target-libiberty
all-target-libiberty: configure-target-libiberty
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libiberty))
+@endif target-libiberty
.PHONY: check-target-libiberty maybe-check-target-libiberty
maybe-check-target-libiberty:
+@if target-libiberty
+maybe-check-target-libiberty: check-target-libiberty
check-target-libiberty:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libiberty
.PHONY: install-target-libiberty maybe-install-target-libiberty
maybe-install-target-libiberty:
+@if target-libiberty
+maybe-install-target-libiberty: install-target-libiberty
install-target-libiberty: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libiberty
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libiberty info-target-libiberty
maybe-info-target-libiberty:
+@if target-libiberty
+maybe-info-target-libiberty: info-target-libiberty
info-target-libiberty: \
configure-target-libiberty
@@ -20840,6 +24633,7 @@ info-target-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20849,12 +24643,15 @@ info-target-libiberty: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
maybe-dvi-target-libiberty:
+@if target-libiberty
+maybe-dvi-target-libiberty: dvi-target-libiberty
dvi-target-libiberty: \
configure-target-libiberty
@@ -20862,6 +24659,7 @@ dvi-target-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20871,12 +24669,15 @@ dvi-target-libiberty: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
maybe-TAGS-target-libiberty:
+@if target-libiberty
+maybe-TAGS-target-libiberty: TAGS-target-libiberty
TAGS-target-libiberty: \
configure-target-libiberty
@@ -20884,6 +24685,7 @@ TAGS-target-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20893,12 +24695,15 @@ TAGS-target-libiberty: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
maybe-install-info-target-libiberty:
+@if target-libiberty
+maybe-install-info-target-libiberty: install-info-target-libiberty
install-info-target-libiberty: \
configure-target-libiberty \
@@ -20907,6 +24712,7 @@ install-info-target-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -20916,12 +24722,15 @@ install-info-target-libiberty: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
maybe-installcheck-target-libiberty:
+@if target-libiberty
+maybe-installcheck-target-libiberty: installcheck-target-libiberty
installcheck-target-libiberty: \
configure-target-libiberty
@@ -20929,6 +24738,7 @@ installcheck-target-libiberty: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20938,18 +24748,22 @@ installcheck-target-libiberty: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
maybe-mostlyclean-target-libiberty:
+@if target-libiberty
+maybe-mostlyclean-target-libiberty: mostlyclean-target-libiberty
mostlyclean-target-libiberty:
@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20959,18 +24773,22 @@ mostlyclean-target-libiberty:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-clean-target-libiberty clean-target-libiberty
maybe-clean-target-libiberty:
+@if target-libiberty
+maybe-clean-target-libiberty: clean-target-libiberty
clean-target-libiberty:
@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -20980,18 +24798,22 @@ clean-target-libiberty:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
maybe-distclean-target-libiberty:
+@if target-libiberty
+maybe-distclean-target-libiberty: distclean-target-libiberty
distclean-target-libiberty:
@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21001,18 +24823,22 @@ distclean-target-libiberty:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libiberty
.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
maybe-maintainer-clean-target-libiberty:
+@if target-libiberty
+maybe-maintainer-clean-target-libiberty: maintainer-clean-target-libiberty
maintainer-clean-target-libiberty:
@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21022,13 +24848,16 @@ maintainer-clean-target-libiberty:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libiberty
.PHONY: configure-target-gperf maybe-configure-target-gperf
maybe-configure-target-gperf:
+@if target-gperf
+maybe-configure-target-gperf: configure-target-gperf
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
@@ -21042,21 +24871,7 @@ configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/gperf; \
cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
case $(srcdir) in \
@@ -21073,44 +24888,60 @@ configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-gperf
.PHONY: all-target-gperf maybe-all-target-gperf
maybe-all-target-gperf:
+@if target-gperf
+TARGET-target-gperf=all
+maybe-all-target-gperf: all-target-gperf
all-target-gperf: configure-target-gperf
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-gperf))
+@endif target-gperf
.PHONY: check-target-gperf maybe-check-target-gperf
maybe-check-target-gperf:
+@if target-gperf
+maybe-check-target-gperf: check-target-gperf
check-target-gperf:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-gperf
.PHONY: install-target-gperf maybe-install-target-gperf
maybe-install-target-gperf:
+@if target-gperf
+maybe-install-target-gperf: install-target-gperf
install-target-gperf: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-gperf
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-gperf info-target-gperf
maybe-info-target-gperf:
+@if target-gperf
+maybe-info-target-gperf: info-target-gperf
info-target-gperf: \
configure-target-gperf
@@ -21118,6 +24949,7 @@ info-target-gperf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21127,12 +24959,15 @@ info-target-gperf: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-dvi-target-gperf dvi-target-gperf
maybe-dvi-target-gperf:
+@if target-gperf
+maybe-dvi-target-gperf: dvi-target-gperf
dvi-target-gperf: \
configure-target-gperf
@@ -21140,6 +24975,7 @@ dvi-target-gperf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21149,12 +24985,15 @@ dvi-target-gperf: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
maybe-TAGS-target-gperf:
+@if target-gperf
+maybe-TAGS-target-gperf: TAGS-target-gperf
TAGS-target-gperf: \
configure-target-gperf
@@ -21162,6 +25001,7 @@ TAGS-target-gperf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21171,12 +25011,15 @@ TAGS-target-gperf: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-install-info-target-gperf install-info-target-gperf
maybe-install-info-target-gperf:
+@if target-gperf
+maybe-install-info-target-gperf: install-info-target-gperf
install-info-target-gperf: \
configure-target-gperf \
@@ -21185,6 +25028,7 @@ install-info-target-gperf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21194,12 +25038,15 @@ install-info-target-gperf: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
maybe-installcheck-target-gperf:
+@if target-gperf
+maybe-installcheck-target-gperf: installcheck-target-gperf
installcheck-target-gperf: \
configure-target-gperf
@@ -21207,6 +25054,7 @@ installcheck-target-gperf: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21216,18 +25064,22 @@ installcheck-target-gperf: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
maybe-mostlyclean-target-gperf:
+@if target-gperf
+maybe-mostlyclean-target-gperf: mostlyclean-target-gperf
mostlyclean-target-gperf:
@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21237,18 +25089,22 @@ mostlyclean-target-gperf:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-clean-target-gperf clean-target-gperf
maybe-clean-target-gperf:
+@if target-gperf
+maybe-clean-target-gperf: clean-target-gperf
clean-target-gperf:
@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21258,18 +25114,22 @@ clean-target-gperf:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-distclean-target-gperf distclean-target-gperf
maybe-distclean-target-gperf:
+@if target-gperf
+maybe-distclean-target-gperf: distclean-target-gperf
distclean-target-gperf:
@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21279,18 +25139,22 @@ distclean-target-gperf:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-gperf
.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
maybe-maintainer-clean-target-gperf:
+@if target-gperf
+maybe-maintainer-clean-target-gperf: maintainer-clean-target-gperf
maintainer-clean-target-gperf:
@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21300,13 +25164,16 @@ maintainer-clean-target-gperf:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-gperf
.PHONY: configure-target-examples maybe-configure-target-examples
maybe-configure-target-examples:
+@if target-examples
+maybe-configure-target-examples: configure-target-examples
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/examples/multilib.out: multilib.out
@@ -21320,21 +25187,7 @@ configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/examples; \
cd "$(TARGET_SUBDIR)/examples" || exit 1; \
case $(srcdir) in \
@@ -21351,36 +25204,50 @@ configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-examples
.PHONY: all-target-examples maybe-all-target-examples
maybe-all-target-examples:
+@if target-examples
+TARGET-target-examples=all
+maybe-all-target-examples: all-target-examples
all-target-examples: configure-target-examples
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/examples && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-examples))
+@endif target-examples
.PHONY: check-target-examples maybe-check-target-examples
maybe-check-target-examples:
+@if target-examples
+maybe-check-target-examples: check-target-examples
# Dummy target for uncheckable module.
check-target-examples:
+@endif target-examples
.PHONY: install-target-examples maybe-install-target-examples
maybe-install-target-examples:
+@if target-examples
+maybe-install-target-examples: install-target-examples
# Dummy target for uninstallable.
install-target-examples:
+@endif target-examples
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-examples info-target-examples
maybe-info-target-examples:
+@if target-examples
+maybe-info-target-examples: info-target-examples
info-target-examples: \
configure-target-examples
@@ -21388,6 +25255,7 @@ info-target-examples: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21397,12 +25265,15 @@ info-target-examples: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-examples
.PHONY: maybe-dvi-target-examples dvi-target-examples
maybe-dvi-target-examples:
+@if target-examples
+maybe-dvi-target-examples: dvi-target-examples
dvi-target-examples: \
configure-target-examples
@@ -21410,6 +25281,7 @@ dvi-target-examples: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21419,12 +25291,15 @@ dvi-target-examples: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-examples
.PHONY: maybe-TAGS-target-examples TAGS-target-examples
maybe-TAGS-target-examples:
+@if target-examples
+maybe-TAGS-target-examples: TAGS-target-examples
TAGS-target-examples: \
configure-target-examples
@@ -21432,6 +25307,7 @@ TAGS-target-examples: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21441,12 +25317,15 @@ TAGS-target-examples: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-examples
.PHONY: maybe-install-info-target-examples install-info-target-examples
maybe-install-info-target-examples:
+@if target-examples
+maybe-install-info-target-examples: install-info-target-examples
install-info-target-examples: \
configure-target-examples \
@@ -21455,6 +25334,7 @@ install-info-target-examples: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21464,12 +25344,15 @@ install-info-target-examples: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-examples
.PHONY: maybe-installcheck-target-examples installcheck-target-examples
maybe-installcheck-target-examples:
+@if target-examples
+maybe-installcheck-target-examples: installcheck-target-examples
installcheck-target-examples: \
configure-target-examples
@@ -21477,6 +25360,7 @@ installcheck-target-examples: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21486,18 +25370,22 @@ installcheck-target-examples: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-examples
.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
maybe-mostlyclean-target-examples:
+@if target-examples
+maybe-mostlyclean-target-examples: mostlyclean-target-examples
mostlyclean-target-examples:
@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21507,18 +25395,22 @@ mostlyclean-target-examples:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-examples
.PHONY: maybe-clean-target-examples clean-target-examples
maybe-clean-target-examples:
+@if target-examples
+maybe-clean-target-examples: clean-target-examples
clean-target-examples:
@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21528,18 +25420,22 @@ clean-target-examples:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-examples
.PHONY: maybe-distclean-target-examples distclean-target-examples
maybe-distclean-target-examples:
+@if target-examples
+maybe-distclean-target-examples: distclean-target-examples
distclean-target-examples:
@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21549,18 +25445,22 @@ distclean-target-examples:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-examples
.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
maybe-maintainer-clean-target-examples:
+@if target-examples
+maybe-maintainer-clean-target-examples: maintainer-clean-target-examples
maintainer-clean-target-examples:
@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21570,13 +25470,16 @@ maintainer-clean-target-examples:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-examples
.PHONY: configure-target-libffi maybe-configure-target-libffi
maybe-configure-target-libffi:
+@if target-libffi
+maybe-configure-target-libffi: configure-target-libffi
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
@@ -21590,21 +25493,7 @@ configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libffi; \
cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
case $(srcdir) in \
@@ -21621,44 +25510,60 @@ configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libffi
.PHONY: all-target-libffi maybe-all-target-libffi
maybe-all-target-libffi:
+@if target-libffi
+TARGET-target-libffi=all
+maybe-all-target-libffi: all-target-libffi
all-target-libffi: configure-target-libffi
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libffi))
+@endif target-libffi
.PHONY: check-target-libffi maybe-check-target-libffi
maybe-check-target-libffi:
+@if target-libffi
+maybe-check-target-libffi: check-target-libffi
check-target-libffi:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libffi
.PHONY: install-target-libffi maybe-install-target-libffi
maybe-install-target-libffi:
+@if target-libffi
+maybe-install-target-libffi: install-target-libffi
install-target-libffi: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libffi
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libffi info-target-libffi
maybe-info-target-libffi:
+@if target-libffi
+maybe-info-target-libffi: info-target-libffi
info-target-libffi: \
configure-target-libffi
@@ -21666,6 +25571,7 @@ info-target-libffi: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21675,12 +25581,15 @@ info-target-libffi: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-dvi-target-libffi dvi-target-libffi
maybe-dvi-target-libffi:
+@if target-libffi
+maybe-dvi-target-libffi: dvi-target-libffi
dvi-target-libffi: \
configure-target-libffi
@@ -21688,6 +25597,7 @@ dvi-target-libffi: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21697,12 +25607,15 @@ dvi-target-libffi: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
maybe-TAGS-target-libffi:
+@if target-libffi
+maybe-TAGS-target-libffi: TAGS-target-libffi
TAGS-target-libffi: \
configure-target-libffi
@@ -21710,6 +25623,7 @@ TAGS-target-libffi: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21719,12 +25633,15 @@ TAGS-target-libffi: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-install-info-target-libffi install-info-target-libffi
maybe-install-info-target-libffi:
+@if target-libffi
+maybe-install-info-target-libffi: install-info-target-libffi
install-info-target-libffi: \
configure-target-libffi \
@@ -21733,6 +25650,7 @@ install-info-target-libffi: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21742,12 +25660,15 @@ install-info-target-libffi: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi
maybe-installcheck-target-libffi:
+@if target-libffi
+maybe-installcheck-target-libffi: installcheck-target-libffi
installcheck-target-libffi: \
configure-target-libffi
@@ -21755,6 +25676,7 @@ installcheck-target-libffi: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21764,18 +25686,22 @@ installcheck-target-libffi: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi
maybe-mostlyclean-target-libffi:
+@if target-libffi
+maybe-mostlyclean-target-libffi: mostlyclean-target-libffi
mostlyclean-target-libffi:
@[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21785,18 +25711,22 @@ mostlyclean-target-libffi:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-clean-target-libffi clean-target-libffi
maybe-clean-target-libffi:
+@if target-libffi
+maybe-clean-target-libffi: clean-target-libffi
clean-target-libffi:
@[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21806,18 +25736,22 @@ clean-target-libffi:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-distclean-target-libffi distclean-target-libffi
maybe-distclean-target-libffi:
+@if target-libffi
+maybe-distclean-target-libffi: distclean-target-libffi
distclean-target-libffi:
@[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21827,18 +25761,22 @@ distclean-target-libffi:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libffi
.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi
maybe-maintainer-clean-target-libffi:
+@if target-libffi
+maybe-maintainer-clean-target-libffi: maintainer-clean-target-libffi
maintainer-clean-target-libffi:
@[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -21848,13 +25786,16 @@ maintainer-clean-target-libffi:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libffi
.PHONY: configure-target-libjava maybe-configure-target-libjava
maybe-configure-target-libjava:
+@if target-libjava
+maybe-configure-target-libjava: configure-target-libjava
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
@@ -21868,22 +25809,7 @@ configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libjava; \
cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
case $(srcdir) in \
@@ -21900,44 +25826,60 @@ configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libjava
.PHONY: all-target-libjava maybe-all-target-libjava
maybe-all-target-libjava:
+@if target-libjava
+TARGET-target-libjava=all
+maybe-all-target-libjava: all-target-libjava
all-target-libjava: configure-target-libjava
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libjava))
+@endif target-libjava
.PHONY: check-target-libjava maybe-check-target-libjava
maybe-check-target-libjava:
+@if target-libjava
+maybe-check-target-libjava: check-target-libjava
check-target-libjava:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+@endif target-libjava
.PHONY: install-target-libjava maybe-install-target-libjava
maybe-install-target-libjava:
+@if target-libjava
+maybe-install-target-libjava: install-target-libjava
install-target-libjava: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libjava
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libjava info-target-libjava
maybe-info-target-libjava:
+@if target-libjava
+maybe-info-target-libjava: info-target-libjava
info-target-libjava: \
configure-target-libjava
@@ -21945,6 +25887,7 @@ info-target-libjava: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21954,12 +25897,15 @@ info-target-libjava: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-dvi-target-libjava dvi-target-libjava
maybe-dvi-target-libjava:
+@if target-libjava
+maybe-dvi-target-libjava: dvi-target-libjava
dvi-target-libjava: \
configure-target-libjava
@@ -21967,6 +25913,7 @@ dvi-target-libjava: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21976,12 +25923,15 @@ dvi-target-libjava: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
maybe-TAGS-target-libjava:
+@if target-libjava
+maybe-TAGS-target-libjava: TAGS-target-libjava
TAGS-target-libjava: \
configure-target-libjava
@@ -21989,6 +25939,7 @@ TAGS-target-libjava: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -21998,12 +25949,15 @@ TAGS-target-libjava: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-install-info-target-libjava install-info-target-libjava
maybe-install-info-target-libjava:
+@if target-libjava
+maybe-install-info-target-libjava: install-info-target-libjava
install-info-target-libjava: \
configure-target-libjava \
@@ -22012,6 +25966,7 @@ install-info-target-libjava: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -22021,12 +25976,15 @@ install-info-target-libjava: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
maybe-installcheck-target-libjava:
+@if target-libjava
+maybe-installcheck-target-libjava: installcheck-target-libjava
installcheck-target-libjava: \
configure-target-libjava
@@ -22034,6 +25992,7 @@ installcheck-target-libjava: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22043,18 +26002,22 @@ installcheck-target-libjava: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
maybe-mostlyclean-target-libjava:
+@if target-libjava
+maybe-mostlyclean-target-libjava: mostlyclean-target-libjava
mostlyclean-target-libjava:
@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22064,18 +26027,22 @@ mostlyclean-target-libjava:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-clean-target-libjava clean-target-libjava
maybe-clean-target-libjava:
+@if target-libjava
+maybe-clean-target-libjava: clean-target-libjava
clean-target-libjava:
@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22085,18 +26052,22 @@ clean-target-libjava:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-distclean-target-libjava distclean-target-libjava
maybe-distclean-target-libjava:
+@if target-libjava
+maybe-distclean-target-libjava: distclean-target-libjava
distclean-target-libjava:
@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22106,18 +26077,22 @@ distclean-target-libjava:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libjava
.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
maybe-maintainer-clean-target-libjava:
+@if target-libjava
+maybe-maintainer-clean-target-libjava: maintainer-clean-target-libjava
maintainer-clean-target-libjava:
@[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(RAW_CXX_TARGET_EXPORTS) \
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|"`; \
@@ -22127,13 +26102,16 @@ maintainer-clean-target-libjava:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libjava
.PHONY: configure-target-zlib maybe-configure-target-zlib
maybe-configure-target-zlib:
+@if target-zlib
+maybe-configure-target-zlib: configure-target-zlib
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
@@ -22147,21 +26125,7 @@ configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/zlib; \
cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
case $(srcdir) in \
@@ -22200,44 +26164,60 @@ configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-zlib
.PHONY: all-target-zlib maybe-all-target-zlib
maybe-all-target-zlib:
+@if target-zlib
+TARGET-target-zlib=all
+maybe-all-target-zlib: all-target-zlib
all-target-zlib: configure-target-zlib
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-zlib))
+@endif target-zlib
.PHONY: check-target-zlib maybe-check-target-zlib
maybe-check-target-zlib:
+@if target-zlib
+maybe-check-target-zlib: check-target-zlib
check-target-zlib:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-zlib
.PHONY: install-target-zlib maybe-install-target-zlib
maybe-install-target-zlib:
+@if target-zlib
+maybe-install-target-zlib: install-target-zlib
install-target-zlib: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-zlib
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-zlib info-target-zlib
maybe-info-target-zlib:
+@if target-zlib
+maybe-info-target-zlib: info-target-zlib
info-target-zlib: \
configure-target-zlib
@@ -22245,6 +26225,7 @@ info-target-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22254,12 +26235,15 @@ info-target-zlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-dvi-target-zlib dvi-target-zlib
maybe-dvi-target-zlib:
+@if target-zlib
+maybe-dvi-target-zlib: dvi-target-zlib
dvi-target-zlib: \
configure-target-zlib
@@ -22267,6 +26251,7 @@ dvi-target-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22276,12 +26261,15 @@ dvi-target-zlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
maybe-TAGS-target-zlib:
+@if target-zlib
+maybe-TAGS-target-zlib: TAGS-target-zlib
TAGS-target-zlib: \
configure-target-zlib
@@ -22289,6 +26277,7 @@ TAGS-target-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22298,12 +26287,15 @@ TAGS-target-zlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-install-info-target-zlib install-info-target-zlib
maybe-install-info-target-zlib:
+@if target-zlib
+maybe-install-info-target-zlib: install-info-target-zlib
install-info-target-zlib: \
configure-target-zlib \
@@ -22312,6 +26304,7 @@ install-info-target-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22321,12 +26314,15 @@ install-info-target-zlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib
maybe-installcheck-target-zlib:
+@if target-zlib
+maybe-installcheck-target-zlib: installcheck-target-zlib
installcheck-target-zlib: \
configure-target-zlib
@@ -22334,6 +26330,7 @@ installcheck-target-zlib: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22343,18 +26340,22 @@ installcheck-target-zlib: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib
maybe-mostlyclean-target-zlib:
+@if target-zlib
+maybe-mostlyclean-target-zlib: mostlyclean-target-zlib
mostlyclean-target-zlib:
@[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22364,18 +26365,22 @@ mostlyclean-target-zlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-clean-target-zlib clean-target-zlib
maybe-clean-target-zlib:
+@if target-zlib
+maybe-clean-target-zlib: clean-target-zlib
clean-target-zlib:
@[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22385,18 +26390,22 @@ clean-target-zlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-distclean-target-zlib distclean-target-zlib
maybe-distclean-target-zlib:
+@if target-zlib
+maybe-distclean-target-zlib: distclean-target-zlib
distclean-target-zlib:
@[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22406,18 +26415,22 @@ distclean-target-zlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-zlib
.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib
maybe-maintainer-clean-target-zlib:
+@if target-zlib
+maybe-maintainer-clean-target-zlib: maintainer-clean-target-zlib
maintainer-clean-target-zlib:
@[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22427,13 +26440,16 @@ maintainer-clean-target-zlib:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-zlib
.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
maybe-configure-target-boehm-gc:
+@if target-boehm-gc
+maybe-configure-target-boehm-gc: configure-target-boehm-gc
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
@@ -22447,21 +26463,7 @@ configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
case $(srcdir) in \
@@ -22478,44 +26480,60 @@ configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-boehm-gc
.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
maybe-all-target-boehm-gc:
+@if target-boehm-gc
+TARGET-target-boehm-gc=all
+maybe-all-target-boehm-gc: all-target-boehm-gc
all-target-boehm-gc: configure-target-boehm-gc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-boehm-gc))
+@endif target-boehm-gc
.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc
maybe-check-target-boehm-gc:
+@if target-boehm-gc
+maybe-check-target-boehm-gc: check-target-boehm-gc
check-target-boehm-gc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-boehm-gc
.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc
maybe-install-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-target-boehm-gc: install-target-boehm-gc
install-target-boehm-gc: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-boehm-gc
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
maybe-info-target-boehm-gc:
+@if target-boehm-gc
+maybe-info-target-boehm-gc: info-target-boehm-gc
info-target-boehm-gc: \
configure-target-boehm-gc
@@ -22523,6 +26541,7 @@ info-target-boehm-gc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22532,12 +26551,15 @@ info-target-boehm-gc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc
maybe-dvi-target-boehm-gc:
+@if target-boehm-gc
+maybe-dvi-target-boehm-gc: dvi-target-boehm-gc
dvi-target-boehm-gc: \
configure-target-boehm-gc
@@ -22545,6 +26567,7 @@ dvi-target-boehm-gc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22554,12 +26577,15 @@ dvi-target-boehm-gc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
maybe-TAGS-target-boehm-gc:
+@if target-boehm-gc
+maybe-TAGS-target-boehm-gc: TAGS-target-boehm-gc
TAGS-target-boehm-gc: \
configure-target-boehm-gc
@@ -22567,6 +26593,7 @@ TAGS-target-boehm-gc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22576,12 +26603,15 @@ TAGS-target-boehm-gc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc
maybe-install-info-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-info-target-boehm-gc: install-info-target-boehm-gc
install-info-target-boehm-gc: \
configure-target-boehm-gc \
@@ -22590,6 +26620,7 @@ install-info-target-boehm-gc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22599,12 +26630,15 @@ install-info-target-boehm-gc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc
maybe-installcheck-target-boehm-gc:
+@if target-boehm-gc
+maybe-installcheck-target-boehm-gc: installcheck-target-boehm-gc
installcheck-target-boehm-gc: \
configure-target-boehm-gc
@@ -22612,6 +26646,7 @@ installcheck-target-boehm-gc: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22621,18 +26656,22 @@ installcheck-target-boehm-gc: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc
maybe-mostlyclean-target-boehm-gc:
+@if target-boehm-gc
+maybe-mostlyclean-target-boehm-gc: mostlyclean-target-boehm-gc
mostlyclean-target-boehm-gc:
@[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22642,18 +26681,22 @@ mostlyclean-target-boehm-gc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc
maybe-clean-target-boehm-gc:
+@if target-boehm-gc
+maybe-clean-target-boehm-gc: clean-target-boehm-gc
clean-target-boehm-gc:
@[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22663,18 +26706,22 @@ clean-target-boehm-gc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc
maybe-distclean-target-boehm-gc:
+@if target-boehm-gc
+maybe-distclean-target-boehm-gc: distclean-target-boehm-gc
distclean-target-boehm-gc:
@[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22684,18 +26731,22 @@ distclean-target-boehm-gc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-boehm-gc
.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc
maybe-maintainer-clean-target-boehm-gc:
+@if target-boehm-gc
+maybe-maintainer-clean-target-boehm-gc: maintainer-clean-target-boehm-gc
maintainer-clean-target-boehm-gc:
@[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22705,13 +26756,16 @@ maintainer-clean-target-boehm-gc:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-boehm-gc
.PHONY: configure-target-qthreads maybe-configure-target-qthreads
maybe-configure-target-qthreads:
+@if target-qthreads
+maybe-configure-target-qthreads: configure-target-qthreads
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
@@ -22725,21 +26779,7 @@ configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/qthreads; \
cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
case $(srcdir) in \
@@ -22756,44 +26796,60 @@ configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-qthreads
.PHONY: all-target-qthreads maybe-all-target-qthreads
maybe-all-target-qthreads:
+@if target-qthreads
+TARGET-target-qthreads=all
+maybe-all-target-qthreads: all-target-qthreads
all-target-qthreads: configure-target-qthreads
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-qthreads))
+@endif target-qthreads
.PHONY: check-target-qthreads maybe-check-target-qthreads
maybe-check-target-qthreads:
+@if target-qthreads
+maybe-check-target-qthreads: check-target-qthreads
check-target-qthreads:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-qthreads
.PHONY: install-target-qthreads maybe-install-target-qthreads
maybe-install-target-qthreads:
+@if target-qthreads
+maybe-install-target-qthreads: install-target-qthreads
install-target-qthreads: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-qthreads
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-qthreads info-target-qthreads
maybe-info-target-qthreads:
+@if target-qthreads
+maybe-info-target-qthreads: info-target-qthreads
info-target-qthreads: \
configure-target-qthreads
@@ -22801,6 +26857,7 @@ info-target-qthreads: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22810,12 +26867,15 @@ info-target-qthreads: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
maybe-dvi-target-qthreads:
+@if target-qthreads
+maybe-dvi-target-qthreads: dvi-target-qthreads
dvi-target-qthreads: \
configure-target-qthreads
@@ -22823,6 +26883,7 @@ dvi-target-qthreads: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22832,12 +26893,15 @@ dvi-target-qthreads: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
maybe-TAGS-target-qthreads:
+@if target-qthreads
+maybe-TAGS-target-qthreads: TAGS-target-qthreads
TAGS-target-qthreads: \
configure-target-qthreads
@@ -22845,6 +26909,7 @@ TAGS-target-qthreads: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22854,12 +26919,15 @@ TAGS-target-qthreads: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
maybe-install-info-target-qthreads:
+@if target-qthreads
+maybe-install-info-target-qthreads: install-info-target-qthreads
install-info-target-qthreads: \
configure-target-qthreads \
@@ -22868,6 +26936,7 @@ install-info-target-qthreads: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22877,12 +26946,15 @@ install-info-target-qthreads: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
maybe-installcheck-target-qthreads:
+@if target-qthreads
+maybe-installcheck-target-qthreads: installcheck-target-qthreads
installcheck-target-qthreads: \
configure-target-qthreads
@@ -22890,6 +26962,7 @@ installcheck-target-qthreads: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22899,18 +26972,22 @@ installcheck-target-qthreads: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
maybe-mostlyclean-target-qthreads:
+@if target-qthreads
+maybe-mostlyclean-target-qthreads: mostlyclean-target-qthreads
mostlyclean-target-qthreads:
@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22920,18 +26997,22 @@ mostlyclean-target-qthreads:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-clean-target-qthreads clean-target-qthreads
maybe-clean-target-qthreads:
+@if target-qthreads
+maybe-clean-target-qthreads: clean-target-qthreads
clean-target-qthreads:
@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22941,18 +27022,22 @@ clean-target-qthreads:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
maybe-distclean-target-qthreads:
+@if target-qthreads
+maybe-distclean-target-qthreads: distclean-target-qthreads
distclean-target-qthreads:
@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -22962,18 +27047,22 @@ distclean-target-qthreads:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-qthreads
.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
maybe-maintainer-clean-target-qthreads:
+@if target-qthreads
+maybe-maintainer-clean-target-qthreads: maintainer-clean-target-qthreads
maintainer-clean-target-qthreads:
@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -22983,13 +27072,16 @@ maintainer-clean-target-qthreads:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-qthreads
.PHONY: configure-target-rda maybe-configure-target-rda
maybe-configure-target-rda:
+@if target-rda
+maybe-configure-target-rda: configure-target-rda
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/rda/multilib.out: multilib.out
@@ -23003,21 +27095,7 @@ configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/rda; \
cd "$(TARGET_SUBDIR)/rda" || exit 1; \
case $(srcdir) in \
@@ -23034,44 +27112,60 @@ configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-rda
.PHONY: all-target-rda maybe-all-target-rda
maybe-all-target-rda:
+@if target-rda
+TARGET-target-rda=all
+maybe-all-target-rda: all-target-rda
all-target-rda: configure-target-rda
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-rda))
+@endif target-rda
.PHONY: check-target-rda maybe-check-target-rda
maybe-check-target-rda:
+@if target-rda
+maybe-check-target-rda: check-target-rda
check-target-rda:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-rda
.PHONY: install-target-rda maybe-install-target-rda
maybe-install-target-rda:
+@if target-rda
+maybe-install-target-rda: install-target-rda
install-target-rda: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-rda
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-rda info-target-rda
maybe-info-target-rda:
+@if target-rda
+maybe-info-target-rda: info-target-rda
info-target-rda: \
configure-target-rda
@@ -23079,6 +27173,7 @@ info-target-rda: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23088,12 +27183,15 @@ info-target-rda: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-rda
.PHONY: maybe-dvi-target-rda dvi-target-rda
maybe-dvi-target-rda:
+@if target-rda
+maybe-dvi-target-rda: dvi-target-rda
dvi-target-rda: \
configure-target-rda
@@ -23101,6 +27199,7 @@ dvi-target-rda: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23110,12 +27209,15 @@ dvi-target-rda: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-rda
.PHONY: maybe-TAGS-target-rda TAGS-target-rda
maybe-TAGS-target-rda:
+@if target-rda
+maybe-TAGS-target-rda: TAGS-target-rda
TAGS-target-rda: \
configure-target-rda
@@ -23123,6 +27225,7 @@ TAGS-target-rda: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23132,12 +27235,15 @@ TAGS-target-rda: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-rda
.PHONY: maybe-install-info-target-rda install-info-target-rda
maybe-install-info-target-rda:
+@if target-rda
+maybe-install-info-target-rda: install-info-target-rda
install-info-target-rda: \
configure-target-rda \
@@ -23146,6 +27252,7 @@ install-info-target-rda: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -23155,12 +27262,15 @@ install-info-target-rda: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-rda
.PHONY: maybe-installcheck-target-rda installcheck-target-rda
maybe-installcheck-target-rda:
+@if target-rda
+maybe-installcheck-target-rda: installcheck-target-rda
installcheck-target-rda: \
configure-target-rda
@@ -23168,6 +27278,7 @@ installcheck-target-rda: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23177,18 +27288,22 @@ installcheck-target-rda: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-rda
.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda
maybe-mostlyclean-target-rda:
+@if target-rda
+maybe-mostlyclean-target-rda: mostlyclean-target-rda
mostlyclean-target-rda:
@[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23198,18 +27313,22 @@ mostlyclean-target-rda:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-rda
.PHONY: maybe-clean-target-rda clean-target-rda
maybe-clean-target-rda:
+@if target-rda
+maybe-clean-target-rda: clean-target-rda
clean-target-rda:
@[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23219,18 +27338,22 @@ clean-target-rda:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-rda
.PHONY: maybe-distclean-target-rda distclean-target-rda
maybe-distclean-target-rda:
+@if target-rda
+maybe-distclean-target-rda: distclean-target-rda
distclean-target-rda:
@[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23240,18 +27363,22 @@ distclean-target-rda:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-rda
.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda
maybe-maintainer-clean-target-rda:
+@if target-rda
+maybe-maintainer-clean-target-rda: maintainer-clean-target-rda
maintainer-clean-target-rda:
@[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
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|"`; \
@@ -23261,13 +27388,16 @@ maintainer-clean-target-rda:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-rda
.PHONY: configure-target-libada maybe-configure-target-libada
maybe-configure-target-libada:
+@if target-libada
+maybe-configure-target-libada: configure-target-libada
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/libada/multilib.out: multilib.out
@@ -23281,21 +27411,7 @@ configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libada; \
cd "$(TARGET_SUBDIR)/libada" || exit 1; \
case $(srcdir) in \
@@ -23312,44 +27428,60 @@ configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" \
|| exit 1
+@endif target-libada
.PHONY: all-target-libada maybe-all-target-libada
maybe-all-target-libada:
+@if target-libada
+TARGET-target-libada=all
+maybe-all-target-libada: all-target-libada
all-target-libada: configure-target-libada
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libada))
+@endif target-libada
.PHONY: check-target-libada maybe-check-target-libada
maybe-check-target-libada:
+@if target-libada
+maybe-check-target-libada: check-target-libada
check-target-libada:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libada
.PHONY: install-target-libada maybe-install-target-libada
maybe-install-target-libada:
+@if target-libada
+maybe-install-target-libada: install-target-libada
install-target-libada: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libada
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libada info-target-libada
maybe-info-target-libada:
+@if target-libada
+maybe-info-target-libada: info-target-libada
info-target-libada: \
configure-target-libada
@@ -23357,6 +27489,7 @@ info-target-libada: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23366,12 +27499,15 @@ info-target-libada: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
+ info) \
|| exit 1
+@endif target-libada
.PHONY: maybe-dvi-target-libada dvi-target-libada
maybe-dvi-target-libada:
+@if target-libada
+maybe-dvi-target-libada: dvi-target-libada
dvi-target-libada: \
configure-target-libada
@@ -23379,6 +27515,7 @@ dvi-target-libada: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23388,12 +27525,15 @@ dvi-target-libada: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
+ dvi) \
|| exit 1
+@endif target-libada
.PHONY: maybe-TAGS-target-libada TAGS-target-libada
maybe-TAGS-target-libada:
+@if target-libada
+maybe-TAGS-target-libada: TAGS-target-libada
TAGS-target-libada: \
configure-target-libada
@@ -23401,6 +27541,7 @@ TAGS-target-libada: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23410,12 +27551,15 @@ TAGS-target-libada: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
+ TAGS) \
|| exit 1
+@endif target-libada
.PHONY: maybe-install-info-target-libada install-info-target-libada
maybe-install-info-target-libada:
+@if target-libada
+maybe-install-info-target-libada: install-info-target-libada
install-info-target-libada: \
configure-target-libada \
@@ -23424,6 +27568,7 @@ install-info-target-libada: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23433,12 +27578,15 @@ install-info-target-libada: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
+ install-info) \
|| exit 1
+@endif target-libada
.PHONY: maybe-installcheck-target-libada installcheck-target-libada
maybe-installcheck-target-libada:
+@if target-libada
+maybe-installcheck-target-libada: installcheck-target-libada
installcheck-target-libada: \
configure-target-libada
@@ -23446,6 +27594,7 @@ installcheck-target-libada: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23455,18 +27604,22 @@ installcheck-target-libada: \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
+ installcheck) \
|| exit 1
+@endif target-libada
.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada
maybe-mostlyclean-target-libada:
+@if target-libada
+maybe-mostlyclean-target-libada: mostlyclean-target-libada
mostlyclean-target-libada:
@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23476,18 +27629,22 @@ mostlyclean-target-libada:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
+ mostlyclean) \
|| exit 1
+@endif target-libada
.PHONY: maybe-clean-target-libada clean-target-libada
maybe-clean-target-libada:
+@if target-libada
+maybe-clean-target-libada: clean-target-libada
clean-target-libada:
@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23497,18 +27654,22 @@ clean-target-libada:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
+ clean) \
|| exit 1
+@endif target-libada
.PHONY: maybe-distclean-target-libada distclean-target-libada
maybe-distclean-target-libada:
+@if target-libada
+maybe-distclean-target-libada: distclean-target-libada
distclean-target-libada:
@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23518,18 +27679,22 @@ distclean-target-libada:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
+ distclean) \
|| exit 1
+@endif target-libada
.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada
maybe-maintainer-clean-target-libada:
+@if target-libada
+maybe-maintainer-clean-target-libada: maintainer-clean-target-libada
maintainer-clean-target-libada:
@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(NORMAL_TARGET_EXPORTS) \
echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -23539,9 +27704,10 @@ maintainer-clean-target-libada:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
+ maintainer-clean) \
|| exit 1
+@endif target-libada
@@ -23549,91 +27715,18 @@ maintainer-clean-target-libada:
# GCC module
# ----------
-# Unfortunately, while gcc _should_ be a host module,
-# libgcc is a target module, and gen* programs are
-# build modules. So GCC is a sort of hybrid.
+@if gcc-no-bootstrap
+# GCC has some more recursive targets, which trigger the old
+# (but still current, until the toplevel bootstrap project
+# is finished) compiler bootstrapping rules.
-# gcc is the only module which uses GCC_FLAGS_TO_PASS.
-# Don't use shared host config.cache, as it will confuse later
-# directories; GCC wants slightly different values for some
-# precious variables. *sigh*
-
-# We must skip configuring if toplevel bootstrap is going.
-.PHONY: configure-gcc maybe-configure-gcc
-maybe-configure-gcc:
-configure-gcc:
- @test ! -f gcc/Makefile || exit 0; \
- [ -f stage_last ] && exit 0; \
- [ -d gcc ] || mkdir gcc; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- 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 \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
-# causes trouble. This wart will be fixed eventually by moving
-# the bootstrap behavior to this file.
-.PHONY: all-gcc maybe-all-gcc
-maybe-all-gcc:
-all-gcc: configure-gcc
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ -f stage_last ] ; then \
- true ; \
- elif [ -f gcc/stage_last ] ; then \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
- else \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
- fi
-
-# Building GCC uses some tools for rebuilding "source" files
-# like texinfo, bison/byacc, etc. So we must depend on those.
-#
-# While building GCC, it may be necessary to run various target
-# programs like the assembler, linker, etc. So we depend on
-# those too.
-#
-# In theory, on an SMP all those dependencies can be resolved
-# in parallel.
-#
GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Bootstrapping the compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
@r=`${PWD_COMMAND}`; export r; \
@@ -23653,63 +27746,57 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
compare=compare ;; \
esac; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "$$msg"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Bootstrapping the compiler"; \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping training compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
- echo "Building runtime libraries and training compiler"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
- @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building feedback based compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
.PHONY: cross
-cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
- LANGUAGES="c c++" all
-
-.PHONY: check-gcc maybe-check-gcc
-maybe-check-gcc:
-check-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
- else \
- true; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
+@if gcc
.PHONY: check-gcc-c++
check-gcc-c++:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
@@ -23718,18 +27805,6 @@ check-gcc-c++:
.PHONY: check-c++
check-c++: check-target-libstdc++-v3 check-gcc-c++
-.PHONY: install-gcc maybe-install-gcc
-maybe-install-gcc:
-install-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- else \
- true; \
- fi
-
# Install the gcc headers files, but not the fixed include files,
# which Cygnus is not allowed to distribute. This rule is very
# dependent on the workings of the gcc Makefile.in.
@@ -23745,217 +27820,57 @@ gcc-no-fixedincludes:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
+@endif gcc
-# Other targets (dvi, info, etc.)
-
-.PHONY: maybe-info-gcc info-gcc
-maybe-info-gcc:
-info-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-
-.PHONY: maybe-dvi-gcc dvi-gcc
-maybe-dvi-gcc:
-dvi-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-
-.PHONY: maybe-TAGS-gcc TAGS-gcc
-maybe-TAGS-gcc:
-TAGS-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-
-.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_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-
-.PHONY: maybe-installcheck-gcc installcheck-gcc
-maybe-installcheck-gcc:
-installcheck-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
+# ---------------------
+# GCC bootstrap support
+# ---------------------
-.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
-maybe-mostlyclean-gcc:
-mostlyclean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
+# We track the current stage (the one in 'gcc') in the stage_current file.
+# stage_last instead tracks the stage that was built last. These targets
+# are dummy when toplevel bootstrap is not active.
+.PHONY: unstage
+unstage:
+@if gcc-bootstrap
+ @[ -f stage_current ] || $(MAKE) `cat stage_last`-start
+@endif gcc-bootstrap
-.PHONY: maybe-clean-gcc clean-gcc
-maybe-clean-gcc:
-clean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
+.PHONY: stage
+stage:
+@if gcc-bootstrap
+ @$(MAKE) `cat stage_current`-end
+@endif gcc-bootstrap
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
-.PHONY: maybe-distclean-gcc distclean-gcc
-maybe-distclean-gcc:
-distclean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('gcc-prev'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+# At the end of the bootstrap, a symlink to 'stage3-gcc' named 'gcc' must
+# be kept, so that libraries can find it. Ick!
-.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
-maybe-maintainer-clean-gcc:
-maintainer-clean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-
-
-# ---------------------
-# GCC bootstrap support
-# ---------------------
+# It would be best to preinstall gcc into a staging area (and in the
+# future, gather there all prebootstrap packages). This would allow
+# assemblers and linkers can be bootstrapped as well as the compiler
+# (both in a combined tree, or separately). This however requires some
+# change to the gcc driver, again in order to avoid comparison failures.
-# We name the directories for the various stages "stage1-gcc",
-# "stage2-gcc","stage3-gcc", etc.
-# Unfortunately, the 'compare' process will fail (on debugging information)
-# if any directory names are different!
-# So in the building rule for each stage, we relocate them before and after.
-# The current one is 'gcc', while the previous one is 'prev-gcc'. (The
-# current one must be 'gcc' for now because the scripts in that directory
-# assume it.)
-# At the end of the bootstrap, 'stage3-gcc' must be moved to 'gcc' so that
-# libraries can find it. Ick!
+# Bugs: This is crippled when doing parallel make, the `make all-host'
+# and `make all-target' phases can be parallelized.
-# Bugs: This is almost certainly not parallel-make safe.
# 'touch' doesn't work right on some platforms.
STAMP = echo timestamp >
@@ -23969,6 +27884,16 @@ STAMP = echo timestamp >
STAGE1_CFLAGS=@stage1_cflags@
STAGE1_LANGUAGES=@stage1_languages@
+# We only want to compare .o files, so set this!
+objext = .o
+
+# Flags to pass to stage2 and later makes.
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ STAGE_PREFIX=$$r/stage-gcc/ \
+ CFLAGS="$(BOOT_CFLAGS)" \
+ ADAC="\$$(CC)"
+
# For stage 1:
# * We force-disable intermodule optimizations, even if
# --enable-intermodule was passed, since the installed compiler probably
@@ -23977,35 +27902,359 @@ STAGE1_LANGUAGES=@stage1_languages@
# * Likewise, we force-disable coverage flags, since the installed compiler
# probably has never heard of them.
# * We build only C (and possibly Ada).
-configure-stage1-gcc:
- echo configure-stage1-gcc > stage_last ; \
- if [ -f stage1-gcc/Makefile ] ; then \
- $(STAMP) configure-stage1-gcc ; \
- exit 0; \
+
+
+.PHONY: stage1-start stage1-end
+
+stage1-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage1 > stage_current ; \
+ echo stage1 > stage_last
+@if bfd
+ @[ -d stage1-bfd ] || mkdir stage1-bfd; \
+ set stage1-bfd bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stage1-opcodes ] || mkdir stage1-opcodes; \
+ set stage1-opcodes opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stage1-binutils ] || mkdir stage1-binutils; \
+ set stage1-binutils binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stage1-gas ] || mkdir stage1-gas; \
+ set stage1-gas gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stage1-gcc ] || mkdir stage1-gcc; \
+ set stage1-gcc gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stage1-intl ] || mkdir stage1-intl; \
+ set stage1-intl intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stage1-ld ] || mkdir stage1-ld; \
+ set stage1-ld ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stage1-libcpp ] || mkdir stage1-libcpp; \
+ set stage1-libcpp libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stage1-libiberty ] || mkdir stage1-libiberty; \
+ set stage1-libiberty libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stage1-zlib ] || mkdir stage1-zlib; \
+ set stage1-zlib zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stage1-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stage1-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stage1-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stage1-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stage1-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stage1-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stage1-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage 1. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage1-bubble
+stage1-bubble::
+ @if test -f stage1-lean ; then \
+ echo Skipping rebuild of stage1 ; \
else \
- true ; \
- fi ; \
- [ -d stage1-gcc ] || mkdir stage1-gcc; \
- mv stage1-gcc gcc ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage1; \
+ fi
+
+.PHONY: all-stage1 clean-stage1
+all-stage1: \
+ maybe-all-stage1-bfd \
+ maybe-all-stage1-opcodes \
+ maybe-all-stage1-binutils \
+ maybe-all-stage1-gas \
+ maybe-all-stage1-gcc \
+ maybe-all-stage1-intl \
+ maybe-all-stage1-ld \
+ maybe-all-stage1-libcpp \
+ maybe-all-stage1-libiberty \
+ maybe-all-stage1-zlib
+
+do-clean: clean-stage1
+clean-stage1: \
+ maybe-clean-stage1-bfd \
+ maybe-clean-stage1-opcodes \
+ maybe-clean-stage1-binutils \
+ maybe-clean-stage1-gas \
+ maybe-clean-stage1-gcc \
+ maybe-clean-stage1-intl \
+ maybe-clean-stage1-ld \
+ maybe-clean-stage1-libcpp \
+ maybe-clean-stage1-libiberty \
+ maybe-clean-stage1-zlib
+
+
+.PHONY: configure-stage1-bfd maybe-configure-stage1-bfd
+.PHONY: all-stage1-bfd maybe-all-stage1-bfd
+.PHONY: clean-stage1-bfd maybe-clean-stage1-bfd
+
+maybe-configure-stage1-bfd:
+maybe-all-stage1-bfd:
+maybe-clean-stage1-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stage1-bfd: configure-stage1-bfd
+configure-stage1-bfd:
+ @$(MAKE) stage1-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-bfd: all-stage1-bfd
+all-stage1-bfd: configure-stage1-bfd
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-bfd: clean-stage1-bfd
+clean-stage1-bfd:
+ @[ -f bfd/Makefile ] || [ -f stage1-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stage1-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stage1-opcodes maybe-configure-stage1-opcodes
+.PHONY: all-stage1-opcodes maybe-all-stage1-opcodes
+.PHONY: clean-stage1-opcodes maybe-clean-stage1-opcodes
+
+maybe-configure-stage1-opcodes:
+maybe-all-stage1-opcodes:
+maybe-clean-stage1-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stage1-opcodes: configure-stage1-opcodes
+configure-stage1-opcodes:
+ @$(MAKE) stage1-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-opcodes: all-stage1-opcodes
+all-stage1-opcodes: configure-stage1-opcodes
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-opcodes: clean-stage1-opcodes
+clean-stage1-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stage1-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stage1-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stage1-binutils maybe-configure-stage1-binutils
+.PHONY: all-stage1-binutils maybe-all-stage1-binutils
+.PHONY: clean-stage1-binutils maybe-clean-stage1-binutils
+
+maybe-configure-stage1-binutils:
+maybe-all-stage1-binutils:
+maybe-clean-stage1-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stage1-binutils: configure-stage1-binutils
+configure-stage1-binutils:
+ @$(MAKE) stage1-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-binutils: all-stage1-binutils
+all-stage1-binutils: configure-stage1-binutils
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-binutils: clean-stage1-binutils
+clean-stage1-binutils:
+ @[ -f binutils/Makefile ] || [ -f stage1-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stage1-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stage1-gas maybe-configure-stage1-gas
+.PHONY: all-stage1-gas maybe-all-stage1-gas
+.PHONY: clean-stage1-gas maybe-clean-stage1-gas
+
+maybe-configure-stage1-gas:
+maybe-all-stage1-gas:
+maybe-clean-stage1-gas:
+
+@if gas-bootstrap
+maybe-configure-stage1-gas: configure-stage1-gas
+configure-stage1-gas:
+ @$(MAKE) stage1-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-gas: all-stage1-gas
+all-stage1-gas: configure-stage1-gas
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-gas: clean-stage1-gas
+clean-stage1-gas:
+ @[ -f gas/Makefile ] || [ -f stage1-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stage1-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stage1-gcc maybe-configure-stage1-gcc
+.PHONY: all-stage1-gcc maybe-all-stage1-gcc
+.PHONY: clean-stage1-gcc maybe-clean-stage1-gcc
+
+maybe-configure-stage1-gcc:
+maybe-all-stage1-gcc:
+maybe-clean-stage1-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stage1-gcc: configure-stage1-gcc
+configure-stage1-gcc:
+ @$(MAKE) stage1-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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 stage 1 in gcc; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in gcc ; \
cd gcc || exit 1; \
case $(srcdir) in \
\.) \
@@ -24020,64 +28269,1418 @@ configure-stage1-gcc:
esac; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage \
- --enable-languages="$(STAGE1_LANGUAGES)"; \
- cd .. ; \
- mv gcc stage1-gcc ; \
- $(STAMP) configure-stage1-gcc
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-gcc: all-stage1-gcc
+all-stage1-gcc: configure-stage1-gcc
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage1-gcc: clean-stage1-gcc
+clean-stage1-gcc:
+ @[ -f gcc/Makefile ] || [ -f stage1-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stage1-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
-# Real targets act phony if they depend on phony targets; this hack
-# prevents gratuitous rebuilding of stage 1.
-prebootstrap:
- $(MAKE) all-bootstrap
- $(STAMP) prebootstrap
-all-stage1-gcc: configure-stage1-gcc prebootstrap
- echo all-stage1-gcc > stage_last ; \
+.PHONY: configure-stage1-intl maybe-configure-stage1-intl
+.PHONY: all-stage1-intl maybe-all-stage1-intl
+.PHONY: clean-stage1-intl maybe-clean-stage1-intl
+
+maybe-configure-stage1-intl:
+maybe-all-stage1-intl:
+maybe-clean-stage1-intl:
+
+@if intl-bootstrap
+maybe-configure-stage1-intl: configure-stage1-intl
+configure-stage1-intl:
+ @$(MAKE) stage1-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage1-gcc gcc ; \
- cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" \
- || exit 1 ; \
- cd .. ; \
- mv gcc stage1-gcc ; \
- $(STAMP) all-stage1-gcc
-
-# TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally)
-# Possibly pass --enable-werror-always (depending on --enable-werror);
-# that's what @stage2_werror_flag@ is for
-configure-stage2-gcc: all-stage1-gcc
- echo configure-stage2-gcc > stage_last ; \
- if [ -f stage2-gcc/Makefile ] ; then \
- $(STAMP) configure-stage2-gcc ; \
- exit 0; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-intl: all-stage1-intl
+all-stage1-intl: configure-stage1-intl
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-intl: clean-stage1-intl
+clean-stage1-intl:
+ @[ -f intl/Makefile ] || [ -f stage1-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stage1-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stage1-ld maybe-configure-stage1-ld
+.PHONY: all-stage1-ld maybe-all-stage1-ld
+.PHONY: clean-stage1-ld maybe-clean-stage1-ld
+
+maybe-configure-stage1-ld:
+maybe-all-stage1-ld:
+maybe-clean-stage1-ld:
+
+@if ld-bootstrap
+maybe-configure-stage1-ld: configure-stage1-ld
+configure-stage1-ld:
+ @$(MAKE) stage1-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-ld: all-stage1-ld
+all-stage1-ld: configure-stage1-ld
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-ld: clean-stage1-ld
+clean-stage1-ld:
+ @[ -f ld/Makefile ] || [ -f stage1-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stage1-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stage1-libcpp maybe-configure-stage1-libcpp
+.PHONY: all-stage1-libcpp maybe-all-stage1-libcpp
+.PHONY: clean-stage1-libcpp maybe-clean-stage1-libcpp
+
+maybe-configure-stage1-libcpp:
+maybe-all-stage1-libcpp:
+maybe-clean-stage1-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stage1-libcpp: configure-stage1-libcpp
+configure-stage1-libcpp:
+ @$(MAKE) stage1-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-libcpp: all-stage1-libcpp
+all-stage1-libcpp: configure-stage1-libcpp
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-libcpp: clean-stage1-libcpp
+clean-stage1-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stage1-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stage1-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stage1-libiberty maybe-configure-stage1-libiberty
+.PHONY: all-stage1-libiberty maybe-all-stage1-libiberty
+.PHONY: clean-stage1-libiberty maybe-clean-stage1-libiberty
+
+maybe-configure-stage1-libiberty:
+maybe-all-stage1-libiberty:
+maybe-clean-stage1-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stage1-libiberty: configure-stage1-libiberty
+configure-stage1-libiberty:
+ @$(MAKE) stage1-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-libiberty: all-stage1-libiberty
+all-stage1-libiberty: configure-stage1-libiberty
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-libiberty: clean-stage1-libiberty
+clean-stage1-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stage1-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stage1-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stage1-zlib maybe-configure-stage1-zlib
+.PHONY: all-stage1-zlib maybe-all-stage1-zlib
+.PHONY: clean-stage1-zlib maybe-clean-stage1-zlib
+
+maybe-configure-stage1-zlib:
+maybe-all-stage1-zlib:
+maybe-clean-stage1-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stage1-zlib: configure-stage1-zlib
+configure-stage1-zlib:
+ @$(MAKE) stage1-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+
+maybe-all-stage1-zlib: all-stage1-zlib
+all-stage1-zlib: configure-stage1-zlib
+ @$(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)"
+
+maybe-clean-stage1-zlib: clean-stage1-zlib
+clean-stage1-zlib:
+ @[ -f zlib/Makefile ] || [ -f stage1-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stage1-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+
+.PHONY: distclean-stage1
+distclean-stage1::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage1-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage2-start stage2-end
+
+stage2-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage2 > stage_current ; \
+ echo stage2 > stage_last
+@if bfd
+ @[ -d stage2-bfd ] || mkdir stage2-bfd; \
+ set stage2-bfd bfd ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stage2-opcodes ] || mkdir stage2-opcodes; \
+ set stage2-opcodes opcodes ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stage2-binutils ] || mkdir stage2-binutils; \
+ set stage2-binutils binutils ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stage2-gas ] || mkdir stage2-gas; \
+ set stage2-gas gas ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stage2-gcc ] || mkdir stage2-gcc; \
+ set stage2-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stage2-intl ] || mkdir stage2-intl; \
+ set stage2-intl intl ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stage2-ld ] || mkdir stage2-ld; \
+ set stage2-ld ld ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stage2-libcpp ] || mkdir stage2-libcpp; \
+ set stage2-libcpp libcpp ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stage2-libiberty ] || mkdir stage2-libiberty; \
+ set stage2-libiberty libiberty ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stage2-zlib ] || mkdir stage2-zlib; \
+ set stage2-zlib zlib ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stage2-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stage2-bfd ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stage2-opcodes ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stage2-binutils ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stage2-gas ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stage2-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stage2-intl ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stage2-ld ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stage2-libcpp ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stage2-libiberty ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stage2-zlib ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage 2. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage2-bubble
+stage2-bubble:: stage1-bubble
+ @if test -f stage2-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stage2 ; \
else \
- true ; \
- fi ; \
- [ -d stage2-gcc ] || mkdir stage2-gcc; \
- mv stage2-gcc gcc ; \
- mv stage1-gcc prev-gcc ; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage2; \
+ fi
+
+.PHONY: all-stage2 clean-stage2
+all-stage2: \
+ maybe-all-stage2-bfd \
+ maybe-all-stage2-opcodes \
+ maybe-all-stage2-binutils \
+ maybe-all-stage2-gas \
+ maybe-all-stage2-gcc \
+ maybe-all-stage2-intl \
+ maybe-all-stage2-ld \
+ maybe-all-stage2-libcpp \
+ maybe-all-stage2-libiberty \
+ maybe-all-stage2-zlib
+
+do-clean: clean-stage2
+clean-stage2: \
+ maybe-clean-stage2-bfd \
+ maybe-clean-stage2-opcodes \
+ maybe-clean-stage2-binutils \
+ maybe-clean-stage2-gas \
+ maybe-clean-stage2-gcc \
+ maybe-clean-stage2-intl \
+ maybe-clean-stage2-ld \
+ maybe-clean-stage2-libcpp \
+ maybe-clean-stage2-libiberty \
+ maybe-clean-stage2-zlib
+
+
+.PHONY: configure-stage2-bfd maybe-configure-stage2-bfd
+.PHONY: all-stage2-bfd maybe-all-stage2-bfd
+.PHONY: clean-stage2-bfd maybe-clean-stage2-bfd
+
+maybe-configure-stage2-bfd:
+maybe-all-stage2-bfd:
+maybe-clean-stage2-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stage2-bfd: configure-stage2-bfd
+configure-stage2-bfd:
+ @$(MAKE) stage2-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-bfd: all-stage2-bfd
+all-stage2-bfd: configure-stage2-bfd
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-bfd: clean-stage2-bfd
+clean-stage2-bfd:
+ @[ -f bfd/Makefile ] || [ -f stage2-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stage2-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
+.PHONY: all-stage2-opcodes maybe-all-stage2-opcodes
+.PHONY: clean-stage2-opcodes maybe-clean-stage2-opcodes
+
+maybe-configure-stage2-opcodes:
+maybe-all-stage2-opcodes:
+maybe-clean-stage2-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stage2-opcodes: configure-stage2-opcodes
+configure-stage2-opcodes:
+ @$(MAKE) stage2-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-opcodes: all-stage2-opcodes
+all-stage2-opcodes: configure-stage2-opcodes
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-opcodes: clean-stage2-opcodes
+clean-stage2-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stage2-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stage2-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stage2-binutils maybe-configure-stage2-binutils
+.PHONY: all-stage2-binutils maybe-all-stage2-binutils
+.PHONY: clean-stage2-binutils maybe-clean-stage2-binutils
+
+maybe-configure-stage2-binutils:
+maybe-all-stage2-binutils:
+maybe-clean-stage2-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stage2-binutils: configure-stage2-binutils
+configure-stage2-binutils:
+ @$(MAKE) stage2-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-binutils: all-stage2-binutils
+all-stage2-binutils: configure-stage2-binutils
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-binutils: clean-stage2-binutils
+clean-stage2-binutils:
+ @[ -f binutils/Makefile ] || [ -f stage2-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stage2-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stage2-gas maybe-configure-stage2-gas
+.PHONY: all-stage2-gas maybe-all-stage2-gas
+.PHONY: clean-stage2-gas maybe-clean-stage2-gas
+
+maybe-configure-stage2-gas:
+maybe-all-stage2-gas:
+maybe-clean-stage2-gas:
+
+@if gas-bootstrap
+maybe-configure-stage2-gas: configure-stage2-gas
+configure-stage2-gas:
+ @$(MAKE) stage2-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-gas: all-stage2-gas
+all-stage2-gas: configure-stage2-gas
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-gas: clean-stage2-gas
+clean-stage2-gas:
+ @[ -f gas/Makefile ] || [ -f stage2-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stage2-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stage2-gcc maybe-configure-stage2-gcc
+.PHONY: all-stage2-gcc maybe-all-stage2-gcc
+.PHONY: clean-stage2-gcc maybe-clean-stage2-gcc
+
+maybe-configure-stage2-gcc:
+maybe-all-stage2-gcc:
+maybe-clean-stage2-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stage2-gcc: configure-stage2-gcc
+configure-stage2-gcc:
+ @$(MAKE) stage2-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-gcc: all-stage2-gcc
+all-stage2-gcc: configure-stage2-gcc
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage2-gcc: clean-stage2-gcc
+clean-stage2-gcc:
+ @[ -f gcc/Makefile ] || [ -f stage2-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stage2-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: configure-stage2-intl maybe-configure-stage2-intl
+.PHONY: all-stage2-intl maybe-all-stage2-intl
+.PHONY: clean-stage2-intl maybe-clean-stage2-intl
+
+maybe-configure-stage2-intl:
+maybe-all-stage2-intl:
+maybe-clean-stage2-intl:
+
+@if intl-bootstrap
+maybe-configure-stage2-intl: configure-stage2-intl
+configure-stage2-intl:
+ @$(MAKE) stage2-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- 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; \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- echo Configuring stage 2 in gcc; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-intl: all-stage2-intl
+all-stage2-intl: configure-stage2-intl
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-intl: clean-stage2-intl
+clean-stage2-intl:
+ @[ -f intl/Makefile ] || [ -f stage2-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stage2-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stage2-ld maybe-configure-stage2-ld
+.PHONY: all-stage2-ld maybe-all-stage2-ld
+.PHONY: clean-stage2-ld maybe-clean-stage2-ld
+
+maybe-configure-stage2-ld:
+maybe-all-stage2-ld:
+maybe-clean-stage2-ld:
+
+@if ld-bootstrap
+maybe-configure-stage2-ld: configure-stage2-ld
+configure-stage2-ld:
+ @$(MAKE) stage2-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-ld: all-stage2-ld
+all-stage2-ld: configure-stage2-ld
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-ld: clean-stage2-ld
+clean-stage2-ld:
+ @[ -f ld/Makefile ] || [ -f stage2-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stage2-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stage2-libcpp maybe-configure-stage2-libcpp
+.PHONY: all-stage2-libcpp maybe-all-stage2-libcpp
+.PHONY: clean-stage2-libcpp maybe-clean-stage2-libcpp
+
+maybe-configure-stage2-libcpp:
+maybe-all-stage2-libcpp:
+maybe-clean-stage2-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stage2-libcpp: configure-stage2-libcpp
+configure-stage2-libcpp:
+ @$(MAKE) stage2-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-libcpp: all-stage2-libcpp
+all-stage2-libcpp: configure-stage2-libcpp
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-libcpp: clean-stage2-libcpp
+clean-stage2-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stage2-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stage2-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
+.PHONY: all-stage2-libiberty maybe-all-stage2-libiberty
+.PHONY: clean-stage2-libiberty maybe-clean-stage2-libiberty
+
+maybe-configure-stage2-libiberty:
+maybe-all-stage2-libiberty:
+maybe-clean-stage2-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stage2-libiberty: configure-stage2-libiberty
+configure-stage2-libiberty:
+ @$(MAKE) stage2-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-libiberty: all-stage2-libiberty
+all-stage2-libiberty: configure-stage2-libiberty
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-libiberty: clean-stage2-libiberty
+clean-stage2-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stage2-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stage2-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
+.PHONY: all-stage2-zlib maybe-all-stage2-zlib
+.PHONY: clean-stage2-zlib maybe-clean-stage2-zlib
+
+maybe-configure-stage2-zlib:
+maybe-all-stage2-zlib:
+maybe-clean-stage2-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stage2-zlib: configure-stage2-zlib
+configure-stage2-zlib:
+ @$(MAKE) stage2-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 2 in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage2-zlib: all-stage2-zlib
+all-stage2-zlib: configure-stage2-zlib
+ @$(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage2-zlib: clean-stage2-zlib
+clean-stage2-zlib:
+ @[ -f zlib/Makefile ] || [ -f stage2-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stage2-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+.PHONY: bootstrap2
+bootstrap2: stage2-bubble all
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stage2
+.PHONY: distclean-stage2
+distclean-stage2::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage2-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage3-start stage3-end
+
+stage3-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage3 > stage_current ; \
+ echo stage3 > stage_last
+@if bfd
+ @[ -d stage3-bfd ] || mkdir stage3-bfd; \
+ set stage3-bfd bfd ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-bfd prev-bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stage3-opcodes ] || mkdir stage3-opcodes; \
+ set stage3-opcodes opcodes ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stage3-binutils ] || mkdir stage3-binutils; \
+ set stage3-binutils binutils ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-binutils prev-binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stage3-gas ] || mkdir stage3-gas; \
+ set stage3-gas gas ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-gas prev-gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stage3-gcc ] || mkdir stage3-gcc; \
+ set stage3-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stage3-intl ] || mkdir stage3-intl; \
+ set stage3-intl intl ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-intl prev-intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stage3-ld ] || mkdir stage3-ld; \
+ set stage3-ld ld ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-ld prev-ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stage3-libcpp ] || mkdir stage3-libcpp; \
+ set stage3-libcpp libcpp ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stage3-libiberty ] || mkdir stage3-libiberty; \
+ set stage3-libiberty libiberty ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stage3-zlib ] || mkdir stage3-zlib; \
+ set stage3-zlib zlib ; @CREATE_LINK_TO_DIR@ ; \
+ set stage2-zlib prev-zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stage3-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stage3-bfd ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage2-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stage3-opcodes ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage2-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stage3-binutils ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage2-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stage3-gas ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage2-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stage3-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage2-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stage3-intl ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage2-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stage3-ld ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage2-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stage3-libcpp ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage2-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stage3-libiberty ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage2-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stage3-zlib ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage2-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage 3. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage3-bubble
+stage3-bubble:: stage2-bubble
+ @bootstrap_lean@-rm -rf stage1-* ; $(STAMP) stage1-lean
+ @if test -f stage3-lean || test -f stage2-lean ; then \
+ echo Skipping rebuild of stage3 ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage3; \
+ fi
+
+.PHONY: all-stage3 clean-stage3
+all-stage3: \
+ maybe-all-stage3-bfd \
+ maybe-all-stage3-opcodes \
+ maybe-all-stage3-binutils \
+ maybe-all-stage3-gas \
+ maybe-all-stage3-gcc \
+ maybe-all-stage3-intl \
+ maybe-all-stage3-ld \
+ maybe-all-stage3-libcpp \
+ maybe-all-stage3-libiberty \
+ maybe-all-stage3-zlib
+
+do-clean: clean-stage3
+clean-stage3: \
+ maybe-clean-stage3-bfd \
+ maybe-clean-stage3-opcodes \
+ maybe-clean-stage3-binutils \
+ maybe-clean-stage3-gas \
+ maybe-clean-stage3-gcc \
+ maybe-clean-stage3-intl \
+ maybe-clean-stage3-ld \
+ maybe-clean-stage3-libcpp \
+ maybe-clean-stage3-libiberty \
+ maybe-clean-stage3-zlib
+
+
+.PHONY: configure-stage3-bfd maybe-configure-stage3-bfd
+.PHONY: all-stage3-bfd maybe-all-stage3-bfd
+.PHONY: clean-stage3-bfd maybe-clean-stage3-bfd
+
+maybe-configure-stage3-bfd:
+maybe-all-stage3-bfd:
+maybe-clean-stage3-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stage3-bfd: configure-stage3-bfd
+configure-stage3-bfd:
+ @$(MAKE) stage3-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-bfd: all-stage3-bfd
+all-stage3-bfd: configure-stage3-bfd
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-bfd: clean-stage3-bfd
+clean-stage3-bfd:
+ @[ -f bfd/Makefile ] || [ -f stage3-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stage3-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stage3-opcodes maybe-configure-stage3-opcodes
+.PHONY: all-stage3-opcodes maybe-all-stage3-opcodes
+.PHONY: clean-stage3-opcodes maybe-clean-stage3-opcodes
+
+maybe-configure-stage3-opcodes:
+maybe-all-stage3-opcodes:
+maybe-clean-stage3-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stage3-opcodes: configure-stage3-opcodes
+configure-stage3-opcodes:
+ @$(MAKE) stage3-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-opcodes: all-stage3-opcodes
+all-stage3-opcodes: configure-stage3-opcodes
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-opcodes: clean-stage3-opcodes
+clean-stage3-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stage3-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stage3-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stage3-binutils maybe-configure-stage3-binutils
+.PHONY: all-stage3-binutils maybe-all-stage3-binutils
+.PHONY: clean-stage3-binutils maybe-clean-stage3-binutils
+
+maybe-configure-stage3-binutils:
+maybe-all-stage3-binutils:
+maybe-clean-stage3-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stage3-binutils: configure-stage3-binutils
+configure-stage3-binutils:
+ @$(MAKE) stage3-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-binutils: all-stage3-binutils
+all-stage3-binutils: configure-stage3-binutils
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-binutils: clean-stage3-binutils
+clean-stage3-binutils:
+ @[ -f binutils/Makefile ] || [ -f stage3-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stage3-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stage3-gas maybe-configure-stage3-gas
+.PHONY: all-stage3-gas maybe-all-stage3-gas
+.PHONY: clean-stage3-gas maybe-clean-stage3-gas
+
+maybe-configure-stage3-gas:
+maybe-all-stage3-gas:
+maybe-clean-stage3-gas:
+
+@if gas-bootstrap
+maybe-configure-stage3-gas: configure-stage3-gas
+configure-stage3-gas:
+ @$(MAKE) stage3-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-gas: all-stage3-gas
+all-stage3-gas: configure-stage3-gas
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-gas: clean-stage3-gas
+clean-stage3-gas:
+ @[ -f gas/Makefile ] || [ -f stage3-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stage3-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stage3-gcc maybe-configure-stage3-gcc
+.PHONY: all-stage3-gcc maybe-all-stage3-gcc
+.PHONY: clean-stage3-gcc maybe-clean-stage3-gcc
+
+maybe-configure-stage3-gcc:
+maybe-all-stage3-gcc:
+maybe-clean-stage3-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stage3-gcc: configure-stage3-gcc
+configure-stage3-gcc:
+ @$(MAKE) stage3-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in gcc ; \
cd gcc || exit 1; \
case $(srcdir) in \
\.) \
@@ -24091,65 +29694,744 @@ configure-stage2-gcc: all-stage1-gcc
libsrcdir="$$s/gcc";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
- cd .. ; \
- mv gcc stage2-gcc ; \
- mv prev-gcc stage1-gcc ; \
- $(STAMP) configure-stage2-gcc
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
-# Flags to pass to stage2 and later makes.
-BOOT_CFLAGS= -g -O2
-POSTSTAGE1_FLAGS_TO_PASS = \
- CFLAGS="$(BOOT_CFLAGS)" \
- ADAC="\$$(CC)"
+maybe-all-stage3-gcc: all-stage3-gcc
+all-stage3-gcc: configure-stage3-gcc
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage3-gcc: clean-stage3-gcc
+clean-stage3-gcc:
+ @[ -f gcc/Makefile ] || [ -f stage3-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stage3-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: configure-stage3-intl maybe-configure-stage3-intl
+.PHONY: all-stage3-intl maybe-all-stage3-intl
+.PHONY: clean-stage3-intl maybe-clean-stage3-intl
+
+maybe-configure-stage3-intl:
+maybe-all-stage3-intl:
+maybe-clean-stage3-intl:
-all-stage2-gcc: all-stage1-gcc configure-stage2-gcc
- echo all-stage2-gcc > stage_last ; \
+@if intl-bootstrap
+maybe-configure-stage3-intl: configure-stage3-intl
+configure-stage3-intl:
+ @$(MAKE) stage3-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-intl: all-stage3-intl
+all-stage3-intl: configure-stage3-intl
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-intl: clean-stage3-intl
+clean-stage3-intl:
+ @[ -f intl/Makefile ] || [ -f stage3-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stage3-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stage3-ld maybe-configure-stage3-ld
+.PHONY: all-stage3-ld maybe-all-stage3-ld
+.PHONY: clean-stage3-ld maybe-clean-stage3-ld
+
+maybe-configure-stage3-ld:
+maybe-all-stage3-ld:
+maybe-clean-stage3-ld:
+
+@if ld-bootstrap
+maybe-configure-stage3-ld: configure-stage3-ld
+configure-stage3-ld:
+ @$(MAKE) stage3-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-ld: all-stage3-ld
+all-stage3-ld: configure-stage3-ld
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-ld: clean-stage3-ld
+clean-stage3-ld:
+ @[ -f ld/Makefile ] || [ -f stage3-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stage3-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stage3-libcpp maybe-configure-stage3-libcpp
+.PHONY: all-stage3-libcpp maybe-all-stage3-libcpp
+.PHONY: clean-stage3-libcpp maybe-clean-stage3-libcpp
+
+maybe-configure-stage3-libcpp:
+maybe-all-stage3-libcpp:
+maybe-clean-stage3-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stage3-libcpp: configure-stage3-libcpp
+configure-stage3-libcpp:
+ @$(MAKE) stage3-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-libcpp: all-stage3-libcpp
+all-stage3-libcpp: configure-stage3-libcpp
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-libcpp: clean-stage3-libcpp
+clean-stage3-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stage3-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stage3-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stage3-libiberty maybe-configure-stage3-libiberty
+.PHONY: all-stage3-libiberty maybe-all-stage3-libiberty
+.PHONY: clean-stage3-libiberty maybe-clean-stage3-libiberty
+
+maybe-configure-stage3-libiberty:
+maybe-all-stage3-libiberty:
+maybe-clean-stage3-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stage3-libiberty: configure-stage3-libiberty
+configure-stage3-libiberty:
+ @$(MAKE) stage3-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-libiberty: all-stage3-libiberty
+all-stage3-libiberty: configure-stage3-libiberty
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-libiberty: clean-stage3-libiberty
+clean-stage3-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stage3-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stage3-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stage3-zlib maybe-configure-stage3-zlib
+.PHONY: all-stage3-zlib maybe-all-stage3-zlib
+.PHONY: clean-stage3-zlib maybe-clean-stage3-zlib
+
+maybe-configure-stage3-zlib:
+maybe-all-stage3-zlib:
+maybe-clean-stage3-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stage3-zlib: configure-stage3-zlib
+configure-stage3-zlib:
+ @$(MAKE) stage3-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 3 in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage3-zlib: all-stage3-zlib
+all-stage3-zlib: configure-stage3-zlib
+ @$(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage3-zlib: clean-stage3-zlib
+clean-stage3-zlib:
+ @[ -f zlib/Makefile ] || [ -f stage3-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stage3-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+compare:
+ @if test -f stage2-lean; then \
+ echo Cannot compare object files as stage 2 was deleted. ; \
+ exit 0 ; \
+ fi; \
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage2-gcc gcc ; \
- mv stage1-gcc prev-gcc ; \
- cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
+ rm -f .bad_compare ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
cd .. ; \
- mv prev-gcc stage1-gcc ; \
- mv gcc stage2-gcc ; \
- $(STAMP) all-stage2-gcc
-
-configure-stage3-gcc: all-stage2-gcc
- echo configure-stage3-gcc > stage_last ; \
- if [ -f stage3-gcc/Makefile ] ; then \
- $(STAMP) configure-stage3-gcc ; \
- exit 0; \
+ for file in $${files} ; do \
+ f1=$$r/stage2-gcc/$$file; f2=$$r/stage3-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
else \
- true ; \
+ true; \
fi ; \
- [ -d stage3-gcc ] || mkdir stage3-gcc; \
- mv stage3-gcc gcc ; \
- mv stage2-gcc prev-gcc ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- 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; \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- echo Configuring stage 3 in gcc; \
+ $(STAMP) compare
+ @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean
+
+
+
+.PHONY: bootstrap
+bootstrap: stage3-bubble compare all
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage2:: distclean-stage3
+.PHONY: distclean-stage3
+distclean-stage3::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage3-* compare
+
+
+.PHONY: cleanstrap
+cleanstrap: distclean bootstrap
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage4-start stage4-end
+
+stage4-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage4 > stage_current ; \
+ echo stage4 > stage_last
+@if bfd
+ @[ -d stage4-bfd ] || mkdir stage4-bfd; \
+ set stage4-bfd bfd ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-bfd prev-bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stage4-opcodes ] || mkdir stage4-opcodes; \
+ set stage4-opcodes opcodes ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stage4-binutils ] || mkdir stage4-binutils; \
+ set stage4-binutils binutils ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-binutils prev-binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stage4-gas ] || mkdir stage4-gas; \
+ set stage4-gas gas ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-gas prev-gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stage4-gcc ] || mkdir stage4-gcc; \
+ set stage4-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stage4-intl ] || mkdir stage4-intl; \
+ set stage4-intl intl ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-intl prev-intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stage4-ld ] || mkdir stage4-ld; \
+ set stage4-ld ld ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-ld prev-ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stage4-libcpp ] || mkdir stage4-libcpp; \
+ set stage4-libcpp libcpp ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stage4-libiberty ] || mkdir stage4-libiberty; \
+ set stage4-libiberty libiberty ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stage4-zlib ] || mkdir stage4-zlib; \
+ set stage4-zlib zlib ; @CREATE_LINK_TO_DIR@ ; \
+ set stage3-zlib prev-zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stage4-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stage4-bfd ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage3-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stage4-opcodes ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage3-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stage4-binutils ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage3-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stage4-gas ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage3-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stage4-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage3-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stage4-intl ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage3-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stage4-ld ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage3-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stage4-libcpp ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage3-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stage4-libiberty ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage3-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stage4-zlib ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage3-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage 4. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage4-bubble
+stage4-bubble:: stage3-bubble
+ @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean
+ @if test -f stage4-lean || test -f stage3-lean ; then \
+ echo Skipping rebuild of stage4 ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage4; \
+ fi
+
+.PHONY: all-stage4 clean-stage4
+all-stage4: \
+ maybe-all-stage4-bfd \
+ maybe-all-stage4-opcodes \
+ maybe-all-stage4-binutils \
+ maybe-all-stage4-gas \
+ maybe-all-stage4-gcc \
+ maybe-all-stage4-intl \
+ maybe-all-stage4-ld \
+ maybe-all-stage4-libcpp \
+ maybe-all-stage4-libiberty \
+ maybe-all-stage4-zlib
+
+do-clean: clean-stage4
+clean-stage4: \
+ maybe-clean-stage4-bfd \
+ maybe-clean-stage4-opcodes \
+ maybe-clean-stage4-binutils \
+ maybe-clean-stage4-gas \
+ maybe-clean-stage4-gcc \
+ maybe-clean-stage4-intl \
+ maybe-clean-stage4-ld \
+ maybe-clean-stage4-libcpp \
+ maybe-clean-stage4-libiberty \
+ maybe-clean-stage4-zlib
+
+
+.PHONY: configure-stage4-bfd maybe-configure-stage4-bfd
+.PHONY: all-stage4-bfd maybe-all-stage4-bfd
+.PHONY: clean-stage4-bfd maybe-clean-stage4-bfd
+
+maybe-configure-stage4-bfd:
+maybe-all-stage4-bfd:
+maybe-clean-stage4-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stage4-bfd: configure-stage4-bfd
+configure-stage4-bfd:
+ @$(MAKE) stage4-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-bfd: all-stage4-bfd
+all-stage4-bfd: configure-stage4-bfd
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-bfd: clean-stage4-bfd
+clean-stage4-bfd:
+ @[ -f bfd/Makefile ] || [ -f stage4-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stage4-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stage4-opcodes maybe-configure-stage4-opcodes
+.PHONY: all-stage4-opcodes maybe-all-stage4-opcodes
+.PHONY: clean-stage4-opcodes maybe-clean-stage4-opcodes
+
+maybe-configure-stage4-opcodes:
+maybe-all-stage4-opcodes:
+maybe-clean-stage4-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stage4-opcodes: configure-stage4-opcodes
+configure-stage4-opcodes:
+ @$(MAKE) stage4-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-opcodes: all-stage4-opcodes
+all-stage4-opcodes: configure-stage4-opcodes
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-opcodes: clean-stage4-opcodes
+clean-stage4-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stage4-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stage4-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stage4-binutils maybe-configure-stage4-binutils
+.PHONY: all-stage4-binutils maybe-all-stage4-binutils
+.PHONY: clean-stage4-binutils maybe-clean-stage4-binutils
+
+maybe-configure-stage4-binutils:
+maybe-all-stage4-binutils:
+maybe-clean-stage4-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stage4-binutils: configure-stage4-binutils
+configure-stage4-binutils:
+ @$(MAKE) stage4-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-binutils: all-stage4-binutils
+all-stage4-binutils: configure-stage4-binutils
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-binutils: clean-stage4-binutils
+clean-stage4-binutils:
+ @[ -f binutils/Makefile ] || [ -f stage4-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stage4-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stage4-gas maybe-configure-stage4-gas
+.PHONY: all-stage4-gas maybe-all-stage4-gas
+.PHONY: clean-stage4-gas maybe-clean-stage4-gas
+
+maybe-configure-stage4-gas:
+maybe-all-stage4-gas:
+maybe-clean-stage4-gas:
+
+@if gas-bootstrap
+maybe-configure-stage4-gas: configure-stage4-gas
+configure-stage4-gas:
+ @$(MAKE) stage4-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-gas: all-stage4-gas
+all-stage4-gas: configure-stage4-gas
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-gas: clean-stage4-gas
+clean-stage4-gas:
+ @[ -f gas/Makefile ] || [ -f stage4-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stage4-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stage4-gcc maybe-configure-stage4-gcc
+.PHONY: all-stage4-gcc maybe-all-stage4-gcc
+.PHONY: clean-stage4-gcc maybe-clean-stage4-gcc
+
+maybe-configure-stage4-gcc:
+maybe-all-stage4-gcc:
+maybe-clean-stage4-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stage4-gcc: configure-stage4-gcc
+configure-stage4-gcc:
+ @$(MAKE) stage4-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in gcc ; \
cd gcc || exit 1; \
case $(srcdir) in \
\.) \
@@ -24163,42 +30445,332 @@ configure-stage3-gcc: all-stage2-gcc
libsrcdir="$$s/gcc";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
- cd .. ; \
- mv gcc stage3-gcc ; \
- mv prev-gcc stage2-gcc ; \
- $(STAMP) configure-stage3-gcc
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
-all-stage3-gcc: all-stage2-gcc configure-stage3-gcc
- echo all-stage3-gcc > stage_last ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage2-gcc prev-gcc ; \
- mv stage3-gcc gcc ; \
+maybe-all-stage4-gcc: all-stage4-gcc
+all-stage4-gcc: configure-stage4-gcc
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
- cd .. ; \
- mv prev-gcc stage2-gcc ; \
- mv gcc stage3-gcc ; \
- $(STAMP) all-stage3-gcc
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage4-gcc: clean-stage4-gcc
+clean-stage4-gcc:
+ @[ -f gcc/Makefile ] || [ -f stage4-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stage4-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
-# We only want to compare .o files, so set this!
-objext = .o
-compare: all-stage3-gcc
+.PHONY: configure-stage4-intl maybe-configure-stage4-intl
+.PHONY: all-stage4-intl maybe-all-stage4-intl
+.PHONY: clean-stage4-intl maybe-clean-stage4-intl
+
+maybe-configure-stage4-intl:
+maybe-all-stage4-intl:
+maybe-clean-stage4-intl:
+
+@if intl-bootstrap
+maybe-configure-stage4-intl: configure-stage4-intl
+configure-stage4-intl:
+ @$(MAKE) stage4-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-intl: all-stage4-intl
+all-stage4-intl: configure-stage4-intl
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-intl: clean-stage4-intl
+clean-stage4-intl:
+ @[ -f intl/Makefile ] || [ -f stage4-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stage4-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stage4-ld maybe-configure-stage4-ld
+.PHONY: all-stage4-ld maybe-all-stage4-ld
+.PHONY: clean-stage4-ld maybe-clean-stage4-ld
+
+maybe-configure-stage4-ld:
+maybe-all-stage4-ld:
+maybe-clean-stage4-ld:
+
+@if ld-bootstrap
+maybe-configure-stage4-ld: configure-stage4-ld
+configure-stage4-ld:
+ @$(MAKE) stage4-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-ld: all-stage4-ld
+all-stage4-ld: configure-stage4-ld
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-ld: clean-stage4-ld
+clean-stage4-ld:
+ @[ -f ld/Makefile ] || [ -f stage4-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stage4-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stage4-libcpp maybe-configure-stage4-libcpp
+.PHONY: all-stage4-libcpp maybe-all-stage4-libcpp
+.PHONY: clean-stage4-libcpp maybe-clean-stage4-libcpp
+
+maybe-configure-stage4-libcpp:
+maybe-all-stage4-libcpp:
+maybe-clean-stage4-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stage4-libcpp: configure-stage4-libcpp
+configure-stage4-libcpp:
+ @$(MAKE) stage4-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-libcpp: all-stage4-libcpp
+all-stage4-libcpp: configure-stage4-libcpp
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-libcpp: clean-stage4-libcpp
+clean-stage4-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stage4-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stage4-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stage4-libiberty maybe-configure-stage4-libiberty
+.PHONY: all-stage4-libiberty maybe-all-stage4-libiberty
+.PHONY: clean-stage4-libiberty maybe-clean-stage4-libiberty
+
+maybe-configure-stage4-libiberty:
+maybe-all-stage4-libiberty:
+maybe-clean-stage4-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stage4-libiberty: configure-stage4-libiberty
+configure-stage4-libiberty:
+ @$(MAKE) stage4-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-libiberty: all-stage4-libiberty
+all-stage4-libiberty: configure-stage4-libiberty
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-libiberty: clean-stage4-libiberty
+clean-stage4-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stage4-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stage4-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stage4-zlib maybe-configure-stage4-zlib
+.PHONY: all-stage4-zlib maybe-all-stage4-zlib
+.PHONY: clean-stage4-zlib maybe-clean-stage4-zlib
+
+maybe-configure-stage4-zlib:
+maybe-all-stage4-zlib:
+maybe-clean-stage4-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stage4-zlib: configure-stage4-zlib
+configure-stage4-zlib:
+ @$(MAKE) stage4-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage 4 in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stage4-zlib: all-stage4-zlib
+all-stage4-zlib: configure-stage4-zlib
+ @$(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+
+
+maybe-clean-stage4-zlib: clean-stage4-zlib
+clean-stage4-zlib:
+ @[ -f zlib/Makefile ] || [ -f stage4-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stage4-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+compare3:
+ @if test -f stage3-lean; then \
+ echo Cannot compare object files as stage 3 was deleted. ; \
+ exit 0 ; \
+ fi; \
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
rm -f .bad_compare ; \
- cd stage3-gcc; \
+ cd stage4-gcc; \
files=`find . -name "*$(objext)" -print` ; \
cd .. ; \
for file in $${files} ; do \
- cmp --ignore-initial=16 $$r/stage2-gcc/$$file $$r/stage3-gcc/$$file \
- > /dev/null 2>&1; \
+ f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
done ; \
if [ -f .bad_compare ]; then \
@@ -24208,139 +30780,2095 @@ compare: all-stage3-gcc
else \
true; \
fi ; \
- $(STAMP) compare
+ $(STAMP) compare3
+ @bootstrap_lean@-rm -rf stage3-* ; $(STAMP) stage3-lean
+
+
+
+.PHONY: bootstrap4
+bootstrap4: stage4-bubble compare3 all
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage3:: distclean-stage4
+.PHONY: distclean-stage4
+distclean-stage4::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage4-* compare3
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stageprofile-start stageprofile-end
+
+stageprofile-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stageprofile > stage_current ; \
+ echo stageprofile > stage_last
+@if bfd
+ @[ -d stageprofile-bfd ] || mkdir stageprofile-bfd; \
+ set stageprofile-bfd bfd ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stageprofile-opcodes ] || mkdir stageprofile-opcodes; \
+ set stageprofile-opcodes opcodes ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stageprofile-binutils ] || mkdir stageprofile-binutils; \
+ set stageprofile-binutils binutils ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stageprofile-gas ] || mkdir stageprofile-gas; \
+ set stageprofile-gas gas ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stageprofile-gcc ] || mkdir stageprofile-gcc; \
+ set stageprofile-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stageprofile-intl ] || mkdir stageprofile-intl; \
+ set stageprofile-intl intl ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stageprofile-ld ] || mkdir stageprofile-ld; \
+ set stageprofile-ld ld ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stageprofile-libcpp ] || mkdir stageprofile-libcpp; \
+ set stageprofile-libcpp libcpp ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stageprofile-libiberty ] || mkdir stageprofile-libiberty; \
+ set stageprofile-libiberty libiberty ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stageprofile-zlib ] || mkdir stageprofile-zlib; \
+ set stageprofile-zlib zlib ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stageprofile-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stageprofile-bfd ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stageprofile-opcodes ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stageprofile-binutils ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stageprofile-gas ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stageprofile-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stageprofile-intl ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stageprofile-ld ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stageprofile-libcpp ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stageprofile-libiberty ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stageprofile-zlib ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage profile. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stageprofile-bubble
+stageprofile-bubble:: stage1-bubble
+ @if test -f stageprofile-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stageprofile ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stageprofile; \
+ fi
+
+.PHONY: all-stageprofile clean-stageprofile
+all-stageprofile: \
+ maybe-all-stageprofile-bfd \
+ maybe-all-stageprofile-opcodes \
+ maybe-all-stageprofile-binutils \
+ maybe-all-stageprofile-gas \
+ maybe-all-stageprofile-gcc \
+ maybe-all-stageprofile-intl \
+ maybe-all-stageprofile-ld \
+ maybe-all-stageprofile-libcpp \
+ maybe-all-stageprofile-libiberty \
+ maybe-all-stageprofile-zlib
+
+do-clean: clean-stageprofile
+clean-stageprofile: \
+ maybe-clean-stageprofile-bfd \
+ maybe-clean-stageprofile-opcodes \
+ maybe-clean-stageprofile-binutils \
+ maybe-clean-stageprofile-gas \
+ maybe-clean-stageprofile-gcc \
+ maybe-clean-stageprofile-intl \
+ maybe-clean-stageprofile-ld \
+ maybe-clean-stageprofile-libcpp \
+ maybe-clean-stageprofile-libiberty \
+ maybe-clean-stageprofile-zlib
+
+
+.PHONY: configure-stageprofile-bfd maybe-configure-stageprofile-bfd
+.PHONY: all-stageprofile-bfd maybe-all-stageprofile-bfd
+.PHONY: clean-stageprofile-bfd maybe-clean-stageprofile-bfd
+
+maybe-configure-stageprofile-bfd:
+maybe-all-stageprofile-bfd:
+maybe-clean-stageprofile-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stageprofile-bfd: configure-stageprofile-bfd
+configure-stageprofile-bfd:
+ @$(MAKE) stageprofile-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-bfd: all-stageprofile-bfd
+all-stageprofile-bfd: configure-stageprofile-bfd
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
+clean-stageprofile-bfd:
+ @[ -f bfd/Makefile ] || [ -f stageprofile-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stageprofile-opcodes maybe-configure-stageprofile-opcodes
+.PHONY: all-stageprofile-opcodes maybe-all-stageprofile-opcodes
+.PHONY: clean-stageprofile-opcodes maybe-clean-stageprofile-opcodes
+
+maybe-configure-stageprofile-opcodes:
+maybe-all-stageprofile-opcodes:
+maybe-clean-stageprofile-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stageprofile-opcodes: configure-stageprofile-opcodes
+configure-stageprofile-opcodes:
+ @$(MAKE) stageprofile-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-opcodes: all-stageprofile-opcodes
+all-stageprofile-opcodes: configure-stageprofile-opcodes
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
+clean-stageprofile-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stageprofile-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stageprofile-binutils maybe-configure-stageprofile-binutils
+.PHONY: all-stageprofile-binutils maybe-all-stageprofile-binutils
+.PHONY: clean-stageprofile-binutils maybe-clean-stageprofile-binutils
+
+maybe-configure-stageprofile-binutils:
+maybe-all-stageprofile-binutils:
+maybe-clean-stageprofile-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stageprofile-binutils: configure-stageprofile-binutils
+configure-stageprofile-binutils:
+ @$(MAKE) stageprofile-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-binutils: all-stageprofile-binutils
+all-stageprofile-binutils: configure-stageprofile-binutils
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
+clean-stageprofile-binutils:
+ @[ -f binutils/Makefile ] || [ -f stageprofile-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stageprofile-gas maybe-configure-stageprofile-gas
+.PHONY: all-stageprofile-gas maybe-all-stageprofile-gas
+.PHONY: clean-stageprofile-gas maybe-clean-stageprofile-gas
+
+maybe-configure-stageprofile-gas:
+maybe-all-stageprofile-gas:
+maybe-clean-stageprofile-gas:
+
+@if gas-bootstrap
+maybe-configure-stageprofile-gas: configure-stageprofile-gas
+configure-stageprofile-gas:
+ @$(MAKE) stageprofile-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-gas: all-stageprofile-gas
+all-stageprofile-gas: configure-stageprofile-gas
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-gas: clean-stageprofile-gas
+clean-stageprofile-gas:
+ @[ -f gas/Makefile ] || [ -f stageprofile-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc
+.PHONY: all-stageprofile-gcc maybe-all-stageprofile-gcc
+.PHONY: clean-stageprofile-gcc maybe-clean-stageprofile-gcc
+
+maybe-configure-stageprofile-gcc:
+maybe-all-stageprofile-gcc:
+maybe-clean-stageprofile-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stageprofile-gcc: configure-stageprofile-gcc
+configure-stageprofile-gcc:
+ @$(MAKE) stageprofile-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-gcc: all-stageprofile-gcc
+all-stageprofile-gcc: configure-stageprofile-gcc
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
+clean-stageprofile-gcc:
+ @[ -f gcc/Makefile ] || [ -f stageprofile-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: configure-stageprofile-intl maybe-configure-stageprofile-intl
+.PHONY: all-stageprofile-intl maybe-all-stageprofile-intl
+.PHONY: clean-stageprofile-intl maybe-clean-stageprofile-intl
+
+maybe-configure-stageprofile-intl:
+maybe-all-stageprofile-intl:
+maybe-clean-stageprofile-intl:
+
+@if intl-bootstrap
+maybe-configure-stageprofile-intl: configure-stageprofile-intl
+configure-stageprofile-intl:
+ @$(MAKE) stageprofile-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-intl: all-stageprofile-intl
+all-stageprofile-intl: configure-stageprofile-intl
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-intl: clean-stageprofile-intl
+clean-stageprofile-intl:
+ @[ -f intl/Makefile ] || [ -f stageprofile-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stageprofile-ld maybe-configure-stageprofile-ld
+.PHONY: all-stageprofile-ld maybe-all-stageprofile-ld
+.PHONY: clean-stageprofile-ld maybe-clean-stageprofile-ld
+
+maybe-configure-stageprofile-ld:
+maybe-all-stageprofile-ld:
+maybe-clean-stageprofile-ld:
+
+@if ld-bootstrap
+maybe-configure-stageprofile-ld: configure-stageprofile-ld
+configure-stageprofile-ld:
+ @$(MAKE) stageprofile-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-ld: all-stageprofile-ld
+all-stageprofile-ld: configure-stageprofile-ld
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-ld: clean-stageprofile-ld
+clean-stageprofile-ld:
+ @[ -f ld/Makefile ] || [ -f stageprofile-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stageprofile-libcpp maybe-configure-stageprofile-libcpp
+.PHONY: all-stageprofile-libcpp maybe-all-stageprofile-libcpp
+.PHONY: clean-stageprofile-libcpp maybe-clean-stageprofile-libcpp
+
+maybe-configure-stageprofile-libcpp:
+maybe-all-stageprofile-libcpp:
+maybe-clean-stageprofile-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stageprofile-libcpp: configure-stageprofile-libcpp
+configure-stageprofile-libcpp:
+ @$(MAKE) stageprofile-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-libcpp: all-stageprofile-libcpp
+all-stageprofile-libcpp: configure-stageprofile-libcpp
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
+clean-stageprofile-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stageprofile-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stageprofile-libiberty maybe-configure-stageprofile-libiberty
+.PHONY: all-stageprofile-libiberty maybe-all-stageprofile-libiberty
+.PHONY: clean-stageprofile-libiberty maybe-clean-stageprofile-libiberty
+
+maybe-configure-stageprofile-libiberty:
+maybe-all-stageprofile-libiberty:
+maybe-clean-stageprofile-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stageprofile-libiberty: configure-stageprofile-libiberty
+configure-stageprofile-libiberty:
+ @$(MAKE) stageprofile-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-libiberty: all-stageprofile-libiberty
+all-stageprofile-libiberty: configure-stageprofile-libiberty
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
+clean-stageprofile-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stageprofile-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib
+.PHONY: all-stageprofile-zlib maybe-all-stageprofile-zlib
+.PHONY: clean-stageprofile-zlib maybe-clean-stageprofile-zlib
+
+maybe-configure-stageprofile-zlib:
+maybe-all-stageprofile-zlib:
+maybe-clean-stageprofile-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stageprofile-zlib: configure-stageprofile-zlib
+configure-stageprofile-zlib:
+ @$(MAKE) stageprofile-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage profile in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stageprofile-zlib: all-stageprofile-zlib
+all-stageprofile-zlib: configure-stageprofile-zlib
+ @$(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"
+
+maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
+clean-stageprofile-zlib:
+ @[ -f zlib/Makefile ] || [ -f stageprofile-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stageprofile-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stageprofile
+.PHONY: distclean-stageprofile
+distclean-stageprofile::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stageprofile-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stagefeedback-start stagefeedback-end
+
+stagefeedback-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stagefeedback > stage_current ; \
+ echo stagefeedback > stage_last
+@if bfd
+ @[ -d stagefeedback-bfd ] || mkdir stagefeedback-bfd; \
+ set stagefeedback-bfd bfd ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @[ -d stagefeedback-opcodes ] || mkdir stagefeedback-opcodes; \
+ set stagefeedback-opcodes opcodes ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @[ -d stagefeedback-binutils ] || mkdir stagefeedback-binutils; \
+ set stagefeedback-binutils binutils ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @[ -d stagefeedback-gas ] || mkdir stagefeedback-gas; \
+ set stagefeedback-gas gas ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @[ -d stagefeedback-gcc ] || mkdir stagefeedback-gcc; \
+ set stagefeedback-gcc gcc ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @[ -d stagefeedback-intl ] || mkdir stagefeedback-intl; \
+ set stagefeedback-intl intl ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @[ -d stagefeedback-ld ] || mkdir stagefeedback-ld; \
+ set stagefeedback-ld ld ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @[ -d stagefeedback-libcpp ] || mkdir stagefeedback-libcpp; \
+ set stagefeedback-libcpp libcpp ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @[ -d stagefeedback-libiberty ] || mkdir stagefeedback-libiberty; \
+ set stagefeedback-libiberty libiberty ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @[ -d stagefeedback-zlib ] || mkdir stagefeedback-zlib; \
+ set stagefeedback-zlib zlib ; @CREATE_LINK_TO_DIR@ ; \
+ set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stagefeedback-end::
+ @rm -f stage_current
+@if bfd
+ @set bfd stagefeedback-bfd ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @set opcodes stagefeedback-opcodes ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @set binutils stagefeedback-binutils ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @set gas stagefeedback-gas ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @set gcc stagefeedback-gcc ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @set intl stagefeedback-intl ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @set ld stagefeedback-ld ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @set libcpp stagefeedback-libcpp ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @set libiberty stagefeedback-libiberty ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @set zlib stagefeedback-zlib ; @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage feedback. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stagefeedback-bubble
+stagefeedback-bubble:: stage1-bubble
+ @if test -f stagefeedback-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stagefeedback ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stagefeedback; \
+ fi
+
+.PHONY: all-stagefeedback clean-stagefeedback
+all-stagefeedback: \
+ maybe-all-stagefeedback-bfd \
+ maybe-all-stagefeedback-opcodes \
+ maybe-all-stagefeedback-binutils \
+ maybe-all-stagefeedback-gas \
+ maybe-all-stagefeedback-gcc \
+ maybe-all-stagefeedback-intl \
+ maybe-all-stagefeedback-ld \
+ maybe-all-stagefeedback-libcpp \
+ maybe-all-stagefeedback-libiberty \
+ maybe-all-stagefeedback-zlib
+
+do-clean: clean-stagefeedback
+clean-stagefeedback: \
+ maybe-clean-stagefeedback-bfd \
+ maybe-clean-stagefeedback-opcodes \
+ maybe-clean-stagefeedback-binutils \
+ maybe-clean-stagefeedback-gas \
+ maybe-clean-stagefeedback-gcc \
+ maybe-clean-stagefeedback-intl \
+ maybe-clean-stagefeedback-ld \
+ maybe-clean-stagefeedback-libcpp \
+ maybe-clean-stagefeedback-libiberty \
+ maybe-clean-stagefeedback-zlib
+
+
+.PHONY: configure-stagefeedback-bfd maybe-configure-stagefeedback-bfd
+.PHONY: all-stagefeedback-bfd maybe-all-stagefeedback-bfd
+.PHONY: clean-stagefeedback-bfd maybe-clean-stagefeedback-bfd
+
+maybe-configure-stagefeedback-bfd:
+maybe-all-stagefeedback-bfd:
+maybe-clean-stagefeedback-bfd:
+
+@if bfd-bootstrap
+maybe-configure-stagefeedback-bfd: configure-stagefeedback-bfd
+configure-stagefeedback-bfd:
+ @$(MAKE) stagefeedback-start
+ @[ -f bfd/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in bfd ; \
+ cd bfd || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+ libsrcdir="$$s/bfd";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-bfd: all-stagefeedback-bfd
+all-stagefeedback-bfd: configure-stagefeedback-bfd
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
+clean-stagefeedback-bfd:
+ @[ -f bfd/Makefile ] || [ -f stagefeedback-bfd/Makefile ] \
+ || exit 0 ; \
+ [ -f bfd/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif bfd-bootstrap
+
+
+.PHONY: configure-stagefeedback-opcodes maybe-configure-stagefeedback-opcodes
+.PHONY: all-stagefeedback-opcodes maybe-all-stagefeedback-opcodes
+.PHONY: clean-stagefeedback-opcodes maybe-clean-stagefeedback-opcodes
+
+maybe-configure-stagefeedback-opcodes:
+maybe-all-stagefeedback-opcodes:
+maybe-clean-stagefeedback-opcodes:
+
+@if opcodes-bootstrap
+maybe-configure-stagefeedback-opcodes: configure-stagefeedback-opcodes
+configure-stagefeedback-opcodes:
+ @$(MAKE) stagefeedback-start
+ @[ -f opcodes/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in opcodes ; \
+ cd opcodes || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+ libsrcdir="$$s/opcodes";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-opcodes: all-stagefeedback-opcodes
+all-stagefeedback-opcodes: configure-stagefeedback-opcodes
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
+clean-stagefeedback-opcodes:
+ @[ -f opcodes/Makefile ] || [ -f stagefeedback-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ -f opcodes/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif opcodes-bootstrap
+
+
+.PHONY: configure-stagefeedback-binutils maybe-configure-stagefeedback-binutils
+.PHONY: all-stagefeedback-binutils maybe-all-stagefeedback-binutils
+.PHONY: clean-stagefeedback-binutils maybe-clean-stagefeedback-binutils
+
+maybe-configure-stagefeedback-binutils:
+maybe-all-stagefeedback-binutils:
+maybe-clean-stagefeedback-binutils:
+
+@if binutils-bootstrap
+maybe-configure-stagefeedback-binutils: configure-stagefeedback-binutils
+configure-stagefeedback-binutils:
+ @$(MAKE) stagefeedback-start
+ @[ -f binutils/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in binutils ; \
+ cd binutils || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+ libsrcdir="$$s/binutils";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-binutils: all-stagefeedback-binutils
+all-stagefeedback-binutils: configure-stagefeedback-binutils
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
+clean-stagefeedback-binutils:
+ @[ -f binutils/Makefile ] || [ -f stagefeedback-binutils/Makefile ] \
+ || exit 0 ; \
+ [ -f binutils/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif binutils-bootstrap
+
+
+.PHONY: configure-stagefeedback-gas maybe-configure-stagefeedback-gas
+.PHONY: all-stagefeedback-gas maybe-all-stagefeedback-gas
+.PHONY: clean-stagefeedback-gas maybe-clean-stagefeedback-gas
+
+maybe-configure-stagefeedback-gas:
+maybe-all-stagefeedback-gas:
+maybe-clean-stagefeedback-gas:
+
+@if gas-bootstrap
+maybe-configure-stagefeedback-gas: configure-stagefeedback-gas
+configure-stagefeedback-gas:
+ @$(MAKE) stagefeedback-start
+ @[ -f gas/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in gas ; \
+ cd gas || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gas"; \
+ libsrcdir="$$s/gas";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-gas: all-stagefeedback-gas
+all-stagefeedback-gas: configure-stagefeedback-gas
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
+clean-stagefeedback-gas:
+ @[ -f gas/Makefile ] || [ -f stagefeedback-gas/Makefile ] \
+ || exit 0 ; \
+ [ -f gas/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif gas-bootstrap
+
+
+.PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc
+.PHONY: all-stagefeedback-gcc maybe-all-stagefeedback-gcc
+.PHONY: clean-stagefeedback-gcc maybe-clean-stagefeedback-gcc
+
+maybe-configure-stagefeedback-gcc:
+maybe-all-stagefeedback-gcc:
+maybe-clean-stagefeedback-gcc:
+
+@if gcc-bootstrap
+maybe-configure-stagefeedback-gcc: configure-stagefeedback-gcc
+configure-stagefeedback-gcc:
+ @$(MAKE) stagefeedback-start
+ @[ -f gcc/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in gcc ; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-gcc: all-stagefeedback-gcc
+all-stagefeedback-gcc: configure-stagefeedback-gcc
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
+clean-stagefeedback-gcc:
+ @[ -f gcc/Makefile ] || [ -f stagefeedback-gcc/Makefile ] \
+ || exit 0 ; \
+ [ -f gcc/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: configure-stagefeedback-intl maybe-configure-stagefeedback-intl
+.PHONY: all-stagefeedback-intl maybe-all-stagefeedback-intl
+.PHONY: clean-stagefeedback-intl maybe-clean-stagefeedback-intl
+
+maybe-configure-stagefeedback-intl:
+maybe-all-stagefeedback-intl:
+maybe-clean-stagefeedback-intl:
+
+@if intl-bootstrap
+maybe-configure-stagefeedback-intl: configure-stagefeedback-intl
+configure-stagefeedback-intl:
+ @$(MAKE) stagefeedback-start
+ @[ -f intl/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in intl ; \
+ cd intl || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/intl"; \
+ libsrcdir="$$s/intl";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-intl: all-stagefeedback-intl
+all-stagefeedback-intl: configure-stagefeedback-intl
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
+clean-stagefeedback-intl:
+ @[ -f intl/Makefile ] || [ -f stagefeedback-intl/Makefile ] \
+ || exit 0 ; \
+ [ -f intl/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif intl-bootstrap
+
+
+.PHONY: configure-stagefeedback-ld maybe-configure-stagefeedback-ld
+.PHONY: all-stagefeedback-ld maybe-all-stagefeedback-ld
+.PHONY: clean-stagefeedback-ld maybe-clean-stagefeedback-ld
+
+maybe-configure-stagefeedback-ld:
+maybe-all-stagefeedback-ld:
+maybe-clean-stagefeedback-ld:
+
+@if ld-bootstrap
+maybe-configure-stagefeedback-ld: configure-stagefeedback-ld
+configure-stagefeedback-ld:
+ @$(MAKE) stagefeedback-start
+ @[ -f ld/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in ld ; \
+ cd ld || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/ld"; \
+ libsrcdir="$$s/ld";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-ld: all-stagefeedback-ld
+all-stagefeedback-ld: configure-stagefeedback-ld
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
+clean-stagefeedback-ld:
+ @[ -f ld/Makefile ] || [ -f stagefeedback-ld/Makefile ] \
+ || exit 0 ; \
+ [ -f ld/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif ld-bootstrap
+
+
+.PHONY: configure-stagefeedback-libcpp maybe-configure-stagefeedback-libcpp
+.PHONY: all-stagefeedback-libcpp maybe-all-stagefeedback-libcpp
+.PHONY: clean-stagefeedback-libcpp maybe-clean-stagefeedback-libcpp
+
+maybe-configure-stagefeedback-libcpp:
+maybe-all-stagefeedback-libcpp:
+maybe-clean-stagefeedback-libcpp:
+
+@if libcpp-bootstrap
+maybe-configure-stagefeedback-libcpp: configure-stagefeedback-libcpp
+configure-stagefeedback-libcpp:
+ @$(MAKE) stagefeedback-start
+ @[ -f libcpp/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in libcpp ; \
+ cd libcpp || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
+ libsrcdir="$$s/libcpp";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-libcpp: all-stagefeedback-libcpp
+all-stagefeedback-libcpp: configure-stagefeedback-libcpp
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
+clean-stagefeedback-libcpp:
+ @[ -f libcpp/Makefile ] || [ -f stagefeedback-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ -f libcpp/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif libcpp-bootstrap
+
+
+.PHONY: configure-stagefeedback-libiberty maybe-configure-stagefeedback-libiberty
+.PHONY: all-stagefeedback-libiberty maybe-all-stagefeedback-libiberty
+.PHONY: clean-stagefeedback-libiberty maybe-clean-stagefeedback-libiberty
+
+maybe-configure-stagefeedback-libiberty:
+maybe-all-stagefeedback-libiberty:
+maybe-clean-stagefeedback-libiberty:
+
+@if libiberty-bootstrap
+maybe-configure-stagefeedback-libiberty: configure-stagefeedback-libiberty
+configure-stagefeedback-libiberty:
+ @$(MAKE) stagefeedback-start
+ @[ -f libiberty/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in libiberty ; \
+ cd libiberty || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+ libsrcdir="$$s/libiberty";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-libiberty: all-stagefeedback-libiberty
+all-stagefeedback-libiberty: configure-stagefeedback-libiberty
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
+clean-stagefeedback-libiberty:
+ @[ -f libiberty/Makefile ] || [ -f stagefeedback-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ -f libiberty/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif libiberty-bootstrap
+
+
+.PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib
+.PHONY: all-stagefeedback-zlib maybe-all-stagefeedback-zlib
+.PHONY: clean-stagefeedback-zlib maybe-clean-stagefeedback-zlib
+
+maybe-configure-stagefeedback-zlib:
+maybe-all-stagefeedback-zlib:
+maybe-clean-stagefeedback-zlib:
+
+@if zlib-bootstrap
+maybe-configure-stagefeedback-zlib: configure-stagefeedback-zlib
+configure-stagefeedback-zlib:
+ @$(MAKE) stagefeedback-start
+ @[ -f zlib/Makefile ] && exit 0 || : ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ echo Configuring stage feedback in zlib ; \
+ cd zlib || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+ libsrcdir="$$s/zlib";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+
+maybe-all-stagefeedback-zlib: all-stagefeedback-zlib
+all-stagefeedback-zlib: configure-stagefeedback-zlib
+ @$(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(STAGE_HOST_EXPORTS) \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
+
+maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
+clean-stagefeedback-zlib:
+ @[ -f zlib/Makefile ] || [ -f stagefeedback-zlib/Makefile ] \
+ || exit 0 ; \
+ [ -f zlib/Makefile ] || $(MAKE) stagefeedback-start ; \
+ cd zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif zlib-bootstrap
+
+
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
-.PHONY: new-bootstrap
-# This target exists so that everything can be made in one pass.
-# 'all-gcc' has to avoid stomping on the bootstrap-generated gcc for
-# this to work.
-new-bootstrap: compare
- mv stage3-gcc gcc ; \
- $(MAKE) all ; \
- mv gcc stage3-gcc
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stagefeedback
+.PHONY: distclean-stagefeedback
+distclean-stagefeedback::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stagefeedback-*
+
+
+@endif gcc-bootstrap
+
+
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ cd stageprofile-gcc && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+profiledbootstrap:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping the compiler"; \
+ $(MAKE) stageprofile-bubble distclean-stagefeedback
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Building feedback based compiler"; \
+ $(MAKE) stagefeedback-bubble stagefeedback-end
+@endif gcc-bootstrap
+
+@if gcc-bootstrap
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+do-distclean: distclean-stage1
+@endif gcc-bootstrap
# --------------------------------------
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+
+configure-target-libstdc++-v3: maybe-all-gcc
+
+configure-target-libmudflap: maybe-all-gcc
+
+configure-target-newlib: maybe-all-gcc
+
+configure-target-libgfortran: maybe-all-gcc
+
+configure-target-libobjc: maybe-all-gcc
+
+configure-target-libtermcap: maybe-all-gcc
+
+configure-target-winsup: maybe-all-gcc
+
+configure-target-libgloss: maybe-all-gcc
+
+configure-target-libiberty: maybe-all-gcc
+
+configure-target-gperf: maybe-all-gcc
+
+configure-target-examples: maybe-all-gcc
+
+configure-target-libffi: maybe-all-gcc
+
+configure-target-libjava: maybe-all-gcc
+
+configure-target-zlib: maybe-all-gcc
+
+configure-target-boehm-gc: maybe-all-gcc
+
+configure-target-qthreads: maybe-all-gcc
+
+configure-target-rda: maybe-all-gcc
+
+configure-target-libada: maybe-all-gcc
+
+
+
+configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-gperf: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-gperf: maybe-all-target-libstdc++-v3
+
+configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libjava: maybe-all-target-libstdc++-v3
+
+configure-target-libobjc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-zlib: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-examples: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libtermcap: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss
+
+
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
+
+
+
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
+all-build-bison: maybe-all-build-texinfo
+all-build-byacc: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-bison
+all-build-flex: maybe-all-build-byacc
+all-build-flex: maybe-all-build-m4
+all-build-libiberty: maybe-all-build-texinfo
+all-build-m4: maybe-all-build-texinfo
+all-build-fixincludes: maybe-all-build-libiberty
+configure-gcc: maybe-configure-intl
+
+configure-stage1-gcc: maybe-configure-stage1-intl
+configure-stage2-gcc: maybe-configure-stage2-intl
+configure-stage3-gcc: maybe-configure-stage3-intl
+configure-stage4-gcc: maybe-configure-stage4-intl
+configure-stageprofile-gcc: maybe-configure-stageprofile-intl
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-configure-binutils
+
+configure-stage1-gcc: maybe-configure-stage1-binutils
+configure-stage2-gcc: maybe-configure-stage2-binutils
+configure-stage3-gcc: maybe-configure-stage3-binutils
+configure-stage4-gcc: maybe-configure-stage4-binutils
+configure-stageprofile-gcc: maybe-configure-stageprofile-binutils
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-binutils
+configure-gcc: maybe-configure-gas
+
+configure-stage1-gcc: maybe-configure-stage1-gas
+configure-stage2-gcc: maybe-configure-stage2-gas
+configure-stage3-gcc: maybe-configure-stage3-gas
+configure-stage4-gcc: maybe-configure-stage4-gas
+configure-stageprofile-gcc: maybe-configure-stageprofile-gas
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-gas
+configure-gcc: maybe-configure-ld
+
+configure-stage1-gcc: maybe-configure-stage1-ld
+configure-stage2-gcc: maybe-configure-stage2-ld
+configure-stage3-gcc: maybe-configure-stage3-ld
+configure-stage4-gcc: maybe-configure-stage4-ld
+configure-stageprofile-gcc: maybe-configure-stageprofile-ld
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-ld
+all-gcc: all-libiberty
+
+all-stage1-gcc: all-stage1-libiberty
+all-stage2-gcc: all-stage2-libiberty
+all-stage3-gcc: all-stage3-libiberty
+all-stage4-gcc: all-stage4-libiberty
+all-stageprofile-gcc: all-stageprofile-libiberty
+all-stagefeedback-gcc: all-stagefeedback-libiberty
+all-gcc: maybe-all-intl
+
+all-stage1-gcc: maybe-all-stage1-intl
+all-stage2-gcc: maybe-all-stage2-intl
+all-stage3-gcc: maybe-all-stage3-intl
+all-stage4-gcc: maybe-all-stage4-intl
+all-stageprofile-gcc: maybe-all-stageprofile-intl
+all-stagefeedback-gcc: maybe-all-stagefeedback-intl
+all-gcc: maybe-all-build-texinfo
+
+all-stage1-gcc: maybe-all-build-texinfo
+all-stage2-gcc: maybe-all-build-texinfo
+all-stage3-gcc: maybe-all-build-texinfo
+all-stage4-gcc: maybe-all-build-texinfo
+all-stageprofile-gcc: maybe-all-build-texinfo
+all-stagefeedback-gcc: maybe-all-build-texinfo
+all-prebootstrap: maybe-all-build-texinfo
+all-gcc: maybe-all-build-bison
+
+all-stage1-gcc: maybe-all-build-bison
+all-stage2-gcc: maybe-all-build-bison
+all-stage3-gcc: maybe-all-build-bison
+all-stage4-gcc: maybe-all-build-bison
+all-stageprofile-gcc: maybe-all-build-bison
+all-stagefeedback-gcc: maybe-all-build-bison
+all-prebootstrap: maybe-all-build-bison
+all-gcc: maybe-all-build-byacc
+
+all-stage1-gcc: maybe-all-build-byacc
+all-stage2-gcc: maybe-all-build-byacc
+all-stage3-gcc: maybe-all-build-byacc
+all-stage4-gcc: maybe-all-build-byacc
+all-stageprofile-gcc: maybe-all-build-byacc
+all-stagefeedback-gcc: maybe-all-build-byacc
+all-prebootstrap: maybe-all-build-byacc
+all-gcc: maybe-all-build-flex
+
+all-stage1-gcc: maybe-all-build-flex
+all-stage2-gcc: maybe-all-build-flex
+all-stage3-gcc: maybe-all-build-flex
+all-stage4-gcc: maybe-all-build-flex
+all-stageprofile-gcc: maybe-all-build-flex
+all-stagefeedback-gcc: maybe-all-build-flex
+all-prebootstrap: maybe-all-build-flex
all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
-GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
+all-stage1-gcc: maybe-all-build-libiberty
+all-stage2-gcc: maybe-all-build-libiberty
+all-stage3-gcc: maybe-all-build-libiberty
+all-stage4-gcc: maybe-all-build-libiberty
+all-stageprofile-gcc: maybe-all-build-libiberty
+all-stagefeedback-gcc: maybe-all-build-libiberty
+all-prebootstrap: maybe-all-build-libiberty
+all-gcc: maybe-all-build-fixincludes
+
+all-stage1-gcc: maybe-all-build-fixincludes
+all-stage2-gcc: maybe-all-build-fixincludes
+all-stage3-gcc: maybe-all-build-fixincludes
+all-stage4-gcc: maybe-all-build-fixincludes
+all-stageprofile-gcc: maybe-all-build-fixincludes
+all-stagefeedback-gcc: maybe-all-build-fixincludes
+all-prebootstrap: maybe-all-build-fixincludes
+all-gcc: maybe-all-binutils
+
+all-stage1-gcc: maybe-all-stage1-binutils
+all-stage2-gcc: maybe-all-stage2-binutils
+all-stage3-gcc: maybe-all-stage3-binutils
+all-stage4-gcc: maybe-all-stage4-binutils
+all-stageprofile-gcc: maybe-all-stageprofile-binutils
+all-stagefeedback-gcc: maybe-all-stagefeedback-binutils
+all-gcc: maybe-all-gas
+
+all-stage1-gcc: maybe-all-stage1-gas
+all-stage2-gcc: maybe-all-stage2-gas
+all-stage3-gcc: maybe-all-stage3-gas
+all-stage4-gcc: maybe-all-stage4-gas
+all-stageprofile-gcc: maybe-all-stageprofile-gas
+all-stagefeedback-gcc: maybe-all-stagefeedback-gas
+all-gcc: maybe-all-ld
+
+all-stage1-gcc: maybe-all-stage1-ld
+all-stage2-gcc: maybe-all-stage2-ld
+all-stage3-gcc: maybe-all-stage3-ld
+all-stage4-gcc: maybe-all-stage4-ld
+all-stageprofile-gcc: maybe-all-stageprofile-ld
+all-stagefeedback-gcc: maybe-all-stagefeedback-ld
+all-gcc: maybe-all-zlib
+
+all-stage1-gcc: maybe-all-stage1-zlib
+all-stage2-gcc: maybe-all-stage2-zlib
+all-stage3-gcc: maybe-all-stage3-zlib
+all-stage4-gcc: maybe-all-stage4-zlib
+all-stageprofile-gcc: maybe-all-stageprofile-zlib
+all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
+all-gcc: all-libcpp
+
+all-stage1-gcc: all-stage1-libcpp
+all-stage2-gcc: all-stage2-libcpp
+all-stage3-gcc: all-stage3-libcpp
+all-stage4-gcc: all-stage4-libcpp
+all-stageprofile-gcc: all-stageprofile-libcpp
+all-stagefeedback-gcc: all-stagefeedback-libcpp
+all-gcc: maybe-all-build-libiberty
-# Host modules specific to binutils.
+all-stage1-gcc: maybe-all-build-libiberty
+all-stage2-gcc: maybe-all-build-libiberty
+all-stage3-gcc: maybe-all-build-libiberty
+all-stage4-gcc: maybe-all-build-libiberty
+all-stageprofile-gcc: maybe-all-build-libiberty
+all-stagefeedback-gcc: maybe-all-build-libiberty
+all-prebootstrap: maybe-all-build-libiberty
+configure-libcpp: configure-libiberty
+
+configure-stage1-libcpp: configure-stage1-libiberty
+configure-stage2-libcpp: configure-stage2-libiberty
+configure-stage3-libcpp: configure-stage3-libiberty
+configure-stage4-libcpp: configure-stage4-libiberty
+configure-stageprofile-libcpp: configure-stageprofile-libiberty
+configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
+configure-libcpp: maybe-configure-intl
+
+configure-stage1-libcpp: maybe-configure-stage1-intl
+configure-stage2-libcpp: maybe-configure-stage2-intl
+configure-stage3-libcpp: maybe-configure-stage3-intl
+configure-stage4-libcpp: maybe-configure-stage4-intl
+configure-stageprofile-libcpp: maybe-configure-stageprofile-intl
+configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
+all-libcpp: all-libiberty
+
+all-stage1-libcpp: all-stage1-libiberty
+all-stage2-libcpp: all-stage2-libiberty
+all-stage3-libcpp: all-stage3-libiberty
+all-stage4-libcpp: all-stage4-libiberty
+all-stageprofile-libcpp: all-stageprofile-libiberty
+all-stagefeedback-libcpp: all-stagefeedback-libiberty
+all-libcpp: maybe-all-intl
+
+all-stage1-libcpp: maybe-all-stage1-intl
+all-stage2-libcpp: maybe-all-stage2-intl
+all-stage3-libcpp: maybe-all-stage3-intl
+all-stage4-libcpp: maybe-all-stage4-intl
+all-stageprofile-libcpp: maybe-all-stageprofile-intl
+all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
+configure-gdb: maybe-configure-itcl
+configure-gdb: maybe-configure-tcl
+configure-gdb: maybe-configure-tk
+configure-gdb: maybe-configure-sim
+all-gdb: maybe-all-libiberty
+all-gdb: maybe-all-opcodes
+all-gdb: maybe-all-bfd
+all-gdb: maybe-all-readline
+all-gdb: maybe-all-build-bison
+all-gdb: maybe-all-build-byacc
+all-gdb: maybe-all-sim
+install-gdb: maybe-install-tcl
+install-gdb: maybe-install-tk
+install-gdb: maybe-install-itcl
+install-gdb: maybe-install-libgui
+configure-libgui: maybe-configure-tcl
+configure-libgui: maybe-configure-tk
+all-libgui: maybe-all-tcl
+all-libgui: maybe-all-tk
+all-libgui: maybe-all-itcl
configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
+
+configure-stage1-bfd: configure-stage1-libiberty
+configure-stage2-bfd: configure-stage2-libiberty
+configure-stage3-bfd: configure-stage3-libiberty
+configure-stage4-bfd: configure-stage4-libiberty
+configure-stageprofile-bfd: configure-stageprofile-libiberty
+configure-stagefeedback-bfd: configure-stagefeedback-libiberty
+all-bfd: maybe-all-libiberty
+
+all-stage1-bfd: maybe-all-stage1-libiberty
+all-stage2-bfd: maybe-all-stage2-libiberty
+all-stage3-bfd: maybe-all-stage3-libiberty
+all-stage4-bfd: maybe-all-stage4-libiberty
+all-stageprofile-bfd: maybe-all-stageprofile-libiberty
+all-stagefeedback-bfd: maybe-all-stagefeedback-libiberty
+all-bfd: maybe-all-intl
+
+all-stage1-bfd: maybe-all-stage1-intl
+all-stage2-bfd: maybe-all-stage2-intl
+all-stage3-bfd: maybe-all-stage3-intl
+all-stage4-bfd: maybe-all-stage4-intl
+all-stageprofile-bfd: maybe-all-stageprofile-intl
+all-stagefeedback-bfd: maybe-all-stagefeedback-intl
+all-binutils: maybe-all-libiberty
+
+all-stage1-binutils: maybe-all-stage1-libiberty
+all-stage2-binutils: maybe-all-stage2-libiberty
+all-stage3-binutils: maybe-all-stage3-libiberty
+all-stage4-binutils: maybe-all-stage4-libiberty
+all-stageprofile-binutils: maybe-all-stageprofile-libiberty
+all-stagefeedback-binutils: maybe-all-stagefeedback-libiberty
+all-binutils: maybe-all-opcodes
+
+all-stage1-binutils: maybe-all-stage1-opcodes
+all-stage2-binutils: maybe-all-stage2-opcodes
+all-stage3-binutils: maybe-all-stage3-opcodes
+all-stage4-binutils: maybe-all-stage4-opcodes
+all-stageprofile-binutils: maybe-all-stageprofile-opcodes
+all-stagefeedback-binutils: maybe-all-stagefeedback-opcodes
+all-binutils: maybe-all-bfd
+
+all-stage1-binutils: maybe-all-stage1-bfd
+all-stage2-binutils: maybe-all-stage2-bfd
+all-stage3-binutils: maybe-all-stage3-bfd
+all-stage4-binutils: maybe-all-stage4-bfd
+all-stageprofile-binutils: maybe-all-stageprofile-bfd
+all-stagefeedback-binutils: maybe-all-stagefeedback-bfd
+all-binutils: maybe-all-build-flex
+
+all-stage1-binutils: maybe-all-build-flex
+all-stage2-binutils: maybe-all-build-flex
+all-stage3-binutils: maybe-all-build-flex
+all-stage4-binutils: maybe-all-build-flex
+all-stageprofile-binutils: maybe-all-build-flex
+all-stagefeedback-binutils: maybe-all-build-flex
+all-prebootstrap: maybe-all-build-flex
+all-binutils: maybe-all-build-bison
+
+all-stage1-binutils: maybe-all-build-bison
+all-stage2-binutils: maybe-all-build-bison
+all-stage3-binutils: maybe-all-build-bison
+all-stage4-binutils: maybe-all-build-bison
+all-stageprofile-binutils: maybe-all-build-bison
+all-stagefeedback-binutils: maybe-all-build-bison
+all-prebootstrap: maybe-all-build-bison
+all-binutils: maybe-all-build-byacc
+
+all-stage1-binutils: maybe-all-build-byacc
+all-stage2-binutils: maybe-all-build-byacc
+all-stage3-binutils: maybe-all-build-byacc
+all-stage4-binutils: maybe-all-build-byacc
+all-stageprofile-binutils: maybe-all-build-byacc
+all-stagefeedback-binutils: maybe-all-build-byacc
+all-prebootstrap: maybe-all-build-byacc
+all-binutils: maybe-all-intl
+
+all-stage1-binutils: maybe-all-stage1-intl
+all-stage2-binutils: maybe-all-stage2-intl
+all-stage3-binutils: maybe-all-stage3-intl
+all-stage4-binutils: maybe-all-stage4-intl
+all-stageprofile-binutils: maybe-all-stageprofile-intl
+all-stagefeedback-binutils: maybe-all-stagefeedback-intl
install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
+all-gas: maybe-all-libiberty
+
+all-stage1-gas: maybe-all-stage1-libiberty
+all-stage2-gas: maybe-all-stage2-libiberty
+all-stage3-gas: maybe-all-stage3-libiberty
+all-stage4-gas: maybe-all-stage4-libiberty
+all-stageprofile-gas: maybe-all-stageprofile-libiberty
+all-stagefeedback-gas: maybe-all-stagefeedback-libiberty
+all-gas: maybe-all-opcodes
+
+all-stage1-gas: maybe-all-stage1-opcodes
+all-stage2-gas: maybe-all-stage2-opcodes
+all-stage3-gas: maybe-all-stage3-opcodes
+all-stage4-gas: maybe-all-stage4-opcodes
+all-stageprofile-gas: maybe-all-stageprofile-opcodes
+all-stagefeedback-gas: maybe-all-stagefeedback-opcodes
+all-gas: maybe-all-bfd
+
+all-stage1-gas: maybe-all-stage1-bfd
+all-stage2-gas: maybe-all-stage2-bfd
+all-stage3-gas: maybe-all-stage3-bfd
+all-stage4-gas: maybe-all-stage4-bfd
+all-stageprofile-gas: maybe-all-stageprofile-bfd
+all-stagefeedback-gas: maybe-all-stagefeedback-bfd
+all-gas: maybe-all-intl
+
+all-stage1-gas: maybe-all-stage1-intl
+all-stage2-gas: maybe-all-stage2-intl
+all-stage3-gas: maybe-all-stage3-intl
+all-stage4-gas: maybe-all-stage4-intl
+all-stageprofile-gas: maybe-all-stageprofile-intl
+all-stagefeedback-gas: maybe-all-stagefeedback-intl
+all-gprof: maybe-all-libiberty
+all-gprof: maybe-all-bfd
+all-gprof: maybe-all-opcodes
+all-gprof: maybe-all-intl
+all-ld: maybe-all-libiberty
+
+all-stage1-ld: maybe-all-stage1-libiberty
+all-stage2-ld: maybe-all-stage2-libiberty
+all-stage3-ld: maybe-all-stage3-libiberty
+all-stage4-ld: maybe-all-stage4-libiberty
+all-stageprofile-ld: maybe-all-stageprofile-libiberty
+all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
+all-ld: maybe-all-bfd
+
+all-stage1-ld: maybe-all-stage1-bfd
+all-stage2-ld: maybe-all-stage2-bfd
+all-stage3-ld: maybe-all-stage3-bfd
+all-stage4-ld: maybe-all-stage4-bfd
+all-stageprofile-ld: maybe-all-stageprofile-bfd
+all-stagefeedback-ld: maybe-all-stagefeedback-bfd
+all-ld: maybe-all-opcodes
+
+all-stage1-ld: maybe-all-stage1-opcodes
+all-stage2-ld: maybe-all-stage2-opcodes
+all-stage3-ld: maybe-all-stage3-opcodes
+all-stage4-ld: maybe-all-stage4-opcodes
+all-stageprofile-ld: maybe-all-stageprofile-opcodes
+all-stagefeedback-ld: maybe-all-stagefeedback-opcodes
+all-ld: maybe-all-build-bison
+
+all-stage1-ld: maybe-all-build-bison
+all-stage2-ld: maybe-all-build-bison
+all-stage3-ld: maybe-all-build-bison
+all-stage4-ld: maybe-all-build-bison
+all-stageprofile-ld: maybe-all-build-bison
+all-stagefeedback-ld: maybe-all-build-bison
+all-prebootstrap: maybe-all-build-bison
+all-ld: maybe-all-build-byacc
+
+all-stage1-ld: maybe-all-build-byacc
+all-stage2-ld: maybe-all-build-byacc
+all-stage3-ld: maybe-all-build-byacc
+all-stage4-ld: maybe-all-build-byacc
+all-stageprofile-ld: maybe-all-build-byacc
+all-stagefeedback-ld: maybe-all-build-byacc
+all-prebootstrap: maybe-all-build-byacc
+all-ld: maybe-all-build-flex
+
+all-stage1-ld: maybe-all-build-flex
+all-stage2-ld: maybe-all-build-flex
+all-stage3-ld: maybe-all-build-flex
+all-stage4-ld: maybe-all-build-flex
+all-stageprofile-ld: maybe-all-build-flex
+all-stagefeedback-ld: maybe-all-build-flex
+all-prebootstrap: maybe-all-build-flex
+all-ld: maybe-all-intl
+
+all-stage1-ld: maybe-all-stage1-intl
+all-stage2-ld: maybe-all-stage2-intl
+all-stage3-ld: maybe-all-stage3-intl
+all-stage4-ld: maybe-all-stage4-intl
+all-stageprofile-ld: maybe-all-stageprofile-intl
+all-stagefeedback-ld: maybe-all-stagefeedback-intl
+all-opcodes: maybe-all-bfd
+
+all-stage1-opcodes: maybe-all-stage1-bfd
+all-stage2-opcodes: maybe-all-stage2-bfd
+all-stage3-opcodes: maybe-all-stage3-bfd
+all-stage4-opcodes: maybe-all-stage4-bfd
+all-stageprofile-opcodes: maybe-all-stageprofile-bfd
+all-stagefeedback-opcodes: maybe-all-stagefeedback-bfd
+all-opcodes: maybe-all-libiberty
+
+all-stage1-opcodes: maybe-all-stage1-libiberty
+all-stage2-opcodes: maybe-all-stage2-libiberty
+all-stage3-opcodes: maybe-all-stage3-libiberty
+all-stage4-opcodes: maybe-all-stage4-libiberty
+all-stageprofile-opcodes: maybe-all-stageprofile-libiberty
+all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
+all-dejagnu: maybe-all-tcl
+all-dejagnu: maybe-all-expect
+all-dejagnu: maybe-all-tk
+configure-expect: maybe-configure-tcl
+configure-expect: maybe-configure-tk
+all-expect: maybe-all-tcl
+all-expect: maybe-all-tk
+configure-itcl: maybe-configure-tcl
+configure-itcl: maybe-configure-tk
+all-itcl: maybe-all-tcl
+all-itcl: maybe-all-tk
install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
configure-tk: maybe-configure-tcl
all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
-all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
+all-sid: maybe-all-libiberty
+all-sid: maybe-all-bfd
+all-sid: maybe-all-opcodes
+all-sid: maybe-all-tcl
+all-sid: maybe-all-tk
+install-sid: maybe-install-tcl
+install-sid: maybe-install-tk
+all-sim: maybe-all-libiberty
+all-sim: maybe-all-bfd
+all-sim: maybe-all-opcodes
+all-sim: maybe-all-readline
+all-sim: maybe-configure-gdb
+all-fastjar: maybe-all-zlib
+all-fastjar: maybe-all-build-texinfo
+all-fastjar: maybe-all-libiberty
+all-autoconf: maybe-all-m4
+all-autoconf: maybe-all-build-texinfo
+all-automake: maybe-all-m4
+all-automake: maybe-all-build-texinfo
+all-automake: maybe-all-autoconf
+all-bison: maybe-all-intl
+all-bison: maybe-all-build-texinfo
+all-diff: maybe-all-intl
+all-diff: maybe-all-build-texinfo
+all-fileutils: maybe-all-intl
+all-fileutils: maybe-all-build-texinfo
+all-flex: maybe-all-build-bison
+all-flex: maybe-all-build-byacc
+all-flex: maybe-all-intl
+all-flex: maybe-all-m4
+all-flex: maybe-all-build-texinfo
+all-gzip: maybe-all-intl
+all-gzip: maybe-all-zlib
+all-gzip: maybe-all-build-texinfo
+all-hello: maybe-all-intl
+all-hello: maybe-all-build-texinfo
+all-m4: maybe-all-intl
+all-m4: maybe-all-build-texinfo
+all-make: maybe-all-intl
+all-make: maybe-all-build-texinfo
+all-patch: maybe-all-build-texinfo
+all-make: maybe-all-build-texinfo
all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
+all-recode: maybe-all-build-texinfo
+all-sed: maybe-all-build-texinfo
all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+all-tar: maybe-all-build-texinfo
+all-uudecode: maybe-all-build-texinfo
+configure-target-boehm-gc: maybe-configure-target-qthreads
configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libada: $(ALL_GCC_C)
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
+all-target-fastjar: maybe-all-target-zlib
+all-target-fastjar: maybe-all-target-libiberty
+configure-target-libjava: maybe-configure-target-zlib
+configure-target-libjava: maybe-configure-target-boehm-gc
+configure-target-libjava: maybe-configure-target-qthreads
+configure-target-libjava: maybe-configure-target-libffi
+all-target-libjava: maybe-all-fastjar
+all-target-libjava: maybe-all-target-zlib
+all-target-libjava: maybe-all-target-boehm-gc
+all-target-libjava: maybe-all-target-qthreads
+all-target-libjava: maybe-all-target-libffi
all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
-
-# Dependencies of maybe-foo on foo. These are used because, for example,
-# all-gcc only depends on all-gas if gas is present and being configured.
-@maybe_dependencies@
+all-target-winsup: maybe-all-target-libiberty
+all-target-winsup: maybe-all-target-libtermcap
+
+
+# Non-toplevel bootstrap rules must depend on several packages, to be built
+# before gcc. Another wart that will go away, hopefully soon.
+@if gcc-no-bootstrap
+
+all-prebootstrap: maybe-all-bfd
+all-prebootstrap: maybe-all-opcodes
+all-prebootstrap: maybe-all-binutils
+all-prebootstrap: maybe-all-gas
+all-prebootstrap: maybe-all-intl
+all-prebootstrap: maybe-all-ld
+all-prebootstrap: maybe-all-libcpp
+all-prebootstrap: maybe-all-libiberty
+all-prebootstrap: maybe-all-zlib
+@endif gcc-no-bootstrap
+
+GDB_TK = @GDB_TK@
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
diff --git a/Makefile.tpl b/Makefile.tpl
index cd7e06eccdc..d685c39ded5 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -6,7 +6,7 @@ in
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+# 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -68,6 +68,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
+LN = @LN@
+LN_S = @LN_S@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
@@ -112,11 +114,72 @@ BUILD_SUBDIR = @build_subdir@
# directories built for the build system.
BUILD_CONFIGARGS = @build_configargs@
+# This is the list of variables to export in the environment when
+# configuring any subdirectory. It must also be exported whenever
+# recursing into a build directory in case that directory's Makefile
+# re-runs configure.
+BASE_EXPORTS = \
+ FLEX="$(FLEX)"; export FLEX; \
+ LEX="$(LEX)"; export LEX; \
+ BISON="$(BISON)"; export BISON; \
+ YACC="$(YACC)"; export YACC; \
+ M4="$(M4)"; export M4; \
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
+
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the build system.
+BUILD_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+ NM="$(NM_FOR_BUILD)"; export NM; \
+ RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;
+
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
# directories built for the host system.
HOST_CONFIGARGS = @host_configargs@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ 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; \
+ LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
+ GMPINC="$(HOST_GMPINC)"; export GMPINC;
+
+# Similar, for later GCC stages.
+STAGE_HOST_EXPORTS = \
+ $(HOST_EXPORTS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
+ CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
# This is set by the configure script to the list of directories which
# should be built using the target tools.
@@ -126,6 +189,38 @@ TARGET_SUBDIR = @target_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the target.
TARGET_CONFIGARGS = @target_configargs@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+BASE_TARGET_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+ NM="$(NM_FOR_TARGET)"; export NM; \
+ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES;
+
+RAW_CXX_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
+ CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
+
+NORMAL_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX="$(CXX_FOR_TARGET)"; export CXX;
+
+# Where to find GMP
+HOST_GMPLIBS = @gmplibs@
+HOST_GMPINC = @gmpinc@
# ----------------------------------------------
# Programs producing files for the BUILD machine
@@ -153,42 +248,51 @@ CXX_FOR_BUILD = $(CXX)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
-BISON=@BISON@
-USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -L $$s/bison/ ; \
+# Flags to pass to stage2 and later makes. They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+
+CONFIGURED_BISON = @CONFIGURED_BISON@
+BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
else \
- echo bison ; \
+ echo ${CONFIGURED_BISON} ; \
fi`
-DEFAULT_YACC = @DEFAULT_YACC@
-YACC=@YACC@
-USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -y -L $$s/bison/ ; \
- elif [ -f $$r/byacc/byacc ] ; then \
- echo $$r/byacc/byacc ; \
+CONFIGURED_YACC = @CONFIGURED_YACC@
+YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \
+ elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \
+ echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \
else \
- echo ${DEFAULT_YACC} ; \
+ echo ${CONFIGURED_YACC} ; \
fi`
-DEFAULT_LEX = @DEFAULT_LEX@
-LEX=@LEX@
-USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
- then echo $$r/flex/flex ; \
- else echo ${DEFAULT_LEX} ; fi`
+CONFIGURED_FLEX = @CONFIGURED_FLEX@
+FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
+ else echo ${CONFIGURED_FLEX} ; fi`
+
+CONFIGURED_LEX = @CONFIGURED_LEX@
+LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
+ else echo ${CONFIGURED_LEX} ; fi`
-DEFAULT_M4 = @DEFAULT_M4@
-M4 = `if [ -f $$r/m4/m4 ] ; \
- then echo $$r/m4/m4 ; \
- else echo ${DEFAULT_M4} ; fi`
+CONFIGURED_M4 = @CONFIGURED_M4@
+M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \
+ else echo ${CONFIGURED_M4} ; fi`
# For an installed makeinfo, we require it to be from texinfo 4.2 or
-# higher, else we use the "missing" dummy.
-MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
- then echo $$r/texinfo/makeinfo/makeinfo ; \
- else if (makeinfo --version \
+# higher, else we use the "missing" dummy. We also pass the subdirectory
+# makeinfo even if only the Makefile is there, because Texinfo builds its
+# manual when made, and it requires its own version.
+CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
+MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
+ then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
+ else if (${CONFIGURED_MAKEINFO} --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
- then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
+ then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -244,11 +348,12 @@ PICFLAG =
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
+TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libmudflap/.libs
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
+CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
@@ -256,11 +361,12 @@ USUAL_AR_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \
else \
- echo ar | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_AR_FOR_TARGET) ; \
fi; \
fi`
AS_FOR_TARGET=@AS_FOR_TARGET@
+CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \
echo $$r/gas/as-new ; \
@@ -270,7 +376,7 @@ USUAL_AS_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \
else \
- echo as | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_AS_FOR_TARGET) ; \
fi; \
fi`
@@ -296,6 +402,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
+CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
@@ -303,13 +410,15 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \
else \
- echo dlltool | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
fi; \
fi`
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
+GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
+CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
USUAL_LD_FOR_TARGET = ` \
if [ -f $$r/ld/ld-new ] ; then \
echo $$r/ld/ld-new ; \
@@ -319,13 +428,14 @@ USUAL_LD_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \
else \
- echo ld | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_LD_FOR_TARGET) ; \
fi; \
fi`
LDFLAGS_FOR_TARGET =
NM_FOR_TARGET=@NM_FOR_TARGET@
+CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \
if [ -f $$r/binutils/nm-new ] ; then \
echo $$r/binutils/nm-new ; \
@@ -335,11 +445,12 @@ USUAL_NM_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \
else \
- echo nm | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_NM_FOR_TARGET) ; \
fi; \
fi`
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
@@ -351,11 +462,12 @@ USUAL_RANLIB_FOR_TARGET = ` \
echo ranlib; \
fi; \
else \
- echo ranlib | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
fi; \
fi`
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
+CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
@@ -363,7 +475,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \
else \
- echo windres | sed '$(program_transform_name)' ; \
+ echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
fi; \
fi`
@@ -375,8 +487,7 @@ PICFLAG_FOR_TARGET =
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+@default_target@:
#### host and target specific makefile fragments come in here.
@target_makefile_frag@
@@ -400,6 +511,8 @@ RECURSE_FLAGS = \
CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
+RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)
+
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
EXTRA_HOST_FLAGS = \
@@ -471,7 +584,7 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
.PHONY: configure-host
-configure-host: maybe-configure-gcc [+
+configure-host: [+
FOR host_modules +] \
maybe-configure-[+module+][+
ENDFOR host_modules +]
@@ -481,12 +594,17 @@ configure-target: [+
maybe-configure-target-[+module+][+
ENDFOR target_modules +]
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all: unstage all-host all-target stage
+.PHONY: all-build
+all-build: [+
+ FOR build_modules +] \
+ maybe-all-build-[+module+][+
+ ENDFOR build_modules +]
.PHONY: all-host
-all-host: maybe-all-gcc [+
+all-host: [+
FOR host_modules +] \
maybe-all-[+module+][+
ENDFOR host_modules +]
@@ -502,10 +620,10 @@ all-target: [+
# but it may do additional work as well).
[+ FOR recursive_targets +]
.PHONY: do-[+make_target+]
-do-[+make_target+]: [+make_target+]-host [+make_target+]-target
+do-[+make_target+]: unstage [+make_target+]-host [+make_target+]-target stage
.PHONY: [+make_target+]-host
-[+make_target+]-host: maybe-[+make_target+]-gcc [+
+[+make_target+]-host: [+
FOR host_modules +] \
maybe-[+make_target+]-[+module+][+
ENDFOR host_modules +]
@@ -577,13 +695,13 @@ clean-target-libgcc:
check: do-check
# Only include modules actually being configured and built.
-do-check: maybe-check-gcc [+
+do-check: unstage [+
FOR host_modules +] \
maybe-check-[+module+][+
ENDFOR host_modules +][+
FOR target_modules +] \
maybe-check-target-[+module+][+
- ENDFOR target_modules +]
+ ENDFOR target_modules +] stage
# Automated reporting of test results.
@@ -613,12 +731,12 @@ install: installdirs install-host install-target
.PHONY: install-host-nogcc
install-host-nogcc: [+
- FOR host_modules +] \
- maybe-install-[+module+][+
+ FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
+ maybe-install-[+module+][+ ENDIF +][+
ENDFOR host_modules +]
.PHONY: install-host
-install-host: maybe-install-gcc [+
+install-host: [+
FOR host_modules +] \
maybe-install-[+module+][+
ENDFOR host_modules +]
@@ -637,6 +755,7 @@ install.all: install-no-fixedincludes
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}` ; export r ; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
else \
@@ -685,25 +804,14 @@ TAGS: do-TAGS
[+ FOR build_modules +]
.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
maybe-configure-build-[+module+]:
+@if build-[+module+]
+maybe-configure-build-[+module+]: configure-build-[+module+]
configure-build-[+module+]:
@test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/[+module+] ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
- NM="$(NM_FOR_BUILD)"; export NM; \
- RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
+ $(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
@@ -742,15 +850,22 @@ configure-build-[+module+]:
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) $${srcdiroption} \
- --with-build-subdir="$(BUILD_SUBDIR)" \
+ --with-build-subdir="$(BUILD_SUBDIR)" [+extra_configure_flags+] \
|| exit 1
+@endif build-[+module+]
.PHONY: all-build-[+module+] maybe-all-build-[+module+]
maybe-all-build-[+module+]:
+@if build-[+module+]
+TARGET-build-[+module+]=[+ IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
+maybe-all-build-[+module+]: all-build-[+module+]
all-build-[+module+]: configure-build-[+module+]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all)
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/[+module+] && \
+ $(MAKE) [+extra_make_flags+] $(TARGET-build-[+module+]))
+@endif build-[+module+]
[+ ENDFOR build_modules +]
# --------------------------------------
@@ -759,26 +874,15 @@ all-build-[+module+]: configure-build-[+module+]
[+ FOR host_modules +]
.PHONY: configure-[+module+] maybe-configure-[+module+]
maybe-configure-[+module+]:
+@if [+module+]
+maybe-configure-[+module+]: configure-[+module+]
configure-[+module+]:
- @test ! -f [+module+]/Makefile || exit 0; \
+ @[+ IF bootstrap +]test -f stage_last && exit 0; \
+ [+ ENDIF bootstrap +]test ! -f [+module+]/Makefile || exit 0; \
[ -d [+module+] ] || mkdir [+module+]; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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; \
+ $(HOST_EXPORTS) \
echo Configuring in [+module+]; \
cd [+module+] || exit 1; \
case $(srcdir) in \
@@ -793,22 +897,33 @@ configure-[+module+]:
libsrcdir="$$s/[+module+]";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) $${srcdiroption} [+extra_configure_flags+] \
|| exit 1
+@endif [+module+]
.PHONY: all-[+module+] maybe-all-[+module+]
maybe-all-[+module+]:
+@if [+module+]
+maybe-all-[+module+]: all-[+module+]
all-[+module+]: configure-[+module+]
- @r=`${PWD_COMMAND}`; export r; \
+ @[+ IF bootstrap +]test -f stage_last && exit 0; \
+ [+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
IF with_x
+] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] all)
+ ENDIF with_x +] [+extra_make_flags+] [+
+ IF (== (get "module") "gcc") +] \
+ `if [ -f gcc/stage_last ]; then echo quickstrap ; else echo all; fi` [+
+ ELSE +]all[+ ENDIF +])
+@endif [+module+]
.PHONY: check-[+module+] maybe-check-[+module+]
maybe-check-[+module+]:
+@if [+module+]
+maybe-check-[+module+]: check-[+module+]
[+ IF no_check +]
check-[+module+]:
[+ ELIF no_check_cross +]
@@ -818,24 +933,25 @@ check-[+module+]:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] check); \
+ $(HOST_EXPORTS) \
+ (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS) [+
+ extra_make_flags+] check); \
fi
[+ ELSE check +]
check-[+module+]:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] check)
+ extra_make_flags+] check)
[+ ENDIF no_check +]
+@endif [+module+]
.PHONY: install-[+module+] maybe-install-[+module+]
maybe-install-[+module+]:
+@if [+module+]
+maybe-install-[+module+]: install-[+module+]
[+ IF no_install +]
install-[+module+]:
[+ ELSE install +]
@@ -843,16 +959,18 @@ install-[+module+]: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] install)
+ extra_make_flags+] install)
[+ ENDIF no_install +]
+@endif [+module+]
# Other targets (info, dvi, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
maybe-[+make_target+]-[+module+]:
+@if [+module+]
+maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
[+ IF (match-value? = "missing" (get "make_target") ) +]
# [+module+] doesn't support [+make_target+].
[+make_target+]-[+module+]:
@@ -865,7 +983,8 @@ maybe-[+make_target+]-[+module+]:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing [+make_target+] in [+module+]" ; \
@@ -877,6 +996,7 @@ maybe-[+make_target+]-[+module+]:
[+make_target+]) \
|| exit 1
[+ ENDIF +]
+@endif [+module+]
[+ ENDFOR recursive_targets +]
[+ ENDFOR host_modules +]
@@ -886,6 +1006,8 @@ maybe-[+make_target+]-[+module+]:
[+ FOR target_modules +]
.PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
maybe-configure-target-[+module+]:
+@if target-[+module+]
+maybe-configure-target-[+module+]: configure-target-[+module+]
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
@@ -898,27 +1020,12 @@ configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \[+
+ $(SET_LIB_PATH) \[+
IF raw_cxx +]
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \[+
+ $(RAW_CXX_TARGET_EXPORTS) \[+
ELSE normal_cxx +]
- CXX="$(CXX_FOR_TARGET)"; export CXX; \[+
+ $(NORMAL_TARGET_EXPORTS) \[+
ENDIF raw_cxx +]
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
@@ -957,24 +1064,36 @@ ENDIF raw_cxx +]
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ --with-target-subdir="$(TARGET_SUBDIR)" [+extra_configure_flags+] \
|| exit 1
+@endif target-[+module+]
.PHONY: all-target-[+module+] maybe-all-target-[+module+]
maybe-all-target-[+module+]:
+@if target-[+module+]
+TARGET-target-[+module+]=[+ IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
+maybe-all-target-[+module+]: all-target-[+module+]
all-target-[+module+]: configure-target-[+module+]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(SET_LIB_PATH) \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
(cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
IF raw_cxx
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
ENDIF raw_cxx
- +] all)
+ +] [+extra_make_flags+] $(TARGET-target-[+module+]))
+@endif target-[+module+]
.PHONY: check-target-[+module+] maybe-check-target-[+module+]
maybe-check-target-[+module+]:
+@if target-[+module+]
+maybe-check-target-[+module+]: check-target-[+module+]
[+ IF no_check +]
# Dummy target for uncheckable module.
check-target-[+module+]:
@@ -982,17 +1101,25 @@ check-target-[+module+]:
check-target-[+module+]:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(SET_LIB_PATH) \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
(cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
IF raw_cxx
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
ENDIF raw_cxx
- +] check)
+ +] [+extra_make_flags+] check)
[+ ENDIF no_check +]
+@endif target-[+module+]
.PHONY: install-target-[+module+] maybe-install-target-[+module+]
maybe-install-target-[+module+]:
+@if target-[+module+]
+maybe-install-target-[+module+]: install-target-[+module+]
[+ IF no_install +]
# Dummy target for uninstallable.
install-target-[+module+]:
@@ -1000,15 +1127,23 @@ install-target-[+module+]:
install-target-[+module+]: installdirs
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(SET_LIB_PATH) \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
(cd $(TARGET_SUBDIR)/[+module+] && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install)
[+ ENDIF no_install +]
+@endif target-[+module+]
# Other targets (info, dvi, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
maybe-[+make_target+]-target-[+module+]:
+@if target-[+module+]
+maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
[+ IF (match-value? = "missing" (get "make_target") ) +]
# [+module+] doesn't support [+make_target+].
[+make_target+]-target-[+module+]:
@@ -1020,7 +1155,12 @@ maybe-[+make_target+]-target-[+module+]:
@[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(SET_LIB_PATH) \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
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|"`; \
@@ -1030,9 +1170,10 @@ maybe-[+make_target+]-target-[+module+]:
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
+ [+extra_make_flags+] [+make_target+]) \
|| exit 1
[+ ENDIF +]
+@endif target-[+module+]
[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
@@ -1040,91 +1181,18 @@ maybe-[+make_target+]-target-[+module+]:
# GCC module
# ----------
-# Unfortunately, while gcc _should_ be a host module,
-# libgcc is a target module, and gen* programs are
-# build modules. So GCC is a sort of hybrid.
-
-# gcc is the only module which uses GCC_FLAGS_TO_PASS.
-# Don't use shared host config.cache, as it will confuse later
-# directories; GCC wants slightly different values for some
-# precious variables. *sigh*
-
-# We must skip configuring if toplevel bootstrap is going.
-.PHONY: configure-gcc maybe-configure-gcc
-maybe-configure-gcc:
-configure-gcc:
- @test ! -f gcc/Makefile || exit 0; \
- [ -f stage_last ] && exit 0; \
- [ -d gcc ] || mkdir gcc; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- 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 \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
+@if gcc-no-bootstrap
+# GCC has some more recursive targets, which trigger the old
+# (but still current, until the toplevel bootstrap project
+# is finished) compiler bootstrapping rules.
-# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
-# causes trouble. This wart will be fixed eventually by moving
-# the bootstrap behavior to this file.
-.PHONY: all-gcc maybe-all-gcc
-maybe-all-gcc:
-all-gcc: configure-gcc
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ -f stage_last ] ; then \
- true ; \
- elif [ -f gcc/stage_last ] ; then \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
- else \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
- fi
-
-# Building GCC uses some tools for rebuilding "source" files
-# like texinfo, bison/byacc, etc. So we must depend on those.
-#
-# While building GCC, it may be necessary to run various target
-# programs like the assembler, linker, etc. So we depend on
-# those too.
-#
-# In theory, on an SMP all those dependencies can be resolved
-# in parallel.
-#
GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Bootstrapping the compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
@r=`${PWD_COMMAND}`; export r; \
@@ -1144,63 +1212,57 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
compare=compare ;; \
esac; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "$$msg"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
- echo "Bootstrapping the compiler"; \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping training compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
- echo "Building runtime libraries and training compiler"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
- @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building feedback based compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
.PHONY: cross
-cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
- LANGUAGES="c c++" all
-
-.PHONY: check-gcc maybe-check-gcc
-maybe-check-gcc:
-check-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
- else \
- true; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
+@if gcc
.PHONY: check-gcc-c++
check-gcc-c++:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
@@ -1209,18 +1271,6 @@ check-gcc-c++:
.PHONY: check-c++
check-c++: check-target-libstdc++-v3 check-gcc-c++
-.PHONY: install-gcc maybe-install-gcc
-maybe-install-gcc:
-install-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- else \
- true; \
- fi
-
# Install the gcc headers files, but not the fixed include files,
# which Cygnus is not allowed to distribute. This rule is very
# dependent on the workings of the gcc Makefile.in.
@@ -1236,54 +1286,57 @@ gcc-no-fixedincludes:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
-
-# Other targets (dvi, info, etc.)
-[+ FOR recursive_targets +]
-.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_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; 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
-
-[+ ENDFOR recursive_targets +]
+@endif gcc
# ---------------------
# GCC bootstrap support
# ---------------------
-# We name the directories for the various stages "stage1-gcc",
-# "stage2-gcc","stage3-gcc", etc.
-# Unfortunately, the 'compare' process will fail (on debugging information)
-# if any directory names are different!
-# So in the building rule for each stage, we relocate them before and after.
-# The current one is 'gcc', while the previous one is 'prev-gcc'. (The
-# current one must be 'gcc' for now because the scripts in that directory
-# assume it.)
-# At the end of the bootstrap, 'stage3-gcc' must be moved to 'gcc' so that
-# libraries can find it. Ick!
+# We track the current stage (the one in 'gcc') in the stage_current file.
+# stage_last instead tracks the stage that was built last. These targets
+# are dummy when toplevel bootstrap is not active.
+
+.PHONY: unstage
+unstage:
+@if gcc-bootstrap
+ @[ -f stage_current ] || $(MAKE) `cat stage_last`-start
+@endif gcc-bootstrap
+
+.PHONY: stage
+stage:
+@if gcc-bootstrap
+ @$(MAKE) `cat stage_current`-end
+@endif gcc-bootstrap
+
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('gcc-prev'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+
+# At the end of the bootstrap, a symlink to 'stage3-gcc' named 'gcc' must
+# be kept, so that libraries can find it. Ick!
+
+# It would be best to preinstall gcc into a staging area (and in the
+# future, gather there all prebootstrap packages). This would allow
+# assemblers and linkers can be bootstrapped as well as the compiler
+# (both in a combined tree, or separately). This however requires some
+# change to the gcc driver, again in order to avoid comparison failures.
+
+# Bugs: This is crippled when doing parallel make, the `make all-host'
+# and `make all-target' phases can be parallelized.
-# Bugs: This is almost certainly not parallel-make safe.
# 'touch' doesn't work right on some platforms.
STAMP = echo timestamp >
@@ -1297,6 +1350,16 @@ STAMP = echo timestamp >
STAGE1_CFLAGS=@stage1_cflags@
STAGE1_LANGUAGES=@stage1_languages@
+# We only want to compare .o files, so set this!
+objext = .o
+
+# Flags to pass to stage2 and later makes.
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ STAGE_PREFIX=$$r/stage[+prev+]-gcc/ \
+ CFLAGS="$(BOOT_CFLAGS)" \
+ ADAC="\$$(CC)"
+
# For stage 1:
# * We force-disable intermodule optimizations, even if
# --enable-intermodule was passed, since the installed compiler probably
@@ -1305,228 +1368,129 @@ STAGE1_LANGUAGES=@stage1_languages@
# * Likewise, we force-disable coverage flags, since the installed compiler
# probably has never heard of them.
# * We build only C (and possibly Ada).
-configure-stage1-gcc:
- echo configure-stage1-gcc > stage_last ; \
- if [ -f stage1-gcc/Makefile ] ; then \
- $(STAMP) configure-stage1-gcc ; \
- exit 0; \
- else \
- true ; \
- fi ; \
- [ -d stage1-gcc ] || mkdir stage1-gcc; \
- mv stage1-gcc gcc ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- 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 stage 1 in gcc; \
- cd gcc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage \
- --enable-languages="$(STAGE1_LANGUAGES)"; \
- cd .. ; \
- mv gcc stage1-gcc ; \
- $(STAMP) configure-stage1-gcc
-# Real targets act phony if they depend on phony targets; this hack
-# prevents gratuitous rebuilding of stage 1.
-prebootstrap:
- $(MAKE) all-bootstrap
- $(STAMP) prebootstrap
-
-all-stage1-gcc: configure-stage1-gcc prebootstrap
- echo all-stage1-gcc > stage_last ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage1-gcc gcc ; \
- cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" \
- || exit 1 ; \
- cd .. ; \
- mv gcc stage1-gcc ; \
- $(STAMP) all-stage1-gcc
-
-# TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally)
-# Possibly pass --enable-werror-always (depending on --enable-werror);
-# that's what @stage2_werror_flag@ is for
-configure-stage2-gcc: all-stage1-gcc
- echo configure-stage2-gcc > stage_last ; \
- if [ -f stage2-gcc/Makefile ] ; then \
- $(STAMP) configure-stage2-gcc ; \
- exit 0; \
+[+ FOR bootstrap-stage +]
+.PHONY: stage[+id+]-start stage[+id+]-end
+
+stage[+id+]-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage[+id+] > stage_current ; \
+ echo stage[+id+] > stage_last[+ FOR host_modules +][+ IF bootstrap +]
+@if [+ module +]
+ @[ -d stage[+id+]-[+module+] ] || mkdir stage[+id+]-[+module+]; \
+ set stage[+id+]-[+module+] [+module+] ; @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
+ set stage[+prev+]-[+module+] prev-[+module+] ; @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+
+stage[+id+]-end::
+ @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +]
+@if [+ module +]
+ @set [+module+] stage[+id+]-[+module+] ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
+ set prev-[+module+] stage[+prev+]-[+module+] ; @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+
+# Bubble a bugfix through all the stages up to stage [+id+]. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage[+id+]-bubble
+stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +][+IF lean +]
+ @bootstrap_lean@-rm -rf stage[+lean+]-* ; $(STAMP) stage[+lean+]-lean[+ ENDIF lean +]
+ @if test -f stage[+id+]-lean [+
+ IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
+ echo Skipping rebuild of stage[+id+] ; \
else \
- true ; \
- fi ; \
- [ -d stage2-gcc ] || mkdir stage2-gcc; \
- mv stage2-gcc gcc ; \
- mv stage1-gcc prev-gcc ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- 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; \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- echo Configuring stage 2 in gcc; \
- cd gcc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
- cd .. ; \
- mv gcc stage2-gcc ; \
- mv prev-gcc stage1-gcc ; \
- $(STAMP) configure-stage2-gcc
-
-# Flags to pass to stage2 and later makes.
-BOOT_CFLAGS= -g -O2
-POSTSTAGE1_FLAGS_TO_PASS = \
- CFLAGS="$(BOOT_CFLAGS)" \
- ADAC="\$$(CC)"
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage[+id+]; \
+ fi
-all-stage2-gcc: all-stage1-gcc configure-stage2-gcc
- echo all-stage2-gcc > stage_last ; \
+.PHONY: all-stage[+id+] clean-stage[+id+]
+all-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\
+ maybe-all-stage[+id+]-[+module+][+
+ENDIF bootstrap+] [+ ENDFOR host_modules +]
+
+do-clean: clean-stage[+id+]
+clean-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\
+ maybe-clean-stage[+id+]-[+module+][+
+ENDIF bootstrap+] [+ ENDFOR host_modules +]
+
+[+ FOR host_modules +][+ IF bootstrap +]
+.PHONY: configure-stage[+id+]-[+module+] maybe-configure-stage[+id+]-[+module+]
+.PHONY: all-stage[+id+]-[+module+] maybe-all-stage[+id+]-[+module+]
+.PHONY: clean-stage[+id+]-[+module+] maybe-clean-stage[+id+]-[+module+]
+
+maybe-configure-stage[+id+]-[+module+]:
+maybe-all-stage[+id+]-[+module+]:
+maybe-clean-stage[+id+]-[+module+]:
+
+@if [+module+]-bootstrap
+maybe-configure-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+]
+configure-stage[+id+]-[+module+]:
+ @$(MAKE) stage[+id+]-start
+ @[ -f [+module+]/Makefile ] && exit 0 || : ; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage2-gcc gcc ; \
- mv stage1-gcc prev-gcc ; \
- cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
- cd .. ; \
- mv prev-gcc stage1-gcc ; \
- mv gcc stage2-gcc ; \
- $(STAMP) all-stage2-gcc
-
-configure-stage3-gcc: all-stage2-gcc
- echo configure-stage3-gcc > stage_last ; \
- if [ -f stage3-gcc/Makefile ] ; then \
- $(STAMP) configure-stage3-gcc ; \
- exit 0; \
- else \
- true ; \
- fi ; \
- [ -d stage3-gcc ] || mkdir stage3-gcc; \
- mv stage3-gcc gcc ; \
- mv stage2-gcc prev-gcc ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- 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; \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- echo Configuring stage 3 in gcc; \
- cd gcc || exit 1; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; [+ IF prev +] \
+ $(STAGE_HOST_EXPORTS) [+ ELSE prev +] \
+ $(HOST_EXPORTS) [+ ENDIF prev +] \
+ echo Configuring stage [+id+] in [+module+] ; \
+ cd [+module+] || exit 1; \
case $(srcdir) in \
\.) \
srcdiroption="--srcdir=."; \
libsrcdir=".";; \
/* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
+ srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
+ libsrcdir="$$s/[+module+]";; \
*) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
+ srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
+ libsrcdir="$$s/[+module+]";; \
esac; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
- cd .. ; \
- mv gcc stage3-gcc ; \
- mv prev-gcc stage2-gcc ; \
- $(STAMP) configure-stage3-gcc
-
-all-stage3-gcc: all-stage2-gcc configure-stage3-gcc
- echo all-stage3-gcc > stage_last ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- mv stage2-gcc prev-gcc ; \
- mv stage3-gcc gcc ; \
- cd gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) \
- CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
- cd .. ; \
- mv prev-gcc stage2-gcc ; \
- mv gcc stage3-gcc ; \
- $(STAMP) all-stage3-gcc
-
-# We only want to compare .o files, so set this!
-objext = .o
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ [+stage_configure_flags+] [+extra_configure_flags+]
-compare: all-stage3-gcc
- r=`${PWD_COMMAND}`; export r; \
+maybe-all-stage[+id+]-[+module+]: all-stage[+id+]-[+module+]
+all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+]
+ @$(MAKE) stage[+id+]-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; [+ IF prev +] \
+ $(STAGE_HOST_EXPORTS) [+ ELSE prev +] \
+ $(HOST_EXPORTS) [+ ENDIF prev +] \
+ cd [+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+ IF prev +] \
+ $(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
+ [+stage_make_flags+] [+extra_make_flags+]
+
+maybe-clean-stage[+id+]-[+module+]: clean-stage[+id+]-[+module+]
+clean-stage[+id+]-[+module+]:
+ @[ -f [+module+]/Makefile ] || [ -f stage[+id+]-[+module+]/Makefile ] \
+ || exit 0 ; \
+ [ -f [+module+]/Makefile ] || $(MAKE) stage[+id+]-start ; \
+ cd [+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+ IF prev +] \
+ $(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
+ [+stage_make_flags+] [+extra_make_flags+] clean
+@endif [+module+]-bootstrap
+
+[+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+[+ IF compare-target +]
+[+compare-target+]:
+ @if test -f stage[+prev+]-lean; then \
+ echo Cannot compare object files as stage [+prev+] was deleted. ; \
+ exit 0 ; \
+ fi; \
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
rm -f .bad_compare ; \
- cd stage3-gcc; \
+ cd stage[+id+]-gcc; \
files=`find . -name "*$(objext)" -print` ; \
cd .. ; \
for file in $${files} ; do \
- cmp --ignore-initial=16 $$r/stage2-gcc/$$file $$r/stage3-gcc/$$file \
- > /dev/null 2>&1; \
+ f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
done ; \
if [ -f .bad_compare ]; then \
@@ -1536,139 +1500,186 @@ compare: all-stage3-gcc
else \
true; \
fi ; \
- $(STAMP) compare
+ $(STAMP) [+compare-target+][+ IF prev +]
+ @bootstrap_lean@-rm -rf stage[+prev+]-* ; $(STAMP) stage[+prev+]-lean[+ ENDIF prev +]
+[+ ENDIF compare-target +]
+
+[+ IF bootstrap-target +]
+.PHONY: [+bootstrap-target+]
+[+bootstrap-target+]: stage[+id+]-bubble [+compare-target+] all
+[+ ENDIF bootstrap-target +]
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+[+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
+.PHONY: distclean-stage[+id+]
+distclean-stage[+id+]::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage[+id+]-* [+
+ IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
+
+[+ IF cleanstrap-target +]
+.PHONY: [+cleanstrap-target+]
+[+cleanstrap-target+]: distclean [+bootstrap-target+]
+[+ ENDIF cleanstrap-target +]
+@endif gcc-bootstrap
+
+[+ ENDFOR bootstrap-stage +]
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ cd stageprofile-gcc && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+profiledbootstrap:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping the compiler"; \
+ $(MAKE) stageprofile-bubble distclean-stagefeedback
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
+ echo "Building feedback based compiler"; \
+ $(MAKE) stagefeedback-bubble stagefeedback-end
+@endif gcc-bootstrap
-.PHONY: new-bootstrap
-# This target exists so that everything can be made in one pass.
-# 'all-gcc' has to avoid stomping on the bootstrap-generated gcc for
-# this to work.
-new-bootstrap: compare
- mv stage3-gcc gcc ; \
- $(MAKE) all ; \
- mv gcc stage3-gcc
+@if gcc-bootstrap
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+do-distclean: distclean-stage1
+@endif gcc-bootstrap
# --------------------------------------
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+[+ FOR target_modules +]
+configure-target-[+module+]: maybe-all-gcc
+[+ ENDFOR target_modules +]
+
+[+ FOR lang_env_dependencies +]
+configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
+[+ IF cxx +]configure-target-[+module+]: maybe-all-target-libstdc++-v3
+[+ ENDIF cxx +][+ ENDFOR lang_env_dependencies +]
+
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
-all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
+[+ ;; These Scheme functions build the bulk of the dependencies.
+ ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
+ ;; where "maybe-" is only included if HARD is true, and all-gcc
+ ;; is taken from VAR-NAME.
+ (define dep-target (lambda (module-kind var-name hard)
+ (string-append
+ (if hard "" "maybe-")
+ (dep-subtarget var-name)
+ module-kind
+ (dep-module var-name)
+ )))
+
+ ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
+ (define make-dep (lambda (module-kind on-kind)
+ (string-append
+ (dep-target module-kind "module" #t) ": "
+ (dep-target on-kind "on" (exist? "hard")))))
+
+ ;; dep-subtarget extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
+ (define dep-subtarget (lambda (var-name)
+ (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-module extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
+ (define dep-module (lambda (var-name)
+ (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-stage builds a string for the prefix of a bootstrap stage.
+ (define dep-stage (lambda ()
+ (string-append
+ "stage"
+ (get "id")
+ "-")))
+
+ ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
+ ;; but is written in Scheme.
+ (define dep-maybe (lambda ()
+ (if (exist? "hard") "" "maybe-")))
+
+ ;; dep-kind returns "normal" is the dependency is on an "install" target,
+ ;; or if the LHS module is not bootstrapped. It returns "bootstrap" for
+ ;; configure or build dependencies between bootstrapped modules; it returns
+ ;; "prebootstrap" for configure or build dependencies of bootstrapped
+ ;; modules on a build module (e.g. all-gcc on all-build-bison). All this
+ ;; is only necessary for host modules.
+ (define dep-kind (lambda ()
+ (if (and (hash-ref boot-modules (dep-module "module"))
+ (=* (dep-module "on") "build-"))
+ "prebootstrap"
+
+ (if (or (= (dep-subtarget "on") "install-")
+ (=* (dep-module "on") "target-")
+ (not (hash-ref boot-modules (dep-module "module"))))
+ "normal"
+ "bootstrap"))))
+
+ ;; We now build the hash table that is used by dep-kind.
+ (define boot-modules (make-hash-table 113))
++]
+
+[+ FOR host_modules +][+
+ (if (exist? "bootstrap")
+ (hash-create-handle! boot-modules (get "module") #t))
+ "" +][+ ENDFOR host_modules +]
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
+[+ FOR dependencies +][+ (make-dep "" "") +]
+[+ CASE (dep-kind) +]
+[+ == "prebootstrap"
+ +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) "") +][+
+ ENDFOR bootstrap_stage +]
+all-prebootstrap: [+ (dep-target "" "on" (exist? "hard")) +]
+[+ == "bootstrap"
+ +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) (dep-stage)) +][+
+ ENDFOR bootstrap_stage +]
+[+ ESAC +][+
+ENDFOR dependencies +]
+
+# Non-toplevel bootstrap rules must depend on several packages, to be built
+# before gcc. Another wart that will go away, hopefully soon.
+@if gcc-no-bootstrap
+[+ FOR host_modules +][+
+ IF (and (not (= (get "module") "gcc"))
+ (hash-ref boot-modules (get "module"))) +]
+all-prebootstrap: maybe-all-[+module+][+
+ ENDIF +][+
+ENDFOR host_modules +]
+@endif gcc-no-bootstrap
+
GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-
-# Host modules specific to binutils.
-configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
-install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
-install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
-install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
-configure-tk: maybe-configure-tcl
-all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
-all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
-all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
-all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
-configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libada: $(ALL_GCC_C)
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
-all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
-all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
-all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
-
-# Dependencies of maybe-foo on foo. These are used because, for example,
-# all-gcc only depends on all-gas if gas is present and being configured.
-@maybe_dependencies@
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6f6b14c27df..eb179d9d1b5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,2459 @@
+2004-09-13 Paul Brook <paul@codesourcery.com>
+
+ * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
+ prototype.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
+ (elf32_arm_link_hash_table_create): Set target1_is_rel.
+ (bfd_elf32_arm_process_before_allocation): Ditto.
+ (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
+ (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
+ * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
+ * reloc.c: Ditto.
+
+2004-09-10 Joel Brobecker <brobecker@gnat.com>
+
+ * hpux-core.c (thread_section_p): New function.
+ (hpux_core_core_file_p): Fix computation of offset in call
+ to bfd_seek. Create a ".reg" section from an arbitrary
+ ".reg/<id>" section if none was created after having read
+ all sections.
+
+2004-09-11 Andreas Schwab <schwab@suse.de>
+
+ * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
+ * aclocal.m4: Rebuild.
+ * configure: Rebuild.
+
+2004-09-10 Joel Brobecker <brobecker@gnat.com>
+
+ * section.c (bfd_sections_find_if): Fix parameter name in
+ comment to match code.
+
+2004-09-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_except_relocs): Assign relocs
+ stored in a bfd section.
+
+2004-09-08 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
+ h->gotplt_refcount to 0, not -1.
+
+2004-09-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
+ case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
+ symname.
+ (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
+ handle symbol visibility here.
+
+2004-09-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
+ (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
+ callers.
+ (ppc_stub_name): Remove trailing "+0" on stub name.
+ (create_linkage_sections): Create relocations for
+ branch lookup table when --emit-relocs as well as when --shared.
+ (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
+ relbrlt test. For --emit-stub-syms, always output a sym even when
+ one already exists on a plt call stub. Put stub type in the stub
+ symbol name.
+ (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
+ test.
+ (ppc64_elf_size_stubs): Count global sym stubs added. Zero
+ reloc_count in stub sections. Adjust relbrlt test.
+ (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
+ * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
+ (elf_link_input_bfd): Ignore symbol index zero relocs when checking
+ for relocs against discarded symbols. Fix comments.
+
+2004-09-06 Mark Mitchell <mark@codesourcery.com>
+
+ * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
+ * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
+ from ...
+ (map_sections_to_segments): ... here. Use it. Assign a file
+ position to the .dynamic section if it is not loadable, but part
+ of the PT_DYNAMIC segment.
+ * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
+ offsets, not VMAs, for the BPABI. Do not fill in the header in
+ the .got.plt section for the BPABI.
+ * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
+ PT_DYNAMIC segment.
+ (elf_backend_want_got_plt): Define to zero for Symbian OS.
+
+2004-09-06 Nick Clifton <nickc@redhat.com>
+
+ * elflink.c (elf_link_add_object_symbols): Set the error code to
+ bfd_error_wrong_format when the input format does not match the
+ output format.
+
+2004-09-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (is_ppc64_target): New function, extracted from..
+ (ppc64_elf_check_directives): ..here.
+ (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
+ before accessing ppc64_elf_tdata.
+ (ppc64_elf_finish_dynamic_sections): And here too.
+
+2004-09-04 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (_bfd_default_error_handler): Correct loop exit.
+
+2004-09-03 Mark Mitchell <mark@codesourcery.com>
+
+ * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
+ * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
+ (bfd_elf32_littlearm_symbian_vec): Likewise.
+ * configure: Regenerated.
+ * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
+ * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
+ (PLT_ENTRY_SIZE): Likewise.
+ (bfd_vma_elf32_arm_symbian_plt_entry): New
+ variable.
+ (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
+ and symbian_p.
+ (create_got_section): Don't create sections when generating BPABI
+ objects.
+ (elf32_arm_create_dynamic_sections): Tidy.
+ (elf32_arm_link_hash_table_create): Set plt_header_size,
+ plt_entry_size, and symbian_p.
+ (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
+ generating BPABI objects.
+ (allocate_dynrelocs): Use htab->plt_header_size, not
+ PLT_HEADER_SIZE. Do not add to .got.plt when
+ generating BPABI objects.
+ (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
+ * elfarm-nabi.c: Add SymbianOS target vectors.
+ * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
+ (_bfd_elf_link_create_dynamic_sections): Likewise.
+ * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
+ (elfNN_bed): Use it.
+ * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
+ (bfd_elf32_littlearm_symbian_vec): Likewise.
+ (_bfd_target_vector): Add them.
+
+2004-09-03 Nick Clifton <nickc@redhat.com>
+
+ PR 360
+ * coffcode.h (handle_COMDAT): Replace abort with an warning
+ message and allow the scan to continue.
+
+2004-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
+ in when reading relocs, not our sorted syms. Remove unnecessary
+ var.
+
+2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
+
+2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
+ Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
+ replace uses of *_alias with *_noncanonical.
+ * aclocal.m4: Rebuild with aclocal 1.4p6.
+ * Makefile.in: Rebuild with automake 1.4p6.
+ * doc/Makefile.in: Rebuild with automake 1.4p6.
+ * configure.in: Autoupdate with autoupdate 2.59.
+ * config.in: Regenerate with autoheader 2.59.
+ * configure: Regnerate with autoconf 2.59.
+
+2004-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
+ symbol pointer arrays before modifying.
+
+2004-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
+ * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
+ * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
+ * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
+ * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
+ Use both symbol tables on non-relocatable objects. Use a common
+ error exit. Fix "mid" warning.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2004-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
+ object file.
+ (struct sfpr_def_parms): Save some space.
+ (sfpr_define): Here too.
+
+ * elf64-ppc.c (compare_symbols): Put section syms first.
+ (sym_exists_at): New function.
+ (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
+ points only for relocatable files. Use .opd section contents
+ otherwise. Generally clean up the code.
+
+2004-08-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
+ LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
+ (struct sfpr_def_parms): New.
+ (sfpr_define): New function.
+ (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
+ (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
+ (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
+ (savefpr1_tail, restfpr1_tail): New functions.
+ (savevr, savevr_tail, restvr, restvr_tail): New functions.
+ (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
+ (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
+ code. Define all ABI mandated _save and _rest functions.
+
+2004-08-26 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
+
+2004-08-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
+ TRUE or FALSE.
+
+2004-08-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
+ that pcrel correction is applied for R_386_PC32.
+
+2004-08-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_relocate_section): Zero section contents
+ for R_386_32 and R_386_PC32 relocs against symbols defined in
+ discarded sections.
+
+2004-08-25 Dmitry Diky <diwil@spec.ru>
+
+ * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
+ Add new relocations.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-msp430.c: Clean-up code.
+ (elf_msp430_howto_table): Add new relocation entries.
+ (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
+ (msp430_elf_relax_section): New function.
+ (msp430_elf_relax_delete_bytes): New function.
+ (msp430_elf_symbol_address_p): New function.
+
+2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * elf32-m32r.c (m32r_elf_relocate_section): Handle
+ R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
+
+2004-08-20 Daniel Jacobowitz <dan@debian.org>
+
+ * elflink.c (_bfd_elf_section_already_linked): Handle
+ SEC_LINK_DUPLICATES_SAME_CONTENTS.
+
+2004-08-19 Mark Mitchell <mark@codesourcery.com>
+
+ * config.bfd (arm*-*-symbianelf*): New target.
+ (arm*-*-eabi*): Likewise.
+
+2004-08-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
+ "struct ppc_link_hash_entry *".
+ (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
+ to satisfy RELOC_FOR_GLOBAL_SYMBOL.
+
+2004-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
+ entries (where fd_aux overlaps next entry's fd_func).
+ Add non_overlapping argument, use it.
+ (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
+ ppc64_elf_size_stubs, ppc64_elf_relocate_section,
+ ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
+ as indexes into opd_sym_map/opd_adjust array.
+ * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
+
+2004-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
+ if we can look up their function descriptor in a regular file.
+
+2004-08-18 Nick Clifton <nickc@redhat.com>
+
+ PR 324
+ * cofflink.c (coff_link_add_symbols): Check that the comdat
+ pointer in the coff_section_data structure has been initialised
+ before using it.
+
+2004-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ PR 338
+ * elflink.c (bfd_elf_record_link_assignment): Add comment about
+ changing bfd_link_hash_undefined to bfd_link_hash_new.
+
+2004-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
+ if not yet defined.
+ * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
+ (synthetic_opd, synthetic_relocatable): New variables.
+ (compare_symbols, compare_relocs): New helper routines.
+ (ppc64_elf_get_synthetic_symtab): New function.
+ * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
+ to relsyms.
+ * bfd-in2.h: Regenerated.
+ * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
+ to relsyms. Return 0 if abfd is relocatable.
+
+2004-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
+
+2004-08-17 Nick Clifton <nickc@redhat.com>
+
+ * (is_arm_mapping_symbol_name): New function - return true
+ when a symbol name matches the requirements for an ARM mapping
+ symbol name.
+ (arm_elf_find_function): New function based on
+ elf_find_function in elf.c but skipping ARM mapping symbols
+ and including thumb function symbols.
+ (elf32_arm_find_nearest_line): Use arm_elf_find_function.
+ (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
+
+2004-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
+ (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
+ (ppc64_elf_brtaken_reloc): Here too.
+
+2004-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
+ symbol visibility.
+ (ppc64_elf_check_directives): Check that we have the right hash
+ table before proceeding.
+
+2004-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
+ (adjust_opd_syms): Attach opd syms for deleted entries to one of
+ the sections that will be discarded.
+
+2004-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_section_complain_discarded): Ignore .fixup.
+
+2004-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
+ free space available.
+
+2004-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
+ occurrences with bfd_byte * thoughout file.
+
+ * coff-rs6000.c (do_shared_object_padding): Warning fix.
+ (xcoff_write_armap_big): Likewise.
+ (xcoff_write_archive_contents_old): Likewise.
+ (xcoff_write_archive_contents_big): Likewise.
+
+ * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
+
+2004-08-13 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.h: Convert to ISO C90.
+
+2004-08-13 Alan Modra <amodra@bigpond.net.au>
+
+ PR 293
+ * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
+ zero the plt field.
+
+2004-08-13 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (_bfd_default_error_handler): Handle %A and %B.
+ (bfd_archive_filename, bfd_get_section_ident): Delete.
+ * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
+ bfd_archive_filename.
+ * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
+ to warn about symbols in discarded sections. Use _bfd_error_handler.
+ * aout-adobe.c (aout_adobe_callback): See below.
+ * aout-cris.c (swap_ext_reloc_in): ..
+ * coff-arm.c (find_thumb_glue, find_arm_glue,
+ coff_arm_relocate_section, bfd_arm_process_before_allocation,
+ coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
+ coff_arm_copy_private_bfd_data): ..
+ * coff-i860.c (i860_reloc_processing): ..
+ * coff-mcore.c (mcore_coff_unsupported_reloc,
+ coff_mcore_relocate_section): ..
+ * coff-ppc.c (coff_ppc_relocate_section): ..
+ * coff-rs6000.c (xcoff_create_csect_from_smclas
+ * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
+ sh_swap_insns, sh_relocate_section): ..
+ * coff-tic54x.c (tic54x_reloc_processing): ..
+ * coff-tic80.c (coff_tic80_relocate_section): ..
+ * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
+ * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
+ coff_slurp_symbol_table, coff_classify_symbol,
+ coff_slurp_reloc_table): ..
+ * coffgen.c (_bfd_coff_read_string_table): ..
+ * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
+ _bfd_coff_generic_relocate_section): ..
+ * cpu-arm.c (bfd_arm_merge_machines): ..
+ * cpu-sh.c (sh_merge_bfd_arch): ..
+ * elf-hppa.h (elf_hppa_relocate_section): ..
+ * elf.c (bfd_elf_string_from_elf_section, setup_group,
+ _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
+ assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
+ copy_private_bfd_data, _bfd_elf_validate_reloc): ..
+ * elf32-arm.h (find_thumb_glue, find_arm_glue,
+ bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
+ elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
+ elf32_arm_relocate_section, elf32_arm_set_private_flags,
+ elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
+ * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
+ cris_elf_merge_private_bfd_data
+ * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
+ * elf32-gen.c (elf32_generic_link_add_symbols): ..
+ * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
+ elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
+ elf32_hppa_relocate_section): ..
+ * elf32-i370.c (i370_elf_merge_private_bfd_data,
+ i370_elf_check_relocs, i370_elf_relocate_section): ..
+ * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
+ elf_i386_relocate_section): ..
+ * elf32-m32r.c (m32r_elf_relocate_section,
+ m32r_elf_merge_private_bfd_data): ..
+ * elf32-m68hc1x.c (m68hc12_add_stub,
+ _bfd_m68hc11_elf_merge_private_bfd_data): ..
+ * elf32-m68k.c (elf_m68k_relocate_section): ..
+ * elf32-mcore.c (mcore_elf_unsupported_reloc,
+ mcore_elf_relocate_section): ..
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
+ ppc_elf_check_relocs, ppc_elf_relocate_section,
+ ppc_elf_begin_write_processing): ..
+ * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
+ elf_s390_relocate_section): ..
+ * elf32-sh-symbian.c (sh_symbian_import_as,
+ sh_symbian_process_embedded_commands,
+ sh_symbian_relocate_section): ..
+ * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
+ sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
+ sh_elf_merge_private_data): ..
+ * elf32-sparc.c (elf32_sparc_check_relocs,
+ elf32_sparc_relocate_section,
+ elf32_sparc_merge_private_bfd_data): ..
+ * elf32-v850.c (v850_elf_check_relocs,
+ v850_elf_merge_private_bfd_data): ..
+ * elf32-xtensa.c (elf_xtensa_check_relocs,
+ elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
+ * elf64-alpha.c (elf64_alpha_relax_with_lituse,
+ elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
+ elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
+ * elf64-gen.c (elf64_generic_link_add_symbols): ..
+ * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
+ ppc64_elf_check_relocs, ppc64_elf_edit_opd,
+ ppc64_elf_relocate_section): ..
+ * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
+ elf_s390_relocate_section): ..
+ * elf64-sh64.c (sh_elf64_relocate_section): ..
+ * elf64-sparc.c (sparc64_elf_check_relocs,
+ sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
+ sparc64_elf_merge_private_bfd_data): ..
+ * elf64-x86-64.c (elf64_x86_64_check_relocs,
+ elf64_x86_64_relocate_section): ..
+ * elflink.c (_bfd_elf_add_default_symbol,
+ _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
+ _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
+ bfd_elf_size_dynamic_sections, elf_link_output_extsym,
+ elf_get_linked_section_vma, elf_fixup_link_order,
+ bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
+ bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
+ * elfxx-ia64.c (elfNN_ia64_relax_section,
+ elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
+ * elfxx-mips.c (mips_elf_perform_relocation,
+ _bfd_mips_elf_check_relocs,
+ _bfd_mips_elf_merge_private_bfd_data): ..
+ * ieee.c (ieee_slurp_external_symbols): ..
+ * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
+ * libbfd.c (_bfd_generic_verify_endian_match): ..
+ * linker.c (_bfd_generic_link_add_one_symbol,
+ _bfd_generic_section_already_linked): ..
+ * pdp11.c (translate_to_native_sym_flags): ..
+ * pe-mips.c (coff_pe_mips_relocate_section): ..
+ * peicode.h (pe_ILF_build_a_bfd): ..
+ * srec.c (srec_bad_byte): ..
+ * stabs.c (_bfd_link_section_stabs): ..
+ * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
+ Replace all uses of bfd_archive_filename and bfd_get_section_ident
+ with corresponding %B and %A in _bfd_error_handler format string.
+ Replace occurrences of "fprintf (stderr," with _bfd_error_handler
+ calls to use %A and %B. Fix "against symbol .. from section" and
+ similar error messages. Combine multiple _bfd_error_handler calls
+ where they were separated due to bfd_archive_filename deficiencies.
+ * bfd-in2.h: Regenerate.
+
+2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
+ relocation.
+
+2004-08-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
+ (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
+ Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
+ Add twiddled_syms.
+ (link_hash_newfunc): Init was_undefined.
+ (add_symbol_adjust): Don't set undefined dot symbols to defweak;
+ Use undefweak instead.
+ (ppc64_elf_check_directives): Fix undefs chain.
+ (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
+ references.
+ (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
+ (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
+ * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
+
+2004-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
+ error, test input_section flags rather than sec.
+
+2004-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add
+ elf_backend_archive_symbol_lookup.
+ (_bfd_elf_archive_symbol_lookup): Declare.
+ * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
+ (elf_link_add_archive_symbols): ..extracted from here. Call the
+ backend version.
+ * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
+ (elfNN_bed): Init new field.
+ * elf64-ppc.c (elf_backend_check_directives): Define.
+ (elf_backend_archive_symbol_lookup): Define.
+ (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
+ a ppc_link_hash_entry pointer.
+ (get_fdh): Move.
+ (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
+ (add_symbol_adjust, ppc64_elf_check_directives): New functions.
+ (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
+ ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
+ ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
+ ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
+ ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
+ descriptor symbols.
+
+2004-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
+ (ppc64_elf_add_symbol_hook): Test for NULL section.
+ (get_sym_h): Formatting.
+ (ppc64_elf_size_stubs): Include reloc addend in value stored as
+ stub target_value.
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
+ long branch stubs with code handling plt and r2off branch stubs.
+
+2004-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (_bfd_elf_gc_mark): Declare.
+ * elflink.c (elf_link_input_bfd): Formatting.
+ (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
+ all callers.
+ * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
+ (link_hash_newfunc): Don't set it.
+ (ppc64_elf_copy_indirect_symbol): Nor copy it.
+ (ppc64_elf_mark_entry_syms): Delete.
+ (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
+ sections. Use get_opd_info.
+ * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
+
+2004-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (adjust_opd_syms): Fix merge error.
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
+ (func_desc_adjust): Don't set have_undefweak.
+ (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
+ (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
+
+ * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
+ "struct ppc_link_hash_entry *". Adjust all references.
+ (ppc64_elf_hide_symbol): Correct a comment.
+
+ * elf64-ppc.c (get_opd_info): New function.
+ (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
+ (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
+ before calling get_fdh. Test fdh rather than h before dereferencing
+ fdh. Mark removed symbols in opd_adjust.
+ (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
+ (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
+ opd symbols.
+ (ppc64_elf_output_symbol_hook): Likewise.
+
+2004-08-06 Paul Brook <paul@codesourcery.com>
+
+ * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
+ (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
+ BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
+ * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
+ and BFD_RELOC_ARM_SBREL32.
+ * bfd-in2.h, bbfd.h: Regenerate.
+
+2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
+ the dynamic link symbol actually in use.
+
+2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
+
+2004-07-31 Joel Brobecker <brobecker@gnat.com>
+ Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
+ SHN_MIPS_TEXT and SHN_MIPS_DATA.
+
+2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
+ Nick Clifton <nickc@redhat.com>
+
+ PR 290
+ * bfd.c (_bfd_default_error_handler): Make it global.
+
+ * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
+
+ * elf.c (assign_section_numbers): Cope gracefully with sections
+ which have SHF_LINK_ORDER set but no sh_link set up.
+ * elflink.c (elf_get_linked_section_vma): Likewise.
+
+ * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
+ it to NULL.
+
+ * elfxx-target.h (elf_backend_link_order_error_handler): New.
+ Set it to _bfd_default_error_handler.
+ (elfNN_bed): Add elf_backend_link_order_error_handler.
+
+ * libbfd-in.h (_bfd_default_error_handler): New.
+
+ * libbfd.h: Regenerated.
+
+2004-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ * archures.c (bfd_mach_sparc_64bit_p): Define.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
+ * bfd-in2.h: Rebuilt.
+
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * archures.c (bfd_mach_sh2a_nofpu): New.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (SH2A_NOFPU_NEXT): New.
+ (arch_info_struct): Add sh2a_nofpu.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
+ 2003-12-29 DJ Delorie <dj@redhat.com>
+ * reloc.c: Add relocs for sh2a.
+ * bfd-in2.h: Regenerate.
+ * libbfd.hh: Regenerate.
+ 2003-12-01 Michael Snyder <msnyder@redhat.com>
+ * archures.c (bfd_mach_sh2a): New.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
+ (SH2A_NEXT): New.
+ (arch_info_struct): Add sh2a.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
+
+2004-07-28 Nick Clifton <nickc@redhat.com>
+ John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR 273
+ * som.c (setup_sections): Improve estimation of space sizes in
+ relocatable objects.
+
+2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
+ * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
+ bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
+ to targ_selvecs.
+ * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
+ * configure: Regenerate.
+ * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
+ case that accepts OSABI=NetBSD and OSABI=SysV.
+ (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
+ the base of .got or .data (if .got does not exist).
+ (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
+ set OSABI=NetBSD.
+ (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
+ (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
+ * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
+ (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
+
+2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 161/251
+ * elf-bfd.h (bfd_elf_section_data): Add sec_group.
+ (elf_sec_group): Defined.
+ (bfd_elf_match_symbols_in_sections): New prototype.
+ (_bfd_elf_setup_group_pointers): Likewise.
+
+ * elf.c (bfd_elf_discard_group): Abort.
+ (bfd_elf_set_group_contents): Also include relocation sections.
+ Remove zero-fill for ld -r.
+ (_bfd_elf_setup_group_pointers): New function.
+ (elf_sort_elf_symbol): Likewise.
+ (elf_sym_name_compare): Likewise.
+ (bfd_elf_match_symbols_in_sections): Likewise.
+
+ * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
+
+ * elflink.c (match_group_member): New.
+ (elf_link_input_bfd): Check group member for discarded section.
+ (try_match_symbols_in_sections): New function.
+ (already_linked): Likewise.
+ (_bfd_elf_section_already_linked): Support mixing comdat group
+ and linkonce section.
+
+ * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
+ * linker.c (bfd_section_already_linked_table_traverse): New.
+
+ * libbfd.h: Regenerated.
+
+2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-crx.c: Support relocation/relaxation of
+ BFD_RELOC_CRX_SWITCH* types.
+
+2004-07-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Correct "Linker stubs" comment.
+
+2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
+ linked-to section.
+ (elf_linked_to_section): New.
+
+ * elf.c (assign_section_numbers): Set up sh_link for
+ SHF_LINK_ORDER.
+
+ * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
+ to sh_link for SHT_IA_64_UNWIND sections.
+
+2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_fixup_link_order): Add _() to error message.
+
+2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_fixup_link_order): Issue a warning and flag
+ an error if failed.
+
+2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * aout-adobe.c (aout_32_section_already_linked): Defined.
+ * aout-target.h (MY_section_already_linked): Likewise.
+ * aout-tic30.c (MY_section_already_linked): Likewise.
+ * binary.c (binary_section_already_linked): Likewise.
+ * bout.c (b_out_section_already_linked): Likewise.
+ * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
+ * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
+ * coffcode.h (coff_section_already_linked): Likewise.
+ * i386msdos.c (msdos_section_already_linked): Likewise.
+ * i386os9k.c (os9k_section_already_linked): Likewise.
+ * ieee.c (ieee_section_already_linked): Likewise.
+ * ihex.c (ihex_section_already_linked): Likewise.
+ * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
+ * mmo.c (mmo_section_already_linked): Likewise.
+ * nlm-target.h (nlm_section_already_linked): Likewise.
+ * oasys.c (oasys_section_already_linked): Likewise.
+ * pef.c (bfd_pef_section_already_linked): Likewise.
+ * ppcboot.c (ppcboot_section_already_linked): Likewise.
+ * som.c (som_bfd_discard_group): Likewise.
+ * srec.c (srec_section_already_linked): Likewise.
+ * tekhex.c (tekhex_section_already_linked): Likewise.
+ * versados.c (versados_section_already_linked): Likewise.
+ * vms.c (vms_section_already_linked): Likewise.
+ * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
+ * xsym.c (bfd_sym_section_already_linked): Likewise.
+
+ * bfd-in.h (bfd_section_already_linked_table_init): New.
+ (bfd_section_already_linked_table_free): Likewise.
+
+ * coff-rs6000.c (rs6000coff_vec): Add
+ _bfd_generic_section_already_linked.
+ (pmac_xcoff_vec): Likewise.
+ * coff64-rs6000.c (rs6000coff64_vec): Likewise.
+ (aix5coff64_vec): Likewise.
+
+ * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
+ * elflink.c (_bfd_elf_section_already_linked): New function.
+
+ * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
+
+ * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
+ (_bfd_generic_section_already_linked): New.
+ (bfd_section_already_linked_hash_entry): Likewise.
+ (bfd_section_already_linked): Likewise.
+ (bfd_section_already_linked_table_lookup): Likewise.
+ (bfd_section_already_linked_table_insert): Likewise.
+
+ * linker.c (bfd_section_already_linked): New.
+ (_bfd_section_already_linked_table): Likewise.
+ (bfd_section_already_linked_table_lookup): Likewise.
+ (bfd_section_already_linked_table_insert): Likewise.
+ (already_linked_newfunc): Likewise.
+ (bfd_section_already_linked_table_init): Likewise.
+ (bfd_section_already_linked_table_free): Likewise.
+ (_bfd_generic_section_already_linked): Likewise.
+
+ * section.c (bfd_section): Remove comdat.
+ (bfd_comdat_info): Moved to ...
+ * bfd-in.h (coff_comdat_info): Here.
+ (bfd_coff_get_comdat_section): New.
+ * coffgen.c (bfd_coff_get_comdat_section): Likewise.
+ * libcoff-in.h (coff_section_tdata): Add comdat.
+ * coffcode.h (handle_COMDAT): Updated.
+ * cofflink.c (coff_link_add_symbols): Likewise.
+ * ecoff.c (bfd_debug_section): Likewise.
+
+ * targets.c (bfd_target): Add _section_already_linked.
+ (BFD_JUMP_TABLE_LINK): Updated.
+
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Likewise.
+ * libcoff.h: Likewise.
+
+2003-07-21 Paul Brook <paul@codesourcery.com>
+
+ * elflink.c (elf_get_linked_section_vma, compare_link_order,
+ elf_fixup_link_order): New functions.
+ (bfd_elf_final_link): Call elf_fixup_link_order.
+
+2004-07-21 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-bfd.h (ELF_COMMON_DEF_P): New.
+ * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
+ common definitions.
+ * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
+ _bfd_elf_symbol_refs_local_p.
+ * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
+ symbols.
+
+2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
+ DYN_NO_NEEDED.
+ (bfd_elf_get_dyn_lib_class): New prototype.
+ * elf.c (bfd_elf_get_dyn_lib_class): New function.
+
+ * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
+ DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
+ entry is needed. Issue an error if a DT_NEEDED entry is needed
+ for a file marked DYN_NO_NEEDED.
+ (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
+ for DT_NEEDED tags.
+
+ * bfd-in2.h: Regenerated.
+
+2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * elflink.c (elf_section_complain_discarded): Don't complain in
+ .PARISC.unwind.
+
+2004-07-10 James E Wilson <wilson@specifixinc.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
+ (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
+ (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
+ elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
+ Fix callers.
+ (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
+ bfd_put_64 to bfd_putl64.
+ (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
+
+2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 240
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
+ .init/.fini sections when trying to relax it.
+
+2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
+
+ * elf.c (assign_file_positions_for_segments): Make sure the
+ .dynamic section is the first section in the PT_DYNAMIC segment.
+
+2004-07-09 Nick Clifton <nickc@redhat.com>
+
+ * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
+ * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
+ sh_elf_get_flags_from_mach functions so that they do not conflict
+ when this target is built with other sh-elf targets.
+ * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
+ suppression of this function.
+ (sh_elf_find_flags): Likewise.
+
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
+ (ALL_MACHINES_CFILES): Add cpu-crx.c.
+ (BFD32_BACKENDS): Add elf32-crx.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
+ (cpu-crx.lo): New target.
+ (elf32-crx.lo): New target.
+ * Makefile.in: Regenerate.
+ * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
+ (bfd_archures_list): Add bfd_crx_arch.
+ * bfd-in2.h: Regenerate.
+ * config.bfd: Handle crx-*-elf*, crx*.
+ * configure.in: Handle bfd_elf32_crx_vec.
+ * configure: Regenerate.
+ * cpu-crx.c: New file.
+ * elf32-crx.c: Likewise.
+ * libbfd.h: Regenerate.
+ * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
+ BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
+ BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
+ BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
+ BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
+ BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
+ * targets.c (bfd_elf32_crx_vec): Declare.
+ (bfd_target_vector): Add bfd_elf32_crx_vec.
+
+2004-07-06 Nick Clifton <nickc@redhat.com>
+
+ * config.bfd: Add sh-symbian-elf target.
+ * configure.in: Add bfd_elf32_shl_symbian_vec.
+ * configure: Regenerate.
+ * elf-bfd.h (struct elf_backend_data): Add new field
+ 'check_directives'.
+ * elflink.c (elf_link_add_object_symbols): Invoke the
+ check_directives function, if defined.
+ * elfxx-target.h: Provide a default, NULL definition for
+ check_directives.
+ * targets.c: Add bfd_elf32_shl_symbian_vec.
+ * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
+ definition.
+ (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
+ * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
+ (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
+ not already been defined.
+ * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
+ * sh-symbian.c: New file. Provide functions to support the
+ * sh-symbian-elf target.
+ * Makefile.am: Add elf32-sh-symbian.c
+ * Makefile.in: Regenerate.
+
+2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * elf32-sh.c: Include ../opcodes/sh-opc.h.
+ * Makefile.am: Ran make dep-am.
+ * Makefile.in: Ran make dep-in.
+
+2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
+ externals properly.
+
+2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config.bfd: Add want64 to configuration target s390-*-linux*.
+
+2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd.c (bfd_get_section_ident): New.
+
+ * elflink.c (elf_link_read_relocs_from_section): Call
+ bfd_get_section_ident to identify the section when reporting
+ error.
+ (_bfd_elf_link_output_relocs): Likewise.
+ (elf_link_output_extsym): Likewise.
+ (elf_link_input_bfd): Likewise.
+ (bfd_elf_gc_record_vtinherit): Likewise.
+
+ * bfd-in2.h: Regenerated.
+
+2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
+ Nick Clifton <nickc@redhat.com>
+
+ PR 204
+ * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
+ of section symbols to mips_elf_sort_hash_table ().
+
+2004-07-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_section_ignore_discarded_relocs): Revert last
+ change. Comment.
+ (elf_section_complain_discarded): New function. Handle
+ .gcc_except_table too.
+ (elf_link_input_bfd): Rewrite handling of relocs against symbols
+ in discarded sections.
+ * elf-bfd.h (elf_discarded_section): Protect macro arg.
+
+2004-06-30 James E Wilson <wilson@specifixinc.com>
+
+ * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
+ to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
+
+2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 233
+ * elflink.c (elf_link_input_bfd): Issue an error for non-debug
+ local references to discarded sections and report their
+ locations.
+
+2004-06-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_section_ignore_discarded_relocs): Don't test
+ sec_info_type, test section name instead.
+
+2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 240
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
+ in .init/.fini sections.
+
+2004-06-29 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Use
+ bfd_get_section_limit.
+
+2004-06-29 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
+ output section size.
+
+2004-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
+ rawsize.
+ (mmix_elf_perform_relocation): Adjust for above change.
+ (mmix_elf_relocate_section): Likewise.
+ (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
+ (mmix_elf_get_section_contents): Delete.
+ (bfd_elf64_get_section_contents): Delete.
+ (mmix_elf_relocate_section): Zero stub area.
+ * linker.c (default_indirect_link_order): Alloc max of section size
+ and rawsize.
+ * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
+ * section.c (bfd_malloc_and_get_section): Likewise.
+ (struct bfd_section): Update rawsize comment.
+ * bfd-in2.h: Regenerate.
+
+ * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
+
+2004-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h (bfd_get_section_limit): Define.
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation)
+ (_bfd_final_link_relocate): Use bfd_get_section_limit.
+ * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
+ * coff-arm.c (coff_arm_relocate_section): Likewise.
+ * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
+ * cpu-ns32k.c (do_ns32k_reloc): Likewise.
+ (bfd_ns32k_final_link_relocate): Likewise.
+ * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
+ * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
+ * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
+ (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
+ * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
+ (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
+ * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
+ * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
+ * elf32-or32.c (or32_elf_consth_reloc): Likewise.
+ * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
+ * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
+ * elf32-sh.c (sh_elf_reloc_loop): Likewise.
+ * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
+ (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
+ * elf32-v850.c (v850_elf_reloc): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
+ * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
+ * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
+ * elf64-mips.c (mips_elf64_gprel32_reloc)
+ (mips16_gprel_reloc): Likewise.
+ * elf64-mmix.c (mmix_elf_reloc): Likewise.
+ * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
+ * elf64-sparc.c (init_insn_reloc): Likewise.
+ * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
+ (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
+ (_bfd_mips_elf_generic_reloc): Likewise.
+ * bfd-in2.h: Regenerate.
+
+2004-06-28 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h (struct stab_info): Move from stabs.c.
+ * stabs.c (struct stab_link_includes_table): Delete.
+ (stab_link_includes_lookup): Delete.
+ (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
+ level of indirection from sinfo parm.
+ (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
+ stabstr section. Adjust hash table accesses.
+ * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
+ alloc. Adjust stab_info test.
+ * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
+ (_bfd_coff_final_link): Adjust stab_info test.
+ (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
+ * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
+ in place.
+ * libcoff-in.h (struct coff_link_hash_table): Likewise.
+ * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
+ * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
+ stabstr section. Adjust stab_info test.
+ * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
+ (_bfd_write_stab_strings): Adjust prototypes.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ From Miod Vallat <miod@online.fr>:
+ * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
+
+2004-06-26 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
+ (struct elf32_mn10300_link_hash_entry): Remove
+ pcrel_relocs_copied.
+ (mn10300_elf_check_relocs): Only reserve dynamic relocations for
+ R_MN10300_32. Don't adjust pcrel_relocs_copied.
+ (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
+ and gotoff relocations if the symbol doesn't bind locally. Use
+ _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
+ relocation for PCREL32.
+ (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
+ to test whether a symbol binds locally.
+ (elf32_mn10300_link_hash_newfunc): Don't initialize
+ pcrel_relocs_copied.
+ (_bfd_mn10300_elf_discard_copies): Delete.
+ (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
+
+2004-06-26 Mark Kettenis <kettenis@gnu.org>
+
+ * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
+
+2004-06-25 Joel Brobecker <brobecker@gnat.com>
+
+ * som.c (som_set_reloc_info): Correct small typo.
+
+2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
+ (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
+ (m32r_elf_gcsweep_hook): Likewise.
+ (m32r_elf_check_relocs): Likewise.
+ (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
+ R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
+ * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
+ BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Regenerated.
+
+2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
+ relocation symbol.
+ (elf64_x86_64_relocate_section): Issue an error for
+ R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
+ against global symbols when building shared library.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (struct sec): Rename "_cooked_size" to "size".
+ Rename "_raw_size" to "rawsize".
+ (STD_SECTION): Adjust comments.
+ (bfd_set_section_size, bfd_get_section_contents): Use size.
+ (bfd_malloc_and_get_section): New function.
+ * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
+ * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
+ Correctly free reloc and contents memory.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
+ and fake CIE now that we can shink section size to zero.
+ (_bfd_elf_write_section_eh_frame): Likewise..
+ * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
+ * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
+ _bfd_stab_section_offset. Use _bfd_elf_section_offset.
+ * stabs.c (_bfd_stab_section_offset_): Remove unused args and
+ unneeded indirection.
+ * elf.c (_bfd_elf_section_offset): .. and update call.
+ * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+ Replace occurrences of "_raw_size" and "_cooked_size" in most places
+ with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
+ sections. Use "rawsize", if non-zero, for bfd_get_section_contents
+ calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
+ Similarly use "rawsize", if non-zero, in reloc functions to validate
+ reloc addresses. Use new bfd_malloc_and_get_section in most places
+ where bfd_get_section_contents was called. Expand all occurrences of
+ bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
+ grok_prstatus and similar functions to "size".
+ * aix386-core.c (aix386_core_file_p): ..
+ * aix5ppc-core.c (xcoff64_core_p): ..
+ * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
+ aout_adobe_set_section_contents): ..
+ * aout-target.h (callback): ..
+ * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
+ MY_bfd_final_link): ..
+ * aoutf1.h (sunos4_core_file_p): ..
+ * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
+ adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
+ final_link, aout_link_input_section): ..
+ * binary.c (binary_object_p, binary_canonicalize_symtab,
+ binary_set_section_contents): ..
+ * bout.c (b_out_callback, b_out_write_object_contents,
+ b_out_set_section_contents, b_out_bfd_relax_section,
+ b_out_bfd_get_relocated_section_contents): ..
+ * cisco-core.c (cisco_core_file_validate): ..
+ * coff-alpha.c (alpha_ecoff_object_p,
+ alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
+ * coff-arm.c (coff_arm_relocate_section,
+ bfd_arm_allocate_interworking_sections): ..
+ * coff-h8300.c (h8300_reloc16_extra_cases,
+ h8300_bfd_link_add_symbols): ..
+ * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
+ * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
+ ppc_bfd_coff_final_link): ..
+ * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
+ * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
+ sh_align_loads, sh_coff_get_relocated_section_contents): ..
+ * coff64-rs6000.c (xcoff64_write_object_contents,
+ xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
+ * coffcode.h (coff_compute_section_file_positions,
+ coff_write_object_contents): ..
+ * coffgen.c (make_a_section_from_file, coff_write_symbols,
+ coff_section_symbol, build_debug_section): ..
+ * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
+ process_embedded_commands, _bfd_coff_link_input_bfd,
+ _bfd_coff_write_global_sym): ..
+ * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
+ * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
+ * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
+ * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
+ _bfd_dwarf2_find_nearest_line): ..
+ * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
+ ecoff_compute_section_file_positions,
+ _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
+ _bfd_elf_discard_section_eh_frame_hdr,
+ _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
+ _bfd_elf_write_section_eh_frame,
+ _bfd_elf_write_section_eh_frame_hdr): ..
+ * elf-hppa.h (elf_hppa_sort_unwind): ..
+ * elf-m10200.c (mn10200_elf_relax_section,
+ mn10200_elf_relax_delete_bytes,
+ mn10200_elf_get_relocated_section_contents): ..
+ * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
+ mn10300_elf_check_relocs, mn10300_elf_relax_section,
+ mn10300_elf_relax_delete_bytes,
+ mn10300_elf_get_relocated_section_contents,
+ _bfd_mn10300_elf_adjust_dynamic_symbol,
+ _bfd_mn10300_elf_discard_copies,
+ _bfd_mn10300_elf_size_dynamic_sections,
+ _bfd_mn10300_elf_finish_dynamic_sections): ..
+ * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
+ _bfd_elf_make_section_from_phdr, elf_fake_sections,
+ bfd_elf_set_group_contents, map_sections_to_segments,
+ elf_sort_sections, assign_file_positions_for_segments,
+ SECTION_SIZE, copy_private_bfd_data,
+ _bfd_elf_get_dynamic_reloc_upper_bound,
+ _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
+ _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
+ elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
+ elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
+ _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
+ * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
+ bfd_elf32_arm_process_before_allocation,
+ elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
+ elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
+ elf32_arm_write_section): ..
+ * elf32-cris.c (cris_elf_grok_prstatus,
+ elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
+ elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
+ cris_elf_check_relocs, elf_cris_size_dynamic_sections,
+ elf_cris_discard_excess_dso_dynamics,
+ elf_cris_discard_excess_program_dynamics): ..
+ * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
+ * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
+ * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
+ _frv_create_got_section, _frvfdpic_assign_plt_entries,
+ elf32_frvfdpic_size_dynamic_sections,
+ elf32_frvfdpic_modify_segment_map,
+ elf32_frvfdpic_finish_dynamic_sections): ..
+ * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
+ elf32_h8_get_relocated_section_contents): ..
+ * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
+ elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
+ allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
+ elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
+ elf32_hppa_finish_dynamic_sections): ..
+ * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
+ i370_elf_size_dynamic_sections, i370_elf_check_relocs,
+ i370_elf_finish_dynamic_sections): ..
+ * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
+ allocate_dynrelocs, elf_i386_size_dynamic_sections,
+ elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
+ * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
+ i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
+ * elf32-ip2k.c (ip2k_is_switch_table_128,
+ ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
+ ip2k_relax_switch_table_256, ip2k_elf_relax_section,
+ adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
+ * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
+ m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
+ allocate_dynrelocs, m32r_elf_size_dynamic_sections,
+ m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
+ m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
+ m32r_elf_get_relocated_section_contents): ..
+ * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
+ m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
+ m68hc11_elf_relax_delete_bytes): ..
+ * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
+ m68hc12_elf_size_one_stub): ..
+ * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
+ elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
+ * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
+ elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
+ elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
+ * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
+ elf32_mips_grok_prstatus): ..
+ * elf32-or32.c (or32_elf_consth_reloc): ..
+ * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
+ elf_create_pointer_linker_section, ppc_elf_create_linker_section,
+ ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
+ allocate_dynrelocs, ppc_elf_size_dynamic_sections,
+ ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
+ ppc_elf_final_write_processing): ..
+ * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
+ allocate_dynrelocs, elf_s390_size_dynamic_sections,
+ elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
+ * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
+ sh_elf_relax_delete_bytes, sh_elf_align_loads,
+ sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
+ sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
+ sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
+ * elf32-sh64-com.c (sh64_address_in_cranges,
+ sh64_get_contents_type): ..
+ * elf32-sh64.c (sh64_find_section_for_address,
+ sh64_elf_final_write_processing): ..
+ * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
+ sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
+ allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
+ elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
+ * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
+ * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
+ elf_vax_size_dynamic_sections, elf_vax_discard_copies,
+ elf_vax_instantiate_got_entries, elf_vax_relocate_section,
+ elf_vax_finish_dynamic_sections): ..
+ * elf32-xstormy16.c (xstormy16_elf_24_reloc,
+ xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
+ xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
+ xstormy16_elf_finish_dynamic_sections): ..
+ * elf32-xtensa.c (xtensa_read_table_entries,
+ elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
+ elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
+ bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
+ elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
+ elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
+ get_relocation_opcode, retrieve_contents, find_relaxable_sections,
+ collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
+ relax_section, shrink_dynamic_reloc_sections, relax_property_section,
+ xtensa_callback_required_dependence): ..
+ * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
+ elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
+ elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
+ elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
+ elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
+ elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
+ elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
+ elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
+ * elf64-hppa.c (allocate_dynrel_entries,
+ elf64_hppa_size_dynamic_sections,
+ elf64_hppa_finish_dynamic_sections): ..
+ * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
+ mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
+ elf64_mips_grok_prstatus): ..
+ * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
+ mmix_elf_relocate_section, mmix_elf_final_link,
+ mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
+ mmix_elf_relax_section, mmix_elf_get_section_contents): ..
+ * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
+ ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
+ ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
+ allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
+ ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
+ toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
+ ppc64_elf_build_stubs, ppc64_elf_relocate_section,
+ ppc64_elf_finish_dynamic_sections): ..
+ * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
+ allocate_dynrelocs, elf_s390_size_dynamic_sections,
+ elf_s390_finish_dynamic_sections): ..
+ * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
+ sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
+ sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
+ sh64_elf64_finish_dynamic_sections): ..
+ * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
+ sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
+ sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
+ sparc64_elf_finish_dynamic_symbol,
+ sparc64_elf_finish_dynamic_sections): ..
+ * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
+ elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
+ elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
+ elf64_x86_64_finish_dynamic_sections): ..
+ * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
+ * elfcode.h (elf_slurp_reloc_table): ..
+ * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
+ elf_finalize_dynstr, elf_link_add_object_symbols,
+ bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
+ elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
+ * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
+ elf32_mips_grok_prstatus): ..
+ * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
+ elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
+ elfNN_ia64_choose_gp, elfNN_ia64_final_link,
+ elfNN_ia64_finish_dynamic_sections): ..
+ * elfxx-mips.c (mips_elf_create_procedure_table,
+ mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
+ _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
+ mips_elf_global_got_index, mips_elf_multi_got,
+ mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
+ mips_elf_allocate_dynamic_relocations,
+ mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
+ _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
+ _bfd_mips_elf_always_size_sections,
+ _bfd_mips_elf_size_dynamic_sections,
+ _bfd_mips_elf_finish_dynamic_symbol,
+ _bfd_mips_elf_finish_dynamic_sections,
+ _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
+ _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
+ _bfd_elf_mips_get_relocated_section_contents,
+ _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
+ * hp300hpux.c (callback): ..
+ * hppabsd-core.c (make_bfd_asection): ..
+ * hpux-core.c (make_bfd_asection): ..
+ * i386linux.c (linux_link_create_dynamic_sections,
+ bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
+ * i386msdos.c (msdos_write_object_contents): ..
+ * i386os9k.c (os9k_callback, os9k_write_object_contents,
+ os9k_set_section_contents): ..
+ * ieee.c (parse_expression, ieee_slurp_external_symbols,
+ ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
+ ieee_write_section_part, do_with_relocs, do_as_repeat,
+ do_without_relocs, ieee_write_debug_part, init_for_output,
+ ieee_set_section_contents): ..
+ * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
+ * irix-core.c (do_sections, make_bfd_asection): ..
+ * libaout.h (aout_section_merge_with_text_p): ..
+ * libbfd.c (_bfd_generic_get_section_contents,
+ _bfd_generic_get_section_contents_in_window): ..
+ * linker.c (default_indirect_link_order): ..
+ * lynx-core.c (make_bfd_asection): ..
+ * m68klinux.c (linux_link_create_dynamic_sections,
+ bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
+ * mach-o.c (bfd_mach_o_make_bfd_section,
+ bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
+ bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
+ bfd_mach_o_scan_read_segment): ..
+ * merge.c (_bfd_add_merge_section, record_section, merge_strings,
+ _bfd_merge_sections): ..
+ * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
+ mmo_map_set_sizes, mmo_canonicalize_symtab,
+ mmo_internal_write_section, mmo_write_object_contents): ..
+ * netbsd-core.c (netbsd_core_file_p): ..
+ * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
+ nlm_alpha_set_public_section): ..
+ * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
+ * nlm32-sparc.c (nlm_sparc_write_import): ..
+ * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
+ nlm_compute_section_file_positions): ..
+ * oasys.c (oasys_object_p, oasys_slurp_section_data,
+ oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
+ * opncls.c (get_debug_link_info): ..
+ * osf-core.c (make_bfd_asection): ..
+ * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
+ adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
+ final_link, aout_link_input_section): ..
+ * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
+ pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
+ * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
+ bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
+ * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
+ * ptrace-core.c (ptrace_unix_core_file_p): ..
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation,
+ _bfd_final_link_relocate, bfd_generic_relax_section,
+ bfd_generic_get_relocated_section_contents): ..
+ * reloc16.c (bfd_coff_reloc16_relax_section,
+ bfd_coff_reloc16_get_relocated_section_c): ..
+ * riscix.c (riscix_some_aout_object_p): ..
+ * rs6000-core.c (read_hdr, make_bfd_asection): ..
+ * sco5-core.c (make_bfd_asection): ..
+ * simple.c (bfd_simple_get_relocated_section_contents): ..
+ * som.c (som_object_setup, setup_sections, som_prep_headers,
+ som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
+ som_set_reloc_info, som_get_section_contents,
+ som_bfd_link_split_section): ..
+ * sparclinux.c (linux_link_create_dynamic_sections,
+ bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
+ * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
+ * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
+ _bfd_write_stab_strings, _bfd_stab_section_offset): ..
+ * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
+ bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
+ sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
+ sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
+ sunos_finish_dynamic_link): ..
+ * syms.c (_bfd_stab_section_find_nearest_line): ..
+ * tekhex.c (first_phase, tekhex_set_section_contents,
+ tekhex_write_object_contents): ..
+ * trad-core.c (trad_unix_core_file_p): ..
+ * versados.c (process_esd, process_otr, process_otr): ..
+ * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
+ * vms-misc.c (add_new_contents): ..
+ * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
+ * vms.c (vms_set_section_contents): ..
+ * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
+ xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
+ _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
+ * xsym.c (bfd_sym_scan): .. See above.
+
+2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
+ calling _bfd_merged_section_offset only for section symbols.
+
+2004-06-22 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
+ for handling SEC_MERGE symbols in relax_section.
+
+2004-06-21 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
+ * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
+ linked together. Mark the result as h8300sx code.
+
+2004-06-21 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data): Added
+ elf_backend_omit_section_dynsym.
+ (_bfd_elf_link_omit_section_dynsym): Declare.
+ * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
+ (elf_backend_omit_section_dynsym): Use it for frvfdpic.
+ * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
+ (_bfd_elf_link_renumber_dynsyms): ... this function.
+ * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
+ _bfd_elf_link_omit_section_dynsym).
+ (elfNN_bed): Added elf_backend_omit_section_dynsym.
+
+2004-06-21 Nick Clifton <nickc@redhat.com>
+
+ * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
+ flags.
+
+2004-06-17 Jerome Guitton <guitton@gnat.com>
+
+ * bfd-in.h (bfd_cache_close_all): New function declaration.
+ * bfd-in2.h: Regenerate.
+ * cache.c (bfd_cache_close_all): New function definition.
+
+2004-06-16 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
+ 4.10 and beyond.
+ * configure: Regenerate.
+
+2004-06-16 Daniel Jacobowitz <dan@debian.org>
+
+ * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
+ the pre-existing section.
+
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (struct sec): Remove usused flags. Reorganize a little.
+ (bfd_get_section_size_before_reloc): Delete.
+ (bfd_get_section_size_after_reloc): Delete.
+ (STD_SECTION): Update.
+ (bfd_get_section_size_now): Delete.
+ (bfd_set_section_contents): Don't referece reloc_done.
+ (bfd_get_section_contents): Remove reloc_done comment.
+ * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
+ reloc_done.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
+ * ecoff.c (bfd_debug_section): Update initializer.
+ * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
+ * bfd-in.h (bfd_section_size): Expand.
+ (bfd_get_section_size): New macro.
+ * bfd-in2.h: Regenerate.
+ * coff64-rs6000.c (xcoff64_write_object_contents): Replace
+ bfd_get_section_size_before_reloc with bfd_get_section_size.
+ * coffcode.h (coff_write_object_contents): Likewise.
+ * coffgen.c (build_debug_section): Likewise.
+ * dwarf1.c (parse_line_table): Likewise.
+ (_bfd_dwarf1_find_nearest_line): Likewise.
+ * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
+ * i386msdos.c (msdos_write_object_contents): Likewise.
+ * pdp11.c (squirt_out_relocs): Likewise.
+ * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
+ * elf64-mmix.c (mmix_elf_final_link): Update comment.
+
+2004-06-14 Chris Demetriou <cgd@broadcom.com>
+
+ * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
+ removal) with updated comment.
+ (bfd_elf32_bfd_reloc_type_lookup): Add back case for
+ BFD_RELOC_32_PCREL.
+ (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+2004-06-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
+ overflow on branches to undefweaks.
+
+2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
+ as ecoff_section_data() does not return a valid lvalue.
+
+2004-06-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * elflink.c (elf_sort_symbol): Compare section id, not pointers.
+ (elf_link_add_object_symbols): Likewise.
+
+ * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
+ (elf_backend_reloc_type_class): New.
+
+2004-06-08 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
+ netbsd-core.lo.
+ * configure: Regenerate.
+
+2004-06-07 Daniel Jacobowitz <dan@debian.org>
+
+ From: Albert Chin-A-Young <china@thewrittenword.com>
+ * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
+ to unsigned int.
+
+2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
+ change.
+
+2004-05-28 DJ Delorie <dj@redhat.com>
+
+ * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
+ for linking, but otherwise adjust reloc for merged sections.
+
+2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
+ _bfd_merged_section_offset for local symbols.
+
+2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * archures.c: Add bfd_mach_sh3_nommu .
+ * bfd-in2.h: Regenerate.
+ * cpu-sh.c: Add sh3-nommu architecture.
+ (bfd_to_arch_table): Create new table.
+ (sh_get_arch_from_bfd_mach): Create new function.
+ (sh_get_arch_up_from_bfd_mach): Create new function.
+ (sh_merge_bfd_arch): Create new function.
+ * elf32-sh.c (sh_ef_bfd_table): Add table.
+ (sh_elf_check_relocs): Replace switch statement with
+ use of sh_ef_bfd_table .
+ (sh_elf_get_flags_from_mach): Add new function.
+ (sh_find_elf_flags): Likewise.
+ (sh_elf_copy_private_data): Replace most of non-elf contents
+ with a call to sh_merge_bfd_arch() .
+
+2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
+
+ * Makefile.am (bfdver.h): Use explicit filename, not $< .
+ * Makefile.in: Regenerate.
+
+2004-05-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
+ custom calling conventions for dynamic symbols.
+ (mn10300_elf_relax_section): Avoid relaxing a function as a local
+ symbol if it's an alias to a global one.
+
+2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
+ change.
+
+2004-05-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
+ loop over hashes.
+
+2004-05-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
+ for SHT_GROUP sections.
+
+2004-05-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_link_add_object_symbols): Don't set up merge
+ section data here..
+ * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
+ * merge.c: Formatting. Remove unnecessary casts. Expand
+ bfd_get_section_alignment macro.
+ (struct sec_merge_sec_info): Rename "first" to "first_str". Update
+ use throughout file.
+ (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
+ comment. Abort on dynamic or non-SEC_MERGE input. Don't test
+ section name to determine sinfo group, instead test output section
+ and alignment.
+ (_bfd_merge_sections): Add struct bfd_link_info param. Call
+ _bfd_strip_section_from_output rather than just twiddling flags.
+ * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
+ (_bfd_merge_sections): Update prototype.
+ * libbfd.h: Regenerate.
+
+2004-05-24 Mark Kettenis <kettenis@gnu.org>
+
+ * netbsd-core.c: Correctly indent section that sets architecture
+ from machine ID.
+
+ From Miod Vallat <miod@online.fr>:
+ * m88kopenbsd.c: New file.
+ * targets.c (m88k_openbsd_vec): New.
+ * config.bfd: Add m88k-*-openbsd*.
+ * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
+ (m88kopenbsd_vec): New.
+ * configure: Regenerate.
+ * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
+ (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2004-05-24 Nick Clifton <nickc@redhat.com>
+
+ * hash.c: Remove bogus node "Changing the default Hash Table Size"
+ introduced by hash table size patch.
+
+2004-05-22 Ben Elliston <bje@au.ibm.com>
+
+ * configure.in (is_release): Remove.
+ (bfd_version_date, bfd_version, bfd_version_string): Likewise.
+ (AC_OUTPUT): Don't output bfdver.h from version.h.
+ * configure: Regenerate.
+ * Makefile.am (RELEASE): New variable.
+ (bfdver.h): New target.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Likewise.
+
+2004-05-22 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.am (config.status): Don't depend on version.h.
+ * Makefile.in: Regenerate.
+
+2004-05-22 Alan Modra <amodra@bigpond.net.au>
+
+ * merge.c (_bfd_merged_section_offset): Remove "addend" param.
+ * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
+ * libbfd.h: Regenerate.
+ * elf.c (_bfd_elf_rela_local_sym): Adjust call.
+ (_bfd_elf_rel_local_sym): Likewise.
+ * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
+ (elf_link_input_bfd): Likewise.
+ * elf32-ppc.c (ppc_elf_relax_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+ (elfNN_ia64_relocate_section): Likewise.
+
+2004-05-21 Andy Chittenden <achittenden@bluearc.com>
+
+ * hash.c (bfd_default_hash_table_size): New variable.
+ (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
+ (bfd_hash_set_default_size): New function. Set the default size
+ to a selected prime number close to the argument. Document new
+ function.
+ * bfd-in.h: Add prototype for bfd_hash_set_default_size.
+ * bfd-in2.h: Regenerate.
+ * Makefile.am (hash.lo): Add dependency upon libiberty.h.
+ * Makefile.in: Regenerate.
+
+2004-05-21 Mark Kettenis <kettenis@gnu.org>
+
+ * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
+ * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
+ arm, m68k, m88k and hppa core files.
+
+2004-05-21 Nick Clifton <nickc@redhat.com>
+
+ * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
+ (bfd_bwrite): Likewise.
+ (bfd_tell): Likewise.
+ (bfd_flush): Likewise.
+ (bfd_stat): Likewise.
+ (bfd_seek): Likewise.
+ (bfd_get_mtime): Likewise.
+ (bfd_get_size): Likewise.
+
+2004-05-19 Ben Elliston <bje@au.ibm.com>
+
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
+
+2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
+
+ * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
+ (bfd_generic_openr_next_archived_file): Likewise.
+
+2004-05-17 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
+ section names by inserting a new substring after .gnu.linkonce, except
+ for .gnu.linkonce.t.* where the "t." is replaced.
+
+2004-05-17 Adam Nemet <anemet@lnxw.com>
+
+ * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
+ (m68-*-lynxos* case): Likewise.
+ (powerpc-*-lyxnos* case): New case.
+ (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
+
+2004-05-17 David Heine <dlheine@tensilica.com>
+
+ * aout-target.h (MY_bfd_copy_private_header_data): Define.
+ * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
+ * bfd.c (bfd_copy_private_header_data): Define.
+ * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
+ interface.
+ * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
+ * coffcode.h (coff_bfd_copy_private_header_data): Define.
+ * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
+ * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
+ segments by calling copy_private_bfd_data.
+ (_bfd_elf_copy_private_header_data): Define.
+ * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
+ * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
+ * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
+ * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
+ * mmo.c (mmo_bfd_copy_private_header_data): Define.
+ * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
+ * som.c (som_bfd_copy_private_header_data): Define.
+ * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
+ * vms.c (vms_bfd_copy_private_header_data): Define.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (MINUS_TWO): Define.
+ (mips_elf_higher, mips_elf_highest,
+ mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
+ some bfd_vma values.
+ (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
+
+2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * som.c (log2): Rename to exact_log2. Adjust all callers.
+
+2004-05-13 Paul Brook <paul@codesourcery.com>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
+ dwarf3 format CIE entries. Remove comment about the size of the
+ ra_column field. It is now correctly deduced.
+
+2004-05-13 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (or32-*-rtems*): Switch to elf.
+
+2004-05-13 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2004-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
+ into .dynsym if elf_section_data (sec)->dynindx <= 0.
+ Adjust counting of last_local.
+ (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
+ other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
+ created by the linker nor !SHF_ALLOC.
+
+ * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
+ DT_PLTGOT to the start of the .got.plt section instead of the
+ .got output section. Set sh_entsize for .got section in addition
+ to .got.plt.
+ (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
+ is at sgot->output_section->vma.
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
+ DT_PLTGOT to the start of the .got.plt section instead of the
+ .got output section.
+ (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
+ is at sgot->output_section->vma. Set sh_entsize for .got section
+ in addition to .got.plt.
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
+ (bfd_section_from_phdr): Likewise.
+ (map_sections_to_segments): Likewise.
+ (assign_file_positions_for_segments): Likewise.
+ (get_program_header_size): Likewise.
+ * elflink.c (bfd_elf_size_dynamic_sections): Set
+ elf_tdata (output_bfd)->relro from info->relro.
+ * elf-bfd.h (struct elf_obj_tdata): Add relro field.
+
+2004-05-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
+ a zero symndx for which we hadn't accounted a dynamic relocation.
+ (_frvfdpic_add_rofixup): Likewise.
+
+2004-05-07 Brian Ford <ford@vss.fsi.com>
+ DJ Delorie <dj@redhat.com>
+
+ * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
+ Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
+ * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
+ IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
+
+2004-05-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
+ immediately if there's no link info.
+ (elf32_frvfdpic_copy_private_bfd_data): New.
+ (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
+
+2004-05-06 Zack Weinberg <zack@codesourcery.com>
+
+ * dwarf2.c (add_line_info): Also set info->filename to NULL if
+ filename argument is null; do not call strlen on a null pointer.
+
+2004-05-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
+ special case.
+
+2004-05-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (bfd_elf32_frvfdpic_vec): New.
+ * configure: Rebuilt.
+ * targets.c (bfd_elf32_frvfdpic_vec): New.
+ * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
+ on the latter.
+ * elf32-frv.c: Prefix all identifiers added for FDPIC support with
+ frvfdpic instead of frv. Rearrange elf-target macros such that
+ the FDPIC-specific ones are only defined for this new target
+ vector.
+ (bfd_elf32_frvfdpic_vec): Declare.
+ (IS_FDPIC): New.
+ (elf32_frv_relocate_section): Use it to enable segment checking
+ and to control rofixup emission. Add output section vma to
+ applied relocation in non-LOAD non-ALLOC sections. Use
+ _bfd_error_handler for errors.
+ (_frv_create_got_section): Create .rel.got and .rofixup only in
+ FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
+ linker script.
+ (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
+ (elf32_frvfdpic_modify_segment_map): Likewise.
+ (elf32_frv_finish_dynamic_sections): New, do-nothing.
+ (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
+ error message if we miscompute the rofixup size.
+ (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
+ (frvfdpic_elf_encode_eh_address): Likewise.
+ (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
+ Record relocs only in FDPIC. Make sure _gp is defined for GPREL
+ relocs. Reject unknown relocation types.
+ (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
+ (frv_elf_merge_private_bfd_data): Likewise.
+ (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
+ 0x4000 for newly-added elf32-frvfdpic.
+
+2004-05-05 Nick Clifton <nickc@redhat.com>
+
+ PR/136
+ * cache.c (bfd_cache_lookup_worker): Call abort() rather than
+ returning NULL as most users of this function do not check its
+ return value.
+ * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
+ of bfd_cache_lookup().
+ * sco5-core.c (sco5_core_file_p): Likewise.
+ * trad-core.c (trad_unix_core_file_p): Likewise.
+
+2004-05-05 Nick Clifton <nickc@redhat.com>
+
+ * cache.c (bfd_cache_lookup): Improve formatting.
+ * archive.c: Fix formatting.
+
+2004-05-05 Peter Barada <peter@the-baradas.com>
+
+ * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
+ * cpu-m68k.c(bfd_m68k_arch): Likewise.
+ * bfd-in2.h(bfd_architecture): Regenerate.
+
+2004-05-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
+ SEC_MERGE sections.
+ * elflink.c (elf_link_input_bfd): Adjust output reloc index for
+ those against discarded link-once and SEC_MERGE section symbols.
+
+2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * section.c (bfd_get_section_by_name_if): New.
+ * bfd-in2.h: Regenerated.
+
+2004-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ * som.c (som_bfd_is_group_section): Define.
+
+2004-05-01 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (bfd_make_section_anyway): Copy the whole
+ bfd_hash_entry, not just "next" from existing entry.
+
+2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (bfd_section_from_shdr): Maintain the section order in
+ a section group.
+ (special_sections): Add ".note.GNU-stack".
+ (elf_fake_sections): Handle section group for relocatable
+ link..
+
+2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * section.c (bfd_sections_find_if): New.
+ * bfd-in2.h: Regenerated.
+
+2004-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (bfd_make_section_anyway): Add all sections to hash tab.
+
+ * elf-bfd.h (bfd_elf_is_group_section): Declare.
+ * elf.c (bfd_elf_is_group_section): New function.
+ * elfxx-target.h (bfd_elfNN_bfd_is_group_section
+ * section.c (bfd_generic_is_group_section): New function.
+ * targets.c (struct bfd_target): Add _bfd_is_group_section field.
+ (BFD_JUMP_TABLE_LINK): Adjust.
+ * aout-adobe.c (aout_32_bfd_is_group_section): Define.
+ * aout-target.h (MY_bfd_is_group_section): Define.
+ * aout-tic30.c (MY_bfd_is_group_section): Define.
+ * bfd.c (bfd_is_group_section): Define.
+ * binary.c (binary_bfd_is_group_section): Define.
+ * bout.c (b_out_bfd_is_group_section): Define.
+ * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
+ * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
+ * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
+ * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
+ * coffcode.h (coff_bfd_is_group_section): Define.
+ * i386msdos.c (msdos_bfd_is_group_section): Define.
+ * i386os9k.c (os9k_bfd_is_group_section): Define.
+ * ieee.c (ieee_bfd_is_group_section): Define.
+ * ihex.c (ihex_bfd_is_group_section): Define.
+ * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
+ * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
+ * mmo.c (mmo_bfd_is_group_section): Define.
+ * nlm-target.h (nlm_bfd_is_group_section): Define.
+ * oasys.c (oasys_bfd_is_group_section): Define.
+ * pef.c (bfd_pef_bfd_is_group_section): Define.
+ * ppcboot.c (ppcboot_bfd_is_group_section): Define.
+ * srec.c (srec_bfd_is_group_section): Define.
+ * tekhex.c (tekhex_bfd_is_group_section): Define.
+ * versados.c (versados_bfd_is_group_section): Define.
+ * vms.c (vms_bfd_is_group_section): Define.
+ * xsym.c (bfd_sym_bfd_is_group_section): Define.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2004-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_gc_mark): Follow indirect and warning syms.
+
+2004-04-30 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in: Update version to 2.15.91.
+ * configure: Regenerate.
+
+2004-04-29 Brian Ford <ford@vss.fsi.com>
+
+ * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
+ * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
+ [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
+ (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
+ [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
+ .gnu.linkonce.wi. sections.
+ * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
+ (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
+ .gnu.linkonce.wi..
+ * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
+ (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2004-04-28 Chris Demetriou <cgd@broadcom.com>
+
+ * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Likewise.
+
+2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
+ dup_common fields.
+ (setup_sections): Use som_subspace_dictionary_record struct instead
+ subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
+ is_comdat, is_common or dup_common.
+ (som_prep_headers): Use som_subspace_dictionary_record struct. Set
+ is_comdat, is_common and dup_common in section subspace_dict from
+ copy_data.
+ (som_begin_writing): Use som_subspace_dictionary_record struct.
+ (som_finish_writing): Likewise.
+ (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
+ is_common and dup_common flags in info for symbol. Add comment
+ regarding linker support for these fields. Slightly reorganize
+ function.
+ (som_build_and_write_symbol_table): Set is_comdat, is_common and
+ dup_common fields in symbol table from symbol info.
+ (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
+ arguments. Set corresponding fields in copy_data. Change all callers.
+ (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
+ symbol table.
+ (som_vec): Add SEC_LINK_ONCE to applicable section flags.
+ * som.h (som_subspace_dictionary_record): Define.
+ (som_copyable_section_data_struct): Add is_comdat, is_common and
+ dup_common fields.
+ (som_section_data_struct): Use som_subspace_dictionary_record struct
+ instead of subspace_dictionary_record.
+ (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
+
+2004-04-27 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
+ if set. Check reloc_done flag before applying relocations. Use
+ output addresses, both when applying relocations and when comparing
+ against the specified section.
+ (elf_xtensa_relocate_section): Use output address to check if dynamic
+ reloc is in a literal pool. Set section's reloc_done flag.
+
+2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-sh64.c (elf_backend_section_flags): New. Defined.
+ (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
+ section.
+ (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
+ section.
+
+2004-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
+ structure field removed in 2004-04-24 patch.
+ * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
+
+ * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
+ Constify hdr arg.
+ * elf32-arm.h (elf32_arm_section_flags): Likewise.
+ * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
+ * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
+ field before calling elf_backend_section_flags.
+
+2004-04-24 Chris Demetriou <cgd@broadcom.com>
+
+ * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
+ (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
+ (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
+ BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
+ and BFD_RELOC_32_PCREL.
+ (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
+ R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+ (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
+ (mips_elf_next_relocation): Move comment about matching HI/LO
+ relocations to...
+ (_bfd_mips_elf_relocate_section): Here. Remove handling for
+ R_MIPS_GNU_REL_HI16.
+
+2004-04-23 Chris Demetriou <cgd@broadcom.com>
+
+ * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
+ (mips_switch_reloc, mips_read_relocs, mips_relax_section)
+ (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
+ (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
+ and update comments to reflect current usage.
+ (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
+ and MIPS_R_SWITCH, as well as several empty entries. Update comment
+ for MIPS_R_PCREL16.
+ (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
+ (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
+ for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
+ (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
+ type number to be MIPS_R_PCREL16.
+ (mips_relocate_section): Remove support for link-time relaxation
+ of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
+ MIPS_R_RELLO, and MIPS_R_RELHI relocations.
+ (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
+ * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
+ relaxation of branches used by embedded-PIC.
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
+ * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
+ related members, update comment.
+ * pe-mips.c: Remove disabled (commented-out and #if 0'd)
+ code related to embedded-PIC.
+ * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
+ initialization of now-removed 'adjust' member of
+ 'struct ecoff_debug_info'.
+
+2004-04-23 Chris Demetriou <cgd@broadcom.com>
+
+ * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
+
+2004-04-21 Philip Blundell <pb@nexus.co.uk>
+
+ * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
+ relocs for locally defined symbols during -shared final link.
+ (elf32_arm_final_link_relocate): Likewise.
+
+2004-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
+ ELF_LINK_POINTER_EQUALITY_NEEDED.
+ (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
+ if r_type is not R_X86_64_PC32.
+ (elf64_x86_64_finish_dynamic_symbol): If
+ ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
+ SHN_UNDEF symbols.
+
+2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+
+2004-04-22 Andrew Cagney <cagney@redhat.com>
+
+ * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
+
+2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hpux-core.c (hpux_core_core_file_p): Add cast in call to
+ make_bfd_asection.
+ * som.c (som_set_section_contents): Constantify second argument.
+ (hppa_som_gen_reloc_type): Abort for unsupported selectors.
+ (som_object_setup): Rework to avoid warning.
+ (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
+ Likewise.
+
+2004-04-22 Andrew Cagney <cagney@redhat.com>
+
+ * cache.c (bfd_cache_close): Check for a previously closed file.
+
+2004-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ * bfd.c (bfd_get_synthetic_symtab): Define.
+ * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
+ NAME##_get_synthetic_symtab.
+ (struct bfd_target): Add _bfd_get_synthetic_symtab.
+ * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
+ * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
+ relplt_name fields.
+ (_bfd_elf_get_synthetic_symtab): New prototype.
+ * elfcode.h (elf_get_synthetic_symtab): Define.
+ * elf.c (_bfd_elf_get_synthetic_symtab): New function.
+ * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
+ (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
+ (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.h: Rebuilt.
+ * elf32-i386.c (elf_i386_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf32-s390.c (elf_s390_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf64-s390.c (elf_s390_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf32-sparc (elf32_sparc_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
+ (elf_backend_plt_sym_val): Define.
+ * aout-target.h (MY_get_synthetic_symtab): Define.
+ * aout-tic30.c (MY_get_synthetic_symtab): Define.
+ * coff-rs6000.c (rs6000coff_vec): Add
+ _bfd_nodynamic_get_synthetic_symtab.
+ (pmac_xcoff_vec): Likewise.
+ * coff64-rs6000.c (rs6000coff64_vec): Add
+ _bfd_nodynamic_get_synthetic_symtab.
+ (aix5coff64_vec): Likewise.
+ * sunos.c (MY_get_synthetic_symtab): Define.
+ * vms.c (vms_get_synthetic_symtab): Define.
+
+2004-04-22 Nick Clifton <nickc@redhat.com>
+
+ * bfd.c (bfd_archive_filename): Return NULL on NULL input.
+
+2004-04-22 Peter Barada <peter@the-baradas.com>
+
+ * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
+ * bfd2-in.h: Regenerate.
+ * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
+
+2004-04-21 Chris Demetriou <cgd@broadcom.com>
+
+ * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
+ * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
+ * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
+ (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
+ * bfd-in2.h: Regenerate.
+
+2004-04-21 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (is_same_value): Add final_static_link argument and
+ require relocations against a weak symbol to reference the same
+ symbol hash entry if not a final, static link.
+ (get_cached_value, add_value_map): Add final_static_link argument.
+ (remove_literals): Pass final_static_link argument as needed.
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
+ (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
+ (opncls_bwrite, opncls_bclose, opncls_bflush)
+ (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
+ bfd iovec that uses function callbacks.
+ (bfd_close): Use the iovec's bclose.
+ * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
+ (cache_bclose, cache_bflush, cache_bstat)
+ (cache_iovec): New functions and global variable, implement a
+ cache "iovec", where applicable set bfd_error.
+ (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
+ * bfdio.c (struct bfd_iovec): Define.
+ (real_read): Delete function.
+ (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
+ (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
+ assume that bread and bwrite set bfd_error.
+ * bfd.c (struct bfd): Add "iovec", update comments.
+ * bfd-in2.h, libbfd.h: Re-generate.
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
+
+2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
+
+ * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
+ (bfd_elf_gc_sections): Fail if a shared object is being created.
+ Do not fail if dynamic sections have been created. Instead call
+ elf_gc_mark_dynamic_ref_symbol to mark sections that contain
+ dynamically referenced symbols. Do not mark the whole graph
+ rooted at .eh_frame, only the section proper.
+
+2004-04-20 DJ Delorie <dj@redhat.com>
+
+ * reloc.c: Add BFD_RELOC_32_SECREL.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Likewise.
+ * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
+ (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
+ (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
+
+2004-04-19 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Handle
+ relocs against hidden/protected undefweak symbols properly.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+2004-04-18 Mark Kettenis <kettenis@gnu.org>
+
+ * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
+ * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
+ core files.
+
+2004-04-17 Brian Ford <ford@vss.fsi.com>
+
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
+ filepos for the SizeOfHeaders field.
+ (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
+ overflow.
+ (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
+
+2004-04-16 Alan Modra <amodra@bigpond.net.au>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Don't
+ change reloc_done. Set and restore _cooked_size.
+ (RETURN): Delete.
+
+2004-04-15 Mark Kettenis <kettenis@gnu.org>
+
+ * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
+ core files.
+
+2004-04-15 Nick Clifton <nickc@redhat.com>
+
+ * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
+
+2004-04-15 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
+
+2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
+ when it is a definition.
+
+2004-04-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
+ when statically linking PIC code.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
+ * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
+ targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
+ * configure: Regenerate.
+
+2004-04-08 Richard Sandiford <rsandifo@redhat.com>
+
+ * elflink.c: Include libiberty.h.
+ * Makefile.am (elflink.lo): Depend on libiberty.h.
+ * Makefile.in: Regenerate.
+
+2004-04-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
+ ".MIPS.stubs".
+
+2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
+ reserve the memory for dynamic linker
+
+2004-04-05 Mark Kettenis <kettenis@gnu.org>
+
+ * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
+ (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
+
+2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
+ RELOC_FOR_GLOBAL_SYMBOL.
+ (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
+
+2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Handle
+ R_ARM_ALU* only if OLD_ARM_ABI is not defined.
+
2004-04-01 Paul Brook <paul@codesourcery.com>
* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
@@ -43,7 +2499,7 @@
* stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
2004-03-30 Galit Heller <Galit.Heller@nsc.com>
- Tomer Levi <Tomer.Levi@nsc.com>
+ Tomer Levi <Tomer.Levi@nsc.com>
* Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
(ALL_MACHINES_CFILES): Add cpu-cr16c.c.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index bc2f64f94da..a937cc04614 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -2,6 +2,9 @@
AUTOMAKE_OPTIONS = cygnus
+# Uncomment the following line when doing a release.
+# RELEASE=y
+
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
MKDEP = gcc -MM
@@ -57,6 +60,7 @@ ALL_MACHINES = \
cpu-avr.lo \
cpu-cr16c.lo \
cpu-cris.lo \
+ cpu-crx.lo \
cpu-d10v.lo \
cpu-d30v.lo \
cpu-dlx.lo \
@@ -113,6 +117,7 @@ ALL_MACHINES_CFILES = \
cpu-avr.c \
cpu-cris.c \
cpu-cr16c.c \
+ cpu-crx.c \
cpu-d10v.c \
cpu-d30v.c \
cpu-dlx.c \
@@ -217,6 +222,7 @@ BFD32_BACKENDS = \
elf32-avr.lo \
elf32-cr16c.lo \
elf32-cris.lo \
+ elf32-crx.lo \
elf32-d10v.lo \
elf32-d30v.lo \
elf32-dlx.lo \
@@ -250,6 +256,7 @@ BFD32_BACKENDS = \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
+ elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
elf32-sparc.lo \
@@ -282,6 +289,7 @@ BFD32_BACKENDS = \
m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
+ m88kopenbsd.lo \
mach-o.lo \
mipsbsd.lo \
newsos3.lo \
@@ -383,6 +391,7 @@ BFD32_BACKENDS_CFILES = \
elf32-avr.c \
elf32-cr16c.c \
elf32-cris.c \
+ elf32-crx.c \
elf32-d10v.c \
elf32-d30v.c \
elf32-dlx.c \
@@ -417,6 +426,7 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
+ elf32-sh-symbian.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
@@ -447,6 +457,7 @@ BFD32_BACKENDS_CFILES = \
m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
+ m88kopenbsd.c \
mach-o.c \
mipsbsd.c \
newsos3.c \
@@ -860,11 +871,20 @@ 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, configure.host or version.h change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd \
- $(srcdir)/configure.host $(srcdir)/version.h
+# We want to rerun configure if configure, config.bfd or configure.host change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
+bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
+ @echo "creating $@"
+ @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+ bfd_version_string="\"$(VERSION)\"" ;\
+ if test "x$(RELEASE)" = x ; then \
+ bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
+ bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
+ fi ;\
+ sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
+
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -894,7 +914,8 @@ syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
targmatch.h
-hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \
+ $(INCDIR)/libiberty.h
linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h
srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
@@ -919,8 +940,9 @@ 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 $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
-cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
+cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h
+cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
@@ -956,7 +978,7 @@ cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
-cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
+cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
@@ -1142,14 +1164,18 @@ elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h elf32-target.h
elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-crx.lo: elf32-crx.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/crx.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \
@@ -1280,6 +1306,7 @@ elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf32-sh64.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -1292,7 +1319,13 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
elf32-target.h
+elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1318,11 +1351,10 @@ elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.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 \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h
+ $(INCDIR)/elf/external.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
@@ -1392,6 +1424,9 @@ m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \
m88kmach3.lo: m88kmach3.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
+m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(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
mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
$(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \
@@ -1522,8 +1557,7 @@ xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
xtensa-isa.lo: xtensa-isa.c $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-isa-internal.h
-xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/xtensa-isa-internal.h
+xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa-internal.h
aix5ppc-core.lo: aix5ppc-core.c
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
@@ -1600,8 +1634,7 @@ elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf64-target.h
elf64.lo: elf64.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 \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index aa60ce9fbbc..8d8440944d2 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
@@ -57,12 +57,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
AR = @AR@
AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
@@ -76,6 +72,7 @@ CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
@@ -86,16 +83,21 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
+GNATBIND = @GNATBIND@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
+HAVE_LIB = @HAVE_LIB@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LIB = @LIB@
LIBTOOL = @LIBTOOL@
+LN = @LN@
LN_S = @LN_S@
+LTLIB = @LTLIB@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -120,14 +122,23 @@ bfd_file_ptr = @bfd_file_ptr@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_ufile_ptr = @bfd_ufile_ptr@
-bfd_version = @bfd_version@
-bfd_version_string = @bfd_version_string@
+build_noncanonical = @build_noncanonical@
+build_subdir = @build_subdir@
+do_compare = @do_compare@
+host_noncanonical = @host_noncanonical@
+host_subdir = @host_subdir@
l = @l@
+ncn_cv_ = @ncn_cv_@
+target_noncanonical = @target_noncanonical@
+target_subdir = @target_subdir@
tdefaults = @tdefaults@
wordsize = @wordsize@
AUTOMAKE_OPTIONS = cygnus
+# Uncomment the following line when doing a release.
+# RELEASE=y
+
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
MKDEP = gcc -MM
@@ -153,551 +164,45 @@ BFD_H = bfd.h
# for the debugger, so if you are downloading things as S-records you
# need two copies of the executable, one to download and one for the
# debugger).
-BFD32_LIBS = \
- archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
- cache.lo coffgen.lo corefile.lo \
- format.lo init.lo libbfd.lo opncls.lo reloc.lo \
- section.lo syms.lo targets.lo hash.lo linker.lo \
- srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- merge.lo dwarf2.lo simple.lo
+BFD32_LIBS = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo
BFD64_LIBS = archive64.lo
-BFD32_LIBS_CFILES = \
- archive.c archures.c bfd.c bfdio.c bfdwin.c \
- cache.c coffgen.c corefile.c \
- format.c init.c libbfd.c opncls.c reloc.c \
- section.c syms.c targets.c hash.c linker.c \
- srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- merge.c dwarf2.c simple.c
+BFD32_LIBS_CFILES = archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coffgen.c corefile.c format.c init.c libbfd.c opncls.c reloc.c section.c syms.c targets.c hash.c linker.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c merge.c dwarf2.c simple.c
BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
-ALL_MACHINES = \
- cpu-a29k.lo \
- cpu-alpha.lo \
- cpu-arc.lo \
- cpu-arm.lo \
- cpu-avr.lo \
- cpu-cr16c.lo \
- cpu-cris.lo \
- cpu-d10v.lo \
- cpu-d30v.lo \
- cpu-dlx.lo \
- cpu-fr30.lo \
- cpu-frv.lo \
- cpu-h8300.lo \
- cpu-h8500.lo \
- cpu-hppa.lo \
- cpu-ia64.lo \
- cpu-i370.lo \
- cpu-i386.lo \
- cpu-i860.lo \
- cpu-i960.lo \
- cpu-ip2k.lo \
- cpu-iq2000.lo \
- cpu-m32r.lo \
- cpu-m68hc11.lo \
- cpu-m68hc12.lo \
- cpu-m68k.lo \
- cpu-m88k.lo \
- cpu-m10200.lo \
- cpu-m10300.lo \
- cpu-mcore.lo \
- cpu-mips.lo \
- cpu-mmix.lo \
- cpu-msp430.lo \
- cpu-or32.lo \
- cpu-ns32k.lo \
- cpu-openrisc.lo \
- cpu-pdp11.lo \
- cpu-pj.lo \
- cpu-powerpc.lo \
- cpu-rs6000.lo \
- cpu-s390.lo \
- cpu-sh.lo \
- cpu-sparc.lo \
- cpu-tic30.lo \
- cpu-tic4x.lo \
- cpu-tic54x.lo \
- cpu-tic80.lo \
- cpu-v850.lo \
- cpu-vax.lo \
- cpu-we32k.lo \
- cpu-w65.lo \
- cpu-xstormy16.lo \
- cpu-xtensa.lo \
- cpu-z8k.lo
-
-
-ALL_MACHINES_CFILES = \
- cpu-a29k.c \
- cpu-alpha.c \
- cpu-arc.c \
- cpu-arm.c \
- cpu-avr.c \
- cpu-cris.c \
- cpu-cr16c.c \
- cpu-d10v.c \
- cpu-d30v.c \
- cpu-dlx.c \
- cpu-fr30.c \
- cpu-frv.c \
- cpu-h8300.c \
- cpu-h8500.c \
- cpu-hppa.c \
- cpu-ia64.c \
- cpu-i370.c \
- cpu-i386.c \
- cpu-i860.c \
- cpu-i960.c \
- cpu-ip2k.c \
- cpu-iq2000.c \
- cpu-m32r.c \
- cpu-m68hc11.c \
- cpu-m68hc12.c \
- cpu-m68k.c \
- cpu-m88k.c \
- cpu-m10200.c \
- cpu-m10300.c \
- cpu-mcore.c \
- cpu-mips.c \
- cpu-mmix.c \
- cpu-msp430.c \
- cpu-or32.c \
- cpu-ns32k.c \
- cpu-openrisc.c \
- cpu-pdp11.c \
- cpu-pj.c \
- cpu-powerpc.c \
- cpu-rs6000.c \
- cpu-s390.c \
- cpu-sh.c \
- cpu-sparc.c \
- cpu-tic30.c \
- cpu-tic4x.c \
- cpu-tic54x.c \
- cpu-tic80.c \
- cpu-v850.c \
- cpu-vax.c \
- cpu-we32k.c \
- cpu-w65.c \
- cpu-xstormy16.c \
- cpu-xtensa.c \
- cpu-z8k.c
+ALL_MACHINES = cpu-a29k.lo cpu-alpha.lo cpu-arc.lo cpu-arm.lo cpu-avr.lo cpu-cr16c.lo cpu-cris.lo cpu-crx.lo cpu-d10v.lo cpu-d30v.lo cpu-dlx.lo cpu-fr30.lo cpu-frv.lo cpu-h8300.lo cpu-h8500.lo cpu-hppa.lo cpu-ia64.lo cpu-i370.lo cpu-i386.lo cpu-i860.lo cpu-i960.lo cpu-ip2k.lo cpu-iq2000.lo cpu-m32r.lo cpu-m68hc11.lo cpu-m68hc12.lo cpu-m68k.lo cpu-m88k.lo cpu-m10200.lo cpu-m10300.lo cpu-mcore.lo cpu-mips.lo cpu-mmix.lo cpu-msp430.lo cpu-or32.lo cpu-ns32k.lo cpu-openrisc.lo cpu-pdp11.lo cpu-pj.lo cpu-powerpc.lo cpu-rs6000.lo cpu-s390.lo cpu-sh.lo cpu-sparc.lo cpu-tic30.lo cpu-tic4x.lo cpu-tic54x.lo cpu-tic80.lo cpu-v850.lo cpu-vax.lo cpu-we32k.lo cpu-w65.lo cpu-xstormy16.lo cpu-xtensa.lo cpu-z8k.lo
+
+
+ALL_MACHINES_CFILES = cpu-a29k.c cpu-alpha.c cpu-arc.c cpu-arm.c cpu-avr.c cpu-cris.c cpu-cr16c.c cpu-crx.c cpu-d10v.c cpu-d30v.c cpu-dlx.c cpu-fr30.c cpu-frv.c cpu-h8300.c cpu-h8500.c cpu-hppa.c cpu-ia64.c cpu-i370.c cpu-i386.c cpu-i860.c cpu-i960.c cpu-ip2k.c cpu-iq2000.c cpu-m32r.c cpu-m68hc11.c cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-m10200.c cpu-m10300.c cpu-mcore.c cpu-mips.c cpu-mmix.c cpu-msp430.c cpu-or32.c cpu-ns32k.c cpu-openrisc.c cpu-pdp11.c cpu-pj.c cpu-powerpc.c cpu-rs6000.c cpu-s390.c cpu-sh.c cpu-sparc.c cpu-tic30.c cpu-tic4x.c cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c cpu-we32k.c cpu-w65.c cpu-xstormy16.c cpu-xtensa.c cpu-z8k.c
# The .o files needed by all of the 32 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all.
-BFD32_BACKENDS = \
- aout-adobe.lo \
- aout-arm.lo \
- aout-cris.lo \
- aout-ns32k.lo \
- aout-sparcle.lo \
- aout-tic30.lo \
- aout0.lo \
- aout32.lo \
- armnetbsd.lo \
- bout.lo \
- cf-i386lynx.lo \
- cf-m68klynx.lo \
- cf-sparclynx.lo \
- coff-a29k.lo \
- coff-apollo.lo \
- coff-arm.lo \
- coff-aux.lo \
- coff-h8300.lo \
- coff-h8500.lo \
- coff-i386.lo \
- coff-go32.lo \
- coff-i860.lo \
- coff-i960.lo \
- coff-m68k.lo \
- coff-m88k.lo \
- coff-mips.lo \
- coff-or32.lo \
- coff-rs6000.lo \
- coff-sh.lo \
- coff-sparc.lo \
- coff-stgo32.lo \
- coff-svm68k.lo \
- coff-tic30.lo \
- coff-tic4x.lo \
- coff-tic54x.lo \
- coff-tic80.lo \
- coff-u68k.lo \
- coff-we32k.lo \
- coff-w65.lo \
- coff-z8k.lo \
- cofflink.lo \
- dwarf1.lo \
- ecoff.lo \
- ecofflink.lo \
- efi-app-ia32.lo \
- elf.lo \
- elf32-am33lin.lo \
- elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
- elf32-avr.lo \
- elf32-cr16c.lo \
- elf32-cris.lo \
- elf32-d10v.lo \
- elf32-d30v.lo \
- elf32-dlx.lo \
- elf32-fr30.lo \
- elf32-frv.lo \
- elf32-gen.lo \
- elf32-h8300.lo \
- elf32-hppa.lo \
- elf32-i370.lo \
- elf32-i386.lo \
- elf32-i860.lo \
- elf32-i960.lo \
- elf32-ia64.lo \
- elf32-ip2k.lo \
- elf32-iq2000.lo \
- elf32-m32r.lo \
- elf32-m68hc11.lo \
- elf32-m68hc12.lo \
- elf32-m68hc1x.lo \
- elf32-m68k.lo \
- elf32-m88k.lo \
- elf-m10200.lo \
- elf-m10300.lo \
- elf32-mcore.lo \
- elfxx-mips.lo \
- elf32-mips.lo \
- elf32-msp430.lo \
- elf32-openrisc.lo \
- elf32-or32.lo \
- elf32-pj.lo \
- elf32-ppc.lo \
- elf32-s390.lo \
- elf32-sh.lo \
- elf32-sh64.lo \
- elf32-sh64-com.lo \
- elf32-sparc.lo \
- elf32-v850.lo \
- elf32-vax.lo \
- elf32-xstormy16.lo \
- elf32-xtensa.lo \
- elf32.lo \
- elflink.lo \
- elf-strtab.lo \
- elf-eh-frame.lo \
- epoc-pe-arm.lo \
- epoc-pei-arm.lo \
- hp300bsd.lo \
- hp300hpux.lo \
- som.lo \
- i386aout.lo \
- i386bsd.lo \
- i386dynix.lo \
- i386freebsd.lo \
- i386linux.lo \
- i386lynx.lo \
- i386msdos.lo \
- i386netbsd.lo \
- i386mach3.lo \
- i386os9k.lo \
- ieee.lo \
- m68k4knetbsd.lo \
- m68klinux.lo \
- m68klynx.lo \
- m68knetbsd.lo \
- m88kmach3.lo \
- mach-o.lo \
- mipsbsd.lo \
- newsos3.lo \
- nlm.lo \
- nlm32-i386.lo \
- nlm32-sparc.lo \
- nlm32-ppc.lo \
- nlm32.lo \
- ns32knetbsd.lo \
- oasys.lo \
- pc532-mach.lo \
- pdp11.lo \
- pef.lo \
- pe-arm.lo \
- pei-arm.lo \
- pe-i386.lo \
- pei-i386.lo \
- pe-mcore.lo \
- pei-mcore.lo \
- pe-ppc.lo \
- pei-ppc.lo \
- pe-sh.lo \
- pei-sh.lo \
- pe-mips.lo \
- pei-mips.lo \
- peigen.lo \
- ppcboot.lo \
- reloc16.lo \
- riscix.lo \
- sparclinux.lo \
- sparclynx.lo \
- sparcnetbsd.lo \
- sunos.lo \
- vaxnetbsd.lo \
- vax1knetbsd.lo \
- vaxbsd.lo \
- versados.lo \
- vms.lo \
- vms-gsd.lo \
- vms-hdr.lo \
- vms-misc.lo \
- vms-tir.lo \
- xcofflink.lo \
- xsym.lo \
- xtensa-isa.lo \
- xtensa-modules.lo
-
-
-BFD32_BACKENDS_CFILES = \
- aout-adobe.c \
- aout-arm.c \
- aout-cris.c \
- aout-ns32k.c \
- aout-sparcle.c \
- aout-tic30.c \
- aout0.c \
- aout32.c \
- armnetbsd.c \
- bout.c \
- cf-i386lynx.c \
- cf-m68klynx.c \
- cf-sparclynx.c \
- coff-a29k.c \
- coff-apollo.c \
- coff-arm.c \
- coff-aux.c \
- coff-h8300.c \
- coff-h8500.c \
- coff-i386.c \
- coff-i860.c \
- coff-go32.c \
- coff-i960.c \
- coff-m68k.c \
- coff-m88k.c \
- coff-mips.c \
- coff-or32.c \
- coff-rs6000.c \
- coff-sh.c \
- coff-sparc.c \
- coff-stgo32.c \
- coff-svm68k.c \
- coff-tic30.c \
- coff-tic4x.c \
- coff-tic54x.c \
- coff-tic80.c \
- coff-u68k.c \
- coff-we32k.c \
- coff-w65.c \
- coff-z8k.c \
- cofflink.c \
- dwarf1.c \
- ecoff.c \
- ecofflink.c \
- efi-app-ia32.c \
- elf.c \
- elf32-am33lin.c \
- elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
- elf32-avr.c \
- elf32-cr16c.c \
- elf32-cris.c \
- elf32-d10v.c \
- elf32-d30v.c \
- elf32-dlx.c \
- elf32-fr30.c \
- elf32-frv.c \
- elf32-gen.c \
- elf32-h8300.c \
- elf32-hppa.c \
- elf32-i370.c \
- elf32-i386.c \
- elf32-i860.c \
- elf32-i960.c \
- elf32-ip2k.c \
- elf32-iq2000.c \
- elf32-m32r.c \
- elf32-m68k.c \
- elf32-m68hc11.c \
- elf32-m68hc12.c \
- elf32-m68hc1x.c \
- elf32-m88k.c \
- elf-m10200.c \
- elf-m10300.c \
- elf32-mcore.c \
- elfxx-mips.c \
- elf32-mips.c \
- elf32-msp430.c \
- elf32-openrisc.c \
- elf32-or32.c \
- elf32-pj.c \
- elf32-ppc.c \
- elf32-sh64.c \
- elf32-sh64-com.c \
- elf32-s390.c \
- elf32-sh.c \
- elf32-sparc.c \
- elf32-v850.c \
- elf32-vax.c \
- elf32-xstormy16.c \
- elf32-xtensa.c \
- elf32.c \
- elflink.c \
- elf-strtab.c \
- elf-eh-frame.c \
- epoc-pe-arm.c \
- epoc-pei-arm.c \
- hp300bsd.c \
- hp300hpux.c \
- som.c \
- i386aout.c \
- i386bsd.c \
- i386dynix.c \
- i386freebsd.c \
- i386linux.c \
- i386lynx.c \
- i386msdos.c \
- i386netbsd.c \
- i386mach3.c \
- i386os9k.c \
- ieee.c \
- m68k4knetbsd.c \
- m68klinux.c \
- m68klynx.c \
- m68knetbsd.c \
- m88kmach3.c \
- mach-o.c \
- mipsbsd.c \
- newsos3.c \
- nlm.c \
- nlm32-i386.c \
- nlm32-sparc.c \
- nlm32-ppc.c \
- nlm32.c \
- ns32knetbsd.c \
- oasys.c \
- pc532-mach.c \
- pdp11.c \
- pef.c \
- pe-arm.c \
- pei-arm.c \
- pe-i386.c \
- pei-i386.c \
- pe-mcore.c \
- pei-mcore.c \
- pe-ppc.c \
- pei-ppc.c \
- pe-sh.c \
- pei-sh.c \
- pe-mips.c \
- pei-mips.c \
- ppcboot.c \
- reloc16.c \
- riscix.c \
- sparclinux.c \
- sparclynx.c \
- sparcnetbsd.c \
- sunos.c \
- vaxnetbsd.c \
- vax1knetbsd.c \
- vaxbsd.c \
- versados.c \
- vms.c \
- vms-gsd.c \
- vms-hdr.c \
- vms-misc.c \
- vms-tir.c \
- xcofflink.c \
- xsym.c \
- xtensa-isa.c \
- xtensa-modules.c
+BFD32_BACKENDS = aout-adobe.lo aout-arm.lo aout-cris.lo aout-ns32k.lo aout-sparcle.lo aout-tic30.lo aout0.lo aout32.lo armnetbsd.lo bout.lo cf-i386lynx.lo cf-m68klynx.lo cf-sparclynx.lo coff-a29k.lo coff-apollo.lo coff-arm.lo coff-aux.lo coff-h8300.lo coff-h8500.lo coff-i386.lo coff-go32.lo coff-i860.lo coff-i960.lo coff-m68k.lo coff-m88k.lo coff-mips.lo coff-or32.lo coff-rs6000.lo coff-sh.lo coff-sparc.lo coff-stgo32.lo coff-svm68k.lo coff-tic30.lo coff-tic4x.lo coff-tic54x.lo coff-tic80.lo coff-u68k.lo coff-we32k.lo coff-w65.lo coff-z8k.lo cofflink.lo dwarf1.lo ecoff.lo ecofflink.lo efi-app-ia32.lo elf.lo elf32-am33lin.lo elf32-arc.lo elfarm-oabi.lo elfarm-nabi.lo elf32-avr.lo elf32-cr16c.lo elf32-cris.lo elf32-crx.lo elf32-d10v.lo elf32-d30v.lo elf32-dlx.lo elf32-fr30.lo elf32-frv.lo elf32-gen.lo elf32-h8300.lo elf32-hppa.lo elf32-i370.lo elf32-i386.lo elf32-i860.lo elf32-i960.lo elf32-ia64.lo elf32-ip2k.lo elf32-iq2000.lo elf32-m32r.lo elf32-m68hc11.lo elf32-m68hc12.lo elf32-m68hc1x.lo elf32-m68k.lo elf32-m88k.lo elf-m10200.lo elf-m10300.lo elf32-mcore.lo elfxx-mips.lo elf32-mips.lo elf32-msp430.lo elf32-openrisc.lo elf32-or32.lo elf32-pj.lo elf32-ppc.lo elf32-s390.lo elf32-sh.lo elf32-sh-symbian.lo elf32-sh64.lo elf32-sh64-com.lo elf32-sparc.lo elf32-v850.lo elf32-vax.lo elf32-xstormy16.lo elf32-xtensa.lo elf32.lo elflink.lo elf-strtab.lo elf-eh-frame.lo epoc-pe-arm.lo epoc-pei-arm.lo hp300bsd.lo hp300hpux.lo som.lo i386aout.lo i386bsd.lo i386dynix.lo i386freebsd.lo i386linux.lo i386lynx.lo i386msdos.lo i386netbsd.lo i386mach3.lo i386os9k.lo ieee.lo m68k4knetbsd.lo m68klinux.lo m68klynx.lo m68knetbsd.lo m88kmach3.lo m88kopenbsd.lo mach-o.lo mipsbsd.lo newsos3.lo nlm.lo nlm32-i386.lo nlm32-sparc.lo nlm32-ppc.lo nlm32.lo ns32knetbsd.lo oasys.lo pc532-mach.lo pdp11.lo pef.lo pe-arm.lo pei-arm.lo pe-i386.lo pei-i386.lo pe-mcore.lo pei-mcore.lo pe-ppc.lo pei-ppc.lo pe-sh.lo pei-sh.lo pe-mips.lo pei-mips.lo peigen.lo ppcboot.lo reloc16.lo riscix.lo sparclinux.lo sparclynx.lo sparcnetbsd.lo sunos.lo vaxnetbsd.lo vax1knetbsd.lo vaxbsd.lo versados.lo vms.lo vms-gsd.lo vms-hdr.lo vms-misc.lo vms-tir.lo xcofflink.lo xsym.lo xtensa-isa.lo xtensa-modules.lo
+
+
+BFD32_BACKENDS_CFILES = aout-adobe.c aout-arm.c aout-cris.c aout-ns32k.c aout-sparcle.c aout-tic30.c aout0.c aout32.c armnetbsd.c bout.c cf-i386lynx.c cf-m68klynx.c cf-sparclynx.c coff-a29k.c coff-apollo.c coff-arm.c coff-aux.c coff-h8300.c coff-h8500.c coff-i386.c coff-i860.c coff-go32.c coff-i960.c coff-m68k.c coff-m88k.c coff-mips.c coff-or32.c coff-rs6000.c coff-sh.c coff-sparc.c coff-stgo32.c coff-svm68k.c coff-tic30.c coff-tic4x.c coff-tic54x.c coff-tic80.c coff-u68k.c coff-we32k.c coff-w65.c coff-z8k.c cofflink.c dwarf1.c ecoff.c ecofflink.c efi-app-ia32.c elf.c elf32-am33lin.c elf32-arc.c elfarm-oabi.c elfarm-nabi.c elf32-avr.c elf32-cr16c.c elf32-cris.c elf32-crx.c elf32-d10v.c elf32-d30v.c elf32-dlx.c elf32-fr30.c elf32-frv.c elf32-gen.c elf32-h8300.c elf32-hppa.c elf32-i370.c elf32-i386.c elf32-i860.c elf32-i960.c elf32-ip2k.c elf32-iq2000.c elf32-m32r.c elf32-m68k.c elf32-m68hc11.c elf32-m68hc12.c elf32-m68hc1x.c elf32-m88k.c elf-m10200.c elf-m10300.c elf32-mcore.c elfxx-mips.c elf32-mips.c elf32-msp430.c elf32-openrisc.c elf32-or32.c elf32-pj.c elf32-ppc.c elf32-sh64.c elf32-sh64-com.c elf32-s390.c elf32-sh.c elf32-sh-symbian.c elf32-sparc.c elf32-v850.c elf32-vax.c elf32-xstormy16.c elf32-xtensa.c elf32.c elflink.c elf-strtab.c elf-eh-frame.c epoc-pe-arm.c epoc-pei-arm.c hp300bsd.c hp300hpux.c som.c i386aout.c i386bsd.c i386dynix.c i386freebsd.c i386linux.c i386lynx.c i386msdos.c i386netbsd.c i386mach3.c i386os9k.c ieee.c m68k4knetbsd.c m68klinux.c m68klynx.c m68knetbsd.c m88kmach3.c m88kopenbsd.c mach-o.c mipsbsd.c newsos3.c nlm.c nlm32-i386.c nlm32-sparc.c nlm32-ppc.c nlm32.c ns32knetbsd.c oasys.c pc532-mach.c pdp11.c pef.c pe-arm.c pei-arm.c pe-i386.c pei-i386.c pe-mcore.c pei-mcore.c pe-ppc.c pei-ppc.c pe-sh.c pei-sh.c pe-mips.c pei-mips.c ppcboot.c reloc16.c riscix.c sparclinux.c sparclynx.c sparcnetbsd.c sunos.c vaxnetbsd.c vax1knetbsd.c vaxbsd.c versados.c vms.c vms-gsd.c vms-hdr.c vms-misc.c vms-tir.c xcofflink.c xsym.c xtensa-isa.c xtensa-modules.c
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
-BFD64_BACKENDS = \
- aix5ppc-core.lo \
- aout64.lo \
- coff-alpha.lo \
- coff64-rs6000.lo \
- demo64.lo \
- efi-app-ia64.lo \
- elf64-x86-64.lo \
- elf64-alpha.lo \
- elf64-hppa.lo \
- elf64-ia64.lo \
- elf64-gen.lo \
- elfn32-mips.lo \
- elf64-mips.lo \
- elf64-mmix.lo \
- elf64-sh64.lo \
- elf64-ppc.lo \
- elf64-s390.lo \
- elf64-sparc.lo \
- elf64.lo \
- mmo.lo \
- nlm32-alpha.lo \
- nlm64.lo \
- pepigen.lo
-
-
-BFD64_BACKENDS_CFILES = \
- aix5ppc-core.c \
- aout64.c \
- coff-alpha.c \
- coff64-rs6000.c \
- demo64.c \
- efi-app-ia64.c \
- elf64-x86-64.c \
- elf64-alpha.c \
- elf64-hppa.c \
- elf64-gen.c \
- elfn32-mips.c \
- elf64-mips.c \
- elf64-mmix.c \
- elf64-ppc.c \
- elf64-s390.c \
- elf64-sh64.c \
- elf64-sparc.c \
- elf64.c \
- mmo.c \
- nlm32-alpha.c \
- nlm64.c
-
-
-OPTIONAL_BACKENDS = \
- aix386-core.lo \
- hpux-core.lo \
- irix-core.lo \
- lynx-core.lo \
- osf-core.lo \
- sco5-core.lo \
- trad-core.lo \
- cisco-core.lo
-
-
-OPTIONAL_BACKENDS_CFILES = \
- aix386-core.c \
- hpux-core.c \
- irix-core.c \
- lynx-core.c \
- osf-core.c \
- sco5-core.c \
- trad-core.c \
- cisco-core.c
+BFD64_BACKENDS = aix5ppc-core.lo aout64.lo coff-alpha.lo coff64-rs6000.lo demo64.lo efi-app-ia64.lo elf64-x86-64.lo elf64-alpha.lo elf64-hppa.lo elf64-ia64.lo elf64-gen.lo elfn32-mips.lo elf64-mips.lo elf64-mmix.lo elf64-sh64.lo elf64-ppc.lo elf64-s390.lo elf64-sparc.lo elf64.lo mmo.lo nlm32-alpha.lo nlm64.lo pepigen.lo
+
+
+BFD64_BACKENDS_CFILES = aix5ppc-core.c aout64.c coff-alpha.c coff64-rs6000.c demo64.c efi-app-ia64.c elf64-x86-64.c elf64-alpha.c elf64-hppa.c elf64-gen.c elfn32-mips.c elf64-mips.c elf64-mmix.c elf64-ppc.c elf64-s390.c elf64-sh64.c elf64-sparc.c elf64.c mmo.c nlm32-alpha.c nlm64.c
+
+
+OPTIONAL_BACKENDS = aix386-core.lo hpux-core.lo irix-core.lo lynx-core.lo osf-core.lo sco5-core.lo trad-core.lo cisco-core.lo
+
+
+OPTIONAL_BACKENDS_CFILES = aix386-core.c hpux-core.c irix-core.c lynx-core.c osf-core.c sco5-core.c trad-core.c cisco-core.c
# These are defined by configure.in:
@@ -711,35 +216,18 @@ TDEFAULTS = @tdefaults@
INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
-SOURCE_CFILES = \
- $(BFD32_LIBS_CFILES) \
- $(BFD64_LIBS_CFILES) \
- $(ALL_MACHINES_CFILES) \
- $(BFD32_BACKENDS_CFILES) \
- $(BFD64_BACKENDS_CFILES) \
- $(OPTIONAL_BACKENDS_CFILES)
+SOURCE_CFILES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES)
-BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+BUILD_CFILES = elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
-SOURCE_HFILES = \
- aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
- elf64-hppa.h elfcode.h elfcore.h \
- freebsd.h genlink.h go32stub.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
- netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
- pef.h pef-traceback.h peicode.h som.h version.h \
- vms.h xcoff-target.h xsym.h
+SOURCE_HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h elfcode.h elfcore.h freebsd.h genlink.h go32stub.h libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h pef.h pef-traceback.h peicode.h som.h version.h vms.h xcoff-target.h xsym.h
-BUILD_HFILES = \
- bfdver.h elf32-target.h elf64-target.h targmatch.h
+BUILD_HFILES = bfdver.h elf32-target.h elf64-target.h targmatch.h
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
@@ -769,27 +257,23 @@ libbfd_a_SOURCES =
BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c bfdio.c bfdwin.c \
- archive.c corefile.c targets.c format.c
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c reloc.c syms.c bfd.c bfdio.c bfdwin.c archive.c corefile.c targets.c format.c
BFD64_H_FILES = archive64.c
-LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
- cache.c reloc.c archures.c elf.c
+LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
MOSTLYCLEANFILES = ofiles stamp-ofiles
-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
- stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = bfd-in3.h bfdver.h
+CONFIG_CLEAN_FILES = bfd-in3.h
LIBRARIES = $(noinst_LIBRARIES)
@@ -813,12 +297,12 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
Makefile.in TODO acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
-configure.in version.h
+configure.in
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)
@@ -867,8 +351,6 @@ distclean-hdr:
maintainer-clean-hdr:
bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
-bfdver.h: $(top_builddir)/config.status version.h
- cd $(top_builddir) && CONFIG_FILES=$@:version.h CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
@@ -1013,7 +495,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.in $$unique $(LISP))
mostlyclean-tags:
@@ -1397,11 +879,20 @@ 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, configure.host or version.h change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd \
- $(srcdir)/configure.host $(srcdir)/version.h
+# We want to rerun configure if configure, config.bfd or configure.host change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
+bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
+ @echo "creating $@"
+ @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+ bfd_version_string="\"$(VERSION)\"" ;\
+ if test "x$(RELEASE)" = x ; then \
+ bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
+ bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
+ fi ;\
+ sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
+
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -1431,7 +922,8 @@ syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
targmatch.h
-hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \
+ $(INCDIR)/libiberty.h
linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h
srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
@@ -1456,8 +948,9 @@ 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 $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
-cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
+cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h
+cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
@@ -1493,7 +986,7 @@ cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
-cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
+cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
@@ -1679,14 +1172,18 @@ elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h elf32-target.h
elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-crx.lo: elf32-crx.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/crx.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \
@@ -1817,6 +1314,7 @@ elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf32-sh64.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -1829,7 +1327,13 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
elf32-target.h
+elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1855,11 +1359,10 @@ elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.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 \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h
+ $(INCDIR)/elf/external.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
@@ -1929,6 +1432,9 @@ m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \
m88kmach3.lo: m88kmach3.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
+m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(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
mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
$(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \
@@ -2059,8 +1565,7 @@ xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
xtensa-isa.lo: xtensa-isa.c $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-isa-internal.h
-xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/xtensa-isa-internal.h
+xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa-internal.h
aix5ppc-core.lo: aix5ppc-core.c
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
@@ -2137,8 +1642,7 @@ elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf64-target.h
elf64.lo: elf64.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 \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4
index 63b4bf92b17..764c94bd65b 100644
--- a/bfd/acinclude.m4
+++ b/bfd/acinclude.m4
@@ -1,8 +1,9 @@
sinclude(../config/accross.m4)
+sinclude(../config/acx.m4)
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN],
-[AC_REQUIRE([AC_CANONICAL_SYSTEM])
+[AC_REQUIRE([AC_CANONICAL_TARGET])
case "${host}" in
changequote(,)dnl
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
@@ -138,12 +139,15 @@ AC_DEFUN([AM_INSTALL_LIBBFD],
fi)
AC_MSG_RESULT($install_libbfd_p)
AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
+ # Need _noncanonical variables for this.
+ ACX_NONCANONICAL_HOST
+ ACX_NONCANONICAL_TARGET
# libbfd.a is a host library containing target dependent code
bfdlibdir='$(libdir)'
bfdincludedir='$(includedir)'
if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4
index a97b35f49e7..4759a9f2f6e 100644
--- a/bfd/aclocal.m4
+++ b/bfd/aclocal.m4
@@ -11,10 +11,11 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
sinclude(../config/accross.m4)
+sinclude(../config/acx.m4)
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN],
-[AC_REQUIRE([AC_CANONICAL_SYSTEM])
+[AC_REQUIRE([AC_CANONICAL_TARGET])
case "${host}" in
changequote(,)dnl
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
@@ -150,18 +151,842 @@ AC_DEFUN([AM_INSTALL_LIBBFD],
fi)
AC_MSG_RESULT($install_libbfd_p)
AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
+ # Need _noncanonical variables for this.
+ ACX_NONCANONICAL_HOST
+ ACX_NONCANONICAL_TARGET
# libbfd.a is a host library containing target dependent code
bfdlibdir='$(libdir)'
bfdincludedir='$(includedir)'
if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
]
)
+# lib-prefix.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c
index 22d045ae124..38be16150b9 100644
--- a/bfd/aix386-core.c
+++ b/bfd/aix386-core.c
@@ -122,7 +122,7 @@ aix386_core_file_p (abfd)
goto loser;
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_regsec (abfd)->_raw_size = sizeof (core->cd_regs);
+ core_regsec (abfd)->size = sizeof (core->cd_regs);
core_regsec (abfd)->vma = (bfd_vma) -1;
/* We'll access the regs afresh in the core file, like any section. */
@@ -135,7 +135,7 @@ aix386_core_file_p (abfd)
goto loser;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
- core_reg2sec (abfd)->_raw_size = sizeof (core->cd_fpregs);
+ core_reg2sec (abfd)->size = sizeof (core->cd_fpregs);
core_reg2sec (abfd)->vma = (bfd_vma) -1;
core_reg2sec (abfd)->filepos =
(file_ptr) offsetof (struct corehdr, cd_fpregs);
@@ -180,7 +180,7 @@ aix386_core_file_p (abfd)
goto loser;
core_section (abfd, n)->flags = flags;
- core_section (abfd, n)->_raw_size = core->cd_segs[i].cs_len;
+ core_section (abfd, n)->size = core->cd_segs[i].cs_len;
core_section (abfd, n)->vma = core->cd_segs[i].cs_address;
core_section (abfd, n)->filepos = core->cd_segs[i].cs_offset;
core_section (abfd, n)->alignment_power = 2;
diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c
index 03510765e18..fa066ecd537 100644
--- a/bfd/aix5ppc-core.c
+++ b/bfd/aix5ppc-core.c
@@ -1,5 +1,5 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
- Copyright 2001, 2002
+ Copyright 2001, 2002, 2004
Free Software Foundation, Inc.
Written by Tom Rix
Contributed by Redhat.
@@ -125,7 +125,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
- sec->_raw_size = core.c_size;
+ sec->size = core.c_size;
sec->vma = core.c_stackorg;
sec->filepos = core.c_stack;
@@ -135,7 +135,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY;
- sec->_raw_size = sizeof (struct __context64);
+ sec->size = sizeof (struct __context64);
sec->vma = 0;
sec->filepos = 0;
sec->contents = (bfd_byte *)&new_core_hdr->c_flt.r64;
@@ -149,7 +149,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_HAS_CONTENTS;
- sec->_raw_size = core.c_lsize;
+ sec->size = core.c_lsize;
sec->vma = 0;
sec->filepos = core.c_loader;
@@ -163,7 +163,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
- sec->_raw_size = core.c_datasize;
+ sec->size = core.c_datasize;
sec->vma = core.c_dataorg;
sec->filepos = core.c_data;
@@ -186,7 +186,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
- sec->_raw_size = ldinfo.ldinfo_datasize;
+ sec->size = ldinfo.ldinfo_datasize;
sec->vma = ldinfo.ldinfo_dataorg;
sec->filepos = ldinfo.ldinfo_core;
}
@@ -214,7 +214,7 @@ xcoff64_core_p (abfd)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
- sec->_raw_size = vminfo.vminfo_size;
+ sec->size = vminfo.vminfo_size;
sec->vma = vminfo.vminfo_addr;
sec->filepos = vminfo.vminfo_offset;
}
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index 052e93829e0..9277bc086e5 100644
--- a/bfd/aout-adobe.c
+++ b/bfd/aout-adobe.c
@@ -1,6 +1,6 @@
/* BFD back-end for a.out.adobe binaries.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support. Based on bout.c.
@@ -201,8 +201,8 @@ aout_adobe_callback (abfd)
default:
(*_bfd_error_handler)
- (_("%s: Unknown section type in a.out.adobe file: %x\n"),
- bfd_archive_filename (abfd), ext->e_type[0]);
+ (_("%B: Unknown section type in a.out.adobe file: %x\n"),
+ abfd, ext->e_type[0]);
goto no_more_sections;
}
@@ -235,10 +235,9 @@ aout_adobe_callback (abfd)
/* Now set the section's attributes. */
bfd_set_section_flags (abfd, sect, flags);
/* Assumed big-endian. */
- sect->_raw_size = ((ext->e_size[0] << 8)
- | ext->e_size[1] << 8
- | ext->e_size[2]);
- sect->_cooked_size = sect->_raw_size;
+ sect->size = ((ext->e_size[0] << 8)
+ | ext->e_size[1] << 8
+ | ext->e_size[2]);
sect->vma = H_GET_32 (abfd, ext->e_virtbase);
sect->filepos = H_GET_32 (abfd, ext->e_filebase);
/* FIXME XXX alignment? */
@@ -324,19 +323,19 @@ aout_adobe_write_object_contents (abfd)
{
if (sect->flags & SEC_CODE)
{
- exec_hdr (abfd)->a_text += sect->_raw_size;
+ exec_hdr (abfd)->a_text += sect->size;
exec_hdr (abfd)->a_trsize += sect->reloc_count *
sizeof (struct reloc_std_external);
}
else if (sect->flags & SEC_DATA)
{
- exec_hdr (abfd)->a_data += sect->_raw_size;
+ exec_hdr (abfd)->a_data += sect->size;
exec_hdr (abfd)->a_drsize += sect->reloc_count *
sizeof (struct reloc_std_external);
}
else if (sect->flags & SEC_ALLOC && !(sect->flags & SEC_LOAD))
{
- exec_hdr (abfd)->a_bss += sect->_raw_size;
+ exec_hdr (abfd)->a_bss += sect->size;
}
}
@@ -435,7 +434,7 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count)
{
sect->filepos = section_start;
/* FIXME: Round to alignment. */
- section_start += sect->_raw_size;
+ section_start += sect->size;
}
}
@@ -445,7 +444,7 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count)
{
sect->filepos = section_start;
/* FIXME: Round to alignment. */
- section_start += sect->_raw_size;
+ section_start += sect->size;
}
}
@@ -456,7 +455,7 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count)
{
sect->filepos = section_start;
/* FIXME: Round to alignment. */
- section_start += sect->_raw_size;
+ section_start += sect->size;
}
}
}
@@ -517,7 +516,10 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore)
#define aout_32_bfd_relax_section bfd_generic_relax_section
#define aout_32_bfd_gc_sections bfd_generic_gc_sections
#define aout_32_bfd_merge_sections bfd_generic_merge_sections
+#define aout_32_bfd_is_group_section bfd_generic_is_group_section
#define aout_32_bfd_discard_group bfd_generic_discard_group
+#define aout_32_section_already_linked \
+ _bfd_generic_section_already_linked
#define aout_32_bfd_link_hash_table_create \
_bfd_generic_link_hash_table_create
#define aout_32_bfd_link_hash_table_free \
diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c
index 4d1e48d7bf4..26502a43693 100644
--- a/bfd/aout-cris.c
+++ b/bfd/aout-cris.c
@@ -1,5 +1,5 @@
/* BFD backend for CRIS a.out binaries.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson.
@@ -248,10 +248,10 @@ MY(swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
if (r_type > 2)
{
- (*_bfd_error_handler) (_("%s: Invalid relocation type imported: %d"),
- bfd_archive_filename (abfd), r_type);
+ (*_bfd_error_handler) (_("%B: Invalid relocation type imported: %d"),
+ abfd, r_type);
- bfd_set_error(bfd_error_wrong_format);
+ bfd_set_error (bfd_error_wrong_format);
}
cache_ptr->howto = howto_table_ext + r_type;
@@ -259,8 +259,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
if (r_extern && r_index > symcount)
{
(*_bfd_error_handler)
- (_("%s: Bad relocation record imported: %d"),
- bfd_archive_filename (abfd), r_index);
+ (_("%B: Bad relocation record imported: %d"), abfd, r_index);
bfd_set_error (bfd_error_wrong_format);
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index d8cad54708d..a1697043550 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -1,6 +1,6 @@
/* Define a target vector and some small routines for a variant of a.out.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,7 +46,7 @@ MY(callback) (abfd)
unsigned long arch_align;
/* Calculate the file positions of the parts of a newly read aout header */
- obj_textsec (abfd)->_raw_size = N_TXTSIZE(*execp);
+ obj_textsec (abfd)->size = N_TXTSIZE(*execp);
/* The virtual memory addresses of the sections */
obj_textsec (abfd)->vma = N_TXTADDR(*execp);
@@ -110,12 +110,12 @@ MY(callback) (abfd)
of the section. */
arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
arch_align = 1 << arch_align_power;
- if ((BFD_ALIGN (obj_textsec (abfd)->_raw_size, arch_align)
- == obj_textsec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_datasec (abfd)->_raw_size, arch_align)
- == obj_datasec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_bsssec (abfd)->_raw_size, arch_align)
- == obj_bsssec (abfd)->_raw_size))
+ if ((BFD_ALIGN (obj_textsec (abfd)->size, arch_align)
+ == obj_textsec (abfd)->size)
+ && (BFD_ALIGN (obj_datasec (abfd)->size, arch_align)
+ == obj_datasec (abfd)->size)
+ && (BFD_ALIGN (obj_bsssec (abfd)->size, arch_align)
+ == obj_bsssec (abfd)->size))
{
obj_textsec (abfd)->alignment_power = arch_align_power;
obj_datasec (abfd)->alignment_power = arch_align_power;
@@ -513,9 +513,16 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef MY_bfd_is_group_section
+#define MY_bfd_is_group_section bfd_generic_is_group_section
+#endif
#ifndef MY_bfd_discard_group
#define MY_bfd_discard_group bfd_generic_discard_group
#endif
+#ifndef MY_section_already_linked
+#define MY_section_already_linked \
+ _bfd_generic_section_already_linked
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
#endif
@@ -556,6 +563,10 @@ MY_bfd_final_link (abfd, info)
#define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
+#ifndef MY_bfd_copy_private_header_data
+#define MY_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
+#endif
+
#ifndef MY_bfd_print_private_bfd_data
#define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#endif
@@ -584,6 +595,10 @@ MY_bfd_final_link (abfd, info)
#define MY_canonicalize_dynamic_symtab \
_bfd_nodynamic_canonicalize_dynamic_symtab
#endif
+#ifndef MY_get_synthetic_symtab
+#define MY_get_synthetic_symtab \
+ _bfd_nodynamic_get_synthetic_symtab
+#endif
#ifndef MY_get_dynamic_reloc_upper_bound
#define MY_get_dynamic_reloc_upper_bound \
_bfd_nodynamic_get_dynamic_reloc_upper_bound
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index 1f37b995d7b..a9c06ff3b4e 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -1,5 +1,6 @@
/* BFD back-end for TMS320C30 a.out binaries.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@@ -337,7 +338,7 @@ tic30_aout_callback (abfd)
unsigned long arch_align;
/* Calculate the file positions of the parts of a newly read aout header. */
- obj_textsec (abfd)->_raw_size = N_TXTSIZE (*execp);
+ obj_textsec (abfd)->size = N_TXTSIZE (*execp);
/* The virtual memory addresses of the sections. */
obj_textsec (abfd)->vma = N_TXTADDR (*execp);
@@ -375,12 +376,12 @@ tic30_aout_callback (abfd)
of the section. */
arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
arch_align = 1 << arch_align_power;
- if ((BFD_ALIGN (obj_textsec (abfd)->_raw_size, arch_align)
- == obj_textsec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_datasec (abfd)->_raw_size, arch_align)
- == obj_datasec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_bsssec (abfd)->_raw_size, arch_align)
- == obj_bsssec (abfd)->_raw_size))
+ if ((BFD_ALIGN (obj_textsec (abfd)->size, arch_align)
+ == obj_textsec (abfd)->size)
+ && (BFD_ALIGN (obj_datasec (abfd)->size, arch_align)
+ == obj_datasec (abfd)->size)
+ && (BFD_ALIGN (obj_bsssec (abfd)->size, arch_align)
+ == obj_bsssec (abfd)->size))
{
obj_textsec (abfd)->alignment_power = arch_align_power;
obj_datasec (abfd)->alignment_power = arch_align_power;
@@ -402,7 +403,7 @@ tic30_aout_final_link_relocate (howto, input_bfd, input_section, contents,
{
bfd_vma relocation;
- if (address > input_section->_raw_size)
+ if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
relocation = value + addend;
@@ -756,8 +757,8 @@ MY_bfd_final_link (abfd, info)
obj_textsec (abfd)->filepos = pos;
obj_textsec (abfd)->vma = vma;
obj_textsec (abfd)->user_set_vma = 1;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
if (abfd->flags & D_PAGED)
@@ -779,14 +780,14 @@ MY_bfd_final_link (abfd, info)
vma = obj_datasec (abfd)->vma;
obj_datasec (abfd)->filepos = vma + adata (abfd).exec_bytes_size;
execp->a_text = vma - obj_textsec (abfd)->vma;
- obj_textsec (abfd)->_raw_size = execp->a_text;
+ obj_textsec (abfd)->size = execp->a_text;
/* Since BSS follows data immediately, see if it needs alignment. */
- vma += obj_datasec (abfd)->_raw_size;
+ vma += obj_datasec (abfd)->size;
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
- obj_datasec (abfd)->_raw_size += pad;
- pos += obj_datasec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
+ obj_datasec (abfd)->size += pad;
+ pos += obj_datasec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
/* BSS. */
obj_bsssec (abfd)->vma = vma;
@@ -969,9 +970,16 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef MY_bfd_is_group_section
+#define MY_bfd_is_group_section bfd_generic_is_group_section
+#endif
#ifndef MY_bfd_discard_group
#define MY_bfd_discard_group bfd_generic_discard_group
#endif
+#ifndef MY_section_already_linked
+#define MY_section_already_linked \
+ _bfd_generic_section_already_linked
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
#endif
@@ -1012,6 +1020,10 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
+#ifndef MY_bfd_copy_private_header_data
+#define MY_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
+#endif
+
#ifndef MY_bfd_print_private_bfd_data
#define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#endif
@@ -1040,6 +1052,10 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#define MY_canonicalize_dynamic_symtab \
_bfd_nodynamic_canonicalize_dynamic_symtab
#endif
+#ifndef MY_get_synthetic_symtab
+#define MY_get_synthetic_symtab \
+ _bfd_nodynamic_get_synthetic_symtab
+#endif
#ifndef MY_get_dynamic_reloc_upper_bound
#define MY_get_dynamic_reloc_upper_bound \
_bfd_nodynamic_get_dynamic_reloc_upper_bound
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index 352dadf4e54..eb5b2f935aa 100644
--- a/bfd/aoutf1.h
+++ b/bfd/aoutf1.h
@@ -1,6 +1,6 @@
/* A.out "format 1" file handling code for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -701,10 +701,10 @@ sunos4_core_file_p (abfd)
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
- core_stacksec (abfd)->_raw_size = core->c_ssize;
- core_datasec (abfd)->_raw_size = core->c_dsize;
- core_regsec (abfd)->_raw_size = core->c_regs_size;
- core_reg2sec (abfd)->_raw_size = core->fp_stuff_size;
+ core_stacksec (abfd)->size = core->c_ssize;
+ core_datasec (abfd)->size = core->c_dsize;
+ core_regsec (abfd)->size = core->c_regs_size;
+ core_reg2sec (abfd)->size = core->fp_stuff_size;
core_stacksec (abfd)->vma = (core->c_stacktop - core->c_ssize);
core_datasec (abfd)->vma = core->c_data_addr;
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 3282f87dfe2..4fa529cf507 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1,6 +1,6 @@
/* BFD semi-generic back-end for a.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -541,8 +541,8 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
if (! NAME(aout,make_sections) (abfd))
goto error_ret;
- obj_datasec (abfd)->_raw_size = execp->a_data;
- obj_bsssec (abfd)->_raw_size = execp->a_bss;
+ obj_datasec (abfd)->size = execp->a_data;
+ obj_bsssec (abfd)->size = execp->a_bss;
obj_textsec (abfd)->flags =
(execp->a_trsize != 0
@@ -568,7 +568,6 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
struct exec *execp = exec_hdr (abfd);
obj_textsec (abfd)->size = N_TXTSIZE (*execp);
- obj_textsec (abfd)->raw_size = N_TXTSIZE (*execp);
/* Data and bss are already filled in since they're so standard. */
/* The virtual memory addresses of the sections. */
@@ -632,7 +631,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
if (execp->a_entry != 0
|| (execp->a_entry >= obj_textsec (abfd)->vma
&& execp->a_entry < (obj_textsec (abfd)->vma
- + obj_textsec (abfd)->_raw_size)))
+ + obj_textsec (abfd)->size)))
abfd->flags |= EXEC_P;
#ifdef STAT_FOR_EXEC
else
@@ -831,6 +830,10 @@ NAME(aout,machine_type) (arch, machine, unknown)
arch_flags = M_CRIS;
break;
+ case bfd_arch_m88k:
+ *unknown = FALSE;
+ break;
+
default:
arch_flags = M_UNKNOWN;
}
@@ -907,8 +910,8 @@ adjust_o_magic (abfd, execp)
else
vma = obj_textsec (abfd)->vma;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
@@ -916,7 +919,7 @@ adjust_o_magic (abfd, execp)
#if 0 /* ?? Does alignment in the file image really matter? */
pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
#endif
- obj_textsec (abfd)->_raw_size += pad;
+ obj_textsec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_datasec (abfd)->vma = vma;
@@ -924,8 +927,8 @@ adjust_o_magic (abfd, execp)
else
vma = obj_datasec (abfd)->vma;
obj_datasec (abfd)->filepos = pos;
- pos += obj_datasec (abfd)->_raw_size;
- vma += obj_datasec (abfd)->_raw_size;
+ pos += obj_datasec (abfd)->size;
+ vma += obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
@@ -933,7 +936,7 @@ adjust_o_magic (abfd, execp)
#if 0
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
#endif
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_bsssec (abfd)->vma = vma;
@@ -946,16 +949,16 @@ adjust_o_magic (abfd, execp)
pad = obj_bsssec (abfd)->vma - vma;
if (pad > 0)
{
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
}
}
obj_bsssec (abfd)->filepos = pos;
/* Fix up the exec header. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
+ execp->a_bss = obj_bsssec (abfd)->size;
N_SET_MAGIC (*execp, OMAGIC);
}
@@ -1005,7 +1008,7 @@ adjust_z_magic (abfd, execp)
/* Find start of data. */
if (ztih)
{
- text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
}
else
@@ -1013,18 +1016,18 @@ adjust_z_magic (abfd, execp)
/* Note that if page_size == zmagic_disk_block_size, then
filepos == page_size, and this case is the same as the ztih
case. */
- text_end = obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
text_end += obj_textsec (abfd)->filepos;
}
- obj_textsec (abfd)->_raw_size += text_pad;
+ obj_textsec (abfd)->size += text_pad;
text_end += text_pad;
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
{
bfd_vma vma;
- vma = obj_textsec (abfd)->vma + obj_textsec (abfd)->_raw_size;
+ vma = obj_textsec (abfd)->vma + obj_textsec (abfd)->size;
obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
}
if (abdp && abdp->zmagic_mapped_contiguous)
@@ -1032,17 +1035,17 @@ adjust_z_magic (abfd, execp)
asection * text = obj_textsec (abfd);
asection * data = obj_datasec (abfd);
- text_pad = data->vma - (text->vma + text->_raw_size);
+ text_pad = data->vma - (text->vma + text->size);
/* Only pad the text section if the data
section is going to be placed after it. */
if (text_pad > 0)
- text->_raw_size += text_pad;
+ text->size += text_pad;
}
obj_datasec (abfd)->filepos = (obj_textsec (abfd)->filepos
- + obj_textsec (abfd)->_raw_size);
+ + obj_textsec (abfd)->size);
/* Fix up exec header while we're at it. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
execp->a_text += adata (abfd).exec_bytes_size;
if (obj_aout_subformat (abfd) == q_magic_format)
@@ -1051,17 +1054,17 @@ adjust_z_magic (abfd, execp)
N_SET_MAGIC (*execp, ZMAGIC);
/* Spec says data section should be rounded up to page boundary. */
- obj_datasec (abfd)->_raw_size
- = align_power (obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->size
+ = align_power (obj_datasec (abfd)->size,
obj_bsssec (abfd)->alignment_power);
- execp->a_data = BFD_ALIGN (obj_datasec (abfd)->_raw_size,
+ execp->a_data = BFD_ALIGN (obj_datasec (abfd)->size,
adata (abfd).page_size);
- data_pad = execp->a_data - obj_datasec (abfd)->_raw_size;
+ data_pad = execp->a_data - obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
obj_bsssec (abfd)->vma = (obj_datasec (abfd)->vma
- + obj_datasec (abfd)->_raw_size);
+ + obj_datasec (abfd)->size);
/* If the BSS immediately follows the data section and extra space
in the page is left after the data section, fudge data
in the header so that the bss section looks smaller by that
@@ -1070,11 +1073,11 @@ adjust_z_magic (abfd, execp)
could have explicitly set the BSS vma to immediately follow
the data section.) */
if (align_power (obj_bsssec (abfd)->vma, obj_bsssec (abfd)->alignment_power)
- == obj_datasec (abfd)->vma + obj_datasec (abfd)->_raw_size)
- execp->a_bss = (data_pad > obj_bsssec (abfd)->_raw_size
- ? 0 : obj_bsssec (abfd)->_raw_size - data_pad);
+ == obj_datasec (abfd)->vma + obj_datasec (abfd)->size)
+ execp->a_bss = (data_pad > obj_bsssec (abfd)->size
+ ? 0 : obj_bsssec (abfd)->size - data_pad);
else
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_bss = obj_bsssec (abfd)->size;
}
static void
@@ -1092,8 +1095,8 @@ adjust_n_magic (abfd, execp)
obj_textsec (abfd)->vma = vma;
else
vma = obj_textsec (abfd)->vma;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
obj_datasec (abfd)->filepos = pos;
@@ -1102,10 +1105,10 @@ adjust_n_magic (abfd, execp)
vma = obj_datasec (abfd)->vma;
/* Since BSS follows data immediately, see if it needs alignment. */
- vma += obj_datasec (abfd)->_raw_size;
+ vma += obj_datasec (abfd)->size;
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
- obj_datasec (abfd)->_raw_size += pad;
- pos += obj_datasec (abfd)->_raw_size;
+ obj_datasec (abfd)->size += pad;
+ pos += obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
@@ -1114,9 +1117,9 @@ adjust_n_magic (abfd, execp)
vma = obj_bsssec (abfd)->vma;
/* Fix up exec header. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
+ execp->a_bss = obj_bsssec (abfd)->size;
N_SET_MAGIC (*execp, NMAGIC);
}
@@ -1134,11 +1137,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
if (adata (abfd).magic != undecided_magic)
return TRUE;
- obj_textsec (abfd)->_raw_size =
- align_power (obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->size =
+ align_power (obj_textsec (abfd)->size,
obj_textsec (abfd)->alignment_power);
- *text_size = obj_textsec (abfd)->_raw_size;
+ *text_size = obj_textsec (abfd)->size;
/* Rule (heuristic) for when to pad to a new page. Note that there
are (at least) two ways demand-paged (ZMAGIC) files have been
handled. Most Berkeley-based systems start the text segment at
@@ -1176,11 +1179,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
}
str;
}),
- obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->size,
obj_textsec (abfd)->alignment_power,
- obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->size,
obj_datasec (abfd)->alignment_power,
- obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size,
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->size,
obj_bsssec (abfd)->alignment_power);
#endif
#endif
@@ -1202,11 +1205,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
#ifdef BFD_AOUT_DEBUG
fprintf (stderr, " text=<%x,%x,%x> data=<%x,%x,%x> bss=<%x,%x>\n",
- obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->size,
obj_textsec (abfd)->filepos,
- obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->size,
obj_datasec (abfd)->filepos,
- obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size);
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->size);
#endif
return TRUE;
@@ -1580,8 +1583,8 @@ translate_from_native_sym_flags (abfd, cache_ptr)
reloc->next = section->constructor_chain;
section->constructor_chain = reloc;
- reloc->relent.address = section->_raw_size;
- section->_raw_size += BYTES_IN_WORD;
+ reloc->relent.address = section->size;
+ section->size += BYTES_IN_WORD;
reloc->relent.howto = CTOR_TABLE_RELOC_HOWTO (abfd);
@@ -3784,10 +3787,10 @@ NAME(aout,final_link) (abfd, info, callback)
if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
- sz = bfd_section_size (sub, obj_textsec (sub));
+ sz = obj_textsec (sub)->size;
if (sz > max_contents_size)
max_contents_size = sz;
- sz = bfd_section_size (sub, obj_datasec (sub));
+ sz = obj_datasec (sub)->size;
if (sz > max_contents_size)
max_contents_size = sz;
@@ -4742,7 +4745,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
PTR relocs;
/* Get the section contents. */
- input_size = bfd_section_size (input_bfd, input_section);
+ input_size = input_section->size;
if (! bfd_get_section_contents (input_bfd, input_section,
(PTR) finfo->contents,
(file_ptr) 0, input_size))
diff --git a/bfd/archive.c b/bfd/archive.c
index ba6e684ee23..ec8a086df99 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1,24 +1,24 @@
/* BFD back-end for archive files (libraries).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-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. */
/*
@setfilename archive-info
@@ -221,7 +221,7 @@ bfd_get_next_mapent (bfd *abfd, symindex prev, carsym **entry)
return prev;
}
-/* To be called by backends only */
+/* To be called by backends only. */
bfd *
_bfd_create_empty_archive_element_shell (bfd *obfd)
@@ -261,7 +261,8 @@ _bfd_look_for_bfd_in_cache (bfd *arch_bfd, file_ptr filepos)
return NULL;
}
-/* Kind of stupid to call cons for each one, but we don't do too many */
+/* Kind of stupid to call cons for each one, but we don't do too many. */
+
bfd_boolean
_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
{
@@ -316,8 +317,7 @@ get_extended_arelt_filename (bfd *arch, const char *name)
Presumes the file pointer is already in the right place (ie pointing
to the ar_hdr in the file). Moves the file pointer; on success it
should be pointing to the front of the file contents; on failure it
- could have been moved arbitrarily.
-*/
+ could have been moved arbitrarily. */
void *
_bfd_generic_read_ar_hdr (bfd *abfd)
@@ -467,6 +467,12 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
struct areltdata *new_areldata;
bfd *n_nfd;
+ if (archive->my_archive)
+ {
+ filepos += archive->origin;
+ archive = archive->my_archive;
+ }
+
n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
if (n_nfd)
return n_nfd;
@@ -549,10 +555,12 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
else
{
unsigned int size = arelt_size (last_file);
+ filestart = last_file->origin + size;
+ if (archive->my_archive)
+ filestart -= archive->origin;
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd size. */
- filestart = last_file->origin + size;
filestart += filestart % 2;
}
@@ -670,7 +678,7 @@ bfd_generic_archive_p (bfd *abfd)
/* The size of the string count. */
#define BSD_STRING_COUNT_SIZE 4
-/* Returns FALSE on error, TRUE otherwise */
+/* Returns FALSE on error, TRUE otherwise. */
static bfd_boolean
do_slurp_bsd_armap (bfd *abfd)
@@ -901,8 +909,8 @@ bfd_slurp_armap (bfd *abfd)
return TRUE;
}
-/* Returns FALSE on error, TRUE otherwise */
-/* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
+/* Returns FALSE on error, TRUE otherwise. */
+/* Flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
header is in a slightly different order and the map name is '/'.
This flavour is used by hp300hpux. */
@@ -932,7 +940,7 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd)
return FALSE;
if (!strncmp (nextname, "__.SYMDEF ", 16)
- || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
+ || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
if (strncmp (nextname, "/ ", 16))
@@ -1296,7 +1304,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
return TRUE;
}
-/** A couple of functions for creating ar_hdrs */
+/* A couple of functions for creating ar_hdrs. */
#ifdef HPUX_LARGE_AR_IDS
/* Function to encode large UID/GID values according to HP. */
@@ -1765,9 +1773,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
bfd *current;
file_ptr elt_no = 0;
struct orl *map = NULL;
- unsigned int orl_max = 1024; /* fine initial default */
+ unsigned int orl_max = 1024; /* Fine initial default. */
unsigned int orl_count = 0;
- int stridx = 0; /* string index */
+ int stridx = 0;
asymbol **syms = NULL;
long syms_max = 0;
bfd_boolean ret;
@@ -1916,7 +1924,7 @@ bsd_write_armap (bfd *arch,
unsigned int mapsize = ranlibsize + stringsize + 8;
file_ptr firstreal;
bfd *current = arch->archive_head;
- bfd *last_elt = current; /* last element arch seen */
+ bfd *last_elt = current; /* Last element arch seen. */
bfd_byte temp[4];
unsigned int count;
struct ar_hdr hdr;
@@ -1960,7 +1968,7 @@ bsd_write_armap (bfd *arch,
current = current->next;
}
while (current != map[count].u.abfd);
- } /* if new archive element */
+ }
last_elt = current;
H_PUT_32 (arch, map[count].namidx, buf);
@@ -2058,8 +2066,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
symbol name 0
symbol name 1
- symbol name n-1
-*/
+ symbol name n-1 */
bfd_boolean
coff_write_armap (bfd *arch,
@@ -2104,7 +2111,6 @@ coff_write_armap (bfd *arch,
(((char *) (&hdr))[i]) = ' ';
/* Write the ar header for this item and the number of symbols. */
-
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return FALSE;
diff --git a/bfd/archures.c b/bfd/archures.c
index f75be843866..4904b624830 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -85,6 +85,11 @@ DESCRIPTION
.#define bfd_mach_mcf5307 11
.#define bfd_mach_mcf5407 12
.#define bfd_mach_mcf528x 13
+.#define bfd_mach_mcfv4e 14
+.#define bfd_mach_mcf521x 15
+.#define bfd_mach_mcf5249 16
+.#define bfd_mach_mcf547x 17
+.#define bfd_mach_mcf548x 18
. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
@@ -123,6 +128,9 @@ DESCRIPTION
.#define bfd_mach_sparc_v9_p(mach) \
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
. && (mach) != bfd_mach_sparc_sparclite_le)
+.{* Nonzero if MACH is a 64 bit sparc architecture. *}
+.#define bfd_mach_sparc_64bit_p(mach) \
+. ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
@@ -224,8 +232,11 @@ DESCRIPTION
.#define bfd_mach_sh 1
.#define bfd_mach_sh2 0x20
.#define bfd_mach_sh_dsp 0x2d
+.#define bfd_mach_sh2a 0x2a
+.#define bfd_mach_sh2a_nofpu 0x2b
.#define bfd_mach_sh2e 0x2e
.#define bfd_mach_sh3 0x30
+.#define bfd_mach_sh3_nommu 0x31
.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
.#define bfd_mach_sh4 0x40
@@ -309,6 +320,8 @@ DESCRIPTION
.#define bfd_mach_avr5 5
. bfd_arch_cr16c, {* National Semiconductor CompactRISC. *}
.#define bfd_mach_cr16c 1
+. bfd_arch_crx, {* National Semiconductor CRX. *}
+.#define bfd_mach_crx 1
. bfd_arch_cris, {* Axis CRIS *}
. bfd_arch_s390, {* IBM s390 *}
.#define bfd_mach_s390_31 31
@@ -379,6 +392,7 @@ extern const bfd_arch_info_type bfd_arm_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_cr16c_arch;
extern const bfd_arch_info_type bfd_cris_arch;
+extern const bfd_arch_info_type bfd_crx_arch;
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_dlx_arch;
@@ -440,6 +454,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_avr_arch,
&bfd_cr16c_arch,
&bfd_cris_arch,
+ &bfd_crx_arch,
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_dlx_arch,
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 9ad727eda56..da4c9746c2e 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -308,7 +308,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
+#define bfd_section_size(bfd, ptr) ((ptr)->size)
+#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
@@ -320,6 +321,10 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+/* Find the address one past the end of SEC. */
+#define bfd_get_section_limit(bfd, sec) \
+ (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
+ / bfd_octets_per_byte (bfd))
typedef struct stat stat_type;
@@ -433,6 +438,24 @@ extern void bfd_hash_traverse
bfd_boolean (*) (struct bfd_hash_entry *, void *),
void *info);
+/* Allows the default size of a hash table to be configured. New hash
+ tables allocated using bfd_hash_table_init will be created with
+ this size. */
+extern void bfd_hash_set_default_size (bfd_size_type);
+
+/* This structure is used to keep track of stabs in sections
+ information while linking. */
+
+struct stab_info
+{
+ /* A hash table used to hold stabs strings. */
+ struct bfd_strtab_hash *strings;
+ /* The header file hash table. */
+ struct bfd_hash_table includes;
+ /* The first .stabstr section. */
+ struct bfd_section *stabstr;
+};
+
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
/* User program access to BFD facilities. */
@@ -505,6 +528,8 @@ extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
+extern bfd_boolean bfd_cache_close_all (void);
+
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
@@ -534,6 +559,9 @@ void bfd_putl16 (bfd_vma, void *);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
/* Externally visible ECOFF routines. */
@@ -587,8 +615,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where);
-extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -602,7 +628,9 @@ struct bfd_link_needed_list
enum dynamic_lib_link_class {
DYN_NORMAL = 0,
DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2
+ DYN_DT_NEEDED = 2,
+ DYN_NO_ADD_NEEDED = 4,
+ DYN_NO_NEEDED = 8
};
extern bfd_boolean bfd_elf_record_link_assignment
@@ -620,6 +648,8 @@ extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
(bfd *, int);
+extern int bfd_elf_get_dyn_lib_class
+ (bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_info
@@ -670,8 +700,6 @@ extern struct bfd_section *_bfd_elf_tls_setup
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* SunOS shared library support routines for the linker. */
@@ -786,7 +814,7 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int, int);
+ (bfd *, struct bfd_link_info *, int, int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
@@ -822,3 +850,23 @@ extern void bfd_elf32_ia64_after_parse
extern void bfd_elf64_ia64_after_parse
(int);
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
+
+struct coff_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* The local symbol table index of the symbol associated with a
+ comdat section. This is only meaningful to the object file format
+ specific code; it is not an index into the list returned by
+ bfd_canonicalize_symtab. */
+ long symbol;
+};
+
+extern struct coff_comdat_info *bfd_coff_get_comdat_section
+ (bfd *, struct bfd_section *);
+
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c2e18194be8..8e732b77432 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -315,7 +315,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
+#define bfd_section_size(bfd, ptr) ((ptr)->size)
+#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
@@ -327,6 +328,10 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+/* Find the address one past the end of SEC. */
+#define bfd_get_section_limit(bfd, sec) \
+ (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
+ / bfd_octets_per_byte (bfd))
typedef struct stat stat_type;
@@ -440,6 +445,24 @@ extern void bfd_hash_traverse
bfd_boolean (*) (struct bfd_hash_entry *, void *),
void *info);
+/* Allows the default size of a hash table to be configured. New hash
+ tables allocated using bfd_hash_table_init will be created with
+ this size. */
+extern void bfd_hash_set_default_size (bfd_size_type);
+
+/* This structure is used to keep track of stabs in sections
+ information while linking. */
+
+struct stab_info
+{
+ /* A hash table used to hold stabs strings. */
+ struct bfd_strtab_hash *strings;
+ /* The header file hash table. */
+ struct bfd_hash_table includes;
+ /* The first .stabstr section. */
+ struct bfd_section *stabstr;
+};
+
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
/* User program access to BFD facilities. */
@@ -512,6 +535,8 @@ extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
+extern bfd_boolean bfd_cache_close_all (void);
+
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
@@ -541,6 +566,9 @@ void bfd_putl16 (bfd_vma, void *);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
/* Externally visible ECOFF routines. */
@@ -594,8 +622,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where);
-extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -609,7 +635,9 @@ struct bfd_link_needed_list
enum dynamic_lib_link_class {
DYN_NORMAL = 0,
DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2
+ DYN_DT_NEEDED = 2,
+ DYN_NO_ADD_NEEDED = 4,
+ DYN_NO_NEEDED = 8
};
extern bfd_boolean bfd_elf_record_link_assignment
@@ -627,6 +655,8 @@ extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
(bfd *, int);
+extern int bfd_elf_get_dyn_lib_class
+ (bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_info
@@ -677,8 +707,6 @@ extern struct bfd_section *_bfd_elf_tls_setup
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* SunOS shared library support routines for the linker. */
@@ -793,7 +821,7 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int, int);
+ (bfd *, struct bfd_link_info *, int, int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
@@ -829,6 +857,26 @@ extern void bfd_elf32_ia64_after_parse
extern void bfd_elf64_ia64_after_parse
(int);
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
+
+struct coff_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* The local symbol table index of the symbol associated with a
+ comdat section. This is only meaningful to the object file format
+ specific code; it is not an index into the list returned by
+ bfd_canonicalize_symtab. */
+ long symbol;
+};
+
+extern struct coff_comdat_info *bfd_coff_get_comdat_section
+ (bfd *, struct bfd_section *);
+
/* Extracted from init.c. */
void bfd_init (void);
@@ -839,6 +887,18 @@ bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
bfd *bfd_openstreamr (const char *, const char *, void *);
+bfd *bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open) (struct bfd *nbfd,
+ void *open_closure),
+ void *open_closure,
+ file_ptr (*pread) (struct bfd *nbfd,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset),
+ int (*close) (struct bfd *nbfd,
+ void *stream));
+
bfd *bfd_openw (const char *filename, const char *target);
bfd_boolean bfd_close (bfd *abfd);
@@ -982,23 +1042,6 @@ long bfd_get_size (bfd *abfd);
/* Extracted from bfdwin.c. */
/* Extracted from section.c. */
-/* This structure is used for a comdat section, as in PE. A comdat
- section is associated with a particular symbol. When the linker
- sees a comdat section, it keeps only one of the sections with a
- given name and associated with a given symbol. */
-
-struct bfd_comdat_info
-{
- /* The name of the symbol associated with a comdat section. */
- const char *name;
-
- /* The local symbol table index of the symbol associated with a
- comdat section. This is only meaningful to the object file format
- specific code; it is not an index into the list returned by
- bfd_canonicalize_symtab. */
- long symbol;
-};
-
typedef struct bfd_section
{
/* The name of the section; the name isn't a copy, the pointer is
@@ -1197,9 +1240,6 @@ typedef struct bfd_section
/* See the vma field. */
unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
-
/* A mark flag used by some of the linker backends. */
unsigned int linker_mark : 1;
@@ -1227,21 +1267,18 @@ typedef struct bfd_section
unsigned int use_rela_p:1;
/* Bits used by various backends. */
- unsigned int has_tls_reloc:1;
- /* Nonzero if this section needs the relax finalize pass. */
- unsigned int need_finalize_relax:1;
+ /* Nonzero if this section has TLS related relocations. */
+ unsigned int has_tls_reloc:1;
/* Nonzero if this section has a gp reloc. */
unsigned int has_gp_reloc:1;
- /* Unused bits. */
- unsigned int flag13:1;
- unsigned int flag14:1;
- unsigned int flag15:1;
- unsigned int flag16:4;
- unsigned int flag20:4;
- unsigned int flag24:8;
+ /* Nonzero if this section needs the relax finalize pass. */
+ unsigned int need_finalize_relax:1;
+
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
/* End of internal packed boolean fields. */
@@ -1260,13 +1297,18 @@ typedef struct bfd_section
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). This will be filled in after relocation. */
- bfd_size_type _cooked_size;
+ size of <<.bss>>). */
+ bfd_size_type size;
- /* The original size on disk of the section, in octets. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
- bfd_size_type _raw_size;
+ /* For input sections, the original size on disk of the section, in
+ octets. This field is used by the linker relaxation code. It is
+ currently only set for sections where the linker relaxation scheme
+ doesn't cache altered section and reloc contents (stabs, eh_frame,
+ SEC_MERGE, some coff relaxing targets), and thus the original size
+ needs to be kept to read the section multiple times.
+ For output sections, rawsize holds the section size calculated on
+ a previous linker relaxation pass. */
+ bfd_size_type rawsize;
/* If this section is going to be output, then this value is the
offset in *bytes* into the output section of the first byte in the
@@ -1323,9 +1365,6 @@ typedef struct bfd_section
/* Entity size for merging purposes. */
unsigned int entsize;
- /* Optional information about a COMDAT entry; NULL if not COMDAT. */
- struct bfd_comdat_info *comdat;
-
/* Points to the kept section if this section is a link-once section,
and is discarded. */
struct bfd_section *kept_section;
@@ -1390,11 +1429,6 @@ extern const struct bfd_symbol * const bfd_abs_symbol;
extern const struct bfd_symbol * const bfd_com_symbol;
extern const struct bfd_symbol * const bfd_und_symbol;
extern const struct bfd_symbol * const bfd_ind_symbol;
-#define bfd_get_section_size_before_reloc(section) \
- ((section)->_raw_size)
-#define bfd_get_section_size_after_reloc(section) \
- ((section)->reloc_done ? (section)->_cooked_size \
- : (abort (), (bfd_size_type) 1))
/* Macros to handle insertion and deletion of a bfd's sections. These
only handle the list pointers, ie. do not adjust section_count,
@@ -1425,6 +1459,12 @@ void bfd_section_list_clear (bfd *);
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
+asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
char *bfd_get_unique_section_name
(bfd *abfd, const char *templat, int *count);
@@ -1442,6 +1482,11 @@ void bfd_map_over_sections
void (*func) (bfd *abfd, asection *sect, void *obj),
void *obj);
+asection *bfd_sections_find_if
+ (bfd *abfd,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
bfd_boolean bfd_set_section_size
(bfd *abfd, asection *sec, bfd_size_type val);
@@ -1453,6 +1498,9 @@ bfd_boolean bfd_get_section_contents
(bfd *abfd, asection *section, void *location, file_ptr offset,
bfd_size_type count);
+bfd_boolean bfd_malloc_and_get_section
+ (bfd *abfd, asection *section, bfd_byte **buf);
+
bfd_boolean bfd_copy_private_section_data
(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
@@ -1462,6 +1510,8 @@ bfd_boolean bfd_copy_private_section_data
void _bfd_strip_section_from_output
(struct bfd_link_info *info, asection *section);
+bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
+
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
/* Extracted from archures.c. */
@@ -1483,6 +1533,11 @@ enum bfd_architecture
#define bfd_mach_mcf5307 11
#define bfd_mach_mcf5407 12
#define bfd_mach_mcf528x 13
+#define bfd_mach_mcfv4e 14
+#define bfd_mach_mcf521x 15
+#define bfd_mach_mcf5249 16
+#define bfd_mach_mcf547x 17
+#define bfd_mach_mcf548x 18
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -1521,6 +1576,9 @@ enum bfd_architecture
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
&& (mach) != bfd_mach_sparc_sparclite_le)
+/* Nonzero if MACH is a 64 bit sparc architecture. */
+#define bfd_mach_sparc_64bit_p(mach) \
+ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -1622,8 +1680,11 @@ enum bfd_architecture
#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
+#define bfd_mach_sh2a 0x2a
+#define bfd_mach_sh2a_nofpu 0x2b
#define bfd_mach_sh2e 0x2e
#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3_nommu 0x31
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
@@ -1707,6 +1768,8 @@ enum bfd_architecture
#define bfd_mach_avr5 5
bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
#define bfd_mach_cr16c 1
+ bfd_arch_crx, /* National Semiconductor CRX. */
+#define bfd_mach_crx 1
bfd_arch_cris, /* Axis CRIS */
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
@@ -2027,6 +2090,9 @@ The 24-bit relocation is used in some Intel 960 configurations. */
BFD_RELOC_12_PCREL,
BFD_RELOC_8_PCREL,
+/* Section relative relocations. Some targets need this for DWARF2. */
+ BFD_RELOC_32_SECREL,
+
/* For ELF. */
BFD_RELOC_32_GOT_PCREL,
BFD_RELOC_16_GOT_PCREL,
@@ -2277,12 +2343,6 @@ to compensate for the borrow when the low bits are added. */
/* Low 16 bits. */
BFD_RELOC_LO16,
-/* Like BFD_RELOC_HI16_S, but PC relative. */
- BFD_RELOC_PCREL_HI16_S,
-
-/* Like BFD_RELOC_LO16, but PC relative. */
- BFD_RELOC_PCREL_LO16,
-
/* Relocation against a MIPS literal section. */
BFD_RELOC_MIPS_LITERAL,
@@ -2579,9 +2639,27 @@ field in the instruction. */
BFD_RELOC_ARM_GOTOFF,
BFD_RELOC_ARM_GOTPC,
+/* Pc-relative or absolute relocation depending on target. Used for
+entries in .init_array sections. */
+ BFD_RELOC_ARM_TARGET1,
+
+/* Read-only segment base relative address. */
+ BFD_RELOC_ARM_ROSEGREL32,
+
+/* Data segment base relative address. */
+ BFD_RELOC_ARM_SBREL32,
+
/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
BFD_RELOC_SH_PCDISP8BY2,
BFD_RELOC_SH_PCDISP12BY2,
+ BFD_RELOC_SH_IMM3,
+ BFD_RELOC_SH_IMM3U,
+ BFD_RELOC_SH_DISP12,
+ BFD_RELOC_SH_DISP12BY2,
+ BFD_RELOC_SH_DISP12BY4,
+ BFD_RELOC_SH_DISP12BY8,
+ BFD_RELOC_SH_DISP20,
+ BFD_RELOC_SH_DISP20BY8,
BFD_RELOC_SH_IMM4,
BFD_RELOC_SH_IMM4BY2,
BFD_RELOC_SH_IMM4BY4,
@@ -2793,6 +2871,9 @@ add3, load, and store instructions. */
BFD_RELOC_M32R_JMP_SLOT,
BFD_RELOC_M32R_RELATIVE,
BFD_RELOC_M32R_GOTOFF,
+ BFD_RELOC_M32R_GOTOFF_HI_ULO,
+ BFD_RELOC_M32R_GOTOFF_HI_SLO,
+ BFD_RELOC_M32R_GOTOFF_LO,
BFD_RELOC_M32R_GOTPC24,
BFD_RELOC_M32R_GOT16_HI_ULO,
BFD_RELOC_M32R_GOT16_HI_SLO,
@@ -3387,6 +3468,28 @@ This is the 5 bits of a value. */
BFD_RELOC_16C_IMM32,
BFD_RELOC_16C_IMM32_C,
+/* NS CRX Relocations. */
+ BFD_RELOC_CRX_REL4,
+ BFD_RELOC_CRX_REL8,
+ BFD_RELOC_CRX_REL8_CMP,
+ BFD_RELOC_CRX_REL16,
+ BFD_RELOC_CRX_REL24,
+ BFD_RELOC_CRX_REL32,
+ BFD_RELOC_CRX_REGREL12,
+ BFD_RELOC_CRX_REGREL22,
+ BFD_RELOC_CRX_REGREL28,
+ BFD_RELOC_CRX_REGREL32,
+ BFD_RELOC_CRX_ABS16,
+ BFD_RELOC_CRX_ABS32,
+ BFD_RELOC_CRX_NUM8,
+ BFD_RELOC_CRX_NUM16,
+ BFD_RELOC_CRX_NUM32,
+ BFD_RELOC_CRX_IMM16,
+ BFD_RELOC_CRX_IMM32,
+ BFD_RELOC_CRX_SWITCH8,
+ BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32,
+
/* These relocs are only used within the CRIS assembler. They are not
(at present) written to any object files. */
BFD_RELOC_CRIS_BDISP8,
@@ -3484,6 +3587,8 @@ This is the 5 bits of a value. */
BFD_RELOC_MSP430_16,
BFD_RELOC_MSP430_16_PCREL_BYTE,
BFD_RELOC_MSP430_16_BYTE,
+ BFD_RELOC_MSP430_2X_PCREL,
+ BFD_RELOC_MSP430_RL_PCREL,
/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
@@ -3705,14 +3810,10 @@ struct bfd
/* A pointer to the target jump table. */
const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
- includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
- and MTIME as a "long". Their correct types, to which they
- are cast when used, are "FILE *" and "time_t". The iostream
- is the result of an fopen on the filename. However, if the
- BFD_IN_MEMORY flag is set, then iostream is actually a pointer
- to a bfd_in_memory struct. */
+ /* The IOSTREAM, and corresponding IO vector that provide access
+ to the file backing the BFD. */
void *iostream;
+ const struct bfd_iovec *iovec;
/* Is the file descriptor being cached? That is, can it be closed as
needed, and re-opened when accessed later? */
@@ -3902,8 +4003,6 @@ void bfd_set_error_program_name (const char *);
bfd_error_handler_type bfd_get_error_handler (void);
-const char *bfd_archive_filename (bfd *);
-
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
long bfd_canonicalize_reloc
@@ -3926,6 +4025,11 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i);
bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
+bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+
+#define bfd_copy_private_header_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_copy_private_header_data, \
+ (ibfd, obfd))
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
#define bfd_copy_private_bfd_data(ibfd, obfd) \
@@ -3974,6 +4078,9 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+#define bfd_is_group_section(abfd, sec) \
+ BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
+
#define bfd_discard_group(abfd, sec) \
BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
@@ -4004,6 +4111,10 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
+#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
+ BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
+ dyncount, dynsyms, ret))
+
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
@@ -4200,6 +4311,7 @@ typedef struct bfd_target
NAME##_bfd_merge_private_bfd_data, \
NAME##_bfd_copy_private_section_data, \
NAME##_bfd_copy_private_symbol_data, \
+ NAME##_bfd_copy_private_header_data, \
NAME##_bfd_set_private_flags, \
NAME##_bfd_print_private_bfd_data
@@ -4217,6 +4329,10 @@ typedef struct bfd_target
to another. */
bfd_boolean (*_bfd_copy_private_symbol_data)
(bfd *, asymbol *, bfd *, asymbol *);
+ /* Called to copy BFD private header data from one object file
+ to another. */
+ bfd_boolean (*_bfd_copy_private_header_data)
+ (bfd *, bfd *);
/* Called to set private backend flags. */
bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
@@ -4341,7 +4457,9 @@ typedef struct bfd_target
NAME##_bfd_link_split_section, \
NAME##_bfd_gc_sections, \
NAME##_bfd_merge_sections, \
- NAME##_bfd_discard_group
+ NAME##_bfd_is_group_section, \
+ NAME##_bfd_discard_group, \
+ NAME##_section_already_linked \
int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
bfd_byte * (*_bfd_get_relocated_section_contents)
@@ -4378,13 +4496,21 @@ typedef struct bfd_target
/* Attempt to merge SEC_MERGE sections. */
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
+ /* Is this section a member of a group? */
+ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
+
/* Discard members of a group. */
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
+ /* Check if SEC has been already linked during a reloceatable or
+ final link. */
+ void (*_section_already_linked) (bfd *, struct bfd_section *);
+
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
NAME##_get_dynamic_symtab_upper_bound, \
NAME##_canonicalize_dynamic_symtab, \
+ NAME##_get_synthetic_symtab, \
NAME##_get_dynamic_reloc_upper_bound, \
NAME##_canonicalize_dynamic_reloc
@@ -4393,6 +4519,10 @@ typedef struct bfd_target
/* Read in the dynamic symbols. */
long (*_bfd_canonicalize_dynamic_symtab)
(bfd *, struct bfd_symbol **);
+ /* Create synthetized symbols. */
+ long (*_bfd_get_synthetic_symtab)
+ (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
+ struct bfd_symbol **);
/* Get the amount of memory required to hold the dynamic relocs. */
long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
/* Read in the dynamic relocs. */
@@ -4434,6 +4564,11 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
#define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
+void bfd_section_already_linked (bfd *abfd, asection *sec);
+
+#define bfd_section_already_linked(abfd, sec) \
+ BFD_SEND (abfd, _section_already_linked, (abfd, sec))
+
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
diff --git a/bfd/bfd.c b/bfd/bfd.c
index d37a48bc23b..8ebc81a9953 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -45,14 +45,10 @@ CODE_FRAGMENT
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
.
-. {* To avoid dragging too many header files into every file that
-. includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
-. and MTIME as a "long". Their correct types, to which they
-. are cast when used, are "FILE *" and "time_t". The iostream
-. is the result of an fopen on the filename. However, if the
-. BFD_IN_MEMORY flag is set, then iostream is actually a pointer
-. to a bfd_in_memory struct. *}
+. {* The IOSTREAM, and corresponding IO vector that provide access
+. to the file backing the BFD. *}
. void *iostream;
+. const struct bfd_iovec *iovec;
.
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
@@ -410,23 +406,152 @@ CODE_FRAGMENT
static const char *_bfd_error_program_name;
-/* This is the default routine to handle BFD error messages. */
+/* This is the default routine to handle BFD error messages.
+ Like fprintf (stderr, ...), but also handles some extra format specifiers.
-static void
-_bfd_default_error_handler (const char *s, ...)
+ %A section name from section. For group components, print group name too.
+ %B file name from bfd. For archive components, prints archive too.
+ */
+
+void
+_bfd_default_error_handler (const char *fmt, ...)
{
- va_list p;
+ va_list ap;
+ char *bufp;
+ const char *new_fmt, *p;
+ size_t avail = 1000;
+ char buf[1000];
if (_bfd_error_program_name != NULL)
fprintf (stderr, "%s: ", _bfd_error_program_name);
else
fprintf (stderr, "BFD: ");
- va_start (p, s);
- vfprintf (stderr, s, p);
- va_end (p);
+ va_start (ap, fmt);
+ new_fmt = fmt;
+ bufp = buf;
+
+ /* Reserve enough space for the existing format string. */
+ avail -= strlen (fmt) + 1;
+ if (avail > 1000)
+ abort ();
+
+ p = fmt;
+ while (1)
+ {
+ char *q;
+ size_t len, extra, trim;
+
+ p = strchr (p, '%');
+ if (p == NULL || p[1] == '\0')
+ {
+ if (new_fmt == buf)
+ {
+ len = strlen (fmt);
+ memcpy (bufp, fmt, len + 1);
+ }
+ break;
+ }
+
+ if (p[1] == 'A' || p[1] == 'B')
+ {
+ len = p - fmt;
+ memcpy (bufp, fmt, len);
+ bufp += len;
+ fmt = p + 2;
+ new_fmt = buf;
+
+ /* If we run out of space, tough, you lose your ridiculously
+ long file or section name. It's not safe to try to alloc
+ memory here; We might be printing an out of memory message. */
+ if (avail == 0)
+ {
+ *bufp++ = '*';
+ *bufp++ = '*';
+ *bufp = '\0';
+ }
+ else
+ {
+ if (p[1] == 'B')
+ {
+ bfd *abfd = va_arg (ap, bfd *);
+ if (abfd->my_archive)
+ snprintf (bufp, avail, "%s(%s)",
+ abfd->my_archive->filename, abfd->filename);
+ else
+ snprintf (bufp, avail, "%s", abfd->filename);
+ }
+ else
+ {
+ asection *sec = va_arg (ap, asection *);
+ bfd *abfd = sec->owner;
+ const char *group = NULL;
+ struct coff_comdat_info *ci;
+
+ if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && elf_next_in_group (sec) != NULL
+ && (sec->flags & SEC_GROUP) == 0)
+ group = elf_group_name (sec);
+ else if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && (ci = bfd_coff_get_comdat_section (sec->owner,
+ sec)) != NULL)
+ group = ci->name;
+ if (group != NULL)
+ snprintf (bufp, avail, "%s[%s]", sec->name, group);
+ else
+ snprintf (bufp, avail, "%s", sec->name);
+ }
+ len = strlen (bufp);
+ avail = avail - len + 2;
+
+ /* We need to replace any '%' we printed by "%%".
+ First count how many. */
+ q = bufp;
+ bufp += len;
+ extra = 0;
+ while ((q = strchr (q, '%')) != NULL)
+ {
+ ++q;
+ ++extra;
+ }
+
+ /* If there isn't room, trim off the end of the string. */
+ q = bufp;
+ bufp += extra;
+ if (extra > avail)
+ {
+ trim = extra - avail;
+ bufp -= trim;
+ do
+ {
+ if (*--q == '%')
+ --extra;
+ }
+ while (--trim != 0);
+ *q = '\0';
+ avail = extra;
+ }
+ avail -= extra;
+
+ /* Now double all '%' chars, shuffling the string as we go. */
+ while (extra != 0)
+ {
+ while ((q[extra] = *q) != '%')
+ --q;
+ q[--extra] = '%';
+ --q;
+ }
+ }
+ }
+ p = p + 2;
+ }
+
+ vfprintf (stderr, new_fmt, ap);
+ va_end (ap);
- fprintf (stderr, "\n");
+ putc ('\n', stderr);
}
/* This is a function pointer to the routine which should handle BFD
@@ -495,53 +620,6 @@ bfd_get_error_handler (void)
{
return _bfd_error_handler;
}
-
-/*
-FUNCTION
- bfd_archive_filename
-
-SYNOPSIS
- const char *bfd_archive_filename (bfd *);
-
-DESCRIPTION
- For a BFD that is a component of an archive, returns a string
- with both the archive name and file name. For other BFDs, just
- returns the file name.
-*/
-
-const char *
-bfd_archive_filename (bfd *abfd)
-{
- if (abfd->my_archive)
- {
- static size_t curr = 0;
- static char *buf;
- size_t needed;
-
- needed = (strlen (bfd_get_filename (abfd->my_archive))
- + strlen (bfd_get_filename (abfd)) + 3);
- if (needed > curr)
- {
- if (curr)
- free (buf);
- curr = needed + (needed >> 1);
- buf = bfd_malloc (curr);
- /* If we can't malloc, fail safe by returning just the file
- name. This function is only used when building error
- messages. */
- if (!buf)
- {
- curr = 0;
- return bfd_get_filename (abfd);
- }
- }
- sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd));
- return buf;
- }
- else
- return bfd_get_filename (abfd);
-}
/*
SECTION
@@ -766,12 +844,14 @@ bfd_get_sign_extend_vma (bfd *abfd)
name = bfd_get_target (abfd);
- /* Return a proper value for DJGPP COFF (an x86 COFF variant).
+ /* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
This function is required for DWARF2 support, but there is
no place to store this information in the COFF back end.
Should enough other COFF targets add support for DWARF2,
a place will have to be found. Until then, this hack will do. */
- if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0)
+ if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
+ || strcmp (name, "pe-i386") == 0
+ || strcmp (name, "pei-i386") == 0)
return 1;
bfd_set_error (bfd_error_wrong_format);
@@ -981,6 +1061,29 @@ bfd_scan_vma (const char *string, const char **end, int base)
/*
FUNCTION
+ bfd_copy_private_header_data
+
+SYNOPSIS
+ bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+
+DESCRIPTION
+ Copy private BFD header information from the BFD @var{ibfd} to the
+ the BFD @var{obfd}. This copies information that may require
+ sections to exist, but does not require symbol tables. Return
+ <<true>> on success, <<false>> on error.
+ Possible error returns are:
+
+ o <<bfd_error_no_memory>> -
+ Not enough memory exists to create private data for @var{obfd}.
+
+.#define bfd_copy_private_header_data(ibfd, obfd) \
+. BFD_SEND (obfd, _bfd_copy_private_header_data, \
+. (ibfd, obfd))
+
+*/
+
+/*
+FUNCTION
bfd_copy_private_bfd_data
SYNOPSIS
@@ -1082,6 +1185,9 @@ DESCRIPTION
.#define bfd_merge_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
.
+.#define bfd_is_group_section(abfd, sec) \
+. BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
+.
.#define bfd_discard_group(abfd, sec) \
. BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
.
@@ -1112,6 +1218,10 @@ DESCRIPTION
.#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
. BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
.
+.#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
+. BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
+. dyncount, dynsyms, ret))
+.
.#define bfd_get_dynamic_reloc_upper_bound(abfd) \
. BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
.
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index a90cb33ea5f..a7505270199 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -62,37 +62,41 @@ real_fseek (FILE *file, file_ptr offset, int whence)
#endif
}
-/* Note that archive entries don't have streams; they share their parent's.
- This allows someone to play with the iostream behind BFD's back.
+/*
+INTERNAL_DEFINITION
+ struct bfd_iovec
- Also, note that the origin pointer points to the beginning of a file's
- contents (0 for non-archive elements). For archive entries this is the
- first octet in the file, NOT the beginning of the archive header. */
+DESCRIPTION
-static size_t
-real_read (void *where, size_t a, size_t b, FILE *file)
-{
- /* FIXME - this looks like an optimization, but it's really to cover
- up for a feature of some OSs (not solaris - sigh) that
- ld/pe-dll.c takes advantage of (apparently) when it creates BFDs
- internally and tries to link against them. BFD seems to be smart
- enough to realize there are no symbol records in the "file" that
- doesn't exist but attempts to read them anyway. On Solaris,
- attempting to read zero bytes from a NULL file results in a core
- dump, but on other platforms it just returns zero bytes read.
- This makes it to something reasonable. - DJ */
- if (a == 0 || b == 0)
- return 0;
+ The <<struct bfd_iovec>> contains the internal file I/O class.
+ Each <<BFD>> has an instance of this class and all file I/O is
+ routed through it (it is assumed that the instance implements
+ all methods listed below).
+
+.struct bfd_iovec
+.{
+. {* To avoid problems with macros, a "b" rather than "f"
+. prefix is prepended to each method name. *}
+. {* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
+. bytes starting at PTR. Return the number of bytes actually
+. transfered (a read past end-of-file returns less than NBYTES),
+. or -1 (setting <<bfd_error>>) if an error occurs. *}
+. file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
+. file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
+. file_ptr nbytes);
+. {* Return the current IOSTREAM file offset, or -1 (setting <<bfd_error>>
+. if an error occurs. *}
+. file_ptr (*btell) (struct bfd *abfd);
+. {* For the following, on successful completion a value of 0 is returned.
+. Otherwise, a value of -1 is returned (and <<bfd_error>> is set). *}
+. int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
+. int (*bclose) (struct bfd *abfd);
+. int (*bflush) (struct bfd *abfd);
+. int (*bstat) (struct bfd *abfd, struct stat *sb);
+.};
+*/
-#if defined (__VAX) && defined (VMS)
- /* Apparently fread on Vax VMS does not keep the record length
- information. */
- return read (fileno (file), where, a * b);
-#else
- return fread (where, a, b, file);
-#endif
-}
/* Return value is amount read. */
@@ -121,25 +125,13 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
return get;
}
- nread = real_read (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ nread = abfd->iovec->bread (abfd, ptr, size);
+ else
+ nread = 0;
if (nread != (size_t) -1)
abfd->where += nread;
- /* Set bfd_error if we did not read as much data as we expected.
-
- If the read failed due to an error set the bfd_error_system_call,
- else set bfd_error_file_truncated.
-
- A BFD backend may wish to override bfd_error_file_truncated to
- provide something more useful (eg. no_symbols or wrong_format). */
- if (nread != size)
- {
- if (ferror (bfd_cache_lookup (abfd)))
- bfd_set_error (bfd_error_system_call);
- else
- bfd_set_error (bfd_error_file_truncated);
- }
-
return nread;
}
@@ -151,6 +143,7 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
struct bfd_in_memory *bim = abfd->iostream;
+
size = (size_t) size;
if (abfd->where + size > bim->size)
{
@@ -175,7 +168,11 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
return size;
}
- nwrote = fwrite (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ nwrote = abfd->iovec->bwrite (abfd, ptr, size);
+ else
+ nwrote = 0;
+
if (nwrote != (size_t) -1)
abfd->where += nwrote;
if (nwrote != size)
@@ -196,10 +193,16 @@ bfd_tell (bfd *abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return abfd->where;
- ptr = real_ftell (bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ {
+ ptr = abfd->iovec->btell (abfd);
+
+ if (abfd->my_archive)
+ ptr -= abfd->origin;
+ }
+ else
+ ptr = 0;
- if (abfd->my_archive)
- ptr -= abfd->origin;
abfd->where = ptr;
return ptr;
}
@@ -209,7 +212,10 @@ bfd_flush (bfd *abfd)
{
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return 0;
- return fflush (bfd_cache_lookup(abfd));
+
+ if (abfd->iovec)
+ return abfd->iovec->bflush (abfd);
+ return 0;
}
/* Returns 0 for success, negative value for failure (in which case
@@ -217,19 +223,16 @@ bfd_flush (bfd *abfd)
int
bfd_stat (bfd *abfd, struct stat *statbuf)
{
- FILE *f;
int result;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();
- f = bfd_cache_lookup (abfd);
- if (f == NULL)
- {
- bfd_set_error (bfd_error_system_call);
- return -1;
- }
- result = fstat (fileno (f), statbuf);
+ if (abfd->iovec)
+ result = abfd->iovec->bstat (abfd, statbuf);
+ else
+ result = -1;
+
if (result < 0)
bfd_set_error (bfd_error_system_call);
return result;
@@ -242,7 +245,6 @@ int
bfd_seek (bfd *abfd, file_ptr position, int direction)
{
int result;
- FILE *f;
file_ptr file_position;
/* For the time being, a BFD may not seek to it's end. The problem
is that we don't easily have a way to recognize the end of an
@@ -270,6 +272,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
(abfd->direction == both_direction))
{
bfd_size_type newsize, oldsize;
+
oldsize = (bim->size + 127) & ~(bfd_size_type) 127;
bim->size = abfd->where;
/* Round up to cut down on memory fragmentation */
@@ -328,12 +331,15 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
In the meantime, no optimization for archives. */
}
- f = bfd_cache_lookup (abfd);
file_position = position;
if (direction == SEEK_SET && abfd->my_archive != NULL)
file_position += abfd->origin;
- result = real_fseek (f, file_position, direction);
+ if (abfd->iovec)
+ result = abfd->iovec->bseek (abfd, file_position, direction);
+ else
+ result = -1;
+
if (result != 0)
{
int hold_errno = errno;
@@ -378,14 +384,15 @@ DESCRIPTION
long
bfd_get_mtime (bfd *abfd)
{
- FILE *fp;
struct stat buf;
if (abfd->mtime_set)
return abfd->mtime;
- fp = bfd_cache_lookup (abfd);
- if (0 != fstat (fileno (fp), &buf))
+ if (abfd->iovec == NULL)
+ return 0;
+
+ if (abfd->iovec->bstat (abfd, &buf) != 0)
return 0;
abfd->mtime = buf.st_mtime; /* Save value in case anyone wants it */
@@ -428,14 +435,15 @@ DESCRIPTION
long
bfd_get_size (bfd *abfd)
{
- FILE *fp;
struct stat buf;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return ((struct bfd_in_memory *) abfd->iostream)->size;
- fp = bfd_cache_lookup (abfd);
- if (0 != fstat (fileno (fp), & buf))
+ if (abfd->iovec == NULL)
+ return 0;
+
+ if (abfd->iovec->bstat (abfd, &buf) != 0)
return 0;
return buf.st_size;
diff --git a/bfd/binary.c b/bfd/binary.c
index 65f46afa39c..4335a28ed3b 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -1,6 +1,6 @@
/* BFD back-end for binary objects.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -99,7 +99,7 @@ binary_object_p (abfd)
return NULL;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
sec->vma = 0;
- sec->_raw_size = statbuf.st_size;
+ sec->size = statbuf.st_size;
sec->filepos = 0;
abfd->tdata.any = (PTR) sec;
@@ -200,7 +200,7 @@ binary_canonicalize_symtab (abfd, alocation)
/* End symbol. */
syms[1].the_bfd = abfd;
syms[1].name = mangle_name (abfd, "end");
- syms[1].value = sec->_raw_size;
+ syms[1].value = sec->size;
syms[1].flags = BSF_GLOBAL;
syms[1].section = sec;
syms[1].udata.p = NULL;
@@ -208,7 +208,7 @@ binary_canonicalize_symtab (abfd, alocation)
/* Size symbol. */
syms[2].the_bfd = abfd;
syms[2].name = mangle_name (abfd, "size");
- syms[2].value = sec->_raw_size;
+ syms[2].value = sec->size;
syms[2].flags = BSF_GLOBAL;
syms[2].section = bfd_abs_section_ptr;
syms[2].udata.p = NULL;
@@ -278,7 +278,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
if (((s->flags
& (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_NEVER_LOAD))
== (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC))
- && (s->_raw_size > 0)
+ && (s->size > 0)
&& (! found_low || s->lma < low))
{
low = s->lma;
@@ -294,7 +294,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
if ((s->flags
& (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_NEVER_LOAD))
!= (SEC_HAS_CONTENTS | SEC_ALLOC)
- || (s->_raw_size == 0))
+ || (s->size == 0))
continue;
/* If attempting to generate a binary file from a bfd with
@@ -339,7 +339,10 @@ binary_sizeof_headers (abfd, exec)
#define binary_bfd_relax_section bfd_generic_relax_section
#define binary_bfd_gc_sections bfd_generic_gc_sections
#define binary_bfd_merge_sections bfd_generic_merge_sections
+#define binary_bfd_is_group_section bfd_generic_is_group_section
#define binary_bfd_discard_group bfd_generic_discard_group
+#define binary_section_already_linked \
+ _bfd_generic_section_already_linked
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
diff --git a/bfd/bout.c b/bfd/bout.c
index a39a9a36a94..fe0c867fc58 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -200,7 +200,7 @@ b_out_callback (abfd)
obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
/* And reload the sizes, since the aout module zaps them. */
- obj_textsec (abfd)->_raw_size = execp->a_text;
+ obj_textsec (abfd)->size = execp->a_text;
bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section */
obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
@@ -294,9 +294,9 @@ b_out_write_object_contents (abfd)
exec_hdr (abfd)->a_info = BMAGIC;
- exec_hdr (abfd)->a_text = obj_textsec (abfd)->_raw_size;
- exec_hdr (abfd)->a_data = obj_datasec (abfd)->_raw_size;
- exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->_raw_size;
+ exec_hdr (abfd)->a_text = obj_textsec (abfd)->size;
+ exec_hdr (abfd)->a_data = obj_datasec (abfd)->size;
+ exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->size;
exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * sizeof (struct nlist);
exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
exec_hdr (abfd)->a_trsize = ((obj_textsec (abfd)->reloc_count) *
@@ -995,7 +995,7 @@ b_out_set_section_contents (abfd, section, location, offset, count)
obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
obj_datasec(abfd)->filepos = obj_textsec(abfd)->filepos
- + obj_textsec (abfd)->_raw_size;
+ + obj_textsec (abfd)->size;
}
/* Regardless, once we know what we're doing, we might as well get going. */
@@ -1285,7 +1285,7 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
}
}
}
- input_section->_cooked_size = input_section->_raw_size - shrink;
+ input_section->size -= shrink;
if (reloc_vector != NULL)
free (reloc_vector);
@@ -1328,14 +1328,12 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
- input_section->reloc_done = 1;
-
/* Read in the section. */
BFD_ASSERT (bfd_get_section_contents (input_bfd,
input_section,
data,
(bfd_vma) 0,
- input_section->_raw_size));
+ input_section->size));
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
@@ -1404,7 +1402,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
case ALIGNDONE:
BFD_ASSERT (reloc->addend >= src_address);
BFD_ASSERT ((bfd_vma) reloc->addend
- <= input_section->_raw_size);
+ <= input_section->size);
src_address = reloc->addend;
dst_address = ((dst_address + reloc->howto->size)
& ~reloc->howto->size);
@@ -1487,7 +1485,10 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
#define b_out_bfd_link_split_section _bfd_generic_link_split_section
#define b_out_bfd_gc_sections bfd_generic_gc_sections
#define b_out_bfd_merge_sections bfd_generic_merge_sections
+#define b_out_bfd_is_group_section bfd_generic_is_group_section
#define b_out_bfd_discard_group bfd_generic_discard_group
+#define b_out_section_already_linked \
+ _bfd_generic_section_already_linked
#define aout_32_get_section_contents_in_window \
_bfd_generic_get_section_contents_in_window
diff --git a/bfd/cache.c b/bfd/cache.c
index 7d056ea0cfa..0d6529b209f 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -44,6 +44,109 @@ SECTION
static bfd_boolean bfd_cache_delete (bfd *);
+
+static file_ptr
+cache_btell (struct bfd *abfd)
+{
+ return real_ftell (bfd_cache_lookup (abfd));
+}
+
+static int
+cache_bseek (struct bfd *abfd, file_ptr offset, int whence)
+{
+ return real_fseek (bfd_cache_lookup (abfd), offset, whence);
+}
+
+/* Note that archive entries don't have streams; they share their parent's.
+ This allows someone to play with the iostream behind BFD's back.
+
+ Also, note that the origin pointer points to the beginning of a file's
+ contents (0 for non-archive elements). For archive entries this is the
+ first octet in the file, NOT the beginning of the archive header. */
+
+static file_ptr
+cache_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+{
+ file_ptr nread;
+ /* FIXME - this looks like an optimization, but it's really to cover
+ up for a feature of some OSs (not solaris - sigh) that
+ ld/pe-dll.c takes advantage of (apparently) when it creates BFDs
+ internally and tries to link against them. BFD seems to be smart
+ enough to realize there are no symbol records in the "file" that
+ doesn't exist but attempts to read them anyway. On Solaris,
+ attempting to read zero bytes from a NULL file results in a core
+ dump, but on other platforms it just returns zero bytes read.
+ This makes it to something reasonable. - DJ */
+ if (nbytes == 0)
+ return 0;
+
+#if defined (__VAX) && defined (VMS)
+ /* Apparently fread on Vax VMS does not keep the record length
+ information. */
+ nread = read (fileno (bfd_cache_lookup (abfd)), buf, nbytes);
+ /* Set bfd_error if we did not read as much data as we expected. If
+ the read failed due to an error set the bfd_error_system_call,
+ else set bfd_error_file_truncated. */
+ if (nread == (file_ptr)-1)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return -1;
+ }
+#else
+ nread = fread (buf, 1, nbytes, bfd_cache_lookup (abfd));
+ /* Set bfd_error if we did not read as much data as we expected. If
+ the read failed due to an error set the bfd_error_system_call,
+ else set bfd_error_file_truncated. */
+ if (nread < nbytes && ferror (bfd_cache_lookup (abfd)))
+ {
+ bfd_set_error (bfd_error_system_call);
+ return -1;
+ }
+#endif
+ return nread;
+}
+
+static file_ptr
+cache_bwrite (struct bfd *abfd, const void *where, file_ptr nbytes)
+{
+ file_ptr nwrite = fwrite (where, 1, nbytes, bfd_cache_lookup (abfd));
+ if (nwrite < nbytes && ferror (bfd_cache_lookup (abfd)))
+ {
+ bfd_set_error (bfd_error_system_call);
+ return -1;
+ }
+ return nwrite;
+}
+
+static int
+cache_bclose (struct bfd *abfd)
+{
+ return bfd_cache_close (abfd);
+}
+
+static int
+cache_bflush (struct bfd *abfd)
+{
+ int sts = fflush (bfd_cache_lookup (abfd));
+ if (sts < 0)
+ bfd_set_error (bfd_error_system_call);
+ return sts;
+}
+
+static int
+cache_bstat (struct bfd *abfd, struct stat *sb)
+{
+ int sts = fstat (fileno (bfd_cache_lookup (abfd)), sb);
+ if (sts < 0)
+ bfd_set_error (bfd_error_system_call);
+ return sts;
+}
+
+static const struct bfd_iovec cache_iovec = {
+ &cache_bread, &cache_bwrite, &cache_btell, &cache_bseek,
+ &cache_bclose, &cache_bflush, &cache_bstat
+};
+
/*
INTERNAL_FUNCTION
BFD_CACHE_MAX_OPEN macro
@@ -86,9 +189,9 @@ bfd *bfd_last_cache;
otherwise, it has to perform the complicated lookup function.
.#define bfd_cache_lookup(x) \
- . ((x)==bfd_last_cache? \
- . (FILE*) (bfd_last_cache->iostream): \
- . bfd_cache_lookup_worker(x))
+ . ((x) == bfd_last_cache ? \
+ . (FILE *) (bfd_last_cache->iostream): \
+ . bfd_cache_lookup_worker (x))
*/
@@ -205,6 +308,7 @@ bfd_cache_init (bfd *abfd)
if (! close_one ())
return FALSE;
}
+ abfd->iovec = &cache_iovec;
insert (abfd);
++open_files;
return TRUE;
@@ -229,14 +333,44 @@ RETURNS
bfd_boolean
bfd_cache_close (bfd *abfd)
{
- if (abfd->iostream == NULL
- || (abfd->flags & BFD_IN_MEMORY) != 0)
+ if (abfd->iovec != &cache_iovec)
+ return TRUE;
+
+ if (abfd->iostream == NULL)
+ /* Previously closed. */
return TRUE;
return bfd_cache_delete (abfd);
}
/*
+FUNCTION
+ bfd_cache_close_all
+
+SYNOPSIS
+ bfd_boolean bfd_cache_close_all (void);
+
+DESCRIPTION
+ Remove all BFDs from the cache. If the attached file is open,
+ then close it too.
+
+RETURNS
+ <<FALSE>> is returned if closing one of the file fails, <<TRUE>> is
+ returned if all is well.
+*/
+
+bfd_boolean
+bfd_cache_close_all ()
+{
+ bfd_boolean ret = TRUE;
+
+ while (bfd_last_cache != NULL)
+ ret &= bfd_cache_close (bfd_last_cache);
+
+ return ret;
+}
+
+/*
INTERNAL_FUNCTION
bfd_open_file
@@ -331,7 +465,8 @@ DESCRIPTION
quick answer. Find a file descriptor for @var{abfd}. If
necessary, it open it. If there are already more than
<<BFD_CACHE_MAX_OPEN>> files open, it tries to close one first, to
- avoid running out of file descriptors.
+ avoid running out of file descriptors. It will abort rather than
+ returning NULL if it is unable to (re)open the @var{abfd}.
*/
FILE *
@@ -354,12 +489,10 @@ bfd_cache_lookup_worker (bfd *abfd)
}
else
{
- if (bfd_open_file (abfd) == NULL)
- return NULL;
- if (abfd->where != (unsigned long) abfd->where)
- return NULL;
- if (real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
- return NULL;
+ if (bfd_open_file (abfd) == NULL
+ || abfd->where != (unsigned long) abfd->where
+ || real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
+ abort ();
}
return (FILE *) abfd->iostream;
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index 6b3a71b0ab3..70ea03b7b46 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -1,5 +1,5 @@
/* BFD back-end for CISCO crash dumps.
- Copyright 1994, 1997, 1999, 2000, 2001, 2002
+ Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -246,7 +246,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
goto error_return;
asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
/* The size of memory is the size of the core file itself. */
- asect->_raw_size = statbuf.st_size;
+ asect->size = statbuf.st_size;
asect->vma = rambase;
asect->filepos = 0;
@@ -259,7 +259,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
asect->flags = SEC_HAS_CONTENTS;
asect->vma = 0;
asect->filepos = crashinfo_offset;
- asect->_raw_size = sizeof (crashinfo);
+ asect->size = sizeof (crashinfo);
/* Create a ".reg" section to allow access to the saved
registers. */
@@ -274,7 +274,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
choose a register section size that is either the remaining part
of the file, or 1024, whichever is smaller. */
nread = statbuf.st_size - asect->filepos;
- asect->_raw_size = (nread < 1024) ? nread : 1024;
+ asect->size = (nread < 1024) ? nread : 1024;
return abfd->xvec;
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index e9dd4169b22..2acb800cb5f 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1,6 +1,6 @@
/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -462,8 +462,8 @@ alpha_ecoff_object_p (abfd)
bfd_size_type size;
size = sec->line_filepos * 8;
- BFD_ASSERT (size == bfd_section_size (abfd, sec)
- || size + 8 == bfd_section_size (abfd, sec));
+ BFD_ASSERT (size == sec->size
+ || size + 8 == sec->size);
if (! bfd_set_section_size (abfd, sec, size))
return NULL;
}
@@ -768,6 +768,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
long reloc_count;
bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
bfd_vma gp;
+ bfd_size_type sz;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
@@ -778,14 +779,10 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
- if (! bfd_get_section_contents (input_bfd, input_section, data,
- (file_ptr) 0, input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (! bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* The section size is not going to change. */
- input_section->_cooked_size = input_section->_raw_size;
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd, input_section,
reloc_vector, symbols);
if (reloc_count < 0)
@@ -1455,7 +1452,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
amt = sizeof (struct ecoff_section_tdata);
lita_sec_data = ((struct ecoff_section_tdata *)
bfd_zalloc (input_bfd, amt));
- ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
+ lita_sec->used_by_bfd = lita_sec_data;
}
if (lita_sec_data->gp != 0)
@@ -1470,9 +1467,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_size_type lita_size;
lita_vma = lita_sec->output_offset + lita_sec->output_section->vma;
- lita_size = lita_sec->_cooked_size;
- if (lita_size == 0)
- lita_size = lita_sec->_raw_size;
+ lita_size = lita_sec->size;
if (gp == 0
|| lita_vma < gp - 0x8000
@@ -2359,7 +2354,10 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_ecoff_section_already_linked \
+ _bfd_generic_section_already_linked
const bfd_target ecoffalpha_little_vec =
{
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index e51d07d583c..1c3a7e3c395 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1,6 +1,6 @@
/* BFD back-end for ARM COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -1063,8 +1063,8 @@ find_thumb_glue (info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ _bfd_error_handler (_("%B: unable to find THUMB glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -1093,8 +1093,8 @@ find_arm_glue (info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ _bfd_error_handler (_("%B: unable to find ARM glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -1202,6 +1202,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc * rel;
struct internal_reloc * relend;
+ bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
rel = relocs;
relend = rel + input_section->reloc_count;
@@ -1394,16 +1395,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (h_sec->owner != NULL
&& INTERWORK_SET (h_sec->owner)
&& ! INTERWORK_FLAG (h_sec->owner))
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (h_sec->owner), name);
- _bfd_error_handler
- /* xgettext:c-format */
- (_(" first occurrence: %s: arm call to thumb"),
- bfd_archive_filename (input_bfd));
- }
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: arm call to thumb"),
+ h_sec->owner, input_bfd, name);
--my_offset;
myh->root.u.def.value = my_offset;
@@ -1489,18 +1485,12 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& INTERWORK_SET (h_sec->owner)
&& ! INTERWORK_FLAG (h_sec->owner)
&& ! globals->support_old_code)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (h_sec->owner), name);
- _bfd_error_handler
- /* xgettext:c-format */
- (_(" first occurrence: %s: thumb call to arm"),
- bfd_archive_filename (input_bfd));
- _bfd_error_handler
- (_(" consider relinking with --support-old-code enabled"));
- }
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: thumb call to arm\n"
+ " consider relinking with --support-old-code enabled"),
+ h_sec->owner, input_bfd, name);
-- my_offset;
myh->root.u.def.value = my_offset;
@@ -1636,7 +1626,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma address = rel->r_vaddr - input_section->vma;
- if (address > input_section->_raw_size)
+ if (address > high_address)
rstat = bfd_reloc_outofrange;
else
{
@@ -1794,10 +1784,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- (_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_archive_filename (input_bfd),
- (unsigned long) rel->r_vaddr,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: bad reloc address 0x%lx in section `%A'"),
+ input_bfd, input_section, (unsigned long) rel->r_vaddr);
return FALSE;
case bfd_reloc_overflow:
{
@@ -1858,7 +1846,7 @@ bfd_arm_allocate_interworking_sections (info)
memset (foo, test_char, (size_t) globals->arm_glue_size);
#endif
- s->_raw_size = s->_cooked_size = globals->arm_glue_size;
+ s->size = globals->arm_glue_size;
s->contents = foo;
}
@@ -1877,7 +1865,7 @@ bfd_arm_allocate_interworking_sections (info)
memset (foo, test_char, (size_t) globals->thumb_glue_size);
#endif
- s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
+ s->size = globals->thumb_glue_size;
s->contents = foo;
}
@@ -2138,8 +2126,8 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* If the index is outside of the range of our table, something has gone wrong. */
if (symndx >= obj_conv_table_size (abfd))
{
- _bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
- bfd_archive_filename (abfd), symndx);
+ _bfd_error_handler (_("%B: illegal symbol index in reloc: %d"),
+ abfd, symndx);
continue;
}
@@ -2271,9 +2259,10 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
{
_bfd_error_handler
/* xgettext: c-format */
- (_("ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
- bfd_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
- bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
+ (_("ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"),
+ ibfd, obfd,
+ APCS_26_FLAG (ibfd) ? 26 : 32,
+ APCS_26_FLAG (obfd) ? 26 : 32
);
bfd_set_error (bfd_error_wrong_format);
@@ -2286,13 +2275,12 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (APCS_FLOAT_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("ERROR: %s passes floats in float registers, whereas %s passes them in integer registers");
+ msg = _("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers");
else
/* xgettext: c-format */
- msg = _("ERROR: %s passes floats in integer registers, whereas %s passes them in float registers");
+ msg = _("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2304,12 +2292,11 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (PIC_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("ERROR: %s is compiled as position independent code, whereas target %s is absolute position");
+ msg = _("ERROR: %B is compiled as position independent code, whereas target %B is absolute position");
else
/* xgettext: c-format */
- msg = _("ERROR: %s is compiled as absolute position code, whereas target %s is position independent");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ msg = _("ERROR: %B is compiled as absolute position code, whereas target %B is position independent");
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2336,13 +2323,12 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (INTERWORK_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("Warning: %s supports interworking, whereas %s does not");
+ msg = _("Warning: %B supports interworking, whereas %B does not");
else
/* xgettext: c-format */
- msg = _("Warning: %s does not support interworking, whereas %s does");
+ msg = _("Warning: %B does not support interworking, whereas %B does");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
}
}
else
@@ -2437,12 +2423,12 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
{
if (flag)
/* xgettext: c-format */
- _bfd_error_handler (_("Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
- bfd_archive_filename (abfd));
+ _bfd_error_handler (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
+ abfd);
else
/* xgettext: c-format */
- _bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_archive_filename (abfd));
+ _bfd_error_handler (_("Warning: Clearing the interworking flag of %B due to outside request"),
+ abfd);
flag = 0;
}
@@ -2501,9 +2487,8 @@ coff_arm_copy_private_bfd_data (src, dest)
{
/* xgettext:c-format */
_bfd_error_handler (("\
-Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
- bfd_get_filename (dest),
- bfd_archive_filename (src));
+Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"),
+ dest, src);
}
SET_INTERWORK_FLAG (dest, 0);
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index e4d1399e31f..4cd8829f9a2 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -1231,7 +1231,7 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
vectors_sec->output_section,
vectors_sec->contents,
(file_ptr) vectors_sec->output_offset,
- vectors_sec->_raw_size);
+ vectors_sec->size);
break;
}
@@ -1394,11 +1394,11 @@ h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
case bfd_mach_h8300:
case bfd_mach_h8300hn:
case bfd_mach_h8300sn:
- htab->vectors_sec->_raw_size += 2;
+ htab->vectors_sec->size += 2;
break;
case bfd_mach_h8300h:
case bfd_mach_h8300s:
- htab->vectors_sec->_raw_size += 4;
+ htab->vectors_sec->size += 4;
break;
default:
abort ();
@@ -1414,14 +1414,14 @@ h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
/* Now actually allocate some space for the function vector. It's
wasteful to do this more than once, but this is easier. */
sec = htab->vectors_sec;
- if (sec->_raw_size != 0)
+ if (sec->size != 0)
{
/* Free the old contents. */
if (sec->contents)
free (sec->contents);
/* Allocate new contents. */
- sec->contents = bfd_malloc (sec->_raw_size);
+ sec->contents = bfd_malloc (sec->size);
}
return TRUE;
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index a24344ad8c3..65700b6038b 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -234,7 +234,24 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
EMPTY_HOWTO (012),
+#ifdef COFF_WITH_PE
+ /* 32-bit longword section relative relocation (013). */
+ HOWTO (R_SECREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_i386_reloc, /* special_function */
+ "secrel32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+#else
EMPTY_HOWTO (013),
+#endif
EMPTY_HOWTO (014),
EMPTY_HOWTO (015),
EMPTY_HOWTO (016),
@@ -497,6 +514,30 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
{
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
+
+ if (rel->r_type == R_SECREL32)
+ {
+ bfd_vma osect_vma;
+
+ if (h && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak))
+ osect_vma = h->root.u.def.section->output_section->vma;
+ else
+ {
+ asection *sec;
+ int i;
+
+ /* Sigh, the only way to get the section to offset against
+ is to find it the hard way. */
+
+ for (sec = abfd->sections, i = 1; i < sym->n_scnum; i++)
+ sec = sec->next;
+
+ osect_vma = sec->output_section->vma;
+ }
+
+ *addendp -= osect_vma;
+ }
#endif
return howto;
@@ -525,6 +566,10 @@ coff_i386_reloc_type_lookup (abfd, code)
return howto_table + R_RELBYTE;
case BFD_RELOC_8_PCREL:
return howto_table + R_PCRBYTE;
+#ifdef COFF_WITH_PE
+ case BFD_RELOC_32_SECREL:
+ return howto_table + R_SECREL32;
+#endif
default:
BFD_FAIL ();
return 0;
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index edc9f4e6a27..e18e30ba8ae 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel i860 COFF files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
@@ -607,8 +607,8 @@ i860_reloc_processing (arelent *cache_ptr, struct internal_reloc *dst,
if (dst->r_symndx < 0 || dst->r_symndx >= obj_conv_table_size (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_archive_filename (abfd), dst->r_symndx);
+ (_("%B: warning: illegal symbol index %ld in relocs"),
+ abfd, dst->r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 25569e3f249..7e0b28c5b78 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -1,5 +1,6 @@
/* BFD back-end for Motorola MCore COFF/PE
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -284,8 +285,8 @@ mcore_coff_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
{
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
- _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_archive_filename (abfd),
+ _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
+ abfd,
reloc_entry->howto->name,
reloc_entry->howto->type);
@@ -399,8 +400,8 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
&& output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
- (_("%s: compiled for a %s system and target is %s.\n"),
- bfd_archive_filename (input_bfd),
+ (_("%B: compiled for a %s system and target is %s.\n"),
+ input_bfd,
bfd_big_endian (input_bfd) ? _("big endian") : _("little endian"),
bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
@@ -506,21 +507,18 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
default:
- _bfd_error_handler (_("%s: unsupported relocation type 0x%02x"),
- bfd_archive_filename (input_bfd), r_type);
+ _bfd_error_handler (_("%B: unsupported relocation type 0x%02x"),
+ input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
case IMAGE_REL_MCORE_ABSOLUTE:
- fprintf (stderr,
- _("Warning: unsupported reloc %s <file %s, section %s>\n"),
- howto->name,
- bfd_archive_filename (input_bfd),
- input_section->name);
-
- fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
- rel->r_symndx, my_name, (long) rel->r_vaddr,
- (unsigned long) rel->r_vaddr);
+ _bfd_error_handler
+ (_("Warning: unsupported reloc %s <file %B, section %A>\n"
+ "sym %ld (%s), r_vaddr %ld (%lx)"),
+ input_bfd, input_section, howto->name,
+ rel->r_symndx, my_name, (long) rel->r_vaddr,
+ (unsigned long) rel->r_vaddr);
break;
case IMAGE_REL_MCORE_PCREL_IMM8BY4:
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index d6d82184234..39f7f22b8fa 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS Extended-Coff files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -57,28 +57,12 @@ static bfd_reloc_status_type mips_reflo_reloc
static bfd_reloc_status_type mips_gprel_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_relhi_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_rello_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_switch_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
static void mips_relocate_hi
PARAMS ((struct internal_reloc *refhi, struct internal_reloc *reflo,
bfd *input_bfd, asection *input_section, bfd_byte *contents,
- size_t adjust, bfd_vma relocation, bfd_boolean pcrel));
+ bfd_vma relocation));
static bfd_boolean mips_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
-static bfd_boolean mips_read_relocs
- PARAMS ((bfd *, asection *));
-static bfd_boolean mips_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean mips_relax_pcrel16
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- struct ecoff_link_hash_entry *, bfd_byte *, bfd_vma));
static reloc_howto_type *mips_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
@@ -243,10 +227,9 @@ static reloc_howto_type mips_howto_table[] =
EMPTY_HOWTO (10),
EMPTY_HOWTO (11),
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents a 16 bit PC
- relative reloc rightshifted twice as used in the MIPS branch
- instructions. */
+ /* FIXME: This relocation is used (internally only) to represent branches
+ when assembling. It should never appear in output files, and
+ be removed. (It used to be used for embedded-PIC support.) */
HOWTO (MIPS_R_PCREL16, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -260,92 +243,10 @@ static reloc_howto_type mips_howto_table[] =
0xffff, /* src_mask */
0xffff, /* dst_mask */
TRUE), /* pcrel_offset */
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents the high 16
- bits of a PC relative reloc. The next reloc must be
- MIPS_R_RELLO, and the addend is formed from the addends of the
- two instructions, just as in MIPS_R_REFHI and MIPS_R_REFLO. The
- final value is actually PC relative to the location of the
- MIPS_R_RELLO reloc, not the MIPS_R_RELHI reloc. */
- HOWTO (MIPS_R_RELHI, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- mips_relhi_reloc, /* special_function */
- "RELHI", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents the low 16
- bits of a PC relative reloc. */
- HOWTO (MIPS_R_RELLO, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_rello_reloc, /* special_function */
- "RELLO", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- EMPTY_HOWTO (15),
- EMPTY_HOWTO (16),
- EMPTY_HOWTO (17),
- EMPTY_HOWTO (18),
- EMPTY_HOWTO (19),
- EMPTY_HOWTO (20),
- EMPTY_HOWTO (21),
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents an entry in
- a switch table, which is the difference between two symbols in
- the .text section. The symndx is actually the offset from the
- reloc address to the subtrahend. See include/coff/mips.h for
- more details. */
- HOWTO (MIPS_R_SWITCH, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_switch_reloc, /* special_function */
- "SWITCH", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE) /* pcrel_offset */
};
#define MIPS_HOWTO_COUNT \
(sizeof mips_howto_table / sizeof mips_howto_table[0])
-
-/* When the linker is doing relaxing, it may change an external PCREL16
- reloc. This typically represents an instruction like
- bal foo
- We change it to
- .set noreorder
- bal $L1
- lui $at,%hi(foo - $L1)
- $L1:
- addiu $at,%lo(foo - $L1)
- addu $at,$at,$31
- jalr $at
- PCREL16_EXPANSION_ADJUSTMENT is the number of bytes this changes the
- instruction by. */
-
-#define PCREL16_EXPANSION_ADJUSTMENT (4 * 4)
/* See whether the magic number matches. */
@@ -418,25 +319,6 @@ mips_ecoff_swap_reloc_in (abfd, ext_ptr, intern)
<< RELOC_BITS3_TYPEHI_SH_LITTLE));
intern->r_extern = (ext->r_bits[3] & RELOC_BITS3_EXTERN_LITTLE) != 0;
}
-
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, r_symndx is actually the offset from the
- reloc address to the base of the difference (see
- include/coff/mips.h for more details). We copy symndx into the
- r_offset field so as not to confuse ecoff_slurp_reloc_table in
- ecoff.c. In adjust_reloc_in we then copy r_offset into the reloc
- addend. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELLO
- || intern->r_type == MIPS_R_RELHI)))
- {
- BFD_ASSERT (! intern->r_extern);
- intern->r_offset = intern->r_symndx;
- if (intern->r_offset & 0x800000)
- intern->r_offset -= 0x1000000;
- intern->r_symndx = RELOC_SECTION_TEXT;
- }
}
/* Swap a reloc out. */
@@ -453,20 +335,7 @@ mips_ecoff_swap_reloc_out (abfd, intern, dst)
BFD_ASSERT (intern->r_extern
|| (intern->r_symndx >= 0 && intern->r_symndx <= 12));
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELLO or
- MIPS_R_RELHI reloc, we actually want to write the contents of
- r_offset out as the symbol index. This undoes the change made by
- mips_ecoff_swap_reloc_in. */
- if (intern->r_type != MIPS_R_SWITCH
- && (intern->r_extern
- || (intern->r_type != MIPS_R_RELHI
- && intern->r_type != MIPS_R_RELLO)))
- r_symndx = intern->r_symndx;
- else
- {
- BFD_ASSERT (intern->r_symndx == RELOC_SECTION_TEXT);
- r_symndx = intern->r_offset & 0xffffff;
- }
+ r_symndx = intern->r_symndx;
H_PUT_32 (abfd, intern->r_vaddr, ext->r_vaddr);
if (bfd_header_big_endian (abfd))
@@ -501,7 +370,7 @@ mips_adjust_reloc_in (abfd, intern, rptr)
const struct internal_reloc *intern;
arelent *rptr;
{
- if (intern->r_type > MIPS_R_SWITCH)
+ if (intern->r_type > MIPS_R_PCREL16)
abort ();
if (! intern->r_extern
@@ -514,18 +383,6 @@ mips_adjust_reloc_in (abfd, intern, rptr)
if (intern->r_type == MIPS_R_IGNORE)
rptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, we want the addend field of the BFD relocto
- hold the value which was originally in the symndx field of the
- internal MIPS ECOFF reloc. This value was copied into
- intern->r_offset by mips_swap_reloc_in, and here we copy it into
- the addend field. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELHI
- || intern->r_type == MIPS_R_RELLO)))
- rptr->addend = intern->r_offset;
-
rptr->howto = &mips_howto_table[intern->r_type];
}
@@ -535,19 +392,9 @@ mips_adjust_reloc_in (abfd, intern, rptr)
static void
mips_adjust_reloc_out (abfd, rel, intern)
bfd *abfd ATTRIBUTE_UNUSED;
- const arelent *rel;
- struct internal_reloc *intern;
+ const arelent *rel ATTRIBUTE_UNUSED;
+ struct internal_reloc *intern ATTRIBUTE_UNUSED;
{
- /* For a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, we must copy rel->addend into
- intern->r_offset. This will then be written out as the symbol
- index by mips_ecoff_swap_reloc_out. This operation parallels the
- action of mips_adjust_reloc_in. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELHI
- || intern->r_type == MIPS_R_RELLO)))
- intern->r_offset = rel->addend;
}
/* ECOFF relocs are either against external symbols, or against
@@ -652,7 +499,7 @@ mips_refhi_reloc (abfd,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Save the information, and let REFLO do the actual relocation. */
@@ -850,7 +697,7 @@ mips_gprel_reloc (abfd,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
@@ -880,209 +727,6 @@ mips_gprel_reloc (abfd,
return bfd_reloc_ok;
}
-/* Do a RELHI relocation. We do this in conjunction with a RELLO
- reloc, just as REFHI and REFLO are done together. RELHI and RELLO
- are Cygnus extensions used when generating position independent
- code for embedded systems. */
-
-/* FIXME: This should not be a static variable. */
-
-static struct mips_hi *mips_relhi_list;
-
-static bfd_reloc_status_type
-mips_relhi_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_reloc_status_type ret;
- bfd_vma relocation;
- struct mips_hi *n;
-
- /* If this is a reloc against a section symbol, then it is correct
- in the object file. The only time we want to change this case is
- when we are relaxing, and that is handled entirely by
- mips_relocate_section and never calls this function. */
- if ((symbol->flags & BSF_SECTION_SYM) != 0)
- {
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* This is an external symbol. If we're relocating, we don't want
- to change anything. */
- if (output_bfd != (bfd *) NULL)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- ret = bfd_reloc_ok;
- if (bfd_is_und_section (symbol->section)
- && output_bfd == (bfd *) NULL)
- ret = bfd_reloc_undefined;
-
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
- relocation += reloc_entry->addend;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- /* Save the information, and let RELLO do the actual relocation. */
- n = (struct mips_hi *) bfd_malloc ((bfd_size_type) sizeof *n);
- if (n == NULL)
- return bfd_reloc_outofrange;
- n->addr = (bfd_byte *) data + reloc_entry->address;
- n->addend = relocation;
- n->next = mips_relhi_list;
- mips_relhi_list = n;
-
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
-
- return ret;
-}
-
-/* Do a RELLO relocation. This is a straightforward 16 bit PC
- relative relocation; this function exists in order to do the RELHI
- relocation described above. */
-
-static bfd_reloc_status_type
-mips_rello_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- if (mips_relhi_list != NULL)
- {
- struct mips_hi *l;
-
- l = mips_relhi_list;
- while (l != NULL)
- {
- unsigned long insn;
- unsigned long val;
- unsigned long vallo;
- struct mips_hi *next;
-
- /* Do the RELHI relocation. Note that we actually don't
- need to know anything about the RELLO itself, except
- where to find the low 16 bits of the addend needed by the
- RELHI. */
- insn = bfd_get_32 (abfd, l->addr);
- vallo = (bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address)
- & 0xffff);
- val = ((insn & 0xffff) << 16) + vallo;
- val += l->addend;
-
- /* If the symbol is defined, make val PC relative. If the
- symbol is not defined we don't want to do this, because
- we don't want the value in the object file to incorporate
- the address of the reloc. */
- if (! bfd_is_und_section (bfd_get_section (symbol))
- && ! bfd_is_com_section (bfd_get_section (symbol)))
- val -= (input_section->output_section->vma
- + input_section->output_offset
- + reloc_entry->address);
-
- /* The low order 16 bits are always treated as a signed
- value. Therefore, a negative value in the low order bits
- requires an adjustment in the high order bits. We need
- to make this adjustment in two ways: once for the bits we
- took from the data, and once for the bits we are putting
- back in to the data. */
- if ((vallo & 0x8000) != 0)
- val -= 0x10000;
- if ((val & 0x8000) != 0)
- val += 0x10000;
-
- insn = (insn &~ (unsigned) 0xffff) | ((val >> 16) & 0xffff);
- bfd_put_32 (abfd, (bfd_vma) insn, l->addr);
-
- next = l->next;
- free (l);
- l = next;
- }
-
- mips_relhi_list = NULL;
- }
-
- /* If this is a reloc against a section symbol, then it is correct
- in the object file. The only time we want to change this case is
- when we are relaxing, and that is handled entirely by
- mips_relocate_section and never calls this function. */
- if ((symbol->flags & BSF_SECTION_SYM) != 0)
- {
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* bfd_perform_relocation does not handle pcrel_offset relocations
- correctly when generating a relocatable file, so handle them
- directly here. */
- if (output_bfd != (bfd *) NULL)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* Now do the RELLO reloc in the usual way. */
- return mips_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-}
-
-/* This is the special function for the MIPS_R_SWITCH reloc. This
- special reloc is normally correct in the object file, and only
- requires special handling when relaxing. We don't want
- bfd_perform_relocation to tamper with it at all. */
-
-static bfd_reloc_status_type
-mips_switch_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
-{
- return bfd_reloc_ok;
-}
-
/* Get the howto structure for a generic reloc type. */
static reloc_howto_type *
@@ -1119,15 +763,6 @@ mips_bfd_reloc_type_lookup (abfd, code)
case BFD_RELOC_16_PCREL_S2:
mips_type = MIPS_R_PCREL16;
break;
- case BFD_RELOC_PCREL_HI16_S:
- mips_type = MIPS_R_RELHI;
- break;
- case BFD_RELOC_PCREL_LO16:
- mips_type = MIPS_R_RELLO;
- break;
- case BFD_RELOC_GPREL32:
- mips_type = MIPS_R_SWITCH;
- break;
default:
return (reloc_howto_type *) NULL;
}
@@ -1136,21 +771,19 @@ mips_bfd_reloc_type_lookup (abfd, code)
}
/* A helper routine for mips_relocate_section which handles the REFHI
- and RELHI relocations. The REFHI relocation must be followed by a
- REFLO relocation (and RELHI by a RELLO), and the addend used is
- formed from the addends of both instructions. */
+ relocations. The REFHI relocation must be followed by a REFLO
+ relocation, and the addend used is formed from the addends of both
+ instructions. */
static void
-mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
- relocation, pcrel)
+mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents,
+ relocation)
struct internal_reloc *refhi;
struct internal_reloc *reflo;
bfd *input_bfd;
asection *input_section;
bfd_byte *contents;
- size_t adjust;
bfd_vma relocation;
- bfd_boolean pcrel;
{
unsigned long insn;
unsigned long val;
@@ -1160,12 +793,12 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
return;
insn = bfd_get_32 (input_bfd,
- contents + adjust + refhi->r_vaddr - input_section->vma);
+ contents + refhi->r_vaddr - input_section->vma);
if (reflo == NULL)
vallo = 0;
else
vallo = (bfd_get_32 (input_bfd,
- contents + adjust + reflo->r_vaddr - input_section->vma)
+ contents + reflo->r_vaddr - input_section->vma)
& 0xffff);
val = ((insn & 0xffff) << 16) + vallo;
@@ -1179,17 +812,12 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
if ((vallo & 0x8000) != 0)
val -= 0x10000;
- if (pcrel)
- val -= (input_section->output_section->vma
- + input_section->output_offset
- + (reflo->r_vaddr - input_section->vma + adjust));
-
if ((val & 0x8000) != 0)
val += 0x10000;
insn = (insn &~ (unsigned) 0xffff) | ((val >> 16) & 0xffff);
bfd_put_32 (input_bfd, (bfd_vma) insn,
- contents + adjust + refhi->r_vaddr - input_section->vma);
+ contents + refhi->r_vaddr - input_section->vma);
}
/* Relocate a section while linking a MIPS ECOFF file. */
@@ -1208,8 +836,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp;
bfd_boolean gp_undefined;
- size_t adjust;
- long *offsets;
struct external_reloc *ext_rel;
struct external_reloc *ext_rel_end;
unsigned int i;
@@ -1270,13 +896,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
got_lo = FALSE;
- adjust = 0;
-
- if (ecoff_section_data (input_bfd, input_section) == NULL)
- offsets = NULL;
- else
- offsets = ecoff_section_data (input_bfd, input_section)->offsets;
-
ext_rel = (struct external_reloc *) external_relocs;
ext_rel_end = ext_rel + input_section->reloc_count;
for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
@@ -1301,17 +920,15 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (int_rel.r_type
< sizeof mips_howto_table / sizeof mips_howto_table[0]);
- /* The REFHI and RELHI relocs requires special handling. they
- must be followed by a REFLO or RELLO reloc, respectively, and
- the addend is formed from both relocs. */
- if (int_rel.r_type == MIPS_R_REFHI
- || int_rel.r_type == MIPS_R_RELHI)
+ /* The REFHI reloc requires special handling. It must be followed
+ by a REFLO reloc, and the addend is formed from both relocs. */
+ if (int_rel.r_type == MIPS_R_REFHI)
{
struct external_reloc *lo_ext_rel;
/* As a GNU extension, permit an arbitrary number of REFHI
- or RELHI relocs before the REFLO or RELLO reloc. This
- permits gcc to emit the HI and LO relocs itself. */
+ relocs before the REFLO reloc. This permits gcc to emit
+ the HI and LO relocs itself. */
for (lo_ext_rel = ext_rel + 1;
lo_ext_rel < ext_rel_end;
lo_ext_rel++)
@@ -1323,10 +940,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (lo_ext_rel < ext_rel_end
- && (lo_int_rel.r_type
- == (int_rel.r_type == MIPS_R_REFHI
- ? MIPS_R_REFLO
- : MIPS_R_RELLO))
+ && lo_int_rel.r_type == MIPS_R_REFLO
&& int_rel.r_extern == lo_int_rel.r_extern
&& int_rel.r_symndx == lo_int_rel.r_symndx)
{
@@ -1338,32 +952,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
howto = &mips_howto_table[int_rel.r_type];
- /* The SWITCH reloc must be handled specially. This reloc is
- marks the location of a difference between two portions of an
- object file. The symbol index does not reference a symbol,
- but is actually the offset from the reloc to the subtrahend
- of the difference. This reloc is correct in the object file,
- and needs no further adjustment, unless we are relaxing. If
- we are relaxing, we may have to add in an offset. Since no
- symbols are involved in this reloc, we handle it completely
- here. */
- if (int_rel.r_type == MIPS_R_SWITCH)
- {
- if (offsets != NULL
- && offsets[i] != 0)
- {
- r = _bfd_relocate_contents (howto, input_bfd,
- (bfd_vma) offsets[i],
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
- BFD_ASSERT (r == bfd_reloc_ok);
- }
-
- continue;
- }
-
if (int_rel.r_extern)
{
h = sym_hashes[int_rel.r_symndx];
@@ -1439,91 +1027,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- /* If we are relaxing, mips_relax_section may have set
- offsets[i] to some value. A value of 1 means we must expand
- a PC relative branch into a multi-instruction of sequence,
- and any other value is an addend. */
- if (offsets != NULL
- && offsets[i] != 0)
- {
- BFD_ASSERT (! info->relocatable);
- BFD_ASSERT (int_rel.r_type == MIPS_R_PCREL16
- || int_rel.r_type == MIPS_R_RELHI
- || int_rel.r_type == MIPS_R_RELLO);
- if (offsets[i] != 1)
- addend += offsets[i];
- else
- {
- bfd_byte *here;
-
- BFD_ASSERT (int_rel.r_extern
- && int_rel.r_type == MIPS_R_PCREL16);
-
- /* Move the rest of the instructions up. */
- here = (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma);
- memmove (here + PCREL16_EXPANSION_ADJUSTMENT, here,
- (size_t) (input_section->_raw_size
- - (int_rel.r_vaddr - input_section->vma)));
-
- /* Generate the new instructions. */
- if (! mips_relax_pcrel16 (info, input_bfd, input_section,
- h, here,
- (input_section->output_section->vma
- + input_section->output_offset
- + (int_rel.r_vaddr
- - input_section->vma)
- + adjust)))
- return FALSE;
-
- /* We must adjust everything else up a notch. */
- adjust += PCREL16_EXPANSION_ADJUSTMENT;
-
- /* mips_relax_pcrel16 handles all the details of this
- relocation. */
- continue;
- }
- }
-
- /* If we are relaxing, and this is a reloc against the .text
- segment, we may need to adjust it if some branches have been
- expanded. The reloc types which are likely to occur in the
- .text section are handled efficiently by mips_relax_section,
- and thus do not need to be handled here. */
- if (ecoff_data (input_bfd)->debug_info.adjust != NULL
- && ! int_rel.r_extern
- && int_rel.r_symndx == RELOC_SECTION_TEXT
- && (strcmp (bfd_get_section_name (input_bfd, input_section),
- ".text") != 0
- || (int_rel.r_type != MIPS_R_PCREL16
- && int_rel.r_type != MIPS_R_SWITCH
- && int_rel.r_type != MIPS_R_RELHI
- && int_rel.r_type != MIPS_R_RELLO)))
- {
- bfd_vma adr;
- struct ecoff_value_adjust *a;
-
- /* We need to get the addend so that we know whether we need
- to adjust the address. */
- BFD_ASSERT (int_rel.r_type == MIPS_R_REFWORD);
-
- adr = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
-
- for (a = ecoff_data (input_bfd)->debug_info.adjust;
- a != (struct ecoff_value_adjust *) NULL;
- a = a->next)
- {
- if (adr >= a->start && adr < a->end)
- addend += a->adjust;
- }
- }
-
if (info->relocatable)
{
/* We are generating relocatable output, and must convert
@@ -1601,49 +1104,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
currently holds just the addend. We must adjust
by the address to get the right value. */
if (howto->pc_relative)
- {
- relocation -= int_rel.r_vaddr - input_section->vma;
-
- /* If we are converting a RELHI or RELLO reloc
- from being against an external symbol to
- being against a section, we must put a
- special value into the r_offset field. This
- value is the old addend. The r_offset for
- both the RELHI and RELLO relocs are the same,
- and we set both when we see RELHI. */
- if (int_rel.r_type == MIPS_R_RELHI)
- {
- long addhi, addlo;
-
- addhi = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
- addhi &= 0xffff;
- if (addhi & 0x8000)
- addhi -= 0x10000;
- addhi <<= 16;
-
- if (! use_lo)
- addlo = 0;
- else
- {
- addlo = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + lo_int_rel.r_vaddr
- - input_section->vma));
- addlo &= 0xffff;
- if (addlo & 0x8000)
- addlo -= 0x10000;
-
- lo_int_rel.r_offset = addhi + addlo;
- }
-
- int_rel.r_offset = addhi + addlo;
- }
- }
+ relocation -= int_rel.r_vaddr - input_section->vma;
h = NULL;
}
@@ -1679,14 +1140,8 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
/* Adjust a PC relative relocation by removing the reference
to the original address in the section and including the
- reference to the new address. However, external RELHI
- and RELLO relocs are PC relative, but don't include any
- reference to the address. The addend is merely an
- addend. */
- if (howto->pc_relative
- && (! int_rel.r_extern
- || (int_rel.r_type != MIPS_R_RELHI
- && int_rel.r_type != MIPS_R_RELLO)))
+ reference to the new address. */
+ if (howto->pc_relative)
relocation -= (input_section->output_section->vma
+ input_section->output_offset
- input_section->vma);
@@ -1696,11 +1151,9 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
r = bfd_reloc_ok;
else
{
- if (int_rel.r_type != MIPS_R_REFHI
- && int_rel.r_type != MIPS_R_RELHI)
+ if (int_rel.r_type != MIPS_R_REFHI)
r = _bfd_relocate_contents (howto, input_bfd, relocation,
(contents
- + adjust
+ int_rel.r_vaddr
- input_section->vma));
else
@@ -1708,8 +1161,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
mips_relocate_hi (&int_rel,
use_lo ? &lo_int_rel : NULL,
input_bfd, input_section, contents,
- adjust, relocation,
- int_rel.r_type == MIPS_R_RELHI);
+ relocation);
r = bfd_reloc_ok;
}
}
@@ -1759,32 +1211,24 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
file. Make it look like a pcrel_offset relocation by
adding in the start address. */
if (howto->pc_relative)
- {
- if (int_rel.r_type != MIPS_R_RELHI || ! use_lo)
- relocation += int_rel.r_vaddr + adjust;
- else
- relocation += lo_int_rel.r_vaddr + adjust;
- }
+ relocation += int_rel.r_vaddr;
}
- if (int_rel.r_type != MIPS_R_REFHI
- && int_rel.r_type != MIPS_R_RELHI)
+ if (int_rel.r_type != MIPS_R_REFHI)
r = _bfd_final_link_relocate (howto,
input_bfd,
input_section,
contents,
(int_rel.r_vaddr
- - input_section->vma
- + adjust),
+ - input_section->vma),
relocation,
addend);
else
{
mips_relocate_hi (&int_rel,
use_lo ? &lo_int_rel : NULL,
- input_bfd, input_section, contents, adjust,
- relocation,
- int_rel.r_type == MIPS_R_RELHI);
+ input_bfd, input_section, contents,
+ relocation);
r = bfd_reloc_ok;
}
}
@@ -1801,8 +1245,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
& 0xf0000000)
!= ((input_section->output_section->vma
+ input_section->output_offset
- + (int_rel.r_vaddr - input_section->vma)
- + adjust)
+ + (int_rel.r_vaddr - input_section->vma))
& 0xf0000000)))
r = bfd_reloc_overflow;
@@ -1835,621 +1278,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
return TRUE;
}
-/* Read in the relocs for a section. */
-
-static bfd_boolean
-mips_read_relocs (abfd, sec)
- bfd *abfd;
- asection *sec;
-{
- struct ecoff_section_tdata *section_tdata;
- bfd_size_type amt;
-
- section_tdata = ecoff_section_data (abfd, sec);
- if (section_tdata == (struct ecoff_section_tdata *) NULL)
- {
- amt = sizeof (struct ecoff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_alloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- return FALSE;
-
- section_tdata = ecoff_section_data (abfd, sec);
- section_tdata->external_relocs = NULL;
- section_tdata->contents = NULL;
- section_tdata->offsets = NULL;
- }
-
- if (section_tdata->external_relocs == NULL)
- {
- amt = ecoff_backend (abfd)->external_reloc_size;
- amt *= sec->reloc_count;
- section_tdata->external_relocs = (PTR) bfd_alloc (abfd, amt);
- if (section_tdata->external_relocs == NULL && amt != 0)
- return FALSE;
-
- if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
- || bfd_bread (section_tdata->external_relocs, amt, abfd) != amt)
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Relax a section when linking a MIPS ECOFF file. This is used for
- embedded PIC code, which always uses PC relative branches which
- only have an 18 bit range on MIPS. If a branch is not in range, we
- generate a long instruction sequence to compensate. Each time we
- find a branch to expand, we have to check all the others again to
- make sure they are still in range. This is slow, but it only has
- to be done when -relax is passed to the linker.
-
- This routine figures out which branches need to expand; the actual
- expansion is done in mips_relocate_section when the section
- contents are relocated. The information is stored in the offsets
- field of the ecoff_section_tdata structure. An offset of 1 means
- that the branch must be expanded into a multi-instruction PC
- relative branch (such an offset will only occur for a PC relative
- branch to an external symbol). Any other offset must be a multiple
- of four, and is the amount to change the branch by (such an offset
- will only occur for a PC relative branch within the same section).
-
- We do not modify the section relocs or contents themselves so that
- if memory usage becomes an issue we can discard them and read them
- again. The only information we must save in memory between this
- routine and the mips_relocate_section routine is the table of
- offsets. */
-
-static bfd_boolean
-mips_relax_section (abfd, sec, info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *info;
- bfd_boolean *again;
-{
- struct ecoff_section_tdata *section_tdata;
- bfd_byte *contents = NULL;
- long *offsets;
- struct external_reloc *ext_rel;
- struct external_reloc *ext_rel_end;
- unsigned int i;
-
- /* Assume we are not going to need another pass. */
- *again = FALSE;
-
- /* If we are not generating an ECOFF file, this is much too
- confusing to deal with. */
- if (info->hash->creator->flavour != bfd_get_flavour (abfd))
- return TRUE;
-
- /* If there are no relocs, there is nothing to do. */
- if (sec->reloc_count == 0)
- return TRUE;
-
- /* We are only interested in PC relative relocs, and why would there
- ever be one from anything but the .text section? */
- if (strcmp (bfd_get_section_name (abfd, sec), ".text") != 0)
- return TRUE;
-
- /* Read in the relocs, if we haven't already got them. */
- section_tdata = ecoff_section_data (abfd, sec);
- if (section_tdata == (struct ecoff_section_tdata *) NULL
- || section_tdata->external_relocs == NULL)
- {
- if (! mips_read_relocs (abfd, sec))
- goto error_return;
- section_tdata = ecoff_section_data (abfd, sec);
- }
-
- if (sec->_cooked_size == 0)
- {
- /* We must initialize _cooked_size only the first time we are
- called. */
- sec->_cooked_size = sec->_raw_size;
- }
-
- contents = section_tdata->contents;
- offsets = section_tdata->offsets;
-
- /* Look for any external PC relative relocs. Internal PC relative
- relocs are already correct in the object file, so they certainly
- can not overflow. */
- ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- ext_rel_end = ext_rel + sec->reloc_count;
- for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
- {
- struct internal_reloc int_rel;
- struct ecoff_link_hash_entry *h;
- asection *hsec;
- bfd_signed_vma relocation;
- struct external_reloc *adj_ext_rel;
- unsigned int adj_i;
- unsigned long ext_count;
- struct ecoff_link_hash_entry **adj_h_ptr;
- struct ecoff_link_hash_entry **adj_h_ptr_end;
- struct ecoff_value_adjust *adjust;
- bfd_size_type amt;
-
- /* If we have already expanded this reloc, we certainly don't
- need to do it again. */
- if (offsets != (long *) NULL && offsets[i] == 1)
- continue;
-
- /* Quickly check that this reloc is external PCREL16. */
- if (bfd_header_big_endian (abfd))
- {
- if ((ext_rel->r_bits[3] & RELOC_BITS3_EXTERN_BIG) == 0
- || (((ext_rel->r_bits[3] & RELOC_BITS3_TYPE_BIG)
- >> RELOC_BITS3_TYPE_SH_BIG)
- != MIPS_R_PCREL16))
- continue;
- }
- else
- {
- if ((ext_rel->r_bits[3] & RELOC_BITS3_EXTERN_LITTLE) == 0
- || (((ext_rel->r_bits[3] & RELOC_BITS3_TYPE_LITTLE)
- >> RELOC_BITS3_TYPE_SH_LITTLE)
- != MIPS_R_PCREL16))
- continue;
- }
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) ext_rel, &int_rel);
-
- h = ecoff_data (abfd)->sym_hashes[int_rel.r_symndx];
- if (h == (struct ecoff_link_hash_entry *) NULL)
- abort ();
-
- if (h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak)
- {
- /* Just ignore undefined symbols. These will presumably
- generate an error later in the link. */
- continue;
- }
-
- /* Get the value of the symbol. */
- hsec = h->root.u.def.section;
- relocation = (h->root.u.def.value
- + hsec->output_section->vma
- + hsec->output_offset);
-
- /* Subtract out the current address. */
- relocation -= (sec->output_section->vma
- + sec->output_offset
- + (int_rel.r_vaddr - sec->vma));
-
- /* The addend is stored in the object file. In the normal case
- of ``bal symbol'', the addend will be -4. It will only be
- different in the case of ``bal symbol+constant''. To avoid
- always reading in the section contents, we don't check the
- addend in the object file (we could easily check the contents
- if we happen to have already read them in, but I fear that
- this could be confusing). This means we will screw up if
- there is a branch to a symbol that is in range, but added to
- a constant which puts it out of range; in such a case the
- link will fail with a reloc overflow error. Since the
- compiler will never generate such code, it should be easy
- enough to work around it by changing the assembly code in the
- source file. */
- relocation -= 4;
-
- /* Now RELOCATION is the number we want to put in the object
- file. See whether it fits. */
- if (relocation >= -0x20000 && relocation < 0x20000)
- continue;
-
- /* Now that we know this reloc needs work, which will rarely
- happen, go ahead and grab the section contents. */
- if (contents == (bfd_byte *) NULL)
- {
- if (info->keep_memory)
- contents = (bfd_byte *) bfd_alloc (abfd, sec->_raw_size);
- else
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == (bfd_byte *) NULL)
- goto error_return;
- if (! bfd_get_section_contents (abfd, sec, (PTR) contents,
- (file_ptr) 0, sec->_raw_size))
- goto error_return;
- if (info->keep_memory)
- section_tdata->contents = contents;
- }
-
- /* We only support changing the bal instruction. It would be
- possible to handle other PC relative branches, but some of
- them (the conditional branches) would require a different
- length instruction sequence which would complicate both this
- routine and mips_relax_pcrel16. It could be written if
- somebody felt it were important. Ignoring this reloc will
- presumably cause a reloc overflow error later on. */
- if (bfd_get_32 (abfd, contents + int_rel.r_vaddr - sec->vma)
- != 0x0411ffff) /* bgezal $0,. == bal . */
- continue;
-
- /* Bother. We need to expand this reloc, and we will need to
- make another relaxation pass since this change may put other
- relocs out of range. We need to examine the local branches
- and we need to allocate memory to hold the offsets we must
- add to them. We also need to adjust the values of all
- symbols in the object file following this location. */
-
- sec->_cooked_size += PCREL16_EXPANSION_ADJUSTMENT;
- *again = TRUE;
-
- if (offsets == (long *) NULL)
- {
- bfd_size_type size;
-
- size = (bfd_size_type) sec->reloc_count * sizeof (long);
- offsets = (long *) bfd_zalloc (abfd, size);
- if (offsets == (long *) NULL)
- goto error_return;
- section_tdata->offsets = offsets;
- }
-
- offsets[i] = 1;
-
- /* Now look for all PC relative references that cross this reloc
- and adjust their offsets. */
- adj_ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- for (adj_i = 0; adj_ext_rel < ext_rel_end; adj_ext_rel++, adj_i++)
- {
- struct internal_reloc adj_int_rel;
- bfd_vma start, stop;
- int change;
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) adj_ext_rel, &adj_int_rel);
-
- if (adj_int_rel.r_type == MIPS_R_PCREL16)
- {
- unsigned long insn;
-
- /* We only care about local references. External ones
- will be relocated correctly anyhow. */
- if (adj_int_rel.r_extern)
- continue;
-
- /* We are only interested in a PC relative reloc within
- this section. FIXME: Cross section PC relative
- relocs may not be handled correctly; does anybody
- care? */
- if (adj_int_rel.r_symndx != RELOC_SECTION_TEXT)
- continue;
-
- start = adj_int_rel.r_vaddr;
-
- insn = bfd_get_32 (abfd,
- contents + adj_int_rel.r_vaddr - sec->vma);
-
- stop = (insn & 0xffff) << 2;
- if ((stop & 0x20000) != 0)
- stop -= 0x40000;
- stop += adj_int_rel.r_vaddr + 4;
- }
- else if (adj_int_rel.r_type == MIPS_R_RELHI)
- {
- struct internal_reloc rello;
- long addhi, addlo;
-
- /* The next reloc must be MIPS_R_RELLO, and we handle
- them together. */
- BFD_ASSERT (adj_ext_rel + 1 < ext_rel_end);
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) (adj_ext_rel + 1), &rello);
-
- BFD_ASSERT (rello.r_type == MIPS_R_RELLO);
-
- addhi = bfd_get_32 (abfd,
- contents + adj_int_rel.r_vaddr - sec->vma);
- addhi &= 0xffff;
- if (addhi & 0x8000)
- addhi -= 0x10000;
- addhi <<= 16;
-
- addlo = bfd_get_32 (abfd, contents + rello.r_vaddr - sec->vma);
- addlo &= 0xffff;
- if (addlo & 0x8000)
- addlo -= 0x10000;
-
- if (adj_int_rel.r_extern)
- {
- /* The value we want here is
- sym - RELLOaddr + addend
- which we can express as
- sym - (RELLOaddr - addend)
- Therefore if we are expanding the area between
- RELLOaddr and RELLOaddr - addend we must adjust
- the addend. This is admittedly ambiguous, since
- we might mean (sym + addend) - RELLOaddr, but in
- practice we don't, and there is no way to handle
- that case correctly since at this point we have
- no idea whether any reloc is being expanded
- between sym and sym + addend. */
- start = rello.r_vaddr - (addhi + addlo);
- stop = rello.r_vaddr;
- }
- else
- {
- /* An internal RELHI/RELLO pair represents the
- difference between two addresses, $LC0 - foo.
- The symndx value is actually the difference
- between the reloc address and $LC0. This lets us
- compute $LC0, and, by considering the addend,
- foo. If the reloc we are expanding falls between
- those two relocs, we must adjust the addend. At
- this point, the symndx value is actually in the
- r_offset field, where it was put by
- mips_ecoff_swap_reloc_in. */
- start = rello.r_vaddr - adj_int_rel.r_offset;
- stop = start + addhi + addlo;
- }
- }
- else if (adj_int_rel.r_type == MIPS_R_SWITCH)
- {
- /* A MIPS_R_SWITCH reloc represents a word of the form
- .word $L3-$LS12
- The value in the object file is correct, assuming the
- original value of $L3. The symndx value is actually
- the difference between the reloc address and $LS12.
- This lets us compute the original value of $LS12 as
- vaddr - symndx
- and the original value of $L3 as
- vaddr - symndx + addend
- where addend is the value from the object file. At
- this point, the symndx value is actually found in the
- r_offset field, since it was moved by
- mips_ecoff_swap_reloc_in. */
- start = adj_int_rel.r_vaddr - adj_int_rel.r_offset;
- stop = start + bfd_get_32 (abfd,
- (contents
- + adj_int_rel.r_vaddr
- - sec->vma));
- }
- else
- continue;
-
- /* If the range expressed by this reloc, which is the
- distance between START and STOP crosses the reloc we are
- expanding, we must adjust the offset. The sign of the
- adjustment depends upon the direction in which the range
- crosses the reloc being expanded. */
- if (start <= int_rel.r_vaddr && stop > int_rel.r_vaddr)
- change = PCREL16_EXPANSION_ADJUSTMENT;
- else if (start > int_rel.r_vaddr && stop <= int_rel.r_vaddr)
- change = - PCREL16_EXPANSION_ADJUSTMENT;
- else
- change = 0;
-
- offsets[adj_i] += change;
-
- if (adj_int_rel.r_type == MIPS_R_RELHI)
- {
- adj_ext_rel++;
- adj_i++;
- offsets[adj_i] += change;
- }
- }
-
- /* Find all symbols in this section defined by this object file
- and adjust their values. Note that we decide whether to
- adjust the value based on the value stored in the ECOFF EXTR
- structure, because the value stored in the hash table may
- have been changed by an earlier expanded reloc and thus may
- no longer correctly indicate whether the symbol is before or
- after the expanded reloc. */
- ext_count = ecoff_data (abfd)->debug_info.symbolic_header.iextMax;
- adj_h_ptr = ecoff_data (abfd)->sym_hashes;
- adj_h_ptr_end = adj_h_ptr + ext_count;
- for (; adj_h_ptr < adj_h_ptr_end; adj_h_ptr++)
- {
- struct ecoff_link_hash_entry *adj_h;
-
- adj_h = *adj_h_ptr;
- if (adj_h != (struct ecoff_link_hash_entry *) NULL
- && (adj_h->root.type == bfd_link_hash_defined
- || adj_h->root.type == bfd_link_hash_defweak)
- && adj_h->root.u.def.section == sec
- && adj_h->esym.asym.value > int_rel.r_vaddr)
- adj_h->root.u.def.value += PCREL16_EXPANSION_ADJUSTMENT;
- }
-
- /* Add an entry to the symbol value adjust list. This is used
- by bfd_ecoff_debug_accumulate to adjust the values of
- internal symbols and FDR's. */
- amt = sizeof (struct ecoff_value_adjust);
- adjust = (struct ecoff_value_adjust *) bfd_alloc (abfd, amt);
- if (adjust == (struct ecoff_value_adjust *) NULL)
- goto error_return;
-
- adjust->start = int_rel.r_vaddr;
- adjust->end = sec->vma + sec->_raw_size;
- adjust->adjust = PCREL16_EXPANSION_ADJUSTMENT;
-
- adjust->next = ecoff_data (abfd)->debug_info.adjust;
- ecoff_data (abfd)->debug_info.adjust = adjust;
- }
-
- if (contents != (bfd_byte *) NULL && ! info->keep_memory)
- free (contents);
-
- return TRUE;
-
- error_return:
- if (contents != (bfd_byte *) NULL && ! info->keep_memory)
- free (contents);
- return FALSE;
-}
-
-/* This routine is called from mips_relocate_section when a PC
- relative reloc must be expanded into the five instruction sequence.
- It handles all the details of the expansion, including resolving
- the reloc. */
-
-static bfd_boolean
-mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *input_bfd;
- asection *input_section ATTRIBUTE_UNUSED;
- struct ecoff_link_hash_entry *h;
- bfd_byte *location;
- bfd_vma address;
-{
- bfd_vma relocation;
-
- /* 0x0411ffff is bgezal $0,. == bal . */
- BFD_ASSERT (bfd_get_32 (input_bfd, location) == 0x0411ffff);
-
- /* We need to compute the distance between the symbol and the
- current address plus eight. */
- relocation = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- relocation -= address + 8;
-
- /* If the lower half is negative, increment the upper 16 half. */
- if ((relocation & 0x8000) != 0)
- relocation += 0x10000;
-
- bfd_put_32 (input_bfd, (bfd_vma) 0x04110001, location); /* bal .+8 */
- bfd_put_32 (input_bfd,
- 0x3c010000 | ((relocation >> 16) & 0xffff), /* lui $at,XX */
- location + 4);
- bfd_put_32 (input_bfd,
- 0x24210000 | (relocation & 0xffff), /* addiu $at,$at,XX */
- location + 8);
- bfd_put_32 (input_bfd,
- (bfd_vma) 0x003f0821, location + 12); /* addu $at,$at,$ra */
- bfd_put_32 (input_bfd,
- (bfd_vma) 0x0020f809, location + 16); /* jalr $at */
-
- return TRUE;
-}
-
-/* Given a .sdata section and a .rel.sdata in-memory section, store
- relocation information into the .rel.sdata section which can be
- used at runtime to relocate the section. This is called by the
- linker when the --embedded-relocs switch is used. This is called
- after the add_symbols entry point has been called for all the
- objects, and before the final_link entry point is called. This
- function presumes that the object was compiled using
- -membedded-pic. */
-
-bfd_boolean
-bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *datasec;
- asection *relsec;
- char **errmsg;
-{
- struct ecoff_link_hash_entry **sym_hashes;
- struct ecoff_section_tdata *section_tdata;
- struct external_reloc *ext_rel;
- struct external_reloc *ext_rel_end;
- bfd_byte *p;
- bfd_size_type amt;
-
- BFD_ASSERT (! info->relocatable);
-
- *errmsg = NULL;
-
- if (datasec->reloc_count == 0)
- return TRUE;
-
- sym_hashes = ecoff_data (abfd)->sym_hashes;
-
- if (! mips_read_relocs (abfd, datasec))
- return FALSE;
-
- amt = (bfd_size_type) datasec->reloc_count * 4;
- relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
- if (relsec->contents == NULL)
- return FALSE;
-
- p = relsec->contents;
-
- section_tdata = ecoff_section_data (abfd, datasec);
- ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- ext_rel_end = ext_rel + datasec->reloc_count;
- for (; ext_rel < ext_rel_end; ext_rel++, p += 4)
- {
- struct internal_reloc int_rel;
- bfd_boolean text_relative;
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) ext_rel, &int_rel);
-
- /* We are going to write a four byte word into the runtime reloc
- section. The word will be the address in the data section
- which must be relocated. This must be on a word boundary,
- which means the lower two bits must be zero. We use the
- least significant bit to indicate how the value in the data
- section must be relocated. A 0 means that the value is
- relative to the text section, while a 1 indicates that the
- value is relative to the data section. Given that we are
- assuming the code was compiled using -membedded-pic, there
- should not be any other possibilities. */
-
- /* We can only relocate REFWORD relocs at run time. */
- if (int_rel.r_type != MIPS_R_REFWORD)
- {
- *errmsg = _("unsupported reloc type");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- if (int_rel.r_extern)
- {
- struct ecoff_link_hash_entry *h;
-
- h = sym_hashes[int_rel.r_symndx];
- /* If h is NULL, that means that there is a reloc against an
- external symbol which we thought was just a debugging
- symbol. This should not happen. */
- if (h == (struct ecoff_link_hash_entry *) NULL)
- abort ();
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_CODE) != 0)
- text_relative = TRUE;
- else
- text_relative = FALSE;
- }
- else
- {
- switch (int_rel.r_symndx)
- {
- case RELOC_SECTION_TEXT:
- text_relative = TRUE;
- break;
- case RELOC_SECTION_SDATA:
- case RELOC_SECTION_SBSS:
- case RELOC_SECTION_LIT8:
- text_relative = FALSE;
- break;
- default:
- /* No other sections should appear in -membedded-pic
- code. */
- *errmsg = _("reloc against unsupported section");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- }
-
- if ((int_rel.r_offset & 3) != 0)
- {
- *errmsg = _("reloc not properly aligned");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- bfd_put_32 (abfd,
- (int_rel.r_vaddr - datasec->vma + datasec->output_offset
- + (text_relative ? 0 : 1)),
- p);
- }
-
- return TRUE;
-}
-
/* This is the ECOFF backend structure. The backend field of the
target vector points to this. */
@@ -2557,7 +1385,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
_bfd_generic_get_section_contents_in_window
/* Relaxing sections is MIPS specific. */
-#define _bfd_ecoff_bfd_relax_section mips_relax_section
+#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
/* GC of sections is not done. */
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
@@ -2565,7 +1393,10 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* Merging of sections is not done. */
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_ecoff_section_already_linked \
+ _bfd_generic_section_already_linked
extern const bfd_target ecoff_big_vec;
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index c1c2c32a178..38d0099748c 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1,6 +1,6 @@
/* BFD back-end for PowerPC Microsoft Portable Executable files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila (krk@cygnus.com)
@@ -1188,8 +1188,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler)
- (_("%s: unsupported relocation type 0x%02x"),
- bfd_archive_filename (input_bfd), r_type);
+ (_("%B: unsupported relocation type 0x%02x"), input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
case IMAGE_REL_PPC_TOCREL16:
@@ -1278,8 +1277,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if ((bfd_vma) our_toc_offset >= 65535)
{
(*_bfd_error_handler)
- (_("%s: Relocation for %s of %lx exceeds Toc size limit"),
- bfd_archive_filename (input_bfd), name,
+ (_("%B: Relocation for %s of %lx exceeds Toc size limit"),
+ input_bfd, name,
(unsigned long) our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1330,12 +1329,11 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
/* FIXME: this test is conservative. */
if ((r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN
- && (bfd_vma) our_toc_offset > toc_section->_raw_size)
+ && (bfd_vma) our_toc_offset > toc_section->size)
{
(*_bfd_error_handler)
- (_("%s: Relocation exceeds allocated TOC (%lx)"),
- bfd_archive_filename (input_bfd),
- (unsigned long) toc_section->_raw_size);
+ (_("%B: Relocation exceeds allocated TOC (%lx)"),
+ input_bfd, (unsigned long) toc_section->size);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1387,15 +1385,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
else
my_name = h->root.root.root.string;
- fprintf (stderr,
- _("Warning: unsupported reloc %s <file %s, section %s>\n"),
- howto->name,
- bfd_archive_filename(input_bfd),
- input_section->name);
-
- fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
- rel->r_symndx, my_name, (long) rel->r_vaddr,
- (unsigned long) rel->r_vaddr);
+ (*_bfd_error_handler)
+ (_("Warning: unsupported reloc %s <file %B, section %A>\n"
+ "sym %ld (%s), r_vaddr %ld (%lx)"),
+ input_bfd, input_section, howto->name,
+ rel->r_symndx, my_name, (long) rel->r_vaddr,
+ (unsigned long) rel->r_vaddr);
}
break;
case IMAGE_REL_PPC_IMGLUE:
@@ -1409,8 +1404,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
my_name = h->root.root.root.string;
(*_bfd_error_handler)
- (_("%s: Out of order IMGLUE reloc for %s"),
- bfd_archive_filename (input_bfd), my_name);
+ (_("%B: Out of order IMGLUE reloc for %s"), input_bfd, my_name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1690,7 +1684,7 @@ ppc_allocate_toc_section (info)
foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, amt);
memset(foo, test_char, (size_t) global_toc_size);
- s->_raw_size = s->_cooked_size = global_toc_size;
+ s->size = global_toc_size;
s->contents = foo;
return TRUE;
@@ -2328,8 +2322,10 @@ ppc_bfd_coff_final_link (abfd, info)
if (info->relocatable)
o->reloc_count += sec->reloc_count;
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
if (sec->lineno_count > max_lineno_count)
max_lineno_count = sec->lineno_count;
if (sec->reloc_count > max_reloc_count)
@@ -2663,7 +2659,7 @@ ppc_bfd_coff_final_link (abfd, info)
}
/* If we have optimized stabs strings, output them. */
- if (coff_hash_table (info)->stab_info != NULL)
+ if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return FALSE;
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 56e34e2d720..9fe9cbd3714 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990-1999, 2000, 2001, 2002, 2003
+ Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
@@ -180,7 +180,7 @@ static bfd_boolean do_pad
static bfd_boolean do_copy
PARAMS ((bfd *, bfd *));
static bfd_boolean do_shared_object_padding
- PARAMS ((bfd *, bfd *, ufile_ptr *, int));
+ PARAMS ((bfd *, bfd *, file_ptr *, int));
/* Relocation functions */
static bfd_boolean xcoff_reloc_type_br
@@ -1742,7 +1742,7 @@ static bfd_boolean
do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
bfd *out_bfd;
bfd *in_bfd;
- ufile_ptr *offset;
+ file_ptr *offset;
int ar_header_size;
{
if (bfd_check_format (in_bfd, bfd_object)
@@ -1779,7 +1779,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
const bfd_arch_info_type *arch_info = NULL;
bfd *current_bfd;
size_t string_length;
- ufile_ptr nextoff, prevoff;
+ file_ptr nextoff, prevoff;
/* First, we look through the symbols and work out which are
from 32-bit objects and which from 64-bit ones. */
@@ -2076,7 +2076,7 @@ xcoff_write_archive_contents_old (abfd)
file_ptr *offsets;
bfd_boolean makemap;
bfd_boolean hasobjects;
- ufile_ptr prevoff, nextoff;
+ file_ptr prevoff, nextoff;
bfd *sub;
size_t i;
struct xcoff_ar_hdr ahdr;
@@ -2306,7 +2306,7 @@ xcoff_write_archive_contents_big (abfd)
file_ptr *offsets;
bfd_boolean makemap;
bfd_boolean hasobjects;
- ufile_ptr prevoff, nextoff;
+ file_ptr prevoff, nextoff;
bfd *current_bfd;
size_t i;
struct xcoff_ar_hdr_big *hdr, ahdr;
@@ -2948,8 +2948,7 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
cror. */
if (NULL != h
&& bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8
- <= input_section->_cooked_size))
+ && rel->r_vaddr - input_section->vma + 8 <= input_section->size)
{
bfd_byte *pnext;
unsigned long next;
@@ -3449,7 +3448,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
address = rel->r_vaddr - input_section->vma;
location = contents + address;
- if (address > input_section->_raw_size)
+ if (address > input_section->size)
abort ();
/* Get the value we are going to relocate. */
@@ -3612,8 +3611,8 @@ xcoff_create_csect_from_smclas (abfd, aux, symbol_name)
else
{
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ (_("%B: symbol `%s' has unrecognized smclas %d"),
+ abfd, symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
@@ -4142,6 +4141,7 @@ const bfd_target rs6000coff_vec =
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -4196,11 +4196,14 @@ const bfd_target rs6000coff_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
@@ -4384,6 +4387,7 @@ const bfd_target pmac_xcoff_vec =
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -4438,11 +4442,14 @@ const bfd_target pmac_xcoff_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index d78cc16d681..ce9ae94aa1b 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -1,6 +1,6 @@
/* BFD back-end for Renesas Super-H COFF binaries.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
@@ -698,11 +698,9 @@ sh_relax_section (abfd, sec, link_info, again)
bfd_boolean *again;
{
struct internal_reloc *internal_relocs;
- struct internal_reloc *free_relocs = NULL;
bfd_boolean have_code;
struct internal_reloc *irel, *irelend;
bfd_byte *contents = NULL;
- bfd_byte *free_contents = NULL;
*again = FALSE;
@@ -711,10 +709,13 @@ sh_relax_section (abfd, sec, link_info, again)
|| sec->reloc_count == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
+ if (coff_section_data (abfd, sec) == NULL)
+ {
+ bfd_size_type amt = sizeof (struct coff_section_tdata);
+ sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ if (sec->used_by_bfd == NULL)
+ return FALSE;
+ }
internal_relocs = (_bfd_coff_read_internal_relocs
(abfd, sec, link_info->keep_memory,
@@ -722,8 +723,6 @@ sh_relax_section (abfd, sec, link_info, again)
(struct internal_reloc *) NULL));
if (internal_relocs == NULL)
goto error_return;
- if (! link_info->keep_memory)
- free_relocs = internal_relocs;
have_code = FALSE;
@@ -745,18 +744,11 @@ sh_relax_section (abfd, sec, link_info, again)
/* Get the section contents. */
if (contents == NULL)
{
- if (coff_section_data (abfd, sec) != NULL
- && coff_section_data (abfd, sec)->contents != NULL)
+ if (coff_section_data (abfd, sec)->contents != NULL)
contents = coff_section_data (abfd, sec)->contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
- free_contents = contents;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -768,11 +760,10 @@ sh_relax_section (abfd, sec, link_info, again)
laddr = irel->r_vaddr - sec->vma + 4;
/* Careful to sign extend the 32-bit offset. */
laddr += ((irel->r_offset & 0xffffffff) ^ 0x80000000) - 0x80000000;
- if (laddr >= sec->_raw_size)
+ if (laddr >= sec->size)
{
- (*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
- bfd_archive_filename (abfd),
- (unsigned long) irel->r_vaddr);
+ (*_bfd_error_handler) ("%B: 0x%lx: warning: bad R_SH_USES offset",
+ abfd, (unsigned long) irel->r_vaddr);
continue;
}
insn = bfd_get_16 (abfd, contents + laddr);
@@ -781,8 +772,8 @@ sh_relax_section (abfd, sec, link_info, again)
if ((insn & 0xf000) != 0xd000)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
- bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr, insn));
+ ("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
+ abfd, (unsigned long) irel->r_vaddr, insn));
continue;
}
@@ -795,11 +786,11 @@ sh_relax_section (abfd, sec, link_info, again)
paddr = insn & 0xff;
paddr *= 4;
paddr += (laddr + 4) &~ (bfd_vma) 3;
- if (paddr >= sec->_raw_size)
+ if (paddr >= sec->size)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: warning: bad R_SH_USES load offset",
- bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
+ ("%B: 0x%lx: warning: bad R_SH_USES load offset",
+ abfd, (unsigned long) irel->r_vaddr));
continue;
}
@@ -812,17 +803,18 @@ sh_relax_section (abfd, sec, link_info, again)
#ifdef COFF_WITH_PE
&& (irelfn->r_type == R_SH_IMM32
|| irelfn->r_type == R_SH_IMM32CE
- || irelfn->r_type == R_SH_IMAGEBASE))
+ || irelfn->r_type == R_SH_IMAGEBASE)
#else
- && irelfn->r_type == R_SH_IMM32)
+ && irelfn->r_type == R_SH_IMM32
#endif
+ )
break;
if (irelfn >= irelend)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: warning: could not find expected reloc",
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ ("%B: 0x%lx: warning: could not find expected reloc",
+ abfd, (unsigned long) paddr));
continue;
}
@@ -837,8 +829,8 @@ sh_relax_section (abfd, sec, link_info, again)
if (sym.n_scnum != 0 && sym.n_scnum != sec->target_index)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: warning: symbol in unexpected section",
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ ("%B: 0x%lx: warning: symbol in unexpected section",
+ abfd, (unsigned long) paddr));
continue;
}
@@ -894,21 +886,11 @@ sh_relax_section (abfd, sec, link_info, again)
that would be more work, but would require less memory when
the linker is run. */
- if (coff_section_data (abfd, sec) == NULL)
- {
- bfd_size_type amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- goto error_return;
- }
-
coff_section_data (abfd, sec)->relocs = internal_relocs;
coff_section_data (abfd, sec)->keep_relocs = TRUE;
- free_relocs = NULL;
coff_section_data (abfd, sec)->contents = contents;
coff_section_data (abfd, sec)->keep_contents = TRUE;
- free_contents = NULL;
obj_coff_keep_syms (abfd) = TRUE;
@@ -972,8 +954,8 @@ sh_relax_section (abfd, sec, link_info, again)
if (irelcount >= irelend)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: warning: could not find expected COUNT reloc",
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ ("%B: 0x%lx: warning: could not find expected COUNT reloc",
+ abfd, (unsigned long) paddr));
continue;
}
@@ -981,9 +963,8 @@ sh_relax_section (abfd, sec, link_info, again)
just deleted one. */
if (irelcount->r_offset == 0)
{
- ((*_bfd_error_handler) ("%s: 0x%lx: warning: bad count",
- bfd_archive_filename (abfd),
- (unsigned long) paddr));
+ ((*_bfd_error_handler) ("%B: 0x%lx: warning: bad count",
+ abfd, (unsigned long) paddr));
continue;
}
@@ -1011,18 +992,11 @@ sh_relax_section (abfd, sec, link_info, again)
/* Get the section contents. */
if (contents == NULL)
{
- if (coff_section_data (abfd, sec) != NULL
- && coff_section_data (abfd, sec)->contents != NULL)
+ if (coff_section_data (abfd, sec)->contents != NULL)
contents = coff_section_data (abfd, sec)->contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
- free_contents = contents;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -1032,58 +1006,42 @@ sh_relax_section (abfd, sec, link_info, again)
if (swapped)
{
- if (coff_section_data (abfd, sec) == NULL)
- {
- bfd_size_type amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- goto error_return;
- }
-
coff_section_data (abfd, sec)->relocs = internal_relocs;
coff_section_data (abfd, sec)->keep_relocs = TRUE;
- free_relocs = NULL;
coff_section_data (abfd, sec)->contents = contents;
coff_section_data (abfd, sec)->keep_contents = TRUE;
- free_contents = NULL;
obj_coff_keep_syms (abfd) = TRUE;
}
}
- if (free_relocs != NULL)
+ if (internal_relocs != NULL
+ && internal_relocs != coff_section_data (abfd, sec)->relocs)
{
- free (free_relocs);
- free_relocs = NULL;
+ if (! link_info->keep_memory)
+ free (internal_relocs);
+ else
+ coff_section_data (abfd, sec)->relocs = internal_relocs;
}
- if (free_contents != NULL)
+ if (contents != NULL && contents != coff_section_data (abfd, sec)->contents)
{
if (! link_info->keep_memory)
- free (free_contents);
+ free (contents);
else
- {
- /* Cache the section contents for coff_link_input_bfd. */
- if (coff_section_data (abfd, sec) == NULL)
- {
- bfd_size_type amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- goto error_return;
- coff_section_data (abfd, sec)->relocs = NULL;
- }
- coff_section_data (abfd, sec)->contents = contents;
- }
+ /* Cache the section contents for coff_link_input_bfd. */
+ coff_section_data (abfd, sec)->contents = contents;
}
return TRUE;
error_return:
- if (free_relocs != NULL)
- free (free_relocs);
- if (free_contents != NULL)
- free (free_contents);
+ if (internal_relocs != NULL
+ && internal_relocs != coff_section_data (abfd, sec)->relocs)
+ free (internal_relocs);
+ if (contents != NULL && contents != coff_section_data (abfd, sec)->contents)
+ free (contents);
return FALSE;
}
@@ -1111,7 +1069,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = coff_section_data (abfd, sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -1131,7 +1089,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
if (irelalign == NULL)
- sec->_cooked_size -= count;
+ sec->size -= count;
else
{
int i;
@@ -1377,8 +1335,8 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
if (overflow)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: fatal: reloc overflow while relaxing",
- bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
+ ("%B: 0x%lx: fatal: reloc overflow while relaxing",
+ abfd, (unsigned long) irel->r_vaddr));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1443,17 +1401,12 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
ocontents = coff_section_data (abfd, o)->contents;
else
{
+ if (!bfd_malloc_and_get_section (abfd, o, &ocontents))
+ return FALSE;
/* We always cache the section contents.
Perhaps, if info->keep_memory is FALSE, we
should free them, if we are permitted to,
when we leave sh_coff_relax_section. */
- ocontents = (bfd_byte *) bfd_malloc (o->_raw_size);
- if (ocontents == NULL)
- return FALSE;
- if (! bfd_get_section_contents (abfd, o, ocontents,
- (file_ptr) 0,
- o->_raw_size))
- return FALSE;
coff_section_data (abfd, o)->contents = ocontents;
}
}
@@ -1477,8 +1430,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|| obj_raw_syments (abfd) != NULL)
{
((*_bfd_error_handler)
- ("%s: fatal: generic symbols retrieved before relaxing",
- bfd_archive_filename (abfd)));
+ ("%B: fatal: generic symbols retrieved before relaxing", abfd));
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
@@ -2694,7 +2646,7 @@ sh_align_loads (abfd, sec, internal_relocs, contents, pswapped)
if (irel < irelend)
stop = irel->r_vaddr - sec->vma;
else
- stop = sec->_cooked_size;
+ stop = sec->size;
if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_swap_insns,
(PTR) internal_relocs, &label,
@@ -2833,8 +2785,8 @@ sh_swap_insns (abfd, sec, relocs, contents, addr)
if (overflow)
{
((*_bfd_error_handler)
- ("%s: 0x%lx: fatal: reloc overflow while relaxing",
- bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
+ ("%B: 0x%lx: fatal: reloc overflow while relaxing",
+ abfd, (unsigned long) irel->r_vaddr));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2897,8 +2849,8 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
(*_bfd_error_handler)
- ("%s: illegal symbol index %ld in relocs",
- bfd_archive_filename (input_bfd), symndx);
+ ("%B: illegal symbol index %ld in relocs",
+ input_bfd, symndx);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -3046,7 +2998,7 @@ sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
symbols);
memcpy (data, coff_section_data (input_bfd, input_section)->contents,
- (size_t) input_section->_raw_size);
+ (size_t) input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index 316768e2dc6..133769cd80e 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -1,5 +1,6 @@
/* BFD back-end for TMS320C54X coff binaries.
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
This file is part of BFD, the Binary File Descriptor library.
@@ -363,8 +364,8 @@ tic54x_reloc_processing (relent, reloc, symbols, abfd, section)
if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_archive_filename (abfd), reloc->r_symndx);
+ (_("%B: warning: illegal symbol index %ld in relocs"),
+ abfd, reloc->r_symndx);
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index c7ec9bd61f2..50f43041ecf 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -684,10 +684,8 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- (_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_archive_filename (input_bfd),
- (unsigned long) rel->r_vaddr,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: bad reloc address 0x%lx in section `%A'"),
+ input_bfd, input_section, (unsigned long) rel->r_vaddr);
return FALSE;
case bfd_reloc_overflow:
{
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index ec9c6953478..0e24adb1513 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002, 2003
+ Copyright 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written Clinton Popetz.
Contributed by Cygnus Support.
@@ -845,11 +845,11 @@ xcoff64_write_object_contents (abfd)
section.s_vaddr = current->vma;
section.s_paddr = current->lma;
- section.s_size = current->_raw_size;
+ section.s_size = current->size;
/* If this section has no size or is unloadable then the scnptr
will be 0 too. */
- if (current->_raw_size == 0
+ if (current->size == 0
|| (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
{
section.s_scnptr = 0;
@@ -965,19 +965,19 @@ xcoff64_write_object_contents (abfd)
if (text_sec)
{
- internal_a.tsize = bfd_get_section_size_before_reloc (text_sec);
+ internal_a.tsize = text_sec->size;
internal_a.text_start = internal_a.tsize ? text_sec->vma : 0;
}
if (data_sec)
{
- internal_a.dsize = bfd_get_section_size_before_reloc (data_sec);
+ internal_a.dsize = data_sec->size;
internal_a.data_start = internal_a.dsize ? data_sec->vma : 0;
}
if (bss_sec)
{
- internal_a.bsize = bfd_get_section_size_before_reloc (bss_sec);
+ internal_a.bsize = bss_sec->size;
if (internal_a.bsize && bss_sec->vma < internal_a.data_start)
internal_a.data_start = bss_sec->vma;
}
@@ -1127,8 +1127,7 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
cror. */
if (NULL != h
&& bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8
- <= input_section->_cooked_size))
+ && rel->r_vaddr - input_section->vma + 8 <= input_section->size)
{
bfd_byte *pnext;
unsigned long next;
@@ -1301,7 +1300,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
address = rel->r_vaddr - input_section->vma;
location = contents + address;
- if (address > input_section->_raw_size)
+ if (address > input_section->size)
abort ();
/* Get the value we are going to relocate. */
@@ -2105,8 +2104,8 @@ xcoff64_create_csect_from_smclas (abfd, aux, symbol_name)
else
{
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ (_("%B: symbol `%s' has unrecognized smclas %d"),
+ abfd, symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
@@ -2683,6 +2682,7 @@ const bfd_target rs6000coff64_vec =
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -2737,11 +2737,14 @@ const bfd_target rs6000coff64_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
@@ -2926,6 +2929,7 @@ const bfd_target aix5coff64_vec =
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -2980,11 +2984,14 @@ const bfd_target aix5coff64_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 15d97093f67..51d00c63e03 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of most COFF variants, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -309,6 +309,9 @@ CODE_FRAGMENT
#define STRING_SIZE_SIZE (4)
+#define DOT_DEBUG ".debug"
+#define GNU_LINKONCE_WI ".gnu.linkonce.wi."
+
static long sec_to_styp_flags
PARAMS ((const char *, flagword));
static bfd_boolean styp_to_sec_flags
@@ -428,7 +431,7 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (!strncmp (sec_name, ".debug", 6))
+ else if (!strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
@@ -441,7 +444,7 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (!strncmp (sec_name, ".gnu.linkonce.wi.", 17))
+ else if (!strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1))
{
styp_flags = STYP_DEBUG_INFO;
}
@@ -518,7 +521,7 @@ sec_to_styp_flags (sec_name, sec_flags)
static long
sec_to_styp_flags (sec_name, sec_flags)
- const char *sec_name ATTRIBUTE_UNUSED;
+ const char *sec_name;
flagword sec_flags;
{
long styp_flags = 0;
@@ -531,6 +534,11 @@ sec_to_styp_flags (sec_name, sec_flags)
PE files. The STYP_* flags and the IMAGE_SCN_* flags overlap,
but there are more IMAGE_SCN_* flags. */
+ /* FIXME: There is no gas syntax to specify the debug section flag. */
+ if (strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
+ || strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0)
+ sec_flags = SEC_READONLY | SEC_DEBUGGING;
+
/* skip LOAD */
/* READONLY later */
/* skip RELOC */
@@ -675,12 +683,12 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
#endif
sec_flags |= SEC_ALLOC;
}
- else if (strncmp (name, ".debug", 6) == 0
+ else if (strncmp (name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || strncmp (name, ".gnu.linkonce.wi.", 17) == 0
+ || strncmp (name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0
#endif
|| strncmp (name, ".stab", 5) == 0)
{
@@ -821,8 +829,6 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
/* The first time we've seen the symbol. */
union internal_auxent aux;
- seen_state = 1;
-
/* If it isn't the stuff we're expecting, die;
The MS documentation is vague, but it
appears that the second entry serves BOTH
@@ -850,7 +856,10 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
function). See comment above for more. */
if (strcmp (name, symname) != 0)
- abort ();
+ _bfd_error_handler (_("%B: warning: COMDAT symbol '%s' does not match section name '%s'"),
+ abfd, symname, name);
+
+ seen_state = 1;
/* This is the section symbol. */
bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)),
@@ -957,12 +966,13 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
Intel puts the two adjacent, but Alpha (at
least) spreads them out. */
- amt = sizeof (struct bfd_comdat_info);
- section->comdat = bfd_alloc (abfd, amt);
- if (section->comdat == NULL)
+ amt = sizeof (struct coff_comdat_info);
+ coff_section_data (abfd, section)->comdat
+ = bfd_alloc (abfd, amt);
+ if (coff_section_data (abfd, section)->comdat == NULL)
abort ();
- section->comdat->symbol =
+ coff_section_data (abfd, section)->comdat->symbol =
(esym - esymstart) / bfd_coff_symesz (abfd);
amt = strlen (symname) + 1;
@@ -971,7 +981,8 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
abort ();
strcpy (newname, symname);
- section->comdat->name = newname;
+ coff_section_data (abfd, section)->comdat->name
+ = newname;
}
goto breakloop;
@@ -1055,7 +1066,15 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
unhandled = "IMAGE_SCN_MEM_NOT_CACHED";
break;
case IMAGE_SCN_MEM_NOT_PAGED:
+#if 0
unhandled = "IMAGE_SCN_MEM_NOT_PAGED";
+#else
+ /* Generate a warning message rather using the 'unhandled'
+ variable as this will allow some .sys files generate by
+ other toolchains to be processed. See bugzilla issue 196. */
+ _bfd_error_handler (_("%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"),
+ abfd, name);
+#endif
break;
case IMAGE_SCN_MEM_EXECUTE:
sec_flags |= SEC_CODE;
@@ -1109,8 +1128,8 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
if (unhandled != NULL)
{
(*_bfd_error_handler)
- (_("%s (%s): Section flag %s (0x%x) ignored"),
- bfd_archive_filename (abfd), name, unhandled, flag);
+ (_("%B (%s): Section flag %s (0x%x) ignored"),
+ abfd, name, unhandled, flag);
result = FALSE;
}
}
@@ -3004,10 +3023,10 @@ coff_compute_section_file_positions (abfd)
{
asection *dsec;
- dsec = bfd_make_section_old_way (abfd, ".debug");
+ dsec = bfd_make_section_old_way (abfd, DOT_DEBUG);
if (dsec == NULL)
abort ();
- dsec->_raw_size = sz;
+ dsec->size = sz;
dsec->flags |= SEC_HAS_CONTENTS;
}
}
@@ -3106,7 +3125,7 @@ coff_compute_section_file_positions (abfd)
a zero size and having real contents are different
concepts: .bss has no contents, but (usually) non-zero
size. */
- if (current->_raw_size == 0)
+ if (current->size == 0)
{
/* Discard. However, it still might have (valid) symbols
in it, so arbitrarily set it to section 1 (indexing is
@@ -3157,7 +3176,7 @@ coff_compute_section_file_positions (abfd)
return FALSE;
}
if (pei_section_data (abfd, current)->virt_size == 0)
- pei_section_data (abfd, current)->virt_size = current->_raw_size;
+ pei_section_data (abfd, current)->virt_size = current->size;
#endif
/* Only deal with sections which have contents. */
@@ -3166,7 +3185,7 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_IMAGE_WITH_PE
/* Make sure we skip empty sections in a PE image. */
- if (current->_raw_size == 0)
+ if (current->size == 0)
continue;
#endif
@@ -3214,7 +3233,7 @@ coff_compute_section_file_positions (abfd)
}
#endif
if (previous != (asection *) NULL)
- previous->_raw_size += sofar - old_sofar;
+ previous->size += sofar - old_sofar;
}
#endif
@@ -3230,10 +3249,10 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_IMAGE_WITH_PE
/* Set the padded size. */
- current->_raw_size = (current->_raw_size + page_size -1) & -page_size;
+ current->size = (current->size + page_size -1) & -page_size;
#endif
- sofar += current->_raw_size;
+ sofar += current->size;
#ifdef ALIGN_SECTIONS_IN_FILE
/* Make sure that this section is of the right size too. */
@@ -3241,26 +3260,26 @@ coff_compute_section_file_positions (abfd)
{
bfd_size_type old_size;
- old_size = current->_raw_size;
- current->_raw_size = BFD_ALIGN (current->_raw_size,
- 1 << current->alignment_power);
- align_adjust = current->_raw_size != old_size;
- sofar += current->_raw_size - old_size;
+ old_size = current->size;
+ current->size = BFD_ALIGN (current->size,
+ 1 << current->alignment_power);
+ align_adjust = current->size != old_size;
+ sofar += current->size - old_size;
}
else
{
old_sofar = sofar;
sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
align_adjust = sofar != old_sofar;
- current->_raw_size += sofar - old_sofar;
+ current->size += sofar - old_sofar;
}
#endif
#ifdef COFF_IMAGE_WITH_PE
/* For PE we need to make sure we pad out to the aligned
- _raw_size, in case the caller only writes out data to the
- unaligned _raw_size. */
- if (pei_section_data (abfd, current)->virt_size < current->_raw_size)
+ size, in case the caller only writes out data to the
+ unaligned size. */
+ if (pei_section_data (abfd, current)->virt_size < current->size)
align_adjust = TRUE;
#endif
@@ -3632,7 +3651,7 @@ coff_write_object_contents (abfd)
#endif
section.s_vaddr = current->vma;
section.s_paddr = current->lma;
- section.s_size = current->_raw_size;
+ section.s_size = current->size;
#ifdef coff_get_section_load_page
section.s_page = coff_get_section_load_page (current);
#endif
@@ -3651,8 +3670,8 @@ coff_write_object_contents (abfd)
/* If this section has no size or is unloadable then the scnptr
will be 0 too. */
- if (current->_raw_size == 0 ||
- (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ if (current->size == 0
+ || (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
section.s_scnptr = 0;
else
section.s_scnptr = current->filepos;
@@ -3886,6 +3905,8 @@ coff_write_object_contents (abfd)
#ifdef COFF_IMAGE_WITH_PE
if (! hasdebug)
internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED;
+ if (pe_data (abfd)->real_flags & IMAGE_FILE_LARGE_ADDRESS_AWARE)
+ internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
#ifdef COFF_WITH_PE
@@ -4122,17 +4143,17 @@ coff_write_object_contents (abfd)
if (text_sec)
{
- internal_a.tsize = bfd_get_section_size_before_reloc (text_sec);
+ internal_a.tsize = text_sec->size;
internal_a.text_start = internal_a.tsize ? text_sec->vma : 0;
}
if (data_sec)
{
- internal_a.dsize = bfd_get_section_size_before_reloc (data_sec);
+ internal_a.dsize = data_sec->size;
internal_a.data_start = internal_a.dsize ? data_sec->vma : 0;
}
if (bss_sec)
{
- internal_a.bsize = bfd_get_section_size_before_reloc (bss_sec);
+ internal_a.bsize = bss_sec->size;
if (internal_a.bsize && bss_sec->vma < internal_a.data_start)
internal_a.data_start = bss_sec->vma;
}
@@ -4425,8 +4446,7 @@ coff_slurp_line_table (abfd, asect)
if (native_lineno == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: line number table read failed"),
- bfd_archive_filename (abfd));
+ (_("%B: warning: line number table read failed"), abfd);
return FALSE;
}
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
@@ -4458,8 +4478,8 @@ coff_slurp_line_table (abfd, asect)
|| (bfd_vma) symndx >= obj_raw_syment_count (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in line numbers"),
- bfd_archive_filename (abfd), dst.l_addr.l_symndx);
+ (_("%B: warning: illegal symbol index %ld in line numbers"),
+ abfd, dst.l_addr.l_symndx);
symndx = 0;
warned = TRUE;
}
@@ -4472,9 +4492,8 @@ coff_slurp_line_table (abfd, asect)
if (sym->lineno != NULL && ! warned)
{
(*_bfd_error_handler)
- (_("%s: warning: duplicate line number information for `%s'"),
- bfd_archive_filename (abfd),
- bfd_asymbol_name (&sym->symbol));
+ (_("%B: warning: duplicate line number information for `%s'"),
+ abfd, bfd_asymbol_name (&sym->symbol));
}
sym->lineno = cache_ptr;
}
@@ -4828,8 +4847,8 @@ coff_slurp_symbol_table (abfd)
case C_HIDDEN: /* Ext symbol in dmert public lib. */
default:
(*_bfd_error_handler)
- (_("%s: Unrecognized storage class %d for %s symbol `%s'"),
- bfd_archive_filename (abfd), src->u.syment.n_sclass,
+ (_("%B: Unrecognized storage class %d for %s symbol `%s'"),
+ abfd, src->u.syment.n_sclass,
dst->symbol.section->name, dst->symbol.name);
dst->symbol.flags = BSF_DEBUGGING;
dst->symbol.value = (src->u.syment.n_value);
@@ -4961,9 +4980,8 @@ coff_classify_symbol (abfd, syment)
char buf[SYMNMLEN + 1];
(*_bfd_error_handler)
- (_("warning: %s: local symbol `%s' has no section"),
- bfd_archive_filename (abfd),
- _bfd_coff_internal_syment_name (abfd, syment, buf));
+ (_("warning: %B: local symbol `%s' has no section"),
+ abfd, _bfd_coff_internal_syment_name (abfd, syment, buf));
}
return COFF_SYMBOL_LOCAL;
@@ -5068,8 +5086,8 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_archive_filename (abfd), dst.r_symndx);
+ (_("%B: warning: illegal symbol index %ld in relocs"),
+ abfd, dst.r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
@@ -5106,8 +5124,8 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (cache_ptr->howto == NULL)
{
(*_bfd_error_handler)
- (_("%s: illegal relocation type %d at address 0x%lx"),
- bfd_archive_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+ (_("%B: illegal relocation type %d at address 0x%lx"),
+ abfd, dst.r_type, (long) dst.r_vaddr);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5501,6 +5519,10 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
+#ifndef coff_bfd_copy_private_header_data
+#define coff_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
+#endif
+
#ifndef coff_bfd_copy_private_section_data
#define coff_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#endif
@@ -5556,10 +5578,19 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#define coff_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef coff_bfd_is_group_section
+#define coff_bfd_is_group_section bfd_generic_is_group_section
+#endif
+
#ifndef coff_bfd_discard_group
#define coff_bfd_discard_group bfd_generic_discard_group
#endif
+#ifndef coff_section_already_linked
+#define coff_section_already_linked \
+ _bfd_generic_section_already_linked
+#endif
+
#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index a712b4b36e3..a2b0d5d0ddc 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1,6 +1,6 @@
/* Support for the generic parts of COFF, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -131,7 +131,7 @@ make_a_section_from_file (abfd, hdr, target_index)
return_section->vma = hdr->s_vaddr;
return_section->lma = hdr->s_paddr;
- return_section->_raw_size = hdr->s_size;
+ return_section->size = hdr->s_size;
return_section->filepos = hdr->s_scnptr;
return_section->rel_filepos = hdr->s_relptr;
return_section->reloc_count = hdr->s_nreloc;
@@ -1344,7 +1344,7 @@ coff_write_symbols (abfd)
|| (debug_string_section != (asection *) NULL
&& (BFD_ALIGN (debug_string_size,
1 << debug_string_section->alignment_power)
- == bfd_section_size (abfd, debug_string_section))));
+ == debug_string_section->size)));
return TRUE;
}
@@ -1455,7 +1455,7 @@ coff_section_symbol (abfd, name)
csym[0].u.syment.n_sclass = C_STAT;
csym[0].u.syment.n_numaux = 1;
/* SF_SET_STATICS (sym); @@ ??? */
- csym[1].u.auxent.x_scn.x_scnlen = sec->_raw_size;
+ csym[1].u.auxent.x_scn.x_scnlen = sec->size;
csym[1].u.auxent.x_scn.x_nreloc = sec->reloc_count;
csym[1].u.auxent.x_scn.x_nlinno = sec->lineno_count;
@@ -1537,7 +1537,7 @@ build_debug_section (abfd)
return NULL;
}
- sec_size = bfd_get_section_size_before_reloc (sect);
+ sec_size = sect->size;
debug_section = (PTR) bfd_alloc (abfd, sec_size);
if (debug_section == NULL)
return NULL;
@@ -1663,8 +1663,7 @@ _bfd_coff_read_string_table (abfd)
if (strsize < STRING_SIZE_SIZE)
{
(*_bfd_error_handler)
- (_("%s: bad string table size %lu"), bfd_archive_filename (abfd),
- (unsigned long) strsize);
+ (_("%B: bad string table size %lu"), abfd, (unsigned long) strsize);
bfd_set_error (bfd_error_bad_value);
return NULL;
}
@@ -2496,3 +2495,12 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
return TRUE;
}
+
+struct coff_comdat_info *
+bfd_coff_get_comdat_section (bfd *abfd, struct bfd_section *sec)
+{
+ if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ return coff_section_data (abfd, sec)->comdat;
+ else
+ return NULL;
+}
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 4ad566cc22e..ca144cc4929 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1,6 +1,6 @@
/* COFF specific linker code.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -96,7 +96,7 @@ _bfd_coff_link_hash_table_init (struct coff_link_hash_table *table,
struct bfd_hash_table *,
const char *))
{
- table->stab_info = NULL;
+ memset (&table->stab_info, 0, sizeof (table->stab_info));
return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
}
@@ -435,18 +435,19 @@ coff_link_add_symbols (bfd *abfd,
if (obj_pe (abfd)
&& (classification == COFF_SYMBOL_GLOBAL
|| classification == COFF_SYMBOL_PE_SECTION)
- && section->comdat != NULL
+ && coff_section_data (abfd, section) != NULL
+ && coff_section_data (abfd, section)->comdat != NULL
&& strncmp (name, "??_", 3) == 0
- && strcmp (name, section->comdat->name) == 0)
+ && strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)
{
if (*sym_hash == NULL)
*sym_hash = coff_link_hash_lookup (coff_hash_table (info),
name, FALSE, copy, FALSE);
if (*sym_hash != NULL
&& (*sym_hash)->root.type == bfd_link_hash_defined
- && (*sym_hash)->root.u.def.section->comdat != NULL
- && strcmp ((*sym_hash)->root.u.def.section->comdat->name,
- section->comdat->name) == 0)
+ && coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat != NULL
+ && strcmp (coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat->name,
+ coff_section_data (abfd, section)->comdat->name) == 0)
addit = FALSE;
}
@@ -503,9 +504,8 @@ coff_link_add_symbols (bfd *abfd,
&& (BTYPE ((*sym_hash)->type) == T_NULL
|| BTYPE (sym.n_type) == T_NULL)))
(*_bfd_error_handler)
- (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
- name, (*sym_hash)->type, sym.n_type,
- bfd_archive_filename (abfd));
+ (_("Warning: type of symbol `%s' changed from %d to %d in %B"),
+ abfd, name, (*sym_hash)->type, sym.n_type);
/* We don't want to change from a meaningful
base type to a null one, but if we know
@@ -551,8 +551,8 @@ coff_link_add_symbols (bfd *abfd,
For example, it won't help objdump. This needs to be
done when we swap in the section header. */
BFD_ASSERT ((*sym_hash)->numaux == 1);
- if (section->_raw_size == 0)
- section->_raw_size = (*sym_hash)->aux[0].x_scn.x_scnlen;
+ if (section->size == 0)
+ section->size = (*sym_hash)->aux[0].x_scn.x_scnlen;
/* FIXME: We could test whether the section sizes
matches the size in the aux entry, but apparently
@@ -714,8 +714,10 @@ _bfd_coff_final_link (bfd *abfd,
if (info->relocatable)
o->reloc_count += sec->reloc_count;
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
if (sec->lineno_count > max_lineno_count)
max_lineno_count = sec->lineno_count;
if (sec->reloc_count > max_reloc_count)
@@ -1080,7 +1082,7 @@ _bfd_coff_final_link (bfd *abfd,
}
/* If we have optimized stabs strings, output them. */
- if (coff_hash_table (info)->stab_info != NULL)
+ if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return FALSE;
@@ -1208,21 +1210,18 @@ process_embedded_commands (bfd *output_bfd,
asection *sec = bfd_get_section_by_name (abfd, ".drectve");
char *s;
char *e;
- char *copy;
+ bfd_byte *copy;
if (!sec)
return 1;
- copy = bfd_malloc (sec->_raw_size);
- if (!copy)
- return 0;
-
- if (! bfd_get_section_contents (abfd, sec, copy, (bfd_vma) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &copy))
{
- free (copy);
+ if (copy != NULL)
+ free (copy);
return 0;
}
- e = copy + sec->_raw_size;
+ e = copy + sec->size;
for (s = copy; s < e ; )
{
@@ -2283,16 +2282,18 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
/* This section was omitted from the link. */
continue;
+ if ((o->flags & SEC_LINKER_CREATED) != 0)
+ continue;
+
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || (o->_raw_size == 0 && (o->flags & SEC_RELOC) == 0))
+ || (o->size == 0 && (o->flags & SEC_RELOC) == 0))
{
if ((o->flags & SEC_RELOC) != 0
&& o->reloc_count != 0)
{
- ((*_bfd_error_handler)
- (_("%s: relocs in section `%s', but it has no contents"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, o)));
+ (*_bfd_error_handler)
+ (_("%B: relocs in section `%A', but it has no contents"),
+ input_bfd, o);
bfd_set_error (bfd_error_no_contents);
return FALSE;
}
@@ -2305,8 +2306,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
contents = secdata->contents;
else
{
- if (! bfd_get_section_contents (input_bfd, o, finfo->contents,
- (file_ptr) 0, o->_raw_size))
+ bfd_size_type x = o->rawsize ? o->rawsize : o->size;
+ if (! bfd_get_section_contents (input_bfd, o, finfo->contents, 0, x))
return FALSE;
contents = finfo->contents;
}
@@ -2431,10 +2432,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
if (secdata == NULL || secdata->stab_info == NULL)
{
file_ptr loc = o->output_offset * bfd_octets_per_byte (output_bfd);
- bfd_size_type amt = (o->_cooked_size != 0
- ? o->_cooked_size : o->_raw_size);
if (! bfd_set_section_contents (output_bfd, o->output_section,
- contents, loc, amt))
+ contents, loc, o->size))
return FALSE;
}
else
@@ -2616,9 +2615,7 @@ _bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
sec = h->root.u.def.section->output_section;
if (sec != NULL)
{
- auxp->x_scn.x_scnlen = (sec->_cooked_size != 0
- ? sec->_cooked_size
- : sec->_raw_size);
+ auxp->x_scn.x_scnlen = sec->size;
/* For PE, an overflow on the final link reportedly does
not matter. FIXME: Why not? */
@@ -2863,8 +2860,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
(*_bfd_error_handler)
- ("%s: illegal symbol index %ld in relocs",
- bfd_archive_filename (input_bfd), symndx);
+ ("%B: illegal symbol index %ld in relocs", input_bfd, symndx);
return FALSE;
}
else
@@ -2925,16 +2921,41 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
+ /* Defined weak symbols are a GNU extension. */
asection *sec;
sec = h->root.u.def.section;
val = (h->root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
- }
+ }
else if (h->root.type == bfd_link_hash_undefweak)
- val = 0;
+ {
+ if (h->class == C_NT_WEAK && h->numaux == 1)
+ {
+ /* See _Microsoft Portable Executable and Common Object
+ * File Format Specification_, section 5.5.3.
+ * Note that weak symbols without aux records are a GNU
+ * extension.
+ * FIXME: All weak externals are treated as having
+ * characteristics IMAGE_WEAK_EXTERN_SEARCH_LIBRARY (2).
+ * There are no known uses of the other two types of
+ * weak externals.
+ */
+ asection *sec;
+ struct coff_link_hash_entry *h2 =
+ input_bfd->tdata.coff_obj_data->sym_hashes[
+ h->aux->x_sym.x_tagndx.l];
+
+ sec = h2->root.u.def.section;
+ val = h2->root.u.def.value + sec->output_section->vma
+ + sec->output_offset;
+ }
+ else
+ /* This is a GNU extension. */
+ val = 0;
+ }
else if (! info->relocatable)
{
@@ -2984,10 +3005,8 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- (_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_archive_filename (input_bfd),
- (unsigned long) rel->r_vaddr,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: bad reloc address 0x%lx in section `%A'"),
+ input_bfd, input_section, (unsigned long) rel->r_vaddr);
return FALSE;
case bfd_reloc_overflow:
{
diff --git a/bfd/config.bfd b/bfd/config.bfd
index ec326cc271a..d4e0e604abb 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -31,8 +31,10 @@ targ_underscore=no
# Catch obsolete configurations.
case $targ in
- vax-*-vms* \
- )
+ m68*-*-lynxos* | \
+ sparc-*-lynxos* | \
+ vax-*-vms* | \
+ null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
echo "*** Specify --enable-obsolete to build it anyway." >&2
@@ -50,6 +52,7 @@ arm*) targ_archs=bfd_arm_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
c4x*) targ_archs=bfd_tic4x_arch ;;
c54x*) targ_archs=bfd_tic54x_arch ;;
+crx*) targ_archs=bfd_crx_arch ;;
dlx*) targ_archs=bfd_dlx_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3-7]86) targ_archs=bfd_i386_arch ;;
@@ -89,12 +92,17 @@ esac
case "${targ}" in
mips*-dec-bsd*)
- echo "This target is obsolete and has been removed."
+ echo "This target is obsolete and has been removed."
+ exit 1
+ ;;
+
+ mips*-*-mach3*)
+ echo "This target is obsolete and has been removed."
exit 1
;;
mips*-*-pe*)
- echo "This target is obsolete and has been removed."
+ echo "This target is obsolete and has been removed."
exit 1
;;
@@ -217,10 +225,15 @@ case "${targ}" in
targ_selvecs=bfd_elf32_bigarm_vec
;;
arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
+ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
+ arm*-*-eabi* )
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
+ arm*-*-symbianelf*)
+ targ_defvec=bfd_elf32_littlearm_symbian_vec
+ targ_selvecs=bfd_elf32_bigarm_symbian_vec
+ ;;
arm9e-*-elf)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
@@ -317,6 +330,11 @@ case "${targ}" in
targ_underscore=yes # Note: not true for bfd_elf32_cris_vec.
;;
+ crx-*-elf*)
+ targ_defvec=bfd_elf32_crx_vec
+ targ_underscore=yes
+ ;;
+
d10v-*-*)
targ_defvec=bfd_elf32_d10v_vec
;;
@@ -334,10 +352,15 @@ case "${targ}" in
targ_defvec=bfd_elf32_fr30_vec
;;
- frv-*-elf | frv-*-*linux*)
+ frv-*-elf)
targ_defvec=bfd_elf32_frv_vec
+ targ_selvecs=bfd_elf32_frvfdpic_vec
;;
+ frv-*-*linux*)
+ targ_defvec=bfd_elf32_frvfdpic_vec
+ targ_selvecs=bfd_elf32_frv_vec
+ ;;
h8300*-*-elf)
targ_defvec=bfd_elf32_h8300_vec
@@ -366,10 +389,14 @@ case "${targ}" in
;;
#endif
- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
+ hppa*-*-linux-gnu*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
+ hppa*-*-netbsd*)
+ targ_defvec=bfd_elf32_hppa_nbsd_vec
+ targ_selvecs="bfd_elf32_hppa_vec bfd_elf32_hppa_linux_vec"
+ ;;
hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
targ_defvec=bfd_elf32_hppa_vec
targ_selvecs=bfd_elf32_hppa_linux_vec
@@ -509,8 +536,8 @@ case "${targ}" in
;;
#endif
i[3-7]86-*-lynxos*)
- targ_defvec=i386lynx_coff_vec
- targ_selvecs=i386lynx_aout_vec
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs="i386lynx_coff_vec i386lynx_aout_vec"
;;
i[3-7]86-*-gnu*)
targ_defvec=bfd_elf32_i386_vec
@@ -741,6 +768,10 @@ case "${targ}" in
targ_defvec=m88kmach3_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
+ m88*-*-openbsd*)
+ targ_defvec=m88kopenbsd_vec
+ targ_underscore=yes
+ ;;
m88*-*-*)
targ_defvec=m88kbcs_vec
targ_underscore=yes
@@ -767,10 +798,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-mach3*)
- targ_defvec=aout_mips_little_vec
- targ_cflags=-DSTAT_FOR_EXEC
- ;;
mips*-dec-* | mips*el-*-ecoff*)
targ_defvec=ecoff_little_vec
targ_selvecs=ecoff_big_vec
@@ -797,10 +824,6 @@ case "${targ}" in
targ_defvec=ecoff_biglittle_vec
targ_selvecs="ecoff_little_vec ecoff_big_vec"
;;
- mips*-*-mach3*)
- targ_defvec=aout_mips_little_vec
- targ_cflags=-DSTAT_FOR_EXEC
- ;;
mips*-*-sysv4*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
@@ -881,12 +904,12 @@ case "${targ}" in
targ_defvec=bfd_elf32_openrisc_vec
;;
- or32-*-coff | or32-*-rtems*)
+ or32-*-coff)
targ_defvec=or32coff_big_vec
targ_underscore=yes
;;
- or32-*-elf)
+ or32-*-elf | or32-*-rtems*)
targ_defvec=bfd_elf32_or32_big_vec
;;
@@ -977,6 +1000,11 @@ case "${targ}" in
powerpc-*-macos*)
targ_defvec=pmac_xcoff_vec
;;
+ powerpc-*-lynxos*)
+ targ_defvec=bfd_elf32_powerpc_vec
+ targ_selvecs="rs6000coff_vec"
+ targ_cflags=-DSMALL_ARCHIVE
+ ;;
powerpc-*-netware*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
@@ -1004,6 +1032,7 @@ case "${targ}" in
s390-*-linux*)
targ_defvec=bfd_elf32_s390_vec
targ64_selvecs=bfd_elf64_s390_vec
+ want64=true
;;
#ifdef BFD64
s390x-*-linux*)
@@ -1087,6 +1116,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
+ sh*-*-symbianelf*)
+ targ_defvec=bfd_elf32_shl_symbian_vec
+ targ_selvecs="shlcoff_vec shlcoff_small_vec"
+ targ_underscore=yes
+ ;;
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"
diff --git a/bfd/config.in b/bfd/config.in
index 32245393fce..a379372172a 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -1,230 +1,241 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* 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.
+ */
+#undef CRAY_STACKSEG_END
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* 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. */
-#undef CRAY_STACKSEG_END
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define if you have the dcgettext function. */
+/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
-/* Define if you have the fcntl function. */
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
-/* Define if you have the fdopen function. */
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fdopen' function. */
#undef HAVE_FDOPEN
-/* Define if you have the fseeko function. */
+/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
-/* Define if you have the fseeko64 function. */
+/* Define to 1 if you have the `fseeko64' function. */
#undef HAVE_FSEEKO64
-/* Define if you have the ftello function. */
+/* Define to 1 if you have the `ftello' function. */
#undef HAVE_FTELLO
-/* Define if you have the ftello64 function. */
+/* Define to 1 if you have the `ftello64' function. */
#undef HAVE_FTELLO64
-/* Define if you have the getcwd function. */
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getgid function. */
+/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the getuid function. */
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
-/* Define if you have the madvise function. */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if <sys/procfs.h> has lwpstatus_t. */
+#undef HAVE_LWPSTATUS_T
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
+#undef HAVE_LWPSTATUS_T_PR_CONTEXT
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
+#undef HAVE_LWPSTATUS_T_PR_REG
+
+/* Define if <sys/procfs.h> has lwpxstatus_t. */
+#undef HAVE_LWPXSTATUS_T
+
+/* Define to 1 if you have the `madvise' function. */
#undef HAVE_MADVISE
-/* Define if you have the mprotect function. */
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT
-/* Define if you have the munmap function. */
+/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the setitimer function. */
-#undef HAVE_SETITIMER
+/* Define if <sys/procfs.h> has prpsinfo32_t. */
+#undef HAVE_PRPSINFO32_T
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
+/* Define if <sys/procfs.h> has prpsinfo_t. */
+#undef HAVE_PRPSINFO_T
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define if <sys/procfs.h> has prstatus32_t. */
+#undef HAVE_PRSTATUS32_T
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
+#undef HAVE_PRSTATUS32_T_PR_WHO
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define if <sys/procfs.h> has prstatus_t. */
+#undef HAVE_PRSTATUS_T
-/* Define if you have the strtoull function. */
-#undef HAVE_STRTOULL
+/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
+#undef HAVE_PRSTATUS_T_PR_WHO
-/* Define if you have the sysconf function. */
-#undef HAVE_SYSCONF
+/* Define if <sys/procfs.h> has psinfo32_t. */
+#undef HAVE_PSINFO32_T
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define if <sys/procfs.h> has psinfo_t. */
+#undef HAVE_PSINFO_T
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+/* Define if <sys/procfs.h> has pstatus32_t. */
+#undef HAVE_PSTATUS32_T
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define if <sys/procfs.h> has pstatus_t. */
+#undef HAVE_PSTATUS_T
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define if <sys/procfs.h> has pxstatus_t. */
+#undef HAVE_PXSTATUS_T
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
+/* Define to 1 if you have the `setitimer' function. */
+#undef HAVE_SETITIMER
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
-/* Define if you have the <stddef.h> header file. */
+/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
-/* Define if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define if struct core_dumpx has member c_impl */
+#undef HAVE_ST_C_IMPL
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/file.h> header file. */
+/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/procfs.h> header file. */
+/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
-/* Define if you have the <sys/stat.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
-/* Define if you have the <sys/time.h> header file. */
+/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have the <time.h> header file. */
+/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
-/* Name of package */
-#undef PACKAGE
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* The number of bytes in type long long */
-#undef SIZEOF_LONG_LONG
-
-/* The number of bytes in type long */
-#undef SIZEOF_LONG
-
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if <sys/procfs.h> has win32_pstatus_t. */
+#undef HAVE_WIN32_PSTATUS_T
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Define if malloc is not declared in system header files. */
-#undef NEED_DECLARATION_MALLOC
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if realloc is not declared in system header files. */
-#undef NEED_DECLARATION_REALLOC
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
/* Define if free is not declared in system header files. */
#undef NEED_DECLARATION_FREE
@@ -232,63 +243,79 @@
/* Define if getenv is not declared in system header files. */
#undef NEED_DECLARATION_GETENV
-/* Define if struct core_dumpx has member c_impl */
-#undef HAVE_ST_C_IMPL
-
-/* Define if <sys/procfs.h> has prstatus_t. */
-#undef HAVE_PRSTATUS_T
-
-/* Define if <sys/procfs.h> has prstatus32_t. */
-#undef HAVE_PRSTATUS32_T
+/* Define if malloc is not declared in system header files. */
+#undef NEED_DECLARATION_MALLOC
-/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
-#undef HAVE_PRSTATUS_T_PR_WHO
+/* Define if realloc is not declared in system header files. */
+#undef NEED_DECLARATION_REALLOC
-/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
-#undef HAVE_PRSTATUS32_T_PR_WHO
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
-/* Define if <sys/procfs.h> has pstatus_t. */
-#undef HAVE_PSTATUS_T
+/* Name of package */
+#undef PACKAGE
-/* Define if <sys/procfs.h> has pxstatus_t. */
-#undef HAVE_PXSTATUS_T
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if <sys/procfs.h> has pstatus32_t. */
-#undef HAVE_PSTATUS32_T
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Define if <sys/procfs.h> has prpsinfo_t. */
-#undef HAVE_PRPSINFO_T
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define if <sys/procfs.h> has prpsinfo32_t. */
-#undef HAVE_PRPSINFO32_T
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define if <sys/procfs.h> has psinfo_t. */
-#undef HAVE_PSINFO_T
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Define if <sys/procfs.h> has psinfo32_t. */
-#undef HAVE_PSINFO32_T
+/* The number of bytes in type long */
+#undef SIZEOF_LONG
-/* Define if <sys/procfs.h> has lwpstatus_t. */
-#undef HAVE_LWPSTATUS_T
+/* The number of bytes in type long long */
+#undef SIZEOF_LONG_LONG
-/* Define if <sys/procfs.h> has lwpxstatus_t. */
-#undef HAVE_LWPXSTATUS_T
+/* The number of bytes in type off_t */
+#undef SIZEOF_OFF_T
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
-#undef HAVE_LWPSTATUS_T_PR_CONTEXT
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
-#undef HAVE_LWPSTATUS_T_PR_REG
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Define if <sys/procfs.h> has win32_pstatus_t. */
-#undef HAVE_WIN32_PSTATUS_T
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
/* Name of host specific header file to include in trad-core.c. */
#undef TRAD_HEADER
-/* The number of bytes in type off_t */
-#undef SIZEOF_OFF_T
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
/* Use mmap if it's available? */
#undef USE_MMAP
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/bfd/configure b/bfd/configure
index cec4a8b929c..48d6ca637e4 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -1,57 +1,325 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
-# Defaults:
-ac_help=
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=no]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
-ac_help="$ac_help
- --with-mmap try using mmap for BFD input files if available"
-ac_help="$ac_help
- --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-install-libbfd controls installation of libbfd and related headers"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="libbfd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S STRIP ac_ct_STRIP LIBTOOL WARN_CFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults LIBOBJS LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -60,10 +328,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -77,17 +350,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -95,59 +360,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -156,95 +421,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -253,19 +470,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -279,26 +496,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -315,7 +532,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -325,7 +542,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -336,58 +553,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -398,99 +614,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=libbfd.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -500,13 +727,488 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-shared=PKGS build shared libraries default=no
+ --enable-static=PKGS build static libraries default=yes
+ --enable-fast-install=PKGS optimize for fast installation default=yes
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-targets alternative target configurations
+ --enable-commonbfdlib build shared BFD/opcodes/libiberty library
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-install-libbfd controls installation of libbfd and related headers
+ --disable-nls do not use Native Language Support
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-mmap try using mmap for BFD input files if available
+ --with-included-gettext use the GNU gettext library included here
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -517,102 +1219,105 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
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
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:556: 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 561 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-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:589: 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 594 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -625,146 +1330,1104 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:666: checking host system type" >&5
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:687: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:705: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:729: 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
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 737 "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();
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:748: \"$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"
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
rm -f conftest*
-LIBS="$ac_save_LIBS"
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cposix_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_cposix_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+ LIBS="$LIBS -lcposix"
fi
-
+
am__api_version="1.4"
@@ -775,65 +2438,80 @@ am__api_version="1.4"
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:784: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:837: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -855,8 +2533,11 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
test "$2" = conftestfile
@@ -865,258 +2546,314 @@ then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-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:894: 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
-else
- cat > conftestmake <<\EOF
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
PACKAGE=bfd
-VERSION=2.15.90
+VERSION=2.15.91
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:940: checking for working aclocal-${am__api_version}" >&5
+echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5
+echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6
# 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.
if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:953: checking for working autoconf" >&5
+echo "$as_me:$LINENO: checking for working autoconf" >&5
+echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
# 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.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:966: checking for working automake-${am__api_version}" >&5
+echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5
+echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6
# 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.
if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:979: checking for working autoheader" >&5
+echo "$as_me:$LINENO: checking for working autoheader" >&5
+echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
# 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.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:992: checking for working makeinfo" >&5
+echo "$as_me:$LINENO: checking for working makeinfo" >&5
+echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
# 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.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-# Uncomment the next line to remove the date from the reported bfd version
-#is_release=y
-
-bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
-
-bfd_version_string="\"${VERSION}\""
-if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:1027: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # 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:1059: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# 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:1091: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -1141,8 +2878,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=no
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
@@ -1165,8 +2901,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1188,229 +2923,7 @@ no) enable_fast_install=no ;;
esac
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:1197: 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:1227: 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:1278: 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:1310: 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 1321 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1326: \"$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:1352: 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:1357: 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:1366: \"$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:1385: 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
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1418,13 +2931,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
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:1428: checking for ld used by GCC" >&5
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1453,14 +2965,14 @@ echo "configure:1428: 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:1458: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1461: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
@@ -1486,15 +2998,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:1496: 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
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -1503,27 +3019,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
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:1513: 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
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_ld_reload_flag='-r'
fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
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:1525: 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
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -1556,33 +3072,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1563: 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
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1584: 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
+echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -1631,7 +3138,7 @@ darwin* | rhapsody*)
esac
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1699,7 +3206,7 @@ linux-gnu*)
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
-netbsd*)
+netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
@@ -1747,67 +3254,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
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:1757: 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:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1783: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
@@ -1815,10 +3268,10 @@ ac_exeext=$EXEEXT
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:1820: 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
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -1870,17 +3323,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:1882: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -1932,9 +3387,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1946,138 +3403,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:1953: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# 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:1985: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:2020: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP="$ac_cv_prog_STRIP"
+STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_STRIP=$STRIP
# 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:2052: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -2093,20 +3576,19 @@ test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
- :
-fi
+fi;
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
-fi
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2115,8 +3597,12 @@ 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 2119 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 3600 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2149,7 +3635,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2166,47 +3656,74 @@ ia64-*-hpux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2171: 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
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
+
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
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat > conftest.$ac_ext <<EOF
-#line 2184 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
lt_cv_cc_needs_belf=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
@@ -2218,54 +3735,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | 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 \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ 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 \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
@@ -2275,15 +3799,26 @@ objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
+echo "$as_me: error: libtool configure failed" >&2;}
+ { (exit 1); exit 1; }; }
# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
fi
@@ -2297,11 +3832,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
-
-
-
+
+
+
+
# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
if test "${enable_64_bit_bfd+set}" = set; then
@@ -2309,42 +3844,47 @@ if test "${enable_64_bit_bfd+set}" = set; then
case "${enableval}" in
yes) want64=true ;;
no) want64=false ;;
- *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
+echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
else
want64=false
-fi
-# Check whether --enable-targets or --disable-targets was given.
+fi; # Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac
-fi
-# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
if test "${enable_commonbfdlib+set}" = set; then
enableval="$enable_commonbfdlib"
case "${enableval}" in
yes) commonbfdlib=true ;;
no) commonbfdlib=false ;;
- *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
+echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
-fi
+fi;
# Check whether --with-mmap or --without-mmap was given.
if test "${with_mmap+set}" = set; then
withval="$with_mmap"
case "${withval}" in
yes) want_mmap=true ;;
no) want_mmap=false ;;
- *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${withval} for BFD with-mmap option" >&5
+echo "$as_me: error: bad value ${withval} for BFD with-mmap option" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
else
want_mmap=false
-fi
-
+fi;
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
@@ -2361,33 +3901,36 @@ esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi
-fi
-WARN_CFLAGS=""
+fi; WARN_CFLAGS=""
if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
+ ac_config_headers="$ac_config_headers config.h:config.in"
+ ac_config_commands="$ac_config_commands default-1"
if test -z "$target" ; then
- { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2381: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -2397,10 +3940,25 @@ else
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
-
-echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2404: checking whether to install libbfd" >&5
+
+ case ${build_alias} in
+ "") build_noncanonical=${build} ;;
+ *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
+esac
+
+ case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
+esac
+
+echo "$as_me:$LINENO: checking whether to install libbfd" >&5
+echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2411,10 +3969,10 @@ else
else
install_libbfd_p=no
fi
-fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
- echo "$ac_t""$install_libbfd_p" 1>&6
-
if test $install_libbfd_p = yes; then
INSTALL_LIBBFD_TRUE=
@@ -2423,49 +3981,22 @@ else
INSTALL_LIBBFD_TRUE='#'
INSTALL_LIBBFD_FALSE=
fi
+ # Need _noncanonical variables for this.
+
+
+
+
# libbfd.a is a host library containing target dependent code
bfdlibdir='$(libdir)'
bfdincludedir='$(includedir)'
if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
-
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2441: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
host64=false
@@ -2474,380 +4005,1137 @@ bfd_default_target_size=32
# host stuff:
-# Extract the first word of "gcc", so it can be a program name with args.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # 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:2481: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:2511: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
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
+ if test $# != 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="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&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:2562: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2594: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$ac_ct_CC" && break
+done
-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
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-cat > conftest.$ac_ext << EOF
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-#line 2605 "configure"
-#include "confdefs.h"
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-main(){return(0);}
-EOF
-if { (eval echo configure:2610: \"$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
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
- ac_cv_prog_cc_cross=yes
+ CFLAGS="-g"
fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
-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:2636: 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:2641: 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;
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- ac_cv_prog_gcc=no
-fi
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
else
- GCC=
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-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:2669: 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
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
+if test -n "$ac_tool_prefix"; then
+ # 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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+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
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2703: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2718 "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:2724: \"$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
- :
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2735 "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:2741: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2752 "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:2758: \"$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
- :
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-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:2785: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- echo "$ac_t""no" 1>&6
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2813: 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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
-#include "confdefs.h"
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2826: \"$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*
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 2843 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2856,16 +5144,19 @@ 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 2861 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2874,269 +5165,530 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-EOF
-if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2917: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
-; return 0; }
-EOF
-if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_const=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2992: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3032: 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
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3037 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((off_t *) 0)
+ return 0;
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_off_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6
+if test $ac_cv_type_off_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define off_t long
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3065: 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
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3070 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_size_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define size_t unsigned
-EOF
+_ACEOF
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:3100: 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 3105 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3112: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_working_alloca_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_working_alloca_h=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3133: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3138 "configure"
-#include "confdefs.h"
-
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
@@ -3158,137 +5710,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3198: 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
+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3203 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&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:3228: 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 3233 "configure"
-#include "confdefs.h"
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int main() {
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3256: \"$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
- cat >> confdefs.h <<EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3283: 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
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
- cat > conftest.$ac_ext <<EOF
-#line 3291 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
find_stack_direction ()
{
static char *addr = 0;
@@ -3301,138 +5933,316 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3335: 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 3340 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3345: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
+
for ac_func in getpagesize
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3374: 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 3379 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3402: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3427: 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
+echo "$as_me:$LINENO: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_mmap_fixed_mapped=no
else
- cat > conftest.$ac_ext <<EOF
-#line 3435 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
@@ -3446,47 +6256,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ VM page cache was not coherent with the file system buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+ propagated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
-#include <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
#endif
/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-
+#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
+# if !HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3513,327 +6310,578 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ exit (1);
+ if (write (fd, data, pagesize) != pagesize)
+ exit (1);
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ exit (1);
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ exit (1);
+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit (1);
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ exit (1);
+ if (read (fd, data3, pagesize) != pagesize)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit (1);
+ close (fd);
+ exit (0);
}
-
-EOF
-if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+
+
+
+
+
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
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:3616: 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 3621 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3626: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3656: 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 3661 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3684: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3713: 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 3718 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int main() {
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3741: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3775: 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 3780 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <locale.h>
-int main() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3808: checking whether NLS is requested" >&5
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_NLS 1
-EOF
+_ACEOF
+
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3828: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+fi;
+ echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
+echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@@ -3841,141 +6889,336 @@ fi
nls_cv_header_libgt=
CATOBJEXT=NONE
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3847: 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 3852 "configure"
-#include "confdefs.h"
+ if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3857: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_libintl_h=$ac_header_preproc
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:3874: 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
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+
+fi
+if test $ac_cv_header_libintl_h = yes; then
+ echo "$as_me:$LINENO: checking for gettext in libc" >&5
+echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3879 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <libintl.h>
-int main() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gettext_libc=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3902: 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
+ echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3910 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:3921: \"$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
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-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:3937: 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 3942 "configure"
-#include "confdefs.h"
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain ();
+int
+main ()
+{
+bindtextdomain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_intl_bindtextdomain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+ echo "$as_me:$LINENO: checking for gettext in libintl" >&5
+echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libintl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gettext_libintl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
fi
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# 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:3977: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3999,108 +7242,161 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4011: 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 4016 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4039: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
# 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:4066: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4102: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4124,42 +7420,71 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4134 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
CATOBJEXT=.gmo
DATADIRNAME=share
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
+
+
if test "$CATOBJEXT" = "NONE"; then
nls_cv_use_gnu_gettext=yes
fi
@@ -4169,10 +7494,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# 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:4174: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4196,53 +7521,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4208: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4244: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4266,12 +7597,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4287,7 +7620,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
XGETTEXT=":"
fi
fi
@@ -4312,25 +7646,25 @@ fi
POFILES="$POFILES $lang.po"
done
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4334: checking for catalogs to be installed" >&5
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4338,7 +7672,8 @@ echo "configure:4334: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4352,45 +7687,155 @@ echo "configure:4334: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
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:4362: 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 4367 "configure"
-#include "confdefs.h"
+ if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for linux/version.h" >&5
+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking linux/version.h usability" >&5
+echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4372: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking linux/version.h presence" >&5
+echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <linux/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for linux/version.h" >&5
+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_linux_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
+
+fi
+if test $ac_cv_header_linux_version_h = yes; then
msgformat=linux
else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4404,14 +7849,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4428,7 +7873,7 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
+
# Permit host specific settings.
. ${srcdir}/configure.host
@@ -4441,60 +7886,75 @@ fi
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:4450: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
@@ -4505,112 +7965,204 @@ BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
-echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:4510: checking for long long" >&5
-if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${bfd_cv_has_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 4515 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
unsigned long long ll = 18446744073709551615ULL;
-; return 0; }
-EOF
-if { (eval echo configure:4522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_has_long_long=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_has_long_long=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_has_long_long=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_has_long_long" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_has_long_long" >&5
+echo "${ECHO_T}$bfd_cv_has_long_long" >&6
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
- echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4538: checking size of long long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 4544 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (long long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:4554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_long_long=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_long_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long_long = x ; then
- { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
+echo "$as_me: error: cannot determine a size for long long" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-EOF
+_ACEOF
fi
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4579: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 4585 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:4595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_long=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_long != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_long = x ; then
- { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
+echo "$as_me: error: cannot determine a size for long" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
+_ACEOF
if test "x${ac_cv_sizeof_long}" = "x8"; then
@@ -4648,10 +8200,10 @@ fi
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:4653: 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
+ echo "$as_me:$LINENO: checking for build system executable suffix" >&5
+echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
+if test "${bfd_cv_build_exeext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
@@ -4666,360 +8218,922 @@ else
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
-
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
+echo "${ECHO_T}$bfd_cv_build_exeext" >&6
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
-for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
+
+
+
+
+
+
+for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4681: 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 4686 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4691: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
-for ac_hdr in fcntl.h sys/file.h sys/time.h
+
+
+
+for ac_header in fcntl.h sys/file.h sys/time.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4721: 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 4726 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4731: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4758: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4763 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:4772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_time=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define TIME_WITH_SYS_TIME 1
-EOF
+_ACEOF
fi
+
+
+
+
+
ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4797: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4802 "configure"
-#include "confdefs.h"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
fi
+
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4835: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | 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
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4843 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4854: \"$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
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+LIBS=$ac_func_search_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4876: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4884 "configure"
-#include "confdefs.h"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4895: \"$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
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+LIBS=$ac_func_search_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
fi
+
+
+
+
+
+
+
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4920: 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 4925 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int main() {
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4948: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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 strtoull
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4975: 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 4980 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5003: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
@@ -5027,20 +9141,24 @@ done
case "${host}" in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_BINARY_FOPEN 1
-EOF
+_ACEOF
;;
esac
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5038: 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
+echo "$as_me:$LINENO: checking whether strstr must be declared" >&5
+echo $ECHO_N "checking whether strstr must be declared... $ECHO_C" >&6
+if test "${bfd_cv_decl_needed_strstr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5043 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -5056,38 +9174,67 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) strstr
-; return 0; }
-EOF
-if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_decl_needed_strstr=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_decl_needed_strstr=yes
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strstr" >&5
+echo "${ECHO_T}$bfd_cv_decl_needed_strstr" >&6
if test $bfd_cv_decl_needed_strstr = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_STRSTR 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:5085: 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
+echo "$as_me:$LINENO: checking whether malloc must be declared" >&5
+echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6
+if test "${bfd_cv_decl_needed_malloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5090 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -5103,38 +9250,67 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) malloc
-; return 0; }
-EOF
-if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_decl_needed_malloc=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_malloc=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_decl_needed_malloc=yes
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5
+echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6
if test $bfd_cv_decl_needed_malloc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_MALLOC 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:5132: 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
+echo "$as_me:$LINENO: checking whether realloc must be declared" >&5
+echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6
+if test "${bfd_cv_decl_needed_realloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5137 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -5150,38 +9326,67 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) realloc
-; return 0; }
-EOF
-if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_decl_needed_realloc=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_realloc=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_decl_needed_realloc=yes
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5
+echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6
if test $bfd_cv_decl_needed_realloc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_REALLOC 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:5179: 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
+echo "$as_me:$LINENO: checking whether free must be declared" >&5
+echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6
+if test "${bfd_cv_decl_needed_free+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5184 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -5197,38 +9402,67 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) free
-; return 0; }
-EOF
-if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_decl_needed_free=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_free=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_decl_needed_free=yes
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5
+echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6
if test $bfd_cv_decl_needed_free = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_FREE 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5226: checking whether getenv must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether getenv must be declared" >&5
+echo $ECHO_N "checking whether getenv must be declared... $ECHO_C" >&6
+if test "${bfd_cv_decl_needed_getenv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5231 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -5244,27 +9478,53 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) getenv
-; return 0; }
-EOF
-if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_decl_needed_getenv=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_decl_needed_getenv=yes
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_getenv" >&5
+echo "${ECHO_T}$bfd_cv_decl_needed_getenv" >&6
if test $bfd_cv_decl_needed_getenv = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_GETENV 1
-EOF
+_ACEOF
fi
@@ -5295,6 +9555,10 @@ if test "${target}" = "${host}"; then
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+ hppa*-*-netbsd* | hppa*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
+
i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
@@ -5312,7 +9576,7 @@ if test "${target}" = "${host}"; then
i[3-7]86-*-bsdi)
COREFILE=
;;
- i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
+ i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
;;
@@ -5348,14 +9612,6 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i860mach3.h"'
;;
- mips-dec-bsd*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsbsd.h"'
- ;;
- mips-dec-mach3*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsmach3.h"'
- ;;
mips-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -5366,10 +9622,6 @@ if test "${target}" = "${host}"; then
mips-sgi-irix4*) COREFILE=irix-core.lo ;;
mips-sgi-irix5*) COREFILE=irix-core.lo ;;
mips-sgi-irix6*) COREFILE=irix-core.lo ;;
- mips-*-mach3*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsmach3.h"'
- ;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
COREFILE=trad-core.lo
@@ -5416,6 +9668,9 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m88kmach3.h"'
;;
+ m88*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/pc532mach.h"'
@@ -5435,30 +9690,60 @@ if test "${target}" = "${host}"; then
COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
- echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5440: checking for c_impl in struct core_dumpx" >&5
- cat > conftest.$ac_ext <<EOF
-#line 5442 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for c_impl in struct core_dumpx" >&5
+echo $ECHO_N "checking for c_impl in struct core_dumpx... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <core.h>
-int main() {
+int
+main ()
+{
struct core_dumpx c; c.c_impl = 0;
-; return 0; }
-EOF
-if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ST_C_IMPL 1
-EOF
+_ACEOF
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
;;
rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
rs6000-*-*) COREFILE=rs6000-core.lo ;;
@@ -5518,631 +9803,1206 @@ rm -f conftest*
# ELF corefile support has several flavors, but all of
# them use something called <sys/procfs.h>
- for ac_hdr in sys/procfs.h
+
+for ac_header in sys/procfs.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5526: 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 5531 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5536: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
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:5564: 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 5569 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for prstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus_t" >&6
- echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5600: 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
+ echo "$as_me:$LINENO: checking for prstatus32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5605 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prstatus32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prstatus32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6
- echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5636: 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
+ echo "$as_me:$LINENO: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus_t.pr_who in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5641 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus_t avar; void* aref = (void*) &avar.pr_who
-; return 0; }
-EOF
-if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS_T_PR_WHO 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6
- echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5672: 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
+ echo "$as_me:$LINENO: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus32_t.pr_who in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5677 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus32_t avar; void* aref = (void*) &avar.pr_who
-; return 0; }
-EOF
-if { (eval echo configure:5686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS32_T_PR_WHO 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6
- echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5708: 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
+ echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5713 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
- echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5744: 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
+ echo "$as_me:$LINENO: checking for pxstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pxstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5749 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pxstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pxstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pxstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PXSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6
- echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5780: 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
+ echo "$as_me:$LINENO: checking for pstatus32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pstatus32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5785 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pstatus32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pstatus32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSTATUS32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6
- echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5816: 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
+ echo "$as_me:$LINENO: checking for prpsinfo_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prpsinfo_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5821 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prpsinfo_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prpsinfo_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prpsinfo_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRPSINFO_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6
- echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5852: 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
+ echo "$as_me:$LINENO: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prpsinfo32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5857 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prpsinfo32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRPSINFO32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6
- echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5888: 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
+ echo "$as_me:$LINENO: checking for psinfo_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for psinfo_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5893 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
psinfo_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psinfo_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_psinfo_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSINFO_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo_t" >&6
- echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5924: 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
+ echo "$as_me:$LINENO: checking for psinfo32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for psinfo32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5929 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
psinfo32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psinfo32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_psinfo32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSINFO32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6
- echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5960: 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
+ echo "$as_me:$LINENO: checking for lwpstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5965 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_lwpstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6
- echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5996: 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
+ echo "$as_me:$LINENO: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpxstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6001 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpxstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:6010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPXSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6
- echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6032: 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
+ echo "$as_me:$LINENO: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t.pr_context in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6037 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
-; return 0; }
-EOF
-if { (eval echo configure:6046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6
- echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6068: 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
+ echo "$as_me:$LINENO: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6073 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
-; return 0; }
-EOF
-if { (eval echo configure:6082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T_PR_REG 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6
- echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6104: 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
+ echo "$as_me:$LINENO: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for win32_pstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6109 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
win32_pstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:6118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_WIN32_PSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6
fi
fi
if test -n "$TRAD_HEADER"; then
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define TRAD_HEADER $TRAD_HEADER
-EOF
+_ACEOF
fi
@@ -6274,8 +11134,6 @@ do
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
- aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
@@ -6298,16 +11156,21 @@ do
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_symbian_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
+ bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
+ bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
@@ -6322,6 +11185,8 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_symbian_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -6360,6 +11225,7 @@ do
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
@@ -6444,6 +11310,7 @@ do
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
+ m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;;
mach_o_be_vec) tb="$tb mach-o.lo" ;;
mach_o_le_vec) tb="$tb mach-o.lo" ;;
mach_o_fat_vec) tb="$tb mach-o.lo" ;;
@@ -6517,7 +11384,9 @@ do
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
"") ;;
- *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: *** unknown target vector $vec" >&5
+echo "$as_me: error: *** unknown target vector $vec" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
if test ${target_size} = 64; then
@@ -6581,32 +11450,39 @@ case ${host64}-${target64}-${want64} in
bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test $BFD_HOST_64_BIT_DEFINED = 0; then
- echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
- echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
+ { echo "$as_me:$LINENO: WARNING: You have requested a 64 bit BFD configuration, but" >&5
+echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;}
+ { echo "$as_me:$LINENO: WARNING: your compiler may not have a 64 bit integral type" >&5
+echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;}
fi
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:6591: checking for gcc version with buggy 64-bit support" >&5
+ echo "$as_me:$LINENO: checking for gcc version with buggy 64-bit support" >&5
+echo $ECHO_N "checking for gcc version with buggy 64-bit support... $ECHO_C" >&6
# Add more tests for gcc versions with non-working 64-bit support here.
- cat > conftest.$ac_ext <<EOF
-#line 6594 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
:__GNUC__:__GNUC_MINOR__:__i386__:
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then
bad_64bit_gcc=yes;
- echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
+ echo "$as_me:$LINENO: result: yes: egcs-1.1.2 on ix86 spotted" >&5
+echo "${ECHO_T}yes: egcs-1.1.2 on ix86 spotted" >&6
else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
rm -f conftest*
if test $bad_64bit_gcc = yes ; then
- { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&5
+echo "$as_me: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&2;}
+ { (exit 1); exit 1; }; }
fi
fi
;;
@@ -6629,104 +11505,186 @@ esac
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
+
+
+
+
for ac_func in ftello ftello64 fseeko fseeko64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6636: 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 6641 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6664: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
- echo $ac_n "checking size of off_t""... $ac_c" 1>&6
-echo "configure:6690: checking size of off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking size of off_t" >&5
+echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
switch (0) case 0: case (sizeof (off_t) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:6706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_sizeof_off_t=$ac_size
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test x$ac_cv_sizeof_off_t != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_off_t = x ; then
- { echo "configure: error: cannot determine a size for off_t" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot determine a size for off_t" >&5
+echo "$as_me: error: cannot determine a size for off_t" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
-cat >> confdefs.h <<EOF
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
+
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-EOF
+_ACEOF
fi
-echo $ac_n "checking file_ptr type""... $ac_c" 1>&6
-echo "configure:6730: checking file_ptr type" >&5
+echo "$as_me:$LINENO: checking file_ptr type" >&5
+echo $ECHO_N "checking file_ptr type... $ECHO_C" >&6
bfd_file_ptr="long"
bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
@@ -6734,7 +11692,8 @@ if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
-echo "$ac_t""$bfd_file_ptr" 1>&6
+echo "$as_me:$LINENO: result: $bfd_file_ptr" >&5
+echo "${ECHO_T}$bfd_file_ptr" >&6
@@ -6747,112 +11706,276 @@ test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selar
test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6755: 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 6760 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6765: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
+
for ac_func in getpagesize
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6794: 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 6799 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6822: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6847: 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
+echo "$as_me:$LINENO: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_mmap_fixed_mapped=no
else
- cat > conftest.$ac_ext <<EOF
-#line 6855 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
@@ -6866,47 +11989,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ VM page cache was not coherent with the file system buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+ propagated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
-#include <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
#endif
/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-
+#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
+# if !HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -6933,602 +12043,1544 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ exit (1);
+ if (write (fd, data, pagesize) != pagesize)
+ exit (1);
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ exit (1);
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ exit (1);
+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit (1);
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ exit (1);
+ if (read (fd, data3, pagesize) != pagesize)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit (1);
+ close (fd);
+ exit (0);
}
-
-EOF
-if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
for ac_func in madvise mprotect
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7033: 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 7038 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int main() {
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7061: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
- true+yes ) cat >> confdefs.h <<\EOF
+ true+yes )
+cat >>confdefs.h <<\_ACEOF
#define USE_MMAP 1
-EOF
+_ACEOF
;;
esac
rm -f doc/config.status
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"
+
+ ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | 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 \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ 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 \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-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
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@bfd_version@%$bfd_version%g
-s%@bfd_version_string@%$bfd_version_string%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
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
-s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
-s%@bfdlibdir@%$bfdlibdir%g
-s%@bfdincludedir@%$bfdincludedir%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@HDEFINES@%$HDEFINES%g
-s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
-s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g
-s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
-s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
-s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@COREFILE@%$COREFILE%g
-s%@COREFLAG@%$COREFLAG%g
-s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
-s%@WIN32LIBADD@%$WIN32LIBADD%g
-s%@TDEFINES@%$TDEFINES%g
-s%@wordsize@%$wordsize%g
-s%@bfd_libs@%$bfd_libs%g
-s%@all_backends@%$all_backends%g
-s%@bfd_backends@%$bfd_backends%g
-s%@bfd_machines@%$bfd_machines%g
-s%@bfd_default_target_size@%$bfd_default_target_size%g
-s%@bfd_file_ptr@%$bfd_file_ptr%g
-s%@bfd_ufile_ptr@%$bfd_ufile_ptr%g
-s%@tdefaults@%$tdefaults%g
-CEOF
-EOF
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "bfd-in3.h" ) CONFIG_FILES="$CONFIG_FILES bfd-in3.h:bfd-in2.h" ;;
+ "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LN_S@,$LN_S,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@INSTALL_LIBBFD_TRUE@,$INSTALL_LIBBFD_TRUE,;t t
+s,@INSTALL_LIBBFD_FALSE@,$INSTALL_LIBBFD_FALSE,;t t
+s,@host_noncanonical@,$host_noncanonical,;t t
+s,@target_noncanonical@,$target_noncanonical,;t t
+s,@bfdlibdir@,$bfdlibdir,;t t
+s,@bfdincludedir@,$bfdincludedir,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@GMOFILES@,$GMOFILES,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@INTLDEPS@,$INTLDEPS,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@INTLOBJS@,$INTLOBJS,;t t
+s,@POFILES@,$POFILES,;t t
+s,@POSUB@,$POSUB,;t t
+s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
+s,@GT_NO@,$GT_NO,;t t
+s,@GT_YES@,$GT_YES,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;t t
+s,@HDEFINES@,$HDEFINES,;t t
+s,@BFD_HOST_64BIT_LONG@,$BFD_HOST_64BIT_LONG,;t t
+s,@BFD_HOST_LONG_LONG@,$BFD_HOST_LONG_LONG,;t t
+s,@BFD_HOST_64_BIT_DEFINED@,$BFD_HOST_64_BIT_DEFINED,;t t
+s,@BFD_HOST_64_BIT@,$BFD_HOST_64_BIT,;t t
+s,@BFD_HOST_U_64_BIT@,$BFD_HOST_U_64_BIT,;t t
+s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
+s,@COREFILE@,$COREFILE,;t t
+s,@COREFLAG@,$COREFLAG,;t t
+s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
+s,@WIN32LIBADD@,$WIN32LIBADD,;t t
+s,@TDEFINES@,$TDEFINES,;t t
+s,@wordsize@,$wordsize,;t t
+s,@bfd_libs@,$bfd_libs,;t t
+s,@all_backends@,$all_backends,;t t
+s,@bfd_backends@,$bfd_backends,;t t
+s,@bfd_machines@,$bfd_machines,;t t
+s,@bfd_default_target_size@,$bfd_default_target_size,;t t
+s,@bfd_file_ptr@,$bfd_file_ptr,;t t
+s,@bfd_ufile_ptr@,$bfd_ufile_ptr,;t t
+s,@tdefaults@,$tdefaults,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
+ default ) sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/bfd/configure.in b/bfd/configure.in
index d0aeca76210..7e3fa454ce0 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -1,27 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.13)
-AC_INIT(libbfd.c)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([libbfd.c])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.15.90)
-# Uncomment the next line to remove the date from the reported bfd version
-#is_release=y
-
-changequote(,)dnl
-bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
-changequote([,])dnl
-
-bfd_version_string="\"${VERSION}\""
-if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
-fi
-AC_SUBST(bfd_version)
-AC_SUBST(bfd_version_string)
+AM_INIT_AUTOMAKE(bfd, 2.15.91)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -44,7 +31,7 @@ esac],[want64=false])dnl
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
@@ -120,9 +107,7 @@ BFD_HOST_U_64_BIT=
AC_MSG_CHECKING([for long long])
AC_CACHE_VAL(bfd_cv_has_long_long,
-[AC_TRY_COMPILE(,
-[unsigned long long ll = 18446744073709551615ULL;],
-bfd_cv_has_long_long=yes, bfd_cv_has_long_long=no)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])])
AC_MSG_RESULT($bfd_cv_has_long_long)
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
@@ -195,6 +180,10 @@ if test "${target}" = "${host}"; then
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+ hppa*-*-netbsd* | hppa*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
+
i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
@@ -219,7 +208,7 @@ changequote([,])dnl
COREFILE=
;;
changequote(,)dnl
- i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
+ i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
@@ -272,14 +261,6 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i860mach3.h"'
;;
- mips-dec-bsd*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsbsd.h"'
- ;;
- mips-dec-mach3*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsmach3.h"'
- ;;
mips-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -290,10 +271,6 @@ changequote([,])dnl
mips-sgi-irix4*) COREFILE=irix-core.lo ;;
mips-sgi-irix5*) COREFILE=irix-core.lo ;;
mips-sgi-irix6*) COREFILE=irix-core.lo ;;
- mips-*-mach3*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/mipsmach3.h"'
- ;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
COREFILE=trad-core.lo
@@ -340,6 +317,9 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m88kmach3.h"'
;;
+ m88*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/pc532mach.h"'
@@ -362,9 +342,7 @@ changequote([,])dnl
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
AC_MSG_CHECKING([for c_impl in struct core_dumpx])
- AC_TRY_COMPILE([#include <core.h>],
- [struct core_dumpx c; c.c_impl = 0;],
- [AC_DEFINE(HAVE_ST_C_IMPL, 1,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
[Define if struct core_dumpx has member c_impl])
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
;;
@@ -583,8 +561,6 @@ do
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
- aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
- aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
@@ -607,16 +583,21 @@ do
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_symbian_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
+ bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
+ bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
@@ -631,6 +612,8 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_symbian_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -669,6 +652,7 @@ do
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
@@ -753,6 +737,7 @@ do
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
+ m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;;
mach_o_be_vec) tb="$tb mach-o.lo" ;;
mach_o_le_vec) tb="$tb mach-o.lo" ;;
mach_o_fat_vec) tb="$tb mach-o.lo" ;;
@@ -902,7 +887,7 @@ case ${host64}-${target64}-${want64} in
AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
AC_MSG_RESULT(no))
if test $bad_64bit_gcc = yes ; then
- AC_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
+ AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
fi
fi
;;
@@ -958,6 +943,7 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in,
-[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
+AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
+AC_CONFIG_COMMANDS([default],[[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]],[[]])
+AC_OUTPUT
diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c
index 17889f3b472..ea923c3409f 100644
--- a/bfd/cpu-arm.c
+++ b/bfd/cpu-arm.c
@@ -1,5 +1,6 @@
/* BFD support for the ARM processor
- Copyright 1994, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
This file is part of BFD, the Binary File Descriptor library.
@@ -194,9 +195,8 @@ bfd_arm_merge_machines (ibfd, obfd)
&& (out == bfd_mach_arm_XScale || out == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
-ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+ ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
@@ -204,9 +204,8 @@ ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
&& (in == bfd_mach_arm_XScale || in == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
-ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
- bfd_archive_filename (obfd),
- bfd_get_filename (ibfd));
+ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+ obfd, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
@@ -286,7 +285,7 @@ bfd_arm_update_notes (abfd, note_section)
{
asection * arm_arch_section;
bfd_size_type buffer_size;
- char * buffer;
+ bfd_byte * buffer;
char * arch_string;
char * expected;
@@ -298,16 +297,11 @@ bfd_arm_update_notes (abfd, note_section)
if (arm_arch_section == NULL)
return TRUE;
- buffer_size = arm_arch_section->_raw_size;
+ buffer_size = arm_arch_section->size;
if (buffer_size == 0)
return FALSE;
- buffer = bfd_malloc (buffer_size);
- if (buffer == NULL)
- return FALSE;
-
- if (! bfd_get_section_contents (abfd, arm_arch_section, buffer,
- (file_ptr) 0, buffer_size))
+ if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
goto FAIL;
/* Parse the note. */
@@ -351,7 +345,8 @@ bfd_arm_update_notes (abfd, note_section)
return TRUE;
FAIL:
- free (buffer);
+ if (buffer != NULL)
+ free (buffer);
return FALSE;
}
@@ -385,7 +380,7 @@ bfd_arm_get_mach_from_notes (abfd, note_section)
{
asection * arm_arch_section;
bfd_size_type buffer_size;
- char * buffer;
+ bfd_byte * buffer;
char * arch_string;
int i;
@@ -397,16 +392,11 @@ bfd_arm_get_mach_from_notes (abfd, note_section)
if (arm_arch_section == NULL)
return bfd_mach_arm_unknown;
- buffer_size = arm_arch_section->_raw_size;
+ buffer_size = arm_arch_section->size;
if (buffer_size == 0)
return bfd_mach_arm_unknown;
- buffer = bfd_malloc (buffer_size);
- if (buffer == NULL)
- return bfd_mach_arm_unknown;
-
- if (! bfd_get_section_contents (abfd, arm_arch_section, buffer,
- (file_ptr) 0, buffer_size))
+ if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
goto FAIL;
/* Parse the note. */
@@ -422,6 +412,7 @@ bfd_arm_get_mach_from_notes (abfd, note_section)
}
FAIL:
- free (buffer);
+ if (buffer != NULL)
+ free (buffer);
return bfd_mach_arm_unknown;
}
diff --git a/bfd/cpu-crx.c b/bfd/cpu-crx.c
new file mode 100644
index 00000000000..9636630113a
--- /dev/null
+++ b/bfd/cpu-crx.c
@@ -0,0 +1,39 @@
+/* BFD support for the CRX processor.
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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 "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+
+const bfd_arch_info_type bfd_crx_arch =
+ {
+ 16, /* 16 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_crx, /* enum bfd_architecture arch. */
+ bfd_mach_crx,
+ "crx", /* Arch name. */
+ "crx", /* Printable name. */
+ 1, /* Unsigned int section alignment power. */
+ TRUE, /* The one and only. */
+ bfd_default_compatible,
+ bfd_default_scan ,
+ 0,
+ };
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 5907de02537..d726dc32bb9 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -96,8 +96,18 @@ h8300_scan (const struct bfd_arch_info *info, const char *string)
static const bfd_arch_info_type *
compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
{
+ if (in->arch != out->arch)
+ return 0;
+ if (in->mach == bfd_mach_h8300sx && out->mach == bfd_mach_h8300s)
+ return in;
+ if (in->mach == bfd_mach_h8300s && out->mach == bfd_mach_h8300sx)
+ return out;
+ if (in->mach == bfd_mach_h8300sxn && out->mach == bfd_mach_h8300sn)
+ return in;
+ if (in->mach == bfd_mach_h8300sn && out->mach == bfd_mach_h8300sxn)
+ return out;
/* It's really not a good idea to mix and match modes. */
- if (in->arch != out->arch || in->mach != out->mach)
+ if (in->mach != out->mach)
return 0;
else
return in;
diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c
index 71c70297d1d..c4112d3f589 100644
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -1,6 +1,6 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,7 +40,12 @@ static const bfd_arch_info_type arch_info_struct[] =
N(bfd_mach_mcf5307, "m68k:5307", FALSE, &arch_info_struct[10]),
N(bfd_mach_mcf5407, "m68k:5407", FALSE, &arch_info_struct[11]),
N(bfd_mach_m68060, "m68k:68060", FALSE, &arch_info_struct[12]),
- N(bfd_mach_mcf528x, "m68k:528x", FALSE, 0),
+ N(bfd_mach_mcf528x, "m68k:528x", FALSE, &arch_info_struct[13]),
+ N(bfd_mach_mcf521x, "m68k:521x", FALSE, &arch_info_struct[14]),
+ N(bfd_mach_mcf5249, "m68k:5249", FALSE, &arch_info_struct[15]),
+ N(bfd_mach_mcf547x, "m68k:547x", FALSE, &arch_info_struct[16]),
+ N(bfd_mach_mcf548x, "m68k:548x", FALSE, &arch_info_struct[17]),
+ N(bfd_mach_mcfv4e, "m68k:cfv4e", FALSE, 0),
};
const bfd_arch_info_type bfd_m68k_arch =
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 39e5b23937b..0cd358da967 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -1,5 +1,5 @@
/* BFD support for the ns32k architecture.
- Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001, 2002, 2003
+ Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Almost totally rewritten by Ian Dall from initial work
by Andrew Cagney.
@@ -191,7 +191,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
flag = bfd_reloc_undefined;
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -804,7 +804,7 @@ _bfd_ns32k_final_link_relocate (howto, input_bfd, input_section, contents,
bfd_vma relocation;
/* Sanity check the address. */
- if (address > input_section->_cooked_size)
+ if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* This function assumes that we are dealing with a basic relocation
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index be359df7090..2fb738780a9 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -22,20 +22,24 @@
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
+#include "../opcodes/sh-opc.h"
#define SH_NEXT &arch_info_struct[0]
#define SH2_NEXT &arch_info_struct[1]
#define SH2E_NEXT &arch_info_struct[2]
#define SH_DSP_NEXT &arch_info_struct[3]
#define SH3_NEXT &arch_info_struct[4]
-#define SH3_DSP_NEXT &arch_info_struct[5]
-#define SH3E_NEXT &arch_info_struct[6]
-#define SH4_NEXT &arch_info_struct[7]
-#define SH4A_NEXT &arch_info_struct[8]
-#define SH4AL_DSP_NEXT &arch_info_struct[9]
-#define SH4_NOFPU_NEXT &arch_info_struct[10]
-#define SH4_NOMMU_NOFPU_NEXT &arch_info_struct[11]
-#define SH4A_NOFPU_NEXT &arch_info_struct[12]
+#define SH3_NOMMU_NEXT &arch_info_struct[5]
+#define SH3_DSP_NEXT &arch_info_struct[6]
+#define SH3E_NEXT &arch_info_struct[7]
+#define SH4_NEXT &arch_info_struct[8]
+#define SH4A_NEXT &arch_info_struct[9]
+#define SH4AL_DSP_NEXT &arch_info_struct[10]
+#define SH4_NOFPU_NEXT &arch_info_struct[11]
+#define SH4_NOMMU_NOFPU_NEXT &arch_info_struct[12]
+#define SH4A_NOFPU_NEXT &arch_info_struct[13]
+#define SH2A_NEXT &arch_info_struct[14]
+#define SH2A_NOFPU_NEXT &arch_info_struct[15]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
@@ -101,6 +105,20 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
+ bfd_mach_sh3_nommu,
+ "sh", /* arch_name */
+ "sh3-nommu", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH3_NOMMU_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
bfd_mach_sh3_dsp,
"sh", /* arch_name */
"sh3-dsp", /* printable name */
@@ -209,6 +227,34 @@ static const bfd_arch_info_type arch_info_struct[] =
SH4A_NOFPU_NEXT
},
{
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_sh,
+ bfd_mach_sh2a,
+ "sh", /* Arch_name. */
+ "sh2a", /* Printable name. */
+ 1,
+ FALSE, /* Not the default. */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH2A_NEXT
+ },
+ {
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_sh,
+ bfd_mach_sh2a_nofpu,
+ "sh", /* Arch_name. */
+ "sh2a-nofpu", /* Printable name. */
+ 1,
+ FALSE, /* Not the default. */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH2A_NOFPU_NEXT
+ },
+ {
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
@@ -239,3 +285,174 @@ const bfd_arch_info_type bfd_sh_arch =
bfd_default_scan,
SH_NEXT
};
+
+
+/* This table defines the mappings from the BFD internal numbering
+ system to the opcodes internal flags system.
+ It is used by the functions defined below.
+ The prototypes for these SH specific functions are found in
+ sh-opc.h . */
+
+static struct { unsigned long bfd_mach, arch, arch_up; } bfd_to_arch_table[] =
+{
+ { bfd_mach_sh, arch_sh1, arch_sh1_up },
+ { bfd_mach_sh2, arch_sh2, arch_sh2_up },
+ { bfd_mach_sh2e, arch_sh2e, arch_sh2e_up },
+ { bfd_mach_sh_dsp, arch_sh_dsp, arch_sh_dsp_up },
+ { bfd_mach_sh2a, arch_sh2a, arch_sh2a_up },
+ { bfd_mach_sh2a_nofpu, arch_sh2a_nofpu, arch_sh2a_nofpu_up },
+ { bfd_mach_sh3, arch_sh3, arch_sh3_up },
+ { bfd_mach_sh3_nommu, arch_sh3_nommu, arch_sh3_nommu_up },
+ { bfd_mach_sh3_dsp, arch_sh3_dsp, arch_sh3_dsp_up },
+ { bfd_mach_sh3e, arch_sh3e, arch_sh3e_up },
+ { bfd_mach_sh4, arch_sh4, arch_sh4_up },
+ { bfd_mach_sh4a, arch_sh4a, arch_sh4a_up },
+ { bfd_mach_sh4al_dsp, arch_sh4al_dsp, arch_sh4al_dsp_up },
+ { bfd_mach_sh4_nofpu, arch_sh4_nofpu, arch_sh4_nofp_up },
+ { bfd_mach_sh4_nommu_nofpu, arch_sh4_nommu_nofpu, arch_sh4_nommu_nofpu_up },
+ { bfd_mach_sh4a_nofpu, arch_sh4a_nofpu, arch_sh4a_nofp_up },
+ { 0, 0, 0 } /* Terminator. */
+};
+
+
+/* Convert a BFD mach number into the right opcodes arch flags
+ using the table above. */
+
+unsigned int
+sh_get_arch_from_bfd_mach (unsigned long mach)
+{
+ int i = 0;
+
+ while (bfd_to_arch_table[i].bfd_mach != 0)
+ if (bfd_to_arch_table[i].bfd_mach == mach)
+ return bfd_to_arch_table[i].arch;
+ else
+ i++;
+
+ /* mach not found. */
+ BFD_FAIL();
+
+ return SH_ARCH_UNKNOWN_ARCH;
+}
+
+
+/* Convert a BFD mach number into a set of opcodes arch flags
+ describing all the compatible architectures (i.e. arch_up)
+ using the table above. */
+
+unsigned int
+sh_get_arch_up_from_bfd_mach (unsigned long mach)
+{
+ int i = 0;
+
+ while (bfd_to_arch_table[i].bfd_mach != 0)
+ if (bfd_to_arch_table[i].bfd_mach == mach)
+ return bfd_to_arch_table[i].arch_up;
+ else
+ i++;
+
+ /* mach not found. */
+ BFD_FAIL();
+
+ return SH_ARCH_UNKNOWN_ARCH;
+}
+
+
+/* Convert an arbitary arch_set - not necessarily corresponding
+ directly to anything in the table above - to the most generic
+ architecture which supports all the required features, and
+ return the corresponding BFD mach. */
+
+unsigned long
+sh_get_bfd_mach_from_arch_set (unsigned int arch_set)
+{
+ unsigned long result = 0;
+ unsigned int best = ~arch_set;
+ unsigned int co_mask = ~0;
+ int i = 0;
+
+ /* If arch_set permits variants with no coprocessor then do not allow
+ the other irrelevant co-processor bits to influence the choice:
+ e.g. if dsp is disallowed by arch_set, then the algorithm would
+ prefer fpu variants over nofpu variants because they also disallow
+ dsp - even though the nofpu would be the most correct choice.
+ This assumes that EVERY fpu/dsp variant has a no-coprocessor
+ counter-part, or their non-fpu/dsp instructions do not have the
+ no co-processor bit set. */
+ if (arch_set & arch_sh_no_co)
+ co_mask = ~(arch_sh_sp_fpu | arch_sh_dp_fpu | arch_sh_has_dsp);
+
+ while (bfd_to_arch_table[i].bfd_mach != 0)
+ {
+ unsigned int try = bfd_to_arch_table[i].arch_up & co_mask;
+
+ /* Conceptually: Find the architecture with the least number
+ of extra features or, if they have the same number, then
+ the greatest number of required features. Disregard
+ architectures where the required features alone do
+ not describe a valid architecture. */
+ if (((try & ~arch_set) < (best & ~arch_set)
+ || ((try & ~arch_set) == (best & ~arch_set)
+ && (~try & arch_set) < (~best & arch_set)))
+ && SH_MERGE_ARCH_SET_VALID (try, arch_set))
+ {
+ result = bfd_to_arch_table[i].bfd_mach;
+ best = try;
+ }
+
+ i++;
+ }
+
+ /* This might happen if a new variant is added to sh-opc.h
+ but no corresponding entry is added to the table above. */
+ BFD_ASSERT (result != 0);
+
+ return result;
+}
+
+
+/* Merge the architecture type of two BFD files, such that the
+ resultant architecture supports all the features required
+ by the two input BFDs.
+ If the input BFDs are multually incompatible - i.e. one uses
+ DSP while the other uses FPU - or there is no known architecture
+ that fits the requirements then an error is emitted. */
+
+bfd_boolean
+sh_merge_bfd_arch (bfd *ibfd, bfd *obfd)
+{
+ unsigned int old_arch, new_arch, merged_arch;
+
+ if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ return FALSE;
+
+ old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd));
+ new_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (ibfd));
+
+ merged_arch = SH_MERGE_ARCH_SET (old_arch, new_arch);
+
+ if (!SH_VALID_CO_ARCH_SET (merged_arch))
+ {
+ (*_bfd_error_handler)
+ ("%B: uses %s instructions while previous modules use %s instructions",
+ ibfd,
+ SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point",
+ SH_ARCH_SET_HAS_DSP (new_arch) ? "floating point" : "dsp");
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ else if (!SH_VALID_ARCH_SET (merged_arch))
+ {
+ (*_bfd_error_handler)
+ ("internal error: merge of architecture '%s' with architecture '%s' produced unknown architecture\n",
+ bfd_printable_name (obfd),
+ bfd_printable_name (ibfd));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ bfd_default_set_arch_mach (obfd, bfd_arch_sh,
+ sh_get_bfd_mach_from_arch_set (merged_arch));
+
+ return TRUE;
+}
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 136b42992a9..9f064895a27 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/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
@@ -57,12 +57,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
AR = @AR@
AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
@@ -76,6 +72,7 @@ CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
@@ -86,16 +83,21 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
+GNATBIND = @GNATBIND@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
+HAVE_LIB = @HAVE_LIB@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LIB = @LIB@
LIBTOOL = @LIBTOOL@
+LN = @LN@
LN_S = @LN_S@
+LTLIB = @LTLIB@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -121,31 +123,26 @@ bfd_file_ptr = @bfd_file_ptr@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_ufile_ptr = @bfd_ufile_ptr@
-bfd_version = @bfd_version@
-bfd_version_string = @bfd_version_string@
bfdincludedir = @bfdincludedir@
bfdlibdir = @bfdlibdir@
+build_noncanonical = @build_noncanonical@
+build_subdir = @build_subdir@
+do_compare = @do_compare@
+host_noncanonical = @host_noncanonical@
+host_subdir = @host_subdir@
l = @l@
+ncn_cv_ = @ncn_cv_@
+target_noncanonical = @target_noncanonical@
+target_subdir = @target_subdir@
tdefaults = @tdefaults@
wordsize = @wordsize@
AUTOMAKE_OPTIONS = cygnus
-DOCFILES = aoutx.texi archive.texi archures.texi \
- bfdt.texi cache.texi coffcode.texi \
- core.texi elf.texi elfcode.texi format.texi \
- libbfd.texi bfdwin.texi bfdio.texi \
- opncls.texi reloc.texi section.texi \
- syms.texi targets.texi init.texi hash.texi linker.texi \
- mmo.texi
+DOCFILES = aoutx.texi archive.texi archures.texi bfdt.texi cache.texi coffcode.texi core.texi elf.texi elfcode.texi format.texi libbfd.texi bfdwin.texi bfdio.texi opncls.texi reloc.texi section.texi syms.texi targets.texi init.texi hash.texi linker.texi mmo.texi
-PROTOS = archive.p archures.p bfd.p \
- core.p format.p \
- bfdio.p bfdwin.p \
- libbfd.p opncls.p reloc.p \
- section.p syms.p targets.p \
- format.p core.p init.p
+PROTOS = archive.p archures.p bfd.p core.p format.p bfdio.p bfdwin.p libbfd.p opncls.p reloc.p section.p syms.p targets.p format.p core.p init.p
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
@@ -153,33 +150,13 @@ IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
# between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
# you don't need these three:
-SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
- $(srcdir)/../archures.c $(srcdir)/../bfd.c \
- $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
- $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
- $(srcdir)/../corefile.c $(srcdir)/../elf.c \
- $(srcdir)/../elfcode.h $(srcdir)/../format.c \
- $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
- $(srcdir)/../reloc.c $(srcdir)/../section.c \
- $(srcdir)/../syms.c $(srcdir)/../targets.c \
- $(srcdir)/../hash.c $(srcdir)/../linker.c \
- $(srcdir)/../mmo.c
-
-
-SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
- $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
- $(srcdir)/../format.c $(srcdir)/../libbfd.c \
- $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
- $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
- $(srcdir)/../section.c $(srcdir)/../syms.c \
- $(srcdir)/../targets.c $(srcdir)/../init.c
-
-
-SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
- $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
- $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
- $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
- $(srcdir)/../init.c
+SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c $(srcdir)/../archures.c $(srcdir)/../bfd.c $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c $(srcdir)/../cache.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c $(srcdir)/../elf.c $(srcdir)/../elfcode.h $(srcdir)/../format.c $(srcdir)/../libbfd.c $(srcdir)/../opncls.c $(srcdir)/../reloc.c $(srcdir)/../section.c $(srcdir)/../syms.c $(srcdir)/../targets.c $(srcdir)/../hash.c $(srcdir)/../linker.c $(srcdir)/../mmo.c
+
+
+SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c $(srcdir)/../format.c $(srcdir)/../libbfd.c $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c $(srcdir)/../opncls.c $(srcdir)/../reloc.c $(srcdir)/../section.c $(srcdir)/../syms.c $(srcdir)/../targets.c $(srcdir)/../init.c
+
+
+SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c $(srcdir)/../init.c
TEXIDIR = $(srcdir)/../../texinfo/fsf
@@ -188,51 +165,13 @@ info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
-LIBBFD_H_DEP = \
- $(srcdir)/../libbfd-in.h \
- $(srcdir)/../init.c \
- $(srcdir)/../libbfd.c \
- $(srcdir)/../bfdio.c \
- $(srcdir)/../bfdwin.c \
- $(srcdir)/../cache.c \
- $(srcdir)/../reloc.c \
- $(srcdir)/../archures.c \
- $(srcdir)/../elf.c \
- $(srcdir)/header.sed \
- $(srcdir)/proto.str \
- $(MKDOC)
-
-
-LIBCOFF_H_DEP = \
- $(srcdir)/../libcoff-in.h \
- $(srcdir)/../coffcode.h \
- $(srcdir)/header.sed \
- $(srcdir)/proto.str \
- $(MKDOC)
-
-
-BFD_H_DEP = \
- $(srcdir)/../bfd-in.h \
- $(srcdir)/../init.c \
- $(srcdir)/../opncls.c \
- $(srcdir)/../libbfd.c \
- $(srcdir)/../bfdio.c \
- $(srcdir)/../bfdwin.c \
- $(srcdir)/../section.c \
- $(srcdir)/../archures.c \
- $(srcdir)/../reloc.c \
- $(srcdir)/../syms.c \
- $(srcdir)/../bfd.c \
- $(srcdir)/../archive.c \
- $(srcdir)/../corefile.c \
- $(srcdir)/../targets.c \
- $(srcdir)/../format.c \
- $(srcdir)/../linker.c \
- $(srcdir)/../simple.c \
- $(srcdir)/header.sed \
- $(srcdir)/proto.str \
- $(srcdir)/../version.h \
- $(MKDOC)
+LIBBFD_H_DEP = $(srcdir)/../libbfd-in.h $(srcdir)/../init.c $(srcdir)/../libbfd.c $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c $(srcdir)/../cache.c $(srcdir)/../reloc.c $(srcdir)/../archures.c $(srcdir)/../elf.c $(srcdir)/header.sed $(srcdir)/proto.str $(MKDOC)
+
+
+LIBCOFF_H_DEP = $(srcdir)/../libcoff-in.h $(srcdir)/../coffcode.h $(srcdir)/header.sed $(srcdir)/proto.str $(MKDOC)
+
+
+BFD_H_DEP = $(srcdir)/../bfd-in.h $(srcdir)/../init.c $(srcdir)/../opncls.c $(srcdir)/../libbfd.c $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c $(srcdir)/../section.c $(srcdir)/../archures.c $(srcdir)/../reloc.c $(srcdir)/../syms.c $(srcdir)/../bfd.c $(srcdir)/../archive.c $(srcdir)/../corefile.c $(srcdir)/../targets.c $(srcdir)/../format.c $(srcdir)/../linker.c $(srcdir)/../simple.c $(srcdir)/header.sed $(srcdir)/proto.str $(srcdir)/../version.h $(MKDOC)
noinst_TEXINFOS = bfdint.texi
@@ -257,7 +196,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c
index 1047ebfc2e9..6fa74fc4a96 100644
--- a/bfd/dwarf1.c
+++ b/bfd/dwarf1.c
@@ -1,5 +1,5 @@
/* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
@@ -285,14 +285,14 @@ parse_line_table (stash, aUnit)
if (! msec)
return FALSE;
- size = bfd_get_section_size_before_reloc (msec);
+ size = msec->rawsize ? msec->rawsize : msec->size;
stash->line_section = (char *) bfd_alloc (stash->abfd, size);
if (! stash->line_section)
return FALSE;
if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section,
- (bfd_vma) 0, size))
+ 0, size))
{
stash->line_section = 0;
return FALSE;
@@ -502,14 +502,14 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
return FALSE;
}
- size = bfd_get_section_size_before_reloc (msec);
+ size = msec->rawsize ? msec->rawsize : msec->size;
stash->debug_section = (char *) bfd_alloc (abfd, size);
if (! stash->debug_section)
return FALSE;
if (! bfd_get_section_contents (abfd, msec, stash->debug_section,
- (bfd_vma) 0, size))
+ 0, size))
{
stash->debug_section = 0;
return FALSE;
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index ceb28af4791..a09265755a0 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -281,6 +281,7 @@ read_indirect_string (struct comp_unit* unit,
{
asection *msec;
bfd *abfd = unit->abfd;
+ bfd_size_type sz;
msec = bfd_get_section_by_name (abfd, ".debug_str");
if (! msec)
@@ -291,13 +292,14 @@ read_indirect_string (struct comp_unit* unit,
return NULL;
}
- stash->dwarf_str_size = msec->_raw_size;
- stash->dwarf_str_buffer = bfd_alloc (abfd, msec->_raw_size);
+ sz = msec->rawsize ? msec->rawsize : msec->size;
+ stash->dwarf_str_size = sz;
+ stash->dwarf_str_buffer = bfd_alloc (abfd, sz);
if (! stash->dwarf_abbrev_buffer)
return NULL;
if (! bfd_get_section_contents (abfd, msec, stash->dwarf_str_buffer,
- 0, msec->_raw_size))
+ 0, sz))
return NULL;
}
@@ -443,7 +445,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
return 0;
}
- stash->dwarf_abbrev_size = msec->_raw_size;
+ stash->dwarf_abbrev_size = msec->size;
stash->dwarf_abbrev_buffer
= bfd_simple_get_relocated_section_contents (abfd, msec, NULL,
stash->syms);
@@ -801,10 +803,9 @@ add_line_info (struct line_info_table *table,
info->column = column;
info->end_sequence = end_sequence;
- amt = strlen (filename);
- if (amt)
+ if (filename && filename[0])
{
- info->filename = bfd_alloc (table->abfd, amt + 1);
+ info->filename = bfd_alloc (table->abfd, strlen (filename) + 1);
if (info->filename)
strcpy (info->filename, filename);
}
@@ -922,7 +923,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
return 0;
}
- stash->dwarf_line_size = msec->_raw_size;
+ stash->dwarf_line_size = msec->size;
stash->dwarf_line_buffer
= bfd_simple_get_relocated_section_contents (abfd, msec, NULL,
stash->syms);
@@ -1677,7 +1678,7 @@ find_debug_info (bfd *abfd, asection *after_sec)
return NULL;
}
-/* The DWARF2 version of find_nearest line. Return TRUE if the line
+/* The DWARF2 version of find_nearest_line. Return TRUE if the line
is found without error. ADDR_SIZE is the number of bytes in the
initial .debug_info length field and in the abbreviation offset.
You may use zero to indicate that the default value should be
@@ -1745,7 +1746,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
In the second pass we read in the section's contents. The allows
us to avoid reallocing the data as we add sections to the stash. */
for (total_size = 0; msec; msec = find_debug_info (abfd, msec))
- total_size += msec->_raw_size;
+ total_size += msec->size;
stash->info_ptr = bfd_alloc (abfd, total_size);
if (stash->info_ptr == NULL)
@@ -1760,7 +1761,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
bfd_size_type size;
bfd_size_type start;
- size = msec->_raw_size;
+ size = msec->size;
if (size == 0)
continue;
@@ -1834,7 +1835,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
stash->info_ptr += length;
if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
- == stash->sec->_raw_size)
+ == stash->sec->size)
{
stash->sec = find_debug_info (abfd, stash->sec);
stash->sec_info_ptr = stash->info_ptr;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index cfc5ae1b9fa..eba6236fd6b 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1,6 +1,6 @@
/* Generic ECOFF (Extended-COFF) routines.
Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -74,29 +74,26 @@ static unsigned int ecoff_armap_hash
PARAMS ((const char *, unsigned int *, unsigned int, unsigned int));
/* This stuff is somewhat copied from coffcode.h. */
-
static asection bfd_debug_section =
{
- /* name, id, index, next, flags, user_set_vma, reloc_done, */
- "*DEBUG*", 0, 0, NULL, 0, 0, 0,
+ /* name, id, index, next, flags, user_set_vma, */
+ "*DEBUG*", 0, 0, NULL, 0, 0,
/* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 0, 0,
- /* sec_info_type, use_rela_p, has_tls_reloc, */
- 0, 0, 0,
- /* need_finalize_relax, has_gp_reloc, */
+ /* sec_info_type, use_rela_p, has_tls_reloc, has_gp_reloc, */
+ 0, 0, 0, 0,
+ /* need_finalize_relax, reloc_done, */
0, 0,
- /* flag13, flag14, flag15, flag16, flag20, flag24, */
- 0, 0, 0, 0, 0, 0,
- /* vma, lma, _cooked_size, _raw_size, */
- 0, 0, 0, 0,
+ /* vma, lma, size, rawsize, */
+ 0, 0, 0, 0,
/* output_offset, output_section, alignment_power, */
0, NULL, 0,
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */
NULL, NULL, 0, 0, 0,
/* line_filepos, userdata, contents, lineno, lineno_count, */
0, NULL, NULL, NULL, 0,
- /* entsize, comdat, kept_section, moving_line_filepos, */
- 0, NULL, NULL, 0,
+ /* entsize, kept_section, moving_line_filepos, */
+ 0, NULL, 0,
/* target_index, used_by_bfd, constructor_chain, owner, */
0, NULL, NULL, NULL,
/* symbol, */
@@ -908,7 +905,7 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
return FALSE;
reloc_chain->relent.sym_ptr_ptr =
bfd_get_section (asym)->symbol_ptr_ptr;
- reloc_chain->relent.address = section->_raw_size;
+ reloc_chain->relent.address = section->size;
reloc_chain->relent.addend = asym->value;
reloc_chain->relent.howto =
ecoff_backend (abfd)->constructor_reloc;
@@ -928,7 +925,7 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
reloc_chain->next = section->constructor_chain;
section->constructor_chain = reloc_chain;
- section->_raw_size += bitsize / 8;
+ section->size += bitsize / 8;
#endif /* 0 */
@@ -2118,7 +2115,7 @@ ecoff_compute_section_file_positions (abfd)
really in the section. Each entry is 8 bytes. We store this
away in line_filepos before increasing the section size. */
if (strcmp (current->name, _PDATA) == 0)
- current->line_filepos = current->_raw_size / 8;
+ current->line_filepos = current->size / 8;
alignment_power = current->alignment_power;
@@ -2179,16 +2176,16 @@ ecoff_compute_section_file_positions (abfd)
if ((current->flags & (SEC_HAS_CONTENTS | SEC_LOAD)) != 0)
current->filepos = file_sofar;
- sofar += current->_raw_size;
+ sofar += current->size;
if ((current->flags & SEC_HAS_CONTENTS) != 0)
- file_sofar += current->_raw_size;
+ file_sofar += current->size;
/* Make sure that this section is of the right size too. */
old_sofar = sofar;
sofar = BFD_ALIGN (sofar, 1 << alignment_power);
if ((current->flags & SEC_HAS_CONTENTS) != 0)
file_sofar = BFD_ALIGN (file_sofar, 1 << alignment_power);
- current->_raw_size += sofar - old_sofar;
+ current->size += sofar - old_sofar;
}
free (sorted_hdrs);
@@ -2550,7 +2547,7 @@ _bfd_ecoff_write_object_contents (abfd)
section.s_vaddr = vma;
section.s_paddr = current->lma;
- section.s_size = bfd_get_section_size_before_reloc (current);
+ section.s_size = current->size;
/* If this section is unloadable then the scnptr will be 0. */
if ((current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
@@ -2601,7 +2598,7 @@ _bfd_ecoff_write_object_contents (abfd)
|| (section.s_flags & STYP_ECOFF_FINI) != 0
|| section.s_flags == STYP_RCONST)
{
- text_size += bfd_get_section_size_before_reloc (current);
+ text_size += current->size;
if (! set_text_start || text_start > vma)
{
text_start = vma;
@@ -2617,7 +2614,7 @@ _bfd_ecoff_write_object_contents (abfd)
|| section.s_flags == STYP_XDATA
|| (section.s_flags & STYP_GOT) != 0)
{
- data_size += bfd_get_section_size_before_reloc (current);
+ data_size += current->size;
if (! set_data_start || data_start > vma)
{
data_start = vma;
@@ -2626,7 +2623,7 @@ _bfd_ecoff_write_object_contents (abfd)
}
else if ((section.s_flags & STYP_BSS) != 0
|| (section.s_flags & STYP_SBSS) != 0)
- bss_size += bfd_get_section_size_before_reloc (current);
+ bss_size += current->size;
else if (section.s_flags == 0
|| (section.s_flags & STYP_ECOFF_LIB) != 0
|| section.s_flags == STYP_COMMENT)
@@ -4526,14 +4523,10 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
{
asection *input_section;
bfd *input_bfd;
- struct ecoff_section_tdata *section_tdata;
- bfd_size_type raw_size;
- bfd_size_type cooked_size;
bfd_byte *contents = NULL;
bfd_size_type external_reloc_size;
bfd_size_type external_relocs_size;
PTR external_relocs = NULL;
- bfd_size_type amt;
BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
@@ -4542,57 +4535,28 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
input_section = link_order->u.indirect.section;
input_bfd = input_section->owner;
- section_tdata = ecoff_section_data (input_bfd, input_section);
-
- raw_size = input_section->_raw_size;
- cooked_size = input_section->_cooked_size;
- if (cooked_size == 0)
- cooked_size = raw_size;
BFD_ASSERT (input_section->output_section == output_section);
BFD_ASSERT (input_section->output_offset == link_order->offset);
- BFD_ASSERT (cooked_size == link_order->size);
+ BFD_ASSERT (input_section->size == link_order->size);
- /* Get the section contents. We allocate memory for the larger of
- the size before relocating and the size after relocating. */
- amt = raw_size >= cooked_size ? raw_size : cooked_size;
- contents = (bfd_byte *) bfd_malloc (amt);
- if (contents == NULL && amt != 0)
+ /* Get the section contents. */
+ if (!bfd_malloc_and_get_section (input_bfd, input_section, &contents))
goto error_return;
- /* If we are relaxing, the contents may have already been read into
- memory, in which case we copy them into our new buffer. We don't
- simply reuse the old buffer in case cooked_size > raw_size. */
- if (section_tdata != (struct ecoff_section_tdata *) NULL
- && section_tdata->contents != (bfd_byte *) NULL)
- memcpy (contents, section_tdata->contents, (size_t) raw_size);
- else
- {
- if (! bfd_get_section_contents (input_bfd, input_section,
- (PTR) contents,
- (file_ptr) 0, raw_size))
- goto error_return;
- }
-
/* Get the relocs. If we are relaxing MIPS code, they will already
have been read in. Otherwise, we read them in now. */
external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size;
external_relocs_size = external_reloc_size * input_section->reloc_count;
- if (section_tdata != (struct ecoff_section_tdata *) NULL
- && section_tdata->external_relocs != NULL)
- external_relocs = section_tdata->external_relocs;
- else
- {
- external_relocs = (PTR) bfd_malloc (external_relocs_size);
- if (external_relocs == NULL && external_relocs_size != 0)
- goto error_return;
+ external_relocs = (PTR) bfd_malloc (external_relocs_size);
+ if (external_relocs == NULL && external_relocs_size != 0)
+ goto error_return;
- if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
- || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
- != external_relocs_size))
- goto error_return;
- }
+ if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
+ || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
+ != external_relocs_size))
+ goto error_return;
/* Relocate the section contents. */
if (! ((*ecoff_backend (input_bfd)->relocate_section)
@@ -4603,9 +4567,9 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
/* Write out the relocated section. */
if (! bfd_set_section_contents (output_bfd,
output_section,
- (PTR) contents,
- (file_ptr) input_section->output_offset,
- cooked_size))
+ contents,
+ input_section->output_offset,
+ input_section->size))
goto error_return;
/* If we are producing relocatable output, the relocs were
@@ -4625,14 +4589,14 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
if (contents != NULL)
free (contents);
- if (external_relocs != NULL && section_tdata == NULL)
+ if (external_relocs != NULL)
free (external_relocs);
return TRUE;
error_return:
if (contents != NULL)
free (contents);
- if (external_relocs != NULL && section_tdata == NULL)
+ if (external_relocs != NULL)
free (external_relocs);
return FALSE;
}
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index 9e23848fda7..8a8e146394b 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -1,5 +1,5 @@
/* Routines to link ECOFF debugging information.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
@@ -800,20 +800,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
fdr_adr = fdr.adr;
- /* Adjust the FDR address for any changes that may have been
- made by relaxing. */
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- struct ecoff_value_adjust *adjust;
-
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (fdr_adr >= adjust->start
- && fdr_adr < adjust->end)
- fdr.adr += adjust->adjust;
- }
-
/* FIXME: It is conceivable that this FDR points to the .init or
.fini section, in which case this will not do the right
thing. */
@@ -856,19 +842,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
case stLabel:
case stProc:
case stStaticProc:
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- bfd_vma value;
- struct ecoff_value_adjust *adjust;
-
- value = internal_sym.value;
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (value >= adjust->start
- && value < adjust->end)
- internal_sym.value += adjust->adjust;
- }
internal_sym.value += section_adjust[internal_sym.sc];
break;
@@ -978,9 +951,8 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
output_symhdr->issMax += fdr.cbSs;
}
- if ((output_bfd->xvec->header_byteorder
- == input_bfd->xvec->header_byteorder)
- && input_debug->adjust == (struct ecoff_value_adjust *) NULL)
+ if (output_bfd->xvec->header_byteorder
+ == input_bfd->xvec->header_byteorder)
{
/* The two BFD's have the same endianness, and we don't have
to adjust the PDR addresses, so simply copying the
@@ -1036,23 +1008,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
PDR pdr;
(*input_swap->swap_pdr_in) (input_bfd, (PTR) in, &pdr);
-
- /* If we have been relaxing, we may have to adjust the
- address. */
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- bfd_vma adr;
- struct ecoff_value_adjust *adjust;
-
- adr = fdr_adr + pdr.adr;
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (adr >= adjust->start
- && adr < adjust->end)
- pdr.adr += adjust->adjust;
- }
-
(*output_swap->swap_pdr_out) (output_bfd, &pdr, (PTR) out);
}
@@ -1199,7 +1154,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
fdr.issBase = output_symhdr->issMax;
fdr.cbSs = 0;
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
- bfd_archive_filename (input_bfd));
+ input_bfd->filename);
if (fdr.rss == -1)
return FALSE;
fdr.isymBase = output_symhdr->isymMax;
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 110dd696c54..5565e49e96a 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -218,6 +218,13 @@ struct elf_link_hash_entry
#define SYMBOL_CALLS_LOCAL(INFO, H) \
_bfd_elf_symbol_refs_local_p (H, INFO, 1)
+/* Common symbols that are turned into definitions don't have the
+ DEF_REGULAR flag set, so they might appear to be undefined. */
+#define ELF_COMMON_DEF_P(H) \
+ (((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 \
+ && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 \
+ && (H)->root.type == bfd_link_hash_defined)
+
/* Records local symbols to be emitted in the dynamic symbol table. */
struct elf_link_local_dynamic_entry
@@ -278,11 +285,11 @@ struct eh_cie_fde
unsigned char fde_encoding;
unsigned char lsda_encoding;
unsigned char lsda_offset;
- unsigned char cie : 1;
- unsigned char removed : 1;
- unsigned char make_relative : 1;
- unsigned char make_lsda_relative : 1;
- unsigned char per_encoding_relative : 1;
+ unsigned int cie : 1;
+ unsigned int removed : 1;
+ unsigned int make_relative : 1;
+ unsigned int make_lsda_relative : 1;
+ unsigned int per_encoding_relative : 1;
};
struct eh_frame_sec_info
@@ -356,12 +363,12 @@ struct elf_link_hash_table
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
- /* A pointer to information used to link stabs in sections. */
- void *stab_info;
-
/* A pointer to information used to merge SEC_MERGE sections. */
void *merge_info;
+ /* Used to link stabs in sections. */
+ struct stab_info stab_info;
+
/* Used by eh_frame code when editing .eh_frame. */
struct eh_frame_hdr_info eh_info;
@@ -531,6 +538,9 @@ struct elf_backend_data
/* The maximum page size for this backend. */
bfd_vma maxpagesize;
+ /* The BFD flags applied to sections created for dynamic linking. */
+ flagword dynamic_sec_flags;
+
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
void (*elf_info_to_howto)
@@ -572,11 +582,16 @@ struct elf_backend_data
bfd_boolean (*elf_backend_symbol_table_processing)
(bfd *, elf_symbol_type *, unsigned int);
- /* A function to set the type of the info field. Processor-specific
+ /* A function to set the type of the info field. Processor-specific
types should be handled here. */
int (*elf_backend_get_symbol_type)
(Elf_Internal_Sym *, int);
+ /* A function to return the linker hash table entry of a symbol that
+ might be satisfied by an archive symbol. */
+ struct elf_link_hash_entry * (*elf_backend_archive_symbol_lookup)
+ (bfd *, struct bfd_link_info *, const char *);
+
/* Return true if local section symbols should have a non-null st_name.
NULL implies false. */
bfd_boolean (*elf_backend_name_local_section_symbols)
@@ -597,7 +612,7 @@ struct elf_backend_data
/* A function to convert machine dependent section header flags to
BFD internal section header flags. */
bfd_boolean (*elf_backend_section_flags)
- (flagword *, Elf_Internal_Shdr *);
+ (flagword *, const Elf_Internal_Shdr *);
/* A function to handle unusual program segment types when creating BFD
sections from ELF program segments. */
@@ -646,6 +661,11 @@ struct elf_backend_data
bfd_boolean (*elf_backend_create_dynamic_sections)
(bfd *abfd, struct bfd_link_info *info);
+ /* When creating a shared library, determine whether to omit the
+ dynamic symbol for the section. */
+ bfd_boolean (*elf_backend_omit_section_dynsym)
+ (bfd *output_bfd, struct bfd_link_info *info, asection *osec);
+
/* The CHECK_RELOCS function is called by the add_symbols phase of
the ELF backend linker. It is called once for each section with
relocs of an object file, just after the symbols for the object
@@ -660,6 +680,13 @@ struct elf_backend_data
(bfd *abfd, struct bfd_link_info *info, asection *o,
const Elf_Internal_Rela *relocs);
+ /* The CHECK_DIRECTIVES function is called once per input file by
+ the add_symbols phase of the ELF backend linker. The function
+ must inspect the bfd and create any additional symbols according
+ to any custom directives in the bfd. */
+ bfd_boolean (*check_directives)
+ (bfd *abfd, struct bfd_link_info *info);
+
/* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
linker for every symbol which is defined by a dynamic object and
referenced by a regular object. This is called after all the
@@ -902,6 +929,16 @@ struct elf_backend_data
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
+ /* This function is used by `_bfd_elf_get_synthetic_symtab';
+ see elf.c. */
+ bfd_vma (*plt_sym_val) (bfd_vma, const asection *, const arelent *);
+
+ /* Used to handle bad SHF_LINK_ORDER input. */
+ bfd_error_handler_type link_order_error_handler;
+
+ /* Name of the PLT relocation section. */
+ const char *relplt_name;
+
/* Alternate EM_xxxx machine codes for this backend. */
int elf_machine_alt1;
int elf_machine_alt2;
@@ -1012,6 +1049,9 @@ struct bfd_elf_section_data
no dynamic symbol for this section. */
int dynindx;
+ /* A pointer to the linked-to section for SHF_LINK_ORDER. */
+ asection *linked_to;
+
/* Used by the backend linker to store the symbol hash table entries
associated with relocs against global symbols. */
struct elf_link_hash_entry **rel_hashes;
@@ -1036,6 +1076,10 @@ struct bfd_elf_section_data
struct bfd_symbol *id;
} group;
+ /* Optional information about section group; NULL if it doesn't
+ belongs to any section group. */
+ asection *sec_group;
+
/* A linked list of sections in the group. Circular when used by
the linker. */
asection *next_in_group;
@@ -1045,18 +1089,20 @@ struct bfd_elf_section_data
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
+#define elf_linked_to_section(sec) (elf_section_data(sec)->linked_to)
#define elf_section_type(sec) (elf_section_data(sec)->this_hdr.sh_type)
#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
#define elf_group_name(sec) (elf_section_data(sec)->group.name)
#define elf_group_id(sec) (elf_section_data(sec)->group.id)
#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
+#define elf_sec_group(sec) (elf_section_data(sec)->sec_group)
/* Return TRUE if section has been discarded. */
#define elf_discarded_section(sec) \
(!bfd_is_abs_section (sec) \
&& bfd_is_abs_section ((sec)->output_section) \
- && sec->sec_info_type != ELF_INFO_TYPE_MERGE \
- && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+ && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
#define get_elf_backend_data(abfd) \
((const struct elf_backend_data *) (abfd)->xvec->backend_data)
@@ -1204,6 +1250,9 @@ struct elf_obj_tdata
/* Segment flags for the PT_GNU_STACK segment. */
unsigned int stack_flags;
+ /* Should the PT_GNU_RELRO segment be emitted? */
+ bfd_boolean relro;
+
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
@@ -1361,12 +1410,18 @@ extern bfd_boolean _bfd_elf_slurp_version_tables
(bfd *);
extern bfd_boolean _bfd_elf_merge_sections
(bfd *, struct bfd_link_info *);
+extern bfd_boolean bfd_elf_is_group_section
+ (bfd *, const struct bfd_section *);
extern bfd_boolean bfd_elf_discard_group
(bfd *, struct bfd_section *);
+extern void _bfd_elf_section_already_linked
+ (bfd *, struct bfd_section *);
extern void bfd_elf_set_group_contents
(bfd *, asection *, void *);
extern void _bfd_elf_link_just_syms
(asection *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_copy_private_header_data
+ (bfd *, bfd *);
extern bfd_boolean _bfd_elf_copy_private_symbol_data
(bfd *, asymbol *, bfd *, asymbol *);
extern bfd_boolean _bfd_elf_copy_private_section_data
@@ -1385,6 +1440,8 @@ extern long _bfd_elf_get_dynamic_symtab_upper_bound
(bfd *);
extern long _bfd_elf_canonicalize_dynamic_symtab
(bfd *, asymbol **);
+extern long _bfd_elf_get_synthetic_symtab
+ (bfd *, long, asymbol **, long, asymbol **, asymbol **);
extern long _bfd_elf_get_reloc_upper_bound
(bfd *, sec_ptr);
extern long _bfd_elf_canonicalize_reloc
@@ -1504,6 +1561,8 @@ extern bfd_boolean _bfd_elf_validate_reloc
extern bfd_boolean _bfd_elf_link_create_dynamic_sections
(bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_link_omit_section_dynsym
+ (bfd *, struct bfd_link_info *, asection *);
extern bfd_boolean _bfd_elf_create_dynamic_sections
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_create_got_section
@@ -1540,6 +1599,12 @@ extern bfd_boolean _bfd_elf_dynamic_symbol_p
extern bfd_boolean _bfd_elf_symbol_refs_local_p
(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
+extern bfd_boolean bfd_elf_match_symbols_in_sections
+ (asection *sec1, asection *sec2);
+
+extern bfd_boolean _bfd_elf_setup_group_pointers
+ (bfd *);
+
extern const bfd_target *bfd_elf32_object_p
(bfd *);
extern const bfd_target *bfd_elf32_core_file_p
@@ -1624,6 +1689,8 @@ extern void bfd_elf64_write_relocs
extern bfd_boolean bfd_elf64_slurp_reloc_table
(bfd *, asection *, asymbol **, bfd_boolean);
+extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup
+ (bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_elf_link_add_symbols
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_add_dynamic_entry
@@ -1653,6 +1720,11 @@ extern bfd_boolean bfd_elf_gc_record_vtinherit
extern bfd_boolean bfd_elf_gc_record_vtentry
(bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
+extern bfd_boolean _bfd_elf_gc_mark
+ (struct bfd_link_info *, asection *,
+ asection * (*) (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
extern bfd_boolean bfd_elf_gc_common_finalize_got_offsets
(bfd *, struct bfd_link_info *);
@@ -1662,6 +1734,10 @@ extern bfd_boolean bfd_elf_gc_common_final_link
extern bfd_boolean bfd_elf_reloc_symbol_deleted_p
(bfd_vma, void *);
+extern struct elf_segment_map *
+_bfd_elf_make_dynamic_segment
+ (bfd *, asection *);
+
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index d3777b44118..be4e3072345 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
/* .eh_frame section optimization.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -224,7 +224,7 @@ _bfd_elf_discard_section_eh_frame
bfd_size_type new_size;
unsigned int ptr_size;
- if (sec->_raw_size == 0)
+ if (sec->size == 0)
{
/* This file does not contain .eh_frame information. */
return FALSE;
@@ -243,14 +243,10 @@ _bfd_elf_discard_section_eh_frame
/* Read the frame unwind information from abfd. */
- ehbuf = bfd_malloc (sec->_raw_size);
- if (ehbuf == NULL)
+ if (!bfd_malloc_and_get_section (abfd, sec, &ehbuf))
goto free_no_table;
- if (! bfd_get_section_contents (abfd, sec, ehbuf, 0, sec->_raw_size))
- goto free_no_table;
-
- if (sec->_raw_size >= 4
+ if (sec->size >= 4
&& bfd_get_32 (abfd, ehbuf) == 0
&& cookie->rel == cookie->relend)
{
@@ -261,7 +257,7 @@ _bfd_elf_discard_section_eh_frame
/* If .eh_frame section size doesn't fit into int, we cannot handle
it (it would need to use 64-bit .eh_frame format anyway). */
- if (sec->_raw_size != (unsigned int) sec->_raw_size)
+ if (sec->size != (unsigned int) sec->size)
goto free_no_table;
ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS]
@@ -271,13 +267,14 @@ _bfd_elf_discard_section_eh_frame
last_cie_ndx = 0;
memset (&cie, 0, sizeof (cie));
cie_usage_count = 0;
- new_size = sec->_raw_size;
+ new_size = sec->size;
make_relative = hdr_info->last_cie.make_relative;
make_lsda_relative = hdr_info->last_cie.make_lsda_relative;
sec_info = bfd_zmalloc (sizeof (struct eh_frame_sec_info)
+ 99 * sizeof (struct eh_cie_fde));
if (sec_info == NULL)
goto free_no_table;
+
sec_info->alloced = 100;
#define ENSURE_NO_RELOCS(buf) \
@@ -320,11 +317,11 @@ _bfd_elf_discard_section_eh_frame
last_fde = buf;
/* If we are at the end of the section, we still need to decide
on whether to output or discard last encountered CIE (if any). */
- if ((bfd_size_type) (buf - ehbuf) == sec->_raw_size)
+ if ((bfd_size_type) (buf - ehbuf) == sec->size)
hdr.id = (unsigned int) -1;
else
{
- if ((bfd_size_type) (buf + 4 - ehbuf) > sec->_raw_size)
+ if ((bfd_size_type) (buf + 4 - ehbuf) > sec->size)
/* No space for CIE/FDE header length. */
goto free_no_table;
@@ -333,7 +330,7 @@ _bfd_elf_discard_section_eh_frame
/* 64-bit .eh_frame is not supported. */
goto free_no_table;
buf += 4;
- if ((bfd_size_type) (buf - ehbuf) + hdr.length > sec->_raw_size)
+ if ((bfd_size_type) (buf - ehbuf) + hdr.length > sec->size)
/* CIE/FDE not contained fully in this .eh_frame input section. */
goto free_no_table;
@@ -343,7 +340,7 @@ _bfd_elf_discard_section_eh_frame
if (hdr.length == 0)
{
/* CIE with length 0 must be only the last in the section. */
- if ((bfd_size_type) (buf - ehbuf) < sec->_raw_size)
+ if ((bfd_size_type) (buf - ehbuf) < sec->size)
goto free_no_table;
ENSURE_NO_RELOCS (buf);
sec_info->count++;
@@ -410,7 +407,7 @@ _bfd_elf_discard_section_eh_frame
cie.version = *buf++;
/* Cannot handle unknown versions. */
- if (cie.version != 1)
+ if (cie.version != 1 && cie.version != 3)
goto free_no_table;
if (strlen (buf) > sizeof (cie.augmentation) - 1)
goto free_no_table;
@@ -429,12 +426,10 @@ _bfd_elf_discard_section_eh_frame
}
read_uleb128 (cie.code_align, buf);
read_sleb128 (cie.data_align, buf);
- /* Note - in DWARF2 the return address column is an unsigned byte.
- In DWARF3 it is a ULEB128. We are following DWARF3. For most
- ports this will not matter as the value will be less than 128.
- For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
- which conforms to the DWARF3 standard. */
- read_uleb128 (cie.ra_column, buf);
+ if (cie.version == 1)
+ cie.ra_column = *buf++;
+ else
+ read_uleb128 (cie.ra_column, buf);
ENSURE_NO_RELOCS (buf);
cie.lsda_encoding = DW_EH_PE_omit;
cie.fde_encoding = DW_EH_PE_omit;
@@ -642,18 +637,14 @@ _bfd_elf_discard_section_eh_frame
hdr_info->last_cie_offset = sec_info->entry[last_cie_ndx].new_offset;
}
- /* FIXME: Currently it is not possible to shrink sections to zero size at
- this point, so build a fake minimal CIE. */
- if (new_size == 0)
- new_size = 16;
-
/* Shrink the sec as needed. */
- sec->_cooked_size = new_size;
- if (sec->_cooked_size == 0)
+ sec->rawsize = sec->size;
+ sec->size = new_size;
+ if (sec->size == 0)
sec->flags |= SEC_EXCLUDE;
free (ehbuf);
- return new_size != sec->_raw_size;
+ return new_size != sec->rawsize;
free_no_table:
if (ehbuf)
@@ -682,9 +673,9 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
if (sec == NULL)
return FALSE;
- sec->_cooked_size = EH_FRAME_HDR_SIZE;
+ sec->size = EH_FRAME_HDR_SIZE;
if (hdr_info->table)
- sec->_cooked_size += 4 + hdr_info->fde_count * 8;
+ sec->size += 4 + hdr_info->fde_count * 8;
/* Request program headers to be recalculated. */
elf_tdata (abfd)->program_header_size = 0;
@@ -723,7 +714,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
/* Count only sections which have at least a single CIE or FDE.
There cannot be any CIE or FDE <= 8 bytes. */
o = bfd_get_section_by_name (abfd, ".eh_frame");
- if (o && o->_raw_size > 8 && !bfd_is_abs_section (o->output_section))
+ if (o && o->size > 8 && !bfd_is_abs_section (o->output_section))
break;
}
@@ -755,8 +746,8 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
return offset;
sec_info = elf_section_data (sec)->sec_info;
- if (offset >= sec->_raw_size)
- return offset - (sec->_cooked_size - sec->_raw_size);
+ if (offset >= sec->rawsize)
+ return offset - sec->rawsize + sec->size;
lo = 0;
hi = sec_info->count;
@@ -821,7 +812,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return bfd_set_section_contents (abfd, sec->output_section, contents,
- sec->output_offset, sec->_raw_size);
+ sec->output_offset, sec->size);
sec_info = elf_section_data (sec)->sec_info;
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
@@ -1024,27 +1015,15 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
p += sec_info->entry[i].size;
}
- /* FIXME: Once _bfd_elf_discard_section_eh_frame will be able to
- shrink sections to zero size, this won't be needed any more. */
- if (p == contents && sec->_cooked_size == 16)
- {
- bfd_put_32 (abfd, 12, p); /* Fake CIE length */
- bfd_put_32 (abfd, 0, p + 4); /* Fake CIE id */
- p[8] = 1; /* Fake CIE version */
- memset (p + 9, 0, 7); /* Fake CIE augmentation, 3xleb128
- and 3xDW_CFA_nop as pad */
- p += 16;
- }
- else
{
unsigned int alignment = 1 << sec->alignment_power;
- unsigned int pad = sec->_cooked_size % alignment;
+ unsigned int pad = sec->size % alignment;
/* Don't pad beyond the raw size of the output section. It
can happen at the last input section. */
if (pad
- && ((sec->output_offset + sec->_cooked_size + pad)
- <= sec->output_section->_raw_size))
+ && ((sec->output_offset + sec->size + pad)
+ <= sec->output_section->size))
{
/* Find the last CIE/FDE. */
for (i = sec_info->count - 1; i > 0; i--)
@@ -1068,15 +1047,15 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
memset (p, 0, pad);
p += pad;
- sec->_cooked_size += pad;
+ sec->size += pad;
}
}
- BFD_ASSERT ((bfd_size_type) (p - contents) == sec->_cooked_size);
+ BFD_ASSERT ((bfd_size_type) (p - contents) == sec->size);
return bfd_set_section_contents (abfd, sec->output_section,
contents, (file_ptr) sec->output_offset,
- sec->_cooked_size);
+ sec->size);
}
/* Helper function used to sort .eh_frame_hdr search table by increasing
@@ -1187,7 +1166,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
retval = bfd_set_section_contents (abfd, sec->output_section,
contents, (file_ptr) sec->output_offset,
- sec->_cooked_size);
+ sec->size);
free (contents);
return retval;
}
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 1f79147a880..b1e00af1ce4 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1042,16 +1042,12 @@ static bfd_boolean elf_hppa_sort_unwind (bfd *abfd)
if (s != NULL)
{
bfd_size_type size;
- char *contents;
+ bfd_byte *contents;
- size = s->_raw_size;
- contents = bfd_malloc (size);
- if (contents == NULL)
- return FALSE;
-
- if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size))
+ if (!bfd_malloc_and_get_section (abfd, s, &contents))
return FALSE;
+ size = s->size;
qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare);
if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size))
@@ -1403,9 +1399,8 @@ elf_hppa_relocate_section (bfd *output_bfd,
if (sym_sec->output_section == NULL && dyn_h == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd), h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B(%A): warning: unresolvable relocation against symbol `%s'"),
+ input_bfd, input_section, h->root.root.string);
relocation = 0;
}
else if (sym_sec->output_section)
@@ -1430,9 +1425,8 @@ elf_hppa_relocate_section (bfd *output_bfd,
if (dyn_h == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd), h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B(%A): warning: unresolvable relocation against symbol `%s'"),
+ input_bfd, input_section, h->root.root.string);
}
relocation = 0;
}
@@ -1446,9 +1440,8 @@ elf_hppa_relocate_section (bfd *output_bfd,
if (dyn_h == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd), h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B(%A): warning: unresolvable relocation against symbol `%s'"),
+ input_bfd, input_section, h->root.root.string);
}
relocation = 0;
}
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 52685253062..c9e32be1020 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -505,11 +505,6 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Get a copy of the native relocations. */
@@ -541,12 +536,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -737,7 +727,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
value += irel->r_addend;
/* Do nothing if this reloc is the last byte in the section. */
- if (irel->r_offset == sec->_cooked_size)
+ if (irel->r_offset == sec->size)
continue;
/* See if the next instruction is an unconditional pc-relative
@@ -1189,7 +1179,7 @@ mn10200_elf_relax_delete_bytes (abfd, sec, addr, count)
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -1197,7 +1187,7 @@ mn10200_elf_relax_delete_bytes (abfd, sec, addr, count)
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- sec->_cooked_size -= count;
+ sec->size -= count;
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
@@ -1316,7 +1306,7 @@ mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- (size_t) input_section->_raw_size);
+ (size_t) input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index c64d34f4e25..a83015d7647 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -52,19 +52,6 @@ bfd_boolean _bfd_mn10300_elf_merge_private_bfd_data
linking with -Bsymbolic. We store the information in a field
extending the regular ELF linker hash table. */
-/* This structure keeps track of the number of PC relative relocs we
- have copied for a given symbol. */
-
-struct elf_mn10300_pcrel_relocs_copied
-{
- /* Next section. */
- struct elf_mn10300_pcrel_relocs_copied * next;
- /* A section in dynobj. */
- asection * section;
- /* Number of relocs copied in this section. */
- bfd_size_type count;
-};
-
struct elf32_mn10300_link_hash_entry {
/* The basic elf link hash table entry. */
struct elf_link_hash_entry root;
@@ -90,9 +77,6 @@ struct elf32_mn10300_link_hash_entry {
add it to the hash table to avoid computing it over and over. */
unsigned char movm_stack_size;
- /* Number of PC relative relocs copied for this symbol. */
- struct elf_mn10300_pcrel_relocs_copied * pcrel_relocs_copied;
-
/* When set, convert all "call" instructions to this target into "calls"
instructions. */
#define MN10300_CONVERT_CALL_TO_CALLS 0x1
@@ -166,9 +150,6 @@ static bfd_boolean _bfd_mn10300_elf_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean _bfd_mn10300_elf_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean _bfd_mn10300_elf_discard_copies
- PARAMS ((struct elf32_mn10300_link_hash_entry *,
- struct bfd_link_info *));
static bfd_boolean _bfd_mn10300_elf_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean _bfd_mn10300_elf_finish_dynamic_symbol
@@ -656,7 +637,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
elf_hash_table (info)->hgot = h;
/* The first bit of the global offset table is the header. */
- s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
+ s->size += bed->got_header_size + bed->got_symbol_offset;
return TRUE;
}
@@ -817,7 +798,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
- h->got.offset = sgot->_raw_size;
+ h->got.offset = sgot->size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -826,7 +807,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
return FALSE;
}
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -852,16 +833,16 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
- local_got_offsets[r_symndx] = sgot->_raw_size;
+ local_got_offsets[r_symndx] = sgot->size;
if (info->shared)
/* If we are generating a shared object, we need to
output a R_MN10300_RELATIVE reloc so that the dynamic
linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
- sgot->_raw_size += 4;
+ sgot->size += 4;
break;
@@ -887,7 +868,6 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
break;
- case R_MN10300_32:
case R_MN10300_24:
case R_MN10300_16:
case R_MN10300_8:
@@ -896,28 +876,16 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
case R_MN10300_PCREL8:
if (h != NULL)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ break;
+
+ case R_MN10300_32:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
- /* If we are creating a shared library, and this is a reloc
- against a global symbol, or a non PC relative reloc
- against a local symbol, then we need to copy the reloc
- into the shared library. However, if we are linking with
- -Bsymbolic, we do not need to copy a reloc against a
- global symbol which is defined in an object we are
- including in the link (i.e., DEF_REGULAR is set). At
- this point we have not seen all the input files, so it is
- possible that DEF_REGULAR is not set now but will be set
- later (it is never cleared). We account for that
- possibility below by storing information in the
- pcrel_relocs_copied field of the hash table entry. */
+ /* If we are creating a shared library, then we need to copy
+ the reloc into the shared library. */
if (info->shared
- && (sec->flags & SEC_ALLOC) != 0
- && (! (elf_mn10300_howto_table[ELF32_R_TYPE (rel->r_info)]
- .pc_relative)
- || (h != NULL
- && (! info->symbolic
- || h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ && (sec->flags & SEC_ALLOC) != 0)
{
/* When creating a shared object, we must copy these
reloc types into the output file. We create a reloc
@@ -954,44 +922,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
}
}
- sreloc->_raw_size += sizeof (Elf32_External_Rela);
-
- /* If we are linking with -Bsymbolic, and this is a
- global symbol, we count the number of PC relative
- relocations we have entered for this symbol, so that
- we can discard them again if the symbol is later
- defined by a regular object. Note that this function
- is only called if we are using an elf_sh linker
- hash table, which means that h is really a pointer to
- an elf32_mn10300_link_hash_entry. */
- if (h != NULL
- && (elf_mn10300_howto_table[ELF32_R_TYPE (rel->r_info)]
- .pc_relative))
- {
- struct elf32_mn10300_link_hash_entry *eh;
- struct elf_mn10300_pcrel_relocs_copied *p;
-
- eh = (struct elf32_mn10300_link_hash_entry *) h;
-
- for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
- if (p->section == sreloc)
- break;
-
- if (p == NULL)
- {
- p = ((struct elf_mn10300_pcrel_relocs_copied *)
- bfd_alloc (dynobj, sizeof *p));
- if (p == NULL)
- return FALSE;
-
- p->next = eh->pcrel_relocs_copied;
- eh->pcrel_relocs_copied = p;
- p->section = sreloc;
- p->count = 0;
- }
-
- ++p->count;
- }
+ sreloc->size += sizeof (Elf32_External_Rela);
}
break;
@@ -1056,7 +987,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
bfd_vma addend;
struct elf_link_hash_entry * h;
unsigned long symndx;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
asection *sym_sec ATTRIBUTE_UNUSED;
int is_local ATTRIBUTE_UNUSED;
{
@@ -1077,6 +1008,24 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
switch (r_type)
{
+ case R_MN10300_24:
+ case R_MN10300_16:
+ case R_MN10300_8:
+ case R_MN10300_PCREL8:
+ case R_MN10300_PCREL16:
+ case R_MN10300_PCREL32:
+ case R_MN10300_GOTOFF32:
+ case R_MN10300_GOTOFF24:
+ case R_MN10300_GOTOFF16:
+ if (info->shared
+ && (input_section->flags & SEC_ALLOC) != 0
+ && h != NULL
+ && ! SYMBOL_REFERENCES_LOCAL (info, h))
+ return bfd_reloc_dangerous;
+ }
+
+ switch (r_type)
+ {
case R_MN10300_NONE:
return bfd_reloc_ok;
@@ -1112,22 +1061,10 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
skip = FALSE;
- if (elf_section_data (input_section)->sec_info == NULL
- || (input_section->sec_info_type != ELF_INFO_TYPE_STABS))
- outrel.r_offset = offset;
- else
- {
- bfd_vma off;
-
- off = (_bfd_stab_section_offset
- (output_bfd, & elf_hash_table (info)->stab_info,
- input_section,
- & elf_section_data (input_section)->sec_info,
- offset));
- if (off == (bfd_vma) -1)
- skip = TRUE;
- outrel.r_offset = off;
- }
+ outrel.r_offset = _bfd_elf_section_offset (input_bfd, info,
+ input_section, offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -1142,9 +1079,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
/* h->dynindx may be -1 if this symbol was marked to
become local. */
if (h == NULL
- || ((info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0))
+ || SYMBOL_REFERENCES_LOCAL (info, h))
{
relocate = TRUE;
outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
@@ -1229,81 +1164,6 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
return bfd_reloc_ok;
case R_MN10300_PCREL32:
- if (info->shared
- && (input_section->flags & SEC_ALLOC) != 0
- && h != NULL
- && h->dynindx != -1
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- {
- Elf_Internal_Rela outrel;
- bfd_boolean skip;
-
- /* When generating a shared object, these relocations
- are copied into the output file to be resolved at run
- time. */
-
- if (sreloc == NULL)
- {
- const char * name;
-
- name = (bfd_elf_string_from_elf_section
- (input_bfd,
- elf_elfheader (input_bfd)->e_shstrndx,
- elf_section_data (input_section)->rel_hdr.sh_name));
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- && strcmp (bfd_get_section_name (input_bfd,
- input_section),
- name + 5) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- BFD_ASSERT (sreloc != NULL);
- }
-
- skip = FALSE;
-
- if (elf_section_data (input_section)->sec_info == NULL
- || (input_section->sec_info_type != ELF_INFO_TYPE_STABS))
- outrel.r_offset = offset;
- else
- {
- bfd_vma off;
-
- off = (_bfd_stab_section_offset
- (output_bfd, & elf_hash_table (info)->stab_info,
- input_section,
- & elf_section_data (input_section)->sec_info,
- offset));
- if (off == (bfd_vma) -1)
- skip = TRUE;
- outrel.r_offset = off;
- }
-
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- else
- {
- BFD_ASSERT (h != NULL && h->dynindx != -1);
- outrel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_PCREL32);
- outrel.r_addend = addend;
- }
-
- bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (bfd_byte *) (((Elf32_External_Rela *)
- sreloc->contents)
- + sreloc->reloc_count));
- ++sreloc->reloc_count;
-
- return bfd_reloc_ok;
- }
-
value -= (input_section->output_section->vma
+ input_section->output_offset);
value -= offset;
@@ -1442,9 +1302,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
BFD_ASSERT (off != (bfd_vma) -1);
if (! elf_hash_table (info)->dynamic_sections_created
- || (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ || SYMBOL_REFERENCES_LOCAL (info, h))
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
locally, or the symbol was forced to be local
@@ -1603,16 +1461,9 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_MN10300_GOT24
|| r_type == R_MN10300_GOT16)
&& elf_hash_table (info)->dynamic_sections_created
- && (! info->shared
- || (! info->symbolic && h->root.dynindx != -1)
- || (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- || (info->shared
- && ((! info->symbolic && h->root.dynindx != -1)
- || (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
- && ( r_type == R_MN10300_32
- || r_type == R_MN10300_PCREL32)
+ && !SYMBOL_REFERENCES_LOCAL (info, hh))
+ || (r_type == R_MN10300_32
+ && !SYMBOL_REFERENCES_LOCAL (info, hh)
&& ((input_section->flags & SEC_ALLOC) != 0
/* DWARF will emit R_MN10300_32 relocations
in its sections against symbols defined
@@ -1705,9 +1556,10 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
static bfd_boolean
elf32_mn10300_finish_hash_table_entry (gen_entry, in_args)
struct bfd_hash_entry *gen_entry;
- PTR in_args ATTRIBUTE_UNUSED;
+ PTR in_args;
{
struct elf32_mn10300_link_hash_entry *entry;
+ struct bfd_link_info *link_info = (struct bfd_link_info *)in_args;
unsigned int byte_count = 0;
entry = (struct elf32_mn10300_link_hash_entry *) gen_entry;
@@ -1721,11 +1573,16 @@ elf32_mn10300_finish_hash_table_entry (gen_entry, in_args)
return TRUE;
/* If there are no named calls to this symbol, or there's nothing we
- can move from the function itself into the "call" instruction, then
- note that all "call" instructions should be converted into "calls"
- instructions and return. */
+ can move from the function itself into the "call" instruction,
+ then note that all "call" instructions should be converted into
+ "calls" instructions and return. If a symbol is available for
+ dynamic symbol resolution (overridable or overriding), avoid
+ custom calling conventions. */
if (entry->direct_calls == 0
- || (entry->stack_size == 0 && entry->movm_args == 0))
+ || (entry->stack_size == 0 && entry->movm_args == 0)
+ || (elf_hash_table (link_info)->dynamic_sections_created
+ && ELF_ST_VISIBILITY (entry->root.other) != STV_INTERNAL
+ && ELF_ST_VISIBILITY (entry->root.other) != STV_HIDDEN))
{
/* Make a note that we should convert "call" instructions to "calls"
instructions for calls to this symbol. */
@@ -1862,16 +1719,11 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
/* Get cached copy of section contents if it exists. */
if (elf_section_data (section)->this_hdr.contents != NULL)
contents = elf_section_data (section)->this_hdr.contents;
- else if (section->_raw_size != 0)
+ else if (section->size != 0)
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (section->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (input_bfd, section,
- contents, (file_ptr) 0,
- section->_raw_size))
+ if (!bfd_malloc_and_get_section (input_bfd, section,
+ &contents))
goto error_return;
}
else
@@ -2000,6 +1852,11 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
sec_shndx = _bfd_elf_section_from_bfd_section (input_bfd,
section);
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ hashes = elf_sym_hashes (input_bfd);
+ end_hashes = hashes + symcount;
+
/* Look at each function defined in this section and
update info for that function. */
isymend = isymbuf + symtab_hdr->sh_info;
@@ -2010,6 +1867,22 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
{
struct elf_link_hash_table *elftab;
bfd_size_type amt;
+ struct elf_link_hash_entry **lhashes = hashes;
+
+ /* Skip a local symbol if it aliases a
+ global one. */
+ for (; lhashes < end_hashes; lhashes++)
+ {
+ hash = (struct elf32_mn10300_link_hash_entry *) *lhashes;
+ if ((hash->root.root.type == bfd_link_hash_defined
+ || hash->root.root.type == bfd_link_hash_defweak)
+ && hash->root.root.u.def.section == section
+ && hash->root.type == STT_FUNC
+ && hash->root.root.u.def.value == isym->st_value)
+ break;
+ }
+ if (lhashes != end_hashes)
+ continue;
if (isym->st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
@@ -2047,17 +1920,13 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
}
}
- symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
- - symtab_hdr->sh_info);
- hashes = elf_sym_hashes (input_bfd);
- end_hashes = hashes + symcount;
for (; hashes < end_hashes; hashes++)
{
hash = (struct elf32_mn10300_link_hash_entry *) *hashes;
if ((hash->root.root.type == bfd_link_hash_defined
|| hash->root.root.type == bfd_link_hash_defweak)
&& hash->root.root.u.def.section == section
- && ELF_ST_TYPE (isym->st_info) == STT_FUNC)
+ && hash->root.type == STT_FUNC)
compute_function_info (input_bfd, hash,
(hash)->root.root.u.def.value,
contents);
@@ -2104,10 +1973,10 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
the final initialization steps on each. */
elf32_mn10300_link_hash_traverse (hash_table,
elf32_mn10300_finish_hash_table_entry,
- NULL);
+ link_info);
elf32_mn10300_link_hash_traverse (hash_table->static_hash_table,
elf32_mn10300_finish_hash_table_entry,
- NULL);
+ link_info);
/* All entries in the hash table are fully initialized. */
hash_table->flags |= MN10300_HASH_ENTRIES_INITIALIZED;
@@ -2145,7 +2014,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
unsigned int symcount;
/* Skip non-code sections and empty sections. */
- if ((section->flags & SEC_CODE) == 0 || section->_raw_size == 0)
+ if ((section->flags & SEC_CODE) == 0 || section->size == 0)
continue;
if (section->reloc_count != 0)
@@ -2165,13 +2034,8 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (section->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (input_bfd, section,
- contents, (file_ptr) 0,
- section->_raw_size))
+ if (!bfd_malloc_and_get_section (input_bfd, section,
+ &contents))
goto error_return;
}
@@ -2373,11 +2237,6 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Get a copy of the native relocations. */
@@ -2410,12 +2269,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -2439,6 +2293,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
asection *sym_sec = NULL;
const char *sym_name;
char *new_name;
+ bfd_vma saved_addend;
/* A local symbol. */
isym = isymbuf + ELF32_R_SYM (irel->r_info);
@@ -2451,13 +2306,25 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- symval = (isym->st_value
- + sym_sec->output_section->vma
- + sym_sec->output_offset);
sym_name = bfd_elf_string_from_elf_section (abfd,
symtab_hdr->sh_link,
isym->st_name);
+ if ((sym_sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (isym->st_info) == STT_SECTION
+ && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ {
+ saved_addend = irel->r_addend;
+ symval = _bfd_elf_rela_local_sym (abfd, isym, &sym_sec, irel);
+ symval += irel->r_addend;
+ irel->r_addend = saved_addend;
+ }
+ else
+ {
+ symval = (isym->st_value
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
+ }
/* Tack on an ID so we can uniquely identify this
local symbol in the global hash table. */
new_name = bfd_malloc ((bfd_size_type) strlen (sym_name) + 10);
@@ -2756,7 +2623,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
value += irel->r_addend;
/* Do nothing if this reloc is the last byte in the section. */
- if (irel->r_offset == sec->_cooked_size)
+ if (irel->r_offset == sec->size)
continue;
/* See if the next instruction is an unconditional pc-relative
@@ -3589,7 +3456,7 @@ mn10300_elf_relax_delete_bytes (abfd, sec, addr, count)
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -3597,7 +3464,7 @@ mn10300_elf_relax_delete_bytes (abfd, sec, addr, count)
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- sec->_cooked_size -= count;
+ sec->size -= count;
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
@@ -3716,7 +3583,7 @@ mn10300_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- (size_t) input_section->_raw_size);
+ (size_t) input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
@@ -3825,7 +3692,6 @@ elf32_mn10300_link_hash_newfunc (entry, table, string)
ret->stack_size = 0;
ret->movm_args = 0;
ret->movm_stack_size = 0;
- ret->pcrel_relocs_copied = NULL;
ret->flags = 0;
}
@@ -4195,8 +4061,8 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += elf_mn10300_sizeof_plt0 (info);
+ if (s->size == 0)
+ s->size += elf_mn10300_sizeof_plt0 (info);
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -4207,26 +4073,26 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
}
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += elf_mn10300_sizeof_plt (info);
+ s->size += elf_mn10300_sizeof_plt (info);
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += 4;
+ s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
+ s->size += sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -4281,7 +4147,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -4292,8 +4158,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -4302,38 +4167,10 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
-
- return TRUE;
-}
-
-/* This function is called via elf32_mn10300_link_hash_traverse if we are
- creating a shared object with -Bsymbolic. It discards the space
- allocated to copy PC relative relocs against symbols which are
- defined in regular objects. We allocated space for them in the
- check_relocs routine, but we won't fill them in in the
- relocate_section routine. */
-
-static bfd_boolean
-_bfd_mn10300_elf_discard_copies (h, info)
- struct elf32_mn10300_link_hash_entry *h;
- struct bfd_link_info *info;
-{
- struct elf_mn10300_pcrel_relocs_copied *s;
-
- /* If a symbol has been forced local or we have found a regular
- definition for the symbolic link case, then we won't be needing
- any relocs. */
- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
- || info->symbolic))
- {
- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel);
- }
+ s->size += h->size;
return TRUE;
}
@@ -4361,7 +4198,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -4374,18 +4211,9 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
- /* If this is a -Bsymbolic shared link, then we need to discard all
- PC relative relocs against symbols defined in a regular object.
- We allocated space for them in the check_relocs routine, but we
- will not fill them in in the relocate_section routine. */
- if (info->shared && info->symbolic)
- elf32_mn10300_link_hash_traverse (elf32_mn10300_hash_table (info),
- _bfd_mn10300_elf_discard_copies,
- info);
-
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -4408,7 +4236,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
/* Strip this section if we don't need it; see the
comment below. */
strip = TRUE;
@@ -4418,7 +4246,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -4477,8 +4305,8 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
section's contents are written out. This should not happen,
but this way if it does, we get a R_MN10300_NONE reloc
instead of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -4725,7 +4553,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
@@ -4756,10 +4584,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -4775,12 +4600,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
+ dyn.d_un.d_val -= s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
@@ -4788,7 +4608,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
/* Fill in the first entry in the procedure linkage table. */
splt = bfd_get_section_by_name (dynobj, ".plt");
- if (splt && splt->_raw_size > 0)
+ if (splt && splt->size > 0)
{
if (info->shared)
{
@@ -4813,7 +4633,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
@@ -4830,6 +4650,25 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Classify relocation types, such that combreloc can sort them
+ properly. */
+
+static enum elf_reloc_type_class
+_bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_MN10300_RELATIVE:
+ return reloc_class_relative;
+ case R_MN10300_JMP_SLOT:
+ return reloc_class_plt;
+ case R_MN10300_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
#ifndef ELF_ARCH
#define TARGET_LITTLE_SYM bfd_elf32_mn10300_vec
#define TARGET_LITTLE_NAME "elf32-mn10300"
@@ -4878,6 +4717,9 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
#define elf_backend_finish_dynamic_sections \
_bfd_mn10300_elf_finish_dynamic_sections
+#define elf_backend_reloc_type_class \
+ _bfd_mn10300_elf_reloc_type_class
+
#define elf_backend_want_got_plt 1
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
diff --git a/bfd/elf.c b/bfd/elf.c
index 2fcfa980ed0..c0d60090dbe 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -292,8 +292,8 @@ bfd_elf_string_from_elf_section (bfd *abfd,
if (strindex >= hdr->sh_size)
{
(*_bfd_error_handler)
- (_("%s: invalid string offset %u >= %lu for section `%s'"),
- bfd_archive_filename (abfd), strindex, (unsigned long) hdr->sh_size,
+ (_("%B: invalid string offset %u >= %lu for section `%s'"),
+ abfd, strindex, (unsigned long) hdr->sh_size,
((shindex == elf_elfheader(abfd)->e_shstrndx
&& strindex == hdr->sh_name)
? ".shstrtab"
@@ -535,8 +535,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
if (idx >= shnum)
{
((*_bfd_error_handler)
- (_("%s: invalid SHT_GROUP entry"),
- bfd_archive_filename (abfd)));
+ (_("%B: invalid SHT_GROUP entry"), abfd));
idx = 0;
}
dest->shdr = elf_elfsections (abfd)[idx];
@@ -606,15 +605,65 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
if (elf_group_name (newsect) == NULL)
{
- (*_bfd_error_handler) (_("%s: no group info for section %s"),
- bfd_archive_filename (abfd), newsect->name);
+ (*_bfd_error_handler) (_("%B: no group info for section %A"),
+ abfd, newsect);
}
return TRUE;
}
bfd_boolean
-bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group)
+_bfd_elf_setup_group_pointers (bfd *abfd)
{
+ unsigned int i;
+ unsigned int num_group = elf_tdata (abfd)->num_group;
+ bfd_boolean result = TRUE;
+
+ if (num_group == (unsigned) -1)
+ return result;
+
+ for (i = 0; i < num_group; i++)
+ {
+ Elf_Internal_Shdr *shdr = elf_tdata (abfd)->group_sect_ptr[i];
+ Elf_Internal_Group *idx = (Elf_Internal_Group *) shdr->contents;
+ unsigned int n_elt = shdr->sh_size / 4;
+
+ while (--n_elt != 0)
+ if ((++idx)->shdr->bfd_section)
+ elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
+ else if (idx->shdr->sh_type == SHT_RELA
+ || idx->shdr->sh_type == SHT_REL)
+ /* We won't include relocation sections in section groups in
+ output object files. We adjust the group section size here
+ so that relocatable link will work correctly when
+ relocation sections are in section group in input object
+ files. */
+ shdr->bfd_section->size -= 4;
+ else
+ {
+ /* There are some unknown sections in the group. */
+ (*_bfd_error_handler)
+ (_("%B: unknown [%d] section `%s' in group [%s]"),
+ abfd,
+ (unsigned int) idx->shdr->sh_type,
+ elf_string_from_elf_strtab (abfd, idx->shdr->sh_name),
+ shdr->bfd_section->name);
+ result = FALSE;
+ }
+ }
+ return result;
+}
+
+bfd_boolean
+bfd_elf_is_group_section (bfd *abfd ATTRIBUTE_UNUSED, const asection *sec)
+{
+ return elf_next_in_group (sec) != NULL;
+}
+
+bfd_boolean
+bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *group ATTRIBUTE_UNUSED)
+{
+#if 0
asection *first = elf_next_in_group (group);
asection *s = first;
@@ -626,6 +675,10 @@ bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group)
if (s == first)
break;
}
+#else
+ /* FIXME: Never used. Remove it! */
+ abort ();
+#endif
return TRUE;
}
@@ -652,6 +705,9 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
if (newsect == NULL)
return FALSE;
+ hdr->bfd_section = newsect;
+ elf_section_data (newsect)->this_hdr = *hdr;
+
/* Always use the real type/flags. */
elf_section_type (newsect) = hdr->sh_type;
elf_section_flags (newsect) = hdr->sh_flags;
@@ -798,9 +854,6 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
}
}
- hdr->bfd_section = newsect;
- elf_section_data (newsect)->this_hdr = *hdr;
-
return TRUE;
}
@@ -895,10 +948,31 @@ merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED,
bfd_boolean
_bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
{
+ bfd *ibfd;
+ asection *sec;
+
if (!is_elf_hash_table (info->hash))
return FALSE;
- if (elf_hash_table (info)->merge_info)
- _bfd_merge_sections (abfd, elf_hash_table (info)->merge_info,
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ if ((ibfd->flags & DYNAMIC) == 0)
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if ((sec->flags & SEC_MERGE) != 0
+ && !bfd_is_abs_section (sec->output_section))
+ {
+ struct bfd_elf_section_data *secdata;
+
+ secdata = elf_section_data (sec);
+ if (! _bfd_add_merge_section (abfd,
+ &elf_hash_table (info)->merge_info,
+ sec, &secdata->sec_info))
+ return FALSE;
+ else if (secdata->sec_info)
+ sec->sec_info_type = ELF_INFO_TYPE_MERGE;
+ }
+
+ if (elf_hash_table (info)->merge_info != NULL)
+ _bfd_merge_sections (abfd, info, elf_hash_table (info)->merge_info,
merge_sections_remove_hook);
return TRUE;
}
@@ -968,6 +1042,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
case PT_TLS: pt = "TLS"; break;
case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
case PT_GNU_STACK: pt = "STACK"; break;
+ case PT_GNU_RELRO: pt = "RELRO"; break;
default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break;
}
fprintf (f, "%8s off 0x", pt);
@@ -1002,10 +1077,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
fprintf (f, _("\nDynamic Section:\n"));
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_return;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1017,7 +1089,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
extdyn = dynbuf;
- extdynend = extdyn + s->_raw_size;
+ extdynend = extdyn + s->size;
for (; extdyn < extdynend; extdyn += extdynsize)
{
Elf_Internal_Dyn dyn;
@@ -1441,8 +1513,8 @@ _bfd_elf_link_hash_table_init
table->bucketcount = 0;
table->needed = NULL;
table->hgot = NULL;
- table->stab_info = NULL;
table->merge_info = NULL;
+ memset (&table->stab_info, 0, sizeof (table->stab_info));
memset (&table->eh_info, 0, sizeof (table->eh_info));
table->dynlocal = NULL;
table->runpath = NULL;
@@ -1489,6 +1561,18 @@ bfd_elf_set_dt_needed_name (bfd *abfd, const char *name)
elf_dt_name (abfd) = name;
}
+int
+bfd_elf_get_dyn_lib_class (bfd *abfd)
+{
+ int lib_class;
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && bfd_get_format (abfd) == bfd_object)
+ lib_class = elf_dyn_lib_class (abfd);
+ else
+ lib_class = 0;
+ return lib_class;
+}
+
void
bfd_elf_set_dyn_lib_class (bfd *abfd, int lib_class)
{
@@ -1556,14 +1640,10 @@ bfd_elf_get_bfd_needed_list (bfd *abfd,
return TRUE;
s = bfd_get_section_by_name (abfd, ".dynamic");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
return TRUE;
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_return;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1576,7 +1656,7 @@ bfd_elf_get_bfd_needed_list (bfd *abfd,
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
extdyn = dynbuf;
- extdynend = extdyn + s->_raw_size;
+ extdynend = extdyn + s->size;
for (; extdyn < extdynend; extdyn += extdynsize)
{
Elf_Internal_Dyn dyn;
@@ -1823,8 +1903,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
|| hdr->sh_link >= num_sec)
{
((*_bfd_error_handler)
- (_("%s: invalid link %lu for reloc section %s (index %u)"),
- bfd_archive_filename (abfd), hdr->sh_link, name, shindex));
+ (_("%B: invalid link %lu for reloc section %s (index %u)"),
+ abfd, hdr->sh_link, name, shindex));
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
}
@@ -1945,8 +2025,10 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
hdr->bfd_section->flags
|= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+ /* We try to keep the same section order as it comes in. */
+ idx += n_elt;
while (--n_elt != 0)
- if ((s = (++idx)->shdr->bfd_section) != NULL
+ if ((s = (--idx)->shdr->bfd_section) != NULL
&& elf_next_in_group (s) != NULL)
{
elf_next_in_group (hdr->bfd_section) = s;
@@ -2022,6 +2104,7 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
static struct bfd_elf_special_section const special_sections[] =
{
{ ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".gnu.linkonce.b",15, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
{ ".comment", 8, 0, SHT_PROGBITS, 0 },
{ ".data", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ ".data1", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
@@ -2054,6 +2137,7 @@ static struct bfd_elf_special_section const special_sections[] =
{ ".gnu.version", 12, 0, SHT_GNU_versym, 0 },
{ ".gnu.version_d", 14, 0, SHT_GNU_verdef, 0 },
{ ".gnu.version_r", 14, 0, SHT_GNU_verneed, 0 },
+ { ".note.GNU-stack",15, 0, SHT_PROGBITS, 0 },
{ ".note", 5, -1, SHT_NOTE, 0 },
{ ".rela", 5, -1, SHT_RELA, 0 },
{ ".rel", 4, -1, SHT_REL, 0 },
@@ -2205,7 +2289,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
return FALSE;
newsect->vma = hdr->p_vaddr;
newsect->lma = hdr->p_paddr;
- newsect->_raw_size = hdr->p_filesz;
+ newsect->size = hdr->p_filesz;
newsect->filepos = hdr->p_offset;
newsect->flags |= SEC_HAS_CONTENTS;
newsect->alignment_power = bfd_log2 (hdr->p_align);
@@ -2238,7 +2322,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
return FALSE;
newsect->vma = hdr->p_vaddr + hdr->p_filesz;
newsect->lma = hdr->p_paddr + hdr->p_filesz;
- newsect->_raw_size = hdr->p_memsz - hdr->p_filesz;
+ newsect->size = hdr->p_memsz - hdr->p_filesz;
if (hdr->p_type == PT_LOAD)
{
newsect->flags |= SEC_ALLOC;
@@ -2291,6 +2375,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
case PT_GNU_STACK:
return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "stack");
+ case PT_GNU_RELRO:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro");
+
default:
/* Check for any processor-specific program segment types.
If no handler for them, default to making "segment" sections. */
@@ -2373,7 +2460,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
this_hdr->sh_addr = 0;
this_hdr->sh_offset = 0;
- this_hdr->sh_size = asect->_raw_size;
+ this_hdr->sh_size = asect->size;
this_hdr->sh_link = 0;
this_hdr->sh_addralign = 1 << asect->alignment_power;
/* The sh_entsize and sh_info fields may have been set already by
@@ -2386,7 +2473,31 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
asect->flags. */
if (this_hdr->sh_type == SHT_NULL)
{
- if ((asect->flags & SEC_ALLOC) != 0
+ if ((asect->flags & SEC_GROUP) != 0)
+ {
+ /* We also need to mark SHF_GROUP here for relocatable
+ link. */
+ struct bfd_link_order *l;
+ asection *elt;
+
+ for (l = asect->link_order_head; l != NULL; l = l->next)
+ if (l->type == bfd_indirect_link_order
+ && (elt = elf_next_in_group (l->u.indirect.section)) != NULL)
+ do
+ {
+ /* The name is not important. Anything will do. */
+ elf_group_name (elt->output_section) = "G";
+ elf_section_flags (elt->output_section) |= SHF_GROUP;
+
+ elt = elf_next_in_group (elt);
+ /* During a relocatable link, the lists are
+ circular. */
+ }
+ while (elt != elf_next_in_group (l->u.indirect.section));
+
+ this_hdr->sh_type = SHT_GROUP;
+ }
+ else if ((asect->flags & SEC_ALLOC) != 0
&& (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
|| (asect->flags & SEC_NEVER_LOAD) != 0))
this_hdr->sh_type = SHT_NOBITS;
@@ -2481,7 +2592,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
if ((asect->flags & SEC_THREAD_LOCAL) != 0)
{
this_hdr->sh_flags |= SHF_TLS;
- if (asect->_raw_size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0)
+ if (asect->size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0)
{
struct bfd_link_order *o;
@@ -2547,7 +2658,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
if (sec->contents == NULL)
{
gas = FALSE;
- sec->contents = bfd_alloc (abfd, sec->_raw_size);
+ sec->contents = bfd_alloc (abfd, sec->size);
/* Arrange for the section to be written out. */
elf_section_data (sec)->this_hdr.contents = sec->contents;
@@ -2558,7 +2669,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
}
}
- loc = sec->contents + sec->_raw_size;
+ loc = sec->contents + sec->size;
/* Get the pointer to the first section in the group that gas
squirreled away here. objcopy arranges for this to be set to the
@@ -2603,13 +2714,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
}
while (elt != elf_next_in_group (l->u.indirect.section));
- /* With ld -r, merging SHT_GROUP sections results in wasted space
- due to allowing for the flag word on each input. We may well
- duplicate entries too. */
- while ((loc -= 4) > sec->contents)
- H_PUT_32 (abfd, 0, loc);
-
- if (loc != sec->contents)
+ if ((loc -= 4) != sec->contents)
abort ();
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
@@ -2727,6 +2832,7 @@ assign_section_numbers (bfd *abfd)
i_shdrp[t->strtab_section] = &t->strtab_hdr;
t->symtab_hdr.sh_link = t->strtab_section;
}
+
for (sec = abfd->sections; sec; sec = sec->next)
{
struct bfd_elf_section_data *d = elf_section_data (sec);
@@ -2755,6 +2861,56 @@ assign_section_numbers (bfd *abfd)
d->rel_hdr2->sh_info = d->this_idx;
}
+ /* We need to set up sh_link for SHF_LINK_ORDER. */
+ if ((d->this_hdr.sh_flags & SHF_LINK_ORDER) != 0)
+ {
+ s = elf_linked_to_section (sec);
+ if (s)
+ d->this_hdr.sh_link = elf_section_data (s)->this_idx;
+ else
+ {
+ struct bfd_link_order *p;
+
+ /* Find out what the corresponding section in output
+ is. */
+ for (p = sec->link_order_head; p != NULL; p = p->next)
+ {
+ s = p->u.indirect.section;
+ if (p->type == bfd_indirect_link_order
+ && (bfd_get_flavour (s->owner)
+ == bfd_target_elf_flavour))
+ {
+ Elf_Internal_Shdr ** const elf_shdrp
+ = elf_elfsections (s->owner);
+ int elfsec
+ = _bfd_elf_section_from_bfd_section (s->owner, s);
+ elfsec = elf_shdrp[elfsec]->sh_link;
+ /* PR 290:
+ The Intel C compiler generates SHT_IA_64_UNWIND with
+ SHF_LINK_ORDER. But it doesn't set theh sh_link or
+ sh_info fields. Hence we could get the situation
+ where elfsec is 0. */
+ if (elfsec == 0)
+ {
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (abfd);
+ if (bed->link_order_error_handler)
+ bed->link_order_error_handler
+ (_("%B: warning: sh_link not set for section `%S'"),
+ abfd, s);
+ }
+ else
+ {
+ s = elf_shdrp[elfsec]->bfd_section->output_section;
+ BFD_ASSERT (s != NULL);
+ d->this_hdr.sh_link = elf_section_data (s)->this_idx;
+ }
+ break;
+ }
+ }
+ }
+ }
+
switch (d->this_hdr.sh_type)
{
case SHT_REL:
@@ -3173,6 +3329,25 @@ make_mapping (bfd *abfd,
return m;
}
+/* Create the PT_DYNAMIC segment, which includes DYNSEC. Returns NULL
+ on failure. */
+
+struct elf_segment_map *
+_bfd_elf_make_dynamic_segment (bfd *abfd, asection *dynsec)
+{
+ struct elf_segment_map *m;
+
+ m = bfd_zalloc (abfd, sizeof (struct elf_segment_map));
+ if (m == NULL)
+ return NULL;
+ m->next = NULL;
+ m->p_type = PT_DYNAMIC;
+ m->count = 1;
+ m->sections[0] = dynsec;
+
+ return m;
+}
+
/* Set up a mapping from BFD sections to program segments. */
static bfd_boolean
@@ -3365,7 +3540,7 @@ map_sections_to_segments (bfd *abfd)
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->_raw_size;
+ last_size = hdr->size;
else
last_size = 0;
continue;
@@ -3389,7 +3564,7 @@ map_sections_to_segments (bfd *abfd)
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->_raw_size;
+ last_size = hdr->size;
else
last_size = 0;
phdr_index = i;
@@ -3410,15 +3585,9 @@ map_sections_to_segments (bfd *abfd)
/* If there is a .dynamic section, throw in a PT_DYNAMIC segment. */
if (dynsec != NULL)
{
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
+ m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
if (m == NULL)
goto error_return;
- m->next = NULL;
- m->p_type = PT_DYNAMIC;
- m->count = 1;
- m->sections[0] = dynsec;
-
*pm = m;
pm = &m->next;
}
@@ -3514,6 +3683,21 @@ map_sections_to_segments (bfd *abfd)
pm = &m->next;
}
+ if (elf_tdata (abfd)->relro)
+ {
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_GNU_RELRO;
+ m->p_flags = PF_R;
+ m->p_flags_valid = 1;
+
+ *pm = m;
+ pm = &m->next;
+ }
+
free (sections);
sections = NULL;
@@ -3573,8 +3757,8 @@ elf_sort_sections (const void *arg1, const void *arg2)
/* Sort by size, to put zero sized sections
before others at the same address. */
- size1 = (sec1->flags & SEC_LOAD) ? sec1->_raw_size : 0;
- size2 = (sec2->flags & SEC_LOAD) ? sec2->_raw_size : 0;
+ size1 = (sec1->flags & SEC_LOAD) ? sec1->size : 0;
+ size2 = (sec2->flags & SEC_LOAD) ? sec2->size : 0;
if (size1 < size2)
return -1;
@@ -3760,6 +3944,18 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
1 << align);
}
}
+ /* Make sure the .dynamic section is the first section in the
+ PT_DYNAMIC segment. */
+ else if (p->p_type == PT_DYNAMIC
+ && m->count > 1
+ && strcmp (m->sections[0]->name, ".dynamic") != 0)
+ {
+ _bfd_error_handler
+ (_("%s: The first section in the PT_DYNAMIC segment is not the .dynamic section"),
+ bfd_get_filename (abfd));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
if (m->count == 0)
p->p_vaddr = 0;
@@ -3954,12 +4150,12 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
contents. */
if ((flags & SEC_LOAD) != 0
|| (flags & SEC_HAS_CONTENTS) != 0)
- off += sec->_raw_size;
+ off += sec->size;
if ((flags & SEC_ALLOC) != 0
&& ((flags & SEC_LOAD) != 0
|| (flags & SEC_THREAD_LOCAL) == 0))
- voff += sec->_raw_size;
+ voff += sec->size;
}
if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core)
@@ -3969,15 +4165,15 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if (i == 0)
{
sec->filepos = off;
- p->p_filesz = sec->_raw_size;
- off += sec->_raw_size;
+ p->p_filesz = sec->size;
+ off += sec->size;
voff = off;
}
else
{
/* Fake sections -- don't need to be written. */
sec->filepos = 0;
- sec->_raw_size = 0;
+ sec->size = 0;
flags = sec->flags = 0;
}
p->p_memsz = 0;
@@ -3988,13 +4184,13 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if ((sec->flags & SEC_LOAD) != 0
|| (sec->flags & SEC_THREAD_LOCAL) == 0
|| p->p_type == PT_TLS)
- p->p_memsz += sec->_raw_size;
+ p->p_memsz += sec->size;
if ((flags & SEC_LOAD) != 0)
- p->p_filesz += sec->_raw_size;
+ p->p_filesz += sec->size;
if (p->p_type == PT_TLS
- && sec->_raw_size == 0
+ && sec->size == 0
&& (sec->flags & SEC_HAS_CONTENTS) == 0)
{
struct bfd_link_order *o;
@@ -4032,6 +4228,22 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if (p->p_type != PT_LOAD && m->count > 0)
{
BFD_ASSERT (! m->includes_filehdr && ! m->includes_phdrs);
+ /* If the section has not yet been assigned a file position,
+ do so now. The ARM BPABI requires that .dynamic section
+ not be marked SEC_ALLOC because it is not part of any
+ PT_LOAD segment, so it will not be processed above. */
+ if (p->p_type == PT_DYNAMIC && m->sections[0]->filepos == 0)
+ {
+ unsigned int i;
+ Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
+
+ i = 1;
+ while (i_shdrpp[i]->bfd_section != m->sections[0])
+ ++i;
+ off = (_bfd_elf_assign_file_position_for_section
+ (i_shdrpp[i], off, TRUE));
+ p->p_filesz = m->sections[0]->size;
+ }
p->p_offset = m->sections[0]->filepos;
}
if (m->count == 0)
@@ -4048,6 +4260,37 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if (! m->p_paddr_valid)
p->p_paddr = phdrs_paddr;
}
+ else if (p->p_type == PT_GNU_RELRO)
+ {
+ Elf_Internal_Phdr *lp;
+
+ for (lp = phdrs; lp < phdrs + count; ++lp)
+ {
+ if (lp->p_type == PT_LOAD
+ && lp->p_vaddr <= link_info->relro_end
+ && lp->p_vaddr >= link_info->relro_start
+ && lp->p_vaddr + lp->p_filesz
+ >= link_info->relro_end)
+ break;
+ }
+
+ if (lp < phdrs + count
+ && link_info->relro_end > lp->p_vaddr)
+ {
+ p->p_vaddr = lp->p_vaddr;
+ p->p_paddr = lp->p_paddr;
+ p->p_offset = lp->p_offset;
+ p->p_filesz = link_info->relro_end - lp->p_vaddr;
+ p->p_memsz = p->p_filesz;
+ p->p_align = 1;
+ p->p_flags = (lp->p_flags & ~PF_W);
+ }
+ else
+ {
+ memset (p, 0, sizeof *p);
+ p->p_type = PT_NULL;
+ }
+ }
}
}
@@ -4135,6 +4378,12 @@ get_program_header_size (bfd *abfd)
++segs;
}
+ if (elf_tdata (abfd)->relro)
+ {
+ /* We need a PT_GNU_RELRO segment. */
+ ++segs;
+ }
+
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0
@@ -4174,10 +4423,13 @@ get_program_header_size (bfd *abfd)
_bfd_elf_compute_section_file_positions. All the section sizes and
VMAs must be known before this is called.
- We do not consider reloc sections at this point, unless they form
- part of the loadable image. Reloc sections are assigned file
- positions in assign_file_positions_for_relocs, which is called by
- write_object_contents and final_link.
+ Reloc sections come in two flavours: Those processed specially as
+ "side-channel" data attached to a section to which they apply, and
+ those that bfd doesn't process as relocations. The latter sort are
+ stored in a normal bfd section by bfd_section_from_shdr. We don't
+ consider the former sort here, unless they form part of the loadable
+ image. Reloc sections not assigned here will be handled later by
+ assign_file_positions_for_relocs.
We also don't set the positions of the .symtab and .strtab here. */
@@ -4209,8 +4461,8 @@ assign_file_positions_except_relocs (bfd *abfd,
Elf_Internal_Shdr *hdr;
hdr = *hdrpp;
- if (hdr->sh_type == SHT_REL
- || hdr->sh_type == SHT_RELA
+ if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
+ && hdr->bfd_section == NULL)
|| i == tdata->symtab_section
|| i == tdata->symtab_shndx_section
|| i == tdata->strtab_section)
@@ -4265,8 +4517,8 @@ assign_file_positions_except_relocs (bfd *abfd,
off = _bfd_elf_assign_file_position_for_section (hdr, off,
FALSE);
}
- else if (hdr->sh_type == SHT_REL
- || hdr->sh_type == SHT_RELA
+ else if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
+ && hdr->bfd_section == NULL)
|| hdr == i_shdrpp[tdata->symtab_section]
|| hdr == i_shdrpp[tdata->symtab_shndx_section]
|| hdr == i_shdrpp[tdata->strtab_section])
@@ -4565,8 +4817,8 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
/* This case can occur when using --strip-symbol on a symbol
which is used in a relocation entry. */
(*_bfd_error_handler)
- (_("%s: symbol `%s' required but not present"),
- bfd_archive_filename (abfd), bfd_asymbol_name (asym_ptr));
+ (_("%B: symbol `%s' required but not present"),
+ abfd, bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
}
@@ -4627,7 +4879,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define SECTION_SIZE(section, segment) \
(((section->flags & (SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) \
!= SEC_THREAD_LOCAL || segment->p_type == PT_TLS) \
- ? section->_raw_size : 0)
+ ? section->size : 0)
/* Returns TRUE if the given section is contained within
the given segment. VMA addresses are compared. */
@@ -4649,7 +4901,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
&& bfd_get_format (ibfd) == bfd_core \
&& s->vma == 0 && s->lma == 0 \
&& (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->_raw_size \
+ && ((bfd_vma) s->filepos + s->size \
<= p->p_offset + p->p_filesz))
/* The complicated case when p_vaddr is 0 is to handle the Solaris
@@ -4661,9 +4913,9 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
&& p->p_memsz == 0 \
&& p->p_filesz > 0 \
&& (s->flags & SEC_HAS_CONTENTS) != 0 \
- && s->_raw_size > 0 \
+ && s->size > 0 \
&& (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->_raw_size \
+ && ((bfd_vma) s->filepos + s->size \
<= p->p_offset + p->p_filesz))
/* Decide if the given section should be included in the given segment.
@@ -4853,8 +5105,8 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
a warning is produced. */
if (segment->p_type == PT_LOAD)
(*_bfd_error_handler)
- (_("%s: warning: Empty loadable segment detected, is this intentional ?\n"),
- bfd_archive_filename (ibfd));
+ (_("%B: warning: Empty loadable segment detected, is this intentional ?\n"),
+ ibfd);
map->count = 0;
*pointer_to_map = map;
@@ -5061,10 +5313,10 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
/* If the gap between the end of the previous section
and the start of this section is more than
maxpagesize then we need to start a new segment. */
- if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size,
+ if ((BFD_ALIGN (prev_sec->lma + prev_sec->size,
maxpagesize)
< BFD_ALIGN (output_section->lma, maxpagesize))
- || ((prev_sec->lma + prev_sec->_raw_size)
+ || ((prev_sec->lma + prev_sec->size)
> output_section->lma))
{
if (suggested_lma == 0)
@@ -5201,24 +5453,6 @@ _bfd_elf_copy_private_section_data (bfd *ibfd,
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return TRUE;
- if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
- {
- asection *s;
-
- /* Only set up the segments if there are no more SEC_ALLOC
- sections. FIXME: This won't do the right thing if objcopy is
- used to remove the last SEC_ALLOC section, since objcopy
- won't call this routine in that case. */
- for (s = isec->next; s != NULL; s = s->next)
- if ((s->flags & SEC_ALLOC) != 0)
- break;
- if (s == NULL)
- {
- if (! copy_private_bfd_data (ibfd, obfd))
- return FALSE;
- }
- }
-
ihdr = &elf_section_data (isec)->this_hdr;
ohdr = &elf_section_data (osec)->this_hdr;
@@ -5241,6 +5475,29 @@ _bfd_elf_copy_private_section_data (bfd *ibfd,
return TRUE;
}
+/* Copy private header information. */
+
+bfd_boolean
+_bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ /* Copy over private BFD data if it has not already been copied.
+ This must be done here, rather than in the copy_private_bfd_data
+ entry point, because the latter is called after the section
+ contents have been set, which means that the program headers have
+ already been worked out. */
+ if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ {
+ if (! copy_private_bfd_data (ibfd, obfd))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/* Copy private symbol information. If this symbol is in a section
which we did not map into a BFD section, try to map the section
index correctly. We use special macro definitions for the mapped
@@ -5695,7 +5952,7 @@ _bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd)
if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
&& (elf_section_data (s)->this_hdr.sh_type == SHT_REL
|| elf_section_data (s)->this_hdr.sh_type == SHT_RELA))
- ret += ((s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize)
+ ret += ((s->size / elf_section_data (s)->this_hdr.sh_entsize)
* sizeof (arelent *));
return ret;
@@ -5738,7 +5995,7 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
if (! (*slurp_relocs) (abfd, s, syms, TRUE))
return -1;
- count = s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize;
+ count = s->size / elf_section_data (s)->this_hdr.sh_entsize;
p = s->relocation;
for (i = 0; i < count; i++)
*storage++ = p++;
@@ -6272,8 +6529,8 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc)
fail:
(*_bfd_error_handler)
- (_("%s: unsupported relocation type %s"),
- bfd_archive_filename (abfd), areloc->howto->name);
+ (_("%B: unsupported relocation type %s"),
+ abfd, areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -6340,7 +6597,7 @@ elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect)
if (sect2 == NULL)
return FALSE;
- sect2->_raw_size = sect->_raw_size;
+ sect2->size = sect->size;
sect2->filepos = sect->filepos;
sect2->flags = sect->flags;
sect2->alignment_power = sect->alignment_power;
@@ -6377,7 +6634,7 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
sect = bfd_make_section_anyway (abfd, threaded_name);
if (sect == NULL)
return FALSE;
- sect->_raw_size = size;
+ sect->size = size;
sect->filepos = filepos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -6396,14 +6653,14 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
static bfd_boolean
elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
- size_t raw_size;
+ size_t size;
int offset;
if (note->descsz == sizeof (prstatus_t))
{
prstatus_t prstat;
- raw_size = sizeof (prstat.pr_reg);
+ size = sizeof (prstat.pr_reg);
offset = offsetof (prstatus_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
@@ -6429,7 +6686,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* 64-bit host, 32-bit corefile */
prstatus32_t prstat;
- raw_size = sizeof (prstat.pr_reg);
+ size = sizeof (prstat.pr_reg);
offset = offsetof (prstatus32_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
@@ -6459,7 +6716,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Make a ".reg/999" section and a ".reg" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
#endif /* defined (HAVE_PRSTATUS_T) */
@@ -6663,13 +6920,13 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
- sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.gregs);
+ sect->size = sizeof (lwpstat.pr_context.uc_mcontext.gregs);
sect->filepos = note->descpos
+ offsetof (lwpstatus_t, pr_context.uc_mcontext.gregs);
#endif
#if defined (HAVE_LWPSTATUS_T_PR_REG)
- sect->_raw_size = sizeof (lwpstat.pr_reg);
+ sect->size = sizeof (lwpstat.pr_reg);
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_reg);
#endif
@@ -6693,13 +6950,13 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
- sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs);
+ sect->size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs);
sect->filepos = note->descpos
+ offsetof (lwpstatus_t, pr_context.uc_mcontext.fpregs);
#endif
#if defined (HAVE_LWPSTATUS_T_PR_FPREG)
- sect->_raw_size = sizeof (lwpstat.pr_fpreg);
+ sect->size = sizeof (lwpstat.pr_fpreg);
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_fpreg);
#endif
@@ -6748,7 +7005,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = sizeof (pstatus.data.thread_info.thread_context);
+ sect->size = sizeof (pstatus.data.thread_info.thread_context);
sect->filepos = (note->descpos
+ offsetof (struct win32_pstatus,
data.thread_info.thread_context));
@@ -6776,7 +7033,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -6852,7 +7109,7 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
@@ -7005,7 +7262,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -7032,7 +7289,7 @@ elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -7443,9 +7700,18 @@ _bfd_elf_rela_local_sym (bfd *abfd,
rel->r_addend =
_bfd_merged_section_offset (abfd, psec,
elf_section_data (sec)->sec_info,
- sym->st_value + rel->r_addend,
- 0);
- sec = *psec;
+ sym->st_value + rel->r_addend);
+ if (sec != *psec)
+ {
+ /* If we have changed the section, and our original section is
+ marked with SEC_EXCLUDE, it means that the original
+ SEC_MERGE section has been completely subsumed in some
+ other SEC_MERGE section. In this case, we need to leave
+ some info around for --emit-relocs. */
+ if ((sec->flags & SEC_EXCLUDE) != 0)
+ sec->kept_section = *psec;
+ sec = *psec;
+ }
rel->r_addend -= relocation;
rel->r_addend += sec->output_section->vma + sec->output_offset;
}
@@ -7465,24 +7731,20 @@ _bfd_elf_rel_local_sym (bfd *abfd,
return _bfd_merged_section_offset (abfd, psec,
elf_section_data (sec)->sec_info,
- sym->st_value + addend, 0);
+ sym->st_value + addend);
}
bfd_vma
_bfd_elf_section_offset (bfd *abfd,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *sec,
bfd_vma offset)
{
- struct bfd_elf_section_data *sec_data;
-
- sec_data = elf_section_data (sec);
switch (sec->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
- return _bfd_stab_section_offset (abfd,
- &elf_hash_table (info)->merge_info,
- sec, &sec_data->sec_info, offset);
+ return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info,
+ offset);
case ELF_INFO_TYPE_EH_FRAME:
return _bfd_elf_eh_frame_section_offset (abfd, sec, offset);
default:
@@ -7513,3 +7775,296 @@ bfd_elf_bfd_from_remote_memory
return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory)
(templ, ehdr_vma, loadbasep, target_read_memory);
}
+
+long
+_bfd_elf_get_synthetic_symtab (bfd *abfd,
+ long symcount ATTRIBUTE_UNUSED,
+ asymbol **syms ATTRIBUTE_UNUSED,
+ long dynsymcount ATTRIBUTE_UNUSED,
+ asymbol **dynsyms,
+ asymbol **ret)
+{
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ asection *relplt;
+ asymbol *s;
+ const char *relplt_name;
+ bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
+ arelent *p;
+ long count, i, n;
+ size_t size;
+ Elf_Internal_Shdr *hdr;
+ char *names;
+ asection *plt;
+
+ if ((abfd->flags & (DYNAMIC | EXEC_P)) == 0)
+ return 0;
+
+ *ret = NULL;
+ if (!bed->plt_sym_val)
+ return 0;
+
+ relplt_name = bed->relplt_name;
+ if (relplt_name == NULL)
+ relplt_name = bed->default_use_rela_p ? ".rela.plt" : ".rel.plt";
+ relplt = bfd_get_section_by_name (abfd, relplt_name);
+ if (relplt == NULL)
+ return 0;
+
+ hdr = &elf_section_data (relplt)->this_hdr;
+ if (hdr->sh_link != elf_dynsymtab (abfd)
+ || (hdr->sh_type != SHT_REL && hdr->sh_type != SHT_RELA))
+ return 0;
+
+ plt = bfd_get_section_by_name (abfd, ".plt");
+ if (plt == NULL)
+ return 0;
+
+ slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
+ if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE))
+ return -1;
+
+ count = relplt->size / hdr->sh_entsize;
+ size = count * sizeof (asymbol);
+ p = relplt->relocation;
+ for (i = 0; i < count; i++, s++, p++)
+ size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ return -1;
+
+ names = (char *) (s + count);
+ p = relplt->relocation;
+ n = 0;
+ for (i = 0; i < count; i++, s++, p++)
+ {
+ size_t len;
+ bfd_vma addr;
+
+ addr = bed->plt_sym_val (i, plt, p);
+ if (addr == (bfd_vma) -1)
+ continue;
+
+ *s = **p->sym_ptr_ptr;
+ s->section = plt;
+ s->value = addr - plt->vma;
+ s->name = names;
+ len = strlen ((*p->sym_ptr_ptr)->name);
+ memcpy (names, (*p->sym_ptr_ptr)->name, len);
+ names += len;
+ memcpy (names, "@plt", sizeof ("@plt"));
+ names += sizeof ("@plt");
+ ++n;
+ }
+
+ return n;
+}
+
+/* Sort symbol by binding and section. We want to put definitions
+ sorted by section at the beginning. */
+
+static int
+elf_sort_elf_symbol (const void *arg1, const void *arg2)
+{
+ const Elf_Internal_Sym *s1;
+ const Elf_Internal_Sym *s2;
+ int shndx;
+
+ /* Make sure that undefined symbols are at the end. */
+ s1 = (const Elf_Internal_Sym *) arg1;
+ if (s1->st_shndx == SHN_UNDEF)
+ return 1;
+ s2 = (const Elf_Internal_Sym *) arg2;
+ if (s2->st_shndx == SHN_UNDEF)
+ return -1;
+
+ /* Sorted by section index. */
+ shndx = s1->st_shndx - s2->st_shndx;
+ if (shndx != 0)
+ return shndx;
+
+ /* Sorted by binding. */
+ return ELF_ST_BIND (s1->st_info) - ELF_ST_BIND (s2->st_info);
+}
+
+struct elf_symbol
+{
+ Elf_Internal_Sym *sym;
+ const char *name;
+};
+
+static int
+elf_sym_name_compare (const void *arg1, const void *arg2)
+{
+ const struct elf_symbol *s1 = (const struct elf_symbol *) arg1;
+ const struct elf_symbol *s2 = (const struct elf_symbol *) arg2;
+ return strcmp (s1->name, s2->name);
+}
+
+/* Check if 2 sections define the same set of local and global
+ symbols. */
+
+bfd_boolean
+bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
+{
+ bfd *bfd1, *bfd2;
+ const struct elf_backend_data *bed1, *bed2;
+ Elf_Internal_Shdr *hdr1, *hdr2;
+ bfd_size_type symcount1, symcount2;
+ Elf_Internal_Sym *isymbuf1, *isymbuf2;
+ Elf_Internal_Sym *isymstart1 = NULL, *isymstart2 = NULL, *isym;
+ Elf_Internal_Sym *isymend;
+ struct elf_symbol *symp, *symtable1 = NULL, *symtable2 = NULL;
+ bfd_size_type count1, count2, i;
+ int shndx1, shndx2;
+ bfd_boolean result;
+
+ bfd1 = sec1->owner;
+ bfd2 = sec2->owner;
+
+ /* If both are .gnu.linkonce sections, they have to have the same
+ section name. */
+ if (strncmp (sec1->name, ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0
+ && strncmp (sec2->name, ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0)
+ return strcmp (sec1->name + sizeof ".gnu.linkonce",
+ sec2->name + sizeof ".gnu.linkonce") == 0;
+
+ /* Both sections have to be in ELF. */
+ if (bfd_get_flavour (bfd1) != bfd_target_elf_flavour
+ || bfd_get_flavour (bfd2) != bfd_target_elf_flavour)
+ return FALSE;
+
+ if (elf_section_type (sec1) != elf_section_type (sec2))
+ return FALSE;
+
+ if ((elf_section_flags (sec1) & SHF_GROUP) != 0
+ && (elf_section_flags (sec2) & SHF_GROUP) != 0)
+ {
+ /* If both are members of section groups, they have to have the
+ same group name. */
+ if (strcmp (elf_group_name (sec1), elf_group_name (sec2)) != 0)
+ return FALSE;
+ }
+
+ shndx1 = _bfd_elf_section_from_bfd_section (bfd1, sec1);
+ shndx2 = _bfd_elf_section_from_bfd_section (bfd2, sec2);
+ if (shndx1 == -1 || shndx2 == -1)
+ return FALSE;
+
+ bed1 = get_elf_backend_data (bfd1);
+ bed2 = get_elf_backend_data (bfd2);
+ hdr1 = &elf_tdata (bfd1)->symtab_hdr;
+ symcount1 = hdr1->sh_size / bed1->s->sizeof_sym;
+ hdr2 = &elf_tdata (bfd2)->symtab_hdr;
+ symcount2 = hdr2->sh_size / bed2->s->sizeof_sym;
+
+ if (symcount1 == 0 || symcount2 == 0)
+ return FALSE;
+
+ isymbuf1 = bfd_elf_get_elf_syms (bfd1, hdr1, symcount1, 0,
+ NULL, NULL, NULL);
+ isymbuf2 = bfd_elf_get_elf_syms (bfd2, hdr2, symcount2, 0,
+ NULL, NULL, NULL);
+
+ result = FALSE;
+ if (isymbuf1 == NULL || isymbuf2 == NULL)
+ goto done;
+
+ /* Sort symbols by binding and section. Global definitions are at
+ the beginning. */
+ qsort (isymbuf1, symcount1, sizeof (Elf_Internal_Sym),
+ elf_sort_elf_symbol);
+ qsort (isymbuf2, symcount2, sizeof (Elf_Internal_Sym),
+ elf_sort_elf_symbol);
+
+ /* Count definitions in the section. */
+ count1 = 0;
+ for (isym = isymbuf1, isymend = isym + symcount1;
+ isym < isymend; isym++)
+ {
+ if (isym->st_shndx == (unsigned int) shndx1)
+ {
+ if (count1 == 0)
+ isymstart1 = isym;
+ count1++;
+ }
+
+ if (count1 && isym->st_shndx != (unsigned int) shndx1)
+ break;
+ }
+
+ count2 = 0;
+ for (isym = isymbuf2, isymend = isym + symcount2;
+ isym < isymend; isym++)
+ {
+ if (isym->st_shndx == (unsigned int) shndx2)
+ {
+ if (count2 == 0)
+ isymstart2 = isym;
+ count2++;
+ }
+
+ if (count2 && isym->st_shndx != (unsigned int) shndx2)
+ break;
+ }
+
+ if (count1 == 0 || count2 == 0 || count1 != count2)
+ goto done;
+
+ symtable1 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+ symtable2 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+
+ if (symtable1 == NULL || symtable2 == NULL)
+ goto done;
+
+ symp = symtable1;
+ for (isym = isymstart1, isymend = isym + count1;
+ isym < isymend; isym++)
+ {
+ symp->sym = isym;
+ symp->name = bfd_elf_string_from_elf_section (bfd1,
+ hdr1->sh_link,
+ isym->st_name);
+ symp++;
+ }
+
+ symp = symtable2;
+ for (isym = isymstart2, isymend = isym + count1;
+ isym < isymend; isym++)
+ {
+ symp->sym = isym;
+ symp->name = bfd_elf_string_from_elf_section (bfd2,
+ hdr2->sh_link,
+ isym->st_name);
+ symp++;
+ }
+
+ /* Sort symbol by name. */
+ qsort (symtable1, count1, sizeof (struct elf_symbol),
+ elf_sym_name_compare);
+ qsort (symtable2, count1, sizeof (struct elf_symbol),
+ elf_sym_name_compare);
+
+ for (i = 0; i < count1; i++)
+ /* Two symbols must have the same binding, type and name. */
+ if (symtable1 [i].sym->st_info != symtable2 [i].sym->st_info
+ || symtable1 [i].sym->st_other != symtable2 [i].sym->st_other
+ || strcmp (symtable1 [i].name, symtable2 [i].name) != 0)
+ goto done;
+
+ result = TRUE;
+
+done:
+ if (symtable1)
+ free (symtable1);
+ if (symtable2)
+ free (symtable2);
+ if (isymbuf1)
+ free (isymbuf1);
+ if (isymbuf2)
+ free (isymbuf2);
+
+ return result;
+}
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index d3f8d1f0ea5..ac3ec95be3f 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -25,92 +25,10 @@
typedef unsigned long int insn32;
typedef unsigned short int insn16;
-static bfd_boolean elf32_arm_set_private_flags
- PARAMS ((bfd *, flagword));
-static bfd_boolean elf32_arm_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf32_arm_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf32_arm_print_private_bfd_data
- PARAMS ((bfd *, PTR));
-static int elf32_arm_get_symbol_type
- PARAMS (( Elf_Internal_Sym *, int));
-static struct bfd_link_hash_table *elf32_arm_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_reloc_status_type elf32_arm_final_link_relocate
- PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *,
- const char *, int, struct elf_link_hash_entry *));
-static insn32 insert_thumb_branch
- PARAMS ((insn32, int));
-static struct elf_link_hash_entry *find_thumb_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static struct elf_link_hash_entry *find_arm_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static void elf32_arm_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-static int elf32_arm_to_thumb_stub
- PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
- bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
-static int elf32_thumb_to_arm_stub
- PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
- bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
-static bfd_boolean elf32_arm_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static asection * elf32_arm_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf32_arm_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
-static bfd_boolean elf32_arm_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean elf32_arm_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf32_arm_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean elf32_arm_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-#if USE_REL
-static void arm_add_to_rel
- PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
-#endif
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *h, PTR inf));
-static bfd_boolean create_got_section
- PARAMS ((bfd * dynobj, struct bfd_link_info * info));
-static bfd_boolean elf32_arm_create_dynamic_sections
- PARAMS ((bfd * dynobj, struct bfd_link_info * info));
-static enum elf_reloc_type_class elf32_arm_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_object_p
- PARAMS ((bfd *));
-
-#ifndef ELFARM_NABI_C_INCLUDED
-static void record_arm_to_thumb_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void record_thumb_to_arm_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- PARAMS ((struct bfd_link_info *));
-bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- PARAMS ((bfd *, struct bfd_link_info *));
-bfd_boolean bfd_elf32_arm_process_before_allocation
- PARAMS ((bfd *, struct bfd_link_info *, int, int));
-#endif
-
-
-#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
+/* In leiu of proper flags, assume all EABIv3 objects are interworkable. */
+#define INTERWORK_FLAG(abfd) \
+ (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) == EF_ARM_EABI_VER3 \
+ || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK))
/* The linker script knows the section names for placement.
The entry_names are used to do simple name mangling on the stubs.
@@ -128,18 +46,11 @@ bfd_boolean bfd_elf32_arm_process_before_allocation
#ifdef FOUR_WORD_PLT
-/* The size in bytes of the special first entry in the procedure
- linkage table. */
-#define PLT_HEADER_SIZE 16
-
-/* The size in bytes of an entry in the procedure linkage table. */
-#define PLT_ENTRY_SIZE 16
-
/* The first entry in a procedure linkage table looks like
this. It is set up so that any shared library function that is
called before the relocation has been set up calls the dynamic
linker first. */
-static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
+static const bfd_vma elf32_arm_plt0_entry [] =
{
0xe52de004, /* str lr, [sp, #-4]! */
0xe59fe010, /* ldr lr, [pc, #16] */
@@ -149,7 +60,7 @@ static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
/* Subsequent entries in a procedure linkage table look like
this. */
-static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
+static const bfd_vma elf32_arm_plt_entry [] =
{
0xe28fc600, /* add ip, pc, #NN */
0xe28cca00, /* add ip, ip, #NN */
@@ -159,18 +70,11 @@ static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
#else
-/* The size in bytes of the special first entry in the procedure
- linkage table. */
-#define PLT_HEADER_SIZE 20
-
-/* The size in bytes of an entry in the procedure linkage table. */
-#define PLT_ENTRY_SIZE 12
-
/* The first entry in a procedure linkage table looks like
this. It is set up so that any shared library function that is
called before the relocation has been set up calls the dynamic
linker first. */
-static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
+static const bfd_vma elf32_arm_plt0_entry [] =
{
0xe52de004, /* str lr, [sp, #-4]! */
0xe59fe004, /* ldr lr, [pc, #4] */
@@ -181,7 +85,7 @@ static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
/* Subsequent entries in a procedure linkage table look like
this. */
-static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
+static const bfd_vma elf32_arm_plt_entry [] =
{
0xe28fc600, /* add ip, pc, #0xNN00000 */
0xe28cca00, /* add ip, ip, #0xNN000 */
@@ -190,6 +94,14 @@ static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
#endif
+/* The entries in a PLT when using a DLL-based target with multiple
+ address spaces. */
+static const bfd_vma elf32_arm_symbian_plt_entry [] =
+ {
+ 0xe51ff004, /* ldr pr, [pc, #-4] */
+ 0x00000000, /* dcd R_ARM_GLOB_DAT(X) */
+ };
+
/* Used to build a map of a section. This is required for mixed-endian
code/data. */
@@ -241,7 +153,7 @@ struct elf32_arm_link_hash_entry
#define elf32_arm_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *))) (func), \
(info)))
/* Get the ARM elf linker hash table from a link_info structure. */
@@ -270,6 +182,19 @@ struct elf32_arm_link_hash_table
/* Nonzero to output a BE8 image. */
int byteswap_code;
+ /* Zero if R_ARM_TARGET1 means R_ARM_ABS32.
+ Nonzero if R_ARM_TARGET1 means R_ARM_ABS32. */
+ int target1_is_rel;
+
+ /* The number of bytes in the initial entry in the PLT. */
+ bfd_size_type plt_header_size;
+
+ /* The number of bytes in the subsequent PLT etries. */
+ bfd_size_type plt_entry_size;
+
+ /* True if the target system is Symbian OS. */
+ int symbian_p;
+
/* Short-cuts to get to dynamic linker sections. */
asection *sgot;
asection *sgotplt;
@@ -286,10 +211,9 @@ struct elf32_arm_link_hash_table
/* Create an entry in an ARM ELF linker hash table. */
static struct bfd_hash_entry *
-elf32_arm_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry * entry;
- struct bfd_hash_table * table;
- const char * string;
+elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
+ struct bfd_hash_table * table,
+ const char * string)
{
struct elf32_arm_link_hash_entry * ret =
(struct elf32_arm_link_hash_entry *) entry;
@@ -297,17 +221,15 @@ elf32_arm_link_hash_newfunc (entry, table, string)
/* Allocate the structure if it has not already been allocated by a
subclass. */
if (ret == (struct elf32_arm_link_hash_entry *) NULL)
- ret = ((struct elf32_arm_link_hash_entry *)
- bfd_hash_allocate (table,
- sizeof (struct elf32_arm_link_hash_entry)));
- if (ret == (struct elf32_arm_link_hash_entry *) NULL)
+ ret = bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry));
+ if (ret == NULL)
return (struct bfd_hash_entry *) ret;
/* Call the allocation method of the superclass. */
ret = ((struct elf32_arm_link_hash_entry *)
_bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
table, string));
- if (ret != (struct elf32_arm_link_hash_entry *) NULL)
+ if (ret != NULL)
ret->relocs_copied = NULL;
return (struct bfd_hash_entry *) ret;
@@ -317,16 +239,18 @@ elf32_arm_link_hash_newfunc (entry, table, string)
shortcuts to them in our hash table. */
static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
{
struct elf32_arm_link_hash_table *htab;
+ htab = elf32_arm_hash_table (info);
+ /* BPABI objects never have a GOT, or associated sections. */
+ if (htab->symbian_p)
+ return TRUE;
+
if (! _bfd_elf_create_got_section (dynobj, info))
return FALSE;
- htab = elf32_arm_hash_table (info);
htab->sgot = bfd_get_section_by_name (dynobj, ".got");
htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
if (!htab->sgot || !htab->sgotplt)
@@ -348,9 +272,7 @@ create_got_section (dynobj, info)
hash table. */
static bfd_boolean
-elf32_arm_create_dynamic_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+elf32_arm_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
{
struct elf32_arm_link_hash_table *htab;
@@ -367,7 +289,9 @@ elf32_arm_create_dynamic_sections (dynobj, info)
if (!info->shared)
htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss");
- if (!htab->splt || !htab->srelplt || !htab->sdynbss
+ if (!htab->splt
+ || !htab->srelplt
+ || !htab->sdynbss
|| (!info->shared && !htab->srelbss))
abort ();
@@ -425,17 +349,16 @@ elf32_arm_copy_indirect_symbol (const struct elf_backend_data *bed,
/* Create an ARM elf linker hash table. */
static struct bfd_link_hash_table *
-elf32_arm_link_hash_table_create (abfd)
- bfd *abfd;
+elf32_arm_link_hash_table_create (bfd *abfd)
{
struct elf32_arm_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
- ret = (struct elf32_arm_link_hash_table *) bfd_malloc (amt);
- if (ret == (struct elf32_arm_link_hash_table *) NULL)
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
return NULL;
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
+ if (!_bfd_elf_link_hash_table_init (& ret->root, abfd,
elf32_arm_link_hash_newfunc))
{
free (ret);
@@ -454,6 +377,15 @@ elf32_arm_link_hash_table_create (abfd)
ret->bfd_of_glue_owner = NULL;
ret->no_pipeline_knowledge = 0;
ret->byteswap_code = 0;
+ ret->target1_is_rel = 0;
+#ifdef FOUR_WORD_PLT
+ ret->plt_header_size = 16;
+ ret->plt_entry_size = 16;
+#else
+ ret->plt_header_size = 20;
+ ret->plt_entry_size = 12;
+#endif
+ ret->symbian_p = 0;
ret->sym_sec.abfd = NULL;
return &ret->root.root;
@@ -462,10 +394,9 @@ elf32_arm_link_hash_table_create (abfd)
/* Locate the Thumb encoded calling stub for NAME. */
static struct elf_link_hash_entry *
-find_thumb_glue (link_info, name, input_bfd)
- struct bfd_link_info *link_info;
- const char *name;
- bfd *input_bfd;
+find_thumb_glue (struct bfd_link_info *link_info,
+ const char *name,
+ bfd *input_bfd)
{
char *tmp_name;
struct elf_link_hash_entry *hash;
@@ -474,8 +405,8 @@ find_thumb_glue (link_info, name, input_bfd)
/* We need a pointer to the armelf specific hash table. */
hash_table = elf32_arm_hash_table (link_info);
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -486,8 +417,8 @@ find_thumb_glue (link_info, name, input_bfd)
if (hash == NULL)
/* xgettext:c-format */
- (*_bfd_error_handler) (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%B: unable to find THUMB glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -497,10 +428,9 @@ find_thumb_glue (link_info, name, input_bfd)
/* Locate the ARM encoded calling stub for NAME. */
static struct elf_link_hash_entry *
-find_arm_glue (link_info, name, input_bfd)
- struct bfd_link_info *link_info;
- const char *name;
- bfd *input_bfd;
+find_arm_glue (struct bfd_link_info *link_info,
+ const char *name,
+ bfd *input_bfd)
{
char *tmp_name;
struct elf_link_hash_entry *myh;
@@ -509,8 +439,8 @@ find_arm_glue (link_info, name, input_bfd)
/* We need a pointer to the elfarm specific hash table. */
hash_table = elf32_arm_hash_table (link_info);
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -521,8 +451,8 @@ find_arm_glue (link_info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- (*_bfd_error_handler) (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%B: unable to find ARM glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -566,8 +496,7 @@ static const insn32 t2a3_b_insn = 0xea000000;
#ifndef ELFARM_NABI_C_INCLUDED
bfd_boolean
-bfd_elf32_arm_allocate_interworking_sections (info)
- struct bfd_link_info * info;
+bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
{
asection * s;
bfd_byte * foo;
@@ -586,10 +515,9 @@ bfd_elf32_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->arm_glue_size);
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
- s->_raw_size = s->_cooked_size = globals->arm_glue_size;
+ s->size = globals->arm_glue_size;
s->contents = foo;
}
@@ -602,10 +530,9 @@ bfd_elf32_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->thumb_glue_size);
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
- s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
+ s->size = globals->thumb_glue_size;
s->contents = foo;
}
@@ -613,9 +540,8 @@ bfd_elf32_arm_allocate_interworking_sections (info)
}
static void
-record_arm_to_thumb_glue (link_info, h)
- struct bfd_link_info * link_info;
- struct elf_link_hash_entry * h;
+record_arm_to_thumb_glue (struct bfd_link_info * link_info,
+ struct elf_link_hash_entry * h)
{
const char * name = h->root.root.string;
asection * s;
@@ -635,8 +561,7 @@ record_arm_to_thumb_glue (link_info, h)
BFD_ASSERT (s != NULL);
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -652,9 +577,9 @@ record_arm_to_thumb_glue (link_info, h)
return;
}
- /* The only trick here is using hash_table->arm_glue_size as the value. Even
- though the section isn't allocated yet, this is where we will be putting
- it. */
+ /* The only trick here is using hash_table->arm_glue_size as the value.
+ Even though the section isn't allocated yet, this is where we will be
+ putting it. */
bh = NULL;
val = globals->arm_glue_size + 1;
_bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
@@ -669,9 +594,8 @@ record_arm_to_thumb_glue (link_info, h)
}
static void
-record_thumb_to_arm_glue (link_info, h)
- struct bfd_link_info *link_info;
- struct elf_link_hash_entry *h;
+record_thumb_to_arm_glue (struct bfd_link_info *link_info,
+ struct elf_link_hash_entry *h)
{
const char *name = h->root.root.string;
asection *s;
@@ -692,8 +616,8 @@ record_thumb_to_arm_glue (link_info, h)
BFD_ASSERT (s != NULL);
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -726,8 +650,8 @@ record_thumb_to_arm_glue (link_info, h)
#define BACK_FROM_ARM "__%s_back_from_arm"
/* Allocate another symbol to mark where we switch to Arm mode. */
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (CHANGE_TO_ARM) + 1);
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (CHANGE_TO_ARM) + 1);
BFD_ASSERT (tmp_name);
@@ -750,9 +674,8 @@ record_thumb_to_arm_glue (link_info, h)
linker scripts in ld/emultempl/{armelf}.em. */
bfd_boolean
-bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
+ struct bfd_link_info *info)
{
flagword flags;
asection *sec;
@@ -787,7 +710,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
if (sec == NULL)
{
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY;
sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME);
@@ -807,9 +731,7 @@ bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
{armelf/pe}.em */
bfd_boolean
-bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info)
{
struct elf32_arm_link_hash_table *globals;
@@ -832,13 +754,11 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
}
bfd_boolean
-bfd_elf32_arm_process_before_allocation (abfd, link_info,
- no_pipeline_knowledge,
- byteswap_code)
- bfd *abfd;
- struct bfd_link_info *link_info;
- int no_pipeline_knowledge;
- int byteswap_code;
+bfd_elf32_arm_process_before_allocation (bfd *abfd,
+ struct bfd_link_info *link_info,
+ int no_pipeline_knowledge,
+ int byteswap_code,
+ int target1_is_rel)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs = NULL;
@@ -861,11 +781,11 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info,
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
globals->no_pipeline_knowledge = no_pipeline_knowledge;
+ globals->target1_is_rel = target1_is_rel;
if (byteswap_code && !bfd_big_endian (abfd))
{
- _bfd_error_handler (
- _("%s: BE8 images only valid in big-endian mode."),
- bfd_archive_filename (abfd));
+ _bfd_error_handler (_("%B: BE8 images only valid in big-endian mode."),
+ abfd);
return FALSE;
}
globals->byteswap_code = byteswap_code;
@@ -885,7 +805,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info,
/* Load the relocs. */
internal_relocs
- = _bfd_elf_link_read_relocs (abfd, sec, (PTR) NULL,
+ = _bfd_elf_link_read_relocs (abfd, sec, (void *) NULL,
(Elf_Internal_Rela *) NULL, FALSE);
if (internal_relocs == NULL)
@@ -916,12 +836,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info,
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (! bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -1023,9 +938,7 @@ error_return:
#define HI_LOW_ORDER 0xF000F800
static insn32
-insert_thumb_branch (br_insn, rel_off)
- insn32 br_insn;
- int rel_off;
+insert_thumb_branch (insn32 br_insn, int rel_off)
{
unsigned int low_bits;
unsigned int high_bits;
@@ -1042,7 +955,7 @@ insert_thumb_branch (br_insn, rel_off)
br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits;
else
/* FIXME: abort is probably not the right call. krk@cygnus.com */
- abort (); /* error - not a valid branch instruction form. */
+ abort (); /* Error - not a valid branch instruction form. */
return br_insn;
}
@@ -1050,18 +963,16 @@ insert_thumb_branch (br_insn, rel_off)
/* Thumb code calling an ARM function. */
static int
-elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, offset, addend, val)
- struct bfd_link_info * info;
- const char * name;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * hit_data;
- asection * sym_sec;
- bfd_vma offset;
- bfd_signed_vma addend;
- bfd_vma val;
+elf32_thumb_to_arm_stub (struct bfd_link_info * info,
+ const char * name,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * hit_data,
+ asection * sym_sec,
+ bfd_vma offset,
+ bfd_signed_vma addend,
+ bfd_vma val)
{
asection * s = 0;
bfd_vma my_offset;
@@ -1095,11 +1006,9 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
&& !INTERWORK_FLAG (sym_sec->owner))
{
(*_bfd_error_handler)
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (sym_sec->owner), name);
- (*_bfd_error_handler)
- (_(" first occurrence: %s: thumb call to arm"),
- bfd_archive_filename (input_bfd));
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: thumb call to arm"),
+ sym_sec->owner, input_bfd, name);
return FALSE;
}
@@ -1117,7 +1026,8 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
/* Address of destination of the stub. */
((bfd_signed_vma) val)
- ((bfd_signed_vma)
- /* Offset from the start of the current section to the start of the stubs. */
+ /* Offset from the start of the current section
+ to the start of the stubs. */
(s->output_offset
/* Offset of the start of this stub from the start of the stubs. */
+ my_offset
@@ -1140,7 +1050,8 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
/* Address of where the stub is located. */
(s->output_section->vma + s->output_offset + my_offset)
/* Address of where the BL is located. */
- - (input_section->output_section->vma + input_section->output_offset + offset)
+ - (input_section->output_section->vma + input_section->output_offset
+ + offset)
/* Addend in the relocation. */
- addend
/* Biassing for PC-relative addressing. */
@@ -1159,18 +1070,16 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
/* Arm code calling a Thumb function. */
static int
-elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, offset, addend, val)
- struct bfd_link_info * info;
- const char * name;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * hit_data;
- asection * sym_sec;
- bfd_vma offset;
- bfd_signed_vma addend;
- bfd_vma val;
+elf32_arm_to_thumb_stub (struct bfd_link_info * info,
+ const char * name,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * hit_data,
+ asection * sym_sec,
+ bfd_vma offset,
+ bfd_signed_vma addend,
+ bfd_vma val)
{
unsigned long int tmp;
bfd_vma my_offset;
@@ -1202,11 +1111,9 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
&& !INTERWORK_FLAG (sym_sec->owner))
{
(*_bfd_error_handler)
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (sym_sec->owner), name);
- (*_bfd_error_handler)
- (_(" first occurrence: %s: arm call to thumb"),
- bfd_archive_filename (input_bfd));
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: arm call to thumb"),
+ sym_sec->owner, input_bfd, name);
}
--my_offset;
@@ -1247,21 +1154,18 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
-elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, rel, value,
- info, sym_sec, sym_name, sym_flags, h)
- reloc_howto_type * howto;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * contents;
- Elf_Internal_Rela * rel;
- bfd_vma value;
- struct bfd_link_info * info;
- asection * sym_sec;
- const char * sym_name;
- int sym_flags;
- struct elf_link_hash_entry * h;
+elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * rel,
+ bfd_vma value,
+ struct bfd_link_info * info,
+ asection * sym_sec,
+ const char * sym_name,
+ int sym_flags,
+ struct elf_link_hash_entry * h)
{
unsigned long r_type = howto->type;
unsigned long r_symndx;
@@ -1277,6 +1181,22 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
bfd_signed_vma signed_addend;
struct elf32_arm_link_hash_table * globals;
+ globals = elf32_arm_hash_table (info);
+
+#ifndef OLD_ARM_ABI
+ /* Some relocation type map to different relocations depending on the
+ target. We pick the right one here. */
+ if (r_type == R_ARM_TARGET1)
+ {
+ if (globals->target1_is_rel)
+ r_type = R_ARM_REL32;
+ else
+ r_type = R_ARM_ABS32;
+
+ howto = &elf32_arm_howto_table[r_type];
+ }
+#endif /* OLD_ARM_ABI */
+
/* If the start address has been set, then set the EF_ARM_HASENTRY
flag. Setting this more than once is redundant, but the cost is
not too high, and it keeps the code simple.
@@ -1289,8 +1209,6 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
if (bfd_get_start_address (output_bfd) != 0)
elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
- globals = elf32_arm_hash_table (info);
-
dynobj = elf_hash_table (info)->dynobj;
if (dynobj)
{
@@ -1361,6 +1279,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
into the output file to be resolved at run time. */
if (info->shared
&& (input_section->flags & SEC_ALLOC)
+ && (r_type != R_ARM_REL32
+ || !SYMBOL_CALLS_LOCAL (info, h))
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
@@ -1448,10 +1368,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags != STT_ARM_TFUNC)
- (*_bfd_error_handler) (_("\
-%s: Warning: Arm BLX instruction targets Arm function '%s'."),
- bfd_archive_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ (*_bfd_error_handler)
+ (_("\%B: Warning: Arm BLX instruction targets Arm function '%s'."),
+ input_bfd,
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1459,8 +1379,9 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* Check for Arm calling Thumb function. */
if (sym_flags == STT_ARM_TFUNC)
{
- elf32_arm_to_thumb_stub (info, sym_name, input_bfd, output_bfd,
- input_section, hit_data, sym_sec, rel->r_offset,
+ elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
+ output_bfd, input_section,
+ hit_data, sym_sec, rel->r_offset,
signed_addend, value);
return bfd_reloc_ok;
}
@@ -1488,8 +1409,9 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
A is the addend (extracted from the instruction) in bytes.
S is held in 'value'.
- P is the base address of the section containing the instruction
- plus the offset of the reloc into that section, ie:
+ P is the base address of the section containing the
+ instruction plus the offset of the reloc into that
+ section, ie:
(input_section->output_section->vma +
input_section->output_offset +
rel->r_offset).
@@ -1497,18 +1419,19 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
(signed_addend * 4)
Note: None of these operations have knowledge of the pipeline
- size of the processor, thus it is up to the assembler to encode
- this information into the addend. */
+ size of the processor, thus it is up to the assembler to
+ encode this information into the addend. */
value -= (input_section->output_section->vma
+ input_section->output_offset);
value -= rel->r_offset;
value += (signed_addend << howto->size);
- /* Previous versions of this code also used to add in the pipeline
- offset here. This is wrong because the linker is not supposed
- to know about such things, and one day it might change. In order
- to support old binaries that need the old behaviour however, so
- we attempt to detect which ABI was used to create the reloc. */
+ /* Previous versions of this code also used to add in the
+ pipeline offset here. This is wrong because the linker is
+ not supposed to know about such things, and one day it might
+ change. In order to support old binaries that need the old
+ behaviour however, so we attempt to detect which ABI was
+ used to create the reloc. */
if (! globals->no_pipeline_knowledge)
{
Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */
@@ -1644,10 +1567,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags == STT_ARM_TFUNC)
- (*_bfd_error_handler) (_("\
-%s: Warning: Thumb BLX instruction targets thumb function '%s'."),
- bfd_archive_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ (*_bfd_error_handler)
+ (_("%B: Warning: Thumb BLX instruction targets thumb function '%s'."),
+ input_bfd,
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1767,6 +1690,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
return bfd_reloc_ok;
}
+#ifndef OLD_ARM_ABI
case R_ARM_ALU_PCREL7_0:
case R_ARM_ALU_PCREL15_8:
case R_ARM_ALU_PCREL23_15:
@@ -1791,6 +1715,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
bfd_put_32 (input_bfd, value, hit_data);
}
return bfd_reloc_ok;
+#endif
case R_ARM_GNU_VTINHERIT:
case R_ARM_GNU_VTENTRY:
@@ -1970,11 +1895,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
#if USE_REL
/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
static void
-arm_add_to_rel (abfd, address, howto, increment)
- bfd * abfd;
- bfd_byte * address;
- reloc_howto_type * howto;
- bfd_signed_vma increment;
+arm_add_to_rel (bfd * abfd,
+ bfd_byte * address,
+ reloc_howto_type * howto,
+ bfd_signed_vma increment)
{
bfd_signed_vma addend;
@@ -2042,16 +1966,14 @@ arm_add_to_rel (abfd, address, howto, increment)
/* Relocate an ARM ELF section. */
static bfd_boolean
-elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf32_arm_relocate_section (bfd * output_bfd,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * relocs,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2137,9 +2059,8 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (howto->rightshift)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+ input_bfd, input_section,
(long) rel->r_offset, howto->name);
return FALSE;
}
@@ -2177,7 +2098,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
unresolved_reloc, warned);
-
+
if (unresolved_reloc || relocation != 0)
{
/* In these cases, we don't need the relocation value.
@@ -2188,6 +2109,8 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ARM_PC24:
case R_ARM_ABS32:
case R_ARM_THM_PC22:
+ case R_ARM_PLT32:
+
if (info->shared
&& (
(!info->symbolic && h->dynindx != -1)
@@ -2221,19 +2144,13 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
break;
- case R_ARM_PLT32:
- if (h->plt.offset != (bfd_vma)-1)
- relocation = 0;
- break;
-
default:
if (unresolved_reloc)
_bfd_error_handler
- (_("%s: warning: unresolvable relocation %d against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
+ (_("%B(%A): warning: unresolvable relocation %d against symbol `%s'"),
+ input_bfd, input_section,
r_type,
- h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ h->root.root.string);
break;
}
}
@@ -2312,11 +2229,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
/* Set the right machine number. */
static bfd_boolean
-elf32_arm_object_p (abfd)
- bfd *abfd;
+elf32_arm_object_p (bfd *abfd)
{
unsigned int mach;
-
+
mach = bfd_arm_get_mach_from_notes (abfd, ARM_NOTE_SECTION);
if (mach != bfd_mach_arm_unknown)
@@ -2333,9 +2249,7 @@ elf32_arm_object_p (abfd)
/* Function to keep ARM specific flags in the ELF header. */
static bfd_boolean
-elf32_arm_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+elf32_arm_set_private_flags (bfd *abfd, flagword flags)
{
if (elf_flags_init (abfd)
&& elf_elfheader (abfd)->e_flags != flags)
@@ -2343,13 +2257,13 @@ elf32_arm_set_private_flags (abfd, flags)
if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
{
if (flags & EF_ARM_INTERWORK)
- (*_bfd_error_handler) (_("\
-Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
- bfd_archive_filename (abfd));
+ (*_bfd_error_handler)
+ (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
+ abfd);
else
- _bfd_error_handler (_("\
-Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_archive_filename (abfd));
+ _bfd_error_handler
+ (_("Warning: Clearing the interworking flag of %B due to outside request"),
+ abfd);
}
}
else
@@ -2364,9 +2278,7 @@ Warning: Clearing the interworking flag of %s due to outside request"),
/* Copy backend specific data from one object module to another. */
static bfd_boolean
-elf32_arm_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
flagword in_flags;
flagword out_flags;
@@ -2395,10 +2307,9 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
{
if (out_flags & EF_ARM_INTERWORK)
- _bfd_error_handler (_("\
-Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
- bfd_get_filename (obfd),
- bfd_archive_filename (ibfd));
+ _bfd_error_handler
+ (_("Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"),
+ obfd, ibfd);
in_flags &= ~EF_ARM_INTERWORK;
}
@@ -2418,9 +2329,7 @@ Warning: Clearing the interworking flag of %s because non-interworking code in %
object file when linking. */
static bfd_boolean
-elf32_arm_merge_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
{
flagword out_flags;
flagword in_flags;
@@ -2513,12 +2422,11 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
/* Complain about various flag mismatches. */
if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
{
- _bfd_error_handler (_("\
-ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"),
- bfd_archive_filename (ibfd),
- (in_flags & EF_ARM_EABIMASK) >> 24,
- bfd_get_filename (obfd),
- (out_flags & EF_ARM_EABIMASK) >> 24);
+ _bfd_error_handler
+ (_("ERROR: %B is compiled for EABI version %d, whereas %B is compiled for version %d"),
+ ibfd, obfd,
+ (in_flags & EF_ARM_EABIMASK) >> 24,
+ (out_flags & EF_ARM_EABIMASK) >> 24);
return FALSE;
}
@@ -2527,27 +2435,24 @@ ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d
{
if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
{
- _bfd_error_handler (_("\
-ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"),
- bfd_archive_filename (ibfd),
- in_flags & EF_ARM_APCS_26 ? 26 : 32,
- bfd_get_filename (obfd),
- out_flags & EF_ARM_APCS_26 ? 26 : 32);
+ _bfd_error_handler
+ (_("ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"),
+ ibfd, obfd,
+ in_flags & EF_ARM_APCS_26 ? 26 : 32,
+ out_flags & EF_ARM_APCS_26 ? 26 : 32);
flags_compatible = FALSE;
}
if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
{
if (in_flags & EF_ARM_APCS_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers"),
+ ibfd, obfd);
else
- _bfd_error_handler (_("\
-ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers"),
+ ibfd, obfd);
flags_compatible = FALSE;
}
@@ -2555,15 +2460,13 @@ ERROR: %s passes floats in integer registers, whereas %s passes them in float re
if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT))
{
if (in_flags & EF_ARM_VFP_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses VFP instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B uses VFP instructions, whereas %B does not"),
+ ibfd, obfd);
else
- _bfd_error_handler (_("\
-ERROR: %s uses FPA instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B uses FPA instructions, whereas %B does not"),
+ ibfd, obfd);
flags_compatible = FALSE;
}
@@ -2571,15 +2474,13 @@ ERROR: %s uses FPA instructions, whereas %s does not"),
if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT))
{
if (in_flags & EF_ARM_MAVERICK_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses Maverick instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B uses Maverick instructions, whereas %B does not"),
+ ibfd, obfd);
else
- _bfd_error_handler (_("\
-ERROR: %s does not use Maverick instructions, whereas %s does"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B does not use Maverick instructions, whereas %B does"),
+ ibfd, obfd);
flags_compatible = FALSE;
}
@@ -2596,15 +2497,13 @@ ERROR: %s does not use Maverick instructions, whereas %s does"),
|| (in_flags & EF_ARM_VFP_FLOAT) == 0)
{
if (in_flags & EF_ARM_SOFT_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses software FP, whereas %s uses hardware FP"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B uses software FP, whereas %B uses hardware FP"),
+ ibfd, obfd);
else
- _bfd_error_handler (_("\
-ERROR: %s uses hardware FP, whereas %s uses software FP"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("ERROR: %B uses hardware FP, whereas %B uses software FP"),
+ ibfd, obfd);
flags_compatible = FALSE;
}
@@ -2616,17 +2515,15 @@ ERROR: %s uses hardware FP, whereas %s uses software FP"),
{
if (in_flags & EF_ARM_INTERWORK)
{
- _bfd_error_handler (_("\
-Warning: %s supports interworking, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("Warning: %B supports interworking, whereas %B does not"),
+ ibfd, obfd);
}
else
{
- _bfd_error_handler (_("\
-Warning: %s does not support interworking, whereas %s does"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler
+ (_("Warning: %B does not support interworking, whereas %B does"),
+ ibfd, obfd);
}
}
}
@@ -2637,9 +2534,7 @@ Warning: %s does not support interworking, whereas %s does"),
/* Display the flags field. */
static bfd_boolean
-elf32_arm_print_private_bfd_data (abfd, ptr)
- bfd *abfd;
- PTR ptr;
+elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr)
{
FILE * file = (FILE *) ptr;
unsigned long flags;
@@ -2763,9 +2658,7 @@ elf32_arm_print_private_bfd_data (abfd, ptr)
}
static int
-elf32_arm_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym * elf_sym;
- int type;
+elf32_arm_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
{
switch (ELF_ST_TYPE (elf_sym->st_info))
{
@@ -2789,12 +2682,11 @@ elf32_arm_get_symbol_type (elf_sym, type)
}
static asection *
-elf32_arm_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf32_arm_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
if (h != NULL)
{
@@ -2828,11 +2720,10 @@ elf32_arm_gc_mark_hook (sec, info, rel, h, sym)
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+elf32_arm_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2868,6 +2759,7 @@ elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
case R_ARM_ABS32:
case R_ARM_REL32:
+ case R_ARM_TARGET1:
case R_ARM_PC24:
case R_ARM_PLT32:
r_symndx = ELF32_R_SYM (rel->r_info);
@@ -2883,7 +2775,8 @@ elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
h->plt.refcount -= 1;
if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
- || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
+ || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
+ || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1)
{
eh = (struct elf32_arm_link_hash_entry *) h;
@@ -2910,11 +2803,8 @@ elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
/* Look through the relocs for a section during the first phase. */
static bfd_boolean
-elf32_arm_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2974,9 +2864,8 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
bfd_size_type size;
size = symtab_hdr->sh_info;
- size *= (sizeof (bfd_signed_vma) + sizeof(char));
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
+ size *= (sizeof (bfd_signed_vma) + sizeof (char));
+ local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -2998,6 +2887,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
case R_ARM_ABS32:
case R_ARM_REL32:
+ case R_ARM_TARGET1:
case R_ARM_PC24:
case R_ARM_PLT32:
if (h != NULL)
@@ -3039,7 +2929,9 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
if (info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& ((ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
- && ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32)
+ && ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32
+ && ELF32_R_TYPE (rel->r_info) != R_ARM_REL32
+ && ELF32_R_TYPE (rel->r_info) != R_ARM_TARGET1)
|| (h != NULL
&& (! info->symbolic
|| (h->elf_link_hash_flags
@@ -3073,7 +2965,10 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
| SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
+ if ((sec->flags & SEC_ALLOC) != 0
+ /* BPABI objects never have dynamic
+ relocations mapped. */
+ && !htab->symbian_p)
flags |= SEC_ALLOC | SEC_LOAD;
if (sreloc == NULL
|| ! bfd_set_section_flags (dynobj, sreloc, flags)
@@ -3095,21 +2990,22 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
/* Track dynamic relocs needed for local syms too.
We really need local syms available to do this
easily. Oh well. */
-
+
asection *s;
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (s == NULL)
return FALSE;
-
+
head = ((struct elf32_arm_relocs_copied **)
&elf_section_data (s)->local_dynrel);
}
-
+
p = *head;
if (p == NULL || p->section != sec)
{
bfd_size_type amt = sizeof *p;
+
p = bfd_alloc (htab->root.dynobj, amt);
if (p == NULL)
return FALSE;
@@ -3118,9 +3014,10 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
p->section = sec;
p->count = 0;
}
-
+
if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
- || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
+ || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
+ || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1)
p->count += 1;
}
break;
@@ -3144,48 +3041,31 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
return TRUE;
}
-/* Find the nearest line to a particular section and offset, for error
- reporting. This code is a duplicate of the code in elf.c, except
- that it also accepts STT_ARM_TFUNC as a symbol that names a function. */
-
static bfd_boolean
-elf32_arm_find_nearest_line
- (abfd, section, symbols, offset, filename_ptr, functionname_ptr, line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *line_ptr;
+is_arm_mapping_symbol_name (const char * name)
{
- bfd_boolean found;
- const char *filename;
- asymbol *func;
- bfd_vma low_func;
- asymbol **p;
-
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr, 0,
- &elf_tdata (abfd)->dwarf2_find_line_info))
- return TRUE;
-
- if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
- &found, filename_ptr,
- functionname_ptr, line_ptr,
- &elf_tdata (abfd)->line_info))
- return FALSE;
-
- if (found)
- return TRUE;
+ return (name != NULL)
+ && (name[0] == '$')
+ && ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd'))
+ && (name[2] == 0);
+}
- if (symbols == NULL)
- return FALSE;
+/* This is a copy of elf_find_function() from elf.c except that
+ ARM mapping symbols are ignored when looking for function names
+ and STT_ARM_TFUNC is considered to a function type. */
- filename = NULL;
- func = NULL;
- low_func = 0;
+static bfd_boolean
+arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * section,
+ asymbol ** symbols,
+ bfd_vma offset,
+ const char ** filename_ptr,
+ const char ** functionname_ptr)
+{
+ const char * filename = NULL;
+ asymbol * func = NULL;
+ bfd_vma low_func = 0;
+ asymbol ** p;
for (p = symbols; *p != NULL; p++)
{
@@ -3203,9 +3083,14 @@ elf32_arm_find_nearest_line
case STT_FILE:
filename = bfd_asymbol_name (&q->symbol);
break;
- case STT_NOTYPE:
case STT_FUNC:
case STT_ARM_TFUNC:
+ /* Skip $a and $t symbols. */
+ if ((q->symbol.flags & BSF_LOCAL)
+ && is_arm_mapping_symbol_name (q->symbol.name))
+ continue;
+ /* Fall through. */
+ case STT_NOTYPE:
if (q->symbol.section == section
&& q->symbol.value >= low_func
&& q->symbol.value <= offset)
@@ -3220,10 +3105,62 @@ elf32_arm_find_nearest_line
if (func == NULL)
return FALSE;
- *filename_ptr = filename;
- *functionname_ptr = bfd_asymbol_name (func);
- *line_ptr = 0;
+ if (filename_ptr)
+ *filename_ptr = filename;
+ if (functionname_ptr)
+ *functionname_ptr = bfd_asymbol_name (func);
+
+ return TRUE;
+}
+
+/* Find the nearest line to a particular section and offset, for error
+ reporting. This code is a duplicate of the code in elf.c, except
+ that it uses arm_elf_find_function. */
+
+static bfd_boolean
+elf32_arm_find_nearest_line (bfd * abfd,
+ asection * section,
+ asymbol ** symbols,
+ bfd_vma offset,
+ const char ** filename_ptr,
+ const char ** functionname_ptr,
+ unsigned int * line_ptr)
+{
+ bfd_boolean found = FALSE;
+
+ /* We skip _bfd_dwarf1_find_nearest_line since no known ARM toolchain uses it. */
+
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0,
+ & elf_tdata (abfd)->dwarf2_find_line_info))
+ {
+ if (!*functionname_ptr)
+ arm_elf_find_function (abfd, section, symbols, offset,
+ *filename_ptr ? NULL : filename_ptr,
+ functionname_ptr);
+
+ return TRUE;
+ }
+
+ if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
+ & found, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->line_info))
+ return FALSE;
+
+ if (found && (*functionname_ptr || *line_ptr))
+ return TRUE;
+
+ if (symbols == NULL)
+ return FALSE;
+
+ if (! arm_elf_find_function (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr))
+ return FALSE;
+
+ *line_ptr = 0;
return TRUE;
}
@@ -3234,9 +3171,8 @@ elf32_arm_find_nearest_line
understand. */
static bfd_boolean
-elf32_arm_adjust_dynamic_symbol (info, h)
- struct bfd_link_info * info;
- struct elf_link_hash_entry * h;
+elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
+ struct elf_link_hash_entry * h)
{
bfd * dynobj;
asection * s;
@@ -3329,7 +3265,7 @@ elf32_arm_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rel.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rel);
+ srel->size += sizeof (Elf32_External_Rel);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -3340,8 +3276,7 @@ elf32_arm_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -3350,10 +3285,10 @@ elf32_arm_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -3362,9 +3297,7 @@ elf32_arm_adjust_dynamic_symbol (info, h)
dynamic relocs. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
{
struct bfd_link_info *info;
struct elf32_arm_link_hash_table *htab;
@@ -3402,10 +3335,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_HEADER_SIZE;
+ if (s->size == 0)
+ s->size += htab->plt_header_size;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -3420,14 +3353,15 @@ allocate_dynrelocs (h, inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += htab->plt_entry_size;
- /* We also need to make an entry in the .got.plt section, which
- will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
+ if (!htab->symbian_p)
+ /* We also need to make an entry in the .got.plt section, which
+ will be placed in the .got section by the linker script. */
+ htab->sgotplt->size += 4;
/* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelplt->size += sizeof (Elf32_External_Rel);
}
else
{
@@ -3455,15 +3389,18 @@ allocate_dynrelocs (h, inf)
return FALSE;
}
- s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
- dyn = htab->root.dynamic_sections_created;
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
- && (info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ if (!htab->symbian_p)
+ {
+ s = htab->sgot;
+ h->got.offset = s->size;
+ s->size += 4;
+ dyn = htab->root.dynamic_sections_created;
+ if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
+ && (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
+ }
}
else
h->got.offset = (bfd_vma) -1;
@@ -3523,7 +3460,7 @@ allocate_dynrelocs (h, inf)
for (p = eh->relocs_copied; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->section)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ sreloc->size += p->count * sizeof (Elf32_External_Rel);
}
return TRUE;
@@ -3532,9 +3469,8 @@ allocate_dynrelocs (h, inf)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf32_arm_size_dynamic_sections (output_bfd, info)
- bfd * output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info * info;
+elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info)
{
bfd * dynobj;
asection * s;
@@ -3554,7 +3490,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -3593,7 +3529,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srel = elf_section_data (p->section)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ srel->size += p->count * sizeof (Elf32_External_Rel);
if ((p->section->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -3613,10 +3549,10 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
+ *local_got = s->size;
+ s->size += 4;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rel);
+ srel->size += sizeof (Elf32_External_Rel);
}
else
*local_got = (bfd_vma) -1;
@@ -3625,7 +3561,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
+ elf_link_hash_traverse (& htab->root, allocate_dynrelocs, info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -3648,7 +3584,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -3662,7 +3598,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rel", 4) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rel.bss and
@@ -3700,8 +3636,8 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -3754,26 +3690,22 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
dynamic sections here. */
static bfd_boolean
-elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd * output_bfd;
- struct bfd_link_info * info;
- struct elf_link_hash_entry * h;
- Elf_Internal_Sym * sym;
+elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
+ struct elf_link_hash_entry * h, Elf_Internal_Sym * sym)
{
bfd * dynobj;
+ struct elf32_arm_link_hash_table *htab;
dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_arm_hash_table (info);
if (h->plt.offset != (bfd_vma) -1)
{
asection * splt;
- asection * sgot;
asection * srel;
+ bfd_byte *loc;
bfd_vma plt_index;
- bfd_vma got_offset;
Elf_Internal_Rela rel;
- bfd_byte *loc;
- bfd_vma got_displacement;
/* This symbol has an entry in the procedure linkage table. Set
it up. */
@@ -3781,56 +3713,80 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1);
splt = bfd_get_section_by_name (dynobj, ".plt");
- sgot = bfd_get_section_by_name (dynobj, ".got.plt");
srel = bfd_get_section_by_name (dynobj, ".rel.plt");
- BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
+ BFD_ASSERT (splt != NULL && srel != NULL);
/* Get the index in the procedure linkage table which
corresponds to this symbol. This is the index of this symbol
in all the symbols for which we are making plt entries. The
first entry in the procedure linkage table is reserved. */
- plt_index = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+ plt_index = ((h->plt.offset - htab->plt_header_size)
+ / htab->plt_entry_size);
- /* Get the offset into the .got table of the entry that
- corresponds to this function. Each .got entry is 4 bytes.
- The first three are reserved. */
- got_offset = (plt_index + 3) * 4;
+ /* Fill in the entry in the procedure linkage table. */
+ if (htab->symbian_p)
+ {
+ unsigned i;
+ for (i = 0; i < htab->plt_entry_size / 4; ++i)
+ bfd_put_32 (output_bfd,
+ elf32_arm_symbian_plt_entry[i],
+ splt->contents + h->plt.offset + 4 * i);
+
+ /* Fill in the entry in the .rel.plt section. */
+ rel.r_offset = (splt->output_offset
+ + h->plt.offset + 4 * (i - 1));
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
+ }
+ else
+ {
+ bfd_vma got_offset;
+ bfd_vma got_displacement;
+ asection * sgot;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgot != NULL);
- /* Calculate the displacement between the PLT slot and the
- entry in the GOT. */
- got_displacement = (sgot->output_section->vma
- + sgot->output_offset
- + got_offset
- - splt->output_section->vma
- - splt->output_offset
- - h->plt.offset
- - 8);
+ /* Get the offset into the .got table of the entry that
+ corresponds to this function. Each .got entry is 4 bytes.
+ The first three are reserved. */
+ got_offset = (plt_index + 3) * 4;
- BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
+ /* Calculate the displacement between the PLT slot and the
+ entry in the GOT. */
+ got_displacement = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset
+ - splt->output_section->vma
+ - splt->output_offset
+ - h->plt.offset
+ - 8);
- /* Fill in the entry in the procedure linkage table. */
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[0] | ((got_displacement & 0x0ff00000) >> 20),
- splt->contents + h->plt.offset + 0);
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[1] | ((got_displacement & 0x000ff000) >> 12),
- splt->contents + h->plt.offset + 4);
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[2] | (got_displacement & 0x00000fff),
- splt->contents + h->plt.offset + 8);
+ BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
+
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[0] | ((got_displacement & 0x0ff00000) >> 20),
+ splt->contents + h->plt.offset + 0);
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[1] | ((got_displacement & 0x000ff000) >> 12),
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[2] | (got_displacement & 0x00000fff),
+ splt->contents + h->plt.offset + 8);
#ifdef FOUR_WORD_PLT
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[3],
- splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[3],
+ splt->contents + h->plt.offset + 12);
#endif
- /* Fill in the entry in the global offset table. */
- bfd_put_32 (output_bfd,
- (splt->output_section->vma
- + splt->output_offset),
- sgot->contents + got_offset);
-
- /* Fill in the entry in the .rel.plt section. */
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + got_offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
+ /* Fill in the entry in the global offset table. */
+ bfd_put_32 (output_bfd,
+ (splt->output_section->vma
+ + splt->output_offset),
+ sgot->contents + got_offset);
+
+ /* Fill in the entry in the .rel.plt section. */
+ rel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
+ }
+
loc = srel->contents + plt_index * sizeof (Elf32_External_Rel);
bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
@@ -3922,9 +3878,7 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Finish up the dynamic sections. */
static bfd_boolean
-elf32_arm_finish_dynamic_sections (output_bfd, info)
- bfd * output_bfd;
- struct bfd_link_info * info;
+elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info)
{
bfd * dynobj;
asection * sgot;
@@ -3933,19 +3887,21 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
dynobj = elf_hash_table (info)->dynobj;
sgot = bfd_get_section_by_name (dynobj, ".got.plt");
- BFD_ASSERT (sgot != NULL);
+ BFD_ASSERT (elf32_arm_hash_table (info)->symbian_p || sgot != NULL);
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
{
asection *splt;
Elf32_External_Dyn *dyncon, *dynconend;
+ struct elf32_arm_link_hash_table *htab;
+ htab = elf32_arm_hash_table (info);
splt = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
@@ -3957,9 +3913,21 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
switch (dyn.d_tag)
{
+ unsigned int type;
+
default:
break;
+ case DT_HASH:
+ name = ".hash";
+ goto get_vma_if_bpabi;
+ case DT_STRTAB:
+ name = ".dynstr";
+ goto get_vma_if_bpabi;
+ case DT_SYMTAB:
+ name = ".dynsym";
+ goto get_vma_if_bpabi;
+
case DT_PLTGOT:
name = ".got";
goto get_vma;
@@ -3968,39 +3936,81 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
get_vma:
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma;
+ if (!htab->symbian_p)
+ dyn.d_un.d_ptr = s->vma;
+ else
+ /* In the BPABI, tags in the PT_DYNAMIC section point
+ at the file offset, not the memory address, for the
+ convenience of the post linker. */
+ dyn.d_un.d_ptr = s->filepos;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
+ get_vma_if_bpabi:
+ if (htab->symbian_p)
+ goto get_vma;
+ break;
+
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rel.plt");
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
-
+
case DT_RELSZ:
- /* My reading of the SVR4 ABI indicates that the
- procedure linkage table relocs (DT_JMPREL) should be
- included in the overall relocs (DT_REL). This is
- what Solaris does. However, UnixWare can not handle
- that case. Therefore, we override the DT_RELSZ entry
- here to make it not include the JMPREL relocs. Since
- the linker script arranges for .rel.plt to follow all
- other relocation sections, we don't have to worry
- about changing the DT_REL entry. */
- s = bfd_get_section_by_name (output_bfd, ".rel.plt");
- if (s != NULL)
+ if (!htab->symbian_p)
{
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ /* My reading of the SVR4 ABI indicates that the
+ procedure linkage table relocs (DT_JMPREL) should be
+ included in the overall relocs (DT_REL). This is
+ what Solaris does. However, UnixWare can not handle
+ that case. Therefore, we override the DT_RELSZ entry
+ here to make it not include the JMPREL relocs. Since
+ the linker script arranges for .rel.plt to follow all
+ other relocation sections, we don't have to worry
+ about changing the DT_REL entry. */
+ s = bfd_get_section_by_name (output_bfd, ".rel.plt");
+ if (s != NULL)
+ dyn.d_un.d_val -= s->size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+ }
+ /* Fall through */
+
+ case DT_REL:
+ case DT_RELA:
+ case DT_RELASZ:
+ /* In the BPABI, the DT_REL tag must point at the file
+ offset, not the VMA, of the first relocation
+ section. So, we use code similar to that in
+ elflink.c, but do not check for SHF_ALLOC on the
+ relcoation section, since relocations sections are
+ never allocated under the BPABI. The comments above
+ about Unixware notwithstanding, we include all of the
+ relocations here. */
+ if (htab->symbian_p)
+ {
+ unsigned int i;
+ type = ((dyn.d_tag == DT_REL || dyn.d_tag == DT_RELSZ)
+ ? SHT_REL : SHT_RELA);
+ dyn.d_un.d_val = 0;
+ for (i = 1; i < elf_numsections (output_bfd); i++)
+ {
+ Elf_Internal_Shdr *hdr
+ = elf_elfsections (output_bfd)[i];
+ if (hdr->sh_type == type)
+ {
+ if (dyn.d_tag == DT_RELSZ
+ || dyn.d_tag == DT_RELASZ)
+ dyn.d_un.d_val += hdr->sh_size;
+ else if (dyn.d_un.d_val == 0
+ || hdr->sh_offset < dyn.d_un.d_val)
+ dyn.d_un.d_val = hdr->sh_offset;
+ }
+ }
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
}
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
/* Set the bottom bit of DT_INIT/FINI if the
@@ -4031,7 +4041,7 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0 && elf32_arm_hash_table (info)->plt_header_size)
{
bfd_vma got_displacement;
@@ -4061,27 +4071,28 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot)
{
- if (sdyn == NULL)
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
- else
- bfd_put_32 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- sgot->contents);
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
- }
+ if (sgot->size > 0)
+ {
+ if (sdyn == NULL)
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+ else
+ bfd_put_32 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ sgot->contents);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+ }
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ }
return TRUE;
}
static void
-elf32_arm_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
+elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
{
Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
struct elf32_arm_link_hash_table *globals;
@@ -4100,8 +4111,7 @@ elf32_arm_post_process_headers (abfd, link_info)
}
static enum elf_reloc_type_class
-elf32_arm_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf32_arm_reloc_type_class (const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
@@ -4116,15 +4126,13 @@ elf32_arm_reloc_type_class (rela)
}
}
-static bfd_boolean elf32_arm_section_flags PARAMS ((flagword *, Elf_Internal_Shdr *));
-static void elf32_arm_final_write_processing PARAMS ((bfd *, bfd_boolean));
+static bfd_boolean elf32_arm_section_flags (flagword *, const Elf_Internal_Shdr *);
+static void elf32_arm_final_write_processing (bfd *, bfd_boolean);
/* Set the right machine number for an Arm ELF file. */
static bfd_boolean
-elf32_arm_section_flags (flags, hdr)
- flagword *flags;
- Elf_Internal_Shdr *hdr;
+elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
{
if (hdr->sh_type == SHT_NOTE)
*flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
@@ -4133,9 +4141,7 @@ elf32_arm_section_flags (flags, hdr)
}
static void
-elf32_arm_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
{
bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
}
@@ -4165,11 +4171,7 @@ elf32_arm_output_symbol_hook (struct bfd_link_info *info,
return TRUE;
/* We only want mapping symbols. */
- if (name == NULL
- || name[0] != '$'
- || (name[1] != 'a'
- && name[1] != 't'
- && name[1] != 'd'))
+ if (! is_arm_mapping_symbol_name (name))
return TRUE;
mapcount = ++(elf32_arm_section_data (input_sec)->mapcount);
@@ -4178,7 +4180,7 @@ elf32_arm_output_symbol_hook (struct bfd_link_info *info,
mapping symbols per section. */
map = bfd_realloc (map, mapcount * sizeof (elf32_arm_section_map));
elf32_arm_section_data (input_sec)->map = map;
-
+
map[mapcount - 1].vma = elfsym->st_value;
map[mapcount - 1].type = name[1];
return TRUE;
@@ -4226,7 +4228,7 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
bfd_vma offset;
bfd_byte tmp;
int i;
-
+
mapcount = elf32_arm_section_data (sec)->mapcount;
map = elf32_arm_section_data (sec)->map;
@@ -4241,10 +4243,10 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
for (i = 0; i < mapcount; i++)
{
if (i == mapcount - 1)
- end = bfd_section_size (output_bfd, sec);
+ end = sec->size;
else
end = map[i + 1].vma - offset;
-
+
switch (map[i].type)
{
case 'a':
@@ -4330,4 +4332,3 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
#define elf_backend_got_header_size 12
#include "elf32-target.h"
-
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c
index 3e2e275d603..e7223356017 100644
--- a/bfd/elf32-cr16c.c
+++ b/bfd/elf32-cr16c.c
@@ -721,27 +721,12 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- relocation = (h->root.u.def.value
- + sec->output_section->vma + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset, TRUE)))
- return FALSE;
- relocation = 0;
- }
+ bfd_boolean unresolved_reloc, warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = cr16c_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -944,7 +929,7 @@ elf32_cr16c_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
static bfd_boolean
elf32_cr16c_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const Elf_Internal_Sym *sym,
+ Elf_Internal_Sym *sym,
const char **namep ATTRIBUTE_UNUSED,
flagword *flagsp ATTRIBUTE_UNUSED,
asection **secp,
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 775fd0e7c32..ae8b3d204e6 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -475,7 +475,7 @@ cris_elf_grok_prstatus (abfd, note)
Elf_Internal_Note *note;
{
int offset;
- size_t raw_size;
+ size_t size;
switch (note->descsz)
{
@@ -491,14 +491,14 @@ cris_elf_grok_prstatus (abfd, note)
/* pr_reg */
offset = 70;
- raw_size = 140;
+ size = 140;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -918,11 +918,11 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else if (unresolved_reloc)
{
_bfd_error_handler
- (_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
+ (_("%B(%A): unresolvable relocation %s against symbol `%s'"),
+ input_bfd,
+ input_section,
cris_elf_howto_table[r_type].name,
- symname,
- bfd_get_section_name (input_bfd, input_section));
+ symname);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -975,14 +975,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
((h->got.offset == (bfd_vma) -1)
- ? _("%s: No PLT nor GOT for relocation %s against\
- symbol `%s' from %s section")
- : _("%s: No PLT for relocation %s against\
- symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
+ ? _("%B(%A): No PLT nor GOT for relocation %s"
+ " against symbol `%s'")
+ : _("%B(%A): No PLT for relocation %s"
+ " against symbol `%s'"),
+ input_bfd,
+ input_section,
cris_elf_howto_table[r_type].name,
- symname[0] != '\0' ? symname : _("[whose name is lost]"),
- bfd_get_section_name (input_bfd, input_section));
+ (symname != NULL && symname[0] != '\0'
+ ? symname : _("[whose name is lost]")));
/* FIXME: Perhaps blaming input is not the right thing to
do; this is probably an internal error. But it is true
@@ -1103,19 +1104,21 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
allowed to pass us these kinds of things. */
if (h == NULL)
(*_bfd_error_handler)
- (_("%s: relocation %s with non-zero addend %d against local symbol from %s section"),
- bfd_archive_filename (input_bfd),
+ (_("%B(%A): relocation %s with non-zero addend %d"
+ " against local symbol"),
+ input_bfd,
+ input_section,
cris_elf_howto_table[r_type].name,
- rel->r_addend,
- bfd_get_section_name (input_bfd, input_section));
+ rel->r_addend);
else
(*_bfd_error_handler)
- (_("%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
+ (_("%B(%A): relocation %s with non-zero addend %d"
+ " against symbol `%s'"),
+ input_bfd,
+ input_section,
cris_elf_howto_table[r_type].name,
rel->r_addend,
- symname[0] != '\0' ? symname : _("[whose name is lost]"),
- bfd_get_section_name (input_bfd, input_section));
+ symname[0] != '\0' ? symname : _("[whose name is lost]"));
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1135,11 +1138,11 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& h->root.type == bfd_link_hash_undefweak))))
{
(*_bfd_error_handler)
- (_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
- bfd_archive_filename (input_bfd),
+ (_("%B(%A): relocation %s is not allowed for global symbol: `%s'"),
+ input_bfd,
+ input_section,
cris_elf_howto_table[r_type].name,
- symname,
- bfd_get_section_name (input_bfd, input_section));
+ symname);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1150,10 +1153,10 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (sgot == NULL)
{
(*_bfd_error_handler)
- (_("%s: relocation %s in section %s with no GOT created"),
- bfd_archive_filename (input_bfd),
- cris_elf_howto_table[r_type].name,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: relocation %s in section %A with no GOT created"),
+ input_bfd,
+ input_section,
+ cris_elf_howto_table[r_type].name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1269,8 +1272,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (sreloc == NULL)
{
(*_bfd_error_handler)
- (_("%s: Internal inconsistency; no relocation section %s"),
- bfd_archive_filename (input_bfd),
+ (_("%B: Internal inconsistency; no relocation section %s"),
+ input_bfd,
name);
bfd_set_error (bfd_error_bad_value);
@@ -1645,7 +1648,7 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -1677,10 +1680,8 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s == NULL)
dyn.d_un.d_val = 0;
- else if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -1694,19 +1695,14 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
+ dyn.d_un.d_val -= s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
}
/* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
{
if (info->shared)
memcpy (splt->contents, elf_cris_pic_plt0_entry, PLT_ENTRY_SIZE);
@@ -1727,7 +1723,7 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
@@ -1832,8 +1828,8 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
if (h->got.refcount == 0)
{
/* We don't need the .got entry any more. */
- sgot->_raw_size -= 4;
- srelgot->_raw_size -= sizeof (Elf32_External_Rela);
+ sgot->size -= 4;
+ srelgot->size -= sizeof (Elf32_External_Rela);
}
}
break;
@@ -1848,9 +1844,9 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
if (local_got_refcounts[r_symndx] == 0)
{
/* We don't need the .got entry any more. */
- sgot->_raw_size -= 4;
+ sgot->size -= 4;
if (info->shared)
- srelgot->_raw_size -= sizeof (Elf32_External_Rela);
+ srelgot->size -= sizeof (Elf32_External_Rela);
}
}
}
@@ -1920,7 +1916,7 @@ elf_cris_adjust_gotplt_to_got (h, p)
Probably not necessary at this stage, but keeping it accurate
helps avoiding surprises later. */
h->root.got.refcount += h->gotplt_refcount;
- h->gotplt_refcount = -1;
+ h->gotplt_refcount = 0;
}
else
{
@@ -1932,17 +1928,17 @@ elf_cris_adjust_gotplt_to_got (h, p)
/* Put an accurate refcount there. */
h->root.got.refcount = h->gotplt_refcount;
- h->gotplt_refcount = -1;
+ h->gotplt_refcount = 0;
/* We always have a .got and a .rela.got section if there were
GOTPLT relocs in input. */
BFD_ASSERT (sgot != NULL && srelgot != NULL);
/* Allocate space in the .got section. */
- sgot->_raw_size += 4;
+ sgot->size += 4;
/* Allocate relocation space. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -2104,8 +2100,8 @@ elf_cris_adjust_dynamic_symbol (info, h)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -2114,7 +2110,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
}
/* If there's already a GOT entry, use that, not a .got.plt. A
@@ -2130,10 +2126,10 @@ elf_cris_adjust_dynamic_symbol (info, h)
/* Mark the PLT offset to use the GOT entry by setting the low
bit in the plt offset; it is always a multiple of
pointer-size. */
- BFD_ASSERT ((s->_raw_size & 3) == 0);
+ BFD_ASSERT ((s->size & 3) == 0);
/* Change the PLT refcount to an offset. */
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* By not setting gotplt_offset (i.e. it remains at 0), we signal
that the got entry should be used instead. */
@@ -2141,16 +2137,16 @@ elf_cris_adjust_dynamic_symbol (info, h)
h)->gotplt_offset == 0);
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
return TRUE;
}
/* No GOT reference for this symbol; prepare for an ordinary PLT. */
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
@@ -2160,13 +2156,13 @@ elf_cris_adjust_dynamic_symbol (info, h)
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += 4;
+ s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
+ s->size += sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -2225,7 +2221,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -2239,8 +2235,7 @@ elf_cris_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (!bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -2249,10 +2244,10 @@ elf_cris_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -2427,9 +2422,9 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
}
/* Allocate space in the .got section. */
- sgot->_raw_size += 4;
+ sgot->size += 4;
/* Allocate relocation space. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
h->got.refcount++;
}
@@ -2438,13 +2433,13 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
/* This is a global offset table entry for a local symbol. */
if (local_got_refcounts[r_symndx] == 0)
{
- sgot->_raw_size += 4;
+ sgot->size += 4;
if (info->shared)
{
/* If we are generating a shared object, we need to
output a R_CRIS_RELATIVE reloc so that the dynamic
linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
}
local_got_refcounts[r_symndx]++;
@@ -2474,9 +2469,13 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
don't need to generate a procedure linkage table entry
after all. */
- /* If this is a local symbol, we resolve it directly without
- creating a procedure linkage table entry. */
- if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ /* Beware: if we'd check for visibility of the symbol here
+ (and not marking the need for a PLT when non-visible), we'd
+ get into trouble with keeping handling consistent with
+ regards to relocs found before definition and GOTPLT
+ handling. Eliminable PLT entries will be dealt with later
+ anyway. */
+ if (h == NULL)
continue;
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
@@ -2499,9 +2498,9 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
{
/* FIXME: How do we make this optionally a warning only? */
(*_bfd_error_handler)
- (_("%s, section %s:\n relocation %s should not be used in a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
- sec->name,
+ (_("%B, section %A:\n relocation %s should not be used in a shared object; recompile with -fPIC"),
+ abfd,
+ sec,
cris_elf_howto_table[r_type].name);
}
/* Fall through. */
@@ -2599,7 +2598,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
info->flags |= DF_TEXTREL;
}
- sreloc->_raw_size += sizeof (Elf32_External_Rela);
+ sreloc->size += sizeof (Elf32_External_Rela);
/* If we are linking with -Bsymbolic, we count the number of PC
relative relocations we have entered for this symbol, so that
@@ -2682,7 +2681,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -2700,7 +2699,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* If this is a -Bsymbolic shared link, then we need to discard all PC
@@ -2740,7 +2739,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -2754,7 +2753,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -2796,8 +2795,8 @@ elf_cris_size_dynamic_sections (output_bfd, info)
contents are written out. This should not happen, but this way
if it does, we will not write out garbage. For reloc sections,
this will make entries have the type R_CRIS_NONE. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -2874,7 +2873,7 @@ elf_cris_discard_excess_dso_dynamics (h, inf)
|| info->symbolic))
{
for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
+ s->section->size -= s->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -2917,7 +2916,7 @@ elf_cris_discard_excess_program_dynamics (h, inf)
BFD_ASSERT (srelgot != NULL);
- srelgot->_raw_size -= sizeof (Elf32_External_Rela);
+ srelgot->size -= sizeof (Elf32_External_Rela);
}
/* If the locally-defined symbol isn't used by a DSO, then we don't
@@ -3019,9 +3018,9 @@ cris_elf_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
((new_flags & EF_CRIS_UNDERSCORE)
- ? _("%s: uses _-prefixed symbols, but writing file with non-prefixed symbols")
- : _("%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
- bfd_archive_filename (ibfd));
+ ? _("%B: uses _-prefixed symbols, but writing file with non-prefixed symbols")
+ : _("%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
new file mode 100644
index 00000000000..79b9c64feac
--- /dev/null
+++ b/bfd/elf32-crx.c
@@ -0,0 +1,1327 @@
+/* BFD back-end for National Semiconductor's CRX ELF
+ Copyright 2004 Free Software Foundation, Inc.
+ Written by Tomer Levi, NSC, Israel.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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 "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/crx.h"
+
+static reloc_howto_type *elf_crx_reloc_type_lookup
+ (bfd *, bfd_reloc_code_real_type);
+static void elf_crx_info_to_howto
+ (bfd *, arelent *, Elf_Internal_Rela *);
+static bfd_boolean elf32_crx_relax_delete_bytes
+ (bfd *, asection *, bfd_vma, int);
+static bfd_reloc_status_type crx_elf_final_link_relocate
+ (reloc_howto_type *, bfd *, bfd *, asection *,
+ bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
+ struct bfd_link_info *, asection *, int);
+static bfd_boolean elf32_crx_relocate_section
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
+static asection * elf32_crx_gc_mark_hook
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+static bfd_boolean elf32_crx_gc_sweep_hook
+ (bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *);
+static bfd_boolean elf32_crx_relax_section
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
+static bfd_byte * elf32_crx_get_relocated_section_contents
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
+
+/* crx_reloc_map array maps BFD relocation enum into a CRGAS relocation type. */
+
+struct crx_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */
+ unsigned short crx_reloc_type; /* CRX relocation type. */
+};
+
+static const struct crx_reloc_map crx_reloc_map[R_CRX_MAX] =
+{
+ {BFD_RELOC_NONE, R_CRX_NONE},
+ {BFD_RELOC_CRX_REL4, R_CRX_REL4},
+ {BFD_RELOC_CRX_REL8, R_CRX_REL8},
+ {BFD_RELOC_CRX_REL8_CMP, R_CRX_REL8_CMP},
+ {BFD_RELOC_CRX_REL16, R_CRX_REL16},
+ {BFD_RELOC_CRX_REL24, R_CRX_REL24},
+ {BFD_RELOC_CRX_REL32, R_CRX_REL32},
+ {BFD_RELOC_CRX_REGREL12, R_CRX_REGREL12},
+ {BFD_RELOC_CRX_REGREL22, R_CRX_REGREL22},
+ {BFD_RELOC_CRX_REGREL28, R_CRX_REGREL28},
+ {BFD_RELOC_CRX_REGREL32, R_CRX_REGREL32},
+ {BFD_RELOC_CRX_ABS16, R_CRX_ABS16},
+ {BFD_RELOC_CRX_ABS32, R_CRX_ABS32},
+ {BFD_RELOC_CRX_NUM8, R_CRX_NUM8},
+ {BFD_RELOC_CRX_NUM16, R_CRX_NUM16},
+ {BFD_RELOC_CRX_NUM32, R_CRX_NUM32},
+ {BFD_RELOC_CRX_IMM16, R_CRX_IMM16},
+ {BFD_RELOC_CRX_IMM32, R_CRX_IMM32},
+ {BFD_RELOC_CRX_SWITCH8, R_CRX_SWITCH8},
+ {BFD_RELOC_CRX_SWITCH16, R_CRX_SWITCH16},
+ {BFD_RELOC_CRX_SWITCH32, R_CRX_SWITCH32}
+};
+
+static reloc_howto_type crx_elf_howto_table[] =
+{
+ HOWTO (R_CRX_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL4, /* type */
+ 1, /* rightshift */
+ 0, /* size */
+ 4, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL4", /* name */
+ FALSE, /* partial_inplace */
+ 0xf, /* src_mask */
+ 0xf, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL8, /* type */
+ 1, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL8", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL8_CMP, /* type */
+ 1, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL8_CMP", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL16, /* type */
+ 1, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL24, /* type */
+ 1, /* rightshift */
+ 2, /* size */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL24", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REL32, /* type */
+ 1, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REGREL12, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REGREL12", /* name */
+ FALSE, /* partial_inplace */
+ 0xfff, /* src_mask */
+ 0xfff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REGREL22, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 22, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REGREL22", /* name */
+ FALSE, /* partial_inplace */
+ 0x3fffff, /* src_mask */
+ 0x3fffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REGREL28, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 28, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REGREL28", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffffff, /* src_mask */
+ 0xfffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_REGREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_REGREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_ABS16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_ABS16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_ABS32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_ABS32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_NUM8, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_NUM8", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_NUM16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_NUM16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_NUM32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_NUM32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_IMM16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_IMM16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CRX_IMM32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_IMM32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* An 8 bit switch table entry. This is generated for an expression
+ such as ``.byte L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_CRX_SWITCH8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_SWITCH8", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 16 bit switch table entry. This is generated for an expression
+ such as ``.word L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_CRX_SWITCH16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_SWITCH16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 32 bit switch table entry. This is generated for an expression
+ such as ``.long L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_CRX_SWITCH32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CRX_SWITCH32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE) /* pcrel_offset */
+};
+
+/* Retrieve a howto ptr using a BFD reloc_code. */
+
+static reloc_howto_type *
+elf_crx_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ unsigned int i;
+
+ for (i = 0; i < R_CRX_MAX; i++)
+ if (code == crx_reloc_map[i].bfd_reloc_enum)
+ return &crx_elf_howto_table[crx_reloc_map[i].crx_reloc_type];
+
+ printf ("This relocation Type is not supported -0x%x\n", code);
+ return 0;
+}
+
+/* Retrieve a howto ptr using an internal relocation entry. */
+
+static void
+elf_crx_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
+{
+ unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+ BFD_ASSERT (r_type < (unsigned int) R_CRX_MAX);
+ cache_ptr->howto = &crx_elf_howto_table[r_type];
+}
+
+/* Perform a relocation as part of a final link. */
+
+static bfd_reloc_status_type
+crx_elf_final_link_relocate (reloc_howto_type *howto, bfd *input_bfd,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ asection *input_section, bfd_byte *contents,
+ bfd_vma offset, bfd_vma Rvalue, bfd_vma addend,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ int is_local ATTRIBUTE_UNUSED)
+{
+ unsigned short r_type = howto->type;
+ bfd_byte *hit_data = contents + offset;
+ bfd_vma reloc_bits, check;
+
+ switch (r_type)
+ {
+ case R_CRX_IMM16:
+ case R_CRX_IMM32:
+ case R_CRX_ABS16:
+ case R_CRX_ABS32:
+ case R_CRX_REL8_CMP:
+ case R_CRX_REL16:
+ case R_CRX_REL24:
+ case R_CRX_REL32:
+ case R_CRX_REGREL12:
+ case R_CRX_REGREL22:
+ case R_CRX_REGREL28:
+ case R_CRX_REGREL32:
+ /* 'hit_data' is relative to the start of the instruction, not the
+ relocation offset. Advance it to account for the exact offset. */
+ hit_data += 2;
+ break;
+
+ case R_CRX_REL4:
+ /* This relocation type is used only in 'Branch if Equal to 0'
+ instructions and requires special handling. */
+ Rvalue -= 1;
+ break;
+
+ case R_CRX_NONE:
+ return bfd_reloc_ok;
+ break;
+
+ case R_CRX_SWITCH8:
+ case R_CRX_SWITCH16:
+ case R_CRX_SWITCH32:
+ /* We only care about the addend, where the difference between
+ expressions is kept. */
+ Rvalue = 0;
+
+ default:
+ break;
+ }
+
+ if (howto->pc_relative)
+ {
+ /* Subtract the address of the section containing the location. */
+ Rvalue -= (input_section->output_section->vma
+ + input_section->output_offset);
+ /* Subtract the position of the location within the section. */
+ Rvalue -= offset;
+ }
+
+ /* Add in supplied addend. */
+ Rvalue += addend;
+
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
+ check = Rvalue >> howto->rightshift;
+
+ /* Assumes two's complement. This expression avoids
+ overflow if howto->bitsize is the number of bits in
+ bfd_vma. */
+ reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
+
+ if (((bfd_vma) check & ~reloc_bits) != 0
+ && (((bfd_vma) check & ~reloc_bits)
+ != (-(bfd_vma) 1 & ~reloc_bits)))
+ {
+ /* The above right shift is incorrect for a signed
+ value. See if turning on the upper bits fixes the
+ overflow. */
+ if (howto->rightshift && (bfd_signed_vma) Rvalue < 0)
+ {
+ check |= ((bfd_vma) - 1
+ & ~((bfd_vma) - 1
+ >> howto->rightshift));
+ if (((bfd_vma) check & ~reloc_bits)
+ != (-(bfd_vma) 1 & ~reloc_bits))
+ return bfd_reloc_overflow;
+ }
+ else
+ return bfd_reloc_overflow;
+ }
+
+ /* Drop unwanted bits from the value we are relocating to. */
+ Rvalue >>= (bfd_vma) howto->rightshift;
+
+ /* Apply dst_mask to select only relocatable part of the insn. */
+ Rvalue &= howto->dst_mask;
+
+ switch (howto->size)
+ {
+ case 0:
+ if (r_type == R_CRX_REL4)
+ {
+ Rvalue <<= 4;
+ Rvalue |= (bfd_get_8 (input_bfd, hit_data) & 0x0f);
+ }
+
+ bfd_put_8 (input_bfd, (unsigned char) Rvalue, hit_data);
+ break;
+
+ case 1:
+ if (r_type == R_CRX_REGREL12)
+ Rvalue |= (bfd_get_16 (input_bfd, hit_data) & 0xf000);
+
+ bfd_put_16 (input_bfd, Rvalue, hit_data);
+ break;
+
+ case 2:
+ if (r_type == R_CRX_REL24
+ || r_type == R_CRX_REGREL22
+ || r_type == R_CRX_REGREL28)
+ Rvalue |= (((bfd_get_16 (input_bfd, hit_data) << 16) |
+ bfd_get_16 (input_bfd, hit_data + 2)) & ~howto->dst_mask);
+
+ if (r_type == R_CRX_NUM32 || r_type == R_CRX_SWITCH32)
+ /* Relocation on DATA is purely little-endian, that is, for a
+ multi-byte datum, the lowest address in memory contains the
+ little end of the datum, that is, the least significant byte.
+ Therefore we use BFD's byte Putting functions. */
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ else
+ /* Relocation on INSTRUCTIONS is different : Instructions are
+ word-addressable, that is, each word itself is arranged according
+ to little-endian convention, whereas the words are arranged with
+ respect to one another in BIG ENDIAN fashion.
+ When there is an immediate value that spans a word boundary, it is
+ split in a big-endian way with respect to the words. */
+ {
+ bfd_put_16 (input_bfd, (Rvalue >> 16) & 0xffff, hit_data);
+ bfd_put_16 (input_bfd, Rvalue & 0xffff, hit_data + 2);
+ }
+ break;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+
+ return bfd_reloc_ok;
+}
+
+/* Delete some bytes from a section while relaxing. */
+
+static bfd_boolean
+elf32_crx_relax_delete_bytes (bfd *abfd, asection *sec,
+ bfd_vma addr, int count)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned int sec_shndx;
+ bfd_byte *contents;
+ Elf_Internal_Rela *irel, *irelend;
+ Elf_Internal_Rela *irelalign;
+ bfd_vma toaddr;
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ contents = elf_section_data (sec)->this_hdr.contents;
+
+ /* The deletion must stop at the next ALIGN reloc for an aligment
+ power larger than the number of bytes we are deleting. */
+
+ irelalign = NULL;
+ toaddr = sec->size;
+
+ irel = elf_section_data (sec)->relocs;
+ irelend = irel + sec->reloc_count;
+
+ /* Actually delete the bytes. */
+ memmove (contents + addr, contents + addr + count,
+ (size_t) (toaddr - addr - count));
+ sec->size -= count;
+
+ /* Adjust all the relocs. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ {
+ /* Get the new reloc address. */
+ if ((irel->r_offset > addr
+ && irel->r_offset < toaddr))
+ irel->r_offset -= count;
+ }
+
+ /* Adjust the local symbols defined in this section. */
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
+ {
+ if (isym->st_shndx == sec_shndx
+ && isym->st_value > addr
+ && isym->st_value < toaddr)
+ {
+ /* Adjust the addend of SWITCH relocations in this section,
+ which reference this local symbol. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ {
+ unsigned long r_symndx;
+ Elf_Internal_Sym *rsym;
+ bfd_vma addsym, subsym;
+
+ /* Skip if not a SWITCH relocation. */
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_CRX_SWITCH8
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CRX_SWITCH16
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CRX_SWITCH32)
+ continue;
+
+ r_symndx = ELF32_R_SYM (irel->r_info);
+ rsym = (Elf_Internal_Sym *) symtab_hdr->contents + r_symndx;
+
+ /* Skip if not the local adjusted symbol. */
+ if (rsym != isym)
+ continue;
+
+ addsym = isym->st_value;
+ subsym = addsym - irel->r_addend;
+
+ /* Fix the addend only when -->> (addsym > addr >= subsym). */
+ if (subsym <= addr)
+ irel->r_addend -= count;
+ else
+ continue;
+ }
+
+ isym->st_value -= count;
+ }
+ }
+
+ /* Now adjust the global symbols defined in this section. */
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+
+ for (; sym_hashes < end_hashes; sym_hashes++)
+ {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec
+ && sym_hash->root.u.def.value > addr
+ && sym_hash->root.u.def.value < toaddr)
+ sym_hash->root.u.def.value -= count;
+ }
+
+ return TRUE;
+}
+
+/* This is a version of bfd_generic_get_relocated_section_contents
+ which uses elf32_crx_relocate_section. */
+
+static bfd_byte *
+elf32_crx_get_relocated_section_contents (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *input_section = link_order->u.indirect.section;
+ bfd *input_bfd = input_section->owner;
+ asection **sections = NULL;
+ Elf_Internal_Rela *internal_relocs = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
+
+ /* We only need to handle the case of relaxing, or of having a
+ particular set of section contents, specially. */
+ if (relocatable
+ || elf_section_data (input_section)->this_hdr.contents == NULL)
+ return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
+ link_order, data,
+ relocatable,
+ symbols);
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+
+ memcpy (data, elf_section_data (input_section)->this_hdr.contents,
+ (size_t) input_section->size);
+
+ if ((input_section->flags & SEC_RELOC) != 0
+ && input_section->reloc_count > 0)
+ {
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ asection **secpp;
+ bfd_size_type amt;
+
+ internal_relocs = (_bfd_elf_link_read_relocs
+ (input_bfd, input_section, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL, FALSE));
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ if (symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ amt = symtab_hdr->sh_info;
+ amt *= sizeof (asection *);
+ sections = bfd_malloc (amt);
+ if (sections == NULL && amt != 0)
+ goto error_return;
+
+ isymend = isymbuf + symtab_hdr->sh_info;
+ for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
+ {
+ asection *isec;
+
+ if (isym->st_shndx == SHN_UNDEF)
+ isec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ isec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ isec = bfd_com_section_ptr;
+ else
+ isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
+
+ *secpp = isec;
+ }
+
+ if (! elf32_crx_relocate_section (output_bfd, link_info, input_bfd,
+ input_section, data, internal_relocs,
+ isymbuf, sections))
+ goto error_return;
+
+ if (sections != NULL)
+ free (sections);
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (elf_section_data (input_section)->relocs != internal_relocs)
+ free (internal_relocs);
+ }
+
+ return data;
+
+ error_return:
+ if (sections != NULL)
+ free (sections);
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (internal_relocs != NULL
+ && elf_section_data (input_section)->relocs != internal_relocs)
+ free (internal_relocs);
+ return NULL;
+}
+
+/* Relocate a CRX ELF section. */
+
+static bfd_boolean
+elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+ bfd *input_bfd, asection *input_section,
+ bfd_byte *contents, Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel, *relend;
+
+ if (info->relocatable)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ howto = crx_elf_howto_table + (r_type);
+
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+ }
+ else
+ {
+ bfd_boolean unresolved_reloc, warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
+ }
+
+ r = crx_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend,
+ info, sec, h == NULL);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char *name;
+ const char *msg = (const char *) 0;
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name));
+ if (name == NULL || *name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ if (!((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_undefined:
+ if (!((*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section,
+ rel->r_offset, TRUE)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous error");
+ goto common_error;
+
+ default:
+ msg = _("internal error: unknown error");
+ /* Fall through. */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section,
+ rel->r_offset)))
+ return FALSE;
+ break;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* This function handles relaxing for the CRX.
+
+ There's quite a few relaxing opportunites available on the CRX:
+
+ * bal/bcond:32 -> bal/bcond:16 2 bytes
+ * bcond:16 -> bcond:8 2 bytes
+ * cmpbcond:24 -> cmpbcond:8 2 bytes
+ * arithmetic imm32 -> arithmetic imm16 2 bytes
+
+ Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */
+
+static bfd_boolean
+elf32_crx_relax_section (bfd *abfd, asection *sec,
+ struct bfd_link_info *link_info, bfd_boolean *again)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *contents = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
+
+ /* Assume nothing changes. */
+ *again = FALSE;
+
+ /* We don't have to do anything for a relocatable link, if
+ this section does not have relocs, or if this is not a
+ code section. */
+ if (link_info->relocatable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0
+ || (sec->flags & SEC_CODE) == 0)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+ /* Get a copy of the native relocations. */
+ internal_relocs = (_bfd_elf_link_read_relocs
+ (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ link_info->keep_memory));
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ /* Walk through them looking for relaxing opportunities. */
+ irelend = internal_relocs + sec->reloc_count;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+
+ /* If this isn't something that can be relaxed, then ignore
+ this reloc. */
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_CRX_REL32
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CRX_REL16
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CRX_REL24
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CRX_IMM32)
+ continue;
+
+ /* Get the section contents if we haven't done so already. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ /* Go get them off disk. */
+ else if (!bfd_malloc_and_get_section (abfd, sec, &contents))
+ goto error_return;
+ }
+
+ /* Read this BFD's local symbols if we haven't done so already. */
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ Elf_Internal_Sym *isym;
+ asection *sym_sec;
+
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ if (isym->st_shndx == SHN_UNDEF)
+ sym_sec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ sym_sec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ sym_sec = bfd_com_section_ptr;
+ else
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry *h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+
+ /* For simplicity of coding, we are going to modify the section
+ contents, the section relocs, and the BFD symbol table. We
+ must tell the rest of the code not to free up this
+ information. It would be possible to instead create a table
+ of changes which have to be made, as is done in coff-mips.c;
+ that would be more work, but would require less memory when
+ the linker is run. */
+
+ /* Try to turn a 32bit pc-relative branch/call into
+ a 16bit pc-relative branch/call. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CRX_REL32)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 16 bits, note the high value is
+ 0xfffe + 2 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 0x10000 && (long) value > -0x10002)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'bal'/'bcond' and fix the opcode. */
+ if ((code & 0xfff0) == 0x3170)
+ bfd_put_8 (abfd, 0x30, contents + irel->r_offset + 1);
+ else if ((code & 0xf0ff) == 0x707f)
+ bfd_put_8 (abfd, 0x7e, contents + irel->r_offset);
+ else
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CRX_REL16);
+
+ /* Delete two bytes of data. */
+ if (!elf32_crx_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+
+ /* Try to turn a 16bit pc-relative branch into an
+ 8bit pc-relative branch. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CRX_REL16)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 8 bits, note the high value is
+ 0xfc + 2 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 0xfe && (long) value > -0x100)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'bcond' opcode. */
+ if ((code & 0xf0ff) != 0x707e)
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CRX_REL8);
+
+ /* Delete two bytes of data. */
+ if (!elf32_crx_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+
+ /* Try to turn a 24bit pc-relative cmp&branch into
+ an 8bit pc-relative cmp&branch. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CRX_REL24)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 8 bits, note the high value is
+ 0x7e + 2 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 0x100 && (long) value > -0x100)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'cmp&branch' opcode. */
+ if ((code & 0xfff0) != 0x3180 && (code & 0xfff0) != 0x3190
+ && (code & 0xfff0) != 0x31a0 && (code & 0xfff0) != 0x31c0
+ && (code & 0xfff0) != 0x31d0 && (code & 0xfff0) != 0x31e0)
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the opcode. */
+ bfd_put_8 (abfd, 0x30, contents + irel->r_offset + 1);
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CRX_REL8_CMP);
+
+ /* Delete two bytes of data. */
+ if (!elf32_crx_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 4, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+
+ /* Try to turn a 32bit immediate address into
+ a 16bit immediate address. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CRX_IMM32)
+ {
+ bfd_vma value = symval;
+
+ /* See if the value will fit in 16 bits. */
+ if ((long) value < 0x7fff && (long) value > -0x8000)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'arithmetic double'. */
+ if ((code & 0xf0f0) != 0x20f0)
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the opcode. */
+ bfd_put_8 (abfd, (code & 0xff) - 0x10, contents + irel->r_offset);
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CRX_IMM16);
+
+ /* Delete two bytes of data. */
+ if (!elf32_crx_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+ }
+
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ {
+ if (! link_info->keep_memory)
+ free (isymbuf);
+ else
+ {
+ /* Cache the symbols for elf_link_input_bfd. */
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+ }
+ }
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ {
+ if (! link_info->keep_memory)
+ free (contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = contents;
+ }
+ }
+
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return TRUE;
+
+ error_return:
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return FALSE;
+}
+
+static asection *
+elf32_crx_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ return NULL;
+ }
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+elf32_crx_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't support garbage collection of GOT and PLT relocs yet. */
+ return TRUE;
+}
+
+/* Definitions for setting CRX target vector. */
+#define TARGET_LITTLE_SYM bfd_elf32_crx_vec
+#define TARGET_LITTLE_NAME "elf32-crx"
+#define ELF_ARCH bfd_arch_crx
+#define ELF_MACHINE_CODE EM_CRX
+#define ELF_MAXPAGESIZE 0x1
+#define elf_symbol_leading_char '_'
+
+#define bfd_elf32_bfd_reloc_type_lookup elf_crx_reloc_type_lookup
+#define elf_info_to_howto elf_crx_info_to_howto
+#define elf_info_to_howto_rel 0
+#define elf_backend_relocate_section elf32_crx_relocate_section
+#define bfd_elf32_bfd_relax_section elf32_crx_relax_section
+#define bfd_elf32_bfd_get_relocated_section_contents \
+ elf32_crx_get_relocated_section_contents
+#define elf_backend_gc_mark_hook elf32_crx_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_crx_gc_sweep_hook
+#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-d30v.c b/bfd/elf32-d30v.c
index b08977f2f96..6a84522adfd 100644
--- a/bfd/elf32-d30v.c
+++ b/bfd/elf32-d30v.c
@@ -1,5 +1,5 @@
/* D30V-specific support for 32-bit ELF
- Copyright 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
@@ -290,7 +290,7 @@ bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
flag = bfd_reloc_undefined;
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -399,7 +399,7 @@ bfd_elf_d30v_reloc_21 (abfd, reloc_entry, symbol, data, input_section, output_bf
flag = bfd_reloc_undefined;
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c
index 7fb6d0c19e2..f8a394646b6 100644
--- a/bfd/elf32-dlx.c
+++ b/bfd/elf32-dlx.c
@@ -1,5 +1,5 @@
/* DLX specific support for 32-bit ELF
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -307,7 +307,7 @@ _bfd_dlx_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
relocation += reloc_entry->addend;
relocation += bfd_get_16 (abfd, (bfd_byte *)data + reloc_entry->address);
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
#if 0
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 6412acdfb1f..9341fe8acca 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -583,10 +583,12 @@ static const struct frv_reloc_map frv_reloc_map [] =
};
#endif
+extern const bfd_target bfd_elf32_frvfdpic_vec;
+#define IS_FDPIC(bfd) ((bfd)->xvec == &bfd_elf32_frvfdpic_vec)
/* An extension of the elf hash table data structure, containing some
additional FRV-specific data. */
-struct frv_elf_link_hash_table
+struct frvfdpic_elf_link_hash_table
{
struct elf_link_hash_table elf;
@@ -612,33 +614,33 @@ struct frv_elf_link_hash_table
/* Get the FRV ELF linker hash table from a link_info structure. */
-#define frv_hash_table(info) \
- ((struct frv_elf_link_hash_table *) ((info)->hash))
-
-#define frv_got_section(info) \
- (frv_hash_table (info)->sgot)
-#define frv_gotrel_section(info) \
- (frv_hash_table (info)->sgotrel)
-#define frv_gotfixup_section(info) \
- (frv_hash_table (info)->sgotfixup)
-#define frv_plt_section(info) \
- (frv_hash_table (info)->splt)
-#define frv_pltrel_section(info) \
- (frv_hash_table (info)->spltrel)
-#define frv_relocs_info(info) \
- (frv_hash_table (info)->relocs_info)
-#define frv_got_initial_offset(info) \
- (frv_hash_table (info)->got0)
-#define frv_plt_initial_offset(info) \
- (frv_hash_table (info)->plt0)
+#define frvfdpic_hash_table(info) \
+ ((struct frvfdpic_elf_link_hash_table *) ((info)->hash))
+
+#define frvfdpic_got_section(info) \
+ (frvfdpic_hash_table (info)->sgot)
+#define frvfdpic_gotrel_section(info) \
+ (frvfdpic_hash_table (info)->sgotrel)
+#define frvfdpic_gotfixup_section(info) \
+ (frvfdpic_hash_table (info)->sgotfixup)
+#define frvfdpic_plt_section(info) \
+ (frvfdpic_hash_table (info)->splt)
+#define frvfdpic_pltrel_section(info) \
+ (frvfdpic_hash_table (info)->spltrel)
+#define frvfdpic_relocs_info(info) \
+ (frvfdpic_hash_table (info)->relocs_info)
+#define frvfdpic_got_initial_offset(info) \
+ (frvfdpic_hash_table (info)->got0)
+#define frvfdpic_plt_initial_offset(info) \
+ (frvfdpic_hash_table (info)->plt0)
/* Create an FRV ELF linker hash table. */
static struct bfd_link_hash_table *
-frv_elf_link_hash_table_create (bfd *abfd)
+frvfdpic_elf_link_hash_table_create (bfd *abfd)
{
- struct frv_elf_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct frv_elf_link_hash_table);
+ struct frvfdpic_elf_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct frvfdpic_elf_link_hash_table);
ret = bfd_zalloc (abfd, amt);
if (ret == NULL)
@@ -657,26 +659,16 @@ frv_elf_link_hash_table_create (bfd *abfd)
/* Decide whether a reference to a symbol can be resolved locally or
not. If the symbol is protected, we want the local address, but
its function descriptor must be assigned by the dynamic linker. */
-#define FRV_SYM_LOCAL(INFO, H) \
+#define FRVFDPIC_SYM_LOCAL(INFO, H) \
(_bfd_elf_symbol_refs_local_p ((H), (INFO), 1) \
- || ! elf_hash_table (INFO)->dynamic_sections_created \
- || (/* The condition below is an ugly hack to get .scommon data to
- be regarded as local. For some reason the
- ELF_LINK_HASH_DEF_REGULAR bit is not set on such common
- symbols, and the SEC_IS_COMMON bit is not set any longer
- when we need to perform this test. Hopefully this
- approximation is good enough. */ \
- ((H)->root.type == bfd_link_hash_defined \
- || (H)->root.type == bfd_link_hash_defweak) \
- && (H)->root.u.def.section->output_section \
- && ((H)->root.u.def.section->flags & SEC_LINKER_CREATED)))
-#define FRV_FUNCDESC_LOCAL(INFO, H) \
+ || ! elf_hash_table (INFO)->dynamic_sections_created)
+#define FRVFDPIC_FUNCDESC_LOCAL(INFO, H) \
((H)->dynindx == -1 || ! elf_hash_table (INFO)->dynamic_sections_created)
/* This structure collects information on what kind of GOT, PLT or
function descriptors are required by relocations that reference a
certain symbol. */
-struct frv_pic_relocs_info
+struct frvfdpic_relocs_info
{
/* The index of the symbol, as stored in the relocation r_info, if
we have a local symbol; -1 otherwise. */
@@ -727,17 +719,17 @@ struct frv_pic_relocs_info
unsigned sym:1;
/* Whether we need a PLT entry for a symbol. Should be implied by
something like:
- (call && symndx == -1 && ! FRV_SYM_LOCAL (info, d.h)) */
+ (call && symndx == -1 && ! FRVFDPIC_SYM_LOCAL (info, d.h)) */
unsigned plt:1;
/* Whether a function descriptor should be created in this link unit
for symbol+addend. Should be implied by something like:
(plt || fdgotoff12 || fdgotofflos || fdgotofflohi
|| ((fd || fdgot12 || fdgotlos || fdgothilo)
- && (symndx != -1 || FRV_FUNCDESC_LOCAL (info, d.h)))) */
+ && (symndx != -1 || FRVFDPIC_FUNCDESC_LOCAL (info, d.h)))) */
unsigned privfd:1;
/* Whether a lazy PLT entry is needed for this symbol+addend.
Should be implied by something like:
- (privfd && symndx == -1 && ! FRV_SYM_LOCAL (info, d.h)
+ (privfd && symndx == -1 && ! FRVFDPIC_SYM_LOCAL (info, d.h)
&& ! (info->flags & DF_BIND_NOW)) */
unsigned lazyplt:1;
/* Whether we've already emitted GOT relocations and PLT entries as
@@ -764,24 +756,24 @@ struct frv_pic_relocs_info
bfd_vma plt_entry, lzplt_entry;
};
-/* Compute a hash with the key fields of an frv_pic_relocs_info entry. */
+/* Compute a hash with the key fields of an frvfdpic_relocs_info entry. */
static hashval_t
-frv_pic_relocs_info_hash (const void *entry_)
+frvfdpic_relocs_info_hash (const void *entry_)
{
- const struct frv_pic_relocs_info *entry = entry_;
+ const struct frvfdpic_relocs_info *entry = entry_;
return (entry->symndx == -1
? entry->d.h->root.root.hash
: entry->symndx + entry->d.abfd->id * 257) + entry->addend;
}
-/* Test whether the key fields of two frv_pic_relocs_info entries are
+/* Test whether the key fields of two frvfdpic_relocs_info entries are
identical. */
static int
-frv_pic_relocs_info_eq (const void *entry1, const void *entry2)
+frvfdpic_relocs_info_eq (const void *entry1, const void *entry2)
{
- const struct frv_pic_relocs_info *e1 = entry1;
- const struct frv_pic_relocs_info *e2 = entry2;
+ const struct frvfdpic_relocs_info *e1 = entry1;
+ const struct frvfdpic_relocs_info *e2 = entry2;
return e1->symndx == e2->symndx && e1->addend == e2->addend
&& (e1->symndx == -1 ? e1->d.h == e2->d.h : e1->d.abfd == e2->d.abfd);
@@ -790,14 +782,14 @@ frv_pic_relocs_info_eq (const void *entry1, const void *entry2)
/* Find or create an entry in a hash table HT that matches the key
fields of the given ENTRY. If it's not found, memory for a new
entry is allocated in ABFD's obstack. */
-static struct frv_pic_relocs_info *
-frv_pic_relocs_info_find (struct htab *ht,
- bfd *abfd,
- const struct frv_pic_relocs_info *entry,
- enum insert_option insert)
+static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_find (struct htab *ht,
+ bfd *abfd,
+ const struct frvfdpic_relocs_info *entry,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info **loc =
- (struct frv_pic_relocs_info **) htab_find_slot (ht, entry, insert);
+ struct frvfdpic_relocs_info **loc =
+ (struct frvfdpic_relocs_info **) htab_find_slot (ht, entry, insert);
if (! loc)
return NULL;
@@ -822,47 +814,47 @@ frv_pic_relocs_info_find (struct htab *ht,
/* Obtain the address of the entry in HT associated with H's symbol +
addend, creating a new entry if none existed. ABFD is only used
for memory allocation purposes. */
-inline static struct frv_pic_relocs_info *
-frv_pic_relocs_info_for_global (struct htab *ht,
- bfd *abfd,
- struct elf_link_hash_entry *h,
- bfd_vma addend,
- enum insert_option insert)
+inline static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_for_global (struct htab *ht,
+ bfd *abfd,
+ struct elf_link_hash_entry *h,
+ bfd_vma addend,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info entry;
+ struct frvfdpic_relocs_info entry;
entry.symndx = -1;
entry.d.h = h;
entry.addend = addend;
- return frv_pic_relocs_info_find (ht, abfd, &entry, insert);
+ return frvfdpic_relocs_info_find (ht, abfd, &entry, insert);
}
/* Obtain the address of the entry in HT associated with the SYMNDXth
local symbol of the input bfd ABFD, plus the addend, creating a new
entry if none existed. */
-inline static struct frv_pic_relocs_info *
-frv_pic_relocs_info_for_local (struct htab *ht,
- bfd *abfd,
- long symndx,
- bfd_vma addend,
- enum insert_option insert)
+inline static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_for_local (struct htab *ht,
+ bfd *abfd,
+ long symndx,
+ bfd_vma addend,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info entry;
+ struct frvfdpic_relocs_info entry;
entry.symndx = symndx;
entry.d.abfd = abfd;
entry.addend = addend;
- return frv_pic_relocs_info_find (ht, abfd, &entry, insert);
+ return frvfdpic_relocs_info_find (ht, abfd, &entry, insert);
}
/* Merge fields set by check_relocs() of two entries that end up being
mapped to the same (presumably global) symbol. */
inline static void
-frv_pic_merge_early_relocs_info (struct frv_pic_relocs_info *e2,
- struct frv_pic_relocs_info const *e1)
+frvfdpic_pic_merge_early_relocs_info (struct frvfdpic_relocs_info *e2,
+ struct frvfdpic_relocs_info const *e1)
{
e2->got12 |= e1->got12;
e2->gotlos |= e1->gotlos;
@@ -879,8 +871,8 @@ frv_pic_merge_early_relocs_info (struct frv_pic_relocs_info *e2,
e2->sym |= e1->sym;
#if 0
- /* These are set in _frv_count_got_plt_entries() or later, and this
- function is only called in _frv_resolve_final_relocs_info(), that
+ /* These are set in _frvfdpic_count_got_plt_entries() or later, and this
+ function is only called in _frvfdpic_resolve_final_relocs_info(), that
runs just before it, so we don't have to worry about the fields
below. */
@@ -914,15 +906,15 @@ frv_pic_merge_early_relocs_info (struct frv_pic_relocs_info *e2,
32767, counting from 0). All other lazy PLT entries branch to it
in a single instruction. */
-#define FRV_LZPLT_BLOCK_SIZE ((bfd_vma) 8 * 65535 + 4)
-#define FRV_LZPLT_RESOLV_LOC (8 * 32767)
+#define FRVFDPIC_LZPLT_BLOCK_SIZE ((bfd_vma) 8 * 65535 + 4)
+#define FRVFDPIC_LZPLT_RESOLV_LOC (8 * 32767)
/* Add a dynamic relocation to the SRELOC section. */
inline static bfd_vma
-_frv_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
- int reloc_type, long dynindx, bfd_vma addend,
- struct frv_pic_relocs_info *entry)
+_frvfdpic_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
+ int reloc_type, long dynindx, bfd_vma addend,
+ struct frvfdpic_relocs_info *entry)
{
Elf_Internal_Rela outrel;
bfd_vma reloc_offset;
@@ -932,13 +924,23 @@ _frv_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
outrel.r_addend = addend;
reloc_offset = sreloc->reloc_count * sizeof (Elf32_External_Rel);
- BFD_ASSERT (reloc_offset < sreloc->_raw_size);
+ BFD_ASSERT (reloc_offset < sreloc->size);
bfd_elf32_swap_reloc_out (output_bfd, &outrel,
sreloc->contents + reloc_offset);
sreloc->reloc_count++;
- BFD_ASSERT (entry->dynrelocs > 0);
- entry->dynrelocs--;
+ /* If the entry's index is zero, this relocation was probably to a
+ linkonce section that got discarded. We reserved a dynamic
+ relocation, but it was for another entry than the one we got at
+ the time of emitting the relocation. Unfortunately there's no
+ simple way for us to catch this situation, since the relocation
+ is cleared right before calling relocate_section, at which point
+ we no longer know what the relocation used to point to. */
+ if (entry->symndx)
+ {
+ BFD_ASSERT (entry->dynrelocs > 0);
+ entry->dynrelocs--;
+ }
return reloc_offset;
}
@@ -946,8 +948,8 @@ _frv_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
/* Add a fixup to the ROFIXUP section. */
static bfd_vma
-_frv_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
- struct frv_pic_relocs_info *entry)
+_frvfdpic_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
+ struct frvfdpic_relocs_info *entry)
{
bfd_vma fixup_offset;
@@ -957,13 +959,15 @@ _frv_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
fixup_offset = rofixup->reloc_count * 4;
if (rofixup->contents)
{
- BFD_ASSERT (fixup_offset < rofixup->_raw_size);
+ BFD_ASSERT (fixup_offset < rofixup->size);
bfd_put_32 (output_bfd, offset, rofixup->contents + fixup_offset);
}
rofixup->reloc_count++;
- if (entry)
+ if (entry && entry->symndx)
{
+ /* See discussion about symndx == 0 in _frvfdpic_add_dyn_reloc
+ above. */
BFD_ASSERT (entry->fixups > 0);
entry->fixups--;
}
@@ -975,7 +979,7 @@ _frv_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
located. */
static unsigned
-_frv_osec_to_segment (bfd *output_bfd, asection *osec)
+_frvfdpic_osec_to_segment (bfd *output_bfd, asection *osec)
{
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
@@ -1000,9 +1004,9 @@ _frv_osec_to_segment (bfd *output_bfd, asection *osec)
}
inline static bfd_boolean
-_frv_osec_readonly_p (bfd *output_bfd, asection *osec)
+_frvfdpic_osec_readonly_p (bfd *output_bfd, asection *osec)
{
- unsigned seg = _frv_osec_to_segment (output_bfd, osec);
+ unsigned seg = _frvfdpic_osec_to_segment (output_bfd, osec);
return ! (elf_tdata (output_bfd)->phdr[seg].p_flags & PF_W);
}
@@ -1011,12 +1015,12 @@ _frv_osec_readonly_p (bfd *output_bfd, asection *osec)
code for PLT and lazy PLT entries. */
inline static bfd_boolean
-_frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
- bfd *output_bfd,
- struct bfd_link_info *info,
- asection *sec,
- Elf_Internal_Sym *sym,
- bfd_vma addend)
+_frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry,
+ bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ Elf_Internal_Sym *sym,
+ bfd_vma addend)
{
bfd_vma fd_lazy_rel_offset = (bfd_vma)-1;
@@ -1051,7 +1055,8 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (sec && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ if (sec && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (entry->symndx == -1)
ad += entry->d.h->root.u.def.value;
@@ -1068,32 +1073,36 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
omit the dynamic relocation as long as the symbol is local to
this module. */
if (info->executable && !info->pie
- && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (sec)
ad += sec->output_section->vma;
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->got_entry, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)->output_section
+ ->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->got_entry, entry);
}
else
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->got_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- R_FRV_32, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd, frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->got_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)->output_offset,
+ R_FRV_32, idx, ad, entry);
bfd_put_32 (output_bfd, ad,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->got_entry);
}
@@ -1106,7 +1115,7 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
if (! (entry->symndx == -1
&& entry->d.h->root.type == bfd_link_hash_undefweak
- && FRV_SYM_LOCAL (info, entry->d.h)))
+ && FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
/* If the symbol is dynamic and there may be dynamic symbol
resolution because we are, or are linked with, a shared
@@ -1115,8 +1124,9 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
symbol needs a non-local function descriptor but binds
locally (e.g., its visibility is protected, emit a
dynamic relocation decayed to section+offset. */
- if (entry->symndx == -1 && ! FRV_FUNCDESC_LOCAL (info, entry->d.h)
- && FRV_SYM_LOCAL (info, entry->d.h)
+ if (entry->symndx == -1
+ && ! FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)
+ && FRVFDPIC_SYM_LOCAL (info, entry->d.h)
&& !(info->executable && !info->pie))
{
reloc = R_FRV_FUNCDESC;
@@ -1126,7 +1136,7 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
+ entry->d.h->root.u.def.value;
}
else if (entry->symndx == -1
- && ! FRV_FUNCDESC_LOCAL (info, entry->d.h))
+ && ! FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h))
{
reloc = R_FRV_FUNCDESC;
idx = dynindx;
@@ -1141,10 +1151,10 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
if (elf_hash_table (info)->dynamic_sections_created)
BFD_ASSERT (entry->privfd);
reloc = R_FRV_32;
- idx = elf_section_data (frv_got_section (info)
+ idx = elf_section_data (frvfdpic_got_section (info)
->output_section)->dynindx;
- ad = frv_got_section (info)->output_offset
- + frv_got_initial_offset (info) + entry->fd_entry;
+ ad = frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info) + entry->fd_entry;
}
/* If there is room for dynamic symbol resolution, emit the
@@ -1155,30 +1165,36 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
of the private descriptor ourselves. */
if (info->executable && !info->pie
&& (entry->symndx != -1
- || FRV_FUNCDESC_LOCAL (info, entry->d.h)))
+ || FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)))
{
- ad += frv_got_section (info)->output_section->vma;
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fdgot_entry, entry);
+ ad += frvfdpic_got_section (info)->output_section->vma;
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fdgot_entry, entry);
}
else
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->fdgot_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- reloc, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->fdgot_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset,
+ reloc, idx, ad, entry);
}
bfd_put_32 (output_bfd, ad,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fdgot_entry);
}
@@ -1193,7 +1209,8 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (sec && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ if (sec && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (entry->symndx == -1)
ad += entry->d.h->root.u.def.value;
@@ -1210,7 +1227,7 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
omit the dynamic relocation as long as the symbol is local to
this module. */
if (info->executable && !info->pie
- && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ && (entry->symndx != -1 || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (sec)
ad += sec->output_section->vma;
@@ -1218,32 +1235,41 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
{
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fd_entry, entry);
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fd_entry + 4, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fd_entry, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fd_entry + 4, entry);
}
}
else
{
ofst =
- _frv_add_dyn_reloc (output_bfd,
- entry->lazyplt ? frv_pltrel_section (info)
- : frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->fd_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- R_FRV_FUNCDESC_VALUE, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ entry->lazyplt
+ ? frvfdpic_pltrel_section (info)
+ : frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->fd_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset,
+ R_FRV_FUNCDESC_VALUE, idx, ad, entry);
}
/* If we've omitted the dynamic relocation, just emit the fixed
@@ -1251,9 +1277,9 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
if (info->executable && !info->pie && sec && sec->output_section)
{
lowword = ad;
- highword = frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ highword = frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
}
else if (entry->lazyplt)
{
@@ -1269,10 +1295,10 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
entry point, that must be within the memory region
assigned to that section. */
lowword = entry->lzplt_entry + 4
- + frv_plt_section (info)->output_offset
- + frv_plt_section (info)->output_section->vma;
- highword = _frv_osec_to_segment
- (output_bfd, frv_plt_section (info)->output_section);
+ + frvfdpic_plt_section (info)->output_offset
+ + frvfdpic_plt_section (info)->output_section->vma;
+ highword = _frvfdpic_osec_to_segment
+ (output_bfd, frvfdpic_plt_section (info)->output_section);
}
else
{
@@ -1284,23 +1310,25 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
&& entry->d.h->dynindx == idx)
highword = 0;
else
- highword = _frv_osec_to_segment (output_bfd, sec->output_section);
+ highword = _frvfdpic_osec_to_segment
+ (output_bfd, sec->output_section);
}
bfd_put_32 (output_bfd, lowword,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fd_entry);
bfd_put_32 (output_bfd, highword,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fd_entry + 4);
}
/* Generate code for the PLT entry. */
if (entry->plt_entry != (bfd_vma) -1)
{
- bfd_byte *plt_code = frv_plt_section (info)->contents + entry->plt_entry;
+ bfd_byte *plt_code = frvfdpic_plt_section (info)->contents
+ + entry->plt_entry;
BFD_ASSERT (entry->fd_entry);
@@ -1353,17 +1381,17 @@ _frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
/* Generate code for the lazy PLT entry. */
if (entry->lzplt_entry != (bfd_vma) -1)
{
- bfd_byte *lzplt_code = frv_plt_section (info)->contents
+ bfd_byte *lzplt_code = frvfdpic_plt_section (info)->contents
+ entry->lzplt_entry;
bfd_vma resolverStub_addr;
bfd_put_32 (output_bfd, fd_lazy_rel_offset, lzplt_code);
lzplt_code += 4;
- resolverStub_addr = entry->lzplt_entry / FRV_LZPLT_BLOCK_SIZE
- * FRV_LZPLT_BLOCK_SIZE + FRV_LZPLT_RESOLV_LOC;
- if (resolverStub_addr >= frv_plt_initial_offset (info))
- resolverStub_addr = frv_plt_initial_offset (info) - 12;
+ resolverStub_addr = entry->lzplt_entry / FRVFDPIC_LZPLT_BLOCK_SIZE
+ * FRVFDPIC_LZPLT_BLOCK_SIZE + FRVFDPIC_LZPLT_RESOLV_LOC;
+ if (resolverStub_addr >= frvfdpic_plt_initial_offset (info))
+ resolverStub_addr = frvfdpic_plt_initial_offset (info) - 12;
if (entry->lzplt_entry == resolverStub_addr)
{
@@ -1767,8 +1795,8 @@ frv_info_to_howto_rela (abfd, cache_ptr, dst)
/* Set the howto pointer for an FRV ELF REL reloc. */
static void
-frv_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *cache_ptr, Elf_Internal_Rela *dst)
+frvfdpic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r_type;
@@ -1869,24 +1897,24 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
- isec_segment = _frv_osec_to_segment (output_bfd,
- input_section->output_section);
- if (frv_got_section (info))
- got_segment = _frv_osec_to_segment (output_bfd,
- frv_got_section (info)
- ->output_section);
+ isec_segment = _frvfdpic_osec_to_segment (output_bfd,
+ input_section->output_section);
+ if (IS_FDPIC (output_bfd) && frvfdpic_got_section (info))
+ got_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_got_section (info)
+ ->output_section);
else
got_segment = -1;
- if (frv_gotfixup_section (info))
- gprel_segment = _frv_osec_to_segment (output_bfd,
- frv_gotfixup_section (info)
- ->output_section);
+ if (IS_FDPIC (output_bfd) && frvfdpic_gotfixup_section (info))
+ gprel_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_gotfixup_section (info)
+ ->output_section);
else
gprel_segment = -1;
- if (elf_hash_table (info)->dynamic_sections_created)
- plt_segment = _frv_osec_to_segment (output_bfd,
- frv_plt_section (info)
- ->output_section);
+ if (IS_FDPIC (output_bfd) && elf_hash_table (info)->dynamic_sections_created)
+ plt_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_plt_section (info)
+ ->output_section);
else
plt_segment = -1;
@@ -1902,7 +1930,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
const char * name = NULL;
int r_type;
asection *osec;
- struct frv_pic_relocs_info *picrel;
+ struct frvfdpic_relocs_info *picrel;
bfd_vma orig_addend = rel->r_addend;
r_type = ELF32_R_TYPE (rel->r_info);
@@ -1940,7 +1968,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && ! FRV_SYM_LOCAL (info, h))
+ && ! FRVFDPIC_SYM_LOCAL (info, h))
{
sec = NULL;
relocation = 0;
@@ -1978,6 +2006,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
case R_FRV_LABEL24:
case R_FRV_32:
+ if (! IS_FDPIC (output_bfd))
+ goto non_fdpic;
+
case R_FRV_GOT12:
case R_FRV_GOTHI:
case R_FRV_GOTLO:
@@ -1993,25 +2024,26 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
case R_FRV_FUNCDESC:
case R_FRV_FUNCDESC_VALUE:
if (h != NULL)
- picrel = frv_pic_relocs_info_for_global (frv_relocs_info (info),
- input_bfd, h,
- orig_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_global (frvfdpic_relocs_info
+ (info), input_bfd, h,
+ orig_addend, INSERT);
else
/* In order to find the entry we created before, we must
use the original addend, not the one that may have been
modified by _bfd_elf_rela_local_sym(). */
- picrel = frv_pic_relocs_info_for_local (frv_relocs_info (info),
- input_bfd, r_symndx,
- orig_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_local (frvfdpic_relocs_info
+ (info), input_bfd, r_symndx,
+ orig_addend, INSERT);
if (! picrel)
return FALSE;
- if (!_frv_emit_got_relocs_plt_entries (picrel, output_bfd, info,
- osec, sym, rel->r_addend))
+ if (!_frvfdpic_emit_got_relocs_plt_entries (picrel, output_bfd, info,
+ osec, sym,
+ rel->r_addend))
{
- info->callbacks->warning
- (info, _("Dynamic relocation references symbol with nonzero addend"),
- name, input_bfd, input_section, rel->r_offset);
+ (*_bfd_error_handler)
+ (_("%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"),
+ input_bfd, input_section, rel->r_offset, name);
return FALSE;
}
@@ -2019,8 +2051,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
break;
default:
+ non_fdpic:
picrel = NULL;
- if (h && ! FRV_SYM_LOCAL (info, h))
+ if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
{
info->callbacks->warning
(info, _("relocation references symbol not defined in the module"),
@@ -2034,10 +2067,12 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
case R_FRV_LABEL24:
check_segment[0] = isec_segment;
- if (picrel->plt)
+ if (! IS_FDPIC (output_bfd))
+ check_segment[1] = isec_segment;
+ else if (picrel->plt)
{
- relocation = frv_plt_section (info)->output_section->vma
- + frv_plt_section (info)->output_offset
+ relocation = frvfdpic_plt_section (info)->output_section->vma
+ + frvfdpic_plt_section (info)->output_offset
+ picrel->plt_entry;
check_segment[1] = plt_segment;
}
@@ -2050,7 +2085,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
check_segment[1] = check_segment[0];
else
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
@@ -2071,12 +2106,12 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
case R_FRV_GOTOFFHI:
case R_FRV_GOTOFF12:
case R_FRV_GOTOFFLO:
- relocation -= frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ relocation -= frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
check_segment[0] = got_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
@@ -2093,7 +2128,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma addend = rel->r_addend;
if (! (h && h->root.type == bfd_link_hash_undefweak
- && FRV_SYM_LOCAL (info, h)))
+ && FRVFDPIC_SYM_LOCAL (info, h)))
{
/* If the symbol is dynamic and there may be dynamic
symbol resolution because we are or are linked with a
@@ -2103,8 +2138,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
descriptor but binds locally (e.g., its visibility is
protected, emit a dynamic relocation decayed to
section+offset. */
- if (h && ! FRV_FUNCDESC_LOCAL (info, h)
- && FRV_SYM_LOCAL (info, h)
+ if (h && ! FRVFDPIC_FUNCDESC_LOCAL (info, h)
+ && FRVFDPIC_SYM_LOCAL (info, h)
&& !(info->executable && !info->pie))
{
dynindx = elf_section_data (h->root.u.def.section
@@ -2112,7 +2147,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
addend += h->root.u.def.section->output_offset
+ h->root.u.def.value;
}
- else if (h && ! FRV_FUNCDESC_LOCAL (info, h))
+ else if (h && ! FRVFDPIC_FUNCDESC_LOCAL (info, h))
{
if (addend)
{
@@ -2129,10 +2164,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
descriptor, so reference it directly. */
BFD_ASSERT (picrel->privfd);
r_type = R_FRV_32;
- dynindx = elf_section_data (frv_got_section (info)
+ dynindx = elf_section_data (frvfdpic_got_section (info)
->output_section)->dynindx;
- addend = frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
+ addend = frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info)
+ picrel->fd_entry;
}
@@ -2143,15 +2178,16 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
be zero, which means we can and should compute the
address of the private descriptor ourselves. */
if (info->executable && !info->pie
- && (!h || FRV_FUNCDESC_LOCAL (info, h)))
+ && (!h || FRVFDPIC_FUNCDESC_LOCAL (info, h)))
{
- addend += frv_got_section (info)->output_section->vma;
+ addend += frvfdpic_got_section (info)->output_section->vma;
if ((bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
@@ -2159,22 +2195,25 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_rofixup (output_bfd,
- frv_gotfixup_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- picrel);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section
+ (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ picrel);
}
}
else if ((bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
@@ -2182,14 +2221,18 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- r_type, dynindx, addend, picrel);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ r_type, dynindx, addend, picrel);
}
+ else
+ addend += frvfdpic_got_section (info)->output_section->vma;
}
/* We want the addend in-place because dynamic
@@ -2201,6 +2244,12 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case R_FRV_32:
+ if (! IS_FDPIC (output_bfd))
+ {
+ check_segment[0] = check_segment[1] = -1;
+ break;
+ }
+ /* Fall through. */
case R_FRV_FUNCDESC_VALUE:
{
int dynindx;
@@ -2208,7 +2257,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (h && ! FRV_SYM_LOCAL (info, h))
+ if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
{
if (addend && r_type == R_FRV_FUNCDESC_VALUE)
{
@@ -2240,17 +2289,18 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
is defined in the current link unit (which is implied
by its output section not being NULL). */
if (info->executable && !info->pie
- && (!h || FRV_SYM_LOCAL (info, h)))
+ && (!h || FRVFDPIC_SYM_LOCAL (info, h)))
{
if (osec)
addend += osec->output_section->vma;
- if ((elf_elfheader (input_bfd)->e_flags & EF_FRV_FDPIC)
+ if (IS_FDPIC (input_bfd)
&& (bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
@@ -2260,18 +2310,20 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (!h || h->root.type != bfd_link_hash_undefweak)
{
- _frv_add_rofixup (output_bfd,
- frv_gotfixup_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- picrel);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section
+ (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ picrel);
if (r_type == R_FRV_FUNCDESC_VALUE)
- _frv_add_rofixup
+ _frvfdpic_add_rofixup
(output_bfd,
- frv_gotfixup_section (info),
+ frvfdpic_gotfixup_section (info),
_bfd_elf_section_offset
(output_bfd, info,
input_section, rel->r_offset)
@@ -2286,8 +2338,9 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
@@ -2295,14 +2348,18 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- r_type, dynindx, addend, picrel);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ r_type, dynindx, addend, picrel);
}
+ else if (osec)
+ addend += osec->output_section->vma;
/* We want the addend in-place because dynamic
relocations are REL. Setting relocation to it
should arrange for it to be installed. */
@@ -2315,11 +2372,11 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
the fixed addresses of the symbol and of the local
GOT base offset. */
if (info->executable && !info->pie
- && (!h || FRV_SYM_LOCAL (info, h)))
+ && (!h || FRVFDPIC_SYM_LOCAL (info, h)))
bfd_put_32 (output_bfd,
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info),
+ frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info),
contents + rel->r_offset + 4);
else
/* A function descriptor used for lazy or local
@@ -2329,10 +2386,11 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
contains the offset of the lazy PLT entry entry
point into that section. */
bfd_put_32 (output_bfd,
- h && ! FRV_SYM_LOCAL (info, h)
+ h && ! FRVFDPIC_SYM_LOCAL (info, h)
? 0
- : _frv_osec_to_segment (output_bfd,
- sec->output_section),
+ : _frvfdpic_osec_to_segment (output_bfd,
+ sec
+ ->output_section),
contents + rel->r_offset + 4);
}
}
@@ -2346,22 +2404,22 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
case R_FRV_GPRELLO:
check_segment[0] = gprel_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
default:
check_segment[0] = isec_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
}
- if (check_segment[0] != check_segment[1]
- && (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC))
+ if (check_segment[0] != check_segment[1] && IS_FDPIC (output_bfd))
{
-#if 1
+#if 1 /* If you take this out, remove the #error from fdpic-static-6.d
+ in the ld testsuite. */
/* This helps catch problems in GCC while we can't do more
than static linking. The idea is to test whether the
input file basename is crt0.o only once. */
@@ -2418,7 +2476,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
case R_FRV_LABEL24:
- if (! picrel->plt)
+ if (! IS_FDPIC (output_bfd) || ! picrel->plt)
break;
/* Fall through. */
@@ -2615,7 +2673,32 @@ elf32_frv_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return TRUE;
}
-/* Create a .got section, as well as its additional info field. This
+
+/* We need dynamic symbols for every section, since segments can
+ relocate independently. */
+static bfd_boolean
+_frvfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info
+ ATTRIBUTE_UNUSED,
+ asection *p ATTRIBUTE_UNUSED)
+{
+ switch (elf_section_data (p)->this_hdr.sh_type)
+ {
+ case SHT_PROGBITS:
+ case SHT_NOBITS:
+ /* If sh_type is yet undecided, assume it could be
+ SHT_PROGBITS/SHT_NOBITS. */
+ case SHT_NULL:
+ return FALSE;
+
+ /* There shouldn't be section relative relocations
+ against any other section. */
+ default:
+ return TRUE;
+ }
+}
+
+/* Create a .got section, as well as its additional info field. This
is almost entirely copied from
elflink.c:_bfd_elf_create_got_section(). */
@@ -2628,6 +2711,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info)
struct bfd_link_hash_entry *bh;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
+ int offset;
/* This function may be called more than once. */
s = bfd_get_section_by_name (abfd, ".got");
@@ -2683,40 +2767,50 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info)
}
/* The first bit of the global offset table is the header. */
- s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
+ s->size += bed->got_header_size + bed->got_symbol_offset;
/* This is the machine-specific part. Create and initialize section
data for the got. */
- frv_got_section (info) = s;
- frv_relocs_info (info) = htab_try_create (1, frv_pic_relocs_info_hash,
- frv_pic_relocs_info_eq,
- (htab_del) NULL);
- if (! frv_relocs_info (info))
- return FALSE;
+ if (IS_FDPIC (abfd))
+ {
+ frvfdpic_got_section (info) = s;
+ frvfdpic_relocs_info (info) = htab_try_create (1, frvfdpic_relocs_info_hash,
+ frvfdpic_relocs_info_eq,
+ (htab_del) NULL);
+ if (! frvfdpic_relocs_info (info))
+ return FALSE;
- s = bfd_make_section (abfd, ".rel.got");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
- || ! bfd_set_section_alignment (abfd, s, 2))
- return FALSE;
+ s = bfd_make_section (abfd, ".rel.got");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return FALSE;
- frv_gotrel_section (info) = s;
+ frvfdpic_gotrel_section (info) = s;
- /* Machine-specific. */
- s = bfd_make_section (abfd, ".rofixup");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
- || ! bfd_set_section_alignment (abfd, s, 2))
- return FALSE;
+ /* Machine-specific. */
+ s = bfd_make_section (abfd, ".rofixup");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return FALSE;
- frv_gotfixup_section (info) = s;
+ frvfdpic_gotfixup_section (info) = s;
+ offset = -2048;
+ flags = BSF_GLOBAL;
+ }
+ else
+ {
+ offset = 2048;
+ flags = BSF_GLOBAL | BSF_WEAK;
+ }
- /* Define _gp in .rofixup, for FDPIC. If it turns out that
- we're linking with a different linker script, the linker script
- will override it. */
+ /* Define _gp in .rofixup, for FDPIC, or .got otherwise. If it
+ turns out that we're linking with a different linker script, the
+ linker script will override it. */
bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_gp", BSF_GLOBAL, s, -2048, (const char *) NULL, FALSE,
+ (info, abfd, "_gp", flags, s, offset, (const char *) NULL, FALSE,
bed->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
@@ -2724,9 +2818,9 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info)
h->type = STT_OBJECT;
/* Machine-specific: we want the symbol for executables as well. */
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ if (IS_FDPIC (abfd) && ! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
-
+
return TRUE;
}
@@ -2734,7 +2828,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info)
the link hash table point to them. */
static bfd_boolean
-elf32_frv_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
+elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
/* This is mostly copied from
elflink.c:_bfd_elf_create_dynamic_sections(). */
@@ -2761,7 +2855,7 @@ elf32_frv_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return FALSE;
/* FRV-specific: remember it. */
- frv_plt_section (info) = s;
+ frvfdpic_plt_section (info) = s;
if (bed->want_plt_sym)
{
@@ -2790,16 +2884,17 @@ elf32_frv_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
/* FRV-specific: remember it. */
- frv_pltrel_section (info) = s;
+ frvfdpic_pltrel_section (info) = s;
/* FRV-specific: we want to create the GOT in the FRV way. */
if (! _frv_create_got_section (abfd, info))
return FALSE;
/* FRV-specific: make sure we created everything we wanted. */
- BFD_ASSERT (frv_got_section (info) && frv_gotrel_section (info)
- && frv_gotfixup_section (info)
- && frv_plt_section (info) && frv_pltrel_section (info));
+ BFD_ASSERT (frvfdpic_got_section (info) && frvfdpic_gotrel_section (info)
+ && frvfdpic_gotfixup_section (info)
+ && frvfdpic_plt_section (info)
+ && frvfdpic_pltrel_section (info));
if (bed->want_dynbss)
{
@@ -2849,7 +2944,7 @@ elf32_frv_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
/* This structure is used to collect the number of entries present in
each addressable range of the got. */
-struct _frv_dynamic_got_info
+struct _frvfdpic_dynamic_got_info
{
/* Several bits of information about the current link. */
struct bfd_link_info *info;
@@ -2877,10 +2972,10 @@ struct _frv_dynamic_got_info
private function descriptors taking two words. */
static int
-_frv_count_got_plt_entries (void **entryp, void *dinfo_)
+_frvfdpic_count_got_plt_entries (void **entryp, void *dinfo_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_info *dinfo = dinfo_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_info *dinfo = dinfo_;
unsigned relocs = 0, fixups = 0;
/* Allocate space for a GOT entry pointing to the symbol. */
@@ -2909,15 +3004,15 @@ _frv_count_got_plt_entries (void **entryp, void *dinfo_)
/* Decide whether we need a PLT entry, a function descriptor in the
GOT, and a lazy PLT entry for this symbol. */
entry->plt = entry->call
- && entry->symndx == -1 && ! FRV_SYM_LOCAL (dinfo->info, entry->d.h)
+ && entry->symndx == -1 && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)
&& elf_hash_table (dinfo->info)->dynamic_sections_created;
entry->privfd = entry->plt
|| entry->fdgoff12 || entry->fdgofflos || entry->fdgoffhilo
|| ((entry->fd || entry->fdgot12 || entry->fdgotlos || entry->fdgothilo)
&& (entry->symndx != -1
- || FRV_FUNCDESC_LOCAL (dinfo->info, entry->d.h)));
+ || FRVFDPIC_FUNCDESC_LOCAL (dinfo->info, entry->d.h)));
entry->lazyplt = entry->privfd
- && entry->symndx == -1 && ! FRV_SYM_LOCAL (dinfo->info, entry->d.h)
+ && entry->symndx == -1 && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)
&& ! (dinfo->info->flags & DF_BIND_NOW)
&& elf_hash_table (dinfo->info)->dynamic_sections_created;
@@ -2941,7 +3036,7 @@ _frv_count_got_plt_entries (void **entryp, void *dinfo_)
relocs = entry->relocs32 + entry->relocsfd + entry->relocsfdv;
else
{
- if (entry->symndx != -1 || FRV_SYM_LOCAL (dinfo->info, entry->d.h))
+ if (entry->symndx != -1 || FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h))
{
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
@@ -2950,7 +3045,8 @@ _frv_count_got_plt_entries (void **entryp, void *dinfo_)
else
relocs += entry->relocs32 + entry->relocsfdv;
- if (entry->symndx != -1 || FRV_FUNCDESC_LOCAL (dinfo->info, entry->d.h))
+ if (entry->symndx != -1
+ || FRVFDPIC_FUNCDESC_LOCAL (dinfo->info, entry->d.h))
{
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
@@ -2971,10 +3067,10 @@ _frv_count_got_plt_entries (void **entryp, void *dinfo_)
/* This structure is used to assign offsets to got entries, function
descriptors, plt entries and lazy plt entries. */
-struct _frv_dynamic_got_plt_info
+struct _frvfdpic_dynamic_got_plt_info
{
- /* Summary information collected with _frv_count_got_plt_entries. */
- struct _frv_dynamic_got_info g;
+ /* Summary information collected with _frvfdpic_count_got_plt_entries. */
+ struct _frvfdpic_dynamic_got_info g;
/* For each addressable range, we record a MAX (positive) and MIN
(negative) value. CUR is used to assign got entries, and it's
@@ -2990,7 +3086,7 @@ struct _frv_dynamic_got_plt_info
descriptor is chosen. FDPLT indicates the number of remaining
slots that can be used for function descriptors used only by PLT
entries. */
- struct _frv_dynamic_got_alloc_data
+ struct _frvfdpic_dynamic_got_alloc_data
{
bfd_signed_vma max, cur, odd, fdcur, min;
bfd_vma fdplt;
@@ -3008,14 +3104,14 @@ struct _frv_dynamic_got_plt_info
descriptors. */
inline static bfd_signed_vma
-_frv_compute_got_alloc_data (struct _frv_dynamic_got_alloc_data *gad,
- bfd_signed_vma fdcur,
- bfd_signed_vma odd,
- bfd_signed_vma cur,
- bfd_vma got,
- bfd_vma fd,
- bfd_vma fdplt,
- bfd_vma wrap)
+_frvfdpic_compute_got_alloc_data (struct _frvfdpic_dynamic_got_alloc_data *gad,
+ bfd_signed_vma fdcur,
+ bfd_signed_vma odd,
+ bfd_signed_vma cur,
+ bfd_vma got,
+ bfd_vma fd,
+ bfd_vma fdplt,
+ bfd_vma wrap)
{
bfd_signed_vma wrapmin = -wrap;
@@ -3109,7 +3205,7 @@ _frv_compute_got_alloc_data (struct _frv_dynamic_got_alloc_data *gad,
if (odd > gad->max)
odd = gad->min + odd - gad->max;
- /* _frv_get_got_entry() below will always wrap gad->cur if needed
+ /* _frvfdpic_get_got_entry() below will always wrap gad->cur if needed
before returning, so do it here too. This guarantees that,
should cur and fdcur meet at the wrap point, they'll both be
equal to min. */
@@ -3123,7 +3219,7 @@ _frv_compute_got_alloc_data (struct _frv_dynamic_got_alloc_data *gad,
data for a range. */
inline static bfd_signed_vma
-_frv_get_got_entry (struct _frv_dynamic_got_alloc_data *gad)
+_frvfdpic_get_got_entry (struct _frvfdpic_dynamic_got_alloc_data *gad)
{
bfd_signed_vma ret;
@@ -3152,7 +3248,7 @@ _frv_get_got_entry (struct _frv_dynamic_got_alloc_data *gad)
GOT, given the allocation data for a range. */
inline static bfd_signed_vma
-_frv_get_fd_entry (struct _frv_dynamic_got_alloc_data *gad)
+_frvfdpic_get_fd_entry (struct _frvfdpic_dynamic_got_alloc_data *gad)
{
/* If we're at the bottom, wrap around, and only then allocate the
next pair of words. */
@@ -3165,46 +3261,46 @@ _frv_get_fd_entry (struct _frv_dynamic_got_alloc_data *gad)
Doing everything in a single pass is tricky. */
static int
-_frv_assign_got_entries (void **entryp, void *info_)
+_frvfdpic_assign_got_entries (void **entryp, void *info_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_plt_info *dinfo = info_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_plt_info *dinfo = info_;
if (entry->got12)
- entry->got_entry = _frv_get_got_entry (&dinfo->got12);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->got12);
else if (entry->gotlos)
- entry->got_entry = _frv_get_got_entry (&dinfo->gotlos);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->gotlos);
else if (entry->gothilo)
- entry->got_entry = _frv_get_got_entry (&dinfo->gothilo);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->gothilo);
if (entry->fdgot12)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->got12);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->got12);
else if (entry->fdgotlos)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->gotlos);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->gotlos);
else if (entry->fdgothilo)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->gothilo);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->gothilo);
if (entry->fdgoff12)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
else if (entry->plt && dinfo->got12.fdplt)
{
dinfo->got12.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
}
else if (entry->fdgofflos)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
else if (entry->plt && dinfo->gotlos.fdplt)
{
dinfo->gotlos.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
}
else if (entry->plt)
{
dinfo->gothilo.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
}
else if (entry->privfd)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
return 1;
}
@@ -3214,10 +3310,10 @@ _frv_assign_got_entries (void **entryp, void *info_)
and lazy PLT entries. */
static int
-_frv_assign_plt_entries (void **entryp, void *info_)
+_frvfdpic_assign_plt_entries (void **entryp, void *info_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_plt_info *dinfo = info_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_plt_info *dinfo = info_;
/* If this symbol requires a local function descriptor, allocate
one. */
@@ -3225,18 +3321,18 @@ _frv_assign_plt_entries (void **entryp, void *info_)
{
if (dinfo->got12.fdplt)
{
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
dinfo->got12.fdplt -= 8;
}
else if (dinfo->gotlos.fdplt)
{
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
dinfo->gotlos.fdplt -= 8;
}
else
{
BFD_ASSERT (dinfo->gothilo.fdplt)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
dinfo->gothilo.fdplt -= 8;
}
}
@@ -3247,7 +3343,7 @@ _frv_assign_plt_entries (void **entryp, void *info_)
/* We use the section's raw size to mark the location of the
next PLT entry. */
- entry->plt_entry = frv_plt_section (dinfo->g.info)->_raw_size;
+ entry->plt_entry = frvfdpic_plt_section (dinfo->g.info)->size;
/* Figure out the length of this PLT entry based on the
addressing mode we need to reach the function descriptor. */
@@ -3261,7 +3357,7 @@ _frv_assign_plt_entries (void **entryp, void *info_)
else
size = 16;
- frv_plt_section (dinfo->g.info)->_raw_size += size;
+ frvfdpic_plt_section (dinfo->g.info)->size += size;
}
if (entry->lazyplt)
@@ -3270,7 +3366,8 @@ _frv_assign_plt_entries (void **entryp, void *info_)
dinfo->g.lzplt += 8;
/* If this entry is the one that gets the resolver stub, account
for the additional instruction. */
- if (entry->lzplt_entry % FRV_LZPLT_BLOCK_SIZE == FRV_LZPLT_RESOLV_LOC)
+ if (entry->lzplt_entry % FRVFDPIC_LZPLT_BLOCK_SIZE
+ == FRVFDPIC_LZPLT_RESOLV_LOC)
dinfo->g.lzplt += 4;
}
@@ -3284,15 +3381,15 @@ _frv_assign_plt_entries (void **entryp, void *info_)
we've made a potentially-destructive change to the hash table, so
the traversal must be restarted. */
static int
-_frv_resolve_final_relocs_info (void **entryp, void *p)
+_frvfdpic_resolve_final_relocs_info (void **entryp, void *p)
{
- struct frv_pic_relocs_info *entry = *entryp;
+ struct frvfdpic_relocs_info *entry = *entryp;
htab_t *htab = p;
if (entry->symndx == -1)
{
struct elf_link_hash_entry *h = entry->d.h;
- struct frv_pic_relocs_info *oentry;
+ struct frvfdpic_relocs_info *oentry;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
@@ -3301,13 +3398,13 @@ _frv_resolve_final_relocs_info (void **entryp, void *p)
if (entry->d.h == h)
return 1;
- oentry = frv_pic_relocs_info_for_global (*htab, 0, h, entry->addend,
- NO_INSERT);
+ oentry = frvfdpic_relocs_info_for_global (*htab, 0, h, entry->addend,
+ NO_INSERT);
if (oentry)
{
/* Merge the two entries. */
- frv_pic_merge_early_relocs_info (oentry, entry);
+ frvfdpic_pic_merge_early_relocs_info (oentry, entry);
htab_clear_slot (*htab, entryp);
return 1;
}
@@ -3336,12 +3433,12 @@ _frv_resolve_final_relocs_info (void **entryp, void *p)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf32_frv_size_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *s;
- struct _frv_dynamic_got_plt_info gpinfo;
+ struct _frvfdpic_dynamic_got_plt_info gpinfo;
bfd_signed_vma odd;
bfd_vma limit;
@@ -3355,7 +3452,7 @@ elf32_frv_size_dynamic_sections (bfd *output_bfd,
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -3365,15 +3462,15 @@ elf32_frv_size_dynamic_sections (bfd *output_bfd,
for (;;)
{
- htab_t relocs = frv_relocs_info (info);
+ htab_t relocs = frvfdpic_relocs_info (info);
- htab_traverse (relocs, _frv_resolve_final_relocs_info, &relocs);
+ htab_traverse (relocs, _frvfdpic_resolve_final_relocs_info, &relocs);
- if (relocs == frv_relocs_info (info))
+ if (relocs == frvfdpic_relocs_info (info))
break;
}
- htab_traverse (frv_relocs_info (info), _frv_count_got_plt_entries,
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_count_got_plt_entries,
&gpinfo.g);
odd = 12;
@@ -3392,160 +3489,166 @@ elf32_frv_size_dynamic_sections (bfd *output_bfd,
/* Determine the ranges of GOT offsets that we can use for each
range of addressing modes. */
- odd = _frv_compute_got_alloc_data (&gpinfo.got12,
- 0,
- odd,
- 16,
- gpinfo.g.got12,
- gpinfo.g.fd12,
- limit,
- (bfd_vma)1 << (12-1));
- odd = _frv_compute_got_alloc_data (&gpinfo.gotlos,
- gpinfo.got12.min,
- odd,
- gpinfo.got12.max,
- gpinfo.g.gotlos,
- gpinfo.g.fdlos,
- gpinfo.g.fdplt - gpinfo.got12.fdplt,
- (bfd_vma)1 << (16-1));
- odd = _frv_compute_got_alloc_data (&gpinfo.gothilo,
- gpinfo.gotlos.min,
- odd,
- gpinfo.gotlos.max,
- gpinfo.g.gothilo,
- gpinfo.g.fdhilo,
- gpinfo.g.fdplt - gpinfo.got12.fdplt
- - gpinfo.gotlos.fdplt,
- (bfd_vma)1 << (32-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.got12,
+ 0,
+ odd,
+ 16,
+ gpinfo.g.got12,
+ gpinfo.g.fd12,
+ limit,
+ (bfd_vma)1 << (12-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.gotlos,
+ gpinfo.got12.min,
+ odd,
+ gpinfo.got12.max,
+ gpinfo.g.gotlos,
+ gpinfo.g.fdlos,
+ gpinfo.g.fdplt - gpinfo.got12.fdplt,
+ (bfd_vma)1 << (16-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.gothilo,
+ gpinfo.gotlos.min,
+ odd,
+ gpinfo.gotlos.max,
+ gpinfo.g.gothilo,
+ gpinfo.g.fdhilo,
+ gpinfo.g.fdplt - gpinfo.got12.fdplt
+ - gpinfo.gotlos.fdplt,
+ (bfd_vma)1 << (32-1));
/* Now assign (most) GOT offsets. */
- htab_traverse (frv_relocs_info (info), _frv_assign_got_entries, &gpinfo);
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_assign_got_entries,
+ &gpinfo);
- frv_got_section (info)->_raw_size = gpinfo.gothilo.max - gpinfo.gothilo.min
+ frvfdpic_got_section (info)->size = gpinfo.gothilo.max
+ - gpinfo.gothilo.min
/* If an odd word is the last word of the GOT, we don't need this
word to be part of the GOT. */
- (odd + 4 == gpinfo.gothilo.max ? 4 : 0);
- if (frv_got_section (info)->_raw_size == 0)
- frv_got_section (info)->flags |= SEC_EXCLUDE;
- else if (frv_got_section (info)->_raw_size == 12
+ if (frvfdpic_got_section (info)->size == 0)
+ frvfdpic_got_section (info)->flags |= SEC_EXCLUDE;
+ else if (frvfdpic_got_section (info)->size == 12
&& ! elf_hash_table (info)->dynamic_sections_created)
{
- frv_got_section (info)->flags |= SEC_EXCLUDE;
- frv_got_section (info)->_raw_size = 0;
+ frvfdpic_got_section (info)->flags |= SEC_EXCLUDE;
+ frvfdpic_got_section (info)->size = 0;
}
else
{
- frv_got_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_got_section (info)->_raw_size);
- if (frv_got_section (info)->contents == NULL)
+ frvfdpic_got_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_got_section (info)->size);
+ if (frvfdpic_got_section (info)->contents == NULL)
return FALSE;
}
if (elf_hash_table (info)->dynamic_sections_created)
/* Subtract the number of lzplt entries, since those will generate
relocations in the pltrel section. */
- frv_gotrel_section (info)->_raw_size =
+ frvfdpic_gotrel_section (info)->size =
(gpinfo.g.relocs - gpinfo.g.lzplt / 8)
* get_elf_backend_data (output_bfd)->s->sizeof_rel;
else
BFD_ASSERT (gpinfo.g.relocs == 0);
- if (frv_gotrel_section (info)->_raw_size == 0)
- frv_gotrel_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_gotrel_section (info)->size == 0)
+ frvfdpic_gotrel_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_gotrel_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_gotrel_section (info)->_raw_size);
- if (frv_gotrel_section (info)->contents == NULL)
+ frvfdpic_gotrel_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_gotrel_section (info)->size);
+ if (frvfdpic_gotrel_section (info)->contents == NULL)
return FALSE;
}
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- frv_gotfixup_section (info)->_raw_size = (gpinfo.g.fixups + 1) * 4;
- if (frv_gotfixup_section (info)->_raw_size == 0)
- frv_gotfixup_section (info)->flags |= SEC_EXCLUDE;
+ frvfdpic_gotfixup_section (info)->size = (gpinfo.g.fixups + 1) * 4;
+ if (frvfdpic_gotfixup_section (info)->size == 0)
+ frvfdpic_gotfixup_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_gotfixup_section (info)->contents =
+ frvfdpic_gotfixup_section (info)->contents =
(bfd_byte *) bfd_zalloc (dynobj,
- frv_gotfixup_section (info)->_raw_size);
- if (frv_gotfixup_section (info)->contents == NULL)
+ frvfdpic_gotfixup_section (info)->size);
+ if (frvfdpic_gotfixup_section (info)->contents == NULL)
return FALSE;
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- frv_pltrel_section (info)->_raw_size =
+ frvfdpic_pltrel_section (info)->size =
gpinfo.g.lzplt / 8 * get_elf_backend_data (output_bfd)->s->sizeof_rel;
- if (frv_pltrel_section (info)->_raw_size == 0)
- frv_pltrel_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_pltrel_section (info)->size == 0)
+ frvfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_pltrel_section (info)->contents =
+ frvfdpic_pltrel_section (info)->contents =
(bfd_byte *) bfd_zalloc (dynobj,
- frv_pltrel_section (info)->_raw_size);
- if (frv_pltrel_section (info)->contents == NULL)
+ frvfdpic_pltrel_section (info)->size);
+ if (frvfdpic_pltrel_section (info)->contents == NULL)
return FALSE;
}
}
/* Add 4 bytes for every block of at most 65535 lazy PLT entries,
such that there's room for the additional instruction needed to
- call the resolver. Since _frv_assign_got_entries didn't account
- for them, our block size is 4 bytes smaller than the real block
- size. */
+ call the resolver. Since _frvfdpic_assign_got_entries didn't
+ account for them, our block size is 4 bytes smaller than the real
+ block size. */
if (elf_hash_table (info)->dynamic_sections_created)
{
- frv_plt_section (info)->_raw_size = gpinfo.g.lzplt
- + ((gpinfo.g.lzplt + (FRV_LZPLT_BLOCK_SIZE - 4) - 8)
- / (FRV_LZPLT_BLOCK_SIZE - 4) * 4);
+ frvfdpic_plt_section (info)->size = gpinfo.g.lzplt
+ + ((gpinfo.g.lzplt + (FRVFDPIC_LZPLT_BLOCK_SIZE - 4) - 8)
+ / (FRVFDPIC_LZPLT_BLOCK_SIZE - 4) * 4);
}
- /* Reset it, such that _frv_assign_plt_entries() can use it to
+ /* Reset it, such that _frvfdpic_assign_plt_entries() can use it to
actually assign lazy PLT entries addresses. */
gpinfo.g.lzplt = 0;
/* Save information that we're going to need to generate GOT and PLT
entries. */
- frv_got_initial_offset (info) = -gpinfo.gothilo.min;
+ frvfdpic_got_initial_offset (info) = -gpinfo.gothilo.min;
if (get_elf_backend_data (output_bfd)->want_got_sym)
elf_hash_table (info)->hgot->root.u.def.value
- += frv_got_initial_offset (info);
+ += frvfdpic_got_initial_offset (info);
if (elf_hash_table (info)->dynamic_sections_created)
- frv_plt_initial_offset (info) = frv_plt_section (info)->_raw_size;
+ frvfdpic_plt_initial_offset (info) =
+ frvfdpic_plt_section (info)->size;
- htab_traverse (frv_relocs_info (info), _frv_assign_plt_entries, &gpinfo);
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_assign_plt_entries,
+ &gpinfo);
/* Allocate the PLT section contents only after
- _frv_assign_plt_entries has a chance to add the size of the
+ _frvfdpic_assign_plt_entries has a chance to add the size of the
non-lazy PLT entries. */
if (elf_hash_table (info)->dynamic_sections_created)
{
- if (frv_plt_section (info)->_raw_size == 0)
- frv_plt_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_plt_section (info)->size == 0)
+ frvfdpic_plt_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_plt_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_plt_section (info)->_raw_size);
- if (frv_plt_section (info)->contents == NULL)
+ frvfdpic_plt_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_plt_section (info)->size);
+ if (frvfdpic_plt_section (info)->contents == NULL)
return FALSE;
}
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- if (frv_got_section (info)->_raw_size)
+ if (frvfdpic_got_section (info)->size)
if (!_bfd_elf_add_dynamic_entry (info, DT_PLTGOT, 0))
return FALSE;
- if (frv_pltrel_section (info)->_raw_size)
+ if (frvfdpic_pltrel_section (info)->size)
if (!_bfd_elf_add_dynamic_entry (info, DT_PLTRELSZ, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_PLTREL, DT_REL)
|| !_bfd_elf_add_dynamic_entry (info, DT_JMPREL, 0))
return FALSE;
- if (frv_gotrel_section (info)->_raw_size)
+ if (frvfdpic_gotrel_section (info)->size)
if (!_bfd_elf_add_dynamic_entry (info, DT_REL, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_RELSZ, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_RELENT,
@@ -3557,11 +3660,10 @@ elf32_frv_size_dynamic_sections (bfd *output_bfd,
}
static bfd_boolean
-elf32_frv_always_size_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_always_size_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
- if (!info->relocatable
- && elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
+ if (!info->relocatable)
{
struct elf_link_hash_entry *h;
asection *sec;
@@ -3603,45 +3705,47 @@ elf32_frv_always_size_sections (bfd *output_bfd,
}
static bfd_boolean
-elf32_frv_modify_segment_map (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_modify_segment_map (bfd *output_bfd,
+ struct bfd_link_info *info)
{
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- {
- struct elf_segment_map *m;
+ struct elf_segment_map *m;
- for (m = elf_tdata (output_bfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_GNU_STACK)
- break;
+ /* objcopy and strip preserve what's already there using
+ elf32_frvfdpic_copy_private_bfd_data (). */
+ if (! info)
+ return TRUE;
+
+ for (m = elf_tdata (output_bfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_GNU_STACK)
+ break;
- if (m)
+ if (m)
+ {
+ asection *sec = bfd_get_section_by_name (output_bfd, ".stack");
+ struct elf_link_hash_entry *h;
+
+ if (sec)
{
- asection *sec = bfd_get_section_by_name (output_bfd, ".stack");
- struct elf_link_hash_entry *h;
+ /* Obtain the pointer to the __stacksize symbol. */
+ h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
+ FALSE, FALSE, FALSE);
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *)h->root.u.i.link;
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined);
- if (sec)
- {
- /* Obtain the pointer to the __stacksize symbol. */
- h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
- FALSE, FALSE, FALSE);
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *)h->root.u.i.link;
- BFD_ASSERT (h->root.type == bfd_link_hash_defined);
-
- /* Set the section size from the symbol value. We
- intentionally ignore the symbol section. */
- if (h->root.type == bfd_link_hash_defined)
- sec->_raw_size = h->root.u.def.value;
- else
- sec->_raw_size = DEFAULT_STACK_SIZE;
-
- /* Add the stack section to the PT_GNU_STACK segment,
- such that its size and alignment requirements make it
- to the segment. */
- m->sections[m->count] = sec;
- m->count++;
- }
+ /* Set the section size from the symbol value. We
+ intentionally ignore the symbol section. */
+ if (h->root.type == bfd_link_hash_defined)
+ sec->size = h->root.u.def.value;
+ else
+ sec->size = DEFAULT_STACK_SIZE;
+
+ /* Add the stack section to the PT_GNU_STACK segment,
+ such that its size and alignment requirements make it
+ to the segment. */
+ m->sections[m->count] = sec;
+ m->count++;
}
}
@@ -3651,60 +3755,51 @@ elf32_frv_modify_segment_map (bfd *output_bfd,
/* Fill in code and data in dynamic sections. */
static bfd_boolean
-elf32_frv_finish_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frv_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ /* Nothing to be done for non-FDPIC. */
+ return TRUE;
+}
+
+static bfd_boolean
+elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *sdyn;
dynobj = elf_hash_table (info)->dynobj;
- if (frv_got_section (info))
+ if (frvfdpic_got_section (info))
{
- BFD_ASSERT (frv_gotrel_section (info)->_raw_size
- == (frv_gotrel_section (info)->reloc_count
+ BFD_ASSERT (frvfdpic_gotrel_section (info)->size
+ == (frvfdpic_gotrel_section (info)->reloc_count
* sizeof (Elf32_External_Rel)));
- if (frv_gotfixup_section (info))
+ if (frvfdpic_gotfixup_section (info))
{
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- {
- struct elf_link_hash_entry *hgot = elf_hash_table (info)->hgot;
- bfd_vma got_value = hgot->root.u.def.value
- + hgot->root.u.def.section->output_section->vma
- + hgot->root.u.def.section->output_offset;
+ struct elf_link_hash_entry *hgot = elf_hash_table (info)->hgot;
+ bfd_vma got_value = hgot->root.u.def.value
+ + hgot->root.u.def.section->output_section->vma
+ + hgot->root.u.def.section->output_offset;
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- got_value, 0);
- }
+ _frvfdpic_add_rofixup (output_bfd, frvfdpic_gotfixup_section (info),
+ got_value, 0);
- if (frv_gotfixup_section (info)->_raw_size
- != (frv_gotfixup_section (info)->reloc_count * 4))
+ if (frvfdpic_gotfixup_section (info)->size
+ != (frvfdpic_gotfixup_section (info)->reloc_count * 4))
{
- if (frv_gotfixup_section (info)->_raw_size
- < frv_gotfixup_section (info)->reloc_count * 4)
- {
- info->callbacks->warning
- (info, "LINKER BUG: .rofixup section size mismatch",
- ".rofixup", NULL, NULL, 0);
- abort ();
- return FALSE;
- }
- else if (!elf_hash_table (info)->dynamic_sections_created)
- {
- info->callbacks->warning
- (info, "no dynamic sections, missing -melf32frvfd?",
- ".rofixup", NULL, NULL, 0);
- return FALSE;
- }
- BFD_ASSERT (0);
+ (*_bfd_error_handler)
+ ("LINKER BUG: .rofixup section size mismatch");
+ return FALSE;
}
}
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- BFD_ASSERT (frv_pltrel_section (info)->_raw_size
- == (frv_pltrel_section (info)->reloc_count
+ BFD_ASSERT (frvfdpic_pltrel_section (info)->size
+ == (frvfdpic_pltrel_section (info)->reloc_count
* sizeof (Elf32_External_Rel)));
}
@@ -3718,7 +3813,7 @@ elf32_frv_finish_dynamic_sections (bfd *output_bfd,
BFD_ASSERT (sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
@@ -3732,23 +3827,21 @@ elf32_frv_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_PLTGOT:
- dyn.d_un.d_ptr = frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ dyn.d_un.d_ptr = frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_JMPREL:
- dyn.d_un.d_ptr = frv_pltrel_section (info)->output_section->vma
- + frv_pltrel_section (info)->output_offset;
+ dyn.d_un.d_ptr = frvfdpic_pltrel_section (info)
+ ->output_section->vma
+ + frvfdpic_pltrel_section (info)->output_offset;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_PLTRELSZ:
- if (frv_pltrel_section (info)->_cooked_size != 0)
- dyn.d_un.d_val = frv_pltrel_section (info)->_cooked_size;
- else
- dyn.d_un.d_val = frv_pltrel_section (info)->_raw_size;
+ dyn.d_un.d_val = frvfdpic_pltrel_section (info)->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
@@ -3762,8 +3855,9 @@ elf32_frv_finish_dynamic_sections (bfd *output_bfd,
regular object. */
static bfd_boolean
-elf32_frv_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
+elf32_frvfdpic_adjust_dynamic_symbol
+(struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
{
bfd * dynobj;
@@ -3796,10 +3890,11 @@ elf32_frv_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
/* Perform any actions needed for dynamic symbols. */
static bfd_boolean
-elf32_frv_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
- Elf_Internal_Sym *sym ATTRIBUTE_UNUSED)
+elf32_frvfdpic_finish_dynamic_symbol
+(bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
+ Elf_Internal_Sym *sym ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -3808,44 +3903,37 @@ elf32_frv_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED,
shared libraries into pcrel within the given input section. */
static bfd_boolean
-frv_elf_use_relative_eh_frame (bfd *input_bfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- asection *eh_frame_section ATTRIBUTE_UNUSED)
+frvfdpic_elf_use_relative_eh_frame
+(bfd *input_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *eh_frame_section ATTRIBUTE_UNUSED)
{
/* We can't use PC-relative encodings in FDPIC binaries, in general. */
- if (elf_elfheader (input_bfd)->e_flags & EF_FRV_FDPIC)
- return FALSE;
-
- return TRUE;
+ return FALSE;
}
/* Adjust the contents of an eh_frame_hdr section before they're output. */
static bfd_byte
-frv_elf_encode_eh_address (bfd *abfd,
- struct bfd_link_info *info,
- asection *osec, bfd_vma offset,
- asection *loc_sec, bfd_vma loc_offset,
- bfd_vma *encoded)
+frvfdpic_elf_encode_eh_address (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *osec, bfd_vma offset,
+ asection *loc_sec, bfd_vma loc_offset,
+ bfd_vma *encoded)
{
struct elf_link_hash_entry *h;
- /* Non-FDPIC binaries can use PC-relative encodings. */
- if (! (elf_elfheader (abfd)->e_flags & EF_FRV_FDPIC))
- return _bfd_elf_encode_eh_address (abfd, info, osec, offset,
- loc_sec, loc_offset, encoded);
-
h = elf_hash_table (info)->hgot;
BFD_ASSERT (h && h->root.type == bfd_link_hash_defined);
- if (! h || (_frv_osec_to_segment (abfd, osec)
- == _frv_osec_to_segment (abfd, loc_sec->output_section)))
+ if (! h || (_frvfdpic_osec_to_segment (abfd, osec)
+ == _frvfdpic_osec_to_segment (abfd, loc_sec->output_section)))
return _bfd_elf_encode_eh_address (abfd, info, osec, offset,
loc_sec, loc_offset, encoded);
- BFD_ASSERT (_frv_osec_to_segment (abfd, osec)
- == _frv_osec_to_segment (abfd,
- h->root.u.def.section->output_section));
+ BFD_ASSERT (_frvfdpic_osec_to_segment (abfd, osec)
+ == (_frvfdpic_osec_to_segment
+ (abfd, h->root.u.def.section->output_section)));
*encoded = osec->vma + offset
- (h->root.u.def.value
@@ -3971,7 +4059,7 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
bfd *dynobj;
- struct frv_pic_relocs_info *picrel;
+ struct frvfdpic_relocs_info *picrel;
if (info->relocatable)
return TRUE;
@@ -3997,8 +4085,6 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_FRV_LABEL24:
- case R_FRV_32:
case R_FRV_GOT12:
case R_FRV_GOTHI:
case R_FRV_GOTLO:
@@ -4013,12 +4099,26 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
case R_FRV_FUNCDESC_GOTOFFLO:
case R_FRV_FUNCDESC:
case R_FRV_FUNCDESC_VALUE:
+ if (! IS_FDPIC (abfd))
+ goto bad_reloc;
+ /* Fall through. */
+ case R_FRV_GPREL12:
+ case R_FRV_GPRELU12:
+ case R_FRV_GPRELHI:
+ case R_FRV_GPRELLO:
+ case R_FRV_LABEL24:
+ case R_FRV_32:
if (! dynobj)
{
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! _frv_create_got_section (abfd, info))
return FALSE;
}
+ if (! IS_FDPIC (abfd))
+ {
+ picrel = NULL;
+ break;
+ }
if (h != NULL)
{
if (h->dynindx == -1)
@@ -4032,14 +4132,14 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
break;
}
picrel
- = frv_pic_relocs_info_for_global (frv_relocs_info (info),
- abfd, h,
- rel->r_addend, INSERT);
+ = frvfdpic_relocs_info_for_global (frvfdpic_relocs_info (info),
+ abfd, h,
+ rel->r_addend, INSERT);
}
else
- picrel = frv_pic_relocs_info_for_local (frv_relocs_info (info),
- abfd, r_symndx,
- rel->r_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_local (frvfdpic_relocs_info
+ (info), abfd, r_symndx,
+ rel->r_addend, INSERT);
if (! picrel)
return FALSE;
break;
@@ -4052,7 +4152,8 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
switch (ELF32_R_TYPE (rel->r_info))
{
case R_FRV_LABEL24:
- picrel->call = 1;
+ if (IS_FDPIC (abfd))
+ picrel->call = 1;
break;
case R_FRV_FUNCDESC_VALUE:
@@ -4060,7 +4161,11 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32--;
/* Fall through. */
+
case R_FRV_32:
+ if (! IS_FDPIC (abfd))
+ break;
+
picrel->sym = 1;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32++;
@@ -4117,6 +4222,23 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
+
+ case R_FRV_LABEL16:
+ case R_FRV_LO16:
+ case R_FRV_HI16:
+ case R_FRV_GPREL12:
+ case R_FRV_GPRELU12:
+ case R_FRV_GPREL32:
+ case R_FRV_GPRELHI:
+ case R_FRV_GPRELLO:
+ break;
+
+ default:
+ bad_reloc:
+ (*_bfd_error_handler)
+ (_("%B: unsupported relocation type %i"),
+ abfd, ELF32_R_TYPE (rel->r_info));
+ return FALSE;
}
}
@@ -4153,7 +4275,8 @@ elf32_frv_object_p (abfd)
bfd *abfd;
{
bfd_default_set_arch_mach (abfd, bfd_arch_frv, elf32_frv_machine (abfd));
- return TRUE;
+ return (((elf_elfheader (abfd)->e_flags & EF_FRV_FDPIC) != 0)
+ == (IS_FDPIC (abfd)));
}
/* Function to set the ELF flag bits. */
@@ -4214,6 +4337,50 @@ frv_elf_arch_extension_p (flagword base, flagword extension)
return FALSE;
}
+static bfd_boolean
+elf32_frvfdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+ unsigned i;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ if (! frv_elf_copy_private_bfd_data (ibfd, obfd))
+ return FALSE;
+
+ if (! elf_tdata (ibfd) || ! elf_tdata (ibfd)->phdr
+ || ! elf_tdata (obfd) || ! elf_tdata (obfd)->phdr)
+ return TRUE;
+
+ /* Copy the stack size. */
+ for (i = 0; i < elf_elfheader (ibfd)->e_phnum; i++)
+ if (elf_tdata (ibfd)->phdr[i].p_type == PT_GNU_STACK)
+ {
+ Elf_Internal_Phdr *iphdr = &elf_tdata (ibfd)->phdr[i];
+
+ for (i = 0; i < elf_elfheader (obfd)->e_phnum; i++)
+ if (elf_tdata (obfd)->phdr[i].p_type == PT_GNU_STACK)
+ {
+ memcpy (&elf_tdata (obfd)->phdr[i], iphdr, sizeof (*iphdr));
+
+ /* Rewrite the phdrs, since we're only called after they
+ were first written. */
+ if (bfd_seek (obfd, (bfd_signed_vma) get_elf_backend_data (obfd)
+ ->s->sizeof_ehdr, SEEK_SET) != 0
+ || get_elf_backend_data (obfd)->s
+ ->write_out_phdrs (obfd, elf_tdata (obfd)->phdr,
+ elf_elfheader (obfd)->e_phnum) != 0)
+ return FALSE;
+ break;
+ }
+
+ break;
+ }
+
+ return TRUE;
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -4467,6 +4634,20 @@ frv_elf_merge_private_bfd_data (ibfd, obfd)
if (old_partial != (old_flags & EF_FRV_CPU_MASK))
bfd_default_set_arch_mach (obfd, bfd_arch_frv, elf32_frv_machine (obfd));
+ if (((new_flags & EF_FRV_FDPIC) == 0)
+ != (! IS_FDPIC (ibfd)))
+ {
+ error = TRUE;
+ if (IS_FDPIC (obfd))
+ (*_bfd_error_handler)
+ (_("%s: cannot link non-fdpic object file into fdpic executable"),
+ bfd_get_filename (ibfd));
+ else
+ (*_bfd_error_handler)
+ (_("%s: cannot link fdpic object file into non-fdpic executable"),
+ bfd_get_filename (ibfd));
+ }
+
if (error)
bfd_set_error (bfd_error_bad_value);
@@ -4564,7 +4745,6 @@ frv_elf_print_private_bfd_data (abfd, ptr)
#define TARGET_BIG_SYM bfd_elf32_frv_vec
#define TARGET_BIG_NAME "elf32-frv"
-#define elf_info_to_howto_rel frv_info_to_howto_rel
#define elf_info_to_howto frv_info_to_howto_rela
#define elf_backend_relocate_section elf32_frv_relocate_section
#define elf_backend_gc_mark_hook elf32_frv_gc_mark_hook
@@ -4582,39 +4762,79 @@ frv_elf_print_private_bfd_data (abfd, ptr)
#define bfd_elf32_bfd_merge_private_bfd_data frv_elf_merge_private_bfd_data
#define bfd_elf32_bfd_print_private_bfd_data frv_elf_print_private_bfd_data
-#define bfd_elf32_bfd_link_hash_table_create frv_elf_link_hash_table_create
+#define elf_backend_want_got_sym 1
+#define elf_backend_got_header_size 0
+#define elf_backend_want_got_plt 0
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_plt_header_size 0
+
+#define elf_backend_finish_dynamic_sections \
+ elf32_frv_finish_dynamic_sections
+
+#include "elf32-target.h"
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x4000
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_frvfdpic_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-frvfdpic"
+#undef elf32_bed
+#define elf32_bed elf32_frvfdpic_bed
+
+#undef elf_info_to_howto_rel
+#define elf_info_to_howto_rel frvfdpic_info_to_howto_rel
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ frvfdpic_elf_link_hash_table_create
+#undef elf_backend_always_size_sections
#define elf_backend_always_size_sections \
- elf32_frv_always_size_sections
+ elf32_frvfdpic_always_size_sections
+#undef elf_backend_modify_segment_map
#define elf_backend_modify_segment_map \
- elf32_frv_modify_segment_map
+ elf32_frvfdpic_modify_segment_map
+#undef bfd_elf32_bfd_copy_private_bfd_data
+#define bfd_elf32_bfd_copy_private_bfd_data \
+ elf32_frvfdpic_copy_private_bfd_data
+#undef elf_backend_create_dynamic_sections
#define elf_backend_create_dynamic_sections \
- elf32_frv_create_dynamic_sections
+ elf32_frvfdpic_create_dynamic_sections
+#undef elf_backend_adjust_dynamic_symbol
#define elf_backend_adjust_dynamic_symbol \
- elf32_frv_adjust_dynamic_symbol
+ elf32_frvfdpic_adjust_dynamic_symbol
+#undef elf_backend_size_dynamic_sections
#define elf_backend_size_dynamic_sections \
- elf32_frv_size_dynamic_sections
+ elf32_frvfdpic_size_dynamic_sections
+#undef elf_backend_finish_dynamic_symbol
#define elf_backend_finish_dynamic_symbol \
- elf32_frv_finish_dynamic_symbol
+ elf32_frvfdpic_finish_dynamic_symbol
+#undef elf_backend_finish_dynamic_sections
#define elf_backend_finish_dynamic_sections \
- elf32_frv_finish_dynamic_sections
-
-#define elf_backend_want_got_sym 1
-#define elf_backend_got_header_size 0
-#define elf_backend_want_got_plt 0
-#define elf_backend_plt_readonly 1
-#define elf_backend_want_plt_sym 0
-#define elf_backend_plt_header_size 0
+ elf32_frvfdpic_finish_dynamic_sections
+#undef elf_backend_can_make_relative_eh_frame
#define elf_backend_can_make_relative_eh_frame \
- frv_elf_use_relative_eh_frame
+ frvfdpic_elf_use_relative_eh_frame
+#undef elf_backend_can_make_lsda_relative_eh_frame
#define elf_backend_can_make_lsda_relative_eh_frame \
- frv_elf_use_relative_eh_frame
-#define elf_backend_encode_eh_address frv_elf_encode_eh_address
+ frvfdpic_elf_use_relative_eh_frame
+#undef elf_backend_encode_eh_address
+#define elf_backend_encode_eh_address \
+ frvfdpic_elf_encode_eh_address
+#undef elf_backend_may_use_rel_p
#define elf_backend_may_use_rel_p 1
+#undef elf_backend_may_use_rela_p
#define elf_backend_may_use_rela_p 1
/* We use REL for dynamic relocations only. */
+#undef elf_backend_default_use_rela_p
#define elf_backend_default_use_rela_p 1
+#undef elf_backend_omit_section_dynsym
+#define elf_backend_omit_section_dynsym _frvfdpic_link_omit_section_dynsym
+
#include "elf32-target.h"
diff --git a/bfd/elf32-gen.c b/bfd/elf32-gen.c
index f2edf69da6b..09cc5a14967 100644
--- a/bfd/elf32-gen.c
+++ b/bfd/elf32-gen.c
@@ -80,8 +80,8 @@ elf32_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: Relocations in generic ELF (EM: %d)"),
+ abfd,
ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 877da8a6a31..3daef62c939 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -679,11 +679,6 @@ elf32_h8_relax_section (bfd *abfd, asection *sec,
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Get a copy of the native relocations. */
@@ -725,12 +720,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec,
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -1297,7 +1287,7 @@ elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -1305,7 +1295,7 @@ elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- sec->_cooked_size -= count;
+ sec->size -= count;
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
@@ -1422,7 +1412,7 @@ elf32_h8_get_relocated_section_contents (bfd *output_bfd,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- (size_t) input_section->_raw_size);
+ (size_t) input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 54dbb9a62b9..701c72fd3f8 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -539,8 +539,8 @@ hppa_add_stub (const char *stub_name,
TRUE, FALSE);
if (stub_entry == NULL)
{
- (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- bfd_archive_filename (section->owner),
+ (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
+ section->owner,
stub_name);
return NULL;
}
@@ -672,7 +672,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_sec = stub_entry->stub_sec;
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_sec->_raw_size;
+ stub_entry->stub_offset = stub_sec->size;
loc = stub_sec->contents + stub_entry->stub_offset;
stub_bfd = stub_sec->owner;
@@ -792,9 +792,9 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|| sym_value - 8 + (1 << (22 + 1)) >= (1 << (22 + 2))))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
- bfd_archive_filename (stub_entry->target_section->owner),
- stub_sec->name,
+ (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+ stub_entry->target_section->owner,
+ stub_sec,
(long) stub_entry->stub_offset,
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
@@ -816,7 +816,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
/* Point the function symbol at the stub. */
stub_entry->h->elf.root.u.def.section = stub_sec;
- stub_entry->h->elf.root.u.def.value = stub_sec->_raw_size;
+ stub_entry->h->elf.root.u.def.value = stub_sec->size;
size = 24;
break;
@@ -826,7 +826,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
- stub_sec->_raw_size += size;
+ stub_sec->size += size;
return TRUE;
}
@@ -879,7 +879,7 @@ hppa_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
size = 16;
}
- stub_entry->stub_sec->_raw_size += size;
+ stub_entry->stub_sec->size += size;
return TRUE;
}
@@ -901,6 +901,14 @@ elf32_hppa_object_p (bfd *abfd)
i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
+ else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0)
+ {
+ /* GCC on hppa-netbsd produces binaries with OSABI=NetBSD,
+ but the kernel produces corefiles with OSABI=SysV. */
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NETBSD &&
+ i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
+ return FALSE;
+ }
else
{
if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX)
@@ -1164,8 +1172,8 @@ elf32_hppa_check_relocs (bfd *abfd,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
+ (_("%B: relocation %s can not be used when making a shared object; recompile with -fPIC"),
+ abfd,
elf_hppa_howto_table[r_type].name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1184,8 +1192,8 @@ elf32_hppa_check_relocs (bfd *abfd,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: relocation %s should not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
+ (_("%B: relocation %s should not be used when making a shared object; recompile with -fPIC"),
+ abfd,
elf_hppa_howto_table[r_type].name);
}
/* Fall through. */
@@ -1615,7 +1623,7 @@ elf32_hppa_hide_symbol (struct bfd_link_info *info,
if (! ((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- h->plt.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (info)->init_refcount;
}
}
@@ -1732,7 +1740,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelbss->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1745,8 +1753,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -1755,10 +1762,10 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1807,8 +1814,8 @@ allocate_plt_static (struct elf_link_hash_entry *h, void *inf)
/* Make an entry in the .plt section for plabel references
that won't have a .plt entry for other reasons. */
s = htab->splt;
- h->plt.offset = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
+ h->plt.offset = s->size;
+ s->size += PLT_ENTRY_SIZE;
}
else
{
@@ -1852,11 +1859,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
/* Make an entry in the .plt section. */
s = htab->splt;
- h->plt.offset = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
+ h->plt.offset = s->size;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
htab->need_plt_stub = 1;
}
@@ -1873,14 +1880,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (htab->elf.dynamic_sections_created
&& (info->shared
|| (h->dynindx != -1
&& h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0))
{
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
}
else
@@ -1959,7 +1966,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -2041,7 +2048,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@@ -2086,7 +2093,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srel->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2106,10 +2113,10 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2131,10 +2138,10 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_plt > 0)
{
- *local_plt = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
+ *local_plt = s->size;
+ s->size += PLT_ENTRY_SIZE;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
else
*local_plt = (bfd_vma) -1;
@@ -2174,14 +2181,14 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (gotalign > pltalign)
bfd_set_section_alignment (dynobj, s, gotalign);
mask = ((bfd_size_type) 1 << gotalign) - 1;
- s->_raw_size = (s->_raw_size + sizeof (plt_stub) + mask) & ~mask;
+ s->size = (s->size + sizeof (plt_stub) + mask) & ~mask;
}
}
else if (s == htab->sgot)
;
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0)
+ if (s->size != 0)
{
/* Remember whether there are any reloc sections other
than .rela.plt. */
@@ -2199,7 +2206,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -2216,8 +2223,8 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Allocate memory for the section contents. Zero it, because
we may not fill in all the reloc sections. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -2244,7 +2251,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->srelplt->_raw_size != 0)
+ if (htab->srelplt->size != 0)
{
if (!add_dynamic_entry (DT_PLTRELSZ, 0)
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
@@ -2401,10 +2408,7 @@ group_sections (struct elf32_hppa_link_hash_table *htab,
bfd_boolean big_sec;
curr = tail;
- if (tail->_cooked_size)
- total = tail->_cooked_size;
- else
- total = tail->_raw_size;
+ total = tail->size;
big_sec = total >= stub_group_size;
while ((prev = PREV_SEC (curr)) != NULL
@@ -2569,8 +2573,8 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
}
else
{
- (*_bfd_error_handler) (_("%s: duplicate export stub %s"),
- bfd_archive_filename (input_bfd),
+ (*_bfd_error_handler) (_("%B: duplicate export stub %s"),
+ input_bfd,
stub_name);
}
}
@@ -2852,10 +2856,7 @@ elf32_hppa_size_stubs
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
- {
- stub_sec->_raw_size = 0;
- stub_sec->_cooked_size = 0;
- }
+ stub_sec->size = 0;
bfd_hash_traverse (&htab->stub_hash_table, hppa_size_one_stub, htab);
@@ -2906,11 +2907,12 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
if either the .plt or .got is larger than 0x2000. If both
the .plt and .got are smaller than 0x2000, choose the end of
the .plt section. */
- sec = splt;
+ sec = strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0
+ ? NULL : splt;
if (sec != NULL)
{
- gp_val = sec->_raw_size;
- if (gp_val > 0x2000 || (sgot && sgot->_raw_size > 0x2000))
+ gp_val = sec->size;
+ if (gp_val > 0x2000 || (sgot && sgot->size > 0x2000))
{
gp_val = 0x2000;
}
@@ -2920,10 +2922,13 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
sec = sgot;
if (sec != NULL)
{
- /* We know we don't have a .plt. If .got is large,
- offset our LTP. */
- if (sec->_raw_size > 0x2000)
- gp_val = 0x2000;
+ if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") != 0)
+ {
+ /* We know we don't have a .plt. If .got is large,
+ offset our LTP. */
+ if (sec->size > 0x2000)
+ gp_val = 0x2000;
+ }
}
else
{
@@ -2972,11 +2977,11 @@ elf32_hppa_build_stubs (struct bfd_link_info *info)
bfd_size_type size;
/* Allocate memory to hold the linker stubs. */
- size = stub_sec->_raw_size;
+ size = stub_sec->size;
stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
return FALSE;
- stub_sec->_raw_size = 0;
+ stub_sec->size = 0;
}
/* Build the stubs as directed by the stub hash table. */
@@ -3159,9 +3164,9 @@ final_link_relocate (asection *input_section,
and convert the associated add instruction, so issue an
error. */
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
insn);
@@ -3189,9 +3194,9 @@ final_link_relocate (asection *input_section,
insn &= ~ (0x1f << 21);
#if 0 /* debug them. */
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): fixing %s"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B(%A+0x%lx): fixing %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name);
#endif
@@ -3312,9 +3317,9 @@ final_link_relocate (asection *input_section,
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
@@ -3807,9 +3812,9 @@ elf32_hppa_relocate_section (bfd *output_bfd,
if (r == bfd_reloc_notsupported || !warned_undef)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): cannot handle %s for %s"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B(%A+0x%lx): cannot handle %s for %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@@ -4010,7 +4015,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -4035,7 +4040,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
case DT_PLTRELSZ:
s = htab->srelplt;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -4044,7 +4049,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
s = htab->srelplt;
if (s == NULL)
continue;
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
case DT_RELA:
@@ -4056,7 +4061,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
- dyn.d_un.d_ptr += s->_raw_size;
+ dyn.d_un.d_ptr += s->size;
break;
}
@@ -4064,7 +4069,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
}
}
- if (htab->sgot != NULL && htab->sgot->_raw_size != 0)
+ if (htab->sgot != NULL && htab->sgot->size != 0)
{
/* Fill in the first entry in the global offset table.
We use it to point to our dynamic section, if we have one. */
@@ -4080,7 +4085,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
}
- if (htab->splt != NULL && htab->splt->_raw_size != 0)
+ if (htab->splt != NULL && htab->splt->size != 0)
{
/* Set plt entry size. */
elf_section_data (htab->splt->output_section)
@@ -4090,12 +4095,12 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
{
/* Set up the .plt stub. */
memcpy (htab->splt->contents
- + htab->splt->_raw_size - sizeof (plt_stub),
+ + htab->splt->size - sizeof (plt_stub),
plt_stub, sizeof (plt_stub));
if ((htab->splt->output_offset
+ htab->splt->output_section->vma
- + htab->splt->_raw_size)
+ + htab->splt->size)
!= (htab->sgot->output_offset
+ htab->sgot->output_section->vma))
{
@@ -4123,6 +4128,10 @@ elf32_hppa_post_process_headers (bfd *abfd,
{
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
}
+ else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0)
+ {
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_NETBSD;
+ }
else
{
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
@@ -4192,3 +4201,10 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
#define INCLUDED_TARGET_FILE 1
#include "elf32-target.h"
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_hppa_nbsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-hppa-netbsd"
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index f7829250081..a44ff4c8819 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -367,8 +367,8 @@ i370_elf_merge_private_bfd_data (ibfd, obfd)
else /* Incompatible flags */
{
(*_bfd_error_handler)
- ("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
- bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
+ ("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
+ ibfd, (long) new_flags, (long) old_flags);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -511,7 +511,7 @@ i370_elf_adjust_dynamic_symbol (info, h)
s = bfd_get_section_by_name (dynobj, ".rela.text");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
+ s->size += sizeof (Elf32_External_Rela);
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -568,7 +568,7 @@ i370_elf_adjust_dynamic_symbol (info, h)
else
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -579,8 +579,7 @@ i370_elf_adjust_dynamic_symbol (info, h)
power_of_two = 4;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -589,10 +588,10 @@ i370_elf_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -657,7 +656,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -677,7 +676,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, *p);
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
}
@@ -702,7 +701,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -716,7 +715,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -778,8 +777,8 @@ i370_elf_size_dynamic_sections (output_bfd, info)
continue;
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -892,9 +891,8 @@ i370_elf_check_relocs (abfd, info, sec, relocs)
return TRUE;
#ifdef DEBUG
- fprintf (stderr, "i370_elf_check_relocs called for section %s in %s\n",
- bfd_get_section_name (abfd, sec),
- bfd_archive_filename (abfd));
+ _bfd_error_handler ("i370_elf_check_relocs called for section %A in %B",
+ sec, abfd);
#endif
dynobj = elf_hash_table (info)->dynobj;
@@ -955,7 +953,7 @@ i370_elf_check_relocs (abfd, info, sec, relocs)
}
}
- sreloc->_raw_size += sizeof (Elf32_External_Rela);
+ sreloc->size += sizeof (Elf32_External_Rela);
/* FIXME: We should here do what the m68k and i386
backends do: if the reloc is pc-relative, record it
@@ -999,7 +997,7 @@ i370_elf_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -1028,12 +1026,7 @@ i370_elf_finish_dynamic_sections (output_bfd, info)
if (! size)
dyn.d_un.d_ptr = s->vma;
else
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- }
+ dyn.d_un.d_val = s->size;
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
}
@@ -1162,11 +1155,10 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
return TRUE;
#ifdef DEBUG
- fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_archive_filename (input_bfd),
- bfd_section_name(input_bfd, input_section),
- (long) input_section->reloc_count,
- (info->relocatable) ? " (relocatable)" : "");
+ _bfd_error_handler ("i370_elf_relocate_section called for %B section %A, %ld relocations%s",
+ input_bfd, input_section,
+ (long) input_section->reloc_count,
+ (info->relocatable) ? " (relocatable)" : "");
#endif
if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */
@@ -1192,8 +1184,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if ((unsigned)r_type >= (unsigned)R_I370_max
|| !i370_elf_howto_table[(int)r_type])
{
- (*_bfd_error_handler) ("%s: unknown relocation type %d",
- bfd_archive_filename (input_bfd),
+ (*_bfd_error_handler) ("%B: unknown relocation type %d",
+ input_bfd,
(int) r_type);
bfd_set_error (bfd_error_bad_value);
@@ -1268,9 +1260,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler)
- ("%s: unknown relocation type %d for symbol %s",
- bfd_archive_filename (input_bfd),
- (int) r_type, sym_name);
+ ("%B: unknown relocation type %d for symbol %s",
+ input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -1411,8 +1402,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case (int)R_I370_COPY:
case (int)R_I370_RELATIVE:
(*_bfd_error_handler)
- ("%s: Relocation %s is not yet supported for symbol %s.",
- bfd_archive_filename (input_bfd),
+ ("%B: Relocation %s is not yet supported for symbol %s.",
+ input_bfd,
i370_elf_howto_table[(int) r_type]->name,
sym_name);
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7b173e4485c..f689bee56be 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -323,8 +323,8 @@ elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
&& ((indx = r_type - R_386_vt_offset) - R_386_tls
>= R_386_vt - R_386_tls))
{
- (*_bfd_error_handler) (_("%s: invalid relocation type %d"),
- bfd_archive_filename (abfd), (int) r_type);
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) r_type);
indx = R_386_NONE;
}
cache_ptr->howto = &elf_howto_table[indx];
@@ -351,7 +351,7 @@ static bfd_boolean
elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- size_t raw_size;
+ size_t size;
if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0)
{
@@ -368,7 +368,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 28;
- raw_size = bfd_get_32 (abfd, note->descdata + 8);
+ size = bfd_get_32 (abfd, note->descdata + 8);
}
else
{
@@ -386,7 +386,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 68;
+ size = 68;
break;
}
@@ -394,7 +394,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -861,8 +861,8 @@ elf_i386_check_relocs (bfd *abfd,
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd,
r_symndx);
return FALSE;
}
@@ -969,9 +969,9 @@ elf_i386_check_relocs (bfd *abfd,
else
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and "
+ (_("%B: `%s' accessed both as normal and "
"thread local symbol"),
- bfd_archive_filename (abfd),
+ abfd,
h ? h->root.root.string : "<local>");
return FALSE;
}
@@ -1086,8 +1086,8 @@ elf_i386_check_relocs (bfd *abfd,
name + 4) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1429,7 +1429,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelbss->size += sizeof (Elf32_External_Rel);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1441,7 +1441,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -1450,10 +1450,10 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1500,10 +1500,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1518,14 +1518,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
+ htab->sgotplt->size += 4;
/* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelplt->size += sizeof (Elf32_External_Rel);
}
else
{
@@ -1562,11 +1562,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
+ h->got.offset = s->size;
+ s->size += 4;
/* R_386_TLS_GD needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE_BOTH)
- s->_raw_size += 4;
+ s->size += 4;
dyn = htab->elf.dynamic_sections_created;
/* R_386_TLS_IE_32 needs one dynamic relocation,
R_386_TLS_IE resp. R_386_TLS_GOTIE needs one dynamic relocation,
@@ -1574,17 +1574,17 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
need two), R_386_TLS_GD needs one if local symbol and two if
global. */
if (tls_type == GOT_TLS_IE_BOTH)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
else if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| (tls_type & GOT_TLS_IE))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1665,7 +1665,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ sreloc->size += p->count * sizeof (Elf32_External_Rel);
}
return TRUE;
@@ -1725,7 +1725,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1764,7 +1764,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ srel->size += p->count * sizeof (Elf32_External_Rel);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -1785,19 +1785,19 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
+ *local_got = s->size;
+ s->size += 4;
if (*local_tls_type == GOT_TLS_GD
|| *local_tls_type == GOT_TLS_IE_BOTH)
- s->_raw_size += 4;
+ s->size += 4;
if (info->shared
|| *local_tls_type == GOT_TLS_GD
|| (*local_tls_type & GOT_TLS_IE))
{
if (*local_tls_type == GOT_TLS_IE_BOTH)
- srel->_raw_size += 2 * sizeof (Elf32_External_Rel);
+ srel->size += 2 * sizeof (Elf32_External_Rel);
else
- srel->_raw_size += sizeof (Elf32_External_Rel);
+ srel->size += sizeof (Elf32_External_Rel);
}
}
else
@@ -1809,9 +1809,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Allocate 2 got entries and 1 dynamic reloc for R_386_TLS_LDM
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 8;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 8;
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
}
else
htab->tls_ldm_got.offset = -1;
@@ -1837,7 +1837,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rel", 4) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -1850,7 +1850,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rel.bss and
@@ -1871,7 +1871,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
section's contents are written out. This should not happen,
but this way if it does, we get a R_386_NONE reloc instead
of garbage. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1892,7 +1892,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2039,6 +2039,9 @@ elf_i386_relocate_section (bfd *output_bfd,
&& ((indx = r_type - R_386_tls_offset) - R_386_ext
>= R_386_tls - R_386_ext))
{
+ (*_bfd_error_handler)
+ (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+ input_bfd, input_section, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2261,24 +2264,29 @@ elf_i386_relocate_section (bfd *output_bfd,
if (off >= (bfd_vma) -2)
abort ();
- relocation = htab->sgot->output_offset + off;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
break;
case R_386_GOTOFF:
/* Relocation is relative to the start of the global offset
table. */
- /* Note that sgot->output_offset is not involved in this
- calculation. We always want the start of .got. If we
- defined _GLOBAL_OFFSET_TABLE in a different way, as is
+ /* Note that sgot is not involved in this
+ calculation. We always want the start of .got.plt. If we
+ defined _GLOBAL_OFFSET_TABLE_ in a different way, as is
permitted by the ABI, we might have to change this
calculation. */
- relocation -= htab->sgot->output_section->vma;
+ relocation -= htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
break;
case R_386_GOTPC:
/* Use global offset table as symbol value. */
- relocation = htab->sgot->output_section->vma;
+ relocation = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
unresolved_reloc = FALSE;
break;
@@ -2311,8 +2319,19 @@ elf_i386_relocate_section (bfd *output_bfd,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0
- || (input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0)
+ {
+ /* Zero the section contents. eh_frame generated by old
+ versions of gcc isn't edited by elf-eh-frame.c, so
+ FDEs for discarded linkonce functions might remain.
+ Putting zeros here will zero such FDE's address range.
+ This is a hint to unwinders and other consumers of
+ exception handling info that the FDE is invalid. */
+ bfd_put_32 (input_bfd, 0, contents + rel->r_offset);
+ break;
+ }
+
+ if ((input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2444,7 +2463,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
BFD_ASSERT (type == 0x8d || type == 0x04);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4)
== 0xe8);
@@ -2470,7 +2489,7 @@ elf_i386_relocate_section (bfd *output_bfd,
else
{
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
- if (rel->r_offset + 10 <= input_section->_raw_size
+ if (rel->r_offset + 10 <= input_section->size
&& bfd_get_8 (input_bfd,
contents + rel->r_offset + 9) == 0x90)
{
@@ -2513,7 +2532,7 @@ elf_i386_relocate_section (bfd *output_bfd,
addl $foo, %reg. */
BFD_ASSERT (rel->r_offset >= 1);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
if (val == 0xa1)
{
/* movl foo, %eax. */
@@ -2570,7 +2589,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
BFD_ASSERT ((val & 0xc0) == 0x80 && (val & 7) != 4);
if (type == 0x8b)
{
@@ -2699,12 +2718,15 @@ elf_i386_relocate_section (bfd *output_bfd,
abort ();
if (r_type == ELF32_R_TYPE (rel->r_info))
{
- relocation = htab->sgot->output_offset + off;
+ bfd_vma g_o_t = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off - g_o_t;
if ((r_type == R_386_TLS_IE || r_type == R_386_TLS_GOTIE)
&& tls_type == GOT_TLS_IE_BOTH)
relocation += 4;
if (r_type == R_386_TLS_IE)
- relocation += htab->sgot->output_section->vma;
+ relocation += g_o_t;
unresolved_reloc = FALSE;
}
else
@@ -2716,7 +2738,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
BFD_ASSERT (type == 0x8d || type == 0x04);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2740,7 +2762,7 @@ elf_i386_relocate_section (bfd *output_bfd,
/* leal foo(%reg), %eax; call ___tls_get_addr; nop
Change it into:
movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */
- BFD_ASSERT (rel->r_offset + 10 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 10 <= input_section->size);
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 9)
@@ -2761,7 +2783,11 @@ elf_i386_relocate_section (bfd *output_bfd,
if (tls_type == GOT_TLS_IE_BOTH)
off += 4;
}
- bfd_put_32 (output_bfd, htab->sgot->output_offset + off,
+ bfd_put_32 (output_bfd,
+ htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset,
contents + roff + 8);
/* Skip R_386_PLT32. */
rel++;
@@ -2784,7 +2810,7 @@ elf_i386_relocate_section (bfd *output_bfd,
== 0x8d);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2823,7 +2849,10 @@ elf_i386_relocate_section (bfd *output_bfd,
bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
htab->tls_ldm_got.offset |= 1;
}
- relocation = htab->sgot->output_offset + off;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
unresolved_reloc = FALSE;
break;
@@ -2886,9 +2915,9 @@ elf_i386_relocate_section (bfd *output_bfd,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
return FALSE;
@@ -2925,9 +2954,8 @@ elf_i386_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -3145,7 +3173,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3159,7 +3187,8 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
continue;
case DT_PLTGOT:
- dyn.d_un.d_ptr = htab->sgot->output_section->vma;
+ s = htab->sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
@@ -3169,7 +3198,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
case DT_PLTRELSZ:
s = htab->srelplt;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELSZ:
@@ -3182,7 +3211,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
s = htab->srelplt;
if (s == NULL)
continue;
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
case DT_REL:
@@ -3194,7 +3223,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
- dyn.d_un.d_ptr += s->_raw_size;
+ dyn.d_un.d_ptr += s->size;
break;
}
@@ -3202,7 +3231,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
}
/* Fill in the first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
if (info->shared)
memcpy (htab->splt->contents,
@@ -3233,7 +3262,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_32 (output_bfd,
(sdyn == NULL ? 0
@@ -3245,9 +3274,24 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4;
}
+
+ if (htab->sgot && htab->sgot->size > 0)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
+
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
+
+
#define TARGET_LITTLE_SYM bfd_elf32_i386_vec
#define TARGET_LITTLE_NAME "elf32-i386"
#define ELF_ARCH bfd_arch_i386
@@ -3285,6 +3329,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_reloc_type_class elf_i386_reloc_type_class
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
+#define elf_backend_plt_sym_val elf_i386_plt_sym_val
#include "elf32-target.h"
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index f156bc51e1a..010ac2e7619 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -63,7 +63,7 @@ i860_howto_pc26_reloc (bfd *abfd ATTRIBUTE_UNUSED,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Adjust for PC-relative relocation. */
@@ -126,7 +126,7 @@ i860_howto_pc16_reloc (bfd *abfd,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Adjust for PC-relative relocation. */
@@ -191,7 +191,7 @@ i860_howto_highadj_reloc (bfd *abfd,
relocation += reloc_entry->addend;
relocation += 0x8000;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
addr = (bfd_byte *) data + reloc_entry->address;
@@ -243,7 +243,7 @@ i860_howto_splitn_reloc (bfd *abfd,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
addr = (bfd_byte *) data + reloc_entry->address;
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 6493be69959..758842b8373 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -503,7 +503,7 @@ ip2k_is_switch_table_128 (abfd, sec, addr, contents)
int index = 0;
/* Check current page-jmp. */
- if (addr + 4 > sec->_cooked_size)
+ if (addr + 4 > sec->size)
return -1;
ip2k_get_mem (abfd, contents + addr, 4, code);
@@ -550,7 +550,7 @@ ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc)
addr = irel->r_offset;
while (1)
{
- if (addr + 4 > sec->_cooked_size)
+ if (addr + 4 > sec->size)
break;
ip2k_get_mem (abfd, misc->contents + addr, 4, code);
@@ -656,7 +656,7 @@ ip2k_is_switch_table_256 (abfd, sec, addr, contents)
int index = 0;
/* Check current page-jmp. */
- if (addr + 4 > sec->_cooked_size)
+ if (addr + 4 > sec->size)
return -1;
ip2k_get_mem (abfd, contents + addr, 4, code);
@@ -718,7 +718,7 @@ ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc)
while (1)
{
- if (addr + 4 > sec->_cooked_size)
+ if (addr + 4 > sec->size)
break;
ip2k_get_mem (abfd, misc->contents + addr, 4, code);
@@ -840,11 +840,6 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- /* If this is the first time we have been called
- for this section, initialise the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL,
@@ -875,12 +870,7 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -917,8 +907,8 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
search_addr = 0xFFFFFFFF;
}
- if ((BASEADDR (sec) + sec->_cooked_size < search_addr)
- && (BASEADDR (sec) + sec->_cooked_size > page_end))
+ if ((BASEADDR (sec) + sec->size < search_addr)
+ && (BASEADDR (sec) + sec->size > page_end))
{
if (BASEADDR (sec) <= page_end)
search_addr = page_end + 1;
@@ -940,7 +930,7 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
}
/* Only process sections in range. */
- if ((BASEADDR (sec) + sec->_cooked_size >= page_start)
+ if ((BASEADDR (sec) + sec->size >= page_start)
&& (BASEADDR (sec) <= page_end))
{
if (!ip2k_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end))
@@ -1137,6 +1127,7 @@ adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
if (stab)
{
bfd_byte *stabcontents, *stabend, *stabp;
+ bfd_size_type stab_size = stab->rawsize ? stab->rawsize : stab->size;
irelbase = elf_section_data (stab)->relocs;
irelend = irelbase + stab->reloc_count;
@@ -1146,19 +1137,18 @@ adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
stabcontents = elf_section_data (stab)->this_hdr.contents;
else
{
- stabcontents = (bfd_byte *) bfd_alloc (abfd, stab->_raw_size);
- if (stabcontents == NULL)
- return;
-
- if (! bfd_get_section_contents (abfd, stab, stabcontents,
- (file_ptr) 0, stab->_raw_size))
- return;
+ if (!bfd_malloc_and_get_section (abfd, stab, &stabcontents))
+ {
+ if (stabcontents != NULL)
+ free (stabcontents);
+ return;
+ }
/* We need to remember this. */
elf_section_data (stab)->this_hdr.contents = stabcontents;
}
- stabend = stabcontents + stab->_raw_size;
+ stabend = stabcontents + stab_size;
for (irel = irelbase; irel < irelend; irel++)
{
@@ -1308,13 +1298,13 @@ ip2k_elf_relax_delete_bytes (abfd, sec, addr, count)
int count;
{
bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
- bfd_vma endaddr = sec->_cooked_size;
+ bfd_vma endaddr = sec->size;
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
endaddr - addr - count);
- sec->_cooked_size -= count;
+ sec->size -= count;
adjust_all_relocations (abfd, sec, addr + count, endaddr, -count, 0);
return TRUE;
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 21d37b176ce..b7609e02ada 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -669,7 +669,7 @@ static reloc_howto_type m32r_elf_howto_table[] =
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_M32R_RELATIVE", /* name */
+ "R_M32R_RELATIVE", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -678,15 +678,15 @@ static reloc_howto_type m32r_elf_howto_table[] =
HOWTO (R_M32R_GOTOFF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
+ 24, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_M32R_GOTOFF", /* name */
+ "R_M32R_GOTOFF", /* name */
FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
FALSE), /* pcrel_offset */
/* An PC Relative 24-bit relocation used when setting PIC offset
@@ -803,6 +803,48 @@ static reloc_howto_type m32r_elf_howto_table[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
TRUE), /* pcrel_offset */
+
+ HOWTO (R_M32R_GOTOFF_HI_ULO, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_M32R_GOTOFF_HI_ULO",/* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_M32R_GOTOFF_HI_SLO, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_M32R_GOTOFF_HI_SLO",/* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_M32R_GOTOFF_LO, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_M32R_GOTOFF_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* Handle the R_M32R_10_PCREL reloc. */
@@ -863,7 +905,7 @@ m32r_elf_do_10_pcrel_reloc (abfd, howto, input_section, data, offset,
bfd_reloc_status_type status;
/* Sanity check the address (offset in section). */
- if (offset > input_section->_cooked_size)
+ if (offset > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = symbol_value + addend;
@@ -942,7 +984,7 @@ m32r_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
}
/* Sanity check the address (offset in section). */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
ret = bfd_reloc_ok;
@@ -1115,7 +1157,7 @@ m32r_elf_generic_reloc (input_bfd, reloc_entry, symbol, data,
a section relative addend which is wrong. */
/* Sanity check the address (offset in section). */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
ret = bfd_reloc_ok;
@@ -1263,6 +1305,9 @@ static const struct m32r_reloc_map m32r_reloc_map[] =
{ BFD_RELOC_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_ULO },
{ BFD_RELOC_M32R_GOTPC_HI_SLO, R_M32R_GOTPC_HI_SLO },
{ BFD_RELOC_M32R_GOTPC_LO, R_M32R_GOTPC_LO },
+ { BFD_RELOC_M32R_GOTOFF_HI_ULO, R_M32R_GOTOFF_HI_ULO },
+ { BFD_RELOC_M32R_GOTOFF_HI_SLO, R_M32R_GOTOFF_HI_SLO },
+ { BFD_RELOC_M32R_GOTOFF_LO, R_M32R_GOTOFF_LO },
};
static reloc_howto_type *
@@ -2020,7 +2065,7 @@ printf("m32r_elf_adjust_dynamic_symbol()\n");
srel = htab->srelbss;
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -2031,8 +2076,7 @@ printf("m32r_elf_adjust_dynamic_symbol()\n");
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -2041,10 +2085,10 @@ printf("m32r_elf_adjust_dynamic_symbol()\n");
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -2104,10 +2148,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -2122,14 +2166,14 @@ allocate_dynrelocs (h, inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
+ htab->sgotplt->size += 4;
/* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -2159,11 +2203,11 @@ allocate_dynrelocs (h, inf)
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
+ h->got.offset = s->size;
+ s->size += 4;
dyn = htab->root.dynamic_sections_created;
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -2232,7 +2276,7 @@ allocate_dynrelocs (h, inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -2296,7 +2340,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -2334,7 +2378,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srel->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2354,10 +2398,10 @@ printf("m32r_elf_size_dynamic_sections()\n");
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
+ *local_got = s->size;
+ s->size += 4;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2385,7 +2429,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -2398,7 +2442,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -2418,7 +2462,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
section's contents are written out. This should not happen,
but this way if it does, we get a R_M32R_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -2439,7 +2483,7 @@ printf("m32r_elf_size_dynamic_sections()\n");
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (! add_dynamic_entry (DT_PLTGOT, 0)
|| ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2528,6 +2572,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd *dynobj;
bfd_vma *local_got_offsets;
asection *sgot, *splt, *sreloc;
+ bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
dynobj = htab->root.dynobj;
local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -2561,8 +2606,8 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_type = ELF32_R_TYPE (rel->r_info);
if (r_type < 0 || r_type >= (int) R_M32R_max)
{
- (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd),
+ (*_bfd_error_handler) (_("%B: unknown relocation type %d"),
+ input_bfd,
(int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -2582,7 +2627,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
howto = m32r_elf_howto_table + r_type;
r_symndx = ELF32_R_SYM (rel->r_info);
- if (info->relocatable && (use_rel == TRUE))
+ if (info->relocatable && use_rel)
{
/* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
@@ -2658,7 +2703,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = local_sections[r_symndx];
sym_name = "<local symbol>";
- if (use_rel == FALSE)
+ if (!use_rel)
{
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
addend = rel->r_addend;
@@ -2685,7 +2730,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
/* External symbol. */
- if (info->relocatable && (use_rel == FALSE))
+ if (info->relocatable && !use_rel)
continue;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
@@ -2779,7 +2824,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
/* Sanity check the address. */
- if (offset > input_section->_raw_size)
+ if (offset > high_address)
{
r = bfd_reloc_outofrange;
goto check_reloc;
@@ -2787,6 +2832,31 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
switch ((int) r_type)
{
+ case R_M32R_GOTOFF:
+ /* Relocation is relative to the start of the global offset
+ table (for ld24 rx, #uimm24). eg access at label+addend
+
+ ld24 rx. #label@GOTOFF + addend
+ sub rx, r12. */
+
+ BFD_ASSERT (sgot != NULL);
+
+ relocation = -(relocation - sgot->output_section->vma);
+ rel->r_addend = -rel->r_addend;
+ break;
+
+ case R_M32R_GOTOFF_HI_ULO:
+ case R_M32R_GOTOFF_HI_SLO:
+ case R_M32R_GOTOFF_LO:
+ BFD_ASSERT (sgot != NULL);
+
+ relocation -= sgot->output_section->vma;
+
+ if ((r_type == R_M32R_GOTOFF_HI_SLO)
+ && ((relocation + rel->r_addend) & 0x8000))
+ rel->r_addend += 0x10000;
+ break;
+
case R_M32R_GOTPC24:
/* .got(_GLOBAL_OFFSET_TABLE_) - pc relocation
ld24 rx,#_GLOBAL_OFFSET_TABLE_
@@ -2961,7 +3031,6 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_M32R_26_PCREL_RELA:
case R_M32R_HI16_ULO_RELA:
case R_M32R_LO16_RELA:
- case R_M32R_SDA16_RELA:
if (info->shared
&& r_symndx != 0
&& (input_section->flags & SEC_ALLOC) != 0
@@ -3094,6 +3163,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
goto check_reloc;
+ case (int) R_M32R_SDA16_RELA:
case (int) R_M32R_SDA16 :
{
const char *name;
@@ -3125,11 +3195,11 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler)
- (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
- bfd_archive_filename (input_bfd),
+ (_("%B: The target (%s) of an %s relocation is in the wrong section (%A)"),
+ input_bfd,
+ sec,
sym_name,
- m32r_elf_howto_table[(int) r_type].name,
- bfd_get_section_name (abfd, sec));
+ m32r_elf_howto_table[(int) r_type].name);
/*bfd_set_error (bfd_error_bad_value); ??? why? */
ret = FALSE;
continue;
@@ -3450,7 +3520,7 @@ printf("m32r_elf_finish_dynamic_sections()\n");
BFD_ASSERT (sgot != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
@@ -3481,10 +3551,7 @@ printf("m32r_elf_finish_dynamic_sections()\n");
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -3501,10 +3568,7 @@ printf("m32r_elf_finish_dynamic_sections()\n");
if (htab->srelplt != NULL)
{
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -3513,7 +3577,7 @@ printf("m32r_elf_finish_dynamic_sections()\n");
/* Fill in the first entry in the procedure linkage table. */
splt = htab->splt;
- if (splt && splt->_raw_size > 0)
+ if (splt && splt->size > 0)
{
if (info->shared)
{
@@ -3545,7 +3609,7 @@ printf("m32r_elf_finish_dynamic_sections()\n");
}
/* Fill in the first three entries in the global offset table. */
- if (sgot && sgot->_raw_size > 0)
+ if (sgot && sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
@@ -3615,11 +3679,6 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
|| 0 /* FIXME: check SHF_M32R_CAN_RELAX */)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Get a copy of the native relocations. */
@@ -3649,12 +3708,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -3734,7 +3788,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
/* Do nothing if no room in the section for this to be what we're
looking for. */
- if (irel->r_offset > sec->_cooked_size - 8)
+ if (irel->r_offset > sec->size - 8)
continue;
/* Make sure the next relocation applies to the next
@@ -3776,7 +3830,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
if (pcrel_value >= -(1 << 25) && pcrel_value < (1 << 25) + 4
/* Do nothing if no room in the section for this to be what we're
looking for. */
- && (irel->r_offset <= sec->_cooked_size - 12)
+ && (irel->r_offset <= sec->size - 12)
/* Ensure the next insn is "jl rN". */
&& ((code = bfd_get_16 (abfd, contents + irel->r_offset + 8)),
code != (0x1ec0 | reg)))
@@ -3943,14 +3997,14 @@ m32r_elf_relax_delete_bytes (abfd, sec, addr, count)
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count, toaddr - addr - count);
- sec->_cooked_size -= count;
+ sec->size -= count;
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
@@ -4027,7 +4081,7 @@ m32r_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- input_section->_raw_size);
+ input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
@@ -4208,8 +4262,7 @@ m32r_elf_merge_private_bfd_data (ibfd, obfd)
|| ((in_flags & EF_M32R_ARCH) == E_M32R2_ARCH))
{
(*_bfd_error_handler)
- (_("%s: Instruction set mismatch with previous modules"),
- bfd_archive_filename (ibfd));
+ (_("%B: Instruction set mismatch with previous modules"), ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -4313,6 +4366,10 @@ m32r_elf_gc_sweep_hook (abfd, info, sec, relocs)
case R_M32R_GOT16_HI_ULO:
case R_M32R_GOT16_HI_SLO:
case R_M32R_GOT16_LO:
+ case R_M32R_GOTOFF:
+ case R_M32R_GOTOFF_HI_ULO:
+ case R_M32R_GOTOFF_HI_SLO:
+ case R_M32R_GOTOFF_LO:
case R_M32R_GOT24:
case R_M32R_GOTPC_HI_ULO:
case R_M32R_GOTPC_HI_SLO:
@@ -4442,6 +4499,10 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
{
case R_M32R_GOT16_HI_ULO:
case R_M32R_GOT16_HI_SLO:
+ case R_M32R_GOTOFF:
+ case R_M32R_GOTOFF_HI_ULO:
+ case R_M32R_GOTOFF_HI_SLO:
+ case R_M32R_GOTOFF_LO:
case R_M32R_GOT16_LO:
case R_M32R_GOTPC24:
case R_M32R_GOTPC_HI_ULO:
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 42010b01dd2..00df7aab386 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1,5 +1,6 @@
/* Motorola 68HC11-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
(Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
@@ -394,8 +395,8 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_sec = stub_entry->stub_sec;
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_sec->_raw_size;
- stub_sec->_raw_size += 10;
+ stub_entry->stub_offset = stub_sec->size;
+ stub_sec->size += 10;
loc = stub_sec->contents + stub_entry->stub_offset;
stub_bfd = stub_sec->owner;
@@ -445,7 +446,7 @@ m68hc11_elf_size_one_stub (struct bfd_hash_entry *gen_entry,
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry;
- stub_entry->stub_sec->_raw_size += 10;
+ stub_entry->stub_sec->size += 10;
return TRUE;
}
@@ -679,11 +680,6 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
@@ -731,13 +727,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
- free_contents = contents;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -763,7 +753,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
prev_insn_group = 0;
/* Do nothing if this reloc is the last byte in the section. */
- if (irel->r_offset + 2 >= sec->_cooked_size)
+ if (irel->r_offset + 2 >= sec->size)
continue;
/* See if the next instruction is an unconditional pc-relative
@@ -849,7 +839,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
prev_insn_group = 0;
/* Do nothing if this reloc is the last byte in the section. */
- if (irel->r_offset == sec->_cooked_size)
+ if (irel->r_offset == sec->size)
continue;
prev_insn_group = irel;
@@ -952,7 +942,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
if (prev_insn_group)
{
- unsigned long old_sec_size = sec->_cooked_size;
+ unsigned long old_sec_size = sec->size;
/* Note that we've changed the relocation contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
@@ -971,7 +961,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec,
prev_insn_group = 0;
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_M68HC11_NONE);
- if (sec->_cooked_size != old_sec_size)
+ if (sec->size != old_sec_size)
*again = TRUE;
continue;
}
@@ -1124,7 +1114,7 @@ m68hc11_elf_relax_delete_bytes (bfd *abfd, asection *sec,
contents = elf_section_data (sec)->this_hdr.contents;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -1133,7 +1123,7 @@ m68hc11_elf_relax_delete_bytes (bfd *abfd, asection *sec,
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- sec->_cooked_size -= count;
+ sec->size -= count;
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index cfc265efd73..6115ee43a1b 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -1,5 +1,5 @@
/* Motorola 68HC12-specific support for 32-bit ELF
- Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
(Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
@@ -443,8 +443,8 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_sec = stub_entry->stub_sec;
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_sec->_raw_size;
- stub_sec->_raw_size += 7;
+ stub_entry->stub_offset = stub_sec->size;
+ stub_sec->size += 7;
loc = stub_sec->contents + stub_entry->stub_offset;
stub_bfd = stub_sec->owner;
@@ -486,7 +486,7 @@ m68hc12_elf_size_one_stub (struct bfd_hash_entry *gen_entry,
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry;
- stub_entry->stub_sec->_raw_size += 7;
+ stub_entry->stub_sec->size += 7;
return TRUE;
}
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 2a139a405c2..01529430a8f 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -158,9 +158,8 @@ m68hc12_add_stub (const char *stub_name, asection *section,
TRUE, FALSE);
if (stub_entry == NULL)
{
- (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- bfd_archive_filename (section->owner),
- stub_name);
+ (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
+ section->owner, stub_name);
return NULL;
}
@@ -471,7 +470,8 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
hash->root.u.i.link);
if (hash->root.type == bfd_link_hash_defined
- || hash->root.type == bfd_link_hash_defweak)
+ || hash->root.type == bfd_link_hash_defweak
+ || hash->root.type == bfd_link_hash_new)
{
if (!(hash->other & STO_M68HC12_FAR))
continue;
@@ -534,8 +534,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
stub_sec != NULL;
stub_sec = stub_sec->next)
{
- stub_sec->_raw_size = 0;
- stub_sec->_cooked_size = 0;
+ stub_sec->size = 0;
}
bfd_hash_traverse (htab->stub_hash_table, htab->size_one_stub, htab);
@@ -629,11 +628,11 @@ elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info)
bfd_size_type size;
/* Allocate memory to hold the linker stubs. */
- size = stub_sec->_raw_size;
+ size = stub_sec->size;
stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
return FALSE;
- stub_sec->_raw_size = 0;
+ stub_sec->size = 0;
}
/* Build the stubs as directed by the stub hash table. */
@@ -803,7 +802,7 @@ m68hc11_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
abort();
@@ -1274,17 +1273,15 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
{
(*_bfd_error_handler)
- (_("%s: linking files compiled for 16-bit integers (-mshort) "
- "and others for 32-bit integers"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking files compiled for 16-bit integers (-mshort) "
+ "and others for 32-bit integers"), ibfd);
ok = FALSE;
}
if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
{
(*_bfd_error_handler)
- (_("%s: linking files compiled for 32-bit double (-fshort-double) "
- "and others for 64-bit double"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking files compiled for 32-bit double (-fshort-double) "
+ "and others for 64-bit double"), ibfd);
ok = FALSE;
}
@@ -1292,9 +1289,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags))
{
(*_bfd_error_handler)
- (_("%s: linking files compiled for HCS12 with "
- "others compiled for HC12"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking files compiled for HCS12 with "
+ "others compiled for HC12"), ibfd);
ok = FALSE;
}
new_flags = ((new_flags & ~EF_M68HC11_MACH_MASK)
@@ -1309,9 +1305,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (new_flags != old_flags)
{
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (unsigned long) new_flags,
- (unsigned long) old_flags);
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (unsigned long) new_flags, (unsigned long) old_flags);
ok = FALSE;
}
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 39832be83cf..08cc7934761 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -513,9 +513,9 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
}
/* Allocate space in the .got section. */
- sgot->_raw_size += 4;
+ sgot->size += 4;
/* Allocate relocation space. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
h->got.refcount++;
}
@@ -536,13 +536,13 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
}
if (local_got_refcounts[r_symndx] == 0)
{
- sgot->_raw_size += 4;
+ sgot->size += 4;
if (info->shared)
{
/* If we are generating a shared object, we need to
output a R_68K_RELATIVE reloc so that the dynamic
linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ srelgot->size += sizeof (Elf32_External_Rela);
}
}
local_got_refcounts[r_symndx]++;
@@ -684,7 +684,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
|| ELF32_R_TYPE (rel->r_info) == R_68K_PC32))
info->flags |= DF_TEXTREL;
- sreloc->_raw_size += sizeof (Elf32_External_Rela);
+ sreloc->size += sizeof (Elf32_External_Rela);
/* We count the number of PC relative relocations we have
entered for this symbol, so that we can discard them
@@ -856,8 +856,8 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
if (h->got.refcount == 0)
{
/* We don't need the .got entry any more. */
- sgot->_raw_size -= 4;
- srelgot->_raw_size -= sizeof (Elf32_External_Rela);
+ sgot->size -= 4;
+ srelgot->size -= sizeof (Elf32_External_Rela);
}
}
}
@@ -869,9 +869,9 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
if (local_got_refcounts[r_symndx] == 0)
{
/* We don't need the .got entry any more. */
- sgot->_raw_size -= 4;
+ sgot->size -= 4;
if (info->shared)
- srelgot->_raw_size -= sizeof (Elf32_External_Rela);
+ srelgot->size -= sizeof (Elf32_External_Rela);
}
}
}
@@ -979,12 +979,12 @@ elf_m68k_adjust_dynamic_symbol (info, h)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
if (CPU32_FLAG (dynobj))
- s->_raw_size += PLT_CPU32_ENTRY_SIZE;
+ s->size += PLT_CPU32_ENTRY_SIZE;
else
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
}
/* If this symbol is not defined in a regular file, and we are
@@ -996,27 +996,27 @@ elf_m68k_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
}
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this entry. */
if (CPU32_FLAG (dynobj))
- s->_raw_size += PLT_CPU32_ENTRY_SIZE;
+ s->size += PLT_CPU32_ENTRY_SIZE;
else
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += 4;
+ s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
+ s->size += sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -1070,7 +1070,7 @@ elf_m68k_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1081,8 +1081,7 @@ elf_m68k_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (!bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -1091,10 +1090,10 @@ elf_m68k_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1121,7 +1120,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1134,7 +1133,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* If this is a -Bsymbolic shared link, then we need to discard all
@@ -1169,7 +1168,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -1183,7 +1182,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -1223,8 +1222,8 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
are written out, but at the moment this does not happen. Thus in
order to prevent writing out garbage, we initialise the section's
contents to zero. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -1319,7 +1318,7 @@ elf_m68k_discard_copies (h, inf)
for (s = elf_m68k_hash_entry (h)->pcrel_relocs_copied;
s != NULL;
s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
+ s->section->size -= s->count * sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -1706,9 +1705,9 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
return FALSE;
@@ -1745,9 +1744,8 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -1970,7 +1968,7 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -1999,10 +1997,7 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -2016,19 +2011,14 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
+ dyn.d_un.d_val -= s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
}
/* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
{
if (!CPU32_FLAG (output_bfd))
{
@@ -2066,7 +2056,7 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index e6aa666c6dc..b51649c4b95 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -350,8 +350,8 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
{
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
- _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_archive_filename (abfd),
+ _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
+ abfd,
reloc_entry->howto->name,
reloc_entry->howto->type);
@@ -406,12 +406,12 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean ret = TRUE;
#ifdef DEBUG
- fprintf (stderr,
- "mcore_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_archive_filename (input_bfd),
- bfd_section_name(input_bfd, input_section),
- (long) input_section->reloc_count,
- (info->relocatable) ? " (relocatable)" : "");
+ _bfd_error_handler
+ ("mcore_elf_relocate_section called for %B section %A, %ld relocations%s",
+ input_bfd,
+ input_section,
+ (long) input_section->reloc_count,
+ (info->relocatable) ? " (relocatable)" : "");
#endif
if (info->relocatable)
@@ -438,9 +438,8 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if ((unsigned) r_type >= (unsigned) R_MCORE_max
|| ! mcore_elf_howto_table [(int)r_type])
{
- _bfd_error_handler (_("%s: Unknown relocation type %d\n"),
- bfd_archive_filename (input_bfd),
- (int) r_type);
+ _bfd_error_handler (_("%B: Unknown relocation type %d\n"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -453,8 +452,8 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Complain about known relocation that are not yet supported. */
if (howto->special_function == mcore_elf_unsupported_reloc)
{
- _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
- bfd_archive_filename (input_bfd),
+ _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
+ input_bfd,
howto->name,
(int)r_type);
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index a0480f09700..9774215d018 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -599,39 +599,6 @@ static reloc_howto_type elf_mips16_gprel_howto =
0x07ff001f, /* dst_mask */
FALSE); /* pcrel_offset */
-/* GNU extensions for embedded-pic. */
-/* High 16 bits of symbol value, pc-relative. */
-static reloc_howto_type elf_mips_gnu_rel_hi16 =
- HOWTO (R_MIPS_GNU_REL_HI16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_hi16_reloc, /* special_function */
- "R_MIPS_GNU_REL_HI16", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE); /* pcrel_offset */
-
-/* Low 16 bits of symbol value, pc-relative. */
-static reloc_howto_type elf_mips_gnu_rel_lo16 =
- HOWTO (R_MIPS_GNU_REL_LO16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_lo16_reloc, /* special_function */
- "R_MIPS_GNU_REL_LO16", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE); /* pcrel_offset */
-
/* 16 bit offset for pc-relative branches. */
static reloc_howto_type elf_mips_gnu_rel16_s2 =
HOWTO (R_MIPS_GNU_REL16_S2, /* type */
@@ -648,23 +615,10 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 =
0xffff, /* dst_mask */
TRUE); /* pcrel_offset */
-/* 64 bit pc-relative. */
-static reloc_howto_type elf_mips_gnu_pcrel64 =
- HOWTO (R_MIPS_PC64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_PC64", /* name */
- TRUE, /* partial_inplace */
- MINUS_ONE, /* src_mask */
- MINUS_ONE, /* dst_mask */
- TRUE); /* pcrel_offset */
-
-/* 32 bit pc-relative. */
+/* 32 bit pc-relative. This was a GNU extension used by embedded-PIC.
+ It was co-opted by mips-linux for exception-handling data. It is no
+ longer used, but should continue to be supported by the linker for
+ backward compatibility. (GCC stopped using it in May, 2004.) */
static reloc_howto_type elf_mips_gnu_pcrel32 =
HOWTO (R_MIPS_PC32, /* type */
0, /* rightshift */
@@ -879,7 +833,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Set val to the offset into the section or symbol. */
@@ -1011,7 +965,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -1134,14 +1088,8 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
- case BFD_RELOC_PCREL_HI16_S:
- return &elf_mips_gnu_rel_hi16;
- case BFD_RELOC_PCREL_LO16:
- return &elf_mips_gnu_rel_lo16;
case BFD_RELOC_16_PCREL_S2:
return &elf_mips_gnu_rel16_s2;
- case BFD_RELOC_64_PCREL:
- return &elf_mips_gnu_pcrel64;
case BFD_RELOC_32_PCREL:
return &elf_mips_gnu_pcrel32;
}
@@ -1163,14 +1111,8 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
return &elf_mips_gnu_vtentry_howto;
- case R_MIPS_GNU_REL_HI16:
- return &elf_mips_gnu_rel_hi16;
- case R_MIPS_GNU_REL_LO16:
- return &elf_mips_gnu_rel_lo16;
case R_MIPS_GNU_REL16_S2:
return &elf_mips_gnu_rel16_s2;
- case R_MIPS_PC64:
- return &elf_mips_gnu_pcrel64;
case R_MIPS_PC32:
return &elf_mips_gnu_pcrel32;
default:
@@ -1267,7 +1209,7 @@ static bfd_boolean
elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -1283,14 +1225,14 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 180;
+ size = 180;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -1335,139 +1277,6 @@ elf32_mips_irix_compat (bfd *abfd)
return ict_none;
}
-/* Given a data section and an in-memory embedded reloc section, store
- relocation information into the embedded reloc section which can be
- used at runtime to relocate the data section. This is called by the
- linker when the --embedded-relocs switch is used. This is called
- after the add_symbols entry point has been called for all the
- objects, and before the final_link entry point is called. */
-
-bfd_boolean
-bfd_mips_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info,
- asection *datasec, asection *relsec,
- char **errmsg)
-{
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Sym *isymbuf = NULL;
- Elf_Internal_Rela *internal_relocs = NULL;
- Elf_Internal_Rela *irel, *irelend;
- bfd_byte *p;
-
- BFD_ASSERT (! info->relocatable);
-
- *errmsg = NULL;
-
- if (datasec->reloc_count == 0)
- return TRUE;
-
- /* Read this BFD's symbols if we haven't done so already, or get the cached
- copy if it exists. */
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- if (symtab_hdr->sh_info != 0)
- {
- isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
- if (isymbuf == NULL)
- isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
- symtab_hdr->sh_info, 0,
- NULL, NULL, NULL);
- if (isymbuf == NULL)
- goto error_return;
- }
-
- /* Get a copy of the native relocations. */
- internal_relocs = _bfd_elf_link_read_relocs (abfd, datasec, NULL, NULL,
- info->keep_memory);
- if (internal_relocs == NULL)
- goto error_return;
-
- relsec->contents = bfd_alloc (abfd, datasec->reloc_count * 12);
- if (relsec->contents == NULL)
- goto error_return;
-
- p = relsec->contents;
-
- irelend = internal_relocs + datasec->reloc_count;
-
- for (irel = internal_relocs; irel < irelend; irel++, p += 12)
- {
- asection *targetsec;
-
- /* We are going to write a four byte longword into the runtime
- reloc section. The longword will be the address in the data
- section which must be relocated. It is followed by the name
- of the target section NUL-padded or truncated to 8
- characters. */
-
- /* We can only relocate absolute longword relocs at run time. */
- if ((ELF32_R_TYPE (irel->r_info) != (int) R_MIPS_32) &&
- (ELF32_R_TYPE (irel->r_info) != (int) R_MIPS_64))
- {
- *errmsg = _("unsupported reloc type");
- bfd_set_error (bfd_error_bad_value);
- goto error_return;
- }
- /* Get the target section referred to by the reloc. */
- if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
- {
- Elf_Internal_Sym *isym;
-
- /* A local symbol. */
- isym = isymbuf + ELF32_R_SYM (irel->r_info);
- targetsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- }
- else
- {
- unsigned long indx;
- struct elf_link_hash_entry *h;
-
- /* An external symbol. */
- indx = ELF32_R_SYM (irel->r_info);
- h = elf_sym_hashes (abfd)[indx];
- targetsec = NULL;
- /*
- For some reason, in certain programs, the symbol will
- not be in the hash table. It seems to happen when you
- declare a static table of pointers to const external structures.
- In this case, the relocs are relative to data, not
- text, so just treating it like an undefined link
- should be sufficient. */
- BFD_ASSERT(h != NULL);
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- targetsec = h->root.u.def.section;
- }
-
-
- /*
- Set the low bit of the relocation offset if it's a MIPS64 reloc.
- Relocations will always be on (at least) 32-bit boundaries. */
-
- bfd_put_32 (abfd, ((irel->r_offset + datasec->output_offset) +
- ((ELF32_R_TYPE (irel->r_info) == (int) R_MIPS_64) ? 1 : 0)),
- p);
- memset (p + 4, 0, 8);
- if (targetsec != NULL)
- strncpy (p + 4, targetsec->output_section->name, 8);
- }
-
- if (internal_relocs != NULL
- && elf_section_data (datasec)->relocs != internal_relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && symtab_hdr->contents != (unsigned char *) isymbuf)
- free (isymbuf);
- return TRUE;
-
- error_return:
- if (internal_relocs != NULL
- && elf_section_data (datasec)->relocs != internal_relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && symtab_hdr->contents != (unsigned char *) isymbuf)
- free (isymbuf);
- return FALSE;
-}
-
/* ECOFF swapping routines. These are used when dealing with the
.mdebug section, which is in the ECOFF debugging format. */
static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index dfe33bd246f..ba59cf7f874 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -25,41 +25,6 @@
#include "elf-bfd.h"
#include "elf/msp430.h"
-static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-static void msp430_info_to_howto_rela
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static asection *elf32_msp430_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-
-static bfd_boolean elf32_msp430_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-
-static bfd_boolean elf32_msp430_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-
-static bfd_reloc_status_type msp430_final_link_relocate
- PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, bfd_vma));
-
-static bfd_boolean elf32_msp430_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
-static void bfd_elf_msp430_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
-
-static bfd_boolean elf32_msp430_object_p
- PARAMS ((bfd *));
-
-static void elf32_msp430_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
/* Use RELA instead of REL. */
#undef USE_REL
@@ -71,7 +36,7 @@ static reloc_howto_type elf_msp430_howto_table[] =
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
+ complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_MSP430_NONE", /* name */
FALSE, /* partial_inplace */
@@ -85,7 +50,7 @@ static reloc_howto_type elf_msp430_howto_table[] =
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
+ complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_MSP430_32", /* name */
FALSE, /* partial_inplace */
@@ -100,7 +65,7 @@ static reloc_howto_type elf_msp430_howto_table[] =
10, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
+ complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_MSP430_13_PCREL", /* name */
FALSE, /* partial_inplace */
@@ -119,7 +84,7 @@ static reloc_howto_type elf_msp430_howto_table[] =
bfd_elf_generic_reloc, /* special_function */
"R_MSP430_16", /* name */
FALSE, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
@@ -134,7 +99,7 @@ static reloc_howto_type elf_msp430_howto_table[] =
bfd_elf_generic_reloc, /* special_function */
"R_MSP430_16_PCREL", /* name */
FALSE, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
TRUE), /* pcrel_offset */
@@ -162,10 +127,40 @@ static reloc_howto_type elf_msp430_howto_table[] =
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_MSP430_16_PCREL_BYTE", /* name */
+ "R_MSP430_16_PCREL_BYTE",/* name */
FALSE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 13 bit PC relative relocation for complicated polymorphs. */
+ HOWTO (R_MSP430_2X_PCREL, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 10, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_2X_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0xfff, /* src_mask */
+ 0xfff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 16 bit relaxable relocation for command address. */
+ HOWTO (R_MSP430_RL_PCREL, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_RL_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
TRUE) /* pcrel_offset */
};
@@ -179,20 +174,21 @@ struct msp430_reloc_map
static const struct msp430_reloc_map msp430_reloc_map[] =
{
- {BFD_RELOC_NONE, R_MSP430_NONE},
- {BFD_RELOC_32, R_MSP430_32},
- {BFD_RELOC_MSP430_10_PCREL, R_MSP430_10_PCREL},
- {BFD_RELOC_16, R_MSP430_16_BYTE},
- {BFD_RELOC_MSP430_16_PCREL, R_MSP430_16_PCREL},
- {BFD_RELOC_MSP430_16, R_MSP430_16},
+ {BFD_RELOC_NONE, R_MSP430_NONE},
+ {BFD_RELOC_32, R_MSP430_32},
+ {BFD_RELOC_MSP430_10_PCREL, R_MSP430_10_PCREL},
+ {BFD_RELOC_16, R_MSP430_16_BYTE},
+ {BFD_RELOC_MSP430_16_PCREL, R_MSP430_16_PCREL},
+ {BFD_RELOC_MSP430_16, R_MSP430_16},
{BFD_RELOC_MSP430_16_PCREL_BYTE, R_MSP430_16_PCREL_BYTE},
- {BFD_RELOC_MSP430_16_BYTE, R_MSP430_16_BYTE}
+ {BFD_RELOC_MSP430_16_BYTE, R_MSP430_16_BYTE},
+ {BFD_RELOC_MSP430_2X_PCREL, R_MSP430_2X_PCREL},
+ {BFD_RELOC_MSP430_RL_PCREL, R_MSP430_RL_PCREL}
};
static reloc_howto_type *
-bfd_elf32_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+bfd_elf32_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
@@ -206,10 +202,9 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
/* Set the howto pointer for an MSP430 ELF reloc. */
static void
-msp430_info_to_howto_rela (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+ arelent * cache_ptr,
+ Elf_Internal_Rela * dst)
{
unsigned int r_type;
@@ -219,12 +214,11 @@ msp430_info_to_howto_rela (abfd, cache_ptr, dst)
}
static asection *
-elf32_msp430_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf32_msp430_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
if (h != NULL)
{
@@ -252,11 +246,10 @@ elf32_msp430_gc_mark_hook (sec, info, rel, h, sym)
}
static bfd_boolean
-elf32_msp430_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+elf32_msp430_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
{
/* We don't use got and plt entries for msp430. */
return TRUE;
@@ -267,11 +260,8 @@ elf32_msp430_gc_sweep_hook (abfd, info, sec, relocs)
virtual table relocs for gc. */
static bfd_boolean
-elf32_msp430_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info,
+ asection * sec, const Elf_Internal_Rela * relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
@@ -308,14 +298,9 @@ elf32_msp430_check_relocs (abfd, info, sec, relocs)
routines, but a few relocs, we have to do them ourselves. */
static bfd_reloc_status_type
-msp430_final_link_relocate (howto, input_bfd, input_section,
- contents, rel, relocation)
- reloc_howto_type *howto;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *rel;
- bfd_vma relocation;
+msp430_final_link_relocate (reloc_howto_type * howto, bfd * input_bfd,
+ asection * input_section, bfd_byte * contents,
+ Elf_Internal_Rela * rel, bfd_vma relocation)
{
bfd_reloc_status_type r = bfd_reloc_ok;
bfd_vma x;
@@ -347,7 +332,37 @@ msp430_final_link_relocate (howto, input_bfd, input_section,
bfd_put_16 (input_bfd, x, contents);
break;
+ case R_MSP430_2X_PCREL:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+ srel -= rel->r_offset;
+ srel -= 2; /* Branch instructions add 2 to the PC... */
+ srel -= (input_section->output_section->vma +
+ input_section->output_offset);
+
+ if (srel & 1)
+ return bfd_reloc_outofrange;
+
+ /* MSP430 addresses commands as words. */
+ srel >>= 1;
+
+ /* Check for an overflow. */
+ if (srel < -512 || srel > 511)
+ return bfd_reloc_overflow;
+
+ x = bfd_get_16 (input_bfd, contents);
+ x = (x & 0xfc00) | (srel & 0x3ff);
+ bfd_put_16 (input_bfd, x, contents);
+ /* Handle second jump instruction. */
+ x = bfd_get_16 (input_bfd, contents - 2);
+ srel += 1;
+ x = (x & 0xfc00) | (srel & 0x3ff);
+ bfd_put_16 (input_bfd, x, contents - 2);
+ break;
+
case R_MSP430_16_PCREL:
+ case R_MSP430_RL_PCREL:
contents += rel->r_offset;
srel = (bfd_signed_vma) relocation;
srel += rel->r_addend;
@@ -404,16 +419,14 @@ msp430_final_link_relocate (howto, input_bfd, input_section,
/* Relocate an MSP430 ELF section. */
static bfd_boolean
-elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * relocs,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -520,9 +533,8 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
number. */
static void
-bfd_elf_msp430_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+bfd_elf_msp430_final_write_processing (bfd * abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
unsigned long val;
@@ -594,8 +606,7 @@ bfd_elf_msp430_final_write_processing (abfd, linker)
/* Set the right machine number. */
static bfd_boolean
-elf32_msp430_object_p (abfd)
- bfd *abfd;
+elf32_msp430_object_p (bfd * abfd)
{
int e_set = bfd_mach_msp14;
@@ -669,11 +680,10 @@ elf32_msp430_object_p (abfd)
}
static void
-elf32_msp430_post_process_headers (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+elf32_msp430_post_process_headers (bfd * abfd,
+ struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
{
- Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */
+ Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
i_ehdrp = elf_elfheader (abfd);
@@ -684,6 +694,466 @@ elf32_msp430_post_process_headers (abfd, link_info)
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_STANDALONE;
}
+/* These functions handle relaxing for the msp430.
+ Relaxation required only in two cases:
+ - Bad hand coding like jumps from one section to another or
+ from file to file.
+ - Sibling calls. This will affect onlu 'jump label' polymorph. Without
+ relaxing this enlarges code by 2 bytes. Sibcalls implemented but
+ do not work in gcc's port by the reason I do not know.
+ Anyway, if a relaxation required, user should pass -relax option to the
+ linker.
+
+ There are quite a few relaxing opportunities available on the msp430:
+
+ ================================================================
+
+ 1. 3 words -> 1 word
+
+ eq == jeq label jne +4; br lab
+ ne != jne label jeq +4; br lab
+ lt < jl label jge +4; br lab
+ ltu < jlo label lhs +4; br lab
+ ge >= jge label jl +4; br lab
+ geu >= jhs label jlo +4; br lab
+
+ 2. 4 words -> 1 word
+
+ ltn < jn jn +2; jmp +4; br lab
+
+ 3. 4 words -> 2 words
+
+ gt > jeq +2; jge label jeq +6; jl +4; br label
+ gtu > jeq +2; jhs label jeq +6; jlo +4; br label
+
+ 4. 4 words -> 2 words and 2 labels
+
+ leu <= jeq label; jlo label jeq +2; jhs +4; br label
+ le <= jeq label; jl label jeq +2; jge +4; br label
+ =================================================================
+
+ codemap for first cases is (labels masked ):
+ eq: 0x2002,0x4010,0x0000 -> 0x2400
+ ne: 0x2402,0x4010,0x0000 -> 0x2000
+ lt: 0x3402,0x4010,0x0000 -> 0x3800
+ ltu: 0x2c02,0x4010,0x0000 -> 0x2800
+ ge: 0x3802,0x4010,0x0000 -> 0x3400
+ geu: 0x2802,0x4010,0x0000 -> 0x2c00
+
+ second case:
+ ltn: 0x3001,0x3c02,0x4010,0x0000 -> 0x3000
+
+ third case:
+ gt: 0x2403,0x3802,0x4010,0x0000 -> 0x2401,0x3400
+ gtu: 0x2403,0x2802,0x4010,0x0000 -> 0x2401,0x2c00
+
+ fourth case:
+ leu: 0x2401,0x2c02,0x4010,0x0000 -> 0x2400,0x2800
+ le: 0x2401,0x3402,0x4010,0x0000 -> 0x2400,0x3800
+
+ Unspecified case :)
+ jump: 0x4010,0x0000 -> 0x3c00. */
+
+#define NUMB_RELAX_CODES 12
+static struct rcodes_s
+{
+ int f0, f1; /* From code. */
+ int t0, t1; /* To code. */
+ int labels; /* Position of labels: 1 - one label at first
+ word, 2 - one at second word, 3 - two
+ labels at both. */
+ int cdx; /* Words to match. */
+ int bs; /* Shrink bytes. */
+ int off; /* Offset from old label for new code. */
+ int ncl; /* New code length. */
+} rcode[] =
+{/* lab,cdx,bs,off,ncl */
+ { 0x0000, 0x0000, 0x3c00, 0x0000, 1, 0, 2, 2, 2}, /* jump */
+ { 0x0000, 0x2002, 0x2400, 0x0000, 1, 1, 4, 4, 2}, /* eq */
+ { 0x0000, 0x2402, 0x2000, 0x0000, 1, 1, 4, 4, 2}, /* ne */
+ { 0x0000, 0x3402, 0x3800, 0x0000, 1, 1, 4, 4, 2}, /* lt */
+ { 0x0000, 0x2c02, 0x2800, 0x0000, 1, 1, 4, 4, 2}, /* ltu */
+ { 0x0000, 0x3802, 0x3400, 0x0000, 1, 1, 4, 4, 2}, /* ge */
+ { 0x0000, 0x2802, 0x2c00, 0x0000, 1, 1, 4, 4, 2}, /* geu */
+ { 0x3001, 0x3c02, 0x3000, 0x0000, 1, 2, 6, 6, 2}, /* ltn */
+ { 0x2403, 0x3802, 0x2401, 0x3400, 2, 2, 4, 6, 4}, /* gt */
+ { 0x2403, 0x2802, 0x2401, 0x2c00, 2, 2, 4, 6, 4}, /* gtu */
+ { 0x2401, 0x2c02, 0x2400, 0x2800, 3, 2, 4, 6, 4}, /* leu , 2 labels */
+ { 0x2401, 0x2c02, 0x2400, 0x2800, 3, 2, 4, 6, 4}, /* le , 2 labels */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0}
+};
+
+/* Return TRUE if a symbol exists at the given address. */
+
+static bfd_boolean
+msp430_elf_symbol_address_p (bfd * abfd,
+ asection * sec,
+ Elf_Internal_Sym * isym,
+ bfd_vma addr)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned int sec_shndx;
+ Elf_Internal_Sym *isymend;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ /* Examine all the local symbols. */
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
+ if (isym->st_shndx == sec_shndx && isym->st_value == addr)
+ return TRUE;
+
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+ for (; sym_hashes < end_hashes; sym_hashes++)
+ {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec
+ && sym_hash->root.u.def.value == addr)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* Delete some bytes from a section while relaxing. */
+
+static bfd_boolean
+msp430_elf_relax_delete_bytes (bfd * abfd, asection * sec, bfd_vma addr,
+ int count)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned int sec_shndx;
+ bfd_byte *contents;
+ Elf_Internal_Rela *irel;
+ Elf_Internal_Rela *irelend;
+ Elf_Internal_Rela *irelalign;
+ bfd_vma toaddr;
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ contents = elf_section_data (sec)->this_hdr.contents;
+
+ /* The deletion must stop at the next ALIGN reloc for an aligment
+ power larger than the number of bytes we are deleting. */
+
+ irelalign = NULL;
+ toaddr = sec->size;
+
+ irel = elf_section_data (sec)->relocs;
+ irelend = irel + sec->reloc_count;
+
+ /* Actually delete the bytes. */
+ memmove (contents + addr, contents + addr + count,
+ (size_t) (toaddr - addr - count));
+ sec->size -= count;
+
+ /* Adjust all the relocs. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ /* Get the new reloc address. */
+ if ((irel->r_offset > addr && irel->r_offset < toaddr))
+ irel->r_offset -= count;
+
+ /* Adjust the local symbols defined in this section. */
+ symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
+ isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
+ if (isym->st_shndx == sec_shndx
+ && isym->st_value > addr && isym->st_value < toaddr)
+ isym->st_value -= count;
+
+ /* Now adjust the global symbols defined in this section. */
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+ for (; sym_hashes < end_hashes; sym_hashes++)
+ {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec
+ && sym_hash->root.u.def.value > addr
+ && sym_hash->root.u.def.value < toaddr)
+ sym_hash->root.u.def.value -= count;
+ }
+
+ return TRUE;
+}
+
+
+static bfd_boolean
+msp430_elf_relax_section (bfd * abfd, asection * sec,
+ struct bfd_link_info * link_info,
+ bfd_boolean * again)
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ Elf_Internal_Rela * internal_relocs;
+ Elf_Internal_Rela * irel;
+ Elf_Internal_Rela * irelend;
+ bfd_byte * contents = NULL;
+ Elf_Internal_Sym * isymbuf = NULL;
+
+ /* Assume nothing changes. */
+ *again = FALSE;
+
+ /* We don't have to do anything for a relocatable link, if
+ this section does not have relocs, or if this is not a
+ code section. */
+ if (link_info->relocatable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0)
+ return TRUE;
+
+ symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
+
+ /* Get a copy of the native relocations. */
+ internal_relocs =
+ _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, link_info->keep_memory);
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ /* Walk through them looking for relaxing opportunities. */
+ irelend = internal_relocs + sec->reloc_count;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+
+ /* If this isn't something that can be relaxed, then ignore
+ this reloc. */
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_MSP430_RL_PCREL)
+ continue;
+
+ /* Get the section contents if we haven't done so already. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+ goto error_return;
+ }
+
+ /* Read this BFD's local symbols if we haven't done so already. */
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ Elf_Internal_Sym *isym;
+ asection *sym_sec;
+
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ if (isym->st_shndx == SHN_UNDEF)
+ sym_sec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ sym_sec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ sym_sec = bfd_com_section_ptr;
+ else
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ + sym_sec->output_section->vma + sym_sec->output_offset);
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry *h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+
+ /* For simplicity of coding, we are going to modify the section
+ contents, the section relocs, and the BFD symbol table. We
+ must tell the rest of the code not to free up this
+ information. It would be possible to instead create a table
+ of changes which have to be made, as is done in coff-mips.c;
+ that would be more work, but would require less memory when
+ the linker is run. */
+
+ /* Try to turn a 16bit pc-relative branch into a 10bit pc-relative
+ branch. */
+ /* Paranoia? paranoia... */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_MSP430_RL_PCREL)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 10 bits, note the high value is
+ 1016 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 1016 && (long) value > -1016)
+ {
+ int code0 = 0, code1 = 0, code2 = 0;
+ int i;
+ struct rcodes_s *rx;
+
+ /* Get the opcode. */
+ if (irel->r_offset >= 6)
+ code0 = bfd_get_16 (abfd, contents + irel->r_offset - 6);
+
+ if (irel->r_offset >= 4)
+ code1 = bfd_get_16 (abfd, contents + irel->r_offset - 4);
+
+ code2 = bfd_get_16 (abfd, contents + irel->r_offset - 2);
+
+ if (code2 != 0x4010)
+ continue;
+
+ /* Check r4 and r3. */
+ for (i = NUMB_RELAX_CODES - 1; i >= 0; i--)
+ {
+ rx = &rcode[i];
+ if (rx->cdx == 2 && rx->f0 == code0 && rx->f1 == code1)
+ break;
+ else if (rx->cdx == 1 && rx->f1 == code1)
+ break;
+ else if (rx->cdx == 0) /* This is an unconditional jump. */
+ break;
+ }
+
+ /* Check labels:
+ .Label0: ; we do not care about this label
+ jeq +6
+ .Label1: ; make sure there is no label here
+ jl +4
+ .Label2: ; make sure there is no label here
+ br .Label_dst
+
+ So, if there is .Label1 or .Label2 we cannot relax this code.
+ This actually should not happen, cause for relaxable
+ instructions we use RL_PCREL reloc instead of 16_PCREL.
+ Will change this in the future. */
+
+ if (rx->cdx > 0
+ && msp430_elf_symbol_address_p (abfd, sec, isymbuf,
+ irel->r_offset - 2))
+ continue;
+ if (rx->cdx > 1
+ && msp430_elf_symbol_address_p (abfd, sec, isymbuf,
+ irel->r_offset - 4))
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the relocation's type. */
+ if (rx->labels == 3) /* Handle special cases. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_MSP430_2X_PCREL);
+ else
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_MSP430_10_PCREL);
+
+ /* Fix the opcode right way. */
+ bfd_put_16 (abfd, rx->t0, contents + irel->r_offset - rx->off);
+ if (rx->t1)
+ bfd_put_16 (abfd, rx->t1,
+ contents + irel->r_offset - rx->off + 2);
+
+ /* Delete bytes. */
+ if (!msp430_elf_relax_delete_bytes (abfd, sec,
+ irel->r_offset - rx->off +
+ rx->ncl, rx->bs))
+ goto error_return;
+
+ /* Handle unconditional jumps. */
+ if (rx->cdx == 0)
+ irel->r_offset -= 2;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+ }
+
+ if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+ {
+ if (!link_info->keep_memory)
+ free (isymbuf);
+ else
+ {
+ /* Cache the symbols for elf_link_input_bfd. */
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+ }
+ }
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ {
+ if (!link_info->keep_memory)
+ free (contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = contents;
+ }
+ }
+
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return TRUE;
+
+error_return:
+ if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return FALSE;
+}
+
#define ELF_ARCH bfd_arch_msp430
#define ELF_MACHINE_CODE EM_MSP430
@@ -703,5 +1173,6 @@ elf32_msp430_post_process_headers (abfd, link_info)
#define elf_backend_final_write_processing bfd_elf_msp430_final_write_processing
#define elf_backend_object_p elf32_msp430_object_p
#define elf_backend_post_process_headers elf32_msp430_post_process_headers
+#define bfd_elf32_bfd_relax_section msp430_elf_relax_section
#include "elf32-target.h"
diff --git a/bfd/elf32-or32.c b/bfd/elf32-or32.c
index 65f8e2617d3..14195202d20 100644
--- a/bfd/elf32-or32.c
+++ b/bfd/elf32-or32.c
@@ -1,5 +1,5 @@
/* OR32-specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Ivan Guzvinec <ivang@opencores.org>
This file is part of BFD, the Binary File Descriptor library.
@@ -417,7 +417,7 @@ or32_elf_consth_reloc (abfd, reloc_entry, symbol, data, input_section,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Save the information, and let LO16 do the actual relocation. */
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 4eb08ad3e67..9c22c172449 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1679,11 +1679,7 @@ ppc_elf_relax_section (bfd *abfd,
if ((isec->flags & SEC_RELOC) == 0 || isec->reloc_count == 0)
return TRUE;
- /* If needed, initialize this section's cooked size. */
- if (isec->_cooked_size == 0)
- isec->_cooked_size = isec->_raw_size;
-
- trampoff = (isec->_cooked_size + 3) & (bfd_vma) -4;
+ trampoff = (isec->size + 3) & (bfd_vma) -4;
/* Space for a branch around any trampolines. */
trampoff += 4;
@@ -1698,21 +1694,6 @@ ppc_elf_relax_section (bfd *abfd,
ppc_info = ppc_elf_hash_table (link_info);
irelend = internal_relocs + isec->reloc_count;
- /* Get the section contents. */
- /* Get cached copy if it exists. */
- if (elf_section_data (isec)->this_hdr.contents != NULL)
- contents = elf_section_data (isec)->this_hdr.contents;
- else
- {
- /* Go get them off disk. */
- contents = bfd_malloc (isec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (abfd, isec, contents, 0, isec->_raw_size))
- goto error_return;
- }
-
for (irel = internal_relocs; irel < irelend; irel++)
{
unsigned long r_type = ELF32_R_TYPE (irel->r_info);
@@ -1723,6 +1704,7 @@ ppc_elf_relax_section (bfd *abfd,
bfd_vma max_branch_offset, val;
bfd_byte *hit_addr;
unsigned long t0;
+ unsigned char sym_type;
switch (r_type)
{
@@ -1770,6 +1752,7 @@ ppc_elf_relax_section (bfd *abfd,
tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
toff = isym->st_value;
+ sym_type = ELF_ST_TYPE (isym->st_info);
}
else
{
@@ -1799,6 +1782,8 @@ ppc_elf_relax_section (bfd *abfd,
}
else
continue;
+
+ sym_type = h->type;
}
/* If the branch and target are in the same section, you have
@@ -1807,11 +1792,41 @@ ppc_elf_relax_section (bfd *abfd,
if (tsec == isec)
continue;
- toff += irel->r_addend;
- if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
- toff = _bfd_merged_section_offset (abfd, &tsec,
- elf_section_data (tsec)->sec_info,
- toff, 0);
+ /* There probably isn't any reason to handle symbols in
+ SEC_MERGE sections; SEC_MERGE doesn't seem a likely
+ attribute for a code section, and we are only looking at
+ branches. However, implement it correctly here as a
+ reference for other target relax_section functions. */
+ if (0 && tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ {
+ /* At this stage in linking, no SEC_MERGE symbol has been
+ adjusted, so all references to such symbols need to be
+ passed through _bfd_merged_section_offset. (Later, in
+ relocate_section, all SEC_MERGE symbols *except* for
+ section symbols have been adjusted.)
+
+ gas may reduce relocations against symbols in SEC_MERGE
+ sections to a relocation against the section symbol when
+ the original addend was zero. When the reloc is against
+ a section symbol we should include the addend in the
+ offset passed to _bfd_merged_section_offset, since the
+ location of interest is the original symbol. On the
+ other hand, an access to "sym+addend" where "sym" is not
+ a section symbol should not include the addend; Such an
+ access is presumed to be an offset from "sym"; The
+ location of interest is just "sym". */
+ if (sym_type == STT_SECTION)
+ toff += irel->r_addend;
+
+ toff = _bfd_merged_section_offset (abfd, &tsec,
+ elf_section_data (tsec)->sec_info,
+ toff);
+
+ if (sym_type != STT_SECTION)
+ toff += irel->r_addend;
+ }
+ else
+ toff += irel->r_addend;
symaddr = tsec->output_section->vma + tsec->output_offset + toff;
@@ -1877,6 +1892,20 @@ ppc_elf_relax_section (bfd *abfd,
irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
}
+ /* Get the section contents. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (isec)->this_hdr.contents != NULL)
+ contents = elf_section_data (isec)->this_hdr.contents;
+ else
+ {
+ /* Go get them off disk. */
+ if (!bfd_malloc_and_get_section (abfd, isec, &contents))
+ goto error_return;
+ }
+ }
+
/* Fix up the existing branch to hit the trampoline. */
hit_addr = contents + roff;
switch (r_type)
@@ -1922,11 +1951,11 @@ ppc_elf_relax_section (bfd *abfd,
if (contents == NULL)
goto error_return;
- isec->_cooked_size = (isec->_cooked_size + 3) & (bfd_vma) -4;
+ isec->size = (isec->size + 3) & (bfd_vma) -4;
/* Branch around the trampolines. */
- val = trampoff - isec->_cooked_size + 0x48000000;
- dest = contents + isec->_cooked_size;
- isec->_cooked_size = trampoff;
+ val = trampoff - isec->size + 0x48000000;
+ dest = contents + isec->size;
+ isec->size = trampoff;
bfd_put_32 (abfd, val, dest);
dest += 4;
@@ -2135,7 +2164,7 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
return bfd_reloc_ok;
}
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -2253,18 +2282,16 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled with -mrelocatable and linked with "
- "modules compiled normally"),
- bfd_archive_filename (ibfd));
+ (_("%B: compiled with -mrelocatable and linked with "
+ "modules compiled normally"), ibfd);
}
else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
&& (old_flags & EF_PPC_RELOCATABLE) != 0)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled normally and linked with "
- "modules compiled with -mrelocatable"),
- bfd_archive_filename (ibfd));
+ (_("%B: compiled normally and linked with "
+ "modules compiled with -mrelocatable"), ibfd);
}
/* The output is -mrelocatable-lib iff both the input files are. */
@@ -2290,9 +2317,9 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields "
+ (_("%B: uses different e_flags (0x%lx) fields "
"than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
+ ibfd, (long) new_flags, (long) old_flags);
}
if (error)
@@ -2397,7 +2424,7 @@ elf_create_pointer_linker_section (bfd *abfd,
}
if (lsect->rel_section)
- lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+ lsect->rel_section->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -2433,7 +2460,7 @@ elf_create_pointer_linker_section (bfd *abfd,
output a R_<xxx>_RELATIVE reloc so that the
dynamic linker can adjust this GOT entry. */
BFD_ASSERT (lsect->rel_section != NULL);
- lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+ lsect->rel_section->size += sizeof (Elf32_External_Rela);
}
}
@@ -2452,14 +2479,14 @@ elf_create_pointer_linker_section (bfd *abfd,
linker_section_ptr->written_address_p = FALSE;
*ptr_linker_section_ptr = linker_section_ptr;
- linker_section_ptr->offset = lsect->section->_raw_size;
- lsect->section->_raw_size += 4;
+ linker_section_ptr->offset = lsect->section->size;
+ lsect->section->size += 4;
#ifdef DEBUG
fprintf (stderr,
"Create pointer in linker section %s, offset = %ld, section size = %ld\n",
lsect->name, (long) linker_section_ptr->offset,
- (long) lsect->section->_raw_size);
+ (long) lsect->section->size);
#endif
return TRUE;
@@ -2593,7 +2620,7 @@ ppc_elf_create_linker_section (bfd *abfd,
{
elf_linker_section_t *lsect;
struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
- asection *s;
+ asection *s, *sym_sec;
bfd_size_type amt;
flagword flags;
const char *name;
@@ -2642,13 +2669,15 @@ ppc_elf_create_linker_section (bfd *abfd,
lsect->sym_offset = sym_offset;
/* See if the sections already exist. */
- s = bfd_get_section_by_name (htab->elf.dynobj, name);
+ sym_sec = s = bfd_get_section_by_name (htab->elf.dynobj, name);
if (s == NULL || (s->flags & flags) != flags)
{
s = bfd_make_section_anyway (htab->elf.dynobj, name);
if (s == NULL
|| !bfd_set_section_flags (htab->elf.dynobj, s, flags))
return NULL;
+ if (sym_sec == NULL)
+ sym_sec = s;
}
lsect->section = s;
@@ -2656,11 +2685,11 @@ ppc_elf_create_linker_section (bfd *abfd,
&& !bfd_set_section_alignment (htab->elf.dynobj, s, 2))
return NULL;
- s->_raw_size = align_power (s->_raw_size, 2);
+ s->size = align_power (s->size, 2);
#ifdef DEBUG
fprintf (stderr, "Creating section %s, current size = %ld\n",
- name, (long) s->_raw_size);
+ name, (long) s->size);
#endif
if (sym_name)
@@ -2676,7 +2705,7 @@ ppc_elf_create_linker_section (bfd *abfd,
if ((bh == NULL || bh->type == bfd_link_hash_undefined)
&& !(_bfd_generic_link_add_one_symbol
- (info, abfd, sym_name, BSF_GLOBAL, s, sym_offset, NULL,
+ (info, abfd, sym_name, BSF_GLOBAL, sym_sec, sym_offset, NULL,
FALSE, get_elf_backend_data (abfd)->collect, &bh)))
return NULL;
h = (struct elf_link_hash_entry *) bh;
@@ -2720,11 +2749,11 @@ ppc_elf_additional_program_headers (bfd *abfd)
++ret;
s = bfd_get_section_by_name (abfd, ".sbss2");
- if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size > 0)
++ret;
s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
- if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size > 0)
++ret;
return ret;
@@ -2964,7 +2993,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
else
srel = htab->relbss;
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -2975,8 +3004,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
power_of_two = 4;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -2985,10 +3013,10 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -3042,15 +3070,15 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_INITIAL_ENTRY_SIZE;
/* The PowerPC PLT is actually composed of two parts, the
first part is 2 words (for a load and a jump), and then
there is a remaining word available at the end. */
h->plt.offset = (PLT_INITIAL_ENTRY_SIZE
+ (PLT_SLOT_SIZE
- * ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE)
+ * ((s->size - PLT_INITIAL_ENTRY_SIZE)
/ PLT_ENTRY_SIZE)));
/* If this symbol is not defined in a regular file, and we
@@ -3067,13 +3095,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make room for this entry. After the 8192nd entry, room
for two entries is allocated. */
- s->_raw_size += PLT_ENTRY_SIZE;
- if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
+ s->size += PLT_ENTRY_SIZE;
+ if ((s->size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
> PLT_NUM_SINGLE_ENTRIES)
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->relplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->relplt->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -3105,20 +3133,20 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else
{
bfd_boolean dyn;
- eh->elf.got.offset = htab->got->_raw_size;
+ eh->elf.got.offset = htab->got->size;
if ((eh->tls_mask & TLS_TLS) != 0)
{
if ((eh->tls_mask & TLS_LD) != 0)
- htab->got->_raw_size += 8;
+ htab->got->size += 8;
if ((eh->tls_mask & TLS_GD) != 0)
- htab->got->_raw_size += 8;
+ htab->got->size += 8;
if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
- htab->got->_raw_size += 4;
+ htab->got->size += 4;
if ((eh->tls_mask & TLS_DTPREL) != 0)
- htab->got->_raw_size += 4;
+ htab->got->size += 4;
}
else
- htab->got->_raw_size += 4;
+ htab->got->size += 4;
dyn = htab->elf.dynamic_sections_created;
if ((info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
@@ -3126,12 +3154,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|| eh->elf.root.type != bfd_link_hash_undefweak))
{
/* All the entries we allocated need relocs. */
- htab->relgot->_raw_size
- += ((htab->got->_raw_size - eh->elf.got.offset) / 4
+ htab->relgot->size
+ += ((htab->got->size - eh->elf.got.offset) / 4
* sizeof (Elf32_External_Rela));
/* Except LD only needs one. */
if ((eh->tls_mask & TLS_LD) != 0)
- htab->relgot->_raw_size -= sizeof (Elf32_External_Rela);
+ htab->relgot->size -= sizeof (Elf32_External_Rela);
}
}
}
@@ -3222,7 +3250,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -3283,17 +3311,17 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
if (htab->tlsld_got.refcount > 0)
{
- htab->tlsld_got.offset = htab->got->_raw_size;
- htab->got->_raw_size += 8;
+ htab->tlsld_got.offset = htab->got->size;
+ htab->got->size += 8;
if (info->shared)
- htab->relgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->relgot->size += sizeof (Elf32_External_Rela);
}
else
htab->tlsld_got.offset = (bfd_vma) -1;
@@ -3331,7 +3359,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (p->count != 0)
{
- elf_section_data (p->sec)->sreloc->_raw_size
+ elf_section_data (p->sec)->sreloc->size
+= p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags
& (SEC_READONLY | SEC_ALLOC))
@@ -3360,30 +3388,30 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
htab->tlsld_got.offset. */
if (htab->tlsld_got.offset == (bfd_vma) -1)
{
- htab->tlsld_got.offset = s->_raw_size;
- s->_raw_size += 8;
+ htab->tlsld_got.offset = s->size;
+ s->size += 8;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
*local_got = (bfd_vma) -1;
}
else
{
- *local_got = s->_raw_size;
+ *local_got = s->size;
if ((*lgot_masks & TLS_TLS) != 0)
{
if ((*lgot_masks & TLS_GD) != 0)
- s->_raw_size += 8;
+ s->size += 8;
if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
- s->_raw_size += 4;
+ s->size += 4;
if ((*lgot_masks & TLS_DTPREL) != 0)
- s->_raw_size += 4;
+ s->size += 4;
}
else
- s->_raw_size += 4;
+ s->size += 4;
if (info->shared)
- srel->_raw_size += ((s->_raw_size - *local_got) / 4
- * sizeof (Elf32_External_Rela));
+ srel->size += ((s->size - *local_got) / 4
+ * sizeof (Elf32_External_Rela));
}
}
else
@@ -3411,7 +3439,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -3439,14 +3467,14 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
_bfd_strip_section_from_output (info, s);
continue;
}
/* Allocate memory for the section contents. */
- s->contents = bfd_zalloc (htab->elf.dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (htab->elf.dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -3467,7 +3495,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -3531,8 +3559,8 @@ static void
bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type)
{
(*_bfd_error_handler)
- (_("%s: relocation %s cannot be used when making a shared object"),
- bfd_archive_filename (abfd),
+ (_("%B: relocation %s cannot be used when making a shared object"),
+ abfd,
ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
}
@@ -3558,9 +3586,8 @@ ppc_elf_check_relocs (bfd *abfd,
return TRUE;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
- bfd_get_section_name (abfd, sec),
- bfd_archive_filename (abfd));
+ _bfd_error_handler ("ppc_elf_check_relocs called for section %A in %B",
+ sec, abfd);
#endif
/* Initialize howto table if not already done. */
@@ -3737,10 +3764,10 @@ ppc_elf_check_relocs (bfd *abfd,
{
/* It does not make sense to have a procedure linkage
table entry for a local symbol. */
- (*_bfd_error_handler) (_("%s(%s+0x%lx): %s reloc against "
+ (*_bfd_error_handler) (_("%B(%A+0x%lx): %s reloc against "
"local symbol"),
- bfd_archive_filename (abfd),
- sec->name,
+ abfd,
+ sec,
(long) rel->r_offset,
ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
@@ -4531,7 +4558,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
BFD_ASSERT (htab->plt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -4547,7 +4574,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_PLTRELSZ:
- dyn.d_un.d_val = htab->relplt->_raw_size;
+ dyn.d_un.d_val = htab->relplt->size;
break;
case DT_JMPREL:
@@ -4634,12 +4661,11 @@ ppc_elf_relocate_section (bfd *output_bfd,
bfd_boolean ret = TRUE;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, "
- "%ld relocations%s\n",
- bfd_archive_filename (input_bfd),
- bfd_section_name(input_bfd, input_section),
- (long) input_section->reloc_count,
- (info->relocatable) ? " (relocatable)" : "");
+ _bfd_error_handler ("ppc_elf_relocate_section called for %B section %A, "
+ "%ld relocations%s",
+ input_bfd, input_section,
+ (long) input_section->reloc_count,
+ (info->relocatable) ? " (relocatable)" : "");
#endif
if (info->relocatable)
@@ -4942,8 +4968,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
default:
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d for symbol %s"),
- bfd_archive_filename (input_bfd), (int) r_type, sym_name);
+ (_("%B: unknown relocation type %d for symbol %s"),
+ input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -5193,9 +5219,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
got at entry m+n bears little relation to the entry m. */
if (addend != 0)
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@@ -5504,9 +5530,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (name[5] == 0 || name[5] == '.'))))
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
@@ -5530,9 +5556,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
|| strncmp (name, ".sbss2", 6) == 0))
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
@@ -5589,9 +5615,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
@@ -5644,8 +5670,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_EMB_RELST_HA:
case R_PPC_EMB_BIT_FLD:
(*_bfd_error_handler)
- (_("%s: relocation %s is not yet supported for symbol %s."),
- bfd_archive_filename (input_bfd),
+ (_("%B: relocation %s is not yet supported for symbol %s."),
+ input_bfd,
howto->name,
sym_name);
@@ -5699,9 +5725,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@@ -5749,9 +5775,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, howto->name, sym_name, (int) r);
ret = FALSE;
}
@@ -5789,7 +5814,7 @@ static bfd_boolean
ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -5805,14 +5830,14 @@ ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 192;
+ size = 192;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -5958,7 +5983,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
if (asec)
{
++ num_input_sections;
- output_section_size += asec->_raw_size;
+ output_section_size += asec->size;
}
}
@@ -5990,23 +6015,23 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
if (asec == NULL)
continue;
- length = asec->_raw_size;
+ length = asec->size;
if (length < 24)
{
- error_message = _("corrupt or empty %s section in %s");
+ error_message = _("corrupt or empty %s section in %B");
goto fail;
}
if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0
|| (bfd_bread (buffer + offset, length, ibfd) != length))
{
- error_message = _("unable to read in %s section from %s");
+ error_message = _("unable to read in %s section from %B");
goto fail;
}
/* Process the contents of the section. */
ptr = buffer + offset;
- error_message = _("corrupt %s section in %s");
+ error_message = _("corrupt %s section in %B");
/* Verify the contents of the header. Note - we have to
extract the values this way in order to allow for a
@@ -6049,14 +6074,13 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
if (! bfd_set_section_size (abfd, asec, output_section_size))
ibfd = abfd,
- error_message = _("warning: unable to set size of %s section in %s");
+ error_message = _("warning: unable to set size of %s section in %B");
fail:
free (buffer);
if (error_message)
- (*_bfd_error_handler) (error_message, APUINFO_SECTION_NAME,
- bfd_archive_filename (ibfd));
+ (*_bfd_error_handler) (error_message, ibfd, APUINFO_SECTION_NAME);
}
@@ -6091,7 +6115,7 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
if (apuinfo_list_length () == 0)
return;
- length = asec->_raw_size;
+ length = asec->size;
if (length < 20)
return;
@@ -6117,7 +6141,7 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
length += 4;
}
- if (length != asec->_raw_size)
+ if (length != asec->size)
(*_bfd_error_handler) (_("failed to compute new APUinfo section."));
if (! bfd_set_section_contents (abfd, asec, buffer, (file_ptr) 0, length))
@@ -6128,6 +6152,17 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
apuinfo_list_finish ();
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+ppc_elf_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED,
+ const asection *plt ATTRIBUTE_UNUSED,
+ const arelent *rel)
+{
+ return rel->address;
+}
+
/* Add extra PPC sections -- Note, for now, make .sbss2 and
.PPC.EMB.sbss0 a normal section, and not a bss section so
that the linker doesn't crater when trying to make more than
@@ -6205,5 +6240,6 @@ static struct bfd_elf_special_section const ppc_elf_special_sections[]=
#define elf_backend_final_write_processing ppc_elf_final_write_processing
#define elf_backend_write_section ppc_elf_write_section
#define elf_backend_special_sections ppc_elf_special_sections
+#define elf_backend_plt_sym_val ppc_elf_plt_sym_val
#include "elf32-target.h"
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 074c1089342..72ae02e8328 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -411,7 +411,7 @@ s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -980,9 +980,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
@@ -1158,8 +1157,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd), h->root.root.string);
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h->root.root.string);
return FALSE;
}
if (old_tls_type > tls_type)
@@ -1269,8 +1268,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1687,7 +1686,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelbss->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1699,7 +1698,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -1708,10 +1707,10 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1762,10 +1761,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_FIRST_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_FIRST_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1780,14 +1779,14 @@ allocate_dynrelocs (h, inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -1817,8 +1816,8 @@ allocate_dynrelocs (h, inf)
to be stored somewhere. The immediate value in the instruction
is not bit enough so the value is stored in the got. */
{
- h->got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
}
else
h->got.offset = (bfd_vma) -1;
@@ -1839,24 +1838,24 @@ allocate_dynrelocs (h, inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
/* R_390_TLS_GD32 needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
/* R_390_TLS_IE32 needs one dynamic relocation,
R_390_TLS_GD32 needs one if local symbol and two if global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type >= GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1932,7 +1931,7 @@ allocate_dynrelocs (h, inf)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -1995,7 +1994,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -2034,7 +2033,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srela = elf_section_data (p->sec)->sreloc;
- srela->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srela->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2055,12 +2054,12 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared)
- srela->_raw_size += sizeof (Elf32_External_Rela);
+ srela->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2071,9 +2070,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
/* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM32
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -2099,7 +2098,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0)
+ if (s->size != 0)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -2112,7 +2111,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -2133,7 +2132,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
section's contents are written out. This should not happen,
but this way if it does, we get a R_390_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -2154,7 +2153,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2231,9 +2230,9 @@ invalid_tls_insn (input_bfd, input_section, rel)
howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name);
}
@@ -2993,9 +2992,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -3043,9 +3042,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -3330,7 +3328,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3353,10 +3351,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
}
@@ -3364,7 +3359,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
memset (htab->splt->contents, 0, PLT_FIRST_ENTRY_SIZE);
if (info->shared)
@@ -3408,7 +3403,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_32 (output_bfd,
(sdyn == NULL ? (bfd_vma) 0
@@ -3432,7 +3427,7 @@ elf_s390_grok_prstatus (abfd, note)
Elf_Internal_Note * note;
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -3448,15 +3443,26 @@ elf_s390_grok_prstatus (abfd, note)
/* pr_reg */
offset = 72;
- raw_size = 144;
+ size = 144;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + PLT_FIRST_ENTRY_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+
#define TARGET_BIG_SYM bfd_elf32_s390_vec
#define TARGET_BIG_NAME "elf32-s390"
#define ELF_ARCH bfd_arch_s390
@@ -3491,6 +3497,7 @@ elf_s390_grok_prstatus (abfd, note)
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_grok_prstatus elf_s390_grok_prstatus
+#define elf_backend_plt_sym_val elf_s390_plt_sym_val
#define bfd_elf32_mkobject elf_s390_mkobject
#define elf_backend_object_p elf_s390_object_p
diff --git a/bfd/elf32-sh-symbian.c b/bfd/elf32-sh-symbian.c
new file mode 100644
index 00000000000..1247c6f11ad
--- /dev/null
+++ b/bfd/elf32-sh-symbian.c
@@ -0,0 +1,627 @@
+/* Renesas / SuperH specific support for Symbian 32-bit ELF files
+ Copyright 2004
+ Free Software Foundation, Inc.
+ Contributed by Red Hat
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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. */
+
+/* Stop elf32-sh.c from defining any target vectors. */
+#define SH_TARGET_ALREADY_DEFINED
+#define sh_find_elf_flags sh_symbian_find_elf_flags
+#define sh_elf_get_flags_from_mach sh_symbian_elf_get_flags_from_mach
+#include "elf32-sh.c"
+
+
+//#define DEBUG 1
+#define DEBUG 0
+
+#define DIRECTIVE_HEADER "#<SYMEDIT>#\n"
+#define DIRECTIVE_IMPORT "IMPORT "
+#define DIRECTIVE_EXPORT "EXPORT "
+#define DIRECTIVE_AS "AS "
+
+/* Macro to advance 's' until either it reaches 'e' or the
+ character pointed to by 's' is equal to 'c'. If 'e' is
+ reached and DEBUG is enabled then the error message 'm'
+ is displayed. */
+#define SKIP_UNTIL(s,e,c,m) \
+ do \
+ { \
+ while (s < e && *s != c) \
+ ++ s; \
+ if (s >= e) \
+ { \
+ if (DEBUG) \
+ fprintf (stderr, "Corrupt directive: %s\n", m); \
+ result = FALSE; \
+ } \
+ } \
+ while (0); \
+ if (!result) \
+ break;
+
+/* Like SKIP_UNTIL except there are two terminator characters
+ c1 and c2. */
+#define SKIP_UNTIL2(s,e,c1,c2,m) \
+ do \
+ { \
+ while (s < e && *s != c1 && *s != c2) \
+ ++ s; \
+ if (s >= e) \
+ { \
+ if (DEBUG) \
+ fprintf (stderr, "Corrupt directive: %s\n", m); \
+ result = FALSE; \
+ } \
+ } \
+ while (0); \
+ if (!result) \
+ break;
+
+/* Macro to advance 's' until either it reaches 'e' or the
+ character pointed to by 's' is not equal to 'c'. If 'e'
+ is reached and DEBUG is enabled then the error message
+ 'm' is displayed. */
+#define SKIP_WHILE(s,e,c,m) \
+ do \
+ { \
+ while (s < e && *s == c) \
+ ++ s; \
+ if (s >= e) \
+ { \
+ if (DEBUG) \
+ fprintf (stderr, "Corrupt directive: %s\n", m); \
+ result = FALSE; \
+ } \
+ } \
+ while (0); \
+ if (!result) \
+ break;
+
+
+typedef struct symbol_rename
+{
+ struct symbol_rename * next;
+ bfd_byte * current_name;
+ bfd_byte * new_name;
+ struct elf_link_hash_entry * current_hash;
+ unsigned long new_symndx;
+}
+symbol_rename;
+
+static symbol_rename * rename_list = NULL;
+
+/* Accumulate a list of symbols to be renamed. */
+
+static bfd_boolean
+sh_symbian_import_as (struct bfd_link_info *info, bfd * abfd,
+ bfd_byte * current_name, bfd_byte * new_name)
+{
+ struct elf_link_hash_entry * new_hash;
+ symbol_rename * node;
+
+ if (DEBUG)
+ fprintf (stderr, "IMPORT '%s' AS '%s'\n", current_name, new_name);
+
+ for (node = rename_list; node; node = node->next)
+ if (strcmp (node->current_name, current_name) == 0)
+ {
+ if (strcmp (node->new_name, new_name) == 0)
+ /* Already added to rename list. */
+ return TRUE;
+
+ bfd_set_error (bfd_error_invalid_operation);
+ _bfd_error_handler (_("%B: IMPORT AS directive for %s conceals previous IMPORT AS"),
+ abfd, current_name);
+ return FALSE;
+ }
+
+ if ((node = bfd_malloc (sizeof * node)) == NULL)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: No mem for new rename node\n");
+ return FALSE;
+ }
+
+ if ((node->current_name = bfd_malloc (strlen (current_name) + 1)) == NULL)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: No mem for current name field in rename node\n");
+ free (node);
+ return FALSE;
+ }
+ else
+ strcpy (node->current_name, current_name);
+
+ if ((node->new_name = bfd_malloc (strlen (new_name) + 1)) == NULL)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: No mem for new name field in rename node\n");
+ free (node->current_name);
+ free (node);
+ return FALSE;
+ }
+ else
+ strcpy (node->new_name, new_name);
+
+ node->next = rename_list;
+ node->current_hash = NULL;
+ node->new_symndx = 0;
+ rename_list = node;
+
+ new_hash = elf_link_hash_lookup (elf_hash_table (info), node->new_name, TRUE, FALSE, TRUE);
+ bfd_elf_link_record_dynamic_symbol (info, new_hash);
+ if (new_hash->root.type == bfd_link_hash_new)
+ new_hash->root.type = bfd_link_hash_undefined;
+
+ return TRUE;
+}
+
+
+static bfd_boolean
+sh_symbian_import (bfd * abfd ATTRIBUTE_UNUSED, bfd_byte * name)
+{
+ if (DEBUG)
+ fprintf (stderr, "IMPORT '%s'\n", name);
+
+ /* XXX: Generate an import somehow ? */
+
+ return TRUE;
+}
+
+static bfd_boolean
+sh_symbian_export (bfd * abfd ATTRIBUTE_UNUSED, bfd_byte * name)
+{
+ if (DEBUG)
+ fprintf (stderr, "EXPORT '%s'\n", name);
+
+ /* XXX: Generate an export somehow ? */
+
+ return TRUE;
+}
+
+/* Process any magic embedded commands in the .directive. section.
+ Returns TRUE upon sucecss, but if it fails it sets bfd_error and
+ returns FALSE. */
+
+static bfd_boolean
+sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
+ asection * sec, bfd_byte * contents)
+{
+ bfd_byte *s;
+ bfd_byte *e;
+ bfd_boolean result = TRUE;
+ bfd_size_type sz = sec->rawsize ? sec->rawsize : sec->size;
+
+ for (s = contents, e = s + sz; s < e;)
+ {
+ bfd_byte * directive = s;
+
+ switch (*s)
+ {
+ /* I want to use "case DIRECTIVE_HEADER [0]:" here but gcc won't let me :-( */
+ case '#':
+ if (strcmp (s, DIRECTIVE_HEADER))
+ result = FALSE;
+ else
+ /* Just ignore the header.
+ XXX: Strictly speaking we ought to check that the header
+ is present and that it is the first thing in the file. */
+ s += strlen (DIRECTIVE_HEADER) + 1;
+ break;
+
+ case 'I':
+ if (strncmp (s, DIRECTIVE_IMPORT, strlen (DIRECTIVE_IMPORT)))
+ result = FALSE;
+ else
+ {
+ bfd_byte * new_name;
+ bfd_byte * new_name_end;
+ bfd_byte name_end_char;
+
+ /* Skip the IMPORT directive. */
+ s += strlen (DIRECTIVE_IMPORT);
+
+ new_name = s;
+ /* Find the end of the new name. */
+ while (s < e && *s != ' ' && *s != '\n')
+ ++ s;
+ if (s >= e)
+ {
+ /* We have reached the end of the .directive section
+ without encountering a string terminator. This is
+ allowed for IMPORT directives. */
+ new_name_end = e - 1;
+ name_end_char = * new_name_end;
+ * new_name_end = 0;
+ result = sh_symbian_import (abfd, new_name);
+ * new_name_end = name_end_char;
+ break;
+ }
+
+ /* Remember where the name ends. */
+ new_name_end = s;
+ /* Skip any whitespace before the 'AS'. */
+ SKIP_WHILE (s, e, ' ', "IMPORT: Name just followed by spaces");
+ /* Terminate the new name. (Do this after skiping...) */
+ name_end_char = * new_name_end;
+ * new_name_end = 0;
+
+ /* Check to see if 'AS '... is present. If se we have an IMPORT AS
+ directive, otherwise we have an IMPORT directive. */
+ if (strncmp (s, DIRECTIVE_AS, strlen (DIRECTIVE_AS)))
+ {
+ /* Skip the new-line at the end of the name. */
+ if (DEBUG && name_end_char != '\n')
+ fprintf (stderr, "IMPORT: No newline at end of directive\n");
+ else
+ s ++;
+
+ result = sh_symbian_import (abfd, new_name);
+
+ /* Skip past the NUL character. */
+ if (* s ++ != 0)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT: No NUL at end of directive\n");
+ }
+ }
+ else
+ {
+ bfd_byte * current_name;
+ bfd_byte * current_name_end;
+ bfd_byte current_name_end_char;
+
+ /* Skip the 'AS '. */
+ s += strlen (DIRECTIVE_AS);
+ /* Skip any white space after the 'AS '. */
+ SKIP_WHILE (s, e, ' ', "IMPORT AS: Nothing after AS");
+ current_name = s;
+ /* Find the end of the current name. */
+ SKIP_UNTIL2 (s, e, ' ', '\n', "IMPORT AS: No newline at the end of the current name");
+ /* Skip (backwards) over spaces at the end of the current name. */
+ current_name_end = s;
+ current_name_end_char = * current_name_end;
+
+ SKIP_WHILE (s, e, ' ', "IMPORT AS: Current name just followed by spaces");
+ /* Skip past the newline character. */
+ if (* s ++ != '\n')
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: No newline at end of directive\n");
+
+ /* Terminate the current name after having performed the skips. */
+ * current_name_end = 0;
+
+ result = sh_symbian_import_as (info, abfd, current_name, new_name);
+
+ /* The next character should be a NUL. */
+ if (* s != 0)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: Junk at end of directive\n");
+ result = FALSE;
+ }
+ s ++;
+
+ * current_name_end = current_name_end_char;
+ }
+
+ /* Restore the characters we overwrote, since
+ the .directive section will be emitted. */
+ * new_name_end = name_end_char;
+ }
+ break;
+
+ case 'E':
+ if (strncmp (s, DIRECTIVE_EXPORT, strlen (DIRECTIVE_EXPORT)))
+ result = FALSE;
+ else
+ {
+ bfd_byte * name;
+ bfd_byte * name_end;
+ bfd_byte name_end_char;
+
+ /* Skip the directive. */
+ s += strlen (DIRECTIVE_EXPORT);
+ name = s;
+ /* Find the end of the name to be exported. */
+ SKIP_UNTIL (s, e, '\n', "EXPORT: no newline at end of directive");
+ /* Skip (backwards) over spaces at end of exported name. */
+ for (name_end = s; name_end[-1] == ' '; name_end --)
+ ;
+ /* name_end now points at the first character after the
+ end of the exported name, so we can termiante it */
+ name_end_char = * name_end;
+ * name_end = 0;
+ /* Skip passed the newline character. */
+ s ++;
+
+ result = sh_symbian_export (abfd, name);
+
+ /* The next character should be a NUL. */
+ if (* s != 0)
+ {
+ if (DEBUG)
+ fprintf (stderr, "EXPORT: Junk at end of directive\n");
+ result = FALSE;
+ }
+ s++;
+
+ /* Restore the character we deleted. */
+ * name_end = name_end_char;
+ }
+ break;
+
+ default:
+ result = FALSE;
+ break;
+ }
+
+ if (! result)
+ {
+ if (DEBUG)
+ fprintf (stderr, "offset into .directive section: %d\n", directive - contents);
+
+ bfd_set_error (bfd_error_invalid_operation);
+ _bfd_error_handler (_("%B: Unrecognised .directive command: %s"),
+ abfd, directive);
+ break;
+ }
+ }
+
+ return result;
+}
+
+
+/* Scan a bfd for a .directive section, and if found process it.
+ Returns TRUE upon success, FALSE otherwise. */
+bfd_boolean bfd_elf32_sh_symbian_process_directives (struct bfd_link_info *info, bfd * abfd);
+
+bfd_boolean
+bfd_elf32_sh_symbian_process_directives (struct bfd_link_info *info, bfd * abfd)
+{
+ bfd_boolean result = FALSE;
+ bfd_byte * contents;
+ asection * sec = bfd_get_section_by_name (abfd, ".directive");
+ bfd_size_type sz;
+
+ if (!sec)
+ return TRUE;
+
+ sz = sec->rawsize ? sec->rawsize : sec->size;
+ contents = bfd_malloc (sz);
+
+ if (!contents)
+ bfd_set_error (bfd_error_no_memory);
+ else
+ {
+ if (bfd_get_section_contents (abfd, sec, contents, 0, sz))
+ result = sh_symbian_process_embedded_commands (info, abfd, sec, contents);
+ free (contents);
+ }
+
+ return result;
+}
+
+/* Intercept the normal sh_relocate_section() function
+ and magle the relocs to allow for symbol renaming. */
+
+static bfd_boolean
+sh_symbian_relocate_section (bfd * output_bfd,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * relocs,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections)
+{
+ /* When performing a final link we implement the IMPORT AS directives. */
+ if (!info->relocatable)
+ {
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ struct elf_link_hash_entry ** sym_hashes_end;
+ struct elf_link_hash_table * hash_table;
+ symbol_rename * ptr;
+ bfd_size_type num_global_syms;
+ unsigned long num_local_syms;
+
+ BFD_ASSERT (! elf_bad_symtab (input_bfd));
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ hash_table = elf_hash_table (info);
+ num_local_syms = symtab_hdr->sh_info;
+ num_global_syms = symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
+ num_global_syms -= num_local_syms;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ sym_hashes_end = sym_hashes + num_global_syms;
+
+ /* First scan the rename table, caching the hash entry and the new index. */
+ for (ptr = rename_list; ptr; ptr = ptr->next)
+ {
+ struct elf_link_hash_entry * new_hash;
+ struct elf_link_hash_entry ** h;
+
+ ptr->current_hash = elf_link_hash_lookup (hash_table, ptr->current_name, FALSE, FALSE, TRUE);
+
+ if (ptr->current_hash == NULL)
+ {
+ if (DEBUG)
+ fprintf (stderr, "IMPORT AS: current symbol '%s' does not exist\n", ptr->current_name);
+ continue;
+ }
+
+ new_hash = elf_link_hash_lookup (hash_table, ptr->new_name, FALSE, FALSE, TRUE);
+
+ /* If we could not find the symbol then it is a new, undefined symbol.
+ Symbian want this behaviour - ie they want to be able to rename the
+ reference in a reloc from one undefined symbol to another, new and
+ undefined symbol. So we create that symbol here. */
+ if (new_hash == NULL)
+ {
+ asection * psec = bfd_und_section_ptr;
+ Elf_Internal_Sym new_sym;
+ bfd_vma new_value = 0;
+ bfd_boolean skip;
+ bfd_boolean override;
+ bfd_boolean type_change_ok;
+ bfd_boolean size_change_ok;
+
+ new_sym.st_value = 0;
+ new_sym.st_size = 0;
+ new_sym.st_name = -1;
+ new_sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_FUNC);
+ new_sym.st_other = ELF_ST_VISIBILITY (STV_DEFAULT);
+ new_sym.st_shndx = SHN_UNDEF;
+
+ if (! _bfd_elf_merge_symbol (input_bfd, info, ptr->new_name, & new_sym, & psec,
+ & new_value, & new_hash, & skip, & override, & type_change_ok,
+ & size_change_ok))
+ {
+ _bfd_error_handler (_("%B: Failed to add renamed symbol %s"),
+ input_bfd, ptr->new_name);
+ continue;
+ }
+ /* XXX - should we check psec, skip, override etc ? */
+
+ new_hash->root.type = bfd_link_hash_undefined;
+
+ /* Allow the symbol to become local if necessary. */
+ if (new_hash->dynindx == -1)
+ new_hash->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+
+ if (DEBUG)
+ fprintf (stderr, "Created new symbol %s\n", ptr->new_name);
+ }
+
+ /* Convert the new_hash value into a index into the table of symbol hashes. */
+ for (h = sym_hashes; h < sym_hashes_end; h ++)
+ {
+ if (* h == new_hash)
+ {
+ ptr->new_symndx = h - sym_hashes + num_local_syms;
+ if (DEBUG)
+ fprintf (stderr, "Converted new hash to index of %ld\n", ptr->new_symndx);
+ break;
+ }
+ }
+ /* If the new symbol is not in the hash table then it must be
+ because it is one of the newly created undefined symbols
+ manufactured above. So we extend the sym has table here to
+ include this extra symbol. */
+ if (h == sym_hashes_end)
+ {
+ struct elf_link_hash_entry ** new_sym_hashes;
+
+ /* This is not very efficient, but it works. */
+ ++ num_global_syms;
+ new_sym_hashes = bfd_alloc (input_bfd, num_global_syms * sizeof * sym_hashes);
+ if (new_sym_hashes == NULL)
+ {
+ if (DEBUG)
+ fprintf (stderr, "Out of memory extending hash table\n");
+ continue;
+ }
+ memcpy (new_sym_hashes, sym_hashes, (num_global_syms - 1) * sizeof * sym_hashes);
+ new_sym_hashes[num_global_syms - 1] = new_hash;
+ elf_sym_hashes (input_bfd) = sym_hashes = new_sym_hashes;
+ sym_hashes_end = sym_hashes + num_global_syms;
+ symtab_hdr->sh_size = (num_global_syms + num_local_syms) * sizeof (Elf32_External_Sym);
+
+ ptr->new_symndx = num_global_syms - 1 + num_local_syms;
+
+ if (DEBUG)
+ fprintf (stderr, "Extended symbol hash table to insert new symbol as index %ld\n",
+ ptr->new_symndx);
+ }
+ }
+
+ /* Walk the reloc list looking for references to renamed symbols.
+ When we find one, we alter the index in the reloc to point to the new symbol. */
+ for (rel = relocs, relend = relocs + input_section->reloc_count;
+ rel < relend;
+ rel ++)
+ {
+ int r_type;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry * h;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ /* Ignore unused relocs. */
+ if ((r_type >= (int) R_SH_GNU_VTINHERIT
+ && r_type <= (int) R_SH_LABEL)
+ || r_type == (int) R_SH_NONE
+ || r_type < 0
+ || r_type >= R_SH_max)
+ continue;
+
+ /* Ignore relocs against local symbols. */
+ if (r_symndx < num_local_syms)
+ continue;
+
+ BFD_ASSERT (r_symndx < (num_global_syms + num_local_syms));
+ h = sym_hashes[r_symndx - num_local_syms];
+ BFD_ASSERT (h != NULL);
+
+ while ( h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* If the symbol is defined there is no need to rename it.
+ XXX - is this true ? */
+ if ( h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak
+ || h->root.type == bfd_link_hash_undefweak)
+ continue;
+
+ for (ptr = rename_list; ptr; ptr = ptr->next)
+ if (h == ptr->current_hash)
+ {
+ BFD_ASSERT (ptr->new_symndx);
+ if (DEBUG)
+ fprintf (stderr, "convert reloc %lx from using index %ld to using index %ld\n",
+ (long) rel->r_info, (long) ELF32_R_SYM (rel->r_info), ptr->new_symndx);
+ rel->r_info = ELF32_R_INFO (ptr->new_symndx, r_type);
+ break;
+ }
+ }
+ }
+
+ return sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections);
+}
+
+static bfd_boolean
+sh_symbian_check_directives (bfd *abfd, struct bfd_link_info *info)
+{
+ return bfd_elf32_sh_symbian_process_directives (info, abfd);
+}
+
+#define TARGET_LITTLE_SYM bfd_elf32_shl_symbian_vec
+#define TARGET_LITTLE_NAME "elf32-shl-symbian"
+
+#undef elf_backend_relocate_section
+#define elf_backend_relocate_section sh_symbian_relocate_section
+#undef elf_backend_check_directives
+#define elf_backend_check_directives sh_symbian_check_directives
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 1070957ea73..a5aa4ff7bc3 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -25,6 +25,8 @@
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/sh.h"
+#include "libiberty.h"
+#include "../opcodes/sh-opc.h"
static bfd_reloc_status_type sh_elf_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@@ -48,8 +50,10 @@ static bfd_boolean sh_elf_relax_delete_bytes
(bfd *, asection *, bfd_vma, int);
static bfd_boolean sh_elf_align_loads
(bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *);
+#ifndef SH64_ELF
static bfd_boolean sh_elf_swap_insns
(bfd *, asection *, void *, bfd_byte *, bfd_vma);
+#endif
static bfd_boolean sh_elf_relocate_section
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
@@ -105,10 +109,12 @@ static enum elf_reloc_type_class sh_elf_reloc_type_class
#ifdef INCLUDE_SHMEDIA
inline static void movi_shori_putval (bfd *, unsigned long, char *);
#endif
+#if !defined SH_TARGET_ALREADY_DEFINED
static bfd_boolean elf32_shlin_grok_prstatus
(bfd *abfd, Elf_Internal_Note *note);
static bfd_boolean elf32_shlin_grok_psinfo
(bfd *abfd, Elf_Internal_Note *note);
+#endif
/* The name of the dynamic interpreter. This is put in the .interp
section. */
@@ -1845,7 +1851,7 @@ sh_elf_reloc_loop (int r_type ATTRIBUTE_UNUSED, bfd *input_bfd,
int insn;
/* Sanity check the address. */
- if (addr > input_section->_raw_size)
+ if (addr > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* We require the start and end relocations to be processed consecutively -
@@ -1870,14 +1876,11 @@ sh_elf_reloc_loop (int r_type ATTRIBUTE_UNUSED, bfd *input_bfd,
contents = elf_section_data (symbol_section)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (symbol_section->_raw_size);
- if (contents == NULL)
- return bfd_reloc_outofrange;
- if (! bfd_get_section_contents (input_bfd, symbol_section, contents,
- (file_ptr) 0,
- symbol_section->_raw_size))
+ if (!bfd_malloc_and_get_section (input_bfd, symbol_section,
+ &contents))
{
- free (contents);
+ if (contents != NULL)
+ free (contents);
return bfd_reloc_outofrange;
}
}
@@ -2196,11 +2199,6 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
}
#endif
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
internal_relocs = (_bfd_elf_link_read_relocs
@@ -2232,12 +2230,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -2247,10 +2240,10 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
computed as though it were a jump offset, which are based
from 4 bytes after the jump instruction. */
laddr = irel->r_offset + 4 + irel->r_addend;
- if (laddr >= sec->_raw_size)
+ if (laddr >= sec->size)
{
- (*_bfd_error_handler) (_("%s: 0x%lx: warning: bad R_SH_USES offset"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
+ abfd,
(unsigned long) irel->r_offset);
continue;
}
@@ -2261,8 +2254,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if ((insn & 0xf000) != 0xd000)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
- bfd_archive_filename (abfd), (unsigned long) irel->r_offset, insn));
+ (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
+ abfd, (unsigned long) irel->r_offset, insn));
continue;
}
@@ -2275,11 +2268,11 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
paddr = insn & 0xff;
paddr *= 4;
paddr += (laddr + 4) &~ (bfd_vma) 3;
- if (paddr >= sec->_raw_size)
+ if (paddr >= sec->size)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: warning: bad R_SH_USES load offset"),
- bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
+ (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
+ abfd, (unsigned long) irel->r_offset));
continue;
}
@@ -2293,8 +2286,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (irelfn >= irelend)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: warning: could not find expected reloc"),
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ (_("%B: 0x%lx: warning: could not find expected reloc"),
+ abfd, (unsigned long) paddr));
continue;
}
@@ -2321,8 +2314,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
!= (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: warning: symbol in unexpected section"),
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ (_("%B: 0x%lx: warning: symbol in unexpected section"),
+ abfd, (unsigned long) paddr));
continue;
}
@@ -2446,8 +2439,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (irelcount >= irelend)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: warning: could not find expected COUNT reloc"),
- bfd_archive_filename (abfd), (unsigned long) paddr));
+ (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
+ abfd, (unsigned long) paddr));
continue;
}
@@ -2455,8 +2448,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
just deleted one. */
if (irelcount->r_addend == 0)
{
- ((*_bfd_error_handler) (_("%s: 0x%lx: warning: bad count"),
- bfd_archive_filename (abfd),
+ ((*_bfd_error_handler) (_("%B: 0x%lx: warning: bad count"),
+ abfd,
(unsigned long) paddr));
continue;
}
@@ -2489,12 +2482,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -2586,7 +2574,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
power larger than the number of bytes we are deleting. */
irelalign = NULL;
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
@@ -2606,7 +2594,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
if (irelalign == NULL)
- sec->_cooked_size -= count;
+ sec->size -= count;
else
{
int i;
@@ -2855,8 +2843,8 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
if (overflow)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
- bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
+ (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+ abfd, (unsigned long) irel->r_offset));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2907,13 +2895,13 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
Perhaps, if info->keep_memory is FALSE, we
should free them, if we are permitted to,
when we leave sh_coff_relax_section. */
- ocontents = (bfd_byte *) bfd_malloc (o->_raw_size);
- if (ocontents == NULL)
- return FALSE;
- if (! bfd_get_section_contents (abfd, o, ocontents,
- (file_ptr) 0,
- o->_raw_size))
- return FALSE;
+ if (!bfd_malloc_and_get_section (abfd, o, &ocontents))
+ {
+ if (ocontents != NULL)
+ free (ocontents);
+ return FALSE;
+ }
+
elf_section_data (o)->this_hdr.contents = ocontents;
}
}
@@ -2965,13 +2953,13 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
Perhaps, if info->keep_memory is FALSE, we
should free them, if we are permitted to,
when we leave sh_coff_relax_section. */
- ocontents = (bfd_byte *) bfd_malloc (o->_raw_size);
- if (ocontents == NULL)
- return FALSE;
- if (! bfd_get_section_contents (abfd, o, ocontents,
- (file_ptr) 0,
- o->_raw_size))
- return FALSE;
+ if (!bfd_malloc_and_get_section (abfd, o, &ocontents))
+ {
+ if (ocontents != NULL)
+ free (ocontents);
+ return FALSE;
+ }
+
elf_section_data (o)->this_hdr.contents = ocontents;
}
}
@@ -3088,7 +3076,7 @@ sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
if (irel < irelend)
stop = irel->r_offset;
else
- stop = sec->_cooked_size;
+ stop = sec->size;
if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_elf_swap_insns,
internal_relocs, &label,
@@ -3106,6 +3094,7 @@ sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
return FALSE;
}
+#ifndef SH64_ELF
/* Swap two SH instructions. This is like sh_swap_insns in coff-sh.c. */
static bfd_boolean
@@ -3224,8 +3213,8 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
if (overflow)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
- bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
+ (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
+ abfd, (unsigned long) irel->r_offset));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -3234,6 +3223,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
return TRUE;
}
+#endif /* defined SH64_ELF */
#ifdef INCLUDE_SHMEDIA
@@ -4139,7 +4129,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
srel = htab->srelbss;
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -4150,7 +4140,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->root.dynobj, s))
{
if (! bfd_set_section_alignment (htab->root.dynobj, s, power_of_two))
@@ -4159,10 +4149,10 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -4223,10 +4213,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -4241,14 +4231,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
+ htab->sgotplt->size += 4;
/* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -4278,24 +4268,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
+ h->got.offset = s->size;
+ s->size += 4;
/* R_SH_TLS_GD needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
+ s->size += 4;
dyn = htab->root.dynamic_sections_created;
/* R_SH_TLS_IE_32 needs one dynamic relocation if dynamic,
R_SH_TLS_GD needs one if local symbol and two if global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| (tls_type == GOT_TLS_IE && dyn))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -4316,11 +4306,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = htab->sgot;
- eh->datalabel_got.offset = s->_raw_size;
- s->_raw_size += 4;
+ eh->datalabel_got.offset = s->size;
+ s->size += 4;
dyn = htab->root.dynamic_sections_created;
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
eh->datalabel_got.offset = (bfd_vma) -1;
@@ -4395,7 +4385,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -4453,7 +4443,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -4492,7 +4482,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srel->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -4517,12 +4507,12 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
+ *local_got = s->size;
+ s->size += 4;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
+ s->size += 4;
if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -4534,9 +4524,9 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Allocate 2 got entries and 1 dynamic reloc for R_SH_TLS_LD_32
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 8;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 8;
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -4562,7 +4552,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -4575,7 +4565,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -4596,7 +4586,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
section's contents are written out. This should not happen,
but this way if it does, we get a R_SH_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -4617,7 +4607,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (! add_dynamic_entry (DT_PLTGOT, 0)
|| ! add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -4805,9 +4795,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (howto->rightshift || howto->src_mask != 0xffffffff)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+ input_bfd, input_section,
(long) rel->r_offset, howto->name);
return FALSE;
}
@@ -4910,9 +4899,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else if (sec->output_section == NULL)
{
(*_bfd_error_handler)
- (_("%s: unresolvable relocation against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd), h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B(%A): unresolvable relocation against symbol `%s'"),
+ input_bfd, input_section, h->root.root.string);
return FALSE;
}
else
@@ -4981,8 +4969,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (disp & mask)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
- bfd_archive_filename (input_section->owner),
+ (_("%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
+ input_section->owner,
(unsigned long) rel->r_offset));
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -5014,10 +5002,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (relocation & 3)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
- bfd_archive_filename (input_section->owner),
+ (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+ input_section->owner,
(unsigned long) rel->r_offset, howto->name,
- (unsigned long)relocation));
+ (unsigned long) relocation));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5029,10 +5017,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (relocation & 1)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
- bfd_archive_filename (input_section->owner),
+ (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+ input_section->owner,
(unsigned long) rel->r_offset, howto->name,
- (unsigned long)relocation));
+ (unsigned long) relocation));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5043,10 +5031,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| (signed int)relocation > 32)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"),
- bfd_archive_filename (input_section->owner),
+ (_("%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"),
+ input_section->owner,
(unsigned long) rel->r_offset,
- (unsigned long)relocation));
+ (unsigned long) relocation));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5057,10 +5045,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| (signed int)relocation > 16)
{
((*_bfd_error_handler)
- (_("%s: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"),
- bfd_archive_filename (input_section->owner),
+ (_("%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"),
+ input_section->owner,
(unsigned long) rel->r_offset,
- (unsigned long)relocation));
+ (unsigned long) relocation));
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5924,7 +5912,7 @@ sh_elf_get_relocated_section_contents (bfd *output_bfd,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- (size_t) input_section->_raw_size);
+ (size_t) input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
@@ -6587,8 +6575,8 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
else
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd), h->root.root.string);
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h->root.root.string);
return FALSE;
}
}
@@ -6799,8 +6787,9 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_SH_TLS_LE_32:
if (info->shared)
{
- (*_bfd_error_handler) (_("%s: TLS local exec code cannot be linked into shared objects"),
- bfd_archive_filename (abfd));
+ (*_bfd_error_handler)
+ (_("%B: TLS local exec code cannot be linked into shared objects"),
+ abfd);
return FALSE;
}
@@ -6819,58 +6808,44 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
#ifndef sh_elf_set_mach_from_flags
+static unsigned int sh_ef_bfd_table[] = { EF_SH_BFD_TABLE };
+
static bfd_boolean
sh_elf_set_mach_from_flags (bfd *abfd)
{
- flagword flags = elf_elfheader (abfd)->e_flags;
+ flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK;
+
+ if (flags >= sizeof(sh_ef_bfd_table))
+ return FALSE;
+
+ if (sh_ef_bfd_table[flags] == 0)
+ return FALSE;
+
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, sh_ef_bfd_table[flags]);
- switch (flags & EF_SH_MACH_MASK)
- {
- case EF_SH1:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh);
- break;
- case EF_SH2:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh2);
- break;
- case EF_SH2E:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh2e);
- break;
- case EF_SH_DSP:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh_dsp);
- break;
- case EF_SH3:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh3);
- break;
- case EF_SH3_DSP:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh3_dsp);
- break;
- case EF_SH3E:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh3e);
- break;
- case EF_SH_UNKNOWN:
- case EF_SH4:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4);
- break;
- case EF_SH4_NOFPU:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4_nofpu);
- break;
- case EF_SH4A:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a);
- break;
- case EF_SH4A_NOFPU:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a_nofpu);
- break;
- case EF_SH4AL_DSP:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4al_dsp);
- break;
- case EF_SH4_NOMMU_NOFPU:
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4_nommu_nofpu);
- break;
- default:
- return FALSE;
- }
return TRUE;
}
+
+
+/* Reverse table lookup for sh_ef_bfd_table[].
+ Given a bfd MACH value from archures.c
+ return the equivalent ELF flags from the table.
+ Return -1 if no match is found. */
+
+int
+sh_elf_get_flags_from_mach (unsigned long mach)
+{
+ int i = ARRAY_SIZE (sh_ef_bfd_table);
+
+ for (; i>0; i--)
+ if (sh_ef_bfd_table[i] == mach)
+ return i;
+
+ /* shouldn't get here */
+ BFD_FAIL();
+
+ return -1;
+}
#endif /* not sh_elf_set_mach_from_flags */
#ifndef sh_elf_set_private_flags
@@ -6903,16 +6878,26 @@ sh_elf_copy_private_data (bfd * ibfd, bfd * obfd)
#endif /* not sh_elf_copy_private_data */
#ifndef sh_elf_merge_private_data
-/* This routine checks for linking big and little endian objects
- together, and for linking sh-dsp with sh3e / sh4 objects. */
+
+/* This function returns the ELF architecture number that
+ corresponds to the given arch_sh* flags. */
+
+int
+sh_find_elf_flags (unsigned int arch_set)
+{
+ extern unsigned long sh_get_bfd_mach_from_arch_set (unsigned int);
+ unsigned long bfd_mach = sh_get_bfd_mach_from_arch_set (arch_set);
+
+ return sh_elf_get_flags_from_mach (bfd_mach);
+}
+
+/* This routine initialises the elf flags when required and
+ calls sh_merge_bfd_arch() to check dsp/fpu compatibility. */
static bfd_boolean
sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
{
- flagword old_flags, new_flags;
-
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- return FALSE;
+ extern bfd_boolean sh_merge_bfd_arch (bfd *, bfd *);
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -6923,23 +6908,22 @@ sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
/* This happens when ld starts out with a 'blank' output file. */
elf_flags_init (obfd) = TRUE;
elf_elfheader (obfd)->e_flags = EF_SH1;
+ sh_elf_set_mach_from_flags (obfd);
}
- old_flags = elf_elfheader (obfd)->e_flags;
- new_flags = elf_elfheader (ibfd)->e_flags;
- if ((EF_SH_HAS_DSP (old_flags) && EF_SH_HAS_FP (new_flags))
- || (EF_SH_HAS_DSP (new_flags) && EF_SH_HAS_FP (old_flags)))
+
+ if (! sh_merge_bfd_arch (ibfd, obfd))
{
- (*_bfd_error_handler)
- ("%s: uses %s instructions while previous modules use %s instructions",
- bfd_archive_filename (ibfd),
- EF_SH_HAS_DSP (new_flags) ? "dsp" : "floating point",
- EF_SH_HAS_DSP (new_flags) ? "floating point" : "dsp");
+ _bfd_error_handler ("%B: uses instructions which are incompatible "
+ "with instructions used in previous modules",
+ ibfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
- elf_elfheader (obfd)->e_flags = EF_SH_MERGE_MACH (old_flags, new_flags);
- return sh_elf_set_mach_from_flags (obfd);
+ elf_elfheader (obfd)->e_flags =
+ sh_elf_get_flags_from_mach (bfd_get_mach (obfd));
+
+ return TRUE;
}
#endif /* not sh_elf_merge_private_data */
@@ -7255,7 +7239,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
BFD_ASSERT (sgot != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -7309,10 +7293,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -7329,10 +7310,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
if (htab->srelplt != NULL)
{
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -7341,7 +7319,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
/* Fill in the first entry in the procedure linkage table. */
splt = htab->splt;
- if (splt && splt->_raw_size > 0)
+ if (splt && splt->size > 0)
{
if (info->shared)
{
@@ -7386,7 +7364,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot && sgot->_raw_size > 0)
+ if (sgot && sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
@@ -7419,12 +7397,14 @@ sh_elf_reloc_type_class (const Elf_Internal_Rela *rela)
}
}
+#if !defined SH_TARGET_ALREADY_DEFINED
/* Support for Linux core dump NOTE sections. */
+
static bfd_boolean
elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -7440,14 +7420,14 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 92;
+ size = 92;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -7479,11 +7459,26 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return TRUE;
}
+#endif /* not SH_TARGET_ALREADY_DEFINED */
+
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+sh_elf_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
+#if !defined SH_TARGET_ALREADY_DEFINED
#define TARGET_BIG_SYM bfd_elf32_sh_vec
#define TARGET_BIG_NAME "elf32-sh"
#define TARGET_LITTLE_SYM bfd_elf32_shl_vec
#define TARGET_LITTLE_NAME "elf32-shl"
+#endif
+
#define ELF_ARCH bfd_arch_sh
#define ELF_MACHINE_CODE EM_SH
#ifdef __QNXTARGET__
@@ -7527,6 +7522,7 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#define elf_backend_finish_dynamic_sections \
sh_elf_finish_dynamic_sections
#define elf_backend_reloc_type_class sh_elf_reloc_type_class
+#define elf_backend_plt_sym_val sh_elf_plt_sym_val
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -7535,7 +7531,7 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#ifndef INCLUDE_SHMEDIA
+#if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
#include "elf32-target.h"
@@ -7577,4 +7573,4 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#include "elf32-target.h"
-#endif /* INCLUDE_SHMEDIA */
+#endif /* neither INCLUDE_SHMEDIA nor SH_TARGET_ALREADY_DEFINED */
diff --git a/bfd/elf32-sh64-com.c b/bfd/elf32-sh64-com.c
index 4c219e8a8d4..98f47a9ffcf 100644
--- a/bfd/elf32-sh64-com.c
+++ b/bfd/elf32-sh64-com.c
@@ -1,5 +1,5 @@
/* SuperH SH64-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -99,7 +99,7 @@ sh64_address_in_cranges (asection *cranges, bfd_vma addr,
{
bfd_byte *cranges_contents;
bfd_byte *found_rangep;
- bfd_size_type cranges_size = bfd_section_size (cranges->owner, cranges);
+ bfd_size_type cranges_size = cranges->size;
/* If the size is not a multiple of the cranges entry size, then
something is badly wrong. */
@@ -117,15 +117,8 @@ sh64_address_in_cranges (asection *cranges, bfd_vma addr,
cranges_contents = cranges->contents;
else
{
- cranges_contents
- = bfd_malloc (cranges->_cooked_size != 0
- ? cranges->_cooked_size : cranges->_raw_size);
- if (cranges_contents == NULL)
- return FALSE;
-
- if (! bfd_get_section_contents (cranges->owner, cranges,
- cranges_contents, (file_ptr) 0,
- cranges_size))
+ if (!bfd_malloc_and_get_section (cranges->owner, cranges,
+ &cranges_contents))
goto error_return;
/* Is it sorted? */
@@ -182,7 +175,8 @@ sh64_address_in_cranges (asection *cranges, bfd_vma addr,
return FALSE;
error_return:
- free (cranges_contents);
+ if (cranges_contents != NULL)
+ free (cranges_contents);
return FALSE;
}
@@ -199,7 +193,7 @@ sh64_get_contents_type (asection *sec, bfd_vma addr, sh64_elf_crange *rangep)
&& elf_elfheader (sec->owner)->e_type == ET_EXEC)
{
rangep->cr_addr = bfd_get_section_vma (sec->owner, sec);
- rangep->cr_size = bfd_section_size (sec->owner, sec);
+ rangep->cr_size = sec->size;
rangep->cr_type = CRT_NONE;
}
else
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index f013e6fea8f..58833715af9 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -89,6 +89,7 @@ static void sh64_find_section_for_address
#define elf_backend_final_write_processing sh64_elf_final_write_processing
#define elf_backend_section_from_shdr sh64_backend_section_from_shdr
#define elf_backend_special_sections sh64_elf_special_sections
+#define elf_backend_section_flags sh64_elf_section_flags
#define bfd_elf32_new_section_hook sh64_elf_new_section_hook
@@ -105,6 +106,7 @@ static void sh64_find_section_for_address
#define GOT_BIAS (-((long)-32768))
#define INCLUDE_SHMEDIA
+#define SH_TARGET_ALREADY_DEFINED
#include "elf32-sh.c"
/* Tack some extra info on struct bfd_elf_section_data. */
@@ -149,7 +151,6 @@ static bfd_boolean
sh64_elf_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags;
- asection *cranges;
switch (flags & EF_SH_MACH_MASK)
{
@@ -164,18 +165,19 @@ sh64_elf_set_mach_from_flags (bfd *abfd)
return FALSE;
}
- /* We also need to set SEC_DEBUGGING on an incoming .cranges section.
- We could have used elf_backend_section_flags if it had given us the
- section name; the bfd_section member in the header argument is not
- set at the point of the call. FIXME: Find out whether that is by
- undocumented design or a bug. */
- cranges = bfd_get_section_by_name (abfd, SH64_CRANGES_SECTION_NAME);
- if (cranges != NULL
- && ! bfd_set_section_flags (abfd, cranges,
- bfd_get_section_flags (abfd, cranges)
- | SEC_DEBUGGING))
+ return TRUE;
+}
+
+static bfd_boolean
+sh64_elf_section_flags (flagword *flags,
+ const Elf_Internal_Shdr *hdr)
+{
+ if (hdr->bfd_section == NULL)
return FALSE;
+ if (strcmp (hdr->bfd_section->name, SH64_CRANGES_SECTION_NAME) == 0)
+ *flags |= SEC_DEBUGGING;
+
return TRUE;
}
@@ -604,6 +606,7 @@ sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
{
bfd_vma vma;
bfd_size_type size;
+
struct sh64_find_section_vma_data *fsec_datap
= (struct sh64_find_section_vma_data *) data;
@@ -619,11 +622,7 @@ sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
if (fsec_datap->addr < vma)
return;
- /* FIXME: section->reloc_done isn't set properly; a generic buglet
- preventing us from using bfd_get_section_size_after_reloc. */
- size
- = section->_cooked_size ? section->_cooked_size : section->_raw_size;
-
+ size = section->size;
if (fsec_datap->addr >= vma + size)
return;
@@ -654,9 +653,7 @@ sh64_elf_final_write_processing (bfd *abfd,
= sh64_elf_section_data (cranges)->sh64_info->cranges_growth) != 0)
{
bfd_vma incoming_cranges_size
- = ((cranges->_cooked_size != 0
- ? cranges->_cooked_size : cranges->_raw_size)
- - ld_generated_cranges_size);
+ = cranges->size - ld_generated_cranges_size;
if (! bfd_set_section_contents (abfd, cranges,
cranges->contents
@@ -699,9 +696,7 @@ sh64_elf_final_write_processing (bfd *abfd,
/* If we have a .cranges section, sort the entries. */
if (cranges != NULL)
{
- bfd_size_type cranges_size
- = (cranges->_cooked_size != 0
- ? cranges->_cooked_size : cranges->_raw_size);
+ bfd_size_type cranges_size = cranges->size;
/* We know we always have these in memory at this time. */
BFD_ASSERT (cranges->contents != NULL);
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 3016652678b..5b805334192 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -387,7 +387,7 @@ sparc_elf_wdisp16_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -441,7 +441,7 @@ sparc_elf_hix22_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -487,7 +487,7 @@ sparc_elf_lox10_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -913,9 +913,8 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
@@ -1037,9 +1036,8 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
else
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd),
- h ? h->root.root.string : "<local>");
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h ? h->root.root.string : "<local>");
return FALSE;
}
}
@@ -1562,7 +1560,7 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
.rel.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelbss->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1574,8 +1572,7 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -1584,10 +1581,10 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1634,17 +1631,17 @@ allocate_dynrelocs (h, inf)
asection *s = htab->splt;
/* The first four entries in .plt are reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = 4 * PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size = 4 * PLT_ENTRY_SIZE;
/* The procedure linkage table has a maximum size. */
- if (s->_raw_size >= 0x400000)
+ if (s->size >= 0x400000)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1659,10 +1656,10 @@ allocate_dynrelocs (h, inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -1699,22 +1696,22 @@ allocate_dynrelocs (h, inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
+ h->got.offset = s->size;
+ s->size += 4;
/* R_SPARC_TLS_GD_HI{22,LO10} needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
+ s->size += 4;
dyn = htab->elf.dynamic_sections_created;
/* R_SPARC_TLS_IE_{HI22,LO10} needs one dynamic relocation,
R_SPARC_TLS_GD_{HI22,LO10} needs one if local symbol and two if
global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type == GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1785,7 +1782,7 @@ allocate_dynrelocs (h, inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -1845,7 +1842,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1884,7 +1881,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srel->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -1905,14 +1902,14 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
+ *local_got = s->size;
+ s->size += 4;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
+ s->size += 4;
if (info->shared
|| *local_tls_type == GOT_TLS_GD
|| *local_tls_type == GOT_TLS_IE)
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -1923,9 +1920,9 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
{
/* Allocate 2 got entries and 1 dynamic reloc for
R_SPARC_TLS_LDM_{HI22,LO10} relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 8;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 8;
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -1937,13 +1934,13 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Make space for the trailing nop in .plt. */
- if (htab->splt->_raw_size > 0)
- htab->splt->_raw_size += 4;
+ if (htab->splt->size > 0)
+ htab->splt->size += 4;
/* If the .got section is more than 0x1000 bytes, we add
0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
bit relocations have a greater chance of working. */
- if (htab->sgot->_raw_size >= 0x1000
+ if (htab->sgot->size >= 0x1000
&& elf_hash_table (info)->hgot->root.u.def.value == 0)
elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
}
@@ -1965,7 +1962,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -2003,8 +2000,8 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
are written out, but at the moment this does not happen. Thus in
order to prevent writing out garbage, we initialise the section's
contents to zero. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -2024,7 +2021,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (htab->srelplt->_raw_size != 0)
+ if (htab->srelplt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2323,7 +2320,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == NULL)
break;
- if (h->plt.offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -2331,9 +2328,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- if (htab->splt == NULL)
- abort ();
-
relocation = (htab->splt->output_section->vma
+ htab->splt->output_offset
+ h->plt.offset);
@@ -2377,6 +2371,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
if ((info->shared
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
&& (! howto->pc_relative
|| (h != NULL
&& h->dynindx != -1
@@ -2496,8 +2493,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
BFD_FAIL ();
(*_bfd_error_handler)
- (_("%s: probably compiled without -fPIC?"),
- bfd_archive_filename (input_bfd));
+ (_("%B: probably compiled without -fPIC?"),
+ input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2854,9 +2851,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -2921,7 +2918,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30)
&& sec_do_relax (input_section)
- && rel->r_offset + 4 < input_section->_raw_size)
+ && rel->r_offset + 4 < input_section->size)
{
#define G0 0
#define O7 15
@@ -3223,7 +3220,7 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3252,12 +3249,7 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
if (! size)
dyn.d_un.d_ptr = s->vma;
else
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- }
+ dyn.d_un.d_val = s->size;
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
}
@@ -3265,11 +3257,11 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
/* Clear the first four entries in the procedure linkage table,
and put a nop in the last four bytes. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
{
memset (splt->contents, 0, 4 * PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd, (bfd_vma) SPARC_NOP,
- splt->contents + splt->_raw_size - 4);
+ splt->contents + splt->size - 4);
}
elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
@@ -3277,7 +3269,7 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
/* Set the first entry in the global offset table to the address of
the dynamic section. */
- if (htab->sgot && htab->sgot->_raw_size > 0)
+ if (htab->sgot && htab->sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgot->contents);
@@ -3309,6 +3301,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
bfd *obfd;
{
bfd_boolean error;
+ unsigned long ibfd_mach;
/* FIXME: This should not be static. */
static unsigned long previous_ibfd_e_flags = (unsigned long) -1;
@@ -3318,17 +3311,17 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
error = FALSE;
- if (bfd_get_mach (ibfd) >= bfd_mach_sparc_v9)
+ ibfd_mach = bfd_get_mach (ibfd);
+ if (bfd_mach_sparc_64bit_p (ibfd_mach))
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled for a 64 bit system and target is 32 bit"),
- bfd_archive_filename (ibfd));
+ (_("%B: compiled for a 64 bit system and target is 32 bit"), ibfd);
}
else if ((ibfd->flags & DYNAMIC) == 0)
{
- if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
- bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ if (bfd_get_mach (obfd) < ibfd_mach)
+ bfd_set_arch_mach (obfd, bfd_arch_sparc, ibfd_mach);
}
if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA)
@@ -3336,8 +3329,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
&& previous_ibfd_e_flags != (unsigned long) -1)
{
(*_bfd_error_handler)
- (_("%s: linking little endian files with big endian files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking little endian files with big endian files"), ibfd);
error = TRUE;
}
previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
@@ -3432,6 +3424,17 @@ elf32_sparc_reloc_type_class (rela)
return reloc_class_normal;
}
}
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf32_sparc_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED,
+ const asection *plt ATTRIBUTE_UNUSED,
+ const arelent *rel)
+{
+ return rel->address;
+}
#define TARGET_BIG_SYM bfd_elf32_sparc_vec
#define TARGET_BIG_NAME "elf32-sparc"
@@ -3470,6 +3473,7 @@ elf32_sparc_reloc_type_class (rela)
#define elf_backend_gc_sweep_hook elf32_sparc_gc_sweep_hook
#define elf_backend_grok_psinfo elf32_sparc_grok_psinfo
#define elf_backend_reloc_type_class elf32_sparc_reloc_type_class
+#define elf_backend_plt_sym_val elf32_sparc_plt_sym_val
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index b9dcf3c5ae7..763220acce0 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -656,9 +656,8 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
return TRUE;
#ifdef DEBUG
- fprintf (stderr, "v850_elf_check_relocs called for section %s in %s\n",
- bfd_get_section_name (abfd, sec),
- bfd_archive_filename (abfd));
+ _bfd_error_handler ("v850_elf_check_relocs called for section %A in %B",
+ sec, abfd);
#endif
dynobj = elf_hash_table (info)->dynobj;
@@ -1359,7 +1358,7 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
/* We handle final linking of some relocs ourselves. */
/* Is the address of the relocation really within the section? */
- if (reloc->address > isection->_cooked_size)
+ if (reloc->address > bfd_get_section_limit (abfd, isection))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1948,8 +1947,8 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
return TRUE;
}
- _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
- bfd_archive_filename (ibfd));
+ _bfd_error_handler (_("%B: Architecture mismatch with previous modules"),
+ ibfd);
}
return TRUE;
@@ -2515,11 +2514,6 @@ v850_elf_relax_section (abfd, sec, link_info, again)
|| sec->reloc_count == 0)
return TRUE;
- /* If this is the first time we have been called
- for this section, initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
internal_relocs = (_bfd_elf_link_read_relocs
@@ -2530,9 +2524,9 @@ v850_elf_relax_section (abfd, sec, link_info, again)
irelend = internal_relocs + sec->reloc_count;
- while (addr < sec->_cooked_size)
+ while (addr < sec->size)
{
- toaddr = sec->_cooked_size;
+ toaddr = sec->size;
for (irel = internal_relocs; irel < irelend; irel ++)
if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_ALIGN
@@ -2606,12 +2600,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
}
@@ -2633,7 +2622,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGCALL)
{
/* Check code for -mlong-calls output. */
- if (laddr + 16 <= (bfd_vma) sec->_raw_size)
+ if (laddr + 16 <= (bfd_vma) sec->size)
{
insn[0] = bfd_get_16 (abfd, contents + laddr);
insn[1] = bfd_get_16 (abfd, contents + laddr + 4);
@@ -2862,7 +2851,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
else if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGJUMP)
{
/* Check code for -mlong-jumps output. */
- if (laddr + 10 <= (bfd_vma) sec->_raw_size)
+ if (laddr + 10 <= (bfd_vma) sec->size)
{
insn[0] = bfd_get_16 (abfd, contents + laddr);
insn[1] = bfd_get_16 (abfd, contents + laddr + 4);
@@ -3104,10 +3093,10 @@ v850_elf_relax_section (abfd, sec, link_info, again)
#ifdef DEBUG_RELAX
fprintf (stderr, "relax pad %d shorten %d -> %d\n",
align_pad_size,
- sec->_cooked_size,
- sec->_cooked_size - align_pad_size);
+ sec->size,
+ sec->size - align_pad_size);
#endif
- sec->_cooked_size -= align_pad_size;
+ sec->size -= align_pad_size;
}
finish:
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 8ce4678e291..a0249b19f3d 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -777,7 +777,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
info->flags |= DF_TEXTREL;
}
- sreloc->_raw_size += sizeof (Elf32_External_Rela);
+ sreloc->size += sizeof (Elf32_External_Rela);
/* If we are linking with -Bsymbolic, we count the number of
PC relative relocations we have entered for this symbol,
@@ -1015,9 +1015,9 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
}
/* If this symbol is not defined in a regular file, and we are
@@ -1029,26 +1029,26 @@ elf_vax_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
}
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += 4;
+ s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
+ s->size += sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -1102,7 +1102,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ srel->size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1113,8 +1113,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (!bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -1123,10 +1122,10 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1154,7 +1153,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1167,13 +1166,13 @@ elf_vax_size_dynamic_sections (output_bfd, info)
file below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
s = bfd_get_section_by_name (dynobj, ".got.plt");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
s = bfd_get_section_by_name (dynobj, ".got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* If this is a -Bsymbolic shared link, then we need to discard all PC
@@ -1214,7 +1213,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -1228,7 +1227,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -1284,8 +1283,8 @@ elf_vax_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -1354,7 +1353,7 @@ elf_vax_discard_copies (h, ignore)
return TRUE;
for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
+ s->section->size -= s->count * sizeof (Elf32_External_Rela);
return TRUE;
}
@@ -1405,8 +1404,8 @@ elf_vax_instantiate_got_entries (h, infoptr)
}
/* Allocate space in the .got and .rela.got sections. */
- sgot->_raw_size += 4;
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ sgot->size += 4;
+ srelgot->size += sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -1555,7 +1554,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (h != NULL);
off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
- BFD_ASSERT (off < sgot->_raw_size);
+ BFD_ASSERT (off < sgot->size);
if (info->shared
&& h->dynindx == -1
@@ -2030,7 +2029,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2059,10 +2058,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -2076,19 +2072,14 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
+ dyn.d_un.d_val -= s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
}
/* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
{
memcpy (splt->contents, elf_vax_plt0_entry, PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd,
@@ -2107,7 +2098,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index bbf6ee01487..e03cc77190d 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -379,7 +379,7 @@ xstormy16_elf_24_reloc (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_ok;
}
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -508,8 +508,8 @@ xstormy16_elf_check_relocs (abfd, info, sec, relocs)
if (*offset == (bfd_vma) -1)
{
- *offset = splt->_raw_size;
- splt->_raw_size += 4;
+ *offset = splt->size;
+ splt->size += 4;
}
break;
@@ -566,7 +566,7 @@ xstormy16_relax_plt_check (h, xdata)
if (address <= 0xffff)
{
h->plt.offset = -1;
- data->splt->_cooked_size -= 4;
+ data->splt->size -= 4;
*data->again = TRUE;
}
}
@@ -618,14 +618,9 @@ xstormy16_elf_relax_section (dynobj, splt, info, again)
return TRUE;
/* Quick check for an empty plt. */
- if (splt->_raw_size == 0)
+ if (splt->size == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (splt->_cooked_size == 0)
- splt->_cooked_size = splt->_raw_size;
-
/* Map across all global symbols; see which ones happen to
fall in the low 64k. */
relax_plt_data.splt = splt;
@@ -682,7 +677,7 @@ xstormy16_elf_relax_section (dynobj, splt, info, again)
if (address <= 0xffff)
{
local_plt_offsets[idx] = -1;
- splt->_cooked_size -= 4;
+ splt->size -= 4;
*again = TRUE;
}
}
@@ -702,7 +697,7 @@ xstormy16_elf_relax_section (dynobj, splt, info, again)
/* If we changed anything, walk the symbols again to reallocate
.plt entry addresses. */
- if (*again && splt->_cooked_size > 0)
+ if (*again && splt->size > 0)
{
bfd_vma entry = 0;
@@ -727,7 +722,6 @@ xstormy16_elf_relax_section (dynobj, splt, info, again)
}
}
- splt->_raw_size = splt->_cooked_size;
return TRUE;
}
@@ -749,7 +743,7 @@ xstormy16_elf_always_size_sections (output_bfd, info)
splt = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (splt != NULL);
- splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->_raw_size);
+ splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->size);
if (splt->contents == NULL)
return FALSE;
@@ -996,7 +990,7 @@ xstormy16_elf_finish_dynamic_sections (abfd, info)
&& (splt = bfd_get_section_by_name (dynobj, ".plt")) != NULL)
{
bfd_byte *contents = splt->contents;
- unsigned int i, size = splt->_raw_size;
+ unsigned int i, size = splt->size;
for (i = 0; i < size; i += 4)
{
unsigned int x = bfd_get_32 (dynobj, contents + i);
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index e89777753a4..cfdbd235fde 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -497,13 +497,14 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
int block_count;
bfd_size_type num_records;
Elf_Internal_Rela *internal_relocs;
+ bfd_vma section_addr;
table_section_name =
xtensa_get_property_section_name (section, sec_name);
table_section = bfd_get_section_by_name (abfd, table_section_name);
free (table_section_name);
if (table_section != NULL)
- table_size = bfd_get_section_size_before_reloc (table_section);
+ table_size = table_section->size;
if (table_size == 0)
{
@@ -517,10 +518,12 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
bfd_malloc (num_records * sizeof (property_table_entry));
block_count = 0;
+ section_addr = section->output_section->vma + section->output_offset;
+
/* If the file has not yet been relocated, process the relocations
and sort out the table entries that apply to the specified section. */
internal_relocs = retrieve_internal_relocs (abfd, table_section, TRUE);
- if (internal_relocs)
+ if (internal_relocs && !table_section->reloc_done)
{
unsigned i;
@@ -539,7 +542,7 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
{
bfd_vma sym_off = get_elf_r_symndx_offset (abfd, r_symndx);
blocks[block_count].address =
- (section->vma + sym_off + rel->r_addend
+ (section_addr + sym_off + rel->r_addend
+ bfd_get_32 (abfd, table_data + rel->r_offset));
blocks[block_count].size =
bfd_get_32 (abfd, table_data + rel->r_offset + 4);
@@ -549,16 +552,16 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
}
else
{
- /* No relocations. Presumably the file has been relocated
- and the addresses are already in the table. */
+ /* The file has already been relocated and the addresses are
+ already in the table. */
bfd_vma off;
for (off = 0; off < table_size; off += 8)
{
bfd_vma address = bfd_get_32 (abfd, table_data + off);
- if (address >= section->vma
- && address < ( section->vma + section->_raw_size))
+ if (address >= section_addr
+ && address < section_addr + section->size)
{
blocks[block_count].address = address;
blocks[block_count].size =
@@ -638,9 +641,8 @@ elf_xtensa_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
@@ -1052,7 +1054,7 @@ elf_xtensa_allocate_plt_size (h, arg)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->plt.refcount > 0)
- srelplt->_raw_size += (h->plt.refcount * sizeof (Elf32_External_Rela));
+ srelplt->size += (h->plt.refcount * sizeof (Elf32_External_Rela));
return TRUE;
}
@@ -1069,7 +1071,7 @@ elf_xtensa_allocate_got_size (h, arg)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->got.refcount > 0)
- srelgot->_raw_size += (h->got.refcount * sizeof (Elf32_External_Rela));
+ srelgot->size += (h->got.refcount * sizeof (Elf32_External_Rela));
return TRUE;
}
@@ -1098,8 +1100,8 @@ elf_xtensa_allocate_local_got_size (info, srelgot)
for (j = 0; j < cnt; ++j)
{
if (local_got_refcounts[j] > 0)
- srelgot->_raw_size += (local_got_refcounts[j]
- * sizeof (Elf32_External_Rela));
+ srelgot->size += (local_got_refcounts[j]
+ * sizeof (Elf32_External_Rela));
}
}
}
@@ -1133,7 +1135,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@@ -1141,7 +1143,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".got");
if (s == NULL)
abort ();
- s->_raw_size = 4;
+ s->size = 4;
/* Adjust refcounts for symbols that we now know are not "dynamic". */
elf_link_hash_traverse (elf_hash_table (info),
@@ -1180,7 +1182,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
if (spltlittbl == NULL)
abort ();
- plt_entries = srelplt->_raw_size / sizeof (Elf32_External_Rela);
+ plt_entries = srelplt->size / sizeof (Elf32_External_Rela);
plt_chunks =
(plt_entries + PLT_ENTRIES_PER_CHUNK - 1) / PLT_ENTRIES_PER_CHUNK;
@@ -1206,15 +1208,15 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
if (chunk_entries != 0)
{
- sgotplt->_raw_size = 4 * (chunk_entries + 2);
- splt->_raw_size = PLT_ENTRY_SIZE * chunk_entries;
- srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
- spltlittbl->_raw_size += 8;
+ sgotplt->size = 4 * (chunk_entries + 2);
+ splt->size = PLT_ENTRY_SIZE * chunk_entries;
+ srelgot->size += 2 * sizeof (Elf32_External_Rela);
+ spltlittbl->size += 8;
}
else
{
- sgotplt->_raw_size = 0;
- splt->_raw_size = 0;
+ sgotplt->size = 0;
+ splt->size = 0;
}
}
@@ -1223,7 +1225,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
sgotloc = bfd_get_section_by_name (dynobj, ".got.loc");
if (sgotloc == NULL)
abort ();
- sgotloc->_raw_size = spltlittbl->_raw_size;
+ sgotloc->size = spltlittbl->size;
for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
{
if (abfd->flags & DYNAMIC)
@@ -1233,7 +1235,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
if (! elf_discarded_section (s)
&& xtensa_is_littable_section (s)
&& s != spltlittbl)
- sgotloc->_raw_size += s->_raw_size;
+ sgotloc->size += s->size;
}
}
}
@@ -1269,7 +1271,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
else if (strncmp (name, ".plt.", 5) == 0
|| strncmp (name, ".got.plt.", 9) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the output
file. We must create the ".plt*" and ".got.plt*"
@@ -1298,8 +1300,8 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
else
{
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
}
@@ -1435,7 +1437,7 @@ elf_xtensa_do_reloc (howto, abfd, input_section, relocation,
/* Check for windowed CALL across a 1GB boundary. */
xtensa_opcode opcode =
get_expanded_call_opcode (contents + address,
- input_section->_raw_size - address);
+ input_section->size - address);
if (is_windowed_call_opcode (opcode))
{
self_address = (input_section->output_section->vma
@@ -1456,8 +1458,7 @@ elf_xtensa_do_reloc (howto, abfd, input_section, relocation,
{
/* Convert the L32R/CALLX to CALL. */
bfd_reloc_status_type retval =
- elf_xtensa_do_asm_simplify (contents, address,
- input_section->_raw_size);
+ elf_xtensa_do_asm_simplify (contents, address, input_section->size);
if (retval != bfd_reloc_ok)
return retval;
@@ -1672,8 +1673,7 @@ bfd_elf_xtensa_reloc (abfd, reloc_entry, symbol, data, input_section,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > (input_section->_cooked_size
- / bfd_octets_per_byte (abfd)))
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1891,7 +1891,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
{
/* Convert ASM_SIMPLIFY into the simpler relocation
so that they never escape a relaxing link. */
- contract_asm_expansion (contents, input_section->_raw_size, rel);
+ contract_asm_expansion (contents, input_section->size, rel);
r_type = ELF32_R_TYPE (rel->r_info);
}
@@ -1987,7 +1987,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
}
/* Sanity check the address. */
- if (rel->r_offset >= input_section->_raw_size
+ if (rel->r_offset >= bfd_get_section_limit (input_bfd, input_section)
&& ELF32_R_TYPE (rel->r_info) != R_XTENSA_NONE)
{
bfd_set_error (bfd_error_bad_value);
@@ -2044,8 +2044,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
and not in a literal pool. */
if ((input_section->flags & SEC_READONLY) != 0
&& !elf_xtensa_in_literal_pool (lit_table, ltblsize,
- input_section->vma
- + rel->r_offset))
+ outrel.r_offset))
{
error_message =
_("dynamic relocation in read-only section");
@@ -2092,7 +2091,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
+ srel->reloc_count++ * sizeof (Elf32_External_Rela));
bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
BFD_ASSERT (sizeof (Elf32_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ <= srel->size);
}
}
@@ -2103,9 +2102,9 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -2145,6 +2144,8 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
if (lit_table)
free (lit_table);
+ input_section->reloc_done = TRUE;
+
return TRUE;
}
@@ -2196,13 +2197,11 @@ elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc)
bfd_vma offset;
int n, m, num;
- section_size = (sxtlit->_cooked_size != 0
- ? sxtlit->_cooked_size : sxtlit->_raw_size);
+ section_size = sxtlit->size;
BFD_ASSERT (section_size % 8 == 0);
num = section_size / 8;
- sgotloc_size = (sgotloc->_cooked_size != 0
- ? sgotloc->_cooked_size : sgotloc->_raw_size);
+ sgotloc_size = sgotloc->size;
if (sgotloc_size != section_size)
{
(*_bfd_error_handler)
@@ -2210,20 +2209,22 @@ elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc)
return -1;
}
- contents = (bfd_byte *) bfd_malloc (section_size);
- table = (property_table_entry *)
- bfd_malloc (num * sizeof (property_table_entry));
- if (contents == 0 || table == 0)
+ table = bfd_malloc (num * sizeof (property_table_entry));
+ if (table == 0)
return -1;
/* The ".xt.lit.plt" section has the SEC_IN_MEMORY flag set and this
propagates to the output section, where it doesn't really apply and
- where it breaks the following call to bfd_get_section_contents. */
+ where it breaks the following call to bfd_malloc_and_get_section. */
sxtlit->flags &= ~SEC_IN_MEMORY;
- if (! bfd_get_section_contents (output_bfd, sxtlit, contents, 0,
- section_size))
- return -1;
+ if (!bfd_malloc_and_get_section (output_bfd, sxtlit, &contents))
+ {
+ if (contents != 0)
+ free (contents);
+ free (table);
+ return -1;
+ }
/* There should never be any relocations left at this point, so this
is quite a bit easier than what is done during relaxation. */
@@ -2275,10 +2276,7 @@ elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc)
/* Clear the removed bytes. */
if ((bfd_size_type) (num * 8) < section_size)
- {
- memset (&contents[num * 8], 0, section_size - num * 8);
- sxtlit->_cooked_size = num * 8;
- }
+ memset (&contents[num * 8], 0, section_size - num * 8);
if (! bfd_set_section_contents (output_bfd, sxtlit, contents, 0,
section_size))
@@ -2317,7 +2315,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
sgot = bfd_get_section_by_name (dynobj, ".got");
if (sgot)
{
- BFD_ASSERT (sgot->_raw_size == 4);
+ BFD_ASSERT (sgot->size == 4);
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
else
@@ -2327,7 +2325,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
}
srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
- if (srelplt != NULL && srelplt->_raw_size != 0)
+ if (srelplt != NULL && srelplt->size != 0)
{
asection *sgotplt, *srelgot, *spltlittbl;
int chunk, plt_chunks, plt_entries;
@@ -2352,7 +2350,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
}
BFD_ASSERT (rtld_reloc < srelgot->reloc_count);
- plt_entries = (srelplt->_raw_size / sizeof (Elf32_External_Rela));
+ plt_entries = srelplt->size / sizeof (Elf32_External_Rela);
plt_chunks =
(plt_entries + PLT_ENTRIES_PER_CHUNK - 1) / PLT_ENTRIES_PER_CHUNK;
@@ -2394,7 +2392,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
else
chunk_entries = plt_entries - (chunk * PLT_ENTRIES_PER_CHUNK);
- BFD_ASSERT ((unsigned) (chunk + 1) * 8 <= spltlittbl->_cooked_size);
+ BFD_ASSERT ((unsigned) (chunk + 1) * 8 <= spltlittbl->size);
bfd_put_32 (output_bfd,
sgotplt->output_section->vma + sgotplt->output_offset,
spltlittbl->contents + (chunk * 8) + 0);
@@ -2405,10 +2403,10 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
/* All the dynamic relocations have been emitted at this point.
Make sure the relocation sections are the correct size. */
- if (srelgot->_cooked_size != (sizeof (Elf32_External_Rela)
- * srelgot->reloc_count)
- || srelplt->_cooked_size != (sizeof (Elf32_External_Rela)
- * srelplt->reloc_count))
+ if (srelgot->size != (sizeof (Elf32_External_Rela)
+ * srelgot->reloc_count)
+ || srelplt->size != (sizeof (Elf32_External_Rela)
+ * srelplt->reloc_count))
abort ();
/* The .xt.lit.plt section has just been modified. This must
@@ -2419,7 +2417,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
spltlittbl->output_section,
spltlittbl->contents,
spltlittbl->output_offset,
- spltlittbl->_raw_size))
+ spltlittbl->size))
return FALSE;
/* Clear SEC_HAS_CONTENTS so the contents won't be output again. */
spltlittbl->flags &= ~SEC_HAS_CONTENTS;
@@ -2436,7 +2434,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
return FALSE;
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2471,7 +2469,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s);
- dyn.d_un.d_val = (s->_cooked_size ? s->_cooked_size : s->_raw_size);
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -2483,10 +2481,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
don't have to worry about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s)
- {
- dyn.d_un.d_val -=
- (s->_cooked_size ? s->_cooked_size : s->_raw_size);
- }
+ dyn.d_un.d_val -= s->size;
break;
}
@@ -2527,8 +2522,8 @@ elf_xtensa_merge_private_bfd_data (ibfd, obfd)
if (out_mach != in_mach)
{
(*_bfd_error_handler)
- ("%s: incompatible machine type. Output is 0x%x. Input is 0x%x",
- bfd_archive_filename (ibfd), out_mach, in_mach);
+ ("%B: incompatible machine type. Output is 0x%x. Input is 0x%x",
+ ibfd, out_mach, in_mach);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
@@ -2682,7 +2677,7 @@ elf_xtensa_discard_info_for_section (abfd, cookie, info, sec)
bfd_vma offset, actual_offset;
size_t removed_bytes = 0;
- section_size = (sec->_cooked_size ? sec->_cooked_size : sec->_raw_size);
+ section_size = sec->size;
if (section_size == 0 || section_size % 8 != 0)
return FALSE;
@@ -2770,9 +2765,8 @@ elf_xtensa_discard_info_for_section (abfd, cookie, info, sec)
pin_contents (sec, contents);
pin_internal_relocs (sec, cookie->rels);
- sec->_cooked_size = section_size - removed_bytes;
- /* Also shrink _raw_size. See comments in relax_property_section. */
- sec->_raw_size = sec->_cooked_size;
+ /* Shrink size. */
+ sec->size = section_size - removed_bytes;
if (xtensa_is_littable_section (sec))
{
@@ -2782,13 +2776,7 @@ elf_xtensa_discard_info_for_section (abfd, cookie, info, sec)
asection *sgotloc =
bfd_get_section_by_name (dynobj, ".got.loc");
if (sgotloc)
- {
- bfd_size_type sgotloc_size =
- (sgotloc->_cooked_size ? sgotloc->_cooked_size
- : sgotloc->_raw_size);
- sgotloc->_cooked_size = sgotloc_size - removed_bytes;
- sgotloc->_raw_size = sgotloc_size - removed_bytes;
- }
+ sgotloc->size -= removed_bytes;
}
}
}
@@ -2840,7 +2828,7 @@ elf_xtensa_grok_prstatus (abfd, note)
Elf_Internal_Note *note;
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
/* The size for Xtensa is variable, so don't try to recognize the format
based on the size. Just assume this is GNU/Linux. */
@@ -2853,11 +2841,11 @@ elf_xtensa_grok_prstatus (abfd, note)
/* pr_reg */
offset = 72;
- raw_size = note->descsz - offset - 4;
+ size = note->descsz - offset - 4;
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
@@ -3019,7 +3007,7 @@ get_relocation_opcode (sec, contents, irel)
if (contents == NULL)
return XTENSA_UNDEFINED;
- if (sec->_raw_size <= irel->r_offset)
+ if (sec->size <= irel->r_offset)
return XTENSA_UNDEFINED;
if (ibuff == NULL)
@@ -3431,7 +3419,7 @@ struct value_map_hash_table_struct
static bfd_boolean is_same_value
- PARAMS ((const literal_value *, const literal_value *));
+ PARAMS ((const literal_value *, const literal_value *, bfd_boolean));
static value_map_hash_table *value_map_hash_table_init
PARAMS ((void));
static unsigned hash_literal_value
@@ -3439,16 +3427,20 @@ static unsigned hash_literal_value
static unsigned hash_bfd_vma
PARAMS ((bfd_vma));
static value_map *get_cached_value
- PARAMS ((value_map_hash_table *, const literal_value *));
+ PARAMS ((value_map_hash_table *, const literal_value *, bfd_boolean));
static value_map *add_value_map
- PARAMS ((value_map_hash_table *, const literal_value *, const r_reloc *));
+ PARAMS ((value_map_hash_table *, const literal_value *, const r_reloc *,
+ bfd_boolean));
static bfd_boolean
-is_same_value (src1, src2)
+is_same_value (src1, src2, final_static_link)
const literal_value *src1;
const literal_value *src2;
+ bfd_boolean final_static_link;
{
+ struct elf_link_hash_entry *h1, *h2;
+
if (r_reloc_is_const (&src1->r_rel) != r_reloc_is_const (&src2->r_rel))
return FALSE;
@@ -3466,8 +3458,14 @@ is_same_value (src1, src2)
if (src1->value != src2->value)
return FALSE;
- /* Now check for the same section and the same elf_hash. */
- if (r_reloc_is_defined (&src1->r_rel))
+ /* Now check for the same section (if defined) or the same elf_hash
+ (if undefined or weak). */
+ h1 = r_reloc_get_hash_entry (&src1->r_rel);
+ h2 = r_reloc_get_hash_entry (&src2->r_rel);
+ if (r_reloc_is_defined (&src1->r_rel)
+ && (final_static_link
+ || ((!h1 || h1->root.type != bfd_link_hash_defweak)
+ && (!h2 || h2->root.type != bfd_link_hash_defweak))))
{
if (r_reloc_get_section (&src1->r_rel)
!= r_reloc_get_section (&src2->r_rel))
@@ -3475,11 +3473,8 @@ is_same_value (src1, src2)
}
else
{
- if (r_reloc_get_hash_entry (&src1->r_rel)
- != r_reloc_get_hash_entry (&src2->r_rel))
- return FALSE;
-
- if (r_reloc_get_hash_entry (&src1->r_rel) == 0)
+ /* Require that the hash entries (i.e., symbols) be identical. */
+ if (h1 != h2 || h1 == 0)
return FALSE;
}
@@ -3540,9 +3535,10 @@ hash_literal_value (src)
/* Check if the specified literal_value has been seen before. */
static value_map *
-get_cached_value (map, val)
+get_cached_value (map, val, final_static_link)
value_map_hash_table *map;
const literal_value *val;
+ bfd_boolean final_static_link;
{
value_map *map_e;
value_map *bucket;
@@ -3553,7 +3549,7 @@ get_cached_value (map, val)
bucket = map->buckets[idx];
for (map_e = bucket; map_e; map_e = map_e->next)
{
- if (is_same_value (&map_e->val, val))
+ if (is_same_value (&map_e->val, val, final_static_link))
return map_e;
}
return NULL;
@@ -3564,17 +3560,18 @@ get_cached_value (map, val)
already has an entry here. */
static value_map *
-add_value_map (map, val, loc)
+add_value_map (map, val, loc, final_static_link)
value_map_hash_table *map;
const literal_value *val;
const r_reloc *loc;
+ bfd_boolean final_static_link;
{
value_map **bucket_p;
unsigned idx;
value_map *val_e = (value_map *) bfd_zmalloc (sizeof (value_map));
- BFD_ASSERT (get_cached_value (map, val) == NULL);
+ BFD_ASSERT (get_cached_value (map, val, final_static_link) == NULL);
val_e->val = *val;
val_e->loc = *loc;
@@ -3944,20 +3941,16 @@ retrieve_contents (abfd, sec, keep_memory)
contents = elf_section_data (sec)->this_hdr.contents;
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents != NULL)
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
{
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
- {
- free (contents);
- return NULL;
- }
- if (keep_memory)
- elf_section_data (sec)->this_hdr.contents = contents;
+ if (contents != NULL)
+ free (contents);
+ return NULL;
}
+ if (keep_memory)
+ elf_section_data (sec)->this_hdr.contents = contents;
}
return contents;
}
@@ -4183,7 +4176,7 @@ find_relaxable_sections (abfd, sec, link_info, is_relaxable_p)
return ok;
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
@@ -4244,7 +4237,7 @@ collect_source_relocs (abfd, sec, link_info)
return ok;
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
@@ -4392,7 +4385,7 @@ is_resolvable_asm_expansion (abfd, sec, contents, irel, link_info,
return FALSE;
opcode = get_expanded_call_opcode (contents + irel->r_offset,
- sec->_raw_size - irel->r_offset);
+ sec->size - irel->r_offset);
direct_call_opcode = swap_callx_for_call_opcode (opcode);
if (direct_call_opcode == XTENSA_UNDEFINED)
@@ -4480,6 +4473,7 @@ remove_literals (abfd, sec, link_info, values)
bfd_byte *contents;
Elf_Internal_Rela *internal_relocs;
source_reloc *src_relocs;
+ bfd_boolean final_static_link;
bfd_boolean ok = TRUE;
int i;
@@ -4494,12 +4488,16 @@ remove_literals (abfd, sec, link_info, values)
link_info->keep_memory);
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
}
+ final_static_link =
+ (!link_info->relocatable
+ && !elf_hash_table (link_info)->dynamic_sections_created);
+
/* Sort the source_relocs by target offset. */
src_relocs = relax_info->src_relocs;
qsort (src_relocs, relax_info->src_count,
@@ -4548,11 +4546,11 @@ remove_literals (abfd, sec, link_info, values)
/* Find the literal value. */
r_reloc_init (&val.r_rel, abfd, irel);
- BFD_ASSERT (rel->r_rel.target_offset < sec->_raw_size);
+ BFD_ASSERT (rel->r_rel.target_offset < sec->size);
val.value = bfd_get_32 (abfd, contents + rel->r_rel.target_offset);
/* Check if we've seen another literal with the same value. */
- val_map = get_cached_value (values, &val);
+ val_map = get_cached_value (values, &val, final_static_link);
if (val_map != NULL)
{
/* First check that THIS and all the other relocs to this
@@ -4575,7 +4573,7 @@ remove_literals (abfd, sec, link_info, values)
{
/* This is the first time we've seen this literal value. */
BFD_ASSERT (sec == r_reloc_get_section (&rel->r_rel));
- add_value_map (values, &val, &rel->r_rel);
+ add_value_map (values, &val, &rel->r_rel, final_static_link);
}
}
@@ -4704,7 +4702,7 @@ relax_section (abfd, sec, link_info)
internal_relocs = retrieve_internal_relocs (abfd, sec,
link_info->keep_memory);
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
@@ -4783,13 +4781,13 @@ relax_section (abfd, sec, link_info)
/* Walk through the contents and delete literals that are not needed
anymore. */
- unsigned long size = sec->_cooked_size;
+ unsigned long size = sec->size;
unsigned long removed = 0;
removed_literal *reloc = relax_info->removed_list.head;
for (; reloc; reloc = reloc->next)
{
- unsigned long upper = sec->_raw_size;
+ unsigned long upper = sec->size;
bfd_vma start = reloc->from.target_offset + 4;
if (reloc->next)
upper = reloc->next->from.target_offset;
@@ -4806,13 +4804,7 @@ relax_section (abfd, sec, link_info)
}
/* Change the section size. */
- sec->_cooked_size = size;
- /* Also shrink _raw_size. (The code in relocate_section that
- checks that relocations are within the section must use
- _raw_size because of the way the stabs sections are relaxed;
- shrinking _raw_size means that these checks will not be
- unnecessarily lax.) */
- sec->_raw_size = size;
+ sec->size = size;
}
error_return:
@@ -4938,13 +4930,8 @@ shrink_dynamic_reloc_sections (info, abfd, input_section, rel)
/* Reduce size of the .rela.* section by one reloc. */
srel = bfd_get_section_by_name (dynobj, srel_name);
BFD_ASSERT (srel != NULL);
- BFD_ASSERT (srel->_cooked_size >= sizeof (Elf32_External_Rela));
- srel->_cooked_size -= sizeof (Elf32_External_Rela);
-
- /* Also shrink _raw_size. (This seems wrong but other bfd code seems
- to assume that linker-created sections will never be relaxed and
- hence _raw_size must always equal _cooked_size.) */
- srel->_raw_size = srel->_cooked_size;
+ BFD_ASSERT (srel->size >= sizeof (Elf32_External_Rela));
+ srel->size -= sizeof (Elf32_External_Rela);
if (is_plt)
{
@@ -4957,7 +4944,7 @@ shrink_dynamic_reloc_sections (info, abfd, input_section, rel)
= size - 1" since the index starts at zero, but in this
context, the size has just been decremented so there's no
need to subtract one. */
- reloc_index = srel->_cooked_size / sizeof (Elf32_External_Rela);
+ reloc_index = srel->size / sizeof (Elf32_External_Rela);
chunk = reloc_index / PLT_ENTRIES_PER_CHUNK;
splt = elf_xtensa_get_plt_section (dynobj, chunk);
@@ -4971,27 +4958,20 @@ shrink_dynamic_reloc_sections (info, abfd, input_section, rel)
srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
BFD_ASSERT (srelgot != NULL);
srelgot->reloc_count -= 2;
- srelgot->_cooked_size -= 2 * sizeof (Elf32_External_Rela);
- /* Shrink _raw_size (see comment above). */
- srelgot->_raw_size = srelgot->_cooked_size;
-
- sgotplt->_cooked_size -= 8;
+ srelgot->size -= 2 * sizeof (Elf32_External_Rela);
+ sgotplt->size -= 8;
/* There should be only one entry left (and it will be
removed below). */
- BFD_ASSERT (sgotplt->_cooked_size == 4);
- BFD_ASSERT (splt->_cooked_size == PLT_ENTRY_SIZE);
+ BFD_ASSERT (sgotplt->size == 4);
+ BFD_ASSERT (splt->size == PLT_ENTRY_SIZE);
}
- BFD_ASSERT (sgotplt->_cooked_size >= 4);
- BFD_ASSERT (splt->_cooked_size >= PLT_ENTRY_SIZE);
-
- sgotplt->_cooked_size -= 4;
- splt->_cooked_size -= PLT_ENTRY_SIZE;
+ BFD_ASSERT (sgotplt->size >= 4);
+ BFD_ASSERT (splt->size >= PLT_ENTRY_SIZE);
- /* Shrink _raw_sizes (see comment above). */
- sgotplt->_raw_size = sgotplt->_cooked_size;
- splt->_raw_size = splt->_cooked_size;
+ sgotplt->size -= 4;
+ splt->size -= PLT_ENTRY_SIZE;
}
}
}
@@ -5016,7 +4996,7 @@ relax_property_section (abfd, sec, link_info)
internal_relocs = retrieve_internal_relocs (abfd, sec,
link_info->keep_memory);
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
@@ -5107,7 +5087,7 @@ relax_property_section (abfd, sec, link_info)
pin_contents (sec, contents);
last_irel_offset = (bfd_vma) -1;
- section_size = (sec->_cooked_size ? sec->_cooked_size : sec->_raw_size);
+ section_size = sec->size;
BFD_ASSERT (section_size % 8 == 0);
for (offset = 0; offset < section_size; offset += 8)
@@ -5239,13 +5219,7 @@ relax_property_section (abfd, sec, link_info)
/* Clear the removed bytes. */
memset (&contents[section_size - removed_bytes], 0, removed_bytes);
- sec->_cooked_size = section_size - removed_bytes;
- /* Also shrink _raw_size. (The code in relocate_section that
- checks that relocations are within the section must use
- _raw_size because of the way the stabs sections are
- relaxed; shrinking _raw_size means that these checks will
- not be unnecessarily lax.) */
- sec->_raw_size = sec->_cooked_size;
+ sec->size = section_size - removed_bytes;
if (xtensa_is_littable_section (sec))
{
@@ -5255,13 +5229,7 @@ relax_property_section (abfd, sec, link_info)
asection *sgotloc =
bfd_get_section_by_name (dynobj, ".got.loc");
if (sgotloc)
- {
- bfd_size_type sgotloc_size =
- (sgotloc->_cooked_size ? sgotloc->_cooked_size
- : sgotloc->_raw_size);
- sgotloc->_cooked_size = sgotloc_size - removed_bytes;
- sgotloc->_raw_size = sgotloc_size - removed_bytes;
- }
+ sgotloc->size -= removed_bytes;
}
}
}
@@ -5666,12 +5634,10 @@ xtensa_get_property_section_name (sec, base_name)
prop_sec_name[linkonce_len + 1] = '.';
suffix = sec->name + linkonce_len;
- while (*suffix)
- {
- suffix += 1;
- if (suffix[-1] == '.')
- break;
- }
+ /* For backward compatibility, replace "t." instead of inserting
+ the new linkonce_kind. */
+ if (strncmp (suffix, "t.", 2) == 0)
+ suffix += 2;
strcpy (prop_sec_name + linkonce_len + 2, suffix);
return prop_sec_name;
@@ -5722,7 +5688,7 @@ xtensa_callback_required_dependence (abfd, sec, link_info, callback, closure)
/* Assume worst-case offsets: L32R at the very end of the ".plt"
section referencing a literal at the very beginning of
".got.plt". This is very close to the real dependence, anyway. */
- (*callback) (sec, sec->_raw_size, sgotplt, 0, closure);
+ (*callback) (sec, sec->size, sgotplt, 0, closure);
}
internal_relocs = retrieve_internal_relocs (abfd, sec,
@@ -5733,7 +5699,7 @@ xtensa_callback_required_dependence (abfd, sec, link_info, callback, closure)
/* Cache the contents for the duration of this scan. */
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
- if (contents == NULL && sec->_raw_size != 0)
+ if (contents == NULL && sec->size != 0)
{
ok = FALSE;
goto error_return;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 2d4715b4e14..a1f4e03cfb5 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -75,7 +75,7 @@ static bfd_boolean elf64_alpha_object_p
static bfd_boolean elf64_alpha_section_from_shdr
PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static bfd_boolean elf64_alpha_section_flags
- PARAMS ((flagword *, Elf_Internal_Shdr *));
+ PARAMS ((flagword *, const Elf_Internal_Shdr *));
static bfd_boolean elf64_alpha_fake_sections
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
static bfd_boolean elf64_alpha_create_got_section
@@ -1036,6 +1036,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
{
bfd_reloc_status_type ret;
bfd_vma gp, relocation;
+ bfd_vma high_address;
bfd_byte *p_ldah, *p_lda;
/* Don't do anything if we're not doing a final link. */
@@ -1045,8 +1046,9 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
return bfd_reloc_ok;
}
- if (reloc_entry->address > input_section->_cooked_size ||
- reloc_entry->address + reloc_entry->addend > input_section->_cooked_size)
+ high_address = bfd_get_section_limit (abfd, input_section);
+ if (reloc_entry->address > high_address
+ || reloc_entry->address + reloc_entry->addend > high_address)
return bfd_reloc_outofrange;
/* The gp used in the portion of the output object to which this
@@ -1255,8 +1257,8 @@ elf64_alpha_relax_with_lituse (info, symval, irel)
if (lit_insn >> 26 != OP_LDQ)
{
((*_bfd_error_handler)
- ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
- bfd_archive_filename (info->abfd), info->sec->name,
+ ("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn",
+ info->abfd, info->sec,
(unsigned long) irel->r_offset));
return TRUE;
}
@@ -1568,8 +1570,8 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
{
reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
((*_bfd_error_handler)
- ("%s: %s+0x%lx: warning: %s relocation against unexpected insn",
- bfd_archive_filename (info->abfd), info->sec->name,
+ ("%B: %A+0x%lx: warning: %s relocation against unexpected insn",
+ info->abfd, info->sec,
(unsigned long) irel->r_offset, howto->name));
return TRUE;
}
@@ -1973,11 +1975,6 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
|| sec->reloc_count == 0)
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
@@ -2012,12 +2009,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
info.contents = elf_section_data (sec)->this_hdr.contents;
else
{
- info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (info.contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, info.contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &info.contents))
goto error_return;
}
@@ -2315,7 +2307,7 @@ elf64_alpha_section_from_shdr (abfd, hdr, name)
static bfd_boolean
elf64_alpha_section_flags (flags, hdr)
flagword *flags;
- Elf_Internal_Shdr *hdr;
+ const Elf_Internal_Shdr *hdr;
{
if (hdr->sh_flags & SHF_ALPHA_GPREL)
*flags |= SEC_SMALL_DATA;
@@ -2572,7 +2564,6 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
#undef READ
debug->fdr = NULL;
- debug->adjust = NULL;
return TRUE;
@@ -3205,7 +3196,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
{
/* If this is a shared library, and the section is to be
loaded into memory, we need a RELATIVE reloc. */
- sreloc->_raw_size += sizeof (Elf64_External_Rela);
+ sreloc->size += sizeof (Elf64_External_Rela);
if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
== (SEC_READONLY | SEC_ALLOC))
info->flags |= DF_TEXTREL;
@@ -3256,11 +3247,11 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
return FALSE;
/* The first bit of the .plt is reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = PLT_HEADER_SIZE;
+ if (s->size == 0)
+ s->size = PLT_HEADER_SIZE;
- h->plt.offset = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
+ h->plt.offset = s->size;
+ s->size += PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are not
generating a shared library, then set the symbol to the location
@@ -3279,7 +3270,7 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
/* We also need a JMP_SLOT entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf64_External_Rela);
+ s->size += sizeof (Elf64_External_Rela);
return TRUE;
}
@@ -3567,7 +3558,7 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
result = FALSE;
continue;
}
- plge = &td->got->_raw_size;
+ plge = &td->got->size;
gotent->got_offset = *plge;
*plge += alpha_got_entry_size (gotent->reloc_type);
}
@@ -3584,7 +3575,7 @@ elf64_alpha_calc_got_offsets (info)
/* First, zero out the .got sizes, as we may be recalculating the
.got after optimizing it. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
- alpha_elf_tdata(i)->got->_raw_size = 0;
+ alpha_elf_tdata(i)->got->size = 0;
/* Next, fill in the offsets for all the global entries. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
@@ -3594,7 +3585,7 @@ elf64_alpha_calc_got_offsets (info)
/* Finally, fill in the offsets for the local entries. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
{
- bfd_size_type got_offset = alpha_elf_tdata(i)->got->_raw_size;
+ bfd_size_type got_offset = alpha_elf_tdata(i)->got->size;
bfd *j;
for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next)
@@ -3615,8 +3606,7 @@ elf64_alpha_calc_got_offsets (info)
}
}
- alpha_elf_tdata(i)->got->_raw_size = got_offset;
- alpha_elf_tdata(i)->got->_cooked_size = got_offset;
+ alpha_elf_tdata(i)->got->size = got_offset;
}
}
@@ -3648,9 +3638,8 @@ elf64_alpha_size_got_sections (info)
{
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
- (_("%s: .got subsegment exceeds 64K (size %d)"),
- bfd_archive_filename (i),
- alpha_elf_tdata (this_got)->total_got_size);
+ (_("%B: .got subsegment exceeds 64K (size %d)"),
+ i, alpha_elf_tdata (this_got)->total_got_size);
return FALSE;
}
@@ -3713,21 +3702,18 @@ elf64_alpha_size_plt_section (info)
if (splt == NULL)
return TRUE;
- splt->_raw_size = 0;
+ splt->size = 0;
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_plt_section_1, splt);
- splt->_cooked_size = splt->_raw_size;
-
/* Every plt entry requires a JMP_SLOT relocation. */
spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
- if (splt->_raw_size)
- entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+ if (splt->size)
+ entries = (splt->size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
else
entries = 0;
- spltrel->_raw_size = entries * sizeof (Elf64_External_Rela);
- spltrel->_cooked_size = spltrel->_raw_size;
+ spltrel->size = entries * sizeof (Elf64_External_Rela);
return TRUE;
}
@@ -3754,10 +3740,10 @@ elf64_alpha_size_plt_section_1 (h, data)
a need for the PLT entry. */
if (gotent)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = PLT_HEADER_SIZE;
- h->root.plt.offset = splt->_raw_size;
- splt->_raw_size += PLT_ENTRY_SIZE;
+ if (splt->size == 0)
+ splt->size = PLT_HEADER_SIZE;
+ h->root.plt.offset = splt->size;
+ splt->size += PLT_ENTRY_SIZE;
}
else
{
@@ -3799,9 +3785,9 @@ elf64_alpha_always_size_sections (output_bfd, info)
for ( ; i ; i = alpha_elf_tdata(i)->got_link_next)
{
asection *s = alpha_elf_tdata(i)->got;
- if (s->_raw_size > 0)
+ if (s->size > 0)
{
- s->contents = (bfd_byte *) bfd_zalloc (i, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (i, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -3885,7 +3871,7 @@ elf64_alpha_calc_dynrel_sizes (h, info)
info->shared);
if (entries)
{
- relent->srel->_raw_size +=
+ relent->srel->size +=
entries * sizeof (Elf64_External_Rela) * relent->count;
if (relent->reltext)
info->flags |= DT_TEXTREL;
@@ -3939,14 +3925,12 @@ elf64_alpha_size_rela_got_section (info)
BFD_ASSERT (entries == 0);
return TRUE;
}
- srel->_raw_size = sizeof (Elf64_External_Rela) * entries;
+ srel->size = sizeof (Elf64_External_Rela) * entries;
/* Now do the non-local symbols. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_rela_got_1, info);
- srel->_cooked_size = srel->_raw_size;
-
return TRUE;
}
@@ -3987,7 +3971,7 @@ elf64_alpha_size_rela_got_1 (h, info)
bfd *dynobj = elf_hash_table(info)->dynobj;
asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela) * entries;
+ srel->size += sizeof (Elf64_External_Rela) * entries;
}
return TRUE;
@@ -4014,7 +3998,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@@ -4057,7 +4041,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rela", 5) == 0)
{
- strip = (s->_raw_size == 0);
+ strip = (s->size == 0);
if (!strip)
{
@@ -4080,8 +4064,8 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
else
{
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
}
@@ -4155,8 +4139,7 @@ elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->size);
}
/* Relocate an Alpha ELF section for a relocatable link.
@@ -4196,8 +4179,8 @@ elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -4322,8 +4305,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -4382,8 +4365,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_merged_section_offset (output_bfd, &msec,
elf_section_data (sec)->
sec_info,
- sym->st_value + ent->addend,
- (bfd_vma) 0);
+ sym->st_value + ent->addend);
ent->addend -= sym->st_value;
ent->addend += msec->output_section->vma
+ msec->output_offset
@@ -4495,8 +4477,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: gp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@@ -4507,8 +4489,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: gp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@@ -4533,8 +4515,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: pc-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: pc-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
/* The regular PC-relative stuff measures from the start of
@@ -4561,8 +4543,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
&& gotobj != alpha_elf_tdata (sec->owner)->gotobj)
{
(*_bfd_error_handler)
- (_("%s: change in gp: BRSGP %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: change in gp: BRSGP %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
@@ -4591,8 +4573,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
(*_bfd_error_handler)
- (_("%s: !samegp reloc against symbol without .prologue: %s"),
- bfd_archive_filename (input_bfd), name);
+ (_("%B: !samegp reloc against symbol without .prologue: %s"),
+ input_bfd, name);
ret_val = FALSE;
break;
}
@@ -4642,8 +4624,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type == R_ALPHA_REFLONG)
{
(*_bfd_error_handler)
- (_("%s: unhandled dynamic relocation against %s"),
- bfd_archive_filename (input_bfd),
+ (_("%B: unhandled dynamic relocation against %s"),
+ input_bfd,
h->root.root.root.string);
ret_val = FALSE;
}
@@ -4666,8 +4648,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: pc-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: pc-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
@@ -4725,8 +4707,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: dtp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: dtp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@@ -4741,15 +4723,15 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: TLS local exec code cannot be linked into shared objects"),
- bfd_archive_filename (input_bfd));
+ (_("%B: TLS local exec code cannot be linked into shared objects"),
+ input_bfd);
ret_val = FALSE;
}
else if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: tp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: tp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@@ -5034,7 +5016,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -5063,10 +5045,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
out who is right. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s)
- {
- dyn.d_un.d_val -=
- (s->_cooked_size ? s->_cooked_size : s->_raw_size);
- }
+ dyn.d_un.d_val -= s->size;
break;
get_vma:
@@ -5076,8 +5055,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
get_size:
s = bfd_get_section_by_name (output_bfd, name);
- dyn.d_un.d_val =
- (s->_cooked_size ? s->_cooked_size : s->_raw_size);
+ dyn.d_un.d_val = s->size;
break;
}
@@ -5085,7 +5063,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
}
/* Initialize the PLT0 entry. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
{
bfd_put_32 (output_bfd, PLT_HEADER_WORD1, splt->contents);
bfd_put_32 (output_bfd, PLT_HEADER_WORD2, splt->contents + 4);
@@ -5196,7 +5174,7 @@ elf64_alpha_final_link (abfd, info)
if (s != NULL)
{
esym.asym.value = s->vma;
- last = s->vma + s->_raw_size;
+ last = s->vma + s->size;
}
else
esym.asym.value = last;
@@ -5241,7 +5219,7 @@ elf64_alpha_final_link (abfd, info)
input_swap = (get_elf_backend_data (input_bfd)
->elf_backend_ecoff_debug_swap);
- BFD_ASSERT (p->size == input_section->_raw_size);
+ BFD_ASSERT (p->size == input_section->size);
/* The ECOFF linking code expects that we have already
read in the debugging information and set up an
@@ -5324,7 +5302,7 @@ elf64_alpha_final_link (abfd, info)
return FALSE;
/* Set the size of the .mdebug section. */
- o->_raw_size = bfd_ecoff_debug_size (abfd, &debug, swap);
+ o->size = bfd_ecoff_debug_size (abfd, &debug, swap);
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
@@ -5357,7 +5335,7 @@ elf64_alpha_final_link (abfd, info)
if (! bfd_set_section_contents (abfd, sgot->output_section,
sgot->contents,
(file_ptr) sgot->output_offset,
- sgot->_raw_size))
+ sgot->size))
return FALSE;
}
}
diff --git a/bfd/elf64-gen.c b/bfd/elf64-gen.c
index be1dc3e00ed..6b9e22f68d7 100644
--- a/bfd/elf64-gen.c
+++ b/bfd/elf64-gen.c
@@ -80,9 +80,8 @@ elf64_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_archive_filename (abfd),
- ehdrp->e_machine);
+ (*_bfd_error_handler) (_("%B: Relocations in generic ELF (EM: %d)"),
+ abfd, ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 76dcc18b243..25431d410e1 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -1503,7 +1503,7 @@ allocate_dynrel_entries (dyn_h, data)
if (!shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
continue;
- hppa_info->other_rel_sec->_raw_size += sizeof (Elf64_External_Rela);
+ hppa_info->other_rel_sec->size += sizeof (Elf64_External_Rela);
/* Make sure this symbol gets into the dynamic symbol table if it is
not already recorded. ?!? This should not be in the loop since
@@ -1518,13 +1518,13 @@ allocate_dynrel_entries (dyn_h, data)
/* Take care of the GOT and PLT relocations. */
if ((dynamic_symbol || shared) && dyn_h->want_dlt)
- hppa_info->dlt_rel_sec->_raw_size += sizeof (Elf64_External_Rela);
+ hppa_info->dlt_rel_sec->size += sizeof (Elf64_External_Rela);
/* If we are building a shared library, then every symbol that has an
opd entry will need an EPLT relocation to relocate the symbol's address
and __gp value based on the runtime load address. */
if (shared && dyn_h->want_opd)
- hppa_info->opd_rel_sec->_raw_size += sizeof (Elf64_External_Rela);
+ hppa_info->opd_rel_sec->size += sizeof (Elf64_External_Rela);
if (dyn_h->want_plt && dynamic_symbol)
{
@@ -1538,7 +1538,7 @@ allocate_dynrel_entries (dyn_h, data)
else if (shared)
t = 2 * sizeof (Elf64_External_Rela);
- hppa_info->plt_rel_sec->_raw_size += t;
+ hppa_info->plt_rel_sec->size += t;
}
return TRUE;
@@ -1648,7 +1648,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1661,7 +1661,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
below. */
s = bfd_get_section_by_name (dynobj, ".rela.dlt");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* Allocate the GOT entries. */
@@ -1672,17 +1672,17 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
data.ofs = 0x0;
elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table,
allocate_global_data_dlt, &data);
- hppa_info->dlt_sec->_raw_size = data.ofs;
+ hppa_info->dlt_sec->size = data.ofs;
data.ofs = 0x0;
elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table,
allocate_global_data_plt, &data);
- hppa_info->plt_sec->_raw_size = data.ofs;
+ hppa_info->plt_sec->size = data.ofs;
data.ofs = 0x0;
elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table,
allocate_global_data_stub, &data);
- hppa_info->stub_sec->_raw_size = data.ofs;
+ hppa_info->stub_sec->size = data.ofs;
}
/* Allocate space for entries in the .opd section. */
@@ -1691,7 +1691,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
data.ofs = 0;
elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table,
allocate_global_data_opd, &data);
- hppa_info->opd_sec->_raw_size = data.ofs;
+ hppa_info->opd_sec->size = data.ofs;
}
/* Now allocate space for dynamic relocations, if necessary. */
@@ -1720,7 +1720,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
/* Strip this section if we don't need it; see the comment below. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
strip = TRUE;
}
@@ -1733,7 +1733,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
else if (strcmp (name, ".dlt") == 0)
{
/* Strip this section if we don't need it; see the comment below. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
strip = TRUE;
}
@@ -1741,7 +1741,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
else if (strcmp (name, ".opd") == 0)
{
/* Strip this section if we don't need it; see the comment below. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
strip = TRUE;
}
@@ -1755,7 +1755,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
sections. The linker does that before adjust_dynamic_symbol
is called, and it is that function which decides whether
anything needs to go into these sections. */
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -1821,8 +1821,8 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
garbage. */
if (s->contents == NULL)
{
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
}
@@ -2498,7 +2498,7 @@ elf64_hppa_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2537,15 +2537,15 @@ elf64_hppa_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = hppa_info->plt_rel_sec;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_RELA:
s = hppa_info->other_rel_sec;
- if (! s || ! s->_raw_size)
+ if (! s || ! s->size)
s = hppa_info->dlt_rel_sec;
- if (! s || ! s->_raw_size)
+ if (! s || ! s->size)
s = hppa_info->opd_rel_sec;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -2553,16 +2553,16 @@ elf64_hppa_finish_dynamic_sections (output_bfd, info)
case DT_RELASZ:
s = hppa_info->other_rel_sec;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
s = hppa_info->dlt_rel_sec;
- dyn.d_un.d_val += s->_raw_size;
+ dyn.d_un.d_val += s->size;
s = hppa_info->opd_rel_sec;
- dyn.d_un.d_val += s->_raw_size;
+ dyn.d_un.d_val += s->size;
/* There is some question about whether or not the size of
the PLT relocs should be included here. HP's tools do
it, so we'll emulate them. */
s = hppa_info->plt_rel_sec;
- dyn.d_un.d_val += s->_raw_size;
+ dyn.d_un.d_val += s->size;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index fa3b494b998..ac9f96f97b3 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1,5 +1,5 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
@@ -1621,7 +1621,7 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Set val to the offset into the section or symbol. */
@@ -1736,7 +1736,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -1984,7 +1984,7 @@ mips_elf64_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage,
if (! (*slurp_relocs) (abfd, s, syms, TRUE))
return -1;
- count = s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize * 3;
+ count = s->size / elf_section_data (s)->this_hdr.sh_entsize * 3;
p = s->relocation;
for (i = 0; i < count; i++)
*storage++ = p++;
@@ -2210,7 +2210,7 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect,
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@@ -2539,7 +2539,7 @@ static bfd_boolean
elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -2555,14 +2555,14 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 360;
+ size = 360;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 4b78681faec..777b5fe770e 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -229,10 +229,6 @@ static void
mmix_set_relaxable_size
PARAMS ((bfd *, asection *, void *));
-static bfd_boolean
-mmix_elf_get_section_contents
- PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
-
/* Watch out: this currently needs to have elements with the same index as
their R_MMIX_ number. */
@@ -991,10 +987,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
goto pcrel_mmix_reloc_fits;
else
{
- bfd_size_type raw_size
- = (isec->_raw_size
- - mmix_elf_section_data (isec)->pjs.n_pushj_relocs
- * MAX_PUSHJ_STUB_SIZE);
+ bfd_size_type size = isec->rawsize ? isec->rawsize : isec->size;
/* We have the bytes at the PUSHJ insn and need to get the
position for the stub. There's supposed to be room allocated
@@ -1002,7 +995,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
bfd_byte *stubcontents
= ((char *) datap
- (addr - (isec->output_section->vma + isec->output_offset))
- + raw_size
+ + size
+ mmix_elf_section_data (isec)->pjs.stub_offset);
bfd_vma stubaddr;
@@ -1015,7 +1008,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
addr,
isec->output_section->vma
+ isec->output_offset
- + raw_size
+ + size
+ (mmix_elf_section_data (isec)
->pjs.stub_offset)
- addr);
@@ -1025,7 +1018,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
stubaddr
= (isec->output_section->vma
+ isec->output_offset
- + raw_size
+ + size
+ mmix_elf_section_data (isec)->pjs.stub_offset);
/* We generate a simple JMP if that suffices, else the whole 5
@@ -1045,9 +1038,8 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
value + addr - stubaddr);
mmix_elf_section_data (isec)->pjs.stub_offset += 4;
- if (raw_size
- + mmix_elf_section_data (isec)->pjs.stub_offset
- > isec->_cooked_size)
+ if (size + mmix_elf_section_data (isec)->pjs.stub_offset
+ > isec->size)
abort ();
return r;
@@ -1277,7 +1269,7 @@ mmix_elf_reloc (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_undefined;
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1342,16 +1334,20 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- bfd_size_type raw_size
- = (input_section->_raw_size
- - mmix_elf_section_data (input_section)->pjs.n_pushj_relocs
- * MAX_PUSHJ_STUB_SIZE);
+ bfd_size_type size;
size_t pjsno = 0;
+ size = input_section->rawsize ? input_section->rawsize : input_section->size;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
+ /* Zero the stub area before we start. */
+ if (input_section->rawsize != 0
+ && input_section->size > input_section->rawsize)
+ memset (contents + input_section->rawsize, 0,
+ input_section->size - input_section->rawsize);
+
for (rel = relocs; rel < relend; rel ++)
{
reloc_howto_type *howto;
@@ -1421,7 +1417,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_section
->output_section->vma
+ input_section->output_offset
- + raw_size
+ + size
+ mmix_elf_section_data (input_section)
->pjs.stub_offset,
NULL, NULL) != bfd_reloc_ok)
@@ -1431,7 +1427,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
R_MMIX_JMP reloc. */
bfd_put_32 (output_bfd, JMP_INSN_BYTE << 24,
contents
- + raw_size
+ + size
+ mmix_elf_section_data (input_section)
->pjs.stub_offset);
@@ -1439,7 +1435,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
R_MMIX_JMP reloc. */
rel->r_info = ELF64_R_INFO (r_symndx, R_MMIX_JMP);
rel->r_offset
- = (raw_size
+ = (size
+ mmix_elf_section_data (input_section)
->pjs.stub_offset);
@@ -2287,22 +2283,14 @@ mmix_elf_final_link (abfd, info)
greg_section->output_section,
greg_section->contents,
(file_ptr) greg_section->output_offset,
- greg_section->_cooked_size))
+ greg_section->size))
return FALSE;
}
return TRUE;
}
/* We need to include the maximum size of PUSHJ-stubs in the initial
- section size. This is expected to shrink during linker relaxation.
-
- You might think that we should set *only* _cooked_size, but that won't
- work: section contents allocation will be using _raw_size in mixed
- format linking and not enough storage will be allocated. FIXME: That's
- a major bug, including the name bfd_get_section_size_before_reloc; it
- should be bfd_get_section_size_before_relax. The relaxation functions
- set _cooked size. Relaxation happens before relocation. All functions
- *after relaxation* should be using _cooked size. */
+ section size. This is expected to shrink during linker relaxation. */
static void
mmix_set_relaxable_size (abfd, sec, ptr)
@@ -2317,11 +2305,9 @@ mmix_set_relaxable_size (abfd, sec, ptr)
if (mmix_elf_section_data (sec)->pjs.n_pushj_relocs == 0)
return;
- sec->_cooked_size
- = (sec->_raw_size
- + mmix_elf_section_data (sec)->pjs.n_pushj_relocs
- * MAX_PUSHJ_STUB_SIZE);
- sec->_raw_size = sec->_cooked_size;
+ sec->rawsize = sec->size;
+ sec->size += (mmix_elf_section_data (sec)->pjs.n_pushj_relocs
+ * MAX_PUSHJ_STUB_SIZE);
/* For use in relocatable link, we start with a max stubs size. See
mmix_elf_relax_section. */
@@ -2451,11 +2437,8 @@ _bfd_mmix_after_linker_allocation (abfd, link_info)
n_gregs = gregdata->n_allocated_bpo_gregs;
- /* We need to have a _raw_size contents even though there's only
- _cooked_size worth of data, since the generic relocation machinery
- will allocate and copy that much temporarily. */
bpo_gregs_section->contents
- = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->_raw_size);
+ = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->size);
if (contents == NULL)
return FALSE;
@@ -2602,21 +2585,13 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
size_t pjsno = 0;
bfd *bpo_greg_owner;
Elf_Internal_Sym *isymbuf = NULL;
- bfd_size_type raw_size
- = (sec->_raw_size
- - mmix_elf_section_data (sec)->pjs.n_pushj_relocs
- * MAX_PUSHJ_STUB_SIZE);
+ bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size;
mmix_elf_section_data (sec)->pjs.stubs_size_sum = 0;
/* Assume nothing changes. */
*again = FALSE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0 && sec->_raw_size != 0)
- abort ();
-
/* We don't have to do anything if this section does not have relocs, or
if this is not a code section. */
if ((sec->flags & SEC_RELOC) == 0
@@ -2688,7 +2663,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
0,
bfd_arch_bits_per_address (abfd),
/* Output-stub location. */
- sec->output_section->_cooked_size
+ sec->output_section->rawsize
+ (mmix_elf_section_data (sec
->output_section)
->pjs.stubs_size_sum)
@@ -2781,7 +2756,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
bfd_vma stubaddr
= (sec->output_section->vma
+ sec->output_offset
- + raw_size
+ + size
+ mmix_elf_section_data (sec)->pjs.stubs_size_sum);
if ((value & 3) == 0
@@ -2892,7 +2867,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
*again = TRUE;
}
- bpo_gregs_section->_cooked_size = (regindex + 1) * 8;
+ bpo_gregs_section->size = (regindex + 1) * 8;
}
if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
@@ -2910,15 +2885,12 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
&& elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- if (sec->_cooked_size
- < raw_size + mmix_elf_section_data (sec)->pjs.stubs_size_sum)
+ if (sec->size < size + mmix_elf_section_data (sec)->pjs.stubs_size_sum)
abort ();
- if (sec->_cooked_size
- > raw_size + mmix_elf_section_data (sec)->pjs.stubs_size_sum)
+ if (sec->size > size + mmix_elf_section_data (sec)->pjs.stubs_size_sum)
{
- sec->_cooked_size
- = raw_size + mmix_elf_section_data (sec)->pjs.stubs_size_sum;
+ sec->size = size + mmix_elf_section_data (sec)->pjs.stubs_size_sum;
*again = TRUE;
}
@@ -2932,53 +2904,6 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
free (internal_relocs);
return FALSE;
}
-
-/* Because we set _raw_size to include the max size of pushj stubs,
- i.e. larger than the actual section input size (see
- mmix_set_relaxable_raw_size), we have to take care of that when reading
- the section. */
-
-static bfd_boolean
-mmix_elf_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- void *location;
- file_ptr offset;
- bfd_size_type count;
-{
- bfd_size_type raw_size
- = (section->_raw_size
- - mmix_elf_section_data (section)->pjs.n_pushj_relocs
- * MAX_PUSHJ_STUB_SIZE);
-
- if (offset + count > section->_raw_size)
- {
- abort();
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
- }
-
- /* Check bounds against the faked raw_size. */
- if (offset + count > raw_size)
- {
- /* Clear the part in the faked area. */
- memset (location + raw_size - offset, 0, count - (raw_size - offset));
-
- /* If there's no initial part within the "real" contents, we're
- done. */
- if ((bfd_size_type) offset >= raw_size)
- return TRUE;
-
- /* Else adjust the count and fall through to call the generic
- function. */
- count = raw_size - offset;
- }
-
- return
- _bfd_generic_get_section_contents (abfd, section, location, offset,
- count);
-}
-
#define ELF_ARCH bfd_arch_mmix
#define ELF_MACHINE_CODE EM_MMIX
@@ -3027,6 +2952,5 @@ mmix_elf_get_section_contents (abfd, section, location, offset, count)
#define bfd_elf64_new_section_hook mmix_elf_new_section_hook
#define bfd_elf64_bfd_final_link mmix_elf_final_link
#define bfd_elf64_bfd_relax_section mmix_elf_relax_section
-#define bfd_elf64_get_section_contents mmix_elf_get_section_contents
#include "elf64-target.h"
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index a0d81d0550e..b49b6137034 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -35,6 +35,8 @@
static bfd_reloc_status_type ppc64_elf_ha_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc64_elf_branch_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_brtaken_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_sectoff_reloc
@@ -49,7 +51,8 @@ static bfd_reloc_status_type ppc64_elf_toc64_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_unhandled_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-
+static bfd_vma opd_entry_value
+ (asection *, bfd_vma, asection **, bfd_vma *);
#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
#define TARGET_LITTLE_NAME "elf64-powerpcle"
@@ -76,6 +79,7 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#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 bfd_elf64_get_synthetic_symtab ppc64_elf_get_synthetic_symtab
#define elf_backend_object_p ppc64_elf_object_p
#define elf_backend_grok_prstatus ppc64_elf_grok_prstatus
@@ -83,6 +87,8 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#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_add_symbol_hook ppc64_elf_add_symbol_hook
+#define elf_backend_check_directives ppc64_elf_check_directives
+#define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup
#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
@@ -168,9 +174,17 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#define LIS_R0_0 0x3c000000 /* lis %r0,0 */
#define ORI_R0_R0_0 0x60000000 /* ori %r0,%r0,0 */
-/* Instructions to save and restore floating point regs. */
+/* Instructions used by the save and restore reg functions. */
+#define STD_R0_0R1 0xf8010000 /* std %r0,0(%r1) */
+#define STD_R0_0R12 0xf80c0000 /* std %r0,0(%r12) */
+#define LD_R0_0R1 0xe8010000 /* ld %r0,0(%r1) */
+#define LD_R0_0R12 0xe80c0000 /* ld %r0,0(%r12) */
#define STFD_FR0_0R1 0xd8010000 /* stfd %fr0,0(%r1) */
#define LFD_FR0_0R1 0xc8010000 /* lfd %fr0,0(%r1) */
+#define LI_R12_0 0x39800000 /* li %r12,0 */
+#define STVX_VR0_R12_R0 0x7c0c01ce /* stvx %v0,%r12,%r0 */
+#define LVX_VR0_R12_R0 0x7c0c00ce /* lvx %v0,%r12,%r0 */
+#define MTLR_R0 0x7c0803a6 /* mtlr %r0 */
#define BLR 0x4e800020 /* blr */
/* Since .opd is an array of descriptors and each entry will end up
@@ -303,7 +317,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_ADDR14", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -352,7 +366,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_REL24", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -367,7 +381,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_REL14", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -2131,6 +2145,29 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
}
static bfd_reloc_status_type
+ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
+{
+ if (output_bfd != NULL)
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+
+ if (strcmp (symbol->section->name, ".opd") == 0
+ && (symbol->section->owner->flags & DYNAMIC) == 0)
+ {
+ bfd_vma dest = opd_entry_value (symbol->section,
+ symbol->value + reloc_entry->addend,
+ NULL, NULL);
+ if (dest != (bfd_vma) -1)
+ reloc_entry->addend = dest - (symbol->value
+ + symbol->section->output_section->vma
+ + symbol->section->output_offset);
+ }
+ return bfd_reloc_continue;
+}
+
+static bfd_reloc_status_type
ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
void *data, asection *input_section,
bfd *output_bfd, char **error_message)
@@ -2166,7 +2203,7 @@ ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
else if ((insn & (0x14 << 21)) == (0x10 << 21))
insn |= 0x08 << 21;
else
- return bfd_reloc_continue;
+ goto out;
}
else
{
@@ -2188,7 +2225,9 @@ ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
insn ^= 0x01 << 21;
}
bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
- return bfd_reloc_continue;
+ out:
+ return ppc64_elf_branch_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
static bfd_reloc_status_type
@@ -2331,6 +2370,10 @@ struct ppc64_elf_obj_tdata
asection *got;
asection *relgot;
+ /* Used during garbage collection. We attach global symbols defined
+ on removed .opd entries to this section so that the sym is removed. */
+ asection *deleted_section;
+
/* TLS local dynamic got entry handling. Suppose for multiple GOT
sections means we potentially need one of these for each input bfd. */
union {
@@ -2357,6 +2400,17 @@ ppc64_elf_mkobject (bfd *abfd)
return TRUE;
}
+/* Return 1 if target is one of ours. */
+
+static bfd_boolean
+is_ppc64_elf_target (const struct bfd_target *targ)
+{
+ extern const bfd_target bfd_elf64_powerpc_vec;
+ extern const bfd_target bfd_elf64_powerpcle_vec;
+
+ return targ == &bfd_elf64_powerpc_vec || targ == &bfd_elf64_powerpcle_vec;
+}
+
/* Fix bad default arch selected for a 64 bit input bfd when the
default is 32 bit. */
@@ -2382,7 +2436,7 @@ ppc64_elf_object_p (bfd *abfd)
static bfd_boolean
ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
- size_t offset, raw_size;
+ size_t offset, size;
if (note->descsz != 504)
return FALSE;
@@ -2395,11 +2449,11 @@ ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 384;
+ size = 384;
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -2430,13 +2484,13 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
const char *msg;
if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system "
+ msg = _("%B: compiled for a big endian system "
"and target is little endian");
else
- msg = _("%s: compiled for a little endian system "
+ msg = _("%B: compiled for a little endian system "
"and target is big endian");
- (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
+ (*_bfd_error_handler) (msg, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2492,6 +2546,387 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
return _bfd_elf_new_section_hook (abfd, sec);
}
+
+static void *
+get_opd_info (asection * sec)
+{
+ if (sec != NULL
+ && ppc64_elf_section_data (sec) != NULL
+ && ppc64_elf_section_data (sec)->opd.adjust != NULL)
+ return ppc64_elf_section_data (sec)->opd.adjust;
+ return NULL;
+}
+
+/* Parameters for the qsort hook. */
+static asection *synthetic_opd;
+static bfd_boolean synthetic_relocatable;
+
+/* qsort comparison function for ppc64_elf_get_synthetic_symtab. */
+
+static int
+compare_symbols (const void *ap, const void *bp)
+{
+ const asymbol *a = * (const asymbol **) ap;
+ const asymbol *b = * (const asymbol **) bp;
+
+ /* Section symbols first. */
+ if ((a->flags & BSF_SECTION_SYM) && !(b->flags & BSF_SECTION_SYM))
+ return -1;
+ if (!(a->flags & BSF_SECTION_SYM) && (b->flags & BSF_SECTION_SYM))
+ return 1;
+
+ /* then .opd symbols. */
+ if (a->section == synthetic_opd && b->section != synthetic_opd)
+ return -1;
+ if (a->section != synthetic_opd && b->section == synthetic_opd)
+ return 1;
+
+ /* then other code symbols. */
+ if ((a->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ == (SEC_CODE | SEC_ALLOC)
+ && (b->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ return -1;
+
+ if ((a->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC)
+ && (b->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ == (SEC_CODE | SEC_ALLOC))
+ return 1;
+
+ if (synthetic_relocatable)
+ {
+ if (a->section->id < b->section->id)
+ return -1;
+
+ if (a->section->id > b->section->id)
+ return 1;
+ }
+
+ if (a->value + a->section->vma < b->value + b->section->vma)
+ return -1;
+
+ if (a->value + a->section->vma > b->value + b->section->vma)
+ return 1;
+
+ return 0;
+}
+
+/* Search SYMS for a symbol of the given VALUE. */
+
+static asymbol *
+sym_exists_at (asymbol **syms, long lo, long hi, int id, bfd_vma value)
+{
+ long mid;
+
+ if (id == -1)
+ {
+ while (lo < hi)
+ {
+ mid = (lo + hi) >> 1;
+ if (syms[mid]->value + syms[mid]->section->vma < value)
+ lo = mid + 1;
+ else if (syms[mid]->value + syms[mid]->section->vma > value)
+ hi = mid;
+ else
+ return syms[mid];
+ }
+ }
+ else
+ {
+ while (lo < hi)
+ {
+ mid = (lo + hi) >> 1;
+ if (syms[mid]->section->id < id)
+ lo = mid + 1;
+ else if (syms[mid]->section->id > id)
+ hi = mid;
+ else if (syms[mid]->value < value)
+ lo = mid + 1;
+ else if (syms[mid]->value > value)
+ hi = mid;
+ else
+ return syms[mid];
+ }
+ }
+ return NULL;
+}
+
+/* Create synthetic symbols, effectively restoring "dot-symbol" function
+ entry syms. */
+
+static long
+ppc64_elf_get_synthetic_symtab (bfd *abfd,
+ long static_count, asymbol **static_syms,
+ long dyn_count, asymbol **dyn_syms,
+ asymbol **ret)
+{
+ asymbol *s;
+ long i;
+ long count;
+ char *names;
+ long symcount, codesecsym, codesecsymend, secsymend, opdsymend;
+ asection *opd;
+ bfd_boolean relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
+ asymbol **syms;
+
+ *ret = NULL;
+
+ opd = bfd_get_section_by_name (abfd, ".opd");
+ if (opd == NULL)
+ return 0;
+
+ symcount = static_count;
+ if (!relocatable)
+ symcount += dyn_count;
+ if (symcount == 0)
+ return 0;
+
+ syms = bfd_malloc ((symcount + 1) * sizeof (*syms));
+ if (syms == NULL)
+ return 0;
+
+ if (!relocatable && static_count != 0 && dyn_count != 0)
+ {
+ /* Use both symbol tables. */
+ memcpy (syms, static_syms, static_count * sizeof (*syms));
+ memcpy (syms + static_count, dyn_syms, (dyn_count + 1) * sizeof (*syms));
+ }
+ else if (!relocatable && static_count == 0)
+ memcpy (syms, dyn_syms, (symcount + 1) * sizeof (*syms));
+ else
+ memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms));
+
+ synthetic_opd = opd;
+ synthetic_relocatable = relocatable;
+ qsort (syms, symcount, sizeof (*syms), compare_symbols);
+
+ if (!relocatable && symcount > 1)
+ {
+ long j;
+ /* Trim duplicate syms, since we may have merged the normal and
+ dynamic symbols. Actually, we only care about syms that have
+ different values, so trim any with the same value. */
+ for (i = 1, j = 1; i < symcount; ++i)
+ if (syms[i - 1]->value + syms[i - 1]->section->vma
+ != syms[i]->value + syms[i]->section->vma)
+ syms[j++] = syms[i];
+ symcount = j;
+ }
+
+ i = 0;
+ if (syms[i]->section == opd)
+ ++i;
+ codesecsym = i;
+
+ for (; i < symcount; ++i)
+ if (((syms[i]->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ || (syms[i]->flags & BSF_SECTION_SYM) == 0)
+ break;
+ codesecsymend = i;
+
+ for (; i < symcount; ++i)
+ if ((syms[i]->flags & BSF_SECTION_SYM) == 0)
+ break;
+ secsymend = i;
+
+ for (; i < symcount; ++i)
+ if (syms[i]->section != opd)
+ break;
+ opdsymend = i;
+
+ for (; i < symcount; ++i)
+ if ((syms[i]->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ break;
+ symcount = i;
+
+ count = 0;
+ if (opdsymend == secsymend)
+ goto done;
+
+ if (relocatable)
+ {
+ bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
+ arelent *r;
+ size_t size;
+ long relcount;
+
+ slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
+ relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
+
+ if (! relcount
+ || ! (*slurp_relocs) (abfd, opd, static_syms, FALSE))
+ goto done;
+
+ size = 0;
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
+ {
+ asymbol *sym;
+
+ while (r < opd->relocation + relcount
+ && r->address < syms[i]->value + opd->vma)
+ ++r;
+
+ if (r == opd->relocation + relcount)
+ break;
+
+ if (r->address != syms[i]->value + opd->vma)
+ continue;
+
+ if (r->howto->type != R_PPC64_ADDR64)
+ continue;
+
+ sym = *r->sym_ptr_ptr;
+ if (!sym_exists_at (syms, opdsymend, symcount,
+ sym->section->id, sym->value + r->addend))
+ {
+ ++count;
+ size += sizeof (asymbol);
+ size += strlen (syms[i]->name) + 2;
+ }
+ }
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ {
+ count = 0;
+ goto done;
+ }
+
+ names = (char *) (s + count);
+
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
+ {
+ asymbol *sym;
+
+ while (r < opd->relocation + relcount
+ && r->address < syms[i]->value + opd->vma)
+ ++r;
+
+ if (r == opd->relocation + relcount)
+ break;
+
+ if (r->address != syms[i]->value + opd->vma)
+ continue;
+
+ if (r->howto->type != R_PPC64_ADDR64)
+ continue;
+
+ sym = *r->sym_ptr_ptr;
+ if (!sym_exists_at (syms, opdsymend, symcount,
+ sym->section->id, sym->value + r->addend))
+ {
+ size_t len;
+
+ *s = *syms[i];
+ s->section = sym->section;
+ s->value = sym->value + r->addend;
+ s->name = names;
+ *names++ = '.';
+ len = strlen (syms[i]->name);
+ memcpy (names, syms[i]->name, len + 1);
+ names += len + 1;
+ s++;
+ }
+ }
+ }
+ else
+ {
+ bfd_byte *contents;
+ size_t size;
+
+ if (!bfd_malloc_and_get_section (abfd, opd, &contents))
+ {
+ if (contents)
+ {
+ free_contents_and_exit:
+ free (contents);
+ }
+ goto done;
+ }
+
+ size = 0;
+ for (i = secsymend; i < opdsymend; ++i)
+ {
+ bfd_vma ent;
+
+ ent = bfd_get_64 (abfd, contents + syms[i]->value);
+ if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
+ {
+ ++count;
+ size += sizeof (asymbol);
+ size += strlen (syms[i]->name) + 2;
+ }
+ }
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ {
+ count = 0;
+ goto free_contents_and_exit;
+ }
+
+ names = (char *) (s + count);
+
+ for (i = secsymend; i < opdsymend; ++i)
+ {
+ bfd_vma ent;
+
+ ent = bfd_get_64 (abfd, contents + syms[i]->value);
+ if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
+ {
+ long lo, hi;
+ size_t len;
+ asection *sec = abfd->sections;
+
+ *s = *syms[i];
+ lo = codesecsym;
+ hi = codesecsymend;
+ while (lo < hi)
+ {
+ long mid = (lo + hi) >> 1;
+ if (syms[mid]->section->vma < ent)
+ lo = mid + 1;
+ else if (syms[mid]->section->vma > ent)
+ hi = mid;
+ else
+ {
+ sec = syms[mid]->section;
+ break;
+ }
+ }
+
+ if (lo >= hi && lo > codesecsym)
+ sec = syms[lo - 1]->section;
+
+ for (; sec != NULL; sec = sec->next)
+ {
+ if (sec->vma > ent)
+ break;
+ if ((sec->flags & SEC_ALLOC) == 0
+ || (sec->flags & SEC_LOAD) == 0)
+ break;
+ if ((sec->flags & SEC_CODE) != 0)
+ s->section = sec;
+ }
+ s->value = ent - s->section->vma;
+ s->name = names;
+ *names++ = '.';
+ len = strlen (syms[i]->name);
+ memcpy (names, syms[i]->name, len + 1);
+ names += len + 1;
+ s++;
+ }
+ }
+ free (contents);
+ }
+
+ done:
+ free (syms);
+ return count;
+}
/* The following functions are specific to the ELF linker, while
functions above are used generally. Those named ppc64_elf_* are
@@ -2559,7 +2994,11 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
creating a shared library containing foo, we need to have both symbols
dynamic so that references to .foo are satisfied during the early
stages of linking. Otherwise the linker might decide to pull in a
- definition from some other object, eg. a static library. */
+ definition from some other object, eg. a static library.
+
+ Update: As of August 2004, we support a new convention. Function
+ calls may use the function descriptor symbol, ie. "bl foo". This
+ behaves exactly as "bl .foo". */
/* The linker needs to keep track of the number of relocs that it
decides to copy as dynamic relocs in check_relocs for each symbol.
@@ -2669,7 +3108,10 @@ struct plt_entry
. bctr
ppc_stub_plt_call:
- Used to call a function in a shared library.
+ Used to call a function in a shared library. If it so happens that
+ the plt entry referenced crosses a 64k boundary, then an extra
+ "addis %r12,%r12,1" will be inserted before the load at xxx+8 or
+ xxx+16 as appropriate.
. addis %r12,%r2,xxx@toc@ha
. std %r2,40(%r1)
. ld %r11,xxx+0@toc@l(%r12)
@@ -2758,16 +3200,20 @@ struct ppc_link_hash_entry
struct ppc_dyn_relocs *dyn_relocs;
/* Link between function code and descriptor symbols. */
- struct elf_link_hash_entry *oh;
+ struct ppc_link_hash_entry *oh;
/* Flag function code and descriptor symbols. */
unsigned int is_func:1;
unsigned int is_func_descriptor:1;
- unsigned int is_entry:1;
- /* Whether global opd sym has been adjusted or not. */
+ /* Whether global opd sym has been adjusted or not.
+ After ppc64_elf_edit_opd has run, this flag should be set for all
+ globals defined in any opd section. */
unsigned int adjust_done:1;
+ /* Set if we twiddled this symbol to weak at some stage. */
+ unsigned int was_undefined:1;
+
/* Contexts in which symbol is used in the GOT (or TOC).
TLS_GD .. TLS_EXPLICIT bits are or'd into the mask as the
corresponding relocs are encountered during check_relocs.
@@ -2816,10 +3262,6 @@ struct ppc_link_hash_table
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;
@@ -2843,24 +3285,28 @@ struct ppc_link_hash_table
asection *brlt;
asection *relbrlt;
- /* Shortcut to .__tls_get_addr. */
- struct elf_link_hash_entry *tls_get_addr;
+ /* Shortcut to .__tls_get_addr and __tls_get_addr. */
+ struct ppc_link_hash_entry *tls_get_addr;
+ struct ppc_link_hash_entry *tls_get_addr_fd;
/* Statistics. */
unsigned long stub_count[ppc_stub_plt_call];
+ /* Number of stubs against global syms. */
+ unsigned long stub_globals;
+
/* Set if we should emit symbols for stubs. */
- unsigned int emit_stub_syms;
+ unsigned int emit_stub_syms:1;
/* Set on error. */
- unsigned int stub_error;
+ unsigned int stub_error:1;
/* Flag set when small branches are detected. Used to
select suitable defaults for the stub group size. */
- unsigned int has_14bit_branch;
+ unsigned int has_14bit_branch:1;
- /* Set if we detect a reference undefined weak symbol. */
- unsigned int have_undefweak;
+ /* Temp used by ppc64_elf_check_directives. */
+ unsigned int twiddled_syms:1;
/* Incremented every time we size stubs. */
unsigned int stub_iteration;
@@ -2976,8 +3422,8 @@ link_hash_newfunc (struct bfd_hash_entry *entry,
eh->oh = NULL;
eh->is_func = 0;
eh->is_func_descriptor = 0;
- eh->is_entry = 0;
eh->adjust_done = 0;
+ eh->was_undefined = 0;
eh->tls_mask = 0;
}
@@ -3092,6 +3538,8 @@ ppc_stub_name (const asection *input_section,
(int) rel->r_addend & 0xffffffff);
}
}
+ if (stub_name[len - 2] == '+' && stub_name[len - 1] == '0')
+ stub_name[len - 2] = 0;
return stub_name;
}
@@ -3101,12 +3549,11 @@ ppc_stub_name (const asection *input_section,
static struct ppc_stub_hash_entry *
ppc_get_stub_entry (const asection *input_section,
const asection *sym_sec,
- struct elf_link_hash_entry *hash,
+ struct ppc_link_hash_entry *h,
const Elf_Internal_Rela *rel,
struct ppc_link_hash_table *htab)
{
struct ppc_stub_hash_entry *stub_entry;
- struct ppc_link_hash_entry *h = (struct ppc_link_hash_entry *) hash;
const asection *id_sec;
/* If this input section is part of a group of sections sharing one
@@ -3185,9 +3632,8 @@ ppc_add_stub (const char *stub_name,
TRUE, FALSE);
if (stub_entry == NULL)
{
- (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- bfd_archive_filename (section->owner),
- stub_name);
+ (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
+ section->owner, stub_name);
return NULL;
}
@@ -3232,7 +3678,7 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
|| ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
return FALSE;
- if (info->shared)
+ if (info->shared || info->emitrelocations)
{
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
@@ -3362,7 +3808,6 @@ ppc64_elf_copy_indirect_symbol
edir->is_func |= eind->is_func;
edir->is_func_descriptor |= eind->is_func_descriptor;
- edir->is_entry |= eind->is_entry;
edir->tls_mask |= eind->tls_mask;
mask = (ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR
@@ -3454,28 +3899,49 @@ ppc64_elf_copy_indirect_symbol
BFD_ASSERT (eind->elf.dynindx == -1);
}
-/* Set a flag, used by ppc64_elf_gc_mark_hook, on the entry symbol and
- symbols undefined on the command-line. */
+/* Find the function descriptor hash entry from the given function code
+ hash entry FH. Link the entries via their OH fields. */
-bfd_boolean
-ppc64_elf_mark_entry_syms (struct bfd_link_info *info)
+static struct ppc_link_hash_entry *
+get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab)
{
- struct ppc_link_hash_table *htab;
- struct bfd_sym_chain *sym;
+ struct ppc_link_hash_entry *fdh = fh->oh;
- htab = ppc_hash_table (info);
- for (sym = info->gc_sym_list; sym; sym = sym->next)
+ if (fdh == NULL)
{
- struct elf_link_hash_entry *h;
+ const char *fd_name = fh->elf.root.root.string + 1;
- h = elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, FALSE);
- if (h != NULL)
- ((struct ppc_link_hash_entry *) h)->is_entry = 1;
+ fdh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE);
+ if (fdh != NULL)
+ {
+ fdh->is_func_descriptor = 1;
+ fdh->oh = fh;
+ fh->is_func = 1;
+ fh->oh = fdh;
+ }
}
- return TRUE;
+
+ return fdh;
}
-/* Hack symbols defined in .opd sections to be function type. */
+/* Hacks to support old ABI code.
+ When making function calls, old ABI code references function entry
+ points (dot symbols), while new ABI code references the function
+ descriptor symbol. We need to make any combination of reference and
+ definition work together, without breaking archive linking.
+
+ For a defined function "foo" and an undefined call to "bar":
+ An old object defines "foo" and ".foo", references ".bar" (possibly
+ "bar" too).
+ A new object defines "foo" and references "bar".
+
+ A new object thus has no problem with its undefined symbols being
+ satisfied by definitions in an old object. On the other hand, the
+ old object won't have ".bar" satisfied by a new object. */
+
+/* Fix function descriptor symbols defined in .opd sections to be
+ function type. */
static bfd_boolean
ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
@@ -3486,11 +3952,141 @@ ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
asection **sec,
bfd_vma *value ATTRIBUTE_UNUSED)
{
- if (strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
+ if (*sec != NULL
+ && strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
isym->st_info = ELF_ST_INFO (ELF_ST_BIND (isym->st_info), STT_FUNC);
return TRUE;
}
+/* This function makes an old ABI object reference to ".bar" cause the
+ inclusion of a new ABI object archive that defines "bar". */
+
+static struct elf_link_hash_entry *
+ppc64_elf_archive_symbol_lookup (bfd *abfd,
+ struct bfd_link_info *info,
+ const char *name)
+{
+ struct elf_link_hash_entry *h;
+ char *dot_name;
+ size_t len;
+
+ h = _bfd_elf_archive_symbol_lookup (abfd, info, name);
+ if (h != NULL)
+ return h;
+
+ if (name[0] == '.')
+ return h;
+
+ len = strlen (name);
+ dot_name = bfd_alloc (abfd, len + 2);
+ if (dot_name == NULL)
+ return (struct elf_link_hash_entry *) 0 - 1;
+ dot_name[0] = '.';
+ memcpy (dot_name + 1, name, len + 1);
+ h = _bfd_elf_archive_symbol_lookup (abfd, info, dot_name);
+ bfd_release (abfd, dot_name);
+ return h;
+}
+
+/* This function satisfies all old ABI object references to ".bar" if a
+ new ABI object defines "bar". Well, at least, undefined dot symbols
+ are made weak. This stops later archive searches from including an
+ object if we already have a function descriptor definition. It also
+ prevents the linker complaining about undefined symbols.
+ We also check and correct mismatched symbol visibility here. The
+ most restrictive visibility of the function descriptor and the
+ function entry symbol is used. */
+
+static bfd_boolean
+add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
+{
+ struct bfd_link_info *info;
+ struct ppc_link_hash_table *htab;
+ struct ppc_link_hash_entry *eh;
+ struct ppc_link_hash_entry *fdh;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->root.root.string[0] != '.')
+ return TRUE;
+
+ info = inf;
+ htab = ppc_hash_table (info);
+ eh = (struct ppc_link_hash_entry *) h;
+ fdh = get_fdh (eh, htab);
+ if (fdh != NULL)
+ {
+ unsigned entry_vis = ELF_ST_VISIBILITY (eh->elf.other) - 1;
+ unsigned descr_vis = ELF_ST_VISIBILITY (fdh->elf.other) - 1;
+ if (entry_vis < descr_vis)
+ fdh->elf.other += entry_vis - descr_vis;
+ else if (entry_vis > descr_vis)
+ eh->elf.other += descr_vis - entry_vis;
+
+ if (eh->elf.root.type == bfd_link_hash_undefined)
+ {
+ eh->elf.root.type = bfd_link_hash_undefweak;
+ eh->was_undefined = 1;
+ htab->twiddled_syms = 1;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+ppc64_elf_check_directives (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
+{
+ struct ppc_link_hash_table *htab;
+
+ htab = ppc_hash_table (info);
+ if (!is_ppc64_elf_target (htab->elf.root.creator))
+ return TRUE;
+
+ elf_link_hash_traverse (&htab->elf, add_symbol_adjust, info);
+
+ /* We need to fix the undefs list for any syms we have twiddled to
+ undef_weak. */
+ if (htab->twiddled_syms)
+ {
+ struct bfd_link_hash_entry **pun;
+
+ pun = &htab->elf.root.undefs;
+ while (*pun != NULL)
+ {
+ struct bfd_link_hash_entry *h = *pun;
+
+ if (h->type != bfd_link_hash_undefined
+ && h->type != bfd_link_hash_common)
+ {
+ *pun = h->und_next;
+ h->und_next = NULL;
+ if (h == htab->elf.root.undefs_tail)
+ {
+ if (pun == &htab->elf.root.undefs)
+ htab->elf.root.undefs_tail = NULL;
+ else
+ /* pun points at an und_next field. Go back to
+ the start of the link_hash_entry. */
+ htab->elf.root.undefs_tail = (struct bfd_link_hash_entry *)
+ ((char *) pun - ((char *) &h->und_next - (char *) h));
+ break;
+ }
+ }
+ else
+ pun = &h->und_next;
+ }
+
+ htab->twiddled_syms = 0;
+ }
+ return TRUE;
+}
+
static bfd_boolean
update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
unsigned long r_symndx, bfd_vma r_addend, int tls_type)
@@ -3564,31 +4160,6 @@ update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend)
return TRUE;
}
-/* Find the function descriptor hash entry from the given function code
- hash entry FH. Link the entries via their OH fields. */
-static struct ppc_link_hash_entry *
-get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab)
-{
- struct ppc_link_hash_entry *fdh = (struct ppc_link_hash_entry *) fh->oh;
-
- if (fdh == NULL)
- {
- const char *fd_name = fh->elf.root.root.string + 1;
-
- fdh = (struct ppc_link_hash_entry *)
- elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE);
- if (fdh != NULL)
- {
- fdh->is_func_descriptor = 1;
- fdh->oh = &fh->elf;
- fh->is_func = 1;
- fh->oh = &fdh->elf;
- }
- }
-
- return fdh;
-}
-
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
@@ -3644,7 +4215,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
};
bfd_size_type amt;
- amt = sec->_raw_size * sizeof (union opd_info) / 24;
+ amt = sec->size * sizeof (union opd_info) / 8;
opd_sym_map = bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
@@ -3826,23 +4397,30 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Fall through. */
case R_PPC64_REL24:
- if (h != NULL
- && h->root.root.string[0] == '.'
- && h->root.root.string[1] != 0)
+ if (h != NULL)
{
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
rel->r_addend))
return FALSE;
- if (h == htab->tls_get_addr)
+ if (h == &htab->tls_get_addr->elf
+ || h == &htab->tls_get_addr_fd->elf)
sec->has_tls_reloc = 1;
- else if ((strncmp (h->root.root.string, ".__tls_get_addr", 15)
- == 0)
+ else if (htab->tls_get_addr == NULL
+ && !strncmp (h->root.root.string, ".__tls_get_addr", 15)
&& (h->root.root.string[15] == 0
|| h->root.root.string[15] == '@'))
{
- htab->tls_get_addr = h;
+ htab->tls_get_addr = (struct ppc_link_hash_entry *) h;
+ sec->has_tls_reloc = 1;
+ }
+ else if (htab->tls_get_addr_fd == NULL
+ && !strncmp (h->root.root.string, "__tls_get_addr", 14)
+ && (h->root.root.string[14] == 0
+ || h->root.root.string[14] == '@'))
+ {
+ htab->tls_get_addr_fd = (struct ppc_link_hash_entry *) h;
sec->has_tls_reloc = 1;
}
}
@@ -3888,7 +4466,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (ppc64_elf_section_data (sec)->t_symndx == NULL)
{
/* One extra to simplify get_tls_mask. */
- bfd_size_type amt = sec->_raw_size * sizeof (unsigned) / 8 + 1;
+ bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1;
ppc64_elf_section_data (sec)->t_symndx = bfd_zalloc (abfd, amt);
if (ppc64_elf_section_data (sec)->t_symndx == NULL)
return FALSE;
@@ -3923,24 +4501,29 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_ADDR64:
if (opd_sym_map != NULL
- && h != NULL
- && h->root.root.string[0] == '.'
- && h->root.root.string[1] != 0)
- get_fdh ((struct ppc_link_hash_entry *) h, htab);
-
- if (opd_sym_map != NULL
- && h == NULL
&& rel + 1 < rel_end
&& ELF64_R_TYPE ((rel + 1)->r_info) == R_PPC64_TOC)
{
- asection *s;
+ if (h != NULL)
+ {
+ if (h->root.root.string[0] == '.'
+ && h->root.root.string[1] != 0
+ && get_fdh ((struct ppc_link_hash_entry *) h, htab))
+ ;
+ else
+ ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ }
+ else
+ {
+ asection *s;
- s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
- r_symndx);
- if (s == NULL)
- return FALSE;
- else if (s != sec)
- opd_sym_map[rel->r_offset / 24] = s;
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
+ r_symndx);
+ if (s == NULL)
+ return FALSE;
+ else if (s != sec)
+ opd_sym_map[rel->r_offset / 8] = s;
+ }
}
/* Fall through. */
@@ -4033,8 +4616,8 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
}
@@ -4106,22 +4689,157 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+/* OFFSET in OPD_SEC specifies a function descriptor. Return the address
+ of the code entry point, and its section. */
+
+static bfd_vma
+opd_entry_value (asection *opd_sec,
+ bfd_vma offset,
+ asection **code_sec,
+ bfd_vma *code_off)
+{
+ bfd *opd_bfd = opd_sec->owner;
+ Elf_Internal_Rela *lo, *hi, *look;
+
+ /* Go find the opd reloc at the sym address. */
+ lo = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, TRUE);
+ BFD_ASSERT (lo != NULL);
+ hi = lo + opd_sec->reloc_count - 1; /* ignore last reloc */
+
+ while (lo < hi)
+ {
+ look = lo + (hi - lo) / 2;
+ if (look->r_offset < offset)
+ lo = look + 1;
+ else if (look->r_offset > offset)
+ hi = look;
+ else
+ {
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (opd_bfd)->symtab_hdr;
+ if (ELF64_R_TYPE (look->r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE ((look + 1)->r_info) == R_PPC64_TOC)
+ {
+ unsigned long symndx = ELF64_R_SYM (look->r_info);
+ bfd_vma val;
+ asection *sec;
+
+ if (symndx < symtab_hdr->sh_info)
+ {
+ Elf_Internal_Sym *sym;
+
+ sym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (sym == NULL)
+ {
+ sym = bfd_elf_get_elf_syms (opd_bfd, symtab_hdr,
+ symtab_hdr->sh_info,
+ 0, NULL, NULL, NULL);
+ if (sym == NULL)
+ return (bfd_vma) -1;
+ symtab_hdr->contents = (bfd_byte *) sym;
+ }
+
+ sym += symndx;
+ val = sym->st_value;
+ sec = NULL;
+ if ((sym->st_shndx != SHN_UNDEF
+ && sym->st_shndx < SHN_LORESERVE)
+ || sym->st_shndx > SHN_HIRESERVE)
+ sec = bfd_section_from_elf_index (opd_bfd, sym->st_shndx);
+ BFD_ASSERT ((sec->flags & SEC_MERGE) == 0);
+ }
+ else
+ {
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry *rh;
+
+ sym_hashes = elf_sym_hashes (opd_bfd);
+ rh = sym_hashes[symndx - symtab_hdr->sh_info];
+ while (rh->root.type == bfd_link_hash_indirect
+ || rh->root.type == bfd_link_hash_warning)
+ rh = ((struct elf_link_hash_entry *) rh->root.u.i.link);
+ BFD_ASSERT (rh->root.type == bfd_link_hash_defined
+ || rh->root.type == bfd_link_hash_defweak);
+ val = rh->root.u.def.value;
+ sec = rh->root.u.def.section;
+ }
+ val += look->r_addend;
+ if (code_off != NULL)
+ *code_off = val;
+ if (code_sec != NULL)
+ *code_sec = sec;
+ if (sec != NULL && sec->output_section != NULL)
+ val += sec->output_section->vma + sec->output_offset;
+ return val;
+ }
+ break;
+ }
+ }
+ return (bfd_vma) -1;
+}
+
/* Return the section that should be marked against GC for a given
relocation. */
static asection *
ppc64_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- asection *rsec = NULL;
+ asection *rsec;
+
+ /* First mark all our entry sym sections. */
+ if (info->gc_sym_list != NULL)
+ {
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ struct bfd_sym_chain *sym = info->gc_sym_list;
+
+ info->gc_sym_list = NULL;
+ do
+ {
+ struct ppc_link_hash_entry *eh;
+
+ eh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, FALSE);
+ if (eh == NULL)
+ continue;
+ if (eh->elf.root.type != bfd_link_hash_defined
+ && eh->elf.root.type != bfd_link_hash_defweak)
+ continue;
+
+ if (eh->is_func_descriptor)
+ rsec = eh->oh->elf.root.u.def.section;
+ else if (get_opd_info (eh->elf.root.u.def.section) != NULL
+ && opd_entry_value (eh->elf.root.u.def.section,
+ eh->elf.root.u.def.value,
+ &rsec, NULL) != (bfd_vma) -1)
+ ;
+ else
+ continue;
+
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+
+ rsec = eh->elf.root.u.def.section;
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+
+ sym = sym->next;
+ }
+ while (sym != NULL);
+ }
+
+ /* Syms return NULL if we're marking .opd, so we avoid marking all
+ function sections, as all functions are referenced in .opd. */
+ rsec = NULL;
+ if (get_opd_info (sec) != NULL)
+ return rsec;
if (h != NULL)
{
enum elf_ppc64_reloc_type r_type;
- struct ppc_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *eh;
r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
@@ -4135,20 +4853,31 @@ ppc64_elf_gc_mark_hook (asection *sec,
{
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
- fdh = (struct ppc_link_hash_entry *) h;
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->oh != NULL && eh->oh->is_func_descriptor)
+ eh = eh->oh;
/* Function descriptor syms cause the associated
function code sym section to be marked. */
- if (fdh->is_func_descriptor)
- rsec = fdh->oh->root.u.def.section;
-
- /* Function entry syms return NULL if they are in .opd
- and are not ._start (or others undefined on the ld
- command line). Thus we avoid marking all function
- sections, as all functions are referenced in .opd. */
- else if ((fdh->oh != NULL
- && ((struct ppc_link_hash_entry *) fdh->oh)->is_entry)
- || ppc64_elf_section_data (sec)->opd.func_sec == NULL)
+ if (eh->is_func_descriptor)
+ {
+ /* They also mark their opd section. */
+ if (!eh->elf.root.u.def.section->gc_mark)
+ _bfd_elf_gc_mark (info, eh->elf.root.u.def.section,
+ ppc64_elf_gc_mark_hook);
+
+ rsec = eh->oh->elf.root.u.def.section;
+ }
+ else if (get_opd_info (eh->elf.root.u.def.section) != NULL
+ && opd_entry_value (eh->elf.root.u.def.section,
+ eh->elf.root.u.def.value,
+ &rsec, NULL) != (bfd_vma) -1)
+ {
+ if (!eh->elf.root.u.def.section->gc_mark)
+ _bfd_elf_gc_mark (info, eh->elf.root.u.def.section,
+ ppc64_elf_gc_mark_hook);
+ }
+ else
rsec = h->root.u.def.section;
break;
@@ -4166,11 +4895,14 @@ ppc64_elf_gc_mark_hook (asection *sec,
asection **opd_sym_section;
rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- opd_sym_section = ppc64_elf_section_data (rsec)->opd.func_sec;
+ opd_sym_section = get_opd_info (rsec);
if (opd_sym_section != NULL)
- rsec = opd_sym_section[sym->st_value / 24];
- else if (ppc64_elf_section_data (sec)->opd.func_sec != NULL)
- rsec = NULL;
+ {
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+
+ rsec = opd_sym_section[sym->st_value / 8];
+ }
}
return rsec;
@@ -4315,9 +5047,235 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+/* The maximum size of .sfpr. */
+#define SFPR_MAX (218*4)
+
+struct sfpr_def_parms
+{
+ const char name[12];
+ unsigned char lo, hi;
+ bfd_byte * (*write_ent) (bfd *, bfd_byte *, int);
+ bfd_byte * (*write_tail) (bfd *, bfd_byte *, int);
+};
+
+/* Auto-generate _save*, _rest* functions in .sfpr. */
+
+static unsigned int
+sfpr_define (struct bfd_link_info *info, const struct sfpr_def_parms *parm)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ unsigned int i;
+ size_t len = strlen (parm->name);
+ bfd_boolean writing = FALSE;
+ char sym[16];
+
+ memcpy (sym, parm->name, len);
+ sym[len + 2] = 0;
+
+ for (i = parm->lo; i <= parm->hi; i++)
+ {
+ struct elf_link_hash_entry *h;
+
+ sym[len + 0] = i / 10 + '0';
+ sym[len + 1] = i % 10 + '0';
+ h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
+ if (h != NULL
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = htab->sfpr;
+ h->root.u.def.value = htab->sfpr->size;
+ h->type = STT_FUNC;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
+ writing = TRUE;
+ if (htab->sfpr->contents == NULL)
+ {
+ htab->sfpr->contents = bfd_alloc (htab->elf.dynobj, SFPR_MAX);
+ if (htab->sfpr->contents == NULL)
+ return FALSE;
+ }
+ }
+ if (writing)
+ {
+ bfd_byte *p = htab->sfpr->contents + htab->sfpr->size;
+ if (i != parm->hi)
+ p = (*parm->write_ent) (htab->elf.dynobj, p, i);
+ else
+ p = (*parm->write_tail) (htab->elf.dynobj, p, i);
+ htab->sfpr->size = p - htab->sfpr->contents;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_byte *
+savegpr0 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savegpr0 (abfd, p, r);
+ bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr0 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
+ p = p + 4;
+ p = restgpr0 (abfd, p, r);
+ bfd_put_32 (abfd, MTLR_R0, p);
+ p = p + 4;
+ if (r == 29)
+ {
+ p = restgpr0 (abfd, p, 30);
+ p = restgpr0 (abfd, p, 31);
+ }
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr1 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savegpr1 (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr1 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restgpr1 (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savefpr (abfd, p, r);
+ bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
+ p = p + 4;
+ p = restfpr (abfd, p, r);
+ bfd_put_32 (abfd, MTLR_R0, p);
+ p = p + 4;
+ if (r == 29)
+ {
+ p = restfpr (abfd, p, 30);
+ p = restfpr (abfd, p, 31);
+ }
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savefpr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restfpr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savevr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, STVX_VR0_R12_R0 + (r << 21), p);
+ return p + 4;
+}
+
+static bfd_byte *
+savevr_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savevr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restvr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, LVX_VR0_R12_R0 + (r << 21), p);
+ return p + 4;
+}
+
+static bfd_byte *
+restvr_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restvr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
/* Called via elf_link_hash_traverse to transfer dynamic linking
information on function code symbol entries to their corresponding
function descriptor symbol entries. */
+
static bfd_boolean
func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
{
@@ -4338,15 +5296,29 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
info = inf;
htab = ppc_hash_table (info);
+ /* Resolve undefined references to dot-symbols as the value
+ in the function descriptor, if we have one in a regular object.
+ This is to satisfy cases like ".quad .foo". Calls to functions
+ in dynamic objects are handled elsewhere. */
+ if (fh->elf.root.type == bfd_link_hash_undefweak
+ && fh->was_undefined
+ && (fh->oh->elf.root.type == bfd_link_hash_defined
+ || fh->oh->elf.root.type == bfd_link_hash_defweak)
+ && get_opd_info (fh->oh->elf.root.u.def.section) != NULL
+ && opd_entry_value (fh->oh->elf.root.u.def.section,
+ fh->oh->elf.root.u.def.value,
+ &fh->elf.root.u.def.section,
+ &fh->elf.root.u.def.value) != (bfd_vma) -1)
+ {
+ fh->elf.root.type = fh->oh->elf.root.type;
+ fh->elf.elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ }
+
/* If this is a function code symbol, transfer dynamic linking
information to the function descriptor symbol. */
if (!fh->is_func)
return TRUE;
- if (fh->elf.root.type == bfd_link_hash_undefweak
- && (fh->elf.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR))
- htab->have_undefweak = TRUE;
-
for (ent = fh->elf.plt.plist; ent != NULL; ent = ent->next)
if (ent->plt.refcount > 0)
break;
@@ -4413,12 +5385,16 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
| ELF_LINK_NON_GOT_REF));
if (ELF_ST_VISIBILITY (fh->elf.other) == STV_DEFAULT)
{
- fdh->elf.plt.plist = fh->elf.plt.plist;
+ struct plt_entry **ep = &fdh->elf.plt.plist;
+ while (*ep != NULL)
+ ep = &(*ep)->next;
+ *ep = fh->elf.plt.plist;
+ fh->elf.plt.plist = NULL;
fdh->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
}
fdh->is_func_descriptor = 1;
- fdh->oh = &fh->elf;
- fh->oh = &fdh->elf;
+ fdh->oh = fh;
+ fh->oh = fdh;
}
/* Now that the info is on the function descriptor, clear the
@@ -4439,119 +5415,48 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
return TRUE;
}
-#define MIN_SAVE_FPR 14
-#define MAX_SAVE_FPR 31
-
/* Called near the start of bfd_elf_size_dynamic_sections. We use
this hook to a) provide some gcc support functions, and b) transfer
dynamic linking information gathered so far on function code symbol
entries, to their corresponding function descriptor symbol entries. */
+
static bfd_boolean
ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
- unsigned int lowest_savef = MAX_SAVE_FPR + 2;
- unsigned int lowest_restf = MAX_SAVE_FPR + 2;
unsigned int i;
- struct elf_link_hash_entry *h;
- bfd_byte *p;
- char sym[10];
+ const struct sfpr_def_parms funcs[] =
+ {
+ { "_savegpr0_", 14, 31, savegpr0, savegpr0_tail },
+ { "_restgpr0_", 14, 29, restgpr0, restgpr0_tail },
+ { "_restgpr0_", 30, 31, restgpr0, restgpr0_tail },
+ { "_savegpr1_", 14, 31, savegpr1, savegpr1_tail },
+ { "_restgpr1_", 14, 31, restgpr1, restgpr1_tail },
+ { "_savefpr_", 14, 31, savefpr, savefpr0_tail },
+ { "_restfpr_", 14, 29, restfpr, restfpr0_tail },
+ { "_restfpr_", 30, 31, restfpr, restfpr0_tail },
+ { "._savef", 14, 31, savefpr, savefpr1_tail },
+ { "._restf", 14, 31, restfpr, restfpr1_tail },
+ { "_savevr_", 20, 31, savevr, savevr_tail },
+ { "_restvr_", 20, 31, restvr, restvr_tail }
+ };
htab = ppc_hash_table (info);
-
if (htab->sfpr == NULL)
/* We don't have any relocs. */
return TRUE;
- /* First provide any missing ._savef* and ._restf* functions. */
- memcpy (sym, "._savef14", 10);
- for (i = MIN_SAVE_FPR; i <= MAX_SAVE_FPR; i++)
- {
- sym[7] = i / 10 + '0';
- sym[8] = i % 10 + '0';
- h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
- if (h != NULL
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- if (lowest_savef > i)
- lowest_savef = i;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = htab->sfpr;
- h->root.u.def.value = (i - lowest_savef) * 4;
- h->type = STT_FUNC;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
- }
- }
-
- memcpy (sym, "._restf14", 10);
- for (i = MIN_SAVE_FPR; i <= MAX_SAVE_FPR; i++)
- {
- sym[7] = i / 10 + '0';
- sym[8] = i % 10 + '0';
- h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
- if (h != NULL
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- if (lowest_restf > i)
- lowest_restf = i;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = htab->sfpr;
- h->root.u.def.value = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4
- + (i - lowest_restf) * 4);
- h->type = STT_FUNC;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
- }
- }
+ /* Provide any missing _save* and _rest* functions. */
+ htab->sfpr->size = 0;
+ for (i = 0; i < sizeof (funcs) / sizeof (funcs[0]); i++)
+ if (!sfpr_define (info, &funcs[i]))
+ return FALSE;
elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
- htab->sfpr->_raw_size = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4
- + (MAX_SAVE_FPR + 2 - lowest_restf) * 4);
-
- if (htab->sfpr->_raw_size == 0)
- {
- if (!htab->have_undefweak)
- {
- _bfd_strip_section_from_output (info, htab->sfpr);
- return TRUE;
- }
-
- htab->sfpr->_raw_size = 4;
- }
-
- p = bfd_alloc (htab->elf.dynobj, htab->sfpr->_raw_size);
- if (p == NULL)
- return FALSE;
- htab->sfpr->contents = p;
-
- for (i = lowest_savef; i <= MAX_SAVE_FPR; i++)
- {
- unsigned int fpr = i << 21;
- unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8;
- bfd_put_32 (htab->elf.dynobj, STFD_FR0_0R1 + fpr + stackoff, p);
- p += 4;
- }
- if (lowest_savef <= MAX_SAVE_FPR)
- {
- bfd_put_32 (htab->elf.dynobj, BLR, p);
- p += 4;
- }
-
- for (i = lowest_restf; i <= MAX_SAVE_FPR; i++)
- {
- unsigned int fpr = i << 21;
- unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8;
- bfd_put_32 (htab->elf.dynobj, LFD_FR0_0R1 + fpr + stackoff, p);
- p += 4;
- }
- if (lowest_restf <= MAX_SAVE_FPR
- || htab->sfpr->_raw_size == 4)
- {
- bfd_put_32 (htab->elf.dynobj, BLR, p);
- }
+ if (htab->sfpr->size == 0)
+ _bfd_strip_section_from_output (info, htab->sfpr);
return TRUE;
}
@@ -4582,8 +5487,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
for (ent = h->plt.plist; ent != NULL; ent = ent->next)
if (ent->plt.refcount > 0)
break;
- if (!((struct ppc_link_hash_entry *) h)->is_func_descriptor
- || ent == NULL
+ if (ent == NULL
|| SYMBOL_CALLS_LOCAL (info, h)
|| (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak))
@@ -4677,7 +5581,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
.rela.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->relbss->_raw_size += sizeof (Elf64_External_Rela);
+ htab->relbss->size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -4689,7 +5593,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->dynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -4698,10 +5602,10 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -4713,11 +5617,13 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h,
bfd_boolean force_local)
{
+ struct ppc_link_hash_entry *eh;
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
- if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->is_func_descriptor)
{
- struct elf_link_hash_entry *fh = ((struct ppc_link_hash_entry *) h)->oh;
+ struct ppc_link_hash_entry *fh = eh->oh;
if (fh == NULL)
{
@@ -4731,14 +5637,15 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
when it runs out of memory. This function doesn't have a
return status, so there's no way to gracefully return an
error. So cheat. We know that string[-1] can be safely
- dereferenced; It's either a string in an ELF string
- table, or allocated in an objalloc structure. */
+ accessed; It's either a string in an ELF string table,
+ or allocated in an objalloc structure. */
- p = h->root.root.string - 1;
+ p = eh->elf.root.root.string - 1;
save = *p;
*(char *) p = '.';
htab = ppc_hash_table (info);
- fh = elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ fh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
*(char *) p = save;
/* Unfortunately, if it so happens that the string we were
@@ -4747,27 +5654,32 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
reason the lookup should fail. */
if (fh == NULL)
{
- q = h->root.root.string + strlen (h->root.root.string);
- while (q >= h->root.root.string && *q == *p)
+ q = eh->elf.root.root.string + strlen (eh->elf.root.root.string);
+ while (q >= eh->elf.root.root.string && *q == *p)
--q, --p;
- if (q < h->root.root.string && *p == '.')
- fh = elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ if (q < eh->elf.root.root.string && *p == '.')
+ fh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
}
if (fh != NULL)
{
- ((struct ppc_link_hash_entry *) h)->oh = fh;
- ((struct ppc_link_hash_entry *) fh)->oh = h;
+ eh->oh = fh;
+ fh->oh = eh;
}
}
if (fh != NULL)
- _bfd_elf_link_hash_hide_symbol (info, fh, force_local);
+ _bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
}
}
static bfd_boolean
-get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp,
- asection **symsecp, char **tls_maskp, Elf_Internal_Sym **locsymsp,
- unsigned long r_symndx, bfd *ibfd)
+get_sym_h (struct elf_link_hash_entry **hp,
+ Elf_Internal_Sym **symp,
+ asection **symsecp,
+ char **tls_maskp,
+ Elf_Internal_Sym **locsymsp,
+ unsigned long r_symndx,
+ bfd *ibfd)
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
@@ -4907,8 +5819,7 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
}
/* Adjust all global syms defined in opd sections. In gcc generated
- code these will already have been done, but I suppose we have to
- cater for all sorts of hand written assembly. */
+ code for the old ABI, these will already have been done. */
static bfd_boolean
adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
@@ -4932,11 +5843,28 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
return TRUE;
sym_sec = eh->elf.root.u.def.section;
- if (sym_sec != NULL
- && elf_section_data (sym_sec) != NULL
- && (opd_adjust = ppc64_elf_section_data (sym_sec)->opd.adjust) != NULL)
+ opd_adjust = get_opd_info (sym_sec);
+ if (opd_adjust != NULL)
{
- eh->elf.root.u.def.value += opd_adjust[eh->elf.root.u.def.value / 24];
+ long adjust = opd_adjust[eh->elf.root.u.def.value / 8];
+ if (adjust == -1)
+ {
+ /* This entry has been deleted. */
+ asection *dsec = ppc64_elf_tdata (sym_sec->owner)->deleted_section;
+ if (dsec == NULL)
+ {
+ for (dsec = sym_sec->owner->sections; dsec; dsec = dsec->next)
+ if (elf_discarded_section (dsec))
+ {
+ ppc64_elf_tdata (sym_sec->owner)->deleted_section = dsec;
+ break;
+ }
+ }
+ eh->elf.root.u.def.value = 0;
+ eh->elf.root.u.def.section = dsec;
+ }
+ else
+ eh->elf.root.u.def.value += adjust;
eh->adjust_done = 1;
}
return TRUE;
@@ -4949,10 +5877,12 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
applications. */
bfd_boolean
-ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
+ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
+ bfd_boolean non_overlapping)
{
bfd *ibfd;
bfd_boolean some_edited = FALSE;
+ asection *need_pad = NULL;
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
@@ -4963,23 +5893,24 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
struct elf_link_hash_entry **sym_hashes;
bfd_vma offset;
bfd_size_type amt;
- long *adjust;
- bfd_boolean need_edit;
+ long *opd_adjust;
+ bfd_boolean need_edit, add_aux_fields;
+ bfd_size_type cnt_16b = 0;
sec = bfd_get_section_by_name (ibfd, ".opd");
if (sec == NULL)
continue;
- amt = sec->_raw_size * sizeof (long) / 24;
- adjust = ppc64_elf_section_data (sec)->opd.adjust;
- if (adjust == NULL)
+ amt = sec->size * sizeof (long) / 8;
+ opd_adjust = get_opd_info (sec);
+ if (opd_adjust == NULL)
{
/* Must be a ld -r link. ie. check_relocs hasn't been
called. */
- adjust = bfd_zalloc (obfd, amt);
- ppc64_elf_section_data (sec)->opd.adjust = adjust;
+ opd_adjust = bfd_zalloc (obfd, amt);
+ ppc64_elf_section_data (sec)->opd.adjust = opd_adjust;
}
- memset (adjust, 0, amt);
+ memset (opd_adjust, 0, amt);
if (sec->output_section == bfd_abs_section_ptr)
continue;
@@ -5001,6 +5932,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
/* First run through the relocs to check they are sane, and to
determine whether we need to edit this opd section. */
need_edit = FALSE;
+ need_pad = sec;
offset = 0;
relend = relstart + sec->reloc_count;
for (rel = relstart; rel < relend; )
@@ -5011,7 +5943,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
- /* .opd contains a regular array of 24 byte entries. We're
+ /* .opd contains a regular array of 16 or 24 byte entries. We're
only interested in the reloc pointing to a function entry
point. */
if (rel->r_offset != offset
@@ -5023,9 +5955,9 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
Also, there's nothing to prevent someone putting
something silly in .opd with the assembler. No .opd
optimization for them! */
+ broken_opd:
(*_bfd_error_handler)
- (_("%s: .opd is not a regular array of opd entries"),
- bfd_archive_filename (ibfd));
+ (_("%B: .opd is not a regular array of opd entries"), ibfd);
need_edit = FALSE;
break;
}
@@ -5034,8 +5966,8 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
|| (r_type = ELF64_R_TYPE ((rel + 1)->r_info)) != R_PPC64_TOC)
{
(*_bfd_error_handler)
- (_("%s: unexpected reloc type %u in .opd section"),
- bfd_archive_filename (ibfd), r_type);
+ (_("%B: unexpected reloc type %u in .opd section"),
+ ibfd, r_type);
need_edit = FALSE;
break;
}
@@ -5054,9 +5986,8 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
sym_name = bfd_elf_local_sym_name (ibfd, sym);
(*_bfd_error_handler)
- (_("%s: undefined sym `%s' in .opd section"),
- bfd_archive_filename (ibfd),
- sym_name);
+ (_("%B: undefined sym `%s' in .opd section"),
+ ibfd, sym_name);
need_edit = FALSE;
break;
}
@@ -5072,19 +6003,54 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
|| sym_sec->output_section == bfd_abs_section_ptr)
need_edit = TRUE;
- offset += 24;
rel += 2;
- /* Allow for the possibility of a reloc on the third word. */
- if (rel < relend
- && rel->r_offset == offset - 8)
- rel += 1;
+ if (rel == relend
+ || (rel + 1 == relend && rel->r_offset == offset + 16))
+ {
+ if (sec->size == offset + 24)
+ {
+ need_pad = NULL;
+ break;
+ }
+ if (rel == relend && sec->size == offset + 16)
+ {
+ cnt_16b++;
+ break;
+ }
+ goto broken_opd;
+ }
+
+ if (rel->r_offset == offset + 24)
+ offset += 24;
+ else if (rel->r_offset != offset + 16)
+ goto broken_opd;
+ else if (rel + 1 < relend
+ && ELF64_R_TYPE (rel[0].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOC)
+ {
+ offset += 16;
+ cnt_16b++;
+ }
+ else if (rel + 2 < relend
+ && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_TOC)
+ {
+ offset += 24;
+ rel += 1;
+ }
+ else
+ goto broken_opd;
}
- if (need_edit)
+ add_aux_fields = non_overlapping && cnt_16b > 0;
+
+ if (need_edit || add_aux_fields)
{
Elf_Internal_Rela *write_rel;
bfd_byte *rptr, *wptr;
+ bfd_byte *new_contents = NULL;
bfd_boolean skip;
+ long opd_ent_size;
/* This seems a waste of time as input .opd sections are all
zeros as generated by gcc, but I suppose there's no reason
@@ -5092,11 +6058,11 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
the third word of .opd entries. */
if ((sec->flags & SEC_IN_MEMORY) == 0)
{
- bfd_byte *loc = bfd_alloc (ibfd, sec->_raw_size);
- if (loc == NULL
- || !bfd_get_section_contents (ibfd, sec, loc, 0,
- sec->_raw_size))
+ bfd_byte *loc;
+ if (!bfd_malloc_and_get_section (ibfd, sec, &loc))
{
+ if (loc != NULL)
+ free (loc);
error_ret:
if (local_syms != NULL
&& symtab_hdr->contents != (unsigned char *) local_syms)
@@ -5113,9 +6079,21 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
wptr = sec->contents;
rptr = sec->contents;
+ new_contents = sec->contents;
+
+ if (add_aux_fields)
+ {
+ new_contents = bfd_malloc (sec->size + cnt_16b * 8);
+ if (new_contents == NULL)
+ return FALSE;
+ need_pad = FALSE;
+ wptr = new_contents;
+ }
+
write_rel = relstart;
skip = FALSE;
offset = 0;
+ opd_ent_size = 0;
for (rel = relstart; rel < relend; rel++)
{
unsigned long r_symndx;
@@ -5131,7 +6109,21 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
if (rel->r_offset == offset)
{
struct ppc_link_hash_entry *fdh = NULL;
- if (h != NULL)
+
+ /* See if the .opd entry is full 24 byte or
+ 16 byte (with fd_aux entry overlapped with next
+ fd_func). */
+ opd_ent_size = 24;
+ if ((rel + 2 == relend && sec->size == offset + 16)
+ || (rel + 3 < relend
+ && rel[2].r_offset == offset + 16
+ && rel[3].r_offset == offset + 24
+ && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[3].r_info) == R_PPC64_TOC))
+ opd_ent_size = 16;
+
+ if (h != NULL
+ && h->root.root.string[0] == '.')
fdh = get_fdh ((struct ppc_link_hash_entry *) h,
ppc_hash_table (info));
@@ -5139,19 +6131,20 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
|| sym_sec->output_section == bfd_abs_section_ptr);
if (skip)
{
- if (h != NULL && sym_sec->owner == ibfd)
+ if (fdh != NULL && sym_sec->owner == ibfd)
{
/* Arrange for the function descriptor sym
to be dropped. */
fdh->elf.root.u.def.value = 0;
fdh->elf.root.u.def.section = sym_sec;
}
+ opd_adjust[rel->r_offset / 8] = -1;
}
else
{
/* We'll be keeping this opd entry. */
- if (h != NULL)
+ if (fdh != NULL)
{
/* Redefine the function descriptor symbol to
this location in the opd section. It is
@@ -5160,7 +6153,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
for local symbols, because various places
in the generic ELF code use the value
stored in u.def.value. */
- fdh->elf.root.u.def.value = wptr - sec->contents;
+ fdh->elf.root.u.def.value = wptr - new_contents;
fdh->adjust_done = 1;
}
@@ -5170,14 +6163,20 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
for the function descriptor sym which we
don't have at the moment. So keep an
array of adjustments. */
- adjust[rel->r_offset / 24] = wptr - rptr;
+ opd_adjust[rel->r_offset / 8]
+ = (wptr - new_contents) - (rptr - sec->contents);
if (wptr != rptr)
- memcpy (wptr, rptr, 24);
- wptr += 24;
+ memcpy (wptr, rptr, opd_ent_size);
+ wptr += opd_ent_size;
+ if (add_aux_fields && opd_ent_size == 16)
+ {
+ memset (wptr, '\0', 8);
+ wptr += 8;
+ }
}
- rptr += 24;
- offset += 24;
+ rptr += opd_ent_size;
+ offset += opd_ent_size;
}
if (skip)
@@ -5215,15 +6214,21 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
/* We need to adjust any reloc offsets to point to the
new opd entries. While we're at it, we may as well
remove redundant relocs. */
- rel->r_offset += wptr - rptr;
+ rel->r_offset += opd_adjust[(offset - opd_ent_size) / 8];
if (write_rel != rel)
memcpy (write_rel, rel, sizeof (*rel));
++write_rel;
}
}
- sec->_cooked_size = wptr - sec->contents;
+ sec->size = wptr - new_contents;
sec->reloc_count = write_rel - relstart;
+ if (add_aux_fields)
+ {
+ free (sec->contents);
+ sec->contents = new_contents;
+ }
+
/* Fudge the size too, as this is used later in
elf_bfd_final_link if we are emitting relocs. */
elf_section_data (sec)->rel_hdr.sh_size
@@ -5247,6 +6252,40 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
if (some_edited)
elf_link_hash_traverse (elf_hash_table (info), adjust_opd_syms, NULL);
+ /* If we are doing a final link and the last .opd entry is just 16 byte
+ long, add a 8 byte padding after it. */
+ if (need_pad != NULL && !info->relocatable)
+ {
+ bfd_byte *p;
+
+ if ((need_pad->flags & SEC_IN_MEMORY) == 0)
+ {
+ BFD_ASSERT (need_pad->size > 0);
+
+ p = bfd_malloc (need_pad->size + 8);
+ if (p == NULL)
+ return FALSE;
+
+ if (! bfd_get_section_contents (need_pad->owner, need_pad,
+ p, 0, need_pad->size))
+ return FALSE;
+
+ need_pad->contents = p;
+ need_pad->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS);
+ }
+ else
+ {
+ p = bfd_realloc (need_pad->contents, need_pad->size + 8);
+ if (p == NULL)
+ return FALSE;
+
+ need_pad->contents = p;
+ }
+
+ memset (need_pad->contents + need_pad->size, 0, 8);
+ need_pad->size += 8;
+ }
+
return TRUE;
}
@@ -5260,13 +6299,29 @@ ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
htab = ppc_hash_table (info);
if (htab->tls_get_addr != NULL)
{
- struct elf_link_hash_entry *h = htab->tls_get_addr;
+ struct ppc_link_hash_entry *h = htab->tls_get_addr;
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ while (h->elf.root.type == bfd_link_hash_indirect
+ || h->elf.root.type == bfd_link_hash_warning)
+ h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
htab->tls_get_addr = h;
+
+ if (htab->tls_get_addr_fd == NULL
+ && h->oh != NULL
+ && h->oh->is_func_descriptor)
+ htab->tls_get_addr_fd = h->oh;
+ }
+
+ if (htab->tls_get_addr_fd != NULL)
+ {
+ struct ppc_link_hash_entry *h = htab->tls_get_addr_fd;
+
+ while (h->elf.root.type == bfd_link_hash_indirect
+ || h->elf.root.type == bfd_link_hash_warning)
+ h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
+
+ htab->tls_get_addr_fd = h;
}
return _bfd_elf_tls_setup (obfd, info);
@@ -5342,17 +6397,9 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
value = h->root.u.def.value;
}
else
- {
- value = sym->st_value;
-
- if (elf_section_data (sym_sec) != NULL)
- {
- long *adjust;
- adjust = ppc64_elf_section_data (sym_sec)->opd.adjust;
- if (adjust != NULL)
- value += adjust[value / 24];
- }
- }
+ /* Symbols referenced by TLS relocs must be of type
+ STT_TLS. So no need for .opd local sym adjust. */
+ value = sym->st_value;
ok_tprel = FALSE;
is_local = FALSE;
@@ -5424,7 +6471,8 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
case R_PPC64_REL14_BRNTAKEN:
case R_PPC64_REL24:
if (h != NULL
- && h == htab->tls_get_addr)
+ && (h == &htab->tls_get_addr->elf
+ || h == &htab->tls_get_addr_fd->elf))
{
if (!expecting_tls_get_addr
&& rel != relstart
@@ -5605,31 +6653,29 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (pent = h->plt.plist; pent != NULL; pent = pent->next)
if (pent->plt.refcount > 0)
{
- BFD_ASSERT (((struct ppc_link_hash_entry *) h)->is_func_descriptor);
-
/* If this is the first .plt entry, make room for the special
first entry. */
s = htab->plt;
- if (s->_raw_size == 0)
- s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_INITIAL_ENTRY_SIZE;
- pent->plt.offset = s->_raw_size;
+ pent->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* Make room for the .glink code. */
s = htab->glink;
- if (s->_raw_size == 0)
- s->_raw_size += GLINK_CALL_STUB_SIZE;
+ if (s->size == 0)
+ s->size += GLINK_CALL_STUB_SIZE;
/* We need bigger stubs past index 32767. */
- if (s->_raw_size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
- s->_raw_size += 4;
- s->_raw_size += 2*4;
+ if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
+ s->size += 4;
+ s->size += 2*4;
/* We also need to make an entry in the .rela.plt section. */
s = htab->relplt;
- s->_raw_size += sizeof (Elf64_External_Rela);
+ s->size += sizeof (Elf64_External_Rela);
doneone = TRUE;
}
else
@@ -5695,15 +6741,15 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = ppc64_elf_tdata (gent->owner)->got;
- gent->got.offset = s->_raw_size;
- s->_raw_size
+ gent->got.offset = s->size;
+ s->size
+= (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8;
dyn = htab->elf.dynamic_sections_created;
if ((info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- ppc64_elf_tdata (gent->owner)->relgot->_raw_size
+ ppc64_elf_tdata (gent->owner)->relgot->size
+= (gent->tls_type & eh->tls_mask & TLS_GD
? 2 * sizeof (Elf64_External_Rela)
: sizeof (Elf64_External_Rela));
@@ -5783,7 +6829,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -5843,7 +6889,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -5859,18 +6905,18 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
Elf_Internal_Shdr *symtab_hdr;
asection *srel;
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ if (!is_ppc64_elf_target (ibfd->xvec))
continue;
if (ppc64_tlsld_got (ibfd)->refcount > 0)
{
s = ppc64_elf_tdata (ibfd)->got;
- ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
- s->_raw_size += 16;
+ ppc64_tlsld_got (ibfd)->offset = s->size;
+ s->size += 16;
if (info->shared)
{
srel = ppc64_elf_tdata (ibfd)->relgot;
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
}
else
@@ -5896,7 +6942,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srel->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -5924,27 +6970,27 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (ppc64_tlsld_got (ibfd)->offset == (bfd_vma) -1)
{
- ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
- s->_raw_size += 16;
+ ppc64_tlsld_got (ibfd)->offset = s->size;
+ s->size += 16;
if (info->shared)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
ent->got.offset = ppc64_tlsld_got (ibfd)->offset;
}
else
{
- ent->got.offset = s->_raw_size;
+ ent->got.offset = s->size;
if ((ent->tls_type & *lgot_masks & TLS_GD) != 0)
{
- s->_raw_size += 16;
+ s->size += 16;
if (info->shared)
- srel->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ srel->size += 2 * sizeof (Elf64_External_Rela);
}
else
{
- s->_raw_size += 8;
+ s->size += 8;
if (info->shared)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
}
}
@@ -5965,10 +7011,6 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- /* Reset _cooked_size since prelim layout will set it wrongly,
- and a non-zero _cooked_size sticks. */
- s->_cooked_size = 0;
-
if (s == htab->brlt || s == htab->relbrlt)
/* These haven't been allocated yet; don't strip. */
continue;
@@ -5981,7 +7023,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -6009,7 +7051,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
_bfd_strip_section_from_output (info, s);
continue;
@@ -6026,22 +7068,24 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
sections instead of garbage.
We also rely on the section contents being zero when writing
the GOT. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
+ if (!is_ppc64_elf_target (ibfd->xvec))
+ continue;
+
s = ppc64_elf_tdata (ibfd)->got;
if (s != NULL && s != htab->got)
{
- s->_cooked_size = 0;
- if (s->_raw_size == 0)
+ if (s->size == 0)
_bfd_strip_section_from_output (info, s);
else
{
- s->contents = bfd_zalloc (ibfd, s->_raw_size);
+ s->contents = bfd_zalloc (ibfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -6049,12 +7093,11 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = ppc64_elf_tdata (ibfd)->relgot;
if (s != NULL)
{
- s->_cooked_size = 0;
- if (s->_raw_size == 0)
+ if (s->size == 0)
_bfd_strip_section_from_output (info, s);
else
{
- s->contents = bfd_zalloc (ibfd, s->_raw_size);
+ s->contents = bfd_zalloc (ibfd, s->size);
if (s->contents == NULL)
return FALSE;
relocs = TRUE;
@@ -6079,7 +7122,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -6137,14 +7180,18 @@ ppc_type_of_stub (asection *input_sec,
if (h != NULL)
{
if (h->oh != NULL
- && h->oh->dynindx != -1)
+ && h->oh->is_func_descriptor)
+ h = h->oh;
+
+ if (h->elf.dynindx != -1)
{
struct plt_entry *ent;
- for (ent = h->oh->plt.plist; ent != NULL; ent = ent->next)
+
+ for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
if (ent->addend == rel->r_addend
&& ent->plt.offset != (bfd_vma) -1)
{
- *hash = (struct ppc_link_hash_entry *) h->oh;
+ *hash = h;
return ppc_stub_plt_call;
}
}
@@ -6212,7 +7259,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_byte *p;
unsigned int indx;
struct plt_entry *ent;
- bfd_vma off;
+ bfd_vma dest, off;
int size;
/* Massage our args to the form they really have. */
@@ -6222,7 +7269,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
htab = ppc_hash_table (info);
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_entry->stub_sec->_cooked_size;
+ stub_entry->stub_offset = stub_entry->stub_sec->size;
loc = stub_entry->stub_sec->contents + stub_entry->stub_offset;
htab->stub_count[stub_entry->stub_type - 1] += 1;
@@ -6231,9 +7278,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
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
- + stub_entry->target_section->output_section->vma);
+ off = dest = (stub_entry->target_value
+ + stub_entry->target_section->output_offset
+ + stub_entry->target_section->output_section->vma);
/* And this is where we are coming from. */
off -= (stub_entry->stub_offset
@@ -6260,6 +7307,67 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_put_32 (htab->stub_bfd, B_DOT | (off & 0x3fffffc), loc);
BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
+
+ if (info->emitrelocations)
+ {
+ Elf_Internal_Rela *relocs, *r;
+ struct bfd_elf_section_data *elfsec_data;
+
+ elfsec_data = elf_section_data (stub_entry->stub_sec);
+ relocs = elfsec_data->relocs;
+ if (relocs == NULL)
+ {
+ bfd_size_type relsize;
+ relsize = stub_entry->stub_sec->reloc_count * sizeof (*relocs);
+ relocs = bfd_alloc (htab->stub_bfd, relsize);
+ if (relocs == NULL)
+ return FALSE;
+ elfsec_data->relocs = relocs;
+ elfsec_data->rel_hdr.sh_size = relsize;
+ elfsec_data->rel_hdr.sh_entsize = 24;
+ stub_entry->stub_sec->reloc_count = 0;
+ }
+ r = relocs + stub_entry->stub_sec->reloc_count;
+ stub_entry->stub_sec->reloc_count += 1;
+ r->r_offset = loc - stub_entry->stub_sec->contents;
+ r->r_info = ELF64_R_INFO (0, R_PPC64_REL24);
+ r->r_addend = dest;
+ if (stub_entry->h != NULL)
+ {
+ struct elf_link_hash_entry **hashes;
+ unsigned long symndx;
+ struct ppc_link_hash_entry *h;
+
+ hashes = elf_sym_hashes (htab->stub_bfd);
+ if (hashes == NULL)
+ {
+ bfd_size_type hsize;
+
+ hsize = (htab->stub_globals + 1) * sizeof (*hashes);
+ hashes = bfd_zalloc (htab->stub_bfd, hsize);
+ if (hashes == NULL)
+ return FALSE;
+ elf_sym_hashes (htab->stub_bfd) = hashes;
+ htab->stub_globals = 1;
+ }
+ symndx = htab->stub_globals++;
+ h = stub_entry->h;
+ hashes[symndx] = &h->elf;
+ r->r_info = ELF64_R_INFO (symndx, R_PPC64_REL24);
+ if (h->oh != NULL && h->oh->is_func)
+ h = h->oh;
+ if (h->elf.root.u.def.section != stub_entry->target_section)
+ /* H is an opd symbol. The addend must be zero. */
+ r->r_addend = 0;
+ else
+ {
+ off = (h->elf.root.u.def.value
+ + h->elf.root.u.def.section->output_offset
+ + h->elf.root.u.def.section->output_section->vma);
+ r->r_addend -= off;
+ }
+ }
+ }
break;
case ppc_stub_plt_branch:
@@ -6282,7 +7390,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_put_64 (htab->brlt->owner, off,
htab->brlt->contents + br_entry->offset);
- if (info->shared)
+ if (htab->relbrlt != NULL)
{
/* Create a reloc for the branch lookup table entry. */
Elf_Internal_Rela rela;
@@ -6350,17 +7458,18 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
/* Do the best we can for shared libraries built without
exporting ".foo" for each "foo". This can happen when symbol
versioning scripts strip all bar a subset of symbols. */
- if (stub_entry->h->oh->root.type != bfd_link_hash_defined
- && stub_entry->h->oh->root.type != bfd_link_hash_defweak)
+ if (stub_entry->h->oh != NULL
+ && stub_entry->h->oh->elf.root.type != bfd_link_hash_defined
+ && stub_entry->h->oh->elf.root.type != bfd_link_hash_defweak)
{
/* Point the symbol at the stub. There may be multiple stubs,
we don't really care; The main thing is to make this sym
defined somewhere. Maybe defining the symbol in the stub
section is a silly idea. If we didn't do this, htab->top_id
could disappear. */
- stub_entry->h->oh->root.type = bfd_link_hash_defined;
- stub_entry->h->oh->root.u.def.section = stub_entry->stub_sec;
- stub_entry->h->oh->root.u.def.value = stub_entry->stub_offset;
+ stub_entry->h->oh->elf.root.type = bfd_link_hash_defined;
+ stub_entry->h->oh->elf.root.u.def.section = stub_entry->stub_sec;
+ stub_entry->h->oh->elf.root.u.def.value = stub_entry->stub_offset;
}
/* Now build the stub. */
@@ -6399,17 +7508,28 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
- stub_entry->stub_sec->_cooked_size += size;
+ stub_entry->stub_sec->size += size;
- if (htab->emit_stub_syms
- && !(stub_entry->stub_type == ppc_stub_plt_call
- && stub_entry->h->oh->root.type == bfd_link_hash_defined
- && stub_entry->h->oh->root.u.def.section == stub_entry->stub_sec
- && stub_entry->h->oh->root.u.def.value == 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);
+ size_t len1, len2;
+ char *name;
+ const char *const stub_str[] = { "long_branch",
+ "long_branch_r2off",
+ "plt_branch",
+ "plt_branch_r2off",
+ "plt_call" };
+
+ len1 = strlen (stub_str[stub_entry->stub_type - 1]);
+ len2 = strlen (stub_entry->root.string);
+ name = bfd_malloc (len1 + len2 + 2);
+ if (name == NULL)
+ return FALSE;
+ memcpy (name, stub_entry->root.string, 9);
+ memcpy (name + 9, stub_str[stub_entry->stub_type - 1], len1);
+ memcpy (name + len1 + 9, stub_entry->root.string + 8, len2 - 8 + 1);
+ h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
if (h == NULL)
return FALSE;
if (h->root.type == bfd_link_hash_new)
@@ -6474,7 +7594,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
- off -= (stub_entry->stub_sec->_raw_size
+ off -= (stub_entry->stub_sec->size
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
@@ -6509,11 +7629,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (br_entry->iter != htab->stub_iteration)
{
br_entry->iter = htab->stub_iteration;
- br_entry->offset = htab->brlt->_raw_size;
- htab->brlt->_raw_size += 8;
+ br_entry->offset = htab->brlt->size;
+ htab->brlt->size += 8;
- if (info->shared)
- htab->relbrlt->_raw_size += sizeof (Elf64_External_Rela);
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->size += sizeof (Elf64_External_Rela);
}
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
@@ -6521,9 +7641,14 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (stub_entry->stub_type != ppc_stub_plt_branch)
size = 28;
}
+
+ if (info->emitrelocations
+ && (stub_entry->stub_type == ppc_stub_long_branch
+ || stub_entry->stub_type == ppc_stub_long_branch_r2off))
+ stub_entry->stub_sec->reloc_count += 1;
}
- stub_entry->stub_sec->_raw_size += size;
+ stub_entry->stub_sec->size += size;
return TRUE;
}
@@ -6600,20 +7725,15 @@ void
ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ bfd_vma addr = isec->output_offset + isec->output_section->vma;
+ bfd_vma off = addr - htab->toc_curr;
- 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);
- }
+ if (off + isec->size > 0x10000)
+ htab->toc_curr = addr;
+
+ 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. */
@@ -6646,7 +7766,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
if ((isec->flags & SEC_LINKER_CREATED) != 0)
return 0;
- if (isec->_raw_size == 0)
+ if (isec->size == 0)
return 0;
/* Hack for linux kernel. .fixup contains branches, but only back to
@@ -6656,13 +7776,10 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
contents = elf_section_data (isec)->this_hdr.contents;
if (contents == NULL)
{
- contents = bfd_malloc (isec->_raw_size);
- if (contents == NULL)
- return -1;
- if (! bfd_get_section_contents (isec->owner, isec, contents,
- 0, isec->_raw_size))
+ if (!bfd_malloc_and_get_section (isec->owner, isec, &contents))
{
- free (contents);
+ if (contents != NULL)
+ free (contents);
return -1;
}
if (info->keep_memory)
@@ -6672,7 +7789,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
/* Code scan, because we don't necessarily have relocs on calls to
static functions. */
ret = 0;
- for (i = 0; i < isec->_raw_size; i += 4)
+ for (i = 0; i < isec->size; i += 4)
{
unsigned long insn = bfd_get_32 (isec->owner, contents + i);
/* Is this a branch? */
@@ -6762,10 +7879,7 @@ group_sections (struct ppc_link_hash_table *htab,
bfd_vma curr_toc;
curr = tail;
- if (tail->_cooked_size)
- total = tail->_cooked_size;
- else
- total = tail->_raw_size;
+ total = tail->size;
big_sec = total >= stub_group_size;
curr_toc = htab->stub_group[tail->id].toc_off;
@@ -6921,14 +8035,17 @@ ppc64_elf_size_stubs (bfd *output_bfd,
unsigned int r_indx;
enum ppc_stub_type stub_type;
struct ppc_stub_hash_entry *stub_entry;
- asection *sym_sec;
+ asection *sym_sec, *code_sec;
bfd_vma sym_value;
bfd_vma destination;
+ bfd_boolean ok_dest;
struct ppc_link_hash_entry *hash;
+ struct ppc_link_hash_entry *fdh;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
char *stub_name;
const asection *id_sec;
+ long *opd_adjust;
r_type = ELF64_R_TYPE (irela->r_info);
r_indx = ELF64_R_SYM (irela->r_info);
@@ -6948,32 +8065,44 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* Now determine the call target, its name, value,
section. */
- destination = 0;
if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
r_indx, input_bfd))
goto error_ret_free_internal;
hash = (struct ppc_link_hash_entry *) h;
+ ok_dest = FALSE;
+ fdh = NULL;
if (hash == NULL)
{
- /* It's a local symbol. */
sym_value = sym->st_value;
- destination = (sym_value + irela->r_addend
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
+ ok_dest = TRUE;
}
else
{
- /* It's an external symbol. */
sym_value = 0;
- if (hash->elf.root.type == bfd_link_hash_defined
- || hash->elf.root.type == bfd_link_hash_defweak)
+ /* Recognise an old ABI func code entry sym, and
+ use the func descriptor sym instead. */
+ if (hash->elf.root.type == bfd_link_hash_undefweak
+ && hash->elf.root.root.string[0] == '.'
+ && (fdh = get_fdh (hash, htab)) != NULL)
+ {
+ if (fdh->elf.root.type == bfd_link_hash_defined
+ || fdh->elf.root.type == bfd_link_hash_defweak)
+ {
+ sym_sec = fdh->elf.root.u.def.section;
+ sym_value = fdh->elf.root.u.def.value;
+ if (sym_sec->output_section != NULL)
+ ok_dest = TRUE;
+ }
+ else
+ fdh = NULL;
+ }
+ else if (hash->elf.root.type == bfd_link_hash_defined
+ || hash->elf.root.type == bfd_link_hash_defweak)
{
sym_value = hash->elf.root.u.def.value;
if (sym_sec->output_section != NULL)
- destination = (sym_value + irela->r_addend
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
+ ok_dest = TRUE;
}
else if (hash->elf.root.type == bfd_link_hash_undefweak)
;
@@ -6986,6 +8115,44 @@ ppc64_elf_size_stubs (bfd *output_bfd,
}
}
+ destination = 0;
+ if (ok_dest)
+ {
+ sym_value += irela->r_addend;
+ destination = (sym_value
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ }
+
+ code_sec = sym_sec;
+ opd_adjust = get_opd_info (sym_sec);
+ if (opd_adjust != NULL)
+ {
+ bfd_vma dest;
+
+ if (hash == NULL)
+ {
+ long adjust = opd_adjust[sym_value / 8];
+ if (adjust == -1)
+ continue;
+ sym_value += adjust;
+ }
+ dest = opd_entry_value (sym_sec, sym_value,
+ &code_sec, &sym_value);
+ if (dest != (bfd_vma) -1)
+ {
+ destination = dest;
+ if (fdh != NULL)
+ {
+ /* Fixup old ABI sym to point at code
+ entry. */
+ hash->elf.root.type = bfd_link_hash_defweak;
+ hash->elf.root.u.def.section = code_sec;
+ hash->elf.root.u.def.value = sym_value;
+ }
+ }
+ }
+
/* Determine what (if any) linker stub is needed. */
stub_type = ppc_type_of_stub (section, irela, &hash,
destination);
@@ -6998,11 +8165,11 @@ ppc64_elf_size_stubs (bfd *output_bfd,
_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
+ if (code_sec != NULL
+ && code_sec->output_section != NULL
+ && (htab->stub_group[code_sec->id].toc_off
!= htab->stub_group[section->id].toc_off)
- && sym_sec->has_gp_reloc
+ && code_sec->has_gp_reloc
&& section->has_gp_reloc)
stub_type = ppc_stub_long_branch_r2off;
}
@@ -7013,7 +8180,8 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* __tls_get_addr calls might be eliminated. */
if (stub_type != ppc_stub_plt_call
&& hash != NULL
- && &hash->elf == htab->tls_get_addr
+ && (hash == htab->tls_get_addr
+ || hash == htab->tls_get_addr_fd)
&& section->has_tls_reloc
&& irela != internal_relocs)
{
@@ -7061,9 +8229,13 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_entry->stub_type = stub_type;
stub_entry->target_value = sym_value;
- stub_entry->target_section = sym_sec;
+ stub_entry->target_section = code_sec;
stub_entry->h = hash;
stub_entry->addend = irela->r_addend;
+
+ if (stub_entry->h != NULL)
+ htab->stub_globals += 1;
+
stub_changed = TRUE;
}
@@ -7092,16 +8264,13 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_sec = stub_sec->next)
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
{
- stub_sec->_raw_size = 0;
- stub_sec->_cooked_size = 0;
+ stub_sec->size = 0;
+ stub_sec->reloc_count = 0;
}
- htab->brlt->_raw_size = 0;
- htab->brlt->_cooked_size = 0;
- if (info->shared)
- {
- htab->relbrlt->_raw_size = 0;
- htab->relbrlt->_cooked_size = 0;
- }
+
+ htab->brlt->size = 0;
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->size = 0;
bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, info);
@@ -7188,22 +8357,21 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
int stub_sec_count = 0;
htab->emit_stub_syms = emit_stub_syms;
+
+ /* Allocate memory to hold the linker stubs. */
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+ if ((stub_sec->flags & SEC_LINKER_CREATED) == 0
+ && stub_sec->size != 0)
{
- bfd_size_type size;
-
- /* Allocate memory to hold the linker stubs. */
- size = stub_sec->_raw_size;
- if (size != 0)
- {
- stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
- if (stub_sec->contents == NULL)
- return FALSE;
- }
- stub_sec->_cooked_size = 0;
+ stub_sec->contents = bfd_zalloc (htab->stub_bfd, stub_sec->size);
+ if (stub_sec->contents == NULL)
+ return FALSE;
+ /* We want to check that built size is the same as calculated
+ size. rawsize is a convenient location to use. */
+ stub_sec->rawsize = stub_sec->size;
+ stub_sec->size = 0;
}
if (htab->plt != NULL)
@@ -7277,7 +8445,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
/* Build the .glink lazy link call stubs. */
indx = 0;
- while (p < htab->glink->contents + htab->glink->_raw_size)
+ while (p < htab->glink->contents + htab->glink->size)
{
if (indx < 0x8000)
{
@@ -7296,20 +8464,20 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
indx++;
p += 4;
}
- htab->glink->_cooked_size = p - htab->glink->contents;
+ htab->glink->rawsize = p - htab->glink->contents;
}
- if (htab->brlt->_raw_size != 0)
+ if (htab->brlt->size != 0)
{
htab->brlt->contents = bfd_zalloc (htab->brlt->owner,
- htab->brlt->_raw_size);
+ htab->brlt->size);
if (htab->brlt->contents == NULL)
return FALSE;
}
- if (info->shared && htab->relbrlt->_raw_size != 0)
+ if (htab->relbrlt != NULL && htab->relbrlt->size != 0)
{
htab->relbrlt->contents = bfd_zalloc (htab->relbrlt->owner,
- htab->relbrlt->_raw_size);
+ htab->relbrlt->size);
if (htab->relbrlt->contents == NULL)
return FALSE;
}
@@ -7323,12 +8491,12 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
{
stub_sec_count += 1;
- if (stub_sec->_raw_size != stub_sec->_cooked_size)
+ if (stub_sec->rawsize != stub_sec->size)
break;
}
if (stub_sec != NULL
- || htab->glink->_raw_size != htab->glink->_cooked_size)
+ || htab->glink->rawsize != htab->glink->size)
{
htab->stub_error = TRUE;
(*_bfd_error_handler) (_("stubs don't match calculated size"));
@@ -7343,13 +8511,14 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
if (*stats == NULL)
return FALSE;
- sprintf (*stats, _("linker stubs in %u groups\n"
+ sprintf (*stats, _("linker stubs in %u group%s\n"
" branch %lu\n"
" toc adjust %lu\n"
" long branch %lu\n"
" long toc adj %lu\n"
" plt call %lu"),
stub_sec_count,
+ stub_sec_count == 1 ? "" : "s",
htab->stub_count[ppc_stub_long_branch - 1],
htab->stub_count[ppc_stub_long_branch_r2off - 1],
htab->stub_count[ppc_stub_plt_branch - 1],
@@ -7359,6 +8528,34 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
return TRUE;
}
+/* This function undoes the changes made by add_symbol_adjust. */
+
+static bfd_boolean
+undo_symbol_twiddle (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
+{
+ struct ppc_link_hash_entry *eh;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
+ return TRUE;
+
+ eh->elf.root.type = bfd_link_hash_undefined;
+ return TRUE;
+}
+
+void
+ppc64_elf_restore_symbols (struct bfd_link_info *info)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ elf_link_hash_traverse (&htab->elf, undo_symbol_twiddle, info);
+}
+
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -7420,6 +8617,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
ppc_howto_init ();
htab = ppc_hash_table (info);
+
+ /* Don't relocate stub sections. */
+ if (input_section->owner == htab->stub_bfd)
+ return TRUE;
+
local_got_ents = elf_local_got_ents (input_bfd);
TOCstart = elf_gp (output_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -7435,8 +8637,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
bfd_reloc_status_type r;
Elf_Internal_Sym *sym;
asection *sec;
- struct elf_link_hash_entry *h;
- struct elf_link_hash_entry *fdh;
+ struct elf_link_hash_entry *h_elf;
+ struct ppc_link_hash_entry *h;
+ struct ppc_link_hash_entry *fdh;
const char *sym_name;
unsigned long r_symndx, toc_symndx;
char tls_mask, tls_gd, tls_type;
@@ -7463,7 +8666,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
sym = NULL;
sec = NULL;
- h = NULL;
+ h_elf = NULL;
sym_name = NULL;
unresolved_reloc = FALSE;
warned = FALSE;
@@ -7471,29 +8674,33 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (r_symndx < symtab_hdr->sh_info)
{
/* It's a local symbol. */
+ long *opd_adjust;
+
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
sym_name = bfd_elf_local_sym_name (input_bfd, sym);
sym_type = ELF64_ST_TYPE (sym->st_info);
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
- if (elf_section_data (sec) != NULL)
+ opd_adjust = get_opd_info (sec);
+ if (opd_adjust != NULL)
{
- long *opd_sym_adjust;
-
- opd_sym_adjust = ppc64_elf_section_data (sec)->opd.adjust;
- if (opd_sym_adjust != NULL)
- relocation += opd_sym_adjust[sym->st_value / 24];
+ long adjust = opd_adjust[(sym->st_value + rel->r_addend) / 8];
+ if (adjust == -1)
+ relocation = 0;
+ else
+ relocation += adjust;
}
}
else
{
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
- h, sec, relocation,
+ h_elf, sec, relocation,
unresolved_reloc, warned);
- sym_name = h->root.root.string;
- sym_type = h->type;
+ sym_name = h_elf->root.root.string;
+ sym_type = h_elf->type;
}
+ h = (struct ppc_link_hash_entry *) h_elf;
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
@@ -7505,7 +8712,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (IS_PPC64_TLS_RELOC (r_type))
{
if (h != NULL)
- tls_mask = ((struct ppc_link_hash_entry *) h)->tls_mask;
+ tls_mask = h->tls_mask;
else if (local_got_ents != NULL)
{
char *lgot_masks;
@@ -7531,8 +8738,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (r_symndx != 0
&& r_type != R_PPC64_NONE
&& (h == NULL
- || h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ || h->elf.root.type == bfd_link_hash_defined
+ || h->elf.root.type == bfd_link_hash_defweak)
&& IS_PPC64_TLS_RELOC (r_type) != (sym_type == STT_TLS))
{
if (r_type == R_PPC64_TLS && tls_mask != 0)
@@ -7541,10 +8748,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
else
(*_bfd_error_handler)
(sym_type == STT_TLS
- ? _("%s(%s+0x%lx): %s used with TLS symbol %s")
- : _("%s(%s+0x%lx): %s used with non-TLS symbol %s"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+ : _("%B(%A+0x%lx): %s used with non-TLS symbol %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
@@ -7749,7 +8956,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
while (h2->root.type == bfd_link_hash_indirect
|| h2->root.type == bfd_link_hash_warning)
h2 = (struct elf_link_hash_entry *) h2->root.u.i.link;
- if (h2 == NULL || h2 != htab->tls_get_addr)
+ if (h2 == NULL || (h2 != &htab->tls_get_addr->elf
+ && h2 != &htab->tls_get_addr_fd->elf))
break;
/* OK, it checks out. Replace the call. */
@@ -7853,6 +9061,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* Handle other relocations that tweak non-addend part of insn. */
insn = 0;
+ max_br_offset = 1 << 25;
+ addend = rel->r_addend;
switch (r_type)
{
default:
@@ -7869,31 +9079,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_REL14_BRNTAKEN:
insn |= bfd_get_32 (output_bfd,
contents + rel->r_offset) & ~(0x01 << 21);
- if (is_power4)
- {
- /* Set 'a' bit. This is 0b00010 in BO field for branch
- on CR(BI) insns (BO == 001at or 011at), and 0b01000
- for branch on CTR insns (BO == 1a00t or 1a01t). */
- if ((insn & (0x14 << 21)) == (0x04 << 21))
- insn |= 0x02 << 21;
- else if ((insn & (0x14 << 21)) == (0x10 << 21))
- insn |= 0x08 << 21;
- else
- break;
- }
- else
- {
- from = (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma);
-
- /* Invert 'y' bit if not the default. */
- if ((bfd_signed_vma) (relocation + rel->r_addend - from) < 0)
- insn ^= 0x01 << 21;
- }
+ /* Fall thru. */
- bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
- break;
+ case R_PPC64_REL14:
+ max_br_offset = 1 << 15;
+ /* Fall thru. */
case R_PPC64_REL24:
/* Calls to functions with a different TOC, such as calls to
@@ -7902,11 +9092,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
linkage stubs needs to be followed by a nop, as the nop
will be replaced with an instruction to restore the TOC
base pointer. */
+ stub_entry = NULL;
+ fdh = h;
if (((h != NULL
- && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
- && fdh->plt.plist != NULL)
- || ((fdh = h, sec) != NULL
+ && (((fdh = h->oh) != NULL
+ && fdh->elf.plt.plist != NULL)
+ || (fdh = h)->elf.plt.plist != NULL))
+ || (sec != NULL
&& sec->output_section != NULL
+ && sec->id <= htab->top_id
&& (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,
@@ -7915,17 +9109,18 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|| stub_entry->stub_type == ppc_stub_plt_branch_r2off
|| stub_entry->stub_type == ppc_stub_long_branch_r2off))
{
- bfd_boolean can_plt_call = 0;
+ bfd_boolean can_plt_call = FALSE;
- if (rel->r_offset + 8 <= input_section->_cooked_size)
+ if (rel->r_offset + 8 <= input_section->size)
{
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
- if (insn == NOP
- || insn == CROR_151515 || insn == CROR_313131)
+ unsigned long nop;
+ nop = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+ if (nop == NOP
+ || nop == CROR_151515 || nop == CROR_313131)
{
bfd_put_32 (input_bfd, LD_R2_40R1,
contents + rel->r_offset + 4);
- can_plt_call = 1;
+ can_plt_call = TRUE;
}
}
@@ -7935,16 +9130,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
{
/* 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;
+ unsigned long br;
+ br = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((br & 1) == 0)
+ can_plt_call = TRUE;
}
else if (h != NULL
- && strcmp (h->root.root.string,
+ && strcmp (h->elf.root.root.string,
".__libc_start_main") == 0)
{
/* Allow crt1 branch to go via a toc adjusting stub. */
- can_plt_call = 1;
+ can_plt_call = TRUE;
}
else
{
@@ -7953,21 +9149,21 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|| strcmp (input_section->output_section->name,
".fini") == 0)
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): automatic multiple TOCs "
+ (_("%B(%A+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,
+ input_bfd,
+ input_section,
(long) rel->r_offset);
else
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): sibling call optimization to `%s' "
+ (_("%B(%A+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,
+ input_bfd,
+ input_section,
(long) rel->r_offset,
sym_name,
sym_name);
@@ -7976,51 +9172,96 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
}
- if (can_plt_call)
+ if (can_plt_call
+ && stub_entry->stub_type == ppc_stub_plt_call)
+ unresolved_reloc = FALSE;
+ }
+
+ if (stub_entry == NULL
+ && get_opd_info (sec) != NULL)
+ {
+ /* The branch destination is the value of the opd entry. */
+ bfd_vma off = (relocation - sec->output_section->vma
+ - sec->output_offset + rel->r_addend);
+ bfd_vma dest = opd_entry_value (sec, off, NULL, NULL);
+ if (dest != (bfd_vma) -1)
{
- relocation = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
- if (stub_entry->stub_type == ppc_stub_plt_call)
- unresolved_reloc = FALSE;
+ relocation = dest;
+ addend = 0;
}
}
- if (h != NULL
- && h->root.type == bfd_link_hash_undefweak
- && relocation == 0
- && rel->r_addend == 0)
+ /* If the branch is out of reach we ought to have a long
+ branch stub. */
+ from = (rel->r_offset
+ + input_section->output_offset
+ + input_section->output_section->vma);
+
+ if (stub_entry == NULL
+ && (relocation + rel->r_addend - from + max_br_offset
+ >= 2 * max_br_offset)
+ && r_type != R_PPC64_ADDR14_BRTAKEN
+ && r_type != R_PPC64_ADDR14_BRNTAKEN)
+ stub_entry = ppc_get_stub_entry (input_section, sec, h, rel,
+ htab);
+
+ if (stub_entry != NULL)
{
- /* Tweak calls to undefined weak functions to point at a
- blr. We can thus call a weak function without first
- checking whether the function is defined. We have a
- blr at the end of .sfpr. */
- BFD_ASSERT (htab->sfpr->_raw_size != 0);
- relocation = (htab->sfpr->_raw_size - 4
- + htab->sfpr->output_offset
- + htab->sfpr->output_section->vma);
- from = (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma);
-
- /* But let's not be silly about it. If the blr isn't in
- reach, just go to the next instruction. */
- if (relocation - from + (1 << 25) >= (1 << 26)
- || htab->sfpr->_raw_size == 0)
- relocation = from + 4;
+ /* Munge up the value and addend so that we call the stub
+ rather than the procedure directly. */
+ relocation = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+ addend = 0;
+ }
+
+ if (insn != 0)
+ {
+ if (is_power4)
+ {
+ /* Set 'a' bit. This is 0b00010 in BO field for branch
+ on CR(BI) insns (BO == 001at or 011at), and 0b01000
+ for branch on CTR insns (BO == 1a00t or 1a01t). */
+ if ((insn & (0x14 << 21)) == (0x04 << 21))
+ insn |= 0x02 << 21;
+ else if ((insn & (0x14 << 21)) == (0x10 << 21))
+ insn |= 0x08 << 21;
+ else
+ break;
+ }
+ else
+ {
+ /* Invert 'y' bit if not the default. */
+ if ((bfd_signed_vma) (relocation + rel->r_addend - from) < 0)
+ insn ^= 0x01 << 21;
+ }
+
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+
+ /* NOP out calls to undefined weak functions.
+ We can thus call a weak function without first
+ checking whether the function is defined. */
+ else if (h != NULL
+ && h->elf.root.type == bfd_link_hash_undefweak
+ && r_type == R_PPC64_REL24
+ && relocation == 0
+ && rel->r_addend == 0)
+ {
+ bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+ continue;
}
break;
}
/* Set `addend'. */
tls_type = 0;
- addend = rel->r_addend;
switch (r_type)
{
default:
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d for symbol %s"),
- bfd_archive_filename (input_bfd), (int) r_type, sym_name);
+ (_("%B: unknown relocation type %d for symbol %s"),
+ input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -8081,7 +9322,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (tls_type == (TLS_TLS | TLS_LD)
&& (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
+ || (h->elf.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) == 0))
offp = &ppc64_tlsld_got (input_bfd)->offset;
else
{
@@ -8090,9 +9332,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (h != NULL)
{
bfd_boolean dyn = htab->elf.dynamic_sections_created;
- if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+ &h->elf)
|| (info->shared
- && SYMBOL_REFERENCES_LOCAL (info, h)))
+ && SYMBOL_REFERENCES_LOCAL (info, &h->elf)))
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
locally, or the symbol was forced to be local
@@ -8100,10 +9343,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
;
else
{
- indx = h->dynindx;
+ indx = h->elf.dynindx;
unresolved_reloc = FALSE;
}
- ent = h->got.glist;
+ ent = h->elf.got.glist;
}
else
{
@@ -8142,8 +9385,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
*offp = off | 1;
if ((info->shared || indx != 0)
&& (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak))
+ || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ || h->elf.root.type != bfd_link_hash_undefweak))
{
outrel.r_offset = (got->output_section->vma
+ got->output_offset
@@ -8251,7 +9494,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (htab->plt != NULL)
{
struct plt_entry *ent;
- for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
if (ent->addend == rel->r_addend
&& ent->plt.offset != (bfd_vma) -1)
{
@@ -8391,17 +9634,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if ((info->shared
&& (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
+ || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ || h->elf.root.type != bfd_link_hash_undefweak)
&& (MUST_BE_DYN_RELOC (r_type)
- || !SYMBOL_CALLS_LOCAL (info, h)))
+ || !SYMBOL_CALLS_LOCAL (info, &h->elf)))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
- && h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ && h->elf.dynindx != -1
+ && !(h->elf.elf_link_hash_flags & ELF_LINK_NON_GOT_REF)
+ && (h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ && !(h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
{
Elf_Internal_Rela outrel;
bfd_boolean skip, relocate;
@@ -8440,10 +9683,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (skip)
memset (&outrel, 0, sizeof outrel);
- else if (!SYMBOL_REFERENCES_LOCAL (info, h)
+ else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
&& !is_opd
&& r_type != R_PPC64_TOC)
- outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
+ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
else
{
/* This symbol is local, or marked to become local,
@@ -8559,8 +9802,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* These ones haven't been implemented yet. */
(*_bfd_error_handler)
- (_("%s: relocation %s is not supported for symbol %s."),
- bfd_archive_filename (input_bfd),
+ (_("%B: relocation %s is not supported for symbol %s."),
+ input_bfd,
ppc64_elf_howto_table[r_type]->name, sym_name);
bfd_set_error (bfd_error_invalid_operation);
@@ -8638,8 +9881,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (((relocation + addend) & mask) != 0)
{
(*_bfd_error_handler)
- (_("%s: error: relocation %s not a multiple of %d"),
- bfd_archive_filename (input_bfd),
+ (_("%B: error: relocation %s not a multiple of %d"),
+ input_bfd,
ppc64_elf_howto_table[r_type]->name,
mask + 1);
bfd_set_error (bfd_error_bad_value);
@@ -8647,40 +9890,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
continue;
}
break;
-
- case R_PPC64_REL14:
- case R_PPC64_REL14_BRNTAKEN:
- case R_PPC64_REL14_BRTAKEN:
- max_br_offset = 1 << 15;
- goto branch_check;
-
- case R_PPC64_REL24:
- max_br_offset = 1 << 25;
-
- branch_check:
- /* 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
- || (sec != NULL
- && sec->output_section != NULL
- && sec->id <= htab->top_id
- && (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)
- {
- /* Munge up the value and addend so that we call the stub
- rather than the procedure directly. */
- relocation = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
- addend = 0;
- }
- break;
}
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
@@ -8688,15 +9897,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && (h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[(int) r_type]->name,
- h->root.root.string);
+ h->elf.root.root.string);
ret = FALSE;
}
@@ -8717,7 +9926,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (warned)
continue;
if (h != NULL
- && h->root.type == bfd_link_hash_undefweak
+ && h->elf.root.type == bfd_link_hash_undefweak
&& ppc64_elf_howto_table[r_type]->pc_relative)
{
/* Assume this is a call protected by other code that
@@ -8737,9 +9946,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name,
@@ -8761,20 +9970,25 @@ ppc64_elf_output_symbol_hook (struct bfd_link_info *info,
asection *input_sec,
struct elf_link_hash_entry *h)
{
- long *adjust;
+ long *opd_adjust, adjust;
bfd_vma value;
- if (h != NULL
- || input_sec == NULL
- || ppc64_elf_section_data (input_sec) == NULL
- || (adjust = ppc64_elf_section_data (input_sec)->opd.adjust) == NULL)
+ if (h != NULL)
+ return TRUE;
+
+ opd_adjust = get_opd_info (input_sec);
+ if (opd_adjust == NULL)
return TRUE;
value = elfsym->st_value - input_sec->output_offset;
if (!info->relocatable)
value -= input_sec->output_section->vma;
- elfsym->st_value += adjust[value / 24];
+ adjust = opd_adjust[value / 8];
+ if (adjust == -1)
+ elfsym->st_value = 0;
+ else
+ elfsym->st_value += adjust;
return TRUE;
}
@@ -8789,41 +10003,37 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd,
{
struct ppc_link_hash_table *htab;
bfd *dynobj;
+ struct plt_entry *ent;
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
htab = ppc_hash_table (info);
dynobj = htab->elf.dynobj;
- if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
- {
- struct plt_entry *ent;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- for (ent = h->plt.plist; ent != NULL; ent = ent->next)
- if (ent->plt.offset != (bfd_vma) -1)
- {
- /* This symbol has an entry in the procedure linkage
- table. Set it up. */
-
- if (htab->plt == NULL
- || htab->relplt == NULL
- || htab->glink == NULL)
- abort ();
-
- /* Create a JMP_SLOT reloc to inform the dynamic linker to
- fill in the PLT entry. */
- rela.r_offset = (htab->plt->output_section->vma
- + htab->plt->output_offset
- + ent->plt.offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
- rela.r_addend = ent->addend;
-
- loc = htab->relplt->contents;
- loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- * sizeof (Elf64_External_Rela));
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
- }
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.offset != (bfd_vma) -1)
+ {
+ /* This symbol has an entry in the procedure linkage
+ table. Set it up. */
+
+ if (htab->plt == NULL
+ || htab->relplt == NULL
+ || htab->glink == NULL)
+ abort ();
+
+ /* Create a JMP_SLOT reloc to inform the dynamic linker to
+ fill in the PLT entry. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
+ rela.r_addend = ent->addend;
+
+ loc = htab->relplt->contents;
+ loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
+ * sizeof (Elf64_External_Rela));
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
{
@@ -8899,7 +10109,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -8933,7 +10143,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (output_bfd, ".opd");
if (s == NULL)
continue;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_PLTGOT:
@@ -8947,7 +10157,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_PLTRELSZ:
- dyn.d_un.d_val = htab->relplt->_raw_size;
+ dyn.d_un.d_val = htab->relplt->size;
break;
case DT_RELASZ:
@@ -8956,7 +10166,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
s = htab->relplt;
if (s == NULL)
continue;
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
case DT_RELA:
@@ -8968,7 +10178,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
- dyn.d_un.d_ptr += s->_raw_size;
+ dyn.d_un.d_ptr += s->size;
break;
}
@@ -8976,7 +10186,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
}
}
- if (htab->got != NULL && htab->got->_raw_size != 0)
+ if (htab->got != NULL && htab->got->size != 0)
{
/* Fill in the first entry in the global offset table.
We use it to hold the link-time TOCbase. */
@@ -8988,7 +10198,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 8;
}
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->size != 0)
{
/* Set .plt entry size. */
elf_section_data (htab->plt->output_section)->this_hdr.sh_entsize
@@ -8996,25 +10206,30 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
}
/* We need to handle writing out multiple GOT sections ourselves,
- since we didn't add them to DYNOBJ. */
+ since we didn't add them to DYNOBJ. We know dynobj is the first
+ bfd. */
while ((dynobj = dynobj->link_next) != NULL)
{
asection *s;
+
+ if (!is_ppc64_elf_target (dynobj->xvec))
+ continue;
+
s = ppc64_elf_tdata (dynobj)->got;
if (s != NULL
- && s->_raw_size != 0
+ && s->size != 0
&& s->output_section != bfd_abs_section_ptr
&& !bfd_set_section_contents (output_bfd, s->output_section,
s->contents, s->output_offset,
- s->_raw_size))
+ s->size))
return FALSE;
s = ppc64_elf_tdata (dynobj)->relgot;
if (s != NULL
- && s->_raw_size != 0
+ && s->size != 0
&& s->output_section != bfd_abs_section_ptr
&& !bfd_set_section_contents (output_bfd, s->output_section,
s->contents, s->output_offset,
- s->_raw_size))
+ s->size))
return FALSE;
}
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 998e7e13e0e..4a58bbe71b0 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -1,5 +1,5 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,10 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
void ppc64_elf_init_stub_bfd
(bfd *, struct bfd_link_info *);
-bfd_boolean ppc64_elf_mark_entry_syms
- (struct bfd_link_info *);
bfd_boolean ppc64_elf_edit_opd
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, bfd_boolean);
asection *ppc64_elf_tls_setup
(bfd *, struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_optimize
@@ -42,3 +40,5 @@ bfd_boolean ppc64_elf_size_stubs
asection *(*) (const char *, asection *), void (*) (void));
bfd_boolean ppc64_elf_build_stubs
(bfd_boolean, struct bfd_link_info *, char **);
+void ppc64_elf_restore_symbols
+ (struct bfd_link_info *info);
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 63a261a8e88..821ea51fb4d 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -432,7 +432,7 @@ s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -933,8 +933,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd,
r_symndx);
return FALSE;
}
@@ -1119,8 +1119,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd), h->root.root.string);
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h->root.root.string);
return FALSE;
}
if (old_tls_type > tls_type)
@@ -1233,8 +1233,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1658,7 +1658,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelbss->size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1670,7 +1670,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -1679,10 +1679,10 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1733,10 +1733,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_FIRST_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_FIRST_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1751,14 +1751,14 @@ allocate_dynrelocs (h, inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
}
else
{
@@ -1788,8 +1788,8 @@ allocate_dynrelocs (h, inf)
to be stored somewhere. The immediate value in the instruction
is not bit enough so the value is stored in the got. */
{
- h->got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
}
else
h->got.offset = (bfd_vma) -1;
@@ -1810,24 +1810,24 @@ allocate_dynrelocs (h, inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
/* R_390_TLS_GD64 needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
/* R_390_TLS_IE64 needs one dynamic relocation,
R_390_TLS_GD64 needs one if local symbol and two if global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type >= GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf64_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1902,7 +1902,7 @@ allocate_dynrelocs (h, inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -1965,7 +1965,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -2004,7 +2004,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srela = elf_section_data (p->sec)->sreloc;
- srela->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srela->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2025,12 +2025,12 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared)
- srela->_raw_size += sizeof (Elf64_External_Rela);
+ srela->size += sizeof (Elf64_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2041,9 +2041,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
/* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM64
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -2069,7 +2069,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -2082,7 +2082,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -2103,7 +2103,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
section's contents are written out. This should not happen,
but this way if it does, we get a R_390_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -2124,7 +2124,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2201,9 +2201,9 @@ invalid_tls_insn (input_bfd, input_section, rel)
howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name);
}
@@ -2989,9 +2989,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -3039,9 +3039,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -3271,7 +3270,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3294,10 +3293,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -3309,10 +3305,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
other relocation sections, we don't have to worry
about changing the DT_RELA entry. */
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
}
@@ -3320,7 +3313,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
/* fill in blueprint for plt 0 entry */
bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD0,
@@ -3351,7 +3344,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_64 (output_bfd,
(sdyn == NULL ? (bfd_vma) 0
@@ -3369,6 +3362,17 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + PLT_FIRST_ENTRY_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+
/* Why was the hash table entry size definition changed from
ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and
this is the only reason for the s390_elf64_size_info structure. */
@@ -3438,6 +3442,7 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
+#define elf_backend_plt_sym_val elf_s390_plt_sym_val
#define bfd_elf64_mkobject elf_s390_mkobject
#define elf_backend_object_p elf_s390_object_p
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index ad6ca1c5037..ea6f4df34ea 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1593,9 +1593,8 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (howto->rightshift || howto->src_mask != 0xffffffff)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+ input_bfd, input_section,
(long) rel->r_offset, howto->name);
return FALSE;
}
@@ -2191,7 +2190,7 @@ sh_elf64_get_relocated_section_contents (bfd *output_bfd,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- input_section->_raw_size);
+ input_section->size);
if ((input_section->flags & SEC_RELOC) != 0
&& input_section->reloc_count > 0)
@@ -2619,7 +2618,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (hsh->datalabel_got_offset != (bfd_vma) -1)
break;
- hsh->datalabel_got_offset = sgot->_raw_size;
+ hsh->datalabel_got_offset = sgot->size;
}
else
{
@@ -2628,7 +2627,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* We have already allocated space in the .got. */
break;
}
- h->got.offset = sgot->_raw_size;
+ h->got.offset = sgot->size;
}
/* Make sure this symbol is output as a dynamic symbol. */
@@ -2638,7 +2637,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
return FALSE;
}
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ srelgot->size += sizeof (Elf64_External_Rela);
}
else
{
@@ -2671,7 +2670,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
}
local_got_offsets[symtab_hdr->sh_info
- + r_symndx] = sgot->_raw_size;
+ + r_symndx] = sgot->size;
}
else
{
@@ -2680,7 +2679,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* We have already allocated space in the .got. */
break;
}
- local_got_offsets[r_symndx] = sgot->_raw_size;
+ local_got_offsets[r_symndx] = sgot->size;
}
if (info->shared)
@@ -2688,11 +2687,11 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* If we are generating a shared object, we need to
output a R_SH_RELATIVE reloc so that the dynamic
linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ srelgot->size += sizeof (Elf64_External_Rela);
}
}
- sgot->_raw_size += 8;
+ sgot->size += 8;
break;
@@ -2809,7 +2808,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
}
}
- sreloc->_raw_size += sizeof (Elf64_External_Rela);
+ sreloc->size += sizeof (Elf64_External_Rela);
/* If we are linking with -Bsymbolic, and this is a
global symbol, we count the number of PC relative
@@ -3434,8 +3433,8 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -3446,26 +3445,26 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
}
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += elf_sh64_sizeof_plt (info);
+ s->size += elf_sh64_sizeof_plt (info);
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += 8;
+ s->size += 8;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf64_External_Rela);
+ s->size += sizeof (Elf64_External_Rela);
return TRUE;
}
@@ -3520,7 +3519,7 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -3531,8 +3530,7 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
power_of_two = 3;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -3541,10 +3539,10 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -3570,7 +3568,7 @@ sh64_elf64_discard_copies (struct elf_sh64_link_hash_entry *h,
return TRUE;
for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf64_External_Rela);
+ s->section->size -= s->count * sizeof (Elf64_External_Rela);
return TRUE;
}
@@ -3597,7 +3595,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -3610,7 +3608,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* If this is a -Bsymbolic shared link, then we need to discard all
@@ -3643,7 +3641,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
if (strcmp (name, ".plt") == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -3657,7 +3655,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -3714,8 +3712,8 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -3984,7 +3982,7 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
BFD_ASSERT (sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -4034,10 +4032,7 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -4053,12 +4048,7 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
+ dyn.d_un.d_val -= s->size;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
@@ -4066,7 +4056,7 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
/* Fill in the first entry in the procedure linkage table. */
splt = bfd_get_section_by_name (dynobj, ".plt");
- if (splt && splt->_raw_size > 0)
+ if (splt && splt->size > 0)
{
if (info->shared)
{
@@ -4102,7 +4092,7 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
}
/* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index dd3e4962e2f..ca35eecba2c 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -478,7 +478,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@@ -809,7 +809,7 @@ init_insn_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -1173,7 +1173,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
}
- h->got.offset = sgot->_raw_size;
+ h->got.offset = sgot->size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -1182,7 +1182,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
return FALSE;
}
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ srelgot->size += sizeof (Elf64_External_Rela);
}
else
{
@@ -1207,18 +1207,18 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
}
- local_got_offsets[r_symndx] = sgot->_raw_size;
+ local_got_offsets[r_symndx] = sgot->size;
if (info->shared)
{
/* If we are generating a shared object, we need to
output a R_SPARC_RELATIVE reloc so that the
dynamic linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ srelgot->size += sizeof (Elf64_External_Rela);
}
}
- sgot->_raw_size += 8;
+ sgot->size += 8;
#if 0
/* Doesn't work for 64-bit -fPIC, since sethi/or builds
@@ -1229,7 +1229,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* If the .got section is more than 0x1000 bytes, we add
0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
bit relocations have a greater chance of working. */
- if (sgot->_raw_size >= 0x1000
+ if (sgot->size >= 0x1000
&& elf_hash_table (info)->hgot->root.u.def.value == 0)
elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
#endif
@@ -1359,7 +1359,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
info->flags |= DF_TEXTREL;
}
- sreloc->_raw_size += sizeof (Elf64_External_Rela);
+ sreloc->size += sizeof (Elf64_External_Rela);
}
break;
@@ -1368,9 +1368,8 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
break;
default:
- (*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
- bfd_archive_filename (abfd),
- ELF64_R_TYPE_ID (rel->r_info));
+ (*_bfd_error_handler) (_("%B: check_relocs: unhandled reloc type %d"),
+ abfd, ELF64_R_TYPE_ID (rel->r_info));
return FALSE;
}
}
@@ -1405,8 +1404,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
case 6: reg -= 4; break;
default:
(*_bfd_error_handler)
- (_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
- bfd_archive_filename (abfd));
+ (_("%B: Only registers %%g[2367] can be declared using STT_REGISTER"),
+ abfd);
return FALSE;
}
@@ -1425,10 +1424,10 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (p->name != NULL && strcmp (p->name, *namep))
{
(*_bfd_error_handler)
- (_("Register %%g%d used incompatibly: %s in %s, previously %s in %s"),
- (int) sym->st_value,
- **namep ? *namep : "#scratch", bfd_archive_filename (abfd),
- *p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
+ (_("Register %%g%d used incompatibly: %s in %B, previously %s in %B"),
+ abfd, p->abfd, (int) sym->st_value,
+ **namep ? *namep : "#scratch",
+ *p->name ? p->name : "#scratch");
return FALSE;
}
@@ -1448,9 +1447,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"),
- *namep, bfd_archive_filename (abfd),
- stt_types[type], bfd_archive_filename (p->abfd));
+ (_("Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"),
+ abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
@@ -1494,9 +1492,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"),
- *namep, stt_types[type], bfd_archive_filename (abfd),
- bfd_archive_filename (p->abfd));
+ (_("Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"),
+ abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
}
@@ -1653,11 +1650,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
BFD_ASSERT (s != NULL);
/* The first four bit in .plt is reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = PLT_HEADER_SIZE;
+ if (s->size == 0)
+ s->size = PLT_HEADER_SIZE;
/* To simplify matters later, just store the plt index here. */
- h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
+ h->plt.offset = s->size / PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1672,18 +1669,18 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf64_External_Rela);
+ s->size += sizeof (Elf64_External_Rela);
/* The procedure linkage table size is bounded by the magnitude
of the offset we can describe in the entry. */
- if (s->_raw_size >= (bfd_vma)1 << 32)
+ if (s->size >= (bfd_vma)1 << 32)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1737,7 +1734,7 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1749,8 +1746,7 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
power_of_two = 4;
/* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@@ -1759,10 +1755,10 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1788,7 +1784,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1801,7 +1797,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
- s->_raw_size = 0;
+ s->size = 0;
}
/* The check_relocs and adjust_dynamic_symbol entry points have
@@ -1824,7 +1820,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -1863,8 +1859,8 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
/* Allocate memory for the section contents. Zero the memory
for the benefit of .rela.plt, which has 4 unused entries
at the beginning, and we don't want garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
}
@@ -2028,6 +2024,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
got_base = elf_hash_table (info)->hgot->root.u.def.value;
sgot = splt = sreloc = NULL;
+ if (dynobj != NULL)
+ splt = bfd_get_section_by_name (dynobj, ".plt");
rel = relocs;
relend = relocs + NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr);
@@ -2211,6 +2209,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
+ /* FIXME: Dynamic reloc handling really needs to be rewritten. */
+ if (!skip
+ && h != NULL
+ && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak)
+ skip = TRUE, relocate = TRUE;
+
if (skip)
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if the symbol was marked to
@@ -2267,8 +2272,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
BFD_FAIL ();
(*_bfd_error_handler)
- (_("%s: probably compiled without -fPIC?"),
- bfd_archive_filename (input_bfd));
+ (_("%B: probably compiled without -fPIC?"),
+ input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2409,7 +2414,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
procedure linkage table. */
BFD_ASSERT (h != NULL);
- if (h->plt.offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1 || splt == NULL)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -2417,12 +2422,6 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
goto do_default;
}
- if (splt == NULL)
- {
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL);
- }
-
relocation = (splt->output_section->vma
+ splt->output_offset
+ sparc64_elf_plt_entry_offset (h->plt.offset));
@@ -2514,7 +2513,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_WDISP30:
do_wplt30:
if (sec_do_relax (input_section)
- && rel->r_offset + 4 < input_section->_raw_size)
+ && rel->r_offset + 4 < input_section->size)
{
#define G0 0
#define O7 15
@@ -2617,9 +2616,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd, input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -2721,7 +2719,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
- bfd_vma max = splt->_raw_size / PLT_ENTRY_SIZE;
+ bfd_vma max = splt->size / PLT_ENTRY_SIZE;
rela.r_offset = sparc64_elf_plt_ptr_offset (h->plt.offset, max);
rela.r_addend = -(sparc64_elf_plt_entry_offset (h->plt.offset) + 4)
-(splt->output_section->vma + splt->output_offset);
@@ -2854,7 +2852,7 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2894,21 +2892,16 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
if (! size)
dyn.d_un.d_ptr = s->vma;
else
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- }
+ dyn.d_un.d_val = s->size;
}
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
}
}
/* Initialize the contents of the .plt section. */
- if (splt->_raw_size > 0)
+ if (splt->size > 0)
sparc64_elf_build_plt (output_bfd, splt->contents,
- (int) (splt->_raw_size / PLT_ENTRY_SIZE));
+ (int) (splt->size / PLT_ENTRY_SIZE));
elf_section_data (splt->output_section)->this_hdr.sh_entsize =
PLT_ENTRY_SIZE;
@@ -2918,7 +2911,7 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
the dynamic section. */
sgot = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (sgot != NULL);
- if (sgot->_raw_size > 0)
+ if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
@@ -3006,8 +2999,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: linking UltraSPARC specific with HAL specific code"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking UltraSPARC specific with HAL specific code"),
+ ibfd);
}
/* Choose the most restrictive memory ordering. */
old_mm = (old_flags & EF_SPARCV9_MM);
@@ -3025,8 +3018,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (long) new_flags, (long) old_flags);
}
elf_elfheader (obfd)->e_flags = old_flags;
@@ -3104,6 +3097,24 @@ sparc64_elf_object_p (abfd)
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+sparc64_elf_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ bfd_vma j;
+
+ i += PLT_HEADER_SIZE / PLT_ENTRY_SIZE;
+ if (i < LARGE_PLT_THRESHOLD)
+ return plt->vma + i * PLT_ENTRY_SIZE;
+
+ j = (i - LARGE_PLT_THRESHOLD) % 160;
+ i -= j;
+ return plt->vma + i * PLT_ENTRY_SIZE + j * 4 * 6;
+}
+
/* Relocations in the 64 bit SPARC ELF ABI are more complex than in
standard ELF, because R_SPARC_OLO10 has secondary addend in
ELF64_R_TYPE_DATA field. This structure is used to redirect the
@@ -3203,6 +3214,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_merge_private_bfd_data
#define elf_backend_fake_sections \
sparc64_elf_fake_sections
+#define elf_backend_plt_sym_val \
+ sparc64_elf_plt_sym_val
#define elf_backend_size_info \
sparc64_elf_size_info
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index a1d62501f96..a5c5c9fedca 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -195,7 +195,7 @@ static bfd_boolean
elf64_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- size_t raw_size;
+ size_t size;
switch (note->descsz)
{
@@ -213,14 +213,14 @@ elf64_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 216;
+ size = 216;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -561,7 +561,8 @@ elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
(ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
| ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
+ | ELF_LINK_HASH_NEEDS_PLT
+ | ELF_LINK_POINTER_EQUALITY_NEEDED));
else
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
@@ -640,9 +641,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
@@ -662,9 +662,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
- x86_64_elf_howto_table[r_type].name);
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ abfd,
+ x86_64_elf_howto_table[r_type].name,
+ (h) ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -729,9 +730,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
else
{
(*_bfd_error_handler)
- (_("%s: %s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd),
- h ? h->root.root.string : "<local>");
+ (_("%B: %s' accessed both as normal and thread local symbol"),
+ abfd, h ? h->root.root.string : "<local>");
return FALSE;
}
}
@@ -787,9 +787,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
&& (sec->flags & SEC_READONLY) != 0)
{
(*_bfd_error_handler)
- (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
- x86_64_elf_howto_table[r_type].name);
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ abfd,
+ x86_64_elf_howto_table[r_type].name,
+ (h) ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -812,6 +813,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
h->plt.refcount += 1;
+ if (r_type != R_X86_64_PC32)
+ h->elf_link_hash_flags |= ELF_LINK_POINTER_EQUALITY_NEEDED;
}
/* If we are creating a shared library, and this is a reloc
@@ -876,8 +879,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1226,7 +1229,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelbss->size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -1241,7 +1244,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@@ -1250,10 +1253,10 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1297,10 +1300,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1315,14 +1318,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
}
else
{
@@ -1359,25 +1362,25 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
/* R_X86_64_TLSGD needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
/* R_X86_64_TLSGD needs one dynamic relocation if local symbol
and two if global.
R_X86_64_GOTTPOFF needs one dynamic relocation. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type == GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf64_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1458,7 +1461,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -1518,7 +1521,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1557,7 +1560,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srel->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
@@ -1579,14 +1582,14 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared
|| *local_tls_type == GOT_TLS_GD
|| *local_tls_type == GOT_TLS_IE)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -1597,9 +1600,9 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Allocate 2 got entries and 1 dynamic reloc for R_X86_64_TLSLD
relocs. */
- htab->tls_ld_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->tls_ld_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
htab->tls_ld_got.offset = -1;
@@ -1625,7 +1628,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -1638,7 +1641,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -1659,7 +1662,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
section's contents are written out. This should not happen,
but this way if it does, we get a R_X86_64_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1680,7 +1683,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -1908,9 +1911,11 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (off >= (bfd_vma) -2)
abort ();
- relocation = htab->sgot->output_offset + off;
- if (r_type == R_X86_64_GOTPCREL)
- relocation += htab->sgot->output_section->vma;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off;
+ if (r_type != R_X86_64_GOTPCREL)
+ relocation -= htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
break;
@@ -1941,6 +1946,21 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_X86_64_PC8:
case R_X86_64_PC16:
case R_X86_64_PC32:
+ if (info->shared
+ && !SYMBOL_REFERENCES_LOCAL (info, h)
+ && (input_section->flags & SEC_ALLOC) != 0
+ && (input_section->flags & SEC_READONLY) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ input_bfd,
+ x86_64_elf_howto_table[r_type].name,
+ (h) ? h->root.root.string : "a local symbol");
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ /* Fall through. */
+
case R_X86_64_8:
case R_X86_64_16:
case R_X86_64_32:
@@ -2105,7 +2125,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset - 4 + i)
== tlsgd[i]);
- BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 12 <= input_section->size);
for (i = 0; i < 4; i++)
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4 + i)
@@ -2141,7 +2161,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
reg = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT ((reg & 0xc7) == 5);
reg >>= 3;
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
if (type == 0x8b)
{
/* movq */
@@ -2278,7 +2298,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset - 4 + i)
== tlsgd[i]);
- BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 12 <= input_section->size);
for (i = 0; i < 4; i++)
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4 + i)
@@ -2318,7 +2338,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
== 0x8d);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 1)
== 0x3d);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2386,9 +2406,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
h->root.root.string);
@@ -2415,6 +2435,11 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (r == bfd_reloc_overflow)
{
+ if (h != NULL
+ && h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ /* Ignore reloc overflow on branches to undefweak syms. */
+ continue;
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0,
@@ -2424,9 +2449,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -2519,11 +2543,16 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
/* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. This is a clue
+ the .plt section. Leave the value if there were any
+ relocations where pointer equality matters (this is a clue
for the dynamic linker, to make function pointer
comparisons work between an application and shared
- library. */
+ library), otherwise set it to zero. If a function is only
+ called from a binary, there is no need to slow down
+ shared libraries because of that. */
sym->st_shndx = SHN_UNDEF;
+ if ((h->elf_link_hash_flags & ELF_LINK_POINTER_EQUALITY_NEEDED) == 0)
+ sym->st_value = 0;
}
}
@@ -2642,7 +2671,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2656,7 +2685,8 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
continue;
case DT_PLTGOT:
- dyn.d_un.d_ptr = htab->sgot->output_section->vma;
+ s = htab->sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
@@ -2665,10 +2695,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -2682,10 +2709,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
if (htab->srelplt != NULL)
{
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
}
break;
}
@@ -2694,7 +2718,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
/* Fill in the first entry in the procedure linkage table. */
memcpy (htab->splt->contents, elf64_x86_64_plt0_entry,
@@ -2728,7 +2752,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
/* Set the first entry in the global offset table to the address of
the dynamic section. */
@@ -2747,9 +2771,22 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
GOT_ENTRY_SIZE;
}
+ if (htab->sgot && htab->sgot->size > 0)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize
+ = GOT_ENTRY_SIZE;
+
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf64_x86_64_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
#define TARGET_LITTLE_NAME "elf64-x86-64"
@@ -2784,6 +2821,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
#define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class
#define elf_backend_relocate_section elf64_x86_64_relocate_section
#define elf_backend_size_dynamic_sections elf64_x86_64_size_dynamic_sections
+#define elf_backend_plt_sym_val elf64_x86_64_plt_sym_val
#define elf_backend_object_p elf64_x86_64_elf_object_p
#define bfd_elf64_mkobject elf64_x86_64_mkobject
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c
index 961a52a0ccb..aef15d47c59 100644
--- a/bfd/elfarm-nabi.c
+++ b/bfd/elfarm-nabi.c
@@ -29,11 +29,6 @@
#define USE_REL 1
-#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
-#define TARGET_LITTLE_NAME "elf32-littlearm"
-#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
-#define TARGET_BIG_NAME "elf32-bigarm"
-
#define elf_info_to_howto 0
#define elf_info_to_howto_rel elf32_arm_info_to_howto
@@ -188,16 +183,16 @@ static reloc_howto_type elf32_arm_howto_table[] =
HOWTO (R_ARM_SBREL32, /* type */
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_SBREL32", /* name */
FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC22, /* type */
@@ -557,6 +552,90 @@ static reloc_howto_type elf32_arm_howto_table[] =
0x00000fff, /* src_mask */
0x00000fff, /* dst_mask */
TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_SBREL_11_0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_SBREL_11_0",/* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SBREL_19_12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 12, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SBREL_19_12",/* name */
+ FALSE, /* partial_inplace */
+ 0x000ff000, /* src_mask */
+ 0x000ff000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SBREL_27_20, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 20, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SBREL_27_20",/* name */
+ FALSE, /* partial_inplace */
+ 0x0ff00000, /* src_mask */
+ 0x0ff00000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TARGET1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TARGET1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ROSEGREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ROSEGREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_V4BX, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_V4BX", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* GNU extension to record C++ vtable hierarchy */
@@ -689,7 +768,10 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
{BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF},
{BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
{BFD_RELOC_ARM_GOT32, R_ARM_GOT32},
- {BFD_RELOC_ARM_PLT32, R_ARM_PLT32}
+ {BFD_RELOC_ARM_PLT32, R_ARM_PLT32},
+ {BFD_RELOC_ARM_TARGET1, R_ARM_TARGET1},
+ {BFD_RELOC_ARM_ROSEGREL32, R_ARM_ROSEGREL32},
+ {BFD_RELOC_ARM_SBREL32, R_ARM_SBREL32}
};
static reloc_howto_type *
@@ -729,7 +811,7 @@ elf32_arm_nabi_grok_prstatus (abfd, note)
Elf_Internal_Note *note;
{
int offset;
- size_t raw_size;
+ size_t size;
switch (note->descsz)
{
@@ -745,14 +827,14 @@ elf32_arm_nabi_grok_prstatus (abfd, note)
/* pr_reg */
offset = 72;
- raw_size = 72;
+ size = 72;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -787,7 +869,124 @@ elf32_arm_nabi_grok_psinfo (abfd, note)
return TRUE;
}
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
+#define TARGET_BIG_NAME "elf32-bigarm"
+
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
#include "elf32-arm.h"
+
+/* Symbian OS Targets */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_symbian_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-littlearm-symbian"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarm_symbian_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-bigarm-symbian"
+
+/* Like elf32_arm_link_hash_table_create -- but overrides
+ appropriately for Symbian OS. */
+static struct bfd_link_hash_table *
+elf32_arm_symbian_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = elf32_arm_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct elf32_arm_link_hash_table *htab
+ = (struct elf32_arm_link_hash_table *)ret;
+ /* There is no PLT header for Symbian OS. */
+ htab->plt_header_size = 0;
+ /* The PLT entries are each three instructions. */
+ htab->plt_entry_size = 4 * NUM_ELEM (elf32_arm_symbian_plt_entry);
+ htab->symbian_p = 1;
+ }
+ return ret;
+}
+
+/* In a BPABI executable, the dynamic linking sections do not go in
+ the loadable read-only segment. The post-linker may wish to refer
+ to these sections, but they are not part of the final program
+ image. */
+static struct bfd_elf_special_section const
+ elf32_arm_symbian_special_sections[]=
+{
+ { ".dynamic", 8, 0, SHT_DYNAMIC, 0 },
+ { ".dynstr", 7, 0, SHT_STRTAB, 0 },
+ { ".dynsym", 7, 0, SHT_DYNSYM, 0 },
+ { ".got", 4, 0, SHT_PROGBITS, 0 },
+ { ".hash", 5, 0, SHT_HASH, 0 },
+ { NULL, 0, 0, 0, 0 }
+};
+
+static bfd_boolean
+elf32_arm_symbian_modify_segment_map
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+static bfd_boolean
+elf32_arm_symbian_modify_segment_map (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ struct elf_segment_map *m;
+ asection *dynsec;
+
+ /* The first PT_LOAD segment will have the program headers and file
+ headers in it by default -- but BPABI object files should not
+ include these headers in any loadable segment. */
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_LOAD)
+ {
+ m->includes_filehdr = 0;
+ m->includes_phdrs = 0;
+ }
+
+ /* BPABI shared libraries and executables should have a PT_DYNAMIC
+ segment. However, because the .dynamic section is not marked
+ with SEC_LOAD, the generic ELF code will not create such a
+ segment. */
+ dynsec = bfd_get_section_by_name (abfd, ".dynamic");
+ if (dynsec)
+ {
+ m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
+ m->next = elf_tdata (abfd)->segment_map;
+ elf_tdata (abfd)->segment_map = m;
+ }
+
+ return TRUE;
+}
+
+#undef elf32_bed
+#define elf32_bed elf32_arm_symbian_bed
+
+#undef ELF_DYNAMIC_SEC_FLAGS
+#define ELF_DYNAMIC_SEC_FLAGS \
+ (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED)
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_arm_symbian_link_hash_table_create
+
+#undef elf_backend_special_sections
+#define elf_backend_special_sections elf32_arm_symbian_special_sections
+
+#undef elf_backend_modify_segment_map
+#define elf_backend_modify_segment_map elf32_arm_symbian_modify_segment_map
+
+/* There is no .got section for BPABI objects, and hence no header. */
+#undef elf_backend_got_header_size
+#define elf_backend_got_header_size 0
+
+/* Similarly, there is no .got.plt section. */
+#undef elf_backend_want_got_plt
+#define elf_backend_want_got_plt 0
+
+#include "elf32-target.h"
+
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index bc69d48db4d..7ab97bfce96 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1,6 +1,6 @@
/* ELF executable support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -105,6 +105,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_canonicalize_symtab NAME(bfd_elf,canonicalize_symtab)
#define elf_canonicalize_dynamic_symtab \
NAME(bfd_elf,canonicalize_dynamic_symtab)
+#define elf_get_synthetic_symtab \
+ NAME(bfd_elf,get_synthetic_symtab)
#define elf_make_empty_symbol NAME(bfd_elf,make_empty_symbol)
#define elf_get_symbol_info NAME(bfd_elf,get_symbol_info)
#define elf_get_lineno NAME(bfd_elf,get_lineno)
@@ -740,6 +742,10 @@ elf_object_p (bfd *abfd)
if (shindex == SHN_LORESERVE - 1)
shindex += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
+
+ /* Set up group pointers. */
+ if (! _bfd_elf_setup_group_pointers (abfd))
+ goto got_wrong_format_error;
}
/* Let the backend double check the format and override global
@@ -1353,7 +1359,7 @@ elf_slurp_reloc_table (bfd *abfd,
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 5c8072ad25e..e4e8dcc7212 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_SIZE 0
#include "elf-bfd.h"
#include "safe-ctype.h"
+#include "libiberty.h"
bfd_boolean
_bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
@@ -56,8 +57,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
+ flags = bed->dynamic_sec_flags;
s = bfd_make_section (abfd, ".got");
if (s == NULL
@@ -97,7 +97,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
}
/* The first bit of the global offset table is the header. */
- s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
+ s->size += bed->got_header_size + bed->got_symbol_offset;
return TRUE;
}
@@ -130,10 +130,9 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
else
abfd = elf_hash_table (info)->dynobj;
- /* Note that we set the SEC_IN_MEMORY flag for all of these
- sections. */
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ bed = get_elf_backend_data (abfd);
+
+ flags = bed->dynamic_sec_flags;
/* A dynamically linked executable has a .interp section, but a
shared library does not. */
@@ -155,8 +154,6 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
elf_hash_table (info)->eh_info.hdr_sec = s;
}
- bed = get_elf_backend_data (abfd);
-
/* Create sections to hold version informations. These are removed
if they are not needed. */
s = bfd_make_section (abfd, ".gnu.version_d");
@@ -252,9 +249,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
+ flags = bed->dynamic_sec_flags;
pltflags = flags;
pltflags |= SEC_CODE;
@@ -433,7 +428,12 @@ bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Since we're defining the symbol, don't let it seem to have not
been defined. record_dynamic_symbol and size_dynamic_sections
- may depend on this. */
+ may depend on this.
+ ??? Changing bfd_link_hash_undefined to bfd_link_hash_new (or
+ to bfd_link_hash_undefweak, see linker.c:link_action) runs the risk
+ of some later symbol manipulation setting the symbol back to
+ bfd_link_hash_undefined, and the linker trying to add the symbol to
+ the undefs list twice. */
if (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)
h->root.type = bfd_link_hash_new;
@@ -607,6 +607,43 @@ elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h,
return TRUE;
}
+/* Return true if the dynamic symbol for a given section should be
+ omitted when creating a shared library. */
+bfd_boolean
+_bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ asection *p)
+{
+ switch (elf_section_data (p)->this_hdr.sh_type)
+ {
+ case SHT_PROGBITS:
+ case SHT_NOBITS:
+ /* If sh_type is yet undecided, assume it could be
+ SHT_PROGBITS/SHT_NOBITS. */
+ case SHT_NULL:
+ if (strcmp (p->name, ".got") == 0
+ || strcmp (p->name, ".got.plt") == 0
+ || strcmp (p->name, ".plt") == 0)
+ {
+ asection *ip;
+ bfd *dynobj = elf_hash_table (info)->dynobj;
+
+ if (dynobj != NULL
+ && (ip = bfd_get_section_by_name (dynobj, p->name))
+ != NULL
+ && (ip->flags & SEC_LINKER_CREATED)
+ && ip->output_section == p)
+ return TRUE;
+ }
+ return FALSE;
+
+ /* There shouldn't be section relative relocations
+ against any other section. */
+ default:
+ return TRUE;
+ }
+}
+
/* Assign dynsym indices. In a shared library we generate a section
symbol for each output section, which come first. Next come all of
the back-end allocated local dynamic syms, followed by the rest of
@@ -619,9 +656,12 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
if (info->shared)
{
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
asection *p;
for (p = output_bfd->sections; p ; p = p->next)
- if ((p->flags & SEC_EXCLUDE) == 0)
+ if ((p->flags & SEC_EXCLUDE) == 0
+ && (p->flags & SEC_ALLOC) != 0
+ && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
elf_section_data (p)->dynindx = ++dynsymcount;
}
@@ -886,16 +926,20 @@ _bfd_elf_merge_symbol (bfd *abfd,
oldweak = (h->root.type == bfd_link_hash_defweak
|| h->root.type == bfd_link_hash_undefweak);
- /* If a new weak symbol comes from a regular file and the old symbol
- comes from a dynamic library, we treat the new one as strong.
- Similarly, an old weak symbol from a regular file is treated as
- strong when the new symbol comes from a dynamic library. Further,
- an old weak symbol from a dynamic library is treated as strong if
- the new symbol is from a dynamic library. This reflects the way
- glibc's ld.so works. */
- if (!newdyn && olddyn)
+ /* If a new weak symbol definition comes from a regular file and the
+ old symbol comes from a dynamic library, we treat the new one as
+ strong. Similarly, an old weak symbol definition from a regular
+ file is treated as strong when the new symbol comes from a dynamic
+ library. Further, an old weak symbol from a dynamic library is
+ treated as strong if the new symbol is from a dynamic library.
+ This reflects the way glibc's ld.so works.
+
+ Do this before setting *type_change_ok or *size_change_ok so that
+ we warn properly when dynamic library symbols are overridden. */
+
+ if (newdef && !newdyn && olddyn)
newweak = FALSE;
- if (newdyn)
+ if (olddef && newdyn)
oldweak = FALSE;
/* It's OK to change the type if either the existing symbol or the
@@ -1347,8 +1391,8 @@ nondefault:
if (hi->root.type != bfd_link_hash_defined
&& hi->root.type != bfd_link_hash_defweak)
(*_bfd_error_handler)
- (_("%s: warning: unexpected redefinition of indirect versioned symbol `%s'"),
- bfd_archive_filename (abfd), shortname);
+ (_("%B: unexpected redefinition of indirect versioned symbol `%s'"),
+ abfd, shortname);
}
else
{
@@ -1666,8 +1710,8 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
/* We could not find the version for a symbol when
generating a shared archive. Return an error. */
(*_bfd_error_handler)
- (_("%s: undefined versioned symbol name %s"),
- bfd_get_filename (sinfo->output_bfd), h->root.root.string);
+ (_("%B: undefined versioned symbol name %s"),
+ sinfo->output_bfd, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = TRUE;
return FALSE;
@@ -1815,9 +1859,10 @@ elf_link_read_relocs_from_section (bfd *abfd,
if ((size_t) r_symndx >= nsyms)
{
(*_bfd_error_handler)
- (_("%s: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%s'"),
- bfd_archive_filename (abfd), (unsigned long) r_symndx,
- (unsigned long) nsyms, irela->r_offset, sec->name);
+ (_("%B: bad reloc symbol index (0x%lx >= 0x%lx)"
+ " for offset 0x%lx in section `%A'"),
+ abfd, sec,
+ (unsigned long) r_symndx, (unsigned long) nsyms, irela->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2004,10 +2049,8 @@ _bfd_elf_link_output_relocs (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s: relocation size mismatch in %s section %s"),
- bfd_get_filename (output_bfd),
- bfd_archive_filename (input_section->owner),
- input_section->name);
+ (_("%B: relocation size mismatch in %B section %A"),
+ output_bfd, input_section->owner, input_section);
bfd_set_error (bfd_error_wrong_object_format);
return FALSE;
}
@@ -2329,7 +2372,7 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data)
_bfd_merged_section_offset (output_bfd,
&h->root.u.def.section,
elf_section_data (sec)->sec_info,
- h->root.u.def.value, 0);
+ h->root.u.def.value);
}
return TRUE;
@@ -2404,9 +2447,13 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
if (h == NULL)
return TRUE;
+ /* Common symbols that become definitions don't get the DEF_REGULAR
+ flag set, so test it first, and don't bail out. */
+ if (ELF_COMMON_DEF_P (h))
+ /* Do nothing. */;
/* If we don't have a definition in a regular file, then we can't
resolve locally. The sym is either undefined or dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
return FALSE;
/* Forced local symbols resolve locally. */
@@ -2608,16 +2655,16 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info,
s = bfd_get_section_by_name (hash_table->dynobj, ".dynamic");
BFD_ASSERT (s != NULL);
- newsize = s->_raw_size + bed->s->sizeof_dyn;
+ newsize = s->size + bed->s->sizeof_dyn;
newcontents = bfd_realloc (s->contents, newsize);
if (newcontents == NULL)
return FALSE;
dyn.d_tag = tag;
dyn.d_un.d_val = val;
- bed->s->swap_dyn_out (hash_table->dynobj, &dyn, newcontents + s->_raw_size);
+ bed->s->swap_dyn_out (hash_table->dynobj, &dyn, newcontents + s->size);
- s->_raw_size = newsize;
+ s->size = newsize;
s->contents = newcontents;
return TRUE;
@@ -2653,7 +2700,7 @@ elf_add_dt_needed_tag (struct bfd_link_info *info,
BFD_ASSERT (sdyn != NULL);
for (extdyn = sdyn->contents;
- extdyn < sdyn->contents + sdyn->_raw_size;
+ extdyn < sdyn->contents + sdyn->size;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -2695,7 +2742,7 @@ elf_sort_symbol (const void *arg1, const void *arg2)
return vdiff > 0 ? 1 : -1;
else
{
- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
if (sdiff != 0)
return sdiff > 0 ? 1 : -1;
}
@@ -2742,7 +2789,7 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info)
/* Update all .dynamic entries referencing .dynstr strings. */
for (extdyn = sdyn->contents;
- extdyn < sdyn->contents + sdyn->_raw_size;
+ extdyn < sdyn->contents + sdyn->size;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -2852,6 +2899,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
const char **, flagword *, asection **, bfd_vma *);
bfd_boolean (*check_relocs)
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
+ bfd_boolean (*check_directives)
+ (bfd *, struct bfd_link_info *);
bfd_boolean collect;
Elf_Internal_Shdr *hdr;
bfd_size_type symcount;
@@ -2891,7 +2940,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|| !is_elf_hash_table (hash_table)
|| hash_table->root.creator != abfd->xvec)
{
- bfd_set_error (bfd_error_invalid_operation);
+ if (info->relocatable)
+ bfd_set_error (bfd_error_invalid_operation);
+ else
+ bfd_set_error (bfd_error_wrong_format);
goto error_return;
}
}
@@ -2942,12 +2994,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* We don't want to issue this warning. Clobber
the section size so that the warning does not
get copied into the output file. */
- s->_raw_size = 0;
+ s->size = 0;
continue;
}
}
- sz = bfd_section_size (abfd, s);
+ sz = s->size;
prefix_len = strlen (gnu_warning_prefix);
msg = bfd_alloc (abfd, prefix_len + sz + 1);
if (msg == NULL)
@@ -2968,7 +3020,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
/* Clobber the section size so that the warning does
not get copied into the output file. */
- s->_raw_size = 0;
+ s->size = 0;
}
}
}
@@ -3010,8 +3062,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* If this dynamic lib was specified on the command line with
--as-needed in effect, then we don't want to add a DT_NEEDED
tag unless the lib is actually used. Similary for libs brought
- in by another lib's DT_NEEDED. */
- add_needed = elf_dyn_lib_class (abfd) == DYN_NORMAL;
+ in by another lib's DT_NEEDED. When --no-add-needed is used
+ on a dynamic lib, we don't want to add a DT_NEEDED entry for
+ any dynamic library in DT_NEEDED tags in the dynamic lib at
+ all. */
+ add_needed = (elf_dyn_lib_class (abfd)
+ & (DYN_AS_NEEDED | DYN_DT_NEEDED
+ | DYN_NO_NEEDED)) == 0;
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
@@ -3021,11 +3078,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
int elfsec;
unsigned long shlink;
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_free_dyn;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -3034,7 +3087,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
shlink = elf_elfsections (abfd)[elfsec]->sh_link;
for (extdyn = dynbuf;
- extdyn < dynbuf + s->_raw_size;
+ extdyn < dynbuf + s->size;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -3408,8 +3461,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
{
(*_bfd_error_handler)
- (_("%s: %s: invalid version %u (max %d)"),
- bfd_archive_filename (abfd), name, vernum,
+ (_("%B: %s: invalid version %u (max %d)"),
+ abfd, name, vernum,
elf_tdata (abfd)->dynverdef_hdr.sh_info);
bfd_set_error (bfd_error_bad_value);
goto error_free_vers;
@@ -3449,8 +3502,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (verstr == NULL)
{
(*_bfd_error_handler)
- (_("%s: %s: invalid needed version %d"),
- bfd_archive_filename (abfd), name, vernum);
+ (_("%B: %s: invalid needed version %d"),
+ abfd, name, vernum);
bfd_set_error (bfd_error_bad_value);
goto error_free_vers;
}
@@ -3624,12 +3677,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (normal_align < common_align)
(*_bfd_error_handler)
- (_("Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"),
- 1 << normal_align,
- name,
- bfd_archive_filename (normal_bfd),
- 1 << common_align,
- bfd_archive_filename (common_bfd));
+ (_("Warning: alignment %u of symbol `%s' in %B"
+ " is smaller than %u in %B"),
+ normal_bfd, common_bfd,
+ 1 << normal_align, name, 1 << common_align);
}
/* Remember the symbol size and type. */
@@ -3638,11 +3689,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
if (h->size != 0 && h->size != isym->st_size && ! size_change_ok)
(*_bfd_error_handler)
- (_("Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"),
+ (_("Warning: size of symbol `%s' changed"
+ " from %lu in %B to %lu in %B"),
+ old_bfd, abfd,
name, (unsigned long) h->size,
- bfd_archive_filename (old_bfd),
- (unsigned long) isym->st_size,
- bfd_archive_filename (abfd));
+ (unsigned long) isym->st_size);
h->size = isym->st_size;
}
@@ -3662,9 +3713,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
&& h->type != ELF_ST_TYPE (isym->st_info)
&& ! type_change_ok)
(*_bfd_error_handler)
- (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
- name, h->type, ELF_ST_TYPE (isym->st_info),
- bfd_archive_filename (abfd));
+ (_("Warning: type of symbol `%s' changed"
+ " from %d to %d in %B"),
+ abfd, name, h->type, ELF_ST_TYPE (isym->st_info));
h->type = ELF_ST_TYPE (isym->st_info);
}
@@ -3796,7 +3847,17 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* A symbol from a library loaded via DT_NEEDED of some
other library is referenced by a regular object.
- Add a DT_NEEDED entry for it. */
+ Add a DT_NEEDED entry for it. Issue an error if
+ --no-add-needed is used. */
+ if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%s: invalid DSO for symbol `%s' definition"),
+ abfd, name);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_free_vers;
+ }
+
add_needed = TRUE;
ret = elf_add_dt_needed_tag (info, soname, add_needed);
if (ret < 0)
@@ -3949,7 +4010,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
i = idx + 1;
else
{
- long sdiff = slook - h->root.u.def.section;
+ long sdiff = slook->id - h->root.u.def.section->id;
if (sdiff < 0)
j = idx;
else if (sdiff > 0)
@@ -4005,6 +4066,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
free (sorted_sym_hash);
}
+ check_directives = get_elf_backend_data (abfd)->check_directives;
+ if (check_directives)
+ check_directives (abfd, info);
+
/* If this object is the same format as the output object, and it is
not a shared library, then let the backend look through the
relocs.
@@ -4083,7 +4148,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
secdata = elf_section_data (stab);
if (! _bfd_link_section_stabs (abfd,
- & hash_table->stab_info,
+ &hash_table->stab_info,
stab, stabstr,
&secdata->sec_info,
&string_offset))
@@ -4094,28 +4159,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
}
- if (! info->relocatable
- && ! dynamic
- && is_elf_hash_table (hash_table))
- {
- asection *s;
-
- for (s = abfd->sections; s != NULL; s = s->next)
- if ((s->flags & SEC_MERGE) != 0
- && !bfd_is_abs_section (s->output_section))
- {
- struct bfd_elf_section_data *secdata;
-
- secdata = elf_section_data (s);
- if (! _bfd_merge_section (abfd,
- & hash_table->merge_info,
- s, &secdata->sec_info))
- goto error_return;
- else if (secdata->sec_info)
- s->sec_info_type = ELF_INFO_TYPE_MERGE;
- }
- }
-
if (is_elf_hash_table (hash_table))
{
/* Add this bfd to the loaded list. */
@@ -4143,6 +4186,55 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
+/* Return the linker hash table entry of a symbol that might be
+ satisfied by an archive symbol. Return -1 on error. */
+
+struct elf_link_hash_entry *
+_bfd_elf_archive_symbol_lookup (bfd *abfd,
+ struct bfd_link_info *info,
+ const char *name)
+{
+ struct elf_link_hash_entry *h;
+ char *p, *copy;
+ size_t len, first;
+
+ h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE);
+ if (h != NULL)
+ return h;
+
+ /* If this is a default version (the name contains @@), look up the
+ symbol again with only one `@' as well as without the version.
+ The effect is that references to the symbol with and without the
+ version will be matched by the default symbol in the archive. */
+
+ p = strchr (name, ELF_VER_CHR);
+ if (p == NULL || p[1] != ELF_VER_CHR)
+ return h;
+
+ /* First check with only one `@'. */
+ len = strlen (name);
+ copy = bfd_alloc (abfd, len);
+ if (copy == NULL)
+ return (struct elf_link_hash_entry *) 0 - 1;
+
+ first = p - name + 1;
+ memcpy (copy, name, first);
+ memcpy (copy + first, name + first + 1, len - first);
+
+ h = elf_link_hash_lookup (elf_hash_table (info), copy, FALSE, FALSE, FALSE);
+ if (h == NULL)
+ {
+ /* We also need to check references to the symbol without the
+ version. */
+ copy[first - 1] = '\0';
+ h = elf_link_hash_lookup (elf_hash_table (info), copy,
+ FALSE, FALSE, FALSE);
+ }
+
+ bfd_release (abfd, copy);
+ return h;
+}
+
/* Add symbols from an ELF archive file to the linker hash table. We
don't use _bfd_generic_link_add_archive_symbols because of a
problem which arises on UnixWare. The UnixWare libc.so is an
@@ -4177,6 +4269,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
carsym *symdefs;
bfd_boolean loop;
bfd_size_type amt;
+ const struct elf_backend_data *bed;
+ struct elf_link_hash_entry * (*archive_symbol_lookup)
+ (bfd *, struct bfd_link_info *, const char *);
if (! bfd_has_map (abfd))
{
@@ -4201,6 +4296,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
goto error_return;
symdefs = bfd_ardata (abfd)->symdefs;
+ bed = get_elf_backend_data (abfd);
+ archive_symbol_lookup = bed->elf_backend_archive_symbol_lookup;
do
{
@@ -4229,48 +4326,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
continue;
}
- h = elf_link_hash_lookup (elf_hash_table (info), symdef->name,
- FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- char *p, *copy;
- size_t len, first;
-
- /* If this is a default version (the name contains @@),
- look up the symbol again with only one `@' as well
- as without the version. The effect is that references
- to the symbol with and without the version will be
- matched by the default symbol in the archive. */
-
- p = strchr (symdef->name, ELF_VER_CHR);
- if (p == NULL || p[1] != ELF_VER_CHR)
- continue;
-
- /* First check with only one `@'. */
- len = strlen (symdef->name);
- copy = bfd_alloc (abfd, len);
- if (copy == NULL)
- goto error_return;
- first = p - symdef->name + 1;
- memcpy (copy, symdef->name, first);
- memcpy (copy + first, symdef->name + first + 1, len - first);
-
- h = elf_link_hash_lookup (elf_hash_table (info), copy,
- FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- /* We also need to check references to the symbol
- without the version. */
-
- copy[first - 1] = '\0';
- h = elf_link_hash_lookup (elf_hash_table (info),
- copy, FALSE, FALSE, FALSE);
- }
-
- bfd_release (abfd, copy);
- }
+ h = archive_symbol_lookup (abfd, info, symdef->name);
+ if (h == (struct elf_link_hash_entry *) 0 - 1)
+ goto error_return;
if (h == NULL)
continue;
@@ -4616,6 +4674,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (!is_elf_hash_table (info->hash))
return TRUE;
+ elf_tdata (output_bfd)->relro = info->relro;
if (info->execstack)
elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
else if (info->noexecstack)
@@ -4855,7 +4914,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
return FALSE;
/* Add some entries to the .dynamic section. We fill in some of the
- values later, in elf_bfd_final_link, but we must add the entries
+ values later, in bfd_elf_final_link, but we must add the entries
now so that we know the final size of the .dynamic section. */
/* If there are initialization and/or finalization functions to
@@ -4900,8 +4959,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
== SHT_PREINIT_ARRAY)
{
(*_bfd_error_handler)
- (_("%s: .preinit_array section is not allowed in DSO"),
- bfd_archive_filename (sub));
+ (_("%B: .preinit_array section is not allowed in DSO"),
+ sub);
break;
}
@@ -5003,9 +5062,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
size += sizeof (Elf_External_Verdaux);
}
- s->_raw_size = size;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->size = size;
+ s->contents = bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
/* Fill in the version definition section. */
@@ -5202,8 +5261,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
size += sizeof (Elf_External_Vernaux);
}
- s->_raw_size = size;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
+ s->size = size;
+ s->contents = bfd_alloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5288,8 +5347,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
}
else
{
- s->_raw_size = dynsymcount * sizeof (Elf_External_Versym);
- s->contents = bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = dynsymcount * sizeof (Elf_External_Versym);
+ s->contents = bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5305,9 +5364,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
section as we went along in elf_link_add_object_symbols. */
s = bfd_get_section_by_name (dynobj, ".dynsym");
BFD_ASSERT (s != NULL);
- s->_raw_size = dynsymcount * bed->s->sizeof_sym;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->size = dynsymcount * bed->s->sizeof_sym;
+ s->contents = bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
if (dynsymcount != 0)
@@ -5331,8 +5390,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (dynobj, ".hash");
BFD_ASSERT (s != NULL);
hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
- s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
- s->contents = bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
+ s->contents = bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5347,7 +5406,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
elf_finalize_dynstr (output_bfd, info);
- s->_raw_size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+ s->size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
for (dtagcount = 0; dtagcount <= info->spare_dynamic_tags; ++dtagcount)
if (!_bfd_elf_add_dynamic_entry (info, DT_NULL, 0))
@@ -5557,10 +5616,10 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
bfd_vma r_sym_mask;
reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
- if (reldyn == NULL || reldyn->_raw_size == 0)
+ if (reldyn == NULL || reldyn->size == 0)
{
reldyn = bfd_get_section_by_name (abfd, ".rel.dyn");
- if (reldyn == NULL || reldyn->_raw_size == 0)
+ if (reldyn == NULL || reldyn->size == 0)
return 0;
ext_size = bed->s->sizeof_rel;
swap_in = bed->s->swap_reloc_in;
@@ -5572,17 +5631,17 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
swap_in = bed->s->swap_reloca_in;
swap_out = bed->s->swap_reloca_out;
}
- count = reldyn->_raw_size / ext_size;
+ count = reldyn->size / ext_size;
size = 0;
for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
asection *o = lo->u.indirect.section;
- size += o->_raw_size;
+ size += o->size;
}
- if (size != reldyn->_raw_size)
+ if (size != reldyn->size)
return 0;
sort_elt = (sizeof (struct elf_link_sort_rela)
@@ -5607,7 +5666,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
asection *o = lo->u.indirect.section;
erel = o->contents;
- erelend = o->contents + o->_raw_size;
+ erelend = o->contents + o->size;
p = sort + o->output_offset / ext_size * sort_elt;
while (erel < erelend)
{
@@ -5649,7 +5708,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
asection *o = lo->u.indirect.section;
erel = o->contents;
- erelend = o->contents + o->_raw_size;
+ erelend = o->contents + o->size;
p = sort + o->output_offset / ext_size * sort_elt;
while (erel < erelend)
{
@@ -5785,7 +5844,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info,
case bfd_link_hash_undefweak:
abfd = h->root.u.undef.abfd;
if ((abfd->flags & DYNAMIC) == 0
- || elf_dyn_lib_class (abfd) != DYN_DT_NEEDED)
+ || (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
return FALSE;
break;
@@ -5973,14 +6032,13 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
&& ! elf_link_check_versioned_symbol (finfo->info, bed, h))
{
(*_bfd_error_handler)
- (_("%s: %s symbol `%s' in %s is referenced by DSO"),
- bfd_get_filename (finfo->output_bfd),
+ (_("%B: %s symbol `%s' in %B is referenced by DSO"),
+ finfo->output_bfd, h->root.u.def.section->owner,
ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
? "internal"
: ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
- ? "hidden" : "local",
- h->root.root.string,
- bfd_archive_filename (h->root.u.def.section->owner));
+ ? "hidden" : "local",
+ h->root.root.string);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -6054,10 +6112,8 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
if (sym.st_shndx == SHN_BAD)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s for input section %s"),
- bfd_get_filename (finfo->output_bfd),
- input_sec->output_section->name,
- input_sec->name);
+ (_("%B: could not find output section %A for input section %A"),
+ finfo->output_bfd, input_sec->output_section, input_sec);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -6153,13 +6209,13 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
(*_bfd_error_handler)
- (_("%s: %s symbol `%s' isn't defined"),
- bfd_get_filename (finfo->output_bfd),
- ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED
- ? "protected"
- : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL
- ? "internal" : "hidden",
- h->root.root.string);
+ (_("%B: %s symbol `%s' isn't defined"),
+ finfo->output_bfd,
+ ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED
+ ? "protected"
+ : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL
+ ? "internal" : "hidden",
+ h->root.root.string);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -6238,6 +6294,9 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
return TRUE;
}
+/* Return TRUE if special handling is done for relocs in SEC against
+ symbols defined in discarded sections. */
+
static bfd_boolean
elf_section_ignore_discarded_relocs (asection *sec)
{
@@ -6260,6 +6319,52 @@ elf_section_ignore_discarded_relocs (asection *sec)
return FALSE;
}
+/* Return TRUE if we should complain about a reloc in SEC against a
+ symbol defined in a discarded section. */
+
+static bfd_boolean
+elf_section_complain_discarded (asection *sec)
+{
+ if (strncmp (".stab", sec->name, 5) == 0
+ && (!sec->name[5] ||
+ (sec->name[5] == '.' && ISDIGIT (sec->name[6]))))
+ return FALSE;
+
+ if (strcmp (".eh_frame", sec->name) == 0)
+ return FALSE;
+
+ if (strcmp (".gcc_except_table", sec->name) == 0)
+ return FALSE;
+
+ if (strcmp (".PARISC.unwind", sec->name) == 0)
+ return FALSE;
+
+ if (strcmp (".fixup", sec->name) == 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Find a match between a section and a member of a section group. */
+
+static asection *
+match_group_member (asection *sec, asection *group)
+{
+ asection *first = elf_next_in_group (group);
+ asection *s = first;
+
+ while (s != NULL)
+ {
+ if (bfd_elf_match_symbols_in_sections (s, sec))
+ return s;
+
+ if (s == first)
+ break;
+ }
+
+ return NULL;
+}
+
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once.
This is so that we only have to read the local symbols once, and
@@ -6358,7 +6463,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
isym->st_value =
_bfd_merged_section_offset (output_bfd, &isec,
elf_section_data (isec)->sec_info,
- isym->st_value, 0);
+ isym->st_value);
}
else if (isym->st_shndx == SHN_ABS)
isec = bfd_abs_section_ptr;
@@ -6473,7 +6578,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || (o->_raw_size == 0 && (o->flags & SEC_RELOC) == 0))
+ || (o->size == 0 && (o->flags & SEC_RELOC) == 0))
continue;
if ((o->flags & SEC_LINKER_CREATED) != 0)
@@ -6491,9 +6596,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
contents = elf_section_data (o)->this_hdr.contents;
else
{
+ bfd_size_type amt = o->rawsize ? o->rawsize : o->size;
+
contents = finfo->contents;
- if (! bfd_get_section_contents (input_bfd, o, contents, 0,
- o->_raw_size))
+ if (! bfd_get_section_contents (input_bfd, o, contents, 0, amt))
return FALSE;
}
@@ -6531,95 +6637,101 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (!elf_section_ignore_discarded_relocs (o))
{
Elf_Internal_Rela *rel, *relend;
+ bfd_boolean complain = elf_section_complain_discarded (o);
rel = internal_relocs;
relend = rel + o->reloc_count * bed->s->int_rels_per_ext_rel;
for ( ; rel < relend; rel++)
{
unsigned long r_symndx = rel->r_info >> r_sym_shift;
- asection *sec;
+ asection **ps, *sec;
+ struct elf_link_hash_entry *h = NULL;
+ const char *sym_name;
+
+ if (r_symndx == STN_UNDEF)
+ continue;
if (r_symndx >= locsymcount
|| (elf_bad_symtab (input_bfd)
&& finfo->sections[r_symndx] == NULL))
{
- struct elf_link_hash_entry *h;
-
h = sym_hashes[r_symndx - extsymoff];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- /* Complain if the definition comes from a
- discarded section. */
- sec = h->root.u.def.section;
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && elf_discarded_section (sec))
- {
- if ((o->flags & SEC_DEBUGGING) != 0)
- {
- BFD_ASSERT (r_symndx != 0);
- /* Try to preserve debug information. */
- if ((o->flags & SEC_DEBUGGING) != 0
- && sec->kept_section != NULL
- && sec->_raw_size == sec->kept_section->_raw_size)
- h->root.u.def.section
- = sec->kept_section;
- else
- memset (rel, 0, sizeof (*rel));
- }
- else
- 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));
- }
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ continue;
+
+ ps = &h->root.u.def.section;
+ sym_name = h->root.root.string;
}
else
{
- sec = finfo->sections[r_symndx];
+ Elf_Internal_Sym *sym = isymbuf + r_symndx;
+ ps = &finfo->sections[r_symndx];
+ sym_name = bfd_elf_local_sym_name (input_bfd, sym);
+ }
- if (sec != NULL && elf_discarded_section (sec))
+ /* Complain if the definition comes from a
+ discarded section. */
+ if ((sec = *ps) != NULL && elf_discarded_section (sec))
+ {
+ if ((o->flags & SEC_DEBUGGING) != 0)
{
- if ((o->flags & SEC_DEBUGGING) != 0
- || (sec->flags & SEC_LINK_ONCE) != 0)
+ BFD_ASSERT (r_symndx != 0);
+
+ /* Try to preserve debug information.
+ FIXME: This is quite broken. Modifying
+ the symbol here means we will be changing
+ all uses of the symbol, not just those in
+ debug sections. The only thing that makes
+ this half reasonable is that debug sections
+ tend to come after other sections. Of
+ course, that doesn't help with globals.
+ ??? All link-once sections of the same name
+ ought to define the same set of symbols, so
+ it would seem that globals ought to always
+ be defined in the kept section. */
+ if (sec->kept_section != NULL)
{
- BFD_ASSERT (r_symndx != 0);
- /* Try to preserve debug information. */
- if ((o->flags & SEC_DEBUGGING) != 0
- && sec->kept_section != NULL
- && sec->_raw_size == sec->kept_section->_raw_size)
- finfo->sections[r_symndx]
- = sec->kept_section;
- else
+ asection *member;
+
+ /* Check if it is a linkonce section or
+ member of a comdat group. */
+ if (elf_sec_group (sec) == NULL
+ && sec->size == sec->kept_section->size)
{
- rel->r_info &= r_type_mask;
- rel->r_addend = 0;
+ *ps = sec->kept_section;
+ continue;
+ }
+ else if (elf_sec_group (sec) != NULL
+ && (member = match_group_member (sec, sec->kept_section))
+ && sec->size == member->size)
+ {
+ *ps = member;
+ continue;
}
}
- else
- {
- 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);
- }
}
+ else if (complain)
+ {
+ (*_bfd_error_handler)
+ (_("`%s' referenced in section `%A' of %B: "
+ "defined in discarded section `%A' of %B\n"),
+ o, input_bfd, sec, sec->owner, sym_name);
+ }
+
+ /* Remove the symbol reference from the reloc, but
+ don't kill the reloc completely. This is so that
+ a zero value will be written into the section,
+ which may have non-zero contents put there by the
+ assembler. Zero in things like an eh_frame fde
+ pc_begin allows stack unwinders to recognize the
+ fde as bogus. */
+ rel->r_info &= r_type_mask;
+ rel->r_addend = 0;
}
}
}
@@ -6731,7 +6843,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
symbol. We set the rel_hash entry for this
reloc to point to the global hash table entry
for this symbol. The symbol index is then
- set at the end of elf_bfd_final_link. */
+ set at the end of bfd_elf_final_link. */
indx = r_symndx - extsymoff;
rh = elf_sym_hashes (input_bfd)[indx];
while (rh->root.type == bfd_link_hash_indirect
@@ -6758,13 +6870,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
/* I suppose the backend ought to fill in the
section of any STT_SECTION symbol against a
- processor specific section. If we have
- discarded a section, the output_section will
- be the absolute section. */
- if (bfd_is_abs_section (sec)
- || (sec != NULL
- && bfd_is_abs_section (sec->output_section)))
- r_symndx = 0;
+ processor specific section. */
+ r_symndx = 0;
+ if (bfd_is_abs_section (sec))
+ ;
else if (sec == NULL || sec->owner == NULL)
{
bfd_set_error (bfd_error_bad_value);
@@ -6772,8 +6881,25 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
else
{
- r_symndx = sec->output_section->target_index;
- BFD_ASSERT (r_symndx != 0);
+ asection *osec = sec->output_section;
+
+ /* If we have discarded a section, the output
+ section will be the absolute section. In
+ case of discarded link-once and discarded
+ SEC_MERGE sections, use the kept section. */
+ if (bfd_is_abs_section (osec)
+ && sec->kept_section != NULL
+ && sec->kept_section->output_section != NULL)
+ {
+ osec = sec->kept_section->output_section;
+ irela->r_addend -= osec->vma;
+ }
+
+ if (!bfd_is_abs_section (osec))
+ {
+ r_symndx = osec->target_index;
+ BFD_ASSERT (r_symndx != 0);
+ }
}
/* Adjust the addend according to where the
@@ -6896,14 +7022,11 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
break;
default:
{
- bfd_size_type sec_size;
-
- sec_size = (o->_cooked_size != 0 ? o->_cooked_size : o->_raw_size);
if (! (o->flags & SEC_EXCLUDE)
&& ! bfd_set_section_contents (output_bfd, o->output_section,
contents,
(file_ptr) o->output_offset,
- sec_size))
+ o->size))
return FALSE;
}
break;
@@ -7079,6 +7202,137 @@ elf_reloc_link_order (bfd *output_bfd,
return TRUE;
}
+
+/* Get the output vma of the section pointed to by the sh_link field. */
+
+static bfd_vma
+elf_get_linked_section_vma (struct bfd_link_order *p)
+{
+ Elf_Internal_Shdr **elf_shdrp;
+ asection *s;
+ int elfsec;
+
+ s = p->u.indirect.section;
+ elf_shdrp = elf_elfsections (s->owner);
+ elfsec = _bfd_elf_section_from_bfd_section (s->owner, s);
+ elfsec = elf_shdrp[elfsec]->sh_link;
+ /* PR 290:
+ The Intel C compiler generates SHT_IA_64_UNWIND with
+ SHF_LINK_ORDER. But it doesn't set theh sh_link or
+ sh_info fields. Hence we could get the situation
+ where elfsec is 0. */
+ if (elfsec == 0)
+ {
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (s->owner);
+ if (bed->link_order_error_handler)
+ bed->link_order_error_handler
+ (_("%B: warning: sh_link not set for section `%A'"), s->owner, s);
+ return 0;
+ }
+ else
+ {
+ s = elf_shdrp[elfsec]->bfd_section;
+ return s->output_section->vma + s->output_offset;
+ }
+}
+
+
+/* Compare two sections based on the locations of the sections they are
+ linked to. Used by elf_fixup_link_order. */
+
+static int
+compare_link_order (const void * a, const void * b)
+{
+ bfd_vma apos;
+ bfd_vma bpos;
+
+ apos = elf_get_linked_section_vma (*(struct bfd_link_order **)a);
+ bpos = elf_get_linked_section_vma (*(struct bfd_link_order **)b);
+ if (apos < bpos)
+ return -1;
+ return apos > bpos;
+}
+
+
+/* Looks for sections with SHF_LINK_ORDER set. Rearranges them into the same
+ order as their linked sections. Returns false if this could not be done
+ because an output section includes both ordered and unordered
+ sections. Ideally we'd do this in the linker proper. */
+
+static bfd_boolean
+elf_fixup_link_order (bfd *abfd, asection *o)
+{
+ int seen_linkorder;
+ int seen_other;
+ int n;
+ struct bfd_link_order *p;
+ bfd *sub;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int elfsec;
+ struct bfd_link_order **sections;
+ asection *s;
+ bfd_vma offset;
+
+ seen_other = 0;
+ seen_linkorder = 0;
+ for (p = o->link_order_head; p != NULL; p = p->next)
+ {
+ if (p->type == bfd_indirect_link_order
+ && (bfd_get_flavour ((sub = p->u.indirect.section->owner))
+ == bfd_target_elf_flavour)
+ && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass)
+ {
+ s = p->u.indirect.section;
+ elfsec = _bfd_elf_section_from_bfd_section (sub, s);
+ if (elfsec != -1
+ && elf_elfsections (sub)[elfsec]->sh_flags & SHF_LINK_ORDER)
+ seen_linkorder++;
+ else
+ seen_other++;
+ }
+ else
+ seen_other++;
+ }
+
+ if (!seen_linkorder)
+ return TRUE;
+
+ if (seen_other && seen_linkorder)
+ {
+ (*_bfd_error_handler) (_("%A has both ordered and unordered sections"),
+ o);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ sections = (struct bfd_link_order **)
+ xmalloc (seen_linkorder * sizeof (struct bfd_link_order *));
+ seen_linkorder = 0;
+
+ for (p = o->link_order_head; p != NULL; p = p->next)
+ {
+ sections[seen_linkorder++] = p;
+ }
+ /* Sort the input sections in the order of their linked section. */
+ qsort (sections, seen_linkorder, sizeof (struct bfd_link_order *),
+ compare_link_order);
+
+ /* Change the offsets of the sections. */
+ offset = 0;
+ for (n = 0; n < seen_linkorder; n++)
+ {
+ s = sections[n]->u.indirect.section;
+ offset &= ~(bfd_vma)((1 << s->alignment_power) - 1);
+ s->output_offset = offset;
+ sections[n]->offset = offset;
+ offset += sections[n]->size;
+ }
+
+ return TRUE;
+}
+
+
/* Do the final step of an ELF link. */
bfd_boolean
@@ -7210,10 +7464,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
free (relocs);
}
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
- if (sec->_cooked_size > max_contents_size)
- max_contents_size = sec->_cooked_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
/* We are interested in just local symbols, not all
symbols. */
@@ -7329,8 +7583,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (! _bfd_elf_compute_section_file_positions (abfd, info))
goto error_return;
- /* That created the reloc sections. Set their sizes, and assign
- them file positions, and allocate some buffers. */
+ /* Set sizes, and assign file positions for reloc sections. */
for (o = abfd->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_RELOC) != 0)
@@ -7521,7 +7774,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
sec && (sec->flags & SEC_THREAD_LOCAL);
sec = sec->next)
{
- bfd_vma size = sec->_raw_size;
+ bfd_vma size = sec->size;
if (size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0)
{
@@ -7538,6 +7791,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elf_hash_table (info)->tls_size = end - base;
}
+ /* Reorder SHF_LINK_ORDER sections. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (!elf_fixup_link_order (abfd, o))
+ return FALSE;
+ }
+
/* Since ELF permits relocations to be against local symbols, we
must have the local symbols available when we do the relocations.
Since we would rather only read the local symbols once, and we
@@ -7635,16 +7895,18 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
bfd_byte *dest;
long dynindx;
- indx = elf_section_data (s)->this_idx;
dynindx = elf_section_data (s)->dynindx;
+ if (dynindx <= 0)
+ continue;
+ indx = elf_section_data (s)->this_idx;
BFD_ASSERT (indx > 0);
sym.st_shndx = indx;
sym.st_value = s->vma;
dest = dynsym + dynindx * bed->s->sizeof_sym;
+ if (last_local < dynindx)
+ last_local = dynindx;
bed->s->swap_symbol_out (abfd, &sym, dest, 0);
}
-
- last_local = bfd_count_sections (abfd);
}
/* Write out the local dynsyms. */
@@ -7795,7 +8057,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
BFD_ASSERT (o != NULL);
dyncon = o->contents;
- dynconend = o->contents + o->_raw_size;
+ dynconend = o->contents + o->size;
for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -7867,14 +8129,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (o == NULL)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s"),
- bfd_get_filename (abfd), name);
+ (_("%B: could not find output section %s"), abfd, name);
goto error_return;
}
- if (o->_raw_size == 0)
+ if (o->size == 0)
(*_bfd_error_handler)
(_("warning: %s section has zero size"), name);
- dyn.d_un.d_val = o->_raw_size;
+ dyn.d_un.d_val = o->size;
break;
case DT_PREINIT_ARRAY:
@@ -7909,8 +8170,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (o == NULL)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s"),
- bfd_get_filename (abfd), name);
+ (_("%B: could not find output section %s"), abfd, name);
goto error_return;
}
dyn.d_un.d_ptr = o->vma;
@@ -7958,7 +8218,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
for (o = dynobj->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || o->_raw_size == 0
+ || o->size == 0
|| o->output_section == bfd_abs_section_ptr)
continue;
if ((o->flags & SEC_LINKER_CREATED) == 0)
@@ -7967,6 +8227,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
created by _bfd_elf_link_create_dynamic_sections. */
continue;
}
+ if (elf_hash_table (info)->stab_info.stabstr == o)
+ continue;
+ if (elf_hash_table (info)->eh_info.hdr_sec == o)
+ continue;
if ((elf_section_data (o->output_section)->this_hdr.sh_type
!= SHT_STRTAB)
|| strcmp (bfd_get_section_name (abfd, o), ".dynstr") != 0)
@@ -7974,7 +8238,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (! bfd_set_section_contents (abfd, o->output_section,
o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
goto error_return;
}
else
@@ -8000,7 +8264,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
/* If we have optimized stabs strings, output them. */
- if (elf_hash_table (info)->stab_info != NULL)
+ if (elf_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &elf_hash_table (info)->stab_info))
goto error_return;
@@ -8088,10 +8352,10 @@ typedef asection * (*gc_mark_hook_fn)
(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *);
-static bfd_boolean
-elf_gc_mark (struct bfd_link_info *info,
- asection *sec,
- gc_mark_hook_fn gc_mark_hook)
+bfd_boolean
+_bfd_elf_gc_mark (struct bfd_link_info *info,
+ asection *sec,
+ gc_mark_hook_fn gc_mark_hook)
{
bfd_boolean ret;
asection *group_sec;
@@ -8101,7 +8365,7 @@ elf_gc_mark (struct bfd_link_info *info,
/* Mark all the sections in the group. */
group_sec = elf_section_data (sec)->next_in_group;
if (group_sec && !group_sec->gc_mark)
- if (!elf_gc_mark (info, group_sec, gc_mark_hook))
+ if (!_bfd_elf_gc_mark (info, group_sec, gc_mark_hook))
return FALSE;
/* Look through the section relocs. */
@@ -8168,6 +8432,9 @@ elf_gc_mark (struct bfd_link_info *info,
|| ELF_ST_BIND (isym[r_symndx].st_info) != STB_LOCAL)
{
h = sym_hashes[r_symndx - extsymoff];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
rsec = (*gc_mark_hook) (sec, info, rel, h, NULL);
}
else
@@ -8179,7 +8446,7 @@ elf_gc_mark (struct bfd_link_info *info,
{
if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour)
rsec->gc_mark = 1;
- else if (!elf_gc_mark (info, rsec, gc_mark_hook))
+ else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook))
{
ret = FALSE;
goto out2;
@@ -8241,9 +8508,9 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
for (o = sub->sections; o != NULL; o = o->next)
{
- /* Keep special sections. Keep .debug sections. */
- if ((o->flags & SEC_LINKER_CREATED)
- || (o->flags & SEC_DEBUGGING))
+ /* Keep debug and special sections. */
+ if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
+ || (o->flags & (SEC_ALLOC | SEC_LOAD)) == 0)
o->gc_mark = 1;
if (o->gc_mark)
@@ -8407,6 +8674,24 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
return TRUE;
}
+/* Mark sections containing dynamically referenced symbols. This is called
+ through elf_link_hash_traverse. */
+
+static bfd_boolean
+elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h,
+ void *okp ATTRIBUTE_UNUSED)
+{
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC))
+ h->root.u.def.section->flags |= SEC_KEEP;
+
+ return TRUE;
+}
+
/* Do mark and sweep of unused sections. */
bfd_boolean
@@ -8421,8 +8706,8 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
if (!get_elf_backend_data (abfd)->can_gc_sections
|| info->relocatable
|| info->emitrelocations
- || !is_elf_hash_table (info->hash)
- || elf_hash_table (info)->dynamic_sections_created)
+ || info->shared
+ || !is_elf_hash_table (info->hash))
{
(*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
return TRUE;
@@ -8442,8 +8727,15 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
if (!ok)
return FALSE;
- /* Grovel through relocs to find out who stays ... */
+ /* Mark dynamically referenced symbols. */
+ if (elf_hash_table (info)->dynamic_sections_created)
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_gc_mark_dynamic_ref_symbol,
+ &ok);
+ if (!ok)
+ return FALSE;
+ /* Grovel through relocs to find out who stays ... */
gc_mark_hook = get_elf_backend_data (abfd)->gc_mark_hook;
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
@@ -8455,8 +8747,15 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
for (o = sub->sections; o != NULL; o = o->next)
{
if (o->flags & SEC_KEEP)
- if (!elf_gc_mark (info, o, gc_mark_hook))
- return FALSE;
+ {
+ /* _bfd_elf_discard_section_eh_frame knows how to discard
+ orphaned FDEs so don't mark sections referenced by the
+ EH frame section. */
+ if (strcmp (o->name, ".eh_frame") == 0)
+ o->gc_mark = 1;
+ else if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
+ return FALSE;
+ }
}
}
@@ -8502,9 +8801,8 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
goto win;
}
- (*_bfd_error_handler) ("%s: %s+%lu: No symbol found for INHERIT",
- bfd_archive_filename (abfd), sec->name,
- (unsigned long) offset);
+ (*_bfd_error_handler) ("%B: %A+%lu: No symbol found for INHERIT",
+ abfd, sec, (unsigned long) offset);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
@@ -8790,13 +9088,13 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
eh = bfd_get_section_by_name (abfd, ".eh_frame");
if (info->relocatable
|| (eh != NULL
- && (eh->_raw_size == 0
+ && (eh->size == 0
|| bfd_is_abs_section (eh->output_section))))
eh = NULL;
stab = bfd_get_section_by_name (abfd, ".stab");
if (stab != NULL
- && (stab->_raw_size == 0
+ && (stab->size == 0
|| bfd_is_abs_section (stab->output_section)
|| stab->sec_info_type != ELF_INFO_TYPE_STABS))
stab = NULL;
@@ -8901,3 +9199,249 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
return ret;
}
+
+struct already_linked_section
+{
+ asection *sec;
+ asection *linked;
+};
+
+/* Check if the member of a single member comdat group matches a
+ linkonce section and vice versa. */
+static bfd_boolean
+try_match_symbols_in_sections
+ (struct bfd_section_already_linked_hash_entry *h, void *info)
+{
+ struct bfd_section_already_linked *l;
+ struct already_linked_section *s
+ = (struct already_linked_section *) info;
+
+ if (elf_sec_group (s->sec) == NULL)
+ {
+ /* It is a linkonce section. Try to match it with the member of a
+ single member comdat group. */
+ for (l = h->entry; l != NULL; l = l->next)
+ if ((l->sec->flags & SEC_GROUP))
+ {
+ asection *first = elf_next_in_group (l->sec);
+
+ if (first != NULL
+ && elf_next_in_group (first) == first
+ && bfd_elf_match_symbols_in_sections (first, s->sec))
+ {
+ s->linked = first;
+ return FALSE;
+ }
+ }
+ }
+ else
+ {
+ /* It is the member of a single member comdat group. Try to match
+ it with a linkonce section. */
+ for (l = h->entry; l != NULL; l = l->next)
+ if ((l->sec->flags & SEC_GROUP) == 0
+ && bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL
+ && bfd_elf_match_symbols_in_sections (l->sec, s->sec))
+ {
+ s->linked = l->sec;
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+already_linked (asection *sec, asection *group)
+{
+ struct already_linked_section result;
+
+ result.sec = sec;
+ result.linked = NULL;
+
+ bfd_section_already_linked_table_traverse
+ (try_match_symbols_in_sections, &result);
+
+ if (result.linked)
+ {
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = result.linked;
+
+ /* Also discard the group section. */
+ if (group)
+ group->output_section = bfd_abs_section_ptr;
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void
+_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
+{
+ flagword flags;
+ const char *name;
+ struct bfd_section_already_linked *l;
+ struct bfd_section_already_linked_hash_entry *already_linked_list;
+ asection *group;
+
+ /* A single member comdat group section may be discarded by a
+ linkonce section. See below. */
+ if (sec->output_section == bfd_abs_section_ptr)
+ return;
+
+ flags = sec->flags;
+
+ /* Check if it belongs to a section group. */
+ group = elf_sec_group (sec);
+
+ /* Return if it isn't a linkonce section nor a member of a group. A
+ comdat group section also has SEC_LINK_ONCE set. */
+ if ((flags & SEC_LINK_ONCE) == 0 && group == NULL)
+ return;
+
+ if (group)
+ {
+ /* If this is the member of a single member comdat group, check if
+ the group should be discarded. */
+ if (elf_next_in_group (sec) == sec
+ && (group->flags & SEC_LINK_ONCE) != 0)
+ sec = group;
+ else
+ return;
+ }
+
+ /* FIXME: When doing a relocatable link, we may have trouble
+ copying relocations in other sections that refer to local symbols
+ in the section being discarded. Those relocations will have to
+ be converted somehow; as of this writing I'm not sure that any of
+ the backends handle that correctly.
+
+ It is tempting to instead not discard link once sections when
+ doing a relocatable link (technically, they should be discarded
+ whenever we are building constructors). However, that fails,
+ because the linker winds up combining all the link once sections
+ into a single large link once section, which defeats the purpose
+ of having link once sections in the first place.
+
+ Also, not merging link once sections in a relocatable link
+ causes trouble for MIPS ELF, which relies on link once semantics
+ to handle the .reginfo section correctly. */
+
+ name = bfd_get_section_name (abfd, sec);
+
+ already_linked_list = bfd_section_already_linked_table_lookup (name);
+
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
+ {
+ /* We may have 3 different sections on the list: group section,
+ comdat section and linkonce section. SEC may be a linkonce or
+ group section. We match a group section with a group section,
+ a linkonce section with a linkonce section, and ignore comdat
+ section. */
+ if ((flags & SEC_GROUP) == (l->sec->flags & SEC_GROUP)
+ && bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL)
+ {
+ /* The section has already been linked. See if we should
+ issue a warning. */
+ switch (flags & SEC_LINK_DUPLICATES)
+ {
+ default:
+ abort ();
+
+ case SEC_LINK_DUPLICATES_DISCARD:
+ break;
+
+ case SEC_LINK_DUPLICATES_ONE_ONLY:
+ (*_bfd_error_handler)
+ (_("%B: ignoring duplicate section `%A'\n"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_SIZE:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: duplicate section `%A' has different size\n"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: duplicate section `%A' has different size\n"),
+ abfd, sec);
+ else if (sec->size != 0)
+ {
+ bfd_byte *sec_contents, *l_sec_contents;
+
+ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
+ (*_bfd_error_handler)
+ (_("%B: warning: could not read contents of section `%A'\n"),
+ abfd, sec);
+ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
+ &l_sec_contents))
+ (*_bfd_error_handler)
+ (_("%B: warning: could not read contents of section `%A'\n"),
+ l->sec->owner, l->sec);
+ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
+ (*_bfd_error_handler)
+ (_("%B: warning: duplicate section `%A' has different contents\n"),
+ abfd, sec);
+
+ if (sec_contents)
+ free (sec_contents);
+ if (l_sec_contents)
+ free (l_sec_contents);
+ }
+ break;
+ }
+
+ /* Set the output_section field so that lang_add_section
+ does not create a lang_input_section structure for this
+ section. Since there might be a symbol in the section
+ being discarded, we must retain a pointer to the section
+ which we are really going to use. */
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = l->sec;
+
+ if (flags & SEC_GROUP)
+ {
+ asection *first = elf_next_in_group (sec);
+ asection *s = first;
+
+ while (s != NULL)
+ {
+ s->output_section = bfd_abs_section_ptr;
+ /* Record which group discards it. */
+ s->kept_section = l->sec;
+ s = elf_next_in_group (s);
+ /* These lists are circular. */
+ if (s == first)
+ break;
+ }
+ }
+
+ return;
+ }
+ }
+
+ if (group)
+ {
+ /* If this is the member of a single member comdat group and the
+ group hasn't be discarded, we check if it matches a linkonce
+ section. We only record the discarded comdat group. Otherwise
+ the undiscarded group will be discarded incorrectly later since
+ itself has been recorded. */
+ if (! already_linked (elf_next_in_group (sec), group))
+ return;
+ }
+ else
+ /* There is no direct match. But for linkonce section, we should
+ check if there is a match with comdat group member. We always
+ record the linkonce section, discarded or not. */
+ already_linked (sec, group);
+
+ /* This is the first section with this name. Record it. */
+ bfd_section_already_linked_table_insert (already_linked_list, sec);
+}
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 973edd52daf..769c4149812 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -1425,7 +1425,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (reloc_entry->howto->src_mask == 0)
@@ -1520,7 +1520,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -1760,7 +1760,7 @@ static bfd_boolean
elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -1776,13 +1776,13 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 360;
+ size = 360;
break;
}
/* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size,
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg", size,
note->descpos + offset);
}
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index b8527a91c7c..a3a69e40897 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -180,13 +180,13 @@ static bfd_boolean elfNN_ia64_relax_section
PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
bfd_boolean *again));
static void elfNN_ia64_relax_ldxmov
- PARAMS((bfd *abfd, bfd_byte *contents, bfd_vma off));
+ PARAMS((bfd_byte *contents, bfd_vma off));
static bfd_boolean is_unwind_section_name
PARAMS ((bfd *abfd, const char *));
static bfd_boolean elfNN_ia64_section_from_shdr
PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static bfd_boolean elfNN_ia64_section_flags
- PARAMS ((flagword *, Elf_Internal_Shdr *));
+ PARAMS ((flagword *, const Elf_Internal_Shdr *));
static bfd_boolean elfNN_ia64_fake_sections
PARAMS ((bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec));
static void elfNN_ia64_final_write_processing
@@ -273,7 +273,7 @@ static bfd_boolean allocate_dynrel_entries
static bfd_boolean elfNN_ia64_size_dynamic_sections
PARAMS ((bfd *output_bfd, struct bfd_link_info *info));
static bfd_reloc_status_type elfNN_ia64_install_value
- PARAMS ((bfd *abfd, bfd_byte *hit_addr, bfd_vma val, unsigned int r_type));
+ PARAMS ((bfd_byte *hit_addr, bfd_vma val, unsigned int r_type));
static void elfNN_ia64_install_dyn_reloc
PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec,
asection *srel, bfd_vma offset, unsigned int type,
@@ -674,7 +674,7 @@ bfd_elfNN_ia64_after_parse (int itanium)
}
static void
-elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
+elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off)
{
int template;
bfd_byte *hit_addr;
@@ -682,8 +682,8 @@ elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
hit_addr = (bfd_byte *) (contents + off);
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* Keep the instruction in slot 0. */
i0 = (t0 >> 5) & 0x1ffffffffffLL;
@@ -700,8 +700,8 @@ elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
t0 = (i1 << 46) | (i0 << 5) | template;
t1 = (i2 << 23) | (i1 >> 18);
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
}
/* These functions do relaxation for IA-64 ELF. */
@@ -749,11 +749,6 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
&& sec->need_finalize_relax == 0))
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Load the relocations for this section. */
@@ -771,12 +766,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
@@ -789,6 +779,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
bfd_size_type amt;
bfd_boolean is_branch;
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ char symtype;
switch (r_type)
{
@@ -864,6 +855,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
toff = isym->st_value;
dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE);
+ symtype = ELF_ST_TYPE (isym->st_info);
}
else
{
@@ -908,13 +900,38 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
tsec = h->root.u.def.section;
toff = h->root.u.def.value;
}
+
+ symtype = h->type;
}
if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
- toff = _bfd_merged_section_offset (abfd, &tsec,
- elf_section_data (tsec)->sec_info,
- toff + irel->r_addend,
- (bfd_vma) 0);
+ {
+ /* At this stage in linking, no SEC_MERGE symbol has been
+ adjusted, so all references to such symbols need to be
+ passed through _bfd_merged_section_offset. (Later, in
+ relocate_section, all SEC_MERGE symbols *except* for
+ section symbols have been adjusted.)
+
+ gas may reduce relocations against symbols in SEC_MERGE
+ sections to a relocation against the section symbol when
+ the original addend was zero. When the reloc is against
+ a section symbol we should include the addend in the
+ offset passed to _bfd_merged_section_offset, since the
+ location of interest is the original symbol. On the
+ other hand, an access to "sym+addend" where "sym" is not
+ a section symbol should not include the addend; Such an
+ access is presumed to be an offset from "sym"; The
+ location of interest is just "sym". */
+ if (symtype == STT_SECTION)
+ toff += irel->r_addend;
+
+ toff = _bfd_merged_section_offset (abfd, &tsec,
+ elf_section_data (tsec)->sec_info,
+ toff);
+
+ if (symtype != STT_SECTION)
+ toff += irel->r_addend;
+ }
else
toff += irel->r_addend;
@@ -937,7 +954,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
/* If the 60-bit branch is in 21-bit range, optimize it. */
if (r_type == R_IA64_PCREL60B)
{
- elfNN_ia64_relax_brl (abfd, contents, roff);
+ elfNN_ia64_relax_brl (contents, roff);
irel->r_info
= ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
@@ -954,6 +971,18 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
else if (r_type == R_IA64_PCREL60B)
continue;
+ /* We can't put a trampoline in a .init/.fini section. Issue
+ an error. */
+ if (strcmp (sec->output_section->name, ".init") == 0
+ || strcmp (sec->output_section->name, ".fini") == 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."),
+ sec->owner, sec, (unsigned long) roff);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_return;
+ }
+
/* If the branch and target are in the same section, you've
got one honking big section and we can't help you. You'll
get an error message later. */
@@ -979,7 +1008,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
size = oor_branch_size;
/* Resize the current section to make room for the new branch. */
- trampoff = (sec->_cooked_size + 15) & (bfd_vma) -16;
+ trampoff = (sec->size + 15) & (bfd_vma) -16;
/* If trampoline is out of range, there is nothing we
can do. */
@@ -991,7 +1020,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
contents = (bfd_byte *) bfd_realloc (contents, amt);
if (contents == NULL)
goto error_return;
- sec->_cooked_size = amt;
+ sec->size = amt;
if (tsec == ia64_info->plt_sec)
{
@@ -1044,8 +1073,8 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
/* Fix up the existing branch to hit the trampoline. */
- if (elfNN_ia64_install_value (abfd, contents + roff, offset,
- r_type) != bfd_reloc_ok)
+ if (elfNN_ia64_install_value (contents + roff, offset, r_type)
+ != bfd_reloc_ok)
goto error_return;
changed_contents = TRUE;
@@ -1084,7 +1113,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
else
{
- elfNN_ia64_relax_ldxmov (abfd, contents, roff);
+ elfNN_ia64_relax_ldxmov (contents, roff);
irel->r_info = ELFNN_R_INFO (0, R_IA64_NONE);
changed_contents = TRUE;
changed_relocs = TRUE;
@@ -1147,8 +1176,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data);
- ia64_info->got_sec->_raw_size = data.ofs;
- ia64_info->got_sec->_cooked_size = data.ofs;
+ ia64_info->got_sec->size = data.ofs;
/* ??? Resize .rela.got too. */
}
@@ -1172,8 +1200,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
static void
-elfNN_ia64_relax_ldxmov (abfd, contents, off)
- bfd *abfd;
+elfNN_ia64_relax_ldxmov (contents, off)
bfd_byte *contents;
bfd_vma off;
{
@@ -1189,7 +1216,7 @@ elfNN_ia64_relax_ldxmov (abfd, contents, off)
abort ();
}
- dword = bfd_get_64 (abfd, contents + off);
+ dword = bfd_getl64 (contents + off);
insn = (dword >> shift) & 0x1ffffffffffLL;
r1 = (insn >> 6) & 127;
@@ -1201,7 +1228,7 @@ elfNN_ia64_relax_ldxmov (abfd, contents, off)
dword &= ~(0x1ffffffffffLL << shift);
dword |= (insn << shift);
- bfd_put_64 (abfd, dword, contents + off);
+ bfd_putl64 (dword, contents + off);
}
/* Return TRUE if NAME is an unwind table section name. */
@@ -1271,7 +1298,7 @@ elfNN_ia64_section_from_shdr (abfd, hdr, name)
static bfd_boolean
elfNN_ia64_section_flags (flags, hdr)
flagword *flags;
- Elf_Internal_Shdr *hdr;
+ const Elf_Internal_Shdr *hdr;
{
if (hdr->sh_flags & SHF_IA_64_SHORT)
*flags |= SEC_SMALL_DATA;
@@ -1337,9 +1364,7 @@ elfNN_ia64_final_write_processing (abfd, linker)
bfd_boolean linker ATTRIBUTE_UNUSED;
{
Elf_Internal_Shdr *hdr;
- const char *sname;
- asection *text_sect, *s;
- size_t len;
+ asection *s;
for (s = abfd->sections; s; s = s->next)
{
@@ -1347,64 +1372,11 @@ elfNN_ia64_final_write_processing (abfd, linker)
switch (hdr->sh_type)
{
case SHT_IA_64_UNWIND:
- /* See comments in gas/config/tc-ia64.c:dot_endp on why we
- have to do this. */
- sname = bfd_get_section_name (abfd, s);
- len = sizeof (ELF_STRING_ia64_unwind) - 1;
- if (sname && strncmp (sname, ELF_STRING_ia64_unwind, len) == 0)
- {
- sname += len;
-
- if (sname[0] == '\0')
- /* .IA_64.unwind -> .text */
- text_sect = bfd_get_section_by_name (abfd, ".text");
- else
- /* .IA_64.unwindFOO -> FOO */
- text_sect = bfd_get_section_by_name (abfd, sname);
- }
- else if (sname
- && (len = sizeof (ELF_STRING_ia64_unwind_once) - 1,
- strncmp (sname, ELF_STRING_ia64_unwind_once, len)) == 0)
- {
- /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */
- size_t len2 = sizeof (".gnu.linkonce.t.") - 1;
- char *once_name = bfd_malloc (len2 + strlen (sname + len) + 1);
-
- if (once_name != NULL)
- {
- memcpy (once_name, ".gnu.linkonce.t.", len2);
- strcpy (once_name + len2, sname + len);
- text_sect = bfd_get_section_by_name (abfd, once_name);
- free (once_name);
- }
- else
- /* Should only happen if we run out of memory, in
- which case we're probably toast anyway. Try to
- cope by finding the section the slow way. */
- for (text_sect = abfd->sections;
- text_sect != NULL;
- text_sect = text_sect->next)
- {
- if (strncmp (bfd_section_name (abfd, text_sect),
- ".gnu.linkonce.t.", len2) == 0
- && strcmp (bfd_section_name (abfd, text_sect) + len2,
- sname + len) == 0)
- break;
- }
- }
- else
- /* last resort: fall back on .text */
- text_sect = bfd_get_section_by_name (abfd, ".text");
-
- if (text_sect)
- {
- /* The IA-64 processor-specific ABI requires setting
- sh_link to the unwind section, whereas HP-UX requires
- sh_info to do so. For maximum compatibility, we'll
- set both for now... */
- hdr->sh_link = elf_section_data (text_sect)->this_idx;
- hdr->sh_info = elf_section_data (text_sect)->this_idx;
- }
+ /* The IA-64 processor-specific ABI requires setting sh_link
+ to the unwind section, whereas HP-UX requires sh_info to
+ do so. For maximum compatibility, we'll set both for
+ now... */
+ hdr->sh_info = hdr->sh_link;
break;
}
}
@@ -2219,7 +2191,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *relend;
Elf_Internal_Shdr *symtab_hdr;
const Elf_Internal_Rela *rel;
- asection *got, *fptr, *srel;
+ asection *got, *fptr, *srel, *pltoff;
if (info->relocatable)
return TRUE;
@@ -2227,7 +2199,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
ia64_info = elfNN_ia64_hash_table (info);
- got = fptr = srel = NULL;
+ got = fptr = srel = pltoff = NULL;
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
@@ -2478,7 +2450,18 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
if (need_entry & NEED_FULL_PLT)
dyn_i->want_plt2 = 1;
if (need_entry & NEED_PLTOFF)
- dyn_i->want_pltoff = 1;
+ {
+ /* This is needed here, in case @pltoff is used in a non-shared
+ link. */
+ if (!pltoff)
+ {
+ pltoff = get_pltoff (abfd, info, ia64_info);
+ if (!pltoff)
+ return FALSE;
+ }
+
+ dyn_i->want_pltoff = 1;
+ }
if ((need_entry & NEED_DYNREL) && (sec->flags & SEC_ALLOC))
{
if (!srel)
@@ -2797,7 +2780,7 @@ allocate_dynrel_entries (dyn_i, data)
}
if (rent->reltext)
ia64_info->reltext = 1;
- rent->srel->_raw_size += sizeof (ElfNN_External_Rela) * count;
+ rent->srel->size += sizeof (ElfNN_External_Rela) * count;
}
/* Take care of the GOT and PLT relocations. */
@@ -2813,18 +2796,18 @@ allocate_dynrel_entries (dyn_i, data)
|| !x->info->pie
|| dyn_i->h == NULL
|| dyn_i->h->root.type != bfd_link_hash_undefweak)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
}
if ((dynamic_symbol || shared) && dyn_i->want_tprel)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
if (dynamic_symbol && dyn_i->want_dtpmod)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
if (dynamic_symbol && dyn_i->want_dtprel)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
if (ia64_info->rel_fptr_sec && dyn_i->want_fptr)
{
if (dyn_i->h == NULL || dyn_i->h->root.type != bfd_link_hash_undefweak)
- ia64_info->rel_fptr_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_fptr_sec->size += sizeof (ElfNN_External_Rela);
}
if (!resolved_zero && dyn_i->want_pltoff)
@@ -2839,7 +2822,7 @@ allocate_dynrel_entries (dyn_i, data)
else if (shared)
t = 2 * sizeof (ElfNN_External_Rela);
- ia64_info->rel_pltoff_sec->_raw_size += t;
+ ia64_info->rel_pltoff_sec->size += t;
}
return TRUE;
@@ -2899,7 +2882,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
sec = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (sec != NULL);
sec->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
- sec->_raw_size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
+ sec->size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
}
/* Allocate the GOT entries. */
@@ -2910,7 +2893,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data);
- ia64_info->got_sec->_raw_size = data.ofs;
+ ia64_info->got_sec->size = data.ofs;
}
/* Allocate the FPTR entries. */
@@ -2919,7 +2902,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
data.ofs = 0;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_fptr, &data);
- ia64_info->fptr_sec->_raw_size = data.ofs;
+ ia64_info->fptr_sec->size = data.ofs;
}
/* Now that we've seen all of the input files, we can decide which
@@ -2941,16 +2924,20 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
data.ofs = (data.ofs + 31) & (bfd_vma) -32;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_plt2_entries, &data);
- if (data.ofs != 0)
+ if (data.ofs != 0 || ia64_info->root.dynamic_sections_created)
{
+ /* FIXME: we always reserve the memory for dynamic linker even if
+ there are no PLT entries since dynamic linker may assume the
+ reserved memory always exists. */
+
BFD_ASSERT (ia64_info->root.dynamic_sections_created);
- ia64_info->plt_sec->_raw_size = data.ofs;
+ ia64_info->plt_sec->size = data.ofs;
/* If we've got a .plt, we need some extra memory for the dynamic
linker. We stuff these in .got.plt. */
sec = bfd_get_section_by_name (dynobj, ".got.plt");
- sec->_raw_size = 8 * PLT_RESERVED_WORDS;
+ sec->size = 8 * PLT_RESERVED_WORDS;
}
/* Allocate the PLTOFF entries. */
@@ -2959,7 +2946,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
data.ofs = 0;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_pltoff_entries, &data);
- ia64_info->pltoff_sec->_raw_size = data.ofs;
+ ia64_info->pltoff_sec->size = data.ofs;
}
if (ia64_info->root.dynamic_sections_created)
@@ -2968,7 +2955,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
required. */
if (info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data);
}
@@ -2989,7 +2976,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
function which decides whether anything needs to go into
these sections. */
- strip = (sec->_raw_size == 0);
+ strip = (sec->size == 0);
if (sec == ia64_info->got_sec)
strip = FALSE;
@@ -3066,8 +3053,8 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
else
{
/* Allocate memory for the section contents. */
- sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->_raw_size);
- if (sec->contents == NULL && sec->_raw_size != 0)
+ sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size);
+ if (sec->contents == NULL && sec->size != 0)
return FALSE;
}
}
@@ -3121,8 +3108,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
}
static bfd_reloc_status_type
-elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
- bfd *abfd;
+elfNN_ia64_install_value (hit_addr, v, r_type)
bfd_byte *hit_addr;
bfd_vma v;
unsigned int r_type;
@@ -3254,8 +3240,8 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
{
case IA64_OPND_IMMU64:
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* tmpl/s: bits 0.. 5 in t0
slot 0: bits 5..45 in t0
@@ -3277,14 +3263,14 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
| (((val >> 21) & 0x001) << 21) /* ic */
| (((val >> 63) & 0x001) << 36)) << 23; /* i */
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
break;
case IA64_OPND_TGT64:
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* tmpl/s: bits 0.. 5 in t0
slot 0: bits 5..45 in t0
@@ -3302,8 +3288,8 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
t1 |= ((((val >> 0) & 0xfffffLL) << 13) /* imm20b */
| (((val >> 59) & 0x1LL) << 36)) << 23; /* i */
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
break;
default:
@@ -3314,7 +3300,7 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
case 2: shift = 23; hit_addr += 6; break;
case 3: return bfd_reloc_notsupported; /* shouldn't happen... */
}
- dword = bfd_get_64 (abfd, hit_addr);
+ dword = bfd_getl64 (hit_addr);
insn = (dword >> shift) & 0x1ffffffffffLL;
op = elf64_ia64_operands + opnd;
@@ -3324,7 +3310,7 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
dword &= ~(0x1ffffffffffLL << shift);
dword |= (insn << shift);
- bfd_put_64 (abfd, dword, hit_addr);
+ bfd_putl64 (dword, hit_addr);
break;
case IA64_OPND_NIL:
@@ -3378,8 +3364,7 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (ElfNN_External_Rela);
bfd_elfNN_swap_reloca_out (abfd, &outrel, loc);
- BFD_ASSERT (sizeof (ElfNN_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ BFD_ASSERT (sizeof (ElfNN_External_Rela) * srel->reloc_count <= srel->size);
}
/* Store an entry for target address TARGET_ADDR in the linkage table
@@ -3695,7 +3680,7 @@ elfNN_ia64_choose_gp (abfd, info)
continue;
lo = os->vma;
- hi = os->vma + os->_raw_size;
+ hi = os->vma + os->size;
if (hi < lo)
hi = (bfd_vma) -1;
@@ -3831,7 +3816,7 @@ elfNN_ia64_final_link (abfd, info)
{
unwind_output_sec = s->output_section;
unwind_output_sec->contents
- = bfd_malloc (unwind_output_sec->_raw_size);
+ = bfd_malloc (unwind_output_sec->size);
if (unwind_output_sec->contents == NULL)
return FALSE;
}
@@ -3845,13 +3830,13 @@ elfNN_ia64_final_link (abfd, info)
{
elfNN_ia64_unwind_entry_compare_bfd = abfd;
qsort (unwind_output_sec->contents,
- (size_t) (unwind_output_sec->_raw_size / 24),
+ (size_t) (unwind_output_sec->size / 24),
24,
elfNN_ia64_unwind_entry_compare);
if (! bfd_set_section_contents (abfd, unwind_output_sec,
unwind_output_sec->contents, (bfd_vma) 0,
- unwind_output_sec->_raw_size))
+ unwind_output_sec->size))
return FALSE;
}
@@ -3918,8 +3903,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type > R_IA64_MAX_RELOC_CODE)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -3959,8 +3944,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
elf_section_data (msec)->
sec_info,
sym->st_value
- + dynent->addend,
- (bfd_vma) 0);
+ + dynent->addend);
dynent->addend -= sym->st_value;
dynent->addend += msec->output_section->vma
+ msec->output_offset
@@ -4024,8 +4008,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
/* ??? People shouldn't be doing non-pic code in
shared libraries nor dynamic executables. */
(*_bfd_error_handler)
- (_("%s: non-pic code with imm relocation against dynamic symbol `%s'"),
- bfd_archive_filename (input_bfd),
+ (_("%B: non-pic code with imm relocation against dynamic symbol `%s'"),
+ input_bfd,
h->root.root.string);
ret_val = FALSE;
continue;
@@ -4077,7 +4061,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTV32LSB:
case R_IA64_LTV64MSB:
case R_IA64_LTV64LSB:
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_GPREL22:
@@ -4089,13 +4073,13 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: @gprel relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.string);
+ (_("%B: @gprel relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.string);
ret_val = FALSE;
continue;
}
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF22:
@@ -4105,7 +4089,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value = set_got_entry (input_bfd, info, dyn_i, (h ? h->dynindx : -1),
rel->r_addend, value, R_IA64_DIR64LSB);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_PLTOFF22:
@@ -4115,7 +4099,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
value = set_pltoff_entry (output_bfd, info, dyn_i, value, FALSE);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_FPTR64I:
@@ -4149,8 +4133,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
/* ??? People shouldn't be doing non-pic code in
shared libraries. Hork. */
(*_bfd_error_handler)
- (_("%s: linking non-pic code in a position independent executable"),
- bfd_archive_filename (input_bfd));
+ (_("%B: linking non-pic code in a position independent executable"),
+ input_bfd);
ret_val = FALSE;
continue;
}
@@ -4180,7 +4164,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
dynindx, addend);
}
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF_FPTR22:
@@ -4222,7 +4206,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value = set_got_entry (output_bfd, info, dyn_i, dynindx,
rel->r_addend, value, R_IA64_FPTR64LSB);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
@@ -4286,13 +4270,12 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
const char *msg;
if (r_type == R_IA64_PCREL21BI)
- msg = _("%s: @internal branch to dynamic symbol %s");
+ msg = _("%B: @internal branch to dynamic symbol %s");
else if (r_type == R_IA64_PCREL21F || r_type == R_IA64_PCREL21M)
- msg = _("%s: speculation fixup to dynamic symbol %s");
+ msg = _("%B: speculation fixup to dynamic symbol %s");
else
- msg = _("%s: @pcrel relocation against dynamic symbol %s");
- (*_bfd_error_handler) (msg, bfd_archive_filename (input_bfd),
- h->root.root.string);
+ msg = _("%B: @pcrel relocation against dynamic symbol %s");
+ (*_bfd_error_handler) (msg, input_bfd, h->root.root.string);
ret_val = FALSE;
continue;
}
@@ -4303,7 +4286,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value -= (input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset) & ~ (bfd_vma) 0x3;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_SEGREL32MSB:
@@ -4347,8 +4330,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value -= p->p_vaddr;
else
value = 0;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
- r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
}
@@ -4362,7 +4344,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value -= input_section->output_section->vma;
else
value = 0;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_IPLTMSB:
@@ -4403,16 +4385,15 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
r_type = R_IA64_DIR64MSB;
else
r_type = R_IA64_DIR64LSB;
- elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
- r = elfNN_ia64_install_value (output_bfd, hit_addr + 8, gp_val,
- r_type);
+ elfNN_ia64_install_value (hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr + 8, gp_val, r_type);
break;
case R_IA64_TPREL14:
case R_IA64_TPREL22:
case R_IA64_TPREL64I:
value -= elfNN_ia64_tprel_base (info);
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_DTPREL14:
@@ -4421,7 +4402,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_DTPREL64LSB:
case R_IA64_DTPREL64MSB:
value -= elfNN_ia64_dtprel_base (info);
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF_TPREL22:
@@ -4463,8 +4444,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value = set_got_entry (input_bfd, info, dyn_i, dynindx, r_addend,
value, got_r_type);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
- r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
@@ -4575,9 +4555,8 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = plt_sec->contents + dyn_i->plt_offset;
memcpy (loc, plt_min_entry, PLT_MIN_ENTRY_SIZE);
- elfNN_ia64_install_value (output_bfd, loc, index, R_IA64_IMM22);
- elfNN_ia64_install_value (output_bfd, loc+2, -dyn_i->plt_offset,
- R_IA64_PCREL21B);
+ elfNN_ia64_install_value (loc, index, R_IA64_IMM22);
+ elfNN_ia64_install_value (loc+2, -dyn_i->plt_offset, R_IA64_PCREL21B);
plt_addr = (plt_sec->output_section->vma
+ plt_sec->output_offset
@@ -4590,8 +4569,7 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = plt_sec->contents + dyn_i->plt2_offset;
memcpy (loc, plt_full_entry, PLT_FULL_ENTRY_SIZE);
- elfNN_ia64_install_value (output_bfd, loc, pltoff_addr - gp_val,
- R_IA64_IMM22);
+ elfNN_ia64_install_value (loc, pltoff_addr - gp_val, R_IA64_IMM22);
/* Mark the symbol as undefined, rather than as defined in the
plt section. Leave the value alone. */
@@ -4657,7 +4635,7 @@ elfNN_ia64_finish_dynamic_sections (abfd, info)
sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (sdyn != NULL);
dyncon = (ElfNN_External_Dyn *) sdyn->contents;
- dynconend = (ElfNN_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (ElfNN_External_Dyn *) (sdyn->contents + sdyn->size);
gp_val = _bfd_get_gp_value (abfd);
@@ -4714,7 +4692,7 @@ elfNN_ia64_finish_dynamic_sections (abfd, info)
+ sgotplt->output_offset
- gp_val);
- elfNN_ia64_install_value (abfd, loc+1, pltres, R_IA64_GPREL22);
+ elfNN_ia64_install_value (loc+1, pltres, R_IA64_GPREL22);
}
}
@@ -4781,8 +4759,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_TRAPNIL) != (out_flags & EF_IA_64_TRAPNIL))
{
(*_bfd_error_handler)
- (_("%s: linking trap-on-NULL-dereference with non-trapping files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking trap-on-NULL-dereference with non-trapping files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4790,8 +4768,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE))
{
(*_bfd_error_handler)
- (_("%s: linking big-endian files with little-endian files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking big-endian files with little-endian files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4799,8 +4777,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64))
{
(*_bfd_error_handler)
- (_("%s: linking 64-bit files with 32-bit files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking 64-bit files with 32-bit files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4808,8 +4786,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP))
{
(*_bfd_error_handler)
- (_("%s: linking constant-gp files with non-constant-gp files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking constant-gp files with non-constant-gp files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4818,8 +4796,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
!= (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP))
{
(*_bfd_error_handler)
- (_("%s: linking auto-pic files with non-auto-pic files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking auto-pic files with non-auto-pic files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -5007,6 +4985,13 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_rela_normal 1
#define elf_backend_special_sections elfNN_ia64_special_sections
+/* FIXME: PR 290: The Intel C compiler generates SHT_IA_64_UNWIND with
+ SHF_LINK_ORDER. But it doesn't set theh sh_link or sh_info fields.
+ We don't want to flood users with so many error messages. We turn
+ off the warning for now. It will be turned on later when the Intel
+ compiler is fixed. */
+#define elf_backend_link_order_error_handler NULL
+
#include "elfNN-target.h"
/* HPUX-specific vectors. */
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index faa2ecc2216..56d0d78bc70 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -400,8 +400,6 @@ static asection *mips_elf_got_section
(bfd *, bfd_boolean);
static struct mips_got_info *mips_elf_got_info
(bfd *, asection **);
-static long mips_elf_get_global_gotsym_index
- (bfd *abfd);
static bfd_vma mips_elf_local_got_index
(bfd *, bfd *, struct bfd_link_info *, bfd_vma);
static bfd_vma mips_elf_global_got_index
@@ -530,8 +528,7 @@ static bfd *reldyn_sorting_bfd;
(NEWABI_P (abfd) ? ".MIPS.options" : ".options")
/* The name of the stub section. */
-#define MIPS_ELF_STUB_SECTION_NAME(abfd) \
- (NEWABI_P (abfd) ? ".MIPS.stubs" : ".stub")
+#define MIPS_ELF_STUB_SECTION_NAME(abfd) ".MIPS.stubs"
/* The size of an external REL relocation. */
#define MIPS_ELF_REL_SIZE(abfd) \
@@ -590,6 +587,7 @@ static bfd *reldyn_sorting_bfd;
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
from smaller values. Start with zero, widen, *then* decrement. */
#define MINUS_ONE (((bfd_vma)0) - 1)
+#define MINUS_TWO (((bfd_vma)0) - 2)
/* The number of local .got entries we reserve. */
#define MIPS_RESERVED_GOTNO (2)
@@ -812,7 +810,6 @@ _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section,
#undef READ
debug->fdr = NULL;
- debug->adjust = NULL;
return TRUE;
@@ -981,7 +978,7 @@ mips_elf_create_procedure_table (void *handle, bfd *abfd,
H_PUT_S32 (abfd, -1, (erp + count)->p_adr);
/* Set the size and contents of .rtproc section. */
- s->_raw_size = size;
+ s->size = size;
s->contents = rtproc;
/* Skip this section later on (I don't think this currently
@@ -1031,8 +1028,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the fn_stub; the only references to this symbol
are 16 bit calls. Clobber the size to 0 to prevent it from
being included in the link. */
- h->fn_stub->_raw_size = 0;
- h->fn_stub->_cooked_size = 0;
+ h->fn_stub->size = 0;
h->fn_stub->flags &= ~SEC_RELOC;
h->fn_stub->reloc_count = 0;
h->fn_stub->flags |= SEC_EXCLUDE;
@@ -1044,8 +1040,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the call_stub; this is a 16 bit function, so
calls from other 16 bit functions are OK. Clobber the size
to 0 to prevent it from being included in the link. */
- h->call_stub->_raw_size = 0;
- h->call_stub->_cooked_size = 0;
+ h->call_stub->size = 0;
h->call_stub->flags &= ~SEC_RELOC;
h->call_stub->reloc_count = 0;
h->call_stub->flags |= SEC_EXCLUDE;
@@ -1057,8 +1052,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the call_stub; this is a 16 bit function, so
calls from other 16 bit functions are OK. Clobber the size
to 0 to prevent it from being included in the link. */
- h->call_fp_stub->_raw_size = 0;
- h->call_fp_stub->_cooked_size = 0;
+ h->call_fp_stub->size = 0;
h->call_fp_stub->flags &= ~SEC_RELOC;
h->call_fp_stub->reloc_count = 0;
h->call_fp_stub->flags |= SEC_EXCLUDE;
@@ -1084,7 +1078,7 @@ _bfd_mips_elf_gprel16_with_gp (bfd *abfd, asymbol *symbol,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Set val to the offset into the section or symbol. */
@@ -1150,7 +1144,7 @@ _bfd_mips_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
{
struct mips_hi16 *n;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
n = bfd_malloc (sizeof *n);
@@ -1201,7 +1195,7 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
{
bfd_vma vallo;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
@@ -1224,13 +1218,6 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
carry or borrow will induce a change of +1 or -1 in the high part. */
hi->rel.addend += (vallo + 0x8000) & 0xffff;
- /* R_MIPS_GNU_REL_HI16 relocations are relative to the address of the
- lo16 relocation, not their own address. If we're calculating the
- final value, and hence subtracting the "PC", subtract the offset
- of the lo16 relocation from here. */
- if (output_bfd == NULL && hi->rel.howto->type == R_MIPS_GNU_REL_HI16)
- hi->rel.addend -= reloc_entry->address - hi->rel.address;
-
ret = _bfd_mips_elf_generic_reloc (abfd, &hi->rel, symbol, hi->data,
hi->input_section, output_bfd,
error_message);
@@ -1262,7 +1249,7 @@ _bfd_mips_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
relocatable = (output_bfd != NULL);
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Build up the field adjustment in VAL. */
@@ -1816,28 +1803,6 @@ mips_elf_got_info (bfd *abfd, asection **sgotp)
return g;
}
-/* Obtain the lowest dynamic index of a symbol that was assigned a
- global GOT entry. */
-static long
-mips_elf_get_global_gotsym_index (bfd *abfd)
-{
- asection *sgot;
- struct mips_got_info *g;
-
- if (abfd == NULL)
- return 0;
-
- sgot = mips_elf_got_section (abfd, TRUE);
- if (sgot == NULL || mips_elf_section_data (sgot) == NULL)
- return 0;
-
- g = mips_elf_section_data (sgot)->u.got_info;
- if (g == NULL || g->global_gotsym == NULL)
- return 0;
-
- return g->global_gotsym->dynindx;
-}
-
/* Returns the GOT offset at which the indicated address can be found.
If there is not yet a GOT entry for this value, create one. Returns
-1 if no satisfactory GOT offset can be found. */
@@ -1900,7 +1865,7 @@ mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h)
BFD_ASSERT (h->dynindx >= global_got_dynindx);
index = ((h->dynindx - global_got_dynindx + g->local_gotno)
* MIPS_ELF_GOT_SIZE (abfd));
- BFD_ASSERT (index < sgot->_raw_size);
+ BFD_ASSERT (index < sgot->size);
return index;
}
@@ -2739,7 +2704,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
}
while (g);
- got->_raw_size = (gg->next->local_gotno
+ got->size = (gg->next->local_gotno
+ gg->next->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
return TRUE;
@@ -2754,12 +2719,6 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
const Elf_Internal_Rela *relocation,
const Elf_Internal_Rela *relend)
{
- /* According to the MIPS ELF ABI, the R_MIPS_LO16 relocation must be
- immediately following. However, for the IRIX6 ABI, the next
- relocation may be a composed relocation consisting of several
- relocations for the same address. In that case, the R_MIPS_LO16
- relocation may occur as one of these. We permit a similar
- extension in general, as that is useful for GCC. */
while (relocation < relend)
{
if (ELF_R_TYPE (abfd, relocation->r_info) == r_type)
@@ -2861,7 +2820,7 @@ mips_elf_higher (bfd_vma value ATTRIBUTE_UNUSED)
return ((value + (bfd_vma) 0x80008000) >> 32) & 0xffff;
#else
abort ();
- return (bfd_vma) -1;
+ return MINUS_ONE;
#endif
}
@@ -2874,7 +2833,7 @@ mips_elf_highest (bfd_vma value ATTRIBUTE_UNUSED)
return ((value + (((bfd_vma) 0x8000 << 32) | 0x80008000)) >> 48) & 0xffff;
#else
abort ();
- return (bfd_vma) -1;
+ return MINUS_ONE;
#endif
}
@@ -2899,7 +2858,7 @@ mips_elf_create_compact_rel_section
MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
- s->_raw_size = sizeof (Elf32_External_compact_rel);
+ s->size = sizeof (Elf32_External_compact_rel);
}
return TRUE;
@@ -3150,8 +3109,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
else if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
symbol = 0;
- else if (strcmp (*namep, "_DYNAMIC_LINK") == 0 ||
- strcmp (*namep, "_DYNAMIC_LINKING") == 0)
+ else if (strcmp (*namep, SGI_COMPAT (input_bfd)
+ ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING") == 0)
{
/* If this is a dynamic link, we should have created a
_DYNAMIC_LINK symbol or _DYNAMIC_LINKING(for normal mips) symbol
@@ -3231,7 +3190,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
else
sec = h->call_fp_stub;
- BFD_ASSERT (sec->_raw_size > 0);
+ BFD_ASSERT (sec->size > 0);
symbol = sec->output_section->vma + sec->output_offset;
}
@@ -3375,8 +3334,6 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_PC32:
- case R_MIPS_PC64:
- case R_MIPS_GNU_REL_LO16:
value = symbol + addend - p;
value &= howto->dst_mask;
break;
@@ -3387,16 +3344,6 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
value = (value >> 2) & howto->dst_mask;
break;
- case R_MIPS_GNU_REL_HI16:
- /* Instead of subtracting 'p' here, we should be subtracting the
- equivalent value for the LO part of the reloc, since the value
- here is relative to that address. Because that's not easy to do,
- we adjust 'addend' in _bfd_mips_elf_relocate_section(). See also
- the comment there for more information. */
- value = mips_elf_high (addend + symbol - p);
- value &= howto->dst_mask;
- break;
-
case R_MIPS16_26:
/* The calculation for R_MIPS16_26 is just the same as for an
R_MIPS_26. It's only the storage of the relocated field into
@@ -3772,9 +3719,9 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
if (!ok)
{
(*_bfd_error_handler)
- (_("%s: %s+0x%lx: jump to stub routine which is not jal"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B: %A+0x%lx: jump to stub routine which is not jal"),
+ input_bfd,
+ input_section,
(unsigned long) relocation->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -3817,13 +3764,13 @@ mips_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n)
s = mips_elf_rel_dyn_section (abfd, FALSE);
BFD_ASSERT (s != NULL);
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* Make room for a null element. */
- s->_raw_size += MIPS_ELF_REL_SIZE (abfd);
+ s->size += MIPS_ELF_REL_SIZE (abfd);
++s->reloc_count;
}
- s->_raw_size += n * MIPS_ELF_REL_SIZE (abfd);
+ s->size += n * MIPS_ELF_REL_SIZE (abfd);
}
/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
@@ -3851,7 +3798,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
BFD_ASSERT (sreloc != NULL);
BFD_ASSERT (sreloc->contents != NULL);
BFD_ASSERT (sreloc->reloc_count * MIPS_ELF_REL_SIZE (output_bfd)
- < sreloc->_raw_size);
+ < sreloc->size);
skip = FALSE;
outrel[0].r_offset =
@@ -3880,15 +3827,15 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
outrel[2].r_offset = outrel[0].r_offset;
/* If we didn't need the relocation at all, this value will be
-1. */
- if (outrel[0].r_offset == (bfd_vma) -1)
+ if (outrel[0].r_offset == MINUS_ONE)
skip = TRUE;
}
#endif
- if (outrel[0].r_offset == (bfd_vma) -1)
+ if (outrel[0].r_offset == MINUS_ONE)
/* The relocation field has been deleted. */
skip = TRUE;
- else if (outrel[0].r_offset == (bfd_vma) -2)
+ else if (outrel[0].r_offset == MINUS_TWO)
{
/* The relocation field has been converted into a relative value of
some sort. Functions like _bfd_elf_write_section_eh_frame expect
@@ -4245,15 +4192,37 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym)
asym->section = bfd_und_section_ptr;
break;
-#if 0 /* for SGI_COMPAT */
case SHN_MIPS_TEXT:
- asym->section = mips_elf_text_section_ptr;
+ {
+ asection *section = bfd_get_section_by_name (abfd, ".text");
+
+ BFD_ASSERT (SGI_COMPAT (abfd));
+ if (section != NULL)
+ {
+ asym->section = section;
+ /* MIPS_TEXT is a bit special, the address is not an offset
+ to the base of the .text section. So substract the section
+ base address to make it an offset. */
+ asym->value -= section->vma;
+ }
+ }
break;
case SHN_MIPS_DATA:
- asym->section = mips_elf_data_section_ptr;
+ {
+ asection *section = bfd_get_section_by_name (abfd, ".data");
+
+ BFD_ASSERT (SGI_COMPAT (abfd));
+ if (section != NULL)
+ {
+ asym->section = section;
+ /* MIPS_DATA is a bit special, the address is not an offset
+ to the base of the .data section. So substract the section
+ base address to make it an offset. */
+ asym->value -= section->vma;
+ }
+ }
break;
-#endif
}
}
@@ -4581,7 +4550,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
if (strcmp (name, ".liblist") == 0)
{
hdr->sh_type = SHT_MIPS_LIBLIST;
- hdr->sh_info = sec->_raw_size / sizeof (Elf32_Lib);
+ hdr->sh_info = sec->size / sizeof (Elf32_Lib);
/* The sh_link field is set in final_write_processing. */
}
else if (strcmp (name, ".conflict") == 0)
@@ -5257,8 +5226,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
{
(*_bfd_error_handler)
- (_("%s: Malformed reloc detected for section %s"),
- bfd_archive_filename (abfd), name);
+ (_("%B: Malformed reloc detected for section %s"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5331,8 +5300,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (h == NULL)
{
(*_bfd_error_handler)
- (_("%s: CALL16 reloc at 0x%lx not against global symbol"),
- bfd_archive_filename (abfd), (unsigned long) rel->r_offset);
+ (_("%B: CALL16 reloc at 0x%lx not against global symbol"),
+ abfd, (unsigned long) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5526,7 +5495,6 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
Elf_Internal_Rela *irel, *irelend;
Elf_Internal_Shdr *symtab_hdr;
bfd_byte *contents = NULL;
- bfd_byte *free_contents = NULL;
size_t extsymoff;
bfd_boolean changed_contents = FALSE;
bfd_vma sec_start = sec->output_section->vma + sec->output_offset;
@@ -5647,13 +5615,7 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto relax_return;
-
- free_contents = contents;
- if (! bfd_get_section_contents (abfd, sec, contents,
- 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto relax_return;
}
}
@@ -5688,8 +5650,9 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
return TRUE;
relax_return:
- if (free_contents != NULL)
- free (free_contents);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
return FALSE;
}
@@ -5757,13 +5720,13 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
BFD_ASSERT (s != NULL);
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* XXX Write this stub address somewhere. */
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this stub code. */
- s->_raw_size += MIPS_FUNCTION_STUB_SIZE;
+ s->size += MIPS_FUNCTION_STUB_SIZE;
/* The last half word of the stub will be filled with the index
of this symbol in .dynsym section. */
@@ -5847,7 +5810,7 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
{
if ((subsection->flags & SEC_ALLOC) == 0)
continue;
- loadable_size += ((subsection->_raw_size + 0xf)
+ loadable_size += ((subsection->size + 0xf)
&~ (bfd_size_type) 0xf);
}
}
@@ -5877,12 +5840,12 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
local_gotno = (loadable_size >> 16) + 5;
g->local_gotno += local_gotno;
- s->_raw_size += g->local_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
+ s->size += g->local_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
g->global_gotno = i;
- s->_raw_size += i * MIPS_ELF_GOT_SIZE (output_bfd);
+ s->size += i * MIPS_ELF_GOT_SIZE (output_bfd);
- if (s->_raw_size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
+ if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
&& ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
return FALSE;
@@ -5909,7 +5872,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size
+ s->size
= strlen (ELF_DYNAMIC_INTERPRETER (output_bfd)) + 1;
s->contents
= (bfd_byte *) ELF_DYNAMIC_INTERPRETER (output_bfd);
@@ -5936,7 +5899,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
if (strncmp (name, ".rel", 4) == 0)
{
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* We only strip the section if the output section name
has the same name. Otherwise, there might be several
@@ -6036,7 +5999,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
{
/* IRIX rld assumes that the function stub isn't at the end
of .text section. So put a dummy. XXX */
- s->_raw_size += MIPS_FUNCTION_STUB_SIZE;
+ s->size += MIPS_FUNCTION_STUB_SIZE;
}
else if (! info->shared
&& ! mips_elf_hash_table (info)->use_rld_obj_head
@@ -6044,11 +6007,11 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
{
/* We add a room for __rld_map. It will be filled in by the
rtld to contain a pointer to the _r_debug structure. */
- s->_raw_size += 4;
+ s->size += 4;
}
else if (SGI_COMPAT (output_bfd)
&& strncmp (name, ".compact_rel", 12) == 0)
- s->_raw_size += mips_elf_hash_table (info)->compact_rel_size;
+ s->size += mips_elf_hash_table (info)->compact_rel_size;
else if (strncmp (name, ".init", 5) != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -6062,8 +6025,8 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
}
/* Allocate memory for the section contents. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
@@ -6255,7 +6218,6 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
combination of the addend stored in two different
relocations. */
if (r_type == R_MIPS_HI16
- || r_type == R_MIPS_GNU_REL_HI16
|| (r_type == R_MIPS_GOT16
&& mips_elf_local_relocation_p (input_bfd, rel,
local_sections, FALSE)))
@@ -6263,7 +6225,6 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_vma l;
const Elf_Internal_Rela *lo16_relocation;
reloc_howto_type *lo16_howto;
- unsigned int lo;
/* The combined value is the sum of the HI16 addend,
left-shifted by sixteen bits, and the LO16
@@ -6271,18 +6232,25 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
a `lui' of the HI16 value, and then an `addiu' of
the LO16 value.)
- Scan ahead to find a matching LO16 relocation. */
- if (r_type == R_MIPS_GNU_REL_HI16)
- lo = R_MIPS_GNU_REL_LO16;
- else
- lo = R_MIPS_LO16;
- lo16_relocation = mips_elf_next_relocation (input_bfd, lo,
+ Scan ahead to find a matching LO16 relocation.
+
+ According to the MIPS ELF ABI, the R_MIPS_LO16
+ relocation must be immediately following.
+ However, for the IRIX6 ABI, the next relocation
+ may be a composed relocation consisting of
+ several relocations for the same address. In
+ that case, the R_MIPS_LO16 relocation may occur
+ as one of these. We permit a similar extension
+ in general, as that is useful for GCC. */
+ lo16_relocation = mips_elf_next_relocation (input_bfd,
+ R_MIPS_LO16,
rel, relend);
if (lo16_relocation == NULL)
return FALSE;
/* Obtain the addend kept there. */
- lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, lo, FALSE);
+ lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd,
+ R_MIPS_LO16, FALSE);
l = mips_elf_obtain_contents (lo16_howto, lo16_relocation,
input_bfd, contents);
l &= lo16_howto->src_mask;
@@ -6293,16 +6261,6 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* Compute the combined addend. */
addend += l;
-
- /* If PC-relative, subtract the difference between the
- address of the LO part of the reloc and the address of
- the HI part. The relocation is relative to the LO
- part, but mips_elf_calculate_relocation() doesn't
- know its address or the difference from the HI part, so
- we subtract that difference here. See also the
- comment in mips_elf_calculate_relocation(). */
- if (r_type == R_MIPS_GNU_REL_HI16)
- addend -= (lo16_relocation->r_offset - rel->r_offset);
}
else if (r_type == R_MIPS16_GPREL)
{
@@ -6360,8 +6318,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else
{
if (r_type == R_MIPS_HI16
- || r_type == R_MIPS_GOT16
- || r_type == R_MIPS_GNU_REL_HI16)
+ || r_type == R_MIPS_GOT16)
addend = mips_elf_high (addend);
else if (r_type == R_MIPS_HIGHER)
addend = mips_elf_higher (addend);
@@ -6607,15 +6564,13 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
Elf_Internal_Sym *sym)
{
bfd *dynobj;
- bfd_vma gval;
asection *sgot;
struct mips_got_info *g, *gg;
const char *name;
dynobj = elf_hash_table (info)->dynobj;
- gval = sym->st_value;
- if (h->plt.offset != (bfd_vma) -1)
+ if (h->plt.offset != MINUS_ONE)
{
asection *s;
bfd_byte stub[MIPS_FUNCTION_STUB_SIZE];
@@ -6638,7 +6593,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
bfd_put_32 (output_bfd, STUB_JALR, stub + 8);
bfd_put_32 (output_bfd, STUB_LI16 (output_bfd) + h->dynindx, stub + 12);
- BFD_ASSERT (h->plt.offset <= s->_raw_size);
+ BFD_ASSERT (h->plt.offset <= s->size);
memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE);
/* Mark the symbol as undefined. plt.offset != -1 occurs
@@ -6648,8 +6603,8 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
/* The run-time linker uses the st_value field of the symbol
to reset the global offset table entry for this external
to its stub address when unlinking a shared object. */
- gval = s->output_section->vma + s->output_offset + h->plt.offset;
- sym->st_value = gval;
+ sym->st_value = (s->output_section->vma + s->output_offset
+ + h->plt.offset);
}
BFD_ASSERT (h->dynindx != -1
@@ -6843,7 +6798,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
BFD_ASSERT (g != NULL);
for (b = sdyn->contents;
- b < sdyn->contents + sdyn->_raw_size;
+ b < sdyn->contents + sdyn->size;
b += MIPS_ELF_DYN_SIZE (dynobj))
{
Elf_Internal_Dyn dyn;
@@ -6934,10 +6889,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size / elemsize;
- else
- dyn.d_un.d_val = s->_raw_size / elemsize;
+ dyn.d_un.d_val = s->size / elemsize;
break;
case DT_MIPS_HIPAGENO:
@@ -6980,7 +6932,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
/* The first entry of the global offset table will be filled at
runtime. The second entry will be used by some runtime loaders.
This isn't the case of IRIX rld. */
- if (sgot != NULL && sgot->_raw_size > 0)
+ if (sgot != NULL && sgot->size > 0)
{
MIPS_ELF_PUT_WORD (output_bfd, 0, sgot->contents);
MIPS_ELF_PUT_WORD (output_bfd, 0x80000000,
@@ -7054,8 +7006,8 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
{
file_ptr dummy_offset;
- BFD_ASSERT (s->_raw_size >= MIPS_FUNCTION_STUB_SIZE);
- dummy_offset = s->_raw_size - MIPS_FUNCTION_STUB_SIZE;
+ BFD_ASSERT (s->size >= MIPS_FUNCTION_STUB_SIZE);
+ dummy_offset = s->size - MIPS_FUNCTION_STUB_SIZE;
memset (s->contents + dummy_offset, 0,
MIPS_FUNCTION_STUB_SIZE);
}
@@ -7067,7 +7019,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
s = mips_elf_rel_dyn_section (dynobj, FALSE);
if (s != NULL
- && s->_raw_size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd))
+ && s->size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd))
{
reldyn_sorting_bfd = output_bfd;
@@ -7462,9 +7414,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
if (low > s->vma)
low = s->vma;
- sz = s->_cooked_size;
- if (sz == 0)
- sz = s->_raw_size;
+ sz = s->size;
if (high < s->vma + sz)
high = s->vma + sz;
}
@@ -7474,9 +7424,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
for (s = abfd->sections; s != NULL; s = s->next)
if ((s->flags & SEC_LOAD) != 0
&& s->vma >= low
- && ((s->vma
- + (s->_cooked_size !=
- 0 ? s->_cooked_size : s->_raw_size)) <= high))
+ && s->vma + s->size <= high)
++c;
amt = sizeof *n + (bfd_size_type) (c - 1) * sizeof (asection *);
@@ -7491,9 +7439,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
{
if ((s->flags & SEC_LOAD) != 0
&& s->vma >= low
- && ((s->vma
- + (s->_cooked_size != 0 ?
- s->_cooked_size : s->_raw_size)) <= high))
+ && s->vma + s->size <= high)
{
n->sections[i] = s;
++i;
@@ -7706,15 +7652,15 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
o = bfd_get_section_by_name (abfd, ".pdr");
if (! o)
return FALSE;
- if (o->_raw_size == 0)
+ if (o->size == 0)
return FALSE;
- if (o->_raw_size % PDR_SIZE != 0)
+ if (o->size % PDR_SIZE != 0)
return FALSE;
if (o->output_section != NULL
&& bfd_is_abs_section (o->output_section))
return FALSE;
- tdata = bfd_zmalloc (o->_raw_size / PDR_SIZE);
+ tdata = bfd_zmalloc (o->size / PDR_SIZE);
if (! tdata)
return FALSE;
@@ -7729,7 +7675,7 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
cookie->rel = cookie->rels;
cookie->relend = cookie->rels + o->reloc_count;
- for (i = 0, skip = 0; i < o->_raw_size / PDR_SIZE; i ++)
+ for (i = 0, skip = 0; i < o->size / PDR_SIZE; i ++)
{
if (bfd_elf_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
{
@@ -7741,7 +7687,7 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
if (skip != 0)
{
mips_elf_section_data (o)->u.tdata = tdata;
- o->_cooked_size = o->_raw_size - skip * PDR_SIZE;
+ o->size -= skip * PDR_SIZE;
ret = TRUE;
}
else
@@ -7775,7 +7721,7 @@ _bfd_mips_elf_write_section (bfd *output_bfd, asection *sec,
return FALSE;
to = contents;
- end = contents + sec->_raw_size;
+ end = contents + sec->size;
for (from = contents, i = 0;
from < end;
from += PDR_SIZE, i++)
@@ -7787,7 +7733,7 @@ _bfd_mips_elf_write_section (bfd *output_bfd, asection *sec,
to += PDR_SIZE;
}
bfd_set_section_contents (output_bfd, sec->output_section, contents,
- sec->output_offset, sec->_cooked_size);
+ sec->output_offset, sec->size);
return TRUE;
}
@@ -7924,13 +7870,7 @@ _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section,
c = mips_elf_section_data (section)->u.tdata;
if (c == NULL)
{
- bfd_size_type size;
-
- if (section->_cooked_size != 0)
- size = section->_cooked_size;
- else
- size = section->_raw_size;
- c = bfd_zalloc (abfd, size);
+ c = bfd_zalloc (abfd, section->size);
if (c == NULL)
return FALSE;
mips_elf_section_data (section)->u.tdata = c;
@@ -7958,6 +7898,7 @@ _bfd_elf_mips_get_relocated_section_contents
/* Get enough memory to hold the stuff */
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
+ bfd_size_type sz;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
@@ -7971,14 +7912,10 @@ _bfd_elf_mips_get_relocated_section_contents
goto error_return;
/* read in the section */
- if (!bfd_get_section_contents (input_bfd, input_section, data, 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* We're not relaxing the section, so just copy the size info */
- input_section->_cooked_size = input_section->_raw_size;
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
@@ -8167,8 +8104,8 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
asection *rtproc_sec;
Elf32_RegInfo reginfo;
struct ecoff_debug_info debug;
- const struct ecoff_debug_swap *swap
- = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct ecoff_debug_swap *swap = bed->elf_backend_ecoff_debug_swap;
HDRR *symhdr = &debug.symbolic_header;
void *mdebug_handle = NULL;
asection *s;
@@ -8196,6 +8133,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
bfd *dynobj;
asection *got;
struct mips_got_info *g;
+ bfd_size_type dynsecsymcount;
/* When we resort, we must tell mips_elf_sort_hash_table what
the lowest index it may use is. That's the number of section
@@ -8203,9 +8141,20 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
adds these symbols when building a shared object. Note that
we count the sections after (possibly) removing the .options
section above. */
- if (! mips_elf_sort_hash_table (info, (info->shared
- ? bfd_count_sections (abfd) + 1
- : 1)))
+
+ dynsecsymcount = 0;
+ if (info->shared)
+ {
+ asection * p;
+
+ for (p = abfd->sections; p ; p = p->next)
+ if ((p->flags & SEC_EXCLUDE) == 0
+ && (p->flags & SEC_ALLOC) != 0
+ && !(*bed->elf_backend_omit_section_dynsym) (abfd, info, p))
+ ++ dynsecsymcount;
+ }
+
+ if (! mips_elf_sort_hash_table (info, dynsecsymcount + 1))
return FALSE;
/* Make sure we didn't grow the global .got region. */
@@ -8323,11 +8272,6 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
input_section = p->u.indirect.section;
input_bfd = input_section->owner;
- /* The linker emulation code has probably clobbered the
- size to be zero bytes. */
- if (input_section->_raw_size == 0)
- input_section->_raw_size = sizeof (Elf32_External_RegInfo);
-
if (! bfd_get_section_contents (input_bfd, input_section,
&ext, 0, sizeof ext))
return FALSE;
@@ -8350,7 +8294,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
/* Size has been set in _bfd_mips_elf_always_size_sections. */
- BFD_ASSERT(o->_raw_size == sizeof (Elf32_External_RegInfo));
+ BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
@@ -8418,7 +8362,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (s != NULL)
{
esym.asym.value = s->vma;
- last = s->vma + s->_raw_size;
+ last = s->vma + s->size;
}
else
esym.asym.value = last;
@@ -8459,7 +8403,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
input_swap = (get_elf_backend_data (input_bfd)
->elf_backend_ecoff_debug_swap);
- BFD_ASSERT (p->size == input_section->_raw_size);
+ BFD_ASSERT (p->size == input_section->size);
/* The ECOFF linking code expects that we have already
read in the debugging information and set up an
@@ -8563,7 +8507,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
return FALSE;
/* Set the size of the .mdebug section. */
- o->_raw_size = bfd_ecoff_debug_size (abfd, &debug, swap);
+ o->size = bfd_ecoff_debug_size (abfd, &debug, swap);
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
@@ -8681,7 +8625,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* Combine the gptab entries for this input section one
by one. We know that the input gptab entries are
sorted by ascending -G value. */
- size = bfd_section_size (input_bfd, input_section);
+ size = input_section->size;
last = 0;
for (gpentry = sizeof (Elf32_External_gptab);
gpentry < size;
@@ -8778,7 +8722,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
bfd_mips_elf32_swap_gptab_out (abfd, tab + j, ext_tab + j);
free (tab);
- o->_raw_size = c * sizeof (Elf32_External_gptab);
+ o->size = c * sizeof (Elf32_External_gptab);
o->contents = (bfd_byte *) ext_tab;
/* Skip this section later on (I don't think this currently
@@ -8817,7 +8761,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, gptab_data_sec,
gptab_data_sec->contents,
- 0, gptab_data_sec->_raw_size))
+ 0, gptab_data_sec->size))
return FALSE;
}
@@ -8825,7 +8769,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, gptab_bss_sec,
gptab_bss_sec->contents,
- 0, gptab_bss_sec->_raw_size))
+ 0, gptab_bss_sec->size))
return FALSE;
}
@@ -8836,7 +8780,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, rtproc_sec,
rtproc_sec->contents,
- 0, rtproc_sec->_raw_size))
+ 0, rtproc_sec->size))
return FALSE;
}
}
@@ -8951,8 +8895,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (! _bfd_generic_verify_endian_match (ibfd, obfd))
{
(*_bfd_error_handler)
- (_("%s: endianness incompatible with that of the selected emulation"),
- bfd_archive_filename (ibfd));
+ (_("%B: endianness incompatible with that of the selected emulation"),
+ ibfd);
return FALSE;
}
@@ -8963,8 +8907,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
{
(*_bfd_error_handler)
- (_("%s: ABI is incompatible with that of the selected emulation"),
- bfd_archive_filename (ibfd));
+ (_("%B: ABI is incompatible with that of the selected emulation"),
+ ibfd);
return FALSE;
}
@@ -9017,7 +8961,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
which are automatically generated by gas. */
if (strcmp (sec->name, ".reginfo")
&& strcmp (sec->name, ".mdebug")
- && (sec->_raw_size != 0
+ && (sec->size != 0
|| (strcmp (sec->name, ".text")
&& strcmp (sec->name, ".data")
&& strcmp (sec->name, ".bss"))))
@@ -9035,8 +8979,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
!= ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
{
(*_bfd_error_handler)
- (_("%s: warning: linking PIC files with non-PIC files"),
- bfd_archive_filename (ibfd));
+ (_("%B: warning: linking PIC files with non-PIC files"),
+ ibfd);
ok = TRUE;
}
@@ -9052,8 +8996,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
{
(*_bfd_error_handler)
- (_("%s: linking 32-bit code with 64-bit code"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking 32-bit code with 64-bit code"),
+ ibfd);
ok = FALSE;
}
else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
@@ -9080,8 +9024,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
/* The ISAs aren't compatible. */
(*_bfd_error_handler)
- (_("%s: linking %s module with previous %s modules"),
- bfd_archive_filename (ibfd),
+ (_("%B: linking %s module with previous %s modules"),
+ ibfd,
bfd_printable_name (ibfd),
bfd_printable_name (obfd));
ok = FALSE;
@@ -9103,8 +9047,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
!= elf_elfheader (obfd)->e_ident[EI_CLASS]))
{
(*_bfd_error_handler)
- (_("%s: ABI mismatch: linking %s module with previous %s modules"),
- bfd_archive_filename (ibfd),
+ (_("%B: ABI mismatch: linking %s module with previous %s modules"),
+ ibfd,
elf_mips_abi_name (ibfd),
elf_mips_abi_name (obfd));
ok = FALSE;
@@ -9126,8 +9070,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (new_flags != old_flags)
{
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (unsigned long) new_flags,
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (unsigned long) new_flags,
(unsigned long) old_flags);
ok = FALSE;
}
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index e250a97da7a..18a8d0f5d69 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -1,6 +1,6 @@
/* Target definitions for NN-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -34,6 +34,10 @@
#define bfd_elfNN_canonicalize_dynamic_symtab \
_bfd_elf_canonicalize_dynamic_symtab
+#ifndef bfd_elfNN_get_synthetic_symtab
+#define bfd_elfNN_get_synthetic_symtab \
+ _bfd_elf_get_synthetic_symtab
+#endif
#ifndef bfd_elfNN_canonicalize_reloc
#define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc
#endif
@@ -134,10 +138,19 @@
_bfd_elf_merge_sections
#endif
+#ifndef bfd_elfNN_bfd_is_group_section
+#define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
+#endif
+
#ifndef bfd_elfNN_bfd_discard_group
#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
#endif
+#ifndef bfd_elfNN_section_already_linked
+#define bfd_elfNN_section_already_linked \
+ _bfd_elf_section_already_linked
+#endif
+
#ifndef bfd_elfNN_bfd_make_debug_symbol
#define bfd_elfNN_bfd_make_debug_symbol \
((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
@@ -152,6 +165,10 @@
#define bfd_elfNN_bfd_copy_private_section_data \
_bfd_elf_copy_private_section_data
#endif
+#ifndef bfd_elfNN_bfd_copy_private_header_data
+#define bfd_elfNN_bfd_copy_private_header_data \
+ _bfd_elf_copy_private_header_data
+#endif
#ifndef bfd_elfNN_bfd_copy_private_bfd_data
#define bfd_elfNN_bfd_copy_private_bfd_data \
_bfd_elf_copy_private_bfd_data
@@ -262,6 +279,13 @@
#define ELF_MAXPAGESIZE 1
#endif
+#ifndef ELF_DYNAMIC_SEC_FLAGS
+/* Note that we set the SEC_IN_MEMORY flag for these sections. */
+#define ELF_DYNAMIC_SEC_FLAGS \
+ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED)
+#endif
+
#ifndef elf_backend_collect
#define elf_backend_collect FALSE
#endif
@@ -284,6 +308,9 @@
#ifndef elf_backend_get_symbol_type
#define elf_backend_get_symbol_type 0
#endif
+#ifndef elf_backend_archive_symbol_lookup
+#define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup
+#endif
#ifndef elf_backend_name_local_section_symbols
#define elf_backend_name_local_section_symbols 0
#endif
@@ -314,9 +341,15 @@
#ifndef elf_backend_create_dynamic_sections
#define elf_backend_create_dynamic_sections 0
#endif
+#ifndef elf_backend_omit_section_dynsym
+#define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym
+#endif
#ifndef elf_backend_check_relocs
#define elf_backend_check_relocs 0
#endif
+#ifndef elf_backend_check_directives
+#define elf_backend_check_directives 0
+#endif
#ifndef elf_backend_adjust_dynamic_symbol
#define elf_backend_adjust_dynamic_symbol 0
#endif
@@ -443,6 +476,13 @@
#define elf_backend_rela_normal 0
#endif
+#ifndef elf_backend_plt_sym_val
+#define elf_backend_plt_sym_val NULL
+#endif
+#ifndef elf_backend_relplt_name
+#define elf_backend_relplt_name NULL
+#endif
+
#ifndef ELF_MACHINE_ALT1
#define ELF_MACHINE_ALT1 0
#endif
@@ -463,6 +503,10 @@
#define elf_backend_sign_extend_vma 0
#endif
+#ifndef elf_backend_link_order_error_handler
+#define elf_backend_link_order_error_handler _bfd_default_error_handler
+#endif
+
extern const struct elf_size_info _bfd_elfNN_size_info;
#ifndef INCLUDED_TARGET_FILE
@@ -471,6 +515,7 @@ static const struct elf_backend_data elfNN_bed =
ELF_ARCH, /* arch */
ELF_MACHINE_CODE, /* elf_machine_code */
ELF_MAXPAGESIZE, /* maxpagesize */
+ ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */
elf_info_to_howto,
elf_info_to_howto_rel,
elf_backend_sym_is_global,
@@ -478,6 +523,7 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_symbol_processing,
elf_backend_symbol_table_processing,
elf_backend_get_symbol_type,
+ elf_backend_archive_symbol_lookup,
elf_backend_name_local_section_symbols,
elf_backend_section_processing,
elf_backend_section_from_shdr,
@@ -488,7 +534,9 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_add_symbol_hook,
elf_backend_link_output_symbol_hook,
elf_backend_create_dynamic_sections,
+ elf_backend_omit_section_dynsym,
elf_backend_check_relocs,
+ elf_backend_check_directives,
elf_backend_adjust_dynamic_symbol,
elf_backend_always_size_sections,
elf_backend_size_dynamic_sections,
@@ -524,6 +572,9 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_mips_rtype_to_howto,
elf_backend_ecoff_debug_swap,
elf_backend_bfd_from_remote_memory,
+ elf_backend_plt_sym_val,
+ elf_backend_link_order_error_handler,
+ elf_backend_relplt_name,
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,
&elf_backend_size_info,
diff --git a/bfd/hash.c b/bfd/hash.c
index 58fa5327bee..2954ec8d12e 100644
--- a/bfd/hash.c
+++ b/bfd/hash.c
@@ -1,28 +1,29 @@
/* hash.c -- hash table routines for BFD
- Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-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 "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "objalloc.h"
+#include "libiberty.h"
/*
SECTION
@@ -87,6 +88,10 @@ SUBSECTION
been allocated for a hash table. This will not free up the
<<struct bfd_hash_table>> itself, which you must provide.
+@findex bfd_hash_set_default_size
+ Use <<bfd_hash_set_default_size>> to set the default size of
+ hash table to use.
+
INODE
Looking Up or Entering a String, Traversing a Hash Table, Creating and Freeing a Hash Table, Hash Tables
SUBSECTION
@@ -295,7 +300,8 @@ SUBSUBSECTION
*/
/* The default number of entries to use when creating a hash table. */
-#define DEFAULT_SIZE (4051)
+#define DEFAULT_SIZE 4051
+static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
/* Create a new hash table, given a number of entries. */
@@ -339,7 +345,7 @@ bfd_hash_table_init (table, newfunc)
struct bfd_hash_table *,
const char *));
{
- return bfd_hash_table_init_n (table, newfunc, DEFAULT_SIZE);
+ return bfd_hash_table_init_n (table, newfunc, bfd_default_hash_table_size);
}
/* Free a hash table. */
@@ -495,6 +501,24 @@ bfd_hash_traverse (table, func, info)
}
}
+void
+bfd_hash_set_default_size (bfd_size_type hash_size)
+{
+ int index;
+ /* Extend this prime list if you want more granularity of hash table size. */
+ static bfd_size_type hash_size_primes[] =
+ {
+ 1021, 4051, 8599, 16699
+ };
+
+ /* Work out best prime number near the hash_size. */
+ for (index = 0; index < ARRAY_SIZE (hash_size_primes) - 1; ++index)
+ if (hash_size <= hash_size_primes[index])
+ break;
+
+ bfd_default_hash_table_size = hash_size_primes[index];
+}
+
/* A few different object file formats (a.out, COFF, ELF) use a string
table. These functions support adding strings to a string table,
returning the byte offset, and writing out the table.
diff --git a/bfd/hp300hpux.c b/bfd/hp300hpux.c
index f6cdd192154..732073a989a 100644
--- a/bfd/hp300hpux.c
+++ b/bfd/hp300hpux.c
@@ -1,6 +1,6 @@
/* BFD backend for hp-ux 9000/300
- Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Written by Glenn Engel.
This file is part of BFD, the Binary File Descriptor library.
@@ -232,7 +232,7 @@ MY (callback) (abfd)
struct internal_exec *execp = exec_hdr (abfd);
/* Calculate the file positions of the parts of a newly read aout header */
- obj_textsec (abfd)->_raw_size = N_TXTSIZE (*execp);
+ obj_textsec (abfd)->size = N_TXTSIZE (*execp);
/* The virtual memory addresses of the sections */
obj_textsec (abfd)->vma = N_TXTADDR (*execp);
diff --git a/bfd/hppabsd-core.c b/bfd/hppabsd-core.c
index ff88f9d2273..542930f7574 100644
--- a/bfd/hppabsd-core.c
+++ b/bfd/hppabsd-core.c
@@ -81,11 +81,11 @@ struct hppabsd_core_struct
#define core_regsec(bfd) (core_hdr(bfd)->reg_section)
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, offset, alignment_power)
+make_bfd_asection (abfd, name, flags, size, offset, alignment_power)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
file_ptr offset;
unsigned int alignment_power;
{
@@ -96,7 +96,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, offset, alignment_power)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->filepos = offset;
asect->alignment_power = alignment_power;
@@ -139,7 +139,8 @@ hppabsd_core_core_file_p (abfd)
{
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL || fstat (fileno (stream), &statbuf) < 0)
+
+ if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
return NULL;
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index 30967c9fc30..347de2170f3 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -115,11 +115,11 @@ static void swap_abort
PARAMS ((void));
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, alignment_power)
+make_bfd_asection (abfd, name, flags, size, vma, alignment_power)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
unsigned int alignment_power;
{
@@ -137,7 +137,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, alignment_power)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = bfd_tell (abfd);
asect->alignment_power = alignment_power;
@@ -145,6 +145,17 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, alignment_power)
return asect;
}
+/* Return true if the given core file section corresponds to a thread,
+ based on its name. */
+
+static int
+thread_section_p (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sect,
+ void *obj ATTRIBUTE_UNUSED)
+{
+ return (strncmp (bfd_section_name (abfd, sect), ".reg/", 5) == 0);
+}
+
/* this function builds a bfd target if the file is a corefile.
It returns null or 0 if it finds out thaat it is not a core file.
The way it checks this is by looking for allowed 'type' field values.
@@ -207,7 +218,7 @@ hpux_core_core_file_p (abfd)
/* However, we also want to create those sections with the
file positioned at the start of the record, it seems. */
- if (bfd_seek (abfd, (file_ptr) -core_header.len, SEEK_CUR) != 0)
+ if (bfd_seek (abfd, -((file_ptr) core_header.len), SEEK_CUR) != 0)
break;
#if defined(PROC_INFO_HAS_THREAD_ID)
@@ -276,7 +287,8 @@ hpux_core_core_file_p (abfd)
case CORE_ANON_SHMEM:
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
- core_header.len, core_header.addr, 2))
+ core_header.len,
+ (bfd_vma) core_header.addr, 2))
goto fail;
bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR);
@@ -300,6 +312,29 @@ hpux_core_core_file_p (abfd)
/* OK, we believe you. You're a core file (sure, sure). */
+ /* On HP/UX, we sometimes encounter core files where none of the threads
+ was found to be the running thread (ie the signal was set to -1 for
+ all threads). This happens when the program was aborted externally
+ via a TT_CORE ttrace system call. In that case, we just pick one
+ thread at random to be the active thread. */
+ if (core_kernel_thread_id (abfd) != 0
+ && bfd_get_section_by_name (abfd, ".reg") == NULL)
+ {
+ asection *asect = bfd_sections_find_if (abfd, thread_section_p, NULL);
+ asection *reg_sect;
+
+ if (asect != NULL)
+ {
+ reg_sect = make_bfd_asection (abfd, ".reg", asect->flags,
+ asect->size, asect->vma,
+ asect->alignment_power);
+ if (reg_sect == NULL)
+ goto fail;
+
+ reg_sect->filepos = asect->filepos;
+ }
+ }
+
/* Were there sections of unknown type? If so, yet there were
at least some complete sections of known type, then, issue
a warning. Possibly the core file was generated on a version
diff --git a/bfd/i386linux.c b/bfd/i386linux.c
index da36e75c784..7ef0946597e 100644
--- a/bfd/i386linux.c
+++ b/bfd/i386linux.c
@@ -1,5 +1,5 @@
/* BFD back-end for linux flavored i386 a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -316,7 +316,7 @@ linux_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
- s->_raw_size = 0;
+ s->size = 0;
s->contents = 0;
return TRUE;
@@ -594,9 +594,9 @@ bfd_i386linux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = linux_hash_table (info)->fixup_count + 1;
- s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = linux_hash_table (info)->fixup_count + 1;
+ s->size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -761,7 +761,7 @@ linux_finish_dynamic_link (output_bfd, info)
SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
diff --git a/bfd/i386msdos.c b/bfd/i386msdos.c
index 059466b4c95..aedcef0fcb5 100644
--- a/bfd/i386msdos.c
+++ b/bfd/i386msdos.c
@@ -1,6 +1,6 @@
/* BFD back-end for MS-DOS executables.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
Written by Bryan Ford of the University of Utah.
Contributed by the Center for Software Science at the
@@ -83,20 +83,19 @@ msdos_write_object_contents (abfd)
/* Find the total size of the program on disk and in memory. */
for (sec = abfd->sections; sec != (asection *) NULL; sec = sec->next)
{
- if (bfd_get_section_size_before_reloc (sec) == 0)
+ if (sec->size == 0)
continue;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
{
- bfd_vma sec_vma = bfd_get_section_vma (abfd, sec)
- + bfd_get_section_size_before_reloc (sec);
+ bfd_vma sec_vma = bfd_get_section_vma (abfd, sec) + sec->size;
if (sec_vma > high_vma)
high_vma = sec_vma;
}
if (bfd_get_section_flags (abfd, sec) & SEC_LOAD)
{
- file_ptr sec_end = sizeof(hdr)
- + bfd_get_section_vma (abfd, sec)
- + bfd_get_section_size_before_reloc (sec);
+ file_ptr sec_end = (sizeof (hdr)
+ + bfd_get_section_vma (abfd, sec)
+ + sec->size);
if (sec_end > outfile_size)
outfile_size = sec_end;
}
@@ -176,7 +175,10 @@ msdos_set_section_contents (abfd, section, location, offset, count)
#define msdos_bfd_relax_section bfd_generic_relax_section
#define msdos_bfd_gc_sections bfd_generic_gc_sections
#define msdos_bfd_merge_sections bfd_generic_merge_sections
+#define msdos_bfd_is_group_section bfd_generic_is_group_section
#define msdos_bfd_discard_group bfd_generic_discard_group
+#define msdos_section_already_linked \
+ _bfd_generic_section_already_linked
#define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/i386os9k.c b/bfd/i386os9k.c
index d9a34e34131..c4b9d1ee131 100644
--- a/bfd/i386os9k.c
+++ b/bfd/i386os9k.c
@@ -1,6 +1,6 @@
/* BFD back-end for os9000 i386 binaries.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002,
+ 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -170,7 +170,7 @@ os9k_callback (abfd)
obj_datasec (abfd)->vma = execp->a_dload;
/* And reload the sizes, since the aout module zaps them. */
- obj_textsec (abfd)->_raw_size = execp->a_text;
+ obj_textsec (abfd)->size = execp->a_text;
bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section. */
obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
@@ -229,9 +229,9 @@ os9k_write_object_contents (abfd)
exec_hdr (abfd)->a_info = BMAGIC;
- exec_hdr (abfd)->a_text = obj_textsec (abfd)->_raw_size;
- exec_hdr (abfd)->a_data = obj_datasec (abfd)->_raw_size;
- exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->_raw_size;
+ exec_hdr (abfd)->a_text = obj_textsec (abfd)->size;
+ exec_hdr (abfd)->a_data = obj_datasec (abfd)->size;
+ exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->size;
exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * sizeof (struct nlist);
exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
exec_hdr (abfd)->a_trsize = ((obj_textsec (abfd)->reloc_count) *
@@ -295,7 +295,7 @@ os9k_set_section_contents (abfd, section, location, offset, count)
obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
obj_datasec (abfd)->filepos = obj_textsec (abfd)->filepos
- + obj_textsec (abfd)->_raw_size;
+ + obj_textsec (abfd)->size;
}
/* Regardless, once we know what we're doing, we might as well get going. */
@@ -333,7 +333,10 @@ os9k_sizeof_headers (ignore_abfd, ignore)
#define os9k_bfd_relax_section bfd_generic_relax_section
#define os9k_bfd_gc_sections bfd_generic_gc_sections
#define os9k_bfd_merge_sections bfd_generic_merge_sections
+#define os9k_bfd_is_group_section bfd_generic_is_group_section
#define os9k_bfd_discard_group bfd_generic_discard_group
+#define os9k_section_already_linked \
+ _bfd_generic_section_already_linked
#define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 8a0802840d4..aaf1f1124b2 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -1,6 +1,6 @@
/* BFD back-end for ieee-695 objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -704,7 +704,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
next_byte (&(ieee->h));
PUSH (NOSYMBOL,
0,
- ieee->section_table[must_parse_int (&(ieee->h))]->_raw_size);
+ ieee->section_table[must_parse_int (&(ieee->h))]->size);
break;
case ieee_variable_I_enum:
/* Push the address of variable n. */
@@ -935,9 +935,8 @@ ieee_slurp_external_symbols (abfd)
break;
default:
(*_bfd_error_handler)
- (_("%s: unimplemented ATI record %u for symbol %u"),
- bfd_archive_filename (abfd), symbol_attribute_def,
- symbol_name_index);
+ (_("%B: unimplemented ATI record %u for symbol %u"),
+ abfd, symbol_attribute_def, symbol_name_index);
bfd_set_error (bfd_error_bad_value);
return FALSE;
break;
@@ -960,8 +959,8 @@ ieee_slurp_external_symbols (abfd)
if (value != 0x3f)
{
(*_bfd_error_handler)
- (_("%s: unexpected ATN type %d in external part"),
- bfd_archive_filename (abfd), (int) value);
+ (_("%B: unexpected ATN type %d in external part"),
+ abfd, (int) value);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -982,8 +981,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
- (_("%s: unexpected type after ATN"),
- bfd_archive_filename (abfd));
+ (_("%B: unexpected type after ATN"), abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1021,7 +1019,7 @@ ieee_slurp_external_symbols (abfd)
val = symbol->symbol.value;
for (s = abfd->sections; s != NULL; s = s->next)
{
- if (val >= s->vma && val < s->vma + s->_raw_size)
+ if (val >= s->vma && val < s->vma + s->size)
{
symbol->symbol.section = s;
symbol->symbol.value -= s->vma;
@@ -1378,11 +1376,11 @@ ieee_slurp_sections (abfd)
{
case ieee_section_size_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
- section->_raw_size = must_parse_int (&(ieee->h));
+ section->size = must_parse_int (&(ieee->h));
break;
case ieee_physical_region_size_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
- section->_raw_size = must_parse_int (&(ieee->h));
+ section->size = must_parse_int (&(ieee->h));
break;
case ieee_region_base_address_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
@@ -1441,7 +1439,7 @@ ieee_slurp_debug (abfd)
sec->filepos = ieee->w.r.debug_information_part;
debug_end = ieee_part_after (ieee, ieee->w.r.debug_information_part);
- sec->_raw_size = debug_end - ieee->w.r.debug_information_part;
+ sec->size = debug_end - ieee->w.r.debug_information_part;
return TRUE;
}
@@ -2060,7 +2058,7 @@ ieee_slurp_section_data (abfd)
ieee_per_section_type *per = ieee_per_section (s);
if ((s->flags & SEC_DEBUGGING) != 0)
continue;
- per->data = (bfd_byte *) bfd_alloc (ieee->h.abfd, s->_raw_size);
+ per->data = (bfd_byte *) bfd_alloc (ieee->h.abfd, s->size);
if (!per->data)
return FALSE;
per->reloc_tail_ptr =
@@ -2106,7 +2104,7 @@ ieee_slurp_section_data (abfd)
&pcrel, &extra,
0);
current_map->pc = value;
- BFD_ASSERT ((unsigned) (value - s->vma) <= s->_raw_size);
+ BFD_ASSERT ((unsigned) (value - s->vma) <= s->size);
}
break;
@@ -2336,7 +2334,7 @@ ieee_write_section_part (abfd)
|| ! ieee_write_byte (abfd,
(bfd_byte) (s->index
+ IEEE_SECTION_NUMBER_BASE))
- || ! ieee_write_int (abfd, s->_raw_size))
+ || ! ieee_write_int (abfd, s->size))
return FALSE;
if (abfd->flags & EXEC_P)
{
@@ -2398,14 +2396,14 @@ do_with_relocs (abfd, s)
{
/* If there aren't any relocations then output the load constant
byte opcode rather than the load with relocation opcode. */
- while (current_byte_index < s->_raw_size)
+ while (current_byte_index < s->size)
{
bfd_size_type run;
unsigned int MAXRUN = 127;
run = MAXRUN;
- if (run > s->_raw_size - current_byte_index)
- run = s->_raw_size - current_byte_index;
+ if (run > s->size - current_byte_index)
+ run = s->size - current_byte_index;
if (run != 0)
{
@@ -2433,11 +2431,11 @@ do_with_relocs (abfd, s)
if ((PTR) stream == (PTR) NULL)
{
/* Outputting a section without data, fill it up. */
- stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
+ stream = (unsigned char *) bfd_zalloc (abfd, s->size);
if (!stream)
return FALSE;
}
- while (current_byte_index < s->_raw_size)
+ while (current_byte_index < s->size)
{
bfd_size_type run;
unsigned int MAXRUN = 127;
@@ -2451,8 +2449,8 @@ do_with_relocs (abfd, s)
else
run = MAXRUN;
- if (run > s->_raw_size - current_byte_index)
- run = s->_raw_size - current_byte_index;
+ if (run > s->size - current_byte_index)
+ run = s->size - current_byte_index;
if (run != 0)
{
@@ -2561,7 +2559,7 @@ do_as_repeat (abfd, s)
bfd *abfd;
asection *s;
{
- if (s->_raw_size)
+ if (s->size)
{
if (! ieee_write_byte (abfd, ieee_set_current_section_enum)
|| ! ieee_write_byte (abfd,
@@ -2586,7 +2584,7 @@ do_as_repeat (abfd, s)
}
if (! ieee_write_byte (abfd, ieee_repeat_data_enum)
- || ! ieee_write_int (abfd, s->_raw_size)
+ || ! ieee_write_int (abfd, s->size)
|| ! ieee_write_byte (abfd, ieee_load_constant_bytes_enum)
|| ! ieee_write_byte (abfd, 1)
|| ! ieee_write_byte (abfd, 0))
@@ -2612,7 +2610,7 @@ do_without_relocs (abfd, s)
{
unsigned int i;
- for (i = 0; i < s->_raw_size; i++)
+ for (i = 0; i < s->size; i++)
{
if (stream[i] != 0)
{
@@ -3342,7 +3340,7 @@ ieee_write_debug_part (abfd)
}
ieee->w.r.debug_information_part = here;
- if (bfd_bwrite (s->contents, s->_raw_size, abfd) != s->_raw_size)
+ if (bfd_bwrite (s->contents, s->size, abfd) != s->size)
return FALSE;
}
else
@@ -3420,9 +3418,9 @@ init_for_output (abfd)
{
if ((s->flags & SEC_DEBUGGING) != 0)
continue;
- if (s->_raw_size != 0)
+ if (s->size != 0)
{
- bfd_size_type size = s->_raw_size;
+ bfd_size_type size = s->size;
ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, size));
if (!ieee_per_section (s)->data)
return FALSE;
@@ -3448,7 +3446,7 @@ ieee_set_section_contents (abfd, section, location, offset, count)
{
if (section->contents == NULL)
{
- bfd_size_type size = section->_raw_size;
+ bfd_size_type size = section->size;
section->contents = (unsigned char *) bfd_alloc (abfd, size);
if (section->contents == NULL)
return FALSE;
@@ -4037,7 +4035,10 @@ ieee_bfd_debug_info_accumulate (abfd, section)
#define ieee_bfd_relax_section bfd_generic_relax_section
#define ieee_bfd_gc_sections bfd_generic_gc_sections
#define ieee_bfd_merge_sections bfd_generic_merge_sections
+#define ieee_bfd_is_group_section bfd_generic_is_group_section
#define ieee_bfd_discard_group bfd_generic_discard_group
+#define ieee_section_already_linked \
+ _bfd_generic_section_already_linked
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/ihex.c b/bfd/ihex.c
index 5d2d47fbcb7..1392178fee2 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
@@ -261,8 +261,8 @@ ihex_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- (_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
- bfd_archive_filename (abfd), lineno, buf);
+ (_("%B:%d: unexpected character `%s' in Intel Hex file"),
+ abfd, lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -369,8 +369,8 @@ ihex_scan (abfd)
if (((- chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
{
(*_bfd_error_handler)
- (_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
- bfd_archive_filename (abfd), lineno,
+ (_("%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
+ abfd, lineno,
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -381,11 +381,11 @@ ihex_scan (abfd)
case 0:
/* This is a data record. */
if (sec != NULL
- && sec->vma + sec->_raw_size == extbase + segbase + addr)
+ && sec->vma + sec->size == extbase + segbase + addr)
{
/* This data goes at the end of the section we are
currently building. */
- sec->_raw_size += len;
+ sec->size += len;
}
else if (len > 0)
{
@@ -405,7 +405,7 @@ ihex_scan (abfd)
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = extbase + segbase + addr;
sec->lma = extbase + segbase + addr;
- sec->_raw_size = len;
+ sec->size = len;
sec->filepos = pos;
}
break;
@@ -423,8 +423,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended address record length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended address record length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -440,8 +440,8 @@ ihex_scan (abfd)
if (len != 4)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended start address length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended start address length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -457,8 +457,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended linear address record length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended linear address record length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -474,8 +474,8 @@ ihex_scan (abfd)
if (len != 2 && len != 4)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended linear start address length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended linear start address length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -491,8 +491,8 @@ ihex_scan (abfd)
default:
(*_bfd_error_handler)
- (_("%s:%u: unrecognized ihex type %u in Intel Hex file\n"),
- bfd_archive_filename (abfd), lineno, type);
+ (_("%B:%u: unrecognized ihex type %u in Intel Hex file"),
+ abfd, lineno, type);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -616,8 +616,7 @@ ihex_read_section (abfd, section, contents)
if (type != 0)
{
(*_bfd_error_handler)
- (_("%s: internal error in ihex_read_section"),
- bfd_archive_filename (abfd));
+ (_("%B: internal error in ihex_read_section"), abfd);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -635,7 +634,7 @@ ihex_read_section (abfd, section, contents)
for (i = 0; i < len; i++)
*p++ = HEX2 (buf + 2 * i);
- if ((bfd_size_type) (p - contents) >= section->_raw_size)
+ if ((bfd_size_type) (p - contents) >= section->size)
{
/* We've read everything in the section. */
if (buf != NULL)
@@ -648,11 +647,10 @@ ihex_read_section (abfd, section, contents)
goto error_return;
}
- if ((bfd_size_type) (p - contents) < section->_raw_size)
+ if ((bfd_size_type) (p - contents) < section->size)
{
(*_bfd_error_handler)
- (_("%s: bad section length in ihex_read_section"),
- bfd_archive_filename (abfd));
+ (_("%B: bad section length in ihex_read_section"), abfd);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -680,7 +678,7 @@ ihex_get_section_contents (abfd, section, location, offset, count)
{
if (section->used_by_bfd == NULL)
{
- section->used_by_bfd = bfd_alloc (abfd, section->_raw_size);
+ section->used_by_bfd = bfd_alloc (abfd, section->size);
if (section->used_by_bfd == NULL)
return FALSE;
if (! ihex_read_section (abfd, section, section->used_by_bfd))
@@ -988,7 +986,10 @@ ihex_sizeof_headers (abfd, exec)
#define ihex_bfd_relax_section bfd_generic_relax_section
#define ihex_bfd_gc_sections bfd_generic_gc_sections
#define ihex_bfd_merge_sections bfd_generic_merge_sections
+#define ihex_bfd_is_group_section bfd_generic_is_group_section
#define ihex_bfd_discard_group bfd_generic_discard_group
+#define ihex_section_already_linked \
+ _bfd_generic_section_already_linked
#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/irix-core.c b/bfd/irix-core.c
index 486842214f4..740907b86ec 100644
--- a/bfd/irix-core.c
+++ b/bfd/irix-core.c
@@ -161,11 +161,11 @@ do_sections (abfd, coreout)
}
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -176,7 +176,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 4;
diff --git a/bfd/libaout.h b/bfd/libaout.h
index 87b49e5dbd0..a7628954889 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -273,9 +273,12 @@ enum machine_type
M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary. */
M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary. */
M_SPARCLET_1 = 147, /* 0x93, reserved. */
+ M_POWERPC_NETBSD = 149, /* NetBSD/powerpc (big-endian) binary. */
M_VAX4K_NETBSD = 150, /* NetBSD/vax 4K pages binary. */
M_MIPS1 = 151, /* MIPS R2000/R3000 binary. */
M_MIPS2 = 152, /* MIPS R4000/R6000 binary. */
+ M_88K_OPENBSD = 153, /* OpenBSD/m88k binary. */
+ M_HPPA_OPENBSD = 154, /* OpenBSD/hppa binary. */
M_SPARC64_NETBSD = 156, /* NetBSD/sparc64 binary. */
M_X86_64_NETBSD = 157, /* NetBSD/amd64 binary. */
M_SPARCLET_2 = 163, /* 0xa3, reserved. */
@@ -663,8 +666,8 @@ extern bfd_boolean NAME(aout,bfd_free_cached_info)
&& obj_textsec (abfd) != NULL \
&& obj_datasec (abfd) != NULL \
&& (sec)->vma >= (obj_textsec (abfd)->vma + \
- obj_textsec (abfd)->_cooked_size) \
- && ((sec)->vma + (sec)->_cooked_size) <= obj_datasec (abfd)->vma \
+ obj_textsec (abfd)->size) \
+ && ((sec)->vma + (sec)->size) <= obj_datasec (abfd)->vma \
&& ((abfd)->flags & D_PAGED) != 0)
#endif /* ! defined (LIBAOUT_H) */
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 10cafefd6ed..7b6ca76e05a 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -91,6 +91,7 @@ extern void *bfd_realloc
extern void *bfd_zmalloc
(bfd_size_type);
+extern void _bfd_default_error_handler (const char *s, ...);
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
@@ -212,6 +213,8 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
+#define _bfd_generic_bfd_copy_private_header_data \
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((bfd_boolean (*) (bfd *, void *)) bfd_true)
@@ -355,6 +358,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_merge_sections \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
+#define _bfd_nolink_bfd_is_group_section \
+ ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
+ bfd_false)
#define _bfd_nolink_bfd_discard_group \
((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
@@ -370,6 +376,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
+#define _bfd_nolink_section_already_linked \
+ ((void (*) (bfd *, struct bfd_section *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -378,6 +386,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
+#define _bfd_nodynamic_get_synthetic_symtab \
+ ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_reloc \
((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
@@ -467,6 +477,9 @@ extern bfd_boolean _bfd_generic_final_link
extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
+extern void _bfd_generic_section_already_linked
+ (bfd *, struct bfd_section *);
+
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
(bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
@@ -491,7 +504,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
- (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
+ (bfd *, struct stab_info *, asection *, asection *, void **,
+ bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@@ -500,28 +514,28 @@ extern bfd_boolean _bfd_discard_section_stabs
/* Write out the .stab section when linking stabs in sections. */
extern bfd_boolean _bfd_write_section_stabs
- (bfd *, void **, asection *, void **, bfd_byte *);
+ (bfd *, struct stab_info *, asection *, void **, bfd_byte *);
/* Write out the .stabstr string table when linking stabs in sections. */
extern bfd_boolean _bfd_write_stab_strings
- (bfd *, void **);
+ (bfd *, struct stab_info *);
/* Find an offset within a .stab section when linking stabs in
sections. */
extern bfd_vma _bfd_stab_section_offset
- (bfd *, void **, asection *, void **, bfd_vma);
+ (asection *, void *, bfd_vma);
-/* Attempt to merge a SEC_MERGE section. */
+/* Register a SEC_MERGE section as a candidate for merging. */
-extern bfd_boolean _bfd_merge_section
+extern bfd_boolean _bfd_add_merge_section
(bfd *, void **, asection *, void **);
/* Attempt to merge SEC_MERGE sections. */
extern bfd_boolean _bfd_merge_sections
- (bfd *, void *, void (*) (bfd *, asection *));
+ (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *));
/* Write out a merged section. */
@@ -531,7 +545,7 @@ extern bfd_boolean _bfd_write_merged_section
/* Find an offset within a modified SEC_MERGE section. */
extern bfd_vma _bfd_merged_section_offset
- (bfd *, asection **, void *, bfd_vma, bfd_vma);
+ (bfd *, asection **, void *, bfd_vma);
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init
@@ -645,3 +659,28 @@ extern bfd_boolean _bfd_sh_align_load_span
bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#endif
+
+/* This is the shape of the elements inside the already_linked hash
+ table. It maps a name onto a list of already_linked elements with
+ the same name. */
+
+struct bfd_section_already_linked_hash_entry
+{
+ struct bfd_hash_entry root;
+ struct bfd_section_already_linked *entry;
+};
+
+struct bfd_section_already_linked
+{
+ struct bfd_section_already_linked *next;
+ asection *sec;
+};
+
+extern struct bfd_section_already_linked_hash_entry *
+ bfd_section_already_linked_table_lookup (const char *);
+extern void bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *, asection *);
+extern void bfd_section_already_linked_table_traverse
+ (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *);
+
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index be090e9b069..2791ca32a70 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -692,10 +692,12 @@ _bfd_generic_get_section_contents (bfd *abfd,
file_ptr offset,
bfd_size_type count)
{
+ bfd_size_type sz;
if (count == 0)
return TRUE;
- if (offset + count > section->_raw_size)
+ sz = section->rawsize ? section->rawsize : section->size;
+ if (offset + count > sz)
{
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
@@ -717,6 +719,8 @@ _bfd_generic_get_section_contents_in_window
bfd_size_type count ATTRIBUTE_UNUSED)
{
#ifdef USE_MMAP
+ bfd_size_type sz;
+
if (count == 0)
return TRUE;
if (abfd->xvec->_bfd_get_section_contents
@@ -744,7 +748,8 @@ _bfd_generic_get_section_contents_in_window
w->data = w->i->data;
return bfd_get_section_contents (abfd, section, w->data, offset, count);
}
- if (offset + count > section->_raw_size
+ sz = section->rawsize ? section->rawsize : section->size;
+ if (offset + count > sz
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
TRUE))
return FALSE;
@@ -818,11 +823,11 @@ _bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
const char *msg;
if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system and target is little endian");
+ msg = _("%B: compiled for a big endian system and target is little endian");
else
- msg = _("%s: compiled for a little endian system and target is big endian");
+ msg = _("%B: compiled for a little endian system and target is big endian");
- (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
+ (*_bfd_error_handler) (msg, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index e4e17f98035..4e9a4c27291 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -96,6 +96,7 @@ extern void *bfd_realloc
extern void *bfd_zmalloc
(bfd_size_type);
+extern void _bfd_default_error_handler (const char *s, ...);
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
@@ -217,6 +218,8 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
+#define _bfd_generic_bfd_copy_private_header_data \
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((bfd_boolean (*) (bfd *, void *)) bfd_true)
@@ -360,6 +363,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_merge_sections \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
+#define _bfd_nolink_bfd_is_group_section \
+ ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
+ bfd_false)
#define _bfd_nolink_bfd_discard_group \
((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
@@ -375,6 +381,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
+#define _bfd_nolink_section_already_linked \
+ ((void (*) (bfd *, struct bfd_section *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -383,6 +391,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
+#define _bfd_nodynamic_get_synthetic_symtab \
+ ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_reloc \
((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
@@ -472,6 +482,9 @@ extern bfd_boolean _bfd_generic_final_link
extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
+extern void _bfd_generic_section_already_linked
+ (bfd *, struct bfd_section *);
+
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
(bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
@@ -496,7 +509,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
- (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
+ (bfd *, struct stab_info *, asection *, asection *, void **,
+ bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@@ -505,28 +519,28 @@ extern bfd_boolean _bfd_discard_section_stabs
/* Write out the .stab section when linking stabs in sections. */
extern bfd_boolean _bfd_write_section_stabs
- (bfd *, void **, asection *, void **, bfd_byte *);
+ (bfd *, struct stab_info *, asection *, void **, bfd_byte *);
/* Write out the .stabstr string table when linking stabs in sections. */
extern bfd_boolean _bfd_write_stab_strings
- (bfd *, void **);
+ (bfd *, struct stab_info *);
/* Find an offset within a .stab section when linking stabs in
sections. */
extern bfd_vma _bfd_stab_section_offset
- (bfd *, void **, asection *, void **, bfd_vma);
+ (asection *, void *, bfd_vma);
-/* Attempt to merge a SEC_MERGE section. */
+/* Register a SEC_MERGE section as a candidate for merging. */
-extern bfd_boolean _bfd_merge_section
+extern bfd_boolean _bfd_add_merge_section
(bfd *, void **, asection *, void **);
/* Attempt to merge SEC_MERGE sections. */
extern bfd_boolean _bfd_merge_sections
- (bfd *, void *, void (*) (bfd *, asection *));
+ (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *));
/* Write out a merged section. */
@@ -536,7 +550,7 @@ extern bfd_boolean _bfd_write_merged_section
/* Find an offset within a modified SEC_MERGE section. */
extern bfd_vma _bfd_merged_section_offset
- (bfd *, asection **, void *, bfd_vma, bfd_vma);
+ (bfd *, asection **, void *, bfd_vma);
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init
@@ -650,6 +664,31 @@ extern bfd_boolean _bfd_sh_align_load_span
bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#endif
+
+/* This is the shape of the elements inside the already_linked hash
+ table. It maps a name onto a list of already_linked elements with
+ the same name. */
+
+struct bfd_section_already_linked_hash_entry
+{
+ struct bfd_hash_entry root;
+ struct bfd_section_already_linked *entry;
+};
+
+struct bfd_section_already_linked
+{
+ struct bfd_section_already_linked *next;
+ asection *sec;
+};
+
+extern struct bfd_section_already_linked_hash_entry *
+ bfd_section_already_linked_table_lookup (const char *);
+extern void bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *, asection *);
+extern void bfd_section_already_linked_table_traverse
+ (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *);
+
/* Extracted from init.c. */
/* Extracted from libbfd.c. */
bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
@@ -657,6 +696,27 @@ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
unsigned int bfd_log2 (bfd_vma x);
/* Extracted from bfdio.c. */
+struct bfd_iovec
+{
+ /* To avoid problems with macros, a "b" rather than "f"
+ prefix is prepended to each method name. */
+ /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
+ bytes starting at PTR. Return the number of bytes actually
+ transfered (a read past end-of-file returns less than NBYTES),
+ or -1 (setting <<bfd_error>>) if an error occurs. */
+ file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
+ file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
+ file_ptr nbytes);
+ /* Return the current IOSTREAM file offset, or -1 (setting <<bfd_error>>
+ if an error occurs. */
+ file_ptr (*btell) (struct bfd *abfd);
+ /* For the following, on successful completion a value of 0 is returned.
+ Otherwise, a value of -1 is returned (and <<bfd_error>> is set). */
+ int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
+ int (*bclose) (struct bfd *abfd);
+ int (*bflush) (struct bfd *abfd);
+ int (*bstat) (struct bfd *abfd, struct stat *sb);
+};
/* Extracted from bfdwin.c. */
struct _bfd_window_internal {
struct _bfd_window_internal *next;
@@ -670,9 +730,9 @@ struct _bfd_window_internal {
extern bfd *bfd_last_cache;
#define bfd_cache_lookup(x) \
- ((x)==bfd_last_cache? \
- (FILE*) (bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
+ ((x) == bfd_last_cache ? \
+ (FILE *) (bfd_last_cache->iostream): \
+ bfd_cache_lookup_worker (x))
bfd_boolean bfd_cache_init (bfd *abfd);
bfd_boolean bfd_cache_close (bfd *abfd);
@@ -699,6 +759,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16_PCREL",
"BFD_RELOC_12_PCREL",
"BFD_RELOC_8_PCREL",
+ "BFD_RELOC_32_SECREL",
"BFD_RELOC_32_GOT_PCREL",
"BFD_RELOC_16_GOT_PCREL",
"BFD_RELOC_8_GOT_PCREL",
@@ -836,8 +897,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_HI16",
"BFD_RELOC_HI16_S",
"BFD_RELOC_LO16",
- "BFD_RELOC_PCREL_HI16_S",
- "BFD_RELOC_PCREL_LO16",
"BFD_RELOC_MIPS_LITERAL",
"BFD_RELOC_MIPS_GOT16",
"BFD_RELOC_MIPS_CALL16",
@@ -1075,8 +1134,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_RELATIVE",
"BFD_RELOC_ARM_GOTOFF",
"BFD_RELOC_ARM_GOTPC",
+ "BFD_RELOC_ARM_TARGET1",
+ "BFD_RELOC_ARM_ROSEGREL32",
+ "BFD_RELOC_ARM_SBREL32",
"BFD_RELOC_SH_PCDISP8BY2",
"BFD_RELOC_SH_PCDISP12BY2",
+ "BFD_RELOC_SH_IMM3",
+ "BFD_RELOC_SH_IMM3U",
+ "BFD_RELOC_SH_DISP12",
+ "BFD_RELOC_SH_DISP12BY2",
+ "BFD_RELOC_SH_DISP12BY4",
+ "BFD_RELOC_SH_DISP12BY8",
+ "BFD_RELOC_SH_DISP20",
+ "BFD_RELOC_SH_DISP20BY8",
"BFD_RELOC_SH_IMM4",
"BFD_RELOC_SH_IMM4BY2",
"BFD_RELOC_SH_IMM4BY4",
@@ -1195,6 +1265,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_JMP_SLOT",
"BFD_RELOC_M32R_RELATIVE",
"BFD_RELOC_M32R_GOTOFF",
+ "BFD_RELOC_M32R_GOTOFF_HI_ULO",
+ "BFD_RELOC_M32R_GOTOFF_HI_SLO",
+ "BFD_RELOC_M32R_GOTOFF_LO",
"BFD_RELOC_M32R_GOTPC24",
"BFD_RELOC_M32R_GOT16_HI_ULO",
"BFD_RELOC_M32R_GOT16_HI_SLO",
@@ -1477,6 +1550,26 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16C_IMM24_C",
"BFD_RELOC_16C_IMM32",
"BFD_RELOC_16C_IMM32_C",
+ "BFD_RELOC_CRX_REL4",
+ "BFD_RELOC_CRX_REL8",
+ "BFD_RELOC_CRX_REL8_CMP",
+ "BFD_RELOC_CRX_REL16",
+ "BFD_RELOC_CRX_REL24",
+ "BFD_RELOC_CRX_REL32",
+ "BFD_RELOC_CRX_REGREL12",
+ "BFD_RELOC_CRX_REGREL22",
+ "BFD_RELOC_CRX_REGREL28",
+ "BFD_RELOC_CRX_REGREL32",
+ "BFD_RELOC_CRX_ABS16",
+ "BFD_RELOC_CRX_ABS32",
+ "BFD_RELOC_CRX_NUM8",
+ "BFD_RELOC_CRX_NUM16",
+ "BFD_RELOC_CRX_NUM32",
+ "BFD_RELOC_CRX_IMM16",
+ "BFD_RELOC_CRX_IMM32",
+ "BFD_RELOC_CRX_SWITCH8",
+ "BFD_RELOC_CRX_SWITCH16",
+ "BFD_RELOC_CRX_SWITCH32",
"BFD_RELOC_CRIS_BDISP8",
"BFD_RELOC_CRIS_UNSIGNED_5",
"BFD_RELOC_CRIS_SIGNED_6",
@@ -1544,6 +1637,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MSP430_16",
"BFD_RELOC_MSP430_16_PCREL_BYTE",
"BFD_RELOC_MSP430_16_BYTE",
+ "BFD_RELOC_MSP430_2X_PCREL",
+ "BFD_RELOC_MSP430_RL_PCREL",
"BFD_RELOC_IQ2000_OFFSET_16",
"BFD_RELOC_IQ2000_OFFSET_21",
"BFD_RELOC_IQ2000_UHI16",
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index 6b5947c4914..f3a03591066 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -194,6 +194,8 @@ struct coff_section_tdata
bfd_vma offset;
unsigned int i;
const char *function;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
+ struct coff_comdat_info *comdat;
int line_base;
/* A pointer used for .stab linking optimizations. */
PTR stab_info;
@@ -276,7 +278,7 @@ struct coff_link_hash_table
{
struct bfd_link_hash_table root;
/* A pointer to information used to link stabs in sections. */
- PTR stab_info;
+ struct stab_info stab_info;
};
/* Look up an entry in a COFF linker hash table. */
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 57711328352..efb7b1f8565 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -198,6 +198,8 @@ struct coff_section_tdata
bfd_vma offset;
unsigned int i;
const char *function;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
+ struct coff_comdat_info *comdat;
int line_base;
/* A pointer used for .stab linking optimizations. */
PTR stab_info;
@@ -280,7 +282,7 @@ struct coff_link_hash_table
{
struct bfd_link_hash_table root;
/* A pointer to information used to link stabs in sections. */
- PTR stab_info;
+ struct stab_info stab_info;
};
/* Look up an entry in a COFF linker hash table. */
diff --git a/bfd/libecoff.h b/bfd/libecoff.h
index 161f06c727c..b809f3a0661 100644
--- a/bfd/libecoff.h
+++ b/bfd/libecoff.h
@@ -1,5 +1,5 @@
/* BFD ECOFF object file private structure.
- Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -176,41 +176,13 @@ typedef struct ecoff_symbol_struct
#define ecoff_get_sym_index(symbol) ((symbol)->udata.i)
#define ecoff_set_sym_index(symbol, idx) ((symbol)->udata.i = (idx))
-/* When generating MIPS embedded PIC code, the linker relaxes the code
- to turn PC relative branches into longer code sequences when the PC
- relative branch is out of range. This involves reading the relocs
- in bfd_relax_section as well as in bfd_final_link, and requires the
- code to keep track of which relocs have been expanded. A pointer
- to this structure is put in the used_by_bfd pointer of a section to
- keep track of this information. The user_by_bfd pointer will be
- NULL if the information was not needed. */
+/* A pointer to this structure is put in the used_by_bfd pointer of
+ a section to keep track of any per-section data.
+ The user_by_bfd pointer will be NULL if the information was not
+ needed. */
struct ecoff_section_tdata
{
- /* The unswapped relocs for this section. These are stored in
- memory so the input file does not have to be read twice. */
- PTR external_relocs;
-
- /* The contents of the section. These bytes may or may not be saved
- in memory, but if it is this is a pointer to them. */
- bfd_byte *contents;
-
- /* Offset adjustments for PC relative branches. A number other than
- 1 is an addend for a PC relative branch, or a switch table entry
- which is the difference of two .text locations; this addend
- arises because the branch or difference crosses one or more
- branches which were expanded into a larger code sequence. A 1
- means that this branch was itself expanded into a larger code
- sequence. 1 is not a possible offset, since all offsets must be
- multiples of the instruction size, which is 4; also, the only
- relocs with non-zero offsets will be PC relative branches or
- switch table entries within the same object file. If this field
- is NULL, no branches were expanded and no offsets are required.
- Otherwise there are as many entries as there are relocs in the
- section, and the entry for any reloc that is not PC relative is
- zero. */
- long *offsets;
-
/* When producing an executable (i.e., final, non-relocatable link)
on the Alpha, we may need to use multiple global pointer values
to span the entire .lita section. In essence, we allow each
@@ -277,6 +249,9 @@ extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data
#define _bfd_ecoff_bfd_copy_private_symbol_data \
_bfd_generic_bfd_copy_private_symbol_data
+#define _bfd_ecoff_bfd_copy_private_header_data \
+ _bfd_generic_bfd_copy_private_header_data
+
#define _bfd_ecoff_bfd_print_private_bfd_data \
_bfd_generic_bfd_print_private_bfd_data
diff --git a/bfd/linker.c b/bfd/linker.c
index 58befc3632e..aac7da90763 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1828,8 +1828,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
&& inh->u.i.link == h)
{
(*_bfd_error_handler)
- (_("%s: indirect symbol `%s' to `%s' is a loop"),
- bfd_archive_filename (abfd), name, string);
+ (_("%B: indirect symbol `%s' to `%s' is a loop"),
+ abfd, name, string);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
@@ -2684,7 +2684,7 @@ default_indirect_link_order (bfd *output_bfd,
BFD_ASSERT (input_section->output_section == output_section);
BFD_ASSERT (input_section->output_offset == link_order->offset);
- BFD_ASSERT (input_section->_cooked_size == link_order->size);
+ BFD_ASSERT (input_section->size == link_order->size);
if (info->relocatable
&& input_section->reloc_count > 0
@@ -2756,7 +2756,9 @@ default_indirect_link_order (bfd *output_bfd,
}
/* Get and relocate the section contents. */
- sec_size = bfd_section_size (input_bfd, input_section);
+ sec_size = (input_section->rawsize > input_section->size
+ ? input_section->rawsize
+ : input_section->size);
contents = bfd_malloc (sec_size);
if (contents == NULL && sec_size != 0)
goto error_return;
@@ -2825,3 +2827,203 @@ _bfd_generic_link_split_section (bfd *abfd ATTRIBUTE_UNUSED,
{
return FALSE;
}
+
+/*
+FUNCTION
+ bfd_section_already_linked
+
+SYNOPSIS
+ void bfd_section_already_linked (bfd *abfd, asection *sec);
+
+DESCRIPTION
+ Check if @var{sec} has been already linked during a reloceatable
+ or final link.
+
+.#define bfd_section_already_linked(abfd, sec) \
+. BFD_SEND (abfd, _section_already_linked, (abfd, sec))
+.
+
+*/
+
+/* Sections marked with the SEC_LINK_ONCE flag should only be linked
+ once into the output. This routine checks each section, and
+ arrange to discard it if a section of the same name has already
+ been linked. This code assumes that all relevant sections have the
+ SEC_LINK_ONCE flag set; that is, it does not depend solely upon the
+ section name. bfd_section_already_linked is called via
+ bfd_map_over_sections. */
+
+/* The hash table. */
+
+static struct bfd_hash_table _bfd_section_already_linked_table;
+
+/* Support routines for the hash table used by section_already_linked,
+ initialize the table, traverse, lookup, fill in an entry and remove
+ the table. */
+
+void
+bfd_section_already_linked_table_traverse
+ (bfd_boolean (*func) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *info)
+{
+ bfd_hash_traverse (&_bfd_section_already_linked_table,
+ (bfd_boolean (*) (struct bfd_hash_entry *,
+ void *)) func,
+ info);
+}
+
+struct bfd_section_already_linked_hash_entry *
+bfd_section_already_linked_table_lookup (const char *name)
+{
+ return ((struct bfd_section_already_linked_hash_entry *)
+ bfd_hash_lookup (&_bfd_section_already_linked_table, name,
+ TRUE, FALSE));
+}
+
+void
+bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *already_linked_list,
+ asection *sec)
+{
+ struct bfd_section_already_linked *l;
+
+ /* Allocate the memory from the same obstack as the hash table is
+ kept in. */
+ l = bfd_hash_allocate (&_bfd_section_already_linked_table, sizeof *l);
+ l->sec = sec;
+ l->next = already_linked_list->entry;
+ already_linked_list->entry = l;
+}
+
+static struct bfd_hash_entry *
+already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED,
+ struct bfd_hash_table *table,
+ const char *string ATTRIBUTE_UNUSED)
+{
+ struct bfd_section_already_linked_hash_entry *ret =
+ bfd_hash_allocate (table, sizeof *ret);
+
+ ret->entry = NULL;
+
+ return &ret->root;
+}
+
+bfd_boolean
+bfd_section_already_linked_table_init (void)
+{
+ return bfd_hash_table_init_n (&_bfd_section_already_linked_table,
+ already_linked_newfunc, 42);
+}
+
+void
+bfd_section_already_linked_table_free (void)
+{
+ bfd_hash_table_free (&_bfd_section_already_linked_table);
+}
+
+/* This is used on non-ELF inputs. */
+
+void
+_bfd_generic_section_already_linked (bfd *abfd, asection *sec)
+{
+ flagword flags;
+ const char *name;
+ struct bfd_section_already_linked *l;
+ struct bfd_section_already_linked_hash_entry *already_linked_list;
+
+ flags = sec->flags;
+ if ((flags & SEC_LINK_ONCE) == 0)
+ return;
+
+ /* FIXME: When doing a relocatable link, we may have trouble
+ copying relocations in other sections that refer to local symbols
+ in the section being discarded. Those relocations will have to
+ be converted somehow; as of this writing I'm not sure that any of
+ the backends handle that correctly.
+
+ It is tempting to instead not discard link once sections when
+ doing a relocatable link (technically, they should be discarded
+ whenever we are building constructors). However, that fails,
+ because the linker winds up combining all the link once sections
+ into a single large link once section, which defeats the purpose
+ of having link once sections in the first place. */
+
+ name = bfd_get_section_name (abfd, sec);
+
+ already_linked_list = bfd_section_already_linked_table_lookup (name);
+
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
+ {
+ bfd_boolean skip = FALSE;
+ struct coff_comdat_info *s_comdat
+ = bfd_coff_get_comdat_section (abfd, sec);
+ struct coff_comdat_info *l_comdat
+ = bfd_coff_get_comdat_section (l->sec->owner, l->sec);
+
+ /* We may have 3 different sections on the list: group section,
+ comdat section and linkonce section. SEC may be a linkonce or
+ comdat section. We always ignore group section. For non-COFF
+ inputs, we also ignore comdat section.
+
+ FIXME: Is that safe to match a linkonce section with a comdat
+ section for COFF inputs? */
+ if ((l->sec->flags & SEC_GROUP) != 0)
+ skip = TRUE;
+ else if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ {
+ if (s_comdat != NULL
+ && l_comdat != NULL
+ && strcmp (s_comdat->name, l_comdat->name) != 0)
+ skip = TRUE;
+ }
+ else if (l_comdat != NULL)
+ skip = TRUE;
+
+ if (!skip)
+ {
+ /* The section has already been linked. See if we should
+ issue a warning. */
+ switch (flags & SEC_LINK_DUPLICATES)
+ {
+ default:
+ abort ();
+
+ case SEC_LINK_DUPLICATES_DISCARD:
+ break;
+
+ case SEC_LINK_DUPLICATES_ONE_ONLY:
+ (*_bfd_error_handler)
+ (_("%B: warning: ignoring duplicate section `%A'\n"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
+ /* FIXME: We should really dig out the contents of both
+ sections and memcmp them. The COFF/PE spec says that
+ the Microsoft linker does not implement this
+ correctly, so I'm not going to bother doing it
+ either. */
+ /* Fall through. */
+ case SEC_LINK_DUPLICATES_SAME_SIZE:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: warning: duplicate section `%A' has different size\n"),
+ abfd, sec);
+ break;
+ }
+
+ /* Set the output_section field so that lang_add_section
+ does not create a lang_input_section structure for this
+ section. Since there might be a symbol in the section
+ being discarded, we must retain a pointer to the section
+ which we are really going to use. */
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = l->sec;
+
+ return;
+ }
+ }
+
+ /* This is the first section with this name. Record it. */
+ bfd_section_already_linked_table_insert (already_linked_list, sec);
+}
diff --git a/bfd/lynx-core.c b/bfd/lynx-core.c
index 08bf2331c53..8eadd2e9ff4 100644
--- a/bfd/lynx-core.c
+++ b/bfd/lynx-core.c
@@ -1,5 +1,6 @@
/* BFD back end for Lynx core files
- Copyright 1993, 1994, 1995, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 2001, 2002, 2004
+ Free Software Foundation, Inc.
Written by Stu Grossman of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -53,11 +54,11 @@ struct lynx_core_struct
/* Handle Lynx core dump file. */
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -75,7 +76,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 2;
diff --git a/bfd/m68klinux.c b/bfd/m68klinux.c
index 996e5161424..d238e267098 100644
--- a/bfd/m68klinux.c
+++ b/bfd/m68klinux.c
@@ -1,6 +1,6 @@
/* BFD back-end for linux flavored m68k a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -320,7 +320,7 @@ linux_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
- s->_raw_size = 0;
+ s->size = 0;
s->contents = 0;
return TRUE;
@@ -598,9 +598,9 @@ bfd_m68klinux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = linux_hash_table (info)->fixup_count + 1;
- s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = linux_hash_table (info)->fixup_count + 1;
+ s->size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
@@ -766,7 +766,7 @@ linux_finish_dynamic_link (output_bfd, info)
SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
diff --git a/gdb/config/i386/nm-interix.h b/bfd/m88kopenbsd.c
index b8b003a58d7..459d3b2dd73 100644
--- a/gdb/config/i386/nm-interix.h
+++ b/bfd/m88kopenbsd.c
@@ -1,7 +1,7 @@
-/* Native-dependent definitions for Intel 386 running Interix, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
+/* BFD back-end for OpenBSD/m88k a.out binaries.
+ Copyright 2004 Free Software Foundation, Inc.
-This file is part of GDB.
+This file is part of BFD, the Binary File Descriptor library.
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
@@ -17,19 +17,17 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef NM_INTERIX_H
-#define NM_INTERIX_H
+#define TARGET_IS_BIG_ENDIAN_P
-/* Be shared lib aware. */
-#include "solib.h"
+#define TARGET_PAGE_SIZE 4096
-/* submodes of USE_PROC_FS. */
-#define UNIXWARE
+#define DEFAULT_ARCH bfd_arch_m88k
+#define DEFAULT_MID M_88K_OPENBSD
-/* It's ALMOST coff; bfd does the same thing. Mostly used in coffread.c. */
-#define COFF_IMAGE_WITH_PE
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (m88kopenbsd_,OP)
+#define TARGETNAME "a.out-m88k-openbsd"
-/* Turn on our own child_pid_to_exec_file. */
-#define CHILD_PID_TO_EXEC_FILE
-
-#endif /* NM_INTERIX_H */
+#include "netbsd.h"
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index b5d6a728d08..c4c05ab84d8 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -1,5 +1,5 @@
/* Mach-O support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -68,7 +68,11 @@
#define bfd_mach_o_set_section_contents _bfd_generic_set_section_contents
#define bfd_mach_o_bfd_gc_sections bfd_generic_gc_sections
#define bfd_mach_o_bfd_merge_sections bfd_generic_merge_sections
+#define bfd_mach_o_bfd_is_group_section bfd_generic_is_group_section
#define bfd_mach_o_bfd_discard_group bfd_generic_discard_group
+#define bfd_mach_o_section_already_linked \
+ _bfd_generic_section_already_linked
+#define bfd_mach_o_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
static bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data
PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
@@ -582,7 +586,7 @@ bfd_mach_o_make_bfd_section (abfd, section)
bfdsec->vma = section->addr;
bfdsec->lma = section->addr;
- bfdsec->_raw_size = section->size;
+ bfdsec->size = section->size;
bfdsec->filepos = section->offset;
bfdsec->alignment_power = section->align;
@@ -1030,7 +1034,7 @@ bfd_mach_o_scan_read_dylinker (abfd, command)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = command->len - 8;
+ bfdsec->size = command->len - 8;
bfdsec->filepos = command->offset + 8;
bfdsec->alignment_power = 0;
bfdsec->flags = SEC_HAS_CONTENTS;
@@ -1088,7 +1092,7 @@ bfd_mach_o_scan_read_dylib (abfd, command)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = command->len - 8;
+ bfdsec->size = command->len - 8;
bfdsec->filepos = command->offset + 8;
bfdsec->alignment_power = 0;
bfdsec->flags = SEC_HAS_CONTENTS;
@@ -1211,7 +1215,7 @@ bfd_mach_o_scan_read_thread (abfd, command)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = cmd->flavours[i].size;
+ bfdsec->size = cmd->flavours[i].size;
bfdsec->filepos = cmd->flavours[i].offset;
bfdsec->alignment_power = 0x0;
bfdsec->flags = SEC_HAS_CONTENTS;
@@ -1318,7 +1322,7 @@ bfd_mach_o_scan_read_symtab (abfd, command)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = seg->nsyms * 12;
+ bfdsec->size = seg->nsyms * 12;
bfdsec->filepos = seg->symoff;
bfdsec->alignment_power = 0;
bfdsec->flags = SEC_HAS_CONTENTS;
@@ -1337,7 +1341,7 @@ bfd_mach_o_scan_read_symtab (abfd, command)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = seg->strsize;
+ bfdsec->size = seg->strsize;
bfdsec->filepos = seg->stroff;
bfdsec->alignment_power = 0;
bfdsec->flags = SEC_HAS_CONTENTS;
@@ -1388,7 +1392,7 @@ bfd_mach_o_scan_read_segment (abfd, command)
bfdsec->vma = seg->vmaddr;
bfdsec->lma = seg->vmaddr;
- bfdsec->_raw_size = seg->filesize;
+ bfdsec->size = seg->filesize;
bfdsec->filepos = seg->fileoff;
bfdsec->alignment_power = 0x0;
bfdsec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_CODE;
diff --git a/bfd/merge.c b/bfd/merge.c
index 89f45cd521a..eb8ec667ead 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -1,5 +1,5 @@
/* SEC_MERGE support.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -90,7 +90,7 @@ struct sec_merge_sec_info
/* A hash table used to hold section content. */
struct sec_merge_hash *htab;
/* First string in this section. */
- struct sec_merge_hash_entry *first;
+ struct sec_merge_hash_entry *first_str;
/* Original section content. */
unsigned char contents[1];
};
@@ -102,30 +102,28 @@ static struct bfd_hash_entry *
sec_merge_hash_newfunc (struct bfd_hash_entry *entry,
struct bfd_hash_table *table, const char *string)
{
- struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
-
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct sec_merge_hash_entry *) NULL)
- ret = ((struct sec_merge_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry)));
- if (ret == (struct sec_merge_hash_entry *) NULL)
+ if (entry == NULL)
+ entry = bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry));
+ if (entry == NULL)
return NULL;
/* Call the allocation method of the superclass. */
- ret = ((struct sec_merge_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+ entry = bfd_hash_newfunc (entry, table, string);
- if (ret)
+ if (entry != NULL)
{
/* Initialize the local fields. */
+ struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
+
ret->u.suffix = NULL;
ret->alignment = 0;
ret->secinfo = NULL;
ret->next = NULL;
}
- return (struct bfd_hash_entry *) ret;
+ return entry;
}
/* Look up an entry in a section merge hash table. */
@@ -192,7 +190,7 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
index = hash % table->table.size;
for (hashp = (struct sec_merge_hash_entry *) table->table.table[index];
- hashp != (struct sec_merge_hash_entry *) NULL;
+ hashp != NULL;
hashp = (struct sec_merge_hash_entry *) hashp->root.next)
{
if (hashp->root.hash == hash
@@ -216,13 +214,12 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
}
if (! create)
- return (struct sec_merge_hash_entry *) NULL;
+ return NULL;
- hashp = (struct sec_merge_hash_entry *)
- sec_merge_hash_newfunc ((struct bfd_hash_entry *) NULL,
- (struct bfd_hash_table *) table, string);
- if (hashp == (struct sec_merge_hash_entry *) NULL)
- return (struct sec_merge_hash_entry *) NULL;
+ hashp = ((struct sec_merge_hash_entry *)
+ sec_merge_hash_newfunc (NULL, &table->table, string));
+ if (hashp == NULL)
+ return NULL;
hashp->root.string = string;
hashp->root.hash = hash;
hashp->len = len;
@@ -239,9 +236,8 @@ static struct sec_merge_hash *
sec_merge_init (unsigned int entsize, bfd_boolean strings)
{
struct sec_merge_hash *table;
- bfd_size_type amt = sizeof (struct sec_merge_hash);
- table = (struct sec_merge_hash *) bfd_malloc (amt);
+ table = bfd_malloc (sizeof (struct sec_merge_hash));
if (table == NULL)
return NULL;
@@ -294,7 +290,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
asection *sec = secinfo->sec;
char *pad = "";
bfd_size_type off = 0;
- int alignment_power = bfd_get_section_alignment (abfd, sec->output_section);
+ int alignment_power = sec->output_section->alignment_power;
if (alignment_power)
pad = bfd_zmalloc ((bfd_size_type) 1 << alignment_power);
@@ -308,7 +304,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
if (len)
{
len = entry->alignment - len;
- if (bfd_bwrite (pad, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite (pad, len, abfd) != len)
break;
off += len;
}
@@ -316,7 +312,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
str = entry->root.string;
len = entry->len;
- if (bfd_bwrite (str, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite (str, len, abfd) != len)
break;
off += len;
@@ -328,20 +324,24 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
return entry == NULL || entry->secinfo != secinfo;
}
-/* This function is called for each input file from the add_symbols
- pass of the linker. */
+/* Register a SEC_MERGE section as a candidate for merging.
+ This function is called for all non-dynamic SEC_MERGE input sections. */
bfd_boolean
-_bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
+_bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec,
+ void **psecinfo)
{
struct sec_merge_info *sinfo;
struct sec_merge_sec_info *secinfo;
unsigned int align;
bfd_size_type amt;
- if (sec->_raw_size == 0
- || (sec->flags & SEC_EXCLUDE)
- || (sec->flags & SEC_MERGE) == 0
+ if ((abfd->flags & DYNAMIC) != 0
+ || (sec->flags & SEC_MERGE) == 0)
+ abort ();
+
+ if (sec->size == 0
+ || (sec->flags & SEC_EXCLUDE) != 0
|| sec->entsize == 0)
return TRUE;
@@ -351,12 +351,12 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
return TRUE;
}
- align = bfd_get_section_alignment (sec->owner, sec);
- if ((sec->entsize < (unsigned int)(1 << align)
+ align = sec->alignment_power;
+ if ((sec->entsize < (unsigned) 1 << align
&& ((sec->entsize & (sec->entsize - 1))
|| !(sec->flags & SEC_STRINGS)))
- || (sec->entsize > (unsigned int)(1 << align)
- && (sec->entsize & ((1 << align) - 1))))
+ || (sec->entsize > (unsigned) 1 << align
+ && (sec->entsize & (((unsigned) 1 << align) - 1))))
{
/* Sanity check. If string character size is smaller than
alignment, then we require character size to be a power
@@ -371,14 +371,14 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
if ((secinfo = sinfo->chain)
&& ! ((secinfo->sec->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS))
&& secinfo->sec->entsize == sec->entsize
- && ! strcmp (secinfo->sec->name, sec->name))
+ && secinfo->sec->alignment_power == sec->alignment_power
+ && secinfo->sec->output_section == sec->output_section)
break;
if (sinfo == NULL)
{
/* Initialize the information we need to keep track of. */
- amt = sizeof (struct sec_merge_info);
- sinfo = (struct sec_merge_info *) bfd_alloc (abfd, amt);
+ sinfo = bfd_alloc (abfd, sizeof (struct sec_merge_info));
if (sinfo == NULL)
goto error_return;
sinfo->next = (struct sec_merge_info *) *psinfo;
@@ -391,12 +391,12 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
/* Read the section from abfd. */
- amt = sizeof (struct sec_merge_sec_info) + sec->_raw_size - 1;
+ amt = sizeof (struct sec_merge_sec_info) + sec->size - 1;
*psecinfo = bfd_alloc (abfd, amt);
if (*psecinfo == NULL)
goto error_return;
- secinfo = (struct sec_merge_sec_info *)*psecinfo;
+ secinfo = (struct sec_merge_sec_info *) *psecinfo;
if (sinfo->chain)
{
secinfo->next = sinfo->chain->next;
@@ -408,10 +408,11 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
secinfo->sec = sec;
secinfo->psecinfo = psecinfo;
secinfo->htab = sinfo->htab;
- secinfo->first = NULL;
+ secinfo->first_str = NULL;
+ sec->rawsize = sec->size;
if (! bfd_get_section_contents (sec->owner, sec, secinfo->contents,
- (bfd_vma) 0, sec->_raw_size))
+ 0, sec->size))
goto error_return;
return TRUE;
@@ -433,8 +434,8 @@ record_section (struct sec_merge_info *sinfo,
bfd_vma mask, eltalign;
unsigned int align, i;
- align = bfd_get_section_alignment (sec->owner, sec);
- end = secinfo->contents + sec->_raw_size;
+ align = sec->alignment_power;
+ end = secinfo->contents + sec->size;
nul = FALSE;
mask = ((bfd_vma) 1 << align) - 1;
if (sec->flags & SEC_STRINGS)
@@ -580,7 +581,7 @@ merge_strings (struct sec_merge_info *sinfo)
/* Now sort the strings */
amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
- array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
+ array = bfd_malloc (amt);
if (array == NULL)
goto alloc_failure;
@@ -638,14 +639,14 @@ alloc_failure:
{
if (e->secinfo != secinfo)
{
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
secinfo = e->secinfo;
}
if (e->alignment)
{
- if (e->secinfo->first == NULL)
+ if (e->secinfo->first_str == NULL)
{
- e->secinfo->first = e;
+ e->secinfo->first_str = e;
size = 0;
}
size = (size + e->alignment - 1) & ~((bfd_vma) e->alignment - 1);
@@ -653,7 +654,7 @@ alloc_failure:
size += e->len;
}
}
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
/* And now adjust the rest, removing them from the chain (but not hashtable)
at the same time. */
@@ -676,8 +677,8 @@ alloc_failure:
with _bfd_merge_section. */
bfd_boolean
-_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
- void (*remove_hook) (bfd *, asection *))
+_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info,
+ void *xsinfo, void (*remove_hook) (bfd *, asection *))
{
struct sec_merge_info *sinfo;
@@ -722,11 +723,11 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
secinfo = NULL;
for (e = sinfo->htab->first; e; e = e->next)
{
- if (e->secinfo->first == NULL)
+ if (e->secinfo->first_str == NULL)
{
if (secinfo)
- secinfo->sec->_cooked_size = size;
- e->secinfo->first = e;
+ secinfo->sec->size = size;
+ e->secinfo->first_str = e;
size = 0;
}
size = (size + e->alignment - 1)
@@ -735,17 +736,14 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
size += e->len;
secinfo = e->secinfo;
}
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
}
/* Finally remove all input sections which have not made it into
the hash table at all. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
- if (secinfo->first == NULL)
- {
- secinfo->sec->_cooked_size = 0;
- secinfo->sec->flags |= SEC_EXCLUDE;
- }
+ if (secinfo->first_str == NULL)
+ _bfd_strip_section_from_output (info, secinfo->sec);
}
return TRUE;
@@ -761,14 +759,14 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo)
secinfo = (struct sec_merge_sec_info *) psecinfo;
- if (!secinfo->first)
+ if (secinfo->first_str == NULL)
return TRUE;
pos = sec->output_section->filepos + sec->output_offset;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0)
return FALSE;
- if (! sec_merge_emit (output_bfd, secinfo->first))
+ if (! sec_merge_emit (output_bfd, secinfo->first_str))
return FALSE;
return TRUE;
@@ -780,7 +778,7 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo)
bfd_vma
_bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
- void *psecinfo, bfd_vma offset, bfd_vma addend)
+ void *psecinfo, bfd_vma offset)
{
struct sec_merge_sec_info *secinfo;
struct sec_merge_hash_entry *entry;
@@ -789,30 +787,29 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
secinfo = (struct sec_merge_sec_info *) psecinfo;
- if (offset + addend >= sec->_raw_size)
+ if (offset >= sec->rawsize)
{
- if (offset + addend > sec->_raw_size)
+ if (offset > sec->rawsize)
{
(*_bfd_error_handler)
- (_("%s: access beyond end of merged section (%ld + %ld)"),
- bfd_get_filename (sec->owner), (long) offset, (long) addend);
+ (_("%s: access beyond end of merged section (%ld)"),
+ bfd_get_filename (sec->owner), (long) offset);
}
- return (secinfo->first ? sec->_cooked_size : 0);
+ return secinfo->first_str ? sec->size : 0;
}
if (secinfo->htab->strings)
{
if (sec->entsize == 1)
{
- p = secinfo->contents + offset + addend - 1;
+ p = secinfo->contents + offset - 1;
while (p >= secinfo->contents && *p)
--p;
++p;
}
else
{
- p = secinfo->contents
- + ((offset + addend) / sec->entsize) * sec->entsize;
+ p = secinfo->contents + (offset / sec->entsize) * sec->entsize;
p -= sec->entsize;
while (p >= secinfo->contents)
{
@@ -830,8 +827,7 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
}
else
{
- p = secinfo->contents
- + ((offset + addend) / sec->entsize) * sec->entsize;
+ p = secinfo->contents + (offset / sec->entsize) * sec->entsize;
}
entry = sec_merge_hash_lookup (secinfo->htab, p, 0, FALSE);
if (!entry)
@@ -845,9 +841,8 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
if (! secinfo->htab->first)
abort ();
entry = secinfo->htab->first;
- p = secinfo->contents
- + ((offset + addend) / sec->entsize + 1) * sec->entsize
- - entry->len;
+ p = (secinfo->contents + (offset / sec->entsize + 1) * sec->entsize
+ - entry->len);
}
*psec = entry->secinfo->sec;
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 74b4c9dd1d0..1b7eb86a4ee 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -1,5 +1,5 @@
/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001, 2002, 2003
+ Copyright 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
@@ -665,7 +665,7 @@ mmo_find_sec_w_addr (abfd, sec, p)
!= (SEC_LOAD | SEC_ALLOC))
return;
- if (infop->addr >= vma && infop->addr < vma + sec->_raw_size)
+ if (infop->addr >= vma && infop->addr < vma + sec->size)
infop->sec = sec;
}
@@ -1168,8 +1168,7 @@ mmo_get_spec_section (abfd, spec_data_number)
bfd_sec_flags_from_mmo_flags (flags)
| bfd_get_section_flags (abfd, sec)
| (section_length != 0 ? SEC_HAS_CONTENTS : 0))
- || ! bfd_set_section_size (abfd, sec,
- sec->_cooked_size + section_length)
+ || ! bfd_set_section_size (abfd, sec, sec->size + section_length)
/* Set VMA only for the first occurrence. */
|| (! sec->user_set_vma
&& ! bfd_set_section_vma (abfd, sec, section_vma)))
@@ -1545,8 +1544,8 @@ mmo_get_loc (sec, vma, size)
non-32-bit-aligned sections should do all allocation and
size-setting by themselves or at least set the section size
after the last allocating call to this function. */
- if (vma + size > sec->vma + sec->_raw_size)
- sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size);
+ if (vma + size > sec->vma + sec->size)
+ sec->size += (vma + size) - (sec->vma + sec->size);
return datap->data + vma - datap->where;
}
@@ -1608,8 +1607,8 @@ mmo_get_loc (sec, vma, size)
/* Update the section size. This happens only when we add contents and
re-size as we go. The section size will then be aligned to 32 bits. */
- if (vma + size > sec->vma + sec->_raw_size)
- sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size);
+ if (vma + size > sec->vma + sec->size)
+ sec->size += (vma + size) - (sec->vma + sec->size);
return entry->data;
}
@@ -1621,7 +1620,6 @@ mmo_map_set_sizes (abfd, sec, ignored)
asection *sec;
PTR ignored ATTRIBUTE_UNUSED;
{
- sec->_cooked_size = sec->_raw_size;
sec->lma = sec->vma;
}
@@ -2269,7 +2267,7 @@ mmo_canonicalize_symtab (abfd, alocation)
if (textsec != NULL
&& c->value >= textsec->vma
- && c->value <= textsec->vma + textsec->_cooked_size)
+ && c->value <= textsec->vma + textsec->size)
{
c->section = textsec;
c->value -= c->section->vma;
@@ -2486,7 +2484,7 @@ mmo_internal_write_section (abfd, sec)
/* Ignore sections that are just allocated or empty; we write out
_contents_ here. */
else if ((bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) != 0
- && sec->_raw_size != 0)
+ && sec->size != 0)
{
/* Keep the document-comment formatted the way it is. */
/*
@@ -2592,7 +2590,7 @@ EXAMPLE
mmo_write_tetra (abfd,
mmo_sec_flags_from_bfd_flags
(bfd_get_section_flags (abfd, sec)));
- mmo_write_octa (abfd, sec->_raw_size);
+ mmo_write_octa (abfd, sec->size);
mmo_write_octa (abfd, bfd_get_section_vma (abfd, sec));
/* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually
@@ -3181,11 +3179,11 @@ mmo_write_object_contents (abfd)
of the register contents section and check that it corresponds to
the length of the section. */
if (z < 32 || z >= 255 || (sec->vma & 7) != 0
- || sec->vma != 256 * 8 - sec->_raw_size - 8)
+ || sec->vma != 256 * 8 - sec->size - 8)
{
bfd_set_error (bfd_error_bad_value);
- if (sec->_raw_size == 0)
+ if (sec->size == 0)
/* There must always be at least one such register. */
(*_bfd_error_handler)
(_("%s: no initialized registers; section length 0\n"),
@@ -3196,13 +3194,13 @@ mmo_write_object_contents (abfd)
(*_bfd_error_handler)
(_("%s: too many initialized registers; section length %ld\n"),
bfd_get_filename (abfd),
- (long) sec->_raw_size);
+ (long) sec->size);
else
(*_bfd_error_handler)
(_("%s: invalid start address for initialized registers of\
length %ld: 0x%lx%08lx\n"),
bfd_get_filename (abfd),
- (long) sec->_raw_size,
+ (long) sec->size,
(unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma));
return FALSE;
@@ -3286,7 +3284,10 @@ mmo_canonicalize_reloc (abfd, section, relptr, symbols)
#define mmo_set_arch_mach bfd_default_set_arch_mach
#define mmo_bfd_relax_section bfd_generic_relax_section
#define mmo_bfd_merge_sections bfd_generic_merge_sections
+#define mmo_bfd_is_group_section bfd_generic_is_group_section
#define mmo_bfd_discard_group bfd_generic_discard_group
+#define mmo_section_already_linked \
+ _bfd_generic_section_already_linked
/* objcopy will be upset if we return -1 from bfd_get_reloc_upper_bound by
using BFD_JUMP_TABLE_RELOCS (_bfd_norelocs) rather than 0. FIXME: Most
@@ -3305,6 +3306,7 @@ mmo_canonicalize_reloc (abfd, section, relptr, symbols)
#define mmo_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define mmo_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#define mmo_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#define mmo_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define mmo_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define mmo_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
diff --git a/bfd/netbsd-core.c b/bfd/netbsd-core.c
index 250c6f4f1d5..6c43e9ebe0f 100644
--- a/bfd/netbsd-core.c
+++ b/bfd/netbsd-core.c
@@ -34,6 +34,10 @@
NetBSD/sparc64 overlaps with M_MIPS1. */
#define M_SPARC64_OPENBSD M_MIPS1
+/* Offset of StackGhost cookie within `struct md_coredump' on
+ OpenBSD/sparc. */
+#define CORE_WCOOKIE_OFFSET 344
+
struct netbsd_core_struct
{
struct core core;
@@ -135,35 +139,84 @@ netbsd_core_file_p (abfd)
goto punt;
asect->flags = flags;
- asect->_raw_size = coreseg.c_size;
+ asect->size = coreseg.c_size;
asect->vma = coreseg.c_addr;
asect->filepos = offset;
asect->alignment_power = 2;
+ if (CORE_GETMID (core) == M_SPARC_NETBSD
+ && CORE_GETFLAG (coreseg) == CORE_CPU
+ && coreseg.c_size > CORE_WCOOKIE_OFFSET)
+ {
+ /* Truncate the .reg section. */
+ asect->size = CORE_WCOOKIE_OFFSET;
+
+ /* And create the .wcookie section. */
+ asect = bfd_make_section_anyway (abfd, ".wcookie");
+ if (asect == NULL)
+ goto punt;
+
+ asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
+ asect->size = 4;
+ asect->vma = 0;
+ asect->filepos = offset + CORE_WCOOKIE_OFFSET;
+ asect->alignment_power = 2;
+ }
+
offset += coreseg.c_size;
}
- /* Set architecture from machine ID. */
- switch (CORE_GETMID (core))
- {
- case M_X86_64_NETBSD:
- bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
- break;
-
- case M_386_NETBSD:
- bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386);
- break;
-
- case M_SPARC_NETBSD:
- bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
- break;
-
- case M_SPARC64_NETBSD:
- case M_SPARC64_OPENBSD:
- bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc_v9);
- break;
- }
-
+ /* Set architecture from machine ID. */
+ switch (CORE_GETMID (core))
+ {
+ case M_ALPHA_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_alpha, 0);
+ break;
+
+ case M_ARM6_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_3);
+ break;
+
+ case M_X86_64_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
+ break;
+
+ case M_386_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386);
+ break;
+
+ case M_68K_NETBSD:
+ case M_68K4K_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
+ break;
+
+ case M_88K_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_m88k, 0);
+ break;
+
+ case M_HPPA_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_hppa, bfd_mach_hppa11);
+ break;
+
+ case M_POWERPC_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_powerpc, bfd_mach_ppc);
+ break;
+
+ case M_SPARC_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
+ break;
+
+ case M_SPARC64_NETBSD:
+ case M_SPARC64_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc_v9);
+ break;
+
+ case M_VAX_NETBSD:
+ case M_VAX4K_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_vax, 0);
+ break;
+ }
+
/* OK, we believe you. You're a core file (sure, sure). */
return abfd->xvec;
diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h
index 70ae4f4d6a7..30ae4b101f7 100644
--- a/bfd/nlm-target.h
+++ b/bfd/nlm-target.h
@@ -1,5 +1,5 @@
/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -44,7 +44,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define nlm_bfd_relax_section bfd_generic_relax_section
#define nlm_bfd_gc_sections bfd_generic_gc_sections
#define nlm_bfd_merge_sections bfd_generic_merge_sections
+#define nlm_bfd_is_group_section bfd_generic_is_group_section
#define nlm_bfd_discard_group bfd_generic_discard_group
+#define nlm_section_already_linked \
+ _bfd_generic_section_already_linked
#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/nlm32-alpha.c b/bfd/nlm32-alpha.c
index 990ce8d5a7a..3bf597b1787 100644
--- a/bfd/nlm32-alpha.c
+++ b/bfd/nlm32-alpha.c
@@ -1,5 +1,5 @@
/* Support for 32-bit Alpha NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -490,7 +490,7 @@ nlm_alpha_read_reloc (abfd, sym, secp, rel)
or .data section. R_NW_RELOC relocs don't really have a section,
so we put them in .text. */
if (r_type == ALPHA_R_NW_RELOC
- || r_vaddr < bfd_section_size (abfd, code_sec))
+ || r_vaddr < code_sec->size)
{
*secp = code_sec;
rel->address = r_vaddr;
@@ -498,7 +498,7 @@ nlm_alpha_read_reloc (abfd, sym, secp, rel)
else
{
*secp = data_sec;
- rel->address = r_vaddr - bfd_section_size (abfd, code_sec);
+ rel->address = r_vaddr - code_sec->size;
}
/* We must adjust the addend based on the type. */
@@ -689,9 +689,7 @@ nlm_alpha_write_import (abfd, sec, rel)
{
r_vaddr = bfd_get_section_vma (abfd, sec) + rel->address;
if ((sec->flags & SEC_CODE) == 0)
- r_vaddr += bfd_section_size (abfd,
- bfd_get_section_by_name (abfd,
- NLM_CODE_NAME));
+ r_vaddr += bfd_get_section_by_name (abfd, NLM_CODE_NAME) -> size;
if (bfd_is_und_section (bfd_get_section (sym)))
{
r_extern = 1;
@@ -791,7 +789,7 @@ nlm_alpha_set_public_section (abfd, sym)
code_sec = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
data_sec = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
- if (sym->symbol.value < bfd_section_size (abfd, code_sec))
+ if (sym->symbol.value < code_sec->size)
{
sym->symbol.section = code_sec;
sym->symbol.flags |= BSF_FUNCTION;
@@ -799,9 +797,9 @@ nlm_alpha_set_public_section (abfd, sym)
else
{
sym->symbol.section = data_sec;
- sym->symbol.value -= bfd_section_size (abfd, code_sec);
+ sym->symbol.value -= code_sec->size;
/* The data segment had better be aligned. */
- BFD_ASSERT ((bfd_section_size (abfd, code_sec) & 0xf) == 0);
+ BFD_ASSERT ((code_sec->size & 0xf) == 0);
}
return TRUE;
}
diff --git a/bfd/nlm32-ppc.c b/bfd/nlm32-ppc.c
index aafe2cc9971..9fb59b0416f 100644
--- a/bfd/nlm32-ppc.c
+++ b/bfd/nlm32-ppc.c
@@ -1,5 +1,5 @@
/* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
- Copyright 1994, 1995, 2000, 2001, 2002, 2003
+ Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -621,7 +621,7 @@ nlm_powerpc_read_reloc (abfd, sym, secp, rel)
else if (l_rsecnm == 1)
{
*secp = data_sec;
- l_vaddr -= bfd_section_size (abfd, code_sec);
+ l_vaddr -= code_sec->size;
}
else
{
@@ -858,7 +858,7 @@ nlm_powerpc_write_reloc (abfd, sec, rel, indx)
else if (sec == data_sec)
{
l_rsecnm = 1;
- address += bfd_section_size (abfd, code_sec);
+ address += code_sec->size;
}
else
{
diff --git a/bfd/nlm32-sparc.c b/bfd/nlm32-sparc.c
index e973d42a7be..847220e6b4f 100644
--- a/bfd/nlm32-sparc.c
+++ b/bfd/nlm32-sparc.c
@@ -1,5 +1,5 @@
/* Support for 32-bit SPARC NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -325,9 +325,9 @@ nlm_sparc_write_import (abfd, sec, rel)
if (symsec == code)
base = 0;
else if (symsec == data)
- base = bfd_section_size (abfd, code);
+ base = code->size;
else if (symsec == bss)
- base = bfd_section_size (abfd, code) + bfd_section_size (abfd, data);
+ base = code->size + data->size;
else
base = 0;
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index 68e4a2a8723..bf41f27170a 100644
--- a/bfd/nlmcode.h
+++ b/bfd/nlmcode.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
@@ -236,7 +236,7 @@ add_bfd_section (abfd, name, offset, size, flags)
return FALSE;
newsect->vma = 0; /* NLM's are relocatable. */
- newsect->_raw_size = size;
+ newsect->size = size;
newsect->filepos = offset;
newsect->flags = flags;
newsect->alignment_power = bfd_log2 ((bfd_vma) 0); /* FIXME */
@@ -630,7 +630,7 @@ nlm_swap_auxiliary_headers_in (abfd)
newsec = bfd_make_section_anyway (abfd, name);
if (newsec == (asection *) NULL)
return FALSE;
- newsec->_raw_size = size;
+ newsec->size = size;
if (filepos != 0)
{
newsec->filepos = filepos;
@@ -1437,12 +1437,12 @@ nlm_compute_section_file_positions (abfd)
{
flagword f;
- sec->_raw_size = BFD_ALIGN (sec->_raw_size, 1 << sec->alignment_power);
+ sec->size = BFD_ALIGN (sec->size, 1 << sec->alignment_power);
f = bfd_get_section_flags (abfd, sec);
if (f & SEC_CODE)
{
- text += sec->_raw_size;
+ text += sec->size;
if (bfd_get_section_vma (abfd, sec) < text_low)
text_low = bfd_get_section_vma (abfd, sec);
if (sec->alignment_power > text_align)
@@ -1450,7 +1450,7 @@ nlm_compute_section_file_positions (abfd)
}
else if (f & SEC_DATA)
{
- data += sec->_raw_size;
+ data += sec->size;
if (bfd_get_section_vma (abfd, sec) < data_low)
data_low = bfd_get_section_vma (abfd, sec);
if (sec->alignment_power > data_align)
@@ -1462,7 +1462,7 @@ nlm_compute_section_file_positions (abfd)
other_align = sec->alignment_power;
}
else if (f & SEC_ALLOC)
- bss += sec->_raw_size;
+ bss += sec->size;
}
nlm_set_text_low (abfd, text_low);
@@ -1498,17 +1498,17 @@ nlm_compute_section_file_positions (abfd)
if (f & SEC_CODE)
{
sec->filepos = text_ptr;
- text_ptr += sec->_raw_size;
+ text_ptr += sec->size;
}
else if (f & SEC_DATA)
{
sec->filepos = data_ptr;
- data_ptr += sec->_raw_size;
+ data_ptr += sec->size;
}
else if (f & SEC_HAS_CONTENTS)
{
sec->filepos = other_ptr;
- other_ptr += sec->_raw_size;
+ other_ptr += sec->size;
}
}
@@ -1539,7 +1539,7 @@ nlm_compute_section_file_positions (abfd)
symbol (which is the old value of the symbol). */
sym->section = bss_sec;
size = sym->value;
- sym->value = bss_sec->_raw_size + add;
+ sym->value = bss_sec->size + add;
add += size;
add = BFD_ALIGN (add, 1 << bss_sec->alignment_power);
}
@@ -1552,7 +1552,7 @@ nlm_compute_section_file_positions (abfd)
abort ();
}
nlm_fixed_header (abfd)->uninitializedDataSize += add;
- bss_sec->_raw_size += add;
+ bss_sec->size += add;
}
}
diff --git a/bfd/oasys.c b/bfd/oasys.c
index be6a8d90d86..c99919af0a9 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -1,6 +1,6 @@
/* BFD back-end for oasys objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -507,7 +507,7 @@ oasys_object_p (abfd)
BFD_FAIL ();
}
- s->_raw_size = H_GET_32 (abfd, record.section.value);
+ s->size = H_GET_32 (abfd, record.section.value);
s->vma = H_GET_32 (abfd, record.section.vma);
s->flags = 0;
had_usefull = TRUE;
@@ -657,7 +657,7 @@ oasys_slurp_section_data (abfd)
if (! per->initialized)
{
- per->data = (bfd_byte *) bfd_zalloc (abfd, section->_raw_size);
+ per->data = (bfd_byte *) bfd_zalloc (abfd, section->size);
if (!per->data)
return FALSE;
per->reloc_tail_ptr
@@ -1055,7 +1055,7 @@ oasys_write_sections (abfd)
return FALSE;
}
out.relb = RELOCATION_TYPE_REL | s->target_index;
- H_PUT_32 (abfd, s->_cooked_size, out.value);
+ H_PUT_32 (abfd, s->size, out.value);
H_PUT_32 (abfd, s->vma, out.vma);
if (! oasys_write_record (abfd,
@@ -1159,7 +1159,7 @@ oasys_write_data (abfd)
current_byte_index = 0;
processed_data.relb = s->target_index | RELOCATION_TYPE_REL;
- while (current_byte_index < s->_cooked_size)
+ while (current_byte_index < s->size)
{
/* Scan forwards by eight bytes or however much is left and see if
there are any relocations going on */
@@ -1180,7 +1180,7 @@ oasys_write_data (abfd)
1 modification byte + 2 data = 8 bytes total). That's where
the magic number 8 comes from.
*/
- while (current_byte_index < s->_raw_size && dst <=
+ while (current_byte_index < s->size && dst <=
&processed_data.data[sizeof (processed_data.data) - 8])
{
@@ -1355,7 +1355,7 @@ oasys_set_section_contents (abfd, section, location, offset, count)
if (oasys_per_section (section)->data == (bfd_byte *) NULL)
{
oasys_per_section (section)->data =
- (bfd_byte *) (bfd_alloc (abfd, section->_cooked_size));
+ (bfd_byte *) (bfd_alloc (abfd, section->size));
if (!oasys_per_section (section)->data)
return FALSE;
}
@@ -1506,7 +1506,10 @@ oasys_sizeof_headers (abfd, exec)
#define oasys_bfd_relax_section bfd_generic_relax_section
#define oasys_bfd_gc_sections bfd_generic_gc_sections
#define oasys_bfd_merge_sections bfd_generic_merge_sections
+#define oasys_bfd_is_group_section bfd_generic_is_group_section
#define oasys_bfd_discard_group bfd_generic_discard_group
+#define oasys_section_already_linked \
+ _bfd_generic_section_already_linked
#define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 6abd40509ca..e54e099d07d 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -1,6 +1,6 @@
/* opncls.c -- open and close a BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -103,6 +103,7 @@ _bfd_new_bfd_contained_in (bfd *obfd)
if (nbfd == NULL)
return NULL;
nbfd->xvec = obfd->xvec;
+ nbfd->iovec = obfd->iovec;
nbfd->my_archive = obfd;
nbfd->direction = read_direction;
nbfd->target_defaulted = obfd->target_defaulted;
@@ -322,6 +323,183 @@ bfd_openstreamr (const char *filename, const char *target, void *streamarg)
return nbfd;
}
+
+/*
+FUNCTION
+ bfd_openr_iovec
+
+SYNOPSIS
+ bfd *bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open) (struct bfd *nbfd,
+ void *open_closure),
+ void *open_closure,
+ file_ptr (*pread) (struct bfd *nbfd,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset),
+ int (*close) (struct bfd *nbfd,
+ void *stream));
+
+DESCRIPTION
+
+ Create and return a BFD backed by a read-only @var{stream}.
+ The @var{stream} is created using @var{open}, accessed using
+ @var{pread} and destroyed using @var{close}.
+
+ Calls <<bfd_find_target>>, so @var{target} is interpreted as by
+ that function.
+
+ Calls @var{open} (which can call <<bfd_zalloc>> and
+ <<bfd_get_filename>>) to obtain the read-only stream backing
+ the BFD. @var{open} either succeeds returning the
+ non-<<NULL>> @var{stream}, or fails returning <<NULL>>
+ (setting <<bfd_error>>).
+
+ Calls @var{pread} to request @var{nbytes} of data from
+ @var{stream} starting at @var{offset} (e.g., via a call to
+ <<bfd_read>>). @var{pread} either succeeds returning the
+ number of bytes read (which can be less than @var{nbytes} when
+ end-of-file), or fails returning -1 (setting <<bfd_error>>).
+
+ Calls @var{close} when the BFD is later closed using
+ <<bfd_close>>. @var{close} either succeeds returning 0, or
+ fails returning -1 (setting <<bfd_error>>).
+
+ If <<bfd_openr_iovec>> returns <<NULL>> then an error has
+ occurred. Possible errors are <<bfd_error_no_memory>>,
+ <<bfd_error_invalid_target>> and <<bfd_error_system_call>>.
+
+*/
+
+struct opncls
+{
+ void *stream;
+ file_ptr (*pread) (struct bfd *abfd, void *stream, void *buf,
+ file_ptr nbytes, file_ptr offset);
+ int (*close) (struct bfd *abfd, void *stream);
+ file_ptr where;
+};
+
+static file_ptr
+opncls_btell (struct bfd *abfd)
+{
+ struct opncls *vec = abfd->iostream;
+ return vec->where;
+}
+
+static int
+opncls_bseek (struct bfd *abfd, file_ptr offset, int whence)
+{
+ struct opncls *vec = abfd->iostream;
+ switch (whence)
+ {
+ case SEEK_SET: vec->where = offset; break;
+ case SEEK_CUR: vec->where += offset; break;
+ case SEEK_END: return -1;
+ }
+ return 0;
+}
+
+static file_ptr
+opncls_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+{
+ struct opncls *vec = abfd->iostream;
+ file_ptr nread = vec->pread (abfd, vec->stream, buf, nbytes, vec->where);
+ if (nread < 0)
+ return nread;
+ vec->where += nread;
+ return nread;
+}
+
+static file_ptr
+opncls_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
+ const void *where ATTRIBUTE_UNUSED,
+ file_ptr nbytes ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+static int
+opncls_bclose (struct bfd *abfd)
+{
+ struct opncls *vec = abfd->iostream;
+ /* Since the VEC's memory is bound to the bfd deleting the bfd will
+ free it. */
+ int status = 0;
+ if (vec->close != NULL)
+ status = vec->close (abfd, vec->stream);
+ abfd->iostream = NULL;
+ return status;
+}
+
+static int
+opncls_bflush (struct bfd *abfd ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static int
+opncls_bstat (struct bfd *abfd ATTRIBUTE_UNUSED, struct stat *sb)
+{
+ memset (sb, 0, sizeof (*sb));
+ return 0;
+}
+
+static const struct bfd_iovec opncls_iovec = {
+ &opncls_bread, &opncls_bwrite, &opncls_btell, &opncls_bseek,
+ &opncls_bclose, &opncls_bflush, &opncls_bstat
+};
+
+bfd *
+bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open) (struct bfd *nbfd,
+ void *open_closure),
+ void *open_closure,
+ file_ptr (*pread) (struct bfd *abfd,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset),
+ int (*close) (struct bfd *nbfd,
+ void *stream))
+{
+ bfd *nbfd;
+ const bfd_target *target_vec;
+ struct opncls *vec;
+ void *stream;
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
+ return NULL;
+
+ target_vec = bfd_find_target (target, nbfd);
+ if (target_vec == NULL)
+ {
+ _bfd_delete_bfd (nbfd);
+ return NULL;
+ }
+
+ nbfd->filename = filename;
+ nbfd->direction = read_direction;
+
+ stream = open (nbfd, open_closure);
+ if (stream == NULL)
+ {
+ _bfd_delete_bfd (nbfd);
+ return NULL;
+ }
+
+ vec = bfd_zalloc (nbfd, sizeof (struct opncls));
+ vec->stream = stream;
+ vec->pread = pread;
+ vec->close = close;
+
+ nbfd->iovec = &opncls_iovec;
+ nbfd->iostream = vec;
+
+ return nbfd;
+}
/* bfd_openw -- open for writing.
Returns a pointer to a freshly-allocated BFD on success, or NULL.
@@ -415,7 +593,12 @@ bfd_close (bfd *abfd)
if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
return FALSE;
- ret = bfd_cache_close (abfd);
+ /* FIXME: cagney/2004-02-15: Need to implement a BFD_IN_MEMORY io
+ vector. */
+ if (!(abfd->flags & BFD_IN_MEMORY))
+ ret = abfd->iovec->bclose (abfd);
+ else
+ ret = 0;
/* If the file was open for writing and is now executable,
make it so. */
@@ -630,7 +813,7 @@ INTERNAL_FUNCTION
bfd_alloc
SYNOPSIS
- void *bfd_alloc (bfd *abfd, size_t wanted);
+ void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
DESCRIPTION
Allocate a block of @var{wanted} bytes of memory attached to
@@ -793,12 +976,10 @@ DESCRIPTION
static char *
get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
{
- asection * sect;
- bfd_size_type debuglink_size;
+ asection *sect;
unsigned long crc32;
- char * contents;
+ bfd_byte *contents;
int crc_offset;
- bfd_boolean ret;
BFD_ASSERT (abfd);
BFD_ASSERT (crc32_out);
@@ -808,16 +989,10 @@ get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
if (sect == NULL)
return NULL;
- debuglink_size = bfd_section_size (abfd, sect);
-
- contents = malloc (debuglink_size);
- if (contents == NULL)
- return NULL;
-
- ret = bfd_get_section_contents (abfd, sect, contents, 0, debuglink_size);
- if (! ret)
+ if (!bfd_malloc_and_get_section (abfd, sect, &contents))
{
- free (contents);
+ if (contents != NULL)
+ free (contents);
return NULL;
}
diff --git a/bfd/osf-core.c b/bfd/osf-core.c
index 8273504e59a..7fe2b08f056 100644
--- a/bfd/osf-core.c
+++ b/bfd/osf-core.c
@@ -56,11 +56,11 @@ struct osf_core_struct
#define core_command(bfd) (core_hdr(bfd)->cmd)
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -71,7 +71,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 8;
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 95d2ccd30be..1188a9215b2 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1,5 +1,5 @@
/* BFD back-end for PDP-11 a.out binaries.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -341,11 +341,6 @@ DESCRIPTION
#define RELOC_SIZE 2
-struct pdp11_aout_reloc_external
-{
- bfd_byte e_reloc_entry[2];
-};
-
#define RELFLG 0x0001 /* pc-relative flag */
#define RTYPE 0x000e /* type mask */
#define RIDXMASK 0xfff0 /* index mask */
@@ -368,9 +363,9 @@ static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *));
static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *));
static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *));
-void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, struct pdp11_aout_reloc_external *));
+void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, bfd_byte *));
void pdp11_aout_swap_reloc_in
-PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *,
+PARAMS ((bfd *, bfd_byte *, arelent *,
bfd_size_type, asymbol **, bfd_size_type));
/*
@@ -741,8 +736,8 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
if (! NAME(aout,make_sections) (abfd))
return NULL;
- obj_datasec (abfd)->_raw_size = execp->a_data;
- obj_bsssec (abfd)->_raw_size = execp->a_bss;
+ obj_datasec (abfd)->size = execp->a_data;
+ obj_bsssec (abfd)->size = execp->a_bss;
obj_textsec (abfd)->flags =
(execp->a_trsize != 0
@@ -768,7 +763,6 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
struct exec *execp = exec_hdr (abfd);
obj_textsec (abfd)->size = N_TXTSIZE(*execp);
- obj_textsec (abfd)->raw_size = N_TXTSIZE(*execp);
/* data and bss are already filled in since they're so standard */
/* The virtual memory addresses of the sections */
@@ -826,7 +820,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
if (execp->a_entry != 0
|| (execp->a_entry >= obj_textsec(abfd)->vma
- && execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size))
+ && execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->size))
abfd->flags |= EXEC_P;
#ifdef STAT_FOR_EXEC
else
@@ -1074,8 +1068,8 @@ adjust_o_magic (abfd, execp)
else
vma = obj_textsec (abfd)->vma;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
@@ -1083,7 +1077,7 @@ adjust_o_magic (abfd, execp)
#if 0 /* ?? Does alignment in the file image really matter? */
pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
#endif
- obj_textsec (abfd)->_raw_size += pad;
+ obj_textsec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_datasec (abfd)->vma = vma;
@@ -1091,8 +1085,8 @@ adjust_o_magic (abfd, execp)
else
vma = obj_datasec (abfd)->vma;
obj_datasec (abfd)->filepos = pos;
- pos += obj_datasec (abfd)->_raw_size;
- vma += obj_datasec (abfd)->_raw_size;
+ pos += obj_datasec (abfd)->size;
+ vma += obj_datasec (abfd)->size;
/* BSS. */
if (! obj_bsssec (abfd)->user_set_vma)
@@ -1100,7 +1094,7 @@ adjust_o_magic (abfd, execp)
#if 0
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
#endif
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_bsssec (abfd)->vma = vma;
@@ -1113,16 +1107,16 @@ adjust_o_magic (abfd, execp)
pad = obj_bsssec (abfd)->vma - vma;
if (pad > 0)
{
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
}
}
obj_bsssec (abfd)->filepos = pos;
/* Fix up the exec header. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
+ execp->a_bss = obj_bsssec (abfd)->size;
N_SET_MAGIC (*execp, OMAGIC);
}
@@ -1172,7 +1166,7 @@ adjust_z_magic (abfd, execp)
/* Find start of data. */
if (ztih)
{
- text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
}
else
@@ -1180,33 +1174,33 @@ adjust_z_magic (abfd, execp)
/* Note that if page_size == zmagic_disk_block_size, then
filepos == page_size, and this case is the same as the ztih
case. */
- text_end = obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
text_end += obj_textsec (abfd)->filepos;
}
- obj_textsec (abfd)->_raw_size += text_pad;
+ obj_textsec (abfd)->size += text_pad;
text_end += text_pad;
/* Data. */
if (!obj_datasec(abfd)->user_set_vma)
{
bfd_vma vma;
- vma = obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size;
+ vma = obj_textsec(abfd)->vma + obj_textsec(abfd)->size;
obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size);
}
if (abdp && abdp->zmagic_mapped_contiguous)
{
text_pad = (obj_datasec(abfd)->vma
- obj_textsec(abfd)->vma
- - obj_textsec(abfd)->_raw_size);
- obj_textsec(abfd)->_raw_size += text_pad;
+ - obj_textsec(abfd)->size);
+ obj_textsec(abfd)->size += text_pad;
}
obj_datasec (abfd)->filepos = (obj_textsec (abfd)->filepos
- + obj_textsec (abfd)->_raw_size);
+ + obj_textsec (abfd)->size);
/* Fix up exec header while we're at it. */
- execp->a_text = obj_textsec(abfd)->_raw_size;
+ execp->a_text = obj_textsec(abfd)->size;
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
execp->a_text += adata(abfd).exec_bytes_size;
if (obj_aout_subformat (abfd) == q_magic_format)
@@ -1215,17 +1209,17 @@ adjust_z_magic (abfd, execp)
N_SET_MAGIC (*execp, ZMAGIC);
/* Spec says data section should be rounded up to page boundary. */
- obj_datasec(abfd)->_raw_size
- = align_power (obj_datasec(abfd)->_raw_size,
+ obj_datasec(abfd)->size
+ = align_power (obj_datasec(abfd)->size,
obj_bsssec(abfd)->alignment_power);
- execp->a_data = BFD_ALIGN (obj_datasec(abfd)->_raw_size,
+ execp->a_data = BFD_ALIGN (obj_datasec(abfd)->size,
adata(abfd).page_size);
- data_pad = execp->a_data - obj_datasec(abfd)->_raw_size;
+ data_pad = execp->a_data - obj_datasec(abfd)->size;
/* BSS. */
if (!obj_bsssec(abfd)->user_set_vma)
obj_bsssec(abfd)->vma = (obj_datasec(abfd)->vma
- + obj_datasec(abfd)->_raw_size);
+ + obj_datasec(abfd)->size);
/* If the BSS immediately follows the data section and extra space
in the page is left after the data section, fudge data
in the header so that the bss section looks smaller by that
@@ -1234,11 +1228,11 @@ adjust_z_magic (abfd, execp)
could have explicitly set the BSS vma to immediately follow
the data section.) */
if (align_power (obj_bsssec(abfd)->vma, obj_bsssec(abfd)->alignment_power)
- == obj_datasec(abfd)->vma + obj_datasec(abfd)->_raw_size)
- execp->a_bss = (data_pad > obj_bsssec(abfd)->_raw_size) ? 0 :
- obj_bsssec(abfd)->_raw_size - data_pad;
+ == obj_datasec(abfd)->vma + obj_datasec(abfd)->size)
+ execp->a_bss = (data_pad > obj_bsssec(abfd)->size) ? 0 :
+ obj_bsssec(abfd)->size - data_pad;
else
- execp->a_bss = obj_bsssec(abfd)->_raw_size;
+ execp->a_bss = obj_bsssec(abfd)->size;
}
static void
@@ -1256,8 +1250,8 @@ adjust_n_magic (abfd, execp)
obj_textsec(abfd)->vma = vma;
else
vma = obj_textsec(abfd)->vma;
- pos += obj_textsec(abfd)->_raw_size;
- vma += obj_textsec(abfd)->_raw_size;
+ pos += obj_textsec(abfd)->size;
+ vma += obj_textsec(abfd)->size;
/* Data. */
obj_datasec(abfd)->filepos = pos;
@@ -1266,10 +1260,10 @@ adjust_n_magic (abfd, execp)
vma = obj_datasec(abfd)->vma;
/* Since BSS follows data immediately, see if it needs alignment. */
- vma += obj_datasec(abfd)->_raw_size;
+ vma += obj_datasec(abfd)->size;
pad = align_power (vma, obj_bsssec(abfd)->alignment_power) - vma;
- obj_datasec(abfd)->_raw_size += pad;
- pos += obj_datasec(abfd)->_raw_size;
+ obj_datasec(abfd)->size += pad;
+ pos += obj_datasec(abfd)->size;
/* BSS. */
if (!obj_bsssec(abfd)->user_set_vma)
@@ -1278,9 +1272,9 @@ adjust_n_magic (abfd, execp)
vma = obj_bsssec(abfd)->vma;
/* Fix up exec header. */
- execp->a_text = obj_textsec(abfd)->_raw_size;
- execp->a_data = obj_datasec(abfd)->_raw_size;
- execp->a_bss = obj_bsssec(abfd)->_raw_size;
+ execp->a_text = obj_textsec(abfd)->size;
+ execp->a_data = obj_datasec(abfd)->size;
+ execp->a_bss = obj_bsssec(abfd)->size;
N_SET_MAGIC (*execp, NMAGIC);
}
@@ -1298,11 +1292,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
if (adata(abfd).magic != undecided_magic)
return TRUE;
- obj_textsec(abfd)->_raw_size =
- align_power(obj_textsec(abfd)->_raw_size,
+ obj_textsec(abfd)->size =
+ align_power(obj_textsec(abfd)->size,
obj_textsec(abfd)->alignment_power);
- *text_size = obj_textsec (abfd)->_raw_size;
+ *text_size = obj_textsec (abfd)->size;
/* Rule (heuristic) for when to pad to a new page. Note that there
are (at least) two ways demand-paged (ZMAGIC) files have been
handled. Most Berkeley-based systems start the text segment at
@@ -1336,11 +1330,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
}
str;
}),
- obj_textsec(abfd)->vma, obj_textsec(abfd)->_raw_size,
+ obj_textsec(abfd)->vma, obj_textsec(abfd)->size,
obj_textsec(abfd)->alignment_power,
- obj_datasec(abfd)->vma, obj_datasec(abfd)->_raw_size,
+ obj_datasec(abfd)->vma, obj_datasec(abfd)->size,
obj_datasec(abfd)->alignment_power,
- obj_bsssec(abfd)->vma, obj_bsssec(abfd)->_raw_size,
+ obj_bsssec(abfd)->vma, obj_bsssec(abfd)->size,
obj_bsssec(abfd)->alignment_power);
#endif
#endif
@@ -1362,11 +1356,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
#ifdef BFD_AOUT_DEBUG
fprintf (stderr, " text=<%x,%x,%x> data=<%x,%x,%x> bss=<%x,%x>\n",
- obj_textsec(abfd)->vma, obj_textsec(abfd)->_raw_size,
+ obj_textsec(abfd)->vma, obj_textsec(abfd)->size,
obj_textsec(abfd)->filepos,
- obj_datasec(abfd)->vma, obj_datasec(abfd)->_raw_size,
+ obj_datasec(abfd)->vma, obj_datasec(abfd)->size,
obj_datasec(abfd)->filepos,
- obj_bsssec(abfd)->vma, obj_bsssec(abfd)->_raw_size);
+ obj_bsssec(abfd)->vma, obj_bsssec(abfd)->size);
#endif
return TRUE;
@@ -1673,9 +1667,8 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
/* This case occurs, e.g., for the *DEBUG* section of a COFF
file. */
(*_bfd_error_handler)
- ("%s: can not represent section for symbol `%s' in a.out object file format",
- bfd_archive_filename (abfd),
- cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
+ ("%B: can not represent section for symbol `%s' in a.out object file format",
+ abfd, cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
@@ -1701,8 +1694,8 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
else
{
(*_bfd_error_handler)
- ("%s: can not represent section `%s' in a.out object file format",
- bfd_archive_filename (abfd), bfd_get_section_name (abfd, sec));
+ ("%B: can not represent section `%A' in a.out object file format",
+ abfd, sec);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
@@ -2034,7 +2027,7 @@ void
pdp11_aout_swap_reloc_out (abfd, g, natptr)
bfd *abfd;
arelent *g;
- register struct pdp11_aout_reloc_external *natptr;
+ bfd_byte *natptr;
{
int r_index;
int r_pcrel;
@@ -2096,7 +2089,7 @@ pdp11_aout_swap_reloc_out (abfd, g, natptr)
reloc_entry = r_index << 4 | r_type | r_pcrel;
- PUT_WORD (abfd, reloc_entry, natptr->e_reloc_entry);
+ PUT_WORD (abfd, reloc_entry, natptr);
}
/* BFD deals internally with all things based from the section they're
@@ -2149,7 +2142,7 @@ void
pdp11_aout_swap_reloc_in (abfd, bytes, cache_ptr, offset,
symbols, symcount)
bfd *abfd;
- struct pdp11_aout_reloc_external *bytes;
+ bfd_byte *bytes;
arelent *cache_ptr;
bfd_size_type offset;
asymbol **symbols;
@@ -2196,7 +2189,7 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
sec_ptr asect;
asymbol **symbols;
{
- struct pdp11_aout_reloc_external *rptr;
+ bfd_byte *rptr;
bfd_size_type count;
bfd_size_type reloc_size;
PTR relocs;
@@ -2262,16 +2255,14 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
cache_ptr = reloc_cache;
- rptr = (struct pdp11_aout_reloc_external *) relocs;
+ rptr = relocs;
for (counter = 0;
counter < count;
- counter++, ((char *)rptr) += RELOC_SIZE, cache_ptr++)
+ counter++, rptr += RELOC_SIZE, cache_ptr++)
{
while (GET_WORD (abfd, (PTR)rptr) == 0)
{
- rptr =
- (struct pdp11_aout_reloc_external *)
- ((char *) rptr + RELOC_SIZE);
+ rptr += RELOC_SIZE;
if ((char *) rptr >= (char *) relocs + reloc_size)
goto done;
}
@@ -2314,7 +2305,7 @@ NAME(aout,squirt_out_relocs) (abfd, section)
return TRUE;
#endif
- natsize = bfd_get_section_size_before_reloc (section);
+ natsize = section->size;
native = (unsigned char *) bfd_zalloc (abfd, natsize);
if (!native)
return FALSE;
@@ -2324,10 +2315,9 @@ NAME(aout,squirt_out_relocs) (abfd, section)
{
while (count > 0)
{
- struct pdp11_aout_reloc_external *r;
+ bfd_byte *r;
- r = (struct pdp11_aout_reloc_external *)
- (native + (*generic)->address);
+ r = native + (*generic)->address;
pdp11_aout_swap_reloc_out (abfd, *generic, r);
count--;
generic++;
@@ -3356,7 +3346,7 @@ static bfd_boolean pdp11_aout_link_input_section
PARAMS ((struct aout_final_link_info *finfo,
bfd *input_bfd,
asection *input_section,
- struct pdp11_aout_reloc_external *relocs,
+ bfd_byte *relocs,
bfd_size_type rel_size,
bfd_byte *contents));
@@ -3469,10 +3459,10 @@ NAME(aout,final_link) (abfd, info, callback)
if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
- sz = bfd_section_size (sub, obj_textsec (sub));
+ sz = obj_textsec (sub)->size;
if (sz > max_contents_size)
max_contents_size = sz;
- sz = bfd_section_size (sub, obj_datasec (sub));
+ sz = obj_datasec (sub)->size;
if (sz > max_contents_size)
max_contents_size = sz;
@@ -4424,7 +4414,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
PTR relocs;
/* Get the section contents. */
- input_size = bfd_section_size (input_bfd, input_section);
+ input_size = input_section->size;
if (! bfd_get_section_contents (input_bfd, input_section,
(PTR) finfo->contents,
(file_ptr) 0, input_size))
@@ -4447,7 +4437,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
/* Relocate the section contents. */
if (! pdp11_aout_link_input_section (finfo, input_bfd, input_section,
- (struct pdp11_aout_reloc_external *) relocs,
+ (bfd_byte *) relocs,
rel_size, finfo->contents))
return FALSE;
@@ -4511,7 +4501,7 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
struct aout_final_link_info *finfo;
bfd *input_bfd;
asection *input_section;
- struct pdp11_aout_reloc_external *relocs;
+ bfd_byte *relocs;
bfd_size_type rel_size;
bfd_byte *contents;
{
@@ -4526,8 +4516,8 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
bfd_size_type reloc_count;
- register struct pdp11_aout_reloc_external *rel;
- struct pdp11_aout_reloc_external *rel_end;
+ bfd_byte *rel;
+ bfd_byte *rel_end;
output_bfd = finfo->output_bfd;
check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
@@ -4544,8 +4534,8 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
reloc_count = rel_size / RELOC_SIZE;
rel = relocs;
- rel_end = (struct pdp11_aout_reloc_external *)(((char *)rel) + rel_size);
- for (; rel < rel_end; ((char *)rel) += RELOC_SIZE)
+ rel_end = rel + rel_size;
+ for (; rel < rel_end; rel += RELOC_SIZE)
{
bfd_vma r_addr;
int r_index;
@@ -4653,10 +4643,10 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
}
/* Write out the new r_index value. */
- reloc_entry = GET_WORD (input_bfd, rel->e_reloc_entry);
+ reloc_entry = GET_WORD (input_bfd, rel);
reloc_entry &= RIDXMASK;
reloc_entry |= r_index << 4;
- PUT_WORD (input_bfd, reloc_entry, rel->e_reloc_entry);
+ PUT_WORD (input_bfd, reloc_entry, rel);
}
else
{
diff --git a/bfd/pe-i386.c b/bfd/pe-i386.c
index a912cffd998..be691fd7eeb 100644
--- a/bfd/pe-i386.c
+++ b/bfd/pe-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,12 +20,13 @@
#include "bfd.h"
#include "sysdep.h"
-#define TARGET_SYM i386pe_vec
-#define TARGET_NAME "pe-i386"
+#define TARGET_SYM i386pe_vec
+#define TARGET_NAME "pe-i386"
#define COFF_WITH_PE
-#define PCRELOFFSET TRUE
-#define TARGET_UNDERSCORE '_'
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
#define COFF_LONG_SECTION_NAMES
+#define COFF_SUPPORT_GNU_LINKONCE
#define COFF_LONG_FILENAMES
#define COFF_SECTION_ALIGNMENT_ENTRIES \
@@ -38,6 +39,10 @@
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
#include "coff-i386.c"
diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c
index 3066aaa442b..4d6d9618497 100644
--- a/bfd/pe-mips.c
+++ b/bfd/pe-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS PE COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
This file is part of BFD, the Binary File Descriptor library.
@@ -41,16 +41,6 @@ static reloc_howto_type *coff_mips_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
-#if 0
-static void mips_ecoff_swap_reloc_in
- PARAMS ((bfd *, PTR, struct internal_reloc *));
-static void mips_ecoff_swap_reloc_out
- PARAMS ((bfd *, const struct internal_reloc *, PTR));
-static void mips_adjust_reloc_in
- PARAMS ((bfd *, const struct internal_reloc *, arelent *));
-static void mips_adjust_reloc_out
- PARAMS ((bfd *, const arelent *, struct internal_reloc *));
-#endif
static bfd_boolean in_reloc_p
PARAMS ((bfd *, reloc_howto_type *));
@@ -534,20 +524,6 @@ coff_mips_reloc_type_lookup (abfd, code)
case BFD_RELOC_MIPS_LITERAL:
mips_type = MIPS_R_LITERAL;
break;
-/* FIXME?
- case BFD_RELOC_16_PCREL_S2:
- mips_type = MIPS_R_PCREL16;
- break;
- case BFD_RELOC_PCREL_HI16_S:
- mips_type = MIPS_R_RELHI;
- break;
- case BFD_RELOC_PCREL_LO16:
- mips_type = MIPS_R_RELLO;
- break;
- case BFD_RELOC_GPREL32:
- mips_type = MIPS_R_SWITCH;
- break;
-*/
case BFD_RELOC_RVA:
mips_type = MIPS_R_RVA;
break;
@@ -656,9 +632,8 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
if (info->relocatable)
{
- (*_bfd_error_handler) (_("\
-%s: `ld -r' not supported with PE MIPS objects\n"),
- bfd_archive_filename (input_bfd));
+ (*_bfd_error_handler)
+ (_("%B: `ld -r' not supported with PE MIPS objects\n"), input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -792,8 +767,8 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
val = VMA of what we need to refer to
*/
-#define UI(x) (*_bfd_error_handler) (_("%s: unimplemented %s\n"), \
- bfd_archive_filename (input_bfd), x); \
+#define UI(x) (*_bfd_error_handler) (_("%B: unimplemented %s\n"), \
+ input_bfd, x); \
bfd_set_error (bfd_error_bad_value);
switch (rel->r_type)
@@ -818,8 +793,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
targ = val + (tmp&0x03ffffff)*4;
if ((src & 0xf0000000) != (targ & 0xf0000000))
{
- (*_bfd_error_handler) (_("%s: jump too far away\n"),
- bfd_archive_filename (input_bfd));
+ (*_bfd_error_handler) (_("%B: jump too far away\n"), input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -845,8 +819,8 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
targ = val + low + ((tmp & 0xffff) << 16);
break;
default:
- (*_bfd_error_handler) (_("%s: bad pair/reflo after refhi\n"),
- bfd_archive_filename (input_bfd));
+ (*_bfd_error_handler) (_("%B: bad pair/reflo after refhi\n"),
+ input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 598aa7cfa03..6a41e9bcaa5 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -189,8 +189,7 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
sec->vma = 0;
sec->lma = 0;
- sec->_cooked_size = 0;
- sec->_raw_size = 0;
+ sec->size = 0;
sec->filepos = 0;
sec->rel_filepos = 0;
sec->reloc_count = 0;
@@ -198,7 +197,6 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
sec->lineno_count = 0;
sec->userdata = NULL;
sec->next = (asection *) NULL;
- sec->flags = 0;
sec->alignment_power = 2;
sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD;
@@ -658,14 +656,19 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
{
asection *sec;
+ bfd_vma hsize = 0;
bfd_vma dsize = 0;
- bfd_vma isize = SA(abfd->sections->filepos);
+ bfd_vma isize = 0;
bfd_vma tsize = 0;
for (sec = abfd->sections; sec; sec = sec->next)
{
- int rounded = FA(sec->_raw_size);
+ int rounded = FA(sec->size);
+ /* The first non-zero section filepos is the header size.
+ Sections without contents will have a filepos of 0. */
+ if (hsize == 0)
+ hsize = sec->filepos;
if (sec->flags & SEC_DATA)
dsize += rounded;
if (sec->flags & SEC_CODE)
@@ -682,10 +685,10 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
aouthdr_in->dsize = dsize;
aouthdr_in->tsize = tsize;
- extra->SizeOfImage = isize;
+ extra->SizeOfHeaders = hsize;
+ extra->SizeOfImage = SA(hsize) + isize;
}
- extra->SizeOfHeaders = abfd->sections->filepos;
H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->standard.magic);
#define LINKER_VERSION 256 /* That is, 2.56 */
@@ -983,7 +986,6 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
};
pe_required_section_flags * p;
- int flags = scnhdr_int->s_flags;
/* We have defaulted to adding the IMAGE_SCN_MEM_WRITE flag, but now
we know exactly what this specific section wants so we remove it
@@ -998,12 +1000,12 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
{
if (strcmp (scnhdr_int->s_name, ".text")
|| (bfd_get_file_flags (abfd) & WP_TEXT))
- flags &= ~IMAGE_SCN_MEM_WRITE;
- flags |= p->must_have;
+ scnhdr_int->s_flags &= ~IMAGE_SCN_MEM_WRITE;
+ scnhdr_int->s_flags |= p->must_have;
break;
}
- H_PUT_32 (abfd, flags, scnhdr_ext->s_flags);
+ H_PUT_32 (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
}
if (coff_data (abfd)->link_info
@@ -1106,7 +1108,6 @@ pe_print_idata (abfd, vfile)
bfd_size_type datasize = 0;
bfd_size_type dataoff;
bfd_size_type i;
- bfd_size_type amt;
int onaline = 20;
pe_data_type *pe = pe_data (abfd);
@@ -1124,7 +1125,7 @@ pe_print_idata (abfd, vfile)
return TRUE;
addr = section->vma;
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (datasize == 0)
return TRUE;
}
@@ -1133,7 +1134,7 @@ pe_print_idata (abfd, vfile)
addr += extra->ImageBase;
for (section = abfd->sections; section != NULL; section = section->next)
{
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (addr >= section->vma && addr < section->vma + datasize)
break;
}
@@ -1153,7 +1154,7 @@ pe_print_idata (abfd, vfile)
datasize -= dataoff;
#ifdef POWERPC_LE_PE
- if (rel_section != 0 && bfd_section_size (abfd, rel_section) != 0)
+ if (rel_section != 0 && rel_section->size != 0)
{
/* The toc address can be found by taking the starting address,
which on the PPC locates a function descriptor. The
@@ -1165,16 +1166,15 @@ pe_print_idata (abfd, vfile)
bfd_vma loadable_toc_address;
bfd_vma toc_address;
bfd_vma start_address;
- bfd_byte *data = 0;
+ bfd_byte *data;
int offset;
- amt = bfd_section_size (abfd, rel_section);
- data = (bfd_byte *) bfd_malloc (amt);
- if (data == NULL && amt != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, rel_section, (PTR) data, (bfd_vma) 0,
- amt);
+ if (!bfd_malloc_and_get_section (abfd, rel_section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
offset = abfd->start_address - rel_section->vma;
@@ -1188,6 +1188,8 @@ pe_print_idata (abfd, vfile)
fprintf (file,
_("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"),
start_address, loadable_toc_address, toc_address);
+ if (data != NULL)
+ free (data);
}
else
{
@@ -1204,14 +1206,13 @@ pe_print_idata (abfd, vfile)
vma: Hint Time Forward DLL First\n\
Table Stamp Chain Name Thunk\n"));
- amt = dataoff + datasize;
- data = (bfd_byte *) bfd_malloc (amt);
- if (data == NULL)
- return FALSE;
-
/* Read the whole section. Some of the fields might be before dataoff. */
- if (! bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0, amt))
- return FALSE;
+ if (!bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
adj = section->vma - extra->ImageBase;
@@ -1278,7 +1279,7 @@ pe_print_idata (abfd, vfile)
ft_section != NULL;
ft_section = ft_section->next)
{
- ft_datasize = bfd_section_size (abfd, ft_section);
+ ft_datasize = ft_section->size;
if (ft_addr >= ft_section->vma
&& ft_addr < ft_section->vma + ft_datasize)
break;
@@ -1408,7 +1409,7 @@ pe_print_edata (abfd, vfile)
return TRUE;
addr = section->vma;
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (datasize == 0)
return TRUE;
}
@@ -1418,7 +1419,7 @@ pe_print_edata (abfd, vfile)
for (section = abfd->sections; section != NULL; section = section->next)
{
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (addr >= section->vma && addr < section->vma + datasize)
break;
@@ -1629,16 +1630,16 @@ pe_print_pdata (abfd, vfile)
\t\tAddress Address Handler Data Address Mask\n"));
#endif
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (datasize == 0)
return TRUE;
- data = (bfd_byte *) bfd_malloc (datasize);
- if (data == NULL && datasize != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
- datasize);
+ if (!bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
start = 0;
@@ -1748,23 +1749,23 @@ pe_print_reloc (abfd, vfile)
if (section == NULL)
return TRUE;
- if (bfd_section_size (abfd, section) == 0)
+ if (section->size == 0)
return TRUE;
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
- datasize = bfd_section_size (abfd, section);
- data = (bfd_byte *) bfd_malloc (datasize);
- if (data == NULL && datasize != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
- datasize);
+ datasize = section->size;
+ if (!bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
start = 0;
- stop = bfd_section_size (abfd, section);
+ stop = section->size;
for (i = start; i < stop;)
{
@@ -1838,16 +1839,17 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags);
#undef PF
#define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); }
- PF (F_RELFLG, "relocations stripped");
- PF (F_EXEC, "executable");
- PF (F_LNNO, "line numbers stripped");
- PF (F_LSYMS, "symbols stripped");
- PF (0x80, "little endian");
- PF (F_AR32WR, "32 bit words");
- PF (0x200, "debugging information removed");
- PF (0x1000, "system file");
- PF (F_DLL, "DLL");
- PF (0x8000, "big endian");
+ PF (IMAGE_FILE_RELOCS_STRIPPED, "relocations stripped");
+ PF (IMAGE_FILE_EXECUTABLE_IMAGE, "executable");
+ PF (IMAGE_FILE_LINE_NUMS_STRIPPED, "line numbers stripped");
+ PF (IMAGE_FILE_LOCAL_SYMS_STRIPPED, "symbols stripped");
+ PF (IMAGE_FILE_LARGE_ADDRESS_AWARE, "large address aware");
+ PF (IMAGE_FILE_BYTES_REVERSED_LO, "little endian");
+ PF (IMAGE_FILE_32BIT_MACHINE, "32 bit words");
+ PF (IMAGE_FILE_DEBUG_STRIPPED, "debugging information removed");
+ PF (IMAGE_FILE_SYSTEM, "system file");
+ PF (IMAGE_FILE_DLL, "DLL");
+ PF (IMAGE_FILE_BYTES_REVERSED_HI, "big endian");
#undef PF
/* ctime implies '\n'. */
diff --git a/bfd/pef.c b/bfd/pef.c
index 7d758cf57d2..b52ae65a0a1 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -1,5 +1,5 @@
/* PEF support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -52,7 +52,9 @@
#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_is_group_section bfd_generic_is_group_section
#define bfd_pef_bfd_discard_group bfd_generic_discard_group
+#define bfd_pef_section_already_linked _bfd_generic_section_already_linked
#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
@@ -329,7 +331,7 @@ bfd_pef_make_bfd_section (abfd, section)
bfdsec->vma = section->default_address + section->container_offset;
bfdsec->lma = section->default_address + section->container_offset;
- bfdsec->_raw_size = section->container_length;
+ bfdsec->size = section->container_length;
bfdsec->filepos = section->container_offset;
bfdsec->alignment_power = section->alignment;
@@ -471,7 +473,7 @@ bfd_pef_print_loader_section (abfd, file)
if (loadersec == NULL)
return -1;
- loaderlen = bfd_section_size (abfd, loadersec);
+ loaderlen = loadersec->size;
loaderbuf = (unsigned char *) bfd_malloc (loaderlen);
if (bfd_seek (abfd, loadersec->filepos, SEEK_SET) < 0)
{
@@ -516,7 +518,7 @@ bfd_pef_scan_start_address (abfd)
if (loadersec == NULL)
goto end;
- loaderlen = bfd_section_size (abfd, loadersec);
+ loaderlen = loadersec->size;
loaderbuf = (unsigned char *) bfd_malloc (loaderlen);
if (bfd_seek (abfd, loadersec->filepos, SEEK_SET) < 0)
goto error;
@@ -959,7 +961,7 @@ static long bfd_pef_parse_symbols (abfd, csym)
codesec = bfd_get_section_by_name (abfd, "code");
if (codesec != NULL)
{
- codelen = bfd_section_size (abfd, codesec);
+ codelen = codesec->size;
codebuf = (unsigned char *) bfd_malloc (codelen);
if (bfd_seek (abfd, codesec->filepos, SEEK_SET) < 0)
goto end;
@@ -970,7 +972,7 @@ static long bfd_pef_parse_symbols (abfd, csym)
loadersec = bfd_get_section_by_name (abfd, "loader");
if (loadersec != NULL)
{
- loaderlen = bfd_section_size (abfd, loadersec);
+ loaderlen = loadersec->size;
loaderbuf = (unsigned char *) bfd_malloc (loaderlen);
if (bfd_seek (abfd, loadersec->filepos, SEEK_SET) < 0)
goto end;
diff --git a/bfd/pei-i386.c b/bfd/pei-i386.c
index 63a63a84839..4a59f143ad0 100644
--- a/bfd/pei-i386.c
+++ b/bfd/pei-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 PE IMAGE COFF files.
- Copyright 1995, 1996, 1999, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2002, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,13 +20,14 @@
#include "bfd.h"
#include "sysdep.h"
-#define TARGET_SYM i386pei_vec
-#define TARGET_NAME "pei-i386"
+#define TARGET_SYM i386pei_vec
+#define TARGET_NAME "pei-i386"
#define COFF_IMAGE_WITH_PE
#define COFF_WITH_PE
-#define PCRELOFFSET TRUE
-#define TARGET_UNDERSCORE '_'
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
#define COFF_LONG_SECTION_NAMES
+#define COFF_SUPPORT_GNU_LINKONCE
#define COFF_LONG_FILENAMES
#define COFF_SECTION_ALIGNMENT_ENTRIES \
@@ -39,6 +40,10 @@
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
#include "coff-i386.c"
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 41445e592c3..ab940f76850 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI, for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@@ -784,13 +784,13 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_CONST:
/* XXX code yet to be written. */
- _bfd_error_handler (_("%s: Unhandled import type; %x"),
- bfd_archive_filename (abfd), import_type);
+ _bfd_error_handler (_("%B: Unhandled import type; %x"),
+ abfd, import_type);
return FALSE;
default:
- _bfd_error_handler (_("%s: Unrecognised import type; %x"),
- bfd_archive_filename (abfd), import_type);
+ _bfd_error_handler (_("%B: Unrecognised import type; %x"),
+ abfd, import_type);
return FALSE;
}
@@ -803,8 +803,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
break;
default:
- _bfd_error_handler (_("%s: Unrecognised import name type; %x"),
- bfd_archive_filename (abfd), import_name_type);
+ _bfd_error_handler (_("%B: Unrecognised import name type; %x"),
+ abfd, import_name_type);
return FALSE;
}
@@ -1190,9 +1190,9 @@ pe_ILF_object_p (bfd * abfd)
/* We no longer support PowerPC. */
default:
_bfd_error_handler
- (
-_("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
- bfd_archive_filename (abfd), machine);
+ (_("%B: Unrecognised machine type (0x%x)"
+ " in Import Library Format archive"),
+ abfd, machine);
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1202,9 +1202,9 @@ _("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
if (magic == 0)
{
_bfd_error_handler
- (
-_("%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"),
- bfd_archive_filename (abfd), machine);
+ (_("%B: Recognised but unhandled machine type (0x%x)"
+ " in Import Library Format archive"),
+ abfd, machine);
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -1220,8 +1220,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
if (size == 0)
{
_bfd_error_handler
- (_("%s: size field is zero in Import Library Format header"),
- bfd_archive_filename (abfd));
+ (_("%B: size field is zero in Import Library Format header"), abfd);
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1251,8 +1250,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
if (ptr[size - 1] != 0 || ((unsigned long) (source_dll - ptr) >= size))
{
_bfd_error_handler
- (_("%s: string not null terminated in ILF object file."),
- bfd_archive_filename (abfd));
+ (_("%B: string not null terminated in ILF object file."), abfd);
bfd_set_error (bfd_error_malformed_archive);
bfd_release (abfd, ptr);
return NULL;
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index d29593d795b..a48688e171e 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -232,6 +232,7 @@ m68klinux.c
m68klynx.c
m68knetbsd.c
m88kmach3.c
+m88kopenbsd.c
mach-o.c
mach-o.h
merge.c
diff --git a/bfd/po/fr.po b/bfd/po/fr.po
index 831daffae38..c5d65f62c59 100644
--- a/bfd/po/fr.po
+++ b/bfd/po/fr.po
@@ -1,17 +1,18 @@
# Messages français pour GNU concernant bfd.
-# Copyright © 1996 Free Software Foundation, Inc.
+# Copyright © 2004 Free Software Foundation, Inc.
# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
#
msgid ""
msgstr ""
"Project-Id-Version: GNU bfd 2.14rel030712\n"
"POT-Creation-Date: 2003-07-11 13:53+0930\n"
-"PO-Revision-Date: 2003-08-05 08:00-0500\n"
+"PO-Revision-Date: 2004-05-10 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: aout-adobe.c:204
#, c-format
diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c
index 05fb7de7429..49f81402149 100644
--- a/bfd/ppcboot.c
+++ b/bfd/ppcboot.c
@@ -1,5 +1,5 @@
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
@@ -210,7 +210,7 @@ ppcboot_object_p (abfd)
return NULL;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | SEC_HAS_CONTENTS;
sec->vma = 0;
- sec->_raw_size = statbuf.st_size - sizeof (ppcboot_hdr_t);
+ sec->size = statbuf.st_size - sizeof (ppcboot_hdr_t);
sec->filepos = sizeof (ppcboot_hdr_t);
ppcboot_mkobject (abfd);
@@ -311,7 +311,7 @@ ppcboot_canonicalize_symtab (abfd, alocation)
/* End symbol. */
syms[1].the_bfd = abfd;
syms[1].name = mangle_name (abfd, "end");
- syms[1].value = sec->_raw_size;
+ syms[1].value = sec->size;
syms[1].flags = BSF_GLOBAL;
syms[1].section = sec;
syms[1].udata.p = NULL;
@@ -319,7 +319,7 @@ ppcboot_canonicalize_symtab (abfd, alocation)
/* Size symbol. */
syms[2].the_bfd = abfd;
syms[2].name = mangle_name (abfd, "size");
- syms[2].value = sec->_raw_size;
+ syms[2].value = sec->size;
syms[2].flags = BSF_GLOBAL;
syms[2].section = bfd_abs_section_ptr;
syms[2].udata.p = NULL;
@@ -469,7 +469,10 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
#define ppcboot_bfd_relax_section bfd_generic_relax_section
#define ppcboot_bfd_gc_sections bfd_generic_gc_sections
#define ppcboot_bfd_merge_sections bfd_generic_merge_sections
+#define ppcboot_bfd_is_group_section bfd_generic_is_group_section
#define ppcboot_bfd_discard_group bfd_generic_discard_group
+#define ppcboot_section_already_linked \
+ _bfd_generic_section_already_linked
#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
@@ -483,6 +486,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
#define ppcboot_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define ppcboot_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#define ppcboot_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#define ppcboot_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define ppcboot_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define ppcboot_bfd_print_private_bfd_dat ppcboot_bfd_print_private_bfd_data
diff --git a/bfd/ptrace-core.c b/bfd/ptrace-core.c
index 15b6777e121..c22864a742f 100644
--- a/bfd/ptrace-core.c
+++ b/bfd/ptrace-core.c
@@ -108,9 +108,9 @@ ptrace_unix_core_file_p (abfd)
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_datasec (abfd)->_raw_size = u.pt_dsize;
- core_stacksec (abfd)->_raw_size = u.pt_ssize;
- core_regsec (abfd)->_raw_size = sizeof (u);
+ core_datasec (abfd)->size = u.pt_dsize;
+ core_stacksec (abfd)->size = u.pt_ssize;
+ core_regsec (abfd)->size = sizeof (u);
core_datasec (abfd)->vma = u.pt_o_data_start;
core_stacksec (abfd)->vma = USRSTACK - u.pt_ssize;
diff --git a/bfd/reloc.c b/bfd/reloc.c
index cc4f6a7c28f..1c95d7ec44b 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -623,8 +623,7 @@ bfd_perform_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > (input_section->_cooked_size
- / bfd_octets_per_byte (abfd)))
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1013,8 +1012,7 @@ bfd_install_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > (input_section->_cooked_size
- / bfd_octets_per_byte (abfd)))
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1350,7 +1348,7 @@ _bfd_final_link_relocate (reloc_howto_type *howto,
bfd_vma relocation;
/* Sanity check the address. */
- if (address > input_section->_raw_size)
+ if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* This function assumes that we are dealing with a basic relocation
@@ -1647,6 +1645,11 @@ the section containing the relocation. It depends on the specific target.
The 24-bit relocation is used in some Intel 960 configurations.
ENUM
+ BFD_RELOC_32_SECREL
+ENUMDOC
+ Section relative relocations. Some targets need this for DWARF2.
+
+ENUM
BFD_RELOC_32_GOT_PCREL
ENUMX
BFD_RELOC_16_GOT_PCREL
@@ -2061,14 +2064,6 @@ ENUM
BFD_RELOC_LO16
ENUMDOC
Low 16 bits.
-ENUM
- BFD_RELOC_PCREL_HI16_S
-ENUMDOC
- Like BFD_RELOC_HI16_S, but PC relative.
-ENUM
- BFD_RELOC_PCREL_LO16
-ENUMDOC
- Like BFD_RELOC_LO16, but PC relative.
ENUM
BFD_RELOC_MIPS_LITERAL
@@ -2613,12 +2608,41 @@ ENUMX
ENUMDOC
These relocs are only used within the ARM assembler. They are not
(at present) written to any object files.
+ENUM
+ BFD_RELOC_ARM_TARGET1
+ENUMDOC
+ Pc-relative or absolute relocation depending on target. Used for
+ entries in .init_array sections.
+ENUM
+ BFD_RELOC_ARM_ROSEGREL32
+ENUMDOC
+ Read-only segment base relative address.
+ENUM
+ BFD_RELOC_ARM_SBREL32
+ENUMDOC
+ Data segment base relative address.
ENUM
BFD_RELOC_SH_PCDISP8BY2
ENUMX
BFD_RELOC_SH_PCDISP12BY2
ENUMX
+ BFD_RELOC_SH_IMM3
+ENUMX
+ BFD_RELOC_SH_IMM3U
+ENUMX
+ BFD_RELOC_SH_DISP12
+ENUMX
+ BFD_RELOC_SH_DISP12BY2
+ENUMX
+ BFD_RELOC_SH_DISP12BY4
+ENUMX
+ BFD_RELOC_SH_DISP12BY8
+ENUMX
+ BFD_RELOC_SH_DISP20
+ENUMX
+ BFD_RELOC_SH_DISP20BY8
+ENUMX
BFD_RELOC_SH_IMM4
ENUMX
BFD_RELOC_SH_IMM4BY2
@@ -2954,6 +2978,12 @@ ENUMX
ENUMX
BFD_RELOC_M32R_GOTOFF
ENUMX
+ BFD_RELOC_M32R_GOTOFF_HI_ULO
+ENUMX
+ BFD_RELOC_M32R_GOTOFF_HI_SLO
+ENUMX
+ BFD_RELOC_M32R_GOTOFF_LO
+ENUMX
BFD_RELOC_M32R_GOTPC24
ENUMX
BFD_RELOC_M32R_GOT16_HI_ULO
@@ -3853,6 +3883,49 @@ ENUMX
ENUMDOC
NS CR16C Relocations.
+ENUM
+ BFD_RELOC_CRX_REL4
+ENUMX
+ BFD_RELOC_CRX_REL8
+ENUMX
+ BFD_RELOC_CRX_REL8_CMP
+ENUMX
+ BFD_RELOC_CRX_REL16
+ENUMX
+ BFD_RELOC_CRX_REL24
+ENUMX
+ BFD_RELOC_CRX_REL32
+ENUMX
+ BFD_RELOC_CRX_REGREL12
+ENUMX
+ BFD_RELOC_CRX_REGREL22
+ENUMX
+ BFD_RELOC_CRX_REGREL28
+ENUMX
+ BFD_RELOC_CRX_REGREL32
+ENUMX
+ BFD_RELOC_CRX_ABS16
+ENUMX
+ BFD_RELOC_CRX_ABS32
+ENUMX
+ BFD_RELOC_CRX_NUM8
+ENUMX
+ BFD_RELOC_CRX_NUM16
+ENUMX
+ BFD_RELOC_CRX_NUM32
+ENUMX
+ BFD_RELOC_CRX_IMM16
+ENUMX
+ BFD_RELOC_CRX_IMM32
+ENUMX
+ BFD_RELOC_CRX_SWITCH8
+ENUMX
+ BFD_RELOC_CRX_SWITCH16
+ENUMX
+ BFD_RELOC_CRX_SWITCH32
+ENUMDOC
+ NS CRX Relocations.
+
ENUM
BFD_RELOC_CRIS_BDISP8
ENUMX
@@ -4022,6 +4095,10 @@ ENUMX
BFD_RELOC_MSP430_16_PCREL_BYTE
ENUMX
BFD_RELOC_MSP430_16_BYTE
+ENUMX
+ BFD_RELOC_MSP430_2X_PCREL
+ENUMX
+ BFD_RELOC_MSP430_RL_PCREL
ENUMDOC
msp430 specific relocation codes
@@ -4179,8 +4256,7 @@ SYNOPSIS
DESCRIPTION
Provides default handling for relaxing for back ends which
- don't do relaxing -- i.e., does nothing except make sure that the
- final size of the section is set.
+ don't do relaxing.
*/
bfd_boolean
@@ -4189,11 +4265,6 @@ bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
bfd_boolean *again)
{
- /* We're not relaxing the section, so just copy the size info if it's
- zero. Someone else, like bfd_merge_sections, might have set it, so
- don't overwrite a non-zero value. */
- if (section->_cooked_size == 0)
- section->_cooked_size = section->_raw_size;
*again = FALSE;
return TRUE;
}
@@ -4272,6 +4343,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
+ bfd_size_type sz;
if (reloc_size < 0)
goto error_return;
@@ -4281,22 +4353,10 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
goto error_return;
/* Read in the section. */
- if (!bfd_get_section_contents (input_bfd,
- input_section,
- data,
- 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* Don't set input_section->_cooked_size here. The caller has set
- _cooked_size or called bfd_relax_section, which sets _cooked_size.
- Despite using this generic relocation function, some targets perform
- target-specific relaxation or string merging, which happens before
- this function is called. We do not want to clobber the _cooked_size
- they computed. */
-
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
diff --git a/bfd/reloc16.c b/bfd/reloc16.c
index 720e2d6abc2..04e6a21dc6b 100644
--- a/bfd/reloc16.c
+++ b/bfd/reloc16.c
@@ -1,6 +1,6 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -230,7 +230,8 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again)
free ((char *) shrinks);
}
- input_section->_cooked_size -= shrink;
+ input_section->rawsize = input_section->size;
+ input_section->size -= shrink;
free ((char *) reloc_vector);
return TRUE;
}
@@ -255,6 +256,7 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector;
long reloc_count;
+ bfd_size_type sz;
if (reloc_size < 0)
return NULL;
@@ -267,11 +269,8 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
symbols);
/* Read in the section. */
- if (!bfd_get_section_contents (input_bfd,
- input_section,
- data,
- (bfd_vma) 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
return NULL;
reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
diff --git a/bfd/riscix.c b/bfd/riscix.c
index 519514e4cf6..f9b5ae2cd89 100644
--- a/bfd/riscix.c
+++ b/bfd/riscix.c
@@ -1,5 +1,5 @@
/* BFD back-end for RISC iX (Acorn, arm) binaries.
- Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
@@ -577,8 +577,8 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
if (! NAME(aout,make_sections) (abfd))
return NULL;
- obj_datasec (abfd)->_raw_size = execp->a_data;
- obj_bsssec (abfd)->_raw_size = execp->a_bss;
+ obj_datasec (abfd)->size = execp->a_data;
+ obj_bsssec (abfd)->size = execp->a_bss;
obj_textsec (abfd)->flags =
(execp->a_trsize != 0
@@ -619,7 +619,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
At some point we should probably break down and stat the file and
declare it executable if (one of) its 'x' bits are on... */
if ((execp->a_entry >= obj_textsec(abfd)->vma) &&
- (execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size))
+ (execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->size))
abfd->flags |= EXEC_P;
#endif /* MACH */
if (result)
diff --git a/bfd/rs6000-core.c b/bfd/rs6000-core.c
index 3fa0975dc31..98cae9a15c0 100644
--- a/bfd/rs6000-core.c
+++ b/bfd/rs6000-core.c
@@ -1,6 +1,6 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002
+ 2001, 2002, 2004
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
@@ -277,11 +277,11 @@ read_hdr (bfd *abfd, CoreHdr *core)
}
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -292,7 +292,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 8;
diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c
index 5c34ff1b556..33592b2d316 100644
--- a/bfd/sco5-core.c
+++ b/bfd/sco5-core.c
@@ -52,11 +52,11 @@ bfd_boolean sco5_core_file_matches_executable_p
static void swap_abort PARAMS ((void));
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -66,7 +66,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
if (!asect)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 2;
@@ -123,13 +123,12 @@ sco5_core_file_p (abfd)
char *secname;
flagword flags;
- /* Read coreoffsets region at end of core (see core(FP)) */
+ /* Read coreoffsets region at end of core (see core(FP)). */
{
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL)
- return NULL;
+
if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
diff --git a/bfd/section.c b/bfd/section.c
index fce8e1eab3d..b368c2aa842 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1,6 +1,6 @@
/* Object file "section" support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -149,23 +149,6 @@ SUBSECTION
CODE_FRAGMENT
.
-.{* This structure is used for a comdat section, as in PE. A comdat
-. section is associated with a particular symbol. When the linker
-. sees a comdat section, it keeps only one of the sections with a
-. given name and associated with a given symbol. *}
-.
-.struct bfd_comdat_info
-.{
-. {* The name of the symbol associated with a comdat section. *}
-. const char *name;
-.
-. {* The local symbol table index of the symbol associated with a
-. comdat section. This is only meaningful to the object file format
-. specific code; it is not an index into the list returned by
-. bfd_canonicalize_symtab. *}
-. long symbol;
-.};
-.
.typedef struct bfd_section
.{
. {* The name of the section; the name isn't a copy, the pointer is
@@ -364,9 +347,6 @@ CODE_FRAGMENT
. {* See the vma field. *}
. unsigned int user_set_vma : 1;
.
-. {* Whether relocations have been processed. *}
-. unsigned int reloc_done : 1;
-.
. {* A mark flag used by some of the linker backends. *}
. unsigned int linker_mark : 1;
.
@@ -394,21 +374,18 @@ CODE_FRAGMENT
. unsigned int use_rela_p:1;
.
. {* Bits used by various backends. *}
-. unsigned int has_tls_reloc:1;
.
-. {* Nonzero if this section needs the relax finalize pass. *}
-. unsigned int need_finalize_relax:1;
+. {* Nonzero if this section has TLS related relocations. *}
+. unsigned int has_tls_reloc:1;
.
. {* Nonzero if this section has a gp reloc. *}
. unsigned int has_gp_reloc:1;
.
-. {* Unused bits. *}
-. unsigned int flag13:1;
-. unsigned int flag14:1;
-. unsigned int flag15:1;
-. unsigned int flag16:4;
-. unsigned int flag20:4;
-. unsigned int flag24:8;
+. {* Nonzero if this section needs the relax finalize pass. *}
+. unsigned int need_finalize_relax:1;
+.
+. {* Whether relocations have been processed. *}
+. unsigned int reloc_done : 1;
.
. {* End of internal packed boolean fields. *}
.
@@ -427,13 +404,18 @@ CODE_FRAGMENT
.
. {* The size of the section in octets, as it will be output.
. Contains a value even if the section has no contents (e.g., the
-. size of <<.bss>>). This will be filled in after relocation. *}
-. bfd_size_type _cooked_size;
-.
-. {* The original size on disk of the section, in octets. Normally this
-. value is the same as the size, but if some relaxing has
-. been done, then this value will be bigger. *}
-. bfd_size_type _raw_size;
+. size of <<.bss>>). *}
+. bfd_size_type size;
+.
+. {* For input sections, the original size on disk of the section, in
+. octets. This field is used by the linker relaxation code. It is
+. currently only set for sections where the linker relaxation scheme
+. doesn't cache altered section and reloc contents (stabs, eh_frame,
+. SEC_MERGE, some coff relaxing targets), and thus the original size
+. needs to be kept to read the section multiple times.
+. For output sections, rawsize holds the section size calculated on
+. a previous linker relaxation pass. *}
+. bfd_size_type rawsize;
.
. {* If this section is going to be output, then this value is the
. offset in *bytes* into the output section of the first byte in the
@@ -490,9 +472,6 @@ CODE_FRAGMENT
. {* Entity size for merging purposes. *}
. unsigned int entsize;
.
-. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
-. struct bfd_comdat_info *comdat;
-.
. {* Points to the kept section if this section is a link-once section,
. and is discarded. *}
. struct bfd_section *kept_section;
@@ -557,11 +536,6 @@ CODE_FRAGMENT
.extern const struct bfd_symbol * const bfd_com_symbol;
.extern const struct bfd_symbol * const bfd_und_symbol;
.extern const struct bfd_symbol * const bfd_ind_symbol;
-.#define bfd_get_section_size_before_reloc(section) \
-. ((section)->_raw_size)
-.#define bfd_get_section_size_after_reloc(section) \
-. ((section)->reloc_done ? (section)->_cooked_size \
-. : (abort (), (bfd_size_type) 1))
.
.{* Macros to handle insertion and deletion of a bfd's sections. These
. only handle the list pointers, ie. do not adjust section_count,
@@ -616,25 +590,22 @@ static const asymbol global_syms[] =
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
asection SEC = \
- /* name, id, index, next, flags, user_set_vma, reloc_done, */ \
- { NAME, IDX, 0, NULL, FLAGS, 0, 0, \
+ /* name, id, index, next, flags, user_set_vma, */ \
+ { NAME, IDX, 0, NULL, FLAGS, 0, \
\
/* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, 0, \
\
- /* sec_info_type, use_rela_p, has_tls_reloc, */ \
- 0, 0, 0, \
+ /* sec_info_type, use_rela_p, has_tls_reloc, has_gp_reloc, */ \
+ 0, 0, 0, 0, \
\
- /* need_finalize_relax, has_gp_reloc, */ \
+ /* need_finalize_relax, reloc_done, */ \
0, 0, \
\
- /* flag13, flag14, flag15, flag16, flag20, flag24, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, _cooked_size, _raw_size, */ \
- 0, 0, 0, 0, \
+ /* vma, lma, size, rawsize */ \
+ 0, 0, 0, 0, \
\
- /* output_offset, output_section, alignment_power, */ \
+ /* output_offset, output_section, alignment_power, */ \
0, (struct bfd_section *) &SEC, 0, \
\
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
@@ -643,8 +614,8 @@ static const asymbol global_syms[] =
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \
\
- /* entsize, comdat, kept_section, moving_line_filepos, */ \
- 0, NULL, NULL, 0, \
+ /* entsize, kept_section, moving_line_filepos, */ \
+ 0, NULL, 0, \
\
/* target_index, used_by_bfd, constructor_chain, owner, */ \
0, NULL, NULL, NULL, \
@@ -801,6 +772,57 @@ bfd_get_section_by_name (bfd *abfd, const char *name)
/*
FUNCTION
+ bfd_get_section_by_name_if
+
+SYNOPSIS
+ asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
+DESCRIPTION
+ Call the provided function @var{func} for each section
+ attached to the BFD @var{abfd} whose name matches @var{name},
+ passing @var{obj} as an argument. The function will be called
+ as if by
+
+| func (abfd, the_section, obj);
+
+ It returns the first section for which @var{func} returns true,
+ otherwise <<NULL>>.
+
+*/
+
+asection *
+bfd_get_section_by_name_if (bfd *abfd, const char *name,
+ bfd_boolean (*operation) (bfd *,
+ asection *,
+ void *),
+ void *user_storage)
+{
+ struct section_hash_entry *sh;
+ unsigned long hash;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
+ if (sh == NULL)
+ return NULL;
+
+ hash = sh->root.hash;
+ do
+ {
+ if ((*operation) (abfd, &sh->section, user_storage))
+ return &sh->section;
+ sh = (struct section_hash_entry *) sh->root.next;
+ }
+ while (sh != NULL && sh->root.hash == hash
+ && strcmp (sh->root.string, name) == 0);
+
+ return NULL;
+}
+
+/*
+FUNCTION
bfd_get_unique_section_name
SYNOPSIS
@@ -945,13 +967,19 @@ bfd_make_section_anyway (bfd *abfd, const char *name)
newsect = &sh->section;
if (newsect->name != NULL)
{
- /* We are making a section of the same name. It can't go in
- section_htab without generating a unique section name and
- that would be pointless; We don't need to traverse the
- hash table. */
- newsect = bfd_zalloc (abfd, sizeof (asection));
- if (newsect == NULL)
+ /* We are making a section of the same name. Put it in the
+ section hash table. Even though we can't find it directly by a
+ hash lookup, we'll be able to find the section by traversing
+ sh->root.next quicker than looking at all the bfd sections. */
+ struct section_hash_entry *new_sh;
+ new_sh = (struct section_hash_entry *)
+ bfd_section_hash_newfunc (NULL, &abfd->section_htab, name);
+ if (new_sh == NULL)
return NULL;
+
+ new_sh->root = sh->root;
+ sh->root.next = &new_sh->root;
+ newsect = &new_sh->section;
}
newsect->name = name;
@@ -1090,6 +1118,41 @@ bfd_map_over_sections (bfd *abfd,
/*
FUNCTION
+ bfd_sections_find_if
+
+SYNOPSIS
+ asection *bfd_sections_find_if
+ (bfd *abfd,
+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
+DESCRIPTION
+ Call the provided function @var{operation} for each section
+ attached to the BFD @var{abfd}, passing @var{obj} as an
+ argument. The function will be called as if by
+
+| operation (abfd, the_section, obj);
+
+ It returns the first section for which @var{operation} returns true.
+
+*/
+
+asection *
+bfd_sections_find_if (bfd *abfd,
+ bfd_boolean (*operation) (bfd *, asection *, void *),
+ void *user_storage)
+{
+ asection *sect;
+
+ for (sect = abfd->sections; sect != NULL; sect = sect->next)
+ if ((*operation) (abfd, sect, user_storage))
+ break;
+
+ return sect;
+}
+
+/*
+FUNCTION
bfd_set_section_size
SYNOPSIS
@@ -1118,9 +1181,7 @@ bfd_set_section_size (bfd *abfd, sec_ptr ptr, bfd_size_type val)
return FALSE;
}
- ptr->_cooked_size = val;
- ptr->_raw_size = val;
-
+ ptr->size = val;
return TRUE;
}
@@ -1151,11 +1212,6 @@ DESCRIPTION
*/
-#define bfd_get_section_size_now(abfd, sec) \
- (sec->reloc_done \
- ? bfd_get_section_size_after_reloc (sec) \
- : bfd_get_section_size_before_reloc (sec))
-
bfd_boolean
bfd_set_section_contents (bfd *abfd,
sec_ptr section,
@@ -1171,7 +1227,7 @@ bfd_set_section_contents (bfd *abfd,
return FALSE;
}
- sz = bfd_get_section_size_now (abfd, section);
+ sz = section->size;
if ((bfd_size_type) offset > sz
|| count > sz
|| offset + count > sz
@@ -1251,9 +1307,7 @@ bfd_get_section_contents (bfd *abfd,
return TRUE;
}
- /* Even if reloc_done is TRUE, this function reads unrelocated
- contents, so we want the raw size. */
- sz = section->_raw_size;
+ sz = section->rawsize ? section->rawsize : section->size;
if ((bfd_size_type) offset > sz
|| count > sz
|| offset + count > sz
@@ -1285,6 +1339,36 @@ bfd_get_section_contents (bfd *abfd,
/*
FUNCTION
+ bfd_malloc_and_get_section
+
+SYNOPSIS
+ bfd_boolean bfd_malloc_and_get_section
+ (bfd *abfd, asection *section, bfd_byte **buf);
+
+DESCRIPTION
+ Read all data from @var{section} in BFD @var{abfd}
+ into a buffer, *@var{buf}, malloc'd by this function.
+*/
+
+bfd_boolean
+bfd_malloc_and_get_section (bfd *abfd, sec_ptr sec, bfd_byte **buf)
+{
+ bfd_size_type sz = sec->rawsize ? sec->rawsize : sec->size;
+ bfd_byte *p = NULL;
+
+ *buf = p;
+ if (sz == 0)
+ return TRUE;
+
+ p = bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size);
+ if (p == NULL)
+ return FALSE;
+ *buf = p;
+
+ return bfd_get_section_contents (abfd, sec, p, 0, sz);
+}
+/*
+FUNCTION
bfd_copy_private_section_data
SYNOPSIS
@@ -1351,6 +1435,24 @@ _bfd_strip_section_from_output (struct bfd_link_info *info, asection *s)
/*
FUNCTION
+ bfd_generic_is_group_section
+
+SYNOPSIS
+ bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
+
+DESCRIPTION
+ Returns TRUE if @var{sec} is a member of a group.
+*/
+
+bfd_boolean
+bfd_generic_is_group_section (bfd *abfd ATTRIBUTE_UNUSED,
+ const asection *sec ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
+/*
+FUNCTION
bfd_generic_discard_group
SYNOPSIS
diff --git a/bfd/simple.c b/bfd/simple.c
index 4b597a4a334..5039911dcfd 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -1,5 +1,5 @@
/* simple.c -- BFD simple client routines
- Copyright 2002, 2003
+ Copyright 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by MontaVista Software, Inc.
@@ -140,42 +140,21 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
bfd_byte *contents, *data;
int storage_needed;
void *saved_offsets;
- bfd_boolean saved_reloc_done = sec->reloc_done;
-
-#undef RETURN
-#define RETURN(x) \
- do \
- { \
- sec->reloc_done = saved_reloc_done; \
- return (x); \
- } \
- while (0)
-
- /* Foul hack to prevent bfd_section_size aborts. The reloc_done flag
- only controls that macro (and the related size macros), selecting
- between _raw_size and _cooked_size. We may be called with relocation
- done or not, so we need to save the done-flag and mark the section as
- not relocated.
-
- Debug sections won't change size while we're only relocating. There
- may be trouble here someday if it tries to run relaxation
- unexpectedly, so make sure. */
- BFD_ASSERT (sec->_raw_size == sec->_cooked_size);
- sec->reloc_done = 0;
if (! (sec->flags & SEC_RELOC))
{
- bfd_size_type size = bfd_section_size (abfd, sec);
+ bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
+ bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size;
if (outbuf == NULL)
- contents = bfd_malloc (size);
+ contents = bfd_malloc (amt);
else
contents = outbuf;
if (contents)
bfd_get_section_contents (abfd, sec, contents, 0, size);
- RETURN (contents);
+ return contents;
}
/* In order to use bfd_get_relocated_section_contents, we need
@@ -197,15 +176,15 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
link_order.next = NULL;
link_order.type = bfd_indirect_link_order;
link_order.offset = 0;
- link_order.size = bfd_section_size (abfd, sec);
+ link_order.size = sec->size;
link_order.u.indirect.section = sec;
data = NULL;
if (outbuf == NULL)
{
- data = bfd_malloc (bfd_section_size (abfd, sec));
+ data = bfd_malloc (sec->size);
if (data == NULL)
- RETURN (NULL);
+ return NULL;
outbuf = data;
}
@@ -224,7 +203,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
{
if (data)
free (data);
- RETURN (NULL);
+ return NULL;
}
bfd_map_over_sections (abfd, simple_save_output_info, saved_offsets);
@@ -267,5 +246,5 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
_bfd_generic_link_hash_table_free (link_info.hash);
- RETURN (contents);
+ return contents;
}
diff --git a/bfd/som.c b/bfd/som.c
index 90662575bbd..c35b344f1d0 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1,6 +1,6 @@
/* bfd back-end for HP PA-RISC SOM objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
@@ -146,6 +146,9 @@ struct som_misc_symbol_info {
unsigned int symbol_value;
unsigned int priv_level;
unsigned int secondary_def;
+ unsigned int is_comdat;
+ unsigned int is_common;
+ unsigned int dup_common;
};
/* Forward declarations. */
@@ -189,12 +192,14 @@ static bfd_boolean som_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
static bfd_boolean som_bfd_copy_private_bfd_data
PARAMS ((bfd *, bfd *));
+#define som_bfd_copy_private_header_data \
+ _bfd_generic_bfd_copy_private_header_data
#define som_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define som_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
static bfd_boolean som_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
static bfd_boolean som_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static bfd_boolean som_get_section_contents
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
static bfd_boolean som_set_arch_mach
@@ -206,7 +211,7 @@ static void som_get_symbol_info
PARAMS ((bfd *, asymbol *, symbol_info *));
static asection * bfd_section_from_som_symbol
PARAMS ((bfd *, struct symbol_dictionary_record *));
-static int log2
+static int exact_log2
PARAMS ((unsigned int));
static bfd_reloc_status_type hppa_som_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
@@ -1428,11 +1433,11 @@ som_reloc_call (abfd, p, subspace_reloc_sizep, bfd_reloc, sym_num, queue)
return p;
}
-/* Return the logarithm of X, base 2, considering X unsigned.
- Abort -1 if X is not a power or two or is zero. */
+/* Return the logarithm of X, base 2, considering X unsigned,
+ if X is a power of 2. Otherwise, returns -1. */
static int
-log2 (x)
+exact_log2 (x)
unsigned int x;
{
int log = 0;
@@ -1589,6 +1594,11 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
final_types[3] = NULL;
*final_type = base_type;
break;
+
+ /* FIXME: These two field selectors are not currently supported. */
+ case e_ltpsel:
+ case e_rtpsel:
+ abort ();
}
switch (base_type)
@@ -1820,10 +1830,13 @@ som_object_setup (abfd, file_hdrp, aux_hdrp, current_offset)
found = 0;
for (section = abfd->sections; section; section = section->next)
{
+ bfd_vma entry;
+
if ((section->flags & SEC_CODE) == 0)
continue;
- if (aux_hdrp->exec_entry >= section->vma
- && aux_hdrp->exec_entry < section->vma + section->_cooked_size)
+ entry = aux_hdrp->exec_entry;
+ if (entry >= section->vma
+ && entry < section->vma + section->size)
found = 1;
}
if (aux_hdrp->exec_entry == 0
@@ -1897,9 +1910,10 @@ setup_sections (abfd, file_hdr, current_offset)
for (space_index = 0; space_index < file_hdr->space_total; space_index++)
{
struct space_dictionary_record space;
- struct subspace_dictionary_record subspace, save_subspace;
- int subspace_index;
+ struct som_subspace_dictionary_record subspace, save_subspace;
+ unsigned int subspace_index;
asection *space_asect;
+ bfd_size_type space_size = 0;
char *newname;
/* Read the space dictionary element. */
@@ -1959,13 +1973,13 @@ setup_sections (abfd, file_hdr, current_offset)
record. */
space_asect->vma = subspace.subspace_start;
space_asect->filepos = subspace.file_loc_init_value + current_offset;
- space_asect->alignment_power = log2 (subspace.alignment);
+ space_asect->alignment_power = exact_log2 (subspace.alignment);
if (space_asect->alignment_power == (unsigned) -1)
goto error_return;
/* Initialize save_subspace so we can reliably determine if this
loop placed any useful values into it. */
- memset (&save_subspace, 0, sizeof (struct subspace_dictionary_record));
+ memset (&save_subspace, 0, sizeof (save_subspace));
/* Loop over the rest of the subspaces, building up more sections. */
for (subspace_index = 0; subspace_index < space.subspace_quantity;
@@ -1996,7 +2010,10 @@ setup_sections (abfd, file_hdr, current_offset)
if (! bfd_som_set_subsection_attributes (subspace_asect, space_asect,
subspace.access_control_bits,
subspace.sort_key,
- subspace.quadrant))
+ subspace.quadrant,
+ subspace.is_comdat,
+ subspace.is_common,
+ subspace.dup_common))
goto error_return;
/* Keep an easy mapping between subspaces and sections.
@@ -2042,9 +2059,10 @@ setup_sections (abfd, file_hdr, current_offset)
break;
}
- if (subspace.dup_common || subspace.is_common)
- subspace_asect->flags |= SEC_IS_COMMON;
- else if (subspace.subspace_length > 0)
+ if (subspace.is_comdat || subspace.is_common || subspace.dup_common)
+ subspace_asect->flags |= SEC_LINK_ONCE;
+
+ if (subspace.subspace_length > 0)
subspace_asect->flags |= SEC_HAS_CONTENTS;
if (subspace.is_loadable)
@@ -2081,32 +2099,40 @@ setup_sections (abfd, file_hdr, current_offset)
save_subspace = subspace;
subspace_asect->vma = subspace.subspace_start;
- subspace_asect->_cooked_size = subspace.subspace_length;
- subspace_asect->_raw_size = subspace.subspace_length;
+ subspace_asect->size = subspace.subspace_length;
subspace_asect->filepos = (subspace.file_loc_init_value
+ current_offset);
- subspace_asect->alignment_power = log2 (subspace.alignment);
+ subspace_asect->alignment_power = exact_log2 (subspace.alignment);
if (subspace_asect->alignment_power == (unsigned) -1)
goto error_return;
+
+ /* Keep track of the accumulated sizes of the sections. */
+ space_size += subspace.subspace_length;
}
/* This can happen for a .o which defines symbols in otherwise
empty subspaces. */
if (!save_subspace.file_loc_init_value)
- {
- space_asect->_cooked_size = 0;
- space_asect->_raw_size = 0;
- }
+ space_asect->size = 0;
else
{
- /* Setup the sizes for the space section based upon the info in the
- last subspace of the space. */
- space_asect->_cooked_size = (save_subspace.subspace_start
- - space_asect->vma
- + save_subspace.subspace_length);
- space_asect->_raw_size = (save_subspace.file_loc_init_value
- - space_asect->filepos
- + save_subspace.initialization_length);
+ if (file_hdr->a_magic != RELOC_MAGIC)
+ {
+ /* Setup the size for the space section based upon the info
+ in the last subspace of the space. */
+ space_asect->size = (save_subspace.subspace_start
+ - space_asect->vma
+ + save_subspace.subspace_length);
+ }
+ else
+ {
+ /* The subspace_start field is not initialised in relocatable
+ only objects, so it cannot be used for length calculations.
+ Instead we use the space_size value which we have been
+ accumulating. This isn't an accurate estimate since it
+ ignores alignment and ordering issues. */
+ space_asect->size = space_size;
+ }
}
}
/* Now that we've read in all the subspace records, we need to assign
@@ -2394,21 +2420,15 @@ som_prep_headers (abfd)
else
{
/* Allocate space for the subspace dictionary. */
- amt = sizeof (struct subspace_dictionary_record);
+ amt = sizeof (struct som_subspace_dictionary_record);
som_section_data (section)->subspace_dict =
- (struct subspace_dictionary_record *) bfd_zalloc (abfd, amt);
+ (struct som_subspace_dictionary_record *) bfd_zalloc (abfd, amt);
if (som_section_data (section)->subspace_dict == NULL)
return FALSE;
/* Set subspace attributes. Basic stuff is done here, additional
attributes are filled in later as more information becomes
available. */
- if (section->flags & SEC_IS_COMMON)
- {
- som_section_data (section)->subspace_dict->dup_common = 1;
- som_section_data (section)->subspace_dict->is_common = 1;
- }
-
if (section->flags & SEC_ALLOC)
som_section_data (section)->subspace_dict->is_loadable = 1;
@@ -2418,9 +2438,9 @@ som_prep_headers (abfd)
som_section_data (section)->subspace_dict->subspace_start =
section->vma;
som_section_data (section)->subspace_dict->subspace_length =
- bfd_section_size (abfd, section);
+ section->size;
som_section_data (section)->subspace_dict->initialization_length =
- bfd_section_size (abfd, section);
+ section->size;
som_section_data (section)->subspace_dict->alignment =
1 << section->alignment_power;
@@ -2431,6 +2451,12 @@ som_prep_headers (abfd)
som_section_data (section)->copy_data->access_control_bits;
som_section_data (section)->subspace_dict->quadrant =
som_section_data (section)->copy_data->quadrant;
+ som_section_data (section)->subspace_dict->is_comdat =
+ som_section_data (section)->copy_data->is_comdat;
+ som_section_data (section)->subspace_dict->is_common =
+ som_section_data (section)->copy_data->is_common;
+ som_section_data (section)->subspace_dict->dup_common =
+ som_section_data (section)->copy_data->dup_common;
}
}
return TRUE;
@@ -2725,7 +2751,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
int reloc_offset;
unsigned int current_rounding_mode;
#ifndef NO_PCREL_MODES
- int current_call_mode;
+ unsigned int current_call_mode;
#endif
/* Find a subspace of this space. */
@@ -3052,8 +3078,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
/* Last BFD relocation for a subspace has been processed.
Map the rest of the subspace with R_NO_RELOCATION fixups. */
- p = som_reloc_skip (abfd, (bfd_section_size (abfd, subsection)
- - reloc_offset),
+ p = som_reloc_skip (abfd, subsection->size - reloc_offset,
p, &subspace_reloc_size, reloc_queue);
/* Scribble out the relocations. */
@@ -3466,7 +3491,8 @@ som_begin_writing (abfd)
num_subspaces = som_count_subspaces (abfd);
obj_som_file_hdr (abfd)->subspace_location = current_offset;
obj_som_file_hdr (abfd)->subspace_total = num_subspaces;
- current_offset += num_subspaces * sizeof (struct subspace_dictionary_record);
+ current_offset
+ += num_subspaces * sizeof (struct som_subspace_dictionary_record);
/* Next is the string table for the space/subspace names. We will
build and write the string table on the fly. At the same time
@@ -3593,22 +3619,22 @@ som_begin_writing (abfd)
/* Update the size of the code & data. */
if (abfd->flags & (EXEC_P | DYNAMIC)
&& subsection->flags & SEC_CODE)
- exec_header->exec_tsize += subsection->_cooked_size;
+ exec_header->exec_tsize += subsection->size;
else if (abfd->flags & (EXEC_P | DYNAMIC)
&& subsection->flags & SEC_DATA)
- exec_header->exec_dsize += subsection->_cooked_size;
+ exec_header->exec_dsize += subsection->size;
som_section_data (subsection)->subspace_dict->file_loc_init_value
= current_offset;
subsection->filepos = current_offset;
- current_offset += bfd_section_size (abfd, subsection);
- subspace_offset += bfd_section_size (abfd, subsection);
+ current_offset += subsection->size;
+ subspace_offset += subsection->size;
}
/* Looks like uninitialized data. */
else
{
/* Update the size of the bss section. */
if (abfd->flags & (EXEC_P | DYNAMIC))
- exec_header->exec_bsize += subsection->_cooked_size;
+ exec_header->exec_bsize += subsection->size;
som_section_data (subsection)->subspace_dict->file_loc_init_value
= 0;
@@ -3658,7 +3684,7 @@ som_begin_writing (abfd)
som_section_data (subsection)->subspace_dict->file_loc_init_value
= current_offset;
subsection->filepos = current_offset;
- current_offset += bfd_section_size (abfd, subsection);
+ current_offset += subsection->size;
}
/* Looks like uninitialized data. */
else
@@ -3666,7 +3692,7 @@ som_begin_writing (abfd)
som_section_data (subsection)->subspace_dict->file_loc_init_value
= 0;
som_section_data (subsection)->subspace_dict->
- initialization_length = bfd_section_size (abfd, subsection);
+ initialization_length = subsection->size;
}
}
/* Goto the next section. */
@@ -3841,7 +3867,7 @@ som_finish_writing (abfd)
som_section_data (subsection)->subspace_dict->space_index = i;
/* Dump the current subspace header. */
- amt = sizeof (struct subspace_dictionary_record);
+ amt = sizeof (struct som_subspace_dictionary_record);
if (bfd_bwrite ((PTR) som_section_data (subsection)->subspace_dict,
amt, abfd) != amt)
return FALSE;
@@ -3897,7 +3923,7 @@ som_finish_writing (abfd)
som_section_data (subsection)->subspace_dict->space_index = i;
/* Dump this subspace header. */
- amt = sizeof (struct subspace_dictionary_record);
+ amt = sizeof (struct som_subspace_dictionary_record);
if (bfd_bwrite ((PTR) som_section_data (subsection)->subspace_dict,
amt, abfd) != amt)
return FALSE;
@@ -4045,12 +4071,12 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
info->symbol_type = ST_DATA;
else
{
- /* Common symbols must have scope SS_UNSAT and type
- ST_STORAGE or the linker will choke. */
+ /* For BFD style common, the linker will choke unless we set the
+ type and scope to ST_STORAGE and SS_UNSAT, respectively. */
if (bfd_is_com_section (sym->section))
{
- info->symbol_scope = SS_UNSAT;
info->symbol_type = ST_STORAGE;
+ info->symbol_scope = SS_UNSAT;
}
/* It is possible to have a symbol without an associated
@@ -4089,9 +4115,6 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
info->symbol_type = ST_DATA;
}
- else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN)
- info->symbol_type = ST_DATA;
-
/* From now on it's a very simple mapping. */
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_ABSOLUTE)
info->symbol_type = ST_ABSOLUTE;
@@ -4112,14 +4135,15 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
/* Now handle the symbol's scope. Exported data which is not
in the common section has scope SS_UNIVERSAL. Note scope
of common symbols was handled earlier! */
- if (bfd_is_und_section (sym->section))
+ if (bfd_is_com_section (sym->section))
+ ;
+ else if (bfd_is_und_section (sym->section))
info->symbol_scope = SS_UNSAT;
- else if (sym->flags & (BSF_EXPORT | BSF_WEAK)
- && ! bfd_is_com_section (sym->section))
+ else if (sym->flags & (BSF_EXPORT | BSF_WEAK))
info->symbol_scope = SS_UNIVERSAL;
/* Anything else which is not in the common section has scope
SS_LOCAL. */
- else if (! bfd_is_com_section (sym->section))
+ else
info->symbol_scope = SS_LOCAL;
/* Now set the symbol_info field. It has no real meaning
@@ -4138,12 +4162,49 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
/* Set the symbol's value. */
info->symbol_value = sym->value + sym->section->vma;
- /* The secondary_def field is for weak symbols. */
+ /* The secondary_def field is for "weak" symbols. */
if (sym->flags & BSF_WEAK)
info->secondary_def = TRUE;
else
info->secondary_def = FALSE;
+ /* The is_comdat, is_common and dup_common fields provide various
+ flavors of common.
+
+ For data symbols, setting IS_COMMON provides Fortran style common
+ (duplicate definitions and overlapped initialization). Setting both
+ IS_COMMON and DUP_COMMON provides Cobol style common (duplicate
+ definitions as long as they are all the same length). In a shared
+ link data symbols retain their IS_COMMON and DUP_COMMON flags.
+ An IS_COMDAT data symbol is similar to a IS_COMMON | DUP_COMMON
+ symbol except in that it loses its IS_COMDAT flag in a shared link.
+
+ For code symbols, IS_COMDAT and DUP_COMMON have effect. Universal
+ DUP_COMMON code symbols are not exported from shared libraries.
+ IS_COMDAT symbols are exported but they lose their IS_COMDAT flag.
+
+ We take a simplified approach to setting the is_comdat, is_common
+ and dup_common flags in symbols based on the flag settings of their
+ subspace. This avoids having to add directives like `.comdat' but
+ the linker behavior is probably undefined if there is more than one
+ universal symbol (comdat key sysmbol) in a subspace.
+
+ The behavior of these flags is not well documentmented, so there
+ may be bugs and some surprising interactions with other flags. */
+ if (som_section_data (sym->section)
+ && som_section_data (sym->section)->subspace_dict
+ && info->symbol_scope == SS_UNIVERSAL
+ && (info->symbol_type == ST_ENTRY
+ || info->symbol_type == ST_CODE
+ || info->symbol_type == ST_DATA))
+ {
+ info->is_comdat
+ = som_section_data (sym->section)->subspace_dict->is_comdat;
+ info->is_common
+ = som_section_data (sym->section)->subspace_dict->is_common;
+ info->dup_common
+ = som_section_data (sym->section)->subspace_dict->dup_common;
+ }
}
/* Build and write, in one big chunk, the entire symbol table for
@@ -4189,6 +4250,9 @@ som_build_and_write_symbol_table (abfd)
som_symtab[i].xleast = 3;
som_symtab[i].symbol_value = info.symbol_value | info.priv_level;
som_symtab[i].secondary_def = info.secondary_def;
+ som_symtab[i].is_comdat = info.is_comdat;
+ som_symtab[i].is_common = info.is_common;
+ som_symtab[i].dup_common = info.dup_common;
}
/* Everything is ready, seek to the right location and
@@ -4298,7 +4362,7 @@ bfd_section_from_som_symbol (abfd, symbol)
&& symbol->symbol_type != ST_SEC_PROG
&& symbol->symbol_type != ST_MILLICODE))
{
- unsigned int index = symbol->symbol_info;
+ int index = symbol->symbol_info;
for (section = abfd->sections; section != NULL; section = section->next)
if (section->target_index == index && som_is_subspace (section))
return section;
@@ -4317,7 +4381,7 @@ bfd_section_from_som_symbol (abfd, symbol)
for (section = abfd->sections; section; section = section->next)
{
if (value >= section->vma
- && value <= section->vma + section->_cooked_size
+ && value <= section->vma + section->size
&& som_is_subspace (section))
return section;
}
@@ -4907,16 +4971,16 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
/* Got to read the damn contents first. We don't
bother saving the contents (yet). Add it one
day if the need arises. */
- section->contents = bfd_malloc (section->_raw_size);
- if (section->contents == NULL)
- return (unsigned) -1;
-
+ bfd_byte *contents;
+ if (!bfd_malloc_and_get_section (section->owner, section,
+ &contents))
+ {
+ if (contents != NULL)
+ free (contents);
+ return (unsigned) -1;
+ }
+ section->contents = contents;
deallocate_contents = 1;
- bfd_get_section_contents (section->owner,
- section,
- section->contents,
- (bfd_vma) 0,
- section->_raw_size);
}
else if (rptr->addend == 0)
rptr->addend = bfd_get_32 (section->owner,
@@ -5212,12 +5276,13 @@ bfd_som_set_section_attributes (section, defined, private, sort_key, spnum)
bfd_boolean
bfd_som_set_subsection_attributes (section, container, access,
- sort_key, quadrant)
+ sort_key, quadrant, comdat,
+ common, dup_common)
asection *section;
asection *container;
int access;
unsigned int sort_key;
- int quadrant;
+ int quadrant, comdat, common, dup_common;
{
/* Allocate memory to hold the magic information. */
if (som_section_data (section)->copy_data == NULL)
@@ -5233,6 +5298,9 @@ bfd_som_set_subsection_attributes (section, container, access,
som_section_data (section)->copy_data->access_control_bits = access;
som_section_data (section)->copy_data->quadrant = quadrant;
som_section_data (section)->copy_data->container = container;
+ som_section_data (section)->copy_data->is_comdat = comdat;
+ som_section_data (section)->copy_data->is_common = common;
+ som_section_data (section)->copy_data->dup_common = dup_common;
return TRUE;
}
@@ -5347,7 +5415,7 @@ som_get_section_contents (abfd, section, location, offset, count)
{
if (count == 0 || ((section->flags & SEC_HAS_CONTENTS) == 0))
return TRUE;
- if ((bfd_size_type) (offset+count) > section->_raw_size
+ if ((bfd_size_type) (offset+count) > section->size
|| bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) != 0
|| bfd_bread (location, count, abfd) != count)
return FALSE; /* On error. */
@@ -5358,7 +5426,7 @@ static bfd_boolean
som_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
@@ -5385,7 +5453,7 @@ som_set_section_contents (abfd, section, location, offset, count)
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) location, count, abfd) != count)
+ if (bfd_bwrite (location, count, abfd) != count)
return FALSE;
return TRUE;
}
@@ -6036,7 +6104,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
curr_lst_sym->initially_frozen = 0;
curr_lst_sym->memory_resident = 0;
curr_lst_sym->is_common = bfd_is_com_section (sym->symbol.section);
- curr_lst_sym->dup_common = 0;
+ curr_lst_sym->dup_common = info.dup_common;
curr_lst_sym->xleast = 3;
curr_lst_sym->arg_reloc = info.arg_reloc;
curr_lst_sym->name.n_strx = p - strings + 4;
@@ -6318,7 +6386,7 @@ som_bfd_link_split_section (abfd, sec)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
- return (som_is_subspace (sec) && sec->_raw_size > 240000);
+ return (som_is_subspace (sec) && sec->size > 240000);
}
#define som_close_and_cleanup som_bfd_free_cached_info
@@ -6352,7 +6420,10 @@ som_bfd_link_split_section (abfd, sec)
#define som_bfd_gc_sections bfd_generic_gc_sections
#define som_bfd_merge_sections bfd_generic_merge_sections
+#define som_bfd_is_group_section bfd_generic_is_group_section
#define som_bfd_discard_group bfd_generic_discard_group
+#define som_section_already_linked \
+ _bfd_generic_section_already_linked
const bfd_target som_vec = {
"som", /* name */
@@ -6362,7 +6433,7 @@ const bfd_target som_vec = {
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | DYNAMIC),
- (SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
+ (SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS | SEC_LINK_ONCE
| SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
/* leading_symbol_char: is the first char of a user symbol
diff --git a/bfd/som.h b/bfd/som.h
index 537ddaad1f0..3954855b614 100644
--- a/bfd/som.h
+++ b/bfd/som.h
@@ -27,7 +27,7 @@
#include "libhppa.h"
-/* Enable PA2.0 if available */
+/* We want reloc.h to provide PA 2.0 defines. */
#define PA_2_0
#include <a.out.h>
@@ -143,6 +143,35 @@ struct som_data_struct
struct somdata a;
};
+struct som_subspace_dictionary_record
+ {
+ int space_index;
+ unsigned int access_control_bits : 7;
+ unsigned int memory_resident : 1;
+ unsigned int dup_common : 1;
+ unsigned int is_common : 1;
+ unsigned int is_loadable : 1;
+ unsigned int quadrant : 2;
+ unsigned int initially_frozen : 1;
+ unsigned int is_first : 1;
+ unsigned int code_only : 1;
+ unsigned int sort_key : 8;
+ unsigned int replicate_init : 1;
+ unsigned int continuation : 1;
+ unsigned int is_tspecific : 1;
+ unsigned int is_comdat : 1;
+ unsigned int reserved : 4;
+ int file_loc_init_value;
+ unsigned int initialization_length;
+ unsigned int subspace_start;
+ unsigned int subspace_length;
+ unsigned int reserved2 : 5;
+ unsigned int alignment :27;
+ union name_pt name;
+ int fixup_request_index;
+ unsigned int fixup_request_quantity;
+ };
+
/* Substructure of som_section_data_struct used to hold information
which can't be represented by the generic BFD section structure,
but which must be copied during objcopy or strip. */
@@ -155,6 +184,9 @@ struct som_copyable_section_data_struct
unsigned int is_defined : 1;
unsigned int is_private : 1;
unsigned int quadrant : 2;
+ unsigned int is_comdat : 1;
+ unsigned int is_common : 1;
+ unsigned int dup_common : 1;
/* For subspaces, this points to the section which represents the
space in which the subspace is contained. For spaces it points
@@ -184,7 +216,7 @@ struct som_section_data_struct
unsigned int reloc_size;
char *reloc_stream;
struct space_dictionary_record *space_dict;
- struct subspace_dictionary_record *subspace_dict;
+ struct som_subspace_dictionary_record *subspace_dict;
};
#define somdata(bfd) ((bfd)->tdata.som_data->a)
@@ -231,7 +263,7 @@ struct som_section_data_struct
bfd_boolean bfd_som_set_section_attributes
PARAMS ((asection *, int, int, unsigned int, int));
bfd_boolean bfd_som_set_subsection_attributes
- PARAMS ((asection *, asection *, int, unsigned int, int));
+ PARAMS ((asection *, asection *, int, unsigned int, int, int, int, int));
void bfd_som_set_symbol_type PARAMS ((asymbol *, unsigned int));
bfd_boolean bfd_som_attach_aux_hdr PARAMS ((bfd *, int, char *));
int ** hppa_som_gen_reloc_type
diff --git a/bfd/sparclinux.c b/bfd/sparclinux.c
index ecaaa0f9bf3..0b6acd70d6e 100644
--- a/bfd/sparclinux.c
+++ b/bfd/sparclinux.c
@@ -1,6 +1,6 @@
/* BFD back-end for linux flavored sparc a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -317,7 +317,7 @@ linux_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
- s->_raw_size = 0;
+ s->size = 0;
s->contents = 0;
return TRUE;
@@ -596,9 +596,9 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = linux_hash_table (info)->fixup_count + 1;
- s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = linux_hash_table (info)->fixup_count + 1;
+ s->size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -763,7 +763,7 @@ linux_finish_dynamic_link (output_bfd, info)
SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
diff --git a/bfd/srec.c b/bfd/srec.c
index c0a3d585b43..19dfaa9fd83 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -1,6 +1,6 @@
/* BFD back-end for s-record objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -299,8 +299,8 @@ srec_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- (_("%s:%d: Unexpected character `%s' in S-record file\n"),
- bfd_archive_filename (abfd), lineno, buf);
+ (_("%B:%d: Unexpected character `%s' in S-record file\n"),
+ abfd, lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -564,11 +564,11 @@ srec_scan (abfd)
bytes -= 2;
if (sec != NULL
- && sec->vma + sec->_raw_size == address)
+ && sec->vma + sec->size == address)
{
/* This data goes at the end of the section we are
currently building. */
- sec->_raw_size += bytes;
+ sec->size += bytes;
}
else
{
@@ -586,7 +586,7 @@ srec_scan (abfd)
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = address;
sec->lma = address;
- sec->_raw_size = bytes;
+ sec->size = bytes;
sec->filepos = pos;
}
@@ -763,7 +763,7 @@ srec_read_section (abfd, section, contents)
switch (hdr[0])
{
default:
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
return TRUE;
@@ -788,7 +788,7 @@ srec_read_section (abfd, section, contents)
if (address != section->vma + sofar)
{
/* We've come to the end of this section. */
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
return TRUE;
@@ -811,7 +811,7 @@ srec_read_section (abfd, section, contents)
if (error)
goto error_return;
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
@@ -836,8 +836,8 @@ srec_get_section_contents (abfd, section, location, offset, count)
{
if (section->used_by_bfd == NULL)
{
- section->used_by_bfd = bfd_alloc (abfd, section->_raw_size);
- if (section->used_by_bfd == NULL && section->_raw_size != 0)
+ section->used_by_bfd = bfd_alloc (abfd, section->size);
+ if (section->used_by_bfd == NULL && section->size != 0)
return FALSE;
if (! srec_read_section (abfd, section, section->used_by_bfd))
@@ -1284,7 +1284,10 @@ srec_print_symbol (abfd, afile, symbol, how)
#define srec_bfd_relax_section bfd_generic_relax_section
#define srec_bfd_gc_sections bfd_generic_gc_sections
#define srec_bfd_merge_sections bfd_generic_merge_sections
+#define srec_bfd_is_group_section bfd_generic_is_group_section
#define srec_bfd_discard_group bfd_generic_discard_group
+#define srec_section_already_linked \
+ _bfd_generic_section_already_linked
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/stabs.c b/bfd/stabs.c
index 04b91f68004..b18f93cf9c6 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -48,13 +48,6 @@
#define VALOFF (8)
#define STABSIZE (12)
-/* A hash table used for header files with N_BINCL entries. */
-
-struct stab_link_includes_table
-{
- struct bfd_hash_table root;
-};
-
/* A linked list of totals that we have found for a particular header
file. A total is a unique identifier for a particular BINCL...EINCL
sequence of STABs that can be used to identify duplicate sequences.
@@ -80,12 +73,6 @@ struct stab_link_includes_entry
struct stab_link_includes_totals *totals;
};
-/* Look up an entry in an the header file hash table. */
-
-#define stab_link_includes_lookup(table, string, create, copy) \
- ((struct stab_link_includes_entry *) \
- bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-
/* This structure is used to hold a list of N_BINCL symbols, some of
which might be converted into N_EXCL symbols. */
@@ -124,19 +111,6 @@ struct stab_section_info
bfd_size_type stridxs[1];
};
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct stab_link_includes_table includes;
- /* The first .stabstr section. */
- asection *stabstr;
-};
-
static struct bfd_hash_entry *stab_link_includes_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
@@ -176,16 +150,15 @@ stab_link_includes_newfunc (entry, table, string)
pass of the linker. */
bfd_boolean
-_bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_offset)
+_bfd_link_section_stabs (abfd, sinfo, stabsec, stabstrsec, psecinfo, pstring_offset)
bfd *abfd;
- PTR *psinfo;
+ struct stab_info *sinfo;
asection *stabsec;
asection *stabstrsec;
PTR *psecinfo;
bfd_size_type *pstring_offset;
{
bfd_boolean first;
- struct stab_info *sinfo;
bfd_size_type count, amt;
struct stab_section_info *secinfo;
bfd_byte *stabbuf = NULL;
@@ -194,14 +167,14 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
bfd_size_type stroff, next_stroff, skip;
bfd_size_type *pstridx;
- if (stabsec->_raw_size == 0
- || stabstrsec->_raw_size == 0)
+ if (stabsec->size == 0
+ || stabstrsec->size == 0)
{
/* This file does not contain stabs debugging information. */
return TRUE;
}
- if (stabsec->_raw_size % STABSIZE != 0)
+ if (stabsec->size % STABSIZE != 0)
{
/* Something is wrong with the format of these stab symbols.
Don't try to optimize them. */
@@ -227,34 +200,30 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
first = FALSE;
- if (*psinfo == NULL)
+ if (sinfo->stabstr == NULL)
{
/* Initialize the stabs information we need to keep track of. */
first = TRUE;
- amt = sizeof (struct stab_info);
- *psinfo = (PTR) bfd_alloc (abfd, amt);
- if (*psinfo == NULL)
- goto error_return;
- sinfo = (struct stab_info *) *psinfo;
sinfo->strings = _bfd_stringtab_init ();
if (sinfo->strings == NULL)
goto error_return;
/* Make sure the first byte is zero. */
(void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
- if (! bfd_hash_table_init_n (&sinfo->includes.root,
+ if (! bfd_hash_table_init_n (&sinfo->includes,
stab_link_includes_newfunc,
251))
goto error_return;
sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
- sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
+ if (sinfo->stabstr == NULL)
+ goto error_return;
+ sinfo->stabstr->flags |= (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_DEBUGGING | SEC_LINKER_CREATED);
}
- sinfo = (struct stab_info *) *psinfo;
-
/* Initialize the information we are going to store for this .stab
section. */
- count = stabsec->_raw_size / STABSIZE;
+ count = stabsec->size / STABSIZE;
amt = sizeof (struct stab_section_info);
amt += (count - 1) * sizeof (bfd_size_type);
@@ -264,20 +233,14 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
secinfo = (struct stab_section_info *) *psecinfo;
secinfo->excls = NULL;
+ stabsec->rawsize = stabsec->size;
secinfo->cumulative_skips = NULL;
memset (secinfo->stridxs, 0, (size_t) count * sizeof (bfd_size_type));
/* Read the stabs information from abfd. */
- stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size);
- stabstrbuf = (bfd_byte *) bfd_malloc (stabstrsec->_raw_size);
- if (stabbuf == NULL || stabstrbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
- stabsec->_raw_size)
- || ! bfd_get_section_contents (abfd, stabstrsec, stabstrbuf, (bfd_vma) 0,
- stabstrsec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, stabsec, &stabbuf)
+ || !bfd_malloc_and_get_section (abfd, stabstrsec, &stabstrbuf))
goto error_return;
/* Look through the stabs symbols, work out the new string indices,
@@ -291,7 +254,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
next_stroff = pstring_offset ? *pstring_offset : 0;
skip = 0;
- symend = stabbuf + stabsec->_raw_size;
+ symend = stabbuf + stabsec->size;
for (sym = stabbuf, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -327,13 +290,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* Store the string in the hash table, and record the index. */
symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF);
- if (symstroff >= stabstrsec->_raw_size)
+ if (symstroff >= stabstrsec->size)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): Stabs entry has invalid string index."),
- bfd_archive_filename (abfd),
- bfd_get_section_name (abfd, stabsec),
- (long) (sym - stabbuf));
+ (_("%B(%A+0x%lx): Stabs entry has invalid string index."),
+ abfd, stabsec, (long) (sym - stabbuf));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -417,8 +378,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* If we have already included a header file with the same
value, then replaced this one with an N_EXCL symbol. */
- incl_entry = stab_link_includes_lookup (&sinfo->includes, string,
- TRUE, TRUE);
+ incl_entry = (struct stab_link_includes_entry * )
+ bfd_hash_lookup (&sinfo->includes, string, TRUE, TRUE);
if (incl_entry == NULL)
goto error_return;
@@ -445,7 +406,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* This is the first time we have seen this header file
with this set of stabs strings. */
t = ((struct stab_link_includes_totals *)
- bfd_hash_allocate (&sinfo->includes.root, sizeof *t));
+ bfd_hash_allocate (&sinfo->includes, sizeof *t));
if (t == NULL)
goto error_return;
t->sum_chars = sum_chars;
@@ -513,11 +474,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
from the link. We record the size of the strtab in the first
.stabstr section we saw, and make sure we don't set SEC_EXCLUDE
for that section. */
- stabsec->_cooked_size = (count - skip) * STABSIZE;
- if (stabsec->_cooked_size == 0)
+ stabsec->size = (count - skip) * STABSIZE;
+ if (stabsec->size == 0)
stabsec->flags |= SEC_EXCLUDE;
stabstrsec->flags |= SEC_EXCLUDE;
- sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
+ sinfo->stabstr->size = _bfd_stringtab_size (sinfo->strings);
/* Calculate the `cumulative_skips' array now that stabs have been
deleted for this section. */
@@ -555,7 +516,6 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
free (stabstrbuf);
return FALSE;
}
-
/* This function is called for each input file before the stab
section is relocated. It discards stab entries for discarded
@@ -580,13 +540,13 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
bfd_size_type *pstridx;
int deleting;
- if (stabsec->_raw_size == 0)
+ if (stabsec->size == 0)
{
/* This file does not contain stabs debugging information. */
return FALSE;
}
- if (stabsec->_raw_size % STABSIZE != 0)
+ if (stabsec->size % STABSIZE != 0)
{
/* Something is wrong with the format of these stab symbols.
Don't try to optimize them. */
@@ -607,17 +567,12 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
if (psecinfo == NULL)
return FALSE;
- count = stabsec->_raw_size / STABSIZE;
+ count = stabsec->rawsize / STABSIZE;
secinfo = (struct stab_section_info *) psecinfo;
/* Read the stabs information from abfd. */
- stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size);
- if (stabbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
- stabsec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, stabsec, &stabbuf))
goto error_return;
/* Look through the stabs symbols and discard any information for
@@ -626,7 +581,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
skip = 0;
deleting = -1;
- symend = stabbuf + stabsec->_raw_size;
+ symend = stabbuf + stabsec->rawsize;
for (sym = stabbuf, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -684,8 +639,8 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
stabbuf = NULL;
/* Shrink the stabsec as needed. */
- stabsec->_cooked_size -= skip * STABSIZE;
- if (stabsec->_cooked_size == 0)
+ stabsec->size -= skip * STABSIZE;
+ if (stabsec->size == 0)
stabsec->flags |= SEC_EXCLUDE;
/* Recalculate the `cumulative_skips' array now that stabs have been
@@ -730,34 +685,31 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
contents. */
bfd_boolean
-_bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
+_bfd_write_section_stabs (output_bfd, sinfo, stabsec, psecinfo, contents)
bfd *output_bfd;
- PTR *psinfo;
+ struct stab_info *sinfo;
asection *stabsec;
PTR *psecinfo;
bfd_byte *contents;
{
- struct stab_info *sinfo;
struct stab_section_info *secinfo;
struct stab_excl_list *e;
bfd_byte *sym, *tosym, *symend;
bfd_size_type *pstridx;
- sinfo = (struct stab_info *) *psinfo;
secinfo = (struct stab_section_info *) *psecinfo;
if (secinfo == NULL)
return bfd_set_section_contents (output_bfd, stabsec->output_section,
- contents,
- (file_ptr) stabsec->output_offset,
- stabsec->_raw_size);
+ contents, stabsec->output_offset,
+ stabsec->size);
/* Handle each N_BINCL entry. */
for (e = secinfo->excls; e != NULL; e = e->next)
{
bfd_byte *excl_sym;
- BFD_ASSERT (e->offset < stabsec->_raw_size);
+ BFD_ASSERT (e->offset < stabsec->rawsize);
excl_sym = contents + e->offset;
bfd_put_32 (output_bfd, e->val, excl_sym + VALOFF);
excl_sym[TYPEOFF] = e->type;
@@ -766,7 +718,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
/* Copy over all the stabs symbols, omitting the ones we don't want,
and correcting the string indices for those we do want. */
tosym = contents;
- symend = contents + stabsec->_raw_size;
+ symend = contents + stabsec->rawsize;
for (sym = contents, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -787,7 +739,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
bfd_put_32 (output_bfd, _bfd_stringtab_size (sinfo->strings),
tosym + VALOFF);
bfd_put_16 (output_bfd,
- stabsec->output_section->_raw_size / STABSIZE - 1,
+ stabsec->output_section->size / STABSIZE - 1,
tosym + DESCOFF);
}
@@ -795,27 +747,20 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
}
}
- BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->_cooked_size);
+ BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->size);
return bfd_set_section_contents (output_bfd, stabsec->output_section,
contents, (file_ptr) stabsec->output_offset,
- stabsec->_cooked_size);
+ stabsec->size);
}
/* Write out the .stabstr section. */
bfd_boolean
-_bfd_write_stab_strings (output_bfd, psinfo)
+_bfd_write_stab_strings (output_bfd, sinfo)
bfd *output_bfd;
- PTR *psinfo;
+ struct stab_info *sinfo;
{
- struct stab_info *sinfo;
-
- sinfo = (struct stab_info *) *psinfo;
-
- if (sinfo == NULL)
- return TRUE;
-
if (bfd_is_abs_section (sinfo->stabstr->output_section))
{
/* The section was discarded from the link. */
@@ -824,7 +769,7 @@ _bfd_write_stab_strings (output_bfd, psinfo)
BFD_ASSERT ((sinfo->stabstr->output_offset
+ _bfd_stringtab_size (sinfo->strings))
- <= sinfo->stabstr->output_section->_raw_size);
+ <= sinfo->stabstr->output_section->size);
if (bfd_seek (output_bfd,
(file_ptr) (sinfo->stabstr->output_section->filepos
@@ -837,7 +782,7 @@ _bfd_write_stab_strings (output_bfd, psinfo)
/* We no longer need the stabs information. */
_bfd_stringtab_free (sinfo->strings);
- bfd_hash_table_free (&sinfo->includes.root);
+ bfd_hash_table_free (&sinfo->includes);
return TRUE;
}
@@ -847,22 +792,20 @@ _bfd_write_stab_strings (output_bfd, psinfo)
or -1 if the address refers to a stab which has been removed. */
bfd_vma
-_bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- PTR *psinfo ATTRIBUTE_UNUSED;
+_bfd_stab_section_offset (stabsec, psecinfo, offset)
asection *stabsec;
- PTR *psecinfo;
+ PTR psecinfo;
bfd_vma offset;
{
struct stab_section_info *secinfo;
- secinfo = (struct stab_section_info *) *psecinfo;
+ secinfo = (struct stab_section_info *) psecinfo;
if (secinfo == NULL)
return offset;
- if (offset >= stabsec->_raw_size)
- return offset - (stabsec->_cooked_size - stabsec->_raw_size);
+ if (offset >= stabsec->rawsize)
+ return offset - stabsec->rawsize + stabsec->size;
if (secinfo->cumulative_skips)
{
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 5b1b18b9d76..e06bcaf1408 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1,6 +1,6 @@
/* BFD backend for SunOS binaries.
Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -73,6 +73,7 @@ static bfd_boolean sunos_finish_dynamic_link
#define MY_get_dynamic_symtab_upper_bound sunos_get_dynamic_symtab_upper_bound
#define MY_canonicalize_dynamic_symtab sunos_canonicalize_dynamic_symtab
+#define MY_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab
#define MY_get_dynamic_reloc_upper_bound sunos_get_dynamic_reloc_upper_bound
#define MY_canonicalize_dynamic_reloc sunos_canonicalize_dynamic_reloc
#define MY_bfd_link_hash_table_create sunos_link_hash_table_create
@@ -196,7 +197,7 @@ sunos_read_dynamic_info (abfd)
else
dynsec = obj_datasec (abfd);
dynoff -= bfd_get_section_vma (abfd, dynsec);
- if (dynoff > bfd_section_size (abfd, dynsec))
+ if (dynoff > dynsec->size)
return TRUE;
/* This executable appears to be dynamically linked in a way that we
@@ -853,8 +854,8 @@ sunos_create_dynamic_sections (abfd, info, needed)
dynobj = sunos_hash_table (info)->dynobj;
s = bfd_get_section_by_name (dynobj, ".got");
- if (s->_raw_size == 0)
- s->_raw_size = BYTES_IN_WORD;
+ if (s->size == 0)
+ s->size = BYTES_IN_WORD;
sunos_hash_table (info)->dynamic_sections_needed = TRUE;
sunos_hash_table (info)->got_needed = TRUE;
@@ -1377,7 +1378,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
so that 13 bit relocations have a greater chance of working. */
s = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (s != NULL);
- if (s->_raw_size >= 0x1000)
+ if (s->size >= 0x1000)
h->root.root.u.def.value = 0x1000;
else
h->root.root.u.def.value = 0;
@@ -1394,7 +1395,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
/* The .dynamic section is always the same size. */
s = *sdynptr;
BFD_ASSERT (s != NULL);
- s->_raw_size = (sizeof (struct external_sun4_dynamic)
+ s->size = (sizeof (struct external_sun4_dynamic)
+ EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE
+ sizeof (struct external_sun4_dynamic_link));
@@ -1408,9 +1409,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
sunos_scan_dynamic_symbol. */
s = bfd_get_section_by_name (dynobj, ".dynsym");
BFD_ASSERT (s != NULL);
- s->_raw_size = dynsymcount * sizeof (struct external_nlist);
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->size = dynsymcount * sizeof (struct external_nlist);
+ s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
/* The number of buckets is just the number of symbols divided
@@ -1435,7 +1436,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
return FALSE;
for (i = 0; i < bucketcount; i++)
PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
- s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
+ s->size = bucketcount * HASH_ENTRY_SIZE;
sunos_hash_table (info)->bucketcount = bucketcount;
@@ -1453,19 +1454,19 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
important, but it can't hurt much. */
s = bfd_get_section_by_name (dynobj, ".dynstr");
BFD_ASSERT (s != NULL);
- if ((s->_raw_size & 7) != 0)
+ if ((s->size & 7) != 0)
{
bfd_size_type add;
bfd_byte *contents;
- add = 8 - (s->_raw_size & 7);
+ add = 8 - (s->size & 7);
contents = (bfd_byte *) bfd_realloc (s->contents,
- s->_raw_size + add);
+ s->size + add);
if (contents == NULL)
return FALSE;
- memset (contents + s->_raw_size, 0, (size_t) add);
+ memset (contents + s->size, 0, (size_t) add);
s->contents = contents;
- s->_raw_size += add;
+ s->size += add;
}
}
@@ -1473,9 +1474,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
table and the dynamic relocs, allocate storage for them. */
s = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (s != NULL);
- if (s->_raw_size != 0)
+ if (s->size != 0)
{
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
@@ -1496,9 +1497,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
}
s = bfd_get_section_by_name (dynobj, ".dynrel");
- if (s->_raw_size != 0)
+ if (s->size != 0)
{
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1508,7 +1509,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
/* Make space for the global offset table. */
s = bfd_get_section_by_name (dynobj, ".got");
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
@@ -1682,8 +1683,8 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
sgot = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (sgot != NULL);
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1702,7 +1703,7 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
{
/* Presumably this symbol was marked as being undefined by
an earlier reloc. */
- srel->_raw_size += RELOC_STD_SIZE;
+ srel->size += RELOC_STD_SIZE;
}
else if ((h->root.root.u.def.section->flags & SEC_CODE) == 0)
{
@@ -1711,7 +1712,7 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
/* This reloc is not in the .text section. It must be
copied into the dynamic relocs. We mark the symbol as
being undefined. */
- srel->_raw_size += RELOC_STD_SIZE;
+ srel->size += RELOC_STD_SIZE;
sub = h->root.root.u.def.section->owner;
h->root.root.type = bfd_link_hash_undefined;
h->root.root.u.undef.abfd = sub;
@@ -1725,21 +1726,21 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
be handled correctly. */
if (h->plt_offset == 0)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = M68K_PLT_ENTRY_SIZE;
- h->plt_offset = splt->_raw_size;
+ if (splt->size == 0)
+ splt->size = M68K_PLT_ENTRY_SIZE;
+ h->plt_offset = splt->size;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
h->root.root.u.def.section = splt;
- h->root.root.u.def.value = splt->_raw_size;
+ h->root.root.u.def.value = splt->size;
}
- splt->_raw_size += M68K_PLT_ENTRY_SIZE;
+ splt->size += M68K_PLT_ENTRY_SIZE;
/* We may also need a dynamic reloc entry. */
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
- srel->_raw_size += RELOC_STD_SIZE;
+ srel->size += RELOC_STD_SIZE;
}
}
}
@@ -1836,8 +1837,8 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
/* Make sure we have an initial entry in the .got table. */
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1846,7 +1847,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (h->got_offset != 0)
continue;
- h->got_offset = sgot->_raw_size;
+ h->got_offset = sgot->size;
}
else
{
@@ -1870,10 +1871,10 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (adata (abfd).local_got_offsets[r_index] != 0)
continue;
- adata (abfd).local_got_offsets[r_index] = sgot->_raw_size;
+ adata (abfd).local_got_offsets[r_index] = sgot->size;
}
- sgot->_raw_size += BYTES_IN_WORD;
+ sgot->size += BYTES_IN_WORD;
/* If we are making a shared library, or if the symbol is
defined by a dynamic object, we will need a dynamic reloc
@@ -1882,7 +1883,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
|| (h != NULL
&& (h->flags & SUNOS_DEF_DYNAMIC) != 0
&& (h->flags & SUNOS_DEF_REGULAR) == 0))
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
continue;
}
@@ -1907,7 +1908,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
}
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
continue;
@@ -1954,8 +1955,8 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
/* Make sure we have an initial entry in the .got table. */
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1979,7 +1980,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
{
/* Presumably this symbol was marked as being undefined by
an earlier reloc. */
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
else if (r_type != RELOC_JMP_TBL
&& (h->root.root.u.def.section->flags & SEC_CODE) == 0)
@@ -1989,7 +1990,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
/* This reloc is not in the .text section. It must be
copied into the dynamic relocs. We mark the symbol as
being undefined. */
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
sub = h->root.root.u.def.section->owner;
@@ -2006,31 +2007,31 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
be handled correctly. */
if (h->plt_offset == 0)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = SPARC_PLT_ENTRY_SIZE;
- h->plt_offset = splt->_raw_size;
+ if (splt->size == 0)
+ splt->size = SPARC_PLT_ENTRY_SIZE;
+ h->plt_offset = splt->size;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
if (h->root.root.type == bfd_link_hash_undefined)
h->root.root.type = bfd_link_hash_defined;
h->root.root.u.def.section = splt;
- h->root.root.u.def.value = splt->_raw_size;
+ h->root.root.u.def.value = splt->size;
}
- splt->_raw_size += SPARC_PLT_ENTRY_SIZE;
+ splt->size += SPARC_PLT_ENTRY_SIZE;
/* We will also need a dynamic reloc entry, unless this
is a JMP_TBL reloc produced by linking PIC compiled
code, and we are not making a shared library. */
if (info->shared || (h->flags & SUNOS_DEF_REGULAR) == 0)
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
/* If we are creating a shared library, we need to copy over
any reloc other than a jump table reloc. */
if (info->shared && r_type != RELOC_JMP_TBL)
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
}
@@ -2119,14 +2120,14 @@ sunos_scan_dynamic_symbol (h, data)
s = bfd_get_section_by_name (dynobj, ".dynstr");
BFD_ASSERT (s != NULL);
contents = (bfd_byte *) bfd_realloc (s->contents,
- s->_raw_size + len + 1);
+ s->size + len + 1);
if (contents == NULL)
return FALSE;
s->contents = contents;
- h->dynstr_index = s->_raw_size;
- strcpy ((char *) contents + s->_raw_size, h->root.root.root.string);
- s->_raw_size += len + 1;
+ h->dynstr_index = s->size;
+ strcpy ((char *) contents + s->size, h->root.root.root.string);
+ s->size += len + 1;
/* Add it to the dynamic hash table. */
name = (unsigned char *) h->root.root.root.string;
@@ -2149,11 +2150,11 @@ sunos_scan_dynamic_symbol (h, data)
(s->contents
+ hash * HASH_ENTRY_SIZE
+ BYTES_IN_WORD));
- PUT_WORD (dynobj, s->_raw_size / HASH_ENTRY_SIZE,
+ PUT_WORD (dynobj, s->size / HASH_ENTRY_SIZE,
s->contents + hash * HASH_ENTRY_SIZE + BYTES_IN_WORD);
- PUT_WORD (dynobj, h->dynindx, s->contents + s->_raw_size);
- PUT_WORD (dynobj, next, s->contents + s->_raw_size + BYTES_IN_WORD);
- s->_raw_size += HASH_ENTRY_SIZE;
+ PUT_WORD (dynobj, h->dynindx, s->contents + s->size);
+ PUT_WORD (dynobj, next, s->contents + s->size + BYTES_IN_WORD);
+ s->size += HASH_ENTRY_SIZE;
}
}
@@ -2254,7 +2255,7 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
{
BFD_ASSERT (h->dynindx >= 0);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- < s->_raw_size);
+ < s->size);
p = s->contents + s->reloc_count * obj_reloc_entry_size (output_bfd);
if (obj_reloc_entry_size (output_bfd) == RELOC_STD_SIZE)
{
@@ -2561,7 +2562,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- < s->_raw_size);
+ < s->size);
p = (s->contents
+ s->reloc_count * obj_reloc_entry_size (dynobj));
@@ -2690,7 +2691,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
- BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj) < s->_raw_size);
+ BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj) < s->size);
p = s->contents + s->reloc_count * obj_reloc_entry_size (dynobj);
@@ -2796,7 +2797,7 @@ sunos_finish_dynamic_link (abfd, info)
real addresses. Now that we know the section location, we can
fill in the final values. */
s = bfd_get_section_by_name (dynobj, ".need");
- if (s != NULL && s->_raw_size != 0)
+ if (s != NULL && s->size != 0)
{
file_ptr filepos;
bfd_byte *p;
@@ -2820,7 +2821,7 @@ sunos_finish_dynamic_link (abfd, info)
dynamic information, unless this is a shared library. */
s = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (s != NULL);
- if (info->shared || sdyn->_raw_size == 0)
+ if (info->shared || sdyn->size == 0)
PUT_WORD (dynobj, 0, s->contents);
else
PUT_WORD (dynobj, sdyn->output_section->vma + sdyn->output_offset,
@@ -2836,12 +2837,12 @@ sunos_finish_dynamic_link (abfd, info)
if (! bfd_set_section_contents (abfd, o->output_section,
o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
return FALSE;
}
}
- if (sdyn->_raw_size > 0)
+ if (sdyn->size > 0)
{
struct external_sun4_dynamic esd;
struct external_sun4_dynamic_link esdl;
@@ -2867,14 +2868,14 @@ sunos_finish_dynamic_link (abfd, info)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_loaded);
s = bfd_get_section_by_name (dynobj, ".need");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_need);
else
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_need);
s = bfd_get_section_by_name (dynobj, ".rules");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_rules);
else
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
@@ -2889,12 +2890,12 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ASSERT (s != NULL);
PUT_WORD (dynobj, s->output_section->vma + s->output_offset,
esdl.ld_plt);
- PUT_WORD (dynobj, s->_raw_size, esdl.ld_plt_sz);
+ PUT_WORD (dynobj, s->size, esdl.ld_plt_sz);
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- == s->_raw_size);
+ == s->size);
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_rel);
@@ -2917,13 +2918,13 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ASSERT (s != NULL);
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_symbols);
- PUT_WORD (dynobj, s->_raw_size, esdl.ld_symb_size);
+ PUT_WORD (dynobj, s->size, esdl.ld_symb_size);
/* The size of the text area is the size of the .text section
rounded up to a page boundary. FIXME: Should the page size be
conditional on something? */
PUT_WORD (dynobj,
- BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
+ BFD_ALIGN (obj_textsec (abfd)->size, 0x2000),
esdl.ld_text);
pos = sdyn->output_offset;
diff --git a/bfd/syms.c b/bfd/syms.c
index c07f48b4a9a..6b615a2b5f4 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -1,6 +1,6 @@
/* Generic symbol-table support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -934,8 +934,12 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return TRUE;
}
- stabsize = info->stabsec->_raw_size;
- strsize = info->strsec->_raw_size;
+ stabsize = (info->stabsec->rawsize
+ ? info->stabsec->rawsize
+ : info->stabsec->size);
+ strsize = (info->strsec->rawsize
+ ? info->strsec->rawsize
+ : info->strsec->size);
}
else
{
@@ -965,8 +969,12 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return TRUE;
}
- stabsize = info->stabsec->_raw_size;
- strsize = info->strsec->_raw_size;
+ stabsize = (info->stabsec->rawsize
+ ? info->stabsec->rawsize
+ : info->stabsec->size);
+ strsize = (info->strsec->rawsize
+ ? info->strsec->rawsize
+ : info->strsec->size);
info->stabs = bfd_alloc (abfd, stabsize);
info->strs = bfd_alloc (abfd, strsize);
@@ -974,9 +982,9 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return FALSE;
if (! bfd_get_section_contents (abfd, info->stabsec, info->stabs,
- (bfd_vma) 0, stabsize)
+ 0, stabsize)
|| ! bfd_get_section_contents (abfd, info->strsec, info->strs,
- (bfd_vma) 0, strsize))
+ 0, strsize))
return FALSE;
/* If this is a relocatable object file, we have to relocate
diff --git a/bfd/targets.c b/bfd/targets.c
index 256a2af642a..05832d82abd 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -265,6 +265,7 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_merge_private_bfd_data, \
. NAME##_bfd_copy_private_section_data, \
. NAME##_bfd_copy_private_symbol_data, \
+. NAME##_bfd_copy_private_header_data, \
. NAME##_bfd_set_private_flags, \
. NAME##_bfd_print_private_bfd_data
.
@@ -282,6 +283,10 @@ BFD_JUMP_TABLE macros.
. to another. *}
. bfd_boolean (*_bfd_copy_private_symbol_data)
. (bfd *, asymbol *, bfd *, asymbol *);
+. {* Called to copy BFD private header data from one object file
+. to another. *}
+. bfd_boolean (*_bfd_copy_private_header_data)
+. (bfd *, bfd *);
. {* Called to set private backend flags. *}
. bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
.
@@ -406,7 +411,9 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_link_split_section, \
. NAME##_bfd_gc_sections, \
. NAME##_bfd_merge_sections, \
-. NAME##_bfd_discard_group
+. NAME##_bfd_is_group_section, \
+. NAME##_bfd_discard_group, \
+. NAME##_section_already_linked \
.
. int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
. bfd_byte * (*_bfd_get_relocated_section_contents)
@@ -443,13 +450,21 @@ BFD_JUMP_TABLE macros.
. {* Attempt to merge SEC_MERGE sections. *}
. bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
.
+. {* Is this section a member of a group? *}
+. bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
+.
. {* Discard members of a group. *}
. bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
.
+. {* Check if SEC has been already linked during a reloceatable or
+. final link. *}
+. void (*_section_already_linked) (bfd *, struct bfd_section *);
+.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
. NAME##_get_dynamic_symtab_upper_bound, \
. NAME##_canonicalize_dynamic_symtab, \
+. NAME##_get_synthetic_symtab, \
. NAME##_get_dynamic_reloc_upper_bound, \
. NAME##_canonicalize_dynamic_reloc
.
@@ -458,6 +473,10 @@ BFD_JUMP_TABLE macros.
. {* Read in the dynamic symbols. *}
. long (*_bfd_canonicalize_dynamic_symtab)
. (bfd *, struct bfd_symbol **);
+. {* Create synthetized symbols. *}
+. long (*_bfd_get_synthetic_symtab)
+. (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
+. struct bfd_symbol **);
. {* Get the amount of memory required to hold the dynamic relocs. *}
. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
. {* Read in the dynamic relocs. *}
@@ -516,16 +535,20 @@ extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
+extern const bfd_target bfd_elf32_bigarm_symbian_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cr16c_vec;
extern const bfd_target bfd_elf32_cris_vec;
+extern const bfd_target bfd_elf32_crx_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_d30v_vec;
extern const bfd_target bfd_elf32_dlx_big_vec;
extern const bfd_target bfd_elf32_fr30_vec;
extern const bfd_target bfd_elf32_frv_vec;
+extern const bfd_target bfd_elf32_frvfdpic_vec;
extern const bfd_target bfd_elf32_h8300_vec;
extern const bfd_target bfd_elf32_hppa_linux_vec;
+extern const bfd_target bfd_elf32_hppa_nbsd_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_freebsd_vec;
@@ -541,6 +564,7 @@ extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearm_symbian_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m32rle_vec;
@@ -575,6 +599,7 @@ extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
+extern const bfd_target bfd_elf32_shl_symbian_vec;
extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_shlnbsd_vec;
extern const bfd_target bfd_elf32_shnbsd_vec;
@@ -659,6 +684,7 @@ extern const bfd_target m68knetbsd_vec;
extern const bfd_target m68ksysvcoff_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
+extern const bfd_target m88kopenbsd_vec;
extern const bfd_target mach_o_be_vec;
extern const bfd_target mach_o_le_vec;
extern const bfd_target mach_o_fat_vec;
@@ -807,16 +833,20 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarm_symbian_vec,
&bfd_elf32_bigmips_vec,
&bfd_elf32_cr16c_vec,
&bfd_elf32_cris_vec,
+ &bfd_elf32_crx_vec,
&bfd_elf32_d10v_vec,
&bfd_elf32_d30v_vec,
&bfd_elf32_dlx_big_vec,
&bfd_elf32_fr30_vec,
&bfd_elf32_frv_vec,
+ &bfd_elf32_frvfdpic_vec,
&bfd_elf32_h8300_vec,
&bfd_elf32_hppa_linux_vec,
+ &bfd_elf32_hppa_nbsd_vec,
&bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_freebsd_vec,
@@ -834,6 +864,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearm_symbian_vec,
&bfd_elf32_littlemips_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m32rle_vec,
@@ -864,6 +895,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
+ &bfd_elf32_shl_symbian_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
&bfd_elf32_shnbsd_vec,
@@ -982,6 +1014,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&m68ksysvcoff_vec,
&m88kbcs_vec,
&m88kmach3_vec,
+ &m88kopenbsd_vec,
&mach_o_be_vec,
&mach_o_le_vec,
&mach_o_fat_vec,
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index f828fe7393c..a7a925470fc 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -1,6 +1,6 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -429,7 +429,7 @@ first_phase (abfd, type, src)
case '1': /* section range */
src++;
section->vma = getvalue (&src);
- section->_raw_size = getvalue (&src) - section->vma;
+ section->size = getvalue (&src) - section->vma;
section->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
break;
case '0':
@@ -688,7 +688,7 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
if (s->flags & SEC_LOAD)
{
for (vma = s->vma & ~(bfd_vma) CHUNK_MASK;
- vma < s->vma + s->_raw_size;
+ vma < s->vma + s->size;
vma += CHUNK_MASK)
find_chunk (abfd, vma);
}
@@ -862,7 +862,7 @@ tekhex_write_object_contents (abfd)
writesym (&dst, s->name);
*dst++ = '1';
writevalue (&dst, s->vma);
- writevalue (&dst, s->vma + s->_raw_size);
+ writevalue (&dst, s->vma + s->size);
out (abfd, '3', buffer, dst);
}
@@ -1001,7 +1001,10 @@ tekhex_print_symbol (abfd, filep, symbol, how)
#define tekhex_bfd_relax_section bfd_generic_relax_section
#define tekhex_bfd_gc_sections bfd_generic_gc_sections
#define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_is_group_section bfd_generic_is_group_section
#define tekhex_bfd_discard_group bfd_generic_discard_group
+#define tekhex_section_already_linked \
+ _bfd_generic_section_already_linked
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/trad-core.c b/bfd/trad-core.c
index f8c03d739a8..dda2e815471 100644
--- a/bfd/trad-core.c
+++ b/bfd/trad-core.c
@@ -111,8 +111,7 @@ trad_unix_core_file_p (abfd)
{
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL)
- return 0;
+
if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
@@ -174,13 +173,13 @@ trad_unix_core_file_p (abfd)
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_datasec (abfd)->_raw_size = NBPG * u.u_dsize
+ core_datasec (abfd)->size = NBPG * u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- NBPG * u.u_tsize
#endif
;
- core_stacksec (abfd)->_raw_size = NBPG * u.u_ssize;
- core_regsec (abfd)->_raw_size = NBPG * UPAGES; /* Larger than sizeof struct u */
+ core_stacksec (abfd)->size = NBPG * u.u_ssize;
+ core_regsec (abfd)->size = NBPG * UPAGES; /* Larger than sizeof struct u */
/* What a hack... we'd like to steal it from the exec file,
since the upage does not seem to provide it. FIXME. */
diff --git a/bfd/versados.c b/bfd/versados.c
index 19df300b5dd..50b3487fbcd 100644
--- a/bfd/versados.c
+++ b/bfd/versados.c
@@ -1,5 +1,5 @@
/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -320,7 +320,7 @@ process_esd (abfd, esd, pass)
case ESD_STD_REL_SEC:
case ESD_SHRT_REL_SEC:
{
- sec->_raw_size = get_4 (&ptr);
+ sec->size = get_4 (&ptr);
sec->flags |= SEC_ALLOC;
}
break;
@@ -470,7 +470,7 @@ process_otr (abfd, otr, pass)
else
{
need_contents = 1;
- if (dst_idx < esdid->section->_raw_size)
+ if (dst_idx < esdid->section->size)
if (pass == 2)
{
/* absolute code, comes in 16 bit lumps */
@@ -485,7 +485,7 @@ process_otr (abfd, otr, pass)
if (!contents && need_contents)
{
- bfd_size_type size = esdid->section->_raw_size;
+ bfd_size_type size = esdid->section->size;
esdid->contents = (unsigned char *) bfd_alloc (abfd, size);
}
}
@@ -872,7 +872,10 @@ versados_canonicalize_reloc (abfd, section, relptr, symbols)
#define versados_bfd_relax_section bfd_generic_relax_section
#define versados_bfd_gc_sections bfd_generic_gc_sections
#define versados_bfd_merge_sections bfd_generic_merge_sections
+#define versados_bfd_is_group_section bfd_generic_is_group_section
#define versados_bfd_discard_group bfd_generic_discard_group
+#define versados_section_already_linked \
+ _bfd_generic_section_already_linked
#define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/version.h b/bfd/version.h
index edf210e21fe..b491758b2a2 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20040402
+#define BFD_VERSION_DATE 20040915
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms-gsd.c b/bfd/vms-gsd.c
index 660c06cbc4c..5a107e18c7c 100644
--- a/bfd/vms-gsd.c
+++ b/bfd/vms-gsd.c
@@ -1,6 +1,6 @@
/* vms-gsd.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
go and read the openVMS linker manual (esp. appendix B)
@@ -358,9 +358,9 @@ _bfd_vms_slurp_gsd (abfd, objtype)
return -1;
}
old_flags = bfd_getl16 (vms_rec + 2);
- section->_raw_size = bfd_getl32 (vms_rec + 4); /* allocation */
+ section->size = bfd_getl32 (vms_rec + 4); /* allocation */
new_flags = vms_secflag_by_name (abfd, vax_section_flags, name,
- section->_raw_size > 0);
+ section->size > 0);
if (old_flags & EGPS_S_V_REL)
new_flags |= SEC_RELOC;
if (old_flags & GPS_S_M_OVR)
@@ -377,7 +377,7 @@ _bfd_vms_slurp_gsd (abfd, objtype)
if ((base_addr % align_addr) != 0)
base_addr += (align_addr - (base_addr % align_addr));
section->vma = (bfd_vma)base_addr;
- base_addr += section->_raw_size;
+ base_addr += section->size;
/* global section is common symbol */
@@ -401,21 +401,21 @@ _bfd_vms_slurp_gsd (abfd, objtype)
if (old_section != 0)
{
section->contents = old_section->contents;
- if (section->_raw_size < old_section->_raw_size)
+ if (section->size < old_section->size)
{
(*_bfd_error_handler)
(_("Size mismatch section %s=%lx, %s=%lx"),
old_section->name,
- (unsigned long) old_section->_raw_size,
+ (unsigned long) old_section->size,
section->name,
- (unsigned long) section->_raw_size);
+ (unsigned long) section->size);
return -1;
}
- else if (section->_raw_size > old_section->_raw_size)
+ else if (section->size > old_section->size)
{
section->contents = ((unsigned char *)
bfd_realloc (old_section->contents,
- section->_raw_size));
+ section->size));
if (section->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
@@ -426,19 +426,18 @@ _bfd_vms_slurp_gsd (abfd, objtype)
else
{
section->contents = ((unsigned char *)
- bfd_zmalloc (section->_raw_size));
+ bfd_zmalloc (section->size));
if (section->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return -1;
}
}
- section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
vms_debug (4, "gsd psc %d (%s, flags %04x=%s) ",
section->index, name, old_flags, flag2str (gpsflagdesc, old_flags));
vms_debug (4, "%d bytes at 0x%08lx (mem %p)\n",
- section->_raw_size, section->vma, section->contents);
+ section->size, section->vma, section->contents);
#endif
gsd_size = vms_rec[8] + 9;
@@ -603,9 +602,9 @@ _bfd_vms_slurp_gsd (abfd, objtype)
if (!section)
return -1;
old_flags = bfd_getl16 (vms_rec + 6);
- section->_raw_size = bfd_getl32 (vms_rec + 8); /* allocation */
+ section->size = bfd_getl32 (vms_rec + 8); /* allocation */
new_flags = vms_secflag_by_name (abfd, evax_section_flags, name,
- section->_raw_size > 0);
+ section->size > 0);
if (old_flags & EGPS_S_V_REL)
new_flags |= SEC_RELOC;
if (!bfd_set_section_flags (abfd, section, new_flags))
@@ -615,17 +614,16 @@ _bfd_vms_slurp_gsd (abfd, objtype)
if ((base_addr % align_addr) != 0)
base_addr += (align_addr - (base_addr % align_addr));
section->vma = (bfd_vma)base_addr;
- base_addr += section->_raw_size;
+ base_addr += section->size;
section->contents = ((unsigned char *)
- bfd_zmalloc (section->_raw_size));
+ bfd_zmalloc (section->size));
if (section->contents == NULL)
return -1;
- section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
vms_debug(4, "egsd psc %d (%s, flags %04x=%s) ",
section->index, name, old_flags, flag2str(gpsflagdesc, old_flags));
vms_debug(4, "%d bytes at 0x%08lx (mem %p)\n",
- section->_raw_size, section->vma, section->contents);
+ section->size, section->vma, section->contents);
#endif
}
break;
@@ -758,7 +756,7 @@ _bfd_vms_write_gsd (abfd, objtype)
while (section != 0)
{
#if VMS_DEBUG
- vms_debug (3, "Section #%d %s, %d bytes\n", section->index, section->name, (int)section->_raw_size);
+ vms_debug (3, "Section #%d %s, %d bytes\n", section->index, section->name, (int)section->size);
#endif
/* 13 bytes egsd, max 31 chars name -> should be 44 bytes */
@@ -824,10 +822,10 @@ _bfd_vms_write_gsd (abfd, objtype)
else
{
new_flags = vms_esecflag_by_name (evax_section_flags, sname,
- section->_raw_size > 0);
+ section->size > 0);
}
_bfd_vms_output_short (abfd, new_flags);
- _bfd_vms_output_long (abfd, (unsigned long) section->_raw_size);
+ _bfd_vms_output_long (abfd, (unsigned long) section->size);
_bfd_vms_output_counted (abfd, sname);
_bfd_vms_output_flush (abfd);
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c
index d0a24c7efa0..4b3fecc3762 100644
--- a/bfd/vms-misc.c
+++ b/bfd/vms-misc.c
@@ -1,6 +1,6 @@
/* vms-misc.c -- Miscellaneous functions for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
@@ -595,11 +595,11 @@ add_new_contents (abfd, section)
(bfd_size_type) sizeof (vms_section));
if (newptr == (vms_section *) NULL)
return NULL;
- newptr->contents = (unsigned char *) bfd_alloc (abfd, section->_raw_size);
+ newptr->contents = (unsigned char *) bfd_alloc (abfd, section->size);
if (newptr->contents == (unsigned char *) NULL)
return NULL;
newptr->offset = 0;
- newptr->size = section->_raw_size;
+ newptr->size = section->size;
newptr->next = 0;
PRIV (vms_section_table)[section->index] = newptr;
return newptr;
diff --git a/bfd/vms-tir.c b/bfd/vms-tir.c
index bd748ca3fa7..aa3e5360442 100644
--- a/bfd/vms-tir.c
+++ b/bfd/vms-tir.c
@@ -1,6 +1,6 @@
/* vms-tir.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
TIR record handling functions
@@ -93,7 +93,7 @@ check_section (abfd, size)
bfd_size_type offset;
offset = PRIV (image_ptr) - PRIV (image_section)->contents;
- if (offset + size > PRIV (image_section)->_raw_size)
+ if (offset + size > PRIV (image_section)->size)
{
PRIV (image_section)->contents
= bfd_realloc (PRIV (image_section)->contents, offset + size);
@@ -102,7 +102,7 @@ check_section (abfd, size)
(*_bfd_error_handler) (_("No Mem !"));
return -1;
}
- PRIV (image_section)->_raw_size = offset + size;
+ PRIV (image_section)->size = offset + size;
PRIV (image_ptr) = PRIV (image_section)->contents + offset;
}
@@ -951,10 +951,9 @@ new_section (abfd, idx)
return 0;
}
- section->_raw_size = 0;
+ section->size = 0;
section->vma = 0;
section->contents = 0;
- section->_cooked_size = 0;
section->name = name;
section->index = idx;
@@ -2031,7 +2030,7 @@ _bfd_vms_write_tir (abfd, objtype)
#if VMS_DEBUG
_bfd_vms_debug (4, "writing %d. section '%s' (%d bytes)\n",
section->index, section->name,
- (int) (section->_raw_size));
+ (int) (section->size));
#endif
if (section->flags & SEC_RELOC)
diff --git a/bfd/vms.c b/bfd/vms.c
index a55b94b0989..640d0eb6c98 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -1,6 +1,6 @@
/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
@@ -154,6 +154,7 @@ static long vms_get_dynamic_symtab_upper_bound
PARAMS ((bfd *abfd));
static long vms_canonicalize_dynamic_symtab
PARAMS ((bfd *abfd, asymbol **symbols));
+#define vms_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab
static long vms_get_dynamic_reloc_upper_bound
PARAMS ((bfd *abfd));
static long vms_canonicalize_dynamic_reloc
@@ -165,7 +166,12 @@ static bfd_boolean vms_bfd_set_private_flags
#define vms_make_empty_symbol _bfd_generic_make_empty_symbol
#define vms_bfd_link_just_syms _bfd_generic_link_just_syms
+#define vms_bfd_is_group_section bfd_generic_is_group_section
#define vms_bfd_discard_group bfd_generic_discard_group
+#define vms_section_already_linked \
+ _bfd_generic_section_already_linked
+#define vms_bfd_copy_private_header_data \
+ _bfd_generic_bfd_copy_private_header_data
/*===========================================================================*/
@@ -1666,7 +1672,7 @@ vms_set_section_contents (abfd, section, location, offset, count)
#if VMS_DEBUG
vms_debug (1, "vms_set_section_contents(%p, sec %s, loc %p, off %ld, count %d)\n",
abfd, section->name, location, (long int)offset, (int)count);
- vms_debug (2, "secraw %d, seccooked %d\n", (int)section->_raw_size, (int)section->_cooked_size);
+ vms_debug (2, "size %d\n", (int) section->size);
#endif
return _bfd_save_vms_section(abfd, section, location, offset, count);
}
diff --git a/bfd/xcoff-target.h b/bfd/xcoff-target.h
index 7bf3de72fa4..9b80e3c5ac2 100644
--- a/bfd/xcoff-target.h
+++ b/bfd/xcoff-target.h
@@ -99,6 +99,8 @@ extern int lynx_core_file_failing_signal PARAMS ((bfd *abfd));
#define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
#define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_xcoff_section_already_linked \
+ _bfd_generic_section_already_linked
#define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
/* XCOFF archives do not have anything which corresponds to an
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index ccd82befdac..ec737d12a4d 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1,5 +1,5 @@
/* POWER/PowerPC XCOFF linker support.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
@@ -171,15 +171,14 @@ xcoff_get_section_contents (abfd, sec)
if (coff_section_data (abfd, sec)->contents == NULL)
{
- coff_section_data (abfd, sec)->contents = ((bfd_byte *)
- bfd_malloc (sec->_raw_size));
- if (coff_section_data (abfd, sec)->contents == NULL)
- return FALSE;
-
- if (! bfd_get_section_contents (abfd, sec,
- coff_section_data (abfd, sec)->contents,
- (file_ptr) 0, sec->_raw_size))
- return FALSE;
+ bfd_byte *contents;
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
+ {
+ if (contents != NULL)
+ free (contents);
+ return FALSE;
+ }
+ coff_section_data (abfd, sec)->contents = contents;
}
return TRUE;
@@ -1241,8 +1240,8 @@ xcoff_link_add_symbols (abfd, info)
if (enclosing == NULL)
{
(*_bfd_error_handler)
- (_("%s: `%s' has line numbers but no enclosing section"),
- bfd_archive_filename (abfd), name);
+ (_("%B: `%s' has line numbers but no enclosing section"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1294,8 +1293,8 @@ xcoff_link_add_symbols (abfd, info)
if (sym.n_numaux == 0)
{
(*_bfd_error_handler)
- (_("%s: class %d symbol `%s' has no aux entries"),
- bfd_archive_filename (abfd), sym.n_sclass, name);
+ (_("%B: class %d symbol `%s' has no aux entries"),
+ abfd, sym.n_sclass, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1317,8 +1316,8 @@ xcoff_link_add_symbols (abfd, info)
{
default:
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized csect type %d"),
- bfd_archive_filename (abfd), name, smtyp);
+ (_("%B: symbol `%s' has unrecognized csect type %d"),
+ abfd, name, smtyp);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1329,8 +1328,8 @@ xcoff_link_add_symbols (abfd, info)
|| aux.x_csect.x_scnlen.l != 0)
{
(*_bfd_error_handler)
- (_("%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
- bfd_archive_filename (abfd), name, sym.n_sclass, sym.n_scnum,
+ (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
+ abfd, name, sym.n_sclass, sym.n_scnum,
aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1365,9 +1364,8 @@ xcoff_link_add_symbols (abfd, info)
|| aux.x_csect.x_scnlen.l != 0)
{
(*_bfd_error_handler)
- (_("%s: XMC_TC0 symbol `%s' is class %d scnlen %d"),
- bfd_archive_filename (abfd), name, sym.n_sclass,
- aux.x_csect.x_scnlen.l);
+ (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %d"),
+ abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1514,11 +1512,11 @@ xcoff_link_add_symbols (abfd, info)
if (! bfd_is_abs_section (enclosing)
&& ((bfd_vma) sym.n_value < enclosing->vma
|| ((bfd_vma) sym.n_value + aux.x_csect.x_scnlen.l
- > enclosing->vma + enclosing->_raw_size)))
+ > enclosing->vma + enclosing->size)))
{
(*_bfd_error_handler)
- (_("%s: csect `%s' not in enclosing section"),
- bfd_archive_filename (abfd), name);
+ (_("%B: csect `%s' not in enclosing section"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1526,7 +1524,7 @@ xcoff_link_add_symbols (abfd, info)
csect->filepos = (enclosing->filepos
+ sym.n_value
- enclosing->vma);
- csect->_raw_size = aux.x_csect.x_scnlen.l;
+ csect->size = aux.x_csect.x_scnlen.l;
csect->flags |= SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
@@ -1563,7 +1561,7 @@ xcoff_link_add_symbols (abfd, info)
+ relindx * bfd_coff_relsz (abfd));
while (relindx < enclosing->reloc_count
&& *rel_csect == NULL
- && rel->r_vaddr < csect->vma + csect->_raw_size)
+ && rel->r_vaddr < csect->vma + csect->size)
{
*rel_csect = csect;
@@ -1624,8 +1622,8 @@ xcoff_link_add_symbols (abfd, info)
if (bad)
{
(*_bfd_error_handler)
- (_("%s: misplaced XTY_LD `%s'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: misplaced XTY_LD `%s'"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1664,7 +1662,7 @@ xcoff_link_add_symbols (abfd, info)
if (csect == NULL)
goto error_return;
csect->vma = sym.n_value;
- csect->_raw_size = aux.x_csect.x_scnlen.l;
+ csect->size = aux.x_csect.x_scnlen.l;
csect->flags |= SEC_ALLOC;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
/* There are a number of other fields and section flags
@@ -1690,7 +1688,7 @@ xcoff_link_add_symbols (abfd, info)
if (sym.n_sclass == C_EXT)
{
csect->flags |= SEC_IS_COMMON;
- csect->_raw_size = 0;
+ csect->size = 0;
section = csect;
value = aux.x_csect.x_scnlen.l;
}
@@ -1895,7 +1893,7 @@ xcoff_link_add_symbols (abfd, info)
|| (*sym_hash)->root.u.c.p->section != csect)
{
/* We don't need the common csect we just created. */
- csect->_raw_size = 0;
+ csect->size = 0;
}
else
{
@@ -1937,7 +1935,7 @@ xcoff_link_add_symbols (abfd, info)
the .debug section, since we need to read it below in
bfd_xcoff_size_dynamic_sections. */
if (strcmp (bfd_get_section_name (abfd, o), ".debug") != 0)
- o->_raw_size = 0;
+ o->size = 0;
o->lineno_count = 0;
if ((o->flags & SEC_RELOC) != 0)
@@ -1955,8 +1953,8 @@ xcoff_link_add_symbols (abfd, info)
if (*rel_csect == NULL)
{
(*_bfd_error_handler)
- (_("%s: reloc %s:%d not in csect"),
- bfd_archive_filename (abfd), o->name, i);
+ (_("%B: reloc %s:%d not in csect"),
+ abfd, o->name, i);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -2511,7 +2509,7 @@ xcoff_sweep (info)
o->flags |= SEC_MARK;
else
{
- o->_raw_size = 0;
+ o->size = 0;
o->reloc_count = 0;
o->lineno_count = 0;
}
@@ -3035,8 +3033,8 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
/* We now know the final size of the .loader section. Allocate
space for it. */
lsec = xcoff_hash_table (info)->loader_section;
- lsec->_raw_size = stoff + ldhdr->l_stlen;
- lsec->contents = (bfd_byte *) bfd_zalloc (output_bfd, lsec->_raw_size);
+ lsec->size = stoff + ldhdr->l_stlen;
+ lsec->contents = (bfd_byte *) bfd_zalloc (output_bfd, lsec->size);
if (lsec->contents == NULL)
goto error_return;
@@ -3085,23 +3083,23 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
/* Allocate space for the magic sections. */
sec = xcoff_hash_table (info)->linkage_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
sec = xcoff_hash_table (info)->toc_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
sec = xcoff_hash_table (info)->descriptor_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
@@ -3122,14 +3120,14 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (sub->xvec != info->hash->creator)
continue;
subdeb = bfd_get_section_by_name (sub, ".debug");
- if (subdeb == NULL || subdeb->_raw_size == 0)
+ if (subdeb == NULL || subdeb->size == 0)
continue;
if (info->strip == strip_all
|| info->strip == strip_debugger
|| info->discard == discard_all)
{
- subdeb->_raw_size = 0;
+ subdeb->size = 0;
continue;
}
@@ -3148,11 +3146,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
bfd_alloc, because I expect that, when linking many files
together, many of the strings will be the same. Storing the
strings in the hash table should save space in this case. */
- debug_contents = (bfd_byte *) bfd_malloc (subdeb->_raw_size);
- if (debug_contents == NULL)
- goto error_return;
- if (! bfd_get_section_contents (sub, subdeb, (PTR) debug_contents,
- (file_ptr) 0, subdeb->_raw_size))
+ if (!bfd_malloc_and_get_section (sub, subdeb, &debug_contents))
goto error_return;
csectpp = xcoff_data (sub)->csects;
@@ -3200,7 +3194,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
/* Clear the size of subdeb, so that it is not included directly
in the output file. */
- subdeb->_raw_size = 0;
+ subdeb->size = 0;
if (! info->keep_memory)
{
@@ -3210,7 +3204,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
}
if (info->strip != strip_all)
- xcoff_hash_table (info)->debug_section->_raw_size =
+ xcoff_hash_table (info)->debug_section->size =
_bfd_stringtab_size (debug_strtab);
return TRUE;
@@ -3369,10 +3363,10 @@ xcoff_build_ldsyms (h, p)
sec = xcoff_hash_table (ldinfo->info)->linkage_section;
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = sec;
- h->root.u.def.value = sec->_raw_size;
+ h->root.u.def.value = sec->size;
h->smclas = XMC_GL;
h->flags |= XCOFF_DEF_REGULAR;
- sec->_raw_size += bfd_xcoff_glink_code_size(ldinfo->output_bfd);
+ sec->size += bfd_xcoff_glink_code_size(ldinfo->output_bfd);
/* The global linkage code requires a TOC entry for the
descriptor. */
@@ -3396,8 +3390,8 @@ xcoff_build_ldsyms (h, p)
return FALSE;
hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section;
- hds->u.toc_offset = hds->toc_section->_raw_size;
- hds->toc_section->_raw_size += byte_size;
+ hds->u.toc_offset = hds->toc_section->size;
+ hds->toc_section->size += byte_size;
++xcoff_hash_table (ldinfo->info)->ldrel_count;
++hds->toc_section->reloc_count;
hds->indx = -2;
@@ -3432,13 +3426,13 @@ xcoff_build_ldsyms (h, p)
sec = xcoff_hash_table (ldinfo->info)->descriptor_section;
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = sec;
- h->root.u.def.value = sec->_raw_size;
+ h->root.u.def.value = sec->size;
h->smclas = XMC_DS;
h->flags |= XCOFF_DEF_REGULAR;
/* The size of the function descriptor depends if this is an
xcoff32 (12) or xcoff64 (24). */
- sec->_raw_size +=
+ sec->size +=
bfd_xcoff_function_descriptor_size(ldinfo->output_bfd);
/* A function descriptor uses two relocs: one for the
@@ -3465,10 +3459,10 @@ xcoff_build_ldsyms (h, p)
if (h->root.type == bfd_link_hash_common
&& (! xcoff_hash_table (ldinfo->info)->gc
|| (h->flags & XCOFF_MARK) != 0)
- && h->root.u.c.p->section->_raw_size == 0)
+ && h->root.u.c.p->section->size == 0)
{
BFD_ASSERT (bfd_is_com_section (h->root.u.c.p->section));
- h->root.u.c.p->section->_raw_size = h->root.u.c.size;
+ h->root.u.c.p->section->size = h->root.u.c.size;
}
/* We need to add a symbol to the .loader section if it is mentioned
@@ -3618,8 +3612,10 @@ _bfd_xcoff_bfd_final_link (abfd, info)
o->reloc_count += sec->reloc_count;
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
if (sec->lineno_count > max_lineno_count)
max_lineno_count = sec->lineno_count;
if (coff_section_data (sec->owner, sec) != NULL
@@ -3722,11 +3718,11 @@ _bfd_xcoff_bfd_final_link (abfd, info)
{
bfd_vma pageoff;
- BFD_ASSERT (o->_raw_size == 0);
+ BFD_ASSERT (o->size == 0);
pageoff = sofar & (file_align - 1);
if (pageoff != 0)
{
- o->_raw_size = file_align - pageoff;
+ o->size = file_align - pageoff;
sofar += file_align - pageoff;
o->flags |= SEC_HAS_CONTENTS;
}
@@ -3734,7 +3730,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
else
{
if ((o->flags & SEC_HAS_CONTENTS) != 0)
- sofar += BFD_ALIGN (o->_raw_size,
+ sofar += BFD_ALIGN (o->size,
1 << o->alignment_power);
}
}
@@ -4083,27 +4079,27 @@ _bfd_xcoff_bfd_final_link (abfd, info)
+ xcoff_hash_table (info)->ldhdr.l_impoff));
o = xcoff_hash_table (info)->loader_section;
if (! bfd_set_section_contents (abfd, o->output_section, o->contents,
- (file_ptr) o->output_offset, o->_raw_size))
+ (file_ptr) o->output_offset, o->size))
goto error_return;
/* Write out the magic sections. */
o = xcoff_hash_table (info)->linkage_section;
- if (o->_raw_size > 0
+ if (o->size > 0
&& ! bfd_set_section_contents (abfd, o->output_section, o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
goto error_return;
o = xcoff_hash_table (info)->toc_section;
- if (o->_raw_size > 0
+ if (o->size > 0
&& ! bfd_set_section_contents (abfd, o->output_section, o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
goto error_return;
o = xcoff_hash_table (info)->descriptor_section;
- if (o->_raw_size > 0
+ if (o->size > 0
&& ! bfd_set_section_contents (abfd, o->output_section, o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
goto error_return;
/* Write out the string table. */
@@ -4128,7 +4124,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
struct bfd_strtab_hash *debug_strtab;
debug_strtab = xcoff_hash_table (info)->debug_strtab;
- BFD_ASSERT (o->output_section->_raw_size - o->output_offset
+ BFD_ASSERT (o->output_section->size - o->output_offset
>= _bfd_stringtab_size (debug_strtab));
pos = o->output_section->filepos + o->output_offset;
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
@@ -4423,7 +4419,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
output section, as it does in the default linker
script. */
tocend = ((*csectpp)->output_section->vma
- + (*csectpp)->output_section->_raw_size);
+ + (*csectpp)->output_section->size);
for (inp = finfo->info->input_bfds;
inp != NULL;
inp = inp->link_next)
@@ -4435,7 +4431,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_vma new_toc_end;
new_toc_end = (o->output_section->vma
+ o->output_offset
- + o->_cooked_size);
+ + o->size);
if (new_toc_end > tocend)
tocend = new_toc_end;
}
@@ -5053,7 +5049,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || o->_raw_size == 0
+ || o->size == 0
|| (o->flags & SEC_IN_MEMORY) != 0)
continue;
@@ -5062,12 +5058,13 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (coff_section_data (input_bfd, o) != NULL
&& coff_section_data (input_bfd, o)->contents != NULL)
contents = coff_section_data (input_bfd, o)->contents;
- else {
- if (! bfd_get_section_contents (input_bfd, o, finfo->contents,
- (file_ptr) 0, o->_raw_size))
- return FALSE;
- contents = finfo->contents;
- }
+ else
+ {
+ bfd_size_type sz = o->rawsize ? o->rawsize : o->size;
+ if (!bfd_get_section_contents (input_bfd, o, finfo->contents, 0, sz))
+ return FALSE;
+ contents = finfo->contents;
+ }
if ((o->flags & SEC_RELOC) != 0)
{
@@ -5285,9 +5282,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
else
{
(*_bfd_error_handler)
- (_("%s: loader reloc in unrecognized section `%s'"),
- bfd_archive_filename (input_bfd),
- sec->name);
+ (_("%B: loader reloc in unrecognized section `%A'"),
+ input_bfd, sec);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
@@ -5307,8 +5303,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (h->ldindx < 0 && ! quiet)
{
(*_bfd_error_handler)
- (_("%s: `%s' in loader reloc but not loader sym"),
- bfd_archive_filename (input_bfd),
+ (_("%B: `%s' in loader reloc but not loader sym"),
+ input_bfd,
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -5322,10 +5318,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& ! quiet)
{
(*_bfd_error_handler)
- (_("%s: loader reloc in read-only section %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (finfo->output_bfd,
- o->output_section));
+ (_("%B: loader reloc in read-only section %A"),
+ input_bfd, o->output_section);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
@@ -5352,9 +5346,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Write out the modified section contents. */
if (! bfd_set_section_contents (output_bfd, o->output_section,
contents, (file_ptr) o->output_offset,
- (o->_cooked_size != 0
- ? o->_cooked_size
- : o->_raw_size)))
+ o->size))
return FALSE;
}
diff --git a/bfd/xsym.c b/bfd/xsym.c
index a4058dd3954..3c4c84da9ad 100644
--- a/bfd/xsym.c
+++ b/bfd/xsym.c
@@ -1,5 +1,5 @@
/* xSYM symbol-file support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,7 +42,10 @@
#define bfd_sym_bfd_relax_section bfd_generic_relax_section
#define bfd_sym_bfd_gc_sections bfd_generic_gc_sections
#define bfd_sym_bfd_merge_sections bfd_generic_merge_sections
+#define bfd_sym_bfd_is_group_section bfd_generic_is_group_section
#define bfd_sym_bfd_discard_group bfd_generic_discard_group
+#define bfd_sym_section_already_linked \
+ _bfd_generic_section_already_linked
#define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols
@@ -2345,7 +2348,7 @@ bfd_sym_scan (abfd, version, mdata)
bfdsec->vma = 0;
bfdsec->lma = 0;
- bfdsec->_raw_size = 0;
+ bfdsec->size = 0;
bfdsec->filepos = 0;
bfdsec->alignment_power = 0;
diff --git a/config-ml.in b/config-ml.in
index b2e4ea9cf97..34874ce8bc0 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -1,7 +1,7 @@
# Configure fragment invoked in the post-target section for subdirs
# wanting multilib support.
#
-# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
@@ -546,6 +546,8 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \
+ FFLAGS="$(FFLAGS) $${flags}" \
+ ADAFLAGS="$(ADAFLAGS) $${flags}" \
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
GCJFLAGS="$(GCJFLAGS) $${flags}" \
@@ -777,11 +779,12 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
break
fi
done
- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags"'
if [ "${with_target_subdir}" = "." ]; then
CC_=$CC' '
CXX_=$CXX' '
+ F77_=$F77' '
GCJ_=$GCJ' '
else
# Create a regular expression that matches any string as long
@@ -811,6 +814,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac
done
+ F77_=
+ for arg in ${F77}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ F77_="${F77_}${arg} " ;;
+ esac
+ done
+
GCJ_=
for arg in ${GCJ}; do
case $arg in
diff --git a/config.guess b/config.guess
index 00ccf89e18b..3826ba124bd 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2004-02-16'
+timestamp='2004-08-29'
# 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
@@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -203,15 +203,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ luna88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -227,21 +227,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- pegasos:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ echo mips64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -255,9 +246,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
@@ -295,14 +291,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
+ # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -758,7 +752,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -781,21 +775,7 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
- # FreeBSD's kernel, but not the complete OS.
- case ${LIBC} in gnu) kernel_only='k' ;; esac
- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -844,9 +824,15 @@ EOF
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -1087,9 +1073,9 @@ EOF
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
- M68*:*:R3V[567]*:*)
+ M68*:*:R3V[5678]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1187,9 +1173,10 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
- case `uname -p` in
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
@@ -1251,6 +1238,13 @@ EOF
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms && exit 0 ;;
+ I*) echo ia64-dec-vms && exit 0 ;;
+ V*) echo vax-dec-vms && exit 0 ;;
+ esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/config.sub b/config.sub
index d2e3557ac40..edb6b663ca2 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2004-02-16'
+timestamp='2004-08-29'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -145,7 +145,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
+ -apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@@ -237,7 +237,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m68000 | m68k | m88k | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -262,7 +262,7 @@ case $basic_machine in
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
@@ -300,7 +300,7 @@ case $basic_machine in
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
+ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@@ -308,7 +308,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -326,8 +326,9 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
+ | mmix-* \
| msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -336,7 +337,7 @@ case $basic_machine in
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -445,6 +446,10 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
@@ -452,9 +457,16 @@ case $basic_machine in
crds | unos)
basic_machine=m68k-crds
;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -655,10 +667,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -739,10 +747,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
- ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -1055,6 +1059,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1077,7 +1084,7 @@ case $basic_machine in
sh64)
basic_machine=sh64-unknown
;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1370,6 +1377,9 @@ case $basic_machine in
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
diff --git a/config/ChangeLog b/config/ChangeLog
index 7a970b70993..e935a928b5e 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,34 @@
+2004-08-31 Robert Bowdidge <bowdidge@apple.com>
+
+ * mh-ppc-darwin: Add file, and override BOOT_CFLAGS.
+
+2004-08-13 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Add ACX_{TARGET,HOST,BUILD}_NONCANONICAL,
+ which do an automatic AC_SUBST on _GCC_TOPLEV_*_NONCANONICAL.
+ The intention is that we will migrate to these bit by bit.
+
+2004-08-01 Robert Millan <robertmh@gnu.org>
+
+ * mt-linux: Rename to ...
+ * mt-gnu: ... this.
+
+2004-06-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_PROG_LN): From gcc, modified to
+ accept a parameter.
+
+2004-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
+ From gcc.
+
+2004-04-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * acx.m4 (ACX_PROG_GNAT): Check if ${CC} produces object file for
+ Ada compilation.
+ Fix acx_cv_cc_gcc_supports_ada spelling.
+
2004-03-08 Paolo Bonzini <bonzini@gnu.org>
PR ada/14131
diff --git a/config/acx.m4 b/config/acx.m4
index ab7f98a216c..d4a583dc67f 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -38,6 +38,30 @@ esac
]) []dnl # _GCC_TOPLEV_NONCANONICAL_TARGET
dnl ####
+dnl # ACX_NONCANONICAL_BUILD
+dnl # Like underscored version, but AC_SUBST's.
+AC_DEFUN([ACX_NONCANONICAL_BUILD],
+[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl
+AC_SUBST(build_noncanonical)
+]) []dnl # ACX_NONCANONICAL_BUILD
+
+dnl ####
+dnl # ACX_NONCANONICAL_HOST
+dnl # Like underscored version, but AC_SUBST's.
+AC_DEFUN([ACX_NONCANONICAL_HOST],
+[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_HOST]) []dnl
+AC_SUBST(host_noncanonical)
+]) []dnl # ACX_NONCANONICAL_HOST
+
+dnl ####
+dnl # ACX_NONCANONICAL_TARGET
+dnl # Like underscored version, but AC_SUBST's.
+AC_DEFUN([ACX_NONCANONICAL_TARGET],
+[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl
+AC_SUBST(target_noncanonical)
+]) []dnl # ACX_NONCANONICAL_TARGET
+
+dnl ####
dnl # GCC_TOPLEV_SUBDIRS
dnl # GCC & friends build 'build', 'host', and 'target' tools. These must
dnl # be separated into three well-known subdirectories of the build directory:
@@ -177,16 +201,108 @@ acx_cv_cc_gcc_supports_ada=no
# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
# Therefore we must check for the error message as well as an
# unsuccessful exit.
+# Other compilers, like HP Tru64 UNIX cc, exit successfully when
+# given a .adb file, but produce no object file. So we must check
+# if an object file was really produced to guard against this.
errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
-if test x"$errors" = x; then
+if test x"$errors" = x && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
break
fi
rm -f conftest.*])
-if test x$GNATBIND != xno && test x$acx_cv_gcc_supports_ada != xno; then
+if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
fi
])
+
+dnl 'make compare' can be significantly faster, if cmp itself can
+dnl skip bytes instead of using tail. The test being performed is
+dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
+dnl but we need to sink errors and handle broken shells. We also test
+dnl for the parameter format "cmp file1 file2 skip1 skip2" which is
+dnl accepted by cmp on some systems.
+AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
+[AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
+[ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
+ fi
+ fi
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
+ fi
+ fi
+ rm t1 t2
+])
+do_compare="$gcc_cv_prog_cmp_skip"
+AC_SUBST(do_compare)
+])
+
+dnl See whether we can include both string.h and strings.h.
+AC_DEFUN([ACX_HEADER_STRING],
+[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
+ gcc_cv_header_string,
+[AC_TRY_COMPILE([#include <string.h>
+#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
+if test $gcc_cv_header_string = yes; then
+ AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both <string.h> and <strings.h>.])
+fi
+])
+
+dnl See if stdbool.h properly defines bool and true/false.
+dnl Check whether _Bool is built-in.
+AC_DEFUN([ACX_HEADER_STDBOOL],
+[AC_CACHE_CHECK([for working stdbool.h],
+ ac_cv_header_stdbool_h,
+[AC_TRY_COMPILE([#include <stdbool.h>],
+[bool foo = false;],
+ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)])
+if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE(HAVE_STDBOOL_H, 1,
+ [Define if you have a working <stdbool.h> header file.])
+fi
+AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
+[AC_TRY_COMPILE(,
+[_Bool foo;],
+gcc_cv_c__bool=yes, gcc_cv_c__bool=no)
+])
+if test $gcc_cv_c__bool = yes; then
+ AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.])
+fi
+])
+
+dnl See if hard links work and if not, try to substitute $1 or simple copy.
+AC_DEFUN([ACX_PROG_LN],
+[AC_MSG_CHECKING(whether ln works)
+AC_CACHE_VAL(acx_cv_prog_LN,
+[rm -f conftestdata_t
+echo >conftestdata_f
+if ln conftestdata_f conftestdata_t 2>/dev/null
+then
+ acx_cv_prog_LN=ln
+else
+ acx_cv_prog_LN=no
+fi
+rm -f conftestdata_f conftestdata_t
+])dnl
+if test $acx_cv_prog_LN = no; then
+ LN="ifelse([$1],,cp,[$1])"
+ AC_MSG_RESULT([no, using $LN])
+else
+ LN="$acx_cv_prog_LN"
+ AC_MSG_RESULT(yes)
+fi
+AC_SUBST(LN)dnl
+])
+
diff --git a/config/mh-ppc-darwin b/config/mh-ppc-darwin
new file mode 100644
index 00000000000..44fd620b66e
--- /dev/null
+++ b/config/mh-ppc-darwin
@@ -0,0 +1,6 @@
+# The -mdynamic-no-pic ensures that the compiler executable is built without
+# position-independent-code -- the usual default on Darwin. This fix speeds
+# compiles by 3-5%.
+
+BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
+
diff --git a/config/mt-linux b/config/mt-gnu
index 15bf4171603..15bf4171603 100644
--- a/config/mt-linux
+++ b/config/mt-gnu
diff --git a/configure b/configure
index a674ab6b6fa..35c07a2104e 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,16 @@ ac_default_prefix=/usr/local
ac_help="$ac_help
--enable-libada Builds libada directory"
ac_help="$ac_help
+ --with-mpfr-dir=PATH Specify source directory for MPFR library"
+ac_help="$ac_help
+ --with-mpfr=PATH Specify directory for installed MPFR library"
+ac_help="$ac_help
+ --with-gmp-dir=PATH Specify source directory for GMP library"
+ac_help="$ac_help
+ --with-gmp=PATH Specify directory for installed GMP library"
+ac_help="$ac_help
+ --enable-bootstrap[=lean] Enable bootstrapping [no]"
+ac_help="$ac_help
--enable-serial-[{host,target,build}-]configure
Force sequential configuration of
sub-packages for the host, target or build
@@ -581,7 +591,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:585: checking host system type" >&5
+echo "configure:595: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -602,7 +612,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:606: checking target system type" >&5
+echo "configure:616: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -620,7 +630,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:624: checking build system type" >&5
+echo "configure:634: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -675,7 +685,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:679: checking for a BSD compatible install" >&5
+echo "configure:689: 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
@@ -727,57 +737,50 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+echo $ac_n "checking whether ln works""... $ac_c" 1>&6
+echo "configure:742: checking whether ln works" >&5
+if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata_t
+echo >conftestdata_f
+if ln conftestdata_f conftestdata_t 2>/dev/null
+then
+ acx_cv_prog_LN=ln
+else
+ acx_cv_prog_LN=no
+fi
+rm -f conftestdata_f conftestdata_t
-# Autoconf M4 include file defining utility macros for complex Canadian
-# cross builds.
-
-
-
-
-
-
-####
-# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
-# or AC_INIT.
-# These demand that AC_CANONICAL_SYSTEM be called beforehand.
-
-####
-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
-# Code is pretty much lifted from autoconf2.53.
-
-
-
-####
-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
-
-
-
-####
-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
-
-
-###
-# AC_PROG_CPP_WERROR
-# Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which
-# triggers warnings from the preprocessor. Will be in autoconf 2.58.
-# For now, using this also overrides header checks to use only the
-# preprocessor (matches 2.13 behavior; matching 2.58's behavior is a
-# bit harder from here).
-# Eventually autoconf will default to checking headers with the compiler
-# instead, and we'll have to do this differently.
-
-# AC_PROG_CPP_WERROR
-
-# Test for GNAT.
-# We require the gnatbind program, and a compiler driver that
-# understands Ada. We use the user's CC setting, already found.
-#
-# Sets the shell variable have_gnat to yes or no as appropriate, and
-# substitutes GNATBIND.
+fi
+if test $acx_cv_prog_LN = no; then
+ LN="cp"
+ echo "$ac_t""no, using $LN" 1>&6
+else
+ LN="$acx_cv_prog_LN"
+ echo "$ac_t""yes" 1>&6
+fi
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:766: 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
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
### we might need to use some other shell than /bin/sh for running subshells
@@ -876,9 +879,17 @@ fi
# Double entries in build_configdirs, configdirs, or target_configdirs may
# cause circular dependencies and break everything horribly.
+# these library is used by various programs built for the build
+# environment
+#
+build_libs="build-libiberty"
+
+# these tools are built for the build environment
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
+
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -901,7 +912,8 @@ target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
- target-libf2c \
+ target-libmudflap \
+ target-libgfortran \
${libgcj} \
target-libobjc \
target-libada"
@@ -922,19 +934,9 @@ target_tools="target-examples target-groff target-gperf target-rda"
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
-#
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build modules if build != host.
-# This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
- # This is the only build module.
- build_modules=libiberty
-else
- build_modules=
-fi
-
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
@@ -1000,7 +1002,7 @@ fi
case ${with_x} in
yes | "") ;; # the default value for this tree is that X11 is available
no)
- skipdirs="${skipdirs} tk tix itcl libgui"
+ skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
enable_gdbtk=no
;;
@@ -1051,17 +1053,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs byacc"
;;
i[3456789]86-*-vsta)
- noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
+ noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
;;
i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
- noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
+ noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
i[3456789]86-*-mingw32*)
- # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
+ # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
;;
i[3456789]86-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb"
;;
*-*-cygwin*)
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
@@ -1070,16 +1072,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs rcs"
;;
ppc*-*-pe)
- noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
+ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
;;
powerpc-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
;;
*-*-darwin*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui"
+ noconfigdirs="$noconfigdirs tk itcl libgui"
;;
esac
+
# Check whether --enable-libada or --disable-libada was given.
if test "${enable_libada+set}" = set; then
enableval="$enable_libada"
@@ -1108,6 +1111,30 @@ no)
;;
esac
+
+# Allow --disable-libmudflap to exclude target-libmudflap
+case $enable_libmudflap in
+yes)
+ ;;
+no)
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+"")
+ case "${target}" in
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+ # Enable libmudflap by default in FreeBSD.
+ ;;
+ *)
+ # Disable it by default everywhere else.
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+ esac
+esac
+
+
case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -1123,9 +1150,25 @@ case "${target}" in
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
+ *-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && test -f /usr/local/include/gmp.h; then
+ with_gmp=/usr/local
+ fi
+
+ # Skip some stuff that's unsupported on some FreeBSD configurations.
+ case "${target}" in
+ i*86-*-*) ;;
+ alpha*-*-*) ;;
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
*-*-kaos*)
# Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
+ skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
noconfigdirs="$noconfigdirs target-libgloss"
@@ -1143,17 +1186,11 @@ case "${target}" in
;;
esac
;;
- *-*-netware)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
+ *-*-netware*)
+ noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- case ${target} in
- h8300*-*-* | h8500-*-*)
- noconfigdirs="$noconfigdirs target-libf2c"
- ;;
- *) ;;
- esac
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
@@ -1174,9 +1211,6 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
alpha*-*-*)
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -1191,7 +1225,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
noconfigdirs="$noconfigdirs target-examples"
noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
- noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
+ noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
# the C++ libraries don't build on top of CE's C libraries
noconfigdirs="$noconfigdirs target-libstdc++-v3"
@@ -1208,9 +1242,12 @@ case "${target}" in
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
@@ -1244,6 +1281,9 @@ case "${target}" in
cris-*-*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
+ crx-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss target-libstdc++-v3 target-mudflap ${libgcj}"
+ ;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
@@ -1257,10 +1297,10 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
h8500-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
hppa*64*-*-linux* | parisc*64*-*-linux*)
# In this case, it's because the hppa64-linux target is for
@@ -1286,18 +1326,15 @@ case "${target}" in
;;
ia64*-*-elf*)
# No gdb support yet.
- noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
;;
ia64*-**-hpux*)
# No gdb or ld support yet.
- noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
+ noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
;;
i[3456789]86-*-coff | i[3456789]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
i[3456789]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
@@ -1324,20 +1361,25 @@ case "${target}" in
# Can't build gdb for mingw32 if not native.
case "${host}" in
i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
;;
esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
- # always build newlib.
- skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ # always build newlib if winsup directory is present.
+ if test -d "$srcdir/winsup"
+ then
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ else
+ echo "Warning: winsup is missing so newlib can't be built."
+ fi
# Can't build gdb for Cygwin if not native.
case "${host}" in
*-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
;;
esac
;;
@@ -1389,17 +1431,17 @@ case "${target}" in
;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
@@ -1411,7 +1453,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -1420,8 +1462,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
;;
mips*-*-irix5*)
- # The GNU linker does not support shared libraries.
- noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
mips*-*-irix6*)
# Linking libjava exceeds command-line length limits on at least
@@ -1506,7 +1547,7 @@ case "${target}" in
ip2k-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- *-*-linux*)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-lynxos*)
@@ -1665,6 +1706,9 @@ case "${host}" in
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
+ powerpc-*-darwin*)
+ host_makefile_frag="config/mh-ppc-darwin"
+ ;;
*-*-lynxos*)
# /bin/cc is less than useful for our purposes. Always use GCC
tentative_cc="/bin/gcc"
@@ -1698,7 +1742,6 @@ if test "${build}" != "${host}" ; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
- BISON=${BISON-bison}
CC=${CC-${host_alias}-gcc}
CFLAGS=${CFLAGS-"-g -O2"}
CXX=${CXX-${host_alias}-c++}
@@ -1710,47 +1753,6 @@ if test "${build}" != "${host}" ; then
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
BUILD_PREFIX=${build_alias}-
BUILD_PREFIX_1=${build_alias}-
- MAKEINFO=${MAKEINFO-makeinfo}
-
- if test -z "${YACC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/bison; then
- YACC="bison -y"
- break
- fi
- if test -f $dir/byacc; then
- YACC=byacc
- break
- fi
- if test -f $dir/yacc; then
- YACC=yacc
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${YACC}" ; then
- YACC="bison -y"
- fi
- fi
-
- if test -z "${LEX}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/flex; then
- LEX=flex
- break
- fi
- if test -f $dir/lex; then
- LEX=lex
- break
- fi
- done
- IFS="$save_ifs"
- LEX=${LEX-flex}
- fi
else
# Set reasonable default values for some tools even if not Canadian.
@@ -1761,100 +1763,15 @@ else
# in Makefile.in, so can still be overridden by fragments.
# This is all going to change when we autoconfiscate...
- BISON="\$(USUAL_BISON)"
CC_FOR_BUILD="\$(CC)"
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
BUILD_PREFIX=
BUILD_PREFIX_1=loser-
- MAKEINFO="\$(USUAL_MAKEINFO)"
- LEX="\$(USUAL_LEX)"
- YACC="\$(USUAL_YACC)"
-
- # If CC is still not set, try to get gcc.
- cc_prog_is_gcc=
- if test -z "${CC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- CC="gcc"
- cc_prog_is_gcc=yes
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- break
- fi
- done
- IFS="$save_ifs"
- CC=${CC-cc}
- else
- # Determine if we are using gcc.
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
- if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
- cc_prog_is_gcc=yes
- fi
- rm -f conftest.c
- if test -z "${CFLAGS}"; then
- # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
- # is set to a version of gcc.
- if test "$cc_prog_is_gcc" = yes; then
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- fi
- fi
- fi
-
- # We must set the default linker to the linker used by gcc for the correct
- # operation of libtool. If LD is not defined and we are using gcc, try to
- # set the LD default to the ld used by gcc.
- if test -z "$LD"; then
- if test "$cc_prog_is_gcc" = yes; then
- case $build in
- *-*-mingw*)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
- *)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
- esac
- case $gcc_prog_ld in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- LD="$gcc_prog_ld" ;;
- esac
- fi
- fi
-
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
-fi
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
+ # 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:1858: checking for $ac_word" >&5
+echo "configure:1775: 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
@@ -1884,7 +1801,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:1888: checking for $ac_word" >&5
+echo "configure:1805: 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
@@ -1935,7 +1852,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:1939: checking for $ac_word" >&5
+echo "configure:1856: 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
@@ -1967,7 +1884,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1888: 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.
@@ -1978,12 +1895,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1982 "configure"
+#line 1899 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1904: \"$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
@@ -2009,12 +1926,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:2013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1930: 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:2018: checking whether we are using GNU C" >&5
+echo "configure:1935: 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
@@ -2023,7 +1940,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2027: \"$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:1944: \"$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
@@ -2042,7 +1959,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:2046: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1963: 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
@@ -2074,11 +1991,42 @@ else
fi
+ # We must set the default linker to the linker used by gcc for the correct
+ # operation of libtool. If LD is not defined and we are using gcc, try to
+ # set the LD default to the ld used by gcc.
+ if test -z "$LD"; then
+ if test "$GCC" = yes; then
+ case $build in
+ *-*-mingw*)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
+ *)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
+ esac
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ LD="$gcc_prog_ld" ;;
+ esac
+ fi
+ fi
+
+ CXX=${CXX-"c++"}
+ CFLAGS=${CFLAGS-"-g"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+fi
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2082: checking for $ac_word" >&5
+echo "configure:2030: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2110,7 +2058,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2114: checking for $ac_word" >&5
+echo "configure:2062: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2143,7 +2091,7 @@ fi
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2147: checking whether compiler driver understands Ada" >&5
+echo "configure:2095: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2156,8 +2104,11 @@ acx_cv_cc_gcc_supports_ada=no
# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
# Therefore we must check for the error message as well as an
# unsuccessful exit.
+# Other compilers, like HP Tru64 UNIX cc, exit successfully when
+# given a .adb file, but produce no object file. So we must check
+# if an object file was really produced to guard against this.
errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
-if test x"$errors" = x; then
+if test x"$errors" = x && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
break
fi
@@ -2166,12 +2117,167 @@ fi
echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
-if test x$GNATBIND != xno && test x$acx_cv_gcc_supports_ada != xno; then
+if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
fi
+echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
+echo "configure:2128: checking how to compare bootstrapped objects" >&5
+if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
+ fi
+ fi
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
+ fi
+ fi
+ rm t1 t2
+
+fi
+
+echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
+do_compare="$gcc_cv_prog_cmp_skip"
+
+
+
+# Check for GMP and MPFR
+gmplibs=
+gmpinc=
+have_gmp=yes
+# Specify a location for mpfr
+# check for this first so it ends up on the link line before gmp.
+# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
+if test "${with_mpfr_dir+set}" = set; then
+ withval="$with_mpfr_dir"
+ :
+fi
+
+
+if test "x$with_mpfr_dir" != x; then
+ gmpinc="-I$with_mpfr_dir/mpfr"
+ gmplibs="$with_mpfr_dir/libmpfr.a"
+else
+ gmplibs="-lmpfr"
+fi
+
+# Check whether --with-mpfr or --without-mpfr was given.
+if test "${with_mpfr+set}" = set; then
+ withval="$with_mpfr"
+ :
+fi
+
+
+if test "x$with_mpfr" != x; then
+ gmplibs="-L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+fi
+
+# Specify a location for gmp
+# Check whether --with-gmp-dir or --without-gmp-dir was given.
+if test "${with_gmp_dir+set}" = set; then
+ withval="$with_gmp_dir"
+ :
+fi
+
+
+if test "x$with_gmp_dir" != x; then
+ gmpinc="$gmpinc -I$with_gmp_dir"
+ if test -f "$with_gmp_dir/.libs/libgmp.a"; then
+ gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
+ elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
+ gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
+ fi
+ # One of the later tests will catch the error if neither library is present.
+else
+ gmplibs="$gmplibs -lgmp"
+fi
+
+# Check whether --with-gmp or --without-gmp was given.
+if test "${with_gmp+set}" = set; then
+ withval="$with_gmp"
+ :
+fi
+
+
+if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib $gmplibs"
+ gmpinc="-I$with_gmp/include $gmpinc"
+fi
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $gmpinc"
+# Check GMP actually works
+echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
+echo "configure:2226: checking for correct version of gmp.h" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2228 "configure"
+#include "confdefs.h"
+#include "gmp.h"
+int main() {
+
+#if __GNU_MP_VERSION < 3
+choke me
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6; have_gmp=no
+fi
+rm -f conftest*
+
+if test x"$have_gmp" = xyes; then
+ echo $ac_n "checking for MPFR""... $ac_c" 1>&6
+echo "configure:2252: checking for MPFR" >&5
+
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $gmplibs"
+ cat > conftest.$ac_ext <<EOF
+#line 2257 "configure"
+#include "confdefs.h"
+#include <gmp.h>
+#include <mpfr.h>
+int main() {
+mpfr_t n; mpfr_init(n);
+; return 0; }
+EOF
+if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6; have_gmp=no
+fi
+rm -f conftest*
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+fi
+
+# Flags needed for both GMP and/or MPFR
+
+
# By default, C is the only stage 1 language.
stage1_languages=c
@@ -2230,6 +2336,7 @@ if test -d ${srcdir}/gcc; then
new_enable_languages=c
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ potential_languages=c
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -2245,13 +2352,15 @@ if test -d ${srcdir}/gcc; then
lang_dirs=
boot_language=
build_by_default=
+ need_gmp=
. ${lang_frag}
+ potential_languages="${potential_languages},${language}"
# This is quite sensitive to the ordering of the case statement arms.
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
*::*:*)
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
- ;;
+ ;;
*:ada:no:*)
# Ada was requested with no preexisting GNAT. Disable unconditionally.
add_this_lang=no
@@ -2262,9 +2371,9 @@ if test -d ${srcdir}/gcc; then
;;
*,all,*:*:*:no)
# 'all' was selected, but this is not a default language
- # so do not include it.
+ # so do not include it.
add_this_lang=no
- ;;
+ ;;
*,all,*:*:*:*)
# 'all' was selected and this is a default language; include it.
add_this_lang=yes
@@ -2273,7 +2382,20 @@ if test -d ${srcdir}/gcc; then
add_this_lang=no
;;
esac
- case $add_this_lang in
+
+ # Disable languages that need GMP if it isn't available.
+ case ,${enable_languages},:${have_gmp}:${need_gmp} in
+ *,${language},*:no:yes)
+ # Specifically requested language; tell them.
+ { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
+ case $add_this_lang in
no)
# Remove language-dependent dirs.
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
@@ -2296,7 +2418,8 @@ if test -d ${srcdir}/gcc; then
missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
if test "x$missing_languages" != x; then
{ echo "configure: error:
-The following requested languages were not found: ${missing_languages}" 1>&2; exit 1; }
+The following requested languages were not found: ${missing_languages}
+The available languages are: ${potential_languages}" 1>&2; exit 1; }
fi
if test "x$new_enable_languages" != "x$enable_languages"; then
@@ -2355,6 +2478,15 @@ fi
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
+build_configdirs_all="$build_configdirs"
+build_configdirs=
+for i in ${build_configdirs_all} ; do
+ j=`echo $i | sed -e s/build-//g`
+ if test -f ${srcdir}/$j/configure ; then
+ build_configdirs="${build_configdirs} $i"
+ fi
+done
+
configdirs_all="$configdirs"
configdirs=
for i in ${configdirs_all} ; do
@@ -2362,6 +2494,7 @@ for i in ${configdirs_all} ; do
configdirs="${configdirs} $i"
fi
done
+
target_configdirs_all="$target_configdirs"
target_configdirs=
for i in ${target_configdirs_all} ; do
@@ -2388,7 +2521,7 @@ if test -n "${notsupp}" && test -z "${norecursion}" ; then
appdirs=""
break
fi
- if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
@@ -2486,14 +2619,11 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
- i[3456789]86-*-netware*)
+ *-*-netware*)
target_makefile_frag="config/mt-netware"
;;
- powerpc-*-netware*)
- target_makefile_frag="config/mt-netware"
- ;;
- *-*-linux*)
- target_makefile_frag="config/mt-linux"
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ target_makefile_frag="config/mt-gnu"
;;
*-*-aix4.[3456789]* | *-*-aix[56789].*)
# nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
@@ -2574,7 +2704,6 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-
extra_host_args="$extra_host_args --with-newlib"
fi
-
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
@@ -2600,113 +2729,219 @@ esac
tooldir='${exec_prefix}'/${target_alias}
build_tooldir=${tooldir}
-# Generate default definitions for YACC, M4, LEX. These are used if the
-# Makefile can't locate these programs in objdir.
+# Generate default definitions for YACC, M4, LEX and other programs that run
+# on the build machine. These are used if the Makefile can't locate these
+# programs in objdir.
MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
+for ac_prog in bison
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2742: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CONFIGURED_BISON"; then
+ ac_cv_prog_CONFIGURED_BISON="$CONFIGURED_BISON" # 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_CONFIGURED_BISON="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CONFIGURED_BISON="$ac_cv_prog_CONFIGURED_BISON"
+if test -n "$CONFIGURED_BISON"; then
+ echo "$ac_t""$CONFIGURED_BISON" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CONFIGURED_BISON" && break
+done
+test -n "$CONFIGURED_BISON" || CONFIGURED_BISON="$MISSING bison"
+
for ac_prog in 'bison -y' byacc yacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2612: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then
+echo "configure:2777: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$DEFAULT_YACC"; then
- ac_cv_prog_DEFAULT_YACC="$DEFAULT_YACC" # Let the user override the test.
+ if test -n "$CONFIGURED_YACC"; then
+ ac_cv_prog_CONFIGURED_YACC="$CONFIGURED_YACC" # 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_DEFAULT_YACC="$ac_prog"
+ ac_cv_prog_CONFIGURED_YACC="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-DEFAULT_YACC="$ac_cv_prog_DEFAULT_YACC"
-if test -n "$DEFAULT_YACC"; then
- echo "$ac_t""$DEFAULT_YACC" 1>&6
+CONFIGURED_YACC="$ac_cv_prog_CONFIGURED_YACC"
+if test -n "$CONFIGURED_YACC"; then
+ echo "$ac_t""$CONFIGURED_YACC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-test -n "$DEFAULT_YACC" && break
+test -n "$CONFIGURED_YACC" && break
done
-test -n "$DEFAULT_YACC" || DEFAULT_YACC="$MISSING bison"
+test -n "$CONFIGURED_YACC" || CONFIGURED_YACC="$MISSING bison -y"
for ac_prog in gm4 gnum4 m4
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2647: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then
+echo "configure:2812: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CONFIGURED_M4"; then
+ ac_cv_prog_CONFIGURED_M4="$CONFIGURED_M4" # 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_CONFIGURED_M4="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CONFIGURED_M4="$ac_cv_prog_CONFIGURED_M4"
+if test -n "$CONFIGURED_M4"; then
+ echo "$ac_t""$CONFIGURED_M4" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CONFIGURED_M4" && break
+done
+test -n "$CONFIGURED_M4" || CONFIGURED_M4="$MISSING m4"
+
+for ac_prog in flex
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2847: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$DEFAULT_M4"; then
- ac_cv_prog_DEFAULT_M4="$DEFAULT_M4" # Let the user override the test.
+ if test -n "$CONFIGURED_FLEX"; then
+ ac_cv_prog_CONFIGURED_FLEX="$CONFIGURED_FLEX" # 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_DEFAULT_M4="$ac_prog"
+ ac_cv_prog_CONFIGURED_FLEX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-DEFAULT_M4="$ac_cv_prog_DEFAULT_M4"
-if test -n "$DEFAULT_M4"; then
- echo "$ac_t""$DEFAULT_M4" 1>&6
+CONFIGURED_FLEX="$ac_cv_prog_CONFIGURED_FLEX"
+if test -n "$CONFIGURED_FLEX"; then
+ echo "$ac_t""$CONFIGURED_FLEX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-test -n "$DEFAULT_M4" && break
+test -n "$CONFIGURED_FLEX" && break
done
-test -n "$DEFAULT_M4" || DEFAULT_M4="$MISSING m4"
+test -n "$CONFIGURED_FLEX" || CONFIGURED_FLEX="$MISSING flex"
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2682: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then
+echo "configure:2882: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$DEFAULT_LEX"; then
- ac_cv_prog_DEFAULT_LEX="$DEFAULT_LEX" # Let the user override the test.
+ if test -n "$CONFIGURED_LEX"; then
+ ac_cv_prog_CONFIGURED_LEX="$CONFIGURED_LEX" # 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_DEFAULT_LEX="$ac_prog"
+ ac_cv_prog_CONFIGURED_LEX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-DEFAULT_LEX="$ac_cv_prog_DEFAULT_LEX"
-if test -n "$DEFAULT_LEX"; then
- echo "$ac_t""$DEFAULT_LEX" 1>&6
+CONFIGURED_LEX="$ac_cv_prog_CONFIGURED_LEX"
+if test -n "$CONFIGURED_LEX"; then
+ echo "$ac_t""$CONFIGURED_LEX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-test -n "$DEFAULT_LEX" && break
+test -n "$CONFIGURED_LEX" && break
done
-test -n "$DEFAULT_LEX" || DEFAULT_LEX="$MISSING flex"
+test -n "$CONFIGURED_LEX" || CONFIGURED_LEX="$MISSING flex"
+
+for ac_prog in makeinfo
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2917: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CONFIGURED_MAKEINFO"; then
+ ac_cv_prog_CONFIGURED_MAKEINFO="$CONFIGURED_MAKEINFO" # 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_CONFIGURED_MAKEINFO="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CONFIGURED_MAKEINFO="$ac_cv_prog_CONFIGURED_MAKEINFO"
+if test -n "$CONFIGURED_MAKEINFO"; then
+ echo "$ac_t""$CONFIGURED_MAKEINFO" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CONFIGURED_MAKEINFO" && break
+done
+test -n "$CONFIGURED_MAKEINFO" || CONFIGURED_MAKEINFO="$MISSING makeinfo"
# Create a .gdbinit file which runs the one in srcdir
@@ -2790,17 +3025,7 @@ esac
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-
-# This is the final value for target_configdirs. configdirs already
-# has its final value, as does build_modules. It's time to create some
-# lists of valid targets.
-
-all_build_modules=
-configure_build_modules=
-for module in ${build_modules} ; do
- all_build_modules=all-build-${module}
- configure_build_modules=configure-build-${module}
-done
+build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
@@ -2810,7 +3035,7 @@ done
# leave out the maybe dependencies when enable_gdbtk is false. I'm not
# 100% sure that that's safe though.
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
case "$enable_gdbtk" in
no)
GDB_TK="" ;;
@@ -2828,31 +3053,94 @@ case "$enable_gdbtk" in
;;
esac
-# Create the 'maybe dependencies'. This uses a temporary file.
+# Strip out unwanted targets.
# While at that, we remove Makefiles if we were started for recursive
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-# Make-targets which may need maybe dependencies.
-mts="configure all install check clean distclean dvi info install-info"
-mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
+# Loop over modules. $extrasub must be used with care, limiting as
+# much as possible the usage of range addresses. That's because autoconf
+# splits the sed script to overcome limits in the number of commands,
+# and relying on carefully-timed sed passes may turn out to be very hard
+# to maintain later. In this particular case, you just have to be careful
+# not to nest @if/@endif pairs, because configure will not warn you at all.
+
+# Check whether --enable-bootstrap or --disable-bootstrap was given.
+if test "${enable_bootstrap+set}" = set; then
+ enableval="$enable_bootstrap"
+ :
+else
+ enable_bootstrap=default
+fi
+
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+case "$configdirs" in
+ *gcc*) have_compiler=yes ;;
+ *) have_compiler=no ;;
+esac
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. (We'll) enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ # This will become 'yes'
+ enable_bootstrap=no ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
-# Loop over modules and make-targets.
-for module in ${build_modules} ; do
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes | yes:$build:$build:lean)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes | yes:*:*:lean)
+ echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes | no:*:*:lean)
+ { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
+
+ # Fail if wrong command line
+ *)
+ { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
+ ;;
+esac
+
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case "$enable_bootstrap" in
+ yes)
+ bootstrap_lean='#'
+ default_target=bootstrap
+ bootstrap_suffix=bootstrap ;;
+ lean)
+ bootstrap_lean=''
+ default_target=bootstrap
+ bootstrap_suffix=bootstrap ;;
+ no)
+ default_target=all
+ bootstrap_suffix=no-bootstrap ;;
+esac
+
+
+
+for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- case ${mt} in
- install) ;; # No installing build modules.
- *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
- esac
- done
+ extrasub="$extrasub
+/^@if build-$module\$/d
+/^@endif build-$module\$/d
+/^@if build-$module-$bootstrap_suffix\$/d
+/^@endif build-$module-$bootstrap_suffix\$/d"
done
for module in ${configdirs} ; do
if test -z "${no_recursion}" \
@@ -2860,9 +3148,11 @@ for module in ${configdirs} ; do
echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
rm -f ${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if $module\$/d
+/^@endif $module\$/d
+/^@if $module-$bootstrap_suffix\$/d
+/^@endif $module-$bootstrap_suffix\$/d"
done
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
@@ -2870,12 +3160,15 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if target-$module\$/d
+/^@endif target-$module\$/d
+/^@if target-$module-$bootstrap_suffix\$/d
+/^@endif target-$module-$bootstrap_suffix\$/d"
done
-maybe_dependencies=maybedep.tmp
+extrasub="$extrasub
+/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -2939,21 +3232,21 @@ serialization_dependencies=serdep.tmp
# at the end of the argument list.
# These will be expanded by make, so quote '$'.
cat <<\EOF_SED > conftestsed
-s/ --no[^ ]* / /
-s/ --c[a-z-]*[= ][^ ]* / /
-s/ --sr[a-z-]*[= ][^ ]* / /
-s/ --ho[a-z-]*[= ][^ ]* / /
-s/ --bu[a-z-]*[= ][^ ]* / /
-s/ --t[a-z-]*[= ][^ ]* / /
-s/ --program-[pst][a-z-]*[= ][^ ]* / /
-s/ -cache-file[= ][^ ]* / /
-s/ -srcdir[= ][^ ]* / /
-s/ -host[= ][^ ]* / /
-s/ -build[= ][^ ]* / /
-s/ -target[= ][^ ]* / /
-s/ -program-prefix[= ][^ ]* / /
-s/ -program-suffix[= ][^ ]* / /
-s/ -program-transform-name[= ][^ ]* / /
+s/ --no[^ ]*/ /g
+s/ --c[a-z-]*[= ][^ ]*//g
+s/ --sr[a-z-]*[= ][^ ]*//g
+s/ --ho[a-z-]*[= ][^ ]*//g
+s/ --bu[a-z-]*[= ][^ ]*//g
+s/ --t[a-z-]*[= ][^ ]*//g
+s/ --program-[pst][a-z-]*[= ][^ ]*//g
+s/ -cache-file[= ][^ ]*//g
+s/ -srcdir[= ][^ ]*//g
+s/ -host[= ][^ ]*//g
+s/ -build[= ][^ ]*//g
+s/ -target[= ][^ ]*//g
+s/ -program-prefix[= ][^ ]*//g
+s/ -program-suffix[= ][^ ]*//g
+s/ -program-transform-name[= ][^ ]*//g
s/ [^' -][^ ]* / /
s/^ *//;s/ *$//
s,\$,$$,g
@@ -3141,6 +3434,20 @@ else
fi
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${srcdir}/gcc; then
+ GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
+elif test "$host" = "$target"; then
+ GFORTRAN_FOR_TARGET='gfortran'
+else
+ GFORTRAN_FOR_TARGET=`echo gfortran | sed "${program_transform_name}"`
+fi
+case $GFORTRAN_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+
# Don't use libstdc++-v3's flags to configure/build itself.
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
@@ -3182,16 +3489,20 @@ qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
+GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+do
+ eval fragval=\$$frag
+ if test $fragval != /dev/null; then
+ eval $frag=${srcdir}/$fragval
+ fi
+done
@@ -3214,7 +3525,6 @@ ospace_frag=${srcdir}/${ospace_frag}
-
# Host module lists & subconfigure args.
@@ -3227,10 +3537,6 @@ ospace_frag=${srcdir}/${ospace_frag}
-
-
-
-
# Host tools.
ncn_tool_prefix=
test -n "$host_alias" && ncn_tool_prefix=$host_alias-
@@ -3241,7 +3547,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:3245: checking for $ac_word" >&5
+echo "configure:3551: 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
@@ -3274,7 +3580,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:3278: checking for $ac_word" >&5
+echo "configure:3584: 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
@@ -3313,7 +3619,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:3317: checking for $ac_word" >&5
+echo "configure:3623: 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
@@ -3346,7 +3652,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:3350: checking for $ac_word" >&5
+echo "configure:3656: 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
@@ -3385,7 +3691,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:3389: checking for $ac_word" >&5
+echo "configure:3695: 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
@@ -3418,7 +3724,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:3422: checking for $ac_word" >&5
+echo "configure:3728: 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
@@ -3457,7 +3763,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:3461: checking for $ac_word" >&5
+echo "configure:3767: 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
@@ -3490,7 +3796,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:3494: checking for $ac_word" >&5
+echo "configure:3800: 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
@@ -3529,7 +3835,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:3533: checking for $ac_word" >&5
+echo "configure:3839: 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
@@ -3562,7 +3868,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:3566: checking for $ac_word" >&5
+echo "configure:3872: 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
@@ -3601,7 +3907,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:3605: checking for $ac_word" >&5
+echo "configure:3911: 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
@@ -3634,7 +3940,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:3638: checking for $ac_word" >&5
+echo "configure:3944: 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
@@ -3673,7 +3979,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:3677: checking for $ac_word" >&5
+echo "configure:3983: 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
@@ -3706,7 +4012,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:3710: checking for $ac_word" >&5
+echo "configure:4016: 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
@@ -3745,7 +4051,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:3749: checking for $ac_word" >&5
+echo "configure:4055: 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
@@ -3778,7 +4084,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:3782: checking for $ac_word" >&5
+echo "configure:4088: 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
@@ -3817,7 +4123,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:3821: checking for $ac_word" >&5
+echo "configure:4127: 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
@@ -3850,7 +4156,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:3854: checking for $ac_word" >&5
+echo "configure:4160: 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
@@ -3891,512 +4197,509 @@ fi
-
-
-
# Target tools.
if test -n "$ncn_target_tool_prefix"; then
# 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:3903: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4206: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$AR_FOR_TARGET"; then
- ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_AR_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_AR_FOR_TARGET="$CONFIGURED_AR_FOR_TARGET" # 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_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
+ ac_cv_prog_CONFIGURED_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
-if test -n "$AR_FOR_TARGET"; then
- echo "$ac_t""$AR_FOR_TARGET" 1>&6
+CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_CONFIGURED_AR_FOR_TARGET"
+if test -n "$CONFIGURED_AR_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_AR_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
+ ncn_cv_CONFIGURED_AR_FOR_TARGET=$CONFIGURED_AR_FOR_TARGET
# 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:3936: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4239: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_AR_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_AR_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="$ncn_cv_CONFIGURED_AR_FOR_TARGET" # 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_ncn_cv_AR_FOR_TARGET="ar"
+ ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="ar"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="ar"
fi
fi
-ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
-if test -n "$ncn_cv_AR_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_AR_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_AR_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
+ CONFIGURED_AR_FOR_TARGET=$ncn_cv_CONFIGURED_AR_FOR_TARGET
else
- AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
+ CONFIGURED_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
fi
else
- AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+ CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_CONFIGURED_AR_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:3975: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4278: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$AS_FOR_TARGET"; then
- ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_AS_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_AS_FOR_TARGET="$CONFIGURED_AS_FOR_TARGET" # 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_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
+ ac_cv_prog_CONFIGURED_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
-if test -n "$AS_FOR_TARGET"; then
- echo "$ac_t""$AS_FOR_TARGET" 1>&6
+CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_CONFIGURED_AS_FOR_TARGET"
+if test -n "$CONFIGURED_AS_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_AS_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
+ ncn_cv_CONFIGURED_AS_FOR_TARGET=$CONFIGURED_AS_FOR_TARGET
# 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:4008: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4311: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_AS_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_AS_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="$ncn_cv_CONFIGURED_AS_FOR_TARGET" # 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_ncn_cv_AS_FOR_TARGET="as"
+ ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="as"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="as"
fi
fi
-ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
-if test -n "$ncn_cv_AS_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_AS_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_AS_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
+ CONFIGURED_AS_FOR_TARGET=$ncn_cv_CONFIGURED_AS_FOR_TARGET
else
- AS_FOR_TARGET="${ncn_target_tool_prefix}as"
+ CONFIGURED_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
fi
else
- AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+ CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_CONFIGURED_AS_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:4047: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4350: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$DLLTOOL_FOR_TARGET"; then
- ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET="$CONFIGURED_DLLTOOL_FOR_TARGET" # 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_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
+ ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
-if test -n "$DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
+CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET"
+if test -n "$CONFIGURED_DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_DLLTOOL_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
+ ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET=$CONFIGURED_DLLTOOL_FOR_TARGET
# 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:4080: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4383: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" # 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_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
+ ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="dlltool"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="dlltool"
fi
fi
-ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
-if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
+ CONFIGURED_DLLTOOL_FOR_TARGET=$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET
else
- DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
+ CONFIGURED_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
fi
else
- DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+ CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:4119: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4422: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$LD_FOR_TARGET"; then
- ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_LD_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_LD_FOR_TARGET="$CONFIGURED_LD_FOR_TARGET" # 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_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
+ ac_cv_prog_CONFIGURED_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
-if test -n "$LD_FOR_TARGET"; then
- echo "$ac_t""$LD_FOR_TARGET" 1>&6
+CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_CONFIGURED_LD_FOR_TARGET"
+if test -n "$CONFIGURED_LD_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_LD_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
+ ncn_cv_CONFIGURED_LD_FOR_TARGET=$CONFIGURED_LD_FOR_TARGET
# 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:4152: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4455: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_LD_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_LD_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="$ncn_cv_CONFIGURED_LD_FOR_TARGET" # 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_ncn_cv_LD_FOR_TARGET="ld"
+ ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="ld"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="ld"
fi
fi
-ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
-if test -n "$ncn_cv_LD_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_LD_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_LD_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
+ CONFIGURED_LD_FOR_TARGET=$ncn_cv_CONFIGURED_LD_FOR_TARGET
else
- LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
+ CONFIGURED_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
fi
else
- LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+ CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_CONFIGURED_LD_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:4191: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4494: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$NM_FOR_TARGET"; then
- ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_NM_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_NM_FOR_TARGET="$CONFIGURED_NM_FOR_TARGET" # 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_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
+ ac_cv_prog_CONFIGURED_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
-if test -n "$NM_FOR_TARGET"; then
- echo "$ac_t""$NM_FOR_TARGET" 1>&6
+CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_CONFIGURED_NM_FOR_TARGET"
+if test -n "$CONFIGURED_NM_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_NM_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
+ ncn_cv_CONFIGURED_NM_FOR_TARGET=$CONFIGURED_NM_FOR_TARGET
# 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:4224: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4527: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_NM_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_NM_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="$ncn_cv_CONFIGURED_NM_FOR_TARGET" # 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_ncn_cv_NM_FOR_TARGET="nm"
+ ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="nm"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="nm"
fi
fi
-ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
-if test -n "$ncn_cv_NM_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_NM_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_NM_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
+ CONFIGURED_NM_FOR_TARGET=$ncn_cv_CONFIGURED_NM_FOR_TARGET
else
- NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
+ CONFIGURED_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
fi
else
- NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+ CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_CONFIGURED_NM_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:4263: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4566: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$RANLIB_FOR_TARGET"; then
- ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_RANLIB_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET="$CONFIGURED_RANLIB_FOR_TARGET" # 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_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
+ ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
-if test -n "$RANLIB_FOR_TARGET"; then
- echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET"
+if test -n "$CONFIGURED_RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_RANLIB_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
+ ncn_cv_CONFIGURED_RANLIB_FOR_TARGET=$CONFIGURED_RANLIB_FOR_TARGET
# 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:4296: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4599: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" # 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_ncn_cv_RANLIB_FOR_TARGET="ranlib"
+ ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="ranlib"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET=":"
fi
fi
-ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
-if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
+ CONFIGURED_RANLIB_FOR_TARGET=$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET
else
- RANLIB_FOR_TARGET=":"
+ CONFIGURED_RANLIB_FOR_TARGET=":"
fi
else
- RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+ CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET"
fi
if test -n "$ncn_target_tool_prefix"; then
# 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:4335: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4638: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$WINDRES_FOR_TARGET"; then
- ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
+ if test -n "$CONFIGURED_WINDRES_FOR_TARGET"; then
+ ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET="$CONFIGURED_WINDRES_FOR_TARGET" # 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_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
+ ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
-if test -n "$WINDRES_FOR_TARGET"; then
- echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET"
+if test -n "$CONFIGURED_WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$CONFIGURED_WINDRES_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
-if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
if test $build = $target ; then
- ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
+ ncn_cv_CONFIGURED_WINDRES_FOR_TARGET=$CONFIGURED_WINDRES_FOR_TARGET
# 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:4368: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:4671: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
+ if test -n "$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" # 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_ncn_cv_WINDRES_FOR_TARGET="windres"
+ ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="windres"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
+ test -z "$ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="windres"
fi
fi
-ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
-if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
+ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"
+if test -n "$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
+ CONFIGURED_WINDRES_FOR_TARGET=$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET
else
- WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
+ CONFIGURED_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
fi
else
- WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+ CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET"
fi
@@ -4409,6 +4712,7 @@ fi
+
# Fix up target tools.
if test "x${build}" = "x${host}" ; then
# In this case, the newly built tools can and should be used,
@@ -4424,14 +4728,31 @@ if test "x${build}" = "x${host}" ; then
NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
+else
+ # Just use the ones we found.
+ AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
+ AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
+ DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
+ LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
+ NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
+ RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
+ WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"
fi
+
+
+
+
+
+
+
+
# Certain tools may need extra flags.
AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
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:4435: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4756: 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"
@@ -4474,6 +4795,42 @@ case $build in
esac
+# It makes debugging easier if we create as symlinks the stage directories
+# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
+# possible, however, we can resort to mv.
+echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
+echo "configure:4803: checking if symbolic links between directories work" >&5
+if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "${LN_S}" = "ln -s" \
+ && mkdir confdir.s1 \
+ && ln -s confdir.s1 confdir.s2 \
+ && echo timestamp1 > confdir.s1/conftest.1 \
+ && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \
+ && echo timestamp2 > confdir.s2/conftest.2 \
+ && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \
+ && rm -f confdir.s2; then
+ gcc_cv_prog_ln_s_dir=yes
+else
+ gcc_cv_prog_ln_s_dir=yes
+fi
+rm -rf confdir.s1 confdir.s2
+fi
+
+echo "$ac_t""$gcc_cv_prog_ln_s_dir" 1>&6
+
+case ${gcc_cv_prog_ln_s_dir} in
+ yes)
+ CREATE_LINK_TO_DIR='ln -s $$1 $$2'
+ UNDO_LINK_TO_DIR='rm -f $$1' ;;
+ *)
+ CREATE_LINK_TO_DIR='mv $$1 $$2'
+ UNDO_LINK_TO_DIR='mv $$1 $$2' ;;
+esac
+
+
+
# Enable -Werror in bootstrap stage2 and later.
# Change the default to "no" on release branches.
# Check whether --enable-werror or --disable-werror was given.
@@ -4556,15 +4913,34 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
# Without the "./", some shells look in PATH for config.status.
@@ -4653,18 +5029,26 @@ 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%@LN@%$LN%g
+s%@LN_S@%$LN_S%g
s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
s%@build_subdir@%$build_subdir%g
s%@host_subdir@%$host_subdir%g
s%@target_subdir@%$target_subdir%g
s%@CC@%$CC%g
s%@GNATBIND@%$GNATBIND%g
+s%@do_compare@%$do_compare%g
+s%@gmplibs@%$gmplibs%g
+s%@gmpinc@%$gmpinc%g
s%@stage1_languages@%$stage1_languages%g
-s%@DEFAULT_YACC@%$DEFAULT_YACC%g
-s%@DEFAULT_M4@%$DEFAULT_M4%g
-s%@DEFAULT_LEX@%$DEFAULT_LEX%g
-/@maybe_dependencies@/r $maybe_dependencies
-s%@maybe_dependencies@%%g
+s%@CONFIGURED_BISON@%$CONFIGURED_BISON%g
+s%@CONFIGURED_YACC@%$CONFIGURED_YACC%g
+s%@CONFIGURED_M4@%$CONFIGURED_M4%g
+s%@CONFIGURED_FLEX@%$CONFIGURED_FLEX%g
+s%@CONFIGURED_LEX@%$CONFIGURED_LEX%g
+s%@CONFIGURED_MAKEINFO@%$CONFIGURED_MAKEINFO%g
+s%@bootstrap_lean@%$bootstrap_lean%g
+s%@default_target@%$default_target%g
/@serialization_dependencies@/r $serialization_dependencies
s%@serialization_dependencies@%%g
/@host_makefile_frag@/r $host_makefile_frag
@@ -4687,17 +5071,12 @@ s%@GDB_TK@%$GDB_TK%g
s%@gxx_include_dir@%$gxx_include_dir%g
s%@libstdcxx_incdir@%$libstdcxx_incdir%g
s%@build_configargs@%$build_configargs%g
-s%@configure_build_modules@%$configure_build_modules%g
-s%@all_build_modules@%$all_build_modules%g
+s%@build_configdirs@%$build_configdirs%g
s%@host_configargs@%$host_configargs%g
s%@configdirs@%$configdirs%g
s%@target_configargs@%$target_configargs%g
s%@target_configdirs@%$target_configdirs%g
-s%@BISON@%$BISON%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@LEX@%$LEX%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@YACC@%$YACC%g
s%@config_shell@%$config_shell%g
s%@AR@%$AR%g
s%@ncn_cv_AR@%$ncn_cv_AR%g
@@ -4719,32 +5098,42 @@ s%@OBJDUMP@%$OBJDUMP%g
s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
s%@CXX@%$CXX%g
s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
-s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
-s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
-s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
-s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
-s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
-s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
-s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
-s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
-s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
-s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
-s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
-s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
-s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
-s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
+s%@CONFIGURED_AR_FOR_TARGET@%$CONFIGURED_AR_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_AR_FOR_TARGET@%$ncn_cv_CONFIGURED_AR_FOR_TARGET%g
+s%@CONFIGURED_AS_FOR_TARGET@%$CONFIGURED_AS_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_AS_FOR_TARGET@%$ncn_cv_CONFIGURED_AS_FOR_TARGET%g
+s%@CONFIGURED_DLLTOOL_FOR_TARGET@%$CONFIGURED_DLLTOOL_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET@%$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET%g
+s%@CONFIGURED_LD_FOR_TARGET@%$CONFIGURED_LD_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_LD_FOR_TARGET@%$ncn_cv_CONFIGURED_LD_FOR_TARGET%g
+s%@CONFIGURED_NM_FOR_TARGET@%$CONFIGURED_NM_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_NM_FOR_TARGET@%$ncn_cv_CONFIGURED_NM_FOR_TARGET%g
+s%@CONFIGURED_RANLIB_FOR_TARGET@%$CONFIGURED_RANLIB_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_RANLIB_FOR_TARGET@%$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET%g
+s%@CONFIGURED_WINDRES_FOR_TARGET@%$CONFIGURED_WINDRES_FOR_TARGET%g
+s%@ncn_cv_CONFIGURED_WINDRES_FOR_TARGET@%$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET%g
s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
+s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
+s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
+s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
+s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
+s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
+s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
+s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
+s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
s%@stage1_cflags@%$stage1_cflags%g
+s%@CREATE_LINK_TO_DIR@%$CREATE_LINK_TO_DIR%g
+s%@UNDO_LINK_TO_DIR@%$UNDO_LINK_TO_DIR%g
s%@stage2_werror_flag@%$stage2_werror_flag%g
CEOF
diff --git a/configure.in b/configure.in
index 5735d84c8b4..9c32e120916 100644
--- a/configure.in
+++ b/configure.in
@@ -18,6 +18,8 @@
##############################################################################
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
+sinclude(config/acx.m4)
+
AC_INIT(move-if-change)
AC_PREREQ(2.13)
AC_CANONICAL_SYSTEM
@@ -25,8 +27,8 @@ AC_ARG_PROGRAM
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
-
-sinclude(config/acx.m4)
+ACX_PROG_LN
+AC_PROG_LN_S
### we might need to use some other shell than /bin/sh for running subshells
### If we are on Windows, search for the shell. This will permit people
@@ -124,9 +126,17 @@ fi
# Double entries in build_configdirs, configdirs, or target_configdirs may
# cause circular dependencies and break everything horribly.
+# these library is used by various programs built for the build
+# environment
+#
+build_libs="build-libiberty"
+
+# these tools are built for the build environment
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
+
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -149,7 +159,8 @@ target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
- target-libf2c \
+ target-libmudflap \
+ target-libgfortran \
${libgcj} \
target-libobjc \
target-libada"
@@ -170,19 +181,9 @@ target_tools="target-examples target-groff target-gperf target-rda"
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
-#
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build modules if build != host.
-# This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
- # This is the only build module.
- build_modules=libiberty
-else
- build_modules=
-fi
-
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
@@ -227,7 +228,7 @@ fi
case ${with_x} in
yes | "") ;; # the default value for this tree is that X11 is available
no)
- skipdirs="${skipdirs} tk tix itcl libgui"
+ skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
enable_gdbtk=no
;;
@@ -278,17 +279,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs byacc"
;;
i[[3456789]]86-*-vsta)
- noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
+ noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
;;
i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
- noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
+ noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
i[[3456789]]86-*-mingw32*)
- # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
+ # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
;;
i[[3456789]]86-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb"
;;
*-*-cygwin*)
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
@@ -297,16 +298,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs rcs"
;;
ppc*-*-pe)
- noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
+ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
;;
powerpc-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
;;
*-*-darwin*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui"
+ noconfigdirs="$noconfigdirs tk itcl libgui"
;;
esac
+
AC_ARG_ENABLE(libada,
[ --enable-libada Builds libada directory],
ENABLE_LIBADA=$enableval,
@@ -331,6 +333,30 @@ no)
;;
esac
+
+# Allow --disable-libmudflap to exclude target-libmudflap
+case $enable_libmudflap in
+yes)
+ ;;
+no)
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+"")
+ case "${target}" in
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+ # Enable libmudflap by default in FreeBSD.
+ ;;
+ *)
+ # Disable it by default everywhere else.
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+ esac
+esac
+
+
case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -346,9 +372,25 @@ case "${target}" in
*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
+ *-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && test -f /usr/local/include/gmp.h; then
+ with_gmp=/usr/local
+ fi
+
+ # Skip some stuff that's unsupported on some FreeBSD configurations.
+ case "${target}" in
+ i*86-*-*) ;;
+ alpha*-*-*) ;;
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
*-*-kaos*)
# Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
+ skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
noconfigdirs="$noconfigdirs target-libgloss"
@@ -366,17 +408,11 @@ case "${target}" in
;;
esac
;;
- *-*-netware)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
+ *-*-netware*)
+ noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- case ${target} in
- h8300*-*-* | h8500-*-*)
- noconfigdirs="$noconfigdirs target-libf2c"
- ;;
- *) ;;
- esac
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
@@ -397,9 +433,6 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
alpha*-*-*)
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -414,7 +447,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
noconfigdirs="$noconfigdirs target-examples"
noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
- noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
+ noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
# the C++ libraries don't build on top of CE's C libraries
noconfigdirs="$noconfigdirs target-libstdc++-v3"
@@ -431,9 +464,12 @@ case "${target}" in
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
@@ -467,6 +503,9 @@ case "${target}" in
cris-*-*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
+ crx-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss target-libstdc++-v3 target-mudflap ${libgcj}"
+ ;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
@@ -480,10 +519,10 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
h8500-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
hppa*64*-*-linux* | parisc*64*-*-linux*)
# In this case, it's because the hppa64-linux target is for
@@ -509,18 +548,15 @@ case "${target}" in
;;
ia64*-*-elf*)
# No gdb support yet.
- noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
;;
ia64*-**-hpux*)
# No gdb or ld support yet.
- noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
+ noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
;;
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
i[[3456789]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
@@ -547,20 +583,25 @@ case "${target}" in
# Can't build gdb for mingw32 if not native.
case "${host}" in
i[[3456789]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
;;
esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
- # always build newlib.
- skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ # always build newlib if winsup directory is present.
+ if test -d "$srcdir/winsup"
+ then
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ else
+ echo "Warning: winsup is missing so newlib can't be built."
+ fi
# Can't build gdb for Cygwin if not native.
case "${host}" in
*-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
;;
esac
;;
@@ -612,17 +653,17 @@ case "${target}" in
;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
@@ -634,7 +675,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -643,8 +684,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
;;
mips*-*-irix5*)
- # The GNU linker does not support shared libraries.
- noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
mips*-*-irix6*)
# Linking libjava exceeds command-line length limits on at least
@@ -729,7 +769,7 @@ case "${target}" in
ip2k-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- *-*-linux*)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-lynxos*)
@@ -888,6 +928,9 @@ case "${host}" in
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
+ powerpc-*-darwin*)
+ host_makefile_frag="config/mh-ppc-darwin"
+ ;;
*-*-lynxos*)
# /bin/cc is less than useful for our purposes. Always use GCC
tentative_cc="/bin/gcc"
@@ -921,7 +964,6 @@ if test "${build}" != "${host}" ; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
- BISON=${BISON-bison}
CC=${CC-${host_alias}-gcc}
CFLAGS=${CFLAGS-"-g -O2"}
CXX=${CXX-${host_alias}-c++}
@@ -933,47 +975,6 @@ if test "${build}" != "${host}" ; then
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
BUILD_PREFIX=${build_alias}-
BUILD_PREFIX_1=${build_alias}-
- MAKEINFO=${MAKEINFO-makeinfo}
-
- if test -z "${YACC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/bison; then
- YACC="bison -y"
- break
- fi
- if test -f $dir/byacc; then
- YACC=byacc
- break
- fi
- if test -f $dir/yacc; then
- YACC=yacc
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${YACC}" ; then
- YACC="bison -y"
- fi
- fi
-
- if test -z "${LEX}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/flex; then
- LEX=flex
- break
- fi
- if test -f $dir/lex; then
- LEX=lex
- break
- fi
- done
- IFS="$save_ifs"
- LEX=${LEX-flex}
- fi
else
# Set reasonable default values for some tools even if not Canadian.
@@ -984,71 +985,18 @@ else
# in Makefile.in, so can still be overridden by fragments.
# This is all going to change when we autoconfiscate...
- BISON="\$(USUAL_BISON)"
CC_FOR_BUILD="\$(CC)"
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
BUILD_PREFIX=
BUILD_PREFIX_1=loser-
- MAKEINFO="\$(USUAL_MAKEINFO)"
- LEX="\$(USUAL_LEX)"
- YACC="\$(USUAL_YACC)"
-
- # If CC is still not set, try to get gcc.
- cc_prog_is_gcc=
- if test -z "${CC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- CC="gcc"
- cc_prog_is_gcc=yes
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- break
- fi
- done
- IFS="$save_ifs"
- CC=${CC-cc}
- else
- # Determine if we are using gcc.
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
- if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
- cc_prog_is_gcc=yes
- fi
- rm -f conftest.c
- if test -z "${CFLAGS}"; then
- # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
- # is set to a version of gcc.
- if test "$cc_prog_is_gcc" = yes; then
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- fi
- fi
- fi
+
+ AC_PROG_CC
# We must set the default linker to the linker used by gcc for the correct
# operation of libtool. If LD is not defined and we are using gcc, try to
# set the LD default to the ld used by gcc.
if test -z "$LD"; then
- if test "$cc_prog_is_gcc" = yes; then
+ if test "$GCC" = yes; then
case $build in
*-*-mingw*)
gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
@@ -1069,6 +1017,78 @@ EOF
fi
ACX_PROG_GNAT
+ACX_PROG_CMP_IGNORE_INITIAL
+
+# Check for GMP and MPFR
+gmplibs=
+gmpinc=
+have_gmp=yes
+# Specify a location for mpfr
+# check for this first so it ends up on the link line before gmp.
+AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH Specify source directory for MPFR library])
+
+if test "x$with_mpfr_dir" != x; then
+ gmpinc="-I$with_mpfr_dir/mpfr"
+ gmplibs="$with_mpfr_dir/libmpfr.a"
+else
+ gmplibs="-lmpfr"
+fi
+
+AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify directory for installed MPFR library])
+
+if test "x$with_mpfr" != x; then
+ gmplibs="-L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+fi
+
+# Specify a location for gmp
+AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library])
+
+if test "x$with_gmp_dir" != x; then
+ gmpinc="$gmpinc -I$with_gmp_dir"
+ if test -f "$with_gmp_dir/.libs/libgmp.a"; then
+ gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
+ elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
+ gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
+ fi
+ # One of the later tests will catch the error if neither library is present.
+else
+ gmplibs="$gmplibs -lgmp"
+fi
+
+AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library])
+
+if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib $gmplibs"
+ gmpinc="-I$with_gmp/include $gmpinc"
+fi
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $gmpinc"
+# Check GMP actually works
+AC_MSG_CHECKING([for correct version of gmp.h])
+AC_TRY_COMPILE([#include "gmp.h"],[
+#if __GNU_MP_VERSION < 3
+choke me
+#endif
+], [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no]); have_gmp=no])
+
+if test x"$have_gmp" = xyes; then
+ AC_MSG_CHECKING([for MPFR])
+
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $gmplibs"
+ AC_TRY_LINK([#include <gmp.h>
+#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
+ [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+fi
+
+# Flags needed for both GMP and/or MPFR
+AC_SUBST(gmplibs)
+AC_SUBST(gmpinc)
# By default, C is the only stage 1 language.
stage1_languages=c
@@ -1127,6 +1147,7 @@ if test -d ${srcdir}/gcc; then
new_enable_languages=c
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ potential_languages=c
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -1142,13 +1163,15 @@ if test -d ${srcdir}/gcc; then
lang_dirs=
boot_language=
build_by_default=
+ need_gmp=
. ${lang_frag}
+ potential_languages="${potential_languages},${language}"
# This is quite sensitive to the ordering of the case statement arms.
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
*::*:*)
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
- ;;
+ ;;
*:ada:no:*)
# Ada was requested with no preexisting GNAT. Disable unconditionally.
add_this_lang=no
@@ -1159,9 +1182,9 @@ if test -d ${srcdir}/gcc; then
;;
*,all,*:*:*:no)
# 'all' was selected, but this is not a default language
- # so do not include it.
+ # so do not include it.
add_this_lang=no
- ;;
+ ;;
*,all,*:*:*:*)
# 'all' was selected and this is a default language; include it.
add_this_lang=yes
@@ -1170,7 +1193,20 @@ if test -d ${srcdir}/gcc; then
add_this_lang=no
;;
esac
- case $add_this_lang in
+
+ # Disable languages that need GMP if it isn't available.
+ case ,${enable_languages},:${have_gmp}:${need_gmp} in
+ *,${language},*:no:yes)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([GMP with MPFR support is required to build $language])
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
+ case $add_this_lang in
no)
# Remove language-dependent dirs.
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
@@ -1193,7 +1229,8 @@ if test -d ${srcdir}/gcc; then
missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
if test "x$missing_languages" != x; then
AC_MSG_ERROR([
-The following requested languages were not found: ${missing_languages}])
+The following requested languages were not found: ${missing_languages}
+The available languages are: ${potential_languages}])
fi
if test "x$new_enable_languages" != "x$enable_languages"; then
@@ -1252,6 +1289,15 @@ fi
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
+build_configdirs_all="$build_configdirs"
+build_configdirs=
+for i in ${build_configdirs_all} ; do
+ j=`echo $i | sed -e s/build-//g`
+ if test -f ${srcdir}/$j/configure ; then
+ build_configdirs="${build_configdirs} $i"
+ fi
+done
+
configdirs_all="$configdirs"
configdirs=
for i in ${configdirs_all} ; do
@@ -1259,6 +1305,7 @@ for i in ${configdirs_all} ; do
configdirs="${configdirs} $i"
fi
done
+
target_configdirs_all="$target_configdirs"
target_configdirs=
for i in ${target_configdirs_all} ; do
@@ -1285,7 +1332,7 @@ if test -n "${notsupp}" && test -z "${norecursion}" ; then
appdirs=""
break
fi
- if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
@@ -1383,14 +1430,11 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
- i[[3456789]]86-*-netware*)
- target_makefile_frag="config/mt-netware"
- ;;
- powerpc-*-netware*)
+ *-*-netware*)
target_makefile_frag="config/mt-netware"
;;
- *-*-linux*)
- target_makefile_frag="config/mt-linux"
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ target_makefile_frag="config/mt-gnu"
;;
*-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
# nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
@@ -1471,7 +1515,6 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-
extra_host_args="$extra_host_args --with-newlib"
fi
-
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
@@ -1497,12 +1540,16 @@ esac
tooldir='${exec_prefix}'/${target_alias}
build_tooldir=${tooldir}
-# Generate default definitions for YACC, M4, LEX. These are used if the
-# Makefile can't locate these programs in objdir.
+# Generate default definitions for YACC, M4, LEX and other programs that run
+# on the build machine. These are used if the Makefile can't locate these
+# programs in objdir.
MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
-AC_CHECK_PROGS([DEFAULT_YACC], ['bison -y' byacc yacc], [$MISSING bison])
-AC_CHECK_PROGS([DEFAULT_M4], [gm4 gnum4 m4], [$MISSING m4])
-AC_CHECK_PROGS([DEFAULT_LEX], [flex lex], [$MISSING flex])
+AC_CHECK_PROGS([CONFIGURED_BISON], [bison], [$MISSING bison])
+AC_CHECK_PROGS([CONFIGURED_YACC], ['bison -y' byacc yacc], [$MISSING bison -y])
+AC_CHECK_PROGS([CONFIGURED_M4], [gm4 gnum4 m4], [$MISSING m4])
+AC_CHECK_PROGS([CONFIGURED_FLEX], [flex], [$MISSING flex])
+AC_CHECK_PROGS([CONFIGURED_LEX], [flex lex], [$MISSING flex])
+AC_CHECK_PROGS([CONFIGURED_MAKEINFO], makeinfo, [$MISSING makeinfo])
# Create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
@@ -1585,17 +1632,7 @@ esac
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-
-# This is the final value for target_configdirs. configdirs already
-# has its final value, as does build_modules. It's time to create some
-# lists of valid targets.
-
-all_build_modules=
-configure_build_modules=
-for module in ${build_modules} ; do
- all_build_modules=all-build-${module}
- configure_build_modules=configure-build-${module}
-done
+build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
@@ -1605,7 +1642,7 @@ done
# leave out the maybe dependencies when enable_gdbtk is false. I'm not
# 100% sure that that's safe though.
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
case "$enable_gdbtk" in
no)
GDB_TK="" ;;
@@ -1623,31 +1660,89 @@ case "$enable_gdbtk" in
;;
esac
-# Create the 'maybe dependencies'. This uses a temporary file.
+# Strip out unwanted targets.
# While at that, we remove Makefiles if we were started for recursive
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-# Make-targets which may need maybe dependencies.
-mts="configure all install check clean distclean dvi info install-info"
-mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
+# Loop over modules. $extrasub must be used with care, limiting as
+# much as possible the usage of range addresses. That's because autoconf
+# splits the sed script to overcome limits in the number of commands,
+# and relying on carefully-timed sed passes may turn out to be very hard
+# to maintain later. In this particular case, you just have to be careful
+# not to nest @if/@endif pairs, because configure will not warn you at all.
+
+AC_ARG_ENABLE([bootstrap],
+[ --enable-bootstrap[=lean] Enable bootstrapping [no]],,
+enable_bootstrap=default)
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+case "$configdirs" in
+ *gcc*) have_compiler=yes ;;
+ *) have_compiler=no ;;
+esac
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
-# Loop over modules and make-targets.
-for module in ${build_modules} ; do
+ # Default behavior. (We'll) enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ # This will become 'yes'
+ enable_bootstrap=no ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes | yes:$build:$build:lean)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes | yes:*:*:lean)
+ AC_MSG_WARN([trying to bootstrap a cross compiler])
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes | no:*:*:lean)
+ AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
+
+ # Fail if wrong command line
+ *)
+ AC_MSG_ERROR([invalid option for --enable-bootstrap])
+ ;;
+esac
+
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case "$enable_bootstrap" in
+ yes)
+ bootstrap_lean='#'
+ default_target=bootstrap
+ bootstrap_suffix=bootstrap ;;
+ lean)
+ bootstrap_lean=''
+ default_target=bootstrap
+ bootstrap_suffix=bootstrap ;;
+ no)
+ default_target=all
+ bootstrap_suffix=no-bootstrap ;;
+esac
+AC_SUBST(bootstrap_lean)
+AC_SUBST(default_target)
+
+for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- case ${mt} in
- install) ;; # No installing build modules.
- *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
- esac
- done
+ extrasub="$extrasub
+/^@if build-$module\$/d
+/^@endif build-$module\$/d
+/^@if build-$module-$bootstrap_suffix\$/d
+/^@endif build-$module-$bootstrap_suffix\$/d"
done
for module in ${configdirs} ; do
if test -z "${no_recursion}" \
@@ -1655,9 +1750,11 @@ for module in ${configdirs} ; do
echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
rm -f ${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if $module\$/d
+/^@endif $module\$/d
+/^@if $module-$bootstrap_suffix\$/d
+/^@endif $module-$bootstrap_suffix\$/d"
done
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
@@ -1665,12 +1762,15 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if target-$module\$/d
+/^@endif target-$module\$/d
+/^@if target-$module-$bootstrap_suffix\$/d
+/^@endif target-$module-$bootstrap_suffix\$/d"
done
-maybe_dependencies=maybedep.tmp
-AC_SUBST_FILE(maybe_dependencies)
+
+extrasub="$extrasub
+/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -1733,21 +1833,21 @@ AC_SUBST_FILE(serialization_dependencies)
# at the end of the argument list.
# These will be expanded by make, so quote '$'.
cat <<\EOF_SED > conftestsed
-s/ --no[[^ ]]* / /
-s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / /
-s/ -cache-file[[= ]][[^ ]]* / /
-s/ -srcdir[[= ]][[^ ]]* / /
-s/ -host[[= ]][[^ ]]* / /
-s/ -build[[= ]][[^ ]]* / /
-s/ -target[[= ]][[^ ]]* / /
-s/ -program-prefix[[= ]][[^ ]]* / /
-s/ -program-suffix[[= ]][[^ ]]* / /
-s/ -program-transform-name[[= ]][[^ ]]* / /
+s/ --no[[^ ]]*/ /g
+s/ --c[[a-z-]]*[[= ]][[^ ]]*//g
+s/ --sr[[a-z-]]*[[= ]][[^ ]]*//g
+s/ --ho[[a-z-]]*[[= ]][[^ ]]*//g
+s/ --bu[[a-z-]]*[[= ]][[^ ]]*//g
+s/ --t[[a-z-]]*[[= ]][[^ ]]*//g
+s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]*//g
+s/ -cache-file[[= ]][[^ ]]*//g
+s/ -srcdir[[= ]][[^ ]]*//g
+s/ -host[[= ]][[^ ]]*//g
+s/ -build[[= ]][[^ ]]*//g
+s/ -target[[= ]][[^ ]]*//g
+s/ -program-prefix[[= ]][[^ ]]*//g
+s/ -program-suffix[[= ]][[^ ]]*//g
+s/ -program-transform-name[[= ]][[^ ]]*//g
s/ [[^' -][^ ]*] / /
s/^ *//;s/ *$//
s,\$,$$,g
@@ -1935,6 +2035,20 @@ else
fi
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${srcdir}/gcc; then
+ GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
+elif test "$host" = "$target"; then
+ GFORTRAN_FOR_TARGET='gfortran'
+else
+ GFORTRAN_FOR_TARGET=`echo gfortran | sed "${program_transform_name}"`
+fi
+case $GFORTRAN_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+
# Don't use libstdc++-v3's flags to configure/build itself.
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
@@ -1976,16 +2090,20 @@ qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
+GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+do
+ eval fragval=\$$frag
+ if test $fragval != /dev/null; then
+ eval $frag=${srcdir}/$fragval
+ fi
+done
AC_SUBST_FILE(host_makefile_frag)
AC_SUBST_FILE(target_makefile_frag)
AC_SUBST_FILE(alphaieee_frag)
@@ -2006,8 +2124,7 @@ AC_SUBST(libstdcxx_incdir)
# Build module lists & subconfigure args.
AC_SUBST(build_configargs)
-AC_SUBST(configure_build_modules)
-AC_SUBST(all_build_modules)
+AC_SUBST(build_configdirs)
# Host module lists & subconfigure args.
AC_SUBST(host_configargs)
@@ -2018,11 +2135,7 @@ AC_SUBST(target_configargs)
AC_SUBST(target_configdirs)
# Build tools.
-AC_SUBST(BISON)
AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(LEX)
-AC_SUBST(MAKEINFO)
-AC_SUBST(YACC)
AC_SUBST(config_shell)
# Host tools.
@@ -2040,23 +2153,21 @@ AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS)
-AC_SUBST(DEFAULT_YACC)
-AC_SUBST(DEFAULT_LEX)
-AC_SUBST(DEFAULT_M4)
# Target tools.
-NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
-NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
-NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
-NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
-NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
-NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
-NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AS_FOR_TARGET, as)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_DLLTOOL_FOR_TARGET, dlltool)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_LD_FOR_TARGET, ld)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_NM_FOR_TARGET, nm)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_RANLIB_FOR_TARGET, ranlib, :)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_WINDRES_FOR_TARGET, windres)
AC_SUBST(GCC_FOR_TARGET)
AC_SUBST(FLAGS_FOR_TARGET)
AC_SUBST(CC_FOR_TARGET)
AC_SUBST(GCJ_FOR_TARGET)
+AC_SUBST(GFORTRAN_FOR_TARGET)
AC_SUBST(CXX_FOR_TARGET)
AC_SUBST(RAW_CXX_FOR_TARGET)
AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
@@ -2077,7 +2188,24 @@ if test "x${build}" = "x${host}" ; then
NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
+else
+ # Just use the ones we found.
+ AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
+ AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
+ DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
+ LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
+ NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
+ RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
+ WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"
fi
+AC_SUBST(AR_FOR_TARGET)
+AC_SUBST(AS_FOR_TARGET)
+AC_SUBST(DLLTOOL_FOR_TARGET)
+AC_SUBST(LD_FOR_TARGET)
+AC_SUBST(NM_FOR_TARGET)
+AC_SUBST(RANLIB_FOR_TARGET)
+AC_SUBST(WINDRES_FOR_TARGET)
+
# Certain tools may need extra flags.
AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
@@ -2124,6 +2252,36 @@ case $build in
esac
AC_SUBST(stage1_cflags)
+# It makes debugging easier if we create as symlinks the stage directories
+# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
+# possible, however, we can resort to mv.
+AC_CACHE_CHECK([if symbolic links between directories work],
+[gcc_cv_prog_ln_s_dir],
+[if test "${LN_S}" = "ln -s" \
+ && mkdir confdir.s1 \
+ && ln -s confdir.s1 confdir.s2 \
+ && echo timestamp1 > confdir.s1/conftest.1 \
+ && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \
+ && echo timestamp2 > confdir.s2/conftest.2 \
+ && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \
+ && rm -f confdir.s2; then
+ gcc_cv_prog_ln_s_dir=yes
+else
+ gcc_cv_prog_ln_s_dir=yes
+fi
+rm -rf confdir.s1 confdir.s2])
+
+case ${gcc_cv_prog_ln_s_dir} in
+ yes)
+ CREATE_LINK_TO_DIR='ln -s $$1 $$2'
+ UNDO_LINK_TO_DIR='rm -f $$1' ;;
+ *)
+ CREATE_LINK_TO_DIR='mv $$1 $$2'
+ UNDO_LINK_TO_DIR='mv $$1 $$2' ;;
+esac
+AC_SUBST(CREATE_LINK_TO_DIR)
+AC_SUBST(UNDO_LINK_TO_DIR)
+
# Enable -Werror in bootstrap stage2 and later.
# Change the default to "no" on release branches.
AC_ARG_ENABLE(werror,
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b2a9ad26a81..7043f68e107 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7065 @@
+2004-09-14 Andrew Cagney <cagney@gnu.org>
+
+ * MAINTAINERS: Add Michael Chastain as the backup gdb.threads
+ maintainer.
+
+ * thread-db.c (thread_db_new_objfile): Assume that there is a
+ child process.
+
+2004-09-13 Jim Blandy <jimb@redhat.com>
+
+ * valops.c (value_assign): Move 'buffer' to the enclosing block,
+ so that its storage isn't referenced after its lifetime ends.
+
+ * valops.c (value_assign): 'use_buffer' is initialized to zero,
+ and never assigned to. Delete it, and the 'if (use_buffer)'
+ clauses. Delete 'raw_buffer', since it is now unused.
+
+2004-09-13 Andrew Cagney <cagney@gnu.org>
+
+ * configure.in (frags): Replace TM_FILE with DEPRECATED_TM_FILE.
+ * configure: Re-generate.
+ * nlm/Makefile.in (TAGS): Update.
+ * Makefile.in (TAGS): Update.
+ * config/vax/nbsd.mt (TM_FILE): Update.
+ * config/sparc/vxworks.mt (TM_FILE): Update.
+ * config/sparc/sol2.mt (TM_FILE): Update.
+ * config/sparc/sol2-64.mt (TM_FILE): Update.
+ * config/sparc/obsd64.mt (TM_FILE): Update.
+ * config/sparc/obsd.mt (TM_FILE): Update.
+ * config/sparc/nbsd64.mt (TM_FILE): Update.
+ * config/sparc/nbsd.mt (TM_FILE): Update.
+ * config/sparc/linux64.mt (TM_FILE): Update.
+ * config/sparc/linux.mt (TM_FILE): Update.
+ * config/sparc/fbsd.mt (TM_FILE): Update.
+ * config/sh/wince.mt (TM_FILE): Update.
+ * config/sh/nbsd.mt (TM_FILE): Update.
+ * config/sh/linux.mt (TM_FILE): Update.
+ * config/sh/embed.mt (TM_FILE): Update.
+ * config/s390/s390.mt (TM_FILE): Update.
+ * config/rs6000/rs6000lynx.mt (TM_FILE): Update.
+ * config/rs6000/rs6000.mt (TM_FILE): Update.
+ * config/rs6000/aix4.mt (TM_FILE): Update.
+ * config/powerpc/vxworks.mt (TM_FILE): Update.
+ * config/powerpc/ppc-sim.mt (TM_FILE): Update.
+ * config/powerpc/ppc-eabi.mt (TM_FILE): Update.
+ * config/powerpc/obsd.mt (TM_FILE): Update.
+ * config/powerpc/nbsd.mt (TM_FILE): Update.
+ * config/powerpc/linux.mt (TM_FILE): Update.
+ * config/powerpc/aix.mt (TM_FILE): Update.
+ * config/pa/obsd.mt (TM_FILE): Update.
+ * config/pa/linux.mt (TM_FILE): Update.
+ * config/pa/hppahpux.mt (TM_FILE): Update.
+ * config/pa/hppa64.mt (TM_FILE): Update.
+ * config/pa/hppa.mt (TM_FILE): Update.
+ * config/ns32k/nbsdaout.mt (TM_FILE): Update.
+ * config/mips/wince.mt (TM_FILE): Update.
+ * config/mips/vxmips.mt (TM_FILE): Update.
+ * config/mips/nbsd.mt (TM_FILE): Update.
+ * config/mips/linux.mt (TM_FILE): Update.
+ * config/mips/irix6.mt (TM_FILE): Update.
+ * config/mips/irix5.mt (TM_FILE): Update.
+ * config/mips/embed.mt (TM_FILE): Update.
+ * config/m68k/vxworks68.mt (TM_FILE): Update.
+ * config/m68k/st2000.mt (TM_FILE): Update.
+ * config/m68k/os68k.mt (TM_FILE): Update.
+ * config/m68k/obsd.mt (TM_FILE): Update.
+ * config/m68k/nbsd.mt (TM_FILE): Update.
+ * config/m68k/monitor.mt (TM_FILE): Update.
+ * config/m68k/linux.mt (TM_FILE): Update.
+ * config/m68k/cisco.mt (TM_FILE): Update.
+ * config/ia64/linux.mt (TM_FILE): Update.
+ * config/ia64/aix.mt (TM_FILE): Update.
+ * config/ia64/ia64.mt (TM_FILE): Update.
+ * config/i386/vxworks.mt (TM_FILE): Update.
+ * config/i386/obsd64.mt (TM_FILE): Update.
+ * config/i386/obsd.mt (TM_FILE): Update.
+ * config/i386/nto.mt (TM_FILE): Update.
+ * config/i386/nbsd64.mt (TM_FILE): Update.
+ * config/i386/nbsd.mt (TM_FILE): Update.
+ * config/i386/linux64.mt (TM_FILE): Update.
+ * config/i386/linux.mt (TM_FILE): Update.
+ * config/i386/i386sol2.mt (TM_FILE): Update.
+ * config/i386/i386lynx.mt (TM_FILE): Update.
+ * config/i386/fbsd64.mt (TM_FILE): Update.
+ * config/i386/fbsd.mt (TM_FILE): Update.
+ * config/i386/cygwin.mt (TM_FILE): Update.
+ * config/h8300/h8300.mt (TM_FILE): Update.
+ * config/frv/frv.mt (TM_FILE): Update.
+ * config/cris/cris.mt (TM_FILE): Update.
+ * config/arm/wince.mt (TM_FILE): Update.
+ * config/arm/nbsd.mt (TM_FILE): Update.
+ * config/arm/linux.mt (TM_FILE): Update.
+ * config/arm/embed.mt (TM_FILE): Update.
+ * config/alpha/nbsd.mt (TM_FILE): Update.
+ * config/alpha/fbsd.mt (TM_FILE): Update.
+ * config/alpha/alpha.mt (TM_FILE): Update.
+ * config/alpha/alpha-osf1.mt (TM_FILE): Update.
+ * config/alpha/alpha-linux.mt (TM_FILE): Update.
+
+ Eliminate event_loop_p, always has the value 1.
+ * defs.h (event_loop_p): Delete macro.
+ * breakpoint.c (until_break_command): Simplify.
+ * utils.c (prompt_for_continue): Simplify.
+ * tracepoint.c (read_actions): Simplify.
+ * top.c (throw_exception, execute_command, gdb_readline_wrapper)
+ (gdb_rl_operate_and_get_next, command_line_input, get_prompt)
+ (set_prompt, init_main): Simplify.
+ (init_signals, disconnect): Delete, unused.
+ * remote.c (remote_async_resume)
+ (extended_remote_async_create_inferior): Simplify.
+ * mi/mi-interp.c (mi_input): Delete, unused.
+ (mi_interpreter_resume, mi_command_loop): Simplify.
+ * interps.c (current_interp_command_loop): Simplify.
+ * infrun.c (proceed): Simplify.
+ * infcmd.c (run_command, continue_command, step_1, jump_command)
+ (until_command, advance_command, finish_command)
+ (interrupt_target_command): Simplify.
+ * event-top.c (gdb_setup_readline, gdb_disable_readline): Simplify.
+
+ * config/i386/nm-i386.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
+ * config/s390/nm-linux.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
+ * config/pa/nm-hppah.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
+ * config/ia64/nm-linux.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
+ * config/frv/tm-frv.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
+ * mips-tdep.c (mips_dump_tdep): Do not print same.
+
+2004-09-12 Andrew Cagney <cagney@gnu.org>
+
+ * valprint.c (print_longest): Use fputs_filtered. Make "val"
+ const.
+ * Makefile.in (valprint.o): Delete explict rule.
+
+ * config/m68k/nbsdelf.mh: Add missing trailing newline. Problem
+ reported by Dave Anderson.
+
+ * target.c (target_info): Delete #ifdef call to FILES_INFO_HOOK.
+
+ * inferior.h (STORE_STRUCT_RETURN): Delete macro.
+
+2004-09-12 Salvador E. Tropea <set@users.sf.net>
+ Andrew Cagney <cagney@gnu.org>
+
+ * mi/mi-main.c (mi_cmd_data_list_changed_registers)
+ (mi_cmd_data_list_register_values)
+ (mi_cmd_data_write_register_values): Include the PSEUDO_REGS in
+ the register number computation.
+
+2004-09-12 Andrew Cagney <cagney@gnu.org>
+
+ * ppcnbsd-nat.c: Include "inf-ptrace.h".
+ (ppcnbsd_fetch_inferior_registers): Rename fetch_inferior_registers.
+ (ppcnbsd_store_inferior_registers): Rename store_inferior_registers.
+ (_initialize_ppcnbsd_nat): Create and add a NetBSD/PPC ptrace
+ target.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Replace and inftarg.o with
+ inf-ptrace.o and inf-child.o.
+ * inf-ptrace.h, inf-ptrace.c, inf-child.h, inf-child.c: New files.
+ * Makefile.in: Update dependencies.
+
+2004-09-11 Andrew Cagney <cagney@gnu.org>
+
+ * language.c (hex_string, hex_string_custom): Move from here ...
+ * utils.c (hex_string, hex_string_custom): ... to here, rewrite.
+ (CELLSIZE): Increase to 50.
+ * language.h (hex_string, hex_string_custom): Move from here ...
+ * defs.h: ... to here.
+ * Makefile.in: Update all dependencies.
+
+2004-09-11 Paul N. Hilfinger <hilfinger@gnat.com>
+
+ * language.c (local_hex_format_custom): Remove.
+ (local_hex_string): Rename to hex_string, use C format, and move to
+ utils.c
+ (local_hex_string_custom): Rename to hex_string_custom and change
+ interface. Now uses C format. Move to utils.c
+ (local_octal_format_custom): Remove.
+ (local_decimal_format_custom): Remove.
+ (unknown_language_defn): Remove language-specific number
+ formatting entries.
+ (auto_language_defn): Ditto.
+ (local_language_defn): Ditto.
+ * language.h (struct language_format_info): Delete declaration.
+ (struct language_defn): Remove language_format_info fields
+ la_binary_format, la_octal_format, la_decimal_format, la_hex_format.
+ (local_binary_format): Remove macro.
+ (local_binary_format_prefix): Remove macro.
+ (local_binary_format_specifier): Remove macro.
+ (local_binary_format_suffix): Remove macro.
+ (local_octal_format): Remove macro.
+ (local_octal_format_prefix): Remove macro.
+ (local_octal_format_specifier): Remove macro.
+ (local_octal_format_suffix): Remove macro.
+ (local_decimal_format): Remove macro.
+ (local_decimal_format_prefix): Remove macro.
+ (local_decimal_format_specifier): Remove macro.
+ (local_decimal_format_suffix): Remove macro.
+ (local_hex_format): Remove macro.
+ (local_hex_format_prefix): Remove macro.
+ (local_hex_format_specifier): Remove macro.
+ (local_hex_format_suffix): Remove macro.
+ (local_decimal_format_custom): Remove.
+ (local_octal_format_custom): Remove.
+ (local_hex_format_custom): Remove.
+ (local_hex_string): Rename to hex_string and move to defs.h.
+ (local_hex_string_custom): Rename to hex_string_custom, change
+ interface, and move to defs.h.
+ * utils.c: (int_string): New function.
+ (hex_string): New function (from language.c).
+ (hex_string_custom): New function (from language.c).
+ (octal2str): New function.
+ (decimal2str): Add width parameter.
+ (paddr_u): Use new decimal2str interface.
+ (paddr_d): Ditto.
+ * defs.h (hex_string): Declare.
+ (hex_string_custom): Declare.
+ (int_string): Declare.
+ * printcmd.c (print_scalar_formatted): Remove localized binary
+ formatting.
+ * valprint.c (print_longest): Use int_string.
+ (print_floating): Use C hex format.
+ (print_hex_chars): Ditto.
+ (print_binary_chars): Remove language-specific formatting.
+ (print_octal_chars): Use C octal format.
+ (print_decimal_chars): Delocalize format.
+ (print_decimal): Remove.
+ * ada-lang.c (ada_language_defn): Remove language-specific number
+ formatting entries.
+ * p-lang.c (pascal_language_defn): Ditto.
+ * c-lang.c (c_language_defn): Ditto.
+ (cplus_language_defn): Ditto.
+ (asm_language_defn): Ditto.
+ (minimal_language_defn): Ditto.
+ * f-lang.c (f_language_defn): Ditto.
+ * jv-lang.c (java_language_defn): Ditto.
+ * m2-lang.c (m2_language_defn): Ditto.
+ * scm-lang.c (scm_language_defn): Ditto.
+ * objc-lang.c (objc_language_defn): Ditto.
+ * memattr.c (mem_info_command): Use renamed hex_string_custom with
+ new interface.
+ * pa64solib.c (pa64_sharedlibrary_info_command): Ditto.
+ * ui-out.c (ui_out_field_core_addr): Ditto.
+ * breakpoint.c (breakpoint_adjustment_warning): Ditto.
+ * exec.c (print_section_info): Ditto.
+ * i387-tdep.c (print_i387_status_word): Ditto.
+ (print_i387_control_word): Ditto.
+ (i387_print_float_info): Ditto.
+ * maint.c (maint_print_section_info): Ditto.
+ * solib.c (info_sharedlibrary_command): Ditto.
+ * somsolib.c (som_sharedlibrary_info_command): Ditto.
+ * symtab.c (print_msymbol_info): Ditto.
+ * tracepoint.c (tracepoints_info): Ditto.
+ * solib-frv.c (lm_base): Ditto.
+ (frv_current_sos): Ditto.
+ (enable_break2): Ditto.
+ (enable_break): Ditto.
+ * dbxread.c (read_dbx_symtab): Use renamed hex_string.
+ (process_one_symbol): Ditto.
+ * infcmd.c (program_info): Ditto.
+ * mdebugread.c (parse_partial_symbols): Ditto.
+ * symfile.c (add_symbol_file_command): Ditto.
+ * cli/cli-cmds.c (edit_command): Ditto.
+ (list_command): Ditto.
+ * infcall.c (call_function_by_hand): Ditto.
+ * remote-vx.c (vx_run_files_info): Ditto.
+ (vx_wait): Ditto.
+ (vx_attach): Ditto.
+ (vx_detach): Ditto.
+ (vx_kill): Ditto.
+ * aix-thread.c (pdc_symbol_addrs): Ditto.
+ (pdc_read_regs): Ditto.
+ (pdc_write_regs): Ditto.
+ (pdc_read_data): Ditto.
+ (pdc_write_data): Ditto.
+ * d10v-tdep.c (display_trace): Ditto.
+ * rs6000-nat.c (find_toc_address): Ditto.
+ * aix-thread.c: Don't include language.h.
+ * buildsym.c: Ditto.
+ * dbxread.c: Ditto.
+ * mdebugread.c: Ditto.
+ * rs6000-nat.c: Ditto.
+ * buildsym.c (make_blockvector): Use renamed hex_string.
+
+2004-09-10 Jason Molenda (jmolenda@apple.com)
+
+ * cli/cli-script.c (read_next_line): Accept zero or more whitespace
+ chars after 'if' or 'while' commands in user-defined commands.
+
+2004-09-08 Jim Blandy <jimb@redhat.com>
+
+ Fix bug reported and analyzed by Olivier Crete:
+ * symfile.c (copy_section_addr_info): New function.
+ (symbol_file_add_with_addrs_or_offsets): Use it to save the
+ original set of address arguments, instead of handwritten code
+ that uses one length to allocate and a different length to
+ initialize. Use make_cleanup_free_section_addr_info.
+ * symfile.h (copy_section_addr_info): New declaration.
+ * utils.c: #include "symfile.h".
+ (do_free_section_addr_info, make_cleanup_free_section_addr_info):
+ New functions.
+ * defs.h (make_cleanup_free_section_addr_info): New declaration.
+ * Makefile.in (utils.o): Update dependencies.
+
+2004-09-08 Andrew Cagney <cagney@gnu.org>
+
+ * thread-db.c (keep_thread_db): Delete.
+ (thread_db_new_objfile, thread_db_create_inferior)
+ (thread_db_mourn_inferior): Simplify assuming !keep_thread_db.
+
+2004-09-08 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (FPC_REGNUM, FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM)
+ (FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM)
+ (FOP_REGNUM, XMM0_REGNUM, MXCSR_REGNUM): Remove macros.
+ (i386_frameless_signal_p): Remove prototype.
+ * i386-linux-nat.c (GETFPREGS_SUPPLIES): Remove macro.
+ (GETFPXREGS_SUPPLIES): Define using I386_ST0_REGNUM and
+ I386_SSE_NUM_REGS.
+ * i386-nto-tdep.c (i386nto_supply_gregset): Use I386_NUM_GREGS
+ instead of FP0_REGNUM.
+ (i386nto_regset_id): Use I386_NUM_GREGS and I386_NUM_FREGS instead
+ of FP0_REGNUM and FPC_REGNUM.
+
+ * solib-sunos.c (sunos_relocate_main_executable): Remove function.
+ (sunos_solib_create_inferior_hook): Don't call
+ sunos_relocate_main_executable.
+
+ * sparcnbsd-tdep.c (sparc32nbsd_elf_init_abi): Set
+ solib_svr4_fetch_link_map_offsets to
+ svr4_ilp32_fetch_link_map_offsets.
+ * sparcobsd-tdep.c: Don't include "nbsd-tdep.h".
+ (sparc32obsd_init_abi): Set solib_svr4_fetch_link_map_offsets to
+ svr4_ilp32_fetch_link_map_offsets.
+ * Makefile.in (sparcobsd-tdep.o): Update dependencies.
+
+2004-09-07 Jim Blandy <jimb@redhat.com>
+
+ * frame.h (frame_register): Doc fix.
+
+2004-09-07 Andrew Cagney <cagney@gnu.org>
+
+ * vx-share/wait.h: Delete #ifdef USG.
+ * utils.c (request_quit): Ditto.
+ * tui/tui.c (tui_reset): Ditto.
+ * remote.c: Ditto.
+ * remote-sds.c: Ditto.
+ * remote-rdi.c: Ditto.
+ * mdebugread.c: Ditto.
+ * m68klinux-nat.c: Ditto.
+ * infttrace.c: Ditto.
+ * infptrace.c: Ditto.
+ * i386v-nat.c: Ditto.
+ * exec.c: Ditto.
+ * dbxread.c: Ditto.
+ * core-aout.c: Ditto.
+
+2004-09-05 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (mips_insn16_frame_cache): Fix parameter in call to
+ heuristic_proc_desc.
+ (mips_insn32_frame_cache): Likewise.
+
+2004-09-04 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (mips32_heuristic_proc_desc): Remove code that was
+ left behind by error.
+
+2004-09-04 Joel Brobecker <brobecker@gnat.com>
+
+ * config/alpha/nm-osf.h (PTRACE_ARG3_TYPE): Remove define.
+ * config/powerpc/nm-aix.h (PTRACE_ARG3_TYPE): Likewise.
+
+2004-09-04 Joel Brobecker <brobecker@gnat.com>
+
+ * config/rs6000/xm-aix4.h: Remove this file.
+ * config/rs6000/aix4.mh (XM_FILE): Delete.
+
+2004-09-04 Joel Brobecker <brobecker@gnat.com>
+
+ * config/rs6000/xm-rs6000.h: Remove this file.
+ * config/rs6000/rs6000.mh (XM_FILE): Remove.
+
+2004-09-03 Andrew Cagney <cagney@gnu.org>
+
+ * mips-tdep.c (PROC_DESC_IS_DUMMY, SET_PROC_DESC_IS_DUMMY)
+ (_PROC_MAGIC_, after_prologue, mips_dump_tdep): Delete macros and
+ only use.
+
+ * mips-tdep.c (temp_saved_regs): Delete.
+ (set_reg_offset): Replace saved_regs parameter with this_cache.
+ (heuristic_proc_desc, mips16_heuristic_proc_desc)
+ (mips32_heuristic_proc_desc): Add this_cache parameter.
+ (mips_insn32_frame_cache, mips_insn16_frame_cache)
+ (after_prologue): Pass a NULL this_cache.
+
+ * mips-tdep.c (mips_mdebug_frame_cache): Delete code handling
+ non-kernel trap prologues.
+
+ * mips-tdep.c (find_proc_desc): Delete function.
+ (mips_mdebug_frame_cache): Inline call to find_proc_desc,
+ simplify.
+ (mips_insn16_frame_cache): Replace find_proc_desc with code from
+ mips_insn32_frame_cache.
+
+ * mips-tdep.c (after_prologue): Inline call to find_proc_desc.
+ Simplify as NEXT_FRAME is NULL.
+ (find_proc_desc): Simplify as NEXT_FRAME is non-NULL.
+
+ * mips-tdep.c (after_prologue): Replace proc_desc parameter with
+ local variable.
+ (mips_skip_prologue): Update.
+
+ * mips-tdep.c (find_proc_desc, heuristic_proc_desc): Delete
+ "cur_frame" parameter.
+ (after_prologue, mips_mdebug_frame_cache, mips_insn16_frame_cache):
+ (mips_insn32_frame_cache, find_proc_desc): Update
+
+ * config/vax/nm-obsd.h: Delete file.
+ * config/vax/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
+ * config/vax/nm-nbsd.h: Delete file.
+ * config/vax/nm-nbsdaout.h: Include config/nm-nbsd.h.
+ * config/vax/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/sh/nm-nbsd.h: Delete file.
+ * config/sh/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/rs6000/nm-rs6000ly.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not rename nm-rs6000ly.h.
+ * config/rs6000/rs6000lynx.mh (NAT_FILE): Set to config/nm-lynx.h.
+ * config/powerpc/nm-obsd.h: Delete file.
+ * config/powerpc/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
+ * config/powerpc/nm-nbsd.h: Delete file.
+ * config/powerpc/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/pa/nm-obsd.h: Delete file.
+ * config/pa/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
+ * config/mips/nm-nbsd.h: Delete file.
+ * config/mips/nbsd.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/m88k/nm-obsd.h: Delete file.
+ * config/m88k/obsd.mh (NAT_FILE): Set to config/nm-bsd.h.
+ * config/m68k/nm-nbsd.h: Delete file.
+ * config/m68k/nm-nbsdaout.h: Include config/nm-nbsd.h.
+ * config/m68k/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/i386/nm-nbsd.h: Delete file.
+ * config/i386/nm-nbsdaout.h: Include config/nm-nbsd.h.
+ * config/i386/obsd64.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/i386/nbsd64.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/i386/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
+ * config/i386/nm-i386lynx.h: Delete file.
+ * config/i386/i386lynx.mh (NAT_FILE): Set to config/nm-lynx.h.
+ * config/arm/nm-nbsd.h: Delete file.
+ * config/arm/nm-nbsdaout.h: Include config/nm-nbsd.h.
+ * config/arm/nbsdelf.mh (NAT_FILE): Set to config/nm-nbsd.h.
+
+ * config/i386/tm-fbsd.h: Delete file.
+ * config/i386/fbsd64.mt (TM_FILE): Set to solib.h.
+ * config/i386/fbsd.mt (TM_FILE): Set to solib.h.
+
+ * config/rs6000/tm-rs6000-aix4.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not rename tm-rs6000-aix4.h.
+ * config/rs6000/aix4.mt (TM_FILE): Set to
+ config/rs6000/tm-rs6000.h.
+ * config/powerpc/tm-ppc-aix.h: Delete file.
+ * config/powerpc/aix.mt (TM_FILE): Set to
+ config/rs6000/tm-rs6000.h.
+ * config/m68k/tm-linux.h: Delete file.
+ * config/m68k/linux.mt (TM_FILE): Set to solib.h
+ * config/i386/tm-linux64.h: Delete file.
+ * config/i386/linux64.mt (TM_FILE): Set to solib.h.
+ * config/djgpp/fnchange.lst: Do not rename tm-linux.h.
+
+ * config/m68k/tm-linux.h (SVR4_SHARED_LIBS): Delete.
+ * config/i386/tm-linux64.h (SVR4_SHARED_LIBS): Delete.
+ * config/i386/nm-i386sco5.h (SVR4_SHARED_LIBS): Delete.
+ * config/tm-linux.h (SVR4_SHARED_LIBS): Delete.
+ * config/nm-sysv4.h (SVR4_SHARED_LIBS): Delete.
+ * config/nm-linux.h (SVR4_SHARED_LIBS): Delete.
+ * config/nm-gnu.h (SVR4_SHARED_LIBS): Delete.
+ * sh64-tdep.c [SVR4_SHARED_LIBS]: Delete #ifdef wrapper.
+ * sh-tdep.c [SVR4_SHARED_LIBS]: Delete #ifdef wrapper.
+
+ * configure.in (GDB_TM_FILE): Fix typo, use gdb_target_cpu and not
+ gdb_host_cpu.
+
+2004-09-02 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (mips_insn32_frame_cache): Remove some dead code.
+ Minor reformatting. Some code factoring.
+
+2004-09-02 Andrew Cagney <cagney@gnu.org>
+
+ * config/vax/nbsd.mt (TM_FILE): Set to solib.h.
+ * config/vax/tm-nbsd.h: Delete file.
+ * config/sparc/vxworks.mt (TM_FILE): Set to config/tm-vxworks.h.
+ * config/sparc/tm-vxworks.h: Delete file.
+ * config/sparc/nbsd.mt (TM_FILE): Set to solib.h.
+ * config/sparc/tm-nbsd.h: Delete file.
+ * config/sparc/linux64.mt (TM_FILE): Set to solib.h.
+ * config/sparc/linux.mt (TM_FILE): Set to solib.h.
+ * config/sparc/tm-linux.h: Delete file.
+ * config/s390/s390.mt (TM_FILE): Set to config/tm-linux.h
+ * config/s390/tm-linux.h: Delete file.
+ * config/pa/obsd.mt (TM_FILE): Set to solib.h.
+ * config/pa/tm-bsd.h: Delete file.
+ * config/m68k/obsd.mt (TM_FILE): Set to solib.h.
+ * config/m68k/tm-obsd.h: Delete file.
+ * config/m68k/nbsd.mt (TM_FILE): Set to solib.h.
+ * config/m68k/tm-nbsd.h: Delete file.
+ * config/i386/vxworks.mt (TM_FILE): Set to config/tm-vxworks.h.
+ * config/i386/tm-vxworks.h: Delete file.
+ * config/i386/obsd64.mt (TM_FILE): Set to solib.h.
+ * config/i386/obsd.mt (TM_FILE): Set to solib.h.
+ * config/i386/nbsd64.mt (TM_FILE): Set to solib.h.
+ * config/i386/nbsd.mt (TM_FILE): Set to solib.h.
+ * config/i386/tm-nbsd.h: Delete file.
+ * config/i386/i386lynx.mt (TM_FILE): Set to config/tm-lynx.h.
+ * config/i386/tm-i386lynx.h: Delete file.
+ * config/cris/cris.mt (TM_FILE): Set to solib.h.
+ * config/cris/tm-cris.h: Delete file.
+
+ * configure.in: Let TM_FILE, XM_FILE and NAT_FILE specify a path.
+ * configure: Re-generate.
+ * config/arm/nbsd.mt (TM_FILE): Set to "solib.h".
+ * config/arm/tm-nbsd.h: Delete file.
+
+ * config/powerpc/tm-ppcle-sim.h: Delete.
+ * config/powerpc/tm-ppcle-eabi.h: Delete.
+ * config/powerpc/tm-nbsd.h: Delete.
+ * config/powerpc/nbsd.mt (TM_FILE): Set to tm-ppc-eabi.h.
+ * config/djgpp/fnchange.lst: Do not rename tm-ppcle-sim.h or
+ tm-ppcle-eabi.h.
+
+ * config/i386/nto.mh (NAT_FILE): Delete.
+ * config/i386/nm-nto.h: Delete.
+
+ * config/m68k/tm-vx68.h: Do not include "tm-m68k.h".
+ * config/m68k/tm-os68k.h: Ditto.
+ * config/m68k/tm-monitor.h: Ditto.
+ * config/m68k/tm-cisco.h: Ditto.
+ * config/m68k/st2000.mt (TM_FILE): Delete.
+ * config/m68k/tm-vx68.h (GET_LONGJMP_TARGET): Delete.
+ * config/m68k/tm-cisco.h (GET_LONGJMP_TARGET): Delete.
+ * config/m68k/tm-m68k.h (m68k_get_longjmp_target): Delete file.
+ * m68k-tdep.c (m68k_get_longjmp_target): Make static.
+
+ * config/m68k/tm-st2000.h: Delete.
+ * config/m68k/st2000.mt (TM_FILE): Set to tm-m68k.h.
+ * config/sparc/fbsd.mt (TM_FILE): Delete.
+ * config/sparc/tm-fbsd.h: Delete.
+
+ * acconfig.h (GDB_MULTI_ARCH): Delete undef.
+ * defs.h (GDB_MULTI_ARCH_PARTIAL, GDB_MULTI_ARCH_TM)
+ (GDB_MULTI_ARCH_PURE, GDB_MULTI_ARCH): Delete macros.
+
+ * gdbarch.sh: Instead of GDB_MULTI_ARCH print GDB_NM_FILE,
+ GDB_TM_FILE and GDB_XM_FILE.
+ * gdbarch.c: Re-generate.
+ * configure.in (GDB_XM_FILE, GDB_NM_FILE, GDB_TM_FILE): Include
+ quotes in macro definition.
+ * configure.in: Re-generate.
+
+ * gdbarch.sh: Delete check for GDB_MULTI_ARCH_PARTIAL when
+ validating architecture methods.
+ * gdbarch.c: Re-generate.
+
+ * gdbarch.sh: Delete check for consistency between GDB_MULTI_ARCH
+ and GDB_TM_FILE. Check for GDB_TM_FILE instead of
+ GDB_MULTI_ARCH_PARTIAL.
+ * gdbarch.h: Re-generate.
+
+ * config/sparc/tm-vxworks.h (GDB_MULTI_ARCH): Delete.
+ * config/sparc/tm-sol2.h (GDB_MULTI_ARCH): Delete.
+ * config/sparc/tm-nbsd.h (GDB_MULTI_ARCH): Delete.
+ * config/sparc/tm-linux.h (GDB_MULTI_ARCH): Delete.
+ * config/sparc/tm-fbsd.h (GDB_MULTI_ARCH): Delete.
+ * config/sh/tm-sh.h (GDB_MULTI_ARCH): Delete.
+ * config/rs6000/tm-rs6000.h (GDB_MULTI_ARCH): Delete.
+ * config/pa/tm-hppa.h (GDB_MULTI_ARCH): Delete.
+ * config/mips/tm-mips.h (GDB_MULTI_ARCH): Delete.
+ * config/ia64/tm-ia64.h (GDB_MULTI_ARCH): Delete.
+ * config/cris/tm-cris.h (GDB_MULTI_ARCH): Delete.
+ * config/arm/tm-arm.h (GDB_MULTI_ARCH): Delete.
+
+2004-09-01 Andrew Cagney <cagney@gnu.org>
+
+ * objfiles.h (struct entry_info): Delete fields main_func_lowpc
+ and main_func_highpc.
+ (INVALID_ENTRY_LOWPC, INVALID_ENTRY_HIGHPC): Delete macros.
+ * objfiles.c (init_entry_point_info, objfile_relocate): Update
+ * nlmread.c (nlm_symfile_read): Update.
+
+2004-09-01 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (linked_proc_desc_table): Delete, not used.
+ (mips_insn32_frame_cache): Inline call to find_proc_desc.
+ (find_proc_desc): Remove dead code.
+
+2004-09-01 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (mips_mdebug_frame_cache): Minor reformatting.
+
+2004-09-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * observer.sh: Add struct so_list declaration.
+ * Makefile.in: Add dependencies on observer.h for solib.c and
+ breakpoint.c.
+ * breakpoint.c (disable_breakpoints_in_unloaded_shlib): New
+ function.
+ (_initialize_breakpoint): Register
+ disable_breakpoints_in_unloaded_shlib as an observer of the
+ "solib unloaded" observation event.
+ (re_enable_breakpoints_in_shlibs): For bp_shlib_disabled breakpoints,
+ call decode_line_1 so unfound breakpoint errors are silent.
+ * solib.c (update_solib_list): When a solib is discovered to have
+ been unloaded by the program, notify all observers of the
+ "solib unloaded" observation event.
+
+2004-09-01 Andrew Cagney <cagney@gnu.org>
+
+ * frame.c: Include "objfiles.h".
+ (inside_main_func): New function.
+ (get_prev_frame): Use new inside_main_func.
+ * Makefile.in (frame.o): Update dependencies.
+ * defs.h (inside_main_func): Delete declaration.
+ * blockframe.c (inside_main_func): Delete function.
+
+2004-08-31 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (is_vtable_name): New function, based on logic from
+ read_structure_type, but passing the correct length to strncmp,
+ and using 'sizeof' instead of 'strlen'.
+ (read_structure_type): Call it.
+
+2004-08-31 Joel Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/aix.mh: Add comment.
+
+2004-08-31 Paul GIlliam <pgilliam@us.ibm.com>
+
+ * MAINTAINERS: Add self to Write-After-Approval.
+
+2004-08-30 Manoj Iyer <manjo@austin.ibm.com>
+
+ * MAINTAINERS: Add self to Write-After-Approval.
+
+2004-08-30 Andrew Cagney <cagney@gnu.org>
+
+ Fix PR breakpoints/1757.
+ * infrun.c (struct execution_control_state): Replace
+ remove_breakpoints_on_following_step with
+ step_after_step_resume_breakpoint.
+ (init_execution_control_state): Update.
+ (handle_inferior_event): For signals, when stepping off a
+ breakpoint, set step_after_step_resume_breakpoint. When
+ BPSTAT_WHAT_STEP_RESUME, do a single-step off the breakpoint.
+ (keep_going): Delete code handling
+ remove_breakpoints_on_following_step.
+
+2004-08-29 David Lecomber <david@streamline-computing.com>
+
+ Fix PR gdb/648
+ * language.h (enum array_ordering): New enum.
+ * language.h (struct language_defn): New la_array_ordering
+ attribute.
+ * language.c (unknown_language_defn, auto_language_defn)
+ (local_language_defn): Ditto.
+ * ada-lang.c (ada_language_defn): Ditto.
+ * c-lang.c (c_language_defn, cplus_language_defn)
+ (asm_language_defn, minimal_language_defn): Ditto.
+ * f-lang.c (f_language_defn): Ditto.
+ * jv-lang.c (java_language_defn): Ditto.
+ * m2-lang.c (f_language_defn): Ditto.
+ * objc-lang.c (objc_language_defn): Ditto.
+ * p-lang.c (pascal_language_defn): Ditto.
+ * scm-lang.c (scm_language_defn): Ditto.
+ * eval.c (evaluate_subexp_standard): Assume Fortran arrays are
+ oriented large to small in type structure.
+ * dwarf2read.c (read_array_order): New function.
+ (read_array_type): Use read_array_order to check row/column
+ major ordering.
+
+2004-08-27 Nathan J. Williams <nathanw@wasabisystems.com>
+
+ * target.c (target_resize_to_sections): Check
+ current_target.to_sections for an old value when updating.
+
+2004-08-27 Joel Brobecker <brobecker@gnat.com>
+
+ * procfs.c (dbx_link_bpt_addr): New static global variable.
+ (dbx_link_shadow_contents): New static global variable.
+ (procfs_wait, case <PR_SYSEXIT>): Handle syssgi events.
+ (procfs_wait, case <FLTBPT>): Remove the __dbx_link brekapoint
+ if we just hit it.
+ (procfs_init_inferior): Enable syssgi() syscall trace if appropriate.
+ Reset dbx_link_bpt_addr as the address of __dbx_link() may change
+ from run to run.
+ (procfs_create_inferior): Remove syssgi syscall-exit notifications
+ after the inferior has been forked.
+ (remove_dbx_link_breakpoint): New function.
+ (dbx_link_addr): New function.
+ (insert_dbx_link_bpt_in_file): New function.
+ (insert_dbx_link_bpt_in_region): New function.
+ (insert_dbx_link_breakpoint): New function.
+ (proc_trace_syscalls_1): New function, extracted from
+ proc_trace_syscalls.
+ (proc_trace_syscalls): Replace extract code by call to
+ proc_trace_syscalls_1.
+ * solib-irix.c (disable_break): Remove stop_pc assertion, as it
+ is no longer valid.
+
+2004-08-25 Jim Blandy <jimb@redhat.com>
+
+ * gdbtypes.h (TYPE_CODE_ARRAY): Doc fix.
+
+2004-08-25 Andrew Cagney <cagney@gnu.org>
+
+ * infrun.c (struct execution_control_state): Delete field
+ "stepping_through_sigtramp".
+ (init_execution_control_state): Do not set same.
+ (context_switch): Do not pass same to save_infrun_state and
+ load_infrun_state.
+ * gdbthread.h (struct thread_info): Delete field
+ stepping_through_sigtramp.
+ (save_infrun_state, load_infrun_state): Delete parameter
+ stepping_through_sigtramp.
+ * thread.c (load_infrun_state, save_infrun_state): Update.
+
+ * infrun.c: Re-indent. Move expression operators to the beginning
+ of the line. Remove long disabled #if 0 code.
+
+2004-08-24 Andrew Cagney <cagney@gnu.org>
+
+ * doublest.h (floatformat_ieee_quad): Rename
+ floatformat_ia64_quad.
+ * doublest.c (floatformat_ieee_quad): Rename
+ floatformat_ia64_quad.
+ (_initialize_doublest): Update.
+
+2004-08-24 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2expr.h (struct dwarf_expr_context): New members
+ 'num_pieces' and 'pieces', for returning the result of an
+ expression that uses DW_OP_piece.
+ (struct dwarf_expr_piece): New struct type.
+ * dwarf2expr.c (new_dwarf_expr_context): Initialize num_pieces and
+ pieces.
+ (free_dwarf_expr_context): Free pieces, if any.
+ (add_piece): New function.
+ (execute_stack_op): Implement DW_OP_piece.
+ * dwarf2loc.c (dwarf2_evaluate_loc_desc): If the result of the
+ expression is a list of pieces, print an error message.
+ (dwarf2_loc_desc_needs_frame): If the expression yields
+ pieces, and any piece is in a register, then we need a frame.
+
+ * dwarf2loc.c (dwarf2_evaluate_loc_desc): Wait to fetch the top of
+ the stack until we've decided what sort of result the evaluation
+ has produced. Use separate variables, with more specific names.
+
+2004-08-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-tdep.c (arm_nbsd_arm_be_breakpoint): Define.
+ (arm_nbsd_thumb_[lb]e_breakpoint): Define.
+ (arm_netbsd_init_abi_common): Register them.
+
+2004-08-22 Mark Kettenis <kettenis@gnu.org>
+
+ * config/vax/vax.mh (NATDEPFILES): Add vax-nat.c.
+
+ * amd64obsd-tdep.c (amd64obsd_sigtramp_p): Use
+ safe_frame_unwind_memory instead of target_read_memory.
+
+ * infptrace.c: Remove #ifdef'ed out inclusion of gdb_stat.h.
+ Reorder includes.
+ (fetch_register, store_register): Remove prototypes.
+ (child_resume): Reorganize code and comments such that it is
+ grouped a bit more logically.
+ (attach): Explicitly compare errno against 0.
+ (detach): Likewise. Use perror_with_name instead of
+ print_sys_errmsg.
+ * Makefile.in (infptrace.o): Update dependencies.
+
+ * ia64-linux-nat.c: Update copyright year.
+ (fetch_debug_register, store_debug_register)
+ (ia64_linux_stopped_by_watchpoint): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * config/ia64/nm-linux.h: Update copyright year.
+ (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Remove defines.
+
+ * amd64-linux-tdep.c (amd64_linux_sigtramp_start): Change argument
+ from CORE_ADDR to struct frame_info *. Use
+ safe_frame_unwind_memory instead of deprecated_read_memory_nobpt.
+ (amd64_linux_sigtramp_p): Adjust for changed signature of
+ and64_linux_sigtramp_start
+
+ * gdb_ptrace.h: GNU/Linux.
+
+ * config/alpha/nm-linux.h (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE):
+ Remove defines.
+
+ * infptrace.c: Include "gdb_assert.h".
+ (PTRACE_XFER_TYPE): Remove define.
+ (offsetof): Only define if U_REGS_OFFSET isn't defined.
+ (fetch_register, store_register): Rewrite to use PTRACE_TYPE_RET.
+ Tweak comment.
+ (fetch_inferior_registers, store_inferior_registers): Remove
+ redundant culry braces. Tweak comment. s/regno/regnum.
+ * Makefile.in (infptrace.o): Update dependencies.
+
+ * configure.in: Change test for return type of ptrace to default
+ to `long' instead of `int'.
+ * configure: Regenerate.
+
+2004-08-21 Mark Kettenis <kettenis@gnu.org>
+
+ * config/alpha/alpha-linux.mh (LOADLIBES): New variable.
+
+ * configure.in: Check for ttrace function.
+ * configure, config.in: Regenerate.
+
+ * gdb_ptrace.h: New file.
+ * infptrace.c: Include "gdb_ptrace.h" instead of <ptrace.h> or
+ <sys/ptrace.h>.
+ (PT_READ_I, PT_READ_D, PT_READ_U, PT_WRITE_I, PT_WRITE_D)
+ (PT_WRITE_U, PT_CONTINUE, PT_STEP, PT_KILL): Remove defines.
+ (attach): Don't define PT_ATTACH.
+ (detach): Don't define PT_DETACH.
+ * Makefile.in (gdb_ptrace_h): New variable.
+ (infptrace.o): Update dependencies.
+
+2004-08-16 Mark Kettenis <kettenis@gnu.org>
+
+ * inferior.h (PTRACE_ARG3_TYPE): Define as PTRACE_TYPE_ARG3
+ instead of `int' if not already defined.
+ (call_ptrace): Revert change that replaced PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * infptrace.c (call_ptrace): Revert change that replaced
+ PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+
+2004-08-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-linux64.h (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE):
+ Remove defines.
+
+ * linux-nat.c (kill_inferior): Add missing third and fourth
+ arguments to ptrace call. Don't use PTRACE_ARG3_TYPE.
+
+ * infptrace.c (child_xfer_memory): Replace PTRACE_XFER_TYPE with
+ PTRACE_TYPE_RET.
+
+ * proc-why.c (proc_prettyfprint_why): Fix format string.
+
+ * solib-osf.c (osf_current_sos): Remove unsused label.
+
+ * configure.in: Add <ncurses/ncurses.h> to the list of possible
+ curses headers.
+ * configure, config.in: Regenerate.
+ * gdb_curses.h [HAVE_NCURSES_NCURSES_H]: Include
+ <ncurses/ncurses.h>.
+
+ * config/nm-bsd.h (PTRACE_ARG3_TYPE): Remove define.
+ * config/nm-nbsd.h: Update copyright year.
+ (PTRACE_ARG3_TYPE): Remove define.
+
+ * sparc-nat.c (fetch_inferior_registers)
+ (store_inferior_registers, sparc_xfer_wcookie):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+
+ * alphabsd-nat.c (fetch_inferior_registers):
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * amd64bsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * armnbsd-nat.c: Update copyright year.
+ (fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
+ (store_register, store_regs, store_fp_register, store_fp_regs):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * hppabsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * i386bsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * m68kbsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * m88kbsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * mipsnbsd-nat.c: Update copyright year.
+ (fetch_inferior_registers, store_inferior_registers):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * ns32knbsd-nat.c: Update copyright year.
+ (fetch_inferior_registers, store_inferior_registers):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * ppcnbsd-nat.c (fetch_inferior_registers):
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * ppcobsd-nat.c (fetch_inferior_registers):
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * shnbsd-nat.c: Update copyright year.
+ (fetch_inferior_registers, store_inferior_registers):
+ Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * vaxbsd-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+
+ * inferior.h (call_ptrace): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+ * infptrace.c (call_ptrace, child_resume, attach, detach)
+ (U_REGS_OFFSET, fetch_register, store_register, child_xfer_memory)
+ (udot_info): Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
+ * inftarg.c (ptrace_me): Replace PTRACE_ARG3_TYPE with
+ PTRACE_TYPE_ARG3.
+
+2004-08-14 Mark Kettenis <kettenis@gnu.org>
+
+ * defs.h: Remove out-of-date comment.
+ [!FCLOSE_PROVIDED] (fclose): Remove prototype.
+ [!GETENV_PROVIDED] (getenv): Remove prototype.
+
+ * standalone.c: Remove file.
+ * Makefile.in (standalone.o): Remove dependency.
+
+ * i386-linux-nat.c (dummy_sse_values): Remove function and
+ prototype.
+ (i386_linux_dr_get): Fix typo in comment.
+ (LINUX_SYSCALL_REGNUM): Define as I386_EAX_REGNUM.
+
+ * config/i386/obsd64.mt (TDEPFILES): Add i386obsd-tdep.o.
+
+ * defs.h (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
+ from declaration.
+ * top.c (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
+ from definition.
+
+2004-08-13 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in (PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG5): Don't use
+ parenthesis in definition.
+ * configure: Regenerated.
+
+2004-08-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * PROBLEMS: Mention build/1411.
+
+2004-08-09 Robert Millan <robertmh@gnu.org>
+
+ Committed by Nathanael Nerode.
+ * configure.host: Match kfreebsd*-gnu and knetbsd*-gnu.
+ * configure.tgt: Match kfreebsd*-gnu and knetbsd*-gnu.
+
+2004-08-12 Andrew Cagney <cagney@gnu.org>
+
+ * NEWS: Mention fixes in GDB 6.2.1.
+ * PROBLEMS: Remove mention of mips-irix.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/xm-aix.h: Delete.
+ * config/powerpc/aix.mh (MH_FILE): Remove.
+ * config/powerpc/aix432.mh (MH_FILE): Remove.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/aix.mh: Remove obsolete comment.
+ * config/powerpc/aix432.mh: Likewise.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/xm-aix.h (UINT_MAX): Remove undef.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/rs6000/xm-aix4.h: Remove "config/xm-aix4.h" include,
+ this file is now empty.
+ * config/xm-aix4.h: Remove, this file is no longer included
+ anywhere.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/xm-aix.h: Remove "config/xm-aix4.h" include,
+ that file is now empty.
+ (termdef): Remove prototype, function no longer used.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * doc/gdbint.texinfo (Host Definition): Remove documentation
+ for USE_O_NOCTTY, no longer used.
+ * config/xm-aix4.h (USE_O_NOCTTY): Remove, no longer used.
+ * config/rs6000/xm-rs6000.h (USE_O_NOCTTY): Likewise.
+
+2004-08-11 Joel Brobecker <brobecker@gnat.com>
+
+ * config/xm-aix4.h (FIVE_ARG_PTRACE): Remove, no longer used.
+ * config/pa/nm-hppah.h (FIVE_ARG_PTRACE): Likewise.
+ * config/rs6000/xm-rs6000.h (FIVE_ARG_PTRACE): Likewise.
+
+2004-08-11 Mark Kettenis <kettenis@gnu.org>
+
+ * infptrace.c (call_ptrace): Select code based on PTRACE_TYPE_ARG5
+ instead of FIVE_ARG_PTRACE.
+
+ * inflow.c (O_NOCTTY): Define to zero if not already defined.
+ (new_tty): Use O_NOCTTY unconditionally.
+
+2004-08-10 Mark Kettenis <kettenis@gnu.org>
+
+ * procfs.c (procfs_detach): Cleanup. Print process ID, not LWP
+ ID. Use comma in output. Use gdb_flush on gdb_stdout instead of
+ fflush on stdout.
+
+2004-08-10 Joel Brobecker <brobecker@gnat.com>
+
+ * xcoff_symfile_finish: Replace last call to xmfree by call
+ to xfree.
+
+2004-08-10 Andrew Cagney <cagney@gnu.org>
+
+ * main.c (captured_main): Delete call to init_malloc.
+ * defs.h (init_malloc): Delete declaration.
+ * utils.c (mmalloc, mrealloc, mcalloc, mfree)
+ (init_malloc): Delete functions.
+
+ * defs.h (xmfree): Delete.
+ * utils.c (xmfree): Delete function.
+ (xfree): Inline calls to xmfree and mfree.
+ * symmisc.c (free_symtab_block, free_symtab): Use xfree.
+ * symfile.c (reread_symbols, init_psymbol_list): Ditto.
+ * source.c (forget_cached_source_info, find_and_open_source): Ditto.
+ * somread.c (som_symfile_finish): Ditto.
+ * objfiles.c (allocate_objfile, free_objfile):
+ * nlmread.c (nlm_symfile_finish): Ditto.
+ * hpread.c (hpread_symfile_finish): Ditto.
+ * elfread.c (free_elfinfo, elf_symfile_finish): Ditto.
+ * dbxread.c (dbx_symfile_finish, free_bincl_list): Ditto.
+ * coffread.c (coff_symfile_finish): Ditto.
+
+ * defs.h (xmcalloc): Delete declaration.
+ * utils.c (xmcalloc): Delete.
+ (xcalloc): Inline calls to xmcalloc and mcalloc.
+ * ada-lang.c (_initialize_ada_language): Use htab_create_alloc,
+ xcalloc and xfree.
+ * symtab.c (create_demangled_names_hash): Ditto.
+
+ * defs.h (xmrealloc): Delete.
+ * utils.c (xmrealloc): Delete.
+ (xrealloc): Inline calls to xmrealloc, mmalloc and mrealloc.
+ * symmisc.c (extend_psymbol_list): Use xrealloc.
+ * source.c (find_source_lines): Ditto.
+ * hpread.c (hpread_lookup_type): Ditto.
+ * dbxread.c (add_bincl_to_list): Ditto.
+
+ * utils.c (xmmalloc): Delete.
+ (xmalloc): Inline xmmalloc and mmalloc calls.
+ (msavestring): Use xmalloc.
+ * defs.h (xmmalloc): Delete declaration.
+ * xcoffread.c (xcoff_symfile_init): Use xmalloc instead of
+ xmmalloc.
+ * symmisc.c (extend_psymbol_list): Ditto.
+ * symfile.c (init_psymbol_list): Ditto.
+ * source.c (find_source_lines): Ditto.
+ * hpread.c (hpread_symfile_init, hpread_lookup_type): Ditto.
+ * elfread.c (elf_symtab_read): Ditto.
+ * dbxread.c (dbx_symfile_init, init_bincl_list): Ditto.
+ * coffread.c (coff_symfile_init): Ditto.
+
+2004-08-10 David Carlton <carlton@bactrian.org>
+
+ * MAINTAINERS: Remove David Carlton from c++ testsuite
+ maintainers.
+
+2004-08-10 Jerome Guitton <guitton@gnat.com>
+
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): Make sure to
+ print a line feed before the prompt.
+
+2004-08-10 Mark Kettenis <kettenis@gnu.org>
+
+ * procfs.c (procfs_pid_to_str): Use "%ld" to print LWP.
+
+2004-08-09 Joel Brobecker <brobecker@gnat.com>
+
+ General cleanup of the AIX xm include file:
+ * config/xm-aix4.h (fd_set): Remove undefine.
+ Remove include of <sys/select.h>.
+ (HAVE_TERMIO): Remove define.
+ (USG): Likewise.
+ (NULL): Remove redefine.
+ (alloca): Remove #pragma.
+ (vfork): Remove define.
+ (termdef): Remove.
+ (SIGWINCH_HANDLER): Remove.
+ (SIGWINCH_HANDLER_BODY): Remove.
+
+2004-08-09 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.tgt (x86_64-*-openbsd*): Set gdb_osabi to
+ GDB_OSABI_OPENBSD_ELF.
+
+2004-08-07 Robert Millan <robertmh@gnu.org>
+
+ * bsd-kvm.c: Check for nlist.h before including it.
+
+2004-08-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Remove `struct
+ sigcontext' offset consistency checks for ancient BSD.
+
+ * gdb_curses.h [HAVE_CURSESX_H]: Include <cursesX.h>
+
+ * configure.in: Check for <sys/types.h>. Check return and
+ argument types of ptrace.
+ * configure, config.in: Regenerate.
+
+2004-08-09 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (set_sim_regno, init_sim_regno_table,
+ rs6000_register_sim_regno): Doc fixes.
+
+2004-08-08 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c: Include "floatformat.h".
+ (n32n64_floatformat_always_valid): New function.
+ (floatformat_n32n64_long_double_big): New constant.
+ (mips_gdbarch_init): Set size and format of long double
+ for N32 and N64 ABIs.
+ * Makefile.in (mips-tdep.o): Update dependencies.
+
+2004-08-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh: Delete "fmt" and "attrib" fields. Always use %s to
+ print. Improve script's error messages.
+ * gdbarch.h: Re-generate.
+
+ * gdbarch.sh (pformat): New function.
+ (float_format, double_format, long_double_format): List with bit
+ members. Use pformat when printing.
+ * gdbarch.c, gdbarch.h: Re-generate.
+
+2004-08-08 Nathan J. Williams <nathanw@wasabisystems.com>
+
+ * ppcnbsd-nat.c: Include <machine/frame.h>, <machine/pcb.h>,
+ "gdbcore.h", "regcache.h", and "bsd-kvm.h".
+ (ppcnbsd_supply_pcb): New function.
+ (_initialize_ppcnbsd_nat): New prototype and function.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+ * Makefile.in (ppcnbsd-nat.o): Update dependencies.
+
+2004-08-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.c (builtin_type_arm_ext, builtin_type_ieee_single)
+ (builtin_type_ieee_double, builtin_type_ia64_quad)
+ (builtin_type_ia64_spill, _initialize_gdbtypes): Add tables of
+ BE/LE floating-point types.
+ * gdbtypes.h (builtin_type_arm_ext, builtin_type_ieee_single)
+ (builtin_type_ieee_double, builtin_type_ia64_quad)
+ (builtin_type_ia64_spill): Declare.
+ * doublest.c (_initialize_doublest, floatformat_ieee_single)
+ (floatformat_ieee_double, floatformat_arm_ext)
+ (floatformat_ia64_spill, floatformat_ia64_quad): Add tables
+ of LE/BE floatformats.
+ * doublest.h: (struct floatformat, floatformat_ieee_single)
+ (floatformat_ieee_double, floatformat_arm_ext)
+ (floatformat_ia64_spill, floatformat_ia64_quad): Declare.
+
+2004-08-08 Mark Kettenis <kettenis@gnu.org>
+
+ * i386gnu-nat.c (gnu_store_registers): Fix typo.
+
+ * i386gnu-nat.c (gnu_store_registers): Use regcache_raw_collect
+ instead of regcache_raw_supply when storing the registers.
+
+ * i386gnu-nat.c: Update copyright year.
+ (gnu_store_registers): Don't use deprecated_registers and
+ deprecated_registers_valid. Use regcache_valid_p and
+ regcache_raw_supply instead.
+
+ * vax-tdep.c (vax_frame_this_id): Use frame_func_unwind instead of
+ frame_pc_unwind.
+
+ * procfs.c (procfs_pid_to_str): Remove redundant and unused
+ variables. Incapitalized "process".
+
+ * configure.in: Add cursesX to the list of possible curses libs.
+ Add cursesX.h to the list of possible curses headers.
+ * configure, config.in: Regenerate.
+
+2004-08-07 Nathan J. Williams <nathanw@wasabisystems.com>
+
+ * configure.in: Test for struct lwp in <sys/lwp.h>.
+ * bsd-kvm.c (bsd_kvm_proc_cmd): If HAVE_STRUCT_LWP is defined, use
+ the offset of l_addr in struct lwp.
+
+2004-08-07 Nathan J. Williams <nathanw@wasabisystems.com>
+
+ * bsd-kvm.c: Include "gdbcore.h"
+ (bsd_kvm_open): Use get_exec_file() to set 'execfile'.
+
+2004-08-07 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.c (build_flt, build_complex): New functions.
+ (gdbtypes_post_init): Use.
+
+ * doublest.c (floatformat_from_length): Fix tipo, "*" not "&".
+
+ * gdbtypes.c (_initialize_gdbtypes): Do not swap builtin_type_int8
+ through to builtin_type_uint128.
+
+ * c-exp.y: Use builtin_type function to obtain builtin types.
+
+ * gdbtypes.h (struct builtin_type): Delete builtin_int0 through to
+ builtin_uint128.
+ * gdbtypes.c (gdbtypes_post_init): Update.
+ (build_gdbtypes): Move initialization of builtin_type_int0
+ through to builtin_type_uint128 from here ...
+ (_initialize_gdbtypes): ... to here.
+ * d10v-tdep.c (d10v_register_type): Update.
+
+ * doublest.c: Update copyright.
+ (floatformat_from_length): Call error when floatformat is NULL.
+ (extract_floating_by_length): Remove NULL fmt check.
+ (store_floating_by_length): Ditto.
+
+2004-08-07 Andrew Cagney <cagney@gnu.org>
+
+ * regcache.c (regcache_raw_read): For the moment, #ifdef assert
+ that the register is valid.
+
+2004-08-05 Mark Kettenis <kettenis@chello.nl>
+
+ * i386-linux-tdep.c (i386_linux_sigtramp_start)
+ (i386_linux_rt_sigtramp_start): Change argument from CORE_ADDR to
+ struct frame_info *. Use safe_frame_unwind_memory instead of
+ deprecated_read_memory_nobpt.
+ (i386_linux_sigtramp_p, i386_linux_sigcontext_addr): Adjust for
+ changed signature of i386_linux_sigtramp_start and
+ i386_linux_rt_sigtramp_start.
+
+ * i386nbsd-tdep.c (i386nbsd_sigtramp_offset): Change argument from
+ CORE_ADDR to struct frame_info *. Use safe_frame_unwind_memory
+ instead of deprecated_read_memory_nobpt.
+ (i386nbsd_sigtramp_p): Adjust for changed signature of
+ i386nbsd_sigtramp_offset.
+
+ * i386obsd-tdep.c (i386obsd_sigtramp_p): Use
+ safe_frame_unwind_memory instead of target_read_memory.
+
+ * infptrace.c: Include <sys/file.h> if HAVE_SYS_FILE_H instead of
+ !NO_SYS_FILE.
+ [KERNEL_U_ADDR_BSD]: Don't include <a.out.h>.
+ [KERNEL_U_ADDR_BSD] (kernel_u_addr): Remove variable.
+ (_initialize_kernel_u_addr): Remove prototype and function.
+ * infttrace.c: Include <sys/file.h> if HAVE_SYS_FILE_H instead of
+ !NO_SYS_FILE.
+ * xcoffread.c: Likewise.
+
+2004-08-06 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-nat.c: New file.
+ * vaxbsd-nat.c: Tweak comment.
+ * Makefile.in (ALLDEPFILES): Add vax-nat.c, vaxbsd-nat.c and
+ vaxnbsd-tdep.c.
+ (vax-nat.o): New dependency.
+ * configure.host (vax-*-bsd*, vax-*-ultrix*): Set gdb_host to vax.
+ (vax-*-ultrix2*): Remove.
+ * config/vax/vax.mh: New file.
+ * config/vax/nm-vax.h (vax_kernel_u_addr): New extern declaration.
+ (KERNEL_U_ADDR): Define as vax_kernel_u_addr.
+ (vax_register_u_addr): New prototype.
+ (REGISTER_U_ADDR): Define using vax_register_u_addr.
+ * config/vax/vaxult2.mh: Remove file.
+ * config/vax/vaxult.mh: Remove file.
+ * config/vax/vaxbsd.mh: Remove file.
+ * config/vax/vax.mt (TM_FILE): Remove.
+ * config/vax/tm-vaxbsd.h: Remove file.
+
+2004-08-06 Joel Brobecker <brobecker@gnat.com>
+
+ * aix-thread.c (get_signaled_thread): New function.
+ (iter_trap): Delete, no longer used.
+ (iter_tid): New function.
+ (pd_update): Find the thread that received the SIGTRAP signal
+ by first locating the kernel thread, and then finding its
+ associated thread.
+
+2004-08-06 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * lin-lwp.c (child_wait): Continue inferior after processing
+ PTRACE_EVENT_CLONE event.
+
+2004-08-05 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * MAINTAINERS: Add self to Write-After-Approval.
+
+2004-08-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libunwind-frame.c (LIBUNWIND_SO): Change to be of form:
+ libunwind-xxxx.so" where xxxx is UNW_TARGET.
+
+2004-08-05 Andrew Cagney <cagney@gnu.org>
+
+ * config/xm-sysv4.h: Delete file.
+ * config/mips/xm-irix5.h: Delete file.
+ * config/mips/irix6.mh (XM_FILE, XM_CLIBS): Delete.
+ * config/mips/irix5.mh (XM_FILE, XM_CLIBS): Delete.
+ * config/ia64/xm-aix.h: Delete file.
+ * config/ia64/aix.mh (XM_FILE): Delete.
+ * config/pa/xm-hppah.h: Delete file.
+ * config/pa/hpux11w.mh (XM_FILE): Delete.
+ * config/pa/hpux11.mh (XM_FILE): Delete.
+ * config/pa/hpux1020.mh (XM_FILE): Delete.
+ * config/pa/hppahpux.mh (XM_FILE): Delete.
+
+ * config/alpha/xm-alphalinux.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not fix xm-alphalinux.h.
+ * config/alpha/alpha-linux.mh (XM_FILE, LOADLIBES): Delete.
+ * config/alpha/xm-alphaosf.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not fix xm-alphaosf.h.
+ * config/alpha/alpha-osf3.mh (XM_FILE): Delete.
+ * config/alpha/alpha-osf2.mh (XM_FILE): Delete.
+ * config/alpha/alpha-osf1.mh (XM_FILE): Delete.
+
+ * config/i386/xm-i386v.h: Delete file.
+ * config/i386/i386v.mh (XM_FILE, XM_CLIBS): Delete.
+ * config/i386/i386sco5.mh (XM_FILE, XM_CLIBS): Delete.
+ * config/i386/xm-i386sco.h: Delete file.
+ * config/i386/i386sco4.mh (XM_FILE, XM_CLIBS, MH_CFLAGS): Delete.
+ * config/i386/i386sco.mh (XM_FILE, XM_CLIBS, CC): Delete.
+ * config/i386/xm-i386v4.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not fix xm-i386v4.h.
+ * config/i386/ncr3000.mh (CC, CFLAGS, XM_FILE): Delete.
+ * config/i386/i386v42mp.mh (XM_FILE, XM_CLIBS): Delete.
+ * config/i386/i386v4.mh (XM_FILE, XM_CLIBS): Delete.
+
+ * config/vax/xm-vax.h: Delete file.
+ * Makefile.in (xm-vaxult.h, xm-vaxbsd.h): Delete.
+ * config/vax/xm-vaxult2.h: Delete file.
+ * config/djgpp/fnchange.lst: Do not fix xm-vaxult2.h.
+ * config/vax/vaxult2.mh (XM_FILE): Delete.
+ * config/vax/xm-vaxult.h: Delete file.
+ * config/vax/vaxult.mh (XM_FILE): Delete.
+ * config/vax/xm-vaxbsd.h: Delete file.
+ * config/vax/vaxbsd.mh (XM_FILE): Delete.
+
+ * gdbarch.sh (deprecated_frame_saved_pc): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * regcache.c (deprecated_read_fp, deprecated_write_sp): Delete.
+ * inferior.h (deprecated_read_fp, deprecated_write_sp): Delete.
+ * frame.h: Delete deprecated_read_fp from comments.
+ * arch-utils.c (deprecated_init_frame_pc_default): Delete.
+ * arch-utils.h (deprecated_init_frame_pc_default): Delete.
+
+2004-08-04 Mark Kettenis <kettenis@gnu.org>
+
+ * i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal
+ trampoline in OpenBSD 3.5-current.
+
+ * i387-tdep.c (i387_supply_fsave): Provide summy values for the
+ SSE registers.
+
+ * Makefile.in: Remove embedded page breaks.
+
+2004-08-04 Jim Blandy <jimb@redhat.com>
+
+ * regcache.c (regcache_raw_read): Assert that, after calling
+ target_fetch_registers, the register we're reading is cached.
+
+ * ppc-linux-nat.c (fetch_register): Replace 'gdb_assert (0)' with
+ a call to 'internal_error', with a more helpful error message.
+ * rs6000-tdep.c (e500_pseudo_register_read,
+ e500_pseudo_register_write, rs6000_store_return_value): Same.
+
+2004-08-04 Andrew Cagney <cagney@gnu.org>
+
+ * Makefile.in: Update dependencies.
+
+2004-08-04 Jim Blandy <jimb@redhat.com>
+
+ Change the layout of the PowerPC E500 raw register cache to allow
+ the lower 32-bit halves of the GPRS to be their own raw registers,
+ not pseudoregisters.
+ * ppc-tdep.h (struct gdbarch_tdep): Remove ppc_gprs_pseudo_p flag;
+ add ppc_ev0_upper_regnum flag.
+ * rs6000-tdep.c: #include "reggroups.h".
+ (spe_register_p): Recognize the ev upper half registers as SPE
+ registers.
+ (init_sim_regno_table): Build gdb->sim mappings for the upper-half
+ registers.
+ (e500_move_ev_register): New function.
+ (e500_pseudo_register_read, e500_pseudo_register_write): The 'ev'
+ vector registers are the pseudo-registers now, formed by splicing
+ together the gprs and the upper-half registers.
+ (e500_register_reggroup_p): New function.
+ (P): Macro deleted.
+ (P8, A4): New macro.
+ (PPC_EV_REGS, PPC_GPRS_PSEUDO_REGS): Macros deleted.
+ (PPC_SPE_GP_REGS, PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): New
+ macros.
+ (registers_e500): Rearrange register set so that the raw register
+ set contains 32-bit GPRs and upper-half registers, and the SPE
+ vector registers become pseudo-registers.
+ (rs6000_gdbarch_init): Don't initialize tdep->ppc_gprs_pseudo_p;
+ it has been deleted. Initialize ppc_ev0_upper_regnum. Many other
+ register numbers are now the same for the E500 as they are for
+ other PowerPC variants. Register e500_register_reggroup_p as the
+ register group function for the E500.
+ * Makefile.in (rs6000-tdep.o): Update dependencies.
+
+ Adapt PPC E500 native support to the new raw regcache layout.
+ * ppc-linux-nat.c (struct gdb_evrregset_t): Doc fixes.
+ (read_spliced_spe_reg, write_spliced_spe_reg): Deleted.
+ (fetch_spe_register, store_spe_register): Handle fetching/storing
+ all the SPE registers at once, if regno == -1. These now take
+ over the job of fetch_spe_registers and store_spe_registers.
+ (fetch_spe_registers, store_spe_registers): Deleted.
+ (fetch_ppc_registers, store_ppc_registers): Fetch/store gprs
+ unconditionally; they're always raw. Fetch/store SPE upper half
+ registers, if present, instead of ev registers.
+ (fetch_register, store_register): Remove sanity checks: gprs are
+ never pseudo-registers now, so we never need to even mention any
+ registers that are ever pseudoregisters.
+
+ Use a fixed register numbering when communicating with the PowerPC
+ simulator.
+ * ppc-tdep.h (struct gdbarch_tdep): New member: 'sim_regno'.
+ * rs6000-tdep.c: #include "sim-regno.h" and "gdb/sim-ppc.h".
+ (set_sim_regno, init_sim_regno_table, rs6000_register_sim_regno):
+ New functions.
+ (rs6000_gdbarch_init): Register rs6000_register_sim_regno. Call
+ init_sim_regno_table.
+ * Makefile.in (gdb_sim_ppc_h): New variable.
+ (rs6000-tdep.o): Update dependencies.
+
+2004-08-02 Andrew Cagney <cagney@gnu.org>
+
+ * cris-tdep.c (cris_register_size): Restore function, still used
+ locally.
+
+ * gdbarch.sh (deprecated_target_read_fp)
+ (deprecated_frame_locals_address, deprecated_frame_args_address)
+ (deprecated_frame_chain_valid, deprecated_frame_chain)
+ (deprecated_init_extra_frame_info, deprecated_pop_frame)
+ (deprecated_frame_init_saved_regs, deprecated_get_saved_register)
+ (deprecated_do_registers_info, deprecated_init_frame_pc): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * regcache.c (deprecated_read_fp): Do not call
+ DEPRECATED_TARGET_READ_FP_P.
+ * infcmd.c (default_print_registers_info): Do not call
+ DEPRECATED_DO_REGISTERS_INFO.
+ * frame-base.c (default_frame_locals_address): Do not call
+ DEPRECATED_FRAME_LOCALS_ADDRESS.
+ (default_frame_args_address): Do not call
+ DEPRECATED_FRAME_ARGS_ADDRESS.
+
+ * gdbarch.sh (deprecated_register_raw_size)
+ (deprecated_register_virtual_size:int): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * cris-tdep.c (cris_register_size): Delete.
+ (cris_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_register_raw_size)
+ (alpha_register_virtual_size): Delete.
+ (alpha_gdbarch_init): Update.
+
+ * gdbarch.sh (deprecated_register_virtual_type)
+ (deprecated_save_dummy_frame_tos, deprecated_push_return_address)
+ (deprecated_dummy_write_sp): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * gdbarch.sh (deprecated_register_bytes): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * regcache.c (deprecated_register_bytes): New function.
+ * regcache.h (deprecated_register_bytes): Declare.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sh64-tdep.c (sh64_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init_32082): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * remote.c (init_remote_state): Update.
+ * remote-vx.c (vx_prepare_to_store): Update.
+ * remote-sds.c (sds_fetch_registers, sds_prepare_to_store): Update.
+ * irix5-nat.c (fetch_core_registers): Update.
+ * cris-tdep.c (cris_register_bytes_ok): Update.
+ * config/nm-gnu.h (CHILD_PREPARE_TO_STORE): Update.
+
+ * mips-tdep.c (mips_gdbarch_init, mips_insn16_frame_cache)
+ (mips_insn16_frame_this_id, mips_insn16_frame_prev_register)
+ (mips_insn16_frame_unwind, mips_insn16_frame_sniffer)
+ (mips_insn16_frame_base_address, mips_insn16_frame_base)
+ (mips_insn16_frame_base_sniffer, mips_insn32_frame_cache)
+ (mips_insn32_frame_this_id, mips_insn32_frame_prev_register)
+ (mips_insn32_frame_unwind, mips_insn32_frame_sniffer)
+ (mips_insn32_frame_base_address, mips_insn32_frame_base)
+ (mips_insn32_frame_base_sniffer): Replace mips16 / mips32 prefix
+ with mips_insn16 and mips_insn32.
+
+ Replace DEPRECATED_REGISTER_RAW_SIZE with register_size.
+ * rs6000-tdep.c (rs6000_push_dummy_call)
+ (rs6000_extract_return_value): Use register_size.
+ * xstormy16-tdep.c (xstormy16_get_saved_register)
+ (xstormy16_extract_return_value): Ditto.
+ * valops.c (value_assign): Ditto.
+ * v850ice.c (v850ice_fetch_registers, v850ice_store_registers):
+ * v850-tdep.c (v850_extract_return_value): Ditto.
+ * tracepoint.c (collect_symbol): Ditto.
+ * target.c (debug_print_register): Ditto.
+ * stack.c (frame_info): Ditto.
+ * rs6000-nat.c (ARCH64, fetch_register, store_register): Ditto.
+ * rom68k-rom.c (rom68k_supply_one_register): Ditto.
+ * remote.c (struct packet_reg, remote_wait, remote_async_wait)
+ (store_register_using_P): Ditto.
+ * remote-vxmips.c (vx_read_register, vx_write_register): Ditto.
+ * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register): Ditto.
+ * remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
+ * remote-e7000.c (fetch_regs_from_dump, sub2_from_pc): Ditto.
+ * regcache.c (deprecated_read_register_bytes)
+ (deprecated_write_register_bytes, read_register)
+ (write_register): Ditto.
+ * ppc-linux-nat.c (fetch_altivec_register, fetch_register)
+ (supply_vrregset, store_altivec_register, fill_vrregset): Ditto.
+ * monitor.c (monitor_supply_register, monitor_fetch_register)
+ (monitor_store_register): Ditto.
+ * mn10300-tdep.c (mn10300_pop_frame_regular)
+ (mn10300_print_register): Ditto.
+ * mipsv4-nat.c (fill_fpregset): Ditto.
+ * mips-linux-tdep.c (supply_32bit_reg, fill_fpregset)
+ (mips64_fill_fpregset): Ditto.
+ * mi/mi-main.c (register_changed_p, get_register)
+ (mi_cmd_data_write_register_values): Ditto.
+ * lynx-nat.c (fetch_inferior_registers, store_inferior_registers):
+ * irix5-nat.c (fill_gregset, fetch_core_registers):
+ * infrun.c (write_inferior_status_register): Ditto.
+ * infptrace.c (fetch_register, store_register): Ditto.
+ * infcmd.c (default_print_registers_info): Ditto.
+ * ia64-linux-nat.c (COPY_REG, fill_fpregset): Ditto.
+ * ia64-aix-nat.c (COPY_REG, fill_gregset): Ditto.
+ * i386gnu-nat.c (gnu_store_registers, fill): Ditto.
+ * hpux-thread.c (hpux_thread_fetch_registers)
+ (hpux_thread_store_registers): Ditto.
+ * hppah-nat.c (store_inferior_registers, fetch_register):
+ * findvar.c (value_from_register): Ditto.
+ * dve3900-rom.c (fetch_bitmapped_register):
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * alpha-tdep.h: Ditto.
+ * aix-thread.c (pd_enable, fill_sprs64, fill_sprs32): Ditto.
+
+ * regcache.h: Delete DEPRECATED_REGISTER_VIRTUAL_SIZE and
+ DEPRECATED_REGISTER_RAW_SIZE from comments.
+ * regcache.c (init_regcache_descr, regcache_dump): Do not check or
+ use DEPRECATED_REGISTER_VIRTUAL_SIZE and
+ DEPRECATED_REGISTER_RAW_SIZE.
+ * findvar.c (value_of_register): Simplify by assuming that the
+ registers raw and virtual sizes are identical.
+ * regcache.h: Delete DEPRECATED_REGISTER_VIRTUAL_TYPE in
+ comment.
+ * arch-utils.c (generic_register_size): Simplify by assuming
+ register_type.
+
+ * regcache.c (legacy_read_register_gen, real_register)
+ (legacy_write_register_gen): Delete, not used.
+
+ * regcache.c (struct regcache_descr): Delete legacy_p.
+ (init_legacy_regcache_descr): Delete function.
+ (init_regcache_descr): Delete call to init_legacy_regcache_descr.
+ Do not use deprecated register functions.
+ (regcache_raw_read, deprecated_write_register_gen):
+ (deprecated_read_register_gen, regcache_raw_write): Delete code
+ predicated on legacy_p.
+ (register_size): Delete check against register raw size.
+
+ * cris-tdep.c (cris_register_type): Replace
+ cris_register_virtual_type.
+ (cris_gdbarch_init): Update, set register_type.
+
+ * gdbarch.sh (deprecated_frameless_function_invocation): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-tdep.c (arm_frameless_function_invocation): Delete.
+ (arm_gdbarch_init) Do not set frameless function invocation.
+ * frame.h (legacy_frameless_look_for_prologue): Delete declaration.
+ * blockframe.c (legacy_frameless_look_for_prologue): Delete function.
+ * frv-tdep.c (frv_frameless_function_invocation): Delete.
+ (frv_gdbarch_init): Do not set frameless function invocation.
+ * sh64-tdep.c (sh64_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * m32r-tdep.c (m32r_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+
+ * blockframe.c (legacy_frame_chain_valid): Delete function.
+
+ * dummy-frame.c (struct dummy_frame): Delete call_lo, call_hi, top
+ and pc. Update comments.
+ (pc_in_dummy_frame): Delete function.
+ (deprecated_pc_in_call_dummy): Inline old pc_in_dummy_frame code,
+ use the "id".
+ (dummy_frame_push, dummy_frame_sniffer): Instead of call_lo,
+ call_hi, top and pc, use the id.
+ (fprint_dummy_frames): Do not print call_lo, call_hi, top and pc.
+
+ * dummy-frame.c: Include "gdb_string.h".
+ (generic_save_call_dummy_addr, generic_push_dummy_frame)
+ (generic_save_dummy_frame_tos): Delete.
+ (dummy_frame_push): New function, replaces above.
+ * dummy-frame.h: Update copyright.
+ (dummy_frame_push): Declare.
+ * frame.h (generic_save_dummy_frame_tos, generic_push_dummy_frame)
+ (generic_save_call_dummy_addr): Delete declarations.
+ * infcall.c: Include "dummy-frame.h".
+ (call_function_by_hand): Add locals caller_regcache,
+ caller_regcache_cleanup and dummy_id. Replace push_dummy_frame
+ with call to frame_save_as_regcache plus cleanup. Delete calls to
+ generic_save_call_dummy_addr and generic_save_dummy_frame_tos.
+ Move clear_proceed_status to just before the resume, add call to
+ dummy_frame_push (discard cleanup).
+ * Makefile.in (infcall.o): Add $(dummy_frame_h).
+ (dummy-frame.o): Add $(gdb_string_h).
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * dummy-frame.h (dummy_frame_unwind): Replace dummy_frame_sniffer.
+ * frame-unwind.c (frame_unwind_init): Use dummy_frame_unwind.
+ * dummy-frame.c (find_dummy_frame): Delete.
+ (struct dummy_frame_cache, dummy_frame_sniffer)
+ (dummy_frame_prev_register, dummy_frame_this_id)
+ (dummy_frame_unwinder, dummy_frame_unwind): Re-implement dummy
+ frame unwinder using a dummy_frame_cache.
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * frame.h (frame_save_as_regcache): Declare.
+ * frame.c (frame_save_as_regcache): New function.
+ (do_frame_read_register): Replace do_frame_unwind_register.
+ (frame_pop): Use frame_save_as_regcache.
+ * dummy-frame.c (generic_push_dummy_frame): Use
+ frame_save_as_regcache.
+
+2004-08-01 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (dwarf_decode_lines): Do not consider the current
+ file as included until we record the first line in the linetable.
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * frame.h (deprecated_pop_dummy_frame)
+ (deprecated_read_register_dummy)
+ (deprecated_generic_find_dummy_frame): Delete.
+ * dummy-frame.c (deprecated_generic_find_dummy_frame)
+ (deprecated_read_register_dummy)
+ (deprecated_find_dummy_frame_regcache)
+ (discard_innermost_dummy)
+ (deprecated_pop_dummy_frame): Delete.
+ (dummy_frame_this_id): Simplify.
+ (struct dummy_frame): Delete "fp" and "sp".
+ (find_dummy_frame): Simplify.
+ (generic_push_dummy_frame): Do not set "fp" or "sp".
+ (fprint_dummy_frames): Do not print "fp" and "sp"
+
+2004-08-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (I386_MAX_INSN_LEN): New define.
+ (struct i386_insn): New structure.
+ (i386_match_insn): New function.
+ (i386_frame_setup_skip_insns): New variable.
+ (i386_analyze_frame_setup): Change to use i386_match_insn and the
+ array i386_frame_setup_insns of instructions that should be
+ skipped inside the frame setup sequence.
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * frame.h (deprecated_frame_xmalloc_with_cleanup)
+ (frame_saved_regs_zalloc, frame_extra_info_zalloc)
+ (get_frame_extra_info, deprecated_get_frame_saved_regs): Delete.
+ * stack.c (frame_info): Delete references to
+ DEPRECATED_FRAME_INIT_SAVED_REGS and
+ deprecated_get_frame_saved_regs.
+ * frame.c (struct frame_info): Delete saved_regs and extra_info.
+ (frame_pc_unwind): Do not use DEPRECATED_FRAME_SAVED_PC.
+ (frame_register): Do not use DEPRECATED_GET_SAVED_REGISTER.
+ (frame_unwind_register_signed)
+ (frame_unwind_register_unsigned)
+ (frame_unwind_unsigned_register): Use register_size.
+ (create_new_frame): Do not use DEPRECATED_INIT_EXTRA_FRAME_INFO.
+ (deprecated_frame_xmalloc_with_cleanup)
+ (frame_saved_regs_zalloc, frame_extra_info_zalloc)
+ (get_frame_extra_info, deprecated_get_frame_saved_regs): Delete.
+
+ * sh-tdep.c (sh_gdbarch_init): Disable call to sh64_gdbarch_init.
+ * config/sh/nbsd.mt (TDEPFILES): Remove sh64-tdep.o.
+ * config/sh/linux.mt (TDEPFILES): Remove sh64-tdep.o.
+ * config/sh/embed.mt (TDEPFILES): Remove sh64-tdep.o.
+
+ * infcall.c (call_function_by_hand): Do not use
+ DEPRECATED_PUSH_RETURN_ADDRESS, DEPRECATED_DUMMY_WRITE_SP,
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS, DEPRECATED_TARGET_READ_FP,
+ DEPRECATED_FP_REGNUM, DEPRECATED_STORE_STRUCT_RETURN, and
+ DEPRECATED_STACK_ALIGN.
+
+2004-07-30 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
+
+ Committed by Andrew Cagney.
+ * arm-tdep.c: Remove references to add_setshow_cmd_full for apcs32 .
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * mips-tdep.c (mips16_frame_cache)
+ (mips16_frame_this_id, mips16_frame_prev_register)
+ (mips16_frame_unwind, mips16_frame_sniffer)
+ (mips16_frame_base_address, mips16_frame_base)
+ (mips16_frame_base_sniffer, mips32_frame_cache)
+ (mips32_frame_this_id, mips32_frame_prev_register)
+ (mips32_frame_unwind, mips32_frame_sniffer)
+ (mips32_frame_base_address, mips32_frame_base)
+ (mips32_frame_base_sniffer): Clone the mdebug unwinder into
+ separate heuristic mips16 and mips32 unwinders.
+ (mips_stub_frame_cache, mips_stub_frame_this_id)
+ (mips_stub_frame_prev_register)
+ (mips_stub_frame_unwind, mips_stub_frame_sniffer)
+ (mips_stub_frame_base_address, mips_stub_frame_base)
+ (mips_stub_frame_base_sniffer): Add a simple stub unwinder.
+ (mips_mdebug_frame_base_sniffer, mips_mdebug_frame_sniffer): Only
+ match true mdebug frames.
+ (non_heuristic_proc_desc): Add forward declaration.
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ * config/mips/tm-irix6.h: Delete file.
+ * config/mips/tm-irix5.h: Delete file.
+ * config/mips/irix5.mt (TM_FILE): Set to tm-mips.h
+ * config/mips/irix6.mt (TM_FILE): Set to tm-mips.h
+
+ * config/ia64/tm-linux.h (IA64_GNULINUX_TARGET): Delete.
+ * config/alpha/nm-osf2.h (PROCFS_SIGPEND_OFFSET): Delete.
+ * config/nm-gnu.h (NO_CORE_OPS): Delete.
+ * config/pa/nm-hppah.h (MAY_SWITCH_FROM_INFERIOR_PID): Delete.
+ * config/i386/nm-i386v4.h (LOSING_POLL): Delete.
+ * config/alpha/nm-osf2.h (LOSING_POLL): Delete.
+ * config/tm-nto.h (RAW_SIGNAL_LO, RAW_SIGNAL_HI): Delete.
+ * config/m68k/tm-vx68.h (VX_SIZE_FPREGS): Delete.
+ * config/nm-linux.h (USE_THREAD_STEP_NEEDED): Delete.
+ * config/pa/nm-hppah.h (USE_THREAD_STEP_NEEDED): Delete.
+ * config/tm-nto.h (TARGET_SIGNAL_RAW_TABLE) Delete.
+ (TARGET_SIGNAL_RAW_VALUES): Delete.
+ * config/pa/nm-hppah.h (TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT):
+ Delete.
+ * config/frv/tm-frv.h (TARGET_HW_BREAK_LIMIT)
+ (TARGET_HW_WATCH_LIMIT): Delete.
+ * Makefile.in (minimon_h, HFILES_NO_SRCDIR): Remove minimon.h.
+ * minimon.h: Delete file.
+
+ * trad-frame.c (trad_frame_get_this_base)
+ (trad_frame_set_this_base, trad_frame_set_reg_realreg): New
+ functions.
+ * trad-frame.h (trad_frame_set_this_base)
+ (trad_frame_get_this_base, trad_frame_set_reg_realreg): Declare.
+
+2004-07-31 Andrew Cagney <cagney@gnu.org>
+
+ * trad-frame.c (trad_frame_get_prev_register): Rename
+ trad_frame_get_prev_register.
+ * vax-tdep.c (vax_frame_prev_register): Update.
+ * trad-frame.h: Update.
+ * trad-frame.c (trad_frame_get_register): Update.
+ * sparcobsd-tdep.c (sparc32obsd_frame_prev_register): Update.
+ * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_prev_register):
+ Update.
+ * sparc64obsd-tdep.c (sparc64obsd_frame_prev_register): Update.
+ * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_prev_register):
+ Update.
+ * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_prev_register):
+ Update.
+ * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_prev_register):
+ Update.
+ * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_prev_register):
+ Update.
+ * sparc-linux-tdep.c (sparc32_linux_sigtramp_frame_prev_register):
+ Update.
+ * s390-tdep.c (s390_frame_prev_register)
+ (s390_stub_frame_prev_register)
+ (s390_sigtramp_frame_prev_register): Update.
+ * rs6000-tdep.c (rs6000_frame_prev_register): Update.
+ * ppc-linux-tdep.c (ppc_linux_sigtramp_prev_register): Update.
+ * mips-tdep.c (mips_mdebug_frame_prev_register): Update.
+ * m88k-tdep.c (m88k_frame_prev_register)
+ * m68hc11-tdep.c (m68hc11_frame_prev_register)
+ * m32r-tdep.c (m32r_frame_prev_register): Update.
+ * hppa-tdep.c (hppa_frame_prev_register_helper)
+ * frv-tdep.c (frv_frame_prev_register): Update.
+ * d10v-tdep.c (d10v_frame_prev_register): Update.
+ * cris-tdep.c (cris_frame_prev_register): Update.
+ * avr-tdep.c (avr_frame_prev_register): Update.
+ * arm-tdep.c (arm_prologue_prev_register)
+ (arm_sigtramp_prev_register): Update.
+
+2004-07-31 Andrew Cagney <cagney@gnu.org>
+
+ * frame.h (legacy_saved_regs_unwind)
+ (legacy_frame_chain_valid, legacy_frame_p)
+ (enum frame_type): Delete UNKNOWN_FRAME.
+ * dummy-frame.c (dummy_frame_this_id): Simplify.
+ * frame-unwind.c (frame_unwind_find_by_frame): Simplify.
+ * frame.c (struct frame_info): Delete the field "type".
+ (legacy_saved_regs_prev_register, legacy_get_prev_frame)
+ (legacy_saved_regs_this_id, legacy_saved_regs_unwinder)
+ (legacy_saved_regs_unwind, legacy_frame_p)
+ (frame_type_from_pc): Delete.
+ (get_frame_id, frame_pop, frame_register_unwind, get_prev_frame_1)
+ (fprint_frame, create_new_frame, fprint_frame_type): Simplify.
+
+2004-07-31 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Fix
+ indentation.
+
+ * mips-nat.c: Remove file.
+ * Makefile.in (ALLDEPFILES): Remove mips-nat.c
+ (mips-nat.o): Remove dependency.
+
+ * infptrace.c: Update copyright year.
+ (fetch_register): Pass NULL in regcache_raw_supply call instead of
+ explicitly setting the buffer to all zeroes.
+
+ * sparc64obsd-tdep.c (sparc64obsd_sigreturn_offset): New variable.
+ (sparc64obsd_pc_in_sigtramp): Reorganize to avoid goto.
+
+2004-07-30 Andrew Cagney <cagney@gnu.org>
+
+ * GDB 6.2 released from gdb_6_2-branch.
+
+2004-07-30 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
+
+ * defs.h (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH): New macros.
+
+ * exec.c (exec_file_attach):
+ * nto-tdep.c (nto_find_and_open_solib):
+ * pa64solib.c (pa64_solib_sizeof_symbol_table):
+ * solib.c (solib_open):
+ * somsolib.c (som_solib_sizeof_symbol_table):
+ * source.c (is_regular_file, openp, open_source_file):
+ * symfile.c (symfile_bfd_open):
+ * wince.c (upload_to_device): Differentiate between the search for
+ binary and source files.
+
+2004-07-30 Andrew Cagney <cagney@gnu.org>
+
+ * complaints.c (_initialize_complaints): Pass NULL to
+ add_setshow_zinteger_cmd for help_doc.
+ * cli/cli-decode.c (add_setshow_cmd_full): Handle a NULL help_doc.
+
+2004-07-30 Andrew Cagney <cagney@gnu.org>
+
+ Fix PR i18n/761.
+ * Makefile.in (.SUFFIXES): Add po .gmo, and .pox.
+ (.PHONY): Add all-po install-po, uninstall-po, clean-po,
+ $(PACKAGE).pot and update-po.
+ (all-po, .po.gmo, .po.pox, install-po, $(PACKAGE).pot)
+ (po/$(PACKAGE).pot, clean-po, uninstall-po, install-po)
+ (update-po): New rules.
+ (localedir): Define using autoconf.
+ (diststuff): Add $(PACKAGE).pot and $(CATALOGS)
+ (GDB_CFLAGS): Define LOCALEDIR using $(localedir).
+ (XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): Define.
+ * configure.in: Generate CATALOGS and LINGUAS from contents of
+ src/gdb/po/ directory. Set @localedir@ in Makefile.in.
+ * configure: Re-generate.
+ * po/gdbtext: New file
+
+2004-07-30 Jerome Guitton <guitton@gnat.com>
+
+ * MAINTAINERS: Reorder Write After Approval list in alphabetical
+ order.
+
+2004-07-30 David Lecomber <dsl@sources.redhat.com>
+
+ * dwarf2read.c (read_file_scope): Set producer if attribute
+ present.
+ (struct dwarf2_cu): Added new member producer.
+
+2004-07-30 Jerome Guitton <guitton@gnat.com>
+
+ * inflow.c (kill_command): release file handles in BFD.
+ * exec.c (exec_file_attach): Ditto.
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
+
+2004-07-29 Andrew Cagney <cagney@gnu.org>
+
+ * PROBLEMS (mips-irix): Note that it is broken.
+
+2004-07-29 Andrew Cagney <cagney@gnu.org>
+
+ * config/mips/xm-irix5.h (REGISTER_U_ADDR): Move from here ...
+ * config/mips/nm-irix5.h (REGISTER_U_ADDR): ... to here.
+
+ * config/xm-nbsd.h: Delete file.
+ * config/arm/xm-nbsd.h: Delete file.
+ * config/i386/xm-nbsd.h: Delete file.
+ * config/ns32k/xm-nbsd.h: Delete file.
+ * config/ns32k/nbsdaout.mh (XM_FILE): Delete.
+ * config/i386/nbsdelf.mh (XM_FILE): Delete.
+ * config/i386/nbsdaout.mh (XM_FILE): Delete.
+ * config/arm/nbsdelf.mh (XM_FILE): Delete.
+ * config/arm/nbsdaout.mh (XM_FILE): Delete.
+
+ * config/i386/xm-i386v.h (KERNEL_U_ADDR): Move from here ...
+ * config/i386/nm-i386v42mp.h (KERNEL_U_ADDR): ... to here, ...
+ * config/i386/nm-i386v4.h (KERNEL_U_ADDR): ... here, ...
+ * config/i386/nm-i386v.h (KERNEL_U_ADDR): ... and here.
+ * config/vax/xm-vax.h (KERNEL_U_ADDR): Move from here ...
+ * config/vax/nm-vax.h (KERNEL_U_ADDR): ... to here.
+
+ * config/powerpc/xm-linux.h: Delete empty file.
+ * config/powerpc/ppc64-linux.mh (XM_FILE): Delete.
+ * config/powerpc/linux.mh (XM_FILE): Delete.
+ * config/m68k/xm-linux.h: Delete empty file.
+ * config/m68k/linux.mh (XM_FILE): Delete.
+ * config/ia64/xm-linux.h: Delete empty file.
+ * config/ia64/linux.mh (XM_FILE): Delete.
+ * config/arm/xm-linux.h: Delete empty file.
+ * config/arm/linux.mh (XM_FILE): Delete.
+
+ * config/powerpc/xm-linux.h (KERNEL_U_ADDR): Move from here ...
+ * config/powerpc/nm-linux.h (KERNEL_U_ADDR): ... to here.
+ * config/m68k/xm-linux.h (KERNEL_U_ADDR): Move from here ...
+ * config/m68k/nm-linux.h (KERNEL_U_ADDR): ... to here.
+ * config/ia64/xm-linux.h (KERNEL_U_ADDR): Move from here ...
+ * config/ia64/nm-linux.h (KERNEL_U_ADDR): ... to here.
+ * config/arm/xm-linux.h (KERNEL_U_ADDR): Move from here ...
+ * config/arm/nm-linux.h (KERNEL_U_ADDR): ... to here.
+
+ * config/m68k/xm-m68k.h: Delete file.
+ * config/m68k/xm-linux.h: Do not include "m68k/xm-m68k.h". Update
+ copyright.
+ (HOST_LONG_DOUBLE_FORMAT): Delete macro.
+ * config/pa/xm-linux.h: Delete empty file.
+ * config/pa/linux.mh (XM_FILE): Delete.
+ * config/i386/xm-i386.h: Delete empty file.
+ * config/i386/xm-nbsd.h, config/i386/xm-go32.h: Do not include
+ "i386/xm-i386.h".
+ * config/i386/obsdaout.mh (XM_FILE): Delete.
+ * config/i386/obsd64.mh (XM_FILE): Delete.
+ * config/i386/fbsd64.mh (XM_FILE): Delete.
+ * config/i386/nto.mh (XM_FILE): Delete.
+ * config/i386/obsd.mh (XM_FILE): Delete.
+ * config/i386/linux64.mh (XM_FILE): Delete.
+ * config/i386/linux.mh (XM_FILE): Delete.
+ * config/i386/i386sol2.mh (XM_FILE): Delete.
+ * config/i386/i386gnu.mh (XM_FILE): Delete.
+ * config/i386/fbsd.mh (XM_FILE): Delete.
+ * config/i386/nbsd64.mh (XM_FILE): Delete.
+
+2004-07-29 Andrew Cagney <cagney@gnu.org>
+
+ * config/pa/xm-linux.h: Do not include "floatformat.h".
+ (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
+ (HOST_LONG_DOUBLE_FORMAT): Delete macros.
+ * config/i386/xm-i386.h: Do not include "floatformat.h".
+ (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
+ (HOST_LONG_DOUBLE_FORMAT): Delete macros.
+ * doublest.c (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
+ (HOST_LONG_DOUBLE_FORMAT): Delete macros. Use
+ GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT and
+ GDB_HOST_LONG_DOUBLE_FORMAT instead.
+ * configure.in (GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT)
+ (GDB_HOST_LONG_DOUBLE_FORMAT): Define.
+ * configure, config.in: Regenerate.
+ * configure.host (gdb_host_float_format, gdb_host_double_format)
+ (gdb_host_long_double_format): Set according to the host.
+
+2004-07-29 Andrew Cagney <cagney@gnu.org>
+
+ * Makefile.in (CONFIG_CLEAN): Delete duplicate definition.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * PROBLEMS: Mention threads/1650.
+ * NEWS: Mention the NPTL fix.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * cli/cli-decode.c (add_setshow_cmd): Delete function.
+ (add_setshow_cmd_full): Make static.
+ * command.h (add_setshow_cmd, add_setshow_cmd_full): Delete.
+ (add_setshow_filename_cmd, add_setshow_string_cmd): Declare.
+ * cli/cli-decode.c (add_setshow_filename_cmd)
+ (add_setshow_string_cmd): New functions.
+ * nto-tdep.c (_initialize_nto_tdep): Update. Fix parameters.
+ * mips-tdep.c (_initialize_mips_tdep): Update.
+ * m32r-rom.c (_initialize_m32r_rom): Update. Update copyright.
+ * cli/cli-logging.c (_initialize_cli_logging): Update.
+ * complaints.c (_initialize_complaints): Update.
+ * remote.c (_initialize_remote): Update.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * cli/cli-decode.c (add_setshow_zinteger_cmd)
+ (add_setshow_cmd, add_setshow_auto_boolean_cmd)
+ (add_setshow_boolean_cmd, add_setshow_cmd_full): Add help_doc and
+ print parameters. Make string parameters constant.
+ * command.h: Update. Update copyright.
+ * remote.c (add_packet_config_cmd, _initialize_remote): Ditto.
+ * observer.c (_initialize_observer): Ditto.
+ * frame.c (_initialize_frame): Ditto.
+ * complaints.c (_initialize_complaints): Ditto.
+ * maint.c (_initialize_maint_cmds): Ditto.
+ * target.c (initialize_targets): Ditto.
+ * cli/cli-logging.c (_initialize_cli_logging): Ditto.
+ * infcall.c (_initialize_infcall): Ditto.
+ * arm-tdep.c (_initialize_arm_tdep): Ditto.
+ * m32r-rom.c (_initialize_m32r_rom): Ditto.
+ * remote-rdi.c (_initialize_remote_rdi): Ditto.
+ * d10v-tdep.c (_initialize_d10v_tdep): Ditto.
+ * mips-tdep.c (_initialize_mips_tdep): Ditto.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.c (lookup_primitive_typename): Delete function.
+ * gdbtypes.h (lookup_primitive_typename): Delete declaration.
+ * ada-lex.l: Use language_lookup_primitive_type_by_name.
+ * gdbtypes.c (lookup_typename): Ditto.
+ * f-exp.y (yylex): Ditto.
+ * c-exp.y (yylex): Ditto, eliminate assignment in "if".
+
+ * scm-lang.c (c_builtin_types): Delete extern declaration.
+ (scm_language_defn): Replace
+ string_char_type and primitive_type_vector with
+ la_language_arch_info.
+ * jv-lang.c (java_language_defn): Replace
+ string_char_type and primitive_type_vector with
+ la_language_arch_info.
+ * config/i386/i386sco4.mh (NATDEPFILES): Remove reference to
+ c_builtin_types in comment.
+ * c-lang.h (struct language_arch_info): Declare opaque.
+ (c_language_arch_info): Declare.
+ (c_builtin_types): Delete declaration.
+ * c-lang.c (c_language_arch_info): Set string_char_type to
+ builtin_char, not builtin_true_char. Make global.
+ (c_builtin_types): Delete array.
+ (asm_language_defn, minimal_language_defn): Replace
+ string_char_type and primitive_type_vector with
+ la_language_arch_info.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.h (struct builtin_type): Rename true_char to
+ builtin_true_char.
+ * gdbtypes.c (gdbtypes_post_init): Update.
+ * c-lang.c (arch_info): New function.
+ (enum c_primitive_types): New enum.
+ (c_language_defn): Instead of string_char_type and
+ primitive_type_vector set la_language_arch_info.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
+ * language.h (struct language_arch_info): Fix typo
+ s/primative/primitive/.
+ * gdbtypes.c (lookup_primitive_typename): Ditto.
+ * language.c (language_lookup_primitive_type_by_name)
+ (unknown_language_arch_info): Ditto.
+
+2004-07-27 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (enum language): Add nr_languages.
+ * language.h (struct language_arch_info): Define.
+ (struct language_defn): Add la_language_arch_info.
+ (language_lookup_primative_type_by_name): Declare.
+ (language_string_char_type): Declare.
+ * language.c (_initialize_language, language_gdbarch_post_init)
+ (struct language_gdbarch, language_gdbarch_data): Implement
+ per-architecture language information.
+ (unknown_language_arch_info, language_string_char_type)
+ (language_lookup_primative_type_by_name): New functions.
+ (unknown_language_defn, auto_language_defn)
+ (local_language_defn): Set la_language_arch_info to
+ unknown_language_arch_info.
+ (unknown_builtin_types): Delete.
+ * gdbtypes.c (lookup_primitive_typename): Use
+ language_lookup_primative_type_by_name.
+ (create_string_type): Use language_string_char_type.
+ * values.c (value_from_string): Use language_string_char_type.
+ * scm-lang.c (scm_language_defn): Add NULL la_language_arch_info.
+ * p-lang.c (pascal_language_defn): Ditto.
+ * m2-lang.c (m2_language_defn): Ditto.
+ * jv-lang.c (java_language_defn): Ditto.
+ * objc-lang.c (objc_language_defn): Ditto.
+ * f-lang.c (f_language_defn): Ditto.
+ * c-lang.c (c_language_defn, cplus_language_defn)
+ (asm_language_defn, minimal_language_defn): Ditto.
+
+2004-07-27 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.h (struct builtin_type): Declare.
+ (builtin_type): Declare.
+ * d10v-tdep.c (d10v_register_type): Use builtin_type.
+ * gdbtypes.c (_initialize_gdbtypes): Register gdbtypes_post_init.
+ (gdbtypes_post_init): New function.
+ (builtin_type): New function.
+
+2004-07-27 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * remote-m32r-sdi.c: Fix breakpoint bug.
+ (send_cmd, send_one_arg_cmd, send_two_arg_cmd, send_three_arg_cmd,
+ recv_char_data, recv_long_data): New functions to replace communication
+ sequences.
+
+2004-07-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ Document PR threads/1650.
+ * PROBLEMS (Threads): Document problem with many threads
+
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ * gdb-mi.el: Move from here ...
+ * mi/gdb-mi.el: ... to here.
+
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ Problem reported by Ashley Pittman <ashley@quadrics.com>.
+ * main.c (captured_main): When in batch mode always detach.
+
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ * MAINTAINERS: Mark the xstormy16, sh64, ns32k, mn10300, mcore,
+ and h8300 as broken.
+ * NEWS: END-OF-LIFE frame compatibility module.
+ * PROBLEMS: For "Stack backtraces", remove powerpc, hppa and mips
+ specific comments.
+
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ * cli/cli-decode.c (deprecated_add_show_from_set): Deprecate.
+ * xcoffsolib.c (_initialize_xcoffsolib): Update.
+ * wince.c (_initialize_wince): Update.
+ * win32-nat.c (_initialize_win32_nat): Update.
+ * varobj.c (_initialize_varobj): Update.
+ * valops.c (_initialize_valops): Update.
+ * utils.c (initialize_utils, initialize_utils): Update.
+ * tui/tui-win.c (_initialize_tui_win): Update.
+ * top.c (init_main): Update.
+ * symfile.c (_initialize_symfile): Update.
+ * source.c (_initialize_source): Update.
+ * somsolib.c (_initialize_som_solib): Update.
+ * solib.c (_initialize_solib): Update.
+ * solib-frv.c (_initialize_frv_solib): Update.
+ * serial.c (_initialize_serial): Update.
+ * ser-go32.c (_initialize_ser_dos, _initialize_ser_dos): Update.
+ * remote.c (_initialize_remote, _initialize_remote): Update.
+ * remote-vx.c (_initialize_vx): Update.
+ * remote-utils.c (_initialize_sr_support): Update.
+ * remote-sds.c (_initialize_remote_sds): Update.
+ * remote-mips.c (_initialize_remote_mips): Update.
+ * remote-e7000.c (_initialize_remote_e7000): Update.
+ * proc-api.c (_initialize_proc_api): Update.
+ * printcmd.c: Update.
+ * parse.c (_initialize_parse): Update.
+ * pa64solib.c (_initialize_pa64_solib): Update.
+ * p-valprint.c (_initialize_pascal_valprint): Update.
+ * monitor.c (_initialize_remote_monitors): Update.
+ * mips-tdep.c (_initialize_mips_tdep): Update.
+ * mcore-tdep.c (_initialize_mcore_tdep): Update.
+ * maint.c (_initialize_maint_cmds): Update.
+ * lin-lwp.c (_initialize_lin_lwp): Update.
+ * language.c (_initialize_language): Update.
+ * kod.c (_initialize_kod): Update.
+ * infrun.c (set_schedlock_func, _initialize_infrun): Update.
+ * i386-tdep.c (_initialize_i386_tdep): Update.
+ * gdbtypes.c (build_gdbtypes, _initialize_gdbtypes): Update.
+ * gdbarch.sh: Update.
+ * gdbarch.c: Re-generate.
+ * gdb-events.sh: Update.
+ * gdb-events.c: Re-generate.
+ * frame.c (_initialize_frame): Update.
+ * exec.c: Update.
+ * demangle.c (_initialize_demangler): Update.
+ * dcache.c (_initialize_dcache): Update.
+ * cris-tdep.c (_initialize_cris_tdep, cris_version_update): Update.
+ * cp-valprint.c (_initialize_cp_valprint): Update.
+ * corefile.c (_initialize_core): Update.
+ * command.h: Update.
+ * cli/cli-decode.h: Update.
+ * cli/cli-cmds.c (init_cli_cmds): Update.
+ * charset.c (_initialize_charset): Update.
+ * breakpoint.c (_initialize_breakpoint): Update.
+ * arm-tdep.c (_initialize_arm_tdep_initialize_arm_tdep): Update.
+ * alpha-tdep.c (_initialize_alpha_tdep): Update.
+ * aix-thread.c (_initialize_aix_thread): Update.
+
+2004-07-24 Mark Kettenis <kettenis@gnu.org>
+
+ Partial fix for PR backtrace/1718.
+ * i386-tdep.c (i386_analyze_frame_setup): Handle more instructions
+ that GCC migrates into the prolugue. Don't handle any
+ instructions that clobber %ebx.
+
+2004-07-23 Andrew Cagney <cagney@gnu.org>
+
+ Use regcache_raw_collect instead of regcache_collect.
+ * regcache.h (regcache_collect): Delete declaration.
+ * regcache.c (regcache_colect): Delete function.
+ * win32-nat.c (do_child_store_inferior_registers): Update.
+ * sol-thread.c (sol_thread_store_registers): Update.
+ * shnbsd-tdep.c (shnbsd_fill_reg): Update.
+ * rs6000-nat.c (store_register): Update.
+ * remote.c (store_register_using_P, remote_store_registers): Update.
+ * ppcnbsd-tdep.c (ppcnbsd_fill_reg): Update.
+ * ppc-linux-nat.c (store_altivec_register, store_spe_register)
+ (fill_vrregset, store_spe_registers, fill_gregset)
+ (fill_gregset): Update.
+ * nto-procfs.c (procfs_store_registers): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_fill_reg): Update.
+ * mips-linux-tdep.c (fill_gregset, mips64_fill_gregset): Update.
+ * m68klinux-nat.c (store_register, fill_gregset): Update.
+ * m68k-tdep.c (fill_gregset): Update.
+ * infptrace.c (store_register): Update.
+ * i386-nto-tdep.c (i386nto_regset_fill): Update.
+ * i386-linux-nat.c (store_register, fill_gregset): Update.
+ * hppa-linux-nat.c (fill_gregset): Update.
+ * go32-nat.c (store_register): Update.
+ * armnbsd-nat.c (store_register, store_regs, store_fp_register)
+ (store_fp_regs): Update.
+ * arm-linux-nat.c (store_nwfpe_single, store_nwfpe_double)
+ (store_nwfpe_extended, store_fpregister, store_fpregs)
+ (store_register, store_regs, fill_gregset, fill_fpregset): Update.
+ * alpha-tdep.c (alpha_fill_int_regs, alpha_fill_fp_regs): Update.
+ * aix-thread.c (fill_gprs64, fill_fprs, fill_sprs64, fill_sprs32)
+ (store_regs_user_thread, store_regs_kernel_thread): Update.
+
+2004-07-24 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (struct dwarf2_cie): Delete `addr_size' member.
+ (decode_frame_entry_1): Use DW_EH_PE_absptr as default for CIE
+ encoding.
+ (dwarf2_build_frame_info): Adjust for removal of `addr_size'
+ member of `struct comp_unit'.
+
+2004-07-23 Andrew Cagney <cagney@gnu.org>
+
+ * infrun.c (handle_inferior_event): Separate the STEP_OVER_ALL and
+ DEPRECATED_IGNORE_HELPER_CALL cases, only #ifdef the latter.
+
+2004-07-23 Martin Hunt <hunt@redhat.com>
+ Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2-frame.c (execute_cfa_program): Fix typo in which the
+ alignment was being added to the offset instead of multiplied.
+
+2004-07-23 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Adjust for
+ changed signal trampoline in OpenBSD 3.5-current.
+
+ * sparc64nbsd-nat.c: Include "regcache.h", <sys/types.h>,
+ <machine/pcb.h> and "bsd-kvm.h".
+ (sparc64nbsd_supply_pcb): New function.
+ (_initialize_sparc64nbsd_nat): Renamed from
+ _initialize_sparcnbsd_nat. Enable libkvm interface.
+ * Makefile.in (sparc64nbsd-nat.o): Update dependencies.
+ * config/sparc/nbsd64.mh (NATDEPFILES): Add bsd-kvm.o
+ (LOADLIBES): New variable.
+
+ * config/sparc/obsd64.mt (TDEPFILES): Add sparcobsd-tdep.o.
+
+ * sparcnbsd-nat.c (sparc32nbsd_supply_pcb): Fix typo in comment.
+
+2004-07-21 Andrew Cagney <cagney@gnu.org>
+
+ Use regcache_raw_supply instead of supply_register.
+ * regcache.h (supply_register): Delete declaration.
+ * regcache.c (supply_register): Delete function.
+ * wince.c (do_child_fetch_inferior_registers): Update.
+ * win32-nat.c (do_child_fetch_inferior_registers)
+ (fetch_elf_core_registers): Update.
+ * v850ice.c (v850ice_fetch_registers): Update.
+ * thread-db.c (thread_db_store_registers): Update.
+ * sol-thread.c (sol_thread_store_registers): Update.
+ * shnbsd-tdep.c (shnbsd_supply_reg): Update.
+ * rs6000-nat.c (fetch_register): Update.
+ * rom68k-rom.c (rom68k_supply_one_register): Update.
+ * remote.c (remote_wait, remote_async_wait): Update.
+ * remote-st.c (get_hex_regs): Update.
+ * remote-sim.c (gdbsim_fetch_register): Update.
+ * remote-sds.c (sds_fetch_registers): Update.
+ * remote-rdp.c (remote_rdp_fetch_register): Update.
+ * remote-rdi.c (arm_rdi_fetch_registers): Update.
+ * remote-mips.c (mips_wait, mips_fetch_registers): Update.
+ * remote-m32r-sdi.c (m32r_fetch_register): Update.
+ * remote-hms.c (init_hms_cmds): Update.
+ * remote-est.c (init_est_cmds): Update.
+ * remote-e7000.c (get_hex_regs, fetch_regs_from_dump)
+ (e7000_fetch_registers, sub2_from_pc, e7000_wait): Update.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_supply_fpreg): Update.
+ * ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register)
+ (fetch_register, supply_vrregset, supply_vrregset)
+ (fetch_spe_registers): Update.
+ * ppc-bdm.c (bdm_ppc_fetch_registers): Update.
+ * monitor.c (monitor_supply_register): Update.
+ * mipsv4-nat.c (supply_gregset, supply_fpregset): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_supply_reg)
+ (mipsnbsd_supply_fpreg): Update.
+ * mips-nat.c (fetch_inferior_registers)
+ (fetch_core_registers): Update.
+ * mips-linux-tdep.c (supply_32bit_reg, supply_gregset)
+ (supply_fpregset, mips64_supply_gregset)
+ (mips64_supply_fpregset): Update.
+ * m68klinux-nat.c (fetch_register, supply_gregset)
+ (supply_fpregset): Update.
+ * m68k-tdep.c (supply_gregset, supply_fpregset): Update.
+ * m32r-rom.c (init_m32r_cmds, init_mon2000_cmds): Update.
+ * lynx-nat.c (fetch_inferior_registers, fetch_core_registers): Update.
+ * irix5-nat.c (supply_gregset, supply_fpregset): Update.
+ * infptrace.c (fetch_register): Update.
+ * ia64-linux-nat.c (supply_gregset, supply_fpregset): Update.
+ * ia64-aix-nat.c (supply_gregset, supply_fpregset): Update.
+ * i386gnu-nat.c (fetch_fpregs, supply_gregset)
+ (gnu_fetch_registers, gnu_store_registers): Update.
+ * i386-nto-tdep.c (i386nto_supply_gregset): Update.
+ * i386-linux-nat.c (fetch_register, supply_gregset)
+ (dummy_sse_values): Update.
+ * hpux-thread.c (hpux_thread_fetch_registers): Update.
+ * hppah-nat.c (fetch_register): Update.
+ * hppa-linux-nat.c (fetch_register, supply_gregset)
+ (supply_fpregset): Update.
+ * go32-nat.c (fetch_register): Update.
+ * dve3900-rom.c (fetch_bitmapped_register)
+ (_initialize_r3900_rom): Update.
+ * cris-tdep.c (supply_gregset): Update.
+ * abug-rom.c (init_abug_cmds): Update.
+ * core-aout.c (fetch_core_registers): Update.
+ * armnbsd-nat.c (supply_gregset, supply_fparegset)
+ (fetch_register, fetch_fp_register): Update.
+ * arm-linux-nat.c (fetch_nwfpe_single, fetch_nwfpe_none)
+ (fetch_nwfpe_extended, fetch_fpregister, fetch_fpregs)
+ (fetch_register, fetch_regs, supply_gregset, supply_fpregset): Update.
+ * alphanbsd-tdep.c (fetch_core_registers): Update.
+ * alpha-tdep.c (alpha_supply_int_regs, alpha_supply_fp_regs): Update.
+ * alpha-nat.c (fetch_osf_core_registers)
+ (fetch_osf_core_registers, fetch_osf_core_registers): Update.
+ * aix-thread.c (supply_gprs64, supply_reg32, supply_fprs)
+ (supply_sprs64, supply_sprs32, fetch_regs_kernel_thread): Update.
+
+2004-07-21 Andrew Cagney <cagney@gnu.org>
+
+ * PROBLEMS: Mention breakpoints/1702.
+ * NEWS: For signal trampolines, cite s390 GNU/Linux as a system
+ that is known to work.
+
+2004-07-21 Andrew Cagney <cagney@gnu.org>
+
+ * config/mips/tm-mips.h (DEPRECATED_IGNORE_HELPER_CALL): Deprecate.
+ * mips-tdep.c (mips_dump_tdep, mips_ignore_helper): Update.
+ * infrun.c (DEPRECATED_IGNORE_HELPER_CALL): Delete macro.
+ (handle_inferior_event): Wrap call to deprecated
+ IGNORE_HELPER_CALL in #ifdef.
+ * config/mips/tm-nbsd.h: Update.
+
+2004-07-20 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): The register set used for
+ bfd_mach_ppc has no segment registers.
+
+ Include PowerPC SPR numbers for special-purpose registers.
+ * rs6000-tdep.c (struct reg): Add new member, 'spr_num'.
+ (R, R4, R8, R16, F, P, R32, R64, R0): Include value for
+ new member in initializer.
+ (S, S4, SN4, S64): New macros for defining special-purpose
+ registers.
+ (PPC_UISA_SPRS, PPC_UISA_NOFP_SPRS, PPC_OEA_SPRS, registers_power,
+ registers_403, registers_403GC, registers_505, registers_860,
+ registers_601, registers_602, registers_603, registers_604,
+ registers_750, registers_e500): Use them.
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Delete variable 'power';
+ replace references with expression used to initialize variable.
+
+2004-07-20 Andrew Cagney <cagney@gnu.org>
+
+ * breakpoint.c (deprecated_read_memory_nobpt): Rename
+ read_memory_nobpt.
+ * sparc-linux-tdep.c (sparc_linux_sigtramp_start): Update.
+ * s390-tdep.c (s390_readinstruction, s390_in_function_epilogue_p)
+ (s390_sigtramp_frame_sniffer): Update.
+ * mn10300-tdep.c (mn10300_analyze_prologue): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset): Update.
+ * mips-tdep.c (mips_fetch_instruction, mips16_fetch_instruction)
+ (mips32_fetch_instruction): Update.
+ * mcore-tdep.c (get_insn): Update.
+ * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Update.
+ * i386nbsd-tdep.c (i386nbsd_sigtramp_offset): Update.
+ * i386ly-tdep.c (i386lynx_saved_pc_after_call): Update.
+ * i386-linux-tdep.c (i386_linux_sigtramp_start)
+ (i386_linux_rt_sigtramp_start): Update.
+ * i386-linux-nat.c (child_resume): Update.
+ * hppa-tdep.c (skip_prologue_hard_way, hppa_frame_cache): Update.
+ * hppa-linux-tdep.c (insns_match_pattern): Update.
+ * gdbcore.h: Update.
+ * frv-tdep.c (frv_gdbarch_adjust_breakpoint_address): Update.
+ * frame.c (safe_frame_unwind_memory): Update.
+ * amd64-linux-tdep.c (amd64_linux_sigtramp_start): Update.
+ * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Update.
+ * alpha-tdep.c (alpha_read_insn): Update.
+
+2004-07-20 Andrew Cagney <cagney@gnu.org>
+
+ * tramp-frame.h (struct tramp_frame): Change "insn" to a struct
+ containing both bytes and mask. Add "frame_type".
+ * tramp-frame.c (tramp_frame_start): Update.
+ (tramp_frame_prepend_unwinder): Update.
+ * mips-linux-tdep.c (mips_linux_o32_sigframe)
+ (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
+ (mips_linux_n64_rt_sigframe): Update. Make "static const".
+ * ppcnbsd-tdep.c (tramp_frame ppcnbsd_sigtramp): Update.
+
+2004-07-19 Eli Zaretskii <eliz@gnu.org>
+
+ * config/djgpp/fnchange.lst: Add remapping for bfd/elf32-cr*.c,
+ bfd/elf32-sh-symbian.c, bfd/elf32-sh64-com.c,
+ sim/testsuite/sim/mips/hilo-hazard-[123].s, and
+ sim/testsuite/sim/mips/fpu64-ps-sb1.s.
+
+2004-07-17 Andrew Cagney <cagney@gnu.org>
+
+ * NEWS, PROBLEMS: Update for 6.2.
+
+ * README: Update to 6.2.
+
+ * utils.c (xvasprintf): Call xstrvprintf.
+
+ * parse.c: Update copyright.
+ (null_post_parser): Eliminate ARGSUSED.
+
+ * ppc-linux-nat.c (store_spe_registers): Eliminate K&R C.
+ * tui/tui-win.c (tui_get_cmd_list): Ditto.
+ * symfile-mem.c (_initialize_symfile_mem): Ditto.
+
+ * ppc-linux-tdep.c (ppc_linux_init_abi): Add [sic] to Linux.
+ * ppc-linux-nat.c: Use "Linux kernel".
+ * hppa-linux-tdep.c: Use GNU/Linux.
+ * hppa-linux-nat.c: Use GNU/Linux.
+ * dwarfread.c: Add [sic] to use of Linux.
+
+ * hppa-linux-nat.c: Do not include <string.h>.
+ (supply_fpregset): Remove "register" attribute.
+
+ * solib-frv.c (fetch_loadmap): Use xfree, not free.
+
+2004-07-17 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Define _MSE_INT_H on Solaris 9 too.
+ * configure, config.in: Regenerated.
+
+ * vaxbsd-nat.c: Include <sys/types.h>, <machine/pcb.h> and
+ "bsd-kvm.h".
+ (vaxbsd_supply_pcb): New function.
+ (_initialize_vaxbsd_nat): New prototype and function.
+ * config/vax/nbsdaout.mh (NATDEPFILES): Add bsd-kvm.o, solib.o and
+ solib-sunos.o.
+ (LOADLIBES): New variable.
+ * config/vax/nbsdelf.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+ * config/vax/obsd.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+ * Makefile.in (vaxbsd-nat.o): Update dependencies.
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (event_loop_p): Replace variable declaration with macro,
+ always 1.
+ * main.c (captured_main): Delete options "-async" and "-noasync".
+ (event_loop_p): Delete variable.
+ * NEWS: Mention that "-async" and "-noasync" were removed.
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * remote-m32r-sdi.c: Re-indent.
+
+2004-07-16 Jim Blandy <jimb@redhat.com>
+
+ * ppc-tdep.h (ppc_spr_asr): Add missing OEA SPR.
+ (ppc_spr_mi_dbcam, ppc_spr_mi_dbram0, ppc_spr_mi_dbram1)
+ (ppc_spr_md_cam, ppc_spr_md_ram0, ppc_spr_md_ram1): Add
+ missing MPC823 SPRs.
+ (ppc_spr_m_twb): Renamed from ppc_spr_md_twb; the old name was
+ incorrect. (This was corrected in GDB's register name tables on
+ 2004-07-14.)
+
+ * rs6000-tdep.c (registers_602): Correct register name: "esassr"
+ should be "esasrr" ("ESA Save and Restore Register").
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * infrun.c (insert_step_resume_breakpoint): Delete gdb_assert
+ calls, no longer applicable. Update comments and rename parameter
+ "step_frame" to "return_frame".
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * frame.c (fprint_field): New function.
+ (fprint_frame_id): Use fprint_field.
+
+2004-07-15 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-lang.c (ada_language_defn): Remove commented out code.
+
+2004-07-15 Jim Blandy <jimb@redhat.com>
+
+ * ppc-tdep.h (struct gdbarch_tdep): New member: ppc_sr0_regnum.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Initialize it.
+
+2004-07-14 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (COMMON_UISA_NOFP_REGS): Delete; unused.
+
+ * ppc-tdep.h (ppc_num_vrs): New enum constant.
+
+ * ppc-tdep.h (ppc_num_srs): New enum constant.
+
+ * ppc-tdep.h (ppc_spr_mq, ppc_spr_xer, ppc_spr_rtcu, ppc_spr_rtcl)
+ (ppc_spr_lr, ppc_spr_ctr, ppc_spr_cnt, ppc_spr_dsisr, ppc_spr_dar)
+ (ppc_spr_dec, ppc_spr_sdr1, ppc_spr_srr0, ppc_spr_srr1)
+ (ppc_spr_eie, ppc_spr_eid, ppc_spr_nri, ppc_spr_sp, ppc_spr_cmpa)
+ (ppc_spr_cmpb, ppc_spr_cmpc, ppc_spr_cmpd, ppc_spr_icr)
+ (ppc_spr_der, ppc_spr_counta, ppc_spr_countb, ppc_spr_cmpe)
+ (ppc_spr_cmpf, ppc_spr_cmpg, ppc_spr_cmph, ppc_spr_lctrl1)
+ (ppc_spr_lctrl2, ppc_spr_ictrl, ppc_spr_bar, ppc_spr_vrsave)
+ (ppc_spr_sprg0, ppc_spr_sprg1, ppc_spr_sprg2, ppc_spr_sprg3)
+ (ppc_spr_ear, ppc_spr_tbl, ppc_spr_tbu, ppc_spr_pvr)
+ (ppc_spr_spefscr, ppc_spr_ibat0u, ppc_spr_ibat0l, ppc_spr_ibat1u)
+ (ppc_spr_ibat1l, ppc_spr_ibat2u, ppc_spr_ibat2l, ppc_spr_ibat3u)
+ (ppc_spr_ibat3l, ppc_spr_dbat0u, ppc_spr_dbat0l, ppc_spr_dbat1u)
+ (ppc_spr_dbat1l, ppc_spr_dbat2u, ppc_spr_dbat2l, ppc_spr_dbat3u)
+ (ppc_spr_dbat3l, ppc_spr_ic_cst, ppc_spr_ic_adr, ppc_spr_ic_dat)
+ (ppc_spr_dc_cst, ppc_spr_dc_adr, ppc_spr_dc_dat, ppc_spr_dpdr)
+ (ppc_spr_dpir, ppc_spr_immr, ppc_spr_mi_ctr, ppc_spr_mi_ap)
+ (ppc_spr_mi_epn, ppc_spr_mi_twc, ppc_spr_mi_rpn, ppc_spr_mi_cam)
+ (ppc_spr_mi_ram0, ppc_spr_mi_ram1, ppc_spr_md_ctr, ppc_spr_m_casid)
+ (ppc_spr_md_ap, ppc_spr_md_epn, ppc_spr_md_twb, ppc_spr_md_twc)
+ (ppc_spr_md_rpn, ppc_spr_m_tw, ppc_spr_md_dbcam, ppc_spr_md_dbram0)
+ (ppc_spr_md_dbram1, ppc_spr_ummcr0, ppc_spr_upmc1, ppc_spr_upmc2)
+ (ppc_spr_usia, ppc_spr_ummcr1, ppc_spr_upmc3, ppc_spr_upmc4)
+ (ppc_spr_zpr, ppc_spr_pid, ppc_spr_mmcr0, ppc_spr_pmc1)
+ (ppc_spr_sgr, ppc_spr_pmc2, ppc_spr_dcwr, ppc_spr_sia)
+ (ppc_spr_mmcr1, ppc_spr_pmc3, ppc_spr_pmc4, ppc_spr_sda)
+ (ppc_spr_tbhu, ppc_spr_tblu, ppc_spr_dmiss, ppc_spr_dcmp)
+ (ppc_spr_hash1, ppc_spr_hash2, ppc_spr_icdbdr, ppc_spr_imiss)
+ (ppc_spr_esr, ppc_spr_icmp, ppc_spr_dear, ppc_spr_rpa)
+ (ppc_spr_evpr, ppc_spr_cdbcr, ppc_spr_tsr, ppc_spr_602_tcr)
+ (ppc_spr_403_tcr, ppc_spr_ibr, ppc_spr_pit, ppc_spr_esasrr)
+ (ppc_spr_tbhi, ppc_spr_tblo, ppc_spr_srr2, ppc_spr_sebr)
+ (ppc_spr_srr3, ppc_spr_ser, ppc_spr_hid0, ppc_spr_dbsr)
+ (ppc_spr_hid1, ppc_spr_iabr, ppc_spr_dbcr, ppc_spr_iac1)
+ (ppc_spr_dabr, ppc_spr_iac2, ppc_spr_dac1, ppc_spr_dac2)
+ (ppc_spr_l2cr, ppc_spr_dccr, ppc_spr_ictc, ppc_spr_iccr)
+ (ppc_spr_thrm1, ppc_spr_pbl1, ppc_spr_thrm2, ppc_spr_pbu1)
+ (ppc_spr_thrm3, ppc_spr_pbl2, ppc_spr_fpecr, ppc_spr_lt)
+ (ppc_spr_pir, ppc_spr_pbu2): New enum constants for PowerPC
+ special-purpose register numbers.
+
+ * rs6000-tdep.c (registers_860): Correct register name. (No PPC
+ manual mentions 'md_twb', but many mention 'm_twb', and at that
+ point in the register list.)
+
+2004-07-14 Andrew Cagney <cagney@gnu.org>
+
+ * utils.c (internal_warning_problem): Fix typo, "internal-warning"
+ instead of "internal-error".
+
+2004-07-10 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-hpux-tdep.c: Fix a compilation failure due to a comment
+ that was inserted inside a comment.
+
+2004-07-10 Randolph Chung <tausq@debian.org>
+
+ * hppa-hpux-tdep.c (hppa_hpux_som_find_global_pointer): New
+ function.
+ (hppa_hpux_push_dummy_code): New function.
+ (hppa_hpux_init_abi): Set push_dummy_code and call_dummy_location.
+ Set find_global_pointer method.
+
+2004-07-10 Mark Kettenis <kettenis@gnu.org>
+
+ * NEWS: Mention BSD libkvm interface.
+
+2004-07-10 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (generic_load): Comment typo.
+ * stack.c (get_selected_block): Ditto.
+ * regcache.c (regcache_cooked_read): Ditto.
+ * monitor.c (monitor_debug): Ditto.
+ * mips-tdep.c (mips_read_pc): Ditto.
+ * i386-linux-nat.c (ps_get_thread_area): Ditto.
+ * gdb_mbuild.sh: Ditto.
+ * gdbarch.sh: Ditto.
+ * gdbarch.h: Ditto.
+
+2004-07-09 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * ada-tasks.c: Remove file.
+
+ Remove ARI problems:
+
+ * ada-exp.y (write_var_from_sym): Reformat to put operator at
+ beginning of line.
+
+ * ada-lang.c (MAX_OF_SIZE): Rename max_of_size.
+ Add comment.
+ Add comment concerning MAX_OF_TYPE and MIN_OF_TYPE.
+ (MIN_OF_SIZE): Rename min_of_size. Add comment.
+ (UMAX_OF_SIZE): Renmae umax_of_size. Add comment.
+ (UMIN_OF_SIZE): Remove.
+ (max_of_type): New function to replace orphan macro in gdbtypes.h
+ (min_of_type): Ditto.
+ (discrete_type_high_bound): Use max_of_type.
+ (discrete_type_low_bound): Use min_of_type.
+ (possible_user_operator_p): Move operator to beginning of line.
+ (ada_is_variant_part): Ditto.
+ (ensure_lval): Rewrite to avoid deprecated operations.
+ (ada_finish_decode_line_1): Use gdbarch_convert_from_func_ptr_addr
+ rather than adding DEPRECATED_FUNCTION_START_OFFSET.
+ (ada_enum_name): Remove assignments in 'if' statements.
+ (build_ada_types): Add gdbarch parameter.
+ (_initialize_ada_language): Replace deprecated_register_gdbarch_swap
+ with gdbarch_data_register_post_init.
+ Use add_setshow_uinteger_cmd rather than add_set_cmd and
+ add_show_from_set.
+
+ * ada-valprint.c (inspect_it): Remove declaration.
+ (repeat_count_threshold): Remove declaration.
+ (ada_print_floating): Remove assignments in 'if' statements.
+ (print_str): Move operator to beginning of line.
+
+2004-07-08 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (registers_powerpc_nofp): Unused; deleted.
+
+2004-07-08 Bob Rossi <bob@brasko.net>
+
+ * symtab.c (lookup_symtab): check return value of symtab_to_fullname
+
+2004-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * language.h (struct_language_defn): Add new function pointer:
+ la_class_name_from_physname. Also add new prototype for
+ language_class_name_from_physname.
+ * language.c (language_class_name_from_physname): New function.
+ (unk_lang_class_name): Ditto.
+ (unknown_language_defn, auto_language_defn): Change
+ to add unk_lang_class_name function pointer for
+ la_class_name_from_physname.
+ (local_language_defn): Ditto.
+ * dwarf2read.c (guess_structure_name): Change to call
+ language_class_name_from_physname.
+ (determine_class_name): Ditto.
+ * cp-support.c (class_name_from_physname): Renamed.
+ (cp_class_name_from_physname): New name of function.
+ * cp-support.h: Ditto.
+ * c-lang.c (c_language_defn): Change to add NULL
+ for class_name_from_physname function pointer.
+ (cplus_language_defn): Change to add cp_class_name_from_physname.
+ * jv-lang.c (java_class_name_physname): New function.
+ (java_find_last_component): New static routine.
+ (java_language_defn): Add java_class_name_from_physname pointer.
+ * ada-lang.c (ada_language_defn): Change to add NULL
+ for class_name_from_physname function pointer.
+ * f-lang.c (f_language_defn): Ditto.
+ * m2-lang.c (m2_language_defn): Ditto.
+ * objc-lang.c (objc_language_defn): Ditto.
+ * p-lang.c (pascal_language_defn): Ditto.
+ * scm-lang.c (scm_language_defn): Ditto.
+
+2004-07-06 Andrew Cagney <cagney@gnu.org>
+
+ Patch from Bart Robinson.
+ * corelow.c (core_open): Add variable "flags", or in O_LARGEFILE.
+ (O_LARGEFILE): Define to 0, if not defined.
+
+2004-07-03 Mark Kettenis <kettenis@gnu.org>
+
+ * m68kbsd-nat.c: Include "gdbcore.h", <sys/types.h>,
+ <machine/pcb.h> and "bsd-kvm.h".
+ (PCB_REGS_FP, PCB_REGS_SP): Define if not already defined.
+ (m68kbsd_supply_pcb): New function.
+ (_initialize_m68kbsd_nat): New prototype and function.
+ * Makefile.in (m68kbsd-nat.o): Update dependencies.
+ * config/m68k/nbsdelf.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+ * config/m68k/obsd.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+
+ * bsd-kvm.c (bsd_kvm_cmdlist): Remove unecessary initialization.
+
+2004-07-03 Mark Kettenis <kettenis@gnu.org>
+
+ * bsd-kvm.c: Include "cli/cli-cmds.h", "command.h", "value.h" and
+ <sys/proc.h>.
+ (bsd_kvm_cmdlist): New variable.
+ (bsd_kvm_cmd, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): New functions.
+ (bsd_kvm_add_target): Register "kvm" command prefix, "kvm pcb"
+ command and "kvm proc" command.
+ * Makefile.in (bsd-kvm.o): Update dependencies.
+
+2004-07-02 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.c: Update copyright year.
+ (generic_elf_osabi_sniffer): Tweak comment. Look for OS-specific
+ notes if EI_OSABI is set to ELFOSABI_HPUX.
+
+2004-07-01 Michael Snyder <msnyder@redhat.com>
+
+ * win32-nat.c (core_dll_symbols_add): Re-indent a small section
+ that seems to have gotten whacked out of line.
+
+2004-07-01 Mark Kettenis <kettenis@gnu.org>
+
+ * dbxread.c (process_one_symbol) [PCC_SOL_BROKEN]: Remove dead
+ code.
+
+2004-07-01 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * ada-lang.c (decode_packed_array): Minor change to comment.
+ (ada_value_slice_ptr): New function.
+ (ada_value_slice): New function.
+ (ada_evaluate_subexp): Remove XVS-suffix code from subscripting
+ test. Don't know why it is there.
+ Change slice code to use ada_value_slice_ptr and ada_value_slice, and
+ to avoid dereferencing huge arrays from which one is slicing.
+ (empty_array): Correct to return an array rather than
+ a subrange value.
+ * ada-valprint.c (print_optional_low_bound): Don't print lower bound
+ on empty arrays (let'em use 'FIRST instead).
+
+2004-07-01 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ Address complaints from gdb_ari.sh:
+
+ * ada-exp.y: Include gdb_string.h rather than string.h.
+ (convert_char_literal): Reformat declaration.
+ * ada-lang.h: Include opaque struct declaration for struct frame_info.
+ * ada-lex.l: Change use of free to xfree (the macro would do so
+ anyway, but this is harmless).
+ Include gdb_string.h rather than string.h.
+ * ada-valprint.c (ada_val_print_stub): Change PTR => void*.
+
+ * ada-lang.c (parse): Remove K&Rism in parameter list.
+ (is_name_suffix): Correct Linux => GNU/Linux in comment.
+
+2004-06-30 Mark Kettenis <kettenis@gnu.org>
+
+ * dbxread.c (process_one_symbol) [SUN_FIXED_LBRAC_BUG]: Remove
+ dead code.
+
+2004-06-30 Mark Kettenis <kettenis@gnu.org>
+
+ * alphabsd-nat.c: Update copyright year.
+ (getregs_supplies): Use ALPHA_PC_REGNUM instead of PC_REGNUM.
+
+2004-06-29 Joel Brobecker <brobecker@gnat.com>
+
+ * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): New function.
+ (i386_cygwin_in_solib_call_trampoline): New function.
+ (i386_cygwin_init_abi): Initialize the in_solib_call_trampoline
+ and skip_trampoline_code gdbarch methods.
+
+2004-06-29 Jim Blandy <jimb@redhat.com>
+
+ * Makefile.in (gdb_callback_h): Renamed from callback_h to the
+ name actually used in the dependency lists.
+
+2004-06-29 Randolph Chung <tausq@debian.org>
+
+ * NEWS (New native configurations): Mention GNU/Linux/hppa.
+
+2004-06-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * win32-nat.c (child_pid_to_exec_file): New function.
+ (init_child_ops): Add child_pid_to_exec_file as to_pid_to_exec_file
+ functionality.
+
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (xstrvprintf): Declare.
+ * utils.c (xstrvprintf): New function.
+ (internal_vproblem, xstrprintf, xasprintf)
+ (vfprintf_maybe_filtered, vfprintf_unfiltered): Use xstrvprintf.
+ * serial.c (serial_printf): Ditto.
+ * complaints.c (vcomplaint): Ditto.
+
+2004-06-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * infcmd.c (attach_command): Move call to target_terminal_inferior
+ behind loading symbol table.
+
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Revert 2004-06-24
+ change - add back extern deprecated_ui_loop_hook declaration.
+
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * xcoffsolib.c (xcoff_solib_address): Replace xasprintf with
+ xstrprintf.
+ * varobj.c (varobj_gen_name, create_child, c_name_of_child)
+ (c_value_of_variable): Ditto.
+ * utils.c (internal_vproblem): Ditto.
+ * solib-aix5.c (build_so_list_from_mapfile): Ditto.
+ * remote.c (add_packet_config_cmd): Ditto.
+ * remote-rdp.c (rdp_set_command_line): Ditto.
+ * regcache.c (regcache_dump): Ditto.
+ * frv-tdep.c (new_variant, new_variant): Ditto.
+ * fbsd-proc.c (child_pid_to_exec_file): Ditto.
+ (fbsd_find_memory_regions): Ditto.
+ * breakpoint.c (create_thread_event_breakpoint)
+ (create_breakpoints): Ditto.
+ * aix-thread.c (aix_thread_pid_to_str): Ditto.
+ * ada-lang.c (is_package_name): Ditto. Also delete xmalloc call.
+
+2004-06-28 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-lang.c: Re-indent file, with some massaging to help indent
+ a bit when the result is otherwise really too ugly.
+
+2004-06-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * frame.h (struct frame_id): Change bit field type of stack_addr_p,
+ code_addr_p and special_addr_p to 'unsigned int'.
+
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v4-nat.c: Update copyright year and tweak comment.
+ (regmap): Remove trailing comma.
+ (supply_gregset): Rename local variable i to regnum. Call
+ regcache_raw_supply instead of supply_register.
+ (fill_gregset): Rename argument regno to regnum. Call
+ regcache_raw_collect instead of regcache_collect.
+
+2004-06-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * frame.h (struct frame_id): New fields stack_addr_p, code_addr_p
+ and special_addr_p.
+ (frame_id_build, frame_id_build_special): Update comments.
+ (frame_id_build_wild): New prototype.
+ * frame.c (frame_id_build, frame_id_build_special): Fill in new
+ struct frame_id fields.
+ (frame_id_build_wild): New function.
+ (frame_id_eq, frame_id_inner): Use new struct frame_id fields.
+
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ * config/djgpp/fnchange.lst: Add entries for hppabsd-nat.c and
+ hppabsd-tdep.c.
+
+2004-06-27 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-lang.c: Minor reformatting to conform to GNU coding standards.
+
+2004-06-27 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-lang.c: Re-indent file.
+
+2004-06-27 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-lang.c (symtab_symbol_info): Remove unused declaration.
+ (no_symtab_msg): Likewise.
+
+2004-06-27 Andreas Schwab <schwab@suse.de>
+
+ * source.c: Fix whitespace.
+
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Include <sys/param.h> for td_pcb test.
+ * configure: Regenerated.
+
+ * i386nbsd-nat.c: New file.
+ * Makefile.in (ALLDEPFILES): Add i386nbsd-nat.c, i386nbsd-tdep.c,
+ i386obsd-nat.c and i386obsd-tdep.c.
+ (i386nbsd-nat.o): New dependency.
+ * config/i386/obsd.mh (NATDEPFILES): Add i386nbsd-nat.o and
+ bsd-kvm.o.
+ (LOADLIBES): New variable.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Add i386nbsd-nat.o and
+ bsd-kvm.o.
+ (LOADLIBES): New variable.
+
+ * config/i386/fbsd64.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+
+ * bsd-kvm.c (bsd_kvm_fetch_registers): Directly return after
+ fetching from BSD_KVM_PADDR. Correctly lookup address for
+ "_thread0".
+
+ * amd64fbsd-nat.c: Include <sys/types.h, <machine/pcb.h> and
+ "bsd-kvm.h".
+ (amd64fbsd_supply_pcb): New funcion.
+ (_initialize_amd64fbsd_nat): Enable libkvm interface.
+
+2004-06-27 <david@streamline-computing.com>
+
+ Partial fix for PR cli/1056.
+ * valarith.c: Check for zero in division and remainder
+ evaluation.
+
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c: Remove excessive whitespace.
+
+2004-06-26 Andrew Cagney <cagney@gnu.org>
+
+ * gdb-events.sh (deprecated_set_gdb_event_hooks): Deprecated.
+ * gdb-events.h, gdb-events.c: Re-generate.
+ * tui/tui-hooks.c (tui_install_hooks): Update.
+ (tui_remove_hooks): Update.
+ * mi/mi-cmd-break.c (mi_cmd_break_insert): Update.
+
+2004-06-26 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64fbsd-nat.c: Don't include <sys/procfs.h> and "gregset.h".
+ (gregset_t, fpregset_t): Remove typedefs.
+ (REG_OFFSET): Rename argument.
+ (amd64bsd_r_reg_offset): Rename from reg_offset.
+ (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
+ Remove functions.
+ (_initialize_amd64fbsd_nat): Use amd64fbsd64_r_reg_offset instead
+ of reg_offset.
+ * Makefile.in (amd64fbsd-nat.o): Update dependencies.
+
+ * amd64-nat.c (amd64_supply_native_gregset): Fix comment.
+
+ * vax-tdep.c: Tweak comment.
+
+ Add OpenBSD/hppa support.
+ * NEWS (New native configurations): Mention OpenBSD/hppa.
+ * hppabsd-nat.c, hppabsd-tdep.c, config/pa/obsd.mh,
+ config/pa/obsd.mt, config/pa/nm-obsd.h, config/pa/tm-bsd.h: New
+ files.
+ * Makefile.in (ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
+ (hppabsd-nat.o, hppabsd-tdep.c): New dependencies.
+ * configure.host: Add hppa*-*-openbsd*.
+ * configure.tgt: Add hppa*-*-openbsd*.
+
+2004-06-25 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (deprecated_ui_loop_hook): Deprecated.
+ * wince.c (child_wait): Update.
+ * win32-nat.c (child_wait): Update.
+ * v850ice.c (v850ice_wait): Update.
+ * top.c (deprecated_ui_loop_hook): Update.
+ * serial.h: Update.
+ * ser-unix.c (do_hardwire_readchar, do_hardwire_readchar)
+ (do_unix_readchar): Update.
+ * ser-tcp.c (net_open): Update.
+ * remote-sim.c (gdb_os_poll_quit): Update.
+ * rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Update.
+
+2004-06-24 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (deprecated_pre_add_symbol_hook)
+ (deprecated_post_add_symbol_hook): Deprecated.
+ * symfile.c (symbol_file_add_with_addrs_or_offsets)
+ (symbol_file_add_with_addrs_or_offsets): Update references.
+
+2004-06-24 Andrew Cagney <cagney@gnu.org>
+
+ * defs.h (post_add_symbol_hook, pre_add_symbol_hook)
+ (ui_loop_hook, selected_frame_level_changed_hook): Declare.
+ * wince.c (ui_loop_hook): Delete extern declaration.
+ * win32-nat.c (ui_loop_hook): Delete extern declaration..
+ * v850ice.c (ui_loop_hook): Delete extern declaration..
+ * ser-unix.c (ui_loop_hook): Delete extern declaration..
+ * ser-tcp.c (ui_loop_hook): Delete extern declaration..
+ * remote-sim.c (ui_loop_hook): Delete extern declaration..
+ * rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Delete extern.
+ ui_loop_hook declaration.
+
+2004-06-24 Andrew Cagney <cagney@gnu.org>
+
+ * objfiles.h (struct entry_info): Delete entry_func_lowpc and
+ entry_func_highpc fields.
+ * objfiles.c (init_entry_point_info): Do not clear
+ entry_func_lowpc and entry_func_highpc.
+ (objfile_relocate): Do not relocate entry_func_lowpc and
+ entry_func_highpc.
+ * dwarfread.c (read_func_scope): Do not set entry_func_lowpc and
+ entry_func_highpc.
+ * dwarf2read.c (read_func_scope): Do not set entry_func_lowpc and
+ entry_func_highpc.
+ * blockframe.c (legacy_frame_chain_valid): Replace tests against
+ entry_func_lowpc and entry_func_highpc with call to
+ inside_entry_func.
+
+2004-06-24 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc64-tdep.c (sparc64_store_arguments): Fix passing
+ quad-precision floating point arguments in registers.
+
+2004-06-24 Mark Kettenis <kettenis@gnu.org>
+
+ From Michael Mueller <m.mueller99@kay-mueller.de>:
+ * sparc64-tdep.c (sparc64_frame_base_address): Take BIAS into
+ account.
+
+2004-06-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * infrun.c (handle_inferior_event): Initialize stopped_by_watchpoint
+ to -1.
+ * breakpoint.c (bpstat_stop_status): Move check for ignoring
+ untriggered watchpoints to a separate if clause. Update function
+ comment regarding STOPPED_BY_WATCHPOINT argument.
+
+2004-06-22 Jim Blandy <jimb@redhat.com>
+
+ * gdbarch.sh: Doc fix.
+
+2004-06-21 Martin Hunt <hunt@redhat.com>
+ Kevin Buettner <kevinb@redhat.com>
+
+ * config/mips/tm-mips.h (SP_REGNUM): Delete define.
+ * mips-tdep.h (MIPS_SP_REGNUM): Define.
+ * mips-tdep.c (mips_gdbarch_init): Set SP_REGNUM via call
+ to set_gdbarch_sp_regnum(). Use cooked register number.
+ (SP_REGNUM): Replace all occurrences with MIPS_SP_REGNUM.
+
+2004-06-21 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh: When the macro field is empty, do not generate a
+ macro definition. When the macro field is "=", generate the macro
+ name from the upper-case function name.
+ (NUM_REGS, NUM_PSEUDO_REGS, SP_REGNUM, PC_REGNUM, PS_REGNUM)
+ (FP0_REGNUM, STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM)
+ (DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM)
+ (REGISTER_NAME, DEPRECATED_REGISTER_VIRTUAL_TYPE)
+ (DEPRECATED_REGISTER_BYTES, DEPRECATED_REGISTER_BYTE)
+ (DEPRECATED_REGISTER_RAW_SIZE, DEPRECATED_REGISTER_VIRTUAL_SIZE)
+ (DEPRECATED_SAVE_DUMMY_FRAME_TOS, DEPRECATED_FP_REGNUM)
+ (DEPRECATED_TARGET_READ_FP, DEPRECATED_PUSH_ARGUMENTS)
+ (DEPRECATED_PUSH_RETURN_ADDRESS, DEPRECATED_DUMMY_WRITE_SP)
+ (DEPRECATED_REGISTER_SIZE, CALL_DUMMY_LOCATION)
+ (DEPRECATED_DO_REGISTERS_INFO, REGISTER_SIM_REGNO)
+ (REGISTER_BYTES_OK, CANNOT_FETCH_REGISTER, CANNOT_STORE_REGISTER)
+ (GET_LONGJMP_TARGET, DEPRECATED_INIT_FRAME_PC)
+ (BELIEVE_PCC_PROMOTION, DEPRECATED_GET_SAVED_REGISTER)
+ (CONVERT_REGISTER_P, REGISTER_TO_VALUE, VALUE_TO_REGISTER)
+ (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER, INTEGER_TO_ADDRESS)
+ (DEPRECATED_POP_FRAME, DEPRECATED_STORE_STRUCT_RETURN)
+ (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE)
+ (DEPRECATED_EXTRACT_RETURN_VALUE, DEPRECATED_STORE_RETURN_VALUE)
+ (DEPRECATED_USE_STRUCT_CONVENTION)
+ (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+ (DEPRECATED_FRAME_INIT_SAVED_REGS)
+ (DEPRECATED_INIT_EXTRA_FRAME_INFO, SKIP_PROLOGUE, INNER_THAN)
+ (BREAKPOINT_FROM_PC, MEMORY_INSERT_BREAKPOINT)
+ (MEMORY_REMOVE_BREAKPOINT, DECR_PC_AFTER_BREAK)
+ (DEPRECATED_FUNCTION_START_OFFSET, FRAME_ARGS_SKIP)
+ (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION, DEPRECATED_FRAME_CHAIN)
+ (DEPRECATED_FRAME_CHAIN_VALID, DEPRECATED_FRAME_SAVED_PC)
+ (DEPRECATED_FRAME_ARGS_ADDRESS, DEPRECATED_FRAME_LOCALS_ADDRESS)
+ (DEPRECATED_SAVED_PC_AFTER_CALL, FRAME_NUM_ARGS)
+ (DEPRECATED_STACK_ALIGN, DEPRECATED_REG_STRUCT_HAS_ADDR)
+ (FRAME_RED_ZONE_SIZE, ADDR_BITS_REMOVE, SMASH_TEXT_ADDRESS)
+ (SOFTWARE_SINGLE_STEP, SKIP_TRAMPOLINE_CODE)
+ (IN_SOLIB_CALL_TRAMPOLINE, IN_SOLIB_RETURN_TRAMPOLINE)
+ (ELF_MAKE_MSYMBOL_SPECIAL, COFF_MAKE_MSYMBOL_SPECIAL)
+ (NAME_OF_MALLOC, CANNOT_STEP_BREAKPOINT)
+ (HAVE_NONSTEPPABLE_WATCHPOINT, ADDRESS_CLASS_TYPE_FLAGS)
+ (FETCH_POINTER_ARGUMENT): Replace the macro name with "=".
+
+2004-06-21 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh: For gdbarch_dump, print the "function" rather than
+ macro name, and the function rather than macro value. Only wrap
+ macro print statements in #ifdef. Move format logic to where it
+ is needed.
+ * gdbarch.c: Re-generate.
+
+ * gdbarch.sh (read): Delete "print_p" and "description", add
+ "garbage_at_eol". Check for non-empty garbage at end-of-line.
+ Delete references to print_p.
+ (TARGET_ARCHITECTURE): Delete print predicate.
+ * gdbarch.c: Re-generate.
+
+ * gdbarch.sh: Check that multi-arch methods do not provide a
+ macro.
+ (register_type, unwind_dummy_id, push_dummy_call, push_dummy_code)
+ (print_registers_info, print_float_info, print_vector_info)
+ (adjust_breakpoint_address, remote_translate_xfer_address)
+ (construct_inferior_arguments, skip_solib_resolver, unwind_pc)
+ (address_class_type_flags_to_name, unwind_sp): Remove the macro
+ name from the multi-arch definition.
+
+2004-06-20 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh: Sort by the function, instead of macro name.
+ * gdbarch.c: Re-generate.
+
+2004-06-20 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh: Use the function, instead of macro name in
+ errors and the log file.
+ (return_value): Remove stray ":" in spec.
+
+ * gdbarch.sh (RETURN_VALUE): Default to legacy_return_value.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * Makefile.in (arch-utils.o): Update dependencies.
+ * values.c (using_struct_return): Move code calling
+ USE_STRUCT_CONVENTION to legacy_return_value, simplify.
+ * stack.c (return_command): Move code calling STORE_RETURN_VALUE
+ to legacy_return_value, simplify.
+ * infcmd.c (print_return_value): Move code calling
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and EXTRACT_RETURN_VALUE
+ to legacy_return_value, simplify.
+ * infcall.c (call_function_by_hand): Move code calling
+ EXTRACT_RETURN_VALUE to legacy_return_value, simplify.
+ * arch-utils.c: Update copyright. Include "gdbcore.h".
+ (legacy_return_value): New function.
+ * arch-utils.h: Update copyright.
+ (legacy_return_value): Declare.
+
+2004-06-20 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh (DEPRECATED_USE_STRUCT_CONVENTION): Deprecated.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * values.c (using_struct_return): Update call.
+ * mcore-tdep.c: Update comment.
+ * infcall.c (call_function_by_hand): Update comment.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * arch-utils.h (always_use_struct_convention): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sh64-tdep.c (sh64_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m32r-tdep.c (m32r_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.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+
+2004-06-18 Michael Chastain <mec.gnu@mindspring.com>
+
+ * PROBLEMS: Add more specific information, and a work-around,
+ for PR gdb/1458.
+
+2004-06-18 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Deprecated.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * ada-lang.c (ada_finish_decode_line_1): Update.
+ * infrun.c (handle_inferior_event): Update.
+ * infcall.c (find_function_addr): Update.
+ * linespec.c (minsym_found): Update.
+ * symtab.c (find_function_start_sal, skip_prologue_using_sal):
+ Update.
+ * blockframe.c (legacy_frameless_look_for_prologue): Update.
+ * cli/cli-cmds.c (disassemble_command): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+
+2004-06-18 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_collect_fpregset): Fix comment.
+
+2004-06-17 Andrew Cagney <cagney@gnu.org>
+
+ GDB 6.1.1 released from the GDB 6.1 branch.
+ * NEWS: Merge in 6.1.1 NEWS from 6.1 branch.
+ * PROBLEMS: Ditto.
+
+2004-06-16 Daniel Jacobowitz <dan@debian.org>
+
+ PR gdb/1658
+ * dwarf2read.c (dwarf_decode_lines): Read the length of the extended
+ operation as a uleb128. Found by Michael Coulter.
+
+2004-06-16 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * ada-tasks.c: Rename build_task_list to ada_build_task_list, and
+ make it non-static.
+ * ada-lang.h (task_control_block): declaration moved from ada-task.c
+ to ada-lang.h; this is needed to be able to implement the kill command
+ in multi-task mode.
+ (task_ptid): Ditto.
+ (task_entry): Ditto.
+ (task_list): Ditto.
+ (ada_build_task_list): Ditto.
+
+ * ada-lang.c: Conditionalize routines and data structures related
+ to breakpoints, exceptions, completion, and symbol caching on
+ GNAT_GDB, since these are not yet used in the submitted public sources.
+ (ada_main_name): Editorial: Move definition out of exception-related
+ code.
+
+2004-06-15 Andrew Cagney <cagney@gnu.org>
+
+ * mips-tdep.c (non_heuristic_proc_desc): Delete call to
+ deprecated_pc_in_call_dummy.
+
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * dsrec.c (load_srec, make_srec): Use bfd_get_section_size instead of
+ bfd_get_section_size_before_reloc or _raw_size.
+ * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
+ * dwarf2read.c (dwarf2_locate_sections): Likewise.
+ (dwarf2_read_section): Likewise.
+ * elfread.c (elf_locate_sections): Likewise.
+ * gcore.c (derive_heap_segment): Likewise.
+ * mipsread.c (read_alphacoff_dynamic_symtab): Likewise.
+ * remote-e7000.c (e7000_load): Likewise.
+ * remote-m32r-sdi.c (m32r_load): Likewise.
+ * remote-mips.c (mips_load_srec): Likewise.
+ (pmon_load_fast): Likewise.
+ * remote.c (compare_sections_command): Likewise.
+ * symfile.c (add_section_size_callback): Likewise.
+ (load_section_callback): Likewise.
+ (pc_in_unmapped_range): Likewise.
+ (pc_in_mapped_range): Likewise.
+ (sections_overlap): Likewise.
+ (list_overlays_command): Likewise.
+ (simple_overlay_update_1): Likewise.
+ (simple_overlay_update): Likewise.
+ * tracepoint.c (remote_set_transparent_ranges): Likewise.
+ * win32-nat.c (core_section_load_dll_symbols): Likewise.
+
+2004-06-14 Randolph Chung <tausq@debian.org>
+
+ * Makefile.in (hppa-hpux-tdep.o): Update dependency.
+ * hppa-hpux-tdep.c (hp_cxx_exception_support_initialized): Make
+ static.
+ (hppa_hpux_inferior_created): New function.
+ (hppa_hpux_init_abi): Register observer.
+ * symfile.c (hp_cxx_exception_support_initialized)
+ (RESET_HP_UX_GLOBALS): Remove HPUXHPPA specific hacks.
+ (symbol_file_add_main_1, symbol_file_clear): Likewise.
+
+2004-06-14 Randolph Chung <tausq@debian.org>
+
+ * MAINTAINERS (Write After Approval): Alphabetize my entry
+ correctly.
+
+2004-06-14 Andrew Cagney <cagney@gnu.org>
+
+ * MAINTAINERS (testsuite): List Michael Chastain as the lead
+ testsuite maintainer.
+
+2004-06-13 Andrew Cagney <cagney@gnu.org>
+
+ * infcmd.c (print_return_value): Fix logic, allow
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS when struct_return.
+
+ * gdbarch.sh: For predicates, do not check GDB_MULTI_ARCH when
+ defining any macros.
+ * gdbarch.h: Re-generate.
+
+ * gdbarch.sh: Delete "level" attribute. Only check for a macro
+ redefinition when multi-arch greater than GDB_MULTI_ARCH_PARTIAL.
+ * gdbarch.h: Re-generate.
+
+ * values.c (generic_use_struct_convention): Don't check gcc_p.
+
+ * gdbarch.sh (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+ (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Delete.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * ns32k-tdep.h (NS32K_MAX_REGISTER_RAW_SIZE)
+ (NS32K_MAX_REGISTER_VIRTUAL_SIZE): Delete macros.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ deprecated_max_register_raw_size and
+ deprecated_max_register_virtual_size.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+
+ * gdbarch.sh (RETURN_VALUE_ON_STACK): Delete method.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * m68hc11-tdep.c (m68hc11_return_value_on_stack): Delete function.
+ (m68hc11_use_struct_convention): Delete function.
+ (m68hc11_extract_struct_value_address): Delete function.
+ (m68hc11_return_value): New function.
+ (m68hc11_gdbarch_init): Instead of store_return_value,
+ extract_return_value, return_value_on_stack,
+ deprecated_extract_struct_value_address and use_struct_convention,
+ set return_value.
+ * values.c (using_struct_return): Do not call
+ RETURN_VALUE_ON_STACK.
+ * arch-utils.h (generic_return_value_on_stack_not): Delete
+ declaration.
+ * arch-utils.c (generic_return_value_on_stack_not): Delete
+ function.
+
+2004-06-12 Andrew Cagney <cagney@gnu.org>
+
+ * values.c (register_value_being_returned): Delete function.
+ * infcmd.c (legacy_return_value): Delete function.
+ * infcall.c (call_function_by_hand): Inline
+ "register_value_being_returned", simplify.
+ * values.c (using_struct_return): Update comment, refer to
+ print_return_value instead of register_value_being_returned.
+ * infcmd.c (print_return_value): Inline calls to
+ register_value_being_returned and legacy_return_value. Simplify.
+
+2004-06-11 Randolph Chung <tausq@debian.org>
+
+ * somread.c (som_symtab_read): Exclude gcc local symbols.
+
+2004-06-11 Randolph Chung <tausq@debian.org>
+
+ * infrun.c (handle_inferior_event): Handle the case when a
+ trampoline ends up in the runtime resolver, and if the trampoline
+ has no name. Rearrange the code so that all the trampoline
+ processing happens before other step-out-of-range handling.
+
+2004-06-11 Martin Hunt <hunt@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Recognize vr4120
+ has no fpu.
+
+2004-06-10 Andrew Cagney <cagney@gnu.org>
+
+ * blockframe.c (legacy_inside_entry_func): Delete.
+ (legacy_frame_chain_valid): Inline call to
+ legacy_inside_entry_func, simplify.
+
+2004-06-10 Bob Rossi <bob@brasko.net>
+
+ * dbxread.c (read_dbx_symtab): Set pst->dirname when known.
+ * dwarf2read.c (partial_die_info): Add dirname field.
+ (dwarf2_build_psymtabs_hard): Set pst->dirname when known.
+ (read_partial_die): Save away DW_AT_comp_dir.
+ * defs.h (symtab_to_filename): Removed.
+ * source.c (find_and_open_source): Added.
+ (open_source_file): Just calls find_and_open_source.
+ (symtab_to_filename): Removed.
+ (symtab_to_fullname, psymtab_to_fullname): Added.
+ * source.h (psymtab_to_fullname,symtab_to_fullname): Added.
+ * symtab.c (lookup_symtab): Call symtab_to_fullname instead of
+ symtab_to_filename.
+ * symtab.h (partial_symtab): Add dirname field.
+ * mi/mi-cmd-file.c (FILENAME,FULLNAME): Added.
+ (mi_cmd_file_list_exec_source_file): Call new function
+ symtab_to_fullname to find fullname.
+ (mi_cmd_file_list_exec_source_files): Added.
+ * mi/mi-cmds.c (mi_cmd_mi_cmds): Add -file-list-exec-source-files.
+ * mi/mi-cmds.h (mi_cmd_file_list_exec_source_files): Added.
+
+2004-06-10 Andrew Cagney <cagney@gnu.org>
+
+ * avr-tdep.c (avr_gdbarch_init): Do not set use_struct_convention
+ to generic_use_struct_convention, the default value.
+
+ * mn10300-tdep.c (mn10300_type_align): Call internal_error instead
+ of abort.
+
+ * ns32k-tdep.c (ns32k_push_arguments): New function.
+ (ns32k_gdbarch_init): Set deprecated_push_arguments.
+ * infcall.c (call_function_by_hand): Call error instead of
+ legacy_push_arguments.
+ * value.h (legacy_push_arguments): Delete declaration.
+ * valops.c (legacy_push_arguments): Delete function.
+ (value_push): Delete function.
+
+2004-06-10 Brian Ford <ford@vss.fsi.com>
+
+ * coffread.c (coff_symfile_read): Prevent mixed debugging formats
+ from corrupting/reinitializing the psymtab. Support DWARF 2 frame
+ info.
+ * dbxread.c (elfstab_build_psymtabs): Remove bogus comment.
+
+2004-06-10 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.h (deprecated_pc_in_call_dummy): Delete "sp" and "fp"
+ parameters.
+ * dummy-frame.c (deprecated_pc_in_call_dummy): Update.
+ * arm-tdep.c (arm_pc_is_thumb_dummy): Call
+ deprecated_pc_in_call_dummy instead of
+ DEPRECATED_PC_IN_CALL_DUMMY.
+ (arm_skip_prologue): Ditto.
+ * xstormy16-tdep.c (xstormy16_pop_frame, xstormy16_scan_prologue)
+ (xstormy16_frame_saved_pc, xstormy16_frame_chain): Ditto.
+ * v850-tdep.c (v850_find_callers_reg, v850_frame_chain)
+ (v850_pop_frame, v850_frame_saved_pc, v850_frame_init_saved_regs):
+ Ditto.
+ * sh64-tdep.c (sh64_frame_chain, sh64_get_saved_pr)
+ (sh64_init_extra_frame_info, sh64_get_saved_register)
+ (sh64_pop_frame): Ditto.
+ * mips-tdep.c (non_heuristic_proc_desc): Ditto.
+ * mcore-tdep.c (mcore_find_callers_reg, mcore_frame_saved_pc)
+ (mcore_pop_frame, mcore_init_extra_frame_info): Ditto.
+ * h8300-tdep.c (h8300_frame_chain, h8300_frame_saved_pc)
+ (h8300_pop_frame): Ditto.
+ * blockframe.c (legacy_inside_entry_func)
+ (legacy_frame_chain_valid): Ditto.
+ * frame.c (frame_type_from_pc, legacy_get_prev_frame): Update call
+ to deprecated_pc_in_call_dummy.
+
+2004-06-09 Andrew Cagney <cagney@gnu.org>
+
+ * gdbarch.sh (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Do not
+ provide a default value.
+ (CONVERT_REGISTER_P): Default to generic_convert_register_p.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.c (generic_convert_register_p): Rename
+ legacy_convert_register_p
+ (legacy_register_to_value, legacy_value_to_register): Delete
+ functions.
+ * arch-utils.h (generic_convert_register_p): Rename
+ legacy_convert_register_p.
+ (legacy_register_to_value, legacy_value_to_register): Delete
+ declarations.
+
+ * gdbarch.sh (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+ (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+ (DEPRECATED_REGISTER_CONVERTIBLE): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * infcmd.c (default_print_registers_info): Simplify.
+ * findvar.c (value_of_register): Simplify.
+ * mi/mi-main.c (get_register): Simplify.
+ * arch-utils.c (legacy_convert_register_p): Always return 0.
+ (legacy_register_to_value, legacy_value_to_register): Always call
+ internal_error.
+
+ * infptrace.c (child_xfer_memory) [CLEAR_INSN_CACHE]: Delete
+ #ifdef CLEAR_INSN_CACHE code.
+ * target.c (generic_mourn_inferior) [CLEAR_DEFERRED_STORES]:
+ Delete #ifdef CLEAR_DEFERRED_STORES code.
+
+ * solib-svr4.c [HANDLE_SVR4_EXEC_EMULATORS]: Delete #ifdef code.
+
+ * config/ia64/tm-linux.h (TARGET_ELF64): Delete macro, Update
+ copyright.
+ * config/ia64/tm-aix.h (TARGET_ELF64): Ditto.
+
+ * config/mips/mipsv4.mh: Delete file.
+
+ * config/pa/tm-hppa64.h (HPREAD_ADJUST_STACK_ADDRESS): Delete
+ unreferenced macro.
+ (hpread_adjust_stack_address): Delete declaration.
+
+2004-06-08 Andrew Cagney <cagney@gnu.org>
+
+ * infptrace.c [ATTACH_DETACH]: Remove #ifdef wrappers.
+ (attach, detach): When neither PT_ATTACH / PT_DETACH nor
+ PTRACE_ATTACH / PTRACE_DETACH available call error.
+ (PT_ATTACH, PT_DETACH): Move definition to attach / detach.
+ * infttrace.c (update_thread_state_after_attach, attach, detach):
+ Remove #ifdef wrappers.
+ * inftarg.c (child_attach, child_detach): Remove #ifdef wrappers.
+ * gnu-nat.c [ATTACH_DETACH]: Remove #ifdef wrappers.
+ * config/nm-bsd.h (ATTACH_DETACH): Delete.
+ * config/nm-sysv4.h (ATTACH_DETACH): Delete.
+ * config/nm-nbsd.h (ATTACH_DETACH): Delete.
+ * config/nm-linux.h (ATTACH_DETACH): Delete.
+ * config/rs6000/nm-rs6000.h (ATTACH_DETACH): Delete.
+ * config/pa/nm-hppah.h (ATTACH_DETACH): Delete.
+ * config/i386/nm-i386sco5.h (ATTACH_DETACH): Delete.
+ * config/i386/nm-i386sco4.h (ATTACH_DETACH): Delete.
+ * config/i386/nm-i386gnu.h (ATTACH_DETACH): Delete.
+
+2004-06-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.in: Set $configdir to the right OS specific value.
+ Use value when setting $tcldir and $tkdir.
+ * configure: Regenerate.
+
+2004-06-06 Paul Brook <paul@codesourcery.com>
+
+ * gdb/dwarf2-frame.c (decode_frame_entry_1): Decode version 3 CIE
+ records.
+
+2004-06-08 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * ada-lang.c (lookup_symbol_in_language): New function to allow
+ re-use of another language's symbol lookup code. (Placed here
+ temporarily while Ada support is being integrated into the public
+ tree).
+ (restore_language): New auxiliary function for
+ lookup_symbol_in_language.
+ * ada-lang.h (lookup_symbol_in_language): Declare (Placed here
+ temporarily while Ada support is being integrated into the public
+ tree).
+
+2004-06-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (check//%): New.
+
+ * mn10300-tdep.c (mn10300_extract_return_value): Rewrite.
+ (mn10300_store_return_value): Rewrite.
+ (mn10300_type_align): New.
+ (mn10300_use_struct_convention): Rewrite.
+ (mn10300_return_value): New, using all of the above.
+ (mn10300_pop_frame_regular): Add saved_regs_size.
+ (mn10300_gdbarch_init): Remove deprecated rewritten entry points.
+
+ * mn10300-tdep.c (mn10300_analyze_prologue): Don't compute saved
+ regs if PC is on movm.
+
+2004-06-07 Jim Blandy <jimb@redhat.com>
+
+ Add native Linux support for the PowerPC E500.
+ * ppc-tdep.h (struct gdbarch_tdep): New member: 'ppc_gprs_pseudo_p'.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Initialize it to false on
+ all architectures except the E500.
+ * ppc-linux-nat.c: (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): New
+ #definitions.
+ (struct gdb_evrregset_t): New type.
+ (have_ptrace_getsetevrregs): New variable.
+ (get_spe_registers, read_spliced_spe_reg, fetch_spe_register,
+ fetch_spe_registers): New functions.
+ (fetch_register): Call fetch_spe_register as appropriate.
+ Assert that we're only passed raw register numbers.
+ (fetch_ppc_registers): Call fetch_spe_registers as appropriate.
+ Don't fetch gprs if they're pseudoregisters.
+ (set_spe_registers, write_spliced_spe_reg, store_spe_register,
+ store_spe_registers): New functions.
+ (store_register): Call store_spe_register as appropriate.
+ Assert that we're only passed raw register numbers.
+ (store_ppc_registers): Call store_spe_registers as appropriate.
+ Don't store gprs if they're pseudoregisters.
+
+2004-06-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (thread_get_info_callback): Fill in the thread_info
+ struct if one exists, even if we are dealing with a zombie thread.
+
+2004-06-07 Andrew Cagney <cagney@gnu.org>
+
+ * target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition.
+ * config/pa/tm-hppa.h (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE):
+ Rename PC_REQUIRES_RUN_BEFORE_USE.
+ * breakpoint.c (breakpoint_sals_to_pc): Update. Wrap reference in
+ #ifdef.
+
+2004-06-07 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_frame_cache): Handle the cases when we start
+ unwinding after sp has been saved to the stack but before the end
+ of the prologue, and after the fp has been modified but before it has
+ been saved to the stack.
+ (hppa_frame_base_address, hppa_frame_base, hppa_frame_base_sniffer):
+ Remove superfluous definitions.
+ (hppa_gdbarch_init): Remove superfluous frame base sniffer.
+
+2004-06-07 Guy Martin <gmsoft@gentoo.org>
+
+ Committed by Randolph Chung.
+ * hppa-linux-nat.c: Include the correct version of the header file
+ depending on the kernel version.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * infrun.c (trap_expected_after_continue): Remove HP_OS_BUG workaround.
+ (proceed, init_wait_for_inferior, handle_inferior_event): Likewise.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
+ (hppa_hpux_skip_trampoline_code): Don't cache symbol values.
+ * hppa-linux-tdep.c (hppa_linux_in_dyncall): Likewise.
+ * hppa-tdep.c (hppa_symbol_address): New function definition.
+ * hppa-tdep.h (hppa_symbol_address): New function declaration.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.h (struct value): Forward declaration.
+ (gdbarch_tdep): Define tdep find_global_pointer method.
+ * hppa-tdep.c (hppa32_push_dummy_call): Find the global pointer
+ associated with the function we are trying to call, and write it
+ to the gp register.
+ (hppa32_convert_from_funct_ptr_addr): New function.
+ (hppa_find_global_pointer): New function.
+ (hppa_gdbarch_init): Set default find_global_pointer method; set
+ convert_from_func_ptr_addr method.
+ * hppa-linux-tdep.c (hppa_linux_find_global_pointer): New function.
+ (hppa_linux_init_abi): Set find_global_pointer method.
+ * Makefile.in (hppa-linux-tdep.o): Add value.h dependency.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * gdbarch.sh (PUSH_DUMMY_CALL): Change CORE_ADDR func_addr argument
+ to struct value *function.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Likewise.
+ * infcall.c (call_function_by_hand): Pass entire function value
+ to push_dummy_call.
+
+ * Makefile.in (alpha-tdep.o, frv-tdep.o, ia64-tdep.o, mips-tdep.o)
+ (ppc-sysv-tdep.o, rs6000-tdep.o): Update dependencies.
+ * alpha-tdep.c (alpha_push_dummy_call): Update call signature.
+ * amd64-tdep.c (amd64_push_dummy_call): Likewise.
+ * arm-tdep.c (arm_push_dummy_call): Likewise.
+ * avr-tdep.c (avr_push_dummy_call): Likewise.
+ * cris-tdep.c (cris_push_dummy_call): Likewise.
+ * d10v-tdep.c (d10v_push_dummy_call): Likewise.
+ * frv-tdep.c (frv_push_dummy_call): Likewise.
+ * h8300-tdep.c (h8300_push_dummy_call): Likewise.
+ * hppa-tdep.c (hppa32_push_dummy_call)
+ (hppa64_push_dummy_call): Likewise.
+ * i386-tdep.c (i386_push_dummy_call): Likewise.
+ * ia64-tdep.c (ia64_push_dummy_call): Likewise.
+ * m32r-tdep.c (m32r_push_dummy_call): Likewise.
+ * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
+ * m68k-tdep.c (m68k_push_dummy_call): Likewise.
+ * m88k-tdep.c (m88k_push_dummy_call): Likewise.
+ * mips-tdep.c (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
+ (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Likewise.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
+ (ppc64_sysv_abi_push_dummy_call): Likewise.
+ * ppc-tdep.h (ppc_sysv_abi_push_dummy_call)
+ (ppc64_sysv_abi_push_dummy_call): Likewise.
+ * rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
+ * s390-tdep.c (s390_push_dummy_call): Likewise.
+ * sh-tdep.c (sh_push_dummy_call_fpu)
+ (sh_push_dummy_call_nofpu): Likewise.
+ * sparc-tdep.c (sparc32_push_dummy_call): Likewise.
+ * sparc64-tdep.c (sparc64_push_dummy_call): Likewise.
+ * vax-tdep.c (vax_push_dummy_call): Likewise.
+
+2004-06-04 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (fetch_register): Don't forget to pass the
+ gdbarch argument to register_size.
+
+ * rs6000-tdep.c (rs6000_store_return_value): Use
+ regcache_cooked_write_part instead of
+ deprecated_write_register_bytes.
+ (rs6000_gdbarch_init): Register it for gdbarch_store_return_value,
+ not gdbarch_deprecated_store_return_value.
+
+ * ppc-linux-nat.c (store_register, fetch_register): Remove
+ incorrect assertions. Simplify and generalize handling of
+ transfers whose sizes are not multiples of, or less than, sizeof
+ (PTRACE_XFER_TYPE).
+
+2004-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * infrun.c (handle_inferior_event): Don't treat an invalid ptid
+ as a new thread event.
+ * thread-db.c (thread_get_info_callback): If the thread is a
+ zombie, return TD_THR_ZOMBIE.
+ (thread_from_lwp): If thread_get_info_callback returns
+ TD_THR_ZOMBIE, check if the thread is still on the thread list
+ and return a -1 ptid if not found.
+ (thread_db_wait): If thread_from_lwp returns a -1 ptid, then
+ change the status to TARGET_WAITKIND_SPURIOUS.
+
+2004-06-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh3e_sh4_store_return_value): Correctly store
+ double values in little endian mode.
+
+2004-06-02 Albert Chin-A-Young <china@thewrittenword.com>
+
+ Committed by Andrew Cagney.
+ * gdb/dictionary.c, gdb/gdbtypes.h: Remove trailing comma
+ after last enum constant to avoid error from IBM C
+ compiler.
+
+2004-06-02 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (store_register, fetch_register): Rename 'mess'
+ to 'message', and make it local to the lone block that uses it.
+
+ * ppc-linux-nat.c (store_register): Remove unused local 'offset'.
+
+2004-06-02 Paul N. Hilfinger <hilfinger@gnat.com>
+
+ * ada-exp.y: Update copyright notice.
+ Include block.h.
+
+ Replace REGNAME, LAST, INTERNAL_VARIABLE with
+ SPECIAL_VARIABLE and unify the treatment of these cases.
+
+ (write_attribute_call0): Remove.
+ (write_attribute_call1): Remove.
+ (write_attribute_calln): Remove.
+ (save_qualifier): Add missing semicolon.
+
+ (simple_exp,exp): Decomment (i.e., reactivate) code that was
+ temporarily disabled to allow compilation with FSF head version.
+
+ (simple_exp syntax): Remove use of OP_ADA_ATTRIBUTE and
+ use individual operators (OP_*) for all attributes.
+ (exp syntax): Use write_int.
+ Handle STRING literals with OP_STRING.
+ (variable syntax): Add limit parameter to calls to
+ write_object_renaming.
+
+ (temp_parse_space): New definition to hold entities that need
+ only live until the next call to ada_parse.
+ (string_to_operator): Rename fields of ada_opname_table entries.
+
+ (write_var_from_sym): Record block.
+ (write_var_from_name): Minor reformatting.
+ Make sure saved name is properly encoded in the case of multiple
+ matches, and set its language to Ada.
+ Update comment.
+ Modify to indicate unresolved name as symbol in the UNRESOLVED
+ namespace, allocated in temp_parse_space.
+ (write_int): New function.
+
+ (write_object_renaming): Add max_depth parameter to limit
+ chains of object renamings.
+ Handle case where root of renaming expression is itself a renaming.
+ Use temp_parse_space for temporary name buffer.
+ Handle renamings to dereferenced pointers (___XEXA suffices).
+
+ (ada_parse, yyerror, string_to_operator,
+ write_var_from_sym, write_var_from_name, write_attribute_call0,
+ write_attribute_call1, write_attribute_calln,
+ write_object_renaming): Protoize.
+
+ (_initialize_ada_exp): New function.
+
+ * ada-lang.c: Update copyright notice.
+ General terminology change to conform to GNAT compiler usage:
+ mangle => encode, demangle => decode
+ Include gdb_obstack.h.
+ Include gdb_regex.h
+ Include frame.h
+ Include hashtab.h
+ Include completer.h
+ Include gdb_stat.h
+ Include block.h
+ Include infcall.h
+
+ (ADA_RETAIN_DOTS): Make sure this is defined.
+ (TRUNCATION_TOWARDS_ZERO): Define.
+ (struct string_vector): Define.
+ (unresolved_names): Remove definition.
+ (xnew_string_vector): New function.
+ (string_vector_append): New function.
+ (extract_string): Make static.
+ (ada_unqualified_name): New function.
+ (add_angle_brackets): New function.
+ (function_name_from_pc): New function.
+ (place_on_stack): Rename to ensure_lval.
+
+ (ensure_lval): Renamed from place_on_stack.
+ Make identity on lvals.
+ Update comment.
+ (is_nonfunction): New interface.
+ Only symbols in LOC_CONST class can be enumerals.
+ (fill_in_ada_prototype): Remove; now independent of language.
+ (add_defn_to_vec): Add obstack and symtab arguments.
+ Use obstack to hold collected definitions.
+ (num_defns_collected): New function.
+ (defns_collected): New function.
+ (ada_resolve_subexp): Rename to resolve_subexp.
+ (resolve_subexp): Renamed from ada_resolve_subexp.
+ (ada_op_name): Return non-const result.
+ (ada_decoded_op_name): Renamed from ada_op_name, now used for
+ other purposes.
+
+ (to_fixed_array_type): Add declaration.
+ (coerce_unspec_val_to_type): Remove offset parameter.
+ (find_sal_from_funcs_and_line): New interface.
+ (find_line_in_linetable): Ditto.
+
+ (all_sals_for_line): Rename to ada_sals_for_line and make
+ global.
+ Add new parameter. When set, do not ask the user to choose the
+ instance, but use the first one found instead.
+ Use given line number in returned sals.
+ Fix comment.
+ Skip the prologue if funfirstline is set.
+ Correct for memory leak when 0 lines found.
+
+ (value_pos_atr): Use pos_atr.
+ (pos_atr): New function.
+ (standard_lookup): Add block parameter.
+
+ (makeTimeStart): Remove declaration and uses.
+ (makeTimeStop): Remove declaration and uses.
+
+ (ada_completer_word_break_characters): Allow for VMS.
+ (ADA_MAIN_PROGRAM_SYMBOL_NAME): Make into constant.
+ (raise_sym_name): New constant.
+ (raise_unhandled_sym_name): New constant.
+ (raise_assert_sym_name): New constant.
+ (process_raise_exception_name): New constant.
+ (longest_exception_template): New constant.
+ (warning_limit): New variable to limit warnings during expression
+ evaluation.
+ (warnings_issued): New variable to keep track of warnings issued.
+ (known_runtime_file_name_patterns): New constant.
+ (known_auxiliary_function_name_patterns): New constant.
+ (symbol_list_obstack): New variable.
+
+ (field_name_match,is_suffix,is_suppressed_name,ada_encode,
+ ada_decode,ada_match_name,encoded_ordered_before,equiv_types,
+ lesseq_defined_than,is_nondebugging_type,is_name_suffix,wild_match,
+ find_sal_from_funcs_and_line, ada_breakpoint_rewrite,
+ ada_is_tagged_type, ada_is_parent_field, ada_is_wrapper_field,
+ ada_variant_discrim_name, field_alignment, dynamic_template_type,
+ ada_is_character_type, ada_is_aligner_type, ada_is_vax_floating_type):
+ Replace use of deprecated STREQ and STREQN macros by calls to strncmp
+ and strcmp.
+
+ (ada_get_field_index): New function.
+ (lim_warning): New function.
+ (ada_translate_error_message): New function.
+ (MAX_OF_SIZE): New function.
+ (MIN_OF_SIZE): New function.
+ (UMAX_OF_SIZE): New function.
+ (UMIN_OF_SIZE): New function.
+ (discrete_type_high_bound): New function.
+ (discrete_type_low_bound): New function.
+ (base_type): New function.
+ (do_command): Remove.
+
+ (ada_update_initial_language): Use language_ada, not language_unknown.
+ (ada_encode): Renamed from ada_mangle.
+ Obey ADA_RETAIN_DOTS.
+ (ada_decode): Renamed from ada_demangle.
+ Update coding conventions.
+ (decoded_names_store): New hash table.
+ (ada_decode_symbol): New function.
+ (ada_la_decode): New function.
+
+ (modify_general_field): Correct computations of offset and bit
+ position.
+ (desc_base_type): Handle ref types, too.
+ (ada_is_direct_array_type): New function.
+
+ (ada_is_simple_array): Rename to ada_is_simple_array_type.
+ (ada_is_array_descriptor): Rename to ada_is_array_descriptor_type.
+ (ada_is_bogus_array_descriptor,ada_type_of_array,
+ ada_coerce_to_simple_array_ptr,ada_coerce_to_simple_array,
+ ada_type_match,convert_actual,ada_evaluate_subexp): Use renamed
+ ada_is_array_descriptor_type.
+
+ (ada_coerce_to_simple_array_type): Fix incorrect value freeing.
+ (ada_is_packed_array_type): Handle pointers or
+ references to packed arrays as well.
+ (packed_array_type): Uncomment use of TYPE_FLAG_FIXED_INSTANCE.
+ (decode_packed_array_type): Search for the packed array type
+ symbol in the currently selected block and associated
+ superblocks too.
+ Use lookup_symbol again.
+
+ (decode_packed_array): Handle pointers and references.
+ Update call to coerce_unspec_val_to_type.
+ (decode_packed_array_type,value_subscript_packed): Limit warnings.
+ (ada_value_primitive_packed_val): Improve comment.
+
+ (ada_index_type): Substitute int type for "undefined".
+ (ada_index_type,ada_array_bound_from_type,ada_array_bound,
+ ada_array_langth, ada_is_string_type): Use renamed
+ ada_is_simple_array_type.
+ (empty_array): New function.
+
+ (ada_resolve): Rename to resolve.
+ (resolve): Make static.
+ Call renamed resolve_subexp.
+ Update comment.
+ (ada_resolve_subexp): Rename to resolve_subexp.
+ (resolve_subexp): Update comment.
+ Decomment disabled code.
+ Add LOC_COMPUTED* cases.
+ Modify to use temporary struct symbols (marked as being in
+ UNDEF_NAMESPACE) to indicate unresolved names, instead of
+ OP_UNRESOLVED_VALUE.
+ Remove OP_ATTRIBUTE; use individual opcodes for attributes.
+ Add OP_STRING case.
+ Remove OP_ARRAY.
+ Use SYMBOL_PRINT_NAME instead of ada_demangle.
+ Use new ada_lookup_symbol_list interface.
+ Use new ada_resolve_function interface.
+ Remove OP_TYPE case.
+
+ (ada_args_match): Idiot proof against null actuals.
+ Use intermediate variables to clarify.
+ (ada_resolve_function): Update comment and interface.
+ (mangled_ordered_before): Rename to encoded_ordered_before and
+ update comment.
+ (sort_choices): Update comment and interface.
+ Use SYMBOL_LINKAGE_NAME in place of SYMBOL_NAME.
+ (user_select_syms): New interface.
+ Use new sort_choices interface.
+ Use SYMBOL_PRINT_NAME rather than SYMBOL_SOURCE_NAME.
+ (possible_user_operator_p): Idiot-proof against null values.
+ (ada_simple_renamed_entity): Don't make cleanup; rely on
+ caller to free result string.
+ Remove const from return type.
+ (make_array_descriptor): Rename uses of place_on_stack to
+ ensure_lval.
+ Make sure that arrays are on stack.
+
+ (HASH_SIZE): Define.
+ (struct cache_entry): Define.
+ (cache_space): Define.
+ (cache): Define.
+ (clear_ada_sym_cache): New function.
+ (find_entry): New function.
+ (lookup_cached_symbol): New function.
+ (defn_vector_size): Define.
+ (cache_symbol): New function.
+ (defn_symbols): Remove.
+
+ (standard_lookup): Use lookup_symbol_in_language to get effect of
+ C lookup.
+ Cache results.
+
+ (symbol_completion_match): New function.
+ (symbol_completion_add): New function.
+ (ada_make_symbol_completion_list): New function.
+
+ (ada_lookup_partial_symbol,ada_lookup_simple_minsym,
+ add_symbols_from_enclosing_procs,remove_extra_symbols): Replace
+ DEPRECATED_SYMBOL_NAME with SYMBOL_LINKAGE_NAME.
+ (symtab_for_sym): Handle LOC_COMPUTED, LOC_COMPUTED_ARG.
+
+ (ada_lookup_simple_minsym): New function.
+ (ada_lookup_minimal_symbol): Use ada_lookup_simple_minsym.
+
+ (add_symbols_from_enclosing_procs): New interface.
+ Conditionalize more helpfully.
+ Don't bother if program isn't running.
+ Use new interface to get_frame_block.
+ Limit number of levels searched with MAX_LEXICAL_LEVELS, just in case.
+
+ (remove_extra_symbols): New interface.
+ (xget_renaming_scope): New function.
+ (is_package_name): New function.
+ (renaming_is_visible): New function.
+ (remove_out_of_scope_renamings): New function.
+
+ (ada_lookup_symbol_list): New interface.
+ Properly reinitialize the symbol list obstack.
+ Don't call add_symbols_from_enclosing_procs if we start from a
+ static or global block.
+ Use new interfaces to ada_add_block_symbols, add_defn_to_vec,
+ add_symbols_from_enclosing_procs.
+ Add symtab data to cached entries.
+ Handle symbols prefixed with
+ "standard__" specially; strip prefix and don't look in local symbols.
+ Do not include out of scope renaming symbols in list of
+ symbols returned.
+ Add const to block parameter.
+ Move check for non-local, non-global symbols earlier.
+ Remove timing stuff.
+ (ada_lookup_symbol): New interface.
+ Find symtab as well.
+ (ada_lookup_symbol_nonlocal): New function.
+
+ (is_name_suffix): Enhance suffix detection to recognize
+ an optional "__[:digit:]+" before any "\.[:digit:]+" suffix.
+ (is_dot_digits_suffix): New function.
+ (wild_match): Ignore ".[:digit:]*" suffixes during matches.
+
+ (ada_add_block_symbols): New interface. Use obstack to return results
+ in a vector of struct ada_symbol_infos. Add symtab argument.
+ Use new interface to add_defn_to_vec.
+ Remove calls to fill_in_ada_prototype.
+ Use BLOCK_BUCKETS, BLOCK_BUCKET.
+
+ (ada_finish_decode_line_1): Add const qualification to local to fix
+ warning.
+ Start looking in static block for functions to avoid attempts
+ to search frame chain for up-level variables.
+ Adapt to new ada_sals_for_line interface.
+ Use new interfaces to ada_lookup_symbol_list and user_select_syms.
+ Handle quoting of the function name inside the spec string.
+ Skip prologue when funfirstline is set and update the
+ function documentation to that effect.
+
+ (debug_print_lines, debug_print_block, debug_print_blocks,
+ debug_print_symtab): Remove.
+
+ (ada_main_name): New function.
+ (ada_exception_breakpoint_type): New function.
+ (is_known_support_routine): New function.
+ (ada_find_printable_frame): Renamed from find_printable_frame and made
+ global.
+ Remove level parameter.
+ Use new interface to select_frame.
+
+ (begin_command): Remove.
+ (ada_adjust_exception_stop): New function.
+ (ada_print_exception_stop): New function.
+ (exception_name_from_cond): New function.
+ (ada_report_exception_break): Replace disabled code with
+ conditionalization on GNAT_GDB.
+ Get the exception name from the condition string.
+ Remove and move functionality into new functions
+ ada_print_exception_breakpoint_task and
+ ada_print_exception_breakpoint_nontask.
+ (error_breakpoint_runtime_sym_not_found): New function.
+ (is_runtime_sym_defined): New function.
+ (ada_breakpoint_rewrite): Uncomment suppressed code.
+ Use symbolic error-message and runtime-symbol names.
+ Surround runtime symbol names in quotes.
+ Allow non-specific breakpoints on exceptions and assertions before
+ program starts.
+
+ (ada_is_tagged_type): Add parameter.
+ (ada_is_tag_type): New function.
+ (ada_tag_type): Use new ada_lookup_struct_elt_type interface.
+ (ada_variant_discrim_type): Ditto.
+ (value_tag_from_contents_and_address): New function.
+ (type_from_tag): New function.
+ (struct tag_args): New structure used to communicate with
+ ada_tag_name_1.
+ (ada_tag_name_1): New function.
+ (ada_tag_name): New function.
+
+ (ada_scan_number): Update comment.
+ (find_struct_field): New function.
+ (ada_search_struct_field): Make static.
+ (ada_value_struct_elt): New version that returns references when
+ given pointers or references to structs.
+ (ada_lookup_struct_elt_type): Add 'refok' parameter.
+ (ada_which_variant_applies): Use new ada_lookup_struct_elt_type
+ interface.
+ (ada_value_ind): Use new ada_to_fixed_value interface.
+ (ada_coerce_ref): Ditto.
+ (field_offset): Remove.
+
+ (ada_find_any_symbol): New function, extracted from ada_find_any_type.
+ (ada_find_renaming_symbol): New function.
+ (ada_prefer_type): Prefer named types over unnamed ones.
+ (variant_field_index): New function.
+ (contains_variant_part): Removed: subsumed by variant_field_index.
+ (ada_template_to_fixed_record_type): New function, mostly from
+ template_to_fixed_record_type.
+ (template_to_fixed_record_type):
+ Do not scan the type fields beyond the last one; prevents a
+ potential SEGV.
+ Handle case where variant field is listed BEFORE discriminant it
+ depends on.
+ Fix calculation of record length when bit length is
+ not evenly divisible by char length.
+ Move code to ada_template_to_fixed_record_type and call it.
+
+ (template_to_static_fixed_type): Revise comment.
+ Modify to work on ordinary record types as well as templates,
+ so as to handle fields that use ___XVE or ___XVU encodings.
+ (to_record_with_fixed_variant_part): Fill out comment.
+ Initialize C++ stuff in right type.
+ Allow case where DVAL is null.
+ Handle case where variant field is not last.
+ Fix typo concerning record length.
+ (to_fixed_record_type): Decomment disabled code.
+ (to_fixed_record_type): Use variant_field_index instead of
+ contains_variant_part.
+ (to_fixed_variant_branch_type): Ditto.
+ (to_fixed_array_type): Decomment disabled code.
+ (ada_to_fixed_type): Convert tagged types to the specific type.
+ Deactivate the size-check for array types in order to avoid
+ some false size alarms.
+ (to_static_fixed_type): Decomment disabled code.
+ Modify to call template_to_static_fixed_type
+ on ordinary structs, not just ___XVE- and ___XVU-encoded fields.
+ (ada_to_fixed_value_create): Renamed version of old ada_to_fixed_value.
+ Remove valaddr argument, as it is never really used.
+ (ada_to_fixed_value): Change interface to act on single struct value*
+ operand.
+ (adjust_pc_past_prologue): New function.
+ (ada_attribute_name): Modify to take enum exp_opcode argument.
+
+ (ada_enum_name): Recognize new homonym-distinguishing convention.
+ Adjust local variable's type to remove compiler warning.
+ Fix a small problem in the part that unqualifies the enumeration name.
+ (ada_value_binop): New function.
+ (ada_value_equal): New function.
+
+ (ada_evaluate_subexp): Use new ada_lookup_struct_elt_type interface.
+ Don't give error message when not doing normal evaluation
+ and a tagged type doesn't seem to contain a structure member.
+ Give error message for packed arrays.
+ For indexing arrays, handle pointers to packed arrays correctly.
+ Handle case of 'first and 'last attributes of bare integral type
+ without encoded subtype info.
+ Remove some unnecessary casts.
+ Fix uninitialized value of type in computing 'first, 'last, or 'length
+ of array object.
+ Add BINOP_EQUAL and BINOP_NOTEQUAL cases.
+ Remove binop_user_defined_p tests and value_x_binop and value_x_unop
+ calls.
+ Attributes are now exp_opcode values.
+ Correct treatment of 'modulus.
+ Better error message for taking 'length of wrong kind of type;
+ improve comment.
+ Change EVAL_NORMAL to noside for consistency.
+ Use ada_value_binop for DIV, MOD, REM.
+ Make special case out of array of length 0, since an argument
+ of 0 upsets some platforms' malloc.
+ Use OP_STRING instead of OP_ARRAY.
+ For slice, add check that we have an array type before extracting
+ a slice out of it. Avoids a SEGV.
+ When evaluating an array slice, if the array type is a reference to
+ an aligner type, then replace the aligner type by the actual type.
+ Decomment disabled code.
+ Remove some dead code.
+ Use temporary struct symbols (marked as being in UNDEF_NAMESPACE)
+ to indicate unresolved names, instead of OP_UNRESOLVED_VALUE.
+ Rename BINOP_MBR to BINOP_IN_BOUNDS, TERNOP_MBR to TERNOP_IN_RANGE,
+ and UNOP_MBR to UNOP_IN_RANGE.
+ If an array type has a parallel ___XVE type, then use it.
+ Turn arrays into pointers for lvalue arrays.
+ Change TERNOP_SLICE code to work even when bounds are unknown, ignoring
+ bounds error and handle 0-length slices.
+ Use lim_warning.
+ When selecting fields, apply ada_to_fixed_value (because the fields
+ might have ___XVU or ___XVE encodings even if not dynamic.)
+ Use ada_to_fixed_value_create and new ada_to_fixed_value interface.
+ (ada_is_system_address_type): New function.
+
+ (get_var_value): Use new interface to ada_lookup_symbol_list.
+ (get_int_var_value): New interface.
+ (to_fixed_range_type): Allow unknown bound, with warning.
+ (ada_is_modular_type): Decomment disabled code.
+ (ADA_OPERATORS): New definition.
+ (ada_operator_length): New function.
+ (ada_expr_op_name): New function.
+ (ada_forward_operator_length): New function.
+ (ada_dump_subexp_body): New function.
+ (ada_print_subexp): New function.
+ (ada_exp_descriptor): New constant.
+ (ada_op_print_tab): Add 'size. Remove FIXMEs.
+ (ada_language_defn): Add ada_exp_descriptor entry.
+ Change ada_parse => parse.
+ Add post-parser entry.
+ Use ada-specific non-local symbol lookup.
+ Don't use C-style arrays.
+ String lower-bound is 1.
+ Decomment disabled code.
+ (parse): New function.
+ New fields ada_translate_error_message, ada_lookup_symbol,
+ ada_lookup_minimal_symbol.
+
+ * ada-lang.h: Update copyright dates.
+ Replace the mangle/demangle terminology throughout by the
+ more appropriate encode/decode one.
+ Include breakpoint.h.
+ Forward declare struct partial_symbol, struct block.
+ (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Define.
+ (EXTRACT_ADDRESS): Remove.
+ (EXTRACT_INT): Remove.
+ (ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS): Define.
+ (MAX_ENCLOSING_FRAME_LEVELS): Define.
+ (MAX_RENAMING_CHAIN_LENGTH): Define.
+ (struct ada_opname_map): mangled => decoded, demangled=>encoded.
+
+ (enum task_states): Remove.
+ ada_task_states: Remove.
+ (fat_string): Remove.
+ (struct entry_call): Remove.
+ (struct task_fields): Remove.
+ (struct task_entry): Remove.
+
+ (struct ada_symbol_info): Define.
+ (enum ada_attribute): Remove.
+ (enum ada_operator): Define.
+
+ (ada_get_field_index): Declare.
+ (ada_coerce_to_simple_array): Rename to ada_coerce_to_simple_array_ptr.
+ (ada_is_simple_array): Rename to ada_is_simple_array_type.
+ (ada_is_array_descriptor): Rename to ada_is_array_descriptor_type.
+ (ada_lookup_symbol_list): New interface.
+ (ada_decode_symbol): Declare.
+ (ada_decode): Declare.
+ (ada_lookup_symbol): New interface.
+ (ada_update_initial_language): Declare.
+ (ada_lookup_simple_minsym): Declare.
+ (user_select_syms): New interface.
+ (ada_sals_for_line): Declare.
+ (ada_is_tagged_type): New interface.
+ (ada_tag_name): Declare.
+ (ada_lookup_struct_elt_type): Remove declaration.
+ (ada_search_struct_field): Remove declaration.
+ (ada_attribute_name): New interface.
+ (ada_is_system_address_type): Declare.
+ (ada_to_fixed_value): Remove declaration.
+ (ada_template_to_fixed_record_type_1): Declare.
+ (get_int_var_value): New interface.
+ (ada_find_any_symbol): Declare.
+ (ada_find_renaming_symbol): Declare.
+ (ada_mangle): Rename to ada_encode.
+ (ada_simple_renamed_entity): Remove const.
+ (ada_main_name): Declare.
+ (get_current_task): Rename to ada_get_current_task.
+ (get_entry_number): Remove declaration.
+ (ada_report_exception_break): Remove declaration.
+ (ada_print_exception_breakpoint_nontask): Declare.
+ (ada_print_exception_breakpoint_task): Declare.
+ (ada_find_printable_frame): Declare.
+
+ * ada-lex.l: Update copyright notices.
+ Use xmalloc and xfree instead of malloc and free.
+ Use new interface to name_lookup.
+ Use new interface to
+ ada_mangle=>ada_encode.
+ Redo handling of '$...' variable to parallel current treatment
+ in c-exp.y.
+ (resize_tempbuf, canonicalizeNumeral, is_digit_in_base,
+ digit_to_int, strtoulst, processInt, processReal, processId,
+ block_lookup, name_lookup, find_dot_all, subseqMatch, processAttribute,
+ yywrap): Protoize.
+
+ (processInt): Use cast to remove harmless warning.
+ (processReal): Modify to get rid of compiler warning on scan formats.
+
+ (processId): Replace xmalloc with obstack_alloc for name and remove
+ call to ada_name_string_cleanup.
+ Remove obsolete disabled code.
+ (name_lookup): Ditto.
+ New interface.
+ Use obsavestring on temp_parse_space instead of savestring
+ on name, and remove call to ada_name_string_cleanup.
+ Free string returned from ada_simple_renamed_entity.
+ Use new interface to ada_lookup_symbol_list.
+ Decomment disabled code.
+ Treat LOC_COMPUTED and LOC_COMPUTED_ARG symbols as variables,
+ not types.
+ When a type name lookup succeeds as a result of
+ lookup_primitive_typename, check for regular type entry that has not
+ yet been read in.
+ Limit length of chain of renamed symbols we are willing to follow.
+ Do not break names beginning with "standard__" into segments.
+ (block_lookup): Use new interface to ada_lookup_symbol_list.
+
+ * ada-typeprint.c: Update copyright notice.
+ (demangled_type_name): Rename to decoded_type_name.
+ (ada_typedef_print): Use SYMBOL_PRINT_NAME.
+ (print_range_bound): Correct handling of negative
+ bounds that make the index type looked unsigned under STABS.
+ (print_dynamic_range_bound): Use new interface to get_int_var_value.
+ (print_range_type_named): Use the builtin int type if no type
+ corresponding to the given type name could be found.
+ (print_array_type): ada_is_simple_array => ada_is_simple_array_type.
+ Add some bullet-proofing.
+ (print_variant_clauses): Allow for variant branches with ___XVU
+ encodings that are not dynamic fields.
+ Use new interface to ada_is_tagged_type.
+ (print_record_type): Allow for fields with ___XVE encodings that
+ are not dynamic fields.
+ Use new interface to ada_is_tagged_type.
+ (ada_print_type): ada_is_array_descriptor =>
+ ada_is_array_descriptor_type.
+
+ * ada-valprint.c: Update copyright notice.
+ Include gdb_string.h
+ Include infcall.h
+ (ui_memcpy): New function.
+ (ada_print_floating): New function.
+ (ada_print_str): Order arguments correctly.
+ Correct handling of empty arrays and arrays of 0-length items.
+ ada_is_array_descriptor => ada_is_array_descriptor_type
+ Print values of type System.Address in hexadecimal format.
+ Use ada_print_floating to print floating-point numbers in Ada format.
+ Print class tag values with type names.
+ No longer print the address of reference values. Avoids
+ a potential confusion.
+ (ada_value_print): Stop printing the object type for reference
+ values, but preserve that behavior for access types. Avoids
+ a potential confusion.
+ Simplify one conditional expression, as the first part is now
+ necessarily true.
+ ada_is_array_descriptor => ada_is_array_descriptor_type
+ Add check for arrays for null records, and print them by hand.
+
+2004-06-01 Jim Blandy <jimb@redhat.com>
+
+ * ppc-tdep.h: Delete unused 'regoff' member.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Don't initialize it.
+
+2004-06-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR symtab/1661.
+ * hpread.c (hpread_pxdb_needed): Call memset after alloca.
+ (hpread_read_struct_type): Likewise.
+
+2004-06-01 Andrew Cagney <cagney@gnu.org>
+
+ * mi/mi-cmd-env.c (env_execute_cli_command): Use xstrprintf
+ instead of xasprintf.
+ * mi/mi-main.c (mi_error_last_message, mi_cmd_exec_interrupt)
+ (mi_cmd_thread_select, mi_cmd_thread_list_ids)
+ (mi_cmd_data_list_register_names)
+ (mi_cmd_data_list_changed_registers)
+ (mi_cmd_data_list_register_values)
+ (get_register, mi_cmd_data_write_register_values)
+ (mi_cmd_data_write_register_values)
+ (mi_cmd_data_assign, mi_cmd_data_evaluate_expression)
+ (mi_cmd_target_download, mi_cmd_target_select)
+ (mi_cmd_data_read_memory, mi_cmd_data_write_memory)
+ (mi_execute_cli_command, mi_execute_async_cli_command)
+ (mi_execute_async_cli_command): Ditto.
+ * mi/mi-interp.c (mi_cmd_interpreter_exec) Ditto.
+ * mi/mi-cmd-var.c (mi_cmd_var_create): Ditto.
+
+ * mi/mi-cmds.h (mi_error_last_message): Delete declaration.
+ * mi/mi-interp.c (mi_cmd_interpreter_exec): Call
+ error_last_message instead of mi_error_last_message.
+ * mi/mi-main.c (mi_error_last_message): Delete function.
+
+ * mi/mi-main.c (mi_cmd_data_read_memory): Add missing return for
+ "invalid number of columns" error. Delete redundant "out of
+ memory" check.
+
+2004-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-nat.c: Don't include <sys/procfs.h>.
+ (gregset_t, fpregset_t): Remove typedefs.
+ (CANNOT_FETCH_REGISTER, CANNOT_STORE_REGISTER): Remove macros.
+ (REG_OFFSET): Rename argument.
+ (i386bsd_r_reg_offset): Rename from reg_offset.
+ (REG_ADDR): Remove macro.
+ (cannot_fetch_register, supply_gregset, fill_gregset): Remove
+ functions.
+ (i386bsd_supply_gregset, i386bsd_collect_gregset): New functions.
+ (fetch_inferior_registers): Use `struct reg' and `struct fpreg'
+ instead of gregset_t and fpregset_t. Use i386bsd_supply_gregset
+ instead of supply_gregset.
+ (store_inferior_registers): Use `struct reg' and `struct fpreg'
+ instead of gregset_t and fpregset_t. Use i386bsd_collect_gregset
+ instead of fill_gregset.
+ (register_u_addr): Use i386_r_reg_offset instead of REG_ADDR.
+
+ * i386bsd-nat.c: Don't include "gregset.h".
+ (supply_gregset, fill_gregset): Make static.
+ (supply_fpregset, fill_fpregset): Remove.
+ * Makefile.in (i386bsd-nat.o): Update dependencies.
+
+2004-05-30 Mark Kettenis <kettenis@gnu.org>
+
+ * fbsd-proc.c: Include "regcache.h", "regset.h" and
+ "gdb_assert.h". Con't include "gregset.h".
+ (fbsd_make_corefile_notes): Use regset-based core file support
+ instead off fill_gregset and fill_fpregset.
+ * Makefile.in (fbsd-proc.o): Update dependencies.
+
+ * m88k-tdep.c (m88k_analyze_prologue): Fix handling of branch
+ instructions.
+ (m88k_frame_prev_register): Simplify code a bit.
+
+ * amd64-tdep.c (amd64_supply_fpregset): Adjust comment.
+ (amd64_collect_fpregset): New function.
+ (amd64_regset_from_core_section): Use amd64_collect_fpregset.
+
+ * hppa-tdep.h (hppa_regnum): Add HPPA_R31_REGNUM.
+
+ * i386-tdep.c (i386_supply_gregset): Adjust comment.
+ (i386_collect_gregset): New function.
+ (i386_supply_fpregset): Adjust comment.
+ (i386_collect_fpregset): New function.
+ (i386_regset_from_core_section): Use i386_collect_gregset and
+ i386_collect_fpregset.
+
+ * hppa-tdep.c (hppa_frame_prev_register_helper): Reimplement to
+ handle VALUEP being null.
+
+ * regset.h (collect_regset_ftype): Unconstify fourth argument.
+
+2004-05-29 Mark Kettenis <kettenis@gnu.org>
+
+ * MAINTAINERS: Undelete m88k. Add myself as maintainer.
+
+ * amd64obsd-tdep.c (amd64obsd_sigtramp_p): Adjust for new
+ assembler in OpenBSD 3.5-current.
+ (amd64obsd_sigcontext_addr): Likewise.
+
+2004-05-28 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c: Use the modern gdbarch methods for handling the
+ register set, so our regcache isn't declared "legacy" and our E500
+ pseudoregister read and write functions aren't ignored.
+ (rs6000_register_byte, rs6000_register_raw_size,
+ rs6000_register_virtual_type, rs6000_register_convertible,
+ rs6000_register_convert_to_virtual,
+ rs6000_register_convert_to_raw): Deleted.
+ (rs6000_register_type, rs6000_convert_register_p,
+ rs6000_register_to_value, rs6000_value_to_register): New
+ functions.
+ (rs6000_gdbarch_init): Don't register
+ gdbarch_deprecated_register_size,
+ gdbarch_deprecated_register_bytes,
+ gdbarch_deprecated_register_byte,
+ gdbarch_deprecated_register_raw_size,
+ gdbarch_deprecated_register_virtual_type,
+ gdbarch_deprecated_register_convertible,
+ gdbarch_deprecated_register_convert_to_virtual, or
+ gdbarch_deprecated_register_convert_to_raw methods. Instead,
+ register gdbarch_register_type, gdbarch_convert_register_p,
+ gdbarch_register_to_value, and gdbarch_value_to_register methods.
+
+2004-05-26 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (rs6000_dwarf2_stab_reg_to_regnum): Deleted.
+ (rs6000_stab_reg_to_regnum, rs6000_dwarf2_reg_to_regnum): New
+ functions, updated to match the register numberings used in GCC.
+ (rs6000_gdbarch_init): Register rs6000_stab_reg_to_regnum and
+ rs6000_dwarf2_reg_to_regnum as register number conversions
+ functions for STABS and Dwarf2.
+
+2004-05-26 Randolph Chung <tausq@debian.org>
+
+ * infttrace.h (target_waitkind): Forward declare type instead of pulling
+ in header file.
+
+2004-05-25 Joel Brobecker <brobecker@gnat.com>
+
+ * NEWS: Document new "start" command.
+
+2004-05-25 Randolph Chung <tausq@debian.org>
+
+ * hppa-linux-tdep.c (hppa_linux_init_abi): sizeof(long double) == 8 on
+ hppa-linux.
+
+2004-05-25 Randolph Chung <tausq@debian.org>
+
+ * hppa-hpux-tdep.c (offsetof): Define.
+ (hppa_hpux_pc_in_sigtramp, hppa32_hpux_frame_saved_pc_in_sigtramp)
+ (hppa32_hpux_frame_base_before_sigtramp)
+ (hppa32_hpux_frame_find_saved_regs_in_sigtramp)
+ (hppa64_hpux_frame_saved_pc_in_sigtramp)
+ (hppa64_hpux_frame_base_before_sigtramp)
+ (hppa64_hpux_frame_find_saved_regs_in_sigtramp): Remove unused
+ functions.
+ (struct hppa_hpux_sigtramp_unwind_cache, hppa_hpux_tramp_reg)
+ (hppa_hpux_sigtramp_frame_unwind_cache)
+ (hppa_hpux_sigtramp_frame_this_id)
+ (hppa_hpux_sigtramp_frame_prev_register)
+ (hppa_hpux_sigtramp_frame_unwind)
+ (hppa_hpux_sigtramp_unwind_sniffer): New signal trampoline unwinder.
+ (hppa_hpux_init_abi): Register sigtramp unwinder.
+ * Makefile.in (hppa-hpux-tdep.o): Update dependencies.
+
+2004-05-25 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_fallback_frame_cache): Handle stack adjustment,
+ and multiple stack unwinds.
+ (hppa_stub_unwind_sniffer): Handle unwind from pc == 0.
+
+2004-05-25 Andrew Cagney <cagney@gnu.org>
+
+ * symfile.h (symbol_file_add_from_memory): Delete declaration.
+ * symfile-mem.h: Delete file.
+ * symfile-mem.c: Do not include "symfile-mem.h".
+ (symbol_file_add_from_memory): Make static. Use "struct bfd" and
+ "struct bfd_section". When an error do not bother returning NULL.
+ (add_symbol_file_from_memory_command): Use "struct bfd" and
+ "struct bfd_section".
+ * Makefile.in (symfile_mem_h): Delete.
+ (symfile-mem.o): Update dependencies.
+
+2004-05-25 Nick Roberts <nickrob@gnu.org>
+
+ * gdb-mi.el: New file.
+
+2004-05-25 Andrew Cagney <cagney@gnu.org>
+
+ * inftarg.c: Include "observer.h".
+ (child_attach, child_create_inferior): Notify inferior_created.
+ * corelow.c: Include "observer.h".
+ (core_open): Notify inferior_created.
+ * Makefile.in (inftarg.o, corelow.o): Update dependencies.
+
+2004-05-25 Andrew Cagney <cagney@gnu.org>
+
+ * target.h (struct target_ops): Add from_tty to
+ to_create_inferior.
+ (target_create_inferior, find_default_create_inferior): Update.
+ * infcmd.c (run_command): Update.
+ * wince.c (child_create_inferior): Update.
+ * win32-nat.c (child_create_inferior): Update.
+ * uw-thread.c (uw_thread_create_inferior): Update.
+ * thread-db.c (thread_db_create_inferior): Update.
+ * target.c (debug_to_create_inferior)
+ (find_default_create_inferior): Update.
+ (maybe_kill_then_create_inferior): Update.
+ * sol-thread.c (sol_thread_create_inferior): Update.
+ * remote.c (extended_remote_async_create_inferior)
+ (extended_remote_create_inferior): Update.
+ * remote-vx.c (vx_create_inferior): Update.
+ * remote-st.c (st2000_create_inferior): Update.
+ * remote-sim.c (gdbsim_create_inferior): Update.
+ * remote-sds.c (sds_create_inferior): Update.
+ * remote-rdp.c (remote_rdp_create_inferior): Update.
+ * remote-rdi.c (arm_rdi_create_inferior): Update.
+ * remote-m32r-sdi.c (m32r_create_inferior): Update.
+ * remote-e7000.c (e7000_create_inferior): Update.
+ * procfs.c (procfs_create_inferior): Update.
+ * ocd.c (ocd_create_inferior): Update.
+ * ocd.h (ocd_create_inferior): Update.
+ * nto-procfs.c (procfs_create_inferior): Update.
+ * monitor.c (monitor_create_inferior): Update.
+ * lin-lwp.c (lin_lwp_create_inferior): Update.
+ * inftarg.c (child_create_inferior): Update.
+ * hpux-thread.c (hpux_thread_create_inferior): Update.
+ * gnu-nat.c (gnu_create_inferior): Update.
+
+2004-05-25 Andrew Cagney <cagney@gnu.com>
+
+ * MAINTAINERS: Update e-mail address.
+
+2004-05-24 Randolph Chung <tausq@debian.org>
+
+ * thread.c (info_threads_command, thread_apply_all_command)
+ (thread_apply_command, thread_command, do_captured_thread_select):
+ Remove HPUXHPPA-specific code.
+
+2004-05-24 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (SR4EXPORT_LDIL_OFFSET, SR4EXPORT_LDO_OFFSET): Remove
+ unused symbols.
+ * hppa-tdep.h (HPPA_INSTRUCTION_SIZE): Remove, since there are no more
+ references.
+
+2004-05-24 Joel Brobecker <brobecker@gnat.com>
+
+ * infcmd.c (kill_if_already_running): New function, extracted
+ from run_command().
+ (run_command): Replace extracted code by call to
+ kill_if_already_running().
+ (start_command): New function.
+ (_initialize_infcmd): Add "start" command.
+
+2004-05-24 Mark Kettenis <kettenis@gnu.org>
+
+ Add OpenBSD/m88k support.
+ * NEWS (New native configurations): Mention OpenBSD/m88k.
+ * m88k-tdep.c, m88k-tdep.h, m88kbsd-nat.c, config/m88k/nm-obsd.h,
+ config/m88k/obsd.mh, config/m88k/obsd.mt: New files.
+ * Makefile.in (m88k_tdep_h): New variable.
+ (ALLDEPFILES): Add m88k-tdep.c and m88kbsd-nat.c.
+ (m88kbsd-nat.o, m88k-tdep.o): New dependencies.
+ * configure.host: Add m88*-*-openbsd*.
+ * configure.tgt: Add m88*-*-openbsd*.
+
+2004-05-24 Jim Blandy <jimb@redhat.com>
+
+ * MAINTAINERS (tracing bytecode stuff): Allow global maintainers
+ to approve changes.
+
+2004-05-24 Kevin Buettner <kevinb@redhat.com>
+
+ * symtab.c (fixup_section): Search section table when lookup by
+ name fails.
+
+2004-05-24 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c: Fix handling of 8-byte structures; they should not
+ be "small_struct".
+
+2004-05-24 Mark Kettenis <kettenis@gnu.org>
+
+ * m68kbsd-nat.c (m68kbsd_collect_gregset): Specify correct
+ register number in regcache_raw_collect call.
+ (m68kbsd_collect_fpregset): Likewise.
+ * vaxbsd-nat.c (vaxbsd_collect_gregset): Likewise.
+
+ * regset.h (struct regset): Add back `regset' member.
+
+2004-05-23 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Check for td_pcb in `struct thread'.
+ * configure, config.in: Regenerated.
+
+ * dpx2-nat.c: Remove file.
+ * Makefile.in (ALLDEPFILES): Remove dpx2-nat.c.
+ (dpx2-nat.o): Remove dependencies.
+
+ * amd64obsd-nat.c: Include "gdbcore.h", "regcache.h",
+ <sys/types.h>, <machine/frame.h>, <machine/pcb.h> and "bsd-kvm.h".
+ (amd64obsd_supply_pcb): New function.
+ (_initialize_amd64obsd_nat): Enable libkvm interface.
+ * Makefile.in (amd64obsd-nat.o): Update dependencies.
+ * config/i386/obsd64.mh (NATDEPFILES): Add bsd-kvm.o
+ (LOADLIBES): New variable.
+
+ * sparcnbsd-nat.c: Include "gdbcore.h", "regcache.h",
+ <sys/types.h>, <machine/pcb.h> and "bsd-kvm.h".
+ (sparc32nbsd_supply_pcb): New function.
+ (_initialize_sparcnbsd_nat): Enable libkvm interface.
+ * Makefile.in (sparcnbsd-nat.o): Update dependencies.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+
+2004-05-22 Mark Kettenis <kettenis@gnu.org>
+
+ * bsd-kvm.c, bsd-kvm.h: New files.
+ * i386fbsd-nat.c: Include <sys/types.h>, <machine/pcb.h> and
+ "bsd-kvm.h".
+ (i386fbsd_supply_pcb): New function.
+ * Makefile.in (ALLDEPFILES): Add bsd-kvm.c.
+ (i386fbsd-nat.o): Update dependencies.
+ (bsd_kvm_h): New variable.
+ (bsd-kvm.o): New dependency.
+ * config/i386/fbsd.mh (NATDEPFILES): Add bsd-kvm.o.
+ (LOADLIBES): New variable.
+
+ * regset.c: Tweak comment.
+ (regset_alloc): Remove descr argument. Use GDBARCH_OBSTACK_ZALLOC
+ macro.
+ * regset.h: Update copyright year.
+ (struct regset): Remove `descr' member, add `gdbarch' member.
+ (regset_alloc): Adjust prototype and comment.
+ * i386-tdep.c (i386_supply_gregset): Get TDEP from REGSET->arch.
+ (i386_supply_fpregset): Likewise.
+ (i386_regset_from_core_section): Update call to regset_alloc.
+ * i386obsd-tdep.c (i386obsd_aout_supply_regset): Get TDEP from
+ REGSET->arch.
+ (i386obsd_aout_regset_from_core_section): Update call to
+ regset_alloc.
+ * i386nbsd-tdep.c (i386nbsd_aout_supply_regset): Get TDEP from
+ REGSET->arch.
+ (i386nbsd_aout_regset_from_core_section): Update call to
+ regset_alloc.
+ * amd64-tdep.c (amd64_supply_fpregset): Get TDEP from
+ REGSET->arch.
+ (amd64_regset_from_core_section): Update call to regset_alloc.
+ * amd64obsd-tdep.c (amd64obsd_supply_regset): Get TDEP from
+ REGSET->arch.
+ (amd64obsd_regset_from_core_section): Update call to regset_alloc.
+ * sparcnbsd-tdep.c (sparc32nbsd_supply_gregset): Directly pass
+ &sparc32nbsd_gregset in sparc32_supply_gregset call.
+ (sparc32nbsd_init_abi): Update call to regset_alloc.
+ * sparc64obsd-tdep.c (sparc64obsd_supply_gregset): Directly pass
+ &sparc64obsd_core_gregset in sparc64_supply_gregset call.
+ (sparc64obsd_init_abi): Update call to regset_alloc.
+ * sparc64nbsd-tdep.c (sparc64nbsd_supply_gregset): Directly pass
+ &sparc64nbsd_gregset in sparc64_supply_gregset call.
+ (sparc64nbsd_init_abi): Update call to regset_alloc.
+ * sparc64fbsd-tdep.c (sparc64fbsd_supply_gregset): Directly pass
+ &sparc64fbsd_gregset in sparc64_supply_gregset call.
+ (sparc64fbsd_init_abi): Update call to regset_alloc.
+
+2004-05-22 Jim Blandy <jimb@redhat.com>
+
+ * ppc-tdep.h (spe_register_p): New declaration.
+ (struct gdbarch_tdep): New members: ppc_acc_regnum and
+ ppc_spefscr_regnum.
+ * rs6000-tdep.c (spe_register_p): New function.
+ (rs6000_dwarf2_stab_reg_to_regnum): Recognize numbers for acc and
+ spefscr.
+ (rs6000_gdbarch_init): Initialize the new members of the tdep
+ structure.
+
+2004-05-21 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (fetch_register): Move code back to be next
+ to the comment that describes it. (Moved code, instead of
+ comment, for symmetry with store_register.)
+
+ Allocate regset structures in the gdbarch's obstack, not using
+ xmalloc.
+ * regset.c (regset_alloc): Renamed from regset_xmalloc.
+ Add 'arch' argument. Allocate the regset on arch's obstack, not
+ using xmalloc.
+ * regset.h (regset_alloc): Update declaration.
+ * am64-tdep.c (amd64_regset_from_core_section): Update call; pass
+ gdbarch argument.
+ * amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Same.
+ * i386-tdep.c (i386_regset_from_core_section): Same.
+ * i386nbsd-tdep.c (i386nbsd_aout_regset_from_core_section): Same.
+ * i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Same.
+ * sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Same.
+ * sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Same.
+ * sparc64obsd-tdep.c (sparc64obsd_init_abi): Same.
+ * sparcnbsd-tdep.c (sparc32nbsd_init_abi): Same.
+
+2004-05-21 Joel Brobecker <brobecker@gnat.com>
+
+ * config/djgpp/fnchange.lst: Undo previous change, was useless.
+
+2004-05-21 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2expr.c (execute_stack_op): Add 'break' statements after
+ cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.)
+
+2004-05-20 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (rs6000_push_dummy_call): Formatting fixes.
+
+2004-05-20 Mark Kettenis <kettenis@gnu.org>
+
+ * regset.h: Make prototype const-correct.
+ * regset.c (regset_xmalloc): Make const-correct.
+
+2004-05-20 Paul N. Hilfinger <hilfinger@gnat.com>
+
+ * symtab.h (SYMBOL_SEARCH_NAME): New definition.
+ (SYMBOL_MATCHES_SEARCH_NAME): New definition.
+ (symbol_search_name): Declare.
+
+ * dictionary.c (iter_name_first_hashed): Match on SYMBOL_SEARCH_NAME.
+ (iter_name_next_hashed): Ditto.
+ (iter_name_next_linear): Ditto.
+ (insert_symbol_hashed): Hash on SYMBOL_SEARCH_NAME.
+
+ * symtab.c (lookup_partial_symbol): Assume symbols ordered by
+ search name, using SYMBOL_SEARCH_NAME and SYMBOL_MATCHES_SEARCH_NAME.
+ (symbol_search_name): New function.
+
+ * symfile.c (compare_psymbols): Order by SYMBOL_SEARCH_NAME.
+
+ * minsyms.c (build_minimal_symbol_hash_tables): Change
+ test for adding to demangled hash table to check for difference
+ between SYMBOL_SEARCH_NAME and SYMBOL_LINKAGE_NAME.
+
+2004-05-19 Jim Blandy <jimb@redhat.com>
+
+ Use a constructor function to create regset structures.
+ * regset.h (supply_regset_ftype, collect_regset_ftype): New typedefs.
+ (struct regset): Use supply_regset_ftype. Add new
+ 'collect_regset' member.
+ (regset_xmalloc): New declaration.
+ * regset.c: New file.
+ * am64-tdep.c (amd64_regset_from_core_section): Use
+ regset_xmalloc to construct regset structures.
+ * amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Same.
+ * i386-tdep.c (i386_regset_from_core_section): Same.
+ * i386nbsd-tdep.c (i386nbsd_aout_regset_from_core_section): Same.
+ * i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Same.
+ * sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Same.
+ * sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Same.
+ * sparc64obsd-tdep.c (sparc64obsd_init_abi): Same.
+ * sparcnbsd-tdep.c (sparc32nbsd_init_abi): Same.
+ * Makefile.in (COMMON_OBS): Add regset.o.
+ (regset.o): New rule.
+
+2004-05-19 Joel Brobecker <brobecker@gnat.com>
+
+ * config/djgpp/fnchange.lst: Add entries for pthread_cond_wait.exp
+ and pthread_cond_wait.c.
+
+2004-05-18 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Initialize tdep fields
+ before the mach-specific switch, and then let the individual cases
+ override the defaults, rather than leaving them uninitialized
+ until the switch and then setting them in each case.
+
+2004-05-18 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_frame_cache): Check for validity of r31 for
+ millicode functions.
+
+2004-05-18 Randolph Chung <tausq@debian.org>
+
+ * somsolib.c (som_solib_remove_inferior_hook): Make all the size
+ references to dld_flags_buffer consistent.
+
+2004-05-18 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_frame_cache): If a frame pointer is available, use
+ it for unwinding the stack.
+
+2004-05-18 Randolph Chung <tausq@debian.org>
+
+ * config/pa/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE)
+ Undefine these so we can overide them using gdbarch.
+
+2004-05-18 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_stub_frame_unwind_cache): Don't do export stub
+ handling for 64-bit HPUX (elf).
+
+2004-05-18 Daniel Jacobowitz <dan@debian.org>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Use LL suffix for large
+ constants.
+ * amd64-tdep.c (amd64_skip_prologue): Likewise.
+ * ia64-tdep.c (examine_prologue): Likewise.
+ * ns32k-tdep.c (ns32k_fix_call_dummy): Remove unused function.
+ * v850-tdep.c (v850_fix_call_dummy): Likewise.
+
+2004-05-18 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-tdep.c (vax_return_value): Implement
+ RETURN_VALUE_ABI_RETURNS_ADDRESS.
+
+2004-05-17 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-tdep.c (vax_return_value): Fix typo.
+
+2004-05-17 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Mark Salter was also responsible for
+ testsuite/config/
+
+ * NEWS: Mention signal fixes.
+
+2004-05-17 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_stub_frame_unwind_cache): For HPUX stub unwinding,
+ check to see if we are unwinding an export stub. Export stubs clobber
+ the %rp in the call path and stores the original rp in a stack slot.
+
+2004-05-17 Jim Blandy <jimb@redhat.com>
+
+ * MAINTAINERS: Update address for J.T. Conklin.
+
+2004-05-17 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c: Remove superfluous #include's.
+ * Makefile.in (hppa-tdep.o): Update dependencies.
+
+2004-05-17 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (THREAD_INITIAL_FRAME_SYMBOL): Delete unused symbol.
+ (THREAD_INITIAL_FRAME_SYM_LEN): Likewise.
+ (unwind_command, hppa_alignof, prologue_inst_adjust_sp)
+ (is_branch, inst_saves_gr, inst_saves_fr, compare_unwind_entries)
+ (read_unwind_info, internalize_unwinds, record_text_segment_lowaddr):
+ Remove static function declarations.
+
+2004-05-17 Mark Kettenis <kettenis@gnu.org>
+
+ * alphabsd-nat.c: Update copyright year.
+ (getregs_supplies): Replace PC_REGNUM with ALPHA_PC_REGNUM.
+
+ * m68k-tdep.h (m68k_regnum): Add M68K_D2_REGNUM, M68K_D7_REGNUM
+ and M68K_A2_REGNUM.
+
+ * m68k-tdep.c (m68k_svr4_return_value): Implement
+ RETURN_VALUE_ABI_RETURNS_ADDRESS.
+
+2004-05-16 Mark Kettenis <kettenis@gnu.org>
+
+ * sol-thread.c Update copyright year. Fix various coding
+ standards violations. Tweak a few comments.
+ (td_err_string, td_state_string, thread_to_lwp, lwp_to_thread):
+ Delete prototypes.
+
+2004-05-15 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.h (hppa_frame_prev_register_helper): Pass save_regs
+ as pointer instead of array reference since HPUX compiler does
+ not accept unsized array arguments.
+ * somsolib.c (dld_flags_buffer): Use constant array size.
+
+2004-05-15 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64obsd-tdep.c (amd64obsd_sigtramp_p): Replace hexadecimal
+ offset with decimal offset.
+ (amd64obsd_sigcontext_addr): Return correct address for entire
+ signal trampoline.
+
+ * vax-tdep.c (vax_frame_num_args): Use get_frame_base_address
+ instead of get_frame_base.
+
+ * i386bsd-nat.c (supply_gregset): Use regcache_raw_supply.
+ (fill_gregset): Use regcache_raw_collect.
+
+ * config/djgpp/fnchange.lst: Add entries for ppcobsd-nat.c and
+ ppcobsd-tdep.c.
+
+ * config/sparc/tm-nbsd64.h: Remove file.
+ * config/tm-sunos.h: Remove file.
+
+2004-05-15 Joel Brobecker <brobecker@gnat.com>
+
+ * rs6000-tdep.c (store_param_on_stack_p): New function,
+ an improved version of some code extracted from skip_prologue().
+ (skip_prologue): Use store_param_on_stack_p() to detect
+ instructions saving a parameter on the stack. Detect when r0
+ is used to save a parameter.
+ Do not mark "li rx, SIMM" instructions as part of the prologue,
+ unless the following instruction is also part of the prologue.
+
+2004-05-14 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): Simplify
+ STEP_OVER_UNDEBUGGABLE.
+
+ * infrun.c (handle_step_into_function): Delete function.
+ (handle_inferior_event): Inline calls to
+ handle_step_into_function.
+
+2004-05-14 Jerome Guitton <guitton@gnat.com>
+
+ * rs6000-nat.c: Fix a comment.
+
+2004-05-12 David Anderson <davea@sgi.com>
+
+ Committed by Jim Blandy <jimb@redhat.com>:
+ * regcache.c (struct regcache_descr): fix comment spelling.
+
+2004-05-13 J. Brobecker <brobecker@gnat.com>
+
+ * aix-thread.c: s/ppc_floating_point_p/ppc_floating_point_unit_p/.
+ Fixes a link link failure.
+
+2004-05-13 J. Brobecker <brobecker@gnat.com>
+
+ * aix-thread.c (store_regs_kernel_thread): Fix a little obvious
+ error that was causing the build to fail.
+
+2004-05-13 J. Brobecker <brobecker@gnat.com>
+
+ * aix-thread.c: #include "gdb_string.h". Needed for memset and memcopy.
+ * Makefile.in (aix-thread.o): Add dependency on gdb_string.h.
+
+2004-05-13 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): Check for
+ STEP_OVER_UNDEBUGGABLE after signal trampolines and function
+ calls. Update comments.
+
+2004-05-13 Jim Blandy <jimb@redhat.com>
+
+ * aix-thread.c (pdc_read_regs, supply_gprs64, supply_fprs)
+ (fetch_regs_user_thread, fetch_regs_kernel_thread)
+ (store_regs_user_thread, store_regs_kernel_thread): Use
+ ppc_num_gprs and ppc_num_fprs instead of '32' and '31'.
+ * ppc-linux-nat.c (fill_gregset): Same.
+ * ppc-linux-tdep.c (ppc_linux_supply_gregset)
+ (ppc_linux_sigtramp_cache): Same.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg)
+ (ppcnbsd_sigtramp_cache_init): Same.
+ * rs6000-nat.c (fetch_core_registers): Same.
+ * rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset)
+ (rs6000_frame_cache): Same.
+
+ * aix-thread.c (supply_gprs64, fetch_regs_user_thread)
+ (store_regs_user_thread): Use tdep->ppc_gp0_regnum, instead
+ of assuming that the gprs are numbered starting with zero.
+ * ppc-linux-nat.c (fill_gregset): Same.
+ * ppc-linux-tdep.c (ppc_linux_supply_gregset): Same.
+ * ppcnbsd-nat.c (getregs_supplies): Same.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg): Same.
+ * rs6000-nat.c (fetch_core_registers): Same.
+ * rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset): Same.
+
+2004-05-07 Michael Snyder <msnyder@redhat.com>
+
+ * tracepoint.c (scope_info): Add handling for LOC_COMPUTED,
+ LOC_COMPUTED_ARG, and LOC_INDIRECT.
+
+2004-05-13 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): Use frame_unwind_id.
+
+2004-05-13 Bryce McKinlay <mckinlay@redhat.com>
+
+ * dwarf2loc.c (find_location_expression): Use ANOFFSET to adjust
+ base_address for shared libraries.
+
+2004-05-13 Bryce McKinlay <mckinlay@redhat.com>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2004-05-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.c (bpstat_stop_status): Add new argument
+ STOPPED_BY_WATCHPOINT. Use it instead of testing
+ target_stopped_data_address agaist 0 to check whether
+ or not we stopped due to a hardware watchpoint.
+ * breakpoint.h (bpstat_stop_status): Adapt prototype.
+ * infrun.c (handle_inferior_event): Call bpstat_stop_status
+ with new argument.
+
+2004-05-12 Jim Blandy <jimb@redhat.com>
+
+ * configure.in: When checking whether we should use the -bbigtoc
+ option, don't forget to restore the original value of LDFLAGS.
+ * configure: Regenerated.
+
+2004-05-12 Andrew Cagney <cagney@redhat.com>
+
+ * thread.c (load_infrun_state): Delete step_sp.
+ * infrun.c (context_switch): Ditto.
+ * inferior.h (step_sp): Ditto.
+ * infcmd.c (step_sp, step_1, step_once, until_next_command): Ditto.
+ * gdbthread.h (struct thread_info, save_infrun_state)
+ (restore_infrun_state): Ditto.
+
+2004-05-12 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2004-05-12 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (adjust_pc_after_break): Rewrite decr logic,
+ eliminate reference to step_sp.
+ (struct execution_control_state, init_execution_control_state)
+ (handle_inferior_event, keep_going): Delete update_step_sp and
+ step_sp.
+ * infcmd.c (step_sp): Note that variable is unused.
+
+2004-05-11 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (step_over_function): Delete function.
+ (handle_step_into_function): Use insert_step_resume_breakpoint.
+ (insert_step_resume_breakpoint): Fix assertion.
+
+2004-05-11 Nick Roberts <nickrob@gnu.org>
+
+ * utils.c (defaulted_query): Just use the normal query input type
+ when printing the annotations.
+
+2004-05-11 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): Simplify code handling
+ step-into or return-from a signal trampoline.
+
+2004-05-11 Andrew Cagney <cagney@redhat.com>
+
+ * ppcnbsd-tdep.c: Include "gdb_assert.h".
+ * Makefile.in (ppcnbsd-tdep.o): Update dependencies.
+
+2004-05-10 Jim Blandy <jimb@redhat.com>
+
+ * ppc-bdm.c (bdm_ppc_fetch_registers): Replace utterly broken code
+ with a call to internal_error.
+
+ * ppc-tdep.h (struct gdbarch_tdep): Change definition of
+ ppc_fp0_regnum and ppc_fpscr_regnum: if they are -1, then this
+ processor variant lacks those registers.
+ (ppc_floating_point_unit_p): Change description to make it clear
+ that this returns info about the ISA, not the ABI.
+ * rs6000-tdep.c (ppc_floating_point_unit_p): Decide whether to
+ return true or false by checking tdep->ppc_fp0_regnum and
+ tdep->ppc_fpscr_regnum. The original code replicated the BFD
+ arch/mach switching done in rs6000_gdbarch_init; it's better to
+ keep that logic there, and just check the results here.
+ (rs6000_gdbarch_init): On the E500, set tdep->ppc_fp0_regnum and
+ tdep->ppc_fpscr_regnum to -1 to indicate that we have no
+ floating-point registers.
+ (ppc_supply_fpregset, ppc_collect_fpregset)
+ (rs6000_push_dummy_call, rs6000_extract_return_value)
+ (rs6000_store_return_value): Assert that we have floating-point
+ registers.
+ (rs6000_dwarf2_stab_reg_to_regnum): Add FIXME.
+ (rs6000_frame_cache): Don't note the locations at which
+ floating-point registers were saved if we have no fprs.
+ * aix-thread.c (supply_fprs, fill_fprs): Assert that we have FP
+ registers.
+ (fetch_regs_user_thread, fetch_regs_kernel_thread)
+ (store_regs_user_thread, store_regs_kernel_thread): Only call
+ supply_fprs / fill_fprs if we actually have floating-point
+ registers.
+ (special_register_p): Check ppc_fpscr_regnum before matching
+ against it.
+ (supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32): Don't
+ supply / collect fpscr if we don't have it.
+ * ppc-bdm.c: #include "gdb_assert.h".
+ (bdm_ppc_fetch_registers, bdm_ppc_store_registers): Assert that we
+ have floating-point registers, since I can't test this code on
+ FP-free systems to adapt it.
+ * ppc-linux-nat.c (ppc_register_u_addr): Don't match against the
+ fpscr and floating point register numbers if they don't exist.
+ (fetch_register): Assert that we have floating-point registers
+ before we reach the code that handles them.
+ (store_register): Same. And use tdep instead of calling
+ gdbarch_tdep again.
+ (fill_fpregset): Don't try to collect FP registers and fpscr if we
+ don't have them.
+ (ppc_linux_sigtramp_cache): Don't record the saved locations of
+ fprs and fpscr if we don't have them.
+ (ppc_linux_supply_fpregset): Don't supply fp regs and fpscr if we
+ don't have them.
+ * ppcnbsd-nat.c: #include "gdb_assert.h".
+ (getfpregs_supplies): Assert that we have floating-point registers.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same.
+ * ppcobsd-tdep.c: #include "gdb_assert.h".
+ (ppcobsd_supply_gregset, ppcobsd_collect_gregset): Assert that we
+ have floating-point registers.
+ * rs6000-nat.c (regmap): Don't match against the fpscr and
+ floating point register numbers if they don't exist.
+ (fetch_inferior_registers, store_inferior_registers,
+ fetch_core_registers): Only fetch / store / supply the
+ floating-point registers and the fpscr if we have them.
+ * Makefile.in (ppc-bdm.o, ppc-linux-nat.o, ppcnbsd-nat.o)
+ (ppcobsd-tdep.o): Update dependencies.
+
+2004-05-10 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (through_sigtramp_breakpoint): Delete variable.
+ (context_switch): Do not switch through_sigtramp_breakpoint.
+ * gdbthread.h (save_infrun_state, load_infrun_state)
+ (struct thread_info): Delete through_sigtramp_breakpoint parameter
+ and structure member.
+ * thread.c (load_infrun_state, save_infrun_state): Update.
+
+2004-05-10 Mark Kettenis <kettenis@gnu.org>
+
+ * m68kbsd-tdep.c (m68kbsd_elf_init_abi): Call m68k_svr4_init_abi.
+
+2004-05-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * acinclude.m4: Quote macro names being defined by AC_DEFUN
+ throughout.
+ * aclocal.m4: Regenerate.
+
+2004-05-10 Nathan J. Williams <nathanw@wasabisystems.com>
+
+ * alphanbsd-tdep.c: Fix include of "gdb_string.h".
+
+2004-05-10 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (check_sigtramp2): Delete function.
+ (handle_inferior_event): When single stepping, and taking a
+ signal, set a breakpoint at the signal return address. Delete
+ redundant calls to check_sigtramp2.
+ (insert_step_resume_breakpoint): New function.
+ (through_sigtramp_breakpoint, handle_inferior_event)
+ (follow_exec, wait_for_inferior, fetch_inferior_event)
+ (currently_stepping, keep_going): Delete most uses of
+ through_sigtramp_breakpoint, not that it should be deleted.
+ (delete_breakpoint_current_contents): Delete function.
+
+2004-05-10 Randolph Chung <tausq@debian.org>
+
+ * config/pa/linux.mt (TM_FILE): Use new tm-linux.h for hppa-linux
+ target.
+ * config/pa/tm-linux.h: New file.
+
+2004-05-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * cli/cli-setshow.c (cmd_show_list): Check for "show" in the middle
+ of prefixes. Don't print the prefix twice in the CLI.
+
+2004-05-10 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (ppc_collect_gregset): When regnum == -1, do
+ collect all the gprs.
+
+ * rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in
+ loop collecting gprs.
+
+2004-05-09 Andrew Cagney <cagney@redhat.com>
+
+ * remote-vx.c (net_step): Delete step-range code.
+ * remote.c (remote_resume, init_all_packet_configs)
+ (set_remote_protocol_E_packet_cmd)
+ (show_remote_protocol_E_packet_cmd)
+ (remote_protocol_E, show_remote_cmd, _initialize_remote)
+ (remote_protocol_e, set_remote_protocol_e_packet_cmd)
+ (show_remote_protocol_e_packet_cmd): Ditto.
+
+2004-05-09 Mark Kettenis <kettenis@gnu.org>
+
+ * hppa-tdep.h (enum hppa_regnum): Name enum, add HPPA_R1_REGNUM.
+
+ * hppa-tdep.h: Update copyright year.
+ (struct trad_frame_saved_reg): Add opaque declaration.
+
+ * amd64-tdep.c (amd64_return_value): Implement
+ RETURN_VALUE_ABI_RETURNS_ADDRESS.
+
+ * m68k-tdep.c (m68k_convert_register_p, m68k_register_to_value)
+ (m68k_value_to_register): New functions.
+ (m68k_gdbarch_init): Set convert_register_p, register_to_value and
+ value_to_register.
+
+ * defs.h (enum return_value_convention): Add
+ RETURN_VALUE_ABI_RETURNS_ADDRESS and
+ RETURN_VALUE_ABI_PRESERVES_ADDRESS.
+ * infcmd.c (legacy_return_value): New function.
+ (print_return_value): Rwerite to implement
+ RETURN_VALUE_ABI_RETURNS_ADDRESS.
+ * values.c (using_struct_return): Check for inequality to
+ RETURN_VALUE_REGISTER_CONVENTION instead of equality to
+ RETURN_VALUE_STRUCT_CONVENTION.
+ * i386-tdep.c (i386_return_value): Implement
+ RETURN_VALUE_ABI_RETURNS_ADDRESS.
+
+ * vax-tdep.c: Tweak comments. Reorder include files. Don't
+ include "symtab.h", "opcode/vax.h" and "inferior.h".
+ (vax_skip_prologue): Replace calls to read_memory_integer by calls
+ to read_memory_unsigned_integer.
+ (vax_gdbarch_init): Reorder.
+ (_initialize_vax_tdep): Spell out prototype.
+ * Makefile.in (vax-tdep.o): Update dependencies.
+
+2004-05-08 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (resume): Delete call to DO_DEFERRED_STORES.
+ * target.c (target_detach, target_disconnect): Ditto.
+
+ * infcall.c (call_function_by_hand): When no
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS call generic_save_dummy_frame_tos.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Do not set
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+
+ * gdbarch.sh (DEPRECATED_FIX_CALL_DUMMY): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Do not set
+ deprecated_fix_call_dummy.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * infcall.c (call_function_by_hand): Do not call
+ DEPRECATED_FIX_CALL_DUMMY.
+
+ * gdbarch.sh (DEPRECATED_CALL_DUMMY_WORDS)
+ (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-linux-tdep.c (arm_linux_call_dummy_words)
+ (arm_linux_init_abi): Do not set deprecated_call_dummy_words or
+ deprecated_sizeof_call_dummy_words.
+ * arm-tdep.c (arm_call_dummy_words, arm_gdbarch_init): Ditto.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sh64-tdep.c (sh64_gdbarch_init): Ditto.
+ * ns32k-tdep.c (ns32k_call_dummy_words, ns32k_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * arch-utils.h (legacy_call_dummy_words)
+ (legacy_sizeof_call_dummy_words): Delete declarations.
+ * arch-utils.c (legacy_call_dummy_words)
+ (legacy_sizeof_call_dummy_words): Delete variables.
+
+ * gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * inferior.h (PUSH_DUMMY_FRAME): Delete macro.
+ * infcall.c (call_function_by_hand): Eliminate call to
+ DEPRECATED_PUSH_DUMMY_FRAME.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated
+ push_dummy_frame.
+ (ns32k_push_dummy_frame): Delete function.
+
+ * ns32k-tdep.c (ns32k_gdbarch_init): Do not set
+ deprecated_call_dummy_breakpoint_offset or
+ deprecated_call_dummy_start_offset.
+ * dummy-frame.c, arm-tdep.c: Update comments.
+ * gdbarch.sh (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
+ (DEPRECATED_CALL_DUMMY_START_OFFSET): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * infcall.c (legacy_push_dummy_code): Delete function.
+ (push_dummy_code): Delete call.
+
+ * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * blockframe.c (legacy_frame_chain_valid): Simplify by eliminating
+ DEPRECATED_USE_GENERIC_DUMMY_FRAMES.
+ * infcall.c (legacy_push_dummy_code, call_function_by_hand): Ditto.
+ * frame.c (frame_type_from_pc, legacy_get_prev_frame): Ditto.
+
+ * breakpoint.h (deprecated_frame_in_dummy): Delete declaration.
+ (struct frame_info): Delete opaque declaration.
+ * breakpoint.c (deprecated_frame_in_dummy): Delete function.
+ * frame.c (get_frame_type): Delete call.
+
+ * ns32k-tdep.c (ns32k_gdbarch_init): Do not set deprecated
+ pc_in_call_dummy.
+ * inferior.h (deprecated_pc_in_call_dummy_on_stack): Delete.
+ * blockframe.c (deprecated_pc_in_call_dummy_on_stack): Delete.
+
+2004-05-08 Mark Kettenis <kettenis@gnu.org>
+
+ * alphanbsd-tdep.c: Include "gdb_string.h".
+ * armnbsd-tdep.c: Update copyright year.
+ Include "gdb_string.h".
+ * Makefile.in (alphanbsd-tdep.o, armnbsd-tdep.o): Update
+ dependencies.
+
+ * delta68-nat.c: Remove file.
+ * m68k-tdep.c (delta68_in_sigtramp, delta68_frame_args_address)
+ (delta68_frame_saved_pc, delta68_frame_num_args): Remove functions.
+ * Makefile.in (ALLDEPFILES): Remove delta68-nat.c.
+ (delta68-nat.o): Remove dependency.
+
+ * m68k-tdep.c (m68k_frameless_function_invocation): Remove
+ function.
+ (m68k_gdbarch_init): Don't set
+ deprecated_frameless_function_invocation.
+
+2004-05-07 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (skip_prologue_hard_way, hppa_frame_cache): Use
+ read_memory_nobpt for code reading when doing frame unwinding.
+ * hppa-linux-tdep.c (insns_match_pattern): Likewise.
+
+2004-05-07 Randolph Chung <tausq@debian.org>
+
+ * hppa-linux-tdep.c (hppa_linux_sigtramp_find_sigcontext): Pass in pc
+ instead of sp, handle sigaltstack case.
+ (hppa_linux_sigtramp_frame_unwind_cache): Adjust calls to
+ hppa_linux_sigtramp_find_sigcontext, and set base to the frame of the
+ signal handler and not that of the caller.
+ (hppa_linux_sigtramp_unwind_sniffer): Adjust calls to
+ hppa_linux_sigtramp_find_sigcontext.
+
+2004-05-07 Randolph Chung <tausq@debian.org>
+
+ * Makefile.in (ALLDEPFILES): Add hppa-linux-tdep.c and
+ hppa-linux-nat.c.
+ (hppa-linux-tdep.o, hppa-linux-nat.o): Define rules.
+ * hppa-linux-nat.c (fetch_register, store_register): Define.
+ (fetch_inferior_registers, store_inferior_registers): Define.
+ (supply_gregset): Add comment and clean up some unneeded code.
+ (fill_gregset): Add comment and fix so that it saves registers in
+ the right place in the gregset.
+ (fill_fpregset): Fix buffer overrun problem.
+ * config/pa/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
+
+2004-05-07 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_frame_prev_register_helper): New function to
+ do common handling of the pcoqt register.
+ (hppa_frame_prev_register, hppa_stub_frame_prev_register): Convert
+ to use helper function.
+ (hppa_frame_unwind_sniffer): Only use if unwind entry is present.
+ (hppa_fallback_frame_cache, hppa_fallback_frame_this_id)
+ (hppa_fallback_frame_prev_register, hppa_fallback_frame_unwind): New
+ generic fallback unwinder when all else fails.
+ (hppa_gdbarch_init): Add fallback sniffer.
+ * hppa-tdep.h (hppa_frame_prev_register_helper): Prototype.
+ * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_prev_register): Convert
+ to use helper function.
+
+2004-05-08 Joel Brobecker <brobecker@gnat.com>
+
+ * config/djgpp/fnchange.lst: Add translation rules for
+ gdb.arch/powerpc-aix-prologue.c and gdb.arch/powerpc-aix-prologue.exp.
+
+2004-05-08 Mark Kettenis <kettenis@gnu.org>
+
+ * frame.c (get_prev_frame_1): Work around GCC bug.
+ * frame.h: Add comment about GCC bug.
+
+2004-05-07 Andrew Cagney <cagney@redhat.com>
+
+ * observer.c: Include "commands.h" and "gdbcmd.h".
+ (observer_debug, _initialize_observer): Add the
+ command "set/show debug observer".
+ * observer.sh: When observer debugging, log notify calls.
+ * Makefile.in (observer.o): Update dependencies.
+
+2004-05-07 Jason Molenda (jmolenda@apple.com)
+
+ * cli/cli-decode.c: Fix "SHOW_DOR" comment typeos.
+
+2004-05-07 Jim Blandy <jimb@redhat.com>
+
+ * aix-thread.c (fetch_regs_kernel_thread, fill_gprs64,
+ fill_gprs32, store_regs_kernel_thread): Use tdep->ppc_gp0_regnum
+ to recognize gpr regnums, instead of assuming that
+ tdep->ppc_fp0_regnum marks the end of the general-purpose
+ registers.
+
+ * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Assert that
+ the given architecture has floating-point registers.
+
+2004-05-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Replace with
+ macro defined to 1.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Do not set
+ deprecated_use_generic_dummy_frames.
+
+2004-05-07 Brian Ford <ford@vss.fsi.com>
+
+ * NEWS: Mention Cygwin DWARF 2 support.
+
+2004-05-07 Andrew Cagney <cagney@redhat.com>
+
+ * objfiles.h (struct entry_info): Delete unused fields
+ deprecated_entry_file_lowpc and deprecated_entry_file_highpc.
+ * objfiles.c (init_entry_point_info, objfile_relocate): Update.
+ * mipsread.c (mipscoff_symfile_read): Update.
+ * mdebugread.c (parse_partial_symbols): Update.
+ * dwarfread.c (read_file_scope): Update.
+ * dwarf2read.c (read_file_scope): Update.
+ * dbxread.c (read_dbx_symtab, read_dbx_symtab): Update.
+ * coffread.c (complete_symtab): Update.
+
+2004-05-07 Mark Kettenis <kettenis@gnu.org>
+
+ * infcall.c (_initialize_infcall): Fix typo.
+
+2004-05-07 Andrew Cagney <cagney@redhat.com>
+
+ * cli/cli-decode.c (add_setshow_zinteger_cmd): New function.
+ * command.h (add_setshow_zinteger_cmd): Declare.
+
+2004-05-06 Randolph Chung <tausq@debian.org>
+
+ * config/pa/tm-hppa.h (RO_REGNUM, FLAGS_REGNUM, RP_REGNUM)
+ (HPPA_FP_REGNUM, HPPA_SP_REGNUM, SAR_REGNUM, IPSW_REGNUM)
+ (PCOQ_HEAD_REGNUM, PCSQ_HEAD_REGNUM, PCOQ_TAIL_REGNUM, PCSQ_TAIL_REGNUM)
+ (EIEM_REGNUM, IIR_REGNUM, ISR_REGNUM, IOR_REGNUM, SR4_REGNUM)
+ (RCR_REGNUM, PID0_REGNUM, PID1_REGNUM, PID2_REGNUM, PID3_REGNUM)
+ (CCR_REGNUM, TR0_REGNUM, CR27_REGNUM, HPPA_FP0_REGNUM, FP4_REGNUM)
+ (ARG0_REGNUM, ARG1_REGNUM, ARG2_REGNUM, ARG3_REGNUM): Move *_REGNUM
+ definitions ...
+ * hppa-tdep.h: ... to here, with HPPA_ prefix.
+ * Makefile.in (hppah-nat.o): Add $(hppa_tdep_h)
+ * hppa-hpux-tdep.c (hppa32_hpux_frame_find_saved_regs_in_sig)
+ (hppa64_hpux_frame_find_saved_regs_in_sig)
+ (child_get_current_exception_event): Add HPPA_ prefix to *_REGNUM usage.
+ * hppa-linux-nat.c (GR_REGNUM, TR_REGNUM, greg_map): Likewise.
+ * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum)
+ (hppa_linux_target_write_pc, hppa_linux_sigtramp_frame_unwind_cache)
+ (hppa_linux_sigtramp_frame_prev_register): Likewise.
+ * hppa-tdep.c (hppa32_return_value, hppa64_return_value)
+ (hppa32_push_dummy_call, hppa64_push_dummy_call, hppa64_frame_align)
+ (hppa_target_read_pc, hppa_target_write_pc, hppa_frame_cache)
+ (hppa_frame_prev_register, hppa_stub_frame_unwind_cache)
+ (hppa_stub_frame_prev_register, hppa_unwind_dummy_id)
+ (hppa_skip_permanent_breakpoint, hppa_instruction_nullified)
+ (hppa32_register_type, hppa_cannot_store_register)
+ (hppa_fetch_pointer_argument, hppa_pseudo_register_read): Likewise.
+ * hppah-nat.c (store_inferior_registers, fetch_register): Likewise.
+ * hpread.c (hpread_process_one_debug_symbol): Likewise.
+ * pa64solib.c (pa64_solib_have_load_event)
+ (pa64_solib_have_unload_event, pa64_solib_loaded_library_pathname)
+ (pa64_solib_unloaded_library_pathname): Likewise.
+ * somsolib.c (som_solib_have_load_event, som_solib_have_unload_event)
+ (som_solib_library_pathname): Likewise.
+
+2004-05-05 Jim Ingham <jingham@apple.com>
+
+ * breakpoint.c (create_breakpoints): Copy the ignore count and
+ thread id over from the pended breakpoint to the actual
+ breakpoint.
+
+2004-05-05 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (PARM_BOUNDARY): Delete.
+ gdbarch.h, gdbarch.c: Re-generate.
+ * valops.c (PARM_BOUNDARY): Delete macro.
+ (value_push): Delete PARM_BOUNDARY code.
+ * m68k-tdep.c (m68k_gdbarch_init): Do not set parm_boundary.
+
+2004-05-04 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (fetch_ppc_registers, store_ppc_registers):
+ Don't assume that the gprs, fprs, and UISA sprs are
+ contiguous, start at register number zero, and end with fpscr.
+ Instead, use the numbers from the tdep structure.
+
+ * config/rs6000/tm-rs6000.h (FP0_REGNUM): Document that this
+ should no longer be used in code specific to the RS6000 and its
+ derivatives.
+ * ppc-tdep.h (struct gdbarch_tdep): Add 'ppc_fp0_regnum' member.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Initialize
+ tdep->ppc_fp0_regnum.
+ (ppc_supply_fpregset, ppc_collect_fpregset)
+ (rs6000_push_dummy_call, rs6000_extract_return_value)
+ (rs6000_dwarf2_stab_reg_to_regnum, rs6000_store_return_value)
+ (rs6000_frame_cache): Use tdep->ppc_fp0_regnum instead of
+ FP0_REGNUM.
+ * aix-thread.c (supply_fprs, fetch_regs_kernel_thread)
+ (fill_gprs64, fill_gprs32, fill_fprs, store_regs_kernel_thread):
+ Same.
+ * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_fetch_registers,
+ bdm_ppc_store_registers): Same.
+ * ppc-linux-nat.c (ppc_register_u_addr, fetch_register)
+ (store_register, fill_fpregset): Same.
+ * ppc-linux-tdep.c (ppc_linux_sigtramp_cache)
+ (ppc_linux_supply_fpregset): Same.
+ * ppcnbsd-nat.c (getfpregs_supplies): Same.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg):
+ Same.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
+ do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
+ ppc64_sysv_abi_return_value): Same.
+ * rs6000-nat.c (regmap, fetch_inferior_registers)
+ (store_inferior_registers, fetch_core_registers): Same.
+
+2004-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ * m68knbsd-nat.c: Remove file.
+ * m68knbsd-tdep.c: Remove file.
+ * Makefile.in: (m68knbsd-nat.o, m68knbsd-tdep.o): Remove
+ dependencies.
+ * configure.host: Add m68k-*-netbsdelf*.
+ * configure.tgt (m68k-*-netbsd*): Set gdb_target to nbsd.
+ * config/m68k/nbsdaout.mh (NATDEPFILES): Add m68kbsd-nat.o,
+ solib.o and solib-sunos.o. Remove m68knbsd-nat.o, corelow.o.
+ (XM_FILE): Remove.
+ * config/m68k/nbsdelf.mh: New file.
+ * config/m68k/nbsd.mt: New file.
+ * config/m68k/nbsdaout.mt: Remove file.
+ * config/m68k/tm-nbsd.h: Don't include <sys/param.h>,
+ <machine/vmparam.h> and "m68k/tm-m68k.h". Include "solib.h".
+ (BPT_VECTOR, STACK_END_ADDR): Remove defines.
+ (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Likewise.
+ (use_struct_convention): Remove prototype.
+ (USE_STRUCT_CONVENTION): Remove define.
+ * config/m68k/xm-nbsd.h: Remove file.
+
+2004-05-04 Michael Snyder <msnyder@redhat.com>
+
+ * m68k-tdep.c (m68k_gdbarch_init): Default to using
+ reg_struct_return method (as gcc usually does for cross targets).
+
+2004-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Committed by Andrew Cagney.
+ * s390-tdep.c (s390_sigtramp_frame_unwind_cache): Account for
+ alignment padding when accessing ucontext struct members.
+
+2004-05-04 Jim Blandy <jimb@redhat.com>
+
+ * config/ppc-tdep.h (struct gdbarch_tdep): Delete
+ 'ppc_gplast_regnum' member.
+ (ppc_num_gprs): New enum constant.
+ * ppc-linux-nat.c (ppc_register_u_addr): Use tdep->ppc_gp0_regnum
+ and ppc_num_gprs instead of tdep->ppc_gplast_regnum.
+ * rs6000-nat.c (regmap, fetch_inferior_registers,
+ store_inferior_registers): Same.
+ * rs6000-tdep.c (e500_pseudo_register_read)
+ (e500_pseudo_register_write): Same.
+ (rs6000_gdbarch_init): Don't initialize tdep->ppc_gplast_regnum.
+
+ * config/rs6000/tm-rs6000.h (FPLAST_REGNUM): Delete #definition.
+ * ppc-tdep.h (ppc_num_fprs): New enum constant.
+ * aix-thread.c (fetch_regs_kernel_thread, fill_fprs,
+ store_regs_kernel_thread): Use FP0_REGNUM + ppc_num_fprs, not
+ FPLAST_REGNUM.
+ * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
+ Same.
+ * ppc-linux-nat.c (ppc_register_u_addr): Same.
+ * rs6000-nat.c (regmap, fetch_inferior_registers)
+ (store_inferior_registers): Same.
+
+ * aix-thread.c (fill_fprs): Fix off-by-one error comparing regno
+ with FPLAST_REGNUM.
+
+2004-05-03 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (dwarf2_create_include_psymtab): Fix build
+ failure detected by recent versions of GCC.
+ (psymtab_to_symtab_1): No longer use the PST_PRIVATE macro
+ to be consistent with the usage in dwarf2_create_include_psymtab.
+
+2004-05-03 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Fix typo in comment.
+ (heuristic_proc_start): Whitespace cleanup.
+
+2004-05-04 Mark Kettenis <kettenis@gnu.org>
+
+ * sun3-nat.c: Remove file.
+ * Makefile.in (tm-sun3.h tm-altos.h tm-sun2.h tm-3b1.h): Remove
+ dependencies.
+ (ALLDEPFILES): Remove sun3-nat.c.
+ (sun3-nat.o): Remove dependencies.
+
+ * i386-interix-nat.c, i386-interix-tdep.c,
+ config/i386/nm-interix.h, config/i386/interix.mh,
+ config/i386/interix.mt: Remove files.
+ * Makefile.in (i386-interix-nat.o, i386-interix-tdep.o): Remove
+ dependencies.
+
+2004-05-03 Mark Kettenis <kettenis@gnu.org>
+
+ * m68k-tdep.h (struct gdbarch_tdep): Add member
+ struct_value_regnum.
+ (m68k_svr4_init_abi): New prototype.
+ * m68k-tdep.c: Include "floatformat.h". Add comment about all the
+ different calling conventions.
+ (m68k_extract_return_value): Remove code dealing with single-field
+ structs.
+ (m68k_store_return_value): Remove code dealing with single-field
+ structs. Correctly store return values of 5, 6, 7 or 8 bytes.
+ (m68k_extract_struct_value_address): Remove function.
+ (m68k_svr4_extract_return_value,m68k_svr4_store_return_value)
+ (m68k_reg_struct_return_p, m68k_return_value)
+ (m68k_svr4_return_value): New functions.
+ (m68k_use_struct_convention): Remove function.
+ (m68k_push_dummy_call): Use new struct_value_regnum member of
+ `struct gdbarch_tdep' instead of hardcoded register number to
+ store STRUCT_ADDR.
+ (m68k_svr4_init_abi): New function.
+ (m68k_gdbarch_init): Don't set extract_return_value,
+ store_return_values, deprecated_extract_struct_value_address and
+ use_struct_convention. Set return_value instead. Initialize new
+ struct_value_regnum member of `struct gdbarch_tdep'.
+ * m68klinux-tdep.c: Update copyright year.
+ (m68k_linux_extract_return_value, m68k_linux_store_return_value)
+ (m68k_linux_extract_struct_value_address): Remove function.
+ (m68k_linux_init_abi): Don't set extract_return_value,
+ store_return_values, deprecated_extract_struct_value_address and
+ use_struct_convention. Call m68k_svr4_init_abi but override the
+ new struct_value_regnum member of `struct gdbarch_tdep'.
+ * Makefile.in (m68k-tdep.o): Update dependencies.
+
+2004-05-03 J. Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (line_header): Add new included_p field in
+ field file_names.
+ (partial_die_info): New field has_stmt_list. New field line_offset.
+ (dwarf2_create_include_psymtab): New function.
+ (dwarf2_build_include_psymtabs): New function.
+ (add_file_name): Add forward declaration. Initialize new field.
+ (dwarf_decode_lines): Add new parameter. Enhance this procedure
+ to be able to determine the list of files included by the
+ given unit, and build their associated psymtabs.
+ (dwarf2_build_psymtabs_hard): Build the psymtabs for the included
+ files as well.
+ (psymtab_to_symtab_1): Build the symtabs of all dependencies as well.
+ (read_file_scope): Update call to dwarf_decode_lines.
+ (read_partial_die): Handle DW_AT_stmt_list attributes.
+
+2004-05-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ Unfix PR gdb/1626.
+ * configure.in: Revert special case for osf5.*.
+ * configure: Regenerate.
+
+2004-05-02 Jim Blandy <jimb@redhat.com>
+
+ Move the symbol-file-from-memory functions into their own file.
+ * symfile-mem.c, symfile-mem.h: New files.
+ * symfile.c (symbol_file_add_from_bfd): New function.
+ (symbol_file_add): Call symbol_file_add_from_bfd.
+ (symbol_file_add_from_memory, add_symbol_file_from_memory_command):
+ Moved to symfile-mem.c.
+ (_initialize_symfile): Move definition of
+ add-symbol-file-from-memory command to symfile-mem.c.
+ * symfile.h (symbol_file_add_from_bfd): New declaration.
+ * config/i386/linux.mt (TDEPFILES): Add symfile-mem.o.
+ * config/powerpc/linux.mt (TDEPFILES): Same.
+ * Makefile.in (SFILES): Add symfile-mem.c.
+ (symfile_mem_h): New variable.
+ (HFILES_NO_SRCDIR): Add symfile-mem.h.
+ (symfile-mem.o): New rule.
+
+2004-05-01 Andrew Cagney <cagney@redhat.com>
+
+ * breakpoint.c (insert_bp_location): Use get_frame_id, and
+ frame_find_by_id instead of frame_relative_level.
+ (do_enable_breakpoint): Ditto.
+ * thread.c: Update copyright.
+ (info_threads_command): Ditto, simplify.
+
+ * frame.c (deprecated_generic_get_saved_register): Delete
+ function, moved to "xstormy16-tdep.c".
+ * xstormy16-tdep.c (xstormy16_get_saved_register): Inline
+ deprecated_generic_get_saved_register from "frame.c".
+ (xstormy16_frame_saved_register): Call
+ xstormy16_get_saved_register.
+ * dummy-frame.c (deprecated_find_dummy_frame_regcache): Make
+ static.
+ * dummy-frame.h (deprecated_find_dummy_frame_regcache): Delete.
+ * frame.h (deprecated_generic_get_saved_register): Delete.
+
+2004-05-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * dwarfread.c: Update documentation on the state of dwarf-1.
+
+2004-05-01 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (select_frame_command): Delete call to
+ frame_relative_level.
+ (print_frame, set_backtrace_limit_command, backtrace_limit_info):
+ Delete #if0 code.
+ (frame_info): Do not print FRAMELESS.
+ (print_block_frame_labels): Replace DEPRECATED_STREQ.
+ (catch_info): Delete #if0 code.
+
+ * frame.c (create_sentinel_frame): Set type to SENTINEL_FRAME.
+ * dummy-frame.c (dummy_frame_this_id): Use get_frame_type, instead
+ of frame_relative_level.
+ * sentinel-frame.c (sentinel_frame_unwinder): Set unwinder's type
+ to SENTINEL_FRAME.
+ * frame.h (enum frame_type): Add SENTINEL_FRAME.
+ * s390-tdep.c (s390_prologue_frame_unwind_cache): Delete calls to
+ frame_relative_level.
+
+ * frame.h (deprecated_set_frame_type): Delete declaration.
+ * frame.c (deprecated_set_frame_type): Delete function, update
+ comments.
+
+ * gdbarch.sh (DEPRECATED_PC_IN_SIGTRAMP): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * shnbsd-tdep.c (shnbsd_init_abi): Do not set pc_in_sigtramp.
+ (shnbsd_pc_in_sigtramp): Delete.
+ * i386-interix-tdep.c (i386_interix_init_abi): Do not set
+ pc_in_sigtramp.
+ * hppa-hpux-tdep.c (hppa_hpux_init_abi): Do not set
+ pc_in_sigtramp.
+ * frame.h: Update comments.
+ * ppc-linux-tdep.c: Update comments.
+ * breakpoint.c (bpstat_what): Update comments.
+
+ * Makefile.in (m68klinux-tdep.o, m68klinux-nat.o): Fix
+ m68klinux-tdep.o's dependencies, were previously added to
+ m68klinux-nat.o.
+
+ * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Use pc_in_sigtramp.
+ * alpha-tdep.h (struct gdbarch_tdep): Add pc_in_sigtramp.
+ * alphafbsd-tdep.c (alphafbsd_init_abi): Update.
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Update.
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Update.
+
+ * Makefile.in (m68klinux-nat.o): Update dependencies.
+ * m68klinux-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
+ (m68k_linux_sigtramp_frame_cache)
+ (m68k_linux_sigtramp_frame_this_id)
+ (m68k_linux_sigtramp_frame_prev_register)
+ (m68k_linux_sigtramp_frame_unwind)
+ (m68k_linux_sigtramp_frame_sniffer)
+ (struct m68k_linux_sigtramp_info, m68k_linux_init_abi): Code from
+ m68k-tdep.h and m68k-tdep.c, add "linux" to function and variable
+ names, use trad-frame.h.
+ * m68k-tdep.h (struct gdbarch_tdep): Delete get_sigtramp_info.
+ (struct m68k_sigtramp_info): Delete.
+ * m68k-tdep.c (m68k_sigtramp_frame_cache)
+ (m68k_sigtramp_frame_this_id, m68k_sigtramp_frame_prev_register)
+ (m68k_sigtramp_frame_unwind, m68k_sigtramp_frame_sniffer)
+ (m68k_gdbarch_init): Delete all the sigtramp code, moved to
+ "m68klinux-tdep.c".
+
+ * infrun.c (check_sigtramp2): Delete check for
+ DEPRECATED_PC_IN_SIGTRAMP and INNER_THAN.
+
+2004-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ * m68k-tdep.h (m68kbsd_fpreg_offset): New prototype.
+
+2004-05-01 Andrew Cagney <cagney@redhat.com>
+
+ * frv-linux-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
+ (frv_linux_sigtramp_frame_cache)
+ (frv_linux_sigtramp_frame_this_id)
+ (frv_linux_sigtramp_frame_prev_register)
+ (frv_linux_sigtramp_frame_unwind)
+ (frv_linux_sigtramp_frame_sniffer): Copied from frv-tdep.c,
+ include "linux" in function and variable names, directly call
+ frv_linux_pc_in_sigtramp and frv_linux_sigcontext_reg_addr, use
+ the latest trad-frame code.
+ (frv_linux_init_abi): Append frv_linux_sigtramp_frame_sniffer, do
+ not set frv_sigcontext_reg_addr or deprecated_pc_in_sigtramp
+ * Makefile.in (frv-linux-tdep.o): Update dependencies.
+ * frv-tdep.h (frv_set_sigcontext_reg_addr): Delete declaration.
+ * frv-tdep.c (frv_sigtramp_frame_cache)
+ (frv_sigtramp_frame_this_id, frv_sigtramp_frame_prev_register)
+ (frv_sigtramp_frame_unwind, frv_sigtramp_frame_sniffer): Moved to
+ frv-linux-tdep.c.
+ (frv_gdbarch_init): Do not append a sigtramp sniffer.
+ (struct gdbarch_tdep): Delete sigcontext_reg_addr.
+ (frv_set_sigcontext_reg_addr): Delete function.
+
+ * gdbarch.sh (DEPRECATED_SIGTRAMP_START)
+ (DEPRECATED_SIGTRAMP_END): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.c (legacy_pc_in_sigtramp): Simplify.
+ * config/vax/tm-vaxbsd.h: Update copyright.
+ (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Delete.
+ (DEPRECATED_IN_SIGTRAMP): Define.
+ * config/m68k/tm-nbsd.h: Update copyright.
+ (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Delete.
+ (DEPRECATED_IN_SIGTRAMP): Define.
+
+2004-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (read_encoded_value): Handle DW_EH_PE_funcrel
+ encondings. Fixes PR gdb/1628.
+
+ * dwarf2-frame.c (execute_cfa_program): Complain if we encounter a
+ DW_CFA_restore state without a matching DW_CFA_remember_state
+ instead of aborting. Fixes PR backtrace/1589.
+
+2004-04-30 Joel Brobecker <brobecker@gnat.com>
+
+ * MAINTAINERS: Add self as AIX maintainer.
+ Update my e-mail address in write-after-approval section.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_type_from_pc): Delete call to PC_IN_SIGTRAMP.
+ (legacy_get_prev_frame): Ditto.
+
+ * mips-tdep.c (mips_pc_in_sigtramp): Delete.
+ (mips_gdbarch_init): Do not set pc_in_sigtramp.
+ * mipsread.c (sigtramp_address): Delete extern variable.
+ (mipscoff_new_init): Delete reference.
+ * mdebugread.c (sigtramp_address, sigtramp_end): Delete variables.
+ (fixup_sigtramp): Delete function.
+ * config/mips/tm-mips.h (sigtramp_address, sigtramp_end)
+ (fixup_sigtramp): Delete declarations.
+
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Do not set
+ deprecated_pc_in_sigtramp.
+ (ppcnbsd_pc_in_sigtramp): Delete function.
+
+2004-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ * config/m68k/nm-nbsd.h: Tweak comments.
+ * config/m68k/nm-nbsdaout.h: Likewise.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * arm-tdep.c (arm_sigtramp_unwind_sniffer): Call
+ legacy_pc_in_sigtramp.
+ * ia64-tdep.c (ia64_sigtramp_frame_sniffer): Ditto.
+
+2004-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ Add OpenBSD/m68k support.
+ * NEWS (New native configurations): Mention OpenBSD/m68k.
+ * m68kbsd-tdep.c: New file.
+ * m68kbsd-nat.c: New file.
+ * Makefile.in (ALLDEPFILES): Add m68kbsd-nat.c and m68kbsd-tdep.c.
+ (m68kbsd-nat.o, m68kbsd-tdep.o): New dependencies.
+ * configure.host: Add m68k-*-openbsd.
+ * configure.tgt: Add m68k-*-openbsd.
+ * config/m68k/tm-obsd.h: New file.
+ * config/m68k/obsd.mt: New file.
+ * config/m68k/obsd.mh: New file.
+ * config/djgpp/fnchange.lst: Add entries for m68kbsd-nat.c and
+ m68kbsd-tdep.c.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * mipsnbsd-tdep.c (mipsnbsd_pc_in_sigtramp): Delete function.
+ (mipsnbsd_init_abi): Do not set pc_in_sigtramp.
+
+2004-04-30 Mark Kettenis <kettenis@gnu.org>
+
+ * m68k-tdep.c (REMOTE_BPT_VECTOR): Remove define.
+ * config/m68k/tm-nbsd.h (REMOTE_BPT_VECTOR): Remove define.
+
+2004-04-30 Brian Ford <ford@vss.fsi.com>
+
+ Revert 2004-04-16 change.
+ * i386-tdep.c (i386_gdbarch_init): Fix comment typos.
+ (i386_coff_init_abi): Remove.
+ * i386-tdep.h (i386_coff_init_abi): Remove.
+ * i386-cygwin-tdep.c (i386_cygwin_init_abi): Remove call to above.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * blockframe.c (find_pc_partial_function): Delete use of
+ DEPRECATED_PC_IN_SIGTRAMP, DEPRECATED_SIGTRAMP_START and
+ DEPRECATED_SIGTRAMP_END.
+
+ * config/mips/tm-linux.h (DEPRECATED_IN_SIGTRAMP): Delete.
+ * config/mips/tm-irix6.h (DEPRECATED_IN_SIGTRAMP): Delete.
+ * config/mips/tm-nbsd.h: Delete undef DEPRECATED_IN_SIGTRAMP.
+ * config/mips/tm-irix5.h (DEPRECATED_IN_SIGTRAMP): Delete.
+ * config/arm/tm-embed.h (DEPRECATED_IN_SIGTRAMP): Delete.
+
+ * defs.h (deprecated_inside_entry_file): Delete declaration.
+ * blockframe.c (deprecated_inside_entry_file): Delete function.
+ (legacy_frame_chain_valid): Delete call.
+ * sh64-tdep.c (sh64_frame_chain): Delete call.
+ * objfiles.h: Update comments.
+ * i386-interix-tdep.c (i386_interix_frame_chain_valid): Delete
+ call.
+ * frame.c (get_prev_frame): Delete call, update comments.
+
+2004-04-30 Brian Ford <ford@vss.fsi.com>
+
+ * MAINTAINERS (Write After Approval): Add myself.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (BELIEVE_PCC_PROMOTION_TYPE): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * stabsread.c (define_symbol): Delete BELIEVE_PCC_PROMOTION_TYPE
+ code.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdb-events.sh (selected_thread_changed)
+ (selected_frame_level_changed, target_changed): Delete.
+ * gdb-events.h, gdb-events.c: Re-generate.
+ * valops.c (value_assign): Update.
+ * stack.c (select_frame_command, up_silently_base)
+ (down_silently_base): Update.
+
+2004-04-29 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_register_type): Re-write, handle 32-bit ABI
+ registers correctly.
+ (print_gp_register_row, mips32_heuristic_proc_desc)
+ (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
+ (mips_o64_push_dummy_call, mips_eabi_push_dummy_call): Eliminate
+ references to mips_isa_regsize.
+
+2004-04-29 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (struct gdbarch_tdep): Delete
+ mips_fp_register_double.
+ (FP_REGISTER_DOUBLE): Delete macro, replace with test for
+ mips_abi_regsize.
+ (mips_gdbarch_init): Do not set mips_fp_register_double.
+ (mips_dump_tdep): Do not print FP_REGISTER_DOUBLE.
+
+2004-04-29 Joel Brobecker <brobecker@gnat.com>
+
+ Committed by Andrew Cagney.
+ * infrun.c (handle_inferior_event): Rely on frame IDs to detect
+ function calls.
+
+2004-04-29 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_abi_regsize): Replace tdep parameter with
+ gdbarch, use mips_abi, update callers.
+ (mips_stack_argsize): Replace tdep parameter with gdbarch, use
+ mips_abi_regsize, update callers.
+ (struct gdbarch_tdep): Delete mips_default_stack_argsize and
+ mips_default_abi_regsize.
+ (mips_gdbarch_init): Do not set mips_default_stack_argsize and
+ mips_default_abi_regsize.
+
+2004-04-29 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_abi_regsize): Rename mips_saved_regsize.
+ (mips_abi_regsize_string): Rename mips_saved_regsize_string.
+ (struct gdbarch_tdep): Rename mips_default_saved_regsize to
+ mips_default_abi_regsize.
+ (mips_isa_regsize): Rename mips_regisze.
+ * mipsnbsd-tdep.c: Update.
+ * mips-linux-tdep.c: Update.
+ * irix5-nat.c: Update.
+ * mips-tdep.h (mips_isa_regsize): Update.
+
+ * gdb-events.sh (WITH_GDB_EVENTS): Delete macro and references.
+ Delete all disabled code.
+ * gdb-events.h, gdb-events.c: Re-generate.
+
+2004-04-19 Jerome Guitton <guitton@gnat.com>
+ Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_skip_prologue): follow the last jump only if
+ the function begins with a branch instruction.
+
+2004-04-29 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c: Fix spelling mistakes.
+
+2004-04-28 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ Andrew Cagney <cagney@redhat.com>
+
+ * configure.in (mips-sgi-irix5*): Define _KMEMUSER for
+ <sys/proc.h>.
+ * acconfig.h: Provide default _KMEMUSER value.
+ * config.in, configure: Re-generate.
+ * NEWS: Mention fix.
+
+2004-04-24 Randolph Chung <tausq@debian.org>
+
+ * configure.host (hppa*-*-linux*): New target.
+ * configure.tgt (hppa*-*-linux*): Likewise.
+ * hppa-tdep.c (hppa_gdbarch_init): Set cannot_fetch_register, move
+ gdbarch_init_osabi() call earlier so that osabi-specific frame
+ unwinders can be registered first.
+ * config/djgpp/fnchange.lst: Add entries for hppa-linux-tdep.c and
+ hppa-linux-nat.c.
+ * config/pa/tm-hppa.h (ISR_REGNUM, PID0_REGNUM, PID1_REGNUM)
+ (PID2_REGNUM, PID3_REGNUM): Add definitions of some register numbers.
+ * config/pa/linux.mh: New file.
+ * config/pa/linux.mt: New file.
+ * config/pa/nm-linux.h: New file.
+ * config/pa/xm-linux.h: New file.
+ * hppa-linux-nat.c: New file.
+ * hppa-linux-tdep.c: New file.
+
+2004-04-28 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa32_return_value): Handle both 4- and 8-byte fp
+ return values.
+ (hppa32_push_dummy_call): Fix small struct and floating point argument
+ passing, and make sure the stack frame is properly aligned.
+
+2004-04-28 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (print_stack_frame): Fix description.
+
+ * NEWS: Mention gdb/gdbserver/configure execute permission
+ changed. PR server/519.
+
+2004-04-28 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (print_stack_frame_stub): Delete declaration.
+ (struct print_stack_frame_args, print_stack_frame)
+ (print_frame_info, print_frame): Replace "source" with print what.
+ Replace "print" with "print_level". Replace "args" with
+ "print_args".
+ * frame.h (show_and_print_stack_frame, print_stack_frame)
+ (print_frame_info): Update declarations.
+ * stack.c (select_and_print_frame, frame_command)
+ (current_frame_command, up_command, down_command): Update calls -
+ use get_selected_frame, pass "enum print_what" for source, do not
+ call frame_relative_level.
+ * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Ditto.
+ * remote-rdp.c (remote_rdp_open): Ditto.
+ * remote-mips.c (common_open): Ditto.
+ * remote-e7000.c (e7000_start_remote): Ditto.
+ * ocd.c (ocd_start_remote): Ditto.
+ * mi/mi-main.c (mi_cmd_exec_return): Ditto.
+ * infrun.c (normal_stop): Ditto.
+ * inflow.c (kill_command): Ditto.
+ * infcmd.c (finish_command): Ditto.
+ * corelow.c (core_open): Ditto.
+ * tracepoint.c (finish_tfind_command): Ditto.
+ * thread.c (info_threads_command, info_threads_command)
+ (restore_current_thread, do_captured_thread_select): Ditto.
+ * ada-tasks.c (task_command): Ditto.
+
+2004-04-26 Orjan Friberg <orjanf@axis.com>
+
+ * frame.c: Include "observer.h".
+ (frame_observer_target_changed): New function.
+ (_initialize_frame): Attach target_changed observer.
+ * regcache.c: Include "observer.h".
+ (regcache_observer_target_changed): New function.
+ (_initialize_regcache): Attach target_changed observer.
+ * valops.c: Include "observer.h".
+ (value_assign): Notify target_changed event when modifying register.
+ * Makefile.in (frame.o, regcache.o, valops.o): Add $(observer_h).
+
+2004-04-26 Orjan Friberg <orjanf@axis.com>
+
+ From Paul Koning <pkoning@equallogic.com>:
+ * breakpoint.c (free_valchain): New function.
+ (insert_bp_location, delete_breakpoint): Use free_valchain.
+ (remove_breakpoint): Do not remove the valchain.
+ (bpstat_stop_status): If not stopped by watchpoint, skip
+ watchpoints when generating stop status list.
+ * infrun.c (handle_inferior_event): Make
+ stepped_after_stopped_by_watchpoint a global variable.
+ * remote.c (remote_stopped_data_address): Return watch data
+ address rather than zero if stepped_after_stopped_by_watchpoint is
+ set.
+
+2004-04-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR gdb/1626.
+ * configure.in: Check for curses after termcap.
+ On osf5.*, do not check for ncurses.
+ * configure: Regenerate.
+
+2004-04-25 Mark Kettenis <kettenis@gnu.org>
+
+ * ppcobsd-nat.c: Include "ppc-tdep.h".
+ * Makefile.in (ppcobsd-nat.o): Update dependencies.
+
+ * stack.c (return_command): Use CHECK_TYPEDEF on the return type.
+ Fixes PR tdep/1623 and PR tdep/1624.
+
+2004-04-24 Michael Chastain <mec.gnu@mindspring.com>
+
+ * xmodem.h, xmodem.c: Remove files.
+ * Makefile.in: Remove references to xmodem.h, xmodem.c.
+
+2004-04-23 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_stub_unwind_cache, hppa_stub_frame_unwind_cache)
+ (hppa_stub_frame_this_id, hppa_stub_frame_prev_register)
+ (hppa_stub_frame_unwind, hppa_stub_unwind_sniffer): New stub unwinder
+ for handling stackless frames.
+ (hppa_gdbarch_init): Link in hppa_stub_unwind_sniffer.
+
+2004-04-23 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_frame_cache): Handle the case when frame unwind
+ starts at a pc before the frame is created.
+
+2004-04-23 Joel Brobecker <brobecker@gnat.com>
+
+ * ChangeLog-2002: Fix year in one of the ChangeLog entries.
+
+2004-04-23 Jerome Guitton <guitton@gnat.com>
+
+ * rs6000-tdep.c (rs6000_extract_return_value): When extracting a float,
+ use convert_typed_floating to get the appropriate format.
+
+2004-04-22 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.h (find_unwind_entry, hppa_get_field, hppa_extract_5_load)
+ (hppa_extract_5R_store, hppa_extract_5r_store, hppa_extract_17)
+ (hppa_extract_21, hppa_extract_14, hppa_low_sign_extend)
+ (hppa_sign_extend): Add prototype.
+ * hppa-tdep.c (get_field, extract_5_load, extract_5R_store)
+ (extract_5r_store, extract_17, extract_21, extract_14, low_sign_extend)
+ (sign_extend): Rename with hppa_ prefix and make non-static. Other
+ hppa targets will also use these functions.
+ (find_unwind_entry): Remove prototype (moved to hppa-tdep.h).
+ (hppa_in_solib_call_trampoline, hppa_in_solib_return_trampoline)
+ (hppa_skip_trampoline_code): Move to hppa-hpux-tdep.c
+ (hppa_gdbarch_init): Remove gdbarch setting of
+ skip_trampoline_code, in_solib_call_trampoline and
+ in_solib_return_trampoline.
+ * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
+ (hppa64_hpux_in_solib_call_trampoline): New functions, split from
+ hppa_in_solib_call_trampoline.
+ (hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code):
+ Moved from hppa-tdep.c.
+ (hppa_hpux_init_abi): Set gdbarch for skip_trampoline_code,
+ in_solib_call_trampoline and in_solib_return_trampoline.
+
+2004-04-22 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_debug): New variable.
+ (find_unwind_entry, hppa_frame_cache): Add debug output.
+ (_initialize_hppa_tdep): Add command to set debug flag.
+
+2004-04-22 Andrew Cagney <cagney@redhat.com>
+
+ * ppcnbsd-tdep.c: Update copyright. Include "tramp-frame.h" and
+ "trad-frame.h".
+ (ppcnbsd_sigtramp_cache_init, ppcnbsd_sigtramp): Implement a NetBSD
+ signal trampoline unwinder.
+ (ppcnbsd_init_abi): Register ppcnbsd_sigtramp.
+
+2004-04-22 Mark Kettenis <kettenis@gnu.org>
+
+ Add OpenBSD/powerpc support.
+ * NEWS (New native configurations): Mention OpenBSD/powerpc.
+ * ppc-tdep.h (struct ppc_reg_offsets): New structure.
+ (ppc_supply_gregset, ppc_supply_fpregset, ppc_collect_gregset)
+ (ppc_collect_fpregset): New prototypes.
+ * ppcobsd-nat.c: New file.
+ * ppcobsd-tdep.c: New file.
+ * ppcobsd-tdep.h: New file.
+ * rs6000-tdep.c: Include "regset.h".
+ (ppc_supply_reg, ppc_collect_reg, ppc_supply_gregset)
+ (ppc_supply_fpregset, ppc_collect_gregset, ppc_collect_fpregset):
+ New functions.
+ * Makefile.in (ALLDEPFILES): Add pccobsd-nat.c and ppcobsd-tdep.c.
+ (ppcobsd-nat.o, ppcobsd-tdep.o): New dependencies.
+ (rs6000-tdep.o): Update dependencies.
+ * configure.host: Add powerpc-*-openbsd.
+ * configure.tgt: Add powerpc-*-openbsd.
+ * config/powerpc/obsd.mh: New file.
+ * config/powerpc/nm-obsd.h: New file.
+ * config/powerpc/obsd.mt: New file.
+
+2004-04-22 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (show_frame_info): Delete declaration.
+
+ * arm-tdep.c (arm_prologue_this_id): Delete redundant cycle test.
+ * m68hc11-tdep.c (m68hc11_frame_this_id): Ditto.
+ * m32r-tdep.c (m32r_frame_this_id): Ditto.
+ * frv-tdep.c (frv_frame_this_id): Ditto.
+ * avr-tdep.c (avr_frame_this_id): Ditto.
+
+2004-04-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * MAINTAINERS: Drop maintenance of gdb.stabs, and linespec.c.
+
+2004-04-22 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is
+ register number zero.
+
+2004-04-21 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (heuristic_proc_start):
+ Warning() already prefixes "Warning: ".
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * annotate.h (deprecated_annotate_starting_hook)
+ (deprecated_annotate_stopped_hook)
+ (deprecated_annotate_exited_hook)
+ (deprecated_annotate_signal_hook)
+ (deprecated_annotate_signalled_hook): Deprecate.
+ * tracepoint.h (deprecated_create_tracepoint_hook)
+ (deprecated_delete_tracepoint_hook)
+ (deprecated_modify_tracepoint_hook)
+ (deprecated_trace_find_hook)
+ (deprecated_trace_start_stop_hook): Deprecate.
+ * target.h (deprecated_target_new_objfile_hook): Deprecate.
+ * remote.h (deprecated_target_resume_hook)
+ (deprecated_target_wait_loop_hook): Deprecate.
+ * gdbcore.h (deprecated_exec_file_display_hook)
+ (deprecated_file_changed_hook): Deprecate.
+ * frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
+ * defs.h (deprecated_modify_breakpoint_hook)
+ (deprecated_command_loop_hook, deprecated_show_load_progress)
+ (deprecated_print_frame_info_listing_hook)
+ (deprecated_query_hook, deprecated_warning_hook)
+ (deprecated_flush_hook, deprecated_create_breakpoint_hook)
+ (deprecated_delete_breakpoint_hook)
+ (deprecated_interactive_hook, deprecated_registers_changed_hook)
+ (deprecated_readline_begin_hook, deprecated_readline_hook)
+ (deprecated_readline_end_hook, deprecated_register_changed_hook)
+ (deprecated_memory_changed_hook, deprecated_init_ui_hook)
+ (deprecated_context_hook, deprecated_target_wait_hook)
+ (deprecated_attach_hook, deprecated_detach_hook)
+ (deprecated_call_command_hook, deprecated_set_hook)
+ (deprecated_error_hook, deprecated_error_begin_hook)
+ (deprecated_ui_load_progress_hook): Deprecate.
+ * valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
+ * tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
+ * target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
+ * remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
+ * main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
+ * exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
+ * cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
+ * annotate.c, aix-thread.c: Update.
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (vaxnbsd-tdep.o): Update dependencies.
+ * vaxnbsd-tdep.c: Include "gdb_string.h".
+
+ * symfile.c (symbol_file_add_from_memory): #if 0 function.
+ (add_symbol_file_from_memory_command): #if 0 function body, call
+ error instead.
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * gdbcore.h: Update copyright.
+ (deprecated_add_core_fns): Rename add_core_fns.
+ * win32-nat.c (_initialize_core_win32): Update.
+ * sun3-nat.c (_initialize_core_sun3): Update.
+ * shnbsd-tdep.c (_initialize_shnbsd_tdep): Update.
+ * rs6000-nat.c (_initialize_core_rs6000): Update.
+ * ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Update.
+ * nto-tdep.c (_initialize_nto_tdep): Update.
+ * ns32knbsd-nat.c (_initialize_ns32knbsd_nat): Update.
+ * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Update.
+ * mips-nat.c (_initialize_core_mips): Update.
+ * mips-linux-tdep.c (_initialize_mips_linux_tdep): Update.
+ * m68knbsd-nat.c (_initialize_m68knbsd_nat): Update.
+ * m68klinux-nat.c (_initialize_m68k_linux_nat): Update.
+ * lynx-nat.c (_initialize_core_lynx): Update.
+ * irix5-nat.c (_initialize_core_irix5): Update.
+ * i386-interix-nat.c (_initialize_core_interix): Update.
+ * cris-tdep.c (_initialize_cris_tdep): Update.
+ * corelow.c (deprecated_add_core_fns): Update.
+ * core-regset.c (_initialize_core_regset): Update.
+ * core-aout.c (_initialize_core_aout): Update.
+ * armnbsd-nat.c (_initialize_arm_netbsd_nat): Update.
+ * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Update.
+ * alpha-nat.c (_initialize_core_alpha): Update.
+
+2004-04-21 Jim Blandy <jimb@redhat.com>
+
+ * rs6000-tdep.c (registers_e500, registers_7400): Doc fixes.
+
+2004-04-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (dwarf2_tmp_obstack, dwarf2_free_tmp_obstack):
+ Delete.
+ (dwarf_alloc_block): Take a CU argument. Use the comp_unit_obstack.
+ (read_attribute_value): Update calls to dwarf_alloc_block.
+ (dwarf2_build_psymtabs_hard): Don't initialize or clean up
+ dwarf2_tmp_obstack.
+ (psymtab_to_symtab_1): Likewise. Clean up using
+ free_stack_comp_unit.
+ (add_to_cu_func_list): Use the comp_unit_obstack.
+
+2004-04-19 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (dwarf2_flag_true_p): New function.
+ (die_is_declaration): Use the function above. Add some comments.
+
+2004-04-19 Mark Kettenis <kettenis@gnu.org>
+
+ * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Specify
+ architecture when registering sparcnbsd_core_osabi_sniffer.
+ Adjust comment.
+
+2004-04-18 Mark Kettenis <kettenis@gnu.org>
+
+ * infcall.c (find_function_addr): Add FUNCTION_START_OFFSET to
+ return value.
+
+ Based on a patch from Brian Ford <ford@vss.fsi.com>:
+ * i386-tdep.c: Correct register numbering scheme comments
+ throughout.
+ (i386_stab_reg_to_regnum): Rename to i386_dbx_reg_to_regnum.
+ (i386_dwarf_reg_to_regnum): Rename to i386_svr4_reg_to_regnum.
+ (i386_coff_init_abi, i386_elf_init_abi): Accomodate renames above.
+ (i386_gdb_arch_init): Likewise.
+
+ * Makefile.in (ALLDEPFILES): List ppc-sysv-tdep.c, ppcnbsd-nat.c
+ and ppcnbsd-tdep.c instead of ppc-sysv-tdep.o, ppcnbsd-nat.o and
+ ppcnbsd-tdep.o.
+
+ * m68k-tdep.h: Tweak comments.
+ * m68k-tdep.c: Tweak comment.
+
+2004-04-17 Randolph Chung <tausq@debian.org>
+
+ * Makefile.in (hppa-hpux-tdep.o): Add $(hppa_tdep_h).
+ * hppa-hpux-tdep.c (hppa-tdep.h): Include.
+ (hppa_hpux_som_init_abi): Set is_elf to 0.
+ (hppa_hpux_elf_init_abi): Set is_elf to 1.
+ * hppa-tdep.c (low_text_segment_address): Remove global.
+ (record_text_segment_lowaddr): Pass in low address as parameter. Use
+ section offset to calculate segment address.
+ (internalize_unwinds): Define low_text_segment_address as local and
+ pass to record_text_segment_lowaddr for ELF targets.
+ (hppa_gdbarch_init): Zero fill tdep structure.
+ (hppa_dump_tdep): Print tdep structure.
+ * hppa-tdep.h (gdbarch_tdep): Add is_elf member to tdep structure.
+
+2004-04-17 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_pseudo_register_read): Define.
+ (hppa_gdbarch_init): Set pseudo_register_read.
+ * config/pa/tm-hppa.h (DEPRECATED_CLEAN_UP_REGISTER_VALUE): Remove.
+ * regcache.c (supply_register): Remove check for
+ DEPRECATED_CLEAN_UP_REGISTER_VALUE since we've removed the last user.
+
+2004-04-17 Randolph Chung <tausq@debian.org>
+
+ * Makefile.in (hpread.o, pa64solib.o, somsolib.o): Add $(hppa_tdep_h)
+ * hppa-tdep.h (INSTRUCTION_SIZE): Move from tm-hppa.h.
+ (hpread_adjust_stack_address): Move to hpread.c.
+ * hppa-tdep.h (unwind_table_entry, unwind_stub_types, obj_unwind_info,
+ obj_private_struct): Move from tm-hppa.h.
+ * hpread.c (hppa-tdep.h): Include.
+ (hpread_adjust_stack_address): Move from hppa-tdep.c.
+ (hpread_read_function_type, hpread_read_doc_function_type)
+ (hpread_process_one_debug_symbol): Call hpread_adjust_stack_address
+ directly.
+ * pa64solib.c (hppa-tdep.h): Include.
+ * somsolib.c (hppa-tdep.h): Include.
+ * config/pa/tm-hppa.h (frame_info, frame_saved_regs, value, type,
+ inferior_status): Remove unused forward declarations.
+ (INSTRUCTION_SIZE): Move to hppa-tdep.c.
+ (unwind_table_entry, unwind_stub_types, obj_unwind_info,
+ obj_private_struct): Move to hppa-tdep.h.
+ (HPREAD_ADJUST_STACK_ADDRESS): Remove.
+
+2004-04-17 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_reg_struct_has_addr, hppa_skip_prologue)
+ (hppa_skip_trampoline_code, hppa_in_solib_call_trampoline)
+ (hppa_in_solib_return_trampoline, hppa_cannot_store_register)
+ (hppa_smash_text_address, hppa_target_read_pc, hppa_target_write_pc):
+ Remove forward declaration and make static.
+ (hppa_reg_struct_has_addr): Remove.
+
+2004-04-16 Joel Brobecker <brobecker@gnat.com>
+
+ * observer.sh: Move comments in sed command to first column.
+
+2004-04-16 Jason Molenda (jmolenda@apple.com)
+
+ * frame.c: Minor typeo corrections in comments.
+
+2004-04-16 Joel Brobecker <brobecker@gnat.com>
+
+ * observer.c (observer_test_first_notification_function): Update
+ function profile.
+ (observer_test_second_notification_function): Likewise.
+ (observer_test_third_notification_function): Likewise.
+
+2004-04-16 Mark Kettenis <kettenis@gnu.org>
+
+ From Brian Ford <ford@vss.fsi.com>:
+ * i386-tdep.c (i386_coff_init_abi): New function.
+ * i386-tdep.h (i386_coff_init_abi): New prototype.
+ * i386-cygwin-tdep.c (i386_cygwin_init_abi): Call it. Use correct
+ register number translation functions for DWARF and DWARF 2.
+
+2004-04-16 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c: Back out my previous change, it was incorrect.
+
+2004-04-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c: Include "hashtab.h".
+ (struct dwarf2_cu): Add partial_dies, comp_unit_obstack,
+ has_namespace_info.
+ (struct partial_die_info): Add comments. Use bitfields to reduce
+ memory footprint. Add scope, scope_set, has_specification,
+ spec_offset, die_parent, die_child, and die_sibling.
+ (peek_die_abbrev): Add prototype.
+ (partial_read_comp_unit_head): New function, broken out from
+ dwarf2_build_psymtabs_hard.
+ (dwarf2_build_psymtabs_hard): Remove unused variable abbrev_ptr.
+ Use partial_read_comp_unit_head. Initialize the CU and
+ comp_unit_obstack. Update calls to read_partial_die and
+ scan_partial_symbols. Use free_stack_comp_unit and
+ load_partial_dies.
+ (scan_partial_symbols): Change PDI to a pointer. Use the child and
+ sibling pointers to walk partial DIEs. Call fixup_partial_die.
+ Update calls to helper functions. Remove NAMESPACE argument.
+ Update comments.
+ (partial_die_parent_scope, partial_die_full_name): New functions.
+ (add_partial_symbol): Remove namespace argument. Update call to
+ pdi_needs_namespace. Use partial_die_full_name. Handle
+ DW_TAG_namespace. Check has_namespace_info flag.
+ (pdi_needs_namespace): Remove NAMESPACE argument. Just check the
+ tag. Handle namespaces.
+ (add_partial_namespace, add_partial_enumeration): Simplify.
+ (guess_structure_name): New function, derived from
+ add_partial_structure.
+ (add_partial_structure): Remove.
+ (determine_class_name): Update comment.
+ (dwarf2_read_abbrevs): Set has_namespace_info flag.
+ (is_type_tag_for_partial, load_partial_dies): New functions.
+ (read_partial_die): Pass abbrev and abbrev_len as arguments.
+ Record specifications instead of following them immediately.
+ (find_partial_die_in_comp_unit, find_partial_die)
+ (fixup_partial_die, free_stack_comp_unit)
+ (hashtab_obstack_allocate, dummy_obstack_deallocate)
+ (partial_die_hash, partial_die_eq): New functions.
+ * Makefile.in (hashtab_h): Define.
+ (dwarf2read.o): Update dependencies.
+ (observer_inc, observer_h): Move to the correct section.
+
+2004-04-15 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (dwarf2_attribute_true_p): New function.
+ (die_is_declaration): Use the function above. Add comment.
+
+2004-04-15 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (read_structure_scope): Identify stub types
+ using die_is_declaration() only.
+
+2004-04-15 Roland McGrath <roland@redhat.com>
+
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): Take ABFD as
+ argument instead of NAME.
+ (symbol_file_add, reread_separate_symbols): Call symfile_bfd_open
+ in call to symbol_file_add_with_addrs_or_offsets.
+ (build_addr_info): New function, helper for ...
+ (symbol_file_add_from_memory): New function.
+ (add_symbol_file_from_memory_command): New function using that.
+ (_initialize_symfile): Register it for add-symbol-file-from-memory.
+ (pre_add_symbol_hook): Add const to argument type.
+ * symfile.h (symbol_file_add_from_memory): Declare it.
+
+2004-04-15 Mark Kettenis <kettenis@gnu.org>
+
+ * NEWS (New native configurations): Mention OpenBSD/vax.
+ * configure.host: Add vax-*-openbsd*.
+ * config/vax/obsd.mh: New file.
+ * config/vax/nm-obsd.h: New file.
+
+ * vax-tdep.c: Include "regset.h".
+ (vax_supply_gregset): New function.
+ (vax_gregset): New variable.
+ (vax_regset_from_core_section): New function.
+ (vax_gdbarch_init): Set regset_from_core_section.
+ * Makefile.in (vax-tdep.o): Update dependencies.
+
+2004-04-15 Andrew Cagney <cagney@redhat.com>
+
+ * observer.c (normal_stop_subject, observer_notify_normal_stop)
+ (observer_normal_stop_notification_stub)
+ (observer_attach_normal_stop, observer_detach_normal_stop):
+ Delete, replaced by #include "observer.inc".
+ * infrun.c (normal_stop): Pass "stop_bpstat" to
+ observer_notify_normal_stop.
+ * Makefile.in (observer_inc): Define.
+ (observer.o): Update dependencies.
+ (observer.h, observer.inc): New rules.
+ * observer.h: Delete file.
+ * observer.sh: New file.
+
+2004-04-15 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-tdep.c (vax_frame_cache): Fix typo.
+
+2004-04-14 Mark Kettenis <kettenis@gnu.org>
+
+ * NEWS (New native configurations): Mention NetBSD/vax.
+ * configure.host: Add vax-*-netbsdelf* and vax-*-netbsd*.
+ * config/vax/nbsdelf.mh: New file.
+ * config/vax/nbsdaout.mh: New file.
+ * config/vax/nm-nbsd.h: New file.
+ * config/vax/nm-nbsdaout.h: New file.
+
+ * vaxnbsd-tdep.c: New file.
+ * Makefile.in (vaxnbsd-tdep.o): New dependency.
+ * configure.tgt: Add vax-*-netbsd* and vax-*-openbsd*.
+ * config/vax/nbsd.mt: New file.
+ * config/vax/tm-nbsd.h: New file.
+
+ * Makefile.in (vaxbsd-nat.o): New dependency.
+
+ * vax-tdep.h (vax_regnum): Add VAX_R0_REGNUM and VAX_R1_REGNUM.
+ * vax-tdep.c (vax_store_arguments): Remove struct_return and
+ struct_addr arguments. Don't push return value address.
+ (vax_push_dummy_call): Don't pass STRUCT_RETURN and STRUCT_ADDR as
+ arguments to vax_store_arguments. Store return value address in
+ R1.
+ (vax_store_struct_return, vax_extract_return_value)
+ (vax_store_return_value): Remove functions.
+ (vax_return_value): New function.
+ (vax_gdbarch_init): Set return value. Don't set
+ deprecated_store_struct_return, deprecated_extract_struct_return
+ and deprecated_store_return_value.
+
+2004-04-14 Andreas Schwab <schwab@suse.de>
+
+ * ia64-tdep.c (ia64_libunwind_frame_prev_register): Handle null
+ value buffer.
+ * libunwind-frame.c (libunwind_frame_prev_register): Likewise.
+
+2004-04-14 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-tdep.c (vax_store_arguments, vax_push_dummy_call)
+ (vax_unwind_dummy_id): New functions.
+ (vax_push_dummy_frame, vax_pop_frame): Remove functions.
+ (vax_call_dummy_words, sizeof_vax_call_dummy_words): Remove
+ variables.
+ (vax_fix_call_dummy): Remove function.
+ (vax_gdbarch_init): Set push_dummy_call and unwind_dummy_id.
+ Don't set deprecated_push_dummy_frame, deprecated_pop_frame,
+ call_dummy_location, deprecated_call_dummy_words,
+ deprecated_sizeof_call_dummy_words,
+ deprecated_call_dummy_breakpoint_offset,
+ deprecated_use_generic_dummy_frames, deprecated_pc_in_call_dummy,
+ and deprecated_dummy_write_sp.
+
+2004-04-13 David Carlton <carlton@kealia.com>
+
+ * MAINTAINERS: Move myself to "paper trail" section.
+
+2004-04-12 Mark Kettenis <kettenis@gnu.org>
+
+ * vax-tdep.c: Include "frame-base.h", "frame-unwind.h" and
+ "trad-frame.h".
+ (vax_frame_init_saved_regs): Remove function.
+ (vax_sigtramp_saved_pc): Remove function.
+ (vax_frame_saved_pc): Remove function.
+ (vax_frame_args_address): Remove function.
+ (vax_frame_num_args): Rewrite.
+ (vax_frame_chain): Remove function.
+ (vax_push_dummy_frame): Replace DEPRECATED_FP_REGNUM with
+ VAX_FP_REGNUM.
+ (vax_pop_frame): Likewise.
+ (vax_saved_pc_after_call): Remove function.
+ (struct vax_frame_cache): New structure.
+ (vax_frame_cache): New function.
+ (vax_frame_this_id): New function.
+ (vax_frame_prev_register): New function.
+ (vax_frame_unwind): New variable.
+ (vax_frame_sniffer): New function.
+ (vax_frame_base_address): New function.
+ (vax_frame_args_address): New function.
+ (vax_frame_base): New variable.
+ (vax_unwind_pc): New function.
+ (vax_gdbarch_init): Don't set deprecated_init_frame_pc,
+ deprecated_fp_regnum, deprecated_saved_pc_after_call,
+ deprecated_frame_chain, deprecated_frame_saved_pc,
+ deprecated_frame_args_address and
+ deprecated_frame_init_saved_regs.
+ * Makefile.in (vax-tdep.o): Update dependencies.
+
+ * vaxbsd-nat.c: New file.
+
+ * vax-tdep.h: Update copyright year. Adjust comments.
+ (VAX_REGISTER_SIZE, VAX_REGISTER_BYTES, VAX_MAX_REGISTER_RAW_SIZE,
+ VAX_MAX_REGISTER_VIRTUAL_SIZE): Remove macros.
+ (vax_regnum): New enum. Replacing...
+ (VAX_AP_REGNUM, VAX_FP_REGNUM, VAX_SP_REGNUM, VAX_PC_REGNUM)
+ (VAX_PS_REGNUM): ... these removed macros.
+ * vax-tdep.c (vax_register_name): Remove prototype.
+ (vax_register_name): Reorganize somewhat. Use ARRAY_SIZE.
+ (vax_register_byte, vax_register_raw_size,
+ vax_register_virtual_size, vax_register_virtual_type): Remove
+ functions.
+ (vax_register_type): New function.
+ (vax_breakpoint_from_pc): Reorganize.
+ (vax_gdbarch_init): Set register_type. Don't set
+ deprecated_register_size, deprecated_register_bytes,
+ deprecated_register_byte, deprecated_register_raw_size,
+ deprecated_max_register_raw_size,
+ deprecated_register_virtual_size,
+ deprecated_max_register_virtual_size and
+ deprecated_register_virtual_type. Add comment on stack direction.
+
+2004-04-11 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64-tdep.h (amd64_regnum): Add AMD64_CS_REGNUM,
+ AMD64_SS_REGNUM, AMD64_DS_REGNUM, AMD64_ES_REGNUM,
+ AMD64_FS_REGNUM and AMD64_GS_REGNUM.
+
+2004-04-10 Randolph Chung <tausq@debian.org>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2004-04-07 Randolph Chung <tausq@debian.org>
+
+ * hppa-tdep.c (hppa_inner_than): Remove.
+ (is_pa_2): Remove unused static variable.
+ (hppa_gdbarch_init): Use core_addr_greaterthan instead of own version.
+
+2004-03-10 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * language.h (language_defn): Add new la_post_parser field.
+ * parser-defs.h (null_post_parser): New declaration (default for
+ la_post_parser).
+
+ * parse.c (parse_exp_1): Move code to parse_exp_in_context and
+ insert call to that function.
+ (parse_exp_in_context): New function, including code formerly in
+ parse_exp_1. Calls language-dependent post-parser after
+ prefixification.
+ (parse_expression_in_context): New exported function.
+ (null_post_parser): New definition.
+ * expression.h (parse_expression_in_context): Add declaration.
+
+ * p-lang.c (pascal_language_defn): Add trivial post-parser.
+ * c-lang.c (c_language_defn): Ditto.
+ (cplus_language_defn): Ditto.
+ (asm_language_defn): Ditto.
+ (minimal_language_defn): Ditto.
+ * f-lang.c (f_language_defn): Ditto.
+ * jv-lang.c (java_language_defn): Ditto.
+ * language.c (unknown_language_defn): Ditto.
+ (auto_language_defn): Ditto.
+ (local_language_defn): Ditto.
+ * m2-lang.c (m2_language_defn): Ditto.
+ * scm-lang.c (scm_language_defn): Ditto.
+ * obj-lang.c (objc_language_defn): Ditto.
+
+2004-04-10 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64nbsd-tdep.c (amd64nbsd_sigcontext_addr): Remove function.
+ (amd64nbsd_mcontext_addr): New function.
+ (amd64nbsd_init_abi): Initialize TDEP->sigcontext_addr as
+ amd64nbsd_mcontext_addr. Directly initialize TDEP->sc_reg_offset
+ with amd64nbsd_r_reg_offset, instead of building it on the fly.
+
+ * corelow.c (core_xfer_partial): Fix coding standards violation.
+ Add support for TARGET_OBJECT_WCOOKIE.
+
+ * sparc-linux-tdep.c (sparc32_linux_init_abi): Don't set
+ deprecated_pc_in_sigtramp.
+ * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise.
+ * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise.
+ * sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Likewise.
+ * sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
+ * sparc64obsd-tdep.c (sparc64obsd_init_abi): Likewise.
+ * sparcnbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
+ * sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
+
+ * amd64-linux-tdep.c, amd64nbsd-tdep.c, amd64obsd-tdep.c,
+ i386-linux-tdep.c, i386-tdep.c, i386nbsd-tdep.c, i386obsd-tdep.c:
+ Fix typo.
+
+ * amd64-tdep.c (amd64_supply_fxsave): Only fiddle with
+ I387_FISEG_REGNUM and I387_FOSEG_REGNUM in 64-bit mode.
+ (amd64_collect_fxsave): Likewise.
+
+ * i386-sol2-tdep.c: Include "gdb_string.h".
+ (i386_sol2_sigtramp_p): Recognize signal trampoline based on its
+ name.
+ * Makefile.in (i386-sol2-tdep.o): Update dependencies.
+
+2004-04-10 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-sol2-tdep.c: Include "solib-svr4.h".
+ (i386_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
+ * Makefile.in (i386-sol2-tdep.o): Update dependencies.
+ * config/i386/tm-i386sol2.h: Include :solib.h".
+ * config/i386/i386sol2.mh (NATDEPFILES): Remove solib.o,
+ solib-svr4.o and solib-legacy.o.
+ * config/i386/i386sol2.mt (TDEPFILES): Add solib.o and
+ solib-svr4.o.
+
+2004-04-09 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64-linux-nat.c (fetch_inferior_registers): Correctly check
+ whether a register is supplied by PTRACE_GETFPREGS.
+ (store_inferior_registers): Likewise.
+ * amd64bsd-nat.c (fetch_inferior_registers): Correctly check
+ whether a register is supplied by PT_GETFPREGS.
+ (store_inferior_registers): Likewise.
+
+ * config/i386/linux.mt (TDEPFILES): Remove solib-legacy.o.
+ * config/i386/linux64.mt (TDEPFILES): Likewise.
+
+ * i386-linux-nat.c: Update copyrigth year. Tweak comment.
+
+ * amd64-tdep.c (amd64_sigtramp_frame_sniffer): Rewrite to use new
+ sigtramp_p member of `struct gdbarch_tdep'. Also check whether
+ the program counter is in the range specified by `struct
+ gdbarch_tdep'.
+ * amd64-linux-tdep.c: Include "symtab.h".
+ (amd64_linux_pc_in_sigtramp): Remove function.
+ (amd64_linux_sigtramp_p): New function.
+ (amd64_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * amd64nbsd-tdep.c: Include "symtab.h".
+ (amd64nbsd_sigtramp_p): New function.
+ (amd64nbsd_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * amd64obsd-tdep.c: Include "symtab.h" and "objfiles.h". Add a
+ few comments.
+ (amd64obsd_pc_in_sigtramp): Remove function.
+ (amd64obsd_sigtramp_p): New function.
+ (amd64obsd_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * i386-tdep.h (struct gdbarch_tdep): Add sigtramp_p member.
+ (i386bsd_pc_ins_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove prototypes.
+ * i386-tdep.c (i386_sigtramp_frame_sniffer): Rewrite to use new
+ sigtramp_p member of `struct gdbarch_tdep'. Also check whether
+ the program counter is in the range specified by `struct
+ gdbarch_tdep'.
+ (i386_pc_in_sigtramp, i386_svr4_pc_in_sigtramp): Remove functions.
+ (i386_sigtramp_p, i386_svr4_sigtramp_p): New functions.
+ (i386_go32_pc_in_sigtramp): Remove function.
+ (i386_svr4_init_abi): Don't set deprecated_pc_in_sigtramp.
+ Initialize TDEP->sigtramp_p.
+ (i386_go32_init_abi): Initialize TDEP->sigtramp_p to NULL.
+ (i386_gdbarch_init): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * i386-linux-tdep.c: Adjust comments.
+ (i386_linux_pc_in_sigtramp): Remove function.
+ (i386_linux_sigtramp_p): New function.
+ (i386_linux_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * i386-nto-tdep.c: Update copyright year.
+ (i386nto_pc_in_sigtramp): Remove function.
+ (i386nto_sigtramp_p): New function.
+ (i386nto_sigcontext_addr): Use I386_ESP_REGNUM instead of
+ SP_REGNUM.
+ (i386nto_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * i386-sol2-tdep.c: Update copyright year.
+ (i386_sol2_pc_in_sigtramp): Remove function.
+ (i386_sol2_sigtramp_p): New function.
+ (i386_sol2_init_abi): Initialize TDEP->sigtramp_p. Don't set
+ deprecated_pc_in_sigtramp.
+ * i386bsd-tdep.c (i386bsd_pc_in_sigtramp): Remove function.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove functions.
+ (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp,
+ deprecated_sigtramp_start and deprecated_sigtramp_end.
+ * i386nbsd-tdep.c: Include "frame.h" and "symtab.h".
+ (i386nbsd_pc_in_sigtramp): Remove function.
+ (i386nbsd_sigtramp_p): New function.
+ (i386nbsd_init_abi): Don't set deprecated_pc_in_sigtramp,
+ deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize
+ TDEP->sigtramp_start, TDEP->sigtramp_end and TDEP->sigtramp_p.
+ * i386obsd-tdep.c: Include "frame.h", "symtab.h" and "objfiles.h".
+ (i386obsd_pc_in_sigtramp): Remove function.
+ (i386obsd_sigtramp_p): New function.
+ (i386obsd_sigtramp_start, i386obsd_sigtramp_end): Remove
+ functions.
+ (i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp,
+ deprecated_sigtramp_start, deprecated_sigtramp_end. Initialize
+ TDEP->sigtramp_p.
+ * Makefile.in (amd64-linux-tdep.o, amd64nbsd-tdep.o,
+ amd64obsd-tdep.o, i386nbsd-tdep.o, i386obsd-tdep.o): Update
+ dependencies.
+
+ * config/i386/i386aout.mt: Remove file.
+
+ * configure.tgt: Remove i[34567]86-*-go32*,
+ i[34567]86-*-msdosdjgpp*, i[34567]86-*-sco*, i[34567]86-*-sysv*
+ and i[34567]86-*-isc*. Set gdb_target to i386 for
+ i[34567]86-*-netware* and i[34567]86-*-*.
+ * config/i386/i386.mt: New file.
+ * config/i386/embed.mt: Remove file.
+ * config/i386/go32.mt: Remove file.
+ * config/i386/i386nw.mt: Remove file.
+ * config/i386/i386v.mt: Remove file.
+ * config/i386/tm-go32.h: Remove file.
+
+ * tui/tui-hooks.c: Include "readline/readline.h" after
+ "gdb_curses.h" instead of before.
+ * tui/tui-io.c: Likewise.
+
+ * tui/tui.c: Fix typo in comment.
+
+ * sparc64-tdep.c (sparc_address_from_register): Remove function.
+
+2004-04-08 Andrew Cagney <cagney@redhat.com>
+
+ * breakpoint.h (deprecated_exception_catchpoints_are_fragile)
+ (deprecated_exception_support_initialized): Declare.
+ * hppa-hpux-tdep.c (initialize_hp_cxx_exception_support)
+ (initialize_hp_cxx_exception_support)
+ (child_enable_exception_callback): Update.
+ * breakpoint.c (deprecated_exception_catchpoints_are_fragile)
+ (deprecated_exception_support_initialized): Rename
+ deprecated_exception_catchpoints_are_fragile and
+ deprecated_exception_support_initialized.
+ (breakpoint_init_inferior, breakpoint_init_inferior): Update.
+
+ * symtab.c (deprecated_hp_som_som_object_present): Rename
+ hp_som_som_object_present.
+ * symtab.h (deprecated_hp_som_som_object_present): Declare.
+ * symfile.c (hp_som_som_object_present, RESET_HP_UX_GLOBALS):
+ Update. Delete extern declaration.
+ * valops.c (hp_som_som_object_present): Ditto.
+ * parse.c (deprecated_hp_som_som_object_present)
+ (parse_nested_classes_for_hpacc): Ditto.
+ * hpread.c (hp_som_som_object_present, hpread_expand_symtab): Ditto.
+ * hppa-hpux-tdep.c (hp_som_som_object_present)
+ (initialize_hp_cxx_exception_support): Ditto.
+ * eval.c (hp_som_som_object_present, evaluate_subexp_standard): Ditto.
+ * cp-valprint.c (hp_som_som_object_present)
+ (cp_print_class_method): Ditto.
+ * c-typeprint.c (hp_som_som_object_present):
+ (c_type_print_base): Ditto.
+ * c-exp.y (hp_som_som_object_present): Ditto.
+
+2004-04-08 Andrew Cagney <cagney@redhat.com>
+
+ * frame-unwind.c (struct frame_unwind_table, frame_unwind_init)
+ (frame_unwind_prepend_unwinder, frame_unwind_append_sniffer)
+ (frame_unwind_find_by_frame): Re-implement the unwind code so
+ that it can both prepend and append sniffers. Replace
+ frame_unwind_register_unwinder with frame_unwind_prepend_unwinder.
+ * tramp-frame.c (tramp_frame_append): Use
+ frame_unwind_prepend_unwinder.
+ * frame-unwind.h (frame_unwind_prepend_unwinder): Replace
+ frame_unwind_register_unwinder.
+ * tramp-frame.h (tramp_frame_prepend_unwinder): Rename
+ tramp_frame_append.
+ * tramp-frame.c (tramp_frame_prepend_unwinder): Update.
+ * mips-linux-tdep.c (mips_linux_init_abi, mips_linux_init_abi)
+ (mips_linux_init_abi): Update.
+
+2004-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ * ppc-linux-tdep.c (ELF_NREG, ELF_NFPREG, ELF_NVRREG)
+ (ELF_FPREGSET_SIZE): Delete constants formerly used in core
+ file support.
+
+2004-04-07 Kevin Buettner <kevinb@redhat.com>
+
+ * ia64-tdep.c (elf.h): Don't include.
+ (elf/ia64.h) [HAVE_LIBUNWIND_IA64_H]: Include.
+
+2004-04-07 Jason Molenda (jmolenda@apple.com)
+
+ * frame.h: Typeo corrections in comments.
+
+2004-04-07 Jim Blandy <jimb@redhat.com>
+
+ * i386-tdep.c (i386_stab_reg_to_regnum): Correct numbering for
+ %esp and %ebp
+
+2004-04-07 Mark Kettenis <kettenis@gnu.org>
+
+ * config/sparc/linux.mt (TDEPFILES): Remove solib-legacy.o.
+ * config/sparc/linux64.mt (TDEPFILES): Likewise.
+ * config/sparc/sol2.mt (TDEPFILES): Add solib.o and solib-svr4.o.
+ * config/sparc/sol2.mh (NATDEPFILES): Remove solib.o, solib-svr4.o
+ and solib-legacy.o.
+ * config/sparc/sol2-64.mt (TDEPFILES): Add solib.o and
+ solib-svr4.o.
+ * config/sparc/tm-sol2.h: Update copyright year. Include
+ "solib.h".
+
+ * sparc-sol2-tdep.c: Update copyright year. Include
+ "solib-svr4.h".
+ (sparc32_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
+ * sparc64-sol2-tdep.c: Include "solib-svr4.h".
+ (sparc64_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
+ * Makefile.in (sparc-sol2-tdep.o, sparc64-sol2-tdep.o): Update
+ dependencies.
+
+2004-04-06 Andrew Cagney <cagney@redhat.com>
+
+ * infttrace.c: Include "infttrace.h".
+ * infttrace.h: Include "target.h".
+ * Makefile.in (infttrace_h): Update.
+ (infttrace.o): Update.
+
+2004-04-06 Andrew Cagney <cagney@redhat.com>
+
+ * hppah-nat.c (hpux_has_forked, hpux_has_vforked)
+ (hpux_has_execd, hpux_has_syscall_event): Include "infttrace.h",
+ move extern declarations from here ...
+ * infttrace.h: ... to here.
+ * Makefile.in (hppah-nat.o): Update dependencies.
+
+ * hppa-tdep.c (hppa_breakpoint_from_pc): Make static.
+ (hppa_gdbarch_init): Set gdbarch_breakpoint_from_pc
+ * config/pa/tm-hppa.h (BREAKPOINT_FROM_PC, BREAKPOINT32):
+ (hppa_breakpoint_from_pc): Delete.
+
+ * MAINTAINERS: Mark hppa-elf as buildable with -Werror.
+
+2004-04-05 Andrew Cagney <cagney@redhat.com>
+
+ * hppa-tdep.c: Do not include <sys/types.h>, <sys/param.h>,
+ <signal.h>, <sys/ptrace.h>, #include "a.out.encap.h",
+ <sys/file.h>.
+
+2004-04-06 Randolph Chung <tausq@debian.org>
+
+ Committed by Andrew Cagney (mechanical change).
+ * hppa-tdep.c: (args_for_find_stub, hp_som_som_object_present,
+ exception_catchpoints_are_fragile, find_stub_with_shl_get,
+ cover_find_stub_with_shl_get, initialize_hp_cxx_exception_support,
+ child_enable_exception_callback, current_ex_event,
+ null_symtab_and_line, child_get_current_exception_event,
+ HP_ACC_EH_notify_hook, HP_ACC_EH_set_hook_value,
+ HP_ACC_EH_notify_callback, HP_ACC_EH_break, HP_ACC_EH_catch_throw,
+ HP_ACC_EH_catch_catch, __eh_notification, hp_cxx_exception_support,
+ hp_cxx_exception_support_initialized, eh_notify_hook_addr,
+ eh_notify_callback_addr, eh_break_addr, eh_catch_catch_addr,
+ eh_catch_throw_addr, break_callback_sal, setup_d_pid_in_inferior):
+ Move hpux-specific definitions ...
+ * hppa-hpux-tdep.c: ... to here.
+
+2004-04-05 Andrew Cagney <cagney@redhat.com>
+
+ * hppa-tdep.c (hppa_frame_cache): Pass the frame's func to
+ skip_prologue_using_sal.
+
+2004-04-05 Andrew Cagney <cagney@redhat.com>
+
+ * config/i386/tm-i386.h: Delete file.
+ * config/i386/tm-vxworks.h: Update copyright, do not include
+ "tm-i386.h".
+ * config/i386/tm-nto.h, config/i386/tm-linux.h: Ditto.
+ * config/i386/tm-i386sol2.h, config/i386/tm-i386lynx.h: Ditto.
+ * config/i386/tm-go32.h, config/i386/tm-cygwin.h: Ditto.
+ * config/i386/ncr3000.mt (TM_FILE): Delete.
+ * config/i386/interix.mt (TM_FILE): Delete.
+ * config/i386/i386v.mt (TM_FILE): Delete.
+ * config/i386/i386nw.mt (TM_FILE): Delete.
+ * config/i386/i386gnu.mt (TM_FILE): Delete.
+ * config/i386/i386aout.mt (TM_FILE): Delete.
+ * config/i386/embed.mt (TM_FILE): Delete.
+
+2004-04-05 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.h (fsr0_regnum, acc0_regnum, acc7_regnum, accg0123_regnum)
+ (accg4567_regnum, msr0_regnum, msr1_regnum, gner0_regnum)
+ (gner1_regnum, fner0_regnum, fner1_regnum, accg0_regnum)
+ (accg7_regnum): New constants.
+ (last_spr_regnum, last_pseudo_regnum): Update.
+ * frv-tdep.c (new_variant): Initialize names for fsr0, acc0-acc7,
+ accg0-accg7, msr0, msr1, gner0, gner1, fner0, and fner1.
+ (frv_pseudo_register_read, frv_pseudo_register_write): Add support
+ for accg registers.
+ (frv_register_sim_regno): Update spr_map[].
+
+2004-04-04 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/xm-riscos.h: Delete.
+ * config/mips/xm-mipsv4.h, config/mips/xm-mips.h: Delete.
+ * config/mips/tm-mipsv4.h, config/mips/riscos.mh: Delete.
+ * config/mips/nm-riscos.h, config/mips/nm-news-mips.h: Delete.
+ * config/mips/nm-mips.h, config/mips/news-mips.mh: Delete.
+ * config/mips/news-mips.mh, config/m68k/tm-m68kv4.h: Delete.
+ * config/mips/decstation.mh, config/mips/littlemips.mh: Delete.
+ * config/mips/mipsv4.mt, config/m68k/tm-sun3.h: Delete.
+ * config/m68k/xm-sun3os4.h, config/m68k/xm-sun3.h: Delete.
+ * config/m68k/xm-sun2.h, config/m68k/xm-m68kv4.h: Delete.
+ * config/m68k/xm-dpx2.h, config/m68k/xm-delta68.h: Delete.
+ * config/m68k/xm-3b1.h, config/m68k/tm-sun3os4.h: Delete.
+ * config/m68k/tm-m68klynx.h, config/m68k/tm-dpx2.h: Delete.
+ * config/m68k/tm-delta68.h, config/m68k/tm-3b1.h: Delete.
+ * config/m68k/sun3os4.mt, config/m68k/nm-sysv4.h: Delete.
+ * config/m68k/nm-sun3.h, config/m68k/sun3os4.mh: Delete.
+ * config/m68k/sun2os3.mh, config/m68k/nm-sun2.h: Delete.
+ * config/m68k/nm-m68klynx.h, config/m68k/sun3os3.mt: Delete.
+ * config/m68k/nm-dpx2.h, config/m68k/sun2os3.mt: Delete.
+ * config/m68k/dpx2.mh, config/m68k/sun3os3.mh: Delete.
+ * config/m68k/sun2os4.mh, config/m68k/nm-delta68.h: Delete.
+ * config/m68k/m68kv4.mt, config/m68k/m68klynx.mt: Delete.
+ * config/m68k/3b1.mt, config/m68k/m68klynx.mh: Delete.
+ * config/m68k/m68kv4.mh, config/m68k/sun2os4.mt: Delete.
+ * config/m68k/tm-sun2os4.h, config/m68k/3b1.mh: Delete.
+ * config/m68k/dpx2.mt, config/m68k/delta68.mt: Delete.
+ * config/m68k/tm-sun2.h, config/m68k/delta68.mh: Delete.
+
+ * configure.tgt: Remove m68000-*-sunos3*, m68000-*-sunos4*,
+ m68*-bull-sysv*, m68*-att-*, m68*-motorola-*, m68*-*-lynxos*,
+ m68*-*-sunos3*, m68*-*-sunos4*, m68*-*-sysv4*, mips*-*-sysv4*.
+ * configure.host: Remove m680[01]0-sun-sunos3*,
+ m680[01]0-sun-sunos4*, m68*-att-*, m68*-bull*-sysv*,
+ m68*-*-lynxos*, m68*-*-sysv4*, m68*-motorola-*, m68*-sun-sunos3*,
+ m68*-sun-sunos4*, m68*-sun-*, mips-dec-*, mips-little-*,
+ mips-sony-*, mips-*-mach3*, mips-*-sysv4*, mips-*-sysv*,
+ mips-*-riscos*.
+ * NEWS: Mention removed systems.
+
+2004-04-04 Andrew Cagney <cagney@redhat.com>
+
+ GDB 6.1 release created from 6.1 branch.
+
+2004-04-04 Andrew Cagney <cagney@redhat.com>
+
+ * gnu-nat.c (gnu_wait): Use memcpy instead of bcopy.
+ * remote-vxmips.c (vx_read_register, vx_write_register): Ditto.
+ * remote-vx68.c (vx_read_register, vx_write_register): Ditto.
+
+ * config/vax/xm-vax.h (FAULT_CODE_ORIGIN, INIT_STACK): Delete.
+ * config/alpha/xm-alphaosf.h (NO_SIGINTERRUPT): Delete.
+ * config/alpha/xm-alphalinux.h (NO_SIGINTERRUPT): Delete.
+
+2004-04-03 Jim Blandy <jimb@redhat.com>
+
+ * MAINTAINERS: Chris Faylor has changed employers; add him to
+ "paper trail" section, and update his E-mail address.
+
+2004-04-03 Andrew Cagney <cagney@redhat.com>
+
+ * frame-unwind.c (frame_unwind_find_by_frame): Delete check for
+ generic dummy frames.
+ * dummy-frame.c: Update copyright.
+ (dummy_frame_sniffer): Delete check for generic dummy frames.
+
+ * config/pa/tm-hppa.h (REG_PARM_STACK_SPACE): Delete.
+ * config/pa/tm-hppa64.h (PA20W_CALLING_CONVENTIONS)
+ (REG_PARM_STACK_SPACE): Delete.
+ * hppa-tdep.c (hppa64_push_dummy_call, hppa32_push_dummy_call):
+ Inline reference to REG_PARM_STACK_SPACE.
+
+ * config/pa/tm-hppah.h (FRAME_SAVED_PC_IN_SIGTRAMP)
+ (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP)
+ (hppa32_hpux_frame_find_saved_regs_in_sigtramp)
+ (FRAME_BASE_BEFORE_SIGTRAMP)
+ (hppa32_hpux_frame_base_before_sigtramp)
+ (hppa32_hpux_frame_saved_pc_in_sigtramp): Delete.
+ * config/pa/tm-hppa64.h (hppa64_hpux_frame_saved_pc_in_sigtramp)
+ (hppa64_hpux_frame_find_saved_regs_in_sigtramp)
+ (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP)
+ (FRAME_BASE_BEFORE_SIGTRAMP)
+ (hppa64_hpux_frame_base_before_sigtramp)
+ (FRAME_SAVED_PC_IN_SIGTRAMP): Delete.
+
+2004-04-03 Andrew Cagney <cagney@redhat.com>
+
+ * PROBLEMS: Mention that GDB doesn't build on HP/UX 11.00.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * sh64-tdep.c (sh64_init_extra_frame_info): Replace
+ DEPRECATED_CALL_DUMMY_LENGTH with 0, simplify.
+ * dummy-frame.h: Delete out-of-date comments.
+ * gdbarch.sh (DEPRECATED_CALL_DUMMY_LENGTH): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2004-04-02 Joel Brobecker <brobecker@gnat.com>
+
+ Committed by Andrew Cagney <cagney@redhat.com>.
+ * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Do not take
+ into account an instruction saving a register if we have already
+ seen an earlier instruction saving that same register.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_INIT_FRAME_PC_FIRST): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.c (legacy_get_prev_frame): Delete references to
+ DEPRECATED_INIT_FRAME_PC_FIRST.
+
+ * infrun.c (pc_in_sigtramp): Delete function.
+ (check_sigtramp2): Inline call to pc_in_sigtramp, use
+ get_frame_type.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_step_into_function): Delete code conditional on
+ legacy_frame_p.
+ (handle_inferior_event, step_over_function): Ditto.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (get_prev_frame_1): Exclude signal trampolines from the
+ "previous frame inner to this frame" test.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (safe_frame_unwind_memory): New function.
+ * frame.h (safe_frame_unwind_memory): Declare. Update description
+ of /safe_/ methods.
+ * tramp-frame.c (tramp_frame_start): Re-order parmeters, add
+ "next_frame". Use safe_frame_unwind_memory.
+ (tramp_frame_sniffer): Update call to tramp_frame_start.
+
2004-04-01 Daniel Jacobowitz <drow@mvista.com>
* dwarf2read.c (dwarf2_objfile_data_key): New.
@@ -53,9 +7115,9 @@
(value_less): Ditto.
(value_neg): Ditto.
(value_complement): Ditto.
- (value_binop): Simplify slightly by using is_integral_type and
+ (value_binop): Simplify slightly by using is_integral_type and
eliminiating unnecessary COERCE_ENUMs.
-
+
2004-03-31 Andrew Cagney <cagney@redhat.com>
* frame.h (frame_unwind_id): Declare.
@@ -226,9 +7288,9 @@
* i386obsd-tdep.c (i386obsd_init_abi): Update.
* i386nbsd-tdep.c (i386nbsd_init_abi): Update.
* i386bsd-tdep.c (i386bsd_init_abi): Update.
- * config/vax/tm-vaxbsd.h (DEPRECATED_SIGTRAMP_END)
+ * config/vax/tm-vaxbsd.h (DEPRECATED_SIGTRAMP_END)
(DEPRECATED_SIGTRAMP_START): Update.
- * config/m68k/tm-nbsd.h (DEPRECATED_SIGTRAMP_END)
+ * config/m68k/tm-nbsd.h (DEPRECATED_SIGTRAMP_END)
(DEPRECATED_SIGTRAMP_START): Update.
* blockframe.c (find_pc_sect_partial_function): Update.
* arch-utils.c (legacy_pc_in_sigtramp): Update.
@@ -285,7 +7347,7 @@
* sparc64obsd-tdep.c (sparc64obsd_init_abi): Update.
* sparcnbsd-tdep.c (sparc32nbsd_init_abi): Update.
* sparcobsd-tdep.c (sparc32obsd_init_abi): Update.
-
+
2004-03-23 Andrew Cagney <cagney@redhat.com>
* tramp-frame.h, tramp-frame.h: New files.
@@ -306,7 +7368,7 @@
(trad_frame_cache_zalloc): New function.
(trad_frame_set_id, trad_frame_get_id): New functions.
(trad_frame_set_reg_addr, trad_frame_get_register): New functions.
-
+
2004-03-22 Andrew Cagney <cagney@redhat.com>
* s390-tdep.c (struct s390_stub_unwind_cache): Rename
@@ -366,7 +7428,7 @@
(legacy_get_prev_frame): Ditto.
* inferior.h: Delete reference to generic_pc_in_call_dummy in
comment.
-
+
2004-03-21 Andrew Cagney <cagney@redhat.com>
* inferior.h (deprecated_pc_in_call_dummy_at_entry_point): Delete
@@ -641,7 +7703,7 @@
(dwarf2_frame_set_init_reg): Use gdbarch_data.
(dwarf2_frame_init_reg): Use gdbarch_data.
(_initialize_dwarf2_frame): Use gdbarch_data_register_pre_init.
- * solib-svr4.c (set_solib_svr4_fetch_link_map_offsets)
+ * solib-svr4.c (set_solib_svr4_fetch_link_map_offsets)
(_initialize_svr4_solib): Update.
* user-regs.c (_initialize_user_regs): Update.
* reggroups.c (_initialize_reggroup): Update.
@@ -659,7 +7721,7 @@
* frame-base.c (frame_base_table): Update.
* remote.c (_initialize_remote): Update.
* gdb_obstack.h (OBSTACK_ZALLOC, OBSTACK_CALLOC): Define.
-
+
2004-03-15 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (bfd_lookup_symbol): Delete unused function.
@@ -728,7 +7790,7 @@
2004-03-14 Daniel Jacobowitz <drow@mvista.com>
* dwarf2read.c (read_structure_type): Rename from
- read_structure_scope. Don't create a symbol or call process_die.
+ read_structure_scope. Don't create a symbol or call process_die.
Return immediately if die->type is set. Call read_type_die before
dwarf2_add_member_fn.
(process_structure_scope): New function.
@@ -974,27 +8036,27 @@
* config/pa/tm-hppa.h (DEPRECATED_DO_REGISTERS_INFO)
(pa_do_registers_info): Delete.
* hppa-tdep.c (pa_do_registers_info, pa_do_strcat_registers_info)
- (pa_print_registers, pa_print_fp_reg, pa_strcat_registers)
+ (pa_print_registers, pa_print_fp_reg, pa_strcat_registers)
(pa_strcat_fp_reg, pa_register_look_aside): Delete.
* infcall.c (legacy_push_dummy_code): Delete #ifdef
GDB_TARGET_IS_HPPA code.
* config/pa/tm-hppa.h (DEPRECATED_FIX_CALL_DUMMY)
- (hppa_fix_call_dummy, DEPRECATED_CALL_DUMMY_HAS_COMPLETED)
+ (hppa_fix_call_dummy, DEPRECATED_CALL_DUMMY_HAS_COMPLETED)
(DEPRECATED_DUMMY_WRITE_SP, CALL_DUMMY): Delete.
* config/pa/tm-hppa64.h (CALL_DUMMY): Delete.
- * hppa-tdep.c (hppa_frame_chain, hppa_frame_chain_valid)
- (hppa_push_dummy_frame, hppa_pop_frame, hppa_push_arguments)
- (hppa_fix_call_dummy, hppa64_stack_align, hppa_frame_saved_pc)
+ * hppa-tdep.c (hppa_frame_chain, hppa_frame_chain_valid)
+ (hppa_push_dummy_frame, hppa_pop_frame, hppa_push_arguments)
+ (hppa_fix_call_dummy, hppa64_stack_align, hppa_frame_saved_pc)
(hppa_init_extra_frame_info, hppa_saved_pc_after_call)
- (hppa64_call_dummy_breakpoint_offset, hppa_frame_init_saved_regs)
- (hppa_frameless_function_invocation, hppa64_store_return_value)
- (hppa_store_struct_return, hppa64_extract_return_value)
+ (hppa64_call_dummy_breakpoint_offset, hppa_frame_init_saved_regs)
+ (hppa_frameless_function_invocation, hppa64_store_return_value)
+ (hppa_store_struct_return, hppa64_extract_return_value)
(hppa64_use_struct_convention, hppa_frame_find_saved_regs)
- (hppa32_call_dummy_length, hppa64_call_dummy_length)
+ (hppa32_call_dummy_length, hppa64_call_dummy_length)
(find_dummy_frame_regs, FUNC_LDIL_OFFSET, FUNC_LDO_OFFSET)
- (find_proc_framesize, deposit_21, restore_pc_queue)
- (find_return_regnum, pc_in_interrupt_handler, deposit_14)
+ (find_proc_framesize, deposit_21, restore_pc_queue)
+ (find_return_regnum, pc_in_interrupt_handler, deposit_14)
(rp_saved, pc_in_linker_stub): Delete.
Unconditionally enable 64-bit frame and ABI code.
@@ -1066,8 +8128,8 @@
2004-03-04 Orjan Friberg <orjanf@axis.com>
* cris-tdep.c (cris_scan_prologue): Save the frame pointer's offset
- when the frame pointer is pushed. Don't set the frame pointer's
- address on the stack unless it's actually located there.
+ when the frame pointer is pushed. Don't set the frame pointer's
+ address on the stack unless it's actually located there.
Set the SRP's address on the stack correctly when the PC is still in
the prologue.
(cris_return_value): New function.
@@ -1233,7 +8295,7 @@
(cris_unwind_sp, cris_store_return_value, cris_extract_return_value)
(cris_reg_struct_has_addr): New functions.
(cris_examine, cris_frame_init_saved_regs, cris_frame_chain)
- (cris_frame_saved_pc, cris_saved_pc_after_call,
+ (cris_frame_saved_pc, cris_saved_pc_after_call,
(cris_store_struct_return, cris_frameless_function_invocation)
(cris_pop_frame, cris_skip_prologue_main)
(cris_abi_original_store_return_value)
@@ -1246,18 +8308,18 @@
(cris_push_return_address, cris_abi_update): Remove.
(_initialize_cris_tdep): Remove ABI command.
(cris_dump_tdep): Ditto.
- (cris_gdbarch_init): Remove ABI command.
+ (cris_gdbarch_init): Remove ABI command.
Set store_return_value, extract_return_value, push_dummy_code,
push_dummy_call, frame_align, unwind_pc, unwind_sp, unwind_dummy_id,
frame_unwind_append_sniffer, frame_base_set_default.
Clear deprecated init_frame_pc, push_arguments, store_return_value,
extract_return_value, fp_regnum, pc_in_call_dummy, call_dummy_words,
sizeof_call_dummy_words, get_saved_register, push_return_address,
- pop_frame, store_struct_return, frame_init_saved_regs,
+ pop_frame, store_struct_return, frame_init_saved_regs,
init_extra_frame_info, frameless_function_invocation, frame_chain,
frame_saved_pc, saved_pc_after_call, save_dummy_frame_tos,
dummy_write_sp.
-
+
2004-02-26 Jeff Johnston <jjohnstn@redhat.com>
* valprint.h (print_hex_chars, print_char_chars): New prototypes.
@@ -1329,7 +8391,7 @@
"x86-64-tdep.h".
* amd64obsd-nat.c: Include "amd64-tdep.h" instead of
"x86-64-tdep.h".
- * configure.host: (x86_64-*-linux*): Set gdb_target to linux64.
+ * configure.host: (x86_64-*-linux*): Set gdb_target to linux64.
* configure.tgt (x86_64-*-linux*): Set gdb_target to linux64.
* Makefile.in (amd64_linux_tdep_h): Renamed from
x86_64_linux_tdep_h.
@@ -3515,7 +10577,7 @@
variable `funcaddr'. Fix some coding-standards problems.
* sparc-tdep.c (sparc_regset_from_core_section): Check whether
- SECT_SIZE is large enough, not wheter it's exactly the right size.
+ SECT_SIZE is large enough, not whether it's exactly the right size.
(sparc32_gdbarch_init): Initialize TDEP->sizeof_gregset and
TDEP->fpregset to zero.
diff --git a/gdb/ChangeLog-2002 b/gdb/ChangeLog-2002
index ad2cfdaf1b1..e5c141940a1 100644
--- a/gdb/ChangeLog-2002
+++ b/gdb/ChangeLog-2002
@@ -14494,7 +14494,7 @@ Wed Apr 24 14:22:21 2002 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_register_virtual_type): Change type of
AltiVec register to new builtin type.
-2001-01-15 Daniel Jacobowitz <drow@mvista.com>
+2002-01-15 Daniel Jacobowitz <drow@mvista.com>
* stabsread.c (read_type): Pass dbx_lookup_type (typenums)
to make_cv_type.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 53b3a115903..e24a5773253 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -6,8 +6,8 @@
Jim Blandy jimb@redhat.com
Kevin Buettner kevinb@redhat.com
-Andrew Cagney ac131313@redhat.com
-J.T. Conklin jtc@redback.com
+Andrew Cagney cagney@gnu.org
+J.T. Conklin jtc@acorntoolworks.com
Fred Fish fnf@ninemoons.com
Daniel Jacobowitz dan@debian.org
Mark Kettenis kettenis@gnu.org
@@ -82,7 +82,7 @@ maintainer works with the native maintainer when resolving API issues.
frv --target=frv-elf ,-Werror
Maintenance only
- h8300 --target=h8300hms ,-Werror
+ h8300 --target=h8300hms broken
Maintenance only
h8500 Deleted.
@@ -104,9 +104,10 @@ maintainer works with the native maintainer when resolving API issues.
m68k --target=m68k-elf ,-Werror
Maintenance only
- m88k Deleted.
+ m88k --target=m88k-openbsd ,-Werror
+ Mark Kettenis kettenis@gnu.org
- mcore --target=mcore-elf ,-Werror
+ mcore --target=mcore-elf broken
Maintenance only
mips --target=mips-elf ,-Werror
@@ -114,13 +115,13 @@ maintainer works with the native maintainer when resolving API issues.
mn10200 Deleted.
- mn10300 --target=mn10300-elf ,-Werror
+ mn10300 --target=mn10300-elf broken
Maintenance only
- ns32k --target=ns32k-netbsd ,-Werror
+ ns32k --target=ns32k-netbsd broken
Maintenance only
- pa (--target=hppa-elf broken)
+ pa --target=hppa-elf ,-Werror
Maintenance only
powerpc --target=powerpc-eabi ,-Werror
@@ -130,6 +131,7 @@ maintainer works with the native maintainer when resolving API issues.
(contact DJ Barrow djbarrow@de.ibm.com)
sh --target=sh-elf ,-Werror
+ --target=sh64-elf broken
Elena Zannoni ezannoni@redhat.com
sparc --target=sparc-elf ,-Werror
@@ -137,7 +139,7 @@ maintainer works with the native maintainer when resolving API issues.
tic80 Deleted.
- v850 --target=v850-elf ,-Werror
+ v850 --target=v850-elf broken
Maintenance only
vax --target=vax-netbsd ,-Werror
@@ -148,7 +150,7 @@ maintainer works with the native maintainer when resolving API issues.
x86-64 --target=x86_64-linux-gnu ,-Werror
Maintenance only
- xstormy16 --target=xstormy16-elf ,-Werror
+ xstormy16 --target=xstormy16-elf broken
Corinna Vinschen vinschen@redhat.com
z8k Deleted.
@@ -179,11 +181,12 @@ their platform.
AIX Peter Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de
Kevin Buettner kevinb@redhat.com
+ Joel Brobecker brobecker@gnat.com
djgpp native Eli Zaretskii eliz@gnu.org
DJ Delorie dj@redhat.com
MS Windows (NT, '00, 9x, Me, XP) host & native
- Chris Faylor cgf@redhat.com
+ Chris Faylor cgf@alum.bu.edu
GNU/Linux/x86 native & host
Mark Kettenis kettenis@gnu.org
GNU/Linux PPC native Kevin Buettner kevinb@redhat.com
@@ -225,11 +228,11 @@ generic symtabs Jim Blandy jimb@redhat.com
coff reader Philippe De Muyter phdm@macqel.be
xcoff reader Any maintainer can modify this; please send tricky
ones to Kevin Buettner <kevinb@redhat.com>
- linespec Elena Zannoni ezannoni@redhat.com
HP/UX readers Any [past] maintainer can modify this.
Please send tricky ones to the symtabs maintainers.
tracing bytecode stuff Jim Blandy jimb@redhat.com
+ (Global Maintainers)
tracing Michael Snyder msnyder@redhat.com
threads Michael Snyder msnyder@redhat.com
Mark Kettenis kettenis@gnu.org
@@ -248,15 +251,17 @@ include/remote-sim.h, remote-sim.c
sds protocol (vacant)
rdi/adp protocol (vacant)
documentation Eli Zaretskii eliz@gnu.org
-testsuite (Global Maintainers)
- config Mark Salter msalter@redhat.com
+testsuite Michael Chastain mec.gnu@mindspring.com
+ (Global Maintainers)
+ lib/, config/, gdb.base/, ...
+ Michael Chastain mec.gnu@mindspring.com
+ (Global Maintainers)
gdbtk (gdb.gdbtk) Keith Seitz keiths@redhat.com
c++ (gdb.cp) Michael Chastain mec.gnu@mindspring.com
- David Carlton carlton@kealia.com
mi tests (gdb.mi) Elena Zannoni ezannoni@redhat.com
Andrew Cagney cagney@redhat.com
- stabs (gdb.stabs) Elena Zannoni ezannoni@redhat.com
threads (gdb.threads) Michael Snyder msnyder@redhat.com
+ Michael Chastain mec.gnu@mindspring.com
trace (gdb.trace) Michael Snyder msnyder@redhat.com
hp tests (gdb.hp) (vacant)
Java tests (gdb.java) Anthony Green green@redhat.com
@@ -312,15 +317,16 @@ Scott Bambrough scottb@netwinder.org
Jim Blandy jimb@redhat.com
Philip Blundell philb@gnu.org
Per Bothner per@bothner.com
-Joel Brobecker brobecker@act-europe.fr
+Joel Brobecker brobecker@gnat.com
Dave Brolley brolley@redhat.com
Paul Brook paul@codesourcery.com
Kevin Buettner kevinb@redhat.com
-Andrew Cagney ac131313@redhat.com
-David Carlton carlton@kealia.com
+Andrew Cagney cagney@gnu.org
+David Carlton carlton@bactrian.org
Stephane Carrez stcarrez@nerim.fr
Michael Chastain mec.gnu@mindspring.com
Eric Christopher echristo@redhat.com
+Randolph Chung tausq@debian.org
Nick Clifton nickc@redhat.com
Brendan Conoboy blc@redhat.com
DJ Delorie dj@redhat.com
@@ -331,14 +337,15 @@ Klee Dienes kdienes@apple.com
Richard Earnshaw rearnsha@arm.com
Frank Ch. Eigler fche@redhat.com
Ben Elliston bje@gnu.org
+Adam Fedor fedor@gnu.org
+Fred Fish fnf@ninemoons.com
+Brian Ford ford@vss.fsi.com
+Orjan Friberg orjanf@axis.com
+Paul Gilliam pgilliam@us.ibm.com
Raoul Gough RaoulGough@yahoo.co.uk
Anthony Green green@redhat.com
Matthew Green mrg@eterna.com.au
Jerome Guitton guitton@act-europe.fr
-Chris Faylor cgf@redhat.com
-Adam Fedor fedor@gnu.org
-Fred Fish fnf@ninemoons.com
-Orjan Friberg orjanf@axis.com
Ben Harris bjh21@netbsd.org
Richard Henderson rth@redhat.com
Aldy Hernandez aldyh@redhat.com
@@ -349,6 +356,7 @@ Jeff Holcomb jeffh@redhat.com
Don Howard dhoward@redhat.com
Martin Hunt hunt@redhat.com
Jim Ingham jingham@apple.com
+Manoj Iyer manjo@austin.ibm.com
Daniel Jacobowitz dan@debian.org
Andreas Jaeger aj@suse.de
Jeff Johnston jjohnstn@redhat.com
@@ -364,6 +372,7 @@ Michal Ludvig mludvig@suse.cz
Glen McCready gkm@redhat.com
Greg McGary greg@mcgary.org
Roland McGrath roland@redhat.com
+Bryce McKinlay mckinlay@redhat.com
Jason Merrill jason@redhat.com
David S. Miller davem@redhat.com
Mark Mitchell mark@codesourcery.com
@@ -372,6 +381,7 @@ Alan Modra amodra@bigpond.net.au
Jason Molenda jmolenda@apple.com
Pierre Muller muller@sources.redhat.com
Fernando Nasser fnasser@redhat.com
+Nathanael Nerode neroden@gcc.gnu.org
Hans-Peter Nilsson hp@bitrange.com
David O'Brien obrien@freebsd.org
Alexandre Oliva aoliva@redhat.com
@@ -403,6 +413,7 @@ D Venkatasubramanian dvenkat@noida.hcltech.com
Corinna Vinschen vinschen@redhat.com
Keith Walker keith.walker@arm.com
Kris Warkentin kewarken@qnx.com
+Ulrich Weigand uweigand@de.ibm.com
Nathan Williams nathanw@wasabisystems.com
Jim Wilson wilson@specifixinc.com
Elena Zannoni ezannoni@redhat.com
@@ -423,13 +434,15 @@ Frank Ch. Eigler (sim) fche at redhat dot com
Per Bothner (Java) per at bothner dot com
Anthony Green (Java) green at redhat dot com
Fernando Nasser (testsuite/, mi, cli) fnasser at redhat dot com
-Mark Salter (testsuite/lib/) msalter at redhat dot com
+Mark Salter (testsuite/lib+config) msalter at redhat dot com
Folks that have been caught up in a paper trail:
+Chris Faylor cgf@alum.bu.edu
Jim Kingdon jkingdon@engr.sgi.com
+David Carlton carlton@bactrian.org
--
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index feb2eae2312..327e1b926f2 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -29,6 +29,7 @@ libdir = @libdir@
tooldir = $(libdir)/$(target_alias)
datadir = @datadir@
+localedir = @localedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
@@ -65,6 +66,13 @@ DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
MIG = @MIG@
+XGETTEXT = @XGETTEXT@
+GMSGFMT = @GMSGFMT@
+MSGMERGE = msgmerge
+
+PACKAGE = @PACKAGE@
+CATALOGS = @CATALOGS@
+
# If you are compiling with GCC, make sure that either 1) You have the
# fixed include files where GCC can reach them, or 2) You use the
# -traditional flag. Otherwise the ioctl calls in inflow.c
@@ -306,7 +314,6 @@ CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
ENABLE_CFLAGS= @ENABLE_CFLAGS@
CONFIG_ALL= @CONFIG_ALL@
CONFIG_CLEAN= @CONFIG_CLEAN@
-CONFIG_CLEAN= @CONFIG_CLEAN@
CONFIG_INSTALL = @CONFIG_INSTALL@
CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
@@ -318,7 +325,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
# your system doesn't have fcntl.h in /usr/include (which is where it
# should be according to Posix).
DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS)
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
# from the config directory.
@@ -538,7 +545,8 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.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 \
+ stabsread.c stack.c std-regs.c symfile.c symfile-mem.c symmisc.c \
+ symtab.c \
target.c thread.c top.c tracepoint.c \
trad-frame.c \
tramp-frame.c \
@@ -560,7 +568,6 @@ aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h
getopt_h = $(INCLUDE_DIR)/getopt.h
floatformat_h = $(INCLUDE_DIR)/floatformat.h
bfd_h = $(BFD_DIR)/bfd.h
-callback_h = $(INCLUDE_DIR)/gdb/callback.h
coff_sym_h = $(INCLUDE_DIR)/coff/sym.h
coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h
coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h
@@ -582,12 +589,14 @@ readline_tilde_h = $(READLINE_SRC)/tilde.h
readline_history_h = $(READLINE_SRC)/history.h
frv_desc_h = $(OPCODES_SRC)/frv-desc.h
sh_opc_h = $(OPCODES_SRC)/sh-opc.h
+gdb_callback_h = $(INCLUDE_DIR)/gdb/callback.h
gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h
+gdb_sim_ppc_h = $(INCLUDE_DIR)/gdb/sim-ppc.h
gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
-hashtab_h = $(INCLUDE_DIR)/hashtab.h
+hashtab_h = $(INCLUDE_DIR)/hashtab.h
#
# $BUILD/ headers
@@ -599,6 +608,8 @@ exc_request_S_h = exc_request_S.h
msg_reply_S_h = msg_reply_S.h
msg_U_h = msg_U.h
notify_S_h = notify_S.h
+observer_h = observer.h
+observer_inc = observer.inc
process_reply_S_h = process_reply_S.h
#
@@ -613,7 +624,7 @@ nm_h = @nm_h@
# gdb/ headers
#
-ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
+ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) $(breakpoint_h)
alphabsd_tdep_h = alphabsd-tdep.h
alpha_tdep_h = alpha-tdep.h
amd64_nat_h = amd64-nat.h
@@ -628,6 +639,7 @@ bcache_h = bcache.h
bfd_target_h = bfd-target.h
block_h = block.h
breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h)
+bsd_kvm_h = bsd-kvm.h
buildsym_h = buildsym.h
call_cmds_h = call-cmds.h
charset_h = charset.h
@@ -672,6 +684,7 @@ gdb_h = gdb.h
gdb_locale_h = gdb_locale.h
gdb_obstack_h = gdb_obstack.h $(obstack_h)
gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
+gdb_ptrace_h = gdb_ptrace.h
gdb_regex_h = gdb_regex.h $(xregex_h)
gdb_stabs_h = gdb-stabs.h
gdb_stat_h = gdb_stat.h
@@ -690,9 +703,11 @@ i386_tdep_h = i386-tdep.h
i387_tdep_h = i387-tdep.h
ia64_tdep_h = ia64-tdep.h
infcall_h = infcall.h
+inf_child_h = inf-child.h
inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h)
inf_loop_h = inf-loop.h
inflow_h = inflow.h $(terminal_h)
+inf_ptrace_h = inf-ptrace.h
infttrace_h = infttrace.h
interps_h = interps.h
jv_lang_h = jv-lang.h
@@ -703,12 +718,12 @@ linespec_h = linespec.h
linux_nat_h = linux-nat.h $(target_h)
m2_lang_h = m2-lang.h
m68k_tdep_h = m68k-tdep.h
+m88k_tdep_h = m88k-tdep.h
macroexp_h = macroexp.h
macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
macrotab_h = macrotab.h
main_h = main.h
memattr_h = memattr.h
-minimon_h = minimon.h
mipsnbsd_tdep_h = mipsnbsd-tdep.h
mips_tdep_h = mips-tdep.h
monitor_h = monitor.h
@@ -717,13 +732,13 @@ ns32k_tdep_h = ns32k-tdep.h
nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h)
objc_lang_h = objc-lang.h
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
-observer_h = observer.h
ocd_h = ocd.h
osabi_h = osabi.h
pa64solib_h = pa64solib.h
parser_defs_h = parser-defs.h $(doublest_h)
p_lang_h = p-lang.h
ppcnbsd_tdep_h = ppcnbsd-tdep.h
+ppcobsd_tdep_h = ppcobsd-tdep.h
ppc_tdep_h = ppc-tdep.h
proc_utils_h = proc-utils.h
regcache_h = regcache.h
@@ -759,7 +774,7 @@ terminal_h = terminal.h
top_h = top.h
tracepoint_h = tracepoint.h
trad_frame_h = trad-frame.h $(frame_h)
-tramp_frame_h = tramp-frame.h
+tramp_frame_h = tramp-frame.h $(frame_h)
typeprint_h = typeprint.h
ui_file_h = ui-file.h
ui_out_h = ui-out.h
@@ -773,7 +788,6 @@ version_h = version.h
wince_stub_h = wince-stub.h
wrapper_h = wrapper.h $(gdb_h)
xcoffsolib_h = xcoffsolib.h
-xmodem_h = xmodem.h
#
# gdb/cli/ headers
@@ -827,7 +841,8 @@ HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
environ.h $(gdbcmd_h) gdb.h gdbcore.h \
gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
objfiles.h parser-defs.h serial.h solib.h \
- symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
+ symfile.h symfile-mem.h stabsread.h target.h terminal.h typeprint.h \
+ xcoffsolib.h \
macrotab.h macroexp.h macroscope.h \
c-lang.h f-lang.h \
jv-lang.h \
@@ -907,7 +922,7 @@ COMMON_OBS = $(DEPFILES) $(YYOBJ) \
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 regset.o \
trad-frame.o \
tramp-frame.o
@@ -952,6 +967,34 @@ check: force
$(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
else true; fi
+# The idea is to parallelize testing of multilibs, for example:
+# make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
+# will run 3 concurrent sessions of check, eventually testing all 10
+# combinations. GNU make is required for the % pattern to work, as is
+# a shell that expands alternations within braces. If GNU make is not
+# used, this rule will harmlessly fail to match.
+check//%: force
+ @if [ -f testsuite/config.status ]; then \
+ rootme=`pwd`; export rootme; \
+ rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
+ target=`echo "$@" | sed 's,//.*,,'`; \
+ variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
+ vardots=`echo "$$variant" | sed 's,/,.,g'`; \
+ testdir=testsuite.$$vardots; \
+ if [ ! -f $$testdir/Makefile ]; then \
+ (cd testsuite && find . -name config.status) | \
+ sed s,/config.status$$,, | sort | while read subdir; do \
+ $(SHELL) $(srcdir)/../mkinstalldirs $$testdir/$$subdir && \
+ (cd $$testdir/$$subdir && \
+ $(SHELL) $$rootme/testsuite/$$subdir/config.status \
+ --recheck && \
+ $(SHELL) ./config.status); done; \
+ else :; fi && cd $$testdir && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
+ "$$target"; \
+ else true; fi
+
info dvi install-info clean-info html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
@@ -1150,15 +1193,6 @@ gdb1$(EXEEXT): gdb$(EXEEXT)
rm -f gdb1$(EXEEXT)
cp gdb$(EXEEXT) gdb1$(EXEEXT)
-# FIXME. These are not generated by "make depend" because they only are there
-# for some machines.
-# But these rules don't do what we want; we want to hack the foo.o: tm.h
-# dependency to do the right thing.
-tm-sun3.h tm-altos.h: tm-m68k.h
-tm-sun2.h tm-3b1.h: tm-m68k.h
-xm-vaxult.h: xm-vax.h
-xm-vaxbsd.h: xm-vax.h
-
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine. (FIXME: those
# files go in twice; we should be removing them from the main list).
@@ -1168,7 +1202,7 @@ xm-vaxbsd.h: xm-vax.h
TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
@echo Making TAGS
- @etags $(srcdir)/$(TM_FILE) \
+ @etags $(srcdir)/$(DEPRECATED_TM_FILE) \
$(srcdir)/$(XM_FILE) \
$(srcdir)/$(NAT_FILE) \
`(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
@@ -1225,7 +1259,7 @@ do-maintainer-clean:
@$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \
subdir_do
-diststuff: $(DISTSTUFF)
+diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
cd doc; $(MAKE) $(MFLAGS) diststuff
subdir_do: force
@@ -1282,6 +1316,11 @@ version.c: Makefile version.in
mv version.c-tmp version.c
version.o: version.c $(version_h)
+observer.h: observer.sh doc/observer.texi
+ ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
+
+observer.inc: observer.sh doc/observer.texi
+ ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc
lint: $(LINTFILES)
$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
@@ -1316,16 +1355,20 @@ ALLDEPFILES = \
arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
armnbsd-nat.c armnbsd-tdep.c \
avr-tdep.c \
+ bsd-kvm.c \
coff-solib.c \
core-regset.c core-aout.c corelow.c \
- dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \
+ dcache.c exec.c fork-child.c \
glibc-tdep.c \
go32-nat.c h8300-tdep.c \
hppa-tdep.c hppa-hpux-tdep.c \
hppah-nat.c hpread.c \
+ hppa-linux-tdep.c hppa-linux-nat.c \
+ hppabsd-nat.c hppabsd-tdep.c \
i386-tdep.c i386v-nat.c i386-linux-nat.c \
i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \
i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
+ i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
i387-tdep.c \
i386-linux-tdep.c i386-nat.c \
i386gnu-nat.c i386gnu-tdep.c \
@@ -1335,17 +1378,19 @@ ALLDEPFILES = \
lynx-nat.c m3-nat.c \
m68hc11-tdep.c \
m68k-tdep.c \
+ m68kbsd-nat.c m68kbsd-tdep.c \
+ m88k-tdep.c m88kbsd-nat.c \
mcore-tdep.c \
mips-linux-nat.c mips-linux-tdep.c \
- mips-nat.c \
mips-irix-tdep.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c \
mipsnbsd-nat.c mipsnbsd-tdep.c \
nbsd-tdep.c \
ns32k-tdep.c solib-osf.c \
somread.c somsolib.c $(HPREAD_SOURCE) \
- ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
- ppcnbsd-nat.o ppcnbsd-tdep.o \
+ ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c \
+ ppcnbsd-nat.c ppcnbsd-tdep.c \
+ ppcobsd-nat.c ppcobsd-tdep.c \
procfs.c \
remote-e7000.c \
remote-hms.c remote-m32r-sdi.c remote-mips.c \
@@ -1363,9 +1408,8 @@ ALLDEPFILES = \
sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \
sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \
sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \
- sun3-nat.c \
symm-tdep.c symm-nat.c \
- vax-tdep.c \
+ vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \
win32-nat.c \
xcoffread.c xcoffsolib.c \
@@ -1421,11 +1465,79 @@ v850ice.o: $(srcdir)/v850ice.c
$(GDBTK_CFLAGS) \
$(srcdir)/v850ice.c
-# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with
-# -Wformat-nonliteral. It relies on local_hex_format et.al. and
-# that's a mess. It needs a serious overhaul.
-valprint.o: $(srcdir)/valprint.c
- $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c
+
+# Message files. Based on code in gcc/Makefile.in.
+
+# Rules for generating translated message descriptions. Disabled by
+# autoconf if the tools are not available.
+
+.SUFFIXES: .po .gmo .pox .pot
+.PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
+
+all-po: $(CATALOGS)
+
+# This notation should be acceptable to all Make implementations used
+# by people who are interested in updating .po files.
+update-po: $(CATALOGS:.gmo=.pox)
+
+# N.B. We do not attempt to copy these into $(srcdir). The snapshot
+# script does that.
+.po.gmo:
+ -test -d po || mkdir po
+ $(GMSGFMT) --statistics -o $@ $<
+
+# The new .po has to be gone over by hand, so we deposit it into
+# build/po with a different extension. If build/po/$(PACKAGE).pot
+# exists, use it (it was just created), else use the one in srcdir.
+.po.pox:
+ -test -d po || mkdir po
+ $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
+ then echo po/$(PACKAGE).pot; \
+ else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
+
+# This rule has to look for .gmo modules in both srcdir and the cwd,
+# and has to check that we actually have a catalog for each language,
+# in case they weren't built or included with the distribution.
+install-po:
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
+ cats="$(CATALOGS)"; for cat in $$cats; do \
+ lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+ if [ -f $$cat ]; then :; \
+ elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+ else continue; \
+ fi; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
+ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+ done
+uninstall-po:
+ cats="$(CATALOGS)"; for cat in $$cats; do \
+ lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+ if [ -f $$cat ]; then :; \
+ elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+ else continue; \
+ fi; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
+ done
+# Delete po/*.gmo only if we are not building in the source directory.
+clean-po:
+ -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
+
+# Rule for regenerating the message template (gdb.pot). Instead of
+# forcing everyone to edit POTFILES.in, which proved impractical, this
+# rule has no dependencies and always regenerates gdb.pot. This is
+# relatively harmless since the .po files do not directly depend on
+# it. The .pot file is left in the build directory. Since GDB's
+# Makefile lacks a cannonical list of sources (missing xm, tm and nm
+# files) force this rule.
+$(PACKAGE).pot: po/$(PACKAGE).pot
+po/$(PACKAGE).pot: force
+ -test -d po || mkdir po
+ sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
+
#
# YACC/LEX dependencies
@@ -1476,28 +1588,27 @@ valprint.o: $(srcdir)/valprint.c
abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
-ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \
- $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(frame_h) $(block_h) $(ada_lex_c)
-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) $(dictionary_h)
-ada-lex.o: ada-lex.c
-ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \
- $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \
- $(gregset_h) $(ada_lang_h)
+ada-exp.o: ada-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
+ $(parser_defs_h) $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(frame_h) $(block_h) $(ada_lex_c)
+ada-lang.o: ada-lang.c $(defs_h) $(gdb_string_h) $(demangle_h) \
+ $(gdb_regex_h) $(frame_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) $(hashtab_h) $(gdb_obstack_h) $(ada_lang_h) \
+ $(completer_h) $(gdb_stat_h) $(ui_out_h) $(block_h) $(infcall_h) \
+ $(dictionary_h)
+ada-lex.o: ada-lex.c $(gdb_string_h)
ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
$(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
$(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \
$(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h)
-ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \
- $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h)
+ada-valprint.o: ada-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
+ $(language_h) $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_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)
+ $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(ppc_tdep_h) \
+ $(gdb_string_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) $(alpha_tdep_h) \
@@ -1512,8 +1623,8 @@ alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_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)
alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \
- $(alphabsd_tdep_h) $(nbsd_tdep_h)
+ $(regcache_h) $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h) \
+ $(alphabsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
$(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h)
alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
@@ -1521,11 +1632,11 @@ alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
$(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \
$(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \
$(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \
- $(elf_bfd_h) $(alpha_tdep_h)
+ $(infcall_h) $(elf_bfd_h) $(alpha_tdep_h)
amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h)
amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h)
+ $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) $(bsd_kvm_h)
amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
$(amd64_tdep_h) $(solib_svr4_h)
@@ -1534,20 +1645,21 @@ amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
$(i386_linux_tdep_h) $(amd64_nat_h)
amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \
+ $(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
$(solib_svr4_h)
amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \
$(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(amd64_tdep_h)
amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \
$(amd64_nat_h)
amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \
+ $(gdbcore_h) $(osabi_h) $(symtab_h) $(gdb_assert_h) $(amd64_tdep_h) \
$(nbsd_tdep_h) $(solib_svr4_h)
-amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \
- $(amd64_nat_h)
+amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) $(bsd_kvm_h)
amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \
- $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
+ $(symtab_h) $(objfiles_h) $(osabi_h) $(regset_h) $(target_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(amd64_tdep_h) $(i387_tdep_h) \
+ $(solib_svr4_h)
amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \
$(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
$(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
@@ -1557,7 +1669,7 @@ annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
$(gdbtypes_h) $(breakpoint_h)
arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \
$(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \
- $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \
+ $(gdb_assert_h) $(sim_regno_h) $(gdbcore_h) $(osabi_h) $(version_h) \
$(floatformat_h)
arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h)
@@ -1567,8 +1679,8 @@ arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
$(glibc_tdep_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
$(regcache_h) $(gdbcore_h)
-armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \
- $(nbsd_tdep_h) $(solib_svr4_h)
+armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
+ $(arm_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
$(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
@@ -1602,12 +1714,15 @@ breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
$(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
$(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \
$(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \
- $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \
- $(gdb_events_h)
+ $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) $(solist_h) \
+ $(observer_h) $(gdb_events_h)
+bsd-kvm.o: bsd-kvm.c $(defs_h) $(cli_cmds_h) $(command_h) $(frame_h) \
+ $(regcache_h) $(target_h) $(value_h) $(gdbcore_h) $(gdb_assert_h) \
+ $(readline_h) $(bsd_kvm_h)
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) $(block_h) \
+ $(complaints_h) $(gdb_string_h) $(expression_h) $(bcache_h) \
+ $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \
$(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h)
c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
$(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \
@@ -1643,7 +1758,7 @@ corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \
$(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \
- $(exec_h) $(readline_h) $(gdb_assert_h)
+ $(exec_h) $(readline_h) $(observer_h) $(gdb_assert_h)
core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
$(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h)
cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \
@@ -1685,11 +1800,10 @@ dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
$(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \
$(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
- $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \
- $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h)
+ $(gdb_stabs_h) $(demangle_h) $(complaints_h) $(cp_abi_h) \
+ $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h)
dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \
$(gdbcore_h) $(target_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) \
@@ -1700,12 +1814,11 @@ disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \
$(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h)
doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
$(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
-dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \
$(gdb_string_h)
dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
$(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \
- $(command_h) $(gdbcmd_h)
+ $(command_h) $(gdbcmd_h) $(gdb_string_h)
dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \
$(mips_tdep_h)
@@ -1723,8 +1836,8 @@ dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
$(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
$(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
$(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \
- $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \
- $(splay_tree_h) $(hashtab_h) $(command_h) $(gdbcmd_h)
+ $(cp_support_h) $(hashtab_h) $(gdb_string_h) $(gdb_assert_h) \
+ $(splay_tree_h) $(command_h) $(gdbcmd_h)
dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \
$(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \
$(language_h) $(complaints_h) $(gdb_string_h)
@@ -1748,8 +1861,8 @@ exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
$(gdb_string_h) $(block_h)
-fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(gdb_string_h) $(elf_bfd_h) $(gregset_h)
+fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) \
+ $(regset_h) $(gdb_assert_h) $(gdb_string_h) $(elf_bfd_h)
f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
$(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(block_h)
@@ -1769,16 +1882,17 @@ frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
$(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \
$(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \
$(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \
- $(command_h) $(gdbcmd_h)
+ $(command_h) $(gdbcmd_h) $(observer_h) $(objfiles_h)
frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(gdb_assert_h) $(dummy_frame_h) $(gdb_obstack_h)
frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(target_h) $(frame_h) \
- $(osabi_h) $(elf_bfd_h) $(elf_frv_h) $(frv_tdep_h)
+ $(osabi_h) $(elf_bfd_h) $(elf_frv_h) $(frv_tdep_h) $(trad_frame_h) \
+ $(frame_unwind_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \
$(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) \
- $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(frv_tdep_h)
+ $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(infcall_h) $(frv_tdep_h)
f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
$(f_lang_h) $(gdb_string_h)
@@ -1817,43 +1931,49 @@ h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \
$(gdb_assert_h) $(dis_asm_h)
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
+hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(hppa_tdep_h)
+hppabsd-tdep.o: hppabsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
+ $(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(hppa_tdep_h) $(solib_svr4_h)
hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(gdb_wait_h) $(regcache_h) $(gdb_string_h)
+ $(gdb_wait_h) $(regcache_h) $(gdb_string_h) $(infttrace_h) \
+ $(hppa_tdep_h)
hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(osabi_h) $(gdb_string_h) $(frame_h)
-hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
- $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \
- $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \
- $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \
- $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \
+ $(osabi_h) $(gdb_string_h) $(frame_h) $(frame_unwind_h) \
+ $(trad_frame_h) $(symtab_h) $(objfiles_h) $(inferior_h) $(infcall_h) \
+ $(observer_h) $(hppa_tdep_h)
+hppa-linux-nat.o: hppa-linux-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(gdb_string_h) $(inferior_h) $(hppa_tdep_h) $(gregset_h)
+hppa-linux-tdep.o: hppa-linux-tdep.c $(defs_h) $(gdbcore_h) $(osabi_h) \
+ $(target_h) $(objfiles_h) $(solib_svr4_h) $(glibc_tdep_h) \
+ $(frame_unwind_h) $(trad_frame_h) $(dwarf2_frame_h) $(value_h) \
+ $(hppa_tdep_h) $(elf_common_h)
+hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd_h) $(inferior_h) $(regcache_h) \
+ $(completer_h) $(osabi_h) $(gdb_assert_h) $(arch_utils_h) \
+ $(symtab_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \
+ $(frame_base_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \
$(hppa_tdep_h)
hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
$(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
- $(somsolib_h) $(gdb_assert_h) $(gdb_string_h)
+ $(somsolib_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h)
hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
$(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h)
i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h)
+ $(gdb_assert_h) $(i386_tdep_h) $(i387_tdep_h)
i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h)
i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
$(i386_tdep_h)
i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(i386_tdep_h)
+ $(i386_tdep_h) $(bsd_kvm_h)
i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
$(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
$(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
$(i387_tdep_h) $(gregset_h)
i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h)
-i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \
- $(gdbcore_h) $(gregset_h) $(regcache_h)
-i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \
- $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
- $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \
- $(regcache_h)
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
$(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
@@ -1865,18 +1985,22 @@ i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h)
i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
-i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \
- $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+i386nbsd-nat.o: i386nbsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(i386_tdep_h) $(bsd_kvm_h)
+i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+ $(gdbcore_h) $(regcache_h) $(regset_h) $(osabi_h) $(symtab_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) \
+ $(nbsd_tdep_h) $(solib_svr4_h)
i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \
$(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \
$(nto_tdep_h) $(osabi_h) $(i387_tdep_h)
i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h)
-i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \
- $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
+i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+ $(gdbcore_h) $(regcache_h) $(regset_h) $(symtab_h) $(objfiles_h) \
+ $(osabi_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
- $(i386_tdep_h)
+ $(gdb_string_h) $(i386_tdep_h) $(solib_svr4_h)
i386-stub.o: i386-stub.c
i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
$(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
@@ -1905,11 +2029,14 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \
$(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \
- $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \
+ $(elf_bfd_h) $(dis_asm_h) $(infcall_h) $(ia64_tdep_h) $(elf_ia64_h) \
$(libunwind_frame_h) $(libunwind_ia64_h)
infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
$(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
- $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h)
+ $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) \
+ $(dummy_frame_h)
+inf-child.o: inf-child.c $(defs_h) $(regcache_h) $(memattr_h) $(symtab_h) \
+ $(target_h) $(inferior_h)
infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \
$(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \
@@ -1921,19 +2048,23 @@ inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \
$(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \
$(inflow_h)
-infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \
- $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h)
+inf-ptrace.o: inf-ptrace.c $(defs_h) $(observer_h) $(gdb_ptrace_h) \
+ $(inflow_h) $(inferior_h) $(regcache_h) $(command_h) $(gdbcore_h) \
+ $(inf_child_h) $(gdbcmd_h)
+infptrace.o: infptrace.c $(defs_h) $(command_h) $(frame_h) $(gdbcore_h) \
+ $(inferior_h) $(regcache_h) $(target_h) $(gdb_assert_h) \
+ $(gdb_wait_h) $(gdb_string_h) $(gdb_dirent_h) $(gdb_ptrace_h)
infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
$(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \
$(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \
$(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \
$(observer_h) $(language_h) $(gdb_assert_h)
inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h)
+ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(observer_h) $(gdb_wait_h) \
+ $(inflow_h)
infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \
- $(gdbcore_h)
+ $(infttrace_h) $(gdbcore_h)
interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
$(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \
$(gdb_events_h) $(gdb_assert_h) $(top_h)
@@ -2001,6 +2132,11 @@ m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \
$(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \
$(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h)
+m68kbsd-nat.o: m68kbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(regcache_h) $(gdb_assert_h) $(m68k_tdep_h) $(bsd_kvm_h)
+m68kbsd-tdep.o: m68kbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
+ $(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(m68k_tdep_h) $(solib_svr4_h)
m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
$(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \
$(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \
@@ -2008,16 +2144,19 @@ m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \
$(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \
$(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \
- $(m68k_tdep_h)
-m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h)
-m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
+ $(m68k_tdep_h) $(trad_frame_h) $(frame_unwind_h)
m68k-stub.o: m68k-stub.c
m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \
- $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \
- $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \
- $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \
- $(gregset_h)
+ $(frame_base_h) $(frame_unwind_h) $(floatformat_h) $(symtab_h) \
+ $(gdbcore_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
+ $(inferior_h) $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) \
+ $(m68k_tdep_h) $(gregset_h)
+m88kbsd-nat.o: m88kbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(m88k_tdep_h)
+m88k-tdep.o: m88k-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) $(frame_h) \
+ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
+ $(regcache_h) $(regset_h) $(symtab_h) $(trad_frame_h) $(value_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(m88k_tdep_h)
macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
$(command_h) $(gdbcmd_h)
macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
@@ -2043,7 +2182,7 @@ mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(complaints_h) $(demangle_h) $(gdb_assert_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)
+ $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h)
memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \
$(target_h) $(value_h) $(language_h) $(gdb_string_h)
mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
@@ -2055,7 +2194,6 @@ mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h)
mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
$(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \
$(gdb_assert_h) $(frame_h) $(trad_frame_h) $(tramp_frame_h)
-mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(mipsnbsd_tdep_h)
mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
@@ -2071,7 +2209,8 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
$(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
$(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h)
+ $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(infcall_h) \
+ $(floatformat_h)
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
@@ -2111,7 +2250,8 @@ objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \
$(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \
$(breakpoint_h) $(block_h) $(dictionary_h)
-observer.o: observer.c $(defs_h) $(observer_h)
+observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \
+ $(observer_inc)
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) \
$(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
@@ -2120,7 +2260,7 @@ osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
$(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
$(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
- $(regcache_h) $(exec_h)
+ $(regcache_h) $(exec_h) $(hppa_tdep_h)
parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
$(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
@@ -2134,24 +2274,31 @@ p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
$(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \
- $(regcache_h)
+ $(regcache_h) $(gdb_assert_h)
ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h)
ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \
- $(ppc_tdep_h)
+ $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_assert_h) \
+ $(gdb_wait_h) $(gregset_h) $(ppc_tdep_h)
ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
$(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(regset_h) \
$(solib_svr4_h) $(ppc_tdep_h) $(trad_frame_h) $(frame_unwind_h)
-ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
- $(ppcnbsd_tdep_h)
+ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) \
+ $(gdbcore_h) $(regcache_h) $(bsd_kvm_h) $(ppc_tdep_h) \
+ $(ppcnbsd_tdep_h) $(inf_ptrace_h)
ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \
- $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+ $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(tramp_frame_h) $(trad_frame_h) \
+ $(gdb_assert_h) $(solib_svr4_h)
+ppcobsd-nat.o: ppcobsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(ppc_tdep_h) $(ppcobsd_tdep_h)
+ppcobsd-tdep.o: ppcobsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
+ $(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(ppc_tdep_h) $(ppcobsd_tdep_h) $(solib_svr4_h)
ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
- $(ppc_tdep_h) $(target_h) $(objfiles_h)
+ $(ppc_tdep_h) $(target_h) $(objfiles_h) $(infcall_h)
printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
$(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
$(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
@@ -2177,9 +2324,10 @@ p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
$(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
$(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
- $(gdb_string_h) $(gdbcmd_h)
+ $(gdb_string_h) $(gdbcmd_h) $(observer_h)
reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
$(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h)
+regset.o: regset.c $(defs_h) $(regset_h) $(gdb_assert_h)
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) \
@@ -2242,15 +2390,16 @@ 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) \
$(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \
- $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \
- $(ppc_tdep_h) $(exec_h) $(gdb_stat_h)
+ $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(ppc_tdep_h) $(exec_h) \
+ $(gdb_stat_h)
rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \
- $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \
- $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \
- $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \
- $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \
- $(frame_base_h)
+ $(regcache_h) $(regset_h) $(doublest_h) $(value_h) $(parser_defs_h) \
+ $(osabi_h) $(infcall_h) $(sim_regno_h) $(gdb_sim_ppc_h) \
+ $(reggroups_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
+ $(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
+ $(ppc_tdep_h) $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) \
+ $(frame_unwind_h) $(frame_base_h)
s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \
$(s390_tdep_h)
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
@@ -2305,7 +2454,8 @@ solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
$(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
- $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h)
+ $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(observer_h) \
+ $(readline_h)
solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \
$(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \
$(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h)
@@ -2330,7 +2480,7 @@ somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \
$(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
$(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
- $(regcache_h) $(gdb_assert_h) $(exec_h)
+ $(regcache_h) $(gdb_assert_h) $(exec_h) $(hppa_tdep_h)
source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
$(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
$(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
@@ -2348,8 +2498,8 @@ sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \
$(solib_svr4_h) $(sparc64_tdep_h)
sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \
$(sparc_nat_h)
-sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \
- $(sparc_nat_h)
+sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(regcache_h) \
+ $(sparc64_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \
$(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
$(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \
@@ -2359,7 +2509,7 @@ sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \
$(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h)
sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \
$(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \
- $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h)
+ $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(solib_svr4_h)
sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \
$(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \
@@ -2372,20 +2522,21 @@ sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \
sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \
$(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \
$(sparc_nat_h)
-sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h)
+sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(sparc_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \
$(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
$(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \
$(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h)
sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \
$(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \
- $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h)
+ $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h)
sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \
$(sparc_tdep_h) $(sparc64_tdep_h)
sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
$(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(sparc_tdep_h)
+ $(sparc_tdep_h) $(solib_svr4_h)
sparc-stub.o: sparc-stub.c
sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
$(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
@@ -2402,12 +2553,9 @@ stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_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) $(reggroups_h) $(regcache_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) $(user_regs_h) $(frame_h) $(gdbtypes_h) \
$(value_h) $(gdb_string_h)
stop-gdb.o: stop-gdb.c $(defs_h)
-sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \
$(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \
@@ -2415,6 +2563,8 @@ symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \
$(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \
$(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
$(gdb_string_h) $(gdb_stat_h)
+symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
+ $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_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) $(block_h) $(gdb_regex_h) \
@@ -2451,7 +2601,7 @@ trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \
$(regcache_h)
tramp-frame.o: tramp-frame.c $(defs_h) $(tramp_frame_h) $(frame_unwind_h) \
$(gdbcore_h) $(symtab_h) $(objfiles_h) $(target_h) $(trad_frame_h) \
- $(frame_base_h)
+ $(frame_base_h) $(gdb_assert_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) $(typeprint_h) \
@@ -2464,7 +2614,7 @@ user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \
utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
$(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \
$(expression_h) $(language_h) $(charset_h) $(annotate_h) \
- $(filenames_h) $(inferior_h) $(readline_h)
+ $(filenames_h) $(symfile_h) $(inferior_h) $(readline_h)
uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
$(regcache_h) $(gregset_h)
v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
@@ -2480,7 +2630,7 @@ 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) $(block_h) $(infcall_h) \
$(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \
- $(cp_support_h)
+ $(cp_support_h) $(observer_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)
@@ -2490,9 +2640,15 @@ values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(gdb_assert_h) $(regcache_h) $(block_h)
varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
$(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
-vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
- $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \
- $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h)
+vaxbsd-nat.o: vaxbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(vax_tdep_h) $(bsd_kvm_h)
+vax-nat.o: vax-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) $(vax_tdep_h)
+vaxnbsd-tdep.o: vaxnbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
+ $(vax_tdep_h) $(solib_svr4_h) $(gdb_string_h)
+vax-tdep.o: vax-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) $(frame_h) \
+ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
+ $(osabi_h) $(regcache_h) $(regset_h) $(trad_frame_h) $(value_h) \
+ $(gdb_string_h) $(vax_tdep_h)
win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \
$(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
@@ -2510,7 +2666,6 @@ xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
$(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h)
xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \
$(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
-xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h)
xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
$(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \
$(dis_asm_h)
@@ -2723,7 +2878,7 @@ mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
$(gdb_stat_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
- $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h)
+ $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) $(objfiles_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
$(gdb_string_h)
@@ -2815,20 +2970,20 @@ tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \
$(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \
$(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \
- $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \
- $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \
+ $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(tui_h) \
+ $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \
$(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \
- $(tui_winsource_h) $(gdb_curses_h)
+ $(tui_winsource_h) $(gdb_curses_h) $(readline_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
$(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
$(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \
- $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \
- $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \
+ $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
+ $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \
$(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \
- $(gdb_curses_h)
+ $(gdb_curses_h) $(readline_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c
tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \
$(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \
diff --git a/gdb/NEWS b/gdb/NEWS
index 5d4ef067185..c4f451aa181 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -1,7 +1,181 @@
What has changed in GDB?
(Organized release by release)
-*** Changes since GDB 6.1:
+*** Changes since GDB 6.2:
+
+*** Changes in GDB 6.2.1:
+
+* MIPS `break main; run' gave an heuristic-fence-post warning
+
+When attempting to run even a simple program, a warning about
+heuristic-fence-post being hit would be reported. This problem has
+been fixed.
+
+* MIPS IRIX 'long double' crashed GDB
+
+When examining a long double variable, GDB would get a segmentation
+fault. The crash has been fixed (but GDB 6.2 cannot correctly examine
+IRIX long double values).
+
+* VAX and "next"
+
+A bug in the VAX stack code was causing problems with the "next"
+command. This problem has been fixed.
+
+*** Changes in GDB 6.2:
+
+* Fix for ``many threads''
+
+On GNU/Linux systems that use the NPTL threads library, a program
+rapidly creating and deleting threads would confuse GDB leading to the
+error message:
+
+ ptrace: No such process.
+ thread_db_get_info: cannot get thread info: generic error
+
+This problem has been fixed.
+
+* "-async" and "-noasync" options removed.
+
+Support for the broken "-noasync" option has been removed (it caused
+GDB to dump core).
+
+* New ``start'' command.
+
+This command runs the program until the begining of the main procedure.
+
+* New BSD Kernel Data Access Library (libkvm) interface
+
+Using ``target kvm'' it is now possible to debug kernel core dumps and
+live kernel memory images on various FreeBSD, NetBSD and OpenBSD
+platforms. Currently supported (native-only) configurations are:
+
+FreeBSD/amd64 x86_64-*-freebsd*
+FreeBSD/i386 i?86-*-freebsd*
+NetBSD/i386 i?86-*-netbsd*
+NetBSD/m68k m68*-*-netbsd*
+NetBSD/sparc sparc-*-netbsd*
+OpenBSD/amd64 x86_64-*-openbsd*
+OpenBSD/i386 i?86-*-openbsd*
+OpenBSD/m68k m68*-openbsd*
+OpenBSD/sparc sparc-*-openbsd*
+
+* Signal trampoline code overhauled
+
+Many generic problems with GDB's signal handling code have been fixed.
+These include: backtraces through non-contiguous stacks; recognition
+of sa_sigaction signal trampolines; backtrace from a NULL pointer
+call; backtrace through a signal trampoline; step into and out of
+signal handlers; and single-stepping in the signal trampoline.
+
+Please note that kernel bugs are a limiting factor here. These
+features have been shown to work on an s390 GNU/Linux system that
+include a 2.6.8-rc1 kernel. Ref PR breakpoints/1702.
+
+* Cygwin support for DWARF 2 added.
+
+* New native configurations
+
+GNU/Linux/hppa hppa*-*-linux*
+OpenBSD/hppa hppa*-*-openbsd*
+OpenBSD/m68k m68*-*-openbsd*
+OpenBSD/m88k m88*-*-openbsd*
+OpenBSD/powerpc powerpc-*-openbsd*
+NetBSD/vax vax-*-netbsd*
+OpenBSD/vax vax-*-openbsd*
+
+* END-OF-LIFE frame compatibility module
+
+GDB's internal frame infrastructure has been completely rewritten.
+The new infrastructure making it possible to support key new features
+including DWARF 2 Call Frame Information. To aid in the task of
+migrating old configurations to this new infrastructure, a
+compatibility module, that allowed old configurations to continue to
+work, was also included.
+
+GDB 6.2 will be the last release to include this frame compatibility
+module. This change directly impacts the following configurations:
+
+h8300-*-*
+mcore-*-*
+mn10300-*-*
+ns32k-*-*
+sh64-*-*
+v850-*-*
+xstormy16-*-*
+
+Unless there is activity to revive these configurations, they will be
+made OBSOLETE in GDB 6.3, and REMOVED from GDB 6.4.
+
+* REMOVED configurations and files
+
+Sun 3, running SunOS 3 m68*-*-sunos3*
+Sun 3, running SunOS 4 m68*-*-sunos4*
+Sun 2, running SunOS 3 m68000-*-sunos3*
+Sun 2, running SunOS 4 m68000-*-sunos4*
+Motorola 680x0 running LynxOS m68*-*-lynxos*
+AT&T 3b1/Unix pc m68*-att-*
+Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
+decstation mips-dec-* mips-little-*
+riscos mips-*-riscos* mips-*-sysv*
+sonymips mips-sony-*
+sysv mips*-*-sysv4* (IRIX 5/6 not included)
+
+*** Changes in GDB 6.1.1:
+
+* TUI (Text-mode User Interface) built-in (also included in GDB 6.1)
+
+The TUI (Text-mode User Interface) is now built as part of a default
+GDB configuration. It is enabled by either selecting the TUI with the
+command line option "-i=tui" or by running the separate "gdbtui"
+program. For more information on the TUI, see the manual "Debugging
+with GDB".
+
+* Pending breakpoint support (also included in GDB 6.1)
+
+Support has been added to allow you to specify breakpoints in shared
+libraries that have not yet been loaded. If a breakpoint location
+cannot be found, and the "breakpoint pending" option is set to auto,
+GDB queries you if you wish to make the breakpoint pending on a future
+shared-library load. If and when GDB resolves the breakpoint symbol,
+the pending breakpoint is removed as one or more regular breakpoints
+are created.
+
+Pending breakpoints are very useful for GCJ Java debugging.
+
+* Fixed ISO-C build problems
+
+The files bfd/elf-bfd.h, gdb/dictionary.c and gdb/types.c contained
+non ISO-C code that stopped them being built using a more strict ISO-C
+compiler (e.g., IBM's C compiler).
+
+* Fixed build problem on IRIX 5
+
+Due to header problems with <sys/proc.h>, the file gdb/proc-api.c
+wasn't able to compile compile on an IRIX 5 system.
+
+* Added execute permission to gdb/gdbserver/configure
+
+The shell script gdb/testsuite/gdb.stabs/configure lacked execute
+permission. This bug would cause configure to fail on a number of
+systems (Solaris, IRIX). Ref: server/519.
+
+* Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
+
+Older HPUX ANSI C compilers did not accept variable array sizes. somsolib.c
+has been updated to use constant array sizes.
+
+* Fixed a panic in the DWARF Call Frame Info code on Solaris 2.7
+
+GCC 3.3.2, on Solaris 2.7, includes the DW_EH_PE_funcrel encoding in
+its generated DWARF Call Frame Info. This encoding was causing GDB to
+panic, that panic has been fixed. Ref: gdb/1628.
+
+* Fixed a problem when examining parameters in shared library code.
+
+When examining parameters in optimized shared library code generated
+by a mainline GCC, GDB would incorrectly report ``Variable "..." is
+not available''. GDB now correctly displays the variable's value.
*** Changes in GDB 6.1:
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index 0a5a1cd3df6..d1cc2b73fba 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -1,9 +1,53 @@
- Known problems in GDB 6.1
+ Known problems in GDB 6.2
See also: http://www.gnu.org/software/gdb/bugs/
+*** Build problems
+
+build/1411: build fails on hpux 10.20 and hpux 11.00 with CMA threads
+
+GDB does not build on HP/UX 10.20 or HP/UX 11.00 if the CMA
+thread package is installed. The compile error is:
+
+ ../../gdb/hpux-thread.c:222: variable-size type declared outside of any function
+
+This happens only if the CMA thread package is installed.
+
+As a workaround, you can disable support for CMA threads
+by editing the file gdb/configure. Find the line:
+
+ if test -f /usr/include/dce/cma_config.h ; then
+
+And replace it with:
+
+ if false ; then
+
+build/1458: compile failed on hpux11
+
+GDB has build problems on HP/UX 11 with some versions of the HP
+Ansi C compiler. (GCC works fine).
+
+The problem happens when compiling intl/bindtextdom.c.
+The error is:
+
+ cc: "gettextP.h", line 50: error 1000: Unexpected symbol: "SWAP".
+ cc: panic 2017: Cannot recover from earlier errors, terminating.
+ *** Error exit code 1
+
+This is a problem with the 'inline' keyword in gettextP.h.
+The workaround is to disable 'inline' before building gdb:
+
+ export ac_cv_c_inline=no
+
+This problem happens only with some versions of the HP Ansi C compiler.
+Versions A.11.01.25171.GP and B.11.11.28706.GP have both been observed
+to work; version B.11.11.04 gets the build error and needs the
+workaround.
+
+This problem might also happen with other C compilers.
+
*** Misc
gdb/1560: Control-C does not always interrupt GDB.
@@ -68,6 +112,19 @@ implement virtual base classes. gcc 2.x generated just one object code
function with a hidden parameter, but gcc 3.x conforms to a multi-vendor
ABI for C++ which requires multiple object code functions.
+*** Signal handlers
+
+On many systems an attempt to single-step a system-call instruction
+results in two or more instructions being executed (the system-call,
+and one or more instructions following).
+
+When attempting to single-step through a signal trampoline, this
+problem may result the program unintentionally running to completion,
+or re-execute the faulting instruction, or even corrupting the program
+counter.
+
+Ref: PR breakpoints/1702.
+
*** Stack backtraces
GDB's core code base has been updated to use a new backtrace
@@ -83,23 +140,13 @@ When backtracing a thread, gdb does not stop when it reaches the
outermost frame, instead continuing until it hits garbage. This is
sensitive to the operating system and thread library.
-hppa*-*-*
-mips*-*-*
-
-The MIPS and HPPA backtrace code has only very recently been updated
-to use GDB's new frame mechanism. At present there are still a few
-problems, in particular backtraces through signal handlers do not
-work.
-
-People encountering problems with these architectures should consult
-GDB's web pages and mailing lists (http://www.gnu.org/software/gdb/)
-to see if there are updates.
+*** Threads
-powerpc*-*-*
+threads/1650: manythreads.exp
-PowerPC architecture support, in 6.1, does not use the new frame code.
+On GNU/Linux systems that use the old LinuxThreads thread library, a
+program rapidly creating and deleting threads can confuse GDB leading
+to an internal error.
-Fortunately, PowerPC architecture support, in GDB's mainline sources,
-have been updated. People encountering problems should consider
-downloading a more current snapshot of GDB
-(http://www.gnu.org/software/gdb/current/).
+This problem does not occur on newer systems that use the NPTL
+library, and did not occur with GDB 6.1.
diff --git a/gdb/README b/gdb/README
index 9a7cc05404c..915301f7da9 100644
--- a/gdb/README
+++ b/gdb/README
@@ -1,5 +1,5 @@
- README for gdb-6.1 release
- Updated 29 February, 2004 by Andrew Cagney
+ README for gdb-6.2 release
+ Updated 17 July, 2004 by Andrew Cagney
This is GDB, the GNU source-level debugger.
@@ -20,7 +20,7 @@ Unpacking and Installation -- quick overview
In this release, the GDB debugger sources, the generic GNU include
files, the BFD ("binary file description") library, the readline
library, and other libraries all have directories of their own
-underneath the gdb-6.1 directory. The idea is that a variety of GNU
+underneath the gdb-6.2 directory. The idea is that a variety of GNU
tools can share a common copy of these things. Be aware of variation
over time--for example don't try to build gdb with a copy of bfd from
a release other than the gdb release (such as a binutils release),
@@ -29,8 +29,8 @@ Configuration scripts and makefiles exist to cruise up and down this
directory tree and automatically build all the pieces in the right
order.
- When you unpack the gdb-6.1.tar.gz file, you'll find a directory
-called `gdb-6.1', which contains:
+ When you unpack the gdb-6.2.tar.gz file, you'll find a directory
+called `gdb-6.2', which contains:
COPYING config.sub intl missing opcodes
COPYING.LIB configure libiberty mkinstalldirs readline
@@ -44,7 +44,7 @@ called `gdb-6.1', which contains:
You can build GDB right in the source directory:
- cd gdb-6.1
+ cd gdb-6.2
./configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
@@ -58,25 +58,25 @@ You can build GDB in any empty build directory:
mkdir build
cd build
- <full path to your sources>/gdb-6.1/configure
+ <full path to your sources>/gdb-6.2/configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
(Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
-different; see the file gdb-6.1/gdb/config/djgpp/README for details.)
+different; see the file gdb-6.2/gdb/config/djgpp/README for details.)
This will configure and build all the libraries as well as GDB. If
`configure' can't determine your system type, specify one as its
argument, e.g., `./configure sun4' or `./configure decstation'.
- Make sure that your 'configure' line ends in 'gdb-6.1/configure':
+ Make sure that your 'configure' line ends in 'gdb-6.2/configure':
- /berman/migchain/source/gdb-6.1/configure # RIGHT
- /berman/migchain/source/gdb-6.1/gdb/configure # WRONG
+ /berman/migchain/source/gdb-6.2/configure # RIGHT
+ /berman/migchain/source/gdb-6.2/gdb/configure # WRONG
The gdb package contains several subdirectories, such as 'gdb',
'bfd', and 'readline'. If your 'configure' line ends in
-'gdb-6.1/gdb/configure', then you are configuring only the gdb
+'gdb-6.2/gdb/configure', then you are configuring only the gdb
subdirectory, not the whole gdb package. This leads to build errors
such as:
@@ -107,7 +107,7 @@ documentation and TeX (or `texi2roff') to typeset the printed version.
GDB includes an already formatted copy of the on-line Info version
of this manual in the `gdb/doc' subdirectory. The main Info file is
-`gdb-6.1/gdb/doc/gdb.info', and it refers to subordinate files
+`gdb-6.2/gdb/doc/gdb.info', and it refers to subordinate files
matching `gdb.info*' in the same directory. If necessary, you can
print out these files, or read them with any editor; but they are
easier to read using the `info' subsystem in GNU Emacs or the
@@ -119,7 +119,7 @@ Info formatting programs, such as `texinfo-format-buffer' or
`makeinfo'.
If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-6.1', in the case of version 6.1), you can make
+source directory (`gdb-6.2', in the case of version 6.2), you can make
the Info file by typing:
cd gdb/doc
@@ -128,7 +128,7 @@ the Info file by typing:
If you want to typeset and print copies of this manual, you need
TeX, a program to print its DVI output files, and `texinfo.tex', the
Texinfo definitions file. This file is included in the GDB
-distribution, in the directory `gdb-6.1/texinfo'.
+distribution, in the directory `gdb-6.2/texinfo'.
TeX is a typesetting program; it does not print files directly, but
produces output files called DVI files. To print a typeset document,
@@ -142,11 +142,11 @@ without any extension or a `.dvi' extension.
This file tells TeX how to typeset a document written in Texinfo
format. On its own, TeX cannot read, much less typeset a Texinfo file.
`texinfo.tex' is distributed with GDB and is located in the
-`gdb-6.1/texinfo' directory.
+`gdb-6.2/texinfo' directory.
If you have TeX and a DVI printer program installed, you can typeset
and print this manual. First switch to the the `gdb' subdirectory of
-the main source directory (for example, to `gdb-6.1/gdb') and then type:
+the main source directory (for example, to `gdb-6.2/gdb') and then type:
make doc/gdb.dvi
@@ -169,55 +169,55 @@ preparing GDB for installation; you can then use `make' to build the
a single directory, whose name is usually composed by appending the
version number to `gdb'.
- For example, the GDB version 6.1 distribution is in the `gdb-6.1'
+ For example, the GDB version 6.2 distribution is in the `gdb-6.2'
directory. That directory contains:
-`gdb-6.1/{COPYING,COPYING.LIB}'
+`gdb-6.2/{COPYING,COPYING.LIB}'
Standard GNU license files. Please read them.
-`gdb-6.1/bfd'
+`gdb-6.2/bfd'
source for the Binary File Descriptor library
-`gdb-6.1/config*'
+`gdb-6.2/config*'
script for configuring GDB, along with other support files
-`gdb-6.1/gdb'
+`gdb-6.2/gdb'
the source specific to GDB itself
-`gdb-6.1/include'
+`gdb-6.2/include'
GNU include files
-`gdb-6.1/libiberty'
+`gdb-6.2/libiberty'
source for the `-liberty' free software library
-`gdb-6.1/mmalloc'
+`gdb-6.2/mmalloc'
source for the GNU memory-mapped malloc package
-`gdb-6.1/opcodes'
+`gdb-6.2/opcodes'
source for the library of opcode tables and disassemblers
-`gdb-6.1/readline'
+`gdb-6.2/readline'
source for the GNU command-line interface
NOTE: The readline library is compiled for use by GDB, but will
not be installed on your system when "make install" is issued.
-`gdb-6.1/sim'
+`gdb-6.2/sim'
source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
-`gdb-6.1/intl'
+`gdb-6.2/intl'
source for the GNU gettext library, for internationalization.
This is slightly modified from the standalone gettext
distribution you can get from GNU.
-`gdb-6.1/texinfo'
+`gdb-6.2/texinfo'
The `texinfo.tex' file, which you need in order to make a printed
manual using TeX.
-`gdb-6.1/etc'
+`gdb-6.2/etc'
Coding standards, useful files for editing GDB, and other
miscellanea.
-`gdb-6.1/utils'
+`gdb-6.2/utils'
A grab bag of random utilities.
Note: the following instructions are for building GDB on Unix or
@@ -226,14 +226,14 @@ MS-DOS/MS-Windows are in the file gdb/config/djgpp/README.
The simplest way to configure and build GDB is to run `configure'
from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-6.1' directory.
+is the `gdb-6.2' directory.
First switch to the `gdb-VERSION-NUMBER' source directory if you are
not already in it; then run `configure'.
For example:
- cd gdb-6.1
+ cd gdb-6.2
./configure
make
@@ -249,8 +249,8 @@ you may need to run `sh' on it explicitly:
sh configure
If you run `configure' from a directory that contains source
-directories for multiple libraries or programs, such as the `gdb-6.1'
-source directory for version 6.1, `configure' creates configuration
+directories for multiple libraries or programs, such as the `gdb-6.2'
+source directory for version 6.2, `configure' creates configuration
files for every directory level underneath (unless you tell it not to,
with the `--norecursion' option).
@@ -258,10 +258,10 @@ with the `--norecursion' option).
directories in the GDB distribution, if you only want to configure that
subdirectory; but be sure to specify a path to it.
- For example, with version 6.1, type the following to configure only
+ For example, with version 6.2, type the following to configure only
the `bfd' subdirectory:
- cd gdb-6.1/bfd
+ cd gdb-6.2/bfd
../configure
You can install `gdb' anywhere; it has no hardwired paths. However,
@@ -290,13 +290,13 @@ directory. If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it
will be assumed.)
- For example, with version 6.1, you can build GDB in a separate
+ For example, with version 6.2, you can build GDB in a separate
directory for a Sun 4 like this:
- cd gdb-6.1
+ cd gdb-6.2
mkdir ../gdb-sun4
cd ../gdb-sun4
- ../gdb-6.1/configure
+ ../gdb-6.2/configure
make
When `configure' builds a configuration using a remote source
@@ -317,8 +317,8 @@ called `configure' (or one of its subdirectories).
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
-as `gdb-6.1' (or in a separate configured directory configured with
-`--srcdir=PATH/gdb-6.1'), you will build all the required libraries,
+as `gdb-6.2' (or in a separate configured directory configured with
+`--srcdir=PATH/gdb-6.2'), you will build all the required libraries,
and then build GDB.
When you have multiple hosts or targets configured in separate
@@ -361,7 +361,7 @@ you can use it to test your guesses on abbreviations--for example:
Invalid configuration `i786v': machine `i786v' not recognized
`config.sub' is also distributed in the GDB source directory
-(`gdb-6.1', for version 6.1).
+(`gdb-6.2', for version 6.2).
`configure' options
@@ -491,7 +491,7 @@ As an alternative, the bug report can be submitted, via e-mail, to the
address "bug-gdb@gnu.org".
When submitting a bug, please include the GDB version number (e.g.,
-gdb-6.1), and how you configured it (e.g., "sun4" or "mach386 host,
+gdb-6.2), and how you configured it (e.g., "sun4" or "mach386 host,
i586-intel-synopsys target"). Since GDB now supports so many
different configurations, it is important that you be precise about
this. If at all possible, you should include the actual banner that
@@ -546,17 +546,17 @@ ftp://sources.redhat.com/pub/dejagnu/ will contain a recent snapshot.
Once DejaGNU is installed, you can run the tests in one of the
following ways:
- (1) cd gdb-6.1
+ (1) cd gdb-6.2
make check-gdb
or
- (2) cd gdb-6.1/gdb
+ (2) cd gdb-6.2/gdb
make check
or
- (3) cd gdb-6.1/gdb/testsuite
+ (3) cd gdb-6.2/gdb/testsuite
make site.exp (builds the site specific file)
runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate)
diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c
index 543f70213f4..e54853913c9 100644
--- a/gdb/abug-rom.c
+++ b/gdb/abug-rom.c
@@ -144,7 +144,7 @@ init_abug_cmds (void)
abug_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
abug_cmds.dump_registers = "rd\r"; /* dump_registers */
abug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- abug_cmds.supply_register = abug_supply_register; /* supply_register */
+ abug_cmds.supply_register = abug_supply_register;
abug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
abug_cmds.load = "lo 0\r"; /* download command */
abug_cmds.loadresp = "\n"; /* load response */
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index 87560c7b001..5d1cd9e3351 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -154,9 +154,6 @@
/* Define if libunwind library is being used. */
#undef HAVE_LIBUNWIND
-/* Multi-arch enabled. */
-#undef GDB_MULTI_ARCH
-
/* hostfile */
#undef GDB_XM_FILE
@@ -165,3 +162,9 @@
/* nativefile */
#undef GDB_NM_FILE
+
+/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
+ around a <sys/proc.h> problem on IRIX 5. */
+#ifndef _KMEMUSER
+#undef _KMEMUSER
+#endif
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index a85ce024f2f..319070ac88b 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -8,7 +8,7 @@ dnl This gets the standard macros, like the TCL, TK, etc ones.
sinclude(../config/acinclude.m4)
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
-AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
+AC_DEFUN([CY_AC_TCL_LYNX_POSIX],
[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([if running LynxOS])
AC_CACHE_VAL(ac_cv_os_lynx,
@@ -48,7 +48,7 @@ fi
# makes configure think it's cross compiling. If --target wasn't used, then
# we can't configure, so something is wrong. We don't use the cache
# here cause if somebody fixes their compiler install, we want this to work.
-AC_DEFUN(CY_AC_C_WORKS,
+AC_DEFUN([CY_AC_C_WORKS],
[# If we cannot compile and link a trivial program, we can't expect anything to work
AC_MSG_CHECKING(whether the compiler ($CC) actually works)
AC_TRY_COMPILE(, [/* don't need anything here */],
@@ -67,7 +67,7 @@ fi
AC_MSG_RESULT(yes)
])
-AC_DEFUN(CY_AC_PATH_TCLH, [
+AC_DEFUN([CY_AC_PATH_TCLH], [
#
# Ok, lets find the tcl source trees so we can use the headers
# Warning: transition of version 9 to 10 will break this algorithm
@@ -156,7 +156,7 @@ AC_SUBST(TCLHDIR)
])
-AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
+AC_DEFUN([CY_AC_PATH_TCLCONFIG], [
#
# Ok, lets find the tcl configuration
# First, look for one uninstalled.
@@ -229,7 +229,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_TCLCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
+AC_DEFUN([CY_AC_LOAD_TCLCONFIG], [
. $TCLCONFIG
AC_SUBST(TCL_VERSION)
@@ -285,7 +285,7 @@ dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
# - Symbols in tkConfig.sh are different than tclConfig.sh
# - Acceptable for Tk to be missing but not Tcl.
-AC_DEFUN(CY_AC_PATH_TKH, [
+AC_DEFUN([CY_AC_PATH_TKH], [
#
# Ok, lets find the tk source trees so we can use the headers
# If the directory (presumably symlink) named "tk" exists, use that one
@@ -379,7 +379,7 @@ AC_SUBST(TKHDIR)
])
-AC_DEFUN(CY_AC_PATH_TKCONFIG, [
+AC_DEFUN([CY_AC_PATH_TKCONFIG], [
#
# Ok, lets find the tk configuration
# First, look for one uninstalled.
@@ -453,7 +453,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_TKCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
+AC_DEFUN([CY_AC_LOAD_TKCONFIG], [
if test -f "$TKCONFIG" ; then
. $TKCONFIG
fi
@@ -484,7 +484,7 @@ dnl AC_SUBST(TK_EXEC_PREFIX)
# check for Itcl headers.
-AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
+AC_DEFUN([CY_AC_PATH_ITCLCONFIG], [
#
# Ok, lets find the itcl configuration
# First, look for one uninstalled.
@@ -557,7 +557,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_ITCLCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_ITCLCONFIG, [
+AC_DEFUN([CY_AC_LOAD_ITCLCONFIG], [
if test -f "$ITCLCONFIG" ; then
. $ITCLCONFIG
fi
@@ -586,7 +586,7 @@ dnl AC_SUBST(ITCL_EXEC_PREFIX)
# check for Itcl headers.
-AC_DEFUN(CY_AC_PATH_ITCLH, [
+AC_DEFUN([CY_AC_PATH_ITCLH], [
AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
@@ -610,7 +610,7 @@ AC_SUBST(ITCLHDIR)
])
-AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
+AC_DEFUN([CY_AC_PATH_ITKCONFIG], [
#
# Ok, lets find the itk configuration
# First, look for one uninstalled.
@@ -684,7 +684,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_ITKCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_ITKCONFIG, [
+AC_DEFUN([CY_AC_LOAD_ITKCONFIG], [
if test -f "$ITKCONFIG" ; then
. $ITKCONFIG
fi
@@ -711,7 +711,7 @@ dnl AC_SUBST(ITK_EXEC_PREFIX)
AC_SUBST(ITK_LIB_SPEC)
])
-AC_DEFUN(CY_AC_PATH_ITKH, [
+AC_DEFUN([CY_AC_PATH_ITKH], [
AC_MSG_CHECKING(for Itk private headers. srcdir=${srcdir})
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
@@ -949,7 +949,7 @@ 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_DEFUN([gcc_AC_CHECK_DECL],
[AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(gcc_cv_have_decl_$1,
[AC_TRY_COMPILE([$4],
@@ -967,7 +967,7 @@ 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,
+AC_DEFUN([gcc_AC_CHECK_DECLS],
[for ac_func in $1
do
changequote(, )dnl
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 40399a65d09..22bbb45b5d3 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -20,7 +20,7 @@ dnl This gets the standard macros, like the TCL, TK, etc ones.
sinclude(../config/acinclude.m4)
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
-AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
+AC_DEFUN([CY_AC_TCL_LYNX_POSIX],
[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([if running LynxOS])
AC_CACHE_VAL(ac_cv_os_lynx,
@@ -60,7 +60,7 @@ fi
# makes configure think it's cross compiling. If --target wasn't used, then
# we can't configure, so something is wrong. We don't use the cache
# here cause if somebody fixes their compiler install, we want this to work.
-AC_DEFUN(CY_AC_C_WORKS,
+AC_DEFUN([CY_AC_C_WORKS],
[# If we cannot compile and link a trivial program, we can't expect anything to work
AC_MSG_CHECKING(whether the compiler ($CC) actually works)
AC_TRY_COMPILE(, [/* don't need anything here */],
@@ -79,7 +79,7 @@ fi
AC_MSG_RESULT(yes)
])
-AC_DEFUN(CY_AC_PATH_TCLH, [
+AC_DEFUN([CY_AC_PATH_TCLH], [
#
# Ok, lets find the tcl source trees so we can use the headers
# Warning: transition of version 9 to 10 will break this algorithm
@@ -168,7 +168,7 @@ AC_SUBST(TCLHDIR)
])
-AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
+AC_DEFUN([CY_AC_PATH_TCLCONFIG], [
#
# Ok, lets find the tcl configuration
# First, look for one uninstalled.
@@ -241,7 +241,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_TCLCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
+AC_DEFUN([CY_AC_LOAD_TCLCONFIG], [
. $TCLCONFIG
AC_SUBST(TCL_VERSION)
@@ -297,7 +297,7 @@ dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
# - Symbols in tkConfig.sh are different than tclConfig.sh
# - Acceptable for Tk to be missing but not Tcl.
-AC_DEFUN(CY_AC_PATH_TKH, [
+AC_DEFUN([CY_AC_PATH_TKH], [
#
# Ok, lets find the tk source trees so we can use the headers
# If the directory (presumably symlink) named "tk" exists, use that one
@@ -391,7 +391,7 @@ AC_SUBST(TKHDIR)
])
-AC_DEFUN(CY_AC_PATH_TKCONFIG, [
+AC_DEFUN([CY_AC_PATH_TKCONFIG], [
#
# Ok, lets find the tk configuration
# First, look for one uninstalled.
@@ -465,7 +465,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_TKCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
+AC_DEFUN([CY_AC_LOAD_TKCONFIG], [
if test -f "$TKCONFIG" ; then
. $TKCONFIG
fi
@@ -496,7 +496,7 @@ dnl AC_SUBST(TK_EXEC_PREFIX)
# check for Itcl headers.
-AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
+AC_DEFUN([CY_AC_PATH_ITCLCONFIG], [
#
# Ok, lets find the itcl configuration
# First, look for one uninstalled.
@@ -569,7 +569,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_ITCLCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_ITCLCONFIG, [
+AC_DEFUN([CY_AC_LOAD_ITCLCONFIG], [
if test -f "$ITCLCONFIG" ; then
. $ITCLCONFIG
fi
@@ -598,7 +598,7 @@ dnl AC_SUBST(ITCL_EXEC_PREFIX)
# check for Itcl headers.
-AC_DEFUN(CY_AC_PATH_ITCLH, [
+AC_DEFUN([CY_AC_PATH_ITCLH], [
AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
@@ -622,7 +622,7 @@ AC_SUBST(ITCLHDIR)
])
-AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
+AC_DEFUN([CY_AC_PATH_ITKCONFIG], [
#
# Ok, lets find the itk configuration
# First, look for one uninstalled.
@@ -696,7 +696,7 @@ fi
# Defined as a separate macro so we don't have to cache the values
# from PATH_ITKCONFIG (because this can also be cached).
-AC_DEFUN(CY_AC_LOAD_ITKCONFIG, [
+AC_DEFUN([CY_AC_LOAD_ITKCONFIG], [
if test -f "$ITKCONFIG" ; then
. $ITKCONFIG
fi
@@ -723,7 +723,7 @@ dnl AC_SUBST(ITK_EXEC_PREFIX)
AC_SUBST(ITK_LIB_SPEC)
])
-AC_DEFUN(CY_AC_PATH_ITKH, [
+AC_DEFUN([CY_AC_PATH_ITKH], [
AC_MSG_CHECKING(for Itk private headers. srcdir=${srcdir})
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
@@ -957,7 +957,7 @@ 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_DEFUN([gcc_AC_CHECK_DECL],
[AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(gcc_cv_have_decl_$1,
[AC_TRY_COMPILE([$4],
@@ -975,7 +975,7 @@ 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,
+AC_DEFUN([gcc_AC_CHECK_DECLS],
[for ac_func in $1
do
changequote(, )dnl
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index f4cbb37316a..9e91817febd 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1,6 +1,6 @@
/* YACC parser for Ada expressions, for GDB.
- Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1997, 2000, 2003,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,11 +34,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
with include files (<malloc.h> and <stdlib.h> for example) just became
too messy, particularly when such includes can be inserted at random
times by the parser generator. */
-
+
%{
#include "defs.h"
-#include <string.h>
+#include "gdb_string.h"
#include <ctype.h>
#include "expression.h"
#include "value.h"
@@ -56,9 +56,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
yacc generated parsers in gdb. These are only the variables
produced by yacc. If other parser generators (bison, byacc, etc) produce
additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
+ generators need to be fixed instead of adding those names to this list. */
-/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
+/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
options. I presume we are maintaining it to accommodate systems
without BISON? (PNH) */
@@ -69,13 +69,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define yylval ada_lval
#define yychar ada_char
#define yydebug ada_debug
-#define yypact ada_pact
-#define yyr1 ada_r1
-#define yyr2 ada_r2
-#define yydef ada_def
-#define yychk ada_chk
-#define yypgo ada_pgo
-#define yyact ada_act
+#define yypact ada_pact
+#define yyr1 ada_r1
+#define yyr2 ada_r2
+#define yydef ada_def
+#define yychk ada_chk
+#define yypgo ada_pgo
+#define yyact ada_act
#define yyexca ada_exca
#define yyerrflag ada_errflag
#define yynerrs ada_nerrs
@@ -101,15 +101,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define YYFPRINTF parser_fprintf
struct name_info {
- struct symbol* sym;
- struct minimal_symbol* msym;
- struct block* block;
+ struct symbol *sym;
+ struct minimal_symbol *msym;
+ struct block *block;
struct stoken stoken;
};
/* If expression is in the context of TYPE'(...), then TYPE, else
- * NULL. */
-static struct type* type_qualifier;
+ * NULL. */
+static struct type *type_qualifier;
int yyparse (void);
@@ -119,19 +119,14 @@ void yyerror (char *);
static struct stoken string_to_operator (struct stoken);
-static void write_attribute_call0 (enum ada_attribute);
-
-static void write_attribute_call1 (enum ada_attribute, LONGEST);
-
-static void write_attribute_calln (enum ada_attribute, int);
+static void write_int (LONGEST, struct type *);
-static void write_object_renaming (struct block*, struct symbol*);
+static void write_object_renaming (struct block *, struct symbol *, int);
-static void write_var_from_name (struct block*, struct name_info);
+static void write_var_from_name (struct block *, struct name_info);
-static LONGEST
-convert_char_literal (struct type*, LONGEST);
-%}
+static LONGEST convert_char_literal (struct type *, LONGEST);
+%}
%union
{
@@ -169,9 +164,9 @@ convert_char_literal (struct type*, LONGEST);
Contexts where this distinction is not important can use the
nonterminal "name", which matches either NAME or TYPENAME. */
-%token <sval> STRING
+%token <sval> STRING
%token <ssym> NAME DOT_ID OBJECT_RENAMING
-%type <bval> block
+%type <bval> block
%type <lval> arglist tick_arglist
%type <tval> save_qualifier
@@ -180,9 +175,7 @@ convert_char_literal (struct type*, LONGEST);
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
-%token <lval> LAST REGNAME
-
-%token <ivar> INTERNAL_VARIABLE
+%token <sval> SPECIAL_VARIABLE
%nonassoc ASSIGN
%left _AND_ OR XOR THEN ELSE
@@ -192,9 +185,9 @@ convert_char_literal (struct type*, LONGEST);
%left UNARY
%left '*' '/' MOD REM
%right STARSTAR ABS NOT
- /* The following are right-associative only so that reductions at this
- precedence have lower precedence than '.' and '('. The syntax still
- forces a.b.c, e.g., to be LEFT-associated. */
+ /* The following are right-associative only so that reductions at this
+ precedence have lower precedence than '.' and '('. The syntax still
+ forces a.b.c, e.g., to be LEFT-associated. */
%right TICK_ACCESS TICK_ADDRESS TICK_FIRST TICK_LAST TICK_LENGTH
%right TICK_MAX TICK_MIN TICK_MODULUS
%right TICK_POS TICK_RANGE TICK_SIZE TICK_TAG TICK_VAL
@@ -225,7 +218,7 @@ simple_exp : simple_exp DOT_ALL
simple_exp : simple_exp DOT_ID
{ write_exp_elt_opcode (STRUCTOP_STRUCT);
write_exp_string ($2.stoken);
- write_exp_elt_opcode (STRUCTOP_STRUCT);
+ write_exp_elt_opcode (STRUCTOP_STRUCT);
}
;
@@ -241,17 +234,15 @@ simple_exp : type '(' exp ')'
{
write_exp_elt_opcode (UNOP_CAST);
write_exp_elt_type ($1);
- write_exp_elt_opcode (UNOP_CAST);
+ write_exp_elt_opcode (UNOP_CAST);
}
;
simple_exp : type '\'' save_qualifier { type_qualifier = $1; } '(' exp ')'
{
- /* write_exp_elt_opcode (UNOP_QUAL); */
- /* FIXME: UNOP_QUAL should be defined in expression.h */
+ write_exp_elt_opcode (UNOP_QUAL);
write_exp_elt_type ($1);
- /* write_exp_elt_opcode (UNOP_QUAL); */
- /* FIXME: UNOP_QUAL should be defined in expression.h */
+ write_exp_elt_opcode (UNOP_QUAL);
type_qualifier = $3;
}
;
@@ -267,34 +258,16 @@ simple_exp :
simple_exp : '(' exp1 ')' { }
;
-simple_exp : variable
+simple_exp : variable
;
-simple_exp: REGNAME /* GDB extension */
- { write_exp_elt_opcode (OP_REGISTER);
- write_exp_elt_longcst ((LONGEST) $1);
- write_exp_elt_opcode (OP_REGISTER);
- }
+simple_exp: SPECIAL_VARIABLE /* Various GDB extensions */
+ { write_dollar_variable ($1); }
;
-simple_exp: INTERNAL_VARIABLE /* GDB extension */
- { write_exp_elt_opcode (OP_INTERNALVAR);
- write_exp_elt_intern ($1);
- write_exp_elt_opcode (OP_INTERNALVAR);
- }
- ;
-
-
exp : simple_exp
;
-simple_exp: LAST
- { write_exp_elt_opcode (OP_LAST);
- write_exp_elt_longcst ((LONGEST) $1);
- write_exp_elt_opcode (OP_LAST);
- }
- ;
-
exp : exp ASSIGN exp /* Extension for convenience */
{ write_exp_elt_opcode (BINOP_ASSIGN); }
;
@@ -332,7 +305,7 @@ exp : '{' type '}' exp %prec '.'
/* GDB extension */
{ write_exp_elt_opcode (UNOP_MEMVAL);
write_exp_elt_type ($2);
- write_exp_elt_opcode (UNOP_MEMVAL);
+ write_exp_elt_opcode (UNOP_MEMVAL);
}
;
@@ -387,42 +360,32 @@ exp : exp LEQ exp
;
exp : exp IN exp DOTDOT exp
- { /*write_exp_elt_opcode (TERNOP_MBR); */ }
- /* FIXME: TERNOP_MBR should be defined in
- expression.h */
+ { write_exp_elt_opcode (TERNOP_IN_RANGE); }
| exp IN exp TICK_RANGE tick_arglist
- { /*write_exp_elt_opcode (BINOP_MBR); */
- /* FIXME: BINOP_MBR should be defined in expression.h */
+ { write_exp_elt_opcode (BINOP_IN_BOUNDS);
write_exp_elt_longcst ((LONGEST) $5);
- /*write_exp_elt_opcode (BINOP_MBR); */
+ write_exp_elt_opcode (BINOP_IN_BOUNDS);
}
| exp IN TYPENAME %prec TICK_ACCESS
- { /*write_exp_elt_opcode (UNOP_MBR); */
- /* FIXME: UNOP_QUAL should be defined in expression.h */
+ { write_exp_elt_opcode (UNOP_IN_RANGE);
write_exp_elt_type ($3);
- /* write_exp_elt_opcode (UNOP_MBR); */
- /* FIXME: UNOP_MBR should be defined in expression.h */
+ write_exp_elt_opcode (UNOP_IN_RANGE);
}
| exp NOT IN exp DOTDOT exp
- { /*write_exp_elt_opcode (TERNOP_MBR); */
- /* FIXME: TERNOP_MBR should be defined in expression.h */
- write_exp_elt_opcode (UNOP_LOGICAL_NOT);
+ { write_exp_elt_opcode (TERNOP_IN_RANGE);
+ write_exp_elt_opcode (UNOP_LOGICAL_NOT);
}
| exp NOT IN exp TICK_RANGE tick_arglist
- { /* write_exp_elt_opcode (BINOP_MBR); */
- /* FIXME: BINOP_MBR should be defined in expression.h */
+ { write_exp_elt_opcode (BINOP_IN_BOUNDS);
write_exp_elt_longcst ((LONGEST) $6);
- /*write_exp_elt_opcode (BINOP_MBR);*/
- /* FIXME: BINOP_MBR should be defined in expression.h */
- write_exp_elt_opcode (UNOP_LOGICAL_NOT);
+ write_exp_elt_opcode (BINOP_IN_BOUNDS);
+ write_exp_elt_opcode (UNOP_LOGICAL_NOT);
}
| exp NOT IN TYPENAME %prec TICK_ACCESS
- { /*write_exp_elt_opcode (UNOP_MBR);*/
- /* FIXME: UNOP_MBR should be defined in expression.h */
+ { write_exp_elt_opcode (UNOP_IN_RANGE);
write_exp_elt_type ($4);
- /* write_exp_elt_opcode (UNOP_MBR);*/
- /* FIXME: UNOP_MBR should be defined in expression.h */
- write_exp_elt_opcode (UNOP_LOGICAL_NOT);
+ write_exp_elt_opcode (UNOP_IN_RANGE);
+ write_exp_elt_opcode (UNOP_LOGICAL_NOT);
}
;
@@ -438,7 +401,7 @@ exp : exp '>' exp
{ write_exp_elt_opcode (BINOP_GTR); }
;
-exp : exp _AND_ exp /* Fix for Ada elementwise AND. */
+exp : exp _AND_ exp /* Fix for Ada elementwise AND. */
{ write_exp_elt_opcode (BINOP_BITWISE_AND); }
;
@@ -450,7 +413,7 @@ exp : exp OR exp /* Fix for Ada elementwise OR */
{ write_exp_elt_opcode (BINOP_BITWISE_IOR); }
;
-exp : exp OR ELSE exp
+exp : exp OR ELSE exp
{ write_exp_elt_opcode (BINOP_LOGICAL_OR); }
;
@@ -467,31 +430,37 @@ simple_exp : simple_exp TICK_ACCESS
write_exp_elt_opcode (UNOP_CAST);
}
| simple_exp TICK_FIRST tick_arglist
- { write_attribute_call1 (ATR_FIRST, $3); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_FIRST); }
| simple_exp TICK_LAST tick_arglist
- { write_attribute_call1 (ATR_LAST, $3); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_LAST); }
| simple_exp TICK_LENGTH tick_arglist
- { write_attribute_call1 (ATR_LENGTH, $3); }
- | simple_exp TICK_SIZE
- { write_attribute_call0 (ATR_SIZE); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_LENGTH); }
+ | simple_exp TICK_SIZE
+ { write_exp_elt_opcode (OP_ATR_SIZE); }
| simple_exp TICK_TAG
- { write_attribute_call0 (ATR_TAG); }
+ { write_exp_elt_opcode (OP_ATR_TAG); }
| opt_type_prefix TICK_MIN '(' exp ',' exp ')'
- { write_attribute_calln (ATR_MIN, 2); }
+ { write_exp_elt_opcode (OP_ATR_MIN); }
| opt_type_prefix TICK_MAX '(' exp ',' exp ')'
- { write_attribute_calln (ATR_MAX, 2); }
+ { write_exp_elt_opcode (OP_ATR_MAX); }
| opt_type_prefix TICK_POS '(' exp ')'
- { write_attribute_calln (ATR_POS, 1); }
+ { write_exp_elt_opcode (OP_ATR_POS); }
| type_prefix TICK_FIRST tick_arglist
- { write_attribute_call1 (ATR_FIRST, $3); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_FIRST); }
| type_prefix TICK_LAST tick_arglist
- { write_attribute_call1 (ATR_LAST, $3); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_LAST); }
| type_prefix TICK_LENGTH tick_arglist
- { write_attribute_call1 (ATR_LENGTH, $3); }
+ { write_int ($3, builtin_type_int);
+ write_exp_elt_opcode (OP_ATR_LENGTH); }
| type_prefix TICK_VAL '(' exp ')'
- { write_attribute_calln (ATR_VAL, 1); }
- | type_prefix TICK_MODULUS
- { write_attribute_call0 (ATR_MODULUS); }
+ { write_exp_elt_opcode (OP_ATR_VAL); }
+ | type_prefix TICK_MODULUS
+ { write_exp_elt_opcode (OP_ATR_MODULUS); }
;
tick_arglist : %prec '('
@@ -509,74 +478,42 @@ type_prefix :
opt_type_prefix :
type_prefix
- | /* EMPTY */
+ | /* EMPTY */
{ write_exp_elt_opcode (OP_TYPE);
write_exp_elt_type (builtin_type_void);
write_exp_elt_opcode (OP_TYPE); }
;
-
+
exp : INT
- { write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type ($1.type);
- write_exp_elt_longcst ((LONGEST)($1.val));
- write_exp_elt_opcode (OP_LONG);
- }
+ { write_int ((LONGEST) $1.val, $1.type); }
;
exp : CHARLIT
- { write_exp_elt_opcode (OP_LONG);
- if (type_qualifier == NULL)
- write_exp_elt_type ($1.type);
- else
- write_exp_elt_type (type_qualifier);
- write_exp_elt_longcst
- (convert_char_literal (type_qualifier, $1.val));
- write_exp_elt_opcode (OP_LONG);
- }
+ { write_int (convert_char_literal (type_qualifier, $1.val),
+ (type_qualifier == NULL)
+ ? $1.type : type_qualifier);
+ }
;
-
+
exp : FLOAT
{ write_exp_elt_opcode (OP_DOUBLE);
write_exp_elt_type ($1.type);
write_exp_elt_dblcst ($1.dval);
- write_exp_elt_opcode (OP_DOUBLE);
+ write_exp_elt_opcode (OP_DOUBLE);
}
;
exp : NULL_PTR
- { write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
- write_exp_elt_longcst ((LONGEST)(0));
- write_exp_elt_opcode (OP_LONG);
- }
+ { write_int (0, builtin_type_int); }
;
exp : STRING
- { /* Ada strings are converted into array constants
- a lower bound of 1. Thus, the array upper bound
- is the string length. */
- char *sp = $1.ptr; int count;
- if ($1.length == 0)
- { /* One dummy character for the type */
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_ada_char);
- write_exp_elt_longcst ((LONGEST)(0));
- write_exp_elt_opcode (OP_LONG);
- }
- for (count = $1.length; count > 0; count -= 1)
- {
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_ada_char);
- write_exp_elt_longcst ((LONGEST)(*sp));
- sp += 1;
- write_exp_elt_opcode (OP_LONG);
- }
- write_exp_elt_opcode (OP_ARRAY);
- write_exp_elt_longcst ((LONGEST) 1);
- write_exp_elt_longcst ((LONGEST) ($1.length));
- write_exp_elt_opcode (OP_ARRAY);
- }
+ {
+ write_exp_elt_opcode (OP_STRING);
+ write_exp_string ($1);
+ write_exp_elt_opcode (OP_STRING);
+ }
;
exp : NEW TYPENAME
@@ -586,9 +523,12 @@ exp : NEW TYPENAME
variable: NAME { write_var_from_name (NULL, $1); }
| block NAME /* GDB extension */
{ write_var_from_name ($1, $2); }
- | OBJECT_RENAMING { write_object_renaming (NULL, $1.sym); }
- | block OBJECT_RENAMING
- { write_object_renaming ($1, $2.sym); }
+ | OBJECT_RENAMING
+ { write_object_renaming (NULL, $1.sym,
+ MAX_RENAMING_CHAIN_LENGTH); }
+ | block OBJECT_RENAMING
+ { write_object_renaming ($1, $2.sym,
+ MAX_RENAMING_CHAIN_LENGTH); }
;
any_name : NAME { }
@@ -605,14 +545,14 @@ block : BLOCKNAME /* GDB extension */
type : TYPENAME { $$ = $1; }
| block TYPENAME { $$ = $2; }
- | TYPENAME TICK_ACCESS
+ | TYPENAME TICK_ACCESS
{ $$ = lookup_pointer_type ($1); }
| block TYPENAME TICK_ACCESS
{ $$ = lookup_pointer_type ($2); }
;
/* Some extensions borrowed from C, for the benefit of those who find they
- can't get used to Ada notation in GDB. */
+ can't get used to Ada notation in GDB. */
exp : '*' exp %prec '.'
{ write_exp_elt_opcode (UNOP_IND); }
@@ -642,49 +582,51 @@ exp : '*' exp %prec '.'
#define yytext ada_yytext
#define yywrap ada_yywrap
+static struct obstack temp_parse_space;
+
/* The following kludge was found necessary to prevent conflicts between */
/* defs.h and non-standard stdlib.h files. */
#define qsort __qsort__dummy
#include "ada-lex.c"
int
-ada_parse ()
+ada_parse (void)
{
- lexer_init (yyin); /* (Re-)initialize lexer. */
+ lexer_init (yyin); /* (Re-)initialize lexer. */
left_block_context = NULL;
type_qualifier = NULL;
-
+ obstack_free (&temp_parse_space, NULL);
+ obstack_init (&temp_parse_space);
+
return _ada_parse ();
}
void
-yyerror (msg)
- char *msg;
+yyerror (char *msg)
{
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}
-/* The operator name corresponding to operator symbol STRING (adds
+/* The operator name corresponding to operator symbol STRING (adds
quotes and maps to lower-case). Destroys the previous contents of
the array pointed to by STRING.ptr. Error if STRING does not match
a valid Ada operator. Assumes that STRING.ptr points to a
null-terminated string and that, if STRING is a valid operator
symbol, the array pointed to by STRING.ptr contains at least
- STRING.length+3 characters. */
+ STRING.length+3 characters. */
static struct stoken
-string_to_operator (string)
- struct stoken string;
+string_to_operator (struct stoken string)
{
int i;
- for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
+ for (i = 0; ada_opname_table[i].encoded != NULL; i += 1)
{
- if (string.length == strlen (ada_opname_table[i].demangled)-2
- && strncasecmp (string.ptr, ada_opname_table[i].demangled+1,
+ if (string.length == strlen (ada_opname_table[i].decoded)-2
+ && strncasecmp (string.ptr, ada_opname_table[i].decoded+1,
string.length) == 0)
{
- strncpy (string.ptr, ada_opname_table[i].demangled,
+ strncpy (string.ptr, ada_opname_table[i].decoded,
string.length+2);
string.length += 2;
return string;
@@ -694,136 +636,105 @@ string_to_operator (string)
}
/* Emit expression to access an instance of SYM, in block BLOCK (if
- * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */
+ * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */
static void
-write_var_from_sym (orig_left_context, block, sym)
- struct block* orig_left_context;
- struct block* block;
- struct symbol* sym;
+write_var_from_sym (struct block *orig_left_context,
+ struct block *block,
+ struct symbol *sym)
{
if (orig_left_context == NULL && symbol_read_needs_frame (sym))
{
- if (innermost_block == 0 ||
- contained_in (block, innermost_block))
+ if (innermost_block == 0
+ || contained_in (block, innermost_block))
innermost_block = block;
}
write_exp_elt_opcode (OP_VAR_VALUE);
- /* We want to use the selected frame, not another more inner frame
- which happens to be in the same block */
- write_exp_elt_block (NULL);
+ write_exp_elt_block (block);
write_exp_elt_sym (sym);
write_exp_elt_opcode (OP_VAR_VALUE);
}
-/* Emit expression to access an instance of NAME. */
+/* Emit expression to access an instance of NAME in :: context
+ * ORIG_LEFT_CONTEXT. If no unique symbol for NAME has been found,
+ * output a dummy symbol (good to the next call of ada_parse) for NAME
+ * in the UNDEF_DOMAIN, for later resolution by ada_resolve. */
static void
-write_var_from_name (orig_left_context, name)
- struct block* orig_left_context;
- struct name_info name;
+write_var_from_name (struct block *orig_left_context,
+ struct name_info name)
{
if (name.msym != NULL)
{
- write_exp_msymbol (name.msym,
+ write_exp_msymbol (name.msym,
lookup_function_type (builtin_type_int),
builtin_type_int);
}
- else if (name.sym == NULL)
+ else if (name.sym == NULL)
{
- /* Multiple matches: record name and starting block for later
- resolution by ada_resolve. */
- /* write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
+ /* Multiple matches: record name and starting block for later
+ resolution by ada_resolve. */
+ char *encoded_name = ada_encode (name.stoken.ptr);
+ struct symbol *sym =
+ obstack_alloc (&temp_parse_space, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
+ SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
+ SYMBOL_LINKAGE_NAME (sym)
+ = obsavestring (encoded_name, strlen (encoded_name), &temp_parse_space);
+ SYMBOL_LANGUAGE (sym) = language_ada;
+
+ write_exp_elt_opcode (OP_VAR_VALUE);
write_exp_elt_block (name.block);
- /* write_exp_elt_name (name.stoken.ptr); */
- /* FIXME: write_exp_elt_name should be defined in defs.h, located in parse.c */
- /* write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
+ write_exp_elt_sym (sym);
+ write_exp_elt_opcode (OP_VAR_VALUE);
}
else
write_var_from_sym (orig_left_context, name.block, name.sym);
}
-/* Write a call on parameterless attribute ATR. */
+/* Write integer constant ARG of type TYPE. */
static void
-write_attribute_call0 (atr)
- enum ada_attribute atr;
-{
- /* write_exp_elt_opcode (OP_ATTRIBUTE); */
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) atr);
- /* write_exp_elt_opcode (OP_ATTRIBUTE); */
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
-}
-
-/* Write a call on an attribute ATR with one constant integer
- * parameter. */
-
-static void
-write_attribute_call1 (atr, arg)
- enum ada_attribute atr;
- LONGEST arg;
+write_int (LONGEST arg, struct type *type)
{
write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
+ write_exp_elt_type (type);
write_exp_elt_longcst (arg);
write_exp_elt_opcode (OP_LONG);
- /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
- write_exp_elt_longcst ((LONGEST) 1);
- write_exp_elt_longcst ((LONGEST) atr);
- /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
-}
-
-/* Write a call on an attribute ATR with N parameters, whose code must have
- * been generated previously. */
+}
-static void
-write_attribute_calln (atr, n)
- enum ada_attribute atr;
- int n;
-{
- /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
- write_exp_elt_longcst ((LONGEST) n);
- write_exp_elt_longcst ((LONGEST) atr);
- /* write_exp_elt_opcode (OP_ATTRIBUTE);*/
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
-}
-
-/* Emit expression corresponding to the renamed object designated by
+/* Emit expression corresponding to the renamed object designated by
* the type RENAMING, which must be the referent of an object renaming
- * type, in the context of ORIG_LEFT_CONTEXT (?). */
+ * type, in the context of ORIG_LEFT_CONTEXT. MAX_DEPTH is the maximum
+ * number of cascaded renamings to allow. */
static void
-write_object_renaming (orig_left_context, renaming)
- struct block* orig_left_context;
- struct symbol* renaming;
+write_object_renaming (struct block *orig_left_context,
+ struct symbol *renaming, int max_depth)
{
- const char* qualification = DEPRECATED_SYMBOL_NAME (renaming);
- const char* simple_tail;
- const char* expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0);
- const char* suffix;
- char* name;
- struct symbol* sym;
+ const char *qualification = SYMBOL_LINKAGE_NAME (renaming);
+ const char *simple_tail;
+ const char *expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0);
+ const char *suffix;
+ char *name;
+ struct symbol *sym;
enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
+ if (max_depth <= 0)
+ error ("Could not find renamed symbol");
+
/* if orig_left_context is null, then use the currently selected
- block, otherwise we might fail our symbol lookup below */
+ block; otherwise we might fail our symbol lookup below. */
if (orig_left_context == NULL)
orig_left_context = get_selected_block (NULL);
- for (simple_tail = qualification + strlen (qualification);
+ for (simple_tail = qualification + strlen (qualification);
simple_tail != qualification; simple_tail -= 1)
{
if (*simple_tail == '.')
{
simple_tail += 1;
break;
- }
- else if (DEPRECATED_STREQN (simple_tail, "__", 2))
+ }
+ else if (strncmp (simple_tail, "__", 2) == 0)
{
simple_tail += 2;
break;
@@ -834,72 +745,72 @@ write_object_renaming (orig_left_context, renaming)
if (suffix == NULL)
goto BadEncoding;
- name = (char*) malloc (suffix - expr + 1);
- /* add_name_string_cleanup (name); */
- /* FIXME: add_name_string_cleanup should be defined in
- parser-defs.h, implemented in parse.c */
+ name = (char *) obstack_alloc (&temp_parse_space, suffix - expr + 1);
strncpy (name, expr, suffix-expr);
name[suffix-expr] = '\000';
sym = lookup_symbol (name, orig_left_context, VAR_DOMAIN, 0, NULL);
- /* if (sym == NULL)
- error ("Could not find renamed variable: %s", ada_demangle (name));
- */
- /* FIXME: ada_demangle should be defined in defs.h, implemented in ada-lang.c */
- write_var_from_sym (orig_left_context, block_found, sym);
+ if (sym == NULL)
+ error ("Could not find renamed variable: %s", ada_decode (name));
+ if (ada_is_object_renaming (sym))
+ write_object_renaming (orig_left_context, sym, max_depth-1);
+ else
+ write_var_from_sym (orig_left_context, block_found, sym);
suffix += 5;
slice_state = SIMPLE_INDEX;
- while (*suffix == 'X')
+ while (*suffix == 'X')
{
suffix += 1;
switch (*suffix) {
+ case 'A':
+ suffix += 1;
+ write_exp_elt_opcode (UNOP_IND);
+ break;
case 'L':
slice_state = LOWER_BOUND;
case 'S':
suffix += 1;
- if (isdigit (*suffix))
+ if (isdigit (*suffix))
{
- char* next;
+ char *next;
long val = strtol (suffix, &next, 10);
- if (next == suffix)
+ if (next == suffix)
goto BadEncoding;
suffix = next;
write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (builtin_type_ada_int);
write_exp_elt_longcst ((LONGEST) val);
write_exp_elt_opcode (OP_LONG);
- }
+ }
else
{
- const char* end;
- char* index_name;
+ const char *end;
+ char *index_name;
int index_len;
- struct symbol* index_sym;
+ struct symbol *index_sym;
end = strchr (suffix, 'X');
- if (end == NULL)
+ if (end == NULL)
end = suffix + strlen (suffix);
-
+
index_len = simple_tail - qualification + 2 + (suffix - end) + 1;
- index_name = (char*) malloc (index_len);
+ index_name
+ = (char *) obstack_alloc (&temp_parse_space, index_len);
memset (index_name, '\000', index_len);
- /* add_name_string_cleanup (index_name);*/
- /* FIXME: add_name_string_cleanup should be defined in
- parser-defs.h, implemented in parse.c */
strncpy (index_name, qualification, simple_tail - qualification);
index_name[simple_tail - qualification] = '\000';
strncat (index_name, suffix, suffix-end);
suffix = end;
- index_sym =
+ index_sym =
lookup_symbol (index_name, NULL, VAR_DOMAIN, 0, NULL);
if (index_sym == NULL)
error ("Could not find %s", index_name);
write_var_from_sym (NULL, block_found, sym);
}
if (slice_state == SIMPLE_INDEX)
- {
+ {
write_exp_elt_opcode (OP_FUNCALL);
write_exp_elt_longcst ((LONGEST) 1);
write_exp_elt_opcode (OP_FUNCALL);
@@ -916,25 +827,25 @@ write_object_renaming (orig_left_context, renaming)
case 'R':
{
struct stoken field_name;
- const char* end;
+ const char *end;
suffix += 1;
-
+
if (slice_state != SIMPLE_INDEX)
goto BadEncoding;
end = strchr (suffix, 'X');
- if (end == NULL)
+ if (end == NULL)
end = suffix + strlen (suffix);
field_name.length = end - suffix;
- field_name.ptr = (char*) malloc (end - suffix + 1);
+ field_name.ptr = (char *) malloc (end - suffix + 1);
strncpy (field_name.ptr, suffix, end - suffix);
field_name.ptr[end - suffix] = '\000';
suffix = end;
write_exp_elt_opcode (STRUCTOP_STRUCT);
write_exp_string (field_name);
- write_exp_elt_opcode (STRUCTOP_STRUCT);
+ write_exp_elt_opcode (STRUCTOP_STRUCT);
break;
}
-
+
default:
goto BadEncoding;
}
@@ -944,15 +855,15 @@ write_object_renaming (orig_left_context, renaming)
BadEncoding:
error ("Internal error in encoding of renaming declaration: %s",
- DEPRECATED_SYMBOL_NAME (renaming));
+ SYMBOL_LINKAGE_NAME (renaming));
}
/* Convert the character literal whose ASCII value would be VAL to the
appropriate value of type TYPE, if there is a translation.
- Otherwise return VAL. Hence, in an enumeration type ('A', 'B'),
- the literal 'A' (VAL == 65), returns 0. */
+ Otherwise return VAL. Hence, in an enumeration type ('A', 'B'),
+ the literal 'A' (VAL == 65), returns 0. */
static LONGEST
-convert_char_literal (struct type* type, LONGEST val)
+convert_char_literal (struct type *type, LONGEST val)
{
char name[7];
int f;
@@ -960,10 +871,16 @@ convert_char_literal (struct type* type, LONGEST val)
if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM)
return val;
sprintf (name, "QU%02x", (int) val);
- for (f = 0; f < TYPE_NFIELDS (type); f += 1)
+ for (f = 0; f < TYPE_NFIELDS (type); f += 1)
{
- if (DEPRECATED_STREQ (name, TYPE_FIELD_NAME (type, f)))
+ if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0)
return TYPE_FIELD_BITPOS (type, f);
}
return val;
}
+
+void
+_initialize_ada_exp (void)
+{
+ obstack_init (&temp_parse_space);
+}
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index b97321b31e9..51c5fb7ed1e 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1,5 +1,5 @@
/* Ada language support routines for GDB, the GNU debugger. Copyright
- 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2003, 2004
+ 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2003, 2004.
Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,12 +18,27 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* Sections of code marked
+
+ #ifdef GNAT_GDB
+ ...
+ #endif
+
+ indicate sections that are used in sources distributed by
+ ACT, Inc., but not yet integrated into the public tree (where
+ GNAT_GDB is not defined). They are retained here nevertheless
+ to minimize the problems of maintaining different versions
+ of the source and to make the full source available. */
+
+#include "defs.h"
#include <stdio.h>
#include "gdb_string.h"
#include <ctype.h>
#include <stdarg.h>
#include "demangle.h"
-#include "defs.h"
+#include "gdb_regex.h"
+#include "frame.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
@@ -36,15 +51,51 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "objfiles.h"
#include "breakpoint.h"
#include "gdbcore.h"
+#include "hashtab.h"
+#include "gdb_obstack.h"
#include "ada-lang.h"
+#include "completer.h"
+#include "gdb_stat.h"
+#ifdef UI_OUT
#include "ui-out.h"
+#endif
#include "block.h"
#include "infcall.h"
#include "dictionary.h"
-struct cleanup *unresolved_names;
+#ifndef ADA_RETAIN_DOTS
+#define ADA_RETAIN_DOTS 0
+#endif
+
+/* Define whether or not the C operator '/' truncates towards zero for
+ differently signed operands (truncation direction is undefined in C).
+ Copied from valarith.c. */
+
+#ifndef TRUNCATION_TOWARDS_ZERO
+#define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2)
+#endif
+
+#ifdef GNAT_GDB
+/* A structure that contains a vector of strings.
+ The main purpose of this type is to group the vector and its
+ associated parameters in one structure. This makes it easier
+ to handle and pass around. */
-void extract_string (CORE_ADDR addr, char *buf);
+struct string_vector
+{
+ char **array; /* The vector itself. */
+ int index; /* Index of the next available element in the array. */
+ size_t size; /* The number of entries allocated in the array. */
+};
+
+static struct string_vector xnew_string_vector (int initial_size);
+static void string_vector_append (struct string_vector *sv, char *str);
+#endif /* GNAT_GDB */
+
+static const char *ada_unqualified_name (const char *decoded_name);
+static char *add_angle_brackets (const char *str);
+static void extract_string (CORE_ADDR addr, char *buf);
+static char *function_name_from_pc (CORE_ADDR pc);
static struct type *ada_create_fundamental_type (struct objfile *, int);
@@ -82,38 +133,45 @@ static int ada_type_match (struct type *, struct type *, int);
static int ada_args_match (struct symbol *, struct value **, int);
-static struct value *place_on_stack (struct value *, CORE_ADDR *);
+static struct value *ensure_lval (struct value *, CORE_ADDR *);
static struct value *convert_actual (struct value *, struct type *,
- CORE_ADDR *);
+ CORE_ADDR *);
static struct value *make_array_descriptor (struct type *, struct value *,
- CORE_ADDR *);
+ CORE_ADDR *);
+
+static void ada_add_block_symbols (struct obstack *,
+ struct block *, const char *,
+ domain_enum, struct objfile *,
+ struct symtab *, int);
-static void ada_add_block_symbols (struct block *, const char *,
- domain_enum, struct objfile *, int);
+static int is_nonfunction (struct ada_symbol_info *, int);
-static void fill_in_ada_prototype (struct symbol *);
+static void add_defn_to_vec (struct obstack *, struct symbol *,
+ struct block *, struct symtab *);
-static int is_nonfunction (struct symbol **, int);
+static int num_defns_collected (struct obstack *);
-static void add_defn_to_vec (struct symbol *, struct block *);
+static struct ada_symbol_info *defns_collected (struct obstack *, int);
static struct partial_symbol *ada_lookup_partial_symbol (struct partial_symtab
- *, const char *, int,
- domain_enum, int);
+ *, const char *, int,
+ domain_enum, int);
static struct symtab *symtab_for_sym (struct symbol *);
-static struct value *ada_resolve_subexp (struct expression **, int *, int,
- struct type *);
+static struct value *resolve_subexp (struct expression **, int *, int,
+ struct type *);
static void replace_operator_with_call (struct expression **, int, int, int,
- struct symbol *, struct block *);
+ struct symbol *, struct block *);
static int possible_user_operator_p (enum exp_opcode, struct value **);
-static const char *ada_op_name (enum exp_opcode);
+static char *ada_op_name (enum exp_opcode);
+
+static const char *ada_decoded_op_name (enum exp_opcode);
static int numeric_type_p (struct type *);
@@ -123,11 +181,14 @@ static int scalar_type_p (struct type *);
static int discrete_type_p (struct type *);
+static struct type *ada_lookup_struct_elt_type (struct type *, char *,
+ int, int, int *);
+
static char *extended_canonical_line_spec (struct symtab_and_line,
- const char *);
+ const char *);
static struct value *evaluate_subexp (struct type *, struct expression *,
- int *, enum noside);
+ int *, enum noside);
static struct value *evaluate_subexp_type (struct expression *, int *);
@@ -136,10 +197,12 @@ static struct type *ada_create_fundamental_type (struct objfile *, int);
static int is_dynamic_field (struct type *, int);
static struct type *to_fixed_variant_branch_type (struct type *, char *,
- CORE_ADDR, struct value *);
+ CORE_ADDR, struct value *);
+
+static struct type *to_fixed_array_type (struct type *, struct value *, int);
static struct type *to_fixed_range_type (char *, struct value *,
- struct objfile *);
+ struct objfile *);
static struct type *to_static_fixed_type (struct type *);
@@ -152,10 +215,10 @@ static struct type *decode_packed_array_type (struct type *);
static struct value *decode_packed_array (struct value *);
static struct value *value_subscript_packed (struct value *, int,
- struct value **);
+ struct value **);
-static struct value *coerce_unspec_val_to_type (struct value *, long,
- struct type *);
+static struct value *coerce_unspec_val_to_type (struct value *,
+ struct type *);
static struct value *get_var_value (char *, char *);
@@ -167,71 +230,225 @@ static int is_name_suffix (const char *);
static int wild_match (const char *, int, const char *);
-static struct symtabs_and_lines find_sal_from_funcs_and_line (const char *,
- int,
- struct symbol
- **, int);
+static struct symtabs_and_lines
+find_sal_from_funcs_and_line (const char *, int,
+ struct ada_symbol_info *, int);
-static int find_line_in_linetable (struct linetable *, int, struct symbol **,
- int, int *);
+static int find_line_in_linetable (struct linetable *, int,
+ struct ada_symbol_info *, int, int *);
static int find_next_line_in_linetable (struct linetable *, int, int, int);
-static struct symtabs_and_lines all_sals_for_line (const char *, int,
- char ***);
-
static void read_all_symtabs (const char *);
static int is_plausible_func_for_line (struct symbol *, int);
static struct value *ada_coerce_ref (struct value *);
+static LONGEST pos_atr (struct value *);
+
static struct value *value_pos_atr (struct value *);
static struct value *value_val_atr (struct type *, struct value *);
-static struct symbol *standard_lookup (const char *, domain_enum);
+static struct symbol *standard_lookup (const char *, const struct block *,
+ domain_enum);
+
+static struct value *ada_search_struct_field (char *, struct value *, int,
+ struct type *);
-extern void markTimeStart (int index);
-extern void markTimeStop (int index);
+static struct value *ada_value_primitive_field (struct value *, int, int,
+ struct type *);
+
+static int find_struct_field (char *, struct type *, int,
+ struct type **, int *, int *, int *);
+
+static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
+ struct value *);
+
+static struct value *ada_to_fixed_value (struct value *);
+
+static void adjust_pc_past_prologue (CORE_ADDR *);
+
+static int ada_resolve_function (struct ada_symbol_info *, int,
+ struct value **, int, const char *,
+ struct type *);
+
+static struct value *ada_coerce_to_simple_array (struct value *);
+
+static int ada_is_direct_array_type (struct type *);
+
+static void error_breakpoint_runtime_sym_not_found (const char *err_desc);
+
+static int is_runtime_sym_defined (const char *name, int allow_tramp);
-/* Maximum-sized dynamic type. */
+/* Maximum-sized dynamic type. */
static unsigned int varsize_limit;
-static const char *ada_completer_word_break_characters =
+/* FIXME: brobecker/2003-09-17: No longer a const because it is
+ returned by a function that does not return a const char *. */
+static char *ada_completer_word_break_characters =
+#ifdef VMS
+ " \t\n!@#%^&*()+=|~`}{[]\";:?/,-";
+#else
" \t\n!@#$%^&*()+=|~`}{[]\";:?/,-";
+#endif
-/* The name of the symbol to use to get the name of the main subprogram */
-#define ADA_MAIN_PROGRAM_SYMBOL_NAME "__gnat_ada_main_program_name"
+/* The name of the symbol to use to get the name of the main subprogram. */
+static const char ADA_MAIN_PROGRAM_SYMBOL_NAME[]
+ = "__gnat_ada_main_program_name";
- /* Utilities */
+/* The name of the runtime function called when an exception is raised. */
+static const char raise_sym_name[] = "__gnat_raise_nodefer_with_msg";
-/* extract_string
- *
- * read the string located at ADDR from the inferior and store the
- * result into BUF
- */
-void
+/* The name of the runtime function called when an unhandled exception
+ is raised. */
+static const char raise_unhandled_sym_name[] = "__gnat_unhandled_exception";
+
+/* The name of the runtime function called when an assert failure is
+ raised. */
+static const char raise_assert_sym_name[] =
+ "system__assertions__raise_assert_failure";
+
+/* When GDB stops on an unhandled exception, GDB will go up the stack until
+ if finds a frame corresponding to this function, in order to extract the
+ name of the exception that has been raised from one of the parameters. */
+static const char process_raise_exception_name[] =
+ "ada__exceptions__process_raise_exception";
+
+/* A string that reflects the longest exception expression rewrite,
+ aside from the exception name. */
+static const char longest_exception_template[] =
+ "'__gnat_raise_nodefer_with_msg' if long_integer(e) = long_integer(&)";
+
+/* Limit on the number of warnings to raise per expression evaluation. */
+static int warning_limit = 2;
+
+/* Number of warning messages issued; reset to 0 by cleanups after
+ expression evaluation. */
+static int warnings_issued = 0;
+
+static const char *known_runtime_file_name_patterns[] = {
+ ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS NULL
+};
+
+static const char *known_auxiliary_function_name_patterns[] = {
+ ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS NULL
+};
+
+/* Space for allocating results of ada_lookup_symbol_list. */
+static struct obstack symbol_list_obstack;
+
+ /* Utilities */
+
+#ifdef GNAT_GDB
+
+/* Create a new empty string_vector struct with an initial size of
+ INITIAL_SIZE. */
+
+static struct string_vector
+xnew_string_vector (int initial_size)
+{
+ struct string_vector result;
+
+ result.array = (char **) xmalloc ((initial_size + 1) * sizeof (char *));
+ result.index = 0;
+ result.size = initial_size;
+
+ return result;
+}
+
+/* Add STR at the end of the given string vector SV. If SV is already
+ full, its size is automatically increased (doubled). */
+
+static void
+string_vector_append (struct string_vector *sv, char *str)
+{
+ if (sv->index >= sv->size)
+ GROW_VECT (sv->array, sv->size, sv->size * 2);
+
+ sv->array[sv->index] = str;
+ sv->index++;
+}
+
+/* Given DECODED_NAME a string holding a symbol name in its
+ decoded form (ie using the Ada dotted notation), returns
+ its unqualified name. */
+
+static const char *
+ada_unqualified_name (const char *decoded_name)
+{
+ const char *result = strrchr (decoded_name, '.');
+
+ if (result != NULL)
+ result++; /* Skip the dot... */
+ else
+ result = decoded_name;
+
+ return result;
+}
+
+/* Return a string starting with '<', followed by STR, and '>'.
+ The result is good until the next call. */
+
+static char *
+add_angle_brackets (const char *str)
+{
+ static char *result = NULL;
+
+ xfree (result);
+ result = (char *) xmalloc ((strlen (str) + 3) * sizeof (char));
+
+ sprintf (result, "<%s>", str);
+ return result;
+}
+
+#endif /* GNAT_GDB */
+
+static char *
+ada_get_gdb_completer_word_break_characters (void)
+{
+ return ada_completer_word_break_characters;
+}
+
+/* Read the string located at ADDR from the inferior and store the
+ result into BUF. */
+
+static void
extract_string (CORE_ADDR addr, char *buf)
{
int char_index = 0;
- /* Loop, reading one byte at a time, until we reach the '\000'
- end-of-string marker */
+ /* Loop, reading one byte at a time, until we reach the '\000'
+ end-of-string marker. */
do
{
target_read_memory (addr + char_index * sizeof (char),
- buf + char_index * sizeof (char), sizeof (char));
+ buf + char_index * sizeof (char), sizeof (char));
char_index++;
}
while (buf[char_index - 1] != '\000');
}
+/* Return the name of the function owning the instruction located at PC.
+ Return NULL if no such function could be found. */
+
+static char *
+function_name_from_pc (CORE_ADDR pc)
+{
+ char *func_name;
+
+ if (!find_pc_partial_function (pc, &func_name, NULL, NULL))
+ return NULL;
+
+ return func_name;
+}
+
/* Assuming *OLD_VECT points to an array of *SIZE objects of size
ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects,
- updating *OLD_VECT and *SIZE as necessary. */
+ updating *OLD_VECT and *SIZE as necessary. */
void
grow_vect (void **old_vect, size_t * size, size_t min_size, int element_size)
@@ -240,27 +457,51 @@ grow_vect (void **old_vect, size_t * size, size_t min_size, int element_size)
{
*size *= 2;
if (*size < min_size)
- *size = min_size;
+ *size = min_size;
*old_vect = xrealloc (*old_vect, *size * element_size);
}
}
/* True (non-zero) iff TARGET matches FIELD_NAME up to any trailing
- suffix of FIELD_NAME beginning "___" */
+ suffix of FIELD_NAME beginning "___". */
static int
field_name_match (const char *field_name, const char *target)
{
int len = strlen (target);
return
- DEPRECATED_STREQN (field_name, target, len)
- && (field_name[len] == '\0'
- || (DEPRECATED_STREQN (field_name + len, "___", 3)
- && !DEPRECATED_STREQ (field_name + strlen (field_name) - 6, "___XVN")));
+ (strncmp (field_name, target, len) == 0
+ && (field_name[len] == '\0'
+ || (strncmp (field_name + len, "___", 3) == 0
+ && strcmp (field_name + strlen (field_name) - 6,
+ "___XVN") != 0)));
}
-/* The length of the prefix of NAME prior to any "___" suffix. */
+/* Assuming TYPE is a TYPE_CODE_STRUCT, find the field whose name matches
+ FIELD_NAME, and return its index. This function also handles fields
+ whose name have ___ suffixes because the compiler sometimes alters
+ their name by adding such a suffix to represent fields with certain
+ constraints. If the field could not be found, return a negative
+ number if MAYBE_MISSING is set. Otherwise raise an error. */
+
+int
+ada_get_field_index (const struct type *type, const char *field_name,
+ int maybe_missing)
+{
+ int fieldno;
+ for (fieldno = 0; fieldno < TYPE_NFIELDS (type); fieldno++)
+ if (field_name_match (TYPE_FIELD_NAME (type, fieldno), field_name))
+ return fieldno;
+
+ if (!maybe_missing)
+ error ("Unable to find field %s in struct %s. Aborting",
+ field_name, TYPE_NAME (type));
+
+ return -1;
+}
+
+/* The length of the prefix of NAME prior to any "___" suffix. */
int
ada_name_prefix_len (const char *name)
@@ -271,13 +512,15 @@ ada_name_prefix_len (const char *name)
{
const char *p = strstr (name, "___");
if (p == NULL)
- return strlen (name);
+ return strlen (name);
else
- return p - name;
+ return p - name;
}
}
-/* SUFFIX is a suffix of STR. False if STR is null. */
+/* Return non-zero if SUFFIX is a suffix of STR.
+ Return zero if STR is null. */
+
static int
is_suffix (const char *str, const char *suffix)
{
@@ -286,15 +529,16 @@ is_suffix (const char *str, const char *suffix)
return 0;
len1 = strlen (str);
len2 = strlen (suffix);
- return (len1 >= len2 && DEPRECATED_STREQ (str + len1 - len2, suffix));
+ return (len1 >= len2 && strcmp (str + len1 - len2, suffix) == 0);
}
/* Create a value of type TYPE whose contents come from VALADDR, if it
- * is non-null, and whose memory address (in the inferior) is
- * ADDRESS. */
+ is non-null, and whose memory address (in the inferior) is
+ ADDRESS. */
+
struct value *
value_from_contents_and_address (struct type *type, char *valaddr,
- CORE_ADDR address)
+ CORE_ADDR address)
{
struct value *v = allocate_value (type);
if (valaddr == NULL)
@@ -307,31 +551,35 @@ value_from_contents_and_address (struct type *type, char *valaddr,
return v;
}
-/* The contents of value VAL, beginning at offset OFFSET, treated as a
- value of type TYPE. The result is an lval in memory if VAL is. */
+/* The contents of value VAL, treated as a value of type TYPE. The
+ result is an lval in memory if VAL is. */
static struct value *
-coerce_unspec_val_to_type (struct value *val, long offset, struct type *type)
+coerce_unspec_val_to_type (struct value *val, struct type *type)
{
CHECK_TYPEDEF (type);
- if (VALUE_LVAL (val) == lval_memory)
- return value_at_lazy (type,
- VALUE_ADDRESS (val) + VALUE_OFFSET (val) + offset,
- NULL);
+ if (VALUE_TYPE (val) == type)
+ return val;
else
{
- struct value *result = allocate_value (type);
- VALUE_LVAL (result) = not_lval;
- if (VALUE_ADDRESS (val) == 0)
- memcpy (VALUE_CONTENTS_RAW (result), VALUE_CONTENTS (val) + offset,
- TYPE_LENGTH (type) > TYPE_LENGTH (VALUE_TYPE (val))
- ? TYPE_LENGTH (VALUE_TYPE (val)) : TYPE_LENGTH (type));
+ struct value *result;
+
+ /* Make sure that the object size is not unreasonable before
+ trying to allocate some memory for it. */
+ if (TYPE_LENGTH (type) > varsize_limit)
+ error ("object size is larger than varsize-limit");
+
+ result = allocate_value (type);
+ VALUE_LVAL (result) = VALUE_LVAL (val);
+ VALUE_BITSIZE (result) = VALUE_BITSIZE (val);
+ VALUE_BITPOS (result) = VALUE_BITPOS (val);
+ VALUE_ADDRESS (result) = VALUE_ADDRESS (val) + VALUE_OFFSET (val);
+ if (VALUE_LAZY (val)
+ || TYPE_LENGTH (type) > TYPE_LENGTH (VALUE_TYPE (val)))
+ VALUE_LAZY (result) = 1;
else
- {
- VALUE_ADDRESS (result) =
- VALUE_ADDRESS (val) + VALUE_OFFSET (val) + offset;
- VALUE_LAZY (result) = 1;
- }
+ memcpy (VALUE_CONTENTS_RAW (result), VALUE_CONTENTS (val),
+ TYPE_LENGTH (type));
return result;
}
}
@@ -354,59 +602,182 @@ cond_offset_target (CORE_ADDR address, long offset)
return address + offset;
}
-/* Perform execute_command on the result of concatenating all
- arguments up to NULL. */
+/* Issue a warning (as for the definition of warning in utils.c, but
+ with exactly one argument rather than ...), unless the limit on the
+ number of warnings has passed during the evaluation of the current
+ expression. */
static void
-do_command (const char *arg, ...)
+lim_warning (const char *format, long arg)
{
- int len;
- char *cmd;
- const char *s;
- va_list ap;
-
- va_start (ap, arg);
- len = 0;
- s = arg;
- cmd = "";
- for (; s != NULL; s = va_arg (ap, const char *))
- {
- char *cmd1;
- len += strlen (s);
- cmd1 = alloca (len + 1);
- strcpy (cmd1, cmd);
- strcat (cmd1, s);
- cmd = cmd1;
- }
- va_end (ap);
- execute_command (cmd, 0);
+ warnings_issued += 1;
+ if (warnings_issued <= warning_limit)
+ warning (format, arg);
+}
+
+static const char *
+ada_translate_error_message (const char *string)
+{
+ if (strcmp (string, "Invalid cast.") == 0)
+ return "Invalid type conversion.";
+ else
+ return string;
+}
+
+/* Note: would have used MAX_OF_TYPE and MIN_OF_TYPE macros from
+ gdbtypes.h, but some of the necessary definitions in that file
+ seem to have gone missing. */
+
+/* Maximum value of a SIZE-byte signed integer type. */
+static LONGEST
+max_of_size (int size)
+{
+ LONGEST top_bit = (LONGEST) 1 << (size * 8 - 2);
+ return top_bit | (top_bit - 1);
+}
+
+/* Minimum value of a SIZE-byte signed integer type. */
+static LONGEST
+min_of_size (int size)
+{
+ return -max_of_size (size) - 1;
+}
+
+/* Maximum value of a SIZE-byte unsigned integer type. */
+static ULONGEST
+umax_of_size (int size)
+{
+ ULONGEST top_bit = (ULONGEST) 1 << (size * 8 - 1);
+ return top_bit | (top_bit - 1);
+}
+
+/* Maximum value of integral type T, as a signed quantity. */
+static LONGEST
+max_of_type (struct type *t)
+{
+ if (TYPE_UNSIGNED (t))
+ return (LONGEST) umax_of_size (TYPE_LENGTH (t));
+ else
+ return max_of_size (TYPE_LENGTH (t));
+}
+
+/* Minimum value of integral type T, as a signed quantity. */
+static LONGEST
+min_of_type (struct type *t)
+{
+ if (TYPE_UNSIGNED (t))
+ return 0;
+ else
+ return min_of_size (TYPE_LENGTH (t));
+}
+
+/* The largest value in the domain of TYPE, a discrete type, as an integer. */
+static struct value *
+discrete_type_high_bound (struct type *type)
+{
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_RANGE:
+ return value_from_longest (TYPE_TARGET_TYPE (type),
+ TYPE_HIGH_BOUND (type));
+ case TYPE_CODE_ENUM:
+ return
+ value_from_longest (type,
+ TYPE_FIELD_BITPOS (type,
+ TYPE_NFIELDS (type) - 1));
+ case TYPE_CODE_INT:
+ return value_from_longest (type, max_of_type (type));
+ default:
+ error ("Unexpected type in discrete_type_high_bound.");
+ }
+}
+
+/* The largest value in the domain of TYPE, a discrete type, as an integer. */
+static struct value *
+discrete_type_low_bound (struct type *type)
+{
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_RANGE:
+ return value_from_longest (TYPE_TARGET_TYPE (type),
+ TYPE_LOW_BOUND (type));
+ case TYPE_CODE_ENUM:
+ return value_from_longest (type, TYPE_FIELD_BITPOS (type, 0));
+ case TYPE_CODE_INT:
+ return value_from_longest (type, min_of_type (type));
+ default:
+ error ("Unexpected type in discrete_type_low_bound.");
+ }
+}
+
+/* The identity on non-range types. For range types, the underlying
+ non-range scalar type. */
+
+static struct type *
+base_type (struct type *type)
+{
+ while (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE)
+ {
+ if (type == TYPE_TARGET_TYPE (type) || TYPE_TARGET_TYPE (type) == NULL)
+ return type;
+ type = TYPE_TARGET_TYPE (type);
+ }
+ return type;
}
- /* Language Selection */
+ /* Language Selection */
/* If the main program is in Ada, return language_ada, otherwise return LANG
(the main program is in Ada iif the adainit symbol is found).
- MAIN_PST is not used. */
+ MAIN_PST is not used. */
enum language
ada_update_initial_language (enum language lang,
- struct partial_symtab *main_pst)
+ struct partial_symtab *main_pst)
{
if (lookup_minimal_symbol ("adainit", (const char *) NULL,
- (struct objfile *) NULL) != NULL)
- /* return language_ada; */
- /* FIXME: language_ada should be defined in defs.h */
- return language_unknown;
+ (struct objfile *) NULL) != NULL)
+ return language_ada;
return lang;
}
-
- /* Symbols */
+/* If the main procedure is written in Ada, then return its name.
+ The result is good until the next call. Return NULL if the main
+ procedure doesn't appear to be in Ada. */
+
+char *
+ada_main_name (void)
+{
+ struct minimal_symbol *msym;
+ CORE_ADDR main_program_name_addr;
+ static char main_program_name[1024];
+ /* For Ada, the name of the main procedure is stored in a specific
+ string constant, generated by the binder. Look for that symbol,
+ extract its address, and then read that string. If we didn't find
+ that string, then most probably the main procedure is not written
+ in Ada. */
+ msym = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
-/* Table of Ada operators and their GNAT-mangled names. Last entry is pair
- of NULLs. */
+ if (msym != NULL)
+ {
+ main_program_name_addr = SYMBOL_VALUE_ADDRESS (msym);
+ if (main_program_name_addr == 0)
+ error ("Invalid address for Ada main program name.");
+
+ extract_string (main_program_name_addr, main_program_name);
+ return main_program_name;
+ }
+
+ /* The main procedure doesn't seem to be in Ada. */
+ return NULL;
+}
+
+ /* Symbols */
+
+/* Table of Ada operators and their GNAT-encoded names. Last entry is pair
+ of NULLs. */
const struct ada_opname_map ada_opname_table[] = {
{"Oadd", "\"+\"", BINOP_ADD},
@@ -433,11 +804,12 @@ const struct ada_opname_map ada_opname_table[] = {
{NULL, NULL}
};
-/* True if STR should be suppressed in info listings. */
+/* Return non-zero if STR should be suppressed in info listings. */
+
static int
is_suppressed_name (const char *str)
{
- if (DEPRECATED_STREQN (str, "_ada_", 5))
+ if (strncmp (str, "_ada_", 5) == 0)
str += 5;
if (str[0] == '_' || str[0] == '\000')
return 1;
@@ -446,81 +818,83 @@ is_suppressed_name (const char *str)
const char *p;
const char *suffix = strstr (str, "___");
if (suffix != NULL && suffix[3] != 'X')
- return 1;
+ return 1;
if (suffix == NULL)
- suffix = str + strlen (str);
+ suffix = str + strlen (str);
for (p = suffix - 1; p != str; p -= 1)
- if (isupper (*p))
- {
- int i;
- if (p[0] == 'X' && p[-1] != '_')
- goto OK;
- if (*p != 'O')
- return 1;
- for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
- if (DEPRECATED_STREQN (ada_opname_table[i].mangled, p,
- strlen (ada_opname_table[i].mangled)))
- goto OK;
- return 1;
- OK:;
- }
+ if (isupper (*p))
+ {
+ int i;
+ if (p[0] == 'X' && p[-1] != '_')
+ goto OK;
+ if (*p != 'O')
+ return 1;
+ for (i = 0; ada_opname_table[i].encoded != NULL; i += 1)
+ if (strncmp (ada_opname_table[i].encoded, p,
+ strlen (ada_opname_table[i].encoded)) == 0)
+ goto OK;
+ return 1;
+ OK:;
+ }
return 0;
}
}
-/* The "mangled" form of DEMANGLED, according to GNAT conventions.
- * The result is valid until the next call to ada_mangle. */
+/* The "encoded" form of DECODED, according to GNAT conventions.
+ The result is valid until the next call to ada_encode. */
+
char *
-ada_mangle (const char *demangled)
+ada_encode (const char *decoded)
{
- static char *mangling_buffer = NULL;
- static size_t mangling_buffer_size = 0;
+ static char *encoding_buffer = NULL;
+ static size_t encoding_buffer_size = 0;
const char *p;
int k;
- if (demangled == NULL)
+ if (decoded == NULL)
return NULL;
- GROW_VECT (mangling_buffer, mangling_buffer_size,
- 2 * strlen (demangled) + 10);
+ GROW_VECT (encoding_buffer, encoding_buffer_size,
+ 2 * strlen (decoded) + 10);
k = 0;
- for (p = demangled; *p != '\0'; p += 1)
+ for (p = decoded; *p != '\0'; p += 1)
{
- if (*p == '.')
- {
- mangling_buffer[k] = mangling_buffer[k + 1] = '_';
- k += 2;
- }
+ if (!ADA_RETAIN_DOTS && *p == '.')
+ {
+ encoding_buffer[k] = encoding_buffer[k + 1] = '_';
+ k += 2;
+ }
else if (*p == '"')
- {
- const struct ada_opname_map *mapping;
-
- for (mapping = ada_opname_table;
- mapping->mangled != NULL &&
- !DEPRECATED_STREQN (mapping->demangled, p, strlen (mapping->demangled));
- p += 1)
- ;
- if (mapping->mangled == NULL)
- error ("invalid Ada operator name: %s", p);
- strcpy (mangling_buffer + k, mapping->mangled);
- k += strlen (mapping->mangled);
- break;
- }
+ {
+ const struct ada_opname_map *mapping;
+
+ for (mapping = ada_opname_table;
+ mapping->encoded != NULL
+ && strncmp (mapping->decoded, p,
+ strlen (mapping->decoded)) != 0; mapping += 1)
+ ;
+ if (mapping->encoded == NULL)
+ error ("invalid Ada operator name: %s", p);
+ strcpy (encoding_buffer + k, mapping->encoded);
+ k += strlen (mapping->encoded);
+ break;
+ }
else
- {
- mangling_buffer[k] = *p;
- k += 1;
- }
+ {
+ encoding_buffer[k] = *p;
+ k += 1;
+ }
}
- mangling_buffer[k] = '\0';
- return mangling_buffer;
+ encoding_buffer[k] = '\0';
+ return encoding_buffer;
}
/* Return NAME folded to lower case, or, if surrounded by single
- * quotes, unfolded, but with the quotes stripped away. Result good
- * to next call. */
+ quotes, unfolded, but with the quotes stripped away. Result good
+ to next call. */
+
char *
ada_fold_name (const char *name)
{
@@ -539,148 +913,242 @@ ada_fold_name (const char *name)
{
int i;
for (i = 0; i <= len; i += 1)
- fold_buffer[i] = tolower (name[i]);
+ fold_buffer[i] = tolower (name[i]);
}
return fold_buffer;
}
-/* Demangle:
- 1. Discard final __{DIGIT}+ or ${DIGIT}+
+/* decode:
+ 0. Discard trailing .{DIGIT}+ or trailing ___{DIGIT}+
+ These are suffixes introduced by GNAT5 to nested subprogram
+ names, and do not serve any purpose for the debugger.
+ 1. Discard final __{DIGIT}+ or $({DIGIT}+(__{DIGIT}+)*)
2. Convert other instances of embedded "__" to `.'.
3. Discard leading _ada_.
4. Convert operator names to the appropriate quoted symbols.
- 5. Remove everything after first ___ if it is followed by
+ 5. Remove everything after first ___ if it is followed by
'X'.
6. Replace TK__ with __, and a trailing B or TKB with nothing.
7. Put symbols that should be suppressed in <...> brackets.
8. Remove trailing X[bn]* suffix (indicating names in package bodies).
- The resulting string is valid until the next call of ada_demangle.
- */
-char *
-ada_demangle (const char *mangled)
+ The resulting string is valid until the next call of ada_decode.
+ If the string is unchanged by demangling, the original string pointer
+ is returned. */
+
+const char *
+ada_decode (const char *encoded)
{
int i, j;
int len0;
const char *p;
- char *demangled;
+ char *decoded;
int at_start_name;
- static char *demangling_buffer = NULL;
- static size_t demangling_buffer_size = 0;
+ static char *decoding_buffer = NULL;
+ static size_t decoding_buffer_size = 0;
- if (DEPRECATED_STREQN (mangled, "_ada_", 5))
- mangled += 5;
+ if (strncmp (encoded, "_ada_", 5) == 0)
+ encoded += 5;
- if (mangled[0] == '_' || mangled[0] == '<')
+ if (encoded[0] == '_' || encoded[0] == '<')
goto Suppress;
- p = strstr (mangled, "___");
- if (p == NULL)
- len0 = strlen (mangled);
- else
+ /* Remove trailing .{DIGIT}+ or ___{DIGIT}+. */
+ len0 = strlen (encoded);
+ if (len0 > 1 && isdigit (encoded[len0 - 1]))
+ {
+ i = len0 - 2;
+ while (i > 0 && isdigit (encoded[i]))
+ i--;
+ if (i >= 0 && encoded[i] == '.')
+ len0 = i;
+ else if (i >= 2 && strncmp (encoded + i - 2, "___", 3) == 0)
+ len0 = i - 2;
+ }
+
+ /* Remove the ___X.* suffix if present. Do not forget to verify that
+ the suffix is located before the current "end" of ENCODED. We want
+ to avoid re-matching parts of ENCODED that have previously been
+ marked as discarded (by decrementing LEN0). */
+ p = strstr (encoded, "___");
+ if (p != NULL && p - encoded < len0 - 3)
{
if (p[3] == 'X')
- len0 = p - mangled;
+ len0 = p - encoded;
else
- goto Suppress;
+ goto Suppress;
}
- if (len0 > 3 && DEPRECATED_STREQ (mangled + len0 - 3, "TKB"))
+
+ if (len0 > 3 && strncmp (encoded + len0 - 3, "TKB", 3) == 0)
len0 -= 3;
- if (len0 > 1 && DEPRECATED_STREQ (mangled + len0 - 1, "B"))
+
+ if (len0 > 1 && strncmp (encoded + len0 - 1, "B", 1) == 0)
len0 -= 1;
- /* Make demangled big enough for possible expansion by operator name. */
- GROW_VECT (demangling_buffer, demangling_buffer_size, 2 * len0 + 1);
- demangled = demangling_buffer;
+ /* Make decoded big enough for possible expansion by operator name. */
+ GROW_VECT (decoding_buffer, decoding_buffer_size, 2 * len0 + 1);
+ decoded = decoding_buffer;
- if (isdigit (mangled[len0 - 1]))
+ if (len0 > 1 && isdigit (encoded[len0 - 1]))
{
- for (i = len0 - 2; i >= 0 && isdigit (mangled[i]); i -= 1)
- ;
- if (i > 1 && mangled[i] == '_' && mangled[i - 1] == '_')
- len0 = i - 1;
- else if (mangled[i] == '$')
- len0 = i;
+ i = len0 - 2;
+ while ((i >= 0 && isdigit (encoded[i]))
+ || (i >= 1 && encoded[i] == '_' && isdigit (encoded[i - 1])))
+ i -= 1;
+ if (i > 1 && encoded[i] == '_' && encoded[i - 1] == '_')
+ len0 = i - 1;
+ else if (encoded[i] == '$')
+ len0 = i;
}
- for (i = 0, j = 0; i < len0 && !isalpha (mangled[i]); i += 1, j += 1)
- demangled[j] = mangled[i];
+ for (i = 0, j = 0; i < len0 && !isalpha (encoded[i]); i += 1, j += 1)
+ decoded[j] = encoded[i];
at_start_name = 1;
while (i < len0)
{
- if (at_start_name && mangled[i] == 'O')
- {
- int k;
- for (k = 0; ada_opname_table[k].mangled != NULL; k += 1)
- {
- int op_len = strlen (ada_opname_table[k].mangled);
- if (DEPRECATED_STREQN
- (ada_opname_table[k].mangled + 1, mangled + i + 1,
- op_len - 1) && !isalnum (mangled[i + op_len]))
- {
- strcpy (demangled + j, ada_opname_table[k].demangled);
- at_start_name = 0;
- i += op_len;
- j += strlen (ada_opname_table[k].demangled);
- break;
- }
- }
- if (ada_opname_table[k].mangled != NULL)
- continue;
- }
+ if (at_start_name && encoded[i] == 'O')
+ {
+ int k;
+ for (k = 0; ada_opname_table[k].encoded != NULL; k += 1)
+ {
+ int op_len = strlen (ada_opname_table[k].encoded);
+ if ((strncmp (ada_opname_table[k].encoded + 1, encoded + i + 1,
+ op_len - 1) == 0)
+ && !isalnum (encoded[i + op_len]))
+ {
+ strcpy (decoded + j, ada_opname_table[k].decoded);
+ at_start_name = 0;
+ i += op_len;
+ j += strlen (ada_opname_table[k].decoded);
+ break;
+ }
+ }
+ if (ada_opname_table[k].encoded != NULL)
+ continue;
+ }
at_start_name = 0;
- if (i < len0 - 4 && DEPRECATED_STREQN (mangled + i, "TK__", 4))
- i += 2;
- if (mangled[i] == 'X' && i != 0 && isalnum (mangled[i - 1]))
- {
- do
- i += 1;
- while (i < len0 && (mangled[i] == 'b' || mangled[i] == 'n'));
- if (i < len0)
- goto Suppress;
- }
- else if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_')
- {
- demangled[j] = '.';
- at_start_name = 1;
- i += 2;
- j += 1;
- }
+ if (i < len0 - 4 && strncmp (encoded + i, "TK__", 4) == 0)
+ i += 2;
+ if (encoded[i] == 'X' && i != 0 && isalnum (encoded[i - 1]))
+ {
+ do
+ i += 1;
+ while (i < len0 && (encoded[i] == 'b' || encoded[i] == 'n'));
+ if (i < len0)
+ goto Suppress;
+ }
+ else if (!ADA_RETAIN_DOTS
+ && i < len0 - 2 && encoded[i] == '_' && encoded[i + 1] == '_')
+ {
+ decoded[j] = '.';
+ at_start_name = 1;
+ i += 2;
+ j += 1;
+ }
else
- {
- demangled[j] = mangled[i];
- i += 1;
- j += 1;
- }
+ {
+ decoded[j] = encoded[i];
+ i += 1;
+ j += 1;
+ }
}
- demangled[j] = '\000';
+ decoded[j] = '\000';
- for (i = 0; demangled[i] != '\0'; i += 1)
- if (isupper (demangled[i]) || demangled[i] == ' ')
+ for (i = 0; decoded[i] != '\0'; i += 1)
+ if (isupper (decoded[i]) || decoded[i] == ' ')
goto Suppress;
- return demangled;
+ if (strcmp (decoded, encoded) == 0)
+ return encoded;
+ else
+ return decoded;
Suppress:
- GROW_VECT (demangling_buffer, demangling_buffer_size, strlen (mangled) + 3);
- demangled = demangling_buffer;
- if (mangled[0] == '<')
- strcpy (demangled, mangled);
+ GROW_VECT (decoding_buffer, decoding_buffer_size, strlen (encoded) + 3);
+ decoded = decoding_buffer;
+ if (encoded[0] == '<')
+ strcpy (decoded, encoded);
else
- sprintf (demangled, "<%s>", mangled);
- return demangled;
+ sprintf (decoded, "<%s>", encoded);
+ return decoded;
+
+}
+
+/* Table for keeping permanent unique copies of decoded names. Once
+ allocated, names in this table are never released. While this is a
+ storage leak, it should not be significant unless there are massive
+ changes in the set of decoded names in successive versions of a
+ symbol table loaded during a single session. */
+static struct htab *decoded_names_store;
+
+/* Returns the decoded name of GSYMBOL, as for ada_decode, caching it
+ in the language-specific part of GSYMBOL, if it has not been
+ previously computed. Tries to save the decoded name in the same
+ obstack as GSYMBOL, if possible, and otherwise on the heap (so that,
+ in any case, the decoded symbol has a lifetime at least that of
+ GSYMBOL).
+ The GSYMBOL parameter is "mutable" in the C++ sense: logically
+ const, but nevertheless modified to a semantically equivalent form
+ when a decoded name is cached in it.
+*/
+
+char *
+ada_decode_symbol (const struct general_symbol_info *gsymbol)
+{
+ char **resultp =
+ (char **) &gsymbol->language_specific.cplus_specific.demangled_name;
+ if (*resultp == NULL)
+ {
+ const char *decoded = ada_decode (gsymbol->name);
+ if (gsymbol->bfd_section != NULL)
+ {
+ bfd *obfd = gsymbol->bfd_section->owner;
+ if (obfd != NULL)
+ {
+ struct objfile *objf;
+ ALL_OBJFILES (objf)
+ {
+ if (obfd == objf->obfd)
+ {
+ *resultp = obsavestring (decoded, strlen (decoded),
+ &objf->objfile_obstack);
+ break;
+ }
+ }
+ }
+ }
+ /* Sometimes, we can't find a corresponding objfile, in which
+ case, we put the result on the heap. Since we only decode
+ when needed, we hope this usually does not cause a
+ significant memory leak (FIXME). */
+ if (*resultp == NULL)
+ {
+ char **slot = (char **) htab_find_slot (decoded_names_store,
+ decoded, INSERT);
+ if (*slot == NULL)
+ *slot = xstrdup (decoded);
+ *resultp = *slot;
+ }
+ }
+
+ return *resultp;
+}
+char *
+ada_la_decode (const char *encoded, int options)
+{
+ return xstrdup (ada_decode (encoded));
}
/* Returns non-zero iff SYM_NAME matches NAME, ignoring any trailing
- * suffixes that encode debugging information or leading _ada_ on
- * SYM_NAME (see is_name_suffix commentary for the debugging
- * information that is ignored). If WILD, then NAME need only match a
- * suffix of SYM_NAME minus the same suffixes. Also returns 0 if
- * either argument is NULL. */
+ suffixes that encode debugging information or leading _ada_ on
+ SYM_NAME (see is_name_suffix commentary for the debugging
+ information that is ignored). If WILD, then NAME need only match a
+ suffix of SYM_NAME minus the same suffixes. Also returns 0 if
+ either argument is NULL. */
int
ada_match_name (const char *sym_name, const char *name, int wild)
@@ -692,16 +1160,16 @@ ada_match_name (const char *sym_name, const char *name, int wild)
else
{
int len_name = strlen (name);
- return (DEPRECATED_STREQN (sym_name, name, len_name)
- && is_name_suffix (sym_name + len_name))
- || (DEPRECATED_STREQN (sym_name, "_ada_", 5)
- && DEPRECATED_STREQN (sym_name + 5, name, len_name)
- && is_name_suffix (sym_name + len_name + 5));
+ return (strncmp (sym_name, name, len_name) == 0
+ && is_name_suffix (sym_name + len_name))
+ || (strncmp (sym_name, "_ada_", 5) == 0
+ && strncmp (sym_name + 5, name, len_name) == 0
+ && is_name_suffix (sym_name + len_name + 5));
}
}
-/* True (non-zero) iff in Ada mode, the symbol SYM should be
- suppressed in info listings. */
+/* True (non-zero) iff, in Ada mode, the symbol SYM should be
+ suppressed in info listings. */
int
ada_suppress_symbol_printing (struct symbol *sym)
@@ -709,14 +1177,13 @@ ada_suppress_symbol_printing (struct symbol *sym)
if (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)
return 1;
else
- return is_suppressed_name (DEPRECATED_SYMBOL_NAME (sym));
+ return is_suppressed_name (SYMBOL_LINKAGE_NAME (sym));
}
- /* Arrays */
+ /* Arrays */
-/* Names of MAX_ADA_DIMENS bounds in P_BOUNDS fields of
- array descriptors. */
+/* Names of MAX_ADA_DIMENS bounds in P_BOUNDS fields of array descriptors. */
static char *bound_name[] = {
"LB0", "UB0", "LB1", "UB1", "LB2", "UB2", "LB3", "UB3",
@@ -725,36 +1192,39 @@ static char *bound_name[] = {
/* Maximum number of array dimensions we are prepared to handle. */
-#define MAX_ADA_DIMENS (sizeof(bound_name) / (2*sizeof(char*)))
+#define MAX_ADA_DIMENS (sizeof(bound_name) / (2*sizeof(char *)))
-/* Like modify_field, but allows bitpos > wordlength. */
+/* Like modify_field, but allows bitpos > wordlength. */
static void
modify_general_field (char *addr, LONGEST fieldval, int bitpos, int bitsize)
{
- modify_field (addr + sizeof (LONGEST) * bitpos / (8 * sizeof (LONGEST)),
- fieldval, bitpos % (8 * sizeof (LONGEST)), bitsize);
+ modify_field (addr + bitpos / 8, fieldval, bitpos % 8, bitsize);
}
-/* The desc_* routines return primitive portions of array descriptors
- (fat pointers). */
+/* The desc_* routines return primitive portions of array descriptors
+ (fat pointers). */
/* The descriptor or array type, if any, indicated by TYPE; removes
- level of indirection, if needed. */
+ level of indirection, if needed. */
+
static struct type *
desc_base_type (struct type *type)
{
if (type == NULL)
return NULL;
CHECK_TYPEDEF (type);
- if (type != NULL && TYPE_CODE (type) == TYPE_CODE_PTR)
+ if (type != NULL
+ && (TYPE_CODE (type) == TYPE_CODE_PTR
+ || TYPE_CODE (type) == TYPE_CODE_REF))
return check_typedef (TYPE_TARGET_TYPE (type));
else
return type;
}
-/* True iff TYPE indicates a "thin" array pointer type. */
+/* True iff TYPE indicates a "thin" array pointer type. */
+
static int
is_thin_pntr (struct type *type)
{
@@ -763,7 +1233,8 @@ is_thin_pntr (struct type *type)
|| is_suffix (ada_type_name (desc_base_type (type)), "___XUT___XVE");
}
-/* The descriptor type for thin pointer type TYPE. */
+/* The descriptor type for thin pointer type TYPE. */
+
static struct type *
thin_descriptor_type (struct type *type)
{
@@ -776,36 +1247,39 @@ thin_descriptor_type (struct type *type)
{
struct type *alt_type = ada_find_parallel_type (base_type, "___XVE");
if (alt_type == NULL)
- return base_type;
+ return base_type;
else
- return alt_type;
+ return alt_type;
}
}
-/* A pointer to the array data for thin-pointer value VAL. */
+/* A pointer to the array data for thin-pointer value VAL. */
+
static struct value *
thin_data_pntr (struct value *val)
{
struct type *type = VALUE_TYPE (val);
if (TYPE_CODE (type) == TYPE_CODE_PTR)
return value_cast (desc_data_type (thin_descriptor_type (type)),
- value_copy (val));
+ value_copy (val));
else
return value_from_longest (desc_data_type (thin_descriptor_type (type)),
- VALUE_ADDRESS (val) + VALUE_OFFSET (val));
+ VALUE_ADDRESS (val) + VALUE_OFFSET (val));
}
-/* True iff TYPE indicates a "thick" array pointer type. */
+/* True iff TYPE indicates a "thick" array pointer type. */
+
static int
is_thick_pntr (struct type *type)
{
type = desc_base_type (type);
return (type != NULL && TYPE_CODE (type) == TYPE_CODE_STRUCT
- && lookup_struct_elt_type (type, "P_BOUNDS", 1) != NULL);
+ && lookup_struct_elt_type (type, "P_BOUNDS", 1) != NULL);
}
-/* If TYPE is the type of an array descriptor (fat or thin pointer) or a
- pointer to one, the type of its bounds data; otherwise, NULL. */
+/* If TYPE is the type of an array descriptor (fat or thin pointer) or a
+ pointer to one, the type of its bounds data; otherwise, NULL. */
+
static struct type *
desc_bounds_type (struct type *type)
{
@@ -819,22 +1293,23 @@ desc_bounds_type (struct type *type)
{
type = thin_descriptor_type (type);
if (type == NULL)
- return NULL;
+ return NULL;
r = lookup_struct_elt_type (type, "BOUNDS", 1);
if (r != NULL)
- return check_typedef (r);
+ return check_typedef (r);
}
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
{
r = lookup_struct_elt_type (type, "P_BOUNDS", 1);
if (r != NULL)
- return check_typedef (TYPE_TARGET_TYPE (check_typedef (r)));
+ return check_typedef (TYPE_TARGET_TYPE (check_typedef (r)));
}
return NULL;
}
/* If ARR is an array descriptor (fat or thin pointer), or pointer to
- one, a pointer to its bounds data. Otherwise NULL. */
+ one, a pointer to its bounds data. Otherwise NULL. */
+
static struct value *
desc_bounds (struct value *arr)
{
@@ -842,34 +1317,35 @@ desc_bounds (struct value *arr)
if (is_thin_pntr (type))
{
struct type *bounds_type =
- desc_bounds_type (thin_descriptor_type (type));
+ desc_bounds_type (thin_descriptor_type (type));
LONGEST addr;
if (desc_bounds_type == NULL)
- error ("Bad GNAT array descriptor");
+ error ("Bad GNAT array descriptor");
/* NOTE: The following calculation is not really kosher, but
since desc_type is an XVE-encoded type (and shouldn't be),
- the correct calculation is a real pain. FIXME (and fix GCC). */
+ the correct calculation is a real pain. FIXME (and fix GCC). */
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- addr = value_as_long (arr);
+ addr = value_as_long (arr);
else
- addr = VALUE_ADDRESS (arr) + VALUE_OFFSET (arr);
+ addr = VALUE_ADDRESS (arr) + VALUE_OFFSET (arr);
return
- value_from_longest (lookup_pointer_type (bounds_type),
- addr - TYPE_LENGTH (bounds_type));
+ value_from_longest (lookup_pointer_type (bounds_type),
+ addr - TYPE_LENGTH (bounds_type));
}
else if (is_thick_pntr (type))
return value_struct_elt (&arr, NULL, "P_BOUNDS", NULL,
- "Bad GNAT array descriptor");
+ "Bad GNAT array descriptor");
else
return NULL;
}
-/* If TYPE is the type of an array-descriptor (fat pointer), the bit
- position of the field containing the address of the bounds data. */
+/* If TYPE is the type of an array-descriptor (fat pointer), the bit
+ position of the field containing the address of the bounds data. */
+
static int
fat_pntr_bounds_bitpos (struct type *type)
{
@@ -877,7 +1353,8 @@ fat_pntr_bounds_bitpos (struct type *type)
}
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
- size of the field containing the address of the bounds data. */
+ size of the field containing the address of the bounds data. */
+
static int
fat_pntr_bounds_bitsize (struct type *type)
{
@@ -889,16 +1366,17 @@ fat_pntr_bounds_bitsize (struct type *type)
return 8 * TYPE_LENGTH (check_typedef (TYPE_FIELD_TYPE (type, 1)));
}
-/* If TYPE is the type of an array descriptor (fat or thin pointer) or a
+/* If TYPE is the type of an array descriptor (fat or thin pointer) or a
pointer to one, the type of its array data (a
- pointer-to-array-with-no-bounds type); otherwise, NULL. Use
- ada_type_of_array to get an array type with bounds data. */
+ pointer-to-array-with-no-bounds type); otherwise, NULL. Use
+ ada_type_of_array to get an array type with bounds data. */
+
static struct type *
desc_data_type (struct type *type)
{
type = desc_base_type (type);
- /* NOTE: The following is bogus; see comment in desc_bounds. */
+ /* NOTE: The following is bogus; see comment in desc_bounds. */
if (is_thin_pntr (type))
return lookup_pointer_type
(desc_base_type (TYPE_FIELD_TYPE (thin_descriptor_type (type), 1)));
@@ -910,6 +1388,7 @@ desc_data_type (struct type *type)
/* If ARR is an array descriptor (fat or thin pointer), a pointer to
its array data. */
+
static struct value *
desc_data (struct value *arr)
{
@@ -918,14 +1397,15 @@ desc_data (struct value *arr)
return thin_data_pntr (arr);
else if (is_thick_pntr (type))
return value_struct_elt (&arr, NULL, "P_ARRAY", NULL,
- "Bad GNAT array descriptor");
+ "Bad GNAT array descriptor");
else
return NULL;
}
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
- position of the field containing the address of the data. */
+ position of the field containing the address of the data. */
+
static int
fat_pntr_data_bitpos (struct type *type)
{
@@ -933,7 +1413,8 @@ fat_pntr_data_bitpos (struct type *type)
}
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
- size of the field containing the address of the data. */
+ size of the field containing the address of the data. */
+
static int
fat_pntr_data_bitsize (struct type *type)
{
@@ -945,19 +1426,21 @@ fat_pntr_data_bitsize (struct type *type)
return TARGET_CHAR_BIT * TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0));
}
-/* If BOUNDS is an array-bounds structure (or pointer to one), return
+/* If BOUNDS is an array-bounds structure (or pointer to one), return
the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
- bound, if WHICH is 1. The first bound is I=1. */
+ bound, if WHICH is 1. The first bound is I=1. */
+
static struct value *
desc_one_bound (struct value *bounds, int i, int which)
{
return value_struct_elt (&bounds, NULL, bound_name[2 * i + which - 2], NULL,
- "Bad GNAT array descriptor bounds");
+ "Bad GNAT array descriptor bounds");
}
/* If BOUNDS is an array-bounds structure type, return the bit position
of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
- bound, if WHICH is 1. The first bound is I=1. */
+ bound, if WHICH is 1. The first bound is I=1. */
+
static int
desc_bound_bitpos (struct type *type, int i, int which)
{
@@ -966,7 +1449,8 @@ desc_bound_bitpos (struct type *type, int i, int which)
/* If BOUNDS is an array-bounds structure type, return the bit field size
of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
- bound, if WHICH is 1. The first bound is I=1. */
+ bound, if WHICH is 1. The first bound is I=1. */
+
static int
desc_bound_bitsize (struct type *type, int i, int which)
{
@@ -979,7 +1463,8 @@ desc_bound_bitsize (struct type *type, int i, int which)
}
/* If TYPE is the type of an array-bounds structure, the type of its
- Ith bound (numbering from 1). Otherwise, NULL. */
+ Ith bound (numbering from 1). Otherwise, NULL. */
+
static struct type *
desc_index_type (struct type *type, int i)
{
@@ -991,8 +1476,9 @@ desc_index_type (struct type *type, int i)
return NULL;
}
-/* The number of index positions in the array-bounds type TYPE. 0
- if TYPE is NULL. */
+/* The number of index positions in the array-bounds type TYPE.
+ Return 0 if TYPE is NULL. */
+
static int
desc_arity (struct type *type)
{
@@ -1003,22 +1489,37 @@ desc_arity (struct type *type)
return 0;
}
+/* Non-zero iff TYPE is a simple array type (not a pointer to one) or
+ an array descriptor type (representing an unconstrained array
+ type). */
+
+static int
+ada_is_direct_array_type (struct type *type)
+{
+ if (type == NULL)
+ return 0;
+ CHECK_TYPEDEF (type);
+ return (TYPE_CODE (type) == TYPE_CODE_ARRAY
+ || ada_is_array_descriptor_type (type));
+}
+
+/* Non-zero iff TYPE is a simple array type or pointer to one. */
-/* Non-zero iff type is a simple array type (or pointer to one). */
int
-ada_is_simple_array (struct type *type)
+ada_is_simple_array_type (struct type *type)
{
if (type == NULL)
return 0;
CHECK_TYPEDEF (type);
return (TYPE_CODE (type) == TYPE_CODE_ARRAY
- || (TYPE_CODE (type) == TYPE_CODE_PTR
- && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY));
+ || (TYPE_CODE (type) == TYPE_CODE_PTR
+ && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY));
}
-/* Non-zero iff type belongs to a GNAT array descriptor. */
+/* Non-zero iff TYPE belongs to a GNAT array descriptor. */
+
int
-ada_is_array_descriptor (struct type *type)
+ada_is_array_descriptor_type (struct type *type)
{
struct type *data_type = desc_data_type (type);
@@ -1028,17 +1529,17 @@ ada_is_array_descriptor (struct type *type)
return
data_type != NULL
&& ((TYPE_CODE (data_type) == TYPE_CODE_PTR
- && TYPE_TARGET_TYPE (data_type) != NULL
- && TYPE_CODE (TYPE_TARGET_TYPE (data_type)) == TYPE_CODE_ARRAY)
- ||
- TYPE_CODE (data_type) == TYPE_CODE_ARRAY)
+ && TYPE_TARGET_TYPE (data_type) != NULL
+ && TYPE_CODE (TYPE_TARGET_TYPE (data_type)) == TYPE_CODE_ARRAY)
+ || TYPE_CODE (data_type) == TYPE_CODE_ARRAY)
&& desc_arity (desc_bounds_type (type)) > 0;
}
/* Non-zero iff type is a partially mal-formed GNAT array
- descriptor. (FIXME: This is to compensate for some problems with
+ descriptor. FIXME: This is to compensate for some problems with
debugging output from GNAT. Re-examine periodically to see if it
- is still needed. */
+ is still needed. */
+
int
ada_is_bogus_array_descriptor (struct type *type)
{
@@ -1046,17 +1547,17 @@ ada_is_bogus_array_descriptor (struct type *type)
type != NULL
&& TYPE_CODE (type) == TYPE_CODE_STRUCT
&& (lookup_struct_elt_type (type, "P_BOUNDS", 1) != NULL
- || lookup_struct_elt_type (type, "P_ARRAY", 1) != NULL)
- && !ada_is_array_descriptor (type);
+ || lookup_struct_elt_type (type, "P_ARRAY", 1) != NULL)
+ && !ada_is_array_descriptor_type (type);
}
-/* If ARR has a record type in the form of a standard GNAT array descriptor,
+/* If ARR has a record type in the form of a standard GNAT array descriptor,
(fat pointer) returns the type of the array data described---specifically,
- a pointer-to-array type. If BOUNDS is non-zero, the bounds data are filled
+ a pointer-to-array type. If BOUNDS is non-zero, the bounds data are filled
in from the descriptor; otherwise, they are left unspecified. If
- the ARR denotes a null array descriptor and BOUNDS is non-zero,
- returns NULL. The result is simply the type of ARR if ARR is not
+ the ARR denotes a null array descriptor and BOUNDS is non-zero,
+ returns NULL. The result is simply the type of ARR if ARR is not
a descriptor. */
struct type *
ada_type_of_array (struct value *arr, int bounds)
@@ -1064,7 +1565,7 @@ ada_type_of_array (struct value *arr, int bounds)
if (ada_is_packed_array_type (VALUE_TYPE (arr)))
return decode_packed_array_type (VALUE_TYPE (arr));
- if (!ada_is_array_descriptor (VALUE_TYPE (arr)))
+ if (!ada_is_array_descriptor_type (VALUE_TYPE (arr)))
return VALUE_TYPE (arr);
if (!bounds)
@@ -1081,41 +1582,42 @@ ada_type_of_array (struct value *arr, int bounds)
arity = ada_array_arity (VALUE_TYPE (arr));
if (elt_type == NULL || arity == 0)
- return check_typedef (VALUE_TYPE (arr));
+ return check_typedef (VALUE_TYPE (arr));
descriptor = desc_bounds (arr);
if (value_as_long (descriptor) == 0)
- return NULL;
+ return NULL;
while (arity > 0)
- {
- struct type *range_type = alloc_type (objf);
- struct type *array_type = alloc_type (objf);
- struct value *low = desc_one_bound (descriptor, arity, 0);
- struct value *high = desc_one_bound (descriptor, arity, 1);
- arity -= 1;
-
- create_range_type (range_type, VALUE_TYPE (low),
- (int) value_as_long (low),
- (int) value_as_long (high));
- elt_type = create_array_type (array_type, elt_type, range_type);
- }
+ {
+ struct type *range_type = alloc_type (objf);
+ struct type *array_type = alloc_type (objf);
+ struct value *low = desc_one_bound (descriptor, arity, 0);
+ struct value *high = desc_one_bound (descriptor, arity, 1);
+ arity -= 1;
+
+ create_range_type (range_type, VALUE_TYPE (low),
+ (int) value_as_long (low),
+ (int) value_as_long (high));
+ elt_type = create_array_type (array_type, elt_type, range_type);
+ }
return lookup_pointer_type (elt_type);
}
}
/* If ARR does not represent an array, returns ARR unchanged.
- Otherwise, returns either a standard GDB array with bounds set
- appropriately or, if ARR is a non-null fat pointer, a pointer to a standard
- GDB array. Returns NULL if ARR is a null fat pointer. */
+ Otherwise, returns either a standard GDB array with bounds set
+ appropriately or, if ARR is a non-null fat pointer, a pointer to a standard
+ GDB array. Returns NULL if ARR is a null fat pointer. */
+
struct value *
ada_coerce_to_simple_array_ptr (struct value *arr)
{
- if (ada_is_array_descriptor (VALUE_TYPE (arr)))
+ if (ada_is_array_descriptor_type (VALUE_TYPE (arr)))
{
struct type *arrType = ada_type_of_array (arr, 1);
if (arrType == NULL)
- return NULL;
+ return NULL;
return value_cast (arrType, value_copy (desc_data (arr)));
}
else if (ada_is_packed_array_type (VALUE_TYPE (arr)))
@@ -1126,15 +1628,16 @@ ada_coerce_to_simple_array_ptr (struct value *arr)
/* If ARR does not represent an array, returns ARR unchanged.
Otherwise, returns a standard GDB array describing ARR (which may
- be ARR itself if it already is in the proper form). */
-struct value *
+ be ARR itself if it already is in the proper form). */
+
+static struct value *
ada_coerce_to_simple_array (struct value *arr)
{
- if (ada_is_array_descriptor (VALUE_TYPE (arr)))
+ if (ada_is_array_descriptor_type (VALUE_TYPE (arr)))
{
struct value *arrVal = ada_coerce_to_simple_array_ptr (arr);
if (arrVal == NULL)
- error ("Bounds unavailable for null array pointer.");
+ error ("Bounds unavailable for null array pointer.");
return value_ind (arrVal);
}
else if (ada_is_packed_array_type (VALUE_TYPE (arr)))
@@ -1145,7 +1648,8 @@ ada_coerce_to_simple_array (struct value *arr)
/* If TYPE represents a GNAT array type, return it translated to an
ordinary GDB array type (possibly with BITSIZE fields indicating
- packing). For other types, is the identity. */
+ packing). For other types, is the identity. */
+
struct type *
ada_coerce_to_simple_array_type (struct type *type)
{
@@ -1154,16 +1658,18 @@ ada_coerce_to_simple_array_type (struct type *type)
struct type *result;
VALUE_TYPE (dummy) = type;
result = ada_type_of_array (dummy, 0);
- value_free_to_mark (dummy);
+ value_free_to_mark (mark);
return result;
}
-/* Non-zero iff TYPE represents a standard GNAT packed-array type. */
+/* Non-zero iff TYPE represents a standard GNAT packed-array type. */
+
int
ada_is_packed_array_type (struct type *type)
{
if (type == NULL)
return 0;
+ type = desc_base_type (type);
CHECK_TYPEDEF (type);
return
ada_type_name (type) != NULL
@@ -1176,8 +1682,9 @@ ada_is_packed_array_type (struct type *type)
elements' elements, etc.) is *ELT_BITS, return an identical type,
but with the bit sizes of its elements (and those of any
constituent arrays) recorded in the BITSIZE components of its
- TYPE_FIELD_BITSIZE values, and with *ELT_BITS set to its total size
- in bits. */
+ TYPE_FIELD_BITSIZE values, and with *ELT_BITS set to its total size
+ in bits. */
+
static struct type *
packed_array_type (struct type *type, long *elt_bits)
{
@@ -1191,13 +1698,13 @@ packed_array_type (struct type *type, long *elt_bits)
new_type = alloc_type (TYPE_OBJFILE (type));
new_elt_type = packed_array_type (check_typedef (TYPE_TARGET_TYPE (type)),
- elt_bits);
+ elt_bits);
create_array_type (new_type, new_elt_type, TYPE_FIELD_TYPE (type, 0));
TYPE_FIELD_BITSIZE (new_type, 0) = *elt_bits;
TYPE_NAME (new_type) = ada_type_name (type);
if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0),
- &low_bound, &high_bound) < 0)
+ &low_bound, &high_bound) < 0)
low_bound = high_bound = 0;
if (high_bound < low_bound)
*elt_bits = TYPE_LENGTH (new_type) = 0;
@@ -1205,20 +1712,19 @@ packed_array_type (struct type *type, long *elt_bits)
{
*elt_bits *= (high_bound - low_bound + 1);
TYPE_LENGTH (new_type) =
- (*elt_bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
+ (*elt_bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
}
- /* TYPE_FLAGS (new_type) |= TYPE_FLAG_FIXED_INSTANCE; */
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
+ TYPE_FLAGS (new_type) |= TYPE_FLAG_FIXED_INSTANCE;
return new_type;
}
-/* The array type encoded by TYPE, where ada_is_packed_array_type (TYPE).
- */
+/* The array type encoded by TYPE, where ada_is_packed_array_type (TYPE). */
+
static struct type *
decode_packed_array_type (struct type *type)
{
- struct symbol **syms;
+ struct symbol *sym;
struct block **blocks;
const char *raw_name = ada_type_name (check_typedef (type));
char *name = (char *) alloca (strlen (raw_name) + 1);
@@ -1227,62 +1733,63 @@ decode_packed_array_type (struct type *type)
long bits;
int i, n;
+ type = desc_base_type (type);
+
memcpy (name, raw_name, tail - raw_name);
name[tail - raw_name] = '\000';
- /* NOTE: Use ada_lookup_symbol_list because of bug in some versions
- * of gcc (Solaris, e.g.). FIXME when compiler is fixed. */
- n = ada_lookup_symbol_list (name, get_selected_block (NULL),
- VAR_DOMAIN, &syms, &blocks);
- for (i = 0; i < n; i += 1)
- if (syms[i] != NULL && SYMBOL_CLASS (syms[i]) == LOC_TYPEDEF
- && DEPRECATED_STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i]))))
- break;
- if (i >= n)
+ sym = standard_lookup (name, get_selected_block (0), VAR_DOMAIN);
+ if (sym == NULL || SYMBOL_TYPE (sym) == NULL)
{
- warning ("could not find bounds information on packed array");
+ lim_warning ("could not find bounds information on packed array", 0);
return NULL;
}
- shadow_type = SYMBOL_TYPE (syms[i]);
+ shadow_type = SYMBOL_TYPE (sym);
if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
{
- warning ("could not understand bounds information on packed array");
+ lim_warning ("could not understand bounds information on packed array",
+ 0);
return NULL;
}
if (sscanf (tail + sizeof ("___XP") - 1, "%ld", &bits) != 1)
{
- warning ("could not understand bit size information on packed array");
+ lim_warning
+ ("could not understand bit size information on packed array", 0);
return NULL;
}
return packed_array_type (shadow_type, &bits);
}
-/* Given that ARR is a struct value* indicating a GNAT packed array,
+/* Given that ARR is a struct value *indicating a GNAT packed array,
returns a simple array that denotes that array. Its type is a
standard GDB array type except that the BITSIZEs of the array
target types are set to the number of bits in each element, and the
- type length is set appropriately. */
+ type length is set appropriately. */
static struct value *
decode_packed_array (struct value *arr)
{
- struct type *type = decode_packed_array_type (VALUE_TYPE (arr));
+ struct type *type;
+ arr = ada_coerce_ref (arr);
+ if (TYPE_CODE (VALUE_TYPE (arr)) == TYPE_CODE_PTR)
+ arr = ada_value_ind (arr);
+
+ type = decode_packed_array_type (VALUE_TYPE (arr));
if (type == NULL)
{
error ("can't unpack array");
return NULL;
}
- else
- return coerce_unspec_val_to_type (arr, 0, type);
+ return coerce_unspec_val_to_type (arr, type);
}
/* The value of the element of packed array ARR at the ARITY indices
- given in IND. ARR must be a simple array. */
+ given in IND. ARR must be a simple array. */
static struct value *
value_subscript_packed (struct value *arr, int arity, struct value **ind)
@@ -1299,34 +1806,34 @@ value_subscript_packed (struct value *arr, int arity, struct value **ind)
for (i = 0; i < arity; i += 1)
{
if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY
- || TYPE_FIELD_BITSIZE (elt_type, 0) == 0)
- error
- ("attempt to do packed indexing of something other than a packed array");
+ || TYPE_FIELD_BITSIZE (elt_type, 0) == 0)
+ error
+ ("attempt to do packed indexing of something other than a packed array");
else
- {
- struct type *range_type = TYPE_INDEX_TYPE (elt_type);
- LONGEST lowerbound, upperbound;
- LONGEST idx;
-
- if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
- {
- warning ("don't know bounds of array");
- lowerbound = upperbound = 0;
- }
-
- idx = value_as_long (value_pos_atr (ind[i]));
- if (idx < lowerbound || idx > upperbound)
- warning ("packed array index %ld out of bounds", (long) idx);
- bits = TYPE_FIELD_BITSIZE (elt_type, 0);
- elt_total_bit_offset += (idx - lowerbound) * bits;
- elt_type = check_typedef (TYPE_TARGET_TYPE (elt_type));
- }
+ {
+ struct type *range_type = TYPE_INDEX_TYPE (elt_type);
+ LONGEST lowerbound, upperbound;
+ LONGEST idx;
+
+ if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
+ {
+ lim_warning ("don't know bounds of array", 0);
+ lowerbound = upperbound = 0;
+ }
+
+ idx = value_as_long (value_pos_atr (ind[i]));
+ if (idx < lowerbound || idx > upperbound)
+ lim_warning ("packed array index %ld out of bounds", (long) idx);
+ bits = TYPE_FIELD_BITSIZE (elt_type, 0);
+ elt_total_bit_offset += (idx - lowerbound) * bits;
+ elt_type = check_typedef (TYPE_TARGET_TYPE (elt_type));
+ }
}
elt_off = elt_total_bit_offset / HOST_CHAR_BIT;
bit_off = elt_total_bit_offset % HOST_CHAR_BIT;
v = ada_value_primitive_packed_val (arr, NULL, elt_off, bit_off,
- bits, elt_type);
+ bits, elt_type);
if (VALUE_LVAL (arr) == lval_internalvar)
VALUE_LVAL (v) = lval_internalvar_component;
else
@@ -1334,7 +1841,7 @@ value_subscript_packed (struct value *arr, int arity, struct value **ind)
return v;
}
-/* Non-zero iff TYPE includes negative integer values. */
+/* Non-zero iff TYPE includes negative integer values. */
static int
has_negatives (struct type *type)
@@ -1354,32 +1861,32 @@ has_negatives (struct type *type)
/* Create a new value of type TYPE from the contents of OBJ starting
at byte OFFSET, and bit offset BIT_OFFSET within that byte,
proceeding for BIT_SIZE bits. If OBJ is an lval in memory, then
- assigning through the result will set the field fetched from. OBJ
- may also be NULL, in which case, VALADDR+OFFSET must address the
- start of storage containing the packed value. The value returned
- in this case is never an lval.
- Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT. */
+ assigning through the result will set the field fetched from.
+ VALADDR is ignored unless OBJ is NULL, in which case,
+ VALADDR+OFFSET must address the start of storage containing the
+ packed value. The value returned in this case is never an lval.
+ Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT. */
struct value *
ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
- int bit_offset, int bit_size,
- struct type *type)
+ int bit_offset, int bit_size,
+ struct type *type)
{
struct value *v;
- int src, /* Index into the source area. */
- targ, /* Index into the target area. */
- i, srcBitsLeft, /* Number of source bits left to move. */
- nsrc, ntarg, /* Number of source and target bytes. */
- unusedLS, /* Number of bits in next significant
- * byte of source that are unused. */
- accumSize; /* Number of meaningful bits in accum */
- unsigned char *bytes; /* First byte containing data to unpack. */
+ int src, /* Index into the source area */
+ targ, /* Index into the target area */
+ srcBitsLeft, /* Number of source bits left to move */
+ nsrc, ntarg, /* Number of source and target bytes */
+ unusedLS, /* Number of bits in next significant
+ byte of source that are unused */
+ accumSize; /* Number of meaningful bits in accum */
+ unsigned char *bytes; /* First byte containing data to unpack */
unsigned char *unpacked;
- unsigned long accum; /* Staging area for bits being transferred */
+ unsigned long accum; /* Staging area for bits being transferred */
unsigned char sign;
int len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
- /* Transmit bytes from least to most significant; delta is the
- * direction the indices move. */
+ /* Transmit bytes from least to most significant; delta is the direction
+ the indices move. */
int delta = BITS_BIG_ENDIAN ? -1 : 1;
CHECK_TYPEDEF (type);
@@ -1392,7 +1899,7 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
else if (VALUE_LAZY (obj))
{
v = value_at (type,
- VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset, NULL);
+ VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset, NULL);
bytes = (unsigned char *) alloca (len);
read_memory (VALUE_ADDRESS (v), bytes, len);
}
@@ -1406,15 +1913,15 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
{
VALUE_LVAL (v) = VALUE_LVAL (obj);
if (VALUE_LVAL (obj) == lval_internalvar)
- VALUE_LVAL (v) = lval_internalvar_component;
+ VALUE_LVAL (v) = lval_internalvar_component;
VALUE_ADDRESS (v) = VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset;
VALUE_BITPOS (v) = bit_offset + VALUE_BITPOS (obj);
VALUE_BITSIZE (v) = bit_size;
if (VALUE_BITPOS (v) >= HOST_CHAR_BIT)
- {
- VALUE_ADDRESS (v) += 1;
- VALUE_BITPOS (v) -= HOST_CHAR_BIT;
- }
+ {
+ VALUE_ADDRESS (v) += 1;
+ VALUE_BITPOS (v) -= HOST_CHAR_BIT;
+ }
}
else
VALUE_BITSIZE (v) = bit_size;
@@ -1432,31 +1939,31 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
else if (BITS_BIG_ENDIAN)
{
src = len - 1;
- if (has_negatives (type) &&
- ((bytes[0] << bit_offset) & (1 << (HOST_CHAR_BIT - 1))))
- sign = ~0;
+ if (has_negatives (type)
+ && ((bytes[0] << bit_offset) & (1 << (HOST_CHAR_BIT - 1))))
+ sign = ~0;
unusedLS =
- (HOST_CHAR_BIT - (bit_size + bit_offset) % HOST_CHAR_BIT)
- % HOST_CHAR_BIT;
+ (HOST_CHAR_BIT - (bit_size + bit_offset) % HOST_CHAR_BIT)
+ % HOST_CHAR_BIT;
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_ARRAY:
- case TYPE_CODE_UNION:
- case TYPE_CODE_STRUCT:
- /* Non-scalar values must be aligned at a byte boundary. */
- accumSize =
- (HOST_CHAR_BIT - bit_size % HOST_CHAR_BIT) % HOST_CHAR_BIT;
- /* And are placed at the beginning (most-significant) bytes
- * of the target. */
- targ = src;
- break;
- default:
- accumSize = 0;
- targ = TYPE_LENGTH (type) - 1;
- break;
- }
+ {
+ case TYPE_CODE_ARRAY:
+ case TYPE_CODE_UNION:
+ case TYPE_CODE_STRUCT:
+ /* Non-scalar values must be aligned at a byte boundary... */
+ accumSize =
+ (HOST_CHAR_BIT - bit_size % HOST_CHAR_BIT) % HOST_CHAR_BIT;
+ /* ... And are placed at the beginning (most-significant) bytes
+ of the target. */
+ targ = src;
+ break;
+ default:
+ accumSize = 0;
+ targ = TYPE_LENGTH (type) - 1;
+ break;
+ }
}
else
{
@@ -1467,30 +1974,30 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
accumSize = 0;
if (has_negatives (type) && (bytes[len - 1] & (1 << sign_bit_offset)))
- sign = ~0;
+ sign = ~0;
}
accum = 0;
while (nsrc > 0)
{
/* Mask for removing bits of the next source byte that are not
- * part of the value. */
+ part of the value. */
unsigned int unusedMSMask =
- (1 << (srcBitsLeft >= HOST_CHAR_BIT ? HOST_CHAR_BIT : srcBitsLeft)) -
- 1;
- /* Sign-extend bits for this byte. */
+ (1 << (srcBitsLeft >= HOST_CHAR_BIT ? HOST_CHAR_BIT : srcBitsLeft)) -
+ 1;
+ /* Sign-extend bits for this byte. */
unsigned int signMask = sign & ~unusedMSMask;
accum |=
- (((bytes[src] >> unusedLS) & unusedMSMask) | signMask) << accumSize;
+ (((bytes[src] >> unusedLS) & unusedMSMask) | signMask) << accumSize;
accumSize += HOST_CHAR_BIT - unusedLS;
if (accumSize >= HOST_CHAR_BIT)
- {
- unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
- accumSize -= HOST_CHAR_BIT;
- accum >>= HOST_CHAR_BIT;
- ntarg -= 1;
- targ += delta;
- }
+ {
+ unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
+ accumSize -= HOST_CHAR_BIT;
+ accum >>= HOST_CHAR_BIT;
+ ntarg -= 1;
+ targ += delta;
+ }
srcBitsLeft -= HOST_CHAR_BIT - unusedLS;
unusedLS = 0;
nsrc -= 1;
@@ -1511,7 +2018,7 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
/* Move N bits from SOURCE, starting at bit offset SRC_OFFSET to
TARGET, starting at bit offset TARG_OFFSET. SOURCE and TARGET must
- not overlap. */
+ not overlap. */
static void
move_bits (char *target, int targ_offset, char *source, int src_offset, int n)
{
@@ -1529,24 +2036,24 @@ move_bits (char *target, int targ_offset, char *source, int src_offset, int n)
accum_bits = HOST_CHAR_BIT - src_offset;
while (n > 0)
- {
- int unused_right;
- accum = (accum << HOST_CHAR_BIT) + (unsigned char) *source;
- accum_bits += HOST_CHAR_BIT;
- source += 1;
- chunk_size = HOST_CHAR_BIT - targ_offset;
- if (chunk_size > n)
- chunk_size = n;
- unused_right = HOST_CHAR_BIT - (chunk_size + targ_offset);
- mask = ((1 << chunk_size) - 1) << unused_right;
- *target =
- (*target & ~mask)
- | ((accum >> (accum_bits - chunk_size - unused_right)) & mask);
- n -= chunk_size;
- accum_bits -= chunk_size;
- target += 1;
- targ_offset = 0;
- }
+ {
+ int unused_right;
+ accum = (accum << HOST_CHAR_BIT) + (unsigned char) *source;
+ accum_bits += HOST_CHAR_BIT;
+ source += 1;
+ chunk_size = HOST_CHAR_BIT - targ_offset;
+ if (chunk_size > n)
+ chunk_size = n;
+ unused_right = HOST_CHAR_BIT - (chunk_size + targ_offset);
+ mask = ((1 << chunk_size) - 1) << unused_right;
+ *target =
+ (*target & ~mask)
+ | ((accum >> (accum_bits - chunk_size - unused_right)) & mask);
+ n -= chunk_size;
+ accum_bits -= chunk_size;
+ target += 1;
+ targ_offset = 0;
+ }
}
else
{
@@ -1555,21 +2062,21 @@ move_bits (char *target, int targ_offset, char *source, int src_offset, int n)
accum_bits = HOST_CHAR_BIT - src_offset;
while (n > 0)
- {
- accum = accum + ((unsigned char) *source << accum_bits);
- accum_bits += HOST_CHAR_BIT;
- source += 1;
- chunk_size = HOST_CHAR_BIT - targ_offset;
- if (chunk_size > n)
- chunk_size = n;
- mask = ((1 << chunk_size) - 1) << targ_offset;
- *target = (*target & ~mask) | ((accum << targ_offset) & mask);
- n -= chunk_size;
- accum_bits -= chunk_size;
- accum >>= chunk_size;
- target += 1;
- targ_offset = 0;
- }
+ {
+ accum = accum + ((unsigned char) *source << accum_bits);
+ accum_bits += HOST_CHAR_BIT;
+ source += 1;
+ chunk_size = HOST_CHAR_BIT - targ_offset;
+ if (chunk_size > n)
+ chunk_size = n;
+ mask = ((1 << chunk_size) - 1) << targ_offset;
+ *target = (*target & ~mask) | ((accum << targ_offset) & mask);
+ n -= chunk_size;
+ accum_bits -= chunk_size;
+ accum >>= chunk_size;
+ target += 1;
+ targ_offset = 0;
+ }
}
}
@@ -1577,7 +2084,7 @@ move_bits (char *target, int targ_offset, char *source, int src_offset, int n)
/* Store the contents of FROMVAL into the location of TOVAL.
Return a new value with the location of TOVAL and contents of
FROMVAL. Handles assignment into packed fields that have
- floating-point or non-scalar types. */
+ floating-point or non-scalar types. */
static struct value *
ada_value_assign (struct value *toval, struct value *fromval)
@@ -1593,31 +2100,31 @@ ada_value_assign (struct value *toval, struct value *fromval)
if (VALUE_LVAL (toval) == lval_memory
&& bits > 0
&& (TYPE_CODE (type) == TYPE_CODE_FLT
- || TYPE_CODE (type) == TYPE_CODE_STRUCT))
+ || TYPE_CODE (type) == TYPE_CODE_STRUCT))
{
int len =
- (VALUE_BITPOS (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
+ (VALUE_BITPOS (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
char *buffer = (char *) alloca (len);
struct value *val;
if (TYPE_CODE (type) == TYPE_CODE_FLT)
- fromval = value_cast (type, fromval);
+ fromval = value_cast (type, fromval);
read_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer, len);
if (BITS_BIG_ENDIAN)
- move_bits (buffer, VALUE_BITPOS (toval),
- VALUE_CONTENTS (fromval),
- TYPE_LENGTH (VALUE_TYPE (fromval)) * TARGET_CHAR_BIT -
- bits, bits);
+ move_bits (buffer, VALUE_BITPOS (toval),
+ VALUE_CONTENTS (fromval),
+ TYPE_LENGTH (VALUE_TYPE (fromval)) * TARGET_CHAR_BIT -
+ bits, bits);
else
- move_bits (buffer, VALUE_BITPOS (toval), VALUE_CONTENTS (fromval),
- 0, bits);
+ move_bits (buffer, VALUE_BITPOS (toval), VALUE_CONTENTS (fromval),
+ 0, bits);
write_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer,
- len);
+ len);
val = value_copy (toval);
memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
- TYPE_LENGTH (type));
+ TYPE_LENGTH (type));
VALUE_TYPE (val) = type;
return val;
@@ -1627,8 +2134,8 @@ ada_value_assign (struct value *toval, struct value *fromval)
}
-/* The value of the element of array ARR at the ARITY indices given in IND.
- ARR may be either a simple array, GNAT array descriptor, or pointer
+/* The value of the element of array ARR at the ARITY indices given in IND.
+ ARR may be either a simple array, GNAT array descriptor, or pointer
thereto. */
struct value *
@@ -1648,7 +2155,7 @@ ada_value_subscript (struct value *arr, int arity, struct value **ind)
for (k = 0; k < arity; k += 1)
{
if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY)
- error ("too many subscripts (%d expected)", k);
+ error ("too many subscripts (%d expected)", k);
elt = value_subscript (elt, value_pos_atr (ind[k]));
}
return elt;
@@ -1656,11 +2163,11 @@ ada_value_subscript (struct value *arr, int arity, struct value **ind)
/* Assuming ARR is a pointer to a standard GDB array of type TYPE, the
value of the element of *ARR at the ARITY indices given in
- IND. Does not read the entire array into memory. */
+ IND. Does not read the entire array into memory. */
struct value *
ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
- struct value **ind)
+ struct value **ind)
{
int k;
@@ -1670,14 +2177,13 @@ ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
struct value *idx;
if (TYPE_CODE (type) != TYPE_CODE_ARRAY)
- error ("too many subscripts (%d expected)", k);
+ error ("too many subscripts (%d expected)", k);
arr = value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
- value_copy (arr));
+ value_copy (arr));
get_discrete_bounds (TYPE_INDEX_TYPE (type), &lwb, &upb);
- if (lwb == 0)
- idx = ind[k];
- else
- idx = value_sub (ind[k], value_from_longest (builtin_type_int, lwb));
+ idx = value_pos_atr (ind[k]);
+ if (lwb != 0)
+ idx = value_sub (idx, value_from_longest (builtin_type_int, lwb));
arr = value_add (arr, idx);
type = TYPE_TARGET_TYPE (type);
}
@@ -1685,10 +2191,41 @@ ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
return value_ind (arr);
}
+/* Given that ARRAY_PTR is a pointer or reference to an array of type TYPE (the
+ actual type of ARRAY_PTR is ignored), returns a reference to
+ the Ada slice of HIGH-LOW+1 elements starting at index LOW. The lower
+ bound of this array is LOW, as per Ada rules. */
+static struct value *
+ada_value_slice_ptr (struct value *array_ptr, struct type *type,
+ int low, int high)
+{
+ CORE_ADDR base = value_as_address (array_ptr)
+ + ((low - TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)))
+ * TYPE_LENGTH (TYPE_TARGET_TYPE (type)));
+ struct type *index_type =
+ create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (type)),
+ low, high);
+ struct type *slice_type =
+ create_array_type (NULL, TYPE_TARGET_TYPE (type), index_type);
+ return value_from_pointer (lookup_reference_type (slice_type), base);
+}
+
+
+static struct value *
+ada_value_slice (struct value *array, int low, int high)
+{
+ struct type *type = VALUE_TYPE (array);
+ struct type *index_type =
+ create_range_type (NULL, TYPE_INDEX_TYPE (type), low, high);
+ struct type *slice_type =
+ create_array_type (NULL, TYPE_TARGET_TYPE (type), index_type);
+ return value_cast (slice_type, value_slice (array, low, high-low+1));
+}
+
/* If type is a record type in the form of a standard GNAT array
descriptor, returns the number of dimensions for type. If arr is a
simple array, returns the number of "array of"s that prefix its
- type designation. Otherwise, returns 0. */
+ type designation. Otherwise, returns 0. */
int
ada_array_arity (struct type *type)
@@ -1706,8 +2243,8 @@ ada_array_arity (struct type *type)
else
while (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
- arity += 1;
- type = check_typedef (TYPE_TARGET_TYPE (type));
+ arity += 1;
+ type = check_typedef (TYPE_TARGET_TYPE (type));
}
return arity;
@@ -1716,7 +2253,7 @@ ada_array_arity (struct type *type)
/* If TYPE is a record type in the form of a standard GNAT array
descriptor or a simple array type, returns the element type for
TYPE after indexing by NINDICES indices, or by all indices if
- NINDICES is -1. Otherwise, returns NULL. */
+ NINDICES is -1. Otherwise, returns NULL. */
struct type *
ada_array_element_type (struct type *type, int nindices)
@@ -1732,51 +2269,59 @@ ada_array_element_type (struct type *type, int nindices)
k = ada_array_arity (type);
if (k == 0)
- return NULL;
+ return NULL;
- /* Initially p_array_type = elt_type(*)[]...(k times)...[] */
+ /* Initially p_array_type = elt_type(*)[]...(k times)...[]. */
if (nindices >= 0 && k > nindices)
- k = nindices;
+ k = nindices;
p_array_type = TYPE_TARGET_TYPE (p_array_type);
while (k > 0 && p_array_type != NULL)
- {
- p_array_type = check_typedef (TYPE_TARGET_TYPE (p_array_type));
- k -= 1;
- }
+ {
+ p_array_type = check_typedef (TYPE_TARGET_TYPE (p_array_type));
+ k -= 1;
+ }
return p_array_type;
}
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
while (nindices != 0 && TYPE_CODE (type) == TYPE_CODE_ARRAY)
- {
- type = TYPE_TARGET_TYPE (type);
- nindices -= 1;
- }
+ {
+ type = TYPE_TARGET_TYPE (type);
+ nindices -= 1;
+ }
return type;
}
return NULL;
}
-/* The type of nth index in arrays of given type (n numbering from 1). Does
- not examine memory. */
+/* The type of nth index in arrays of given type (n numbering from 1).
+ Does not examine memory. */
struct type *
ada_index_type (struct type *type, int n)
{
+ struct type *result_type;
+
type = desc_base_type (type);
if (n > ada_array_arity (type))
return NULL;
- if (ada_is_simple_array (type))
+ if (ada_is_simple_array_type (type))
{
int i;
for (i = 1; i < n; i += 1)
- type = TYPE_TARGET_TYPE (type);
+ type = TYPE_TARGET_TYPE (type);
+ result_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0));
+ /* FIXME: The stabs type r(0,0);bound;bound in an array type
+ has a target type of TYPE_CODE_UNDEF. We compensate here, but
+ perhaps stabsread.c would make more sense. */
+ if (result_type == NULL || TYPE_CODE (result_type) == TYPE_CODE_UNDEF)
+ result_type = builtin_type_int;
- return TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0));
+ return result_type;
}
else
return desc_index_type (desc_bounds_type (type), n);
@@ -1784,14 +2329,14 @@ ada_index_type (struct type *type, int n)
/* Given that arr is an array type, returns the lower bound of the
Nth index (numbering from 1) if WHICH is 0, and the upper bound if
- WHICH is 1. This returns bounds 0 .. -1 if ARR_TYPE is an
- array-descriptor type. If TYPEP is non-null, *TYPEP is set to the
- bounds type. It works for other arrays with bounds supplied by
- run-time quantities other than discriminants. */
+ WHICH is 1. This returns bounds 0 .. -1 if ARR_TYPE is an
+ array-descriptor type. If TYPEP is non-null, *TYPEP is set to the
+ bounds type. It works for other arrays with bounds supplied by
+ run-time quantities other than discriminants. */
LONGEST
ada_array_bound_from_type (struct type * arr_type, int n, int which,
- struct type ** typep)
+ struct type ** typep)
{
struct type *type;
struct type *index_type_desc;
@@ -1799,10 +2344,10 @@ ada_array_bound_from_type (struct type * arr_type, int n, int which,
if (ada_is_packed_array_type (arr_type))
arr_type = decode_packed_array_type (arr_type);
- if (arr_type == NULL || !ada_is_simple_array (arr_type))
+ if (arr_type == NULL || !ada_is_simple_array_type (arr_type))
{
if (typep != NULL)
- *typep = builtin_type_int;
+ *typep = builtin_type_int;
return (LONGEST) - which;
}
@@ -1818,40 +2363,40 @@ ada_array_bound_from_type (struct type * arr_type, int n, int which,
struct type *index_type;
while (n > 1)
- {
- type = TYPE_TARGET_TYPE (type);
- n -= 1;
- }
+ {
+ type = TYPE_TARGET_TYPE (type);
+ n -= 1;
+ }
range_type = TYPE_INDEX_TYPE (type);
index_type = TYPE_TARGET_TYPE (range_type);
if (TYPE_CODE (index_type) == TYPE_CODE_UNDEF)
- index_type = builtin_type_long;
+ index_type = builtin_type_long;
if (typep != NULL)
- *typep = index_type;
+ *typep = index_type;
return
- (LONGEST) (which == 0
- ? TYPE_LOW_BOUND (range_type)
- : TYPE_HIGH_BOUND (range_type));
+ (LONGEST) (which == 0
+ ? TYPE_LOW_BOUND (range_type)
+ : TYPE_HIGH_BOUND (range_type));
}
else
{
struct type *index_type =
- to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, n - 1),
- NULL, TYPE_OBJFILE (arr_type));
+ to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, n - 1),
+ NULL, TYPE_OBJFILE (arr_type));
if (typep != NULL)
- *typep = TYPE_TARGET_TYPE (index_type);
+ *typep = TYPE_TARGET_TYPE (index_type);
return
- (LONGEST) (which == 0
- ? TYPE_LOW_BOUND (index_type)
- : TYPE_HIGH_BOUND (index_type));
+ (LONGEST) (which == 0
+ ? TYPE_LOW_BOUND (index_type)
+ : TYPE_HIGH_BOUND (index_type));
}
}
/* Given that arr is an array value, returns the lower bound of the
nth index (numbering from 1) if which is 0, and the upper bound if
- which is 1. This routine will also work for arrays with bounds
- supplied by run-time quantities other than discriminants. */
+ which is 1. This routine will also work for arrays with bounds
+ supplied by run-time quantities other than discriminants. */
struct value *
ada_array_bound (struct value *arr, int n, int which)
@@ -1860,7 +2405,7 @@ ada_array_bound (struct value *arr, int n, int which)
if (ada_is_packed_array_type (arr_type))
return ada_array_bound (decode_packed_array (arr), n, which);
- else if (ada_is_simple_array (arr_type))
+ else if (ada_is_simple_array_type (arr_type))
{
struct type *type;
LONGEST v = ada_array_bound_from_type (arr_type, n, which, &type);
@@ -1872,411 +2417,400 @@ ada_array_bound (struct value *arr, int n, int which)
/* Given that arr is an array value, returns the length of the
nth index. This routine will also work for arrays with bounds
- supplied by run-time quantities other than discriminants. Does not
- work for arrays indexed by enumeration types with representation
- clauses at the moment. */
+ supplied by run-time quantities other than discriminants.
+ Does not work for arrays indexed by enumeration types with representation
+ clauses at the moment. */
struct value *
ada_array_length (struct value *arr, int n)
{
struct type *arr_type = check_typedef (VALUE_TYPE (arr));
- struct type *index_type_desc;
if (ada_is_packed_array_type (arr_type))
return ada_array_length (decode_packed_array (arr), n);
- if (ada_is_simple_array (arr_type))
+ if (ada_is_simple_array_type (arr_type))
{
struct type *type;
LONGEST v =
- ada_array_bound_from_type (arr_type, n, 1, &type) -
- ada_array_bound_from_type (arr_type, n, 0, NULL) + 1;
+ ada_array_bound_from_type (arr_type, n, 1, &type) -
+ ada_array_bound_from_type (arr_type, n, 0, NULL) + 1;
return value_from_longest (type, v);
}
else
return
value_from_longest (builtin_type_ada_int,
- value_as_long (desc_one_bound (desc_bounds (arr),
- n, 1))
- - value_as_long (desc_one_bound (desc_bounds (arr),
- n, 0)) + 1);
+ value_as_long (desc_one_bound (desc_bounds (arr),
+ n, 1))
+ - value_as_long (desc_one_bound (desc_bounds (arr),
+ n, 0)) + 1);
+}
+
+/* An empty array whose type is that of ARR_TYPE (an array type),
+ with bounds LOW to LOW-1. */
+
+static struct value *
+empty_array (struct type *arr_type, int low)
+{
+ struct type *index_type =
+ create_range_type (NULL, TYPE_TARGET_TYPE (TYPE_INDEX_TYPE (arr_type)),
+ low, low - 1);
+ struct type *elt_type = ada_array_element_type (arr_type, 1);
+ return allocate_value (create_array_type (NULL, elt_type, index_type));
}
- /* Name resolution */
+ /* Name resolution */
-/* The "demangled" name for the user-definable Ada operator corresponding
- to op. */
+/* The "decoded" name for the user-definable Ada operator corresponding
+ to OP. */
static const char *
-ada_op_name (enum exp_opcode op)
+ada_decoded_op_name (enum exp_opcode op)
{
int i;
- for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
+ for (i = 0; ada_opname_table[i].encoded != NULL; i += 1)
{
if (ada_opname_table[i].op == op)
- return ada_opname_table[i].demangled;
+ return ada_opname_table[i].decoded;
}
error ("Could not find operator name for opcode");
}
-/* Same as evaluate_type (*EXP), but resolves ambiguous symbol
- references (OP_UNRESOLVED_VALUES) and converts operators that are
- user-defined into appropriate function calls. If CONTEXT_TYPE is
+/* Same as evaluate_type (*EXP), but resolves ambiguous symbol
+ references (marked by OP_VAR_VALUE nodes in which the symbol has an
+ undefined namespace) and converts operators that are
+ user-defined into appropriate function calls. If CONTEXT_TYPE is
non-null, it provides a preferred result type [at the moment, only
type void has any effect---causing procedures to be preferred over
functions in calls]. A null CONTEXT_TYPE indicates that a non-void
- return type is preferred. The variable unresolved_names contains a list
- of character strings referenced by expout that should be freed.
- May change (expand) *EXP. */
+ return type is preferred. May change (expand) *EXP. */
-void
-ada_resolve (struct expression **expp, struct type *context_type)
+static void
+resolve (struct expression **expp, int void_context_p)
{
int pc;
pc = 0;
- ada_resolve_subexp (expp, &pc, 1, context_type);
+ resolve_subexp (expp, &pc, 1, void_context_p ? builtin_type_void : NULL);
}
-/* Resolve the operator of the subexpression beginning at
- position *POS of *EXPP. "Resolving" consists of replacing
- OP_UNRESOLVED_VALUE with an appropriate OP_VAR_VALUE, replacing
- built-in operators with function calls to user-defined operators,
- where appropriate, and (when DEPROCEDURE_P is non-zero), converting
- function-valued variables into parameterless calls. May expand
- EXP. The CONTEXT_TYPE functions as in ada_resolve, above. */
+/* Resolve the operator of the subexpression beginning at
+ position *POS of *EXPP. "Resolving" consists of replacing
+ the symbols that have undefined namespaces in OP_VAR_VALUE nodes
+ with their resolutions, replacing built-in operators with
+ function calls to user-defined operators, where appropriate, and,
+ when DEPROCEDURE_P is non-zero, converting function-valued variables
+ into parameterless calls. May expand *EXPP. The CONTEXT_TYPE functions
+ are as in ada_resolve, above. */
static struct value *
-ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
- struct type *context_type)
+resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
+ struct type *context_type)
{
int pc = *pos;
int i;
- struct expression *exp; /* Convenience: == *expp */
+ struct expression *exp; /* Convenience: == *expp. */
enum exp_opcode op = (*expp)->elts[pc].opcode;
- struct value **argvec; /* Vector of operand types (alloca'ed). */
- int nargs; /* Number of operands */
+ struct value **argvec; /* Vector of operand types (alloca'ed). */
+ int nargs; /* Number of operands. */
argvec = NULL;
nargs = 0;
exp = *expp;
- /* Pass one: resolve operands, saving their types and updating *pos. */
+ /* Pass one: resolve operands, saving their types and updating *pos. */
switch (op)
{
- case OP_VAR_VALUE:
- /* case OP_UNRESOLVED_VALUE: */
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- *pos += 4;
+ case OP_FUNCALL:
+ if (exp->elts[pc + 3].opcode == OP_VAR_VALUE
+ && SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
+ *pos += 7;
+ else
+ {
+ *pos += 3;
+ resolve_subexp (expp, pos, 0, NULL);
+ }
+ nargs = longest_to_int (exp->elts[pc + 1].longconst);
break;
- case OP_FUNCALL:
- nargs = longest_to_int (exp->elts[pc + 1].longconst) + 1;
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- /* if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE)
- {
- *pos += 7;
-
- argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 1));
- for (i = 0; i < nargs-1; i += 1)
- argvec[i] = ada_resolve_subexp (expp, pos, 1, NULL);
- argvec[i] = NULL;
- }
- else
- {
- *pos += 3;
- ada_resolve_subexp (expp, pos, 0, NULL);
- for (i = 1; i < nargs; i += 1)
- ada_resolve_subexp (expp, pos, 1, NULL);
- }
- */
- exp = *expp;
+ case UNOP_QUAL:
+ *pos += 3;
+ resolve_subexp (expp, pos, 1, exp->elts[pc + 1].type);
break;
- /* FIXME: UNOP_QUAL should be defined in expression.h */
- /* case UNOP_QUAL:
- nargs = 1;
- *pos += 3;
- ada_resolve_subexp (expp, pos, 1, exp->elts[pc + 1].type);
- exp = *expp;
- break;
- */
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
- /* case OP_ATTRIBUTE:
- nargs = longest_to_int (exp->elts[pc + 1].longconst) + 1;
- *pos += 4;
- for (i = 0; i < nargs; i += 1)
- ada_resolve_subexp (expp, pos, 1, NULL);
- exp = *expp;
- break;
- */
case UNOP_ADDR:
+ *pos += 1;
+ resolve_subexp (expp, pos, 0, NULL);
+ break;
+
+ case OP_ATR_MODULUS:
+ *pos += 4;
+ break;
+
+ case OP_ATR_SIZE:
+ case OP_ATR_TAG:
+ *pos += 1;
nargs = 1;
+ break;
+
+ case OP_ATR_FIRST:
+ case OP_ATR_LAST:
+ case OP_ATR_LENGTH:
+ case OP_ATR_POS:
+ case OP_ATR_VAL:
*pos += 1;
- ada_resolve_subexp (expp, pos, 0, NULL);
- exp = *expp;
+ nargs = 2;
+ break;
+
+ case OP_ATR_MIN:
+ case OP_ATR_MAX:
+ *pos += 1;
+ nargs = 3;
break;
case BINOP_ASSIGN:
{
- struct value *arg1;
- nargs = 2;
- *pos += 1;
- arg1 = ada_resolve_subexp (expp, pos, 0, NULL);
- if (arg1 == NULL)
- ada_resolve_subexp (expp, pos, 1, NULL);
- else
- ada_resolve_subexp (expp, pos, 1, VALUE_TYPE (arg1));
- break;
+ struct value *arg1;
+
+ *pos += 1;
+ arg1 = resolve_subexp (expp, pos, 0, NULL);
+ if (arg1 == NULL)
+ resolve_subexp (expp, pos, 1, NULL);
+ else
+ resolve_subexp (expp, pos, 1, VALUE_TYPE (arg1));
+ break;
}
- default:
- switch (op)
- {
- default:
- error ("Unexpected operator during name resolution");
- case UNOP_CAST:
- /* case UNOP_MBR:
- nargs = 1;
- *pos += 3;
- break;
- */
- case BINOP_ADD:
- case BINOP_SUB:
- case BINOP_MUL:
- case BINOP_DIV:
- case BINOP_REM:
- case BINOP_MOD:
- case BINOP_EXP:
- case BINOP_CONCAT:
- case BINOP_LOGICAL_AND:
- case BINOP_LOGICAL_OR:
- case BINOP_BITWISE_AND:
- case BINOP_BITWISE_IOR:
- case BINOP_BITWISE_XOR:
-
- case BINOP_EQUAL:
- case BINOP_NOTEQUAL:
- case BINOP_LESS:
- case BINOP_GTR:
- case BINOP_LEQ:
- case BINOP_GEQ:
-
- case BINOP_REPEAT:
- case BINOP_SUBSCRIPT:
- case BINOP_COMMA:
- nargs = 2;
- *pos += 1;
- break;
-
- case UNOP_NEG:
- case UNOP_PLUS:
- case UNOP_LOGICAL_NOT:
- case UNOP_ABS:
- case UNOP_IND:
- nargs = 1;
- *pos += 1;
- break;
-
- case OP_LONG:
- case OP_DOUBLE:
- case OP_VAR_VALUE:
- *pos += 4;
- break;
-
- case OP_TYPE:
- case OP_BOOL:
- case OP_LAST:
- case OP_REGISTER:
- case OP_INTERNALVAR:
- *pos += 3;
- break;
-
- case UNOP_MEMVAL:
- *pos += 3;
- nargs = 1;
- break;
-
- case STRUCTOP_STRUCT:
- case STRUCTOP_PTR:
- nargs = 1;
- *pos += 4 + BYTES_TO_EXP_ELEM (exp->elts[pc + 1].longconst + 1);
- break;
-
- case OP_ARRAY:
- *pos += 4;
- nargs = longest_to_int (exp->elts[pc + 2].longconst) + 1;
- nargs -= longest_to_int (exp->elts[pc + 1].longconst);
- /* A null array contains one dummy element to give the type. */
- /* if (nargs == 0)
- nargs = 1;
- break; */
-
- case TERNOP_SLICE:
- /* FIXME: TERNOP_MBR should be defined in expression.h */
- /* case TERNOP_MBR:
- *pos += 1;
- nargs = 3;
- break;
- */
- /* FIXME: BINOP_MBR should be defined in expression.h */
- /* case BINOP_MBR:
- *pos += 3;
- nargs = 2;
- break; */
- }
+ case UNOP_CAST:
+ case UNOP_IN_RANGE:
+ *pos += 3;
+ nargs = 1;
+ break;
- argvec =
- (struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
- for (i = 0; i < nargs; i += 1)
- argvec[i] = ada_resolve_subexp (expp, pos, 1, NULL);
- argvec[i] = NULL;
- exp = *expp;
+ case BINOP_ADD:
+ case BINOP_SUB:
+ case BINOP_MUL:
+ case BINOP_DIV:
+ case BINOP_REM:
+ case BINOP_MOD:
+ case BINOP_EXP:
+ case BINOP_CONCAT:
+ case BINOP_LOGICAL_AND:
+ case BINOP_LOGICAL_OR:
+ case BINOP_BITWISE_AND:
+ case BINOP_BITWISE_IOR:
+ case BINOP_BITWISE_XOR:
+
+ case BINOP_EQUAL:
+ case BINOP_NOTEQUAL:
+ case BINOP_LESS:
+ case BINOP_GTR:
+ case BINOP_LEQ:
+ case BINOP_GEQ:
+
+ case BINOP_REPEAT:
+ case BINOP_SUBSCRIPT:
+ case BINOP_COMMA:
+ *pos += 1;
+ nargs = 2;
+ break;
+
+ case UNOP_NEG:
+ case UNOP_PLUS:
+ case UNOP_LOGICAL_NOT:
+ case UNOP_ABS:
+ case UNOP_IND:
+ *pos += 1;
+ nargs = 1;
+ break;
+
+ case OP_LONG:
+ case OP_DOUBLE:
+ case OP_VAR_VALUE:
+ *pos += 4;
+ break;
+
+ case OP_TYPE:
+ case OP_BOOL:
+ case OP_LAST:
+ case OP_REGISTER:
+ case OP_INTERNALVAR:
+ *pos += 3;
+ break;
+
+ case UNOP_MEMVAL:
+ *pos += 3;
+ nargs = 1;
+ break;
+
+ case STRUCTOP_STRUCT:
+ *pos += 4 + BYTES_TO_EXP_ELEM (exp->elts[pc + 1].longconst + 1);
+ nargs = 1;
break;
+
+ case OP_STRING:
+ (*pos) += 3
+ + BYTES_TO_EXP_ELEM (longest_to_int (exp->elts[pc + 1].longconst)
+ + 1);
+ break;
+
+ case TERNOP_SLICE:
+ case TERNOP_IN_RANGE:
+ *pos += 1;
+ nargs = 3;
+ break;
+
+ case BINOP_IN_BOUNDS:
+ *pos += 3;
+ nargs = 2;
+ break;
+
+ default:
+ error ("Unexpected operator during name resolution");
}
- /* Pass two: perform any resolution on principal operator. */
+ argvec = (struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
+ for (i = 0; i < nargs; i += 1)
+ argvec[i] = resolve_subexp (expp, pos, 1, NULL);
+ argvec[i] = NULL;
+ exp = *expp;
+
+ /* Pass two: perform any resolution on principal operator. */
switch (op)
{
default:
break;
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- /* case OP_UNRESOLVED_VALUE:
- {
- struct symbol** candidate_syms;
- struct block** candidate_blocks;
- int n_candidates;
-
- n_candidates = ada_lookup_symbol_list (exp->elts[pc + 2].name,
- exp->elts[pc + 1].block,
- VAR_DOMAIN,
- &candidate_syms,
- &candidate_blocks);
-
- if (n_candidates > 1)
- { */
- /* Types tend to get re-introduced locally, so if there
- are any local symbols that are not types, first filter
- out all types. *//*
- int j;
- for (j = 0; j < n_candidates; j += 1)
- switch (SYMBOL_CLASS (candidate_syms[j]))
- {
- case LOC_REGISTER:
- case LOC_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_LOCAL:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED:
- case LOC_COMPUTED_ARG:
- goto FoundNonType;
- default:
- break;
- }
- FoundNonType:
- if (j < n_candidates)
- {
- j = 0;
- while (j < n_candidates)
- {
- if (SYMBOL_CLASS (candidate_syms[j]) == LOC_TYPEDEF)
- {
- candidate_syms[j] = candidate_syms[n_candidates-1];
- candidate_blocks[j] = candidate_blocks[n_candidates-1];
- n_candidates -= 1;
- }
- else
- j += 1;
- }
- }
- }
-
- if (n_candidates == 0)
- error ("No definition found for %s",
- ada_demangle (exp->elts[pc + 2].name));
- else if (n_candidates == 1)
- i = 0;
- else if (deprocedure_p
- && ! is_nonfunction (candidate_syms, n_candidates))
- {
- i = ada_resolve_function (candidate_syms, candidate_blocks,
- n_candidates, NULL, 0,
- exp->elts[pc + 2].name, context_type);
- if (i < 0)
- error ("Could not find a match for %s",
- ada_demangle (exp->elts[pc + 2].name));
- }
- else
- {
- printf_filtered ("Multiple matches for %s\n",
- ada_demangle (exp->elts[pc+2].name));
- user_select_syms (candidate_syms, candidate_blocks,
- n_candidates, 1);
- i = 0;
- }
-
- exp->elts[pc].opcode = exp->elts[pc + 3].opcode = OP_VAR_VALUE;
- exp->elts[pc + 1].block = candidate_blocks[i];
- exp->elts[pc + 2].symbol = candidate_syms[i];
- if (innermost_block == NULL ||
- contained_in (candidate_blocks[i], innermost_block))
- innermost_block = candidate_blocks[i];
- } */
- /* FALL THROUGH */
-
case OP_VAR_VALUE:
- if (deprocedure_p &&
- TYPE_CODE (SYMBOL_TYPE (exp->elts[pc + 2].symbol)) ==
- TYPE_CODE_FUNC)
- {
- replace_operator_with_call (expp, pc, 0, 0,
- exp->elts[pc + 2].symbol,
- exp->elts[pc + 1].block);
- exp = *expp;
- }
+ if (SYMBOL_DOMAIN (exp->elts[pc + 2].symbol) == UNDEF_DOMAIN)
+ {
+ struct ada_symbol_info *candidates;
+ int n_candidates;
+
+ n_candidates =
+ ada_lookup_symbol_list (SYMBOL_LINKAGE_NAME
+ (exp->elts[pc + 2].symbol),
+ exp->elts[pc + 1].block, VAR_DOMAIN,
+ &candidates);
+
+ if (n_candidates > 1)
+ {
+ /* Types tend to get re-introduced locally, so if there
+ are any local symbols that are not types, first filter
+ out all types. */
+ int j;
+ for (j = 0; j < n_candidates; j += 1)
+ switch (SYMBOL_CLASS (candidates[j].sym))
+ {
+ case LOC_REGISTER:
+ case LOC_ARG:
+ case LOC_REF_ARG:
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_LOCAL:
+ case LOC_LOCAL_ARG:
+ case LOC_BASEREG:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED:
+ case LOC_COMPUTED_ARG:
+ goto FoundNonType;
+ default:
+ break;
+ }
+ FoundNonType:
+ if (j < n_candidates)
+ {
+ j = 0;
+ while (j < n_candidates)
+ {
+ if (SYMBOL_CLASS (candidates[j].sym) == LOC_TYPEDEF)
+ {
+ candidates[j] = candidates[n_candidates - 1];
+ n_candidates -= 1;
+ }
+ else
+ j += 1;
+ }
+ }
+ }
+
+ if (n_candidates == 0)
+ error ("No definition found for %s",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ else if (n_candidates == 1)
+ i = 0;
+ else if (deprocedure_p
+ && !is_nonfunction (candidates, n_candidates))
+ {
+ i = ada_resolve_function
+ (candidates, n_candidates, NULL, 0,
+ SYMBOL_LINKAGE_NAME (exp->elts[pc + 2].symbol),
+ context_type);
+ if (i < 0)
+ error ("Could not find a match for %s",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ }
+ else
+ {
+ printf_filtered ("Multiple matches for %s\n",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
+ user_select_syms (candidates, n_candidates, 1);
+ i = 0;
+ }
+
+ exp->elts[pc + 1].block = candidates[i].block;
+ exp->elts[pc + 2].symbol = candidates[i].sym;
+ if (innermost_block == NULL
+ || contained_in (candidates[i].block, innermost_block))
+ innermost_block = candidates[i].block;
+ }
+
+ if (deprocedure_p
+ && (TYPE_CODE (SYMBOL_TYPE (exp->elts[pc + 2].symbol))
+ == TYPE_CODE_FUNC))
+ {
+ replace_operator_with_call (expp, pc, 0, 0,
+ exp->elts[pc + 2].symbol,
+ exp->elts[pc + 1].block);
+ exp = *expp;
+ }
break;
case OP_FUNCALL:
{
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- /* if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE)
- {
- struct symbol** candidate_syms;
- struct block** candidate_blocks;
- int n_candidates;
-
- n_candidates = ada_lookup_symbol_list (exp->elts[pc + 5].name,
- exp->elts[pc + 4].block,
- VAR_DOMAIN,
- &candidate_syms,
- &candidate_blocks);
- if (n_candidates == 1)
- i = 0;
- else
- {
- i = ada_resolve_function (candidate_syms, candidate_blocks,
- n_candidates, argvec, nargs-1,
- exp->elts[pc + 5].name, context_type);
- if (i < 0)
- error ("Could not find a match for %s",
- ada_demangle (exp->elts[pc + 5].name));
- }
-
- exp->elts[pc + 3].opcode = exp->elts[pc + 6].opcode = OP_VAR_VALUE;
- exp->elts[pc + 4].block = candidate_blocks[i];
- exp->elts[pc + 5].symbol = candidate_syms[i];
- if (innermost_block == NULL ||
- contained_in (candidate_blocks[i], innermost_block))
- innermost_block = candidate_blocks[i];
- } */
-
+ if (exp->elts[pc + 3].opcode == OP_VAR_VALUE
+ && SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
+ {
+ struct ada_symbol_info *candidates;
+ int n_candidates;
+
+ n_candidates =
+ ada_lookup_symbol_list (SYMBOL_LINKAGE_NAME
+ (exp->elts[pc + 5].symbol),
+ exp->elts[pc + 4].block, VAR_DOMAIN,
+ &candidates);
+ if (n_candidates == 1)
+ i = 0;
+ else
+ {
+ i = ada_resolve_function
+ (candidates, n_candidates,
+ argvec, nargs,
+ SYMBOL_LINKAGE_NAME (exp->elts[pc + 5].symbol),
+ context_type);
+ if (i < 0)
+ error ("Could not find a match for %s",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol));
+ }
+
+ exp->elts[pc + 4].block = candidates[i].block;
+ exp->elts[pc + 5].symbol = candidates[i].sym;
+ if (innermost_block == NULL
+ || contained_in (candidates[i].block, innermost_block))
+ innermost_block = candidates[i].block;
+ }
}
break;
case BINOP_ADD:
@@ -2301,27 +2835,27 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
case UNOP_LOGICAL_NOT:
case UNOP_ABS:
if (possible_user_operator_p (op, argvec))
- {
- struct symbol **candidate_syms;
- struct block **candidate_blocks;
- int n_candidates;
-
- n_candidates =
- ada_lookup_symbol_list (ada_mangle (ada_op_name (op)),
- (struct block *) NULL, VAR_DOMAIN,
- &candidate_syms, &candidate_blocks);
- i =
- ada_resolve_function (candidate_syms, candidate_blocks,
- n_candidates, argvec, nargs,
- ada_op_name (op), NULL);
- if (i < 0)
- break;
-
- replace_operator_with_call (expp, pc, nargs, 1,
- candidate_syms[i], candidate_blocks[i]);
- exp = *expp;
- }
+ {
+ struct ada_symbol_info *candidates;
+ int n_candidates;
+
+ n_candidates =
+ ada_lookup_symbol_list (ada_encode (ada_decoded_op_name (op)),
+ (struct block *) NULL, VAR_DOMAIN,
+ &candidates);
+ i = ada_resolve_function (candidates, n_candidates, argvec, nargs,
+ ada_decoded_op_name (op), NULL);
+ if (i < 0)
+ break;
+
+ replace_operator_with_call (expp, pc, nargs, 1,
+ candidates[i].sym, candidates[i].block);
+ exp = *expp;
+ }
break;
+
+ case OP_TYPE:
+ return NULL;
}
*pos = pc;
@@ -2329,10 +2863,11 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
}
/* Return non-zero if formal type FTYPE matches actual type ATYPE. If
- MAY_DEREF is non-zero, the formal may be a pointer and the actual
- a non-pointer. */
+ MAY_DEREF is non-zero, the formal may be a pointer and the actual
+ a non-pointer. A type of 'void' (which is never a valid expression type)
+ by convention matches anything. */
/* The term "match" here is rather loose. The match is heuristic and
- liberal. FIXME: TOO liberal, in fact. */
+ liberal. FIXME: TOO liberal, in fact. */
static int
ada_type_match (struct type *ftype, struct type *atype, int may_deref)
@@ -2355,35 +2890,35 @@ ada_type_match (struct type *ftype, struct type *atype, int may_deref)
return 1;
case TYPE_CODE_PTR:
if (TYPE_CODE (atype) == TYPE_CODE_PTR)
- return ada_type_match (TYPE_TARGET_TYPE (ftype),
- TYPE_TARGET_TYPE (atype), 0);
+ return ada_type_match (TYPE_TARGET_TYPE (ftype),
+ TYPE_TARGET_TYPE (atype), 0);
else
- return (may_deref &&
- ada_type_match (TYPE_TARGET_TYPE (ftype), atype, 0));
+ return (may_deref
+ && ada_type_match (TYPE_TARGET_TYPE (ftype), atype, 0));
case TYPE_CODE_INT:
case TYPE_CODE_ENUM:
case TYPE_CODE_RANGE:
switch (TYPE_CODE (atype))
- {
- case TYPE_CODE_INT:
- case TYPE_CODE_ENUM:
- case TYPE_CODE_RANGE:
- return 1;
- default:
- return 0;
- }
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_RANGE:
+ return 1;
+ default:
+ return 0;
+ }
case TYPE_CODE_ARRAY:
return (TYPE_CODE (atype) == TYPE_CODE_ARRAY
- || ada_is_array_descriptor (atype));
+ || ada_is_array_descriptor_type (atype));
case TYPE_CODE_STRUCT:
- if (ada_is_array_descriptor (ftype))
- return (TYPE_CODE (atype) == TYPE_CODE_ARRAY
- || ada_is_array_descriptor (atype));
+ if (ada_is_array_descriptor_type (ftype))
+ return (TYPE_CODE (atype) == TYPE_CODE_ARRAY
+ || ada_is_array_descriptor_type (atype));
else
- return (TYPE_CODE (atype) == TYPE_CODE_STRUCT
- && !ada_is_array_descriptor (atype));
+ return (TYPE_CODE (atype) == TYPE_CODE_STRUCT
+ && !ada_is_array_descriptor_type (atype));
case TYPE_CODE_UNION:
case TYPE_CODE_FLT:
@@ -2394,7 +2929,7 @@ ada_type_match (struct type *ftype, struct type *atype, int may_deref)
/* Return non-zero if the formals of FUNC "sufficiently match" the
vector of actual argument types ACTUALS of size N_ACTUALS. FUNC
may also be an enumeral, in which case it is treated as a 0-
- argument function. */
+ argument function. */
static int
ada_args_match (struct symbol *func, struct value **actuals, int n_actuals)
@@ -2402,8 +2937,8 @@ ada_args_match (struct symbol *func, struct value **actuals, int n_actuals)
int i;
struct type *func_type = SYMBOL_TYPE (func);
- if (SYMBOL_CLASS (func) == LOC_CONST &&
- TYPE_CODE (func_type) == TYPE_CODE_ENUM)
+ if (SYMBOL_CLASS (func) == LOC_CONST
+ && TYPE_CODE (func_type) == TYPE_CODE_ENUM)
return (n_actuals == 0);
else if (func_type == NULL || TYPE_CODE (func_type) != TYPE_CODE_FUNC)
return 0;
@@ -2413,12 +2948,16 @@ ada_args_match (struct symbol *func, struct value **actuals, int n_actuals)
for (i = 0; i < n_actuals; i += 1)
{
- struct type *ftype = check_typedef (TYPE_FIELD_TYPE (func_type, i));
- struct type *atype = check_typedef (VALUE_TYPE (actuals[i]));
+ if (actuals[i] == NULL)
+ return 0;
+ else
+ {
+ struct type *ftype = check_typedef (TYPE_FIELD_TYPE (func_type, i));
+ struct type *atype = check_typedef (VALUE_TYPE (actuals[i]));
- if (!ada_type_match (TYPE_FIELD_TYPE (func_type, i),
- VALUE_TYPE (actuals[i]), 1))
- return 0;
+ if (!ada_type_match (ftype, atype, 1))
+ return 0;
+ }
}
return 1;
}
@@ -2436,16 +2975,14 @@ return_match (struct type *func_type, struct type *context_type)
if (func_type == NULL)
return 1;
- /* FIXME: base_type should be declared in gdbtypes.h, implemented in valarith.c */
- /* if (TYPE_CODE (func_type) == TYPE_CODE_FUNC)
- return_type = base_type (TYPE_TARGET_TYPE (func_type));
- else
- return_type = base_type (func_type); */
+ if (TYPE_CODE (func_type) == TYPE_CODE_FUNC)
+ return_type = base_type (TYPE_TARGET_TYPE (func_type));
+ else
+ return_type = base_type (func_type);
if (return_type == NULL)
return 1;
- /* FIXME: base_type should be declared in gdbtypes.h, implemented in valarith.c */
- /* context_type = base_type (context_type); */
+ context_type = base_type (context_type);
if (TYPE_CODE (return_type) == TYPE_CODE_ENUM)
return context_type == NULL || return_type == context_type;
@@ -2456,24 +2993,25 @@ return_match (struct type *func_type, struct type *context_type)
}
-/* Return the index in SYMS[0..NSYMS-1] of symbol for the
+/* Returns the index in SYMS[0..NSYMS-1] that contains the symbol for the
function (if any) that matches the types of the NARGS arguments in
- ARGS. If CONTEXT_TYPE is non-null, and there is at least one match
- that returns type CONTEXT_TYPE, then eliminate other matches. If
- CONTEXT_TYPE is null, prefer a non-void-returning function.
+ ARGS. If CONTEXT_TYPE is non-null and there is at least one match
+ that returns that type, then eliminate matches that don't. If
+ CONTEXT_TYPE is void and there is at least one match that does not
+ return void, eliminate all matches that do.
+
Asks the user if there is more than one match remaining. Returns -1
if there is no such symbol or none is selected. NAME is used
- solely for messages. May re-arrange and modify SYMS in
- the process; the index returned is for the modified vector. BLOCKS
- is modified in parallel to SYMS. */
+ solely for messages. May re-arrange and modify SYMS in
+ the process; the index returned is for the modified vector. */
-int
-ada_resolve_function (struct symbol *syms[], struct block *blocks[],
- int nsyms, struct value **args, int nargs,
- const char *name, struct type *context_type)
+static int
+ada_resolve_function (struct ada_symbol_info syms[],
+ int nsyms, struct value **args, int nargs,
+ const char *name, struct type *context_type)
{
int k;
- int m; /* Number of hits */
+ int m; /* Number of hits */
struct type *fallback;
struct type *return_type;
@@ -2487,22 +3025,20 @@ ada_resolve_function (struct symbol *syms[], struct block *blocks[],
while (1)
{
for (k = 0; k < nsyms; k += 1)
- {
- struct type *type = check_typedef (SYMBOL_TYPE (syms[k]));
-
- if (ada_args_match (syms[k], args, nargs)
- && return_match (SYMBOL_TYPE (syms[k]), return_type))
- {
- syms[m] = syms[k];
- if (blocks != NULL)
- blocks[m] = blocks[k];
- m += 1;
- }
- }
+ {
+ struct type *type = check_typedef (SYMBOL_TYPE (syms[k].sym));
+
+ if (ada_args_match (syms[k].sym, args, nargs)
+ && return_match (type, return_type))
+ {
+ syms[m] = syms[k];
+ m += 1;
+ }
+ }
if (m > 0 || return_type == fallback)
- break;
+ break;
else
- return_type = fallback;
+ return_type = fallback;
}
if (m == 0)
@@ -2510,19 +3046,20 @@ ada_resolve_function (struct symbol *syms[], struct block *blocks[],
else if (m > 1)
{
printf_filtered ("Multiple matches for %s\n", name);
- user_select_syms (syms, blocks, m, 1);
+ user_select_syms (syms, m, 1);
return 0;
}
return 0;
}
-/* Returns true (non-zero) iff demangled name N0 should appear before N1 */
-/* in a listing of choices during disambiguation (see sort_choices, below). */
-/* The idea is that overloadings of a subprogram name from the */
-/* same package should sort in their source order. We settle for ordering */
-/* such symbols by their trailing number (__N or $N). */
+/* Returns true (non-zero) iff decoded name N0 should appear before N1
+ in a listing of choices during disambiguation (see sort_choices, below).
+ The idea is that overloadings of a subprogram name from the
+ same package should sort in their source order. We settle for ordering
+ such symbols by their trailing number (__N or $N). */
+
static int
-mangled_ordered_before (char *N0, char *N1)
+encoded_ordered_before (char *N0, char *N1)
{
if (N1 == NULL)
return 0;
@@ -2532,65 +3069,59 @@ mangled_ordered_before (char *N0, char *N1)
{
int k0, k1;
for (k0 = strlen (N0) - 1; k0 > 0 && isdigit (N0[k0]); k0 -= 1)
- ;
+ ;
for (k1 = strlen (N1) - 1; k1 > 0 && isdigit (N1[k1]); k1 -= 1)
- ;
+ ;
if ((N0[k0] == '_' || N0[k0] == '$') && N0[k0 + 1] != '\000'
- && (N1[k1] == '_' || N1[k1] == '$') && N1[k1 + 1] != '\000')
- {
- int n0, n1;
- n0 = k0;
- while (N0[n0] == '_' && n0 > 0 && N0[n0 - 1] == '_')
- n0 -= 1;
- n1 = k1;
- while (N1[n1] == '_' && n1 > 0 && N1[n1 - 1] == '_')
- n1 -= 1;
- if (n0 == n1 && DEPRECATED_STREQN (N0, N1, n0))
- return (atoi (N0 + k0 + 1) < atoi (N1 + k1 + 1));
- }
+ && (N1[k1] == '_' || N1[k1] == '$') && N1[k1 + 1] != '\000')
+ {
+ int n0, n1;
+ n0 = k0;
+ while (N0[n0] == '_' && n0 > 0 && N0[n0 - 1] == '_')
+ n0 -= 1;
+ n1 = k1;
+ while (N1[n1] == '_' && n1 > 0 && N1[n1 - 1] == '_')
+ n1 -= 1;
+ if (n0 == n1 && strncmp (N0, N1, n0) == 0)
+ return (atoi (N0 + k0 + 1) < atoi (N1 + k1 + 1));
+ }
return (strcmp (N0, N1) < 0);
}
}
-/* Sort SYMS[0..NSYMS-1] to put the choices in a canonical order by their */
-/* mangled names, rearranging BLOCKS[0..NSYMS-1] according to the same */
-/* permutation. */
+/* Sort SYMS[0..NSYMS-1] to put the choices in a canonical order by the
+ encoded names. */
+
static void
-sort_choices (struct symbol *syms[], struct block *blocks[], int nsyms)
+sort_choices (struct ada_symbol_info syms[], int nsyms)
{
- int i, j;
+ int i;
for (i = 1; i < nsyms; i += 1)
{
- struct symbol *sym = syms[i];
- struct block *block = blocks[i];
+ struct ada_symbol_info sym = syms[i];
int j;
for (j = i - 1; j >= 0; j -= 1)
- {
- if (mangled_ordered_before (DEPRECATED_SYMBOL_NAME (syms[j]),
- DEPRECATED_SYMBOL_NAME (sym)))
- break;
- syms[j + 1] = syms[j];
- blocks[j + 1] = blocks[j];
- }
+ {
+ if (encoded_ordered_before (SYMBOL_LINKAGE_NAME (syms[j].sym),
+ SYMBOL_LINKAGE_NAME (sym.sym)))
+ break;
+ syms[j + 1] = syms[j];
+ }
syms[j + 1] = sym;
- blocks[j + 1] = block;
}
}
-/* Given a list of NSYMS symbols in SYMS and corresponding blocks in */
-/* BLOCKS, select up to MAX_RESULTS>0 by asking the user (if */
-/* necessary), returning the number selected, and setting the first */
-/* elements of SYMS and BLOCKS to the selected symbols and */
-/* corresponding blocks. Error if no symbols selected. BLOCKS may */
-/* be NULL, in which case it is ignored. */
+/* Given a list of NSYMS symbols in SYMS, select up to MAX_RESULTS>0
+ by asking the user (if necessary), returning the number selected,
+ and setting the first elements of SYMS items. Error if no symbols
+ selected. */
/* NOTE: Adapted from decode_line_2 in symtab.c, with which it ought
- to be re-integrated one of these days. */
+ to be re-integrated one of these days. */
int
-user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
- int max_results)
+user_select_syms (struct ada_symbol_info *syms, int nsyms, int max_results)
{
int i;
int *chosen = (int *) alloca (sizeof (int) * nsyms);
@@ -2606,94 +3137,91 @@ user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
if (max_results > 1)
printf_unfiltered ("[1] all\n");
- sort_choices (syms, blocks, nsyms);
+ sort_choices (syms, nsyms);
for (i = 0; i < nsyms; i += 1)
{
- if (syms[i] == NULL)
- continue;
-
- if (SYMBOL_CLASS (syms[i]) == LOC_BLOCK)
- {
- struct symtab_and_line sal = find_function_start_sal (syms[i], 1);
- printf_unfiltered ("[%d] %s at %s:%d\n",
- i + first_choice,
- SYMBOL_PRINT_NAME (syms[i]),
- sal.symtab == NULL
- ? "<no source file available>"
- : sal.symtab->filename, sal.line);
- continue;
- }
+ if (syms[i].sym == NULL)
+ continue;
+
+ if (SYMBOL_CLASS (syms[i].sym) == LOC_BLOCK)
+ {
+ struct symtab_and_line sal =
+ find_function_start_sal (syms[i].sym, 1);
+ printf_unfiltered ("[%d] %s at %s:%d\n", i + first_choice,
+ SYMBOL_PRINT_NAME (syms[i].sym),
+ (sal.symtab == NULL
+ ? "<no source file available>"
+ : sal.symtab->filename), sal.line);
+ continue;
+ }
else
- {
- int is_enumeral =
- (SYMBOL_CLASS (syms[i]) == LOC_CONST
- && SYMBOL_TYPE (syms[i]) != NULL
- && TYPE_CODE (SYMBOL_TYPE (syms[i])) == TYPE_CODE_ENUM);
- struct symtab *symtab = symtab_for_sym (syms[i]);
-
- if (SYMBOL_LINE (syms[i]) != 0 && symtab != NULL)
- printf_unfiltered ("[%d] %s at %s:%d\n",
- i + first_choice,
- SYMBOL_PRINT_NAME (syms[i]),
- symtab->filename, SYMBOL_LINE (syms[i]));
- else if (is_enumeral && TYPE_NAME (SYMBOL_TYPE (syms[i])) != NULL)
- {
- printf_unfiltered ("[%d] ", i + first_choice);
- ada_print_type (SYMBOL_TYPE (syms[i]), NULL, gdb_stdout, -1, 0);
- printf_unfiltered ("'(%s) (enumeral)\n",
- SYMBOL_PRINT_NAME (syms[i]));
- }
- else if (symtab != NULL)
- printf_unfiltered (is_enumeral
- ? "[%d] %s in %s (enumeral)\n"
- : "[%d] %s at %s:?\n",
- i + first_choice,
- SYMBOL_PRINT_NAME (syms[i]),
- symtab->filename);
- else
- printf_unfiltered (is_enumeral
- ? "[%d] %s (enumeral)\n"
- : "[%d] %s at ?\n",
- i + first_choice,
- SYMBOL_PRINT_NAME (syms[i]));
- }
+ {
+ int is_enumeral =
+ (SYMBOL_CLASS (syms[i].sym) == LOC_CONST
+ && SYMBOL_TYPE (syms[i].sym) != NULL
+ && TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) == TYPE_CODE_ENUM);
+ struct symtab *symtab = symtab_for_sym (syms[i].sym);
+
+ if (SYMBOL_LINE (syms[i].sym) != 0 && symtab != NULL)
+ printf_unfiltered ("[%d] %s at %s:%d\n",
+ i + first_choice,
+ SYMBOL_PRINT_NAME (syms[i].sym),
+ symtab->filename, SYMBOL_LINE (syms[i].sym));
+ else if (is_enumeral
+ && TYPE_NAME (SYMBOL_TYPE (syms[i].sym)) != NULL)
+ {
+ printf_unfiltered ("[%d] ", i + first_choice);
+ ada_print_type (SYMBOL_TYPE (syms[i].sym), NULL,
+ gdb_stdout, -1, 0);
+ printf_unfiltered ("'(%s) (enumeral)\n",
+ SYMBOL_PRINT_NAME (syms[i].sym));
+ }
+ else if (symtab != NULL)
+ printf_unfiltered (is_enumeral
+ ? "[%d] %s in %s (enumeral)\n"
+ : "[%d] %s at %s:?\n",
+ i + first_choice,
+ SYMBOL_PRINT_NAME (syms[i].sym),
+ symtab->filename);
+ else
+ printf_unfiltered (is_enumeral
+ ? "[%d] %s (enumeral)\n"
+ : "[%d] %s at ?\n",
+ i + first_choice,
+ SYMBOL_PRINT_NAME (syms[i].sym));
+ }
}
n_chosen = get_selections (chosen, nsyms, max_results, max_results > 1,
- "overload-choice");
+ "overload-choice");
for (i = 0; i < n_chosen; i += 1)
- {
- syms[i] = syms[chosen[i]];
- if (blocks != NULL)
- blocks[i] = blocks[chosen[i]];
- }
+ syms[i] = syms[chosen[i]];
return n_chosen;
}
/* Read and validate a set of numeric choices from the user in the
- range 0 .. N_CHOICES-1. Place the results in increasing
+ range 0 .. N_CHOICES-1. Place the results in increasing
order in CHOICES[0 .. N-1], and return N.
The user types choices as a sequence of numbers on one line
separated by blanks, encoding them as follows:
- + A choice of 0 means to cancel the selection, throwing an error.
+ + A choice of 0 means to cancel the selection, throwing an error.
+ If IS_ALL_CHOICE, a choice of 1 selects the entire set 0 .. N_CHOICES-1.
+ The user chooses k by typing k+IS_ALL_CHOICE+1.
- The user is not allowed to choose more than MAX_RESULTS values.
+ The user is not allowed to choose more than MAX_RESULTS values.
ANNOTATION_SUFFIX, if present, is used to annotate the input
- prompts (for use with the -f switch). */
+ prompts (for use with the -f switch). */
int
get_selections (int *choices, int n_choices, int max_results,
- int is_all_choice, char *annotation_suffix)
+ int is_all_choice, char *annotation_suffix)
{
- int i;
char *args;
const char *prompt;
int n_chosen;
@@ -2713,50 +3241,50 @@ get_selections (int *choices, int n_choices, int max_results,
n_chosen = 0;
- /* Set choices[0 .. n_chosen-1] to the users' choices in ascending
- order, as given in args. Choices are validated. */
+ /* Set choices[0 .. n_chosen-1] to the users' choices in ascending
+ order, as given in args. Choices are validated. */
while (1)
{
char *args2;
int choice, j;
while (isspace (*args))
- args += 1;
+ args += 1;
if (*args == '\0' && n_chosen == 0)
- error_no_arg ("one or more choice numbers");
+ error_no_arg ("one or more choice numbers");
else if (*args == '\0')
- break;
+ break;
choice = strtol (args, &args2, 10);
if (args == args2 || choice < 0
- || choice > n_choices + first_choice - 1)
- error ("Argument must be choice number");
+ || choice > n_choices + first_choice - 1)
+ error ("Argument must be choice number");
args = args2;
if (choice == 0)
- error ("cancelled");
+ error ("cancelled");
if (choice < first_choice)
- {
- n_chosen = n_choices;
- for (j = 0; j < n_choices; j += 1)
- choices[j] = j;
- break;
- }
+ {
+ n_chosen = n_choices;
+ for (j = 0; j < n_choices; j += 1)
+ choices[j] = j;
+ break;
+ }
choice -= first_choice;
for (j = n_chosen - 1; j >= 0 && choice < choices[j]; j -= 1)
- {
- }
+ {
+ }
if (j < 0 || choice != choices[j])
- {
- int k;
- for (k = n_chosen - 1; k > j; k -= 1)
- choices[k + 1] = choices[k];
- choices[j + 1] = choice;
- n_chosen += 1;
- }
+ {
+ int k;
+ for (k = n_chosen - 1; k > j; k -= 1)
+ choices[k + 1] = choices[k];
+ choices[j + 1] = choice;
+ n_chosen += 1;
+ }
}
if (n_chosen > max_results)
@@ -2765,27 +3293,27 @@ get_selections (int *choices, int n_choices, int max_results,
return n_chosen;
}
-/* Replace the operator of length OPLEN at position PC in *EXPP with a call */
-/* on the function identified by SYM and BLOCK, and taking NARGS */
-/* arguments. Update *EXPP as needed to hold more space. */
+/* Replace the operator of length OPLEN at position PC in *EXPP with a call
+ on the function identified by SYM and BLOCK, and taking NARGS
+ arguments. Update *EXPP as needed to hold more space. */
static void
replace_operator_with_call (struct expression **expp, int pc, int nargs,
- int oplen, struct symbol *sym,
- struct block *block)
+ int oplen, struct symbol *sym,
+ struct block *block)
{
/* A new expression, with 6 more elements (3 for funcall, 4 for function
- symbol, -oplen for operator being replaced). */
+ symbol, -oplen for operator being replaced). */
struct expression *newexp = (struct expression *)
xmalloc (sizeof (struct expression)
- + EXP_ELEM_TO_BYTES ((*expp)->nelts + 7 - oplen));
+ + EXP_ELEM_TO_BYTES ((*expp)->nelts + 7 - oplen));
struct expression *exp = *expp;
newexp->nelts = exp->nelts + 7 - oplen;
newexp->language_defn = exp->language_defn;
memcpy (newexp->elts, exp->elts, EXP_ELEM_TO_BYTES (pc));
memcpy (newexp->elts + pc + 7, exp->elts + pc + oplen,
- EXP_ELEM_TO_BYTES (exp->nelts - pc - oplen));
+ EXP_ELEM_TO_BYTES (exp->nelts - pc - oplen));
newexp->elts[pc].opcode = newexp->elts[pc + 2].opcode = OP_FUNCALL;
newexp->elts[pc + 1].longconst = (LONGEST) nargs;
@@ -2800,8 +3328,8 @@ replace_operator_with_call (struct expression **expp, int pc, int nargs,
/* Type-class predicates */
-/* True iff TYPE is numeric (i.e., an INT, RANGE (of numeric type), or */
-/* FLOAT.) */
+/* True iff TYPE is numeric (i.e., an INT, RANGE (of numeric type),
+ or FLOAT). */
static int
numeric_type_p (struct type *type)
@@ -2811,20 +3339,20 @@ numeric_type_p (struct type *type)
else
{
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_INT:
- case TYPE_CODE_FLT:
- return 1;
- case TYPE_CODE_RANGE:
- return (type == TYPE_TARGET_TYPE (type)
- || numeric_type_p (TYPE_TARGET_TYPE (type)));
- default:
- return 0;
- }
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_FLT:
+ return 1;
+ case TYPE_CODE_RANGE:
+ return (type == TYPE_TARGET_TYPE (type)
+ || numeric_type_p (TYPE_TARGET_TYPE (type)));
+ default:
+ return 0;
+ }
}
}
-/* True iff TYPE is integral (an INT or RANGE of INTs). */
+/* True iff TYPE is integral (an INT or RANGE of INTs). */
static int
integer_type_p (struct type *type)
@@ -2834,19 +3362,19 @@ integer_type_p (struct type *type)
else
{
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_INT:
- return 1;
- case TYPE_CODE_RANGE:
- return (type == TYPE_TARGET_TYPE (type)
- || integer_type_p (TYPE_TARGET_TYPE (type)));
- default:
- return 0;
- }
+ {
+ case TYPE_CODE_INT:
+ return 1;
+ case TYPE_CODE_RANGE:
+ return (type == TYPE_TARGET_TYPE (type)
+ || integer_type_p (TYPE_TARGET_TYPE (type)));
+ default:
+ return 0;
+ }
}
}
-/* True iff TYPE is scalar (INT, RANGE, FLOAT, ENUM). */
+/* True iff TYPE is scalar (INT, RANGE, FLOAT, ENUM). */
static int
scalar_type_p (struct type *type)
@@ -2856,19 +3384,19 @@ scalar_type_p (struct type *type)
else
{
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_INT:
- case TYPE_CODE_RANGE:
- case TYPE_CODE_ENUM:
- case TYPE_CODE_FLT:
- return 1;
- default:
- return 0;
- }
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_RANGE:
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_FLT:
+ return 1;
+ default:
+ return 0;
+ }
}
}
-/* True iff TYPE is discrete (INT, RANGE, ENUM). */
+/* True iff TYPE is discrete (INT, RANGE, ENUM). */
static int
discrete_type_p (struct type *type)
@@ -2878,28 +3406,32 @@ discrete_type_p (struct type *type)
else
{
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_INT:
- case TYPE_CODE_RANGE:
- case TYPE_CODE_ENUM:
- return 1;
- default:
- return 0;
- }
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_RANGE:
+ case TYPE_CODE_ENUM:
+ return 1;
+ default:
+ return 0;
+ }
}
}
-/* Returns non-zero if OP with operatands in the vector ARGS could be
- a user-defined function. Errs on the side of pre-defined operators
- (i.e., result 0). */
+/* Returns non-zero if OP with operands in the vector ARGS could be
+ a user-defined function. Errs on the side of pre-defined operators
+ (i.e., result 0). */
static int
possible_user_operator_p (enum exp_opcode op, struct value *args[])
{
- struct type *type0 = check_typedef (VALUE_TYPE (args[0]));
+ struct type *type0 =
+ (args[0] == NULL) ? NULL : check_typedef (VALUE_TYPE (args[0]));
struct type *type1 =
(args[1] == NULL) ? NULL : check_typedef (VALUE_TYPE (args[1]));
+ if (type0 == NULL)
+ return 0;
+
switch (op)
{
default:
@@ -2927,13 +3459,14 @@ possible_user_operator_p (enum exp_opcode op, struct value *args[])
return (!(scalar_type_p (type0) && scalar_type_p (type1)));
case BINOP_CONCAT:
- return ((TYPE_CODE (type0) != TYPE_CODE_ARRAY &&
- (TYPE_CODE (type0) != TYPE_CODE_PTR ||
- TYPE_CODE (TYPE_TARGET_TYPE (type0))
- != TYPE_CODE_ARRAY))
- || (TYPE_CODE (type1) != TYPE_CODE_ARRAY &&
- (TYPE_CODE (type1) != TYPE_CODE_PTR ||
- TYPE_CODE (TYPE_TARGET_TYPE (type1)) != TYPE_CODE_ARRAY)));
+ return
+ ((TYPE_CODE (type0) != TYPE_CODE_ARRAY
+ && (TYPE_CODE (type0) != TYPE_CODE_PTR
+ || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY))
+ || (TYPE_CODE (type1) != TYPE_CODE_ARRAY
+ && (TYPE_CODE (type1) != TYPE_CODE_PTR
+ || (TYPE_CODE (TYPE_TARGET_TYPE (type1))
+ != TYPE_CODE_ARRAY))));
case BINOP_EXP:
return (!(numeric_type_p (type0) && integer_type_p (type1)));
@@ -2947,16 +3480,17 @@ possible_user_operator_p (enum exp_opcode op, struct value *args[])
}
}
- /* Renaming */
+ /* Renaming */
-/** NOTE: In the following, we assume that a renaming type's name may
- * have an ___XD suffix. It would be nice if this went away at some
- * point. */
+/* NOTE: In the following, we assume that a renaming type's name may
+ have an ___XD suffix. It would be nice if this went away at some
+ point. */
/* If TYPE encodes a renaming, returns the renaming suffix, which
- * is XR for an object renaming, XRP for a procedure renaming, XRE for
- * an exception renaming, and XRS for a subprogram renaming. Returns
- * NULL if NAME encodes none of these. */
+ is XR for an object renaming, XRP for a procedure renaming, XRE for
+ an exception renaming, and XRS for a subprogram renaming. Returns
+ NULL if NAME encodes none of these. */
+
const char *
ada_renaming_type (struct type *type)
{
@@ -2965,16 +3499,17 @@ ada_renaming_type (struct type *type)
const char *name = type_name_no_tag (type);
const char *suffix = (name == NULL) ? NULL : strstr (name, "___XR");
if (suffix == NULL
- || (suffix[5] != '\000' && strchr ("PES_", suffix[5]) == NULL))
- return NULL;
+ || (suffix[5] != '\000' && strchr ("PES_", suffix[5]) == NULL))
+ return NULL;
else
- return suffix + 3;
+ return suffix + 3;
}
else
return NULL;
}
-/* Return non-zero iff SYM encodes an object renaming. */
+/* Return non-zero iff SYM encodes an object renaming. */
+
int
ada_is_object_renaming (struct symbol *sym)
{
@@ -2984,9 +3519,10 @@ ada_is_object_renaming (struct symbol *sym)
}
/* Assuming that SYM encodes a non-object renaming, returns the original
- * name of the renamed entity. The name is good until the end of
- * parsing. */
-const char *
+ name of the renamed entity. The name is good until the end of
+ parsing. */
+
+char *
ada_simple_renamed_entity (struct symbol *sym)
{
struct type *type;
@@ -3004,38 +3540,52 @@ ada_simple_renamed_entity (struct symbol *sym)
error ("Improperly encoded renaming.");
result = xmalloc (len + 1);
- /* FIXME: add_name_string_cleanup should be defined in parse.c */
- /* add_name_string_cleanup (result); */
strncpy (result, raw_name, len);
result[len] = '\000';
return result;
}
- /* Evaluation: Function Calls */
+ /* Evaluation: Function Calls */
-/* Copy VAL onto the stack, using and updating *SP as the stack
- pointer. Return VAL as an lvalue. */
+/* Return an lvalue containing the value VAL. This is the identity on
+ lvalues, and otherwise has the side-effect of pushing a copy of VAL
+ on the stack, using and updating *SP as the stack pointer, and
+ returning an lvalue whose VALUE_ADDRESS points to the copy. */
static struct value *
-place_on_stack (struct value *val, CORE_ADDR *sp)
+ensure_lval (struct value *val, CORE_ADDR *sp)
{
- CORE_ADDR old_sp = *sp;
+ if (! VALUE_LVAL (val))
+ {
+ int len = TYPE_LENGTH (check_typedef (VALUE_TYPE (val)));
-#ifdef DEPRECATED_STACK_ALIGN
- *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val),
- DEPRECATED_STACK_ALIGN (TYPE_LENGTH
- (check_typedef (VALUE_TYPE (val)))));
-#else
- *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val),
- TYPE_LENGTH (check_typedef (VALUE_TYPE (val))));
-#endif
+ /* The following is taken from the structure-return code in
+ call_function_by_hand. FIXME: Therefore, some refactoring seems
+ indicated. */
+ if (INNER_THAN (1, 2))
+ {
+ /* Stack grows downward. Align SP and VALUE_ADDRESS (val) after
+ reserving sufficient space. */
+ *sp -= len;
+ if (gdbarch_frame_align_p (current_gdbarch))
+ *sp = gdbarch_frame_align (current_gdbarch, *sp);
+ VALUE_ADDRESS (val) = *sp;
+ }
+ else
+ {
+ /* Stack grows upward. Align the frame, allocate space, and
+ then again, re-align the frame. */
+ if (gdbarch_frame_align_p (current_gdbarch))
+ *sp = gdbarch_frame_align (current_gdbarch, *sp);
+ VALUE_ADDRESS (val) = *sp;
+ *sp += len;
+ if (gdbarch_frame_align_p (current_gdbarch))
+ *sp = gdbarch_frame_align (current_gdbarch, *sp);
+ }
- VALUE_LVAL (val) = lval_memory;
- if (INNER_THAN (1, 2))
- VALUE_ADDRESS (val) = *sp;
- else
- VALUE_ADDRESS (val) = old_sp;
+ write_memory (VALUE_ADDRESS (val), VALUE_CONTENTS_RAW (val), len);
+ }
return val;
}
@@ -3043,11 +3593,11 @@ place_on_stack (struct value *val, CORE_ADDR *sp)
/* Return the value ACTUAL, converted to be an appropriate value for a
formal of type FORMAL_TYPE. Use *SP as a stack pointer for
allocating any necessary descriptors (fat pointers), or copies of
- values not residing in memory, updating it as needed. */
+ values not residing in memory, updating it as needed. */
static struct value *
convert_actual (struct value *actual, struct type *formal_type0,
- CORE_ADDR *sp)
+ CORE_ADDR *sp)
{
struct type *actual_type = check_typedef (VALUE_TYPE (actual));
struct type *formal_type = check_typedef (formal_type0);
@@ -3058,28 +3608,28 @@ convert_actual (struct value *actual, struct type *formal_type0,
TYPE_CODE (actual_type) == TYPE_CODE_PTR
? check_typedef (TYPE_TARGET_TYPE (actual_type)) : actual_type;
- if (ada_is_array_descriptor (formal_target)
+ if (ada_is_array_descriptor_type (formal_target)
&& TYPE_CODE (actual_target) == TYPE_CODE_ARRAY)
return make_array_descriptor (formal_type, actual, sp);
else if (TYPE_CODE (formal_type) == TYPE_CODE_PTR)
{
if (TYPE_CODE (formal_target) == TYPE_CODE_ARRAY
- && ada_is_array_descriptor (actual_target))
- return desc_data (actual);
+ && ada_is_array_descriptor_type (actual_target))
+ return desc_data (actual);
else if (TYPE_CODE (actual_type) != TYPE_CODE_PTR)
- {
- if (VALUE_LVAL (actual) != lval_memory)
- {
- struct value *val;
- actual_type = check_typedef (VALUE_TYPE (actual));
- val = allocate_value (actual_type);
- memcpy ((char *) VALUE_CONTENTS_RAW (val),
- (char *) VALUE_CONTENTS (actual),
- TYPE_LENGTH (actual_type));
- actual = place_on_stack (val, sp);
- }
- return value_addr (actual);
- }
+ {
+ if (VALUE_LVAL (actual) != lval_memory)
+ {
+ struct value *val;
+ actual_type = check_typedef (VALUE_TYPE (actual));
+ val = allocate_value (actual_type);
+ memcpy ((char *) VALUE_CONTENTS_RAW (val),
+ (char *) VALUE_CONTENTS (actual),
+ TYPE_LENGTH (actual_type));
+ actual = ensure_lval (val, sp);
+ }
+ return value_addr (actual);
+ }
}
else if (TYPE_CODE (actual_type) == TYPE_CODE_PTR)
return ada_value_ind (actual);
@@ -3088,11 +3638,11 @@ convert_actual (struct value *actual, struct type *formal_type0,
}
-/* Push a descriptor of type TYPE for array value ARR on the stack at
- *SP, updating *SP to reflect the new descriptor. Return either
+/* Push a descriptor of type TYPE for array value ARR on the stack at
+ *SP, updating *SP to reflect the new descriptor. Return either
an lvalue representing the new descriptor, or (if TYPE is a pointer-
- to-descriptor type rather than a descriptor type), a struct value*
- representing a pointer to this descriptor. */
+ to-descriptor type rather than a descriptor type), a struct value *
+ representing a pointer to this descriptor. */
static struct value *
make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
@@ -3101,33 +3651,33 @@ make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
struct type *desc_type = desc_base_type (type);
struct value *descriptor = allocate_value (desc_type);
struct value *bounds = allocate_value (bounds_type);
- CORE_ADDR bounds_addr;
int i;
for (i = ada_array_arity (check_typedef (VALUE_TYPE (arr))); i > 0; i -= 1)
{
modify_general_field (VALUE_CONTENTS (bounds),
- value_as_long (ada_array_bound (arr, i, 0)),
- desc_bound_bitpos (bounds_type, i, 0),
- desc_bound_bitsize (bounds_type, i, 0));
+ value_as_long (ada_array_bound (arr, i, 0)),
+ desc_bound_bitpos (bounds_type, i, 0),
+ desc_bound_bitsize (bounds_type, i, 0));
modify_general_field (VALUE_CONTENTS (bounds),
- value_as_long (ada_array_bound (arr, i, 1)),
- desc_bound_bitpos (bounds_type, i, 1),
- desc_bound_bitsize (bounds_type, i, 1));
+ value_as_long (ada_array_bound (arr, i, 1)),
+ desc_bound_bitpos (bounds_type, i, 1),
+ desc_bound_bitsize (bounds_type, i, 1));
}
- bounds = place_on_stack (bounds, sp);
+ bounds = ensure_lval (bounds, sp);
modify_general_field (VALUE_CONTENTS (descriptor),
- arr,
- fat_pntr_data_bitpos (desc_type),
- fat_pntr_data_bitsize (desc_type));
+ VALUE_ADDRESS (ensure_lval (arr, sp)),
+ fat_pntr_data_bitpos (desc_type),
+ fat_pntr_data_bitsize (desc_type));
+
modify_general_field (VALUE_CONTENTS (descriptor),
- VALUE_ADDRESS (bounds),
- fat_pntr_bounds_bitpos (desc_type),
- fat_pntr_bounds_bitsize (desc_type));
+ VALUE_ADDRESS (bounds),
+ fat_pntr_bounds_bitpos (desc_type),
+ fat_pntr_bounds_bitsize (desc_type));
- descriptor = place_on_stack (descriptor, sp);
+ descriptor = ensure_lval (descriptor, sp);
if (TYPE_CODE (type) == TYPE_CODE_PTR)
return value_addr (descriptor);
@@ -3136,17 +3686,17 @@ make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
}
-/* Assuming a dummy frame has been established on the target, perform any
+/* Assuming a dummy frame has been established on the target, perform any
conversions needed for calling function FUNC on the NARGS actual
- parameters in ARGS, other than standard C conversions. Does
+ parameters in ARGS, other than standard C conversions. Does
nothing if FUNC does not have Ada-style prototype data, or if NARGS
- does not match the number of arguments expected. Use *SP as a
+ does not match the number of arguments expected. Use *SP as a
stack pointer for additional data that must be pushed, updating its
- value as needed. */
+ value as needed. */
void
ada_convert_actuals (struct value *func, int nargs, struct value *args[],
- CORE_ADDR *sp)
+ CORE_ADDR *sp)
{
int i;
@@ -3159,52 +3709,162 @@ ada_convert_actuals (struct value *func, int nargs, struct value *args[],
convert_actual (args[i], TYPE_FIELD_TYPE (VALUE_TYPE (func), i), sp);
}
+ /* Experimental Symbol Cache Module */
+
+/* This module may well have been OBE, due to improvements in the
+ symbol-table module. So until proven otherwise, it is disabled in
+ the submitted public code, and may be removed from all sources
+ in the future. */
+
+#ifdef GNAT_GDB
+
+/* This section implements a simple, fixed-sized hash table for those
+ Ada-mode symbols that get looked up in the course of executing the user's
+ commands. The size is fixed on the grounds that there are not
+ likely to be all that many symbols looked up during any given
+ session, regardless of the size of the symbol table. If we decide
+ to go to a resizable table, let's just use the stuff from libiberty
+ instead. */
+
+#define HASH_SIZE 1009
+
+struct cache_entry
+{
+ const char *name;
+ domain_enum namespace;
+ struct symbol *sym;
+ struct symtab *symtab;
+ struct block *block;
+ struct cache_entry *next;
+};
+
+static struct obstack cache_space;
- /* Symbol Lookup */
+static struct cache_entry *cache[HASH_SIZE];
+/* Clear all entries from the symbol cache. */
-/* The vectors of symbols and blocks ultimately returned from */
-/* ada_lookup_symbol_list. */
+void
+clear_ada_sym_cache (void)
+{
+ obstack_free (&cache_space, NULL);
+ obstack_init (&cache_space);
+ memset (cache, '\000', sizeof (cache));
+}
+
+static struct cache_entry **
+find_entry (const char *name, domain_enum namespace)
+{
+ int h = msymbol_hash (name) % HASH_SIZE;
+ struct cache_entry **e;
+ for (e = &cache[h]; *e != NULL; e = &(*e)->next)
+ {
+ if (namespace == (*e)->namespace && strcmp (name, (*e)->name) == 0)
+ return e;
+ }
+ return NULL;
+}
-/* Current size of defn_symbols and defn_blocks */
-static size_t defn_vector_size = 0;
+/* Return (in SYM) the last cached definition for global or static symbol NAME
+ in namespace DOMAIN. Returns 1 if entry found, 0 otherwise.
+ If SYMTAB is non-NULL, store the symbol
+ table in which the symbol was found there, or NULL if not found.
+ *BLOCK is set to the block in which NAME is found. */
+
+static int
+lookup_cached_symbol (const char *name, domain_enum namespace,
+ struct symbol **sym, struct block **block,
+ struct symtab **symtab)
+{
+ struct cache_entry **e = find_entry (name, namespace);
+ if (e == NULL)
+ return 0;
+ if (sym != NULL)
+ *sym = (*e)->sym;
+ if (block != NULL)
+ *block = (*e)->block;
+ if (symtab != NULL)
+ *symtab = (*e)->symtab;
+ return 1;
+}
-/* Current number of symbols found. */
-static int ndefns = 0;
+/* Set the cached definition of NAME in DOMAIN to SYM in block
+ BLOCK and symbol table SYMTAB. */
-static struct symbol **defn_symbols = NULL;
-static struct block **defn_blocks = NULL;
+static void
+cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
+ struct block *block, struct symtab *symtab)
+{
+ int h = msymbol_hash (name) % HASH_SIZE;
+ char *copy;
+ struct cache_entry *e =
+ (struct cache_entry *) obstack_alloc (&cache_space, sizeof (*e));
+ e->next = cache[h];
+ cache[h] = e;
+ e->name = copy = obstack_alloc (&cache_space, strlen (name) + 1);
+ strcpy (copy, name);
+ e->sym = sym;
+ e->namespace = namespace;
+ e->symtab = symtab;
+ e->block = block;
+}
-/* Return the result of a standard (literal, C-like) lookup of NAME in
- * given DOMAIN. */
+#else
+static int
+lookup_cached_symbol (const char *name, domain_enum namespace,
+ struct symbol **sym, struct block **block,
+ struct symtab **symtab)
+{
+ return 0;
+}
+
+static void
+cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
+ struct block *block, struct symtab *symtab)
+{
+}
+#endif /* GNAT_GDB */
+
+ /* Symbol Lookup */
+
+/* Return the result of a standard (literal, C-like) lookup of NAME in
+ given DOMAIN, visible from lexical block BLOCK. */
static struct symbol *
-standard_lookup (const char *name, domain_enum domain)
+standard_lookup (const char *name, const struct block *block,
+ domain_enum domain)
{
struct symbol *sym;
- sym = lookup_symbol (name, (struct block *) NULL, domain, 0, NULL);
+ struct symtab *symtab;
+
+ if (lookup_cached_symbol (name, domain, &sym, NULL, NULL))
+ return sym;
+ sym =
+ lookup_symbol_in_language (name, block, domain, language_c, 0, &symtab);
+ cache_symbol (name, domain, sym, block_found, symtab);
return sym;
}
-/* Non-zero iff there is at least one non-function/non-enumeral symbol */
-/* in SYMS[0..N-1]. We treat enumerals as functions, since they */
-/* contend in overloading in the same way. */
+/* Non-zero iff there is at least one non-function/non-enumeral symbol
+ in the symbol fields of SYMS[0..N-1]. We treat enumerals as functions,
+ since they contend in overloading in the same way. */
static int
-is_nonfunction (struct symbol *syms[], int n)
+is_nonfunction (struct ada_symbol_info syms[], int n)
{
int i;
for (i = 0; i < n; i += 1)
- if (TYPE_CODE (SYMBOL_TYPE (syms[i])) != TYPE_CODE_FUNC
- && TYPE_CODE (SYMBOL_TYPE (syms[i])) != TYPE_CODE_ENUM)
+ if (TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) != TYPE_CODE_FUNC
+ && (TYPE_CODE (SYMBOL_TYPE (syms[i].sym)) != TYPE_CODE_ENUM
+ || SYMBOL_CLASS (syms[i].sym) != LOC_CONST))
return 1;
return 0;
}
/* If true (non-zero), then TYPE0 and TYPE1 represent equivalent
- struct types. Otherwise, they may not. */
+ struct types. Otherwise, they may not. */
static int
equiv_types (struct type *type0, struct type *type1)
@@ -3217,14 +3877,14 @@ equiv_types (struct type *type0, struct type *type1)
if ((TYPE_CODE (type0) == TYPE_CODE_STRUCT
|| TYPE_CODE (type0) == TYPE_CODE_ENUM)
&& ada_type_name (type0) != NULL && ada_type_name (type1) != NULL
- && DEPRECATED_STREQ (ada_type_name (type0), ada_type_name (type1)))
+ && strcmp (ada_type_name (type0), ada_type_name (type1)) == 0)
return 1;
return 0;
}
/* True iff SYM0 represents the same entity as SYM1, or one that is
- no more defined than that of SYM1. */
+ no more defined than that of SYM1. */
static int
lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
@@ -3241,65 +3901,91 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
return 1;
case LOC_TYPEDEF:
{
- struct type *type0 = SYMBOL_TYPE (sym0);
- struct type *type1 = SYMBOL_TYPE (sym1);
- char *name0 = DEPRECATED_SYMBOL_NAME (sym0);
- char *name1 = DEPRECATED_SYMBOL_NAME (sym1);
- int len0 = strlen (name0);
- return
- TYPE_CODE (type0) == TYPE_CODE (type1)
- && (equiv_types (type0, type1)
- || (len0 < strlen (name1) && DEPRECATED_STREQN (name0, name1, len0)
- && DEPRECATED_STREQN (name1 + len0, "___XV", 5)));
+ struct type *type0 = SYMBOL_TYPE (sym0);
+ struct type *type1 = SYMBOL_TYPE (sym1);
+ char *name0 = SYMBOL_LINKAGE_NAME (sym0);
+ char *name1 = SYMBOL_LINKAGE_NAME (sym1);
+ int len0 = strlen (name0);
+ return
+ TYPE_CODE (type0) == TYPE_CODE (type1)
+ && (equiv_types (type0, type1)
+ || (len0 < strlen (name1) && strncmp (name0, name1, len0) == 0
+ && strncmp (name1 + len0, "___XV", 5) == 0));
}
case LOC_CONST:
return SYMBOL_VALUE (sym0) == SYMBOL_VALUE (sym1)
- && equiv_types (SYMBOL_TYPE (sym0), SYMBOL_TYPE (sym1));
+ && equiv_types (SYMBOL_TYPE (sym0), SYMBOL_TYPE (sym1));
default:
return 0;
}
}
-/* Append SYM to the end of defn_symbols, and BLOCK to the end of
- defn_blocks, updating ndefns, and expanding defn_symbols and
- defn_blocks as needed. Do not include SYM if it is a duplicate. */
+/* Append (SYM,BLOCK,SYMTAB) to the end of the array of struct ada_symbol_info
+ records in OBSTACKP. Do nothing if SYM is a duplicate. */
static void
-add_defn_to_vec (struct symbol *sym, struct block *block)
+add_defn_to_vec (struct obstack *obstackp,
+ struct symbol *sym,
+ struct block *block, struct symtab *symtab)
{
int i;
size_t tmp;
+ struct ada_symbol_info *prevDefns = defns_collected (obstackp, 0);
if (SYMBOL_TYPE (sym) != NULL)
CHECK_TYPEDEF (SYMBOL_TYPE (sym));
- for (i = 0; i < ndefns; i += 1)
+ for (i = num_defns_collected (obstackp) - 1; i >= 0; i -= 1)
{
- if (lesseq_defined_than (sym, defn_symbols[i]))
- return;
- else if (lesseq_defined_than (defn_symbols[i], sym))
- {
- defn_symbols[i] = sym;
- defn_blocks[i] = block;
- return;
- }
+ if (lesseq_defined_than (sym, prevDefns[i].sym))
+ return;
+ else if (lesseq_defined_than (prevDefns[i].sym, sym))
+ {
+ prevDefns[i].sym = sym;
+ prevDefns[i].block = block;
+ prevDefns[i].symtab = symtab;
+ return;
+ }
}
- tmp = defn_vector_size;
- GROW_VECT (defn_symbols, tmp, ndefns + 2);
- GROW_VECT (defn_blocks, defn_vector_size, ndefns + 2);
+ {
+ struct ada_symbol_info info;
- defn_symbols[ndefns] = sym;
- defn_blocks[ndefns] = block;
- ndefns += 1;
+ info.sym = sym;
+ info.block = block;
+ info.symtab = symtab;
+ obstack_grow (obstackp, &info, sizeof (struct ada_symbol_info));
+ }
}
-/* Look, in partial_symtab PST, for symbol NAME in given domain.
- Check the global symbols if GLOBAL, the static symbols if not. Do
- wild-card match if WILD. */
+/* Number of ada_symbol_info structures currently collected in
+ current vector in *OBSTACKP. */
+
+static int
+num_defns_collected (struct obstack *obstackp)
+{
+ return obstack_object_size (obstackp) / sizeof (struct ada_symbol_info);
+}
+
+/* Vector of ada_symbol_info structures currently collected in current
+ vector in *OBSTACKP. If FINISH, close off the vector and return
+ its final address. */
+
+static struct ada_symbol_info *
+defns_collected (struct obstack *obstackp, int finish)
+{
+ if (finish)
+ return obstack_finish (obstackp);
+ else
+ return (struct ada_symbol_info *) obstack_base (obstackp);
+}
+
+/* Look, in partial_symtab PST, for symbol NAME in given namespace.
+ Check the global symbols if GLOBAL, the static symbols if not.
+ Do wild-card match if WILD. */
static struct partial_symbol *
ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
- int global, domain_enum domain, int wild)
+ int global, domain_enum namespace, int wild)
{
struct partial_symbol **start;
int name_len = strlen (name);
@@ -3312,121 +3998,123 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
}
start = (global ?
- pst->objfile->global_psymbols.list + pst->globals_offset :
- pst->objfile->static_psymbols.list + pst->statics_offset);
+ pst->objfile->global_psymbols.list + pst->globals_offset :
+ pst->objfile->static_psymbols.list + pst->statics_offset);
if (wild)
{
for (i = 0; i < length; i += 1)
- {
- struct partial_symbol *psym = start[i];
+ {
+ struct partial_symbol *psym = start[i];
- if (SYMBOL_DOMAIN (psym) == domain &&
- wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (psym)))
- return psym;
- }
+ if (SYMBOL_DOMAIN (psym) == namespace
+ && wild_match (name, name_len, SYMBOL_LINKAGE_NAME (psym)))
+ return psym;
+ }
return NULL;
}
else
{
if (global)
- {
- int U;
- i = 0;
- U = length - 1;
- while (U - i > 4)
- {
- int M = (U + i) >> 1;
- struct partial_symbol *psym = start[M];
- if (DEPRECATED_SYMBOL_NAME (psym)[0] < name[0])
- i = M + 1;
- else if (DEPRECATED_SYMBOL_NAME (psym)[0] > name[0])
- U = M - 1;
- else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), name) < 0)
- i = M + 1;
- else
- U = M;
- }
- }
+ {
+ int U;
+ i = 0;
+ U = length - 1;
+ while (U - i > 4)
+ {
+ int M = (U + i) >> 1;
+ struct partial_symbol *psym = start[M];
+ if (SYMBOL_LINKAGE_NAME (psym)[0] < name[0])
+ i = M + 1;
+ else if (SYMBOL_LINKAGE_NAME (psym)[0] > name[0])
+ U = M - 1;
+ else if (strcmp (SYMBOL_LINKAGE_NAME (psym), name) < 0)
+ i = M + 1;
+ else
+ U = M;
+ }
+ }
else
- i = 0;
+ i = 0;
while (i < length)
- {
- struct partial_symbol *psym = start[i];
-
- if (SYMBOL_DOMAIN (psym) == domain)
- {
- int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym), name_len);
-
- if (cmp < 0)
- {
- if (global)
- break;
- }
- else if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len))
- return psym;
- }
- i += 1;
- }
+ {
+ struct partial_symbol *psym = start[i];
+
+ if (SYMBOL_DOMAIN (psym) == namespace)
+ {
+ int cmp = strncmp (name, SYMBOL_LINKAGE_NAME (psym), name_len);
+
+ if (cmp < 0)
+ {
+ if (global)
+ break;
+ }
+ else if (cmp == 0
+ && is_name_suffix (SYMBOL_LINKAGE_NAME (psym)
+ + name_len))
+ return psym;
+ }
+ i += 1;
+ }
if (global)
- {
- int U;
- i = 0;
- U = length - 1;
- while (U - i > 4)
- {
- int M = (U + i) >> 1;
- struct partial_symbol *psym = start[M];
- if (DEPRECATED_SYMBOL_NAME (psym)[0] < '_')
- i = M + 1;
- else if (DEPRECATED_SYMBOL_NAME (psym)[0] > '_')
- U = M - 1;
- else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), "_ada_") < 0)
- i = M + 1;
- else
- U = M;
- }
- }
+ {
+ int U;
+ i = 0;
+ U = length - 1;
+ while (U - i > 4)
+ {
+ int M = (U + i) >> 1;
+ struct partial_symbol *psym = start[M];
+ if (SYMBOL_LINKAGE_NAME (psym)[0] < '_')
+ i = M + 1;
+ else if (SYMBOL_LINKAGE_NAME (psym)[0] > '_')
+ U = M - 1;
+ else if (strcmp (SYMBOL_LINKAGE_NAME (psym), "_ada_") < 0)
+ i = M + 1;
+ else
+ U = M;
+ }
+ }
else
- i = 0;
+ i = 0;
while (i < length)
- {
- struct partial_symbol *psym = start[i];
-
- if (SYMBOL_DOMAIN (psym) == domain)
- {
- int cmp;
-
- cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (psym)[0];
- if (cmp == 0)
- {
- cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (psym), 5);
- if (cmp == 0)
- cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym) + 5, name_len);
- }
-
- if (cmp < 0)
- {
- if (global)
- break;
- }
- else if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len + 5))
- return psym;
- }
- i += 1;
- }
-
+ {
+ struct partial_symbol *psym = start[i];
+
+ if (SYMBOL_DOMAIN (psym) == namespace)
+ {
+ int cmp;
+
+ cmp = (int) '_' - (int) SYMBOL_LINKAGE_NAME (psym)[0];
+ if (cmp == 0)
+ {
+ cmp = strncmp ("_ada_", SYMBOL_LINKAGE_NAME (psym), 5);
+ if (cmp == 0)
+ cmp = strncmp (name, SYMBOL_LINKAGE_NAME (psym) + 5,
+ name_len);
+ }
+
+ if (cmp < 0)
+ {
+ if (global)
+ break;
+ }
+ else if (cmp == 0
+ && is_name_suffix (SYMBOL_LINKAGE_NAME (psym)
+ + name_len + 5))
+ return psym;
+ }
+ i += 1;
+ }
}
return NULL;
}
-
/* Find a symbol table containing symbol SYM or NULL if none. */
+
static struct symtab *
symtab_for_sym (struct symbol *sym)
{
@@ -3448,15 +4136,15 @@ symtab_for_sym (struct symbol *sym)
case LOC_LABEL:
case LOC_BLOCK:
case LOC_CONST_BYTES:
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
- return s;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
- return s;
- break;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
+ break;
default:
- break;
+ break;
}
switch (SYMBOL_CLASS (sym))
{
@@ -3472,160 +4160,212 @@ symtab_for_sym (struct symbol *sym)
case LOC_BASEREG_ARG:
case LOC_COMPUTED:
case LOC_COMPUTED_ARG:
- for (j = FIRST_LOCAL_BLOCK;
- j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
- {
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
- return s;
- }
- break;
+ for (j = FIRST_LOCAL_BLOCK;
+ j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
+ {
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
+ }
+ break;
default:
- break;
+ break;
}
}
return NULL;
}
-/* Return a minimal symbol matching NAME according to Ada demangling
- rules. Returns NULL if there is no such minimal symbol. */
+/* Return a minimal symbol matching NAME according to Ada decoding
+ rules. Returns NULL if there is no such minimal symbol. Names
+ prefixed with "standard__" are handled specially: "standard__" is
+ first stripped off, and only static and global symbols are searched. */
struct minimal_symbol *
-ada_lookup_minimal_symbol (const char *name)
+ada_lookup_simple_minsym (const char *name)
{
struct objfile *objfile;
struct minimal_symbol *msymbol;
- int wild_match = (strstr (name, "__") == NULL);
+ int wild_match;
+
+ if (strncmp (name, "standard__", sizeof ("standard__") - 1) == 0)
+ {
+ name += sizeof ("standard__") - 1;
+ wild_match = 0;
+ }
+ else
+ wild_match = (strstr (name, "__") == NULL);
ALL_MSYMBOLS (objfile, msymbol)
{
- if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match)
- && MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
+ if (ada_match_name (SYMBOL_LINKAGE_NAME (msymbol), name, wild_match)
+ && MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
return msymbol;
}
return NULL;
}
+/* Return up minimal symbol for NAME, folded and encoded according to
+ Ada conventions, or NULL if none. The last two arguments are ignored. */
+
+static struct minimal_symbol *
+ada_lookup_minimal_symbol (const char *name, const char *sfile,
+ struct objfile *objf)
+{
+ return ada_lookup_simple_minsym (ada_encode (name));
+}
+
/* For all subprograms that statically enclose the subprogram of the
- * selected frame, add symbols matching identifier NAME in DOMAIN
- * and their blocks to vectors *defn_symbols and *defn_blocks, as for
- * ada_add_block_symbols (q.v.). If WILD, treat as NAME with a
- * wildcard prefix. At the moment, this function uses a heuristic to
- * find the frames of enclosing subprograms: it treats the
- * pointer-sized value at location 0 from the local-variable base of a
- * frame as a static link, and then searches up the call stack for a
- * frame with that same local-variable base. */
+ selected frame, add symbols matching identifier NAME in DOMAIN
+ and their blocks to the list of data in OBSTACKP, as for
+ ada_add_block_symbols (q.v.). If WILD, treat as NAME with a
+ wildcard prefix. */
+
static void
-add_symbols_from_enclosing_procs (const char *name, domain_enum domain,
- int wild_match)
-{
-#ifdef i386
+add_symbols_from_enclosing_procs (struct obstack *obstackp,
+ const char *name, domain_enum namespace,
+ int wild_match)
+{
+#ifdef HAVE_ADD_SYMBOLS_FROM_ENCLOSING_PROCS
+ /* Use a heuristic to find the frames of enclosing subprograms: treat the
+ pointer-sized value at location 0 from the local-variable base of a
+ frame as a static link, and then search up the call stack for a
+ frame with that same local-variable base. */
static struct symbol static_link_sym;
static struct symbol *static_link;
+ struct value *target_link_val;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
struct frame_info *frame;
- struct frame_info *target_frame;
+
+ if (!target_has_stack)
+ return;
if (static_link == NULL)
{
/* Initialize the local variable symbol that stands for the
- * static link (when it exists). */
+ static link (when there is one). */
static_link = &static_link_sym;
- DEPRECATED_SYMBOL_NAME (static_link) = "";
+ SYMBOL_LINKAGE_NAME (static_link) = "";
SYMBOL_LANGUAGE (static_link) = language_unknown;
SYMBOL_CLASS (static_link) = LOC_LOCAL;
SYMBOL_DOMAIN (static_link) = VAR_DOMAIN;
SYMBOL_TYPE (static_link) = lookup_pointer_type (builtin_type_void);
SYMBOL_VALUE (static_link) =
- -(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
+ -(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
}
- frame = deprecated_selected_frame;
- while (frame != NULL && ndefns == 0)
+ frame = get_selected_frame ();
+ if (frame == NULL || inside_main_func (get_frame_address_in_block (frame)))
+ return;
+
+ target_link_val = read_var_value (static_link, frame);
+ while (target_link_val != NULL
+ && num_defns_collected (obstackp) == 0
+ && frame_relative_level (frame) <= MAX_ENCLOSING_FRAME_LEVELS)
{
- struct block *block;
- struct value *target_link_val = read_var_value (static_link, frame);
- CORE_ADDR target_link;
+ CORE_ADDR target_link = value_as_address (target_link_val);
- if (target_link_val == NULL)
- break;
- QUIT;
+ frame = get_prev_frame (frame);
+ if (frame == NULL)
+ break;
- target_link = target_link_val;
- do
- {
- QUIT;
- frame = get_prev_frame (frame);
- }
- while (frame != NULL && DEPRECATED_FRAME_LOCALS_ADDRESS (frame) != target_link);
+ if (get_frame_locals_address (frame) == target_link)
+ {
+ struct block *block;
- if (frame == NULL)
- break;
+ QUIT;
- block = get_frame_block (frame, 0);
- while (block != NULL && block_function (block) != NULL && ndefns == 0)
- {
- ada_add_block_symbols (block, name, domain, NULL, wild_match);
+ block = get_frame_block (frame, 0);
+ while (block != NULL && block_function (block) != NULL
+ && num_defns_collected (obstackp) == 0)
+ {
+ QUIT;
- block = BLOCK_SUPERBLOCK (block);
- }
+ ada_add_block_symbols (obstackp, block, name, namespace,
+ NULL, NULL, wild_match);
+
+ block = BLOCK_SUPERBLOCK (block);
+ }
+ }
}
do_cleanups (old_chain);
#endif
}
+/* FIXME: The next two routines belong in symtab.c */
+
+static void
+restore_language (void *lang)
+{
+ set_language ((enum language) lang);
+}
+
+/* As for lookup_symbol, but performed as if the current language
+ were LANG. */
+
+struct symbol *
+lookup_symbol_in_language (const char *name, const struct block *block,
+ domain_enum domain, enum language lang,
+ int *is_a_field_of_this, struct symtab **symtab)
+{
+ struct cleanup *old_chain
+ = make_cleanup (restore_language, (void *) current_language->la_language);
+ struct symbol *result;
+ set_language (lang);
+ result = lookup_symbol (name, block, domain, is_a_field_of_this, symtab);
+ do_cleanups (old_chain);
+ return result;
+}
+
/* True if TYPE is definitely an artificial type supplied to a symbol
- * for which no debugging information was given in the symbol file. */
+ for which no debugging information was given in the symbol file. */
+
static int
is_nondebugging_type (struct type *type)
{
char *name = ada_type_name (type);
- return (name != NULL && DEPRECATED_STREQ (name, "<variable, no debug info>"));
+ return (name != NULL && strcmp (name, "<variable, no debug info>") == 0);
}
-/* Remove any non-debugging symbols in SYMS[0 .. NSYMS-1] that definitely
- * duplicate other symbols in the list. (The only case I know of where
- * this happens is when object files containing stabs-in-ecoff are
- * linked with files containing ordinary ecoff debugging symbols (or no
- * debugging symbols)). Modifies SYMS to squeeze out deleted symbols,
- * and applies the same modification to BLOCKS to maintain the
- * correspondence between SYMS[i] and BLOCKS[i]. Returns the number
- * of symbols in the modified list. */
+/* Remove any non-debugging symbols in SYMS[0 .. NSYMS-1] that definitely
+ duplicate other symbols in the list (The only case I know of where
+ this happens is when object files containing stabs-in-ecoff are
+ linked with files containing ordinary ecoff debugging symbols (or no
+ debugging symbols)). Modifies SYMS to squeeze out deleted entries.
+ Returns the number of items in the modified list. */
+
static int
-remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms)
+remove_extra_symbols (struct ada_symbol_info *syms, int nsyms)
{
int i, j;
i = 0;
while (i < nsyms)
{
- if (DEPRECATED_SYMBOL_NAME (syms[i]) != NULL
- && SYMBOL_CLASS (syms[i]) == LOC_STATIC
- && is_nondebugging_type (SYMBOL_TYPE (syms[i])))
- {
- for (j = 0; j < nsyms; j += 1)
- {
- if (i != j
- && DEPRECATED_SYMBOL_NAME (syms[j]) != NULL
- && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j]))
- && SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j])
- && SYMBOL_VALUE_ADDRESS (syms[i])
- == SYMBOL_VALUE_ADDRESS (syms[j]))
- {
- int k;
- for (k = i + 1; k < nsyms; k += 1)
- {
- syms[k - 1] = syms[k];
- blocks[k - 1] = blocks[k];
- }
- nsyms -= 1;
- goto NextSymbol;
- }
- }
- }
+ if (SYMBOL_LINKAGE_NAME (syms[i].sym) != NULL
+ && SYMBOL_CLASS (syms[i].sym) == LOC_STATIC
+ && is_nondebugging_type (SYMBOL_TYPE (syms[i].sym)))
+ {
+ for (j = 0; j < nsyms; j += 1)
+ {
+ if (i != j
+ && SYMBOL_LINKAGE_NAME (syms[j].sym) != NULL
+ && strcmp (SYMBOL_LINKAGE_NAME (syms[i].sym),
+ SYMBOL_LINKAGE_NAME (syms[j].sym)) == 0
+ && SYMBOL_CLASS (syms[i].sym) == SYMBOL_CLASS (syms[j].sym)
+ && SYMBOL_VALUE_ADDRESS (syms[i].sym)
+ == SYMBOL_VALUE_ADDRESS (syms[j].sym))
+ {
+ int k;
+ for (k = i + 1; k < nsyms; k += 1)
+ syms[k - 1] = syms[k];
+ nsyms -= 1;
+ goto NextSymbol;
+ }
+ }
+ }
i += 1;
NextSymbol:
;
@@ -3633,63 +4373,262 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms)
return nsyms;
}
-/* Find symbols in DOMAIN matching NAME, in BLOCK0 and enclosing
- scope and in global scopes, returning the number of matches. Sets
- *SYMS to point to a vector of matching symbols, with *BLOCKS
- pointing to the vector of corresponding blocks in which those
- symbols reside. These two vectors are transient---good only to the
- next call of ada_lookup_symbol_list. Any non-function/non-enumeral symbol
- match within the nest of blocks whose innermost member is BLOCK0,
- is the outermost match returned (no other matches in that or
- enclosing blocks is returned). If there are any matches in or
- surrounding BLOCK0, then these alone are returned. */
+/* Given a type that corresponds to a renaming entity, use the type name
+ to extract the scope (package name or function name, fully qualified,
+ and following the GNAT encoding convention) where this renaming has been
+ defined. The string returned needs to be deallocated after use. */
+
+static char *
+xget_renaming_scope (struct type *renaming_type)
+{
+ /* The renaming types adhere to the following convention:
+ <scope>__<rename>___<XR extension>.
+ So, to extract the scope, we search for the "___XR" extension,
+ and then backtrack until we find the first "__". */
+
+ const char *name = type_name_no_tag (renaming_type);
+ char *suffix = strstr (name, "___XR");
+ char *last;
+ int scope_len;
+ char *scope;
+
+ /* Now, backtrack a bit until we find the first "__". Start looking
+ at suffix - 3, as the <rename> part is at least one character long. */
+
+ for (last = suffix - 3; last > name; last--)
+ if (last[0] == '_' && last[1] == '_')
+ break;
+
+ /* Make a copy of scope and return it. */
+
+ scope_len = last - name;
+ scope = (char *) xmalloc ((scope_len + 1) * sizeof (char));
+
+ strncpy (scope, name, scope_len);
+ scope[scope_len] = '\0';
+
+ return scope;
+}
+
+/* Return nonzero if NAME corresponds to a package name. */
+
+static int
+is_package_name (const char *name)
+{
+ /* Here, We take advantage of the fact that no symbols are generated
+ for packages, while symbols are generated for each function.
+ So the condition for NAME represent a package becomes equivalent
+ to NAME not existing in our list of symbols. There is only one
+ small complication with library-level functions (see below). */
+
+ char *fun_name;
+
+ /* If it is a function that has not been defined at library level,
+ then we should be able to look it up in the symbols. */
+ if (standard_lookup (name, NULL, VAR_DOMAIN) != NULL)
+ return 0;
+
+ /* Library-level function names start with "_ada_". See if function
+ "_ada_" followed by NAME can be found. */
+
+ /* Do a quick check that NAME does not contain "__", since library-level
+ functions names can not contain "__" in them. */
+ if (strstr (name, "__") != NULL)
+ return 0;
+
+ fun_name = xstrprintf ("_ada_%s", name);
+
+ return (standard_lookup (fun_name, NULL, VAR_DOMAIN) == NULL);
+}
+
+/* Return nonzero if SYM corresponds to a renaming entity that is
+ visible from FUNCTION_NAME. */
+
+static int
+renaming_is_visible (const struct symbol *sym, char *function_name)
+{
+ char *scope = xget_renaming_scope (SYMBOL_TYPE (sym));
+
+ make_cleanup (xfree, scope);
+
+ /* If the rename has been defined in a package, then it is visible. */
+ if (is_package_name (scope))
+ return 1;
+
+ /* Check that the rename is in the current function scope by checking
+ that its name starts with SCOPE. */
+
+ /* If the function name starts with "_ada_", it means that it is
+ a library-level function. Strip this prefix before doing the
+ comparison, as the encoding for the renaming does not contain
+ this prefix. */
+ if (strncmp (function_name, "_ada_", 5) == 0)
+ function_name += 5;
+
+ return (strncmp (function_name, scope, strlen (scope)) == 0);
+}
+
+/* Iterates over the SYMS list and remove any entry that corresponds to
+ a renaming entity that is not visible from the function associated
+ with CURRENT_BLOCK.
+
+ Rationale:
+ GNAT emits a type following a specified encoding for each renaming
+ entity. Unfortunately, STABS currently does not support the definition
+ of types that are local to a given lexical block, so all renamings types
+ are emitted at library level. As a consequence, if an application
+ contains two renaming entities using the same name, and a user tries to
+ print the value of one of these entities, the result of the ada symbol
+ lookup will also contain the wrong renaming type.
+
+ This function partially covers for this limitation by attempting to
+ remove from the SYMS list renaming symbols that should be visible
+ from CURRENT_BLOCK. However, there does not seem be a 100% reliable
+ method with the current information available. The implementation
+ below has a couple of limitations (FIXME: brobecker-2003-05-12):
+
+ - When the user tries to print a rename in a function while there
+ is another rename entity defined in a package: Normally, the
+ rename in the function has precedence over the rename in the
+ package, so the latter should be removed from the list. This is
+ currently not the case.
+
+ - This function will incorrectly remove valid renames if
+ the CURRENT_BLOCK corresponds to a function which symbol name
+ has been changed by an "Export" pragma. As a consequence,
+ the user will be unable to print such rename entities. */
+
+static int
+remove_out_of_scope_renamings (struct ada_symbol_info *syms,
+ int nsyms, struct block *current_block)
+{
+ struct symbol *current_function;
+ char *current_function_name;
+ int i;
+
+ /* Extract the function name associated to CURRENT_BLOCK.
+ Abort if unable to do so. */
+
+ if (current_block == NULL)
+ return nsyms;
+
+ current_function = block_function (current_block);
+ if (current_function == NULL)
+ return nsyms;
+
+ current_function_name = SYMBOL_LINKAGE_NAME (current_function);
+ if (current_function_name == NULL)
+ return nsyms;
+
+ /* Check each of the symbols, and remove it from the list if it is
+ a type corresponding to a renaming that is out of the scope of
+ the current block. */
+
+ i = 0;
+ while (i < nsyms)
+ {
+ if (ada_is_object_renaming (syms[i].sym)
+ && !renaming_is_visible (syms[i].sym, current_function_name))
+ {
+ int j;
+ for (j = i + 1; j < nsyms; j++)
+ syms[j - 1] = syms[j];
+ nsyms -= 1;
+ }
+ else
+ i += 1;
+ }
+
+ return nsyms;
+}
+
+/* Find symbols in DOMAIN matching NAME0, in BLOCK0 and enclosing
+ scope and in global scopes, returning the number of matches. Sets
+ *RESULTS to point to a vector of (SYM,BLOCK,SYMTAB) triples,
+ indicating the symbols found and the blocks and symbol tables (if
+ any) in which they were found. This vector are transient---good only to
+ the next call of ada_lookup_symbol_list. Any non-function/non-enumeral
+ symbol match within the nest of blocks whose innermost member is BLOCK0,
+ is the one match returned (no other matches in that or
+ enclosing blocks is returned). If there are any matches in or
+ surrounding BLOCK0, then these alone are returned. Otherwise, the
+ search extends to global and file-scope (static) symbol tables.
+ Names prefixed with "standard__" are handled specially: "standard__"
+ is first stripped off, and only static and global symbols are searched. */
int
-ada_lookup_symbol_list (const char *name, struct block *block0,
- domain_enum domain, struct symbol ***syms,
- struct block ***blocks)
+ada_lookup_symbol_list (const char *name0, const struct block *block0,
+ domain_enum namespace,
+ struct ada_symbol_info **results)
{
struct symbol *sym;
struct symtab *s;
struct partial_symtab *ps;
struct blockvector *bv;
struct objfile *objfile;
- struct block *b;
struct block *block;
+ const char *name;
struct minimal_symbol *msymbol;
- int wild_match = (strstr (name, "__") == NULL);
+ int wild_match;
int cacheIfUnique;
+ int block_depth;
+ int ndefns;
-#ifdef TIMING
- markTimeStart (0);
-#endif
+ obstack_free (&symbol_list_obstack, NULL);
+ obstack_init (&symbol_list_obstack);
- ndefns = 0;
cacheIfUnique = 0;
/* Search specified block and its superiors. */
- block = block0;
+ wild_match = (strstr (name0, "__") == NULL);
+ name = name0;
+ block = (struct block *) block0; /* FIXME: No cast ought to be
+ needed, but adding const will
+ have a cascade effect. */
+ if (strncmp (name0, "standard__", sizeof ("standard__") - 1) == 0)
+ {
+ wild_match = 0;
+ block = NULL;
+ name = name0 + sizeof ("standard__") - 1;
+ }
+
+ block_depth = 0;
while (block != NULL)
{
- ada_add_block_symbols (block, name, domain, NULL, wild_match);
+ block_depth += 1;
+ ada_add_block_symbols (&symbol_list_obstack, block, name,
+ namespace, NULL, NULL, wild_match);
- /* If we found a non-function match, assume that's the one. */
- if (is_nonfunction (defn_symbols, ndefns))
- goto done;
+ /* If we found a non-function match, assume that's the one. */
+ if (is_nonfunction (defns_collected (&symbol_list_obstack, 0),
+ num_defns_collected (&symbol_list_obstack)))
+ goto done;
block = BLOCK_SUPERBLOCK (block);
}
- /* If we found ANY matches in the specified BLOCK, we're done. */
+ /* If no luck so far, try to find NAME as a local symbol in some lexically
+ enclosing subprogram. */
+ if (num_defns_collected (&symbol_list_obstack) == 0 && block_depth > 2)
+ add_symbols_from_enclosing_procs (&symbol_list_obstack,
+ name, namespace, wild_match);
+
+ /* If we found ANY matches among non-global symbols, we're done. */
- if (ndefns > 0)
+ if (num_defns_collected (&symbol_list_obstack) > 0)
goto done;
cacheIfUnique = 1;
+ if (lookup_cached_symbol (name0, namespace, &sym, &block, &s))
+ {
+ if (sym != NULL)
+ add_defn_to_vec (&symbol_list_obstack, sym, block, s);
+ goto done;
+ }
/* Now add symbols from all global blocks: symbol tables, minimal symbol
- tables, and psymtab's */
+ tables, and psymtab's. */
ALL_SYMTABS (objfile, s)
{
@@ -3698,41 +4637,43 @@ ada_lookup_symbol_list (const char *name, struct block *block0,
continue;
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- ada_add_block_symbols (block, name, domain, objfile, wild_match);
+ ada_add_block_symbols (&symbol_list_obstack, block, name, namespace,
+ objfile, s, wild_match);
}
- if (domain == VAR_DOMAIN)
+ if (namespace == VAR_DOMAIN)
{
ALL_MSYMBOLS (objfile, msymbol)
{
- if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match))
- {
- switch (MSYMBOL_TYPE (msymbol))
- {
- case mst_solib_trampoline:
- break;
- default:
- s = find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol));
- if (s != NULL)
- {
- int old_ndefns = ndefns;
- QUIT;
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- ada_add_block_symbols (block,
- DEPRECATED_SYMBOL_NAME (msymbol),
- domain, objfile, wild_match);
- if (ndefns == old_ndefns)
- {
- block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- ada_add_block_symbols (block,
- DEPRECATED_SYMBOL_NAME (msymbol),
- domain, objfile,
- wild_match);
- }
- }
- }
- }
+ if (ada_match_name (SYMBOL_LINKAGE_NAME (msymbol), name, wild_match))
+ {
+ switch (MSYMBOL_TYPE (msymbol))
+ {
+ case mst_solib_trampoline:
+ break;
+ default:
+ s = find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol));
+ if (s != NULL)
+ {
+ int ndefns0 = num_defns_collected (&symbol_list_obstack);
+ QUIT;
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ ada_add_block_symbols (&symbol_list_obstack, block,
+ SYMBOL_LINKAGE_NAME (msymbol),
+ namespace, objfile, s, wild_match);
+
+ if (num_defns_collected (&symbol_list_obstack) == ndefns0)
+ {
+ block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+ ada_add_block_symbols (&symbol_list_obstack, block,
+ SYMBOL_LINKAGE_NAME (msymbol),
+ namespace, objfile, s,
+ wild_match);
+ }
+ }
+ }
+ }
}
}
@@ -3740,220 +4681,376 @@ ada_lookup_symbol_list (const char *name, struct block *block0,
{
QUIT;
if (!ps->readin
- && ada_lookup_partial_symbol (ps, name, 1, domain, wild_match))
+ && ada_lookup_partial_symbol (ps, name, 1, namespace, wild_match))
{
- s = PSYMTAB_TO_SYMTAB (ps);
- if (!s->primary)
- continue;
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- ada_add_block_symbols (block, name, domain, objfile, wild_match);
+ s = PSYMTAB_TO_SYMTAB (ps);
+ if (!s->primary)
+ continue;
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ ada_add_block_symbols (&symbol_list_obstack, block, name,
+ namespace, objfile, s, wild_match);
}
}
- /* Now add symbols from all per-file blocks if we've gotten no hits.
+ /* Now add symbols from all per-file blocks if we've gotten no hits
(Not strictly correct, but perhaps better than an error).
- Do the symtabs first, then check the psymtabs */
+ Do the symtabs first, then check the psymtabs. */
- if (ndefns == 0)
+ if (num_defns_collected (&symbol_list_obstack) == 0)
{
ALL_SYMTABS (objfile, s)
{
- QUIT;
- if (!s->primary)
- continue;
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- ada_add_block_symbols (block, name, domain, objfile, wild_match);
+ QUIT;
+ if (!s->primary)
+ continue;
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+ ada_add_block_symbols (&symbol_list_obstack, block, name, namespace,
+ objfile, s, wild_match);
}
ALL_PSYMTABS (objfile, ps)
{
- QUIT;
- if (!ps->readin
- && ada_lookup_partial_symbol (ps, name, 0, domain, wild_match))
- {
- s = PSYMTAB_TO_SYMTAB (ps);
- bv = BLOCKVECTOR (s);
- if (!s->primary)
- continue;
- block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- ada_add_block_symbols (block, name, domain,
- objfile, wild_match);
- }
+ QUIT;
+ if (!ps->readin
+ && ada_lookup_partial_symbol (ps, name, 0, namespace, wild_match))
+ {
+ s = PSYMTAB_TO_SYMTAB (ps);
+ bv = BLOCKVECTOR (s);
+ if (!s->primary)
+ continue;
+ block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+ ada_add_block_symbols (&symbol_list_obstack, block, name,
+ namespace, objfile, s, wild_match);
+ }
}
}
- /* Finally, we try to find NAME as a local symbol in some lexically
- enclosing block. We do this last, expecting this case to be
- rare. */
+done:
+ ndefns = num_defns_collected (&symbol_list_obstack);
+ *results = defns_collected (&symbol_list_obstack, 1);
+
+ ndefns = remove_extra_symbols (*results, ndefns);
+
if (ndefns == 0)
- {
- add_symbols_from_enclosing_procs (name, domain, wild_match);
- if (ndefns > 0)
- goto done;
- }
+ cache_symbol (name0, namespace, NULL, NULL, NULL);
-done:
- ndefns = remove_extra_symbols (defn_symbols, defn_blocks, ndefns);
+ if (ndefns == 1 && cacheIfUnique)
+ cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block,
+ (*results)[0].symtab);
+ ndefns = remove_out_of_scope_renamings (*results, ndefns,
+ (struct block *) block0);
- *syms = defn_symbols;
- *blocks = defn_blocks;
-#ifdef TIMING
- markTimeStop (0);
-#endif
return ndefns;
}
-/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
- * scope and in global scopes, or NULL if none. NAME is folded to
- * lower case first, unless it is surrounded in single quotes.
- * Otherwise, the result is as for ada_lookup_symbol_list, but is
- * disambiguated by user query if needed. */
+/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
+ scope and in global scopes, or NULL if none. NAME is folded and
+ encoded first. Otherwise, the result is as for ada_lookup_symbol_list,
+ but is disambiguated by user query if needed. *IS_A_FIELD_OF_THIS is
+ set to 0 and *SYMTAB is set to the symbol table in which the symbol
+ was found (in both cases, these assignments occur only if the
+ pointers are non-null). */
+
struct symbol *
-ada_lookup_symbol (const char *name, struct block *block0,
- domain_enum domain)
+ada_lookup_symbol (const char *name, const struct block *block0,
+ domain_enum namespace, int *is_a_field_of_this,
+ struct symtab **symtab)
{
- struct symbol **candidate_syms;
- struct block **candidate_blocks;
+ struct ada_symbol_info *candidates;
int n_candidates;
- n_candidates = ada_lookup_symbol_list (name,
- block0, domain,
- &candidate_syms, &candidate_blocks);
+ n_candidates = ada_lookup_symbol_list (ada_encode (ada_fold_name (name)),
+ block0, namespace, &candidates);
if (n_candidates == 0)
return NULL;
else if (n_candidates != 1)
- user_select_syms (candidate_syms, candidate_blocks, n_candidates, 1);
+ user_select_syms (candidates, n_candidates, 1);
+
+ if (is_a_field_of_this != NULL)
+ *is_a_field_of_this = 0;
+
+ if (symtab != NULL)
+ {
+ *symtab = candidates[0].symtab;
+ if (*symtab == NULL && candidates[0].block != NULL)
+ {
+ struct objfile *objfile;
+ struct symtab *s;
+ struct block *b;
+ struct blockvector *bv;
+
+ /* Search the list of symtabs for one which contains the
+ address of the start of this block. */
+ ALL_SYMTABS (objfile, s)
+ {
+ bv = BLOCKVECTOR (s);
+ b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+ if (BLOCK_START (b) <= BLOCK_START (candidates[0].block)
+ && BLOCK_END (b) > BLOCK_START (candidates[0].block))
+ {
+ *symtab = s;
+ return fixup_symbol_section (candidates[0].sym, objfile);
+ }
+ return fixup_symbol_section (candidates[0].sym, NULL);
+ }
+ }
+ }
+ return candidates[0].sym;
+}
- return candidate_syms[0];
+static struct symbol *
+ada_lookup_symbol_nonlocal (const char *name,
+ const char *linkage_name,
+ const struct block *block,
+ const domain_enum domain, struct symtab **symtab)
+{
+ if (linkage_name == NULL)
+ linkage_name = name;
+ return ada_lookup_symbol (linkage_name, block_static_block (block), domain,
+ NULL, symtab);
}
-/* True iff STR is a possible encoded suffix of a normal Ada name
- * that is to be ignored for matching purposes. Suffixes of parallel
- * names (e.g., XVE) are not included here. Currently, the possible suffixes
- * are given by the regular expression:
- * (X[nb]*)?(__[0-9]+|\$[0-9]+|___(LJM|X([FDBUP].*|R[^T]?)))?$
- *
+/* True iff STR is a possible encoded suffix of a normal Ada name
+ that is to be ignored for matching purposes. Suffixes of parallel
+ names (e.g., XVE) are not included here. Currently, the possible suffixes
+ are given by either of the regular expression:
+
+ (__[0-9]+)?\.[0-9]+ [nested subprogram suffix, on platforms such
+ as GNU/Linux]
+ ___[0-9]+ [nested subprogram suffix, on platforms such as HP/UX]
+ (X[nb]*)?((\$|__)[0-9](_?[0-9]+)|___(LJM|X([FDBUP].*|R[^T]?)))?$
*/
+
static int
is_name_suffix (const char *str)
{
int k;
+ const char *matching;
+ const int len = strlen (str);
+
+ /* (__[0-9]+)?\.[0-9]+ */
+ matching = str;
+ if (len > 3 && str[0] == '_' && str[1] == '_' && isdigit (str[2]))
+ {
+ matching += 3;
+ while (isdigit (matching[0]))
+ matching += 1;
+ if (matching[0] == '\0')
+ return 1;
+ }
+
+ if (matching[0] == '.')
+ {
+ matching += 1;
+ while (isdigit (matching[0]))
+ matching += 1;
+ if (matching[0] == '\0')
+ return 1;
+ }
+
+ /* ___[0-9]+ */
+ if (len > 3 && str[0] == '_' && str[1] == '_' && str[2] == '_')
+ {
+ matching = str + 3;
+ while (isdigit (matching[0]))
+ matching += 1;
+ if (matching[0] == '\0')
+ return 1;
+ }
+
+ /* ??? We should not modify STR directly, as we are doing below. This
+ is fine in this case, but may become problematic later if we find
+ that this alternative did not work, and want to try matching
+ another one from the begining of STR. Since we modified it, we
+ won't be able to find the begining of the string anymore! */
if (str[0] == 'X')
{
str += 1;
while (str[0] != '_' && str[0] != '\0')
- {
- if (str[0] != 'n' && str[0] != 'b')
- return 0;
- str += 1;
- }
+ {
+ if (str[0] != 'n' && str[0] != 'b')
+ return 0;
+ str += 1;
+ }
}
if (str[0] == '\000')
return 1;
if (str[0] == '_')
{
if (str[1] != '_' || str[2] == '\000')
- return 0;
+ return 0;
if (str[2] == '_')
- {
- if (DEPRECATED_STREQ (str + 3, "LJM"))
- return 1;
- if (str[3] != 'X')
- return 0;
- if (str[4] == 'F' || str[4] == 'D' || str[4] == 'B' ||
- str[4] == 'U' || str[4] == 'P')
- return 1;
- if (str[4] == 'R' && str[5] != 'T')
- return 1;
- return 0;
- }
- for (k = 2; str[k] != '\0'; k += 1)
- if (!isdigit (str[k]))
- return 0;
+ {
+ if (strcmp (str + 3, "LJM") == 0)
+ return 1;
+ if (str[3] != 'X')
+ return 0;
+ if (str[4] == 'F' || str[4] == 'D' || str[4] == 'B'
+ || str[4] == 'U' || str[4] == 'P')
+ return 1;
+ if (str[4] == 'R' && str[5] != 'T')
+ return 1;
+ return 0;
+ }
+ if (!isdigit (str[2]))
+ return 0;
+ for (k = 3; str[k] != '\0'; k += 1)
+ if (!isdigit (str[k]) && str[k] != '_')
+ return 0;
return 1;
}
- if (str[0] == '$' && str[1] != '\000')
+ if (str[0] == '$' && isdigit (str[1]))
{
- for (k = 1; str[k] != '\0'; k += 1)
- if (!isdigit (str[k]))
- return 0;
+ for (k = 2; str[k] != '\0'; k += 1)
+ if (!isdigit (str[k]) && str[k] != '_')
+ return 0;
return 1;
}
return 0;
}
-/* True if NAME represents a name of the form A1.A2....An, n>=1 and
- * PATN[0..PATN_LEN-1] = Ak.Ak+1.....An for some k >= 1. Ignores
- * informational suffixes of NAME (i.e., for which is_name_suffix is
- * true). */
+/* Return nonzero if the given string starts with a dot ('.')
+ followed by zero or more digits.
+
+ Note: brobecker/2003-11-10: A forward declaration has not been
+ added at the begining of this file yet, because this function
+ is only used to work around a problem found during wild matching
+ when trying to match minimal symbol names against symbol names
+ obtained from dwarf-2 data. This function is therefore currently
+ only used in wild_match() and is likely to be deleted when the
+ problem in dwarf-2 is fixed. */
+
+static int
+is_dot_digits_suffix (const char *str)
+{
+ if (str[0] != '.')
+ return 0;
+
+ str++;
+ while (isdigit (str[0]))
+ str++;
+ return (str[0] == '\0');
+}
+
+/* True if NAME represents a name of the form A1.A2....An, n>=1 and
+ PATN[0..PATN_LEN-1] = Ak.Ak+1.....An for some k >= 1. Ignores
+ informational suffixes of NAME (i.e., for which is_name_suffix is
+ true). */
+
static int
-wild_match (const char *patn, int patn_len, const char *name)
+wild_match (const char *patn0, int patn_len, const char *name0)
{
int name_len;
- int s, e;
+ char *name;
+ char *patn;
+
+ /* FIXME: brobecker/2003-11-10: For some reason, the symbol name
+ stored in the symbol table for nested function names is sometimes
+ different from the name of the associated entity stored in
+ the dwarf-2 data: This is the case for nested subprograms, where
+ the minimal symbol name contains a trailing ".[:digit:]+" suffix,
+ while the symbol name from the dwarf-2 data does not.
+
+ Although the DWARF-2 standard documents that entity names stored
+ in the dwarf-2 data should be identical to the name as seen in
+ the source code, GNAT takes a different approach as we already use
+ a special encoding mechanism to convey the information so that
+ a C debugger can still use the information generated to debug
+ Ada programs. A corollary is that the symbol names in the dwarf-2
+ data should match the names found in the symbol table. I therefore
+ consider this issue as a compiler defect.
+
+ Until the compiler is properly fixed, we work-around the problem
+ by ignoring such suffixes during the match. We do so by making
+ a copy of PATN0 and NAME0, and then by stripping such a suffix
+ if present. We then perform the match on the resulting strings. */
+ {
+ char *dot;
+ name_len = strlen (name0);
+
+ name = (char *) alloca ((name_len + 1) * sizeof (char));
+ strcpy (name, name0);
+ dot = strrchr (name, '.');
+ if (dot != NULL && is_dot_digits_suffix (dot))
+ *dot = '\0';
+
+ patn = (char *) alloca ((patn_len + 1) * sizeof (char));
+ strncpy (patn, patn0, patn_len);
+ patn[patn_len] = '\0';
+ dot = strrchr (patn, '.');
+ if (dot != NULL && is_dot_digits_suffix (dot))
+ {
+ *dot = '\0';
+ patn_len = dot - patn;
+ }
+ }
+
+ /* Now perform the wild match. */
name_len = strlen (name);
- if (name_len >= patn_len + 5 && DEPRECATED_STREQN (name, "_ada_", 5)
- && DEPRECATED_STREQN (patn, name + 5, patn_len)
+ if (name_len >= patn_len + 5 && strncmp (name, "_ada_", 5) == 0
+ && strncmp (patn, name + 5, patn_len) == 0
&& is_name_suffix (name + patn_len + 5))
return 1;
while (name_len >= patn_len)
{
- if (DEPRECATED_STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len))
- return 1;
+ if (strncmp (patn, name, patn_len) == 0
+ && is_name_suffix (name + patn_len))
+ return 1;
do
- {
- name += 1;
- name_len -= 1;
- }
+ {
+ name += 1;
+ name_len -= 1;
+ }
while (name_len > 0
- && name[0] != '.' && (name[0] != '_' || name[1] != '_'));
+ && name[0] != '.' && (name[0] != '_' || name[1] != '_'));
if (name_len <= 0)
- return 0;
+ return 0;
if (name[0] == '_')
- {
- if (!islower (name[2]))
- return 0;
- name += 2;
- name_len -= 2;
- }
+ {
+ if (!islower (name[2]))
+ return 0;
+ name += 2;
+ name_len -= 2;
+ }
else
- {
- if (!islower (name[1]))
- return 0;
- name += 1;
- name_len -= 1;
- }
+ {
+ if (!islower (name[1]))
+ return 0;
+ name += 1;
+ name_len -= 1;
+ }
}
return 0;
}
-/* Add symbols from BLOCK matching identifier NAME in DOMAIN to
- vector *defn_symbols, updating *defn_symbols (if necessary), *SZ (the size of
- the vector *defn_symbols), and *ndefns (the number of symbols
- currently stored in *defn_symbols). If WILD, treat as NAME with a
- wildcard prefix. OBJFILE is the section containing BLOCK. */
+/* Add symbols from BLOCK matching identifier NAME in DOMAIN to
+ vector *defn_symbols, updating the list of symbols in OBSTACKP
+ (if necessary). If WILD, treat as NAME with a wildcard prefix.
+ OBJFILE is the section containing BLOCK.
+ SYMTAB is recorded with each symbol added. */
static void
-ada_add_block_symbols (struct block *block, const char *name,
- domain_enum domain, struct objfile *objfile,
- int wild)
+ada_add_block_symbols (struct obstack *obstackp,
+ struct block *block, const char *name,
+ domain_enum domain, struct objfile *objfile,
+ struct symtab *symtab, int wild)
{
struct dict_iterator iter;
int name_len = strlen (name);
- /* A matching argument symbol, if any. */
+ /* A matching argument symbol, if any. */
struct symbol *arg_sym;
- /* Set true when we find a matching non-argument symbol */
+ /* Set true when we find a matching non-argument symbol. */
int found_sym;
struct symbol *sym;
@@ -3964,71 +5061,72 @@ ada_add_block_symbols (struct block *block, const char *name,
struct symbol *sym;
ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- if (SYMBOL_DOMAIN (sym) == domain &&
- wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym)))
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG:
- case LOC_LOCAL_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- arg_sym = sym;
- break;
- case LOC_UNRESOLVED:
- continue;
- default:
- found_sym = 1;
- fill_in_ada_prototype (sym);
- add_defn_to_vec (fixup_symbol_section (sym, objfile), block);
- break;
- }
- }
+ if (SYMBOL_DOMAIN (sym) == domain
+ && wild_match (name, name_len, SYMBOL_LINKAGE_NAME (sym)))
+ {
+ switch (SYMBOL_CLASS (sym))
+ {
+ case LOC_ARG:
+ case LOC_LOCAL_ARG:
+ case LOC_REF_ARG:
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED_ARG:
+ arg_sym = sym;
+ break;
+ case LOC_UNRESOLVED:
+ continue;
+ default:
+ found_sym = 1;
+ add_defn_to_vec (obstackp,
+ fixup_symbol_section (sym, objfile),
+ block, symtab);
+ break;
+ }
+ }
}
}
else
{
ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- if (SYMBOL_DOMAIN (sym) == domain)
- {
- int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym), name_len);
-
- if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len))
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG:
- case LOC_LOCAL_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- arg_sym = sym;
- break;
- case LOC_UNRESOLVED:
- break;
- default:
- found_sym = 1;
- fill_in_ada_prototype (sym);
- add_defn_to_vec (fixup_symbol_section (sym, objfile),
- block);
- break;
- }
- }
- }
- }
+ {
+ if (SYMBOL_DOMAIN (sym) == domain)
+ {
+ int cmp = strncmp (name, SYMBOL_LINKAGE_NAME (sym), name_len);
+ if (cmp == 0
+ && is_name_suffix (SYMBOL_LINKAGE_NAME (sym) + name_len))
+ {
+ switch (SYMBOL_CLASS (sym))
+ {
+ case LOC_ARG:
+ case LOC_LOCAL_ARG:
+ case LOC_REF_ARG:
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED_ARG:
+ arg_sym = sym;
+ break;
+ case LOC_UNRESOLVED:
+ break;
+ default:
+ found_sym = 1;
+ add_defn_to_vec (obstackp,
+ fixup_symbol_section (sym, objfile),
+ block, symtab);
+ break;
+ }
+ }
+ }
+ }
}
if (!found_sym && arg_sym != NULL)
{
- fill_in_ada_prototype (arg_sym);
- add_defn_to_vec (fixup_symbol_section (arg_sym, objfile), block);
+ add_defn_to_vec (obstackp,
+ fixup_symbol_section (arg_sym, objfile),
+ block, symtab);
}
if (!wild)
@@ -4037,167 +5135,361 @@ ada_add_block_symbols (struct block *block, const char *name,
found_sym = 0;
ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- if (SYMBOL_DOMAIN (sym) == domain)
- {
- int cmp;
-
- cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (sym)[0];
- if (cmp == 0)
- {
- cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (sym), 5);
- if (cmp == 0)
- cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym) + 5, name_len);
- }
-
- if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len + 5))
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG:
- case LOC_LOCAL_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- arg_sym = sym;
- break;
- case LOC_UNRESOLVED:
- break;
- default:
- found_sym = 1;
- fill_in_ada_prototype (sym);
- add_defn_to_vec (fixup_symbol_section (sym, objfile),
- block);
- break;
- }
- }
- }
- }
+ {
+ if (SYMBOL_DOMAIN (sym) == domain)
+ {
+ int cmp;
+
+ cmp = (int) '_' - (int) SYMBOL_LINKAGE_NAME (sym)[0];
+ if (cmp == 0)
+ {
+ cmp = strncmp ("_ada_", SYMBOL_LINKAGE_NAME (sym), 5);
+ if (cmp == 0)
+ cmp = strncmp (name, SYMBOL_LINKAGE_NAME (sym) + 5,
+ name_len);
+ }
+
+ if (cmp == 0
+ && is_name_suffix (SYMBOL_LINKAGE_NAME (sym) + name_len + 5))
+ {
+ switch (SYMBOL_CLASS (sym))
+ {
+ case LOC_ARG:
+ case LOC_LOCAL_ARG:
+ case LOC_REF_ARG:
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED_ARG:
+ arg_sym = sym;
+ break;
+ case LOC_UNRESOLVED:
+ break;
+ default:
+ found_sym = 1;
+ add_defn_to_vec (obstackp,
+ fixup_symbol_section (sym, objfile),
+ block, symtab);
+ break;
+ }
+ }
+ }
+ end_loop2:;
+ }
/* NOTE: This really shouldn't be needed for _ada_ symbols.
- They aren't parameters, right? */
+ They aren't parameters, right? */
if (!found_sym && arg_sym != NULL)
- {
- fill_in_ada_prototype (arg_sym);
- add_defn_to_vec (fixup_symbol_section (arg_sym, objfile), block);
- }
+ {
+ add_defn_to_vec (obstackp,
+ fixup_symbol_section (arg_sym, objfile),
+ block, symtab);
+ }
}
}
+#ifdef GNAT_GDB
+
+ /* Symbol Completion */
+
+/* If SYM_NAME is a completion candidate for TEXT, return this symbol
+ name in a form that's appropriate for the completion. The result
+ does not need to be deallocated, but is only good until the next call.
+
+ TEXT_LEN is equal to the length of TEXT.
+ Perform a wild match if WILD_MATCH is set.
+ ENCODED should be set if TEXT represents the start of a symbol name
+ in its encoded form. */
+
+static const char *
+symbol_completion_match (const char *sym_name,
+ const char *text, int text_len,
+ int wild_match, int encoded)
+{
+ char *result;
+ const int verbatim_match = (text[0] == '<');
+ int match = 0;
+
+ if (verbatim_match)
+ {
+ /* Strip the leading angle bracket. */
+ text = text + 1;
+ text_len--;
+ }
- /* Function Types */
+ /* First, test against the fully qualified name of the symbol. */
-/* Assuming that SYM is the symbol for a function, fill in its type
- with prototype information, if it is not already there. */
+ if (strncmp (sym_name, text, text_len) == 0)
+ match = 1;
+
+ if (match && !encoded)
+ {
+ /* One needed check before declaring a positive match is to verify
+ that iff we are doing a verbatim match, the decoded version
+ of the symbol name starts with '<'. Otherwise, this symbol name
+ is not a suitable completion. */
+ const char *sym_name_copy = sym_name;
+ int has_angle_bracket;
+
+ sym_name = ada_decode (sym_name);
+ has_angle_bracket = (sym_name[0] == '<');
+ match = (has_angle_bracket == verbatim_match);
+ sym_name = sym_name_copy;
+ }
+
+ if (match && !verbatim_match)
+ {
+ /* When doing non-verbatim match, another check that needs to
+ be done is to verify that the potentially matching symbol name
+ does not include capital letters, because the ada-mode would
+ not be able to understand these symbol names without the
+ angle bracket notation. */
+ const char *tmp;
+
+ for (tmp = sym_name; *tmp != '\0' && !isupper (*tmp); tmp++);
+ if (*tmp != '\0')
+ match = 0;
+ }
+
+ /* Second: Try wild matching... */
+
+ if (!match && wild_match)
+ {
+ /* Since we are doing wild matching, this means that TEXT
+ may represent an unqualified symbol name. We therefore must
+ also compare TEXT against the unqualified name of the symbol. */
+ sym_name = ada_unqualified_name (ada_decode (sym_name));
+
+ if (strncmp (sym_name, text, text_len) == 0)
+ match = 1;
+ }
+
+ /* Finally: If we found a mach, prepare the result to return. */
+
+ if (!match)
+ return NULL;
+
+ if (verbatim_match)
+ sym_name = add_angle_brackets (sym_name);
+
+ if (!encoded)
+ sym_name = ada_decode (sym_name);
+
+ return sym_name;
+}
+
+/* A companion function to ada_make_symbol_completion_list().
+ Check if SYM_NAME represents a symbol which name would be suitable
+ to complete TEXT (TEXT_LEN is the length of TEXT), in which case
+ it is appended at the end of the given string vector SV.
+
+ ORIG_TEXT is the string original string from the user command
+ that needs to be completed. WORD is the entire command on which
+ completion should be performed. These two parameters are used to
+ determine which part of the symbol name should be added to the
+ completion vector.
+ if WILD_MATCH is set, then wild matching is performed.
+ ENCODED should be set if TEXT represents a symbol name in its
+ encoded formed (in which case the completion should also be
+ encoded). */
static void
-fill_in_ada_prototype (struct symbol *func)
+symbol_completion_add (struct string_vector *sv,
+ const char *sym_name,
+ const char *text, int text_len,
+ const char *orig_text, const char *word,
+ int wild_match, int encoded)
{
- struct block *b;
- int nargs, nsyms;
- struct dict_iterator iter;
- struct type *ftype;
- struct type *rtype;
- size_t max_fields;
- struct symbol *sym;
+ const char *match = symbol_completion_match (sym_name, text, text_len,
+ wild_match, encoded);
+ char *completion;
- if (func == NULL
- || TYPE_CODE (SYMBOL_TYPE (func)) != TYPE_CODE_FUNC
- || TYPE_FIELDS (SYMBOL_TYPE (func)) != NULL)
+ if (match == NULL)
return;
- /* We make each function type unique, so that each may have its own */
- /* parameter types. This particular way of doing so wastes space: */
- /* it would be nicer to build the argument types while the original */
- /* function type is being built (FIXME). */
- rtype = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (func)));
- ftype = alloc_type (TYPE_OBJFILE (SYMBOL_TYPE (func)));
- make_function_type (rtype, &ftype);
- SYMBOL_TYPE (func) = ftype;
+ /* We found a match, so add the appropriate completion to the given
+ string vector. */
- b = SYMBOL_BLOCK_VALUE (func);
+ if (word == orig_text)
+ {
+ completion = xmalloc (strlen (match) + 5);
+ strcpy (completion, match);
+ }
+ else if (word > orig_text)
+ {
+ /* Return some portion of sym_name. */
+ completion = xmalloc (strlen (match) + 5);
+ strcpy (completion, match + (word - orig_text));
+ }
+ else
+ {
+ /* Return some of ORIG_TEXT plus sym_name. */
+ completion = xmalloc (strlen (match) + (orig_text - word) + 5);
+ strncpy (completion, word, orig_text - word);
+ completion[orig_text - word] = '\0';
+ strcat (completion, match);
+ }
- nargs = 0;
- max_fields = 8;
- TYPE_FIELDS (ftype) =
- (struct field *) xmalloc (sizeof (struct field) * max_fields);
- ALL_BLOCK_SYMBOLS (b, iter, sym)
+ string_vector_append (sv, completion);
+}
+
+/* Return a list of possible symbol names completing TEXT0. The list
+ is NULL terminated. WORD is the entire command on which completion
+ is made. */
+
+char **
+ada_make_symbol_completion_list (const char *text0, const char *word)
+{
+ /* Note: This function is almost a copy of make_symbol_completion_list(),
+ except it has been adapted for Ada. It is somewhat of a shame to
+ duplicate so much code, but we don't really have the infrastructure
+ yet to develop a language-aware version of he symbol completer... */
+ char *text;
+ int text_len;
+ int wild_match;
+ int encoded;
+ struct string_vector result = xnew_string_vector (128);
+ struct symbol *sym;
+ struct symtab *s;
+ struct partial_symtab *ps;
+ struct minimal_symbol *msymbol;
+ struct objfile *objfile;
+ struct block *b, *surrounding_static_block = 0;
+ int i;
+ struct dict_iterator iter;
+
+ if (text0[0] == '<')
+ {
+ text = xstrdup (text0);
+ make_cleanup (xfree, text);
+ text_len = strlen (text);
+ wild_match = 0;
+ encoded = 1;
+ }
+ else
+ {
+ text = xstrdup (ada_encode (text0));
+ make_cleanup (xfree, text);
+ text_len = strlen (text);
+ for (i = 0; i < text_len; i++)
+ text[i] = tolower (text[i]);
+
+ /* FIXME: brobecker/2003-09-17: When we get rid of ADA_RETAIN_DOTS,
+ we can restrict the wild_match check to searching "__" only. */
+ wild_match = (strstr (text0, "__") == NULL
+ && strchr (text0, '.') == NULL);
+ encoded = (strstr (text0, "__") != NULL);
+ }
+
+ /* First, look at the partial symtab symbols. */
+ ALL_PSYMTABS (objfile, ps)
{
- GROW_VECT (TYPE_FIELDS (ftype), max_fields, nargs + 1);
+ struct partial_symbol **psym;
- switch (SYMBOL_CLASS (sym))
+ /* If the psymtab's been read in we'll get it when we search
+ through the blockvector. */
+ if (ps->readin)
+ continue;
+
+ for (psym = objfile->global_psymbols.list + ps->globals_offset;
+ psym < (objfile->global_psymbols.list + ps->globals_offset
+ + ps->n_global_syms); psym++)
{
- case LOC_REF_ARG:
- case LOC_REGPARM_ADDR:
- TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
- TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
- TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
- TYPE_FIELD_TYPE (ftype, nargs) =
- lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
- TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
- nargs += 1;
+ QUIT;
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (*psym),
+ text, text_len, text0, word,
+ wild_match, encoded);
+ }
+
+ for (psym = objfile->static_psymbols.list + ps->statics_offset;
+ psym < (objfile->static_psymbols.list + ps->statics_offset
+ + ps->n_static_syms); psym++)
+ {
+ QUIT;
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (*psym),
+ text, text_len, text0, word,
+ wild_match, encoded);
+ }
+ }
- break;
+ /* At this point scan through the misc symbol vectors and add each
+ symbol you find to the list. Eventually we want to ignore
+ anything that isn't a text symbol (everything else will be
+ handled by the psymtab code above). */
- case LOC_ARG:
- case LOC_REGPARM:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
- TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
- TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
- TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
- TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
- nargs += 1;
+ ALL_MSYMBOLS (objfile, msymbol)
+ {
+ QUIT;
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (msymbol),
+ text, text_len, text0, word, wild_match, encoded);
+ }
- break;
+ /* Search upwards from currently selected frame (so that we can
+ complete on local vars. */
- default:
- break;
+ for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
+ {
+ if (!BLOCK_SUPERBLOCK (b))
+ surrounding_static_block = b; /* For elmin of dups */
+
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
+ text, text_len, text0, word,
+ wild_match, encoded);
}
- }
+ }
- /* Re-allocate fields vector; if there are no fields, make the */
- /* fields pointer non-null anyway, to mark that this function type */
- /* has been filled in. */
+ /* Go through the symtabs and check the externs and statics for
+ symbols which match. */
- TYPE_NFIELDS (ftype) = nargs;
- if (nargs == 0)
+ ALL_SYMTABS (objfile, s)
+ {
+ QUIT;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- static struct field dummy_field = { 0, 0, 0, 0 };
- xfree (TYPE_FIELDS (ftype));
- TYPE_FIELDS (ftype) = &dummy_field;
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
+ text, text_len, text0, word,
+ wild_match, encoded);
}
- else
+ }
+
+ 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)
{
- struct field *fields =
- (struct field *) TYPE_ALLOC (ftype, nargs * sizeof (struct field));
- memcpy ((char *) fields,
- (char *) TYPE_FIELDS (ftype), nargs * sizeof (struct field));
- xfree (TYPE_FIELDS (ftype));
- TYPE_FIELDS (ftype) = fields;
+ symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
+ text, text_len, text0, word,
+ wild_match, encoded);
}
-}
-
+ }
- /* Breakpoint-related */
+ /* Append the closing NULL entry. */
+ string_vector_append (&result, NULL);
-char no_symtab_msg[] =
- "No symbol table is loaded. Use the \"file\" command.";
+ return (result.array);
+}
+
+#endif /* GNAT_GDB */
+
+#ifdef GNAT_GDB
+ /* Breakpoint-related */
/* Assuming that LINE is pointing at the beginning of an argument to
'break', return a pointer to the delimiter for the initial segment
- of that name. This is the first ':', ' ', or end of LINE.
-*/
+ of that name. This is the first ':', ' ', or end of LINE. */
+
char *
ada_start_decode_line_1 (char *line)
{
- /* [NOTE: strpbrk would be more elegant, but I am reluctant to be
- the first to use such a library function in GDB code.] */
+ /* NOTE: strpbrk would be more elegant, but I am reluctant to be
+ the first to use such a library function in GDB code. */
char *p;
for (p = line; *p != '\000' && *p != ' ' && *p != ':'; p += 1)
;
@@ -4208,33 +5500,32 @@ ada_start_decode_line_1 (char *line)
command), following any initial file name specification.
Return all symbol table/line specfications (sals) consistent with the
- information in *SPEC and FILE_TABLE in the
- following sense:
+ information in *SPEC and FILE_TABLE in the following sense:
+ FILE_TABLE is null, or the sal refers to a line in the file
named by FILE_TABLE.
+ If *SPEC points to an argument with a trailing ':LINENUM',
- then the sal refers to that line (or one following it as closely as
+ then the sal refers to that line (or one following it as closely as
possible).
- + If *SPEC does not start with '*', the sal is in a function with
+ + If *SPEC does not start with '*', the sal is in a function with
that name.
Returns with 0 elements if no matching non-minimal symbols found.
If *SPEC begins with a function name of the form <NAME>, then NAME
is taken as a literal name; otherwise the function name is subject
- to the usual mangling.
+ to the usual encoding.
*SPEC is updated to point after the function/line number specification.
FUNFIRSTLINE is non-zero if we desire the first line of real code
- in each function (this is ignored in the presence of a LINENUM spec.).
+ in each function.
If CANONICAL is non-NULL, and if any of the sals require a
'canonical line spec', then *CANONICAL is set to point to an array
of strings, corresponding to and equal in length to the returned
- list of sals, such that (*CANONICAL)[i] is non-null and contains a
- canonical line spec for the ith returned sal, if needed. If no
- canonical line specs are required and CANONICAL is non-null,
+ list of sals, such that (*CANONICAL)[i] is non-null and contains a
+ canonical line spec for the ith returned sal, if needed. If no
+ canonical line specs are required and CANONICAL is non-null,
*CANONICAL is set to NULL.
A 'canonical line spec' is simply a name (in the format of the
@@ -4242,43 +5533,48 @@ ada_start_decode_line_1 (char *line)
with no further contextual information or user selection. It is
needed whenever the file name, function name, and line number
information supplied is insufficient for this unique
- identification. Currently overloaded functions, the name '*',
+ identification. Currently overloaded functions, the name '*',
or static functions without a filename yield a canonical line spec.
The array and the line spec strings are allocated on the heap; it
- is the caller's responsibility to free them. */
+ is the caller's responsibility to free them. */
struct symtabs_and_lines
ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
- int funfirstline, char ***canonical)
+ int funfirstline, char ***canonical)
{
- struct symbol **symbols;
- struct block **blocks;
- struct block *block;
+ struct ada_symbol_info *symbols;
+ const struct block *block;
int n_matches, i, line_num;
struct symtabs_and_lines selected;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
char *name;
+ int is_quoted;
int len;
char *lower_name;
char *unquoted_name;
if (file_table == NULL)
- block = get_selected_block (NULL);
+ block = block_static_block (get_selected_block (0));
else
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_table), STATIC_BLOCK);
if (canonical != NULL)
*canonical = (char **) NULL;
+ is_quoted = (**spec && strchr (get_gdb_completer_quote_characters (),
+ **spec) != NULL);
+
name = *spec;
if (**spec == '*')
*spec += 1;
else
{
- while (**spec != '\000' &&
- !strchr (ada_completer_word_break_characters, **spec))
- *spec += 1;
+ if (is_quoted)
+ *spec = skip_quoted (*spec);
+ while (**spec != '\000'
+ && !strchr (ada_completer_word_break_characters, **spec))
+ *spec += 1;
}
len = *spec - name;
@@ -4287,15 +5583,16 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
{
line_num = strtol (*spec + 1, spec, 10);
while (**spec == ' ' || **spec == '\t')
- *spec += 1;
+ *spec += 1;
}
if (name[0] == '*')
{
if (line_num == -1)
- error ("Wild-card function with no line number or file name.");
+ error ("Wild-card function with no line number or file name.");
- return all_sals_for_line (file_table->filename, line_num, canonical);
+ return ada_sals_for_line (file_table->filename, line_num,
+ funfirstline, canonical, 0);
}
if (name[0] == '\'')
@@ -4318,17 +5615,17 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
unquoted_name[len] = '\000';
lower_name = (char *) alloca (len + 1);
for (i = 0; i < len; i += 1)
- lower_name[i] = tolower (name[i]);
+ lower_name[i] = tolower (name[i]);
lower_name[len] = '\000';
}
n_matches = 0;
if (lower_name != NULL)
- n_matches = ada_lookup_symbol_list (ada_mangle (lower_name), block,
- VAR_DOMAIN, &symbols, &blocks);
+ n_matches = ada_lookup_symbol_list (ada_encode (lower_name), block,
+ VAR_DOMAIN, &symbols);
if (n_matches == 0)
n_matches = ada_lookup_symbol_list (unquoted_name, block,
- VAR_DOMAIN, &symbols, &blocks);
+ VAR_DOMAIN, &symbols);
if (n_matches == 0 && line_num >= 0)
error ("No line number information found for %s.", unquoted_name);
else if (n_matches == 0)
@@ -4337,7 +5634,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
/* FIXME: See comment in symtab.c::decode_line_1 */
#undef volatile
volatile struct symtab_and_line val;
-#define volatile /*nothing */
+#define volatile /*nothing */
#else
struct symtab_and_line val;
#endif
@@ -4347,43 +5644,47 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
msymbol = NULL;
if (lower_name != NULL)
- msymbol = ada_lookup_minimal_symbol (ada_mangle (lower_name));
+ msymbol = ada_lookup_simple_minsym (ada_encode (lower_name));
if (msymbol == NULL)
- msymbol = ada_lookup_minimal_symbol (unquoted_name);
+ msymbol = ada_lookup_simple_minsym (unquoted_name);
if (msymbol != NULL)
- {
- val.pc = SYMBOL_VALUE_ADDRESS (msymbol);
- val.section = SYMBOL_BFD_SECTION (msymbol);
- if (funfirstline)
- {
- val.pc += FUNCTION_START_OFFSET;
- SKIP_PROLOGUE (val.pc);
- }
- selected.sals = (struct symtab_and_line *)
- xmalloc (sizeof (struct symtab_and_line));
- selected.sals[0] = val;
- selected.nelts = 1;
- return selected;
- }
-
- if (!have_full_symbols () &&
- !have_partial_symbols () && !have_minimal_symbols ())
- error (no_symtab_msg);
+ {
+ val.pc = SYMBOL_VALUE_ADDRESS (msymbol);
+ val.section = SYMBOL_BFD_SECTION (msymbol);
+ if (funfirstline)
+ {
+ val.pc = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ val.pc,
+ &current_target);
+ SKIP_PROLOGUE (val.pc);
+ }
+ selected.sals = (struct symtab_and_line *)
+ xmalloc (sizeof (struct symtab_and_line));
+ selected.sals[0] = val;
+ selected.nelts = 1;
+ return selected;
+ }
+
+ if (!have_full_symbols ()
+ && !have_partial_symbols () && !have_minimal_symbols ())
+ error ("No symbol table is loaded. Use the \"file\" command.");
error ("Function \"%s\" not defined.", unquoted_name);
- return selected; /* for lint */
+ return selected; /* for lint */
}
if (line_num >= 0)
{
- return
- find_sal_from_funcs_and_line (file_table->filename, line_num,
- symbols, n_matches);
+ struct symtabs_and_lines best_sal =
+ find_sal_from_funcs_and_line (file_table->filename, line_num,
+ symbols, n_matches);
+ if (funfirstline)
+ adjust_pc_past_prologue (&best_sal.sals[0].pc);
+ return best_sal;
}
else
{
- selected.nelts =
- user_select_syms (symbols, blocks, n_matches, n_matches);
+ selected.nelts = user_select_syms (symbols, n_matches, n_matches);
}
selected.sals = (struct symtab_and_line *)
@@ -4394,23 +5695,25 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
i = 0;
while (i < selected.nelts)
{
- if (SYMBOL_CLASS (symbols[i]) == LOC_BLOCK)
- selected.sals[i] = find_function_start_sal (symbols[i], funfirstline);
- else if (SYMBOL_LINE (symbols[i]) != 0)
- {
- selected.sals[i].symtab = symtab_for_sym (symbols[i]);
- selected.sals[i].line = SYMBOL_LINE (symbols[i]);
- }
+ if (SYMBOL_CLASS (symbols[i].sym) == LOC_BLOCK)
+ selected.sals[i]
+ = find_function_start_sal (symbols[i].sym, funfirstline);
+ else if (SYMBOL_LINE (symbols[i].sym) != 0)
+ {
+ selected.sals[i].symtab =
+ symbols[i].symtab
+ ? symbols[i].symtab : symtab_for_sym (symbols[i].sym);
+ selected.sals[i].line = SYMBOL_LINE (symbols[i].sym);
+ }
else if (line_num >= 0)
- {
- /* Ignore this choice */
- symbols[i] = symbols[selected.nelts - 1];
- blocks[i] = blocks[selected.nelts - 1];
- selected.nelts -= 1;
- continue;
- }
+ {
+ /* Ignore this choice */
+ symbols[i] = symbols[selected.nelts - 1];
+ selected.nelts -= 1;
+ continue;
+ }
else
- error ("Line number not known for symbol \"%s\"", unquoted_name);
+ error ("Line number not known for symbol \"%s\"", unquoted_name);
i += 1;
}
@@ -4418,9 +5721,9 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
{
*canonical = (char **) xmalloc (sizeof (char *) * selected.nelts);
for (i = 0; i < selected.nelts; i += 1)
- (*canonical)[i] =
- extended_canonical_line_spec (selected.sals[i],
- SYMBOL_PRINT_NAME (symbols[i]));
+ (*canonical)[i] =
+ extended_canonical_line_spec (selected.sals[i],
+ SYMBOL_PRINT_NAME (symbols[i].sym));
}
discard_cleanups (old_chain);
@@ -4428,11 +5731,12 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
}
/* The (single) sal corresponding to line LINE_NUM in a symbol table
- with file name FILENAME that occurs in one of the functions listed
- in SYMBOLS[0 .. NSYMS-1]. */
+ with file name FILENAME that occurs in one of the functions listed
+ in the symbol fields of SYMBOLS[0 .. NSYMS-1]. */
+
static struct symtabs_and_lines
find_sal_from_funcs_and_line (const char *filename, int line_num,
- struct symbol **symbols, int nsyms)
+ struct ada_symbol_info *symbols, int nsyms)
{
struct symtabs_and_lines sals;
int best_index, best;
@@ -4454,26 +5758,26 @@ find_sal_from_funcs_and_line (const char *filename, int line_num,
QUIT;
- if (!DEPRECATED_STREQ (filename, s->filename))
+ if (strcmp (filename, s->filename) != 0)
continue;
l = LINETABLE (s);
ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact);
if (ind >= 0)
{
- if (exact)
- {
- best_index = ind;
- best_linetable = l;
- best_symtab = s;
- goto done;
- }
- if (best == 0 || l->item[ind].line < best)
- {
- best = l->item[ind].line;
- best_index = ind;
- best_linetable = l;
- best_symtab = s;
- }
+ if (exact)
+ {
+ best_index = ind;
+ best_linetable = l;
+ best_symtab = s;
+ goto done;
+ }
+ if (best == 0 || l->item[ind].line < best)
+ {
+ best = l->item[ind].line;
+ best_index = ind;
+ best_linetable = l;
+ best_symtab = s;
+ }
}
}
@@ -4495,11 +5799,14 @@ done:
}
/* Return the index in LINETABLE of the best match for LINE_NUM whose
- pc falls within one of the functions denoted by SYMBOLS[0..NSYMS-1].
- Set *EXACTP to the 1 if the match is exact, and 0 otherwise. */
+ pc falls within one of the functions denoted by the symbol fields
+ of SYMBOLS[0..NSYMS-1]. Set *EXACTP to 1 if the match is exact,
+ and 0 otherwise. */
+
static int
find_line_in_linetable (struct linetable *linetable, int line_num,
- struct symbol **symbols, int nsyms, int *exactp)
+ struct ada_symbol_info *symbols, int nsyms,
+ int *exactp)
{
int i, len, best_index, best;
@@ -4513,27 +5820,28 @@ find_line_in_linetable (struct linetable *linetable, int line_num,
struct linetable_entry *item = &(linetable->item[i]);
for (k = 0; k < nsyms; k += 1)
- {
- if (symbols[k] != NULL && SYMBOL_CLASS (symbols[k]) == LOC_BLOCK
- && item->pc >= BLOCK_START (SYMBOL_BLOCK_VALUE (symbols[k]))
- && item->pc < BLOCK_END (SYMBOL_BLOCK_VALUE (symbols[k])))
- goto candidate;
- }
+ {
+ if (symbols[k].sym != NULL
+ && SYMBOL_CLASS (symbols[k].sym) == LOC_BLOCK
+ && item->pc >= BLOCK_START (SYMBOL_BLOCK_VALUE (symbols[k].sym))
+ && item->pc < BLOCK_END (SYMBOL_BLOCK_VALUE (symbols[k].sym)))
+ goto candidate;
+ }
continue;
candidate:
if (item->line == line_num)
- {
- *exactp = 1;
- return i;
- }
+ {
+ *exactp = 1;
+ return i;
+ }
if (item->line > line_num && (best == 0 || item->line < best))
- {
- best = item->line;
- best_index = i;
- }
+ {
+ best = item->line;
+ best_index = i;
+ }
}
*exactp = 0;
@@ -4542,7 +5850,8 @@ find_line_in_linetable (struct linetable *linetable, int line_num,
/* Find the smallest k >= LINE_NUM such that k is a line number in
LINETABLE, and k falls strictly within a named function that begins at
- or before LINE_NUM. Return -1 if there is no such k. */
+ or before LINE_NUM. Return -1 if there is no such k. */
+
static int
nearest_line_number_in_linetable (struct linetable *linetable, int line_num)
{
@@ -4556,37 +5865,36 @@ nearest_line_number_in_linetable (struct linetable *linetable, int line_num)
best = INT_MAX;
while (i < len)
{
- int k;
struct linetable_entry *item = &(linetable->item[i]);
if (item->line >= line_num && item->line < best)
- {
- char *func_name;
- CORE_ADDR start, end;
-
- func_name = NULL;
- find_pc_partial_function (item->pc, &func_name, &start, &end);
-
- if (func_name != NULL && item->pc < end)
- {
- if (item->line == line_num)
- return line_num;
- else
- {
- struct symbol *sym =
- standard_lookup (func_name, VAR_DOMAIN);
- if (is_plausible_func_for_line (sym, line_num))
- best = item->line;
- else
- {
- do
- i += 1;
- while (i < len && linetable->item[i].pc < end);
- continue;
- }
- }
- }
- }
+ {
+ char *func_name;
+ CORE_ADDR start, end;
+
+ func_name = NULL;
+ find_pc_partial_function (item->pc, &func_name, &start, &end);
+
+ if (func_name != NULL && item->pc < end)
+ {
+ if (item->line == line_num)
+ return line_num;
+ else
+ {
+ struct symbol *sym =
+ standard_lookup (func_name, NULL, VAR_DOMAIN);
+ if (is_plausible_func_for_line (sym, line_num))
+ best = item->line;
+ else
+ {
+ do
+ i += 1;
+ while (i < len && linetable->item[i].pc < end);
+ continue;
+ }
+ }
+ }
+ }
i += 1;
}
@@ -4595,17 +5903,17 @@ nearest_line_number_in_linetable (struct linetable *linetable, int line_num)
}
-/* Return the next higher index, k, into LINETABLE such that k > IND,
+/* Return the next higher index, k, into LINETABLE such that k > IND,
entry k in LINETABLE has a line number equal to LINE_NUM, k
- corresponds to a PC that is in a function different from that
+ corresponds to a PC that is in a function different from that
corresponding to IND, and falls strictly within a named function
- that begins at a line at or preceding STARTING_LINE.
- Return -1 if there is no such k.
- IND == -1 corresponds to no function. */
+ that begins at a line at or preceding STARTING_LINE.
+ Return -1 if there is no such k.
+ IND == -1 corresponds to no function. */
static int
find_next_line_in_linetable (struct linetable *linetable, int line_num,
- int starting_line, int ind)
+ int starting_line, int ind)
{
int i, len;
@@ -4618,13 +5926,13 @@ find_next_line_in_linetable (struct linetable *linetable, int line_num,
CORE_ADDR start, end;
if (find_pc_partial_function (linetable->item[ind].pc,
- (char **) NULL, &start, &end))
- {
- while (ind < len && linetable->item[ind].pc < end)
- ind += 1;
- }
+ (char **) NULL, &start, &end))
+ {
+ while (ind < len && linetable->item[ind].pc < end)
+ ind += 1;
+ }
else
- ind += 1;
+ ind += 1;
}
else
ind = 0;
@@ -4632,33 +5940,32 @@ find_next_line_in_linetable (struct linetable *linetable, int line_num,
i = ind;
while (i < len)
{
- int k;
struct linetable_entry *item = &(linetable->item[i]);
if (item->line >= line_num)
- {
- char *func_name;
- CORE_ADDR start, end;
-
- func_name = NULL;
- find_pc_partial_function (item->pc, &func_name, &start, &end);
-
- if (func_name != NULL && item->pc < end)
- {
- if (item->line == line_num)
- {
- struct symbol *sym =
- standard_lookup (func_name, VAR_DOMAIN);
- if (is_plausible_func_for_line (sym, starting_line))
- return i;
- else
- {
- while ((i + 1) < len && linetable->item[i + 1].pc < end)
- i += 1;
- }
- }
- }
- }
+ {
+ char *func_name;
+ CORE_ADDR start, end;
+
+ func_name = NULL;
+ find_pc_partial_function (item->pc, &func_name, &start, &end);
+
+ if (func_name != NULL && item->pc < end)
+ {
+ if (item->line == line_num)
+ {
+ struct symbol *sym =
+ standard_lookup (func_name, NULL, VAR_DOMAIN);
+ if (is_plausible_func_for_line (sym, starting_line))
+ return i;
+ else
+ {
+ while ((i + 1) < len && linetable->item[i + 1].pc < end)
+ i += 1;
+ }
+ }
+ }
+ }
i += 1;
}
@@ -4666,7 +5973,8 @@ find_next_line_in_linetable (struct linetable *linetable, int line_num,
}
/* True iff function symbol SYM starts somewhere at or before line #
- LINE_NUM. */
+ LINE_NUM. */
+
static int
is_plausible_func_for_line (struct symbol *sym, int line_num)
{
@@ -4680,68 +5988,9 @@ is_plausible_func_for_line (struct symbol *sym, int line_num)
return (start_sal.line != 0 && line_num >= start_sal.line);
}
-static void
-debug_print_lines (struct linetable *lt)
-{
- int i;
-
- if (lt == NULL)
- return;
-
- fprintf (stderr, "\t");
- for (i = 0; i < lt->nitems; i += 1)
- fprintf (stderr, "(%d->%p) ", lt->item[i].line, (void *) lt->item[i].pc);
- fprintf (stderr, "\n");
-}
-
-static void
-debug_print_block (struct block *b)
-{
- struct dict_iterator iter;
- struct symbol *sym;
-
- fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]",
- b, BLOCK_START (b), BLOCK_END (b));
- if (BLOCK_FUNCTION (b) != NULL)
- fprintf (stderr, " Function: %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
- fprintf (stderr, "\n");
- fprintf (stderr, "\t Superblock: %p\n", BLOCK_SUPERBLOCK (b));
- fprintf (stderr, "\t Symbols:");
- ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym));
- }
- fprintf (stderr, "\n");
-}
-
-static void
-debug_print_blocks (struct blockvector *bv)
-{
- int i;
-
- if (bv == NULL)
- return;
- for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); i += 1)
- {
- fprintf (stderr, "%6d. ", i);
- debug_print_block (BLOCKVECTOR_BLOCK (bv, i));
- }
-}
-
-static void
-debug_print_symtab (struct symtab *s)
-{
- fprintf (stderr, "Symtab %p\n File: %s; Dir: %s\n", s,
- s->filename, s->dirname);
- fprintf (stderr, " Blockvector: %p, Primary: %d\n",
- BLOCKVECTOR (s), s->primary);
- debug_print_blocks (BLOCKVECTOR (s));
- fprintf (stderr, " Line table: %p\n", LINETABLE (s));
- debug_print_lines (LINETABLE (s));
-}
-
/* Read in all symbol tables corresponding to partial symbol tables
- with file name FILENAME. */
+ with file name FILENAME. */
+
static void
read_all_symtabs (const char *filename)
{
@@ -4752,16 +6001,24 @@ read_all_symtabs (const char *filename)
{
QUIT;
- if (DEPRECATED_STREQ (filename, ps->filename))
+ if (strcmp (filename, ps->filename) == 0)
PSYMTAB_TO_SYMTAB (ps);
}
}
/* All sals corresponding to line LINE_NUM in a symbol table from file
- FILENAME, as filtered by the user. If CANONICAL is not null, set
- it to a corresponding array of canonical line specs. */
-static struct symtabs_and_lines
-all_sals_for_line (const char *filename, int line_num, char ***canonical)
+ FILENAME, as filtered by the user. Filter out any lines that
+ reside in functions with "suppressed" names (not corresponding to
+ explicit Ada functions), if there is at least one in a function
+ with a non-suppressed name. If CANONICAL is not null, set
+ it to a corresponding array of canonical line specs.
+ If ONE_LOCATION_ONLY is set and several matches are found for
+ the given location, then automatically select the first match found
+ instead of asking the user which instance should be returned. */
+
+struct symtabs_and_lines
+ada_sals_for_line (const char *filename, int line_num,
+ int funfirstline, char ***canonical, int one_location_only)
{
struct symtabs_and_lines result;
struct objfile *objfile;
@@ -4783,7 +6040,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
QUIT;
- if (!DEPRECATED_STREQ (s->filename, filename))
+ if (strcmp (s->filename, filename) != 0)
continue;
target_line_num =
@@ -4794,82 +6051,119 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
ind = -1;
while (1)
{
- ind =
- find_next_line_in_linetable (LINETABLE (s),
- target_line_num, line_num, ind);
-
- if (ind < 0)
- break;
-
- GROW_VECT (result.sals, len, result.nelts + 1);
- init_sal (&result.sals[result.nelts]);
- result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
- result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
- result.sals[result.nelts].symtab = s;
- result.nelts += 1;
+ ind =
+ find_next_line_in_linetable (LINETABLE (s),
+ target_line_num, line_num, ind);
+
+ if (ind < 0)
+ break;
+
+ GROW_VECT (result.sals, len, result.nelts + 1);
+ init_sal (&result.sals[result.nelts]);
+ result.sals[result.nelts].line = line_num;
+ result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
+ result.sals[result.nelts].symtab = s;
+
+ if (funfirstline)
+ adjust_pc_past_prologue (&result.sals[result.nelts].pc);
+
+ result.nelts += 1;
}
}
if (canonical != NULL || result.nelts > 1)
{
- int k;
+ int k, j, n;
char **func_names = (char **) alloca (result.nelts * sizeof (char *));
int first_choice = (result.nelts > 1) ? 2 : 1;
- int n;
int *choices = (int *) alloca (result.nelts * sizeof (int));
for (k = 0; k < result.nelts; k += 1)
- {
- find_pc_partial_function (result.sals[k].pc, &func_names[k],
- (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (func_names[k] == NULL)
- error ("Could not find function for one or more breakpoints.");
- }
+ {
+ find_pc_partial_function (result.sals[k].pc, &func_names[k],
+ (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ if (func_names[k] == NULL)
+ error ("Could not find function for one or more breakpoints.");
+ }
+
+ /* Remove suppressed names, unless all are suppressed. */
+ for (j = 0; j < result.nelts; j += 1)
+ if (!is_suppressed_name (func_names[j]))
+ {
+ /* At least one name is unsuppressed, so remove all
+ suppressed names. */
+ for (k = n = 0; k < result.nelts; k += 1)
+ if (!is_suppressed_name (func_names[k]))
+ {
+ func_names[n] = func_names[k];
+ result.sals[n] = result.sals[k];
+ n += 1;
+ }
+ result.nelts = n;
+ break;
+ }
if (result.nelts > 1)
- {
- printf_unfiltered ("[0] cancel\n");
- if (result.nelts > 1)
- printf_unfiltered ("[1] all\n");
- for (k = 0; k < result.nelts; k += 1)
- printf_unfiltered ("[%d] %s\n", k + first_choice,
- ada_demangle (func_names[k]));
-
- n = get_selections (choices, result.nelts, result.nelts,
- result.nelts > 1, "instance-choice");
-
- for (k = 0; k < n; k += 1)
- {
- result.sals[k] = result.sals[choices[k]];
- func_names[k] = func_names[choices[k]];
- }
- result.nelts = n;
- }
-
- if (canonical != NULL)
- {
- *canonical = (char **) xmalloc (result.nelts * sizeof (char **));
- make_cleanup (xfree, *canonical);
- for (k = 0; k < result.nelts; k += 1)
- {
- (*canonical)[k] =
- extended_canonical_line_spec (result.sals[k], func_names[k]);
- if ((*canonical)[k] == NULL)
- error ("Could not locate one or more breakpoints.");
- make_cleanup (xfree, (*canonical)[k]);
- }
- }
+ {
+ if (one_location_only)
+ {
+ /* Automatically select the first of all possible choices. */
+ n = 1;
+ choices[0] = 0;
+ }
+ else
+ {
+ printf_unfiltered ("[0] cancel\n");
+ if (result.nelts > 1)
+ printf_unfiltered ("[1] all\n");
+ for (k = 0; k < result.nelts; k += 1)
+ printf_unfiltered ("[%d] %s\n", k + first_choice,
+ ada_decode (func_names[k]));
+
+ n = get_selections (choices, result.nelts, result.nelts,
+ result.nelts > 1, "instance-choice");
+ }
+
+ for (k = 0; k < n; k += 1)
+ {
+ result.sals[k] = result.sals[choices[k]];
+ func_names[k] = func_names[choices[k]];
+ }
+ result.nelts = n;
+ }
+
+ if (canonical != NULL && result.nelts == 0)
+ *canonical = NULL;
+ else if (canonical != NULL)
+ {
+ *canonical = (char **) xmalloc (result.nelts * sizeof (char **));
+ make_cleanup (xfree, *canonical);
+ for (k = 0; k < result.nelts; k += 1)
+ {
+ (*canonical)[k] =
+ extended_canonical_line_spec (result.sals[k], func_names[k]);
+ if ((*canonical)[k] == NULL)
+ error ("Could not locate one or more breakpoints.");
+ make_cleanup (xfree, (*canonical)[k]);
+ }
+ }
+ }
+
+ if (result.nelts == 0)
+ {
+ do_cleanups (old_chain);
+ result.sals = NULL;
}
-
- discard_cleanups (old_chain);
+ else
+ discard_cleanups (old_chain);
return result;
}
/* A canonical line specification of the form FILE:NAME:LINENUM for
symbol table and line data SAL. NULL if insufficient
- information. The caller is responsible for releasing any space
- allocated. */
+ information. The caller is responsible for releasing any space
+ allocated. */
static char *
extended_canonical_line_spec (struct symtab_and_line sal, const char *name)
@@ -4880,161 +6174,260 @@ extended_canonical_line_spec (struct symtab_and_line sal, const char *name)
return NULL;
r = (char *) xmalloc (strlen (name) + strlen (sal.symtab->filename)
- + sizeof (sal.line) * 3 + 3);
+ + sizeof (sal.line) * 3 + 3);
sprintf (r, "%s:'%s':%d", sal.symtab->filename, name, sal.line);
return r;
}
-#if 0
-int begin_bnum = -1;
-#endif
-int begin_annotate_level = 0;
+/* Return type of Ada breakpoint associated with bp_stat:
+ 0 if not an Ada-specific breakpoint, 1 for break on specific exception,
+ 2 for break on unhandled exception, 3 for assert. */
-static void
-begin_cleanup (void *dummy)
+static int
+ada_exception_breakpoint_type (bpstat bs)
{
- begin_annotate_level = 0;
+ return ((!bs || !bs->breakpoint_at) ? 0
+ : bs->breakpoint_at->break_on_exception);
}
-static void
-begin_command (char *args, int from_tty)
-{
- struct minimal_symbol *msym;
- CORE_ADDR main_program_name_addr;
- char main_program_name[1024];
- struct cleanup *old_chain = make_cleanup (begin_cleanup, NULL);
- begin_annotate_level = 2;
+/* True iff FRAME is very likely to be that of a function that is
+ part of the runtime system. This is all very heuristic, but is
+ intended to be used as advice as to what frames are uninteresting
+ to most users. */
- /* Check that there is a program to debug */
- if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
+static int
+is_known_support_routine (struct frame_info *frame)
+{
+ struct frame_info *next_frame = get_next_frame (frame);
+ /* If frame is not innermost, that normally means that frame->pc
+ points to *after* the call instruction, and we want to get the line
+ containing the call, never the next line. But if the next frame is
+ a signal_handler_caller or a dummy frame, then the next frame was
+ not entered as the result of a call, and we want to get the line
+ containing frame->pc. */
+ const int pc_is_after_call =
+ next_frame != NULL
+ && get_frame_type (next_frame) != SIGTRAMP_FRAME
+ && get_frame_type (next_frame) != DUMMY_FRAME;
+ struct symtab_and_line sal
+ = find_pc_line (get_frame_pc (frame), pc_is_after_call);
+ char *func_name;
+ int i;
+ struct stat st;
- /* Check that we are debugging an Ada program */
- /* if (ada_update_initial_language (language_unknown, NULL) != language_ada)
- error ("Cannot find the Ada initialization procedure. Is this an Ada main program?");
- */
- /* FIXME: language_ada should be defined in defs.h */
+ /* The heuristic:
+ 1. The symtab is null (indicating no debugging symbols)
+ 2. The symtab's filename does not exist.
+ 3. The object file's name is one of the standard libraries.
+ 4. The symtab's file name has the form of an Ada library source file.
+ 5. The function at frame's PC has a GNAT-compiler-generated name. */
- /* Get the address of the name of the main procedure */
- msym = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
+ if (sal.symtab == NULL)
+ return 1;
- if (msym != NULL)
- {
- main_program_name_addr = SYMBOL_VALUE_ADDRESS (msym);
- if (main_program_name_addr == 0)
- error ("Invalid address for Ada main program name.");
+ /* On some systems (e.g. VxWorks), the kernel contains debugging
+ symbols; in this case, the filename referenced by these symbols
+ does not exists. */
- /* Read the name of the main procedure */
- extract_string (main_program_name_addr, main_program_name);
+ if (stat (sal.symtab->filename, &st))
+ return 1;
- /* Put a temporary breakpoint in the Ada main program and run */
- do_command ("tbreak ", main_program_name, 0);
- do_command ("run ", args, 0);
+ for (i = 0; known_runtime_file_name_patterns[i] != NULL; i += 1)
+ {
+ re_comp (known_runtime_file_name_patterns[i]);
+ if (re_exec (sal.symtab->filename))
+ return 1;
+ }
+ if (sal.symtab->objfile != NULL)
+ {
+ for (i = 0; known_runtime_file_name_patterns[i] != NULL; i += 1)
+ {
+ re_comp (known_runtime_file_name_patterns[i]);
+ if (re_exec (sal.symtab->objfile->name))
+ return 1;
+ }
}
+
+ /* If the frame PC points after the call instruction, then we need to
+ decrement it in order to search for the function associated to this
+ PC. Otherwise, if the associated call was the last instruction of
+ the function, we might either find the wrong function or even fail
+ during the function name lookup. */
+ if (pc_is_after_call)
+ func_name = function_name_from_pc (get_frame_pc (frame) - 1);
else
+ func_name = function_name_from_pc (get_frame_pc (frame));
+
+ if (func_name == NULL)
+ return 1;
+
+ for (i = 0; known_auxiliary_function_name_patterns[i] != NULL; i += 1)
{
- /* If we could not find the symbol containing the name of the
- main program, that means that the compiler that was used to build
- was not recent enough. In that case, we fallback to the previous
- mechanism, which is a little bit less reliable, but has proved to work
- in most cases. The only cases where it will fail is when the user
- has set some breakpoints which will be hit before the end of the
- begin command processing (eg in the initialization code).
-
- The begining of the main Ada subprogram is located by breaking
- on the adainit procedure. Since we know that the binder generates
- the call to this procedure exactly 2 calls before the call to the
- Ada main subprogram, it is then easy to put a breakpoint on this
- Ada main subprogram once we hit adainit.
- */
- do_command ("tbreak adainit", 0);
- do_command ("run ", args, 0);
- do_command ("up", 0);
- do_command ("tbreak +2", 0);
- do_command ("continue", 0);
- do_command ("step", 0);
+ re_comp (known_auxiliary_function_name_patterns[i]);
+ if (re_exec (func_name))
+ return 1;
}
- do_cleanups (old_chain);
+ return 0;
}
-int
-is_ada_runtime_file (char *filename)
+/* Find the first frame that contains debugging information and that is not
+ part of the Ada run-time, starting from FI and moving upward. */
+
+void
+ada_find_printable_frame (struct frame_info *fi)
{
- return (DEPRECATED_STREQN (filename, "s-", 2) ||
- DEPRECATED_STREQN (filename, "a-", 2) ||
- DEPRECATED_STREQN (filename, "g-", 2) || DEPRECATED_STREQN (filename, "i-", 2));
+ for (; fi != NULL; fi = get_prev_frame (fi))
+ {
+ if (!is_known_support_routine (fi))
+ {
+ select_frame (fi);
+ break;
+ }
+ }
+
}
-/* find the first frame that contains debugging information and that is not
- part of the Ada run-time, starting from fi and moving upward. */
+/* Name found for exception associated with last bpstat sent to
+ ada_adjust_exception_stop. Set to the null string if that bpstat
+ did not correspond to an Ada exception or no name could be found. */
-int
-find_printable_frame (struct frame_info *fi, int level)
+static char last_exception_name[256];
+
+/* If BS indicates a stop in an Ada exception, try to go up to a frame
+ that will be meaningful to the user, and save the name of the last
+ exception (truncated, if necessary) in last_exception_name. */
+
+void
+ada_adjust_exception_stop (bpstat bs)
{
- struct symtab_and_line sal;
+ CORE_ADDR addr;
+ struct frame_info *fi;
+ int frame_level;
+ char *selected_frame_func;
+
+ addr = 0;
+ last_exception_name[0] = '\0';
+ fi = get_selected_frame ();
+ selected_frame_func = function_name_from_pc (get_frame_pc (fi));
- for (; fi != NULL; level += 1, fi = get_prev_frame (fi))
+ switch (ada_exception_breakpoint_type (bs))
{
- find_frame_sal (fi, &sal);
- if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
- {
-#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
- /* libpthread.so contains some debugging information that prevents us
- from finding the right frame */
+ default:
+ return;
+ case 1:
+ break;
+ case 2:
+ /* Unhandled exceptions. Select the frame corresponding to
+ ada.exceptions.process_raise_exception. This frame is at
+ least 2 levels up, so we simply skip the first 2 frames
+ without checking the name of their associated function. */
+ for (frame_level = 0; frame_level < 2; frame_level += 1)
+ if (fi != NULL)
+ fi = get_prev_frame (fi);
+ while (fi != NULL)
+ {
+ const char *func_name = function_name_from_pc (get_frame_pc (fi));
+ if (func_name != NULL
+ && strcmp (func_name, process_raise_exception_name) == 0)
+ break; /* We found the frame we were looking for... */
+ fi = get_prev_frame (fi);
+ }
+ if (fi == NULL)
+ break;
+ select_frame (fi);
+ break;
+ }
- if (sal.symtab->objfile &&
- DEPRECATED_STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
- continue;
-#endif
- deprecated_selected_frame = fi;
- break;
- }
+ addr = parse_and_eval_address ("e.full_name");
+
+ if (addr != 0)
+ read_memory (addr, last_exception_name, sizeof (last_exception_name) - 1);
+ last_exception_name[sizeof (last_exception_name) - 1] = '\0';
+ ada_find_printable_frame (get_selected_frame ());
+}
+
+/* Output Ada exception name (if any) associated with last call to
+ ada_adjust_exception_stop. */
+
+void
+ada_print_exception_stop (bpstat bs)
+{
+ if (last_exception_name[0] != '\000')
+ {
+ ui_out_text (uiout, last_exception_name);
+ ui_out_text (uiout, " at ");
}
+}
+
+/* Parses the CONDITION string associated with a breakpoint exception
+ to get the name of the exception on which the breakpoint has been
+ set. The returned string needs to be deallocated after use. */
+
+static char *
+exception_name_from_cond (const char *condition)
+{
+ char *start, *end, *exception_name;
+ int exception_name_len;
+
+ start = strrchr (condition, '&') + 1;
+ end = strchr (start, ')') - 1;
+ exception_name_len = end - start + 1;
+
+ exception_name =
+ (char *) xmalloc ((exception_name_len + 1) * sizeof (char));
+ sprintf (exception_name, "%.*s", exception_name_len, start);
- return level;
+ return exception_name;
}
+/* Print Ada-specific exception information about B, other than task
+ clause. Return non-zero iff B was an Ada exception breakpoint. */
+
+int
+ada_print_exception_breakpoint_nontask (struct breakpoint *b)
+{
+ if (b->break_on_exception == 1)
+ {
+ if (b->cond_string) /* the breakpoint is on a specific exception. */
+ {
+ char *exception_name = exception_name_from_cond (b->cond_string);
+
+ make_cleanup (xfree, exception_name);
+
+ ui_out_text (uiout, "on ");
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "exception", exception_name);
+ else
+ {
+ ui_out_text (uiout, "exception ");
+ ui_out_text (uiout, exception_name);
+ ui_out_text (uiout, " ");
+ }
+ }
+ else
+ ui_out_text (uiout, "on all exceptions");
+ }
+ else if (b->break_on_exception == 2)
+ ui_out_text (uiout, "on unhandled exception");
+ else if (b->break_on_exception == 3)
+ ui_out_text (uiout, "on assert failure");
+ else
+ return 0;
+ return 1;
+}
+
+/* Print task identifier for breakpoint B, if it is an Ada-specific
+ breakpoint with non-zero tasking information. */
+
void
-ada_report_exception_break (struct breakpoint *b)
-{
- /* FIXME: break_on_exception should be defined in breakpoint.h */
- /* if (b->break_on_exception == 1)
- {
- /* Assume that cond has 16 elements, the 15th
- being the exception *//*
- if (b->cond && b->cond->nelts == 16)
- {
- ui_out_text (uiout, "on ");
- ui_out_field_string (uiout, "exception",
- SYMBOL_NAME (b->cond->elts[14].symbol));
- }
- else
- ui_out_text (uiout, "on all exceptions");
- }
- else if (b->break_on_exception == 2)
- ui_out_text (uiout, "on unhandled exception");
- else if (b->break_on_exception == 3)
- ui_out_text (uiout, "on assert failure");
- #else
- if (b->break_on_exception == 1)
- { */
- /* Assume that cond has 16 elements, the 15th
- being the exception *//*
- if (b->cond && b->cond->nelts == 16)
- {
- fputs_filtered ("on ", gdb_stdout);
- fputs_filtered (SYMBOL_NAME
- (b->cond->elts[14].symbol), gdb_stdout);
- }
- else
- fputs_filtered ("on all exceptions", gdb_stdout);
- }
- else if (b->break_on_exception == 2)
- fputs_filtered ("on unhandled exception", gdb_stdout);
- else if (b->break_on_exception == 3)
- fputs_filtered ("on assert failure", gdb_stdout);
- */
+ada_print_exception_breakpoint_task (struct breakpoint *b)
+{
+ if (b->task != 0)
+ {
+ ui_out_text (uiout, " task ");
+ ui_out_field_int (uiout, "task", b->task);
+ }
}
int
@@ -5043,91 +6436,149 @@ ada_is_exception_sym (struct symbol *sym)
char *type_name = type_name_no_tag (SYMBOL_TYPE (sym));
return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
- && SYMBOL_CLASS (sym) != LOC_BLOCK
- && SYMBOL_CLASS (sym) != LOC_CONST
- && type_name != NULL && DEPRECATED_STREQ (type_name, "exception"));
+ && SYMBOL_CLASS (sym) != LOC_BLOCK
+ && SYMBOL_CLASS (sym) != LOC_CONST
+ && type_name != NULL && strcmp (type_name, "exception") == 0);
}
int
ada_maybe_exception_partial_symbol (struct partial_symbol *sym)
{
return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
- && SYMBOL_CLASS (sym) != LOC_BLOCK
- && SYMBOL_CLASS (sym) != LOC_CONST);
+ && SYMBOL_CLASS (sym) != LOC_BLOCK
+ && SYMBOL_CLASS (sym) != LOC_CONST);
+}
+
+/* Cause the appropriate error if no appropriate runtime symbol is
+ found to set a breakpoint, using ERR_DESC to describe the
+ breakpoint. */
+
+static void
+error_breakpoint_runtime_sym_not_found (const char *err_desc)
+{
+ /* If we are not debugging an Ada program, we can not put exception
+ breakpoints! */
+
+ if (ada_update_initial_language (language_unknown, NULL) != language_ada)
+ error ("Unable to break on %s. Is this an Ada main program?", err_desc);
+
+ /* If the symbol does not exist, then check that the program is
+ already started, to make sure that shared libraries have been
+ loaded. If it is not started, this may mean that the symbol is
+ in a shared library. */
+
+ if (ptid_get_pid (inferior_ptid) == 0)
+ error ("Unable to break on %s. Try to start the program first.",
+ err_desc);
+
+ /* At this point, we know that we are debugging an Ada program and
+ that the inferior has been started, but we still are not able to
+ find the run-time symbols. That can mean that we are in
+ configurable run time mode, or that a-except as been optimized
+ out by the linker... In any case, at this point it is not worth
+ supporting this feature. */
+
+ error ("Cannot break on %s in this configuration.", err_desc);
+}
+
+/* Test if NAME is currently defined, and that either ALLOW_TRAMP or
+ the symbol is not a shared-library trampoline. Return the result of
+ the test. */
+
+static int
+is_runtime_sym_defined (const char *name, int allow_tramp)
+{
+ struct minimal_symbol *msym;
+
+ msym = lookup_minimal_symbol (name, NULL, NULL);
+ return (msym != NULL && msym->type != mst_unknown
+ && (allow_tramp || msym->type != mst_solib_trampoline));
}
/* If ARG points to an Ada exception or assert breakpoint, rewrite
- into equivalent form. Return resulting argument string. Set
+ into equivalent form. Return resulting argument string. Set
*BREAK_ON_EXCEPTIONP to 1 for ordinary break on exception, 2 for
- break on unhandled, 3 for assert, 0 otherwise. */
+ break on unhandled, 3 for assert, 0 otherwise. */
+
char *
ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
{
if (arg == NULL)
return arg;
*break_on_exceptionp = 0;
- /* FIXME: language_ada should be defined in defs.h */
- /* if (current_language->la_language == language_ada
- && DEPRECATED_STREQN (arg, "exception", 9) &&
- (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
- {
- char *tok, *end_tok;
- int toklen;
-
- *break_on_exceptionp = 1;
-
- tok = arg+9;
- while (*tok == ' ' || *tok == '\t')
- tok += 1;
-
- end_tok = tok;
-
- while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
- end_tok += 1;
-
- toklen = end_tok - tok;
-
- arg = (char*) xmalloc (sizeof ("__gnat_raise_nodefer_with_msg if "
- "long_integer(e) = long_integer(&)")
- + toklen + 1);
- make_cleanup (xfree, arg);
- if (toklen == 0)
- strcpy (arg, "__gnat_raise_nodefer_with_msg");
- else if (DEPRECATED_STREQN (tok, "unhandled", toklen))
- {
- *break_on_exceptionp = 2;
- strcpy (arg, "__gnat_unhandled_exception");
- }
- else
- {
- sprintf (arg, "__gnat_raise_nodefer_with_msg if "
- "long_integer(e) = long_integer(&%.*s)",
- toklen, tok);
- }
- }
- else if (current_language->la_language == language_ada
- && DEPRECATED_STREQN (arg, "assert", 6) &&
- (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
- {
- char *tok = arg + 6;
-
- *break_on_exceptionp = 3;
-
- arg = (char*)
- xmalloc (sizeof ("system__assertions__raise_assert_failure")
- + strlen (tok) + 1);
- make_cleanup (xfree, arg);
- sprintf (arg, "system__assertions__raise_assert_failure%s", tok);
- }
- */
+ if (current_language->la_language == language_ada
+ && strncmp (arg, "exception", 9) == 0
+ && (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
+ {
+ char *tok, *end_tok;
+ int toklen;
+ int has_exception_propagation =
+ is_runtime_sym_defined (raise_sym_name, 1);
+
+ *break_on_exceptionp = 1;
+
+ tok = arg + 9;
+ while (*tok == ' ' || *tok == '\t')
+ tok += 1;
+
+ end_tok = tok;
+
+ while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
+ end_tok += 1;
+
+ toklen = end_tok - tok;
+
+ arg = (char *) xmalloc (sizeof (longest_exception_template) + toklen);
+ make_cleanup (xfree, arg);
+ if (toklen == 0)
+ {
+ if (has_exception_propagation)
+ sprintf (arg, "'%s'", raise_sym_name);
+ else
+ error_breakpoint_runtime_sym_not_found ("exception");
+ }
+ else if (strncmp (tok, "unhandled", toklen) == 0)
+ {
+ if (is_runtime_sym_defined (raise_unhandled_sym_name, 1))
+ sprintf (arg, "'%s'", raise_unhandled_sym_name);
+ else
+ error_breakpoint_runtime_sym_not_found ("exception");
+
+ *break_on_exceptionp = 2;
+ }
+ else
+ {
+ if (is_runtime_sym_defined (raise_sym_name, 0))
+ sprintf (arg, "'%s' if long_integer(e) = long_integer(&%.*s)",
+ raise_sym_name, toklen, tok);
+ else
+ error_breakpoint_runtime_sym_not_found ("specific exception");
+ }
+ }
+ else if (current_language->la_language == language_ada
+ && strncmp (arg, "assert", 6) == 0
+ && (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
+ {
+ char *tok = arg + 6;
+
+ if (!is_runtime_sym_defined (raise_assert_sym_name, 1))
+ error_breakpoint_runtime_sym_not_found ("failed assertion");
+
+ *break_on_exceptionp = 3;
+
+ arg =
+ (char *) xmalloc (sizeof (raise_assert_sym_name) + strlen (tok) + 2);
+ make_cleanup (xfree, arg);
+ sprintf (arg, "'%s'%s", raise_assert_sym_name, tok);
+ }
return arg;
}
+#endif
-
- /* Field Access */
+ /* Field Access */
/* True if field number FIELD_NUM in struct or union type TYPE is supposed
- to be invisible to users. */
+ to be invisible to users. */
int
ada_is_ignored_field (struct type *type, int field_num)
@@ -5138,30 +6589,43 @@ ada_is_ignored_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (type, field_num);
return (name == NULL
- || (name[0] == '_' && !DEPRECATED_STREQN (name, "_parent", 7)));
+ || (name[0] == '_' && strncmp (name, "_parent", 7) != 0));
}
}
-/* True iff structure type TYPE has a tag field. */
+/* True iff TYPE has a tag field. If REFOK, then TYPE may also be a
+ pointer or reference type whose ultimate target has a tag field. */
int
-ada_is_tagged_type (struct type *type)
+ada_is_tagged_type (struct type *type, int refok)
{
- if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT)
- return 0;
+ return (ada_lookup_struct_elt_type (type, "_tag", refok, 1, NULL) != NULL);
+}
- return (ada_lookup_struct_elt_type (type, "_tag", 1, NULL) != NULL);
+/* True iff TYPE represents the type of X'Tag */
+
+int
+ada_is_tag_type (struct type *type)
+{
+ if (type == NULL || TYPE_CODE (type) != TYPE_CODE_PTR)
+ return 0;
+ else
+ {
+ const char *name = ada_type_name (TYPE_TARGET_TYPE (type));
+ return (name != NULL
+ && strcmp (name, "ada__tags__dispatch_table") == 0);
+ }
}
-/* The type of the tag on VAL. */
+/* The type of the tag on VAL. */
struct type *
ada_tag_type (struct value *val)
{
- return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 0, NULL);
+ return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 1, 0, NULL);
}
-/* The value of the tag on VAL. */
+/* The value of the tag on VAL. */
struct value *
ada_value_tag (struct value *val)
@@ -5169,7 +6633,85 @@ ada_value_tag (struct value *val)
return ada_value_struct_elt (val, "_tag", "record");
}
-/* The parent type of TYPE, or NULL if none. */
+/* The value of the tag on the object of type TYPE whose contents are
+ saved at VALADDR, if it is non-null, or is at memory address
+ ADDRESS. */
+
+static struct value *
+value_tag_from_contents_and_address (struct type *type, char *valaddr,
+ CORE_ADDR address)
+{
+ int tag_byte_offset, dummy1, dummy2;
+ struct type *tag_type;
+ if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
+ &dummy1, &dummy2))
+ {
+ char *valaddr1 = (valaddr == NULL) ? NULL : valaddr + tag_byte_offset;
+ CORE_ADDR address1 = (address == 0) ? 0 : address + tag_byte_offset;
+
+ return value_from_contents_and_address (tag_type, valaddr1, address1);
+ }
+ return NULL;
+}
+
+static struct type *
+type_from_tag (struct value *tag)
+{
+ const char *type_name = ada_tag_name (tag);
+ if (type_name != NULL)
+ return ada_find_any_type (ada_encode (type_name));
+ return NULL;
+}
+
+struct tag_args
+{
+ struct value *tag;
+ char *name;
+};
+
+/* Wrapper function used by ada_tag_name. Given a struct tag_args*
+ value ARGS, sets ARGS->name to the tag name of ARGS->tag.
+ The value stored in ARGS->name is valid until the next call to
+ ada_tag_name_1. */
+
+static int
+ada_tag_name_1 (void *args0)
+{
+ struct tag_args *args = (struct tag_args *) args0;
+ static char name[1024];
+ char *p;
+ struct value *val;
+ args->name = NULL;
+ val = ada_value_struct_elt (args->tag, "tsd", NULL);
+ if (val == NULL)
+ return 0;
+ val = ada_value_struct_elt (val, "expanded_name", NULL);
+ if (val == NULL)
+ return 0;
+ read_memory_string (value_as_address (val), name, sizeof (name) - 1);
+ for (p = name; *p != '\0'; p += 1)
+ if (isalpha (*p))
+ *p = tolower (*p);
+ args->name = name;
+ return 0;
+}
+
+/* The type name of the dynamic type denoted by the 'tag value TAG, as
+ * a C string. */
+
+const char *
+ada_tag_name (struct value *tag)
+{
+ struct tag_args args;
+ if (!ada_is_tag_type (VALUE_TYPE (tag)))
+ return NULL;
+ args.tag = tag;
+ args.name = NULL;
+ catch_errors (ada_tag_name_1, &args, NULL, RETURN_MASK_ALL);
+ return args.name;
+}
+
+/* The parent type of TYPE, or NULL if none. */
struct type *
ada_parent_type (struct type *type)
@@ -5188,66 +6730,69 @@ ada_parent_type (struct type *type)
return NULL;
}
-/* True iff field number FIELD_NUM of structure type TYPE contains the
- parent-type (inherited) fields of a derived type. Assumes TYPE is
- a structure type with at least FIELD_NUM+1 fields. */
+/* True iff field number FIELD_NUM of structure type TYPE contains the
+ parent-type (inherited) fields of a derived type. Assumes TYPE is
+ a structure type with at least FIELD_NUM+1 fields. */
int
ada_is_parent_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (check_typedef (type), field_num);
- return (name != NULL &&
- (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQN (name, "_parent", 7)));
+ return (name != NULL
+ && (strncmp (name, "PARENT", 6) == 0
+ || strncmp (name, "_parent", 7) == 0));
}
-/* True iff field number FIELD_NUM of structure type TYPE is a
+/* True iff field number FIELD_NUM of structure type TYPE is a
transparent wrapper field (which should be silently traversed when doing
- field selection and flattened when printing). Assumes TYPE is a
+ field selection and flattened when printing). Assumes TYPE is a
structure type with at least FIELD_NUM+1 fields. Such fields are always
- structures. */
+ structures. */
int
ada_is_wrapper_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (type, field_num);
return (name != NULL
- && (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQ (name, "REP")
- || DEPRECATED_STREQN (name, "_parent", 7)
- || name[0] == 'S' || name[0] == 'R' || name[0] == 'O'));
+ && (strncmp (name, "PARENT", 6) == 0
+ || strcmp (name, "REP") == 0
+ || strncmp (name, "_parent", 7) == 0
+ || name[0] == 'S' || name[0] == 'R' || name[0] == 'O'));
}
-/* True iff field number FIELD_NUM of structure or union type TYPE
- is a variant wrapper. Assumes TYPE is a structure type with at least
- FIELD_NUM+1 fields. */
+/* True iff field number FIELD_NUM of structure or union type TYPE
+ is a variant wrapper. Assumes TYPE is a structure type with at least
+ FIELD_NUM+1 fields. */
int
ada_is_variant_part (struct type *type, int field_num)
{
struct type *field_type = TYPE_FIELD_TYPE (type, field_num);
return (TYPE_CODE (field_type) == TYPE_CODE_UNION
- || (is_dynamic_field (type, field_num)
- && TYPE_CODE (TYPE_TARGET_TYPE (field_type)) ==
- TYPE_CODE_UNION));
+ || (is_dynamic_field (type, field_num)
+ && (TYPE_CODE (TYPE_TARGET_TYPE (field_type))
+ == TYPE_CODE_UNION)));
}
/* Assuming that VAR_TYPE is a variant wrapper (type of the variant part)
- whose discriminants are contained in the record type OUTER_TYPE,
+ whose discriminants are contained in the record type OUTER_TYPE,
returns the type of the controlling discriminant for the variant. */
struct type *
ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
{
char *name = ada_variant_discrim_name (var_type);
- struct type *type = ada_lookup_struct_elt_type (outer_type, name, 1, NULL);
+ struct type *type =
+ ada_lookup_struct_elt_type (outer_type, name, 1, 1, NULL);
if (type == NULL)
return builtin_type_int;
else
return type;
}
-/* Assuming that TYPE is the type of a variant wrapper, and FIELD_NUM is a
+/* Assuming that TYPE is the type of a variant wrapper, and FIELD_NUM is a
valid field number within it, returns 1 iff field FIELD_NUM of TYPE
- represents a 'when others' clause; otherwise 0. */
+ represents a 'when others' clause; otherwise 0. */
int
ada_is_others_clause (struct type *type, int field_num)
@@ -5257,8 +6802,8 @@ ada_is_others_clause (struct type *type, int field_num)
}
/* Assuming that TYPE0 is the type of the variant part of a record,
- returns the name of the discriminant controlling the variant. The
- value is valid until the next call to ada_variant_discrim_name. */
+ returns the name of the discriminant controlling the variant.
+ The value is valid until the next call to ada_variant_discrim_name. */
char *
ada_variant_discrim_name (struct type *type0)
@@ -5283,8 +6828,8 @@ ada_variant_discrim_name (struct type *type0)
for (discrim_end = name + strlen (name) - 6; discrim_end != name;
discrim_end -= 1)
{
- if (DEPRECATED_STREQN (discrim_end, "___XVN", 6))
- break;
+ if (strncmp (discrim_end, "___XVN", 6) == 0)
+ break;
}
if (discrim_end == name)
return "";
@@ -5293,10 +6838,11 @@ ada_variant_discrim_name (struct type *type0)
discrim_start -= 1)
{
if (discrim_start == name + 1)
- return "";
- if ((discrim_start > name + 3 && DEPRECATED_STREQN (discrim_start - 3, "___", 3))
- || discrim_start[-1] == '.')
- break;
+ return "";
+ if ((discrim_start > name + 3
+ && strncmp (discrim_start - 3, "___", 3) == 0)
+ || discrim_start[-1] == '.')
+ break;
}
GROW_VECT (result, result_len, discrim_end - discrim_start + 1);
@@ -5305,13 +6851,13 @@ ada_variant_discrim_name (struct type *type0)
return result;
}
-/* Scan STR for a subtype-encoded number, beginning at position K. Put the
- position of the character just past the number scanned in *NEW_K,
- if NEW_K!=NULL. Put the scanned number in *R, if R!=NULL. Return 1
- if there was a valid number at the given position, and 0 otherwise. A
- "subtype-encoded" number consists of the absolute value in decimal,
- followed by the letter 'm' to indicate a negative number. Assumes 0m
- does not occur. */
+/* Scan STR for a subtype-encoded number, beginning at position K.
+ Put the position of the character just past the number scanned in
+ *NEW_K, if NEW_K!=NULL. Put the scanned number in *R, if R!=NULL.
+ Return 1 if there was a valid number at the given position, and 0
+ otherwise. A "subtype-encoded" number consists of the absolute value
+ in decimal, followed by the letter 'm' to indicate a negative number.
+ Assumes 0m does not occur. */
int
ada_scan_number (const char str[], int k, LONGEST * R, int *new_k)
@@ -5321,9 +6867,9 @@ ada_scan_number (const char str[], int k, LONGEST * R, int *new_k)
if (!isdigit (str[k]))
return 0;
- /* Do it the hard way so as not to make any assumption about
+ /* Do it the hard way so as not to make any assumption about
the relationship of unsigned long (%lu scan format code) and
- LONGEST. */
+ LONGEST. */
RU = 0;
while (isdigit (str[k]))
{
@@ -5334,26 +6880,26 @@ ada_scan_number (const char str[], int k, LONGEST * R, int *new_k)
if (str[k] == 'm')
{
if (R != NULL)
- *R = (-(LONGEST) (RU - 1)) - 1;
+ *R = (-(LONGEST) (RU - 1)) - 1;
k += 1;
}
else if (R != NULL)
*R = (LONGEST) RU;
- /* NOTE on the above: Technically, C does not say what the results of
+ /* NOTE on the above: Technically, C does not say what the results of
- (LONGEST) RU or (LONGEST) -RU are for RU == largest positive
number representable as a LONGEST (although either would probably work
in most implementations). When RU>0, the locution in the then branch
- above is always equivalent to the negative of RU. */
+ above is always equivalent to the negative of RU. */
if (new_k != NULL)
*new_k = k;
return 1;
}
-/* Assuming that TYPE is a variant part wrapper type (a VARIANTS field),
- and FIELD_NUM is a valid field number within it, returns 1 iff VAL is
- in the range encoded by field FIELD_NUM of TYPE; otherwise 0. */
+/* Assuming that TYPE is a variant part wrapper type (a VARIANTS field),
+ and FIELD_NUM is a valid field number within it, returns 1 iff VAL is
+ in the range encoded by field FIELD_NUM of TYPE; otherwise 0. */
int
ada_in_variant (LONGEST val, struct type *type, int field_num)
@@ -5365,53 +6911,53 @@ ada_in_variant (LONGEST val, struct type *type, int field_num)
while (1)
{
switch (name[p])
- {
- case '\0':
- return 0;
- case 'S':
- {
- LONGEST W;
- if (!ada_scan_number (name, p + 1, &W, &p))
- return 0;
- if (val == W)
- return 1;
- break;
- }
- case 'R':
- {
- LONGEST L, U;
- if (!ada_scan_number (name, p + 1, &L, &p)
- || name[p] != 'T' || !ada_scan_number (name, p + 1, &U, &p))
- return 0;
- if (val >= L && val <= U)
- return 1;
- break;
- }
- case 'O':
- return 1;
- default:
- return 0;
- }
- }
-}
-
-/* Given a value ARG1 (offset by OFFSET bytes)
- of a struct or union type ARG_TYPE,
- extract and return the value of one of its (non-static) fields.
- FIELDNO says which field. Differs from value_primitive_field only
- in that it can handle packed values of arbitrary type. */
+ {
+ case '\0':
+ return 0;
+ case 'S':
+ {
+ LONGEST W;
+ if (!ada_scan_number (name, p + 1, &W, &p))
+ return 0;
+ if (val == W)
+ return 1;
+ break;
+ }
+ case 'R':
+ {
+ LONGEST L, U;
+ if (!ada_scan_number (name, p + 1, &L, &p)
+ || name[p] != 'T' || !ada_scan_number (name, p + 1, &U, &p))
+ return 0;
+ if (val >= L && val <= U)
+ return 1;
+ break;
+ }
+ case 'O':
+ return 1;
+ default:
+ return 0;
+ }
+ }
+}
+
+/* FIXME: Lots of redundancy below. Try to consolidate. */
+
+/* Given a value ARG1 (offset by OFFSET bytes) of a struct or union type
+ ARG_TYPE, extract and return the value of one of its (non-static)
+ fields. FIELDNO says which field. Differs from value_primitive_field
+ only in that it can handle packed values of arbitrary type. */
-struct value *
+static struct value *
ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
- struct type *arg_type)
+ struct type *arg_type)
{
- struct value *v;
struct type *type;
CHECK_TYPEDEF (arg_type);
type = TYPE_FIELD_TYPE (arg_type, fieldno);
- /* Handle packed fields */
+ /* Handle packed fields. */
if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0)
{
@@ -5419,23 +6965,86 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
return ada_value_primitive_packed_val (arg1, VALUE_CONTENTS (arg1),
- offset + bit_pos / 8,
- bit_pos % 8, bit_size, type);
+ offset + bit_pos / 8,
+ bit_pos % 8, bit_size, type);
}
else
return value_primitive_field (arg1, offset, fieldno, arg_type);
}
+/* Find field with name NAME in object of type TYPE. If found, return 1
+ after setting *FIELD_TYPE_P to the field's type, *BYTE_OFFSET_P to
+ OFFSET + the byte offset of the field within an object of that type,
+ *BIT_OFFSET_P to the bit offset modulo byte size of the field, and
+ *BIT_SIZE_P to its size in bits if the field is packed, and 0 otherwise.
+ Looks inside wrappers for the field. Returns 0 if field not
+ found. */
+static int
+find_struct_field (char *name, struct type *type, int offset,
+ struct type **field_type_p,
+ int *byte_offset_p, int *bit_offset_p, int *bit_size_p)
+{
+ int i;
+
+ CHECK_TYPEDEF (type);
+ *field_type_p = NULL;
+ *byte_offset_p = *bit_offset_p = *bit_size_p = 0;
+
+ for (i = TYPE_NFIELDS (type) - 1; i >= 0; i -= 1)
+ {
+ int bit_pos = TYPE_FIELD_BITPOS (type, i);
+ int fld_offset = offset + bit_pos / 8;
+ char *t_field_name = TYPE_FIELD_NAME (type, i);
+
+ if (t_field_name == NULL)
+ continue;
-/* Look for a field NAME in ARG. Adjust the address of ARG by OFFSET bytes,
+ else if (field_name_match (t_field_name, name))
+ {
+ int bit_size = TYPE_FIELD_BITSIZE (type, i);
+ *field_type_p = TYPE_FIELD_TYPE (type, i);
+ *byte_offset_p = fld_offset;
+ *bit_offset_p = bit_pos % 8;
+ *bit_size_p = bit_size;
+ return 1;
+ }
+ else if (ada_is_wrapper_field (type, i))
+ {
+ if (find_struct_field (name, TYPE_FIELD_TYPE (type, i), fld_offset,
+ field_type_p, byte_offset_p, bit_offset_p,
+ bit_size_p))
+ return 1;
+ }
+ else if (ada_is_variant_part (type, i))
+ {
+ int j;
+ struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
+
+ for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
+ {
+ if (find_struct_field (name, TYPE_FIELD_TYPE (field_type, j),
+ fld_offset
+ + TYPE_FIELD_BITPOS (field_type, j) / 8,
+ field_type_p, byte_offset_p,
+ bit_offset_p, bit_size_p))
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+
+
+/* Look for a field NAME in ARG. Adjust the address of ARG by OFFSET bytes,
and search in it assuming it has (class) type TYPE.
If found, return value, else return NULL.
- Searches recursively through wrapper fields (e.g., '_parent'). */
+ Searches recursively through wrapper fields (e.g., '_parent'). */
-struct value *
+static struct value *
ada_search_struct_field (char *name, struct value *arg, int offset,
- struct type *type)
+ struct type *type)
{
int i;
CHECK_TYPEDEF (type);
@@ -5445,128 +7054,203 @@ ada_search_struct_field (char *name, struct value *arg, int offset,
char *t_field_name = TYPE_FIELD_NAME (type, i);
if (t_field_name == NULL)
- continue;
+ continue;
else if (field_name_match (t_field_name, name))
- return ada_value_primitive_field (arg, offset, i, type);
+ return ada_value_primitive_field (arg, offset, i, type);
else if (ada_is_wrapper_field (type, i))
- {
- struct value *v = ada_search_struct_field (name, arg,
- offset +
- TYPE_FIELD_BITPOS (type,
- i) /
- 8,
- TYPE_FIELD_TYPE (type,
- i));
- if (v != NULL)
- return v;
- }
+ {
+ struct value *v = /* Do not let indent join lines here. */
+ ada_search_struct_field (name, arg,
+ offset + TYPE_FIELD_BITPOS (type, i) / 8,
+ TYPE_FIELD_TYPE (type, i));
+ if (v != NULL)
+ return v;
+ }
else if (ada_is_variant_part (type, i))
- {
- int j;
- struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
- int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
-
- for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
- {
- struct value *v = ada_search_struct_field (name, arg,
- var_offset
- +
- TYPE_FIELD_BITPOS
- (field_type, j) / 8,
- TYPE_FIELD_TYPE
- (field_type, j));
- if (v != NULL)
- return v;
- }
- }
+ {
+ int j;
+ struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
+ int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
+
+ for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
+ {
+ struct value *v = ada_search_struct_field /* Force line break. */
+ (name, arg,
+ var_offset + TYPE_FIELD_BITPOS (field_type, j) / 8,
+ TYPE_FIELD_TYPE (field_type, j));
+ if (v != NULL)
+ return v;
+ }
+ }
}
return NULL;
}
-/* Given ARG, a value of type (pointer to a)* structure/union,
- extract the component named NAME from the ultimate target structure/union
- and return it as a value with its appropriate type.
+/* Given ARG, a value of type (pointer or reference to a)*
+ structure/union, extract the component named NAME from the ultimate
+ target structure/union and return it as a value with its
+ appropriate type. If ARG is a pointer or reference and the field
+ is not packed, returns a reference to the field, otherwise the
+ value of the field (an lvalue if ARG is an lvalue).
- The routine searches for NAME among all members of the structure itself
- and (recursively) among all members of any wrapper members
+ The routine searches for NAME among all members of the structure itself
+ and (recursively) among all members of any wrapper members
(e.g., '_parent').
- ERR is a name (for use in error messages) that identifies the class
- of entity that ARG is supposed to be. */
+ ERR is a name (for use in error messages) that identifies the class
+ of entity that ARG is supposed to be. ERR may be null, indicating
+ that on error, the function simply returns NULL, and does not
+ throw an error. (FIXME: True only if ARG is a pointer or reference
+ at the moment). */
struct value *
ada_value_struct_elt (struct value *arg, char *name, char *err)
{
- struct type *t;
+ struct type *t, *t1;
struct value *v;
- arg = ada_coerce_ref (arg);
- t = check_typedef (VALUE_TYPE (arg));
-
- /* Follow pointers until we get to a non-pointer. */
+ v = NULL;
+ t1 = t = check_typedef (VALUE_TYPE (arg));
+ if (TYPE_CODE (t) == TYPE_CODE_REF)
+ {
+ t1 = TYPE_TARGET_TYPE (t);
+ if (t1 == NULL)
+ {
+ if (err == NULL)
+ return NULL;
+ else
+ error ("Bad value type in a %s.", err);
+ }
+ CHECK_TYPEDEF (t1);
+ if (TYPE_CODE (t1) == TYPE_CODE_PTR)
+ {
+ COERCE_REF (arg);
+ t = t1;
+ }
+ }
+
+ while (TYPE_CODE (t) == TYPE_CODE_PTR)
+ {
+ t1 = TYPE_TARGET_TYPE (t);
+ if (t1 == NULL)
+ {
+ if (err == NULL)
+ return NULL;
+ else
+ error ("Bad value type in a %s.", err);
+ }
+ CHECK_TYPEDEF (t1);
+ if (TYPE_CODE (t1) == TYPE_CODE_PTR)
+ {
+ arg = value_ind (arg);
+ t = t1;
+ }
+ else
+ break;
+ }
- while (TYPE_CODE (t) == TYPE_CODE_PTR || TYPE_CODE (t) == TYPE_CODE_REF)
+ if (TYPE_CODE (t1) != TYPE_CODE_STRUCT && TYPE_CODE (t1) != TYPE_CODE_UNION)
{
- arg = ada_value_ind (arg);
- t = check_typedef (VALUE_TYPE (arg));
+ if (err == NULL)
+ return NULL;
+ else
+ error ("Attempt to extract a component of a value that is not a %s.",
+ err);
}
- if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION)
- error ("Attempt to extract a component of a value that is not a %s.",
- err);
+ if (t1 == t)
+ v = ada_search_struct_field (name, arg, 0, t);
+ else
+ {
+ int bit_offset, bit_size, byte_offset;
+ struct type *field_type;
+ CORE_ADDR address;
- v = ada_search_struct_field (name, arg, 0, t);
- if (v == NULL)
+ if (TYPE_CODE (t) == TYPE_CODE_PTR)
+ address = value_as_address (arg);
+ else
+ address = unpack_pointer (t, VALUE_CONTENTS (arg));
+
+ t1 = ada_to_fixed_type (ada_get_base_type (t1), NULL, address, NULL);
+ if (find_struct_field (name, t1, 0,
+ &field_type, &byte_offset, &bit_offset,
+ &bit_size))
+ {
+ if (bit_size != 0)
+ {
+ arg = ada_value_ind (arg);
+ v = ada_value_primitive_packed_val (arg, NULL, byte_offset,
+ bit_offset, bit_size,
+ field_type);
+ }
+ else
+ v = value_from_pointer (lookup_reference_type (field_type),
+ address + byte_offset);
+ }
+ }
+
+ if (v == NULL && err != NULL)
error ("There is no member named %s.", name);
return v;
}
/* Given a type TYPE, look up the type of the component of type named NAME.
- If DISPP is non-null, add its byte displacement from the beginning of a
- structure (pointed to by a value) of type TYPE to *DISPP (does not
+ If DISPP is non-null, add its byte displacement from the beginning of a
+ structure (pointed to by a value) of type TYPE to *DISPP (does not
work for packed fields).
Matches any field whose name has NAME as a prefix, possibly
- followed by "___".
+ followed by "___".
- TYPE can be either a struct or union, or a pointer or reference to
- a struct or union. If it is a pointer or reference, its target
- type is automatically used.
+ TYPE can be either a struct or union. If REFOK, TYPE may also
+ be a (pointer or reference)+ to a struct or union, and the
+ ultimate target type will be searched.
Looks recursively into variant clauses and parent types.
- If NOERR is nonzero, return NULL if NAME is not suitably defined. */
+ If NOERR is nonzero, return NULL if NAME is not suitably defined or
+ TYPE is not a type of the right kind. */
-struct type *
-ada_lookup_struct_elt_type (struct type *type, char *name, int noerr,
- int *dispp)
+static struct type *
+ada_lookup_struct_elt_type (struct type *type, char *name, int refok,
+ int noerr, int *dispp)
{
int i;
if (name == NULL)
goto BadName;
- while (1)
- {
- CHECK_TYPEDEF (type);
- if (TYPE_CODE (type) != TYPE_CODE_PTR
- && TYPE_CODE (type) != TYPE_CODE_REF)
- break;
- type = TYPE_TARGET_TYPE (type);
- }
+ if (refok && type != NULL)
+ while (1)
+ {
+ CHECK_TYPEDEF (type);
+ if (TYPE_CODE (type) != TYPE_CODE_PTR
+ && TYPE_CODE (type) != TYPE_CODE_REF)
+ break;
+ type = TYPE_TARGET_TYPE (type);
+ }
- if (TYPE_CODE (type) != TYPE_CODE_STRUCT &&
- TYPE_CODE (type) != TYPE_CODE_UNION)
+ if (type == NULL
+ || (TYPE_CODE (type) != TYPE_CODE_STRUCT
+ && TYPE_CODE (type) != TYPE_CODE_UNION))
{
- target_terminal_ours ();
- gdb_flush (gdb_stdout);
- fprintf_unfiltered (gdb_stderr, "Type ");
- type_print (type, "", gdb_stderr, -1);
- error (" is not a structure or union type");
+ if (noerr)
+ return NULL;
+ else
+ {
+ target_terminal_ours ();
+ gdb_flush (gdb_stdout);
+ fprintf_unfiltered (gdb_stderr, "Type ");
+ if (type == NULL)
+ fprintf_unfiltered (gdb_stderr, "(null)");
+ else
+ type_print (type, "", gdb_stderr, -1);
+ error (" is not a structure or union type");
+ }
}
type = to_static_fixed_type (type);
@@ -5578,46 +7262,46 @@ ada_lookup_struct_elt_type (struct type *type, char *name, int noerr,
int disp;
if (t_field_name == NULL)
- continue;
+ continue;
else if (field_name_match (t_field_name, name))
- {
- if (dispp != NULL)
- *dispp += TYPE_FIELD_BITPOS (type, i) / 8;
- return check_typedef (TYPE_FIELD_TYPE (type, i));
- }
+ {
+ if (dispp != NULL)
+ *dispp += TYPE_FIELD_BITPOS (type, i) / 8;
+ return check_typedef (TYPE_FIELD_TYPE (type, i));
+ }
else if (ada_is_wrapper_field (type, i))
- {
- disp = 0;
- t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (type, i), name,
- 1, &disp);
- if (t != NULL)
- {
- if (dispp != NULL)
- *dispp += disp + TYPE_FIELD_BITPOS (type, i) / 8;
- return t;
- }
- }
+ {
+ disp = 0;
+ t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (type, i), name,
+ 0, 1, &disp);
+ if (t != NULL)
+ {
+ if (dispp != NULL)
+ *dispp += disp + TYPE_FIELD_BITPOS (type, i) / 8;
+ return t;
+ }
+ }
else if (ada_is_variant_part (type, i))
- {
- int j;
- struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
-
- for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
- {
- disp = 0;
- t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (field_type, j),
- name, 1, &disp);
- if (t != NULL)
- {
- if (dispp != NULL)
- *dispp += disp + TYPE_FIELD_BITPOS (type, i) / 8;
- return t;
- }
- }
- }
+ {
+ int j;
+ struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
+
+ for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
+ {
+ disp = 0;
+ t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (field_type, j),
+ name, 0, 1, &disp);
+ if (t != NULL)
+ {
+ if (dispp != NULL)
+ *dispp += disp + TYPE_FIELD_BITPOS (type, i) / 8;
+ return t;
+ }
+ }
+ }
}
@@ -5637,12 +7321,12 @@ BadName:
/* Assuming that VAR_TYPE is the type of a variant part of a record (a union),
within a value of type OUTER_TYPE that is stored in GDB at
- OUTER_VALADDR, determine which variant clause (field number in VAR_TYPE,
- numbering from 0) is applicable. Returns -1 if none are. */
+ OUTER_VALADDR, determine which variant clause (field number in VAR_TYPE,
+ numbering from 0) is applicable. Returns -1 if none are. */
int
ada_which_variant_applies (struct type *var_type, struct type *outer_type,
- char *outer_valaddr)
+ char *outer_valaddr)
{
int others_clause;
int i;
@@ -5653,7 +7337,7 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
disp = 0;
discrim_type =
- ada_lookup_struct_elt_type (outer_type, discrim_name, 1, &disp);
+ ada_lookup_struct_elt_type (outer_type, discrim_name, 1, 1, &disp);
if (discrim_type == NULL)
return -1;
discrim_val = unpack_long (discrim_type, outer_valaddr + disp);
@@ -5662,9 +7346,9 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
for (i = 0; i < TYPE_NFIELDS (var_type); i += 1)
{
if (ada_is_others_clause (var_type, i))
- others_clause = i;
+ others_clause = i;
else if (ada_in_variant (discrim_val, var_type, i))
- return i;
+ return i;
}
return others_clause;
@@ -5672,13 +7356,13 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
- /* Dynamic-Sized Records */
+ /* Dynamic-Sized Records */
/* Strategy: The type ostensibly attached to a value with dynamic size
(i.e., a size that is not statically recorded in the debugging
data) does not accurately reflect the size or layout of the value.
Our strategy is to convert these values to values with accurate,
- conventional types that are constructed on the fly. */
+ conventional types that are constructed on the fly. */
/* There is a subtle and tricky problem here. In general, we cannot
determine the size of dynamic records without its data. However,
@@ -5687,7 +7371,7 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
of the type at the time of its allocation in order to reserve space
for GDB's internal copy of the data. That's why the
'to_fixed_xxx_type' routines take (target) addresses as parameters,
- rather than struct value*s.
+ rather than struct value*s.
However, GDB's internal history variables ($1, $2, etc.) are
struct value*s containing internal copies of the data that are not, in
@@ -5705,22 +7389,22 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
address, target address) triple as arguments to represent a value.
The host address, if non-null, is supposed to contain an internal
copy of the relevant data; otherwise, the program is to consult the
- target at the target address. */
+ target at the target address. */
/* Assuming that VAL0 represents a pointer value, the result of
dereferencing it. Differs from value_ind in its treatment of
- dynamic-sized types. */
+ dynamic-sized types. */
struct value *
ada_value_ind (struct value *val0)
{
struct value *val = unwrap_value (value_ind (val0));
- return ada_to_fixed_value (VALUE_TYPE (val), 0,
- VALUE_ADDRESS (val) + VALUE_OFFSET (val), val);
+ return ada_to_fixed_value (val);
}
/* The value resulting from dereferencing any "reference to"
- * qualifiers on VAL0. */
+ qualifiers on VAL0. */
+
static struct value *
ada_coerce_ref (struct value *val0)
{
@@ -5729,16 +7413,14 @@ ada_coerce_ref (struct value *val0)
struct value *val = val0;
COERCE_REF (val);
val = unwrap_value (val);
- return ada_to_fixed_value (VALUE_TYPE (val), 0,
- VALUE_ADDRESS (val) + VALUE_OFFSET (val),
- val);
+ return ada_to_fixed_value (val);
}
else
return val0;
}
/* Return OFF rounded upward if necessary to a multiple of
- ALIGNMENT (a power of 2). */
+ ALIGNMENT (a power of 2). */
static unsigned int
align_value (unsigned int off, unsigned int alignment)
@@ -5746,22 +7428,7 @@ align_value (unsigned int off, unsigned int alignment)
return (off + alignment - 1) & ~(alignment - 1);
}
-/* Return the additional bit offset required by field F of template
- type TYPE. */
-
-static unsigned int
-field_offset (struct type *type, int f)
-{
- int n = TYPE_FIELD_BITPOS (type, f);
- /* Kludge (temporary?) to fix problem with dwarf output. */
- if (n < 0)
- return (unsigned int) n & 0xffff;
- else
- return n;
-}
-
-
-/* Return the bit alignment required for field #F of template type TYPE. */
+/* Return the bit alignment required for field #F of template type TYPE. */
static unsigned int
field_alignment (struct type *type, int f)
@@ -5770,41 +7437,96 @@ field_alignment (struct type *type, int f)
int len = (name == NULL) ? 0 : strlen (name);
int align_offset;
- if (len < 8 || !isdigit (name[len - 1]))
- return TARGET_CHAR_BIT;
+ if (!isdigit (name[len - 1]))
+ return 1;
if (isdigit (name[len - 2]))
align_offset = len - 2;
else
align_offset = len - 1;
- if (align_offset < 7 || !DEPRECATED_STREQN ("___XV", name + align_offset - 6, 5))
+ if (align_offset < 7 || strncmp ("___XV", name + align_offset - 6, 5) != 0)
return TARGET_CHAR_BIT;
return atoi (name + align_offset) * TARGET_CHAR_BIT;
}
-/* Find a type named NAME. Ignores ambiguity. */
-struct type *
-ada_find_any_type (const char *name)
+/* Find a symbol named NAME. Ignores ambiguity. */
+
+struct symbol *
+ada_find_any_symbol (const char *name)
{
struct symbol *sym;
- sym = standard_lookup (name, VAR_DOMAIN);
+ sym = standard_lookup (name, get_selected_block (NULL), VAR_DOMAIN);
if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- return SYMBOL_TYPE (sym);
+ return sym;
+
+ sym = standard_lookup (name, NULL, STRUCT_DOMAIN);
+ return sym;
+}
+
+/* Find a type named NAME. Ignores ambiguity. */
+
+struct type *
+ada_find_any_type (const char *name)
+{
+ struct symbol *sym = ada_find_any_symbol (name);
- sym = standard_lookup (name, STRUCT_DOMAIN);
if (sym != NULL)
return SYMBOL_TYPE (sym);
return NULL;
}
+/* Given a symbol NAME and its associated BLOCK, search all symbols
+ for its ___XR counterpart, which is the ``renaming'' symbol
+ associated to NAME. Return this symbol if found, return
+ NULL otherwise. */
+
+struct symbol *
+ada_find_renaming_symbol (const char *name, struct block *block)
+{
+ const struct symbol *function_sym = block_function (block);
+ char *rename;
+
+ if (function_sym != NULL)
+ {
+ /* If the symbol is defined inside a function, NAME is not fully
+ qualified. This means we need to prepend the function name
+ as well as adding the ``___XR'' suffix to build the name of
+ the associated renaming symbol. */
+ char *function_name = SYMBOL_LINKAGE_NAME (function_sym);
+ const int function_name_len = strlen (function_name);
+ const int rename_len = function_name_len + 2 /* "__" */
+ + strlen (name) + 6 /* "___XR\0" */ ;
+
+ /* Library-level functions are a special case, as GNAT adds
+ a ``_ada_'' prefix to the function name to avoid namespace
+ pollution. However, the renaming symbol themselves do not
+ have this prefix, so we need to skip this prefix if present. */
+ if (function_name_len > 5 /* "_ada_" */
+ && strstr (function_name, "_ada_") == function_name)
+ function_name = function_name + 5;
+
+ rename = (char *) alloca (rename_len * sizeof (char));
+ sprintf (rename, "%s__%s___XR", function_name, name);
+ }
+ else
+ {
+ const int rename_len = strlen (name) + 6;
+ rename = (char *) alloca (rename_len * sizeof (char));
+ sprintf (rename, "%s___XR", name);
+ }
+
+ return ada_find_any_symbol (rename);
+}
+
/* Because of GNAT encoding conventions, several GDB symbols may match a
- given type name. If the type denoted by TYPE0 is to be preferred to
+ given type name. If the type denoted by TYPE0 is to be preferred to
that of TYPE1 for purposes of type printing, return non-zero;
- otherwise return 0. */
+ otherwise return 0. */
+
int
ada_prefer_type (struct type *type0, struct type *type1)
{
@@ -5816,19 +7538,22 @@ ada_prefer_type (struct type *type0, struct type *type1)
return 1;
else if (TYPE_CODE (type0) == TYPE_CODE_VOID)
return 0;
+ else if (TYPE_NAME (type1) == NULL && TYPE_NAME (type0) != NULL)
+ return 1;
else if (ada_is_packed_array_type (type0))
return 1;
- else if (ada_is_array_descriptor (type0)
- && !ada_is_array_descriptor (type1))
+ else if (ada_is_array_descriptor_type (type0)
+ && !ada_is_array_descriptor_type (type1))
return 1;
else if (ada_renaming_type (type0) != NULL
- && ada_renaming_type (type1) == NULL)
+ && ada_renaming_type (type1) == NULL)
return 1;
return 0;
}
/* The name of TYPE, which is either its TYPE_NAME, or, if that is
- null, its TYPE_TAG_NAME. Null if TYPE is null. */
+ null, its TYPE_TAG_NAME. Null if TYPE is null. */
+
char *
ada_type_name (struct type *type)
{
@@ -5841,16 +7566,13 @@ ada_type_name (struct type *type)
}
/* Find a parallel type to TYPE whose name is formed by appending
- SUFFIX to the name of TYPE. */
+ SUFFIX to the name of TYPE. */
struct type *
ada_find_parallel_type (struct type *type, const char *suffix)
{
static char *name;
static size_t name_len = 0;
- struct symbol **syms;
- struct block **blocks;
- int nsyms;
int len;
char *typename = ada_type_name (type);
@@ -5869,7 +7591,7 @@ ada_find_parallel_type (struct type *type, const char *suffix)
/* If TYPE is a variable-size record type, return the corresponding template
- type describing its fields. Otherwise, return NULL. */
+ type describing its fields. Otherwise, return NULL. */
static struct type *
dynamic_template_type (struct type *type)
@@ -5882,15 +7604,15 @@ dynamic_template_type (struct type *type)
else
{
int len = strlen (ada_type_name (type));
- if (len > 6 && DEPRECATED_STREQ (ada_type_name (type) + len - 6, "___XVE"))
- return type;
+ if (len > 6 && strcmp (ada_type_name (type) + len - 6, "___XVE") == 0)
+ return type;
else
- return ada_find_parallel_type (type, "___XVE");
+ return ada_find_parallel_type (type, "___XVE");
}
}
/* Assuming that TEMPL_TYPE is a union or struct type, returns
- non-zero iff field FIELD_NUM of TEMPL_TYPE has dynamic size. */
+ non-zero iff field FIELD_NUM of TEMPL_TYPE has dynamic size. */
static int
is_dynamic_field (struct type *templ_type, int field_num)
@@ -5901,21 +7623,27 @@ is_dynamic_field (struct type *templ_type, int field_num)
&& strstr (name, "___XVL") != NULL;
}
-/* Assuming that TYPE is a struct type, returns non-zero iff TYPE
- contains a variant part. */
+/* The index of the variant field of TYPE, or -1 if TYPE does not
+ represent a variant record type. */
static int
-contains_variant_part (struct type *type)
+variant_field_index (struct type *type)
{
int f;
- if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT
- || TYPE_NFIELDS (type) <= 0)
- return 0;
- return ada_is_variant_part (type, TYPE_NFIELDS (type) - 1);
+ if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT)
+ return -1;
+
+ for (f = 0; f < TYPE_NFIELDS (type); f += 1)
+ {
+ if (ada_is_variant_part (type, f))
+ return f;
+ }
+ return -1;
}
-/* A record type with no fields, . */
+/* A record type with no fields. */
+
static struct type *
empty_record (struct objfile *objfile)
{
@@ -5931,29 +7659,50 @@ empty_record (struct objfile *objfile)
}
/* An ordinary record type (with fixed-length fields) that describes
- the value of type TYPE at VALADDR or ADDRESS (see comments at
- the beginning of this section) VAL according to GNAT conventions.
- DVAL0 should describe the (portion of a) record that contains any
+ the value of type TYPE at VALADDR or ADDRESS (see comments at
+ the beginning of this section) VAL according to GNAT conventions.
+ DVAL0 should describe the (portion of a) record that contains any
necessary discriminants. It should be NULL if VALUE_TYPE (VAL) is
an outer-level type (i.e., as opposed to a branch of a variant.) A
variant field (unless unchecked) is replaced by a particular branch
- of the variant. */
-/* NOTE: Limitations: For now, we assume that dynamic fields and
- * variants occupy whole numbers of bytes. However, they need not be
- * byte-aligned. */
+ of the variant.
-static struct type *
-template_to_fixed_record_type (struct type *type, char *valaddr,
- CORE_ADDR address, struct value *dval0)
+ If not KEEP_DYNAMIC_FIELDS, then all fields whose position or
+ length are not statically known are discarded. As a consequence,
+ VALADDR, ADDRESS and DVAL0 are ignored.
+
+ NOTE: Limitations: For now, we assume that dynamic fields and
+ variants occupy whole numbers of bytes. However, they need not be
+ byte-aligned. */
+
+struct type *
+ada_template_to_fixed_record_type_1 (struct type *type, char *valaddr,
+ CORE_ADDR address, struct value *dval0,
+ int keep_dynamic_fields)
{
struct value *mark = value_mark ();
struct value *dval;
struct type *rtype;
int nfields, bit_len;
+ int variant_field;
long off;
+ int fld_bit_len, bit_incr;
int f;
- nfields = TYPE_NFIELDS (type);
+ /* Compute the number of fields in this record type that are going
+ to be processed: unless keep_dynamic_fields, this includes only
+ fields whose position and length are static will be processed. */
+ if (keep_dynamic_fields)
+ nfields = TYPE_NFIELDS (type);
+ else
+ {
+ nfields = 0;
+ while (nfields < TYPE_NFIELDS (type)
+ && !ada_is_variant_part (type, nfields)
+ && !is_dynamic_field (type, nfields))
+ nfields++;
+ }
+
rtype = alloc_type (TYPE_OBJFILE (type));
TYPE_CODE (rtype) = TYPE_CODE_STRUCT;
INIT_CPLUS_SPECIFIC (rtype);
@@ -5963,83 +7712,100 @@ template_to_fixed_record_type (struct type *type, char *valaddr,
memset (TYPE_FIELDS (rtype), 0, sizeof (struct field) * nfields);
TYPE_NAME (rtype) = ada_type_name (type);
TYPE_TAG_NAME (rtype) = NULL;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in
- gdbtypes.h */
- /* TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE; */
+ TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE;
off = 0;
bit_len = 0;
+ variant_field = -1;
+
for (f = 0; f < nfields; f += 1)
{
- int fld_bit_len, bit_incr;
off =
- align_value (off,
- field_alignment (type, f)) + TYPE_FIELD_BITPOS (type, f);
- /* NOTE: used to use field_offset above, but that causes
- * problems with really negative bit positions. So, let's
- * rediscover why we needed field_offset and fix it properly. */
+ align_value (off,
+ field_alignment (type, f)) + TYPE_FIELD_BITPOS (type, f);
TYPE_FIELD_BITPOS (rtype, f) = off;
TYPE_FIELD_BITSIZE (rtype, f) = 0;
- TYPE_FIELD_STATIC_KIND (rtype, f) = 0;
if (ada_is_variant_part (type, f))
- {
- struct type *branch_type;
-
- if (dval0 == NULL)
- dval = value_from_contents_and_address (rtype, valaddr, address);
- else
- dval = dval0;
-
- branch_type =
- to_fixed_variant_branch_type
- (TYPE_FIELD_TYPE (type, f),
- cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
- cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
- if (branch_type == NULL)
- TYPE_NFIELDS (rtype) -= 1;
- else
- {
- TYPE_FIELD_TYPE (rtype, f) = branch_type;
- TYPE_FIELD_NAME (rtype, f) = "S";
- }
- bit_incr = 0;
- fld_bit_len =
- TYPE_LENGTH (TYPE_FIELD_TYPE (rtype, f)) * TARGET_CHAR_BIT;
- }
+ {
+ variant_field = f;
+ fld_bit_len = bit_incr = 0;
+ }
else if (is_dynamic_field (type, f))
- {
- if (dval0 == NULL)
- dval = value_from_contents_and_address (rtype, valaddr, address);
- else
- dval = dval0;
-
- TYPE_FIELD_TYPE (rtype, f) =
- ada_to_fixed_type
- (ada_get_base_type
- (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, f))),
- cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
- cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
- TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
- bit_incr = fld_bit_len =
- TYPE_LENGTH (TYPE_FIELD_TYPE (rtype, f)) * TARGET_CHAR_BIT;
- }
+ {
+ if (dval0 == NULL)
+ dval = value_from_contents_and_address (rtype, valaddr, address);
+ else
+ dval = dval0;
+
+ TYPE_FIELD_TYPE (rtype, f) =
+ ada_to_fixed_type
+ (ada_get_base_type
+ (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, f))),
+ cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
+ cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
+ TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
+ bit_incr = fld_bit_len =
+ TYPE_LENGTH (TYPE_FIELD_TYPE (rtype, f)) * TARGET_CHAR_BIT;
+ }
else
- {
- TYPE_FIELD_TYPE (rtype, f) = TYPE_FIELD_TYPE (type, f);
- TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
- if (TYPE_FIELD_BITSIZE (type, f) > 0)
- bit_incr = fld_bit_len =
- TYPE_FIELD_BITSIZE (rtype, f) = TYPE_FIELD_BITSIZE (type, f);
- else
- bit_incr = fld_bit_len =
- TYPE_LENGTH (TYPE_FIELD_TYPE (type, f)) * TARGET_CHAR_BIT;
- }
+ {
+ TYPE_FIELD_TYPE (rtype, f) = TYPE_FIELD_TYPE (type, f);
+ TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
+ if (TYPE_FIELD_BITSIZE (type, f) > 0)
+ bit_incr = fld_bit_len =
+ TYPE_FIELD_BITSIZE (rtype, f) = TYPE_FIELD_BITSIZE (type, f);
+ else
+ bit_incr = fld_bit_len =
+ TYPE_LENGTH (TYPE_FIELD_TYPE (type, f)) * TARGET_CHAR_BIT;
+ }
if (off + fld_bit_len > bit_len)
- bit_len = off + fld_bit_len;
+ bit_len = off + fld_bit_len;
off += bit_incr;
- TYPE_LENGTH (rtype) = bit_len / TARGET_CHAR_BIT;
+ TYPE_LENGTH (rtype) =
+ align_value (bit_len, TARGET_CHAR_BIT) / TARGET_CHAR_BIT;
}
+
+ /* We handle the variant part, if any, at the end because of certain
+ odd cases in which it is re-ordered so as NOT the last field of
+ the record. This can happen in the presence of representation
+ clauses. */
+ if (variant_field >= 0)
+ {
+ struct type *branch_type;
+
+ off = TYPE_FIELD_BITPOS (rtype, variant_field);
+
+ if (dval0 == NULL)
+ dval = value_from_contents_and_address (rtype, valaddr, address);
+ else
+ dval = dval0;
+
+ branch_type =
+ to_fixed_variant_branch_type
+ (TYPE_FIELD_TYPE (type, variant_field),
+ cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
+ cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
+ if (branch_type == NULL)
+ {
+ for (f = variant_field + 1; f < TYPE_NFIELDS (rtype); f += 1)
+ TYPE_FIELDS (rtype)[f - 1] = TYPE_FIELDS (rtype)[f];
+ TYPE_NFIELDS (rtype) -= 1;
+ }
+ else
+ {
+ TYPE_FIELD_TYPE (rtype, variant_field) = branch_type;
+ TYPE_FIELD_NAME (rtype, variant_field) = "S";
+ fld_bit_len =
+ TYPE_LENGTH (TYPE_FIELD_TYPE (rtype, variant_field)) *
+ TARGET_CHAR_BIT;
+ if (off + fld_bit_len > bit_len)
+ bit_len = off + fld_bit_len;
+ TYPE_LENGTH (rtype) =
+ align_value (bit_len, TARGET_CHAR_BIT) / TARGET_CHAR_BIT;
+ }
+ }
+
TYPE_LENGTH (rtype) = align_value (TYPE_LENGTH (rtype), TYPE_LENGTH (type));
value_free_to_mark (mark);
@@ -6048,148 +7814,177 @@ template_to_fixed_record_type (struct type *type, char *valaddr,
return rtype;
}
-/* As for template_to_fixed_record_type, but uses no run-time values.
- As a result, this type can only be approximate, but that's OK,
- since it is used only for type determinations. Works on both
- structs and unions.
- Representation note: to save space, we memoize the result of this
- function in the TYPE_TARGET_TYPE of the template type. */
+/* As for ada_template_to_fixed_record_type_1 with KEEP_DYNAMIC_FIELDS
+ of 1. */
+
+static struct type *
+template_to_fixed_record_type (struct type *type, char *valaddr,
+ CORE_ADDR address, struct value *dval0)
+{
+ return ada_template_to_fixed_record_type_1 (type, valaddr,
+ address, dval0, 1);
+}
+
+/* An ordinary record type in which ___XVL-convention fields and
+ ___XVU- and ___XVN-convention field types in TYPE0 are replaced with
+ static approximations, containing all possible fields. Uses
+ no runtime values. Useless for use in values, but that's OK,
+ since the results are used only for type determinations. Works on both
+ structs and unions. Representation note: to save space, we memorize
+ the result of this function in the TYPE_TARGET_TYPE of the
+ template type. */
static struct type *
-template_to_static_fixed_type (struct type *templ_type)
+template_to_static_fixed_type (struct type *type0)
{
struct type *type;
int nfields;
int f;
- if (TYPE_TARGET_TYPE (templ_type) != NULL)
- return TYPE_TARGET_TYPE (templ_type);
-
- nfields = TYPE_NFIELDS (templ_type);
- TYPE_TARGET_TYPE (templ_type) = type =
- alloc_type (TYPE_OBJFILE (templ_type));
- TYPE_CODE (type) = TYPE_CODE (templ_type);
- INIT_CPLUS_SPECIFIC (type);
- TYPE_NFIELDS (type) = nfields;
- TYPE_FIELDS (type) = (struct field *)
- TYPE_ALLOC (type, nfields * sizeof (struct field));
- memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields);
- TYPE_NAME (type) = ada_type_name (templ_type);
- TYPE_TAG_NAME (type) = NULL;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
- /* TYPE_FLAGS (type) |= TYPE_FLAG_FIXED_INSTANCE; */
- TYPE_LENGTH (type) = 0;
+ if (TYPE_TARGET_TYPE (type0) != NULL)
+ return TYPE_TARGET_TYPE (type0);
+
+ nfields = TYPE_NFIELDS (type0);
+ type = type0;
for (f = 0; f < nfields; f += 1)
{
- TYPE_FIELD_BITPOS (type, f) = 0;
- TYPE_FIELD_BITSIZE (type, f) = 0;
- TYPE_FIELD_STATIC_KIND (type, f) = 0;
+ struct type *field_type = CHECK_TYPEDEF (TYPE_FIELD_TYPE (type0, f));
+ struct type *new_type;
- if (is_dynamic_field (templ_type, f))
- {
- TYPE_FIELD_TYPE (type, f) =
- to_static_fixed_type (TYPE_TARGET_TYPE
- (TYPE_FIELD_TYPE (templ_type, f)));
- TYPE_FIELD_NAME (type, f) = TYPE_FIELD_NAME (templ_type, f);
- }
+ if (is_dynamic_field (type0, f))
+ new_type = to_static_fixed_type (TYPE_TARGET_TYPE (field_type));
else
- {
- TYPE_FIELD_TYPE (type, f) =
- check_typedef (TYPE_FIELD_TYPE (templ_type, f));
- TYPE_FIELD_NAME (type, f) = TYPE_FIELD_NAME (templ_type, f);
- }
+ new_type = to_static_fixed_type (field_type);
+ if (type == type0 && new_type != field_type)
+ {
+ TYPE_TARGET_TYPE (type0) = type = alloc_type (TYPE_OBJFILE (type0));
+ TYPE_CODE (type) = TYPE_CODE (type0);
+ INIT_CPLUS_SPECIFIC (type);
+ TYPE_NFIELDS (type) = nfields;
+ TYPE_FIELDS (type) = (struct field *)
+ TYPE_ALLOC (type, nfields * sizeof (struct field));
+ memcpy (TYPE_FIELDS (type), TYPE_FIELDS (type0),
+ sizeof (struct field) * nfields);
+ TYPE_NAME (type) = ada_type_name (type0);
+ TYPE_TAG_NAME (type) = NULL;
+ TYPE_FLAGS (type) |= TYPE_FLAG_FIXED_INSTANCE;
+ TYPE_LENGTH (type) = 0;
+ }
+ TYPE_FIELD_TYPE (type, f) = new_type;
+ TYPE_FIELD_NAME (type, f) = TYPE_FIELD_NAME (type0, f);
}
-
return type;
}
-/* A revision of TYPE0 -- a non-dynamic-sized record with a variant
- part -- in which the variant part is replaced with the appropriate
- branch. */
+/* Given an object of type TYPE whose contents are at VALADDR and
+ whose address in memory is ADDRESS, returns a revision of TYPE --
+ a non-dynamic-sized record with a variant part -- in which
+ the variant part is replaced with the appropriate branch. Looks
+ for discriminant values in DVAL0, which can be NULL if the record
+ contains the necessary discriminant values. */
+
static struct type *
to_record_with_fixed_variant_part (struct type *type, char *valaddr,
- CORE_ADDR address, struct value *dval)
+ CORE_ADDR address, struct value *dval0)
{
struct value *mark = value_mark ();
+ struct value *dval;
struct type *rtype;
struct type *branch_type;
int nfields = TYPE_NFIELDS (type);
+ int variant_field = variant_field_index (type);
- if (dval == NULL)
+ if (variant_field == -1)
return type;
+ if (dval0 == NULL)
+ dval = value_from_contents_and_address (type, valaddr, address);
+ else
+ dval = dval0;
+
rtype = alloc_type (TYPE_OBJFILE (type));
TYPE_CODE (rtype) = TYPE_CODE_STRUCT;
- INIT_CPLUS_SPECIFIC (type);
- TYPE_NFIELDS (rtype) = TYPE_NFIELDS (type);
+ INIT_CPLUS_SPECIFIC (rtype);
+ TYPE_NFIELDS (rtype) = nfields;
TYPE_FIELDS (rtype) =
(struct field *) TYPE_ALLOC (rtype, nfields * sizeof (struct field));
memcpy (TYPE_FIELDS (rtype), TYPE_FIELDS (type),
- sizeof (struct field) * nfields);
+ sizeof (struct field) * nfields);
TYPE_NAME (rtype) = ada_type_name (type);
TYPE_TAG_NAME (rtype) = NULL;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
- /* TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE; */
+ TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE;
TYPE_LENGTH (rtype) = TYPE_LENGTH (type);
- branch_type =
- to_fixed_variant_branch_type
- (TYPE_FIELD_TYPE (type, nfields - 1),
+ branch_type = to_fixed_variant_branch_type
+ (TYPE_FIELD_TYPE (type, variant_field),
cond_offset_host (valaddr,
- TYPE_FIELD_BITPOS (type,
- nfields - 1) / TARGET_CHAR_BIT),
+ TYPE_FIELD_BITPOS (type, variant_field)
+ / TARGET_CHAR_BIT),
cond_offset_target (address,
- TYPE_FIELD_BITPOS (type,
- nfields - 1) / TARGET_CHAR_BIT),
- dval);
+ TYPE_FIELD_BITPOS (type, variant_field)
+ / TARGET_CHAR_BIT), dval);
if (branch_type == NULL)
{
+ int f;
+ for (f = variant_field + 1; f < nfields; f += 1)
+ TYPE_FIELDS (rtype)[f - 1] = TYPE_FIELDS (rtype)[f];
TYPE_NFIELDS (rtype) -= 1;
- TYPE_LENGTH (rtype) -=
- TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
}
else
{
- TYPE_FIELD_TYPE (rtype, nfields - 1) = branch_type;
- TYPE_FIELD_NAME (rtype, nfields - 1) = "S";
- TYPE_FIELD_BITSIZE (rtype, nfields - 1) = 0;
- TYPE_FIELD_STATIC_KIND (rtype, nfields - 1) = 0;
+ TYPE_FIELD_TYPE (rtype, variant_field) = branch_type;
+ TYPE_FIELD_NAME (rtype, variant_field) = "S";
+ TYPE_FIELD_BITSIZE (rtype, variant_field) = 0;
TYPE_LENGTH (rtype) += TYPE_LENGTH (branch_type);
- -TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
}
+ TYPE_LENGTH (rtype) -= TYPE_LENGTH (TYPE_FIELD_TYPE (type, variant_field));
+ value_free_to_mark (mark);
return rtype;
}
/* An ordinary record type (with fixed-length fields) that describes
the value at (TYPE0, VALADDR, ADDRESS) [see explanation at
beginning of this section]. Any necessary discriminants' values
- should be in DVAL, a record value; it should be NULL if the object
- at ADDR itself contains any necessary discriminant values. A
- variant field (unless unchecked) is replaced by a particular branch
- of the variant. */
+ should be in DVAL, a record value; it may be NULL if the object
+ at ADDR itself contains any necessary discriminant values.
+ Additionally, VALADDR and ADDRESS may also be NULL if no discriminant
+ values from the record are needed. Except in the case that DVAL,
+ VALADDR, and ADDRESS are all 0 or NULL, a variant field (unless
+ unchecked) is replaced by a particular branch of the variant.
+
+ NOTE: the case in which DVAL and VALADDR are NULL and ADDRESS is 0
+ is questionable and may be removed. It can arise during the
+ processing of an unconstrained-array-of-record type where all the
+ variant branches have exactly the same size. This is because in
+ such cases, the compiler does not bother to use the XVS convention
+ when encoding the record. I am currently dubious of this
+ shortcut and suspect the compiler should be altered. FIXME. */
static struct type *
-to_fixed_record_type (struct type *type0, char *valaddr, CORE_ADDR address,
- struct value *dval)
+to_fixed_record_type (struct type *type0, char *valaddr,
+ CORE_ADDR address, struct value *dval)
{
struct type *templ_type;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
- /* if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
- return type0;
- */
+ if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
+ return type0;
+
templ_type = dynamic_template_type (type0);
if (templ_type != NULL)
return template_to_fixed_record_type (templ_type, valaddr, address, dval);
- else if (contains_variant_part (type0))
- return to_record_with_fixed_variant_part (type0, valaddr, address, dval);
+ else if (variant_field_index (type0) >= 0)
+ {
+ if (dval == NULL && valaddr == NULL && address == 0)
+ return type0;
+ return to_record_with_fixed_variant_part (type0, valaddr, address,
+ dval);
+ }
else
{
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
- /* TYPE_FLAGS (type0) |= TYPE_FLAG_FIXED_INSTANCE; */
+ TYPE_FLAGS (type0) |= TYPE_FLAG_FIXED_INSTANCE;
return type0;
}
@@ -6200,11 +7995,11 @@ to_fixed_record_type (struct type *type0, char *valaddr, CORE_ADDR address,
union type. Any necessary discriminants' values should be in DVAL,
a record value. That is, this routine selects the appropriate
branch of the union at ADDR according to the discriminant value
- indicated in the union's type name. */
+ indicated in the union's type name. */
static struct type *
to_fixed_variant_branch_type (struct type *var_type0, char *valaddr,
- CORE_ADDR address, struct value *dval)
+ CORE_ADDR address, struct value *dval)
{
int which;
struct type *templ_type;
@@ -6222,16 +8017,15 @@ to_fixed_variant_branch_type (struct type *var_type0, char *valaddr,
which =
ada_which_variant_applies (var_type,
- VALUE_TYPE (dval), VALUE_CONTENTS (dval));
+ VALUE_TYPE (dval), VALUE_CONTENTS (dval));
if (which < 0)
return empty_record (TYPE_OBJFILE (var_type));
else if (is_dynamic_field (var_type, which))
- return
- to_fixed_record_type
+ return to_fixed_record_type
(TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (var_type, which)),
valaddr, address, dval);
- else if (contains_variant_part (TYPE_FIELD_TYPE (var_type, which)))
+ else if (variant_field_index (TYPE_FIELD_TYPE (var_type, which)) >= 0)
return
to_fixed_record_type
(TYPE_FIELD_TYPE (var_type, which), valaddr, address, dval);
@@ -6245,35 +8039,33 @@ to_fixed_variant_branch_type (struct type *var_type0, char *valaddr,
contains no dynamic components (that is, no components whose sizes
are determined by run-time quantities). Unless IGNORE_TOO_BIG is
true, gives an error message if the resulting type's size is over
- varsize_limit.
-*/
+ varsize_limit. */
static struct type *
to_fixed_array_type (struct type *type0, struct value *dval,
- int ignore_too_big)
+ int ignore_too_big)
{
struct type *index_type_desc;
struct type *result;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
-/* if (ada_is_packed_array_type (type0) /* revisit? *//*
- || (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE))
- return type0; */
+ if (ada_is_packed_array_type (type0) /* revisit? */
+ || (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE))
+ return type0;
index_type_desc = ada_find_parallel_type (type0, "___XA");
if (index_type_desc == NULL)
{
struct type *elt_type0 = check_typedef (TYPE_TARGET_TYPE (type0));
/* NOTE: elt_type---the fixed version of elt_type0---should never
- * depend on the contents of the array in properly constructed
- * debugging data. */
+ depend on the contents of the array in properly constructed
+ debugging data. */
struct type *elt_type = ada_to_fixed_type (elt_type0, 0, 0, dval);
if (elt_type0 == elt_type)
- result = type0;
+ result = type0;
else
- result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
- elt_type, TYPE_INDEX_TYPE (type0));
+ result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
+ elt_type, TYPE_INDEX_TYPE (type0));
}
else
{
@@ -6282,26 +8074,25 @@ to_fixed_array_type (struct type *type0, struct value *dval,
elt_type0 = type0;
for (i = TYPE_NFIELDS (index_type_desc); i > 0; i -= 1)
- elt_type0 = TYPE_TARGET_TYPE (elt_type0);
+ elt_type0 = TYPE_TARGET_TYPE (elt_type0);
/* NOTE: result---the fixed version of elt_type0---should never
- * depend on the contents of the array in properly constructed
- * debugging data. */
+ depend on the contents of the array in properly constructed
+ debugging data. */
result = ada_to_fixed_type (check_typedef (elt_type0), 0, 0, dval);
for (i = TYPE_NFIELDS (index_type_desc) - 1; i >= 0; i -= 1)
- {
- struct type *range_type =
- to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, i),
- dval, TYPE_OBJFILE (type0));
- result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
- result, range_type);
- }
+ {
+ struct type *range_type =
+ to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, i),
+ dval, TYPE_OBJFILE (type0));
+ result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
+ result, range_type);
+ }
if (!ignore_too_big && TYPE_LENGTH (result) > varsize_limit)
- error ("array type with dynamic size is larger than varsize-limit");
+ error ("array type with dynamic size is larger than varsize-limit");
}
-/* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
-/* TYPE_FLAGS (result) |= TYPE_FLAG_FIXED_INSTANCE; */
+ TYPE_FLAGS (result) |= TYPE_FLAG_FIXED_INSTANCE;
return result;
}
@@ -6309,11 +8100,12 @@ to_fixed_array_type (struct type *type0, struct value *dval,
/* A standard type (containing no dynamically sized components)
corresponding to TYPE for the value (TYPE, VALADDR, ADDRESS)
DVAL describes a record containing any discriminants used in TYPE0,
- and may be NULL if there are none. */
+ and may be NULL if there are none, or if the object of type TYPE at
+ ADDRESS or in VALADDR contains these discriminants. */
struct type *
-ada_to_fixed_type (struct type *type, char *valaddr, CORE_ADDR address,
- struct value *dval)
+ada_to_fixed_type (struct type *type, char *valaddr,
+ CORE_ADDR address, struct value *dval)
{
CHECK_TYPEDEF (type);
switch (TYPE_CODE (type))
@@ -6321,19 +8113,31 @@ ada_to_fixed_type (struct type *type, char *valaddr, CORE_ADDR address,
default:
return type;
case TYPE_CODE_STRUCT:
- return to_fixed_record_type (type, valaddr, address, NULL);
+ {
+ struct type *static_type = to_static_fixed_type (type);
+ if (ada_is_tagged_type (static_type, 0))
+ {
+ struct type *real_type =
+ type_from_tag (value_tag_from_contents_and_address (static_type,
+ valaddr,
+ address));
+ if (real_type != NULL)
+ type = real_type;
+ }
+ return to_fixed_record_type (type, valaddr, address, NULL);
+ }
case TYPE_CODE_ARRAY:
- return to_fixed_array_type (type, dval, 0);
+ return to_fixed_array_type (type, dval, 1);
case TYPE_CODE_UNION:
if (dval == NULL)
- return type;
+ return type;
else
- return to_fixed_variant_branch_type (type, valaddr, address, dval);
+ return to_fixed_variant_branch_type (type, valaddr, address, dval);
}
}
/* A standard (static-sized) type corresponding as well as possible to
- TYPE0, but based on no runtime data. */
+ TYPE0, but based on no runtime data. */
static struct type *
to_static_fixed_type (struct type *type0)
@@ -6343,10 +8147,9 @@ to_static_fixed_type (struct type *type0)
if (type0 == NULL)
return NULL;
- /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
- /* if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
- return type0;
- */
+ if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
+ return type0;
+
CHECK_TYPEDEF (type0);
switch (TYPE_CODE (type0))
@@ -6356,17 +8159,20 @@ to_static_fixed_type (struct type *type0)
case TYPE_CODE_STRUCT:
type = dynamic_template_type (type0);
if (type != NULL)
- return template_to_static_fixed_type (type);
- return type0;
+ return template_to_static_fixed_type (type);
+ else
+ return template_to_static_fixed_type (type0);
case TYPE_CODE_UNION:
type = ada_find_parallel_type (type0, "___XVU");
if (type != NULL)
- return template_to_static_fixed_type (type);
- return type0;
+ return template_to_static_fixed_type (type);
+ else
+ return template_to_static_fixed_type (type0);
}
}
-/* A static approximation of TYPE with all type wrappers removed. */
+/* A static approximation of TYPE with all type wrappers removed. */
+
static struct type *
static_unwrap_type (struct type *type)
{
@@ -6374,7 +8180,7 @@ static_unwrap_type (struct type *type)
{
struct type *type1 = TYPE_FIELD_TYPE (check_typedef (type), 0);
if (ada_type_name (type1) == NULL)
- TYPE_NAME (type1) = ada_type_name (type);
+ TYPE_NAME (type1) = ada_type_name (type);
return static_unwrap_type (type1);
}
@@ -6382,25 +8188,26 @@ static_unwrap_type (struct type *type)
{
struct type *raw_real_type = ada_get_base_type (type);
if (raw_real_type == type)
- return type;
+ return type;
else
- return to_static_fixed_type (raw_real_type);
+ return to_static_fixed_type (raw_real_type);
}
}
/* In some cases, incomplete and private types require
- cross-references that are not resolved as records (for example,
+ cross-references that are not resolved as records (for example,
type Foo;
type FooP is access Foo;
V: FooP;
type Foo is array ...;
- ). In these cases, since there is no mechanism for producing
+ ). In these cases, since there is no mechanism for producing
cross-references to such types, we instead substitute for FooP a
stub enumeration type that is nowhere resolved, and whose tag is
- the name of the actual type. Call these types "non-record stubs". */
+ the name of the actual type. Call these types "non-record stubs". */
/* A type equivalent to TYPE that is not a non-record stub, if one
- exists, otherwise TYPE. */
+ exists, otherwise TYPE. */
+
struct type *
ada_completed_type (struct type *type)
{
@@ -6421,23 +8228,53 @@ ada_completed_type (struct type *type)
type TYPE0, but with a standard (static-sized) type that correctly
describes it. If VAL0 is not NULL and TYPE0 already is a standard
type, then return VAL0 [this feature is simply to avoid redundant
- creation of struct values]. */
+ creation of struct values]. */
-struct value *
-ada_to_fixed_value (struct type *type0, char *valaddr, CORE_ADDR address,
- struct value *val0)
+static struct value *
+ada_to_fixed_value_create (struct type *type0, CORE_ADDR address,
+ struct value *val0)
{
- struct type *type = ada_to_fixed_type (type0, valaddr, address, NULL);
+ struct type *type = ada_to_fixed_type (type0, 0, address, NULL);
if (type == type0 && val0 != NULL)
return val0;
else
- return value_from_contents_and_address (type, valaddr, address);
+ return value_from_contents_and_address (type, 0, address);
}
-/* A value representing VAL, but with a standard (static-sized) type
+/* A value representing VAL, but with a standard (static-sized) type
+ that correctly describes it. Does not necessarily create a new
+ value. */
+
+static struct value *
+ada_to_fixed_value (struct value *val)
+{
+ return ada_to_fixed_value_create (VALUE_TYPE (val),
+ VALUE_ADDRESS (val) + VALUE_OFFSET (val),
+ val);
+}
+
+/* If the PC is pointing inside a function prologue, then re-adjust it
+ past this prologue. */
+
+static void
+adjust_pc_past_prologue (CORE_ADDR *pc)
+{
+ struct symbol *func_sym = find_pc_function (*pc);
+
+ if (func_sym)
+ {
+ const struct symtab_and_line sal =
+ find_function_start_sal (func_sym, 1);
+
+ if (*pc <= sal.pc)
+ *pc = sal.pc;
+ }
+}
+
+/* A value representing VAL, but with a standard (static-sized) type
chosen to approximate the real type of VAL as well as possible, but
without consulting any runtime values. For Ada dynamic-sized
- types, therefore, the type of the result is likely to be inaccurate. */
+ types, therefore, the type of the result is likely to be inaccurate. */
struct value *
ada_to_static_fixed_value (struct value *val)
@@ -6447,17 +8284,14 @@ ada_to_static_fixed_value (struct value *val)
if (type == VALUE_TYPE (val))
return val;
else
- return coerce_unspec_val_to_type (val, 0, type);
+ return coerce_unspec_val_to_type (val, type);
}
-
-
-
/* Attributes */
-/* Table mapping attribute numbers to names */
-/* NOTE: Keep up to date with enum ada_attribute definition in ada-lang.h */
+/* Table mapping attribute numbers to names.
+ NOTE: Keep up to date with enum ada_attribute definition in ada-lang.h. */
static const char *attribute_names[] = {
"<?>",
@@ -6466,28 +8300,29 @@ static const char *attribute_names[] = {
"last",
"length",
"image",
- "img",
"max",
"min",
- "pos" "tag",
+ "modulus",
+ "pos",
+ "size",
+ "tag",
"val",
-
0
};
const char *
-ada_attribute_name (int n)
+ada_attribute_name (enum exp_opcode n)
{
- if (n > 0 && n < (int) ATR_END)
- return attribute_names[n];
+ if (n >= OP_ATR_FIRST && n <= (int) OP_ATR_VAL)
+ return attribute_names[n - OP_ATR_FIRST + 1];
else
return attribute_names[0];
}
-/* Evaluate the 'POS attribute applied to ARG. */
+/* Evaluate the 'POS attribute applied to ARG. */
-static struct value *
-value_pos_atr (struct value *arg)
+static LONGEST
+pos_atr (struct value *arg)
{
struct type *type = VALUE_TYPE (arg);
@@ -6500,17 +8335,23 @@ value_pos_atr (struct value *arg)
LONGEST v = value_as_long (arg);
for (i = 0; i < TYPE_NFIELDS (type); i += 1)
- {
- if (v == TYPE_FIELD_BITPOS (type, i))
- return value_from_longest (builtin_type_ada_int, i);
- }
+ {
+ if (v == TYPE_FIELD_BITPOS (type, i))
+ return i;
+ }
error ("enumeration value is invalid: can't find 'POS");
}
else
- return value_from_longest (builtin_type_ada_int, value_as_long (arg));
+ return value_as_long (arg);
}
-/* Evaluate the TYPE'VAL attribute applied to ARG. */
+static struct value *
+value_pos_atr (struct value *arg)
+{
+ return value_from_longest (builtin_type_ada_int, pos_atr (arg));
+}
+
+/* Evaluate the TYPE'VAL attribute applied to ARG. */
static struct value *
value_val_atr (struct type *type, struct value *arg)
@@ -6524,7 +8365,7 @@ value_val_atr (struct type *type, struct value *arg)
{
long pos = value_as_long (arg);
if (pos < 0 || pos >= TYPE_NFIELDS (type))
- error ("argument to 'VAL out of range");
+ error ("argument to 'VAL out of range");
return value_from_longest (type, TYPE_FIELD_BITPOS (type, pos));
}
else
@@ -6532,11 +8373,11 @@ value_val_atr (struct type *type, struct value *arg)
}
- /* Evaluation */
+ /* Evaluation */
-/* True if TYPE appears to be an Ada character type.
- * [At the moment, this is true only for Character and Wide_Character;
- * It is a heuristic test that could stand improvement]. */
+/* True if TYPE appears to be an Ada character type.
+ [At the moment, this is true only for Character and Wide_Character;
+ It is a heuristic test that could stand improvement]. */
int
ada_is_character_type (struct type *type)
@@ -6545,13 +8386,14 @@ ada_is_character_type (struct type *type)
return
name != NULL
&& (TYPE_CODE (type) == TYPE_CODE_CHAR
- || TYPE_CODE (type) == TYPE_CODE_INT
- || TYPE_CODE (type) == TYPE_CODE_RANGE)
- && (DEPRECATED_STREQ (name, "character") || DEPRECATED_STREQ (name, "wide_character")
- || DEPRECATED_STREQ (name, "unsigned char"));
+ || TYPE_CODE (type) == TYPE_CODE_INT
+ || TYPE_CODE (type) == TYPE_CODE_RANGE)
+ && (strcmp (name, "character") == 0
+ || strcmp (name, "wide_character") == 0
+ || strcmp (name, "unsigned char") == 0);
}
-/* True if TYPE appears to be an Ada string type. */
+/* True if TYPE appears to be an Ada string type. */
int
ada_is_string_type (struct type *type)
@@ -6559,7 +8401,8 @@ ada_is_string_type (struct type *type)
CHECK_TYPEDEF (type);
if (type != NULL
&& TYPE_CODE (type) != TYPE_CODE_PTR
- && (ada_is_simple_array (type) || ada_is_array_descriptor (type))
+ && (ada_is_simple_array_type (type)
+ || ada_is_array_descriptor_type (type))
&& ada_array_arity (type) == 1)
{
struct type *elttype = ada_array_element_type (type, 1);
@@ -6573,26 +8416,25 @@ ada_is_string_type (struct type *type)
/* True if TYPE is a struct type introduced by the compiler to force the
alignment of a value. Such types have a single field with a
- distinctive name. */
+ distinctive name. */
int
ada_is_aligner_type (struct type *type)
{
CHECK_TYPEDEF (type);
return (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1
- && DEPRECATED_STREQ (TYPE_FIELD_NAME (type, 0), "F"));
+ && TYPE_NFIELDS (type) == 1
+ && strcmp (TYPE_FIELD_NAME (type, 0), "F") == 0);
}
/* If there is an ___XVS-convention type parallel to SUBTYPE, return
- the parallel type. */
+ the parallel type. */
struct type *
ada_get_base_type (struct type *raw_type)
{
struct type *real_type_namer;
struct type *raw_real_type;
- struct type *real_type;
if (raw_type == NULL || TYPE_CODE (raw_type) != TYPE_CODE_STRUCT)
return raw_type;
@@ -6610,7 +8452,7 @@ ada_get_base_type (struct type *raw_type)
return raw_real_type;
}
-/* The type of value designated by TYPE, with all aligners removed. */
+/* The type of value designated by TYPE, with all aligners removed. */
struct type *
ada_aligned_type (struct type *type)
@@ -6623,82 +8465,113 @@ ada_aligned_type (struct type *type)
/* The address of the aligned value in an object at address VALADDR
- having type TYPE. Assumes ada_is_aligner_type (TYPE). */
+ having type TYPE. Assumes ada_is_aligner_type (TYPE). */
char *
ada_aligned_value_addr (struct type *type, char *valaddr)
{
if (ada_is_aligner_type (type))
return ada_aligned_value_addr (TYPE_FIELD_TYPE (type, 0),
- valaddr +
- TYPE_FIELD_BITPOS (type,
- 0) / TARGET_CHAR_BIT);
+ valaddr +
+ TYPE_FIELD_BITPOS (type,
+ 0) / TARGET_CHAR_BIT);
else
return valaddr;
}
+
+
/* The printed representation of an enumeration literal with encoded
- name NAME. The value is good to the next call of ada_enum_name. */
+ name NAME. The value is good to the next call of ada_enum_name. */
const char *
ada_enum_name (const char *name)
{
+ static char *result;
+ static size_t result_len = 0;
char *tmp;
- while (1)
+ /* First, unqualify the enumeration name:
+ 1. Search for the last '.' character. If we find one, then skip
+ all the preceeding characters, the unqualified name starts
+ right after that dot.
+ 2. Otherwise, we may be debugging on a target where the compiler
+ translates dots into "__". Search forward for double underscores,
+ but stop searching when we hit an overloading suffix, which is
+ of the form "__" followed by digits. */
+
+ tmp = strrchr (name, '.');
+ if (tmp != NULL)
+ name = tmp + 1;
+ else
{
- if ((tmp = strstr (name, "__")) != NULL)
- name = tmp + 2;
- else if ((tmp = strchr (name, '.')) != NULL)
- name = tmp + 1;
- else
- break;
+ while ((tmp = strstr (name, "__")) != NULL)
+ {
+ if (isdigit (tmp[2]))
+ break;
+ else
+ name = tmp + 2;
+ }
}
if (name[0] == 'Q')
{
- static char result[16];
int v;
if (name[1] == 'U' || name[1] == 'W')
- {
- if (sscanf (name + 2, "%x", &v) != 1)
- return name;
- }
+ {
+ if (sscanf (name + 2, "%x", &v) != 1)
+ return name;
+ }
else
- return name;
+ return name;
+ GROW_VECT (result, result_len, 16);
if (isascii (v) && isprint (v))
- sprintf (result, "'%c'", v);
+ sprintf (result, "'%c'", v);
else if (name[1] == 'U')
- sprintf (result, "[\"%02x\"]", v);
+ sprintf (result, "[\"%02x\"]", v);
else
- sprintf (result, "[\"%04x\"]", v);
+ sprintf (result, "[\"%04x\"]", v);
return result;
}
else
- return name;
+ {
+ tmp = strstr (name, "__");
+ if (tmp == NULL)
+ tmp = strstr (name, "$");
+ if (tmp != NULL)
+ {
+ GROW_VECT (result, result_len, tmp - name + 1);
+ strncpy (result, name, tmp - name);
+ result[tmp - name] = '\0';
+ return result;
+ }
+
+ return name;
+ }
}
static struct value *
evaluate_subexp (struct type *expect_type, struct expression *exp, int *pos,
- enum noside noside)
+ enum noside noside)
{
- return (*exp->language_defn->evaluate_exp) (expect_type, exp, pos, noside);
+ return (*exp->language_defn->la_exp_desc->evaluate_exp)
+ (expect_type, exp, pos, noside);
}
/* Evaluate the subexpression of EXP starting at *POS as for
evaluate_type, updating *POS to point just past the evaluated
- expression. */
+ expression. */
static struct value *
evaluate_subexp_type (struct expression *exp, int *pos)
{
- return (*exp->language_defn->evaluate_exp)
+ return (*exp->language_defn->la_exp_desc->evaluate_exp)
(NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
}
/* If VAL is wrapped in an aligner or subtype wrapper, return the
- value it wraps. */
+ value it wraps. */
static struct value *
unwrap_value (struct value *val)
@@ -6707,26 +8580,26 @@ unwrap_value (struct value *val)
if (ada_is_aligner_type (type))
{
struct value *v = value_struct_elt (&val, NULL, "F",
- NULL, "internal structure");
+ NULL, "internal structure");
struct type *val_type = check_typedef (VALUE_TYPE (v));
if (ada_type_name (val_type) == NULL)
- TYPE_NAME (val_type) = ada_type_name (type);
+ TYPE_NAME (val_type) = ada_type_name (type);
return unwrap_value (v);
}
else
{
struct type *raw_real_type =
- ada_completed_type (ada_get_base_type (type));
+ ada_completed_type (ada_get_base_type (type));
if (type == raw_real_type)
- return val;
+ return val;
return
- coerce_unspec_val_to_type
- (val, 0, ada_to_fixed_type (raw_real_type, 0,
- VALUE_ADDRESS (val) + VALUE_OFFSET (val),
- NULL));
+ coerce_unspec_val_to_type
+ (val, ada_to_fixed_type (raw_real_type, 0,
+ VALUE_ADDRESS (val) + VALUE_OFFSET (val),
+ NULL));
}
}
@@ -6739,12 +8612,12 @@ cast_to_fixed (struct type *type, struct value *arg)
return arg;
else if (ada_is_fixed_point_type (VALUE_TYPE (arg)))
val = ada_float_to_fixed (type,
- ada_fixed_to_float (VALUE_TYPE (arg),
- value_as_long (arg)));
+ ada_fixed_to_float (VALUE_TYPE (arg),
+ value_as_long (arg)));
else
{
DOUBLEST argd =
- value_as_double (value_cast (builtin_type_double, value_copy (arg)));
+ value_as_double (value_cast (builtin_type_double, value_copy (arg)));
val = ada_float_to_fixed (type, argd);
}
@@ -6755,12 +8628,13 @@ static struct value *
cast_from_fixed_to_double (struct value *arg)
{
DOUBLEST val = ada_fixed_to_float (VALUE_TYPE (arg),
- value_as_long (arg));
+ value_as_long (arg));
return value_from_double (builtin_type_double, val);
}
-/* Coerce VAL as necessary for assignment to an lval of type TYPE, and
- * return the converted value. */
+/* Coerce VAL as necessary for assignment to an lval of type TYPE, and
+ return the converted value. */
+
static struct value *
coerce_for_assign (struct type *type, struct value *val)
{
@@ -6782,20 +8656,98 @@ coerce_for_assign (struct type *type, struct value *val)
&& TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
if (TYPE_LENGTH (type2) != TYPE_LENGTH (type)
- || TYPE_LENGTH (TYPE_TARGET_TYPE (type2))
- != TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
- error ("Incompatible types in assignment");
+ || TYPE_LENGTH (TYPE_TARGET_TYPE (type2))
+ != TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
+ error ("Incompatible types in assignment");
VALUE_TYPE (val) = type;
}
return val;
}
+static struct value *
+ada_value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
+{
+ struct value *val;
+ struct type *type1, *type2;
+ LONGEST v, v1, v2;
+
+ COERCE_REF (arg1);
+ COERCE_REF (arg2);
+ type1 = base_type (check_typedef (VALUE_TYPE (arg1)));
+ type2 = base_type (check_typedef (VALUE_TYPE (arg2)));
+
+ if (TYPE_CODE (type1) != TYPE_CODE_INT
+ || TYPE_CODE (type2) != TYPE_CODE_INT)
+ return value_binop (arg1, arg2, op);
+
+ switch (op)
+ {
+ case BINOP_MOD:
+ case BINOP_DIV:
+ case BINOP_REM:
+ break;
+ default:
+ return value_binop (arg1, arg2, op);
+ }
+
+ v2 = value_as_long (arg2);
+ if (v2 == 0)
+ error ("second operand of %s must not be zero.", op_string (op));
+
+ if (TYPE_UNSIGNED (type1) || op == BINOP_MOD)
+ return value_binop (arg1, arg2, op);
+
+ v1 = value_as_long (arg1);
+ switch (op)
+ {
+ case BINOP_DIV:
+ v = v1 / v2;
+ if (!TRUNCATION_TOWARDS_ZERO && v1 * (v1 % v2) < 0)
+ v += v > 0 ? -1 : 1;
+ break;
+ case BINOP_REM:
+ v = v1 % v2;
+ if (v * v1 < 0)
+ v -= v2;
+ break;
+ default:
+ /* Should not reach this point. */
+ v = 0;
+ }
+
+ val = allocate_value (type1);
+ store_unsigned_integer (VALUE_CONTENTS_RAW (val),
+ TYPE_LENGTH (VALUE_TYPE (val)), v);
+ return val;
+}
+
+static int
+ada_value_equal (struct value *arg1, struct value *arg2)
+{
+ if (ada_is_direct_array_type (VALUE_TYPE (arg1))
+ || ada_is_direct_array_type (VALUE_TYPE (arg2)))
+ {
+ arg1 = ada_coerce_to_simple_array (arg1);
+ arg2 = ada_coerce_to_simple_array (arg2);
+ if (TYPE_CODE (VALUE_TYPE (arg1)) != TYPE_CODE_ARRAY
+ || TYPE_CODE (VALUE_TYPE (arg2)) != TYPE_CODE_ARRAY)
+ error ("Attempt to compare array with non-array");
+ /* FIXME: The following works only for types whose
+ representations use all bits (no padding or undefined bits)
+ and do not have user-defined equality. */
+ return
+ TYPE_LENGTH (VALUE_TYPE (arg1)) == TYPE_LENGTH (VALUE_TYPE (arg2))
+ && memcmp (VALUE_CONTENTS (arg1), VALUE_CONTENTS (arg2),
+ TYPE_LENGTH (VALUE_TYPE (arg1))) == 0;
+ }
+ return value_equal (arg1, arg2);
+}
+
struct value *
ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
- int *pos, enum noside noside)
+ int *pos, enum noside noside)
{
enum exp_opcode op;
- enum ada_attribute atr;
int tem, tem2, tem3;
int pc;
struct value *arg1 = NULL, *arg2 = NULL, *arg3;
@@ -6812,752 +8764,702 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
default:
*pos -= 1;
return
- unwrap_value (evaluate_subexp_standard
- (expect_type, exp, pos, noside));
+ unwrap_value (evaluate_subexp_standard
+ (expect_type, exp, pos, noside));
+
+ case OP_STRING:
+ {
+ struct value *result;
+ *pos -= 1;
+ result = evaluate_subexp_standard (expect_type, exp, pos, noside);
+ /* The result type will have code OP_STRING, bashed there from
+ OP_ARRAY. Bash it back. */
+ if (TYPE_CODE (VALUE_TYPE (result)) == TYPE_CODE_STRING)
+ TYPE_CODE (VALUE_TYPE (result)) = TYPE_CODE_ARRAY;
+ return result;
+ }
case UNOP_CAST:
(*pos) += 2;
type = exp->elts[pc + 1].type;
arg1 = evaluate_subexp (type, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
+ goto nosideret;
if (type != check_typedef (VALUE_TYPE (arg1)))
- {
- if (ada_is_fixed_point_type (type))
- arg1 = cast_to_fixed (type, arg1);
- else if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
- arg1 = value_cast (type, cast_from_fixed_to_double (arg1));
- else if (VALUE_LVAL (arg1) == lval_memory)
- {
- /* This is in case of the really obscure (and undocumented,
- but apparently expected) case of (Foo) Bar.all, where Bar
- is an integer constant and Foo is a dynamic-sized type.
- If we don't do this, ARG1 will simply be relabeled with
- TYPE. */
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (to_static_fixed_type (type), not_lval);
- arg1 =
- ada_to_fixed_value
- (type, 0, VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1), 0);
- }
- else
- arg1 = value_cast (type, arg1);
- }
+ {
+ if (ada_is_fixed_point_type (type))
+ arg1 = cast_to_fixed (type, arg1);
+ else if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
+ arg1 = value_cast (type, cast_from_fixed_to_double (arg1));
+ else if (VALUE_LVAL (arg1) == lval_memory)
+ {
+ /* This is in case of the really obscure (and undocumented,
+ but apparently expected) case of (Foo) Bar.all, where Bar
+ is an integer constant and Foo is a dynamic-sized type.
+ If we don't do this, ARG1 will simply be relabeled with
+ TYPE. */
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (to_static_fixed_type (type), not_lval);
+ arg1 =
+ ada_to_fixed_value_create
+ (type, VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1), 0);
+ }
+ else
+ arg1 = value_cast (type, arg1);
+ }
return arg1;
- /* FIXME: UNOP_QUAL should be defined in expression.h */
- /* case UNOP_QUAL:
- (*pos) += 2;
- type = exp->elts[pc + 1].type;
- return ada_evaluate_subexp (type, exp, pos, noside);
- */
+ case UNOP_QUAL:
+ (*pos) += 2;
+ type = exp->elts[pc + 1].type;
+ return ada_evaluate_subexp (type, exp, pos, noside);
+
case BINOP_ASSIGN:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
- return arg1;
- if (binop_user_defined_p (op, arg1, arg2))
- return value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
+ return arg1;
+ if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
+ arg2 = cast_to_fixed (VALUE_TYPE (arg1), arg2);
+ else if (ada_is_fixed_point_type (VALUE_TYPE (arg2)))
+ error
+ ("Fixed-point values must be assigned to fixed-point variables");
else
- {
- if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
- arg2 = cast_to_fixed (VALUE_TYPE (arg1), arg2);
- else if (ada_is_fixed_point_type (VALUE_TYPE (arg2)))
- error
- ("Fixed-point values must be assigned to fixed-point variables");
- else
- arg2 = coerce_for_assign (VALUE_TYPE (arg1), arg2);
- return ada_value_assign (arg1, arg2);
- }
+ arg2 = coerce_for_assign (VALUE_TYPE (arg1), arg2);
+ return ada_value_assign (arg1, arg2);
case BINOP_ADD:
arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (binop_user_defined_p (op, arg1, arg2))
- return value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
- else
- {
- if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
- || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
- && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
- error
- ("Operands of fixed-point addition must have the same type");
- return value_cast (VALUE_TYPE (arg1), value_add (arg1, arg2));
- }
+ goto nosideret;
+ if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
+ || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
+ && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
+ error ("Operands of fixed-point addition must have the same type");
+ return value_cast (VALUE_TYPE (arg1), value_add (arg1, arg2));
case BINOP_SUB:
arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (binop_user_defined_p (op, arg1, arg2))
- return value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
- else
- {
- if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
- || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
- && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
- error
- ("Operands of fixed-point subtraction must have the same type");
- return value_cast (VALUE_TYPE (arg1), value_sub (arg1, arg2));
- }
+ goto nosideret;
+ if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
+ || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
+ && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
+ error ("Operands of fixed-point subtraction must have the same type");
+ return value_cast (VALUE_TYPE (arg1), value_sub (arg1, arg2));
case BINOP_MUL:
case BINOP_DIV:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (binop_user_defined_p (op, arg1, arg2))
- return value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS
+ && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
+ return value_zero (VALUE_TYPE (arg1), not_lval);
else
- if (noside == EVAL_AVOID_SIDE_EFFECTS
- && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
- return value_zero (VALUE_TYPE (arg1), not_lval);
+ {
+ if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
+ arg1 = cast_from_fixed_to_double (arg1);
+ if (ada_is_fixed_point_type (VALUE_TYPE (arg2)))
+ arg2 = cast_from_fixed_to_double (arg2);
+ return ada_value_binop (arg1, arg2, op);
+ }
+
+ case BINOP_REM:
+ case BINOP_MOD:
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS
+ && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
+ return value_zero (VALUE_TYPE (arg1), not_lval);
else
- {
- if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
- arg1 = cast_from_fixed_to_double (arg1);
- if (ada_is_fixed_point_type (VALUE_TYPE (arg2)))
- arg2 = cast_from_fixed_to_double (arg2);
- return value_binop (arg1, arg2, op);
- }
+ return ada_value_binop (arg1, arg2, op);
+
+ case BINOP_EQUAL:
+ case BINOP_NOTEQUAL:
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ tem = 0;
+ else
+ tem = ada_value_equal (arg1, arg2);
+ if (op == BINOP_NOTEQUAL)
+ tem = !tem;
+ return value_from_longest (LA_BOOL_TYPE, (LONGEST) tem);
case UNOP_NEG:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (unop_user_defined_p (op, arg1))
- return value_x_unop (arg1, op, EVAL_NORMAL);
+ goto nosideret;
else if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
- return value_cast (VALUE_TYPE (arg1), value_neg (arg1));
+ return value_cast (VALUE_TYPE (arg1), value_neg (arg1));
else
- return value_neg (arg1);
-
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- /* case OP_UNRESOLVED_VALUE:
- /* Only encountered when an unresolved symbol occurs in a
- context other than a function call, in which case, it is
- illegal. *//*
- (*pos) += 3;
- if (noside == EVAL_SKIP)
- goto nosideret;
- else
- error ("Unexpected unresolved symbol, %s, during evaluation",
- ada_demangle (exp->elts[pc + 2].name));
- */
+ return value_neg (arg1);
+
case OP_VAR_VALUE:
*pos -= 1;
if (noside == EVAL_SKIP)
- {
- *pos += 4;
- goto nosideret;
- }
+ {
+ *pos += 4;
+ goto nosideret;
+ }
+ else if (SYMBOL_DOMAIN (exp->elts[pc + 2].symbol) == UNDEF_DOMAIN)
+ /* Only encountered when an unresolved symbol occurs in a
+ context other than a function call, in which case, it is
+ illegal. */
+ error ("Unexpected unresolved symbol, %s, during evaluation",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- *pos += 4;
- return value_zero
- (to_static_fixed_type
- (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))),
- not_lval);
- }
+ {
+ *pos += 4;
+ return value_zero
+ (to_static_fixed_type
+ (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))),
+ not_lval);
+ }
else
- {
- arg1 =
- unwrap_value (evaluate_subexp_standard
- (expect_type, exp, pos, noside));
- return ada_to_fixed_value (VALUE_TYPE (arg1), 0,
- VALUE_ADDRESS (arg1) +
- VALUE_OFFSET (arg1), arg1);
- }
-
- case OP_ARRAY:
- (*pos) += 3;
- tem2 = longest_to_int (exp->elts[pc + 1].longconst);
- tem3 = longest_to_int (exp->elts[pc + 2].longconst);
- nargs = tem3 - tem2 + 1;
- type = expect_type ? check_typedef (expect_type) : NULL_TYPE;
-
- argvec =
- (struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
- for (tem = 0; tem == 0 || tem < nargs; tem += 1)
- /* At least one element gets inserted for the type */
- {
- /* Ensure that array expressions are coerced into pointer objects. */
- argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
- }
- if (noside == EVAL_SKIP)
- goto nosideret;
- return value_array (tem2, tem3, argvec);
+ {
+ arg1 =
+ unwrap_value (evaluate_subexp_standard
+ (expect_type, exp, pos, noside));
+ return ada_to_fixed_value (arg1);
+ }
case OP_FUNCALL:
(*pos) += 2;
/* Allocate arg vector, including space for the function to be
- called in argvec[0] and a terminating NULL */
+ called in argvec[0] and a terminating NULL. */
nargs = longest_to_int (exp->elts[pc + 1].longconst);
argvec =
- (struct value * *) alloca (sizeof (struct value *) * (nargs + 2));
-
- /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
- /* FIXME: name should be defined in expresion.h */
- /* if (exp->elts[*pos].opcode == OP_UNRESOLVED_VALUE)
- error ("Unexpected unresolved symbol, %s, during evaluation",
- ada_demangle (exp->elts[pc + 5].name));
- */
- if (0)
- {
- error ("unexpected code path, FIXME");
- }
- else
- {
- for (tem = 0; tem <= nargs; tem += 1)
- argvec[tem] = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- argvec[tem] = 0;
-
- if (noside == EVAL_SKIP)
- goto nosideret;
- }
-
- if (TYPE_CODE (VALUE_TYPE (argvec[0])) == TYPE_CODE_REF)
- argvec[0] = value_addr (argvec[0]);
+ (struct value **) alloca (sizeof (struct value *) * (nargs + 2));
- if (ada_is_packed_array_type (VALUE_TYPE (argvec[0])))
- argvec[0] = ada_coerce_to_simple_array (argvec[0]);
+ if (exp->elts[*pos].opcode == OP_VAR_VALUE
+ && SYMBOL_DOMAIN (exp->elts[pc + 5].symbol) == UNDEF_DOMAIN)
+ error ("Unexpected unresolved symbol, %s, during evaluation",
+ SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol));
+ else
+ {
+ for (tem = 0; tem <= nargs; tem += 1)
+ argvec[tem] = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ argvec[tem] = 0;
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ }
+
+ if (ada_is_packed_array_type (desc_base_type (VALUE_TYPE (argvec[0]))))
+ argvec[0] = ada_coerce_to_simple_array (argvec[0]);
+ else if (TYPE_CODE (VALUE_TYPE (argvec[0])) == TYPE_CODE_REF
+ || (TYPE_CODE (VALUE_TYPE (argvec[0])) == TYPE_CODE_ARRAY
+ && VALUE_LVAL (argvec[0]) == lval_memory))
+ argvec[0] = value_addr (argvec[0]);
type = check_typedef (VALUE_TYPE (argvec[0]));
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- {
- switch (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (type))))
- {
- case TYPE_CODE_FUNC:
- type = check_typedef (TYPE_TARGET_TYPE (type));
- break;
- case TYPE_CODE_ARRAY:
- break;
- case TYPE_CODE_STRUCT:
- if (noside != EVAL_AVOID_SIDE_EFFECTS)
- argvec[0] = ada_value_ind (argvec[0]);
- type = check_typedef (TYPE_TARGET_TYPE (type));
- break;
- default:
- error ("cannot subscript or call something of type `%s'",
- ada_type_name (VALUE_TYPE (argvec[0])));
- break;
- }
- }
+ {
+ switch (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (type))))
+ {
+ case TYPE_CODE_FUNC:
+ type = check_typedef (TYPE_TARGET_TYPE (type));
+ break;
+ case TYPE_CODE_ARRAY:
+ break;
+ case TYPE_CODE_STRUCT:
+ if (noside != EVAL_AVOID_SIDE_EFFECTS)
+ argvec[0] = ada_value_ind (argvec[0]);
+ type = check_typedef (TYPE_TARGET_TYPE (type));
+ break;
+ default:
+ error ("cannot subscript or call something of type `%s'",
+ ada_type_name (VALUE_TYPE (argvec[0])));
+ break;
+ }
+ }
switch (TYPE_CODE (type))
- {
- case TYPE_CODE_FUNC:
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return allocate_value (TYPE_TARGET_TYPE (type));
- return call_function_by_hand (argvec[0], nargs, argvec + 1);
- case TYPE_CODE_STRUCT:
- {
- int arity = ada_array_arity (type);
- type = ada_array_element_type (type, nargs);
- if (type == NULL)
- error ("cannot subscript or call a record");
- if (arity != nargs)
- error ("wrong number of subscripts; expecting %d", arity);
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return allocate_value (ada_aligned_type (type));
- return
- unwrap_value (ada_value_subscript
- (argvec[0], nargs, argvec + 1));
- }
- case TYPE_CODE_ARRAY:
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- type = ada_array_element_type (type, nargs);
- if (type == NULL)
- error ("element type of array unknown");
- else
- return allocate_value (ada_aligned_type (type));
- }
- return
- unwrap_value (ada_value_subscript
- (ada_coerce_to_simple_array (argvec[0]),
- nargs, argvec + 1));
- case TYPE_CODE_PTR: /* Pointer to array */
- type = to_fixed_array_type (TYPE_TARGET_TYPE (type), NULL, 1);
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- type = ada_array_element_type (type, nargs);
- if (type == NULL)
- error ("element type of array unknown");
- else
- return allocate_value (ada_aligned_type (type));
- }
- return
- unwrap_value (ada_value_ptr_subscript (argvec[0], type,
- nargs, argvec + 1));
-
- default:
- error ("Internal error in evaluate_subexp");
- }
+ {
+ case TYPE_CODE_FUNC:
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return allocate_value (TYPE_TARGET_TYPE (type));
+ return call_function_by_hand (argvec[0], nargs, argvec + 1);
+ case TYPE_CODE_STRUCT:
+ {
+ int arity;
+
+ arity = ada_array_arity (type);
+ type = ada_array_element_type (type, nargs);
+ if (type == NULL)
+ error ("cannot subscript or call a record");
+ if (arity != nargs)
+ error ("wrong number of subscripts; expecting %d", arity);
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return allocate_value (ada_aligned_type (type));
+ return
+ unwrap_value (ada_value_subscript
+ (argvec[0], nargs, argvec + 1));
+ }
+ case TYPE_CODE_ARRAY:
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ {
+ type = ada_array_element_type (type, nargs);
+ if (type == NULL)
+ error ("element type of array unknown");
+ else
+ return allocate_value (ada_aligned_type (type));
+ }
+ return
+ unwrap_value (ada_value_subscript
+ (ada_coerce_to_simple_array (argvec[0]),
+ nargs, argvec + 1));
+ case TYPE_CODE_PTR: /* Pointer to array */
+ type = to_fixed_array_type (TYPE_TARGET_TYPE (type), NULL, 1);
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ {
+ type = ada_array_element_type (type, nargs);
+ if (type == NULL)
+ error ("element type of array unknown");
+ else
+ return allocate_value (ada_aligned_type (type));
+ }
+ return
+ unwrap_value (ada_value_ptr_subscript (argvec[0], type,
+ nargs, argvec + 1));
+
+ default:
+ error ("Internal error in evaluate_subexp");
+ }
case TERNOP_SLICE:
{
- struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- int lowbound
- = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
- int upper
- = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- /* If this is a reference to an array, then dereference it */
- if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_REF
- && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
- && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
- TYPE_CODE_ARRAY
- && !ada_is_array_descriptor (check_typedef (VALUE_TYPE (array))))
- {
- array = ada_coerce_ref (array);
- }
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS &&
- ada_is_array_descriptor (check_typedef (VALUE_TYPE (array))))
- {
- /* Try to dereference the array, in case it is an access to array */
- struct type *arrType = ada_type_of_array (array, 0);
- if (arrType != NULL)
- array = value_at_lazy (arrType, 0, NULL);
- }
- if (ada_is_array_descriptor (VALUE_TYPE (array)))
- array = ada_coerce_to_simple_array (array);
-
- /* If at this point we have a pointer to an array, it means that
- it is a pointer to a simple (non-ada) array. We just then
- dereference it */
- if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_PTR
- && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
- && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
- TYPE_CODE_ARRAY)
- {
- array = ada_value_ind (array);
- }
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- /* The following will get the bounds wrong, but only in contexts
- where the value is not being requested (FIXME?). */
- return array;
- else
- return value_slice (array, lowbound, upper - lowbound + 1);
+ struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ struct value *low_bound_val =
+ evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ LONGEST low_bound = pos_atr (low_bound_val);
+ LONGEST high_bound
+ = pos_atr (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ /* If this is a reference to an aligner type, then remove all
+ the aligners. */
+ if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_REF
+ && ada_is_aligner_type (TYPE_TARGET_TYPE (VALUE_TYPE (array))))
+ TYPE_TARGET_TYPE (VALUE_TYPE (array)) =
+ ada_aligned_type (TYPE_TARGET_TYPE (VALUE_TYPE (array)));
+
+ if (ada_is_packed_array_type (VALUE_TYPE (array)))
+ error ("cannot slice a packed array");
+
+ /* If this is a reference to an array or an array lvalue,
+ convert to a pointer. */
+ if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_REF
+ || (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_ARRAY
+ && VALUE_LVAL (array) == lval_memory))
+ array = value_addr (array);
+
+ if (noside == EVAL_AVOID_SIDE_EFFECTS
+ && ada_is_array_descriptor_type (check_typedef
+ (VALUE_TYPE (array))))
+ return empty_array (ada_type_of_array (array, 0), low_bound);
+
+ array = ada_coerce_to_simple_array_ptr (array);
+
+ if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_PTR)
+ {
+ if (high_bound < low_bound || noside == EVAL_AVOID_SIDE_EFFECTS)
+ return empty_array (TYPE_TARGET_TYPE (VALUE_TYPE (array)),
+ low_bound);
+ else
+ {
+ struct type *arr_type0 =
+ to_fixed_array_type (TYPE_TARGET_TYPE (VALUE_TYPE (array)),
+ NULL, 1);
+ return ada_value_slice_ptr (array, arr_type0,
+ (int) low_bound, (int) high_bound);
+ }
+ }
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return array;
+ else if (high_bound < low_bound)
+ return empty_array (VALUE_TYPE (array), low_bound);
+ else
+ return ada_value_slice (array, (int) low_bound, (int) high_bound);
+ }
+
+ case UNOP_IN_RANGE:
+ (*pos) += 2;
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ type = exp->elts[pc + 1].type;
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ switch (TYPE_CODE (type))
+ {
+ default:
+ lim_warning ("Membership test incompletely implemented; "
+ "always returns true", 0);
+ return value_from_longest (builtin_type_int, (LONGEST) 1);
+
+ case TYPE_CODE_RANGE:
+ arg2 = value_from_longest (builtin_type_int, TYPE_LOW_BOUND (type));
+ arg3 = value_from_longest (builtin_type_int,
+ TYPE_HIGH_BOUND (type));
+ return
+ value_from_longest (builtin_type_int,
+ (value_less (arg1, arg3)
+ || value_equal (arg1, arg3))
+ && (value_less (arg2, arg1)
+ || value_equal (arg2, arg1)));
+ }
+
+ case BINOP_IN_BOUNDS:
+ (*pos) += 2;
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (builtin_type_int, not_lval);
+
+ tem = longest_to_int (exp->elts[pc + 1].longconst);
+
+ if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg2)))
+ error ("invalid dimension number to '%s", "range");
+
+ arg3 = ada_array_bound (arg2, tem, 1);
+ arg2 = ada_array_bound (arg2, tem, 0);
+
+ return
+ value_from_longest (builtin_type_int,
+ (value_less (arg1, arg3)
+ || value_equal (arg1, arg3))
+ && (value_less (arg2, arg1)
+ || value_equal (arg2, arg1)));
+
+ case TERNOP_IN_RANGE:
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ return
+ value_from_longest (builtin_type_int,
+ (value_less (arg1, arg3)
+ || value_equal (arg1, arg3))
+ && (value_less (arg2, arg1)
+ || value_equal (arg2, arg1)));
+
+ case OP_ATR_FIRST:
+ case OP_ATR_LAST:
+ case OP_ATR_LENGTH:
+ {
+ struct type *type_arg;
+ if (exp->elts[*pos].opcode == OP_TYPE)
+ {
+ evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg1 = NULL;
+ type_arg = exp->elts[pc + 2].type;
+ }
+ else
+ {
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ type_arg = NULL;
+ }
+
+ if (exp->elts[*pos].opcode != OP_LONG)
+ error ("illegal operand to '%s", ada_attribute_name (op));
+ tem = longest_to_int (exp->elts[*pos + 2].longconst);
+ *pos += 4;
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ if (type_arg == NULL)
+ {
+ arg1 = ada_coerce_ref (arg1);
+
+ if (ada_is_packed_array_type (VALUE_TYPE (arg1)))
+ arg1 = ada_coerce_to_simple_array (arg1);
+
+ if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg1)))
+ error ("invalid dimension number to '%s",
+ ada_attribute_name (op));
+
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ {
+ type = ada_index_type (VALUE_TYPE (arg1), tem);
+ if (type == NULL)
+ error
+ ("attempt to take bound of something that is not an array");
+ return allocate_value (type);
+ }
+
+ switch (op)
+ {
+ default: /* Should never happen. */
+ error ("unexpected attribute encountered");
+ case OP_ATR_FIRST:
+ return ada_array_bound (arg1, tem, 0);
+ case OP_ATR_LAST:
+ return ada_array_bound (arg1, tem, 1);
+ case OP_ATR_LENGTH:
+ return ada_array_length (arg1, tem);
+ }
+ }
+ else if (discrete_type_p (type_arg))
+ {
+ struct type *range_type;
+ char *name = ada_type_name (type_arg);
+ range_type = NULL;
+ if (name != NULL && TYPE_CODE (type_arg) != TYPE_CODE_ENUM)
+ range_type =
+ to_fixed_range_type (name, NULL, TYPE_OBJFILE (type_arg));
+ if (range_type == NULL)
+ range_type = type_arg;
+ switch (op)
+ {
+ default:
+ error ("unexpected attribute encountered");
+ case OP_ATR_FIRST:
+ return discrete_type_low_bound (range_type);
+ case OP_ATR_LAST:
+ return discrete_type_high_bound (range_type);
+ case OP_ATR_LENGTH:
+ error ("the 'length attribute applies only to array types");
+ }
+ }
+ else if (TYPE_CODE (type_arg) == TYPE_CODE_FLT)
+ error ("unimplemented type attribute");
+ else
+ {
+ LONGEST low, high;
+
+ if (ada_is_packed_array_type (type_arg))
+ type_arg = decode_packed_array_type (type_arg);
+
+ if (tem < 1 || tem > ada_array_arity (type_arg))
+ error ("invalid dimension number to '%s",
+ ada_attribute_name (op));
+
+ type = ada_index_type (type_arg, tem);
+ if (type == NULL)
+ error
+ ("attempt to take bound of something that is not an array");
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return allocate_value (type);
+
+ switch (op)
+ {
+ default:
+ error ("unexpected attribute encountered");
+ case OP_ATR_FIRST:
+ low = ada_array_bound_from_type (type_arg, tem, 0, &type);
+ return value_from_longest (type, low);
+ case OP_ATR_LAST:
+ high = ada_array_bound_from_type (type_arg, tem, 1, &type);
+ return value_from_longest (type, high);
+ case OP_ATR_LENGTH:
+ low = ada_array_bound_from_type (type_arg, tem, 0, &type);
+ high = ada_array_bound_from_type (type_arg, tem, 1, NULL);
+ return value_from_longest (type, high - low + 1);
+ }
+ }
+ }
+
+ case OP_ATR_TAG:
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (ada_tag_type (arg1), not_lval);
+
+ return ada_value_tag (arg1);
+
+ case OP_ATR_MIN:
+ case OP_ATR_MAX:
+ evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (VALUE_TYPE (arg1), not_lval);
+ else
+ return value_binop (arg1, arg2,
+ op == OP_ATR_MIN ? BINOP_MIN : BINOP_MAX);
+
+ case OP_ATR_MODULUS:
+ {
+ struct type *type_arg = exp->elts[pc + 2].type;
+ evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ if (!ada_is_modular_type (type_arg))
+ error ("'modulus must be applied to modular type");
+
+ return value_from_longest (TYPE_TARGET_TYPE (type_arg),
+ ada_modulus (type_arg));
}
- /* FIXME: UNOP_MBR should be defined in expression.h */
- /* case UNOP_MBR:
- (*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- type = exp->elts[pc + 1].type;
-
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- switch (TYPE_CODE (type))
- {
- default:
- warning ("Membership test incompletely implemented; always returns true");
- return value_from_longest (builtin_type_int, (LONGEST) 1);
-
- case TYPE_CODE_RANGE:
- arg2 = value_from_longest (builtin_type_int,
- (LONGEST) TYPE_LOW_BOUND (type));
- arg3 = value_from_longest (builtin_type_int,
- (LONGEST) TYPE_HIGH_BOUND (type));
- return
- value_from_longest (builtin_type_int,
- (value_less (arg1,arg3)
- || value_equal (arg1,arg3))
- && (value_less (arg2,arg1)
- || value_equal (arg2,arg1)));
- }
- */
- /* FIXME: BINOP_MBR should be defined in expression.h */
- /* case BINOP_MBR:
- (*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (builtin_type_int, not_lval);
-
- tem = longest_to_int (exp->elts[pc + 1].longconst);
-
- if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg2)))
- error ("invalid dimension number to '%s", "range");
-
- arg3 = ada_array_bound (arg2, tem, 1);
- arg2 = ada_array_bound (arg2, tem, 0);
-
- return
- value_from_longest (builtin_type_int,
- (value_less (arg1,arg3)
- || value_equal (arg1,arg3))
- && (value_less (arg2,arg1)
- || value_equal (arg2,arg1)));
- */
- /* FIXME: TERNOP_MBR should be defined in expression.h */
- /* case TERNOP_MBR:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- return
- value_from_longest (builtin_type_int,
- (value_less (arg1,arg3)
- || value_equal (arg1,arg3))
- && (value_less (arg2,arg1)
- || value_equal (arg2,arg1)));
- */
- /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
- /* case OP_ATTRIBUTE:
- *pos += 3;
- atr = (enum ada_attribute) longest_to_int (exp->elts[pc + 2].longconst);
- switch (atr)
- {
- default:
- error ("unexpected attribute encountered");
-
- case ATR_FIRST:
- case ATR_LAST:
- case ATR_LENGTH:
- {
- struct type* type_arg;
- if (exp->elts[*pos].opcode == OP_TYPE)
- {
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = NULL;
- type_arg = exp->elts[pc + 5].type;
- }
- else
- {
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- type_arg = NULL;
- }
-
- if (exp->elts[*pos].opcode != OP_LONG)
- error ("illegal operand to '%s", ada_attribute_name (atr));
- tem = longest_to_int (exp->elts[*pos+2].longconst);
- *pos += 4;
-
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- if (type_arg == NULL)
- {
- arg1 = ada_coerce_ref (arg1);
-
- if (ada_is_packed_array_type (VALUE_TYPE (arg1)))
- arg1 = ada_coerce_to_simple_array (arg1);
-
- if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg1)))
- error ("invalid dimension number to '%s",
- ada_attribute_name (atr));
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- type = ada_index_type (VALUE_TYPE (arg1), tem);
- if (type == NULL)
- error ("attempt to take bound of something that is not an array");
- return allocate_value (type);
- }
-
- switch (atr)
- {
- default:
- error ("unexpected attribute encountered");
- case ATR_FIRST:
- return ada_array_bound (arg1, tem, 0);
- case ATR_LAST:
- return ada_array_bound (arg1, tem, 1);
- case ATR_LENGTH:
- return ada_array_length (arg1, tem);
- }
- }
- else if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE
- || TYPE_CODE (type_arg) == TYPE_CODE_INT)
- {
- struct type* range_type;
- char* name = ada_type_name (type_arg);
- if (name == NULL)
- {
- if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE)
- range_type = type_arg;
- else
- error ("unimplemented type attribute");
- }
- else
- range_type =
- to_fixed_range_type (name, NULL, TYPE_OBJFILE (type_arg));
- switch (atr)
- {
- default:
- error ("unexpected attribute encountered");
- case ATR_FIRST:
- return value_from_longest (TYPE_TARGET_TYPE (range_type),
- TYPE_LOW_BOUND (range_type));
- case ATR_LAST:
- return value_from_longest (TYPE_TARGET_TYPE (range_type),
- TYPE_HIGH_BOUND (range_type));
- }
- }
- else if (TYPE_CODE (type_arg) == TYPE_CODE_ENUM)
- {
- switch (atr)
- {
- default:
- error ("unexpected attribute encountered");
- case ATR_FIRST:
- return value_from_longest
- (type_arg, TYPE_FIELD_BITPOS (type_arg, 0));
- case ATR_LAST:
- return value_from_longest
- (type_arg,
- TYPE_FIELD_BITPOS (type_arg,
- TYPE_NFIELDS (type_arg) - 1));
- }
- }
- else if (TYPE_CODE (type_arg) == TYPE_CODE_FLT)
- error ("unimplemented type attribute");
- else
- {
- LONGEST low, high;
-
- if (ada_is_packed_array_type (type_arg))
- type_arg = decode_packed_array_type (type_arg);
-
- if (tem < 1 || tem > ada_array_arity (type_arg))
- error ("invalid dimension number to '%s",
- ada_attribute_name (atr));
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- type = ada_index_type (type_arg, tem);
- if (type == NULL)
- error ("attempt to take bound of something that is not an array");
- return allocate_value (type);
- }
-
- switch (atr)
- {
- default:
- error ("unexpected attribute encountered");
- case ATR_FIRST:
- low = ada_array_bound_from_type (type_arg, tem, 0, &type);
- return value_from_longest (type, low);
- case ATR_LAST:
- high = ada_array_bound_from_type (type_arg, tem, 1, &type);
- return value_from_longest (type, high);
- case ATR_LENGTH:
- low = ada_array_bound_from_type (type_arg, tem, 0, &type);
- high = ada_array_bound_from_type (type_arg, tem, 1, NULL);
- return value_from_longest (type, high-low+1);
- }
- }
- }
-
- case ATR_TAG:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return
- value_zero (ada_tag_type (arg1), not_lval);
-
- return ada_value_tag (arg1);
-
- case ATR_MIN:
- case ATR_MAX:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
- else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (VALUE_TYPE (arg1), not_lval);
- else
- return value_binop (arg1, arg2,
- atr == ATR_MIN ? BINOP_MIN : BINOP_MAX);
-
- case ATR_MODULUS:
- {
- struct type* type_arg = exp->elts[pc + 5].type;
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- *pos += 4;
-
- if (noside == EVAL_SKIP)
- goto nosideret;
-
- if (! ada_is_modular_type (type_arg))
- error ("'modulus must be applied to modular type");
-
- return value_from_longest (TYPE_TARGET_TYPE (type_arg),
- ada_modulus (type_arg));
- }
-
-
- case ATR_POS:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
- else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (builtin_type_ada_int, not_lval);
- else
- return value_pos_atr (arg1);
-
- case ATR_SIZE:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
- else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (builtin_type_ada_int, not_lval);
- else
- return value_from_longest (builtin_type_ada_int,
- TARGET_CHAR_BIT
- * TYPE_LENGTH (VALUE_TYPE (arg1)));
-
- case ATR_VAL:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- type = exp->elts[pc + 5].type;
- if (noside == EVAL_SKIP)
- goto nosideret;
- else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (type, not_lval);
- else
- return value_val_atr (type, arg1);
- } */
+
+ case OP_ATR_POS:
+ evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (builtin_type_ada_int, not_lval);
+ else
+ return value_pos_atr (arg1);
+
+ case OP_ATR_SIZE:
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (builtin_type_ada_int, not_lval);
+ else
+ return value_from_longest (builtin_type_ada_int,
+ TARGET_CHAR_BIT
+ * TYPE_LENGTH (VALUE_TYPE (arg1)));
+
+ case OP_ATR_VAL:
+ evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ type = exp->elts[pc + 2].type;
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+ else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (type, not_lval);
+ else
+ return value_val_atr (type, arg1);
+
case BINOP_EXP:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (binop_user_defined_p (op, arg1, arg2))
- return unwrap_value (value_x_binop (arg1, arg2, op, OP_NULL,
- EVAL_NORMAL));
+ goto nosideret;
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (VALUE_TYPE (arg1), not_lval);
+ return value_zero (VALUE_TYPE (arg1), not_lval);
else
- return value_binop (arg1, arg2, op);
+ return value_binop (arg1, arg2, op);
case UNOP_PLUS:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
- if (unop_user_defined_p (op, arg1))
- return unwrap_value (value_x_unop (arg1, op, EVAL_NORMAL));
+ goto nosideret;
else
- return arg1;
+ return arg1;
case UNOP_ABS:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
+ goto nosideret;
if (value_less (arg1, value_zero (VALUE_TYPE (arg1), not_lval)))
- return value_neg (arg1);
+ return value_neg (arg1);
else
- return arg1;
+ return arg1;
case UNOP_IND:
if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
- expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
+ expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
arg1 = evaluate_subexp (expect_type, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
+ goto nosideret;
type = check_typedef (VALUE_TYPE (arg1));
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- {
- if (ada_is_array_descriptor (type))
- /* GDB allows dereferencing GNAT array descriptors. */
- {
- struct type *arrType = ada_type_of_array (arg1, 0);
- if (arrType == NULL)
- error ("Attempt to dereference null array pointer.");
- return value_at_lazy (arrType, 0, NULL);
- }
- else if (TYPE_CODE (type) == TYPE_CODE_PTR
- || TYPE_CODE (type) == TYPE_CODE_REF
- /* In C you can dereference an array to get the 1st elt. */
- || TYPE_CODE (type) == TYPE_CODE_ARRAY)
- return
- value_zero
- (to_static_fixed_type
- (ada_aligned_type (check_typedef (TYPE_TARGET_TYPE (type)))),
- lval_memory);
- else if (TYPE_CODE (type) == TYPE_CODE_INT)
- /* GDB allows dereferencing an int. */
- return value_zero (builtin_type_int, lval_memory);
- else
- error ("Attempt to take contents of a non-pointer value.");
- }
- arg1 = ada_coerce_ref (arg1);
+ {
+ if (ada_is_array_descriptor_type (type))
+ /* GDB allows dereferencing GNAT array descriptors. */
+ {
+ struct type *arrType = ada_type_of_array (arg1, 0);
+ if (arrType == NULL)
+ error ("Attempt to dereference null array pointer.");
+ return value_at_lazy (arrType, 0, NULL);
+ }
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR
+ || TYPE_CODE (type) == TYPE_CODE_REF
+ /* In C you can dereference an array to get the 1st elt. */
+ || TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ return
+ value_zero
+ (to_static_fixed_type
+ (ada_aligned_type (check_typedef (TYPE_TARGET_TYPE (type)))),
+ lval_memory);
+ else if (TYPE_CODE (type) == TYPE_CODE_INT)
+ /* GDB allows dereferencing an int. */
+ return value_zero (builtin_type_int, lval_memory);
+ else
+ error ("Attempt to take contents of a non-pointer value.");
+ }
+ arg1 = ada_coerce_ref (arg1); /* FIXME: What is this for?? */
type = check_typedef (VALUE_TYPE (arg1));
- if (ada_is_array_descriptor (type))
- /* GDB allows dereferencing GNAT array descriptors. */
- return ada_coerce_to_simple_array (arg1);
+ if (ada_is_array_descriptor_type (type))
+ /* GDB allows dereferencing GNAT array descriptors. */
+ return ada_coerce_to_simple_array (arg1);
else
- return ada_value_ind (arg1);
+ return ada_value_ind (arg1);
case STRUCTOP_STRUCT:
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
- goto nosideret;
+ goto nosideret;
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (ada_aligned_type
- (ada_lookup_struct_elt_type (VALUE_TYPE (arg1),
- &exp->elts[pc +
- 2].string,
- 0, NULL)),
- lval_memory);
+ {
+ struct type *type1 = VALUE_TYPE (arg1);
+ if (ada_is_tagged_type (type1, 1))
+ {
+ type = ada_lookup_struct_elt_type (type1,
+ &exp->elts[pc + 2].string,
+ 1, 1, NULL);
+ if (type == NULL)
+ /* In this case, we assume that the field COULD exist
+ in some extension of the type. Return an object of
+ "type" void, which will match any formal
+ (see ada_type_match). */
+ return value_zero (builtin_type_void, lval_memory);
+ }
+ else
+ type =
+ ada_lookup_struct_elt_type (type1, &exp->elts[pc + 2].string, 1,
+ 0, NULL);
+
+ return value_zero (ada_aligned_type (type), lval_memory);
+ }
else
- return unwrap_value (ada_value_struct_elt (arg1,
- &exp->elts[pc + 2].string,
- "record"));
+ return
+ ada_to_fixed_value (unwrap_value
+ (ada_value_struct_elt
+ (arg1, &exp->elts[pc + 2].string, "record")));
case OP_TYPE:
- /* The value is not supposed to be used. This is here to make it
- easier to accommodate expressions that contain types. */
+ /* The value is not supposed to be used. This is here to make it
+ easier to accommodate expressions that contain types. */
(*pos) += 2;
if (noside == EVAL_SKIP)
- goto nosideret;
+ goto nosideret;
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return allocate_value (builtin_type_void);
+ return allocate_value (builtin_type_void);
else
- error ("Attempt to use a type name as an expression");
-
- case STRUCTOP_PTR:
- tem = longest_to_int (exp->elts[pc + 1].longconst);
- (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (ada_aligned_type
- (ada_lookup_struct_elt_type (VALUE_TYPE (arg1),
- &exp->elts[pc +
- 2].string,
- 0, NULL)),
- lval_memory);
- else
- return unwrap_value (ada_value_struct_elt (arg1,
- &exp->elts[pc + 2].string,
- "record access"));
+ error ("Attempt to use a type name as an expression");
}
nosideret:
@@ -7565,11 +9467,11 @@ nosideret:
}
- /* Fixed point */
+ /* Fixed point */
/* If TYPE encodes an Ada fixed-point type, return the suffix of the
type name that encodes the 'small and 'delta information.
- Otherwise, return NULL. */
+ Otherwise, return NULL. */
static const char *
fixed_type_info (struct type *type)
@@ -7581,9 +9483,9 @@ fixed_type_info (struct type *type)
{
const char *tail = strstr (name, "___XF_");
if (tail == NULL)
- return NULL;
+ return NULL;
else
- return tail + 5;
+ return tail + 5;
}
else if (code == TYPE_CODE_RANGE && TYPE_TARGET_TYPE (type) != type)
return fixed_type_info (TYPE_TARGET_TYPE (type));
@@ -7591,7 +9493,7 @@ fixed_type_info (struct type *type)
return NULL;
}
-/* Returns non-zero iff TYPE represents an Ada fixed-point type. */
+/* Returns non-zero iff TYPE represents an Ada fixed-point type. */
int
ada_is_fixed_point_type (struct type *type)
@@ -7599,9 +9501,18 @@ ada_is_fixed_point_type (struct type *type)
return fixed_type_info (type) != NULL;
}
+/* Return non-zero iff TYPE represents a System.Address type. */
+
+int
+ada_is_system_address_type (struct type *type)
+{
+ return (TYPE_NAME (type)
+ && strcmp (TYPE_NAME (type), "system__address") == 0);
+}
+
/* Assuming that TYPE is the representation of an Ada fixed-point
type, return its delta, or -1 if the type is malformed and the
- delta cannot be determined. */
+ delta cannot be determined. */
DOUBLEST
ada_delta (struct type *type)
@@ -7616,7 +9527,7 @@ ada_delta (struct type *type)
}
/* Assuming that ada_is_fixed_point_type (TYPE), return the scaling
- factor ('SMALL value) associated with the type. */
+ factor ('SMALL value) associated with the type. */
static DOUBLEST
scaling_factor (struct type *type)
@@ -7637,7 +9548,7 @@ scaling_factor (struct type *type)
/* Assuming that X is the representation of a value of fixed-point
- type TYPE, return its floating-point equivalent. */
+ type TYPE, return its floating-point equivalent. */
DOUBLEST
ada_fixed_to_float (struct type *type, LONGEST x)
@@ -7645,8 +9556,8 @@ ada_fixed_to_float (struct type *type, LONGEST x)
return (DOUBLEST) x *scaling_factor (type);
}
-/* The representation of a fixed-point value of type TYPE
- corresponding to the value X. */
+/* The representation of a fixed-point value of type TYPE
+ corresponding to the value X. */
LONGEST
ada_float_to_fixed (struct type *type, DOUBLEST x)
@@ -7655,10 +9566,11 @@ ada_float_to_fixed (struct type *type, DOUBLEST x)
}
- /* VAX floating formats */
+ /* VAX floating formats */
/* Non-zero iff TYPE represents one of the special VAX floating-point
- types. */
+ types. */
+
int
ada_is_vax_floating_type (struct type *type)
{
@@ -7667,21 +9579,23 @@ ada_is_vax_floating_type (struct type *type)
return
name_len > 6
&& (TYPE_CODE (type) == TYPE_CODE_INT
- || TYPE_CODE (type) == TYPE_CODE_RANGE)
- && DEPRECATED_STREQN (ada_type_name (type) + name_len - 6, "___XF", 5);
+ || TYPE_CODE (type) == TYPE_CODE_RANGE)
+ && strncmp (ada_type_name (type) + name_len - 6, "___XF", 5) == 0;
}
/* The type of special VAX floating-point type this is, assuming
- ada_is_vax_floating_point */
+ ada_is_vax_floating_point. */
+
int
ada_vax_float_type_suffix (struct type *type)
{
return ada_type_name (type)[strlen (ada_type_name (type)) - 1];
}
-/* A value representing the special debugging function that outputs
+/* A value representing the special debugging function that outputs
VAX floating-point values of the type represented by TYPE. Assumes
- ada_is_vax_floating_type (TYPE). */
+ ada_is_vax_floating_type (TYPE). */
+
struct value *
ada_vax_float_print_function (struct type *type)
{
@@ -7699,17 +9613,17 @@ ada_vax_float_print_function (struct type *type)
}
- /* Range types */
+ /* Range types */
/* Scan STR beginning at position K for a discriminant name, and
return the value of that discriminant field of DVAL in *PX. If
PNEW_K is not null, put the position of the character beyond the
name scanned in *PNEW_K. Return 1 if successful; return 0 and do
- not alter *PX and *PNEW_K if unsuccessful. */
+ not alter *PX and *PNEW_K if unsuccessful. */
static int
scan_discrim_bound (char *str, int k, struct value *dval, LONGEST * px,
- int *pnew_k)
+ int *pnew_k)
{
static char *bound_buffer = NULL;
static size_t bound_buffer_len = 0;
@@ -7747,47 +9661,47 @@ scan_discrim_bound (char *str, int k, struct value *dval, LONGEST * px,
/* Value of variable named NAME in the current environment. If
no such variable found, then if ERR_MSG is null, returns 0, and
- otherwise causes an error with message ERR_MSG. */
+ otherwise causes an error with message ERR_MSG. */
+
static struct value *
get_var_value (char *name, char *err_msg)
{
- struct symbol **syms;
- struct block **blocks;
+ struct ada_symbol_info *syms;
int nsyms;
- nsyms =
- ada_lookup_symbol_list (name, get_selected_block (NULL), VAR_DOMAIN,
- &syms, &blocks);
+ nsyms = ada_lookup_symbol_list (name, get_selected_block (0), VAR_DOMAIN,
+ &syms);
if (nsyms != 1)
{
if (err_msg == NULL)
- return 0;
+ return 0;
else
- error ("%s", err_msg);
+ error ("%s", err_msg);
}
- return value_of_variable (syms[0], blocks[0]);
+ return value_of_variable (syms[0].sym, syms[0].block);
}
/* Value of integer variable named NAME in the current environment. If
- no such variable found, then if ERR_MSG is null, returns 0, and sets
- *FLAG to 0. If successful, sets *FLAG to 1. */
+ no such variable found, returns 0, and sets *FLAG to 0. If
+ successful, sets *FLAG to 1. */
+
LONGEST
-get_int_var_value (char *name, char *err_msg, int *flag)
+get_int_var_value (char *name, int *flag)
{
- struct value *var_val = get_var_value (name, err_msg);
+ struct value *var_val = get_var_value (name, 0);
if (var_val == 0)
{
if (flag != NULL)
- *flag = 0;
+ *flag = 0;
return 0;
}
else
{
if (flag != NULL)
- *flag = 1;
+ *flag = 1;
return value_as_long (var_val);
}
}
@@ -7795,18 +9709,17 @@ get_int_var_value (char *name, char *err_msg, int *flag)
/* Return a range type whose base type is that of the range type named
NAME in the current environment, and whose bounds are calculated
- from NAME according to the GNAT range encoding conventions.
+ from NAME according to the GNAT range encoding conventions.
Extract discriminant values, if needed, from DVAL. If a new type
must be created, allocate in OBJFILE's space. The bounds
information, in general, is encoded in NAME, the base type given in
- the named range type. */
+ the named range type. */
static struct type *
to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile)
{
struct type *raw_type = ada_find_any_type (name);
struct type *base_type;
- LONGEST low, high;
char *subtype_info;
if (raw_type == NULL)
@@ -7838,43 +9751,56 @@ to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile)
n = 1;
if (*subtype_info == 'L')
- {
- if (!ada_scan_number (bounds_str, n, &L, &n)
- && !scan_discrim_bound (bounds_str, n, dval, &L, &n))
- return raw_type;
- if (bounds_str[n] == '_')
- n += 2;
- else if (bounds_str[n] == '.') /* FIXME? SGI Workshop kludge. */
- n += 1;
- subtype_info += 1;
- }
+ {
+ if (!ada_scan_number (bounds_str, n, &L, &n)
+ && !scan_discrim_bound (bounds_str, n, dval, &L, &n))
+ return raw_type;
+ if (bounds_str[n] == '_')
+ n += 2;
+ else if (bounds_str[n] == '.') /* FIXME? SGI Workshop kludge. */
+ n += 1;
+ subtype_info += 1;
+ }
else
- {
- strcpy (name_buf + prefix_len, "___L");
- L = get_int_var_value (name_buf, "Index bound unknown.", NULL);
- }
+ {
+ int ok;
+ strcpy (name_buf + prefix_len, "___L");
+ L = get_int_var_value (name_buf, &ok);
+ if (!ok)
+ {
+ lim_warning ("Unknown lower bound, using 1.", 1);
+ L = 1;
+ }
+ }
if (*subtype_info == 'U')
- {
- if (!ada_scan_number (bounds_str, n, &U, &n)
- && !scan_discrim_bound (bounds_str, n, dval, &U, &n))
- return raw_type;
- }
+ {
+ if (!ada_scan_number (bounds_str, n, &U, &n)
+ && !scan_discrim_bound (bounds_str, n, dval, &U, &n))
+ return raw_type;
+ }
else
- {
- strcpy (name_buf + prefix_len, "___U");
- U = get_int_var_value (name_buf, "Index bound unknown.", NULL);
- }
+ {
+ int ok;
+ strcpy (name_buf + prefix_len, "___U");
+ U = get_int_var_value (name_buf, &ok);
+ if (!ok)
+ {
+ lim_warning ("Unknown upper bound, using %ld.", (long) L);
+ U = L;
+ }
+ }
if (objfile == NULL)
- objfile = TYPE_OBJFILE (base_type);
+ objfile = TYPE_OBJFILE (base_type);
type = create_range_type (alloc_type (objfile), base_type, L, U);
TYPE_NAME (type) = name;
return type;
}
}
-/* True iff NAME is the name of a range type. */
+/* True iff NAME is the name of a range type. */
+
int
ada_is_range_type_name (const char *name)
{
@@ -7882,31 +9808,247 @@ ada_is_range_type_name (const char *name)
}
- /* Modular types */
+ /* Modular types */
+
+/* True iff TYPE is an Ada modular type. */
-/* True iff TYPE is an Ada modular type. */
int
ada_is_modular_type (struct type *type)
{
- /* FIXME: base_type should be declared in gdbtypes.h, implemented in
- valarith.c */
- struct type *subranged_type; /* = base_type (type); */
+ struct type *subranged_type = base_type (type);
return (subranged_type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
- && TYPE_CODE (subranged_type) != TYPE_CODE_ENUM
- && TYPE_UNSIGNED (subranged_type));
+ && TYPE_CODE (subranged_type) != TYPE_CODE_ENUM
+ && TYPE_UNSIGNED (subranged_type));
}
-/* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */
+/* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */
+
LONGEST
ada_modulus (struct type * type)
{
return TYPE_HIGH_BOUND (type) + 1;
}
+ /* Operators */
+/* Information about operators given special treatment in functions
+ below. */
+/* Format: OP_DEFN (<operator>, <operator length>, <# args>, <binop>). */
+
+#define ADA_OPERATORS \
+ OP_DEFN (OP_VAR_VALUE, 4, 0, 0) \
+ OP_DEFN (BINOP_IN_BOUNDS, 3, 2, 0) \
+ OP_DEFN (TERNOP_IN_RANGE, 1, 3, 0) \
+ OP_DEFN (OP_ATR_FIRST, 1, 2, 0) \
+ OP_DEFN (OP_ATR_LAST, 1, 2, 0) \
+ OP_DEFN (OP_ATR_LENGTH, 1, 2, 0) \
+ OP_DEFN (OP_ATR_IMAGE, 1, 2, 0) \
+ OP_DEFN (OP_ATR_MAX, 1, 3, 0) \
+ OP_DEFN (OP_ATR_MIN, 1, 3, 0) \
+ OP_DEFN (OP_ATR_MODULUS, 1, 1, 0) \
+ OP_DEFN (OP_ATR_POS, 1, 2, 0) \
+ OP_DEFN (OP_ATR_SIZE, 1, 1, 0) \
+ OP_DEFN (OP_ATR_TAG, 1, 1, 0) \
+ OP_DEFN (OP_ATR_VAL, 1, 2, 0) \
+ OP_DEFN (UNOP_QUAL, 3, 1, 0) \
+ OP_DEFN (UNOP_IN_RANGE, 3, 1, 0)
+static void
+ada_operator_length (struct expression *exp, int pc, int *oplenp, int *argsp)
+{
+ switch (exp->elts[pc - 1].opcode)
+ {
+ default:
+ operator_length_standard (exp, pc, oplenp, argsp);
+ break;
- /* Operators */
+#define OP_DEFN(op, len, args, binop) \
+ case op: *oplenp = len; *argsp = args; break;
+ ADA_OPERATORS;
+#undef OP_DEFN
+ }
+}
+
+static char *
+ada_op_name (enum exp_opcode opcode)
+{
+ switch (opcode)
+ {
+ default:
+ return op_name_standard (opcode);
+#define OP_DEFN(op, len, args, binop) case op: return #op;
+ ADA_OPERATORS;
+#undef OP_DEFN
+ }
+}
+
+/* As for operator_length, but assumes PC is pointing at the first
+ element of the operator, and gives meaningful results only for the
+ Ada-specific operators. */
+
+static void
+ada_forward_operator_length (struct expression *exp, int pc,
+ int *oplenp, int *argsp)
+{
+ switch (exp->elts[pc].opcode)
+ {
+ default:
+ *oplenp = *argsp = 0;
+ break;
+#define OP_DEFN(op, len, args, binop) \
+ case op: *oplenp = len; *argsp = args; break;
+ ADA_OPERATORS;
+#undef OP_DEFN
+ }
+}
+
+static int
+ada_dump_subexp_body (struct expression *exp, struct ui_file *stream, int elt)
+{
+ enum exp_opcode op = exp->elts[elt].opcode;
+ int oplen, nargs;
+ int pc = elt;
+ int i;
+
+ ada_forward_operator_length (exp, elt, &oplen, &nargs);
+
+ switch (op)
+ {
+ /* Ada attributes ('Foo). */
+ case OP_ATR_FIRST:
+ case OP_ATR_LAST:
+ case OP_ATR_LENGTH:
+ case OP_ATR_IMAGE:
+ case OP_ATR_MAX:
+ case OP_ATR_MIN:
+ case OP_ATR_MODULUS:
+ case OP_ATR_POS:
+ case OP_ATR_SIZE:
+ case OP_ATR_TAG:
+ case OP_ATR_VAL:
+ break;
+
+ case UNOP_IN_RANGE:
+ case UNOP_QUAL:
+ fprintf_filtered (stream, "Type @");
+ gdb_print_host_address (exp->elts[pc + 1].type, stream);
+ fprintf_filtered (stream, " (");
+ type_print (exp->elts[pc + 1].type, NULL, stream, 0);
+ fprintf_filtered (stream, ")");
+ break;
+ case BINOP_IN_BOUNDS:
+ fprintf_filtered (stream, " (%d)", (int) exp->elts[pc + 2].longconst);
+ break;
+ case TERNOP_IN_RANGE:
+ break;
+
+ default:
+ return dump_subexp_body_standard (exp, stream, elt);
+ }
+
+ elt += oplen;
+ for (i = 0; i < nargs; i += 1)
+ elt = dump_subexp (exp, stream, elt);
+
+ return elt;
+}
+
+/* The Ada extension of print_subexp (q.v.). */
+
+static void
+ada_print_subexp (struct expression *exp, int *pos,
+ struct ui_file *stream, enum precedence prec)
+{
+ int oplen, nargs;
+ int pc = *pos;
+ enum exp_opcode op = exp->elts[pc].opcode;
+
+ ada_forward_operator_length (exp, pc, &oplen, &nargs);
+
+ switch (op)
+ {
+ default:
+ print_subexp_standard (exp, pos, stream, prec);
+ return;
+
+ case OP_VAR_VALUE:
+ *pos += oplen;
+ fputs_filtered (SYMBOL_NATURAL_NAME (exp->elts[pc + 2].symbol), stream);
+ return;
+
+ case BINOP_IN_BOUNDS:
+ *pos += oplen;
+ print_subexp (exp, pos, stream, PREC_SUFFIX);
+ fputs_filtered (" in ", stream);
+ print_subexp (exp, pos, stream, PREC_SUFFIX);
+ fputs_filtered ("'range", stream);
+ if (exp->elts[pc + 1].longconst > 1)
+ fprintf_filtered (stream, "(%ld)",
+ (long) exp->elts[pc + 1].longconst);
+ return;
+
+ case TERNOP_IN_RANGE:
+ *pos += oplen;
+ if (prec >= PREC_EQUAL)
+ fputs_filtered ("(", stream);
+ print_subexp (exp, pos, stream, PREC_SUFFIX);
+ fputs_filtered (" in ", stream);
+ print_subexp (exp, pos, stream, PREC_EQUAL);
+ fputs_filtered (" .. ", stream);
+ print_subexp (exp, pos, stream, PREC_EQUAL);
+ if (prec >= PREC_EQUAL)
+ fputs_filtered (")", stream);
+ return;
+
+ case OP_ATR_FIRST:
+ case OP_ATR_LAST:
+ case OP_ATR_LENGTH:
+ case OP_ATR_IMAGE:
+ case OP_ATR_MAX:
+ case OP_ATR_MIN:
+ case OP_ATR_MODULUS:
+ case OP_ATR_POS:
+ case OP_ATR_SIZE:
+ case OP_ATR_TAG:
+ case OP_ATR_VAL:
+ *pos += oplen;
+ if (exp->elts[*pos].opcode == OP_TYPE)
+ {
+ if (TYPE_CODE (exp->elts[*pos + 1].type) != TYPE_CODE_VOID)
+ LA_PRINT_TYPE (exp->elts[*pos + 1].type, "", stream, 0, 0);
+ *pos += 3;
+ }
+ else
+ print_subexp (exp, pos, stream, PREC_SUFFIX);
+ fprintf_filtered (stream, "'%s", ada_attribute_name (op));
+ if (nargs > 1)
+ {
+ int tem;
+ for (tem = 1; tem < nargs; tem += 1)
+ {
+ fputs_filtered ((tem == 1) ? " (" : ", ", stream);
+ print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
+ }
+ fputs_filtered (")", stream);
+ }
+ return;
+
+ case UNOP_QUAL:
+ *pos += oplen;
+ type_print (exp->elts[pc + 1].type, "", stream, 0);
+ fputs_filtered ("'(", stream);
+ print_subexp (exp, pos, stream, PREC_PREFIX);
+ fputs_filtered (")", stream);
+ return;
+
+ case UNOP_IN_RANGE:
+ *pos += oplen;
+ print_subexp (exp, pos, stream, PREC_SUFFIX);
+ fputs_filtered (" in ", stream);
+ LA_PRINT_TYPE (exp->elts[pc + 1].type, "", stream, 1, 0);
+ return;
+ }
+}
/* Table mapping opcodes into strings for printing operators
and precedences of the operators. */
@@ -7940,12 +10082,13 @@ static const struct op_print ada_op_print_tab[] = {
{"not ", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"not ", UNOP_COMPLEMENT, PREC_PREFIX, 0},
{"abs ", UNOP_ABS, PREC_PREFIX, 0},
- {".all", UNOP_IND, PREC_SUFFIX, 1}, /* FIXME: postfix .ALL */
- {"'access", UNOP_ADDR, PREC_SUFFIX, 1}, /* FIXME: postfix 'ACCESS */
+ {".all", UNOP_IND, PREC_SUFFIX, 1},
+ {"'access", UNOP_ADDR, PREC_SUFFIX, 1},
+ {"'size", OP_ATR_SIZE, PREC_SUFFIX, 1},
{NULL, 0, 0, 0}
};
- /* Assorted Types and Interfaces */
+ /* Assorted Types and Interfaces */
struct type *builtin_type_ada_int;
struct type *builtin_type_ada_short;
@@ -7961,7 +10104,6 @@ struct type *builtin_type_ada_system_address;
struct type **const (ada_builtin_types[]) =
{
-
&builtin_type_ada_int,
&builtin_type_ada_long,
&builtin_type_ada_short,
@@ -7971,7 +10113,7 @@ struct type **const (ada_builtin_types[]) =
&builtin_type_ada_long_long,
&builtin_type_ada_long_double,
&builtin_type_ada_natural, &builtin_type_ada_positive,
- /* The following types are carried over from C for convenience. */
+ /* The following types are carried over from C for convenience. */
&builtin_type_int,
&builtin_type_long,
&builtin_type_short,
@@ -7989,112 +10131,136 @@ struct type **const (ada_builtin_types[]) =
&builtin_type_long_double,
&builtin_type_complex, &builtin_type_double_complex, 0};
-/* Not really used, but needed in the ada_language_defn. */
+/* Not really used, but needed in the ada_language_defn. */
+
static void
emit_char (int c, struct ui_file *stream, int quoter)
{
ada_emit_char (c, stream, quoter, 1);
}
+static int
+parse (void)
+{
+ warnings_issued = 0;
+ return ada_parse ();
+}
+
+static const struct exp_descriptor ada_exp_descriptor = {
+ ada_print_subexp,
+ ada_operator_length,
+ ada_op_name,
+ ada_dump_subexp_body,
+ ada_evaluate_subexp
+};
+
const struct language_defn ada_language_defn = {
- "ada", /* Language name */
- /* language_ada, */
- language_unknown,
- /* FIXME: language_ada should be defined in defs.h */
+ "ada", /* Language name */
+ language_ada,
ada_builtin_types,
range_check_off,
type_check_off,
- case_sensitive_on, /* Yes, Ada is case-insensitive, but
- * that's not quite what this means. */
- ada_parse,
+ case_sensitive_on, /* Yes, Ada is case-insensitive, but
+ that's not quite what this means. */
+#ifdef GNAT_GDB
+ ada_lookup_symbol,
+ ada_lookup_minimal_symbol,
+#endif /* GNAT_GDB */
+ array_row_major,
+ &ada_exp_descriptor,
+ parse,
ada_error,
- ada_evaluate_subexp,
- ada_printchar, /* Print a character constant */
- ada_printstr, /* Function to print string constant */
- emit_char, /* Function to print single char (not used) */
- ada_create_fundamental_type, /* Create fundamental type in this language */
- ada_print_type, /* Print a type using appropriate syntax */
- ada_val_print, /* Print a value using appropriate syntax */
- ada_value_print, /* Print a top-level value */
- NULL, /* Language specific skip_trampoline */
- value_of_this, /* value_of_this */
- basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
- basic_lookup_transparent_type,/* lookup_transparent_type */
- NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
-#if 0
- {"8#%lo#", "8#", "o", "#"}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"16#%lx#", "16#", "x", "#"}, /* Hex format info */
-#else
- /* Copied from c-lang.c. */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
-#endif
- ada_op_print_tab, /* expression operators for printing */
- 1, /* c-style arrays (FIXME?) */
- 0, /* String lower bound (FIXME?) */
+ resolve,
+ ada_printchar, /* Print a character constant */
+ ada_printstr, /* Function to print string constant */
+ emit_char, /* Function to print single char (not used) */
+ ada_create_fundamental_type, /* Create fundamental type in this language */
+ ada_print_type, /* Print a type using appropriate syntax */
+ ada_val_print, /* Print a value using appropriate syntax */
+ ada_value_print, /* Print a top-level value */
+ NULL, /* Language specific skip_trampoline */
+ NULL, /* value_of_this */
+ ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */
+ basic_lookup_transparent_type, /* lookup_transparent_type */
+ ada_la_decode, /* Language specific symbol demangler */
+ NULL, /* Language specific class_name_from_physname */
+ ada_op_print_tab, /* expression operators for printing */
+ 0, /* c-style arrays */
+ 1, /* String lower bound */
&builtin_type_ada_char,
- default_word_break_characters,
+ ada_get_gdb_completer_word_break_characters,
+#ifdef GNAT_GDB
+ ada_translate_error_message, /* Substitute Ada-specific terminology
+ in errors and warnings. */
+#endif /* GNAT_GDB */
LANG_MAGIC
};
-void
-_initialize_ada_language (void)
+static void
+build_ada_types (struct gdbarch *current_gdbarch)
{
builtin_type_ada_int =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "integer", (struct objfile *) NULL);
+ 0, "integer", (struct objfile *) NULL);
builtin_type_ada_long =
init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_integer", (struct objfile *) NULL);
+ 0, "long_integer", (struct objfile *) NULL);
builtin_type_ada_short =
init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0, "short_integer", (struct objfile *) NULL);
+ 0, "short_integer", (struct objfile *) NULL);
builtin_type_ada_char =
init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0, "character", (struct objfile *) NULL);
+ 0, "character", (struct objfile *) NULL);
builtin_type_ada_float =
init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
- 0, "float", (struct objfile *) NULL);
+ 0, "float", (struct objfile *) NULL);
builtin_type_ada_double =
init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_float", (struct objfile *) NULL);
+ 0, "long_float", (struct objfile *) NULL);
builtin_type_ada_long_long =
init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_long_integer", (struct objfile *) NULL);
+ 0, "long_long_integer", (struct objfile *) NULL);
builtin_type_ada_long_double =
init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_long_float", (struct objfile *) NULL);
+ 0, "long_long_float", (struct objfile *) NULL);
builtin_type_ada_natural =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "natural", (struct objfile *) NULL);
+ 0, "natural", (struct objfile *) NULL);
builtin_type_ada_positive =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "positive", (struct objfile *) NULL);
+ 0, "positive", (struct objfile *) NULL);
builtin_type_ada_system_address =
lookup_pointer_type (init_type (TYPE_CODE_VOID, 1, 0, "void",
- (struct objfile *) NULL));
+ (struct objfile *) NULL));
TYPE_NAME (builtin_type_ada_system_address) = "system__address";
+}
+void
+_initialize_ada_language (void)
+{
+
+ build_ada_types (current_gdbarch);
+ gdbarch_data_register_post_init (build_ada_types);
add_language (&ada_language_defn);
- add_show_from_set
- (add_set_cmd ("varsize-limit", class_support, var_uinteger,
- (char *) &varsize_limit,
- "Set maximum bytes in dynamic-sized object.",
- &setlist), &showlist);
varsize_limit = 65536;
+#ifdef GNAT_GDB
+ add_setshow_uinteger_cmd ("varsize-limit", class_support,
+ &varsize_limit, "\
+Set the maximum number of bytes allowed in a dynamic-sized object.", "\
+Show the maximum number of bytes allowed in a dynamic-sized object.",
+ NULL, NULL, &setlist, &showlist);
+ obstack_init (&cache_space);
+#endif /* GNAT_GDB */
- add_com ("begin", class_breakpoint, begin_command,
- "Start the debugged program, stopping at the beginning of the\n\
-main program. You may specify command-line arguments to give it, as for\n\
-the \"run\" command (q.v.).");
-}
+ obstack_init (&symbol_list_obstack);
+ decoded_names_store = htab_create_alloc
+ (256, htab_hash_string, (int (*)(const void *, const void *)) streq,
+ NULL, xcalloc, xfree);
+}
/* Create a fundamental Ada type using default reasonable for the current
target machine.
@@ -8130,104 +10296,104 @@ ada_create_fundamental_type (struct objfile *objfile, int typeid)
/* FIXME: For now, if we are asked to produce a type not in this
language, create the equivalent of a C integer type with the
name "<?type?>". When all the dust settles from the type
- reconstruction work, this should probably become an error. */
+ reconstruction work, this should probably become an error. */
type = init_type (TYPE_CODE_INT,
- TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "<?type?>", objfile);
+ TARGET_INT_BIT / TARGET_CHAR_BIT,
+ 0, "<?type?>", objfile);
warning ("internal error: no Ada fundamental type %d", typeid);
break;
case FT_VOID:
type = init_type (TYPE_CODE_VOID,
- TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0, "void", objfile);
+ TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0, "void", objfile);
break;
case FT_CHAR:
type = init_type (TYPE_CODE_INT,
- TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0, "character", objfile);
+ TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0, "character", objfile);
break;
case FT_SIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
- TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0, "signed char", objfile);
+ TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0, "signed char", objfile);
break;
case FT_UNSIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
- TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
+ TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
break;
case FT_SHORT:
type = init_type (TYPE_CODE_INT,
- TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0, "short_integer", objfile);
+ TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+ 0, "short_integer", objfile);
break;
case FT_SIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
- TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0, "short_integer", objfile);
+ TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+ 0, "short_integer", objfile);
break;
case FT_UNSIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
- TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
+ TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
break;
case FT_INTEGER:
type = init_type (TYPE_CODE_INT,
- TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "integer", objfile);
+ TARGET_INT_BIT / TARGET_CHAR_BIT,
+ 0, "integer", objfile);
break;
case FT_SIGNED_INTEGER:
- type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "integer", objfile); /* FIXME -fnf */
+ type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "integer", objfile); /* FIXME -fnf */
break;
case FT_UNSIGNED_INTEGER:
type = init_type (TYPE_CODE_INT,
- TARGET_INT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
+ TARGET_INT_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
break;
case FT_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_integer", objfile);
+ TARGET_LONG_BIT / TARGET_CHAR_BIT,
+ 0, "long_integer", objfile);
break;
case FT_SIGNED_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_integer", objfile);
+ TARGET_LONG_BIT / TARGET_CHAR_BIT,
+ 0, "long_integer", objfile);
break;
case FT_UNSIGNED_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
+ TARGET_LONG_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
break;
case FT_LONG_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_long_integer", objfile);
+ TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+ 0, "long_long_integer", objfile);
break;
case FT_SIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_long_integer", objfile);
+ TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+ 0, "long_long_integer", objfile);
break;
case FT_UNSIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
- TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
+ TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
break;
case FT_FLOAT:
type = init_type (TYPE_CODE_FLT,
- TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
- 0, "float", objfile);
+ TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
+ 0, "float", objfile);
break;
case FT_DBL_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
- TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_float", objfile);
+ TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "long_float", objfile);
break;
case FT_EXT_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
- TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_long_float", objfile);
+ TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "long_long_float", objfile);
break;
}
return (type);
@@ -8239,16 +10405,16 @@ ada_dump_symtab (struct symtab *s)
int i;
fprintf (stderr, "New symtab: [\n");
fprintf (stderr, " Name: %s/%s;\n",
- s->dirname ? s->dirname : "?", s->filename ? s->filename : "?");
+ s->dirname ? s->dirname : "?", s->filename ? s->filename : "?");
fprintf (stderr, " Format: %s;\n", s->debugformat);
if (s->linetable != NULL)
{
fprintf (stderr, " Line table (section %d):\n", s->block_line_section);
for (i = 0; i < s->linetable->nitems; i += 1)
- {
- struct linetable_entry *e = s->linetable->item + i;
- fprintf (stderr, " %4ld: %8lx\n", (long) e->line, (long) e->pc);
- }
+ {
+ struct linetable_entry *e = s->linetable->item + i;
+ fprintf (stderr, " %4ld: %8lx\n", (long) e->line, (long) e->pc);
+ }
}
fprintf (stderr, "]\n");
}
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 54e56bb0529..12eaf4bcb3f 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -1,5 +1,6 @@
/* Ada language support definitions for GDB, the GNU debugger.
- Copyright 1992, 1997 Free Software Foundation, Inc.
+ Copyright 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,132 +22,141 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define ADA_LANG_H 1
struct partial_symbol;
+struct frame_info;
#include "value.h"
#include "gdbtypes.h"
+#include "breakpoint.h"
+
+/* Names of specific files known to be part of the runtime
+ system and that might consider (confusing) debugging information.
+ Each name (a basic regular expression string) is followed by a
+ comma. FIXME: Should be part of a configuration file. */
+#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
+#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
+ "^[agis]-.*\\.ad[bs]$", \
+ "/usr/shlib/libpthread\\.so",
+#elif defined (__linux__)
+#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
+ "^[agis]-.*\\.ad[bs]$", \
+ "/lib.*/libpthread\\.so[.0-9]*$", "/lib.*/libpthread\\.a$", \
+ "/lib.*/libc\\.so[.0-9]*$", "/lib.*/libc\\.a$",
+#endif
-struct block;
+#if !defined (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS)
+#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
+ "^[agis]-.*\\.ad[bs]$",
+#endif
+
+/* Names of compiler-generated auxiliary functions probably of no
+ interest to users. Each name (a basic regular expression string)
+ is followed by a comma. */
+#define ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS \
+ "___clean[.a-zA-Z0-9_]*$",
-/* A macro to reorder the bytes of an address depending on the
- endiannes of the target. */
-#define EXTRACT_ADDRESS(x) ((void *) extract_unsigned_integer (&(x), sizeof (x)))
-/* A macro to reorder the bytes of an int depending on the endiannes
- of the target */
-#define EXTRACT_INT(x) ((int) extract_signed_integer (&(x), sizeof (x)))
+/* The maximum number of frame levels searched for non-local,
+ * non-global symbols. This limit exists as a precaution to prevent
+ * infinite search loops when the stack is screwed up. */
+#define MAX_ENCLOSING_FRAME_LEVELS 7
-/* Chain of cleanups for arguments of OP_UNRESOLVED_VALUE names. Created in
- yyparse and freed in ada_resolve. */
-extern struct cleanup *unresolved_names;
+/* Maximum number of steps followed in looking for the ultimate
+ referent of a renaming. This prevents certain infinite loops that
+ can otherwise result. */
+#define MAX_RENAMING_CHAIN_LENGTH 10
-/* Corresponding mangled/demangled names and opcodes for Ada user-definable
+struct block;
+
+/* Corresponding encoded/decoded names and opcodes for Ada user-definable
operators. */
struct ada_opname_map
{
- const char *mangled;
- const char *demangled;
+ const char *encoded;
+ const char *decoded;
enum exp_opcode op;
};
-/* Table of Ada operators in mangled and demangled forms. */
+/* Table of Ada operators in encoded and decoded forms. */
/* Defined in ada-lang.c */
extern const struct ada_opname_map ada_opname_table[];
-/* The maximum number of tasks known to the Ada runtime */
-extern const int MAX_NUMBER_OF_KNOWN_TASKS;
-
-/* Identifiers for Ada attributes that need special processing. Be sure
- to update the table attribute_names in ada-lang.c whenever you change this.
- */
-
-enum ada_attribute
-{
- /* Invalid attribute for error checking. */
- ATR_INVALID,
-
- ATR_FIRST,
- ATR_LAST,
- ATR_LENGTH,
- ATR_IMAGE,
- ATR_IMG,
- ATR_MAX,
- ATR_MIN,
- ATR_MODULUS,
- ATR_POS,
- ATR_SIZE,
- ATR_TAG,
- ATR_VAL,
-
- /* Dummy last attribute. */
- ATR_END
+enum ada_operator
+ {
+ /* X IN A'RANGE(N). N is an immediate operand, surrounded by
+ BINOP_IN_BOUNDS before and after. A is an array, X an index
+ value. Evaluates to true iff X is within range of the Nth
+ dimension (1-based) of A. (A multi-dimensional array
+ type is represented as array of array of ...) */
+ BINOP_IN_BOUNDS = OP_EXTENDED0,
+
+ /* X IN L .. U. True iff L <= X <= U. */
+ TERNOP_IN_RANGE,
+
+ /* Ada attributes ('Foo). */
+ OP_ATR_FIRST,
+ OP_ATR_LAST,
+ OP_ATR_LENGTH,
+ OP_ATR_IMAGE,
+ OP_ATR_MAX,
+ OP_ATR_MIN,
+ OP_ATR_MODULUS,
+ OP_ATR_POS,
+ OP_ATR_SIZE,
+ OP_ATR_TAG,
+ OP_ATR_VAL,
+
+ /* Ada type qualification. It is encoded as for UNOP_CAST, above,
+ and denotes the TYPE'(EXPR) construct. */
+ UNOP_QUAL,
+
+ /* X IN TYPE. The `TYPE' argument is immediate, with
+ UNOP_IN_RANGE before and after it. True iff X is a member of
+ type TYPE (typically a subrange). */
+ UNOP_IN_RANGE,
+
+ /* End marker */
+ OP_ADA_LAST
+ };
+
+/* A triple, (symbol, block, symtab), representing one instance of a
+ * symbol-lookup operation. */
+struct ada_symbol_info {
+ struct symbol* sym;
+ struct block* block;
+ struct symtab* symtab;
};
-enum task_states
-{
- Unactivated,
- Runnable,
- Terminated,
- Activator_Sleep,
- Acceptor_Sleep,
- Entry_Caller_Sleep,
- Async_Select_Sleep,
- Delay_Sleep,
- Master_Completion_Sleep,
- Master_Phase_2_Sleep
-};
-
-extern char *ada_task_states[];
+/* Ada task structures. */
-typedef struct
-{
- char *P_ARRAY;
- int *P_BOUNDS;
-}
-fat_string;
+/* Ada task control block, as defined in the GNAT runt-time library. */
-typedef struct entry_call
+struct task_control_block
{
- void *self;
-}
- *entry_call_link;
-
-struct task_fields
-{
- int entry_num;
-#if (defined (VXWORKS_TARGET) || !defined (i386)) \
- && !(defined (VXWORKS_TARGET) && defined (M68K_TARGET))
- int pad1;
-#endif
char state;
-#if (defined (VXWORKS_TARGET) && defined (M68K_TARGET))
- char pad_8bits;
-#endif
- void *parent;
+ CORE_ADDR parent;
int priority;
- int current_priority;
- fat_string image;
- entry_call_link call;
-#if (defined (sun) && defined (__SVR4)) && !defined (VXWORKS_TARGET)
- int pad2;
- unsigned thread;
- unsigned lwp;
-#else
- void *thread;
- void *lwp;
-#endif
-}
-#if (defined (VXWORKS_TARGET) && defined (M68K_TARGET))
-__attribute__ ((packed))
-#endif
- ;
+ char image [32];
+ int image_len; /* This field is not always present in the ATCB. */
+ CORE_ADDR call;
+ CORE_ADDR thread;
+ CORE_ADDR lwp; /* This field is not always present in the ATCB. */
+};
+
+struct task_ptid
+{
+ int pid; /* The Process id */
+ long lwp; /* The Light Weight Process id */
+ long tid; /* The Thread id */
+};
+typedef struct task_ptid task_ptid_t;
struct task_entry
{
- void *task_id;
+ CORE_ADDR task_id;
+ struct task_control_block atcb;
int task_num;
int known_tasks_index;
struct task_entry *next_task;
- void *thread;
- void *lwp;
+ task_ptid_t task_ptid;
int stack_per;
};
@@ -162,33 +172,44 @@ extern struct type *builtin_type_ada_natural;
extern struct type *builtin_type_ada_positive;
extern struct type *builtin_type_ada_system_address;
-/* Assuming V points to an array of S objects, make sure that it contains at
+/* The maximum number of tasks known to the Ada runtime. */
+extern const int MAX_NUMBER_OF_KNOWN_TASKS;
+
+/* task entry list. */
+extern struct task_entry *task_list;
+
+
+/* Assuming V points to an array of S objects, make sure that it contains at
least M objects, updating V and S as necessary. */
-#define GROW_VECT(v, s, m) \
+#define GROW_VECT(v, s, m) \
if ((s) < (m)) grow_vect ((void**) &(v), &(s), (m), sizeof(*(v)));
extern void grow_vect (void **, size_t *, size_t, int);
-extern int ada_parse (void); /* Defined in ada-exp.y */
+extern int ada_get_field_index (const struct type *type,
+ const char *field_name,
+ int maybe_missing);
+
+extern int ada_parse (void); /* Defined in ada-exp.y */
-extern void ada_error (char *); /* Defined in ada-exp.y */
+extern void ada_error (char *); /* Defined in ada-exp.y */
- /* Defined in ada-typeprint.c */
+ /* Defined in ada-typeprint.c */
extern void ada_print_type (struct type *, char *, struct ui_file *, int,
- int);
+ int);
extern int ada_val_print (struct type *, char *, int, CORE_ADDR,
- struct ui_file *, int, int, int,
- enum val_prettyprint);
+ struct ui_file *, int, int, int,
+ enum val_prettyprint);
extern int ada_value_print (struct value *, struct ui_file *, int,
- enum val_prettyprint);
+ enum val_prettyprint);
- /* Defined in ada-lang.c */
+ /* Defined in ada-lang.c */
extern struct value *value_from_contents_and_address (struct type *, char *,
- CORE_ADDR);
+ CORE_ADDR);
extern void ada_emit_char (int, struct ui_file *, int, int);
@@ -197,10 +218,10 @@ extern void ada_printchar (int, struct ui_file *);
extern void ada_printstr (struct ui_file *, char *, unsigned int, int, int);
extern void ada_convert_actuals (struct value *, int, struct value **,
- CORE_ADDR *);
+ CORE_ADDR *);
extern struct value *ada_value_subscript (struct value *, int,
- struct value **);
+ struct value **);
extern struct type *ada_array_element_type (struct type *, int);
@@ -208,13 +229,11 @@ extern int ada_array_arity (struct type *);
struct type *ada_type_of_array (struct value *, int);
-extern struct value *ada_coerce_to_simple_array (struct value *);
-
extern struct value *ada_coerce_to_simple_array_ptr (struct value *);
-extern int ada_is_simple_array (struct type *);
+extern int ada_is_simple_array_type (struct type *);
-extern int ada_is_array_descriptor (struct type *);
+extern int ada_is_array_descriptor_type (struct type *);
extern int ada_is_bogus_array_descriptor (struct type *);
@@ -222,34 +241,43 @@ extern struct type *ada_index_type (struct type *, int);
extern struct value *ada_array_bound (struct value *, int, int);
-extern int ada_lookup_symbol_list (const char *, struct block *,
- domain_enum, struct symbol ***,
- struct block ***);
+extern char *ada_decode_symbol (const struct general_symbol_info*);
-extern char *ada_fold_name (const char *);
+extern const char *ada_decode (const char*);
-extern struct symbol *ada_lookup_symbol (const char *, struct block *,
- domain_enum);
+extern enum language ada_update_initial_language (enum language,
+ struct partial_symtab*);
-extern struct minimal_symbol *ada_lookup_minimal_symbol (const char *);
+extern void clear_ada_sym_cache (void);
-extern void ada_resolve (struct expression **, struct type *);
+extern char **ada_make_symbol_completion_list (const char *text0,
+ const char *word);
+
+extern int ada_lookup_symbol_list (const char *, const struct block *,
+ domain_enum, struct ada_symbol_info**);
+
+extern char *ada_fold_name (const char *);
-extern int ada_resolve_function (struct symbol **, struct block **, int,
- struct value **, int, const char *,
- struct type *);
+extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
+ domain_enum, int *,
+ struct symtab **);
+
+extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);
extern void ada_fill_in_ada_prototype (struct symbol *);
-extern int user_select_syms (struct symbol **, struct block **, int, int);
+extern int user_select_syms (struct ada_symbol_info *, int, int);
extern int get_selections (int *, int, int, int, char *);
extern char *ada_start_decode_line_1 (char *);
extern struct symtabs_and_lines ada_finish_decode_line_1 (char **,
- struct symtab *,
- int, char ***);
+ struct symtab *,
+ int, char ***);
+
+extern struct symtabs_and_lines ada_sals_for_line (const char*, int,
+ int, char***, int);
extern int ada_scan_number (const char *, int, LONGEST *, int *);
@@ -260,8 +288,8 @@ extern int ada_is_ignored_field (struct type *, int);
extern int ada_is_packed_array_type (struct type *);
extern struct value *ada_value_primitive_packed_val (struct value *, char *,
- long, int, int,
- struct type *);
+ long, int, int,
+ struct type *);
extern struct type *ada_coerce_to_simple_array_type (struct type *);
@@ -269,12 +297,16 @@ extern int ada_is_character_type (struct type *);
extern int ada_is_string_type (struct type *);
-extern int ada_is_tagged_type (struct type *);
+extern int ada_is_tagged_type (struct type *, int);
+
+extern int ada_is_tag_type (struct type *);
extern struct type *ada_tag_type (struct value *);
extern struct value *ada_value_tag (struct value *);
+extern const char *ada_tag_name (struct value *);
+
extern int ada_is_parent_field (struct type *, int);
extern int ada_is_wrapper_field (struct type *, int);
@@ -289,24 +321,20 @@ extern int ada_in_variant (LONGEST, struct type *, int);
extern char *ada_variant_discrim_name (struct type *);
-extern struct type *ada_lookup_struct_elt_type (struct type *, char *, int,
- int *);
-
extern struct value *ada_value_struct_elt (struct value *, char *, char *);
-extern struct value *ada_search_struct_field (char *, struct value *, int,
- struct type *);
-
extern int ada_is_aligner_type (struct type *);
extern struct type *ada_aligned_type (struct type *);
extern char *ada_aligned_value_addr (struct type *, char *);
-extern const char *ada_attribute_name (int);
+extern const char *ada_attribute_name (enum exp_opcode);
extern int ada_is_fixed_point_type (struct type *);
+extern int ada_is_system_address_type (struct type *);
+
extern DOUBLEST ada_delta (struct type *);
extern DOUBLEST ada_fixed_to_float (struct type *, LONGEST);
@@ -323,30 +351,37 @@ extern struct type *ada_system_address_type (void);
extern int ada_which_variant_applies (struct type *, struct type *, char *);
-extern struct value *ada_to_fixed_value (struct type *, char *, CORE_ADDR,
- struct value *);
-
extern struct type *ada_to_fixed_type (struct type *, char *, CORE_ADDR,
- struct value *);
+ struct value *);
+
+extern struct type *
+ ada_template_to_fixed_record_type_1 (struct type *type, char *valaddr,
+ CORE_ADDR address, struct value *dval0,
+ int keep_dynamic_fields);
extern int ada_name_prefix_len (const char *);
extern char *ada_type_name (struct type *);
extern struct type *ada_find_parallel_type (struct type *,
- const char *suffix);
+ const char *suffix);
+
+extern LONGEST get_int_var_value (char *, int *);
-extern LONGEST get_int_var_value (char *, char *, int *);
+extern struct symbol *ada_find_any_symbol (const char *name);
extern struct type *ada_find_any_type (const char *name);
+extern struct symbol *ada_find_renaming_symbol (const char *name,
+ struct block *block);
+
extern int ada_prefer_type (struct type *, struct type *);
extern struct type *ada_get_base_type (struct type *);
extern struct type *ada_completed_type (struct type *);
-extern char *ada_mangle (const char *);
+extern char *ada_encode (const char *);
extern const char *ada_enum_name (const char *);
@@ -364,29 +399,50 @@ extern const char *ada_renaming_type (struct type *);
extern int ada_is_object_renaming (struct symbol *);
-extern const char *ada_simple_renamed_entity (struct symbol *);
+extern char *ada_simple_renamed_entity (struct symbol *);
extern char *ada_breakpoint_rewrite (char *, int *);
+extern char *ada_main_name (void);
+
/* Tasking-related: ada-tasks.c */
extern int valid_task_id (int);
-extern int get_current_task (void);
-
extern void init_task_list (void);
-extern void *get_self_id (void);
+extern int ada_is_exception_breakpoint (bpstat bs);
-extern int get_current_task (void);
+extern void ada_adjust_exception_stop (bpstat bs);
-extern int get_entry_number (void *);
+extern void ada_print_exception_stop (bpstat bs);
-extern void ada_report_exception_break (struct breakpoint *);
+extern int ada_get_current_task (ptid_t);
+
+extern int breakpoint_ada_task_match (CORE_ADDR, ptid_t);
+
+extern int ada_print_exception_breakpoint_nontask (struct breakpoint *);
+
+extern void ada_print_exception_breakpoint_task (struct breakpoint *);
extern int ada_maybe_exception_partial_symbol (struct partial_symbol *sym);
extern int ada_is_exception_sym (struct symbol *sym);
+extern void ada_find_printable_frame (struct frame_info *fi);
+
+extern void ada_reset_thread_registers (void);
+
+extern int ada_build_task_list (void);
+
+/* Look up a symbol by name using the search conventions of
+ a specific language (optional block, optional symtab).
+ FIXME: Should be symtab.h. */
+extern struct symbol *lookup_symbol_in_language (const char *,
+ const struct block *,
+ domain_enum,
+ enum language,
+ int *,
+ struct symtab **);
#endif
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 139e3aad3dd..21dba2c021b 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -1,5 +1,5 @@
/* FLEX lexer for Ada expressions, for GDB.
- Copyright (C) 1994, 1997, 2000
+ Copyright (C) 1994, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -45,20 +45,23 @@ EXP (e[+-]{NUM10})
POSEXP (e"+"?{NUM10})
%{
+#define malloc xmalloc
+#define free xfree
+
#define NUMERAL_WIDTH 256
#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
-/* Temporary staging for numeric literals. */
-static char numbuf[NUMERAL_WIDTH];
- static void canonicalizeNumeral (char* s1, const char*);
-static int processInt (const char*, const char*, const char*);
-static int processReal (const char*);
-static int processId (const char*, int);
-static int processAttribute (const char*);
-static int find_dot_all (const char*);
+/* Temporary staging for numeric literals. */
+static char numbuf[NUMERAL_WIDTH];
+ static void canonicalizeNumeral (char *s1, const char *);
+static int processInt (const char *, const char *, const char *);
+static int processReal (const char *);
+static int processId (const char *, int);
+static int processAttribute (const char *);
+static int find_dot_all (const char *);
#undef YY_DECL
-#define YY_DECL static int yylex ( void )
+#define YY_DECL static int yylex ( void )
#undef YY_INPUT
#define YY_INPUT(BUF, RESULT, MAX_SIZE) \
@@ -74,15 +77,15 @@ static int find_dot_all (const char*);
static char *tempbuf = NULL;
static int tempbufsize = 0;
static int tempbuf_len;
-static struct block* left_block_context;
+static struct block *left_block_context;
static void resize_tempbuf (unsigned int);
-static void block_lookup (char*, char*);
+static void block_lookup (char *, char *);
-static int name_lookup (char*, char*, int*);
+static int name_lookup (char *, char *, int *, int);
-static int find_dot_all (const char*);
+static int find_dot_all (const char *);
%}
@@ -94,20 +97,20 @@ static int find_dot_all (const char*);
"--".* { yyterminate(); }
-{NUM10}{POSEXP} {
- canonicalizeNumeral (numbuf, yytext);
+{NUM10}{POSEXP} {
+ canonicalizeNumeral (numbuf, yytext);
return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1);
}
-{NUM10} {
- canonicalizeNumeral (numbuf, yytext);
+{NUM10} {
+ canonicalizeNumeral (numbuf, yytext);
return processInt (NULL, numbuf, NULL);
}
{NUM10}"#"{HEXDIG}({HEXDIG}|_)*"#"{POSEXP} {
canonicalizeNumeral (numbuf, yytext);
return processInt (numbuf,
- strchr (numbuf, '#') + 1,
+ strchr (numbuf, '#') + 1,
strrchr(numbuf, '#') + 1);
}
@@ -123,12 +126,12 @@ static int find_dot_all (const char*);
{NUM10}"."{NUM10}{EXP} {
- canonicalizeNumeral (numbuf, yytext);
+ canonicalizeNumeral (numbuf, yytext);
return processReal (numbuf);
}
{NUM10}"."{NUM10} {
- canonicalizeNumeral (numbuf, yytext);
+ canonicalizeNumeral (numbuf, yytext);
return processReal (numbuf);
}
@@ -156,7 +159,7 @@ static int find_dot_all (const char*);
\"{OPER}\"/{WHITE}*"(" { return processId (yytext, yyleng); }
-<INITIAL>\" {
+<INITIAL>\" {
tempbuf_len = 0;
BEGIN IN_STRING;
}
@@ -188,10 +191,10 @@ static int find_dot_all (const char*);
tempbuf_len += yyleng-4;
}
-if {
- while (*lexptr != 'i' && *lexptr != 'I')
- lexptr -= 1;
- yyrestart(NULL);
+if {
+ while (*lexptr != 'i' && *lexptr != 'I')
+ lexptr -= 1;
+ yyrestart(NULL);
return 0;
}
@@ -234,51 +237,53 @@ xor { return XOR; }
yyrestart(NULL);
return 0;
}
- else
+ else
return ',';
}
"(" { paren_depth += 1; return '('; }
-")" { if (paren_depth == 0)
+")" { if (paren_depth == 0)
{
lexptr -= 1;
yyrestart(NULL);
return 0;
}
- else
+ else
{
- paren_depth -= 1;
+ paren_depth -= 1;
return ')';
}
}
"."{WHITE}*all { return DOT_ALL; }
-"."{WHITE}*{ID} {
+"."{WHITE}*{ID} {
processId (yytext+1, yyleng-1);
- return DOT_ID;
+ return DOT_ID;
}
-{ID}({WHITE}*"."{WHITE}*({ID}|\"{OPER}\"))*(" "*"'")? {
+{ID}({WHITE}*"."{WHITE}*({ID}|\"{OPER}\"))*(" "*"'")? {
int all_posn = find_dot_all (yytext);
int token_type, segments, k;
int quote_follows;
- if (all_posn == -1 && yytext[yyleng-1] == '\'')
+ if (all_posn == -1 && yytext[yyleng-1] == '\'')
{
quote_follows = 1;
- do {
- yyless (yyleng-1);
+ do {
+ yyless (yyleng-1);
} while (yytext[yyleng-1] == ' ');
}
else
- quote_follows = 0;
-
+ quote_follows = 0;
+
if (all_posn >= 0)
yyless (all_posn);
processId(yytext, yyleng);
- segments = name_lookup (ada_mangle (yylval.ssym.stoken.ptr),
- yylval.ssym.stoken.ptr, &token_type);
+ segments = name_lookup (ada_encode (yylval.ssym.stoken.ptr),
+ yylval.ssym.stoken.ptr,
+ &token_type,
+ MAX_RENAMING_CHAIN_LENGTH);
left_block_context = NULL;
for (k = yyleng; segments > 0 && k > 0; k -= 1)
{
@@ -289,7 +294,7 @@ xor { return XOR; }
if (k <= 0)
error ("confused by name %s", yytext);
yyless (k);
- if (quote_follows)
+ if (quote_follows)
BEGIN BEFORE_QUAL_QUOTE;
return token_type;
}
@@ -303,37 +308,21 @@ xor { return XOR; }
return BLOCKNAME;
}
-{ID}({WHITE}*"."{WHITE}*({ID}|\"{OPER}\"))*{WHITE}*:: {
+{ID}({WHITE}*"."{WHITE}*({ID}|\"{OPER}\"))*{WHITE}*:: {
processId(yytext, yyleng-2);
- block_lookup (ada_mangle (yylval.ssym.stoken.ptr),
+ block_lookup (ada_encode (yylval.ssym.stoken.ptr),
yylval.ssym.stoken.ptr);
return BLOCKNAME;
}
[{}@] { return yytext[0]; }
-"$$" { yylval.lval = -1; return LAST; }
-"$$"{DIG}+ { yylval.lval = -atoi(yytext+2); return LAST; }
-"$" { yylval.lval = 0; return LAST; }
-"$"{DIG}+ { yylval.lval = atoi(yytext+1); return LAST; }
-
-
/* REGISTERS AND GDB CONVENIENCE VARIABLES */
-"$"({LETTER}|{DIG}|"$")+ {
- int c;
- for (c = 0; c < NUM_REGS; c++)
- if (REGISTER_NAME (c) &&
- strcmp (yytext + 1, REGISTER_NAME (c)) == 0)
- {
- yylval.lval = c;
- return REGNAME;
- }
+"$"({LETTER}|{DIG}|"$")* {
yylval.sval.ptr = yytext;
yylval.sval.length = yyleng;
- yylval.ivar =
- lookup_internalvar (copy_name (yylval.sval) + 1);
- return INTERNAL_VARIABLE;
+ return SPECIAL_VARIABLE;
}
/* CATCH-ALL ERROR CASE */
@@ -342,38 +331,35 @@ xor { return XOR; }
%%
#include <ctype.h>
-#include <string.h>
+#include "gdb_string.h"
/* Initialize the lexer for processing new expression */
void
-lexer_init (FILE* inp)
+lexer_init (FILE *inp)
{
BEGIN INITIAL;
yyrestart (inp);
}
-/* Make sure that tempbuf points at an array at least N characters long. */
+/* Make sure that tempbuf points at an array at least N characters long. */
static void
-resize_tempbuf (n)
- unsigned int n;
+resize_tempbuf (unsigned int n)
{
if (tempbufsize < n)
{
tempbufsize = (n+63) & ~63;
- tempbuf = (char*) xrealloc (tempbuf, tempbufsize);
+ tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
}
}
-
-/* Copy S2 to S1, removing all underscores, and downcasing all letters. */
+
+/* Copy S2 to S1, removing all underscores, and downcasing all letters. */
static void
-canonicalizeNumeral (s1,s2)
- char* s1;
- const char* s2;
+canonicalizeNumeral (char *s1, const char *s2)
{
- for (; *s2 != '\000'; s2 += 1)
+ for (; *s2 != '\000'; s2 += 1)
{
if (*s2 != '_')
{
@@ -386,25 +372,22 @@ canonicalizeNumeral (s1,s2)
#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
-/* True (non-zero) iff DIGIT is a valid digit in radix BASE,
+/* True (non-zero) iff DIGIT is a valid digit in radix BASE,
where 2 <= BASE <= 16. */
static int
-is_digit_in_base (digit, base)
- unsigned char digit;
- int base;
+is_digit_in_base (unsigned char digit, int base)
{
if (!isxdigit (digit))
return 0;
if (base <= 10)
return (isdigit (digit) && digit < base + '0');
- else
+ else
return (isdigit (digit) || tolower (digit) < base - 10 + 'a');
}
static int
-digit_to_int (c)
- unsigned char c;
+digit_to_int (unsigned char c)
{
if (isdigit (c))
return c - '0';
@@ -412,12 +395,9 @@ digit_to_int (c)
return tolower (c) - 'a' + 10;
}
-/* As for strtoul, but for ULONGEST results. */
+/* As for strtoul, but for ULONGEST results. */
ULONGEST
-strtoulst (num, trailer, base)
- const char *num;
- const char **trailer;
- int base;
+strtoulst (const char *num, const char **trailer, int base)
{
unsigned int high_part;
ULONGEST result;
@@ -437,7 +417,7 @@ strtoulst (num, trailer, base)
result = result*base + digit_to_int (num[i]);
high_part = high_part*base + (unsigned int) (result >> HIGH_BYTE_POSN);
result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1;
- if (high_part > 0xff)
+ if (high_part > 0xff)
{
errno = ERANGE;
result = high_part = 0;
@@ -456,26 +436,23 @@ strtoulst (num, trailer, base)
/* Interprets the prefix of NUM that consists of digits of the given BASE
as an integer of that BASE, with the string EXP as an exponent.
Puts value in yylval, and returns INT, if the string is valid. Causes
- an error if the number is improperly formated. BASE, if NULL, defaults
- to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */
+ an error if the number is improperly formated. BASE, if NULL, defaults
+ to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */
static int
-processInt (base0, num0, exp0)
- const char* num0;
- const char* base0;
- const char* exp0;
+processInt (const char *base0, const char *num0, const char *exp0)
{
ULONGEST result;
long exp;
int base;
- char* trailer;
+ char *trailer;
if (base0 == NULL)
base = 10;
else
- {
- base = strtol (base0, (char**) NULL, 10);
+ {
+ base = strtol (base0, (char **) NULL, 10);
if (base < 2 || base > 16)
error ("Invalid base: %d.", base);
}
@@ -483,23 +460,23 @@ processInt (base0, num0, exp0)
if (exp0 == NULL)
exp = 0;
else
- exp = strtol(exp0, (char**) NULL, 10);
+ exp = strtol(exp0, (char **) NULL, 10);
errno = 0;
- result = strtoulst (num0, &trailer, base);
+ result = strtoulst (num0, (const char **) &trailer, base);
if (errno == ERANGE)
error ("Integer literal out of range");
if (isxdigit(*trailer))
error ("Invalid digit `%c' in based literal", *trailer);
- while (exp > 0)
+ while (exp > 0)
{
if (result > (ULONG_MAX / base))
error ("Integer literal out of range");
result *= base;
exp -= 1;
}
-
+
if ((result >> (TARGET_INT_BIT-1)) == 0)
yylval.typed_val.type = builtin_type_ada_int;
else if ((result >> (TARGET_LONG_BIT-1)) == 0)
@@ -507,48 +484,47 @@ processInt (base0, num0, exp0)
else if (((result >> (TARGET_LONG_BIT-1)) >> 1) == 0)
{
/* We have a number representable as an unsigned integer quantity.
- For consistency with the C treatment, we will treat it as an
+ For consistency with the C treatment, we will treat it as an
anonymous modular (unsigned) quantity. Alas, the types are such
- that we need to store .val as a signed quantity. Sorry
+ that we need to store .val as a signed quantity. Sorry
for the mess, but C doesn't officially guarantee that a simple
assignment does the trick (no, it doesn't; read the reference manual).
*/
yylval.typed_val.type = builtin_type_unsigned_long;
if (result & LONGEST_SIGN)
- yylval.typed_val.val =
- (LONGEST) (result & ~LONGEST_SIGN)
+ yylval.typed_val.val =
+ (LONGEST) (result & ~LONGEST_SIGN)
- (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1);
else
yylval.typed_val.val = (LONGEST) result;
return INT;
}
- else
+ else
yylval.typed_val.type = builtin_type_ada_long_long;
yylval.typed_val.val = (LONGEST) result;
return INT;
}
+#if defined (PRINTF_HAS_LONG_DOUBLE)
+# undef PRINTF_HAS_LONG_DOUBLE
+# define PRINTF_HAS_LONG_DOUBLE 1
+#else
+# define PRINTF_HAS_LONG_DOUBLE 0
+#endif
+
static int
-processReal (num0)
- const char* num0;
+processReal (const char *num0)
{
- if (sizeof (DOUBLEST) <= sizeof (float))
- sscanf (num0, "%g", &yylval.typed_val_float.dval);
- else if (sizeof (DOUBLEST) <= sizeof (double))
- sscanf (num0, "%lg", &yylval.typed_val_float.dval);
+#if defined (PRINTF_HAS_LONG_DOUBLE)
+ if (sizeof (DOUBLEST) > sizeof (double))
+ sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
else
+#endif
{
-#ifdef PRINTF_HAS_LONG_DOUBLE
- sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
-#else
- /* Scan it into a double, then convert and assign it to the
- long double. This at least wins with values representable
- in the range of doubles. */
double temp;
sscanf (num0, "%lg", &temp);
yylval.typed_val_float.dval = temp;
-#endif
}
yylval.typed_val_float.type = builtin_type_ada_float;
@@ -561,26 +537,22 @@ processReal (num0)
}
static int
-processId (name0, len)
- const char *name0;
- int len;
+processId (const char *name0, int len)
{
- char* name = xmalloc (len + 11);
+ char *name = obstack_alloc (&temp_parse_space, len + 11);
int i0, i;
-
-/* add_name_string_cleanup (name); */
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
+
while (len > 0 && isspace (name0[len-1]))
len -= 1;
i = i0 = 0;
- while (i0 < len)
+ while (i0 < len)
{
if (isalnum (name0[i0]))
{
name[i] = tolower (name0[i0]);
i += 1; i0 += 1;
}
- else switch (name0[i0])
+ else switch (name0[i0])
{
default:
name[i] = name0[i0];
@@ -617,19 +589,16 @@ processId (name0, len)
return NAME;
}
-static void
-block_lookup (name, err_name)
- char* name;
- char* err_name;
+static void
+block_lookup (char *name, char *err_name)
{
- struct symbol** syms;
- struct block** blocks;
+ struct ada_symbol_info *syms;
int nsyms;
struct symtab *symtab;
nsyms = ada_lookup_symbol_list (name, left_block_context,
- VAR_DOMAIN, &syms, &blocks);
+ VAR_DOMAIN, &syms);
if (left_block_context == NULL &&
- (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK))
+ (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
symtab = lookup_symtab (name);
else
symtab = NULL;
@@ -637,72 +606,85 @@ block_lookup (name, err_name)
if (symtab != NULL)
left_block_context = yylval.bval =
BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
- else if (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK)
+ else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
{
if (left_block_context == NULL)
error ("No file or function \"%s\".", err_name);
else
error ("No function \"%s\" in specified context.", err_name);
}
- else
+ else
{
- left_block_context = yylval.bval = SYMBOL_BLOCK_VALUE (syms[0]);
+ left_block_context = yylval.bval = SYMBOL_BLOCK_VALUE (syms[0].sym);
if (nsyms > 1)
warning ("Function name \"%s\" ambiguous here", err_name);
}
}
-/* Look up NAME0 (assumed to be mangled) as a name in VAR_DOMAIN,
+/* Look up NAME0 (assumed to be encoded) as a name in VAR_DOMAIN,
setting *TOKEN_TYPE to NAME or TYPENAME, depending on what is
- found. Try first the entire name, then the name without the last
+ found. Try first the entire name, then the name without the last
segment (i.e., after the last .id), etc., and return the number of
- segments that had to be removed to get a match. Calls error if no
+ segments that had to be removed to get a match. Try only the full
+ name if it starts with "standard__". Calls error if no
matches are found, using ERR_NAME in any error message. When
- exactly one symbol match is found, it is placed in yylval. */
-
+ exactly one symbol match is found, it is placed in yylval. When
+ the symbol is a renaming, follow at most DEPTH steps to find the
+ ultimate definition; cause error if depth exceeded. */
+
static int
-name_lookup (name0, err_name, token_type)
- char* name0;
- char* err_name;
- int* token_type;
+name_lookup (char *name0, char *err_name, int *token_type, int depth)
{
- struct symbol** syms;
- struct block** blocks;
- struct type* type;
+ struct ada_symbol_info *syms;
+ struct type *type;
int len0 = strlen (name0);
- char* name = savestring (name0, len0);
+ char *name = obsavestring (name0, len0, &temp_parse_space);
int nsyms;
int segments;
-
-/* add_name_string_cleanup (name);*/
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
+
+ if (depth <= 0)
+ error ("Could not find renamed symbol \"%s\"", err_name);
+
yylval.ssym.stoken.ptr = name;
yylval.ssym.stoken.length = strlen (name);
for (segments = 0; ; segments += 1)
{
- struct type* preferred_type;
+ struct type *preferred_type;
int i, preferred_index;
- if (left_block_context == NULL)
- nsyms = ada_lookup_symbol_list (name, expression_context_block,
- VAR_DOMAIN, &syms, &blocks);
+ if (left_block_context == NULL)
+ nsyms = ada_lookup_symbol_list (name, expression_context_block,
+ VAR_DOMAIN, &syms);
else
- nsyms = ada_lookup_symbol_list (name, left_block_context,
- VAR_DOMAIN, &syms, &blocks);
+ nsyms = ada_lookup_symbol_list (name, left_block_context,
+ VAR_DOMAIN, &syms);
+
+
+ /* Check for a type renaming. */
- /* Check for a type definition. */
+ if (nsyms == 1 && !ada_is_object_renaming (syms[0].sym))
+ {
+ struct symbol *renaming_sym =
+ ada_find_renaming_symbol (SYMBOL_LINKAGE_NAME (syms[0].sym),
+ syms[0].block);
+
+ if (renaming_sym != NULL)
+ syms[0].sym = renaming_sym;
+ }
+
+ /* Check for a type definition. */
/* Look for a symbol that doesn't denote void. This is (I think) a */
- /* temporary kludge to get around problems in GNAT output. */
+ /* temporary kludge to get around problems in GNAT output. */
preferred_index = -1; preferred_type = NULL;
for (i = 0; i < nsyms; i += 1)
- switch (SYMBOL_CLASS (syms[i]))
+ switch (SYMBOL_CLASS (syms[i].sym))
{
case LOC_TYPEDEF:
- if (ada_prefer_type (SYMBOL_TYPE (syms[i]), preferred_type))
+ if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type))
{
preferred_index = i;
- preferred_type = SYMBOL_TYPE (syms[i]);
+ preferred_type = SYMBOL_TYPE (syms[i].sym);
}
break;
case LOC_REGISTER:
@@ -714,37 +696,38 @@ name_lookup (name0, err_name, token_type)
case LOC_LOCAL_ARG:
case LOC_BASEREG:
case LOC_BASEREG_ARG:
+ case LOC_COMPUTED:
+ case LOC_COMPUTED_ARG:
goto NotType;
default:
break;
}
if (preferred_type != NULL)
{
-/* if (TYPE_CODE (preferred_type) == TYPE_CODE_VOID)
- error ("`%s' matches only void type name(s)",
- ada_demangle (name));
-*/
-/* FIXME: ada_demangle should be defined in defs.h, and is located in ada-lang.c */
-/* else*/ if (ada_is_object_renaming (syms[preferred_index]))
+ if (TYPE_CODE (preferred_type) == TYPE_CODE_VOID)
+ error ("`%s' matches only void type name(s)",
+ ada_decode (name));
+ else if (ada_is_object_renaming (syms[preferred_index].sym))
{
- yylval.ssym.sym = syms[preferred_index];
+ yylval.ssym.sym = syms[preferred_index].sym;
*token_type = OBJECT_RENAMING;
return segments;
- }
- else if (ada_renaming_type (SYMBOL_TYPE (syms[preferred_index]))
+ }
+ else if (ada_renaming_type (SYMBOL_TYPE (syms[preferred_index].sym))
!= NULL)
{
int result;
- const char* renaming =
- ada_simple_renamed_entity (syms[preferred_index]);
- char* new_name = xmalloc (strlen (renaming) + len0
- - yylval.ssym.stoken.length + 1);
-/* add_name_string_cleanup (new_name);*/
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
+ char *renaming
+ = ada_simple_renamed_entity (syms[preferred_index].sym);
+ char *new_name
+ = (char *) obstack_alloc (&temp_parse_space,
+ strlen (renaming) + len0
+ - yylval.ssym.stoken.length + 1);
strcpy (new_name, renaming);
+ xfree (renaming);
strcat (new_name, name0 + yylval.ssym.stoken.length);
- result = name_lookup (new_name, err_name, token_type);
- if (result > segments)
+ result = name_lookup (new_name, err_name, token_type, depth - 1);
+ if (result > segments)
error ("Confused by renamed symbol.");
return result;
}
@@ -753,16 +736,31 @@ name_lookup (name0, err_name, token_type)
yylval.tval = preferred_type;
*token_type = TYPENAME;
return 0;
- }
+ }
}
if (segments == 0)
{
- type = lookup_primitive_typename (name);
- if (type == NULL && DEPRECATED_STREQ ("system__address", name))
+ type = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch,
+ name);
+ if (type == NULL && strcmp ("system__address", name) == 0)
type = builtin_type_ada_system_address;
if (type != NULL)
{
+ /* First check to see if we have a regular definition of this
+ type that just didn't happen to have been read yet. */
+ int ntypes;
+ struct symbol *sym;
+ char *expanded_name =
+ (char *) alloca (strlen (name) + sizeof ("standard__"));
+ strcpy (expanded_name, "standard__");
+ strcat (expanded_name, name);
+ sym = ada_lookup_symbol (expanded_name, NULL,
+ VAR_DOMAIN, NULL, NULL);
+ if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+ type = SYMBOL_TYPE (sym);
+
yylval.tval = type;
*token_type = TYPENAME;
return 0;
@@ -770,17 +768,17 @@ name_lookup (name0, err_name, token_type)
}
NotType:
- if (nsyms == 1)
+ if (nsyms == 1)
{
*token_type = NAME;
- yylval.ssym.sym = syms[0];
+ yylval.ssym.sym = syms[0].sym;
yylval.ssym.msym = NULL;
- yylval.ssym.block = blocks[0];
+ yylval.ssym.block = syms[0].block;
return segments;
}
else if (nsyms == 0) {
int i;
- yylval.ssym.msym = ada_lookup_minimal_symbol (name);
+ yylval.ssym.msym = ada_lookup_simple_minsym (name);
if (yylval.ssym.msym != NULL)
{
yylval.ssym.sym = NULL;
@@ -789,10 +787,14 @@ name_lookup (name0, err_name, token_type)
return segments;
}
+ if (segments == 0
+ && strncmp (name, "standard__", sizeof ("standard__") - 1) == 0)
+ error ("No definition of \"%s\" found.", err_name);
+
for (i = yylval.ssym.stoken.length - 1; i > 0; i -= 1)
{
if (name[i] == '.')
- {
+ {
name[i] = '\0';
yylval.ssym.stoken.length = i;
break;
@@ -805,20 +807,20 @@ name_lookup (name0, err_name, token_type)
break;
}
}
- if (i <= 0)
+ if (i <= 0)
{
if (!have_full_symbols () && !have_partial_symbols ()
&& left_block_context == NULL)
error ("No symbol table is loaded. Use the \"file\" command.");
if (left_block_context == NULL)
- error ("No definition of \"%s\" in current context.",
+ error ("No definition of \"%s\" in current context.",
err_name);
else
- error ("No definition of \"%s\" in specified context.",
+ error ("No definition of \"%s\" in specified context.",
err_name);
}
}
- else
+ else
{
*token_type = NAME;
yylval.ssym.sym = NULL;
@@ -833,10 +835,9 @@ name_lookup (name0, err_name, token_type)
}
/* Returns the position within STR of the '.' in a
- '.{WHITE}*all' component of a dotted name, or -1 if there is none. */
+ '.{WHITE}*all' component of a dotted name, or -1 if there is none. */
static int
-find_dot_all (str)
- const char* str;
+find_dot_all (const char *str)
{
int i;
for (i = 0; str[i] != '\000'; i += 1)
@@ -844,7 +845,7 @@ find_dot_all (str)
if (str[i] == '.')
{
int i0 = i;
- do
+ do
i += 1;
while (isspace (str[i]));
if (strcmp (str+i, "all") == 0
@@ -853,15 +854,13 @@ find_dot_all (str)
}
}
return -1;
-}
+}
/* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring
- case. */
+ case. */
static int
-subseqMatch (subseq, str)
- const char* subseq;
- const char* str;
+subseqMatch (const char *subseq, const char *str)
{
if (subseq[0] == '\0')
return 1;
@@ -872,9 +871,9 @@ subseqMatch (subseq, str)
else
return subseqMatch (subseq, str+1);
}
-
-static struct { const char* name; int code; }
+
+static struct { const char *name; int code; }
attributes[] = {
{ "address", TICK_ADDRESS },
{ "unchecked_access", TICK_ACCESS },
@@ -898,8 +897,7 @@ attributes[] = {
abbreviation STR. */
static int
-processAttribute (str)
- const char* str;
+processAttribute (const char *str)
{
int i, k;
@@ -908,11 +906,11 @@ processAttribute (str)
return attributes[i].code;
for (i = 0, k = -1; attributes[i].code != -1; i += 1)
- if (subseqMatch (str, attributes[i].name))
+ if (subseqMatch (str, attributes[i].name))
{
if (k == -1)
k = i;
- else
+ else
error ("ambiguous attribute name: `%s'", str);
}
if (k == -1)
@@ -922,7 +920,7 @@ processAttribute (str)
}
int
-yywrap()
+yywrap(void)
{
return 1;
}
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
deleted file mode 100644
index c8a34251aeb..00000000000
--- a/gdb/ada-tasks.c
+++ /dev/null
@@ -1,819 +0,0 @@
-/* file ada-tasks.c: Ada tasking control for GDB
- Copyright 1997 Free Software Foundation, Inc.
- Contributed by Ada Core Technologies, Inc
-.
- This file is part of GDB.
-
- [$Id: ada-tasks.c,v 1.6 2002/11/29 19:15:14 cagney Exp $]
- Authors: Roch-Alexandre Nomine Beguin, Arnaud Charlet <charlet@gnat.com>
-
- 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.
-
-*/
-
-#include <ctype.h>
-#include "defs.h"
-#include "command.h"
-#include "value.h"
-#include "language.h"
-#include "inferior.h"
-#include "symtab.h"
-#include "target.h"
-#include "regcache.h"
-#include "gdbcore.h"
-
-#if (defined(__alpha__) && defined(__osf__) && !defined(__alpha_vxworks))
-#include <sys/procfs.h>
-#endif
-
-#if (defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET))
-#include "gregset.h"
-#endif
-
-#include "ada-lang.h"
-
-/* FIXME: move all this conditional compilation in description
- files or in configure.in */
-
-#if defined (VXWORKS_TARGET)
-#define THREAD_TO_PID(tid,lwpid) (tid)
-
-#elif defined (linux)
-#define THREAD_TO_PID(tid,lwpid) (0)
-
-#elif (defined (sun) && defined (__SVR4))
-#define THREAD_TO_PID thread_to_pid
-
-#elif defined (sgi) || defined (__WIN32__) || defined (hpux)
-#define THREAD_TO_PID(tid,lwpid) ((int)lwpid)
-
-#else
-#define THREAD_TO_PID(tid,lwpid) (0)
-#endif
-
-#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
-#define THREAD_FETCH_REGISTERS dec_thread_fetch_registers
-#define GET_CURRENT_THREAD dec_thread_get_current_thread
-extern int dec_thread_get_registers (gdb_gregset_t *, gdb_fpregset_t *);
-#endif
-
-#if defined (_AIX)
-#define THREAD_FETCH_REGISTERS aix_thread_fetch_registers
-#define GET_CURRENT_THREAD aix_thread_get_current_thread
-#endif
-
-#if defined(VXWORKS_TARGET)
-#define GET_CURRENT_THREAD() ((void*)inferior_pid)
-#define THREAD_FETCH_REGISTERS() (-1)
-
-#elif defined (sun) && defined (__SVR4)
-#define GET_CURRENT_THREAD solaris_thread_get_current_thread
-#define THREAD_FETCH_REGISTERS() (-1)
-extern void *GET_CURRENT_THREAD ();
-
-#elif defined (_AIX) || (defined(__alpha__) && defined(__osf__))
-extern void *GET_CURRENT_THREAD ();
-
-#elif defined (__WIN32__) || defined (hpux)
-#define GET_CURRENT_THREAD() (inferior_pid)
-#define THREAD_FETCH_REGISTERS() (-1)
-
-#else
-#define GET_CURRENT_THREAD() (NULL)
-#define THREAD_FETCH_REGISTERS() (-1)
-#endif
-
-#define KNOWN_TASKS_NAME "system__tasking__debug__known_tasks"
-
-#define READ_MEMORY(addr, var) read_memory (addr, (char*) &var, sizeof (var))
-/* external declarations */
-
-/* Global visible variables */
-
-struct task_entry *task_list = NULL;
-int ada__tasks_check_symbol_table = 1;
-void *pthread_kern_addr = NULL;
-
-#if (defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET))
-gdb_gregset_t gregset_saved;
-gdb_fpregset_t fpregset_saved;
-#endif
-
-/* The maximum number of tasks known to the Ada runtime */
-const int MAX_NUMBER_OF_KNOWN_TASKS = 1000;
-
-/* the current task */
-int current_task = -1, current_task_id = -1, current_task_index;
-void *current_thread, *current_lwp;
-
-char *ada_task_states[] = {
- "Unactivated",
- "Runnable",
- "Terminated",
- "Child Activation Wait",
- "Accept Statement",
- "Waiting on entry call",
- "Async Select Wait",
- "Delay Sleep",
- "Child Termination Wait",
- "Wait Child in Term Alt",
- "",
- "",
- "",
- "",
- "Asynchronous Hold"
-};
-
-/* Global internal types */
-
-static char *ada_long_task_states[] = {
- "Unactivated",
- "Runnable",
- "Terminated",
- "Waiting for child activation",
- "Blocked in accept statement",
- "Waiting on entry call",
- "Asynchronous Selective Wait",
- "Delay Sleep",
- "Waiting for children termination",
- "Waiting for children in terminate alternative",
- "",
- "",
- "",
- "",
- "Asynchronous Hold"
-};
-
-/* Global internal variables */
-
-static int highest_task_num = 0;
-int thread_support = 0; /* 1 if the thread library in use is supported */
-static int gdbtk_task_initialization = 0;
-
-static int
-add_task_entry (void *p_task_id, int index)
-{
- struct task_entry *new_task_entry = NULL;
- struct task_entry *pt;
-
- highest_task_num++;
- new_task_entry = xmalloc (sizeof (struct task_entry));
- new_task_entry->task_num = highest_task_num;
- new_task_entry->task_id = p_task_id;
- new_task_entry->known_tasks_index = index;
- new_task_entry->next_task = NULL;
- pt = task_list;
- if (pt)
- {
- while (pt->next_task)
- pt = pt->next_task;
- pt->next_task = new_task_entry;
- pt->stack_per = 0;
- }
- else
- task_list = new_task_entry;
- return new_task_entry->task_num;
-}
-
-int
-get_entry_number (void *p_task_id)
-{
- struct task_entry *pt;
-
- pt = task_list;
- while (pt != NULL)
- {
- if (pt->task_id == p_task_id)
- return pt->task_num;
- pt = pt->next_task;
- }
- return 0;
-}
-
-static struct task_entry *
-get_thread_entry_vptr (void *thread)
-{
- struct task_entry *pt;
-
- pt = task_list;
- while (pt != NULL)
- {
- if (pt->thread == thread)
- return pt;
- pt = pt->next_task;
- }
- return 0;
-}
-
-static struct task_entry *
-get_entry_vptr (int p_task_num)
-{
- struct task_entry *pt;
-
- pt = task_list;
- while (pt)
- {
- if (pt->task_num == p_task_num)
- return pt;
- pt = pt->next_task;
- }
- return NULL;
-}
-
-void
-init_task_list (void)
-{
- struct task_entry *pt, *old_pt;
-
- pt = task_list;
- while (pt)
- {
- old_pt = pt;
- pt = pt->next_task;
- xfree (old_pt);
- };
- task_list = NULL;
- highest_task_num = 0;
-}
-
-int
-valid_task_id (int task)
-{
- return get_entry_vptr (task) != NULL;
-}
-
-void *
-get_self_id (void)
-{
- struct value *val;
- void *self_id;
- int result;
- struct task_entry *ent;
- extern int do_not_insert_breakpoints;
-
-#if !((defined(sun) && defined(__SVR4)) || defined(VXWORKS_TARGET) || defined(__WIN32__))
- if (thread_support)
-#endif
- {
- ent = get_thread_entry_vptr (GET_CURRENT_THREAD ());
- return ent ? ent->task_id : 0;
- }
-
- /* FIXME: calling a function in the inferior with a multithreaded application
- is not reliable, so return NULL if there is no safe way to get the current
- task */
- return NULL;
-}
-
-int
-get_current_task (void)
-{
- int result;
-
- /* FIXME: language_ada should be defined in defs.h */
- /* if (current_language->la_language != language_ada) return -1; */
-
- result = get_entry_number (get_self_id ());
-
- /* return -1 if not found */
- return result == 0 ? -1 : result;
-}
-
-/* Print detailed information about specified task */
-
-static void
-info_task (char *arg, int from_tty)
-{
- void *temp_task;
- struct task_entry *pt, *pt2;
- void *self_id, *caller;
- struct task_fields atcb, atcb2;
- struct entry_call call;
- int bounds[2];
- char image[256];
- int num;
-
- /* FIXME: language_ada should be defined in defs.h */
- /* if (current_language->la_language != language_ada)
- {
- printf_filtered ("The current language does not support tasks.\n");
- return;
- }
- */
- pt = get_entry_vptr (atoi (arg));
- if (pt == NULL)
- {
- printf_filtered ("Task %s not found.\n", arg);
- return;
- }
-
- temp_task = pt->task_id;
-
- /* read the atcb in the inferior */
- READ_MEMORY ((CORE_ADDR) temp_task, atcb);
-
- /* print the Ada task id */
- printf_filtered ("Ada Task: %p\n", temp_task);
-
- /* print the name of the task */
- if (atcb.image.P_ARRAY != NULL)
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS), bounds);
- bounds[1] = EXTRACT_INT (bounds[1]);
- read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
- (char *) &image, bounds[1]);
- printf_filtered ("Name: %.*s\n", bounds[1], image);
- }
- else
- printf_filtered ("<no name>\n");
-
- /* print the thread id */
-
- if ((long) pt->thread < 65536)
- printf_filtered ("Thread: %ld\n", (long int) pt->thread);
- else
- printf_filtered ("Thread: %p\n", pt->thread);
-
- if ((long) pt->lwp != 0)
- {
- if ((long) pt->lwp < 65536)
- printf_filtered ("LWP: %ld\n", (long int) pt->lwp);
- else
- printf_filtered ("LWP: %p\n", pt->lwp);
- }
-
- /* print the parent gdb task id */
- num = get_entry_number (EXTRACT_ADDRESS (atcb.parent));
- if (num != 0)
- {
- printf_filtered ("Parent: %d", num);
- pt2 = get_entry_vptr (num);
- READ_MEMORY ((CORE_ADDR) pt2->task_id, atcb2);
-
- /* print the name of the task */
- if (atcb2.image.P_ARRAY != NULL)
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
- bounds);
- bounds[1] = EXTRACT_INT (bounds[1]);
- read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
- (char *) &image, bounds[1]);
- printf_filtered (" (%.*s)\n", bounds[1], image);
- }
- else
- printf_filtered ("\n");
- }
- else
- printf_filtered ("No parent\n");
-
- /* print the base priority of the task */
- printf_filtered ("Base Priority: %d\n", EXTRACT_INT (atcb.priority));
-
- /* print the current state of the task */
-
- /* check if this task is accepting a rendezvous */
- if (atcb.call == NULL)
- caller = NULL;
- else
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
- caller = EXTRACT_ADDRESS (call.self);
- }
-
- if (caller != NULL)
- {
- num = get_entry_number (caller);
- printf_filtered ("Accepting rendezvous with %d", num);
-
- if (num != 0)
- {
- pt2 = get_entry_vptr (num);
- READ_MEMORY ((CORE_ADDR) pt2->task_id, atcb2);
-
- /* print the name of the task */
- if (atcb2.image.P_ARRAY != NULL)
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
- bounds);
- bounds[1] = EXTRACT_INT (bounds[1]);
- read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
- (char *) &image, bounds[1]);
- printf_filtered (" (%.*s)\n", bounds[1], image);
- }
- else
- printf_filtered ("\n");
- }
- else
- printf_filtered ("\n");
- }
- else
- printf_filtered ("State: %s\n", ada_long_task_states[atcb.state]);
-}
-
-#if 0
-
-/* A useful function that shows the alignment of all the fields in the
- tasks_fields structure
- */
-
-print_align (void)
-{
- struct task_fields tf;
- void *tf_base = &(tf);
- void *tf_state = &(tf.state);
- void *tf_entry_num = &(tf.entry_num);
- void *tf_parent = &(tf.parent);
- void *tf_priority = &(tf.priority);
- void *tf_current_priority = &(tf.current_priority);
- void *tf_image = &(tf.image);
- void *tf_call = &(tf.call);
- void *tf_thread = &(tf.thread);
- void *tf_lwp = &(tf.lwp);
- printf_filtered ("\n");
- printf_filtered ("(tf_base = 0x%x)\n", tf_base);
- printf_filtered ("task_fields.entry_num at %3d (0x%x)\n",
- tf_entry_num - tf_base, tf_entry_num);
- printf_filtered ("task_fields.state at %3d (0x%x)\n",
- tf_state - tf_base, tf_state);
- printf_filtered ("task_fields.parent at %3d (0x%x)\n",
- tf_parent - tf_base, tf_parent);
- printf_filtered ("task_fields.priority at %3d (0x%x)\n",
- tf_priority - tf_base, tf_priority);
- printf_filtered ("task_fields.current_priority at %3d (0x%x)\n",
- tf_current_priority - tf_base, tf_current_priority);
- printf_filtered ("task_fields.image at %3d (0x%x)\n",
- tf_image - tf_base, tf_image);
- printf_filtered ("task_fields.call at %3d (0x%x)\n",
- tf_call - tf_base, tf_call);
- printf_filtered ("task_fields.thread at %3d (0x%x)\n",
- tf_thread - tf_base, tf_thread);
- printf_filtered ("task_fields.lwp at %3d (0x%x)\n",
- tf_lwp - tf_base, tf_lwp);
- printf_filtered ("\n");
-}
-#endif
-
-/* Print information about currently known tasks */
-
-static void
-info_tasks (char *arg, int from_tty)
-{
- struct value *val;
- int i, task_number, state;
- void *temp_task, *temp_tasks[MAX_NUMBER_OF_KNOWN_TASKS];
- struct task_entry *pt;
- void *self_id, *caller, *thread_id = NULL;
- struct task_fields atcb;
- struct entry_call call;
- int bounds[2];
- char image[256];
- int size;
- char car;
-
-#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
- pthreadTeb_t thr;
- gdb_gregset_t regs;
-#endif
-
- static struct symbol *sym;
- static struct minimal_symbol *msym;
- static void *known_tasks_addr = NULL;
-
- int init_only = gdbtk_task_initialization;
- gdbtk_task_initialization = 0;
-
- task_number = 0;
-
- if (PIDGET (inferior_ptid) == 0)
- {
- printf_filtered ("The program is not being run under gdb. ");
- printf_filtered ("Use 'run' or 'attach' first.\n");
- return;
- }
-
- if (ada__tasks_check_symbol_table)
- {
- thread_support = 0;
-#if (defined(__alpha__) && defined(__osf__) & !defined(VXWORKS_TARGET)) || \
- defined (_AIX)
- thread_support = 1;
-#endif
-
- msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
- if (msym != NULL)
- known_tasks_addr = (void *) SYMBOL_VALUE_ADDRESS (msym);
- else
-#ifndef VXWORKS_TARGET
- return;
-#else
- {
- if (target_lookup_symbol (KNOWN_TASKS_NAME, &known_tasks_addr) != 0)
- return;
- }
-#endif
-
- ada__tasks_check_symbol_table = 0;
- }
-
- if (known_tasks_addr == NULL)
- return;
-
-#if !((defined(sun) && defined(__SVR4)) || defined(VXWORKS_TARGET) || defined(__WIN32__) || defined (hpux))
- if (thread_support)
-#endif
- thread_id = GET_CURRENT_THREAD ();
-
- /* then we get a list of tasks created */
-
- init_task_list ();
-
- READ_MEMORY ((CORE_ADDR) known_tasks_addr, temp_tasks);
-
- for (i = 0; i < MAX_NUMBER_OF_KNOWN_TASKS; i++)
- {
- temp_task = EXTRACT_ADDRESS (temp_tasks[i]);
-
- if (temp_task != NULL)
- {
- task_number = get_entry_number (temp_task);
- if (task_number == 0)
- task_number = add_task_entry (temp_task, i);
- }
- }
-
- /* Return without printing anything if this function was called in
- order to init GDBTK tasking. */
-
- if (init_only)
- return;
-
- /* print the header */
-
-#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
- printf_filtered
- (" ID TID P-ID Pri Stack %% State Name\n");
-#else
- printf_filtered (" ID TID P-ID Pri State Name\n");
-#endif
-
- /* Now that we have a list of task id's, we can print them */
- pt = task_list;
- while (pt)
- {
- temp_task = pt->task_id;
-
- /* read the atcb in the inferior */
- READ_MEMORY ((CORE_ADDR) temp_task, atcb);
-
- /* store the thread id for future use */
- pt->thread = EXTRACT_ADDRESS (atcb.thread);
-
-#if defined (linux)
- pt->lwp = (void *) THREAD_TO_PID (atcb.thread, 0);
-#else
- pt->lwp = EXTRACT_ADDRESS (atcb.lwp);
-#endif
-
- /* print a star if this task is the current one */
- if (thread_id)
-#if defined (__WIN32__) || defined (SGI) || defined (hpux)
- printf_filtered (pt->lwp == thread_id ? "*" : " ");
-#else
- printf_filtered (pt->thread == thread_id ? "*" : " ");
-#endif
-
- /* print the gdb task id */
- printf_filtered ("%3d", pt->task_num);
-
- /* print the Ada task id */
-#ifndef VXWORKS_TARGET
- printf_filtered (" %9lx", (long) temp_task);
-#else
-#ifdef TARGET_64
- printf_filtered (" %#9lx", (unsigned long) pt->thread & 0x3ffffffffff);
-#else
- printf_filtered (" %#9lx", (long) pt->thread);
-#endif
-#endif
-
- /* print the parent gdb task id */
- printf_filtered
- (" %4d", get_entry_number (EXTRACT_ADDRESS (atcb.parent)));
-
- /* print the base priority of the task */
- printf_filtered (" %3d", EXTRACT_INT (atcb.priority));
-
-#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
- if (pt->task_num == 1 || atcb.state == Terminated)
- {
- printf_filtered (" Unknown");
- goto next;
- }
-
- read_memory ((CORE_ADDR) atcb.thread, &thr, sizeof (thr));
- current_thread = atcb.thread;
- regs.regs[SP_REGNUM] = 0;
- if (dec_thread_get_registers (&regs, NULL) == 0)
- {
- pt->stack_per = (100 * ((long) thr.__stack_base -
- regs.regs[SP_REGNUM])) / thr.__stack_size;
- /* if the thread is terminated but still there, the
- stack_base/size values are erroneous. Try to patch it */
- if (pt->stack_per < 0 || pt->stack_per > 100)
- pt->stack_per = 0;
- }
-
- /* print information about stack space used in the thread */
- if (thr.__stack_size < 1024 * 1024)
- {
- size = thr.__stack_size / 1024;
- car = 'K';
- }
- else if (thr.__stack_size < 1024 * 1024 * 1024)
- {
- size = thr.__stack_size / 1024 / 1024;
- car = 'M';
- }
- else /* Who knows... */
- {
- size = thr.__stack_size / 1024 / 1024 / 1024;
- car = 'G';
- }
- printf_filtered (" %4d%c %2d", size, car, pt->stack_per);
- next:
-#endif
-
- /* print the current state of the task */
-
- /* check if this task is accepting a rendezvous */
- if (atcb.call == NULL)
- caller = NULL;
- else
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
- caller = EXTRACT_ADDRESS (call.self);
- }
-
- if (caller != NULL)
- printf_filtered (" Accepting RV with %-4d",
- get_entry_number (caller));
- else
- {
- state = atcb.state;
-#if defined (__WIN32__) || defined (SGI) || defined (hpux)
- if (state == Runnable && (thread_id && pt->lwp == thread_id))
-#else
- if (state == Runnable && (thread_id && pt->thread == thread_id))
-#endif
- /* Replace "Runnable" by "Running" if this is the current task */
- printf_filtered (" %-22s", "Running");
- else
- printf_filtered (" %-22s", ada_task_states[state]);
- }
-
- /* finally, print the name of the task */
- if (atcb.image.P_ARRAY != NULL)
- {
- READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS),
- bounds);
- bounds[1] = EXTRACT_INT (bounds[1]);
- read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
- (char *) &image, bounds[1]);
- printf_filtered (" %.*s\n", bounds[1], image);
- }
- else
- printf_filtered (" <no name>\n");
-
- pt = pt->next_task;
- }
-}
-
-/* Task list initialization for GDB-Tk. We basically use info_tasks()
- to initialize our variables, but abort that function before we
- actually print anything. */
-
-int
-gdbtk_tcl_tasks_initialize (void)
-{
- gdbtk_task_initialization = 1;
- info_tasks ("", gdb_stdout);
-
- return (task_list != NULL);
-}
-
-static void
-info_tasks_command (char *arg, int from_tty)
-{
- if (arg == NULL || *arg == '\000')
- info_tasks (arg, from_tty);
- else
- info_task (arg, from_tty);
-}
-
-/* Switch from one thread to another. */
-
-static void
-switch_to_thread (ptid_t ptid)
-{
- if (ptid_equal (ptid, inferior_ptid))
- return;
-
- inferior_ptid = ptid;
- flush_cached_frames ();
- registers_changed ();
- stop_pc = read_pc ();
- select_frame (get_current_frame ());
-}
-
-/* Switch to a specified task. */
-
-static int
-task_switch (void *tid, void *lwpid)
-{
- int res = 0, pid;
-
- if (thread_support)
- {
- flush_cached_frames ();
-
- if (current_task != current_task_id)
- {
- res = THREAD_FETCH_REGISTERS ();
- }
- else
- {
-#if (defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET))
- supply_gregset (&gregset_saved);
- supply_fpregset (&fpregset_saved);
-#endif
- }
-
- if (res == 0)
- stop_pc = read_pc ();
- select_frame (get_current_frame ());
- return res;
- }
-
- return -1;
-}
-
-static void
-task_command (char *tidstr, int from_tty)
-{
- int num;
- struct task_entry *e;
-
- if (!tidstr)
- error ("Please specify a task ID. Use the \"info tasks\" command to\n"
- "see the IDs of currently known tasks.");
-
- num = atoi (tidstr);
- e = get_entry_vptr (num);
-
- if (e == NULL)
- error ("Task ID %d not known. Use the \"info tasks\" command to\n"
- "see the IDs of currently known tasks.", num);
-
- if (current_task_id == -1)
- {
-#if (defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET))
- fill_gregset (&gregset_saved, -1);
- fill_fpregset (&fpregset_saved, -1);
-#endif
- current_task_id = get_current_task ();
- }
-
- current_task = num;
- current_task_index = e->known_tasks_index;
- current_thread = e->thread;
- current_lwp = e->lwp;
- if (task_switch (e->thread, e->lwp) == 0)
- {
- /* FIXME: find_printable_frame should be defined in frame.h, and
- implemented in ada-lang.c */
- /* find_printable_frame (deprecated_selected_frame, frame_relative_level (deprecated_selected_frame)); */
- printf_filtered ("[Switching to task %d]\n", num);
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
- }
- else
- printf_filtered ("Unable to switch to task %d\n", num);
-}
-
-void
-_initialize_tasks (void)
-{
- static struct cmd_list_element *task_cmd_list = NULL;
- extern struct cmd_list_element *cmdlist;
-
- add_info ("tasks", info_tasks_command,
- "Without argument: list all known Ada tasks, with status information.\n"
- "info tasks n: print detailed information of task n.\n");
-
- add_prefix_cmd ("task", class_run, task_command,
- "Use this command to switch between tasks.\n\
- The new task ID must be currently known.", &task_cmd_list, "task ", 1, &cmdlist);
-}
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 19393541d5c..fb9c690f820 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -1,6 +1,6 @@
/* Support for printing Ada types for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1997, 2003 Free Software
- Foundation, Inc.
+ Copyright 1986, 1988, 1989, 1991, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -63,11 +63,11 @@ static void print_range_type_named (char *, struct ui_file *);
static char *name_buffer;
static int name_buffer_len;
-/* The (demangled) Ada name of TYPE. This value persists until the
- next call. */
+/* The (decoded) Ada name of TYPE. This value persists until the
+ next call. */
static char *
-demangled_type_name (struct type *type)
+decoded_type_name (struct type *type)
{
if (ada_type_name (type) == NULL)
return NULL;
@@ -116,9 +116,9 @@ demangled_type_name (struct type *type)
}
-/* Print a description of a type in the format of a
+/* Print a description of a type in the format of a
typedef for the current language.
- NEW is the new name for a type TYPE. */
+ NEW is the new name for a type TYPE. */
void
ada_typedef_print (struct type *type, struct symbol *new,
@@ -130,7 +130,7 @@ ada_typedef_print (struct type *type, struct symbol *new,
type_print (type, "", stream, 1);
}
-/* Print range type TYPE on STREAM. */
+/* Print range type TYPE on STREAM. */
static void
print_range (struct type *type, struct ui_file *stream)
@@ -155,9 +155,9 @@ print_range (struct type *type, struct ui_file *stream)
if (TYPE_NFIELDS (type) < 2)
{
- /* A range needs at least 2 bounds to be printed. If there are less
+ /* A range needs at least 2 bounds to be printed. If there are less
than 2, just print the type name instead of the range itself.
- This check handles cases such as characters, for example.
+ This check handles cases such as characters, for example.
Note that if the name is not defined, then we don't print anything.
*/
@@ -180,7 +180,7 @@ print_range (struct type *type, struct ui_file *stream)
}
/* Print the number or discriminant bound at BOUNDS+*N on STREAM, and
- set *N past the bound and its delimiter, if any. */
+ set *N past the bound and its delimiter, if any. */
static void
print_range_bound (struct type *type, char *bounds, int *n,
@@ -189,6 +189,19 @@ print_range_bound (struct type *type, char *bounds, int *n,
LONGEST B;
if (ada_scan_number (bounds, *n, &B, n))
{
+ /* STABS decodes all range types which bounds are 0 .. -1 as
+ unsigned integers (ie. the type code is TYPE_CODE_INT, not
+ TYPE_CODE_RANGE). Unfortunately, ada_print_scalar() relies
+ on the unsigned flag to determine whether the bound should
+ be printed as a signed or an unsigned value. This causes
+ the upper bound of the 0 .. -1 range types to be printed as
+ a very large unsigned number instead of -1.
+ To workaround this stabs deficiency, we replace the TYPE by
+ builtin_type_long when we detect that the bound is negative,
+ and the type is a TYPE_CODE_INT. The bound is negative when
+ 'm' is the last character of the number scanned in BOUNDS. */
+ if (bounds[*n - 1] == 'm' && TYPE_CODE (type) == TYPE_CODE_INT)
+ type = builtin_type_long;
ada_print_scalar (type, B, stream);
if (bounds[*n] == '_')
*n += 2;
@@ -213,7 +226,7 @@ print_range_bound (struct type *type, char *bounds, int *n,
/* Assuming NAME[0 .. NAME_LEN-1] is the name of a range type, print
the value (if found) of the bound indicated by SUFFIX ("___L" or
- "___U") according to the ___XD conventions. */
+ "___U") according to the ___XD conventions. */
static void
print_dynamic_range_bound (struct type *type, const char *name, int name_len,
@@ -228,21 +241,20 @@ print_dynamic_range_bound (struct type *type, const char *name, int name_len,
strncpy (name_buf, name, name_len);
strcpy (name_buf + name_len, suffix);
- B = get_int_var_value (name_buf, 0, &OK);
+ B = get_int_var_value (name_buf, &OK);
if (OK)
ada_print_scalar (type, B, stream);
else
fprintf_filtered (stream, "?");
}
-/* Print the range type named NAME. */
+/* Print the range type named NAME. */
static void
print_range_type_named (char *name, struct ui_file *stream)
{
struct type *raw_type = ada_find_any_type (name);
struct type *base_type;
- LONGEST low, high;
char *subtype_info;
if (raw_type == NULL)
@@ -269,24 +281,24 @@ print_range_type_named (char *name, struct ui_file *stream)
if (*subtype_info == 'L')
{
- print_range_bound (raw_type, bounds_str, &n, stream);
+ print_range_bound (base_type, bounds_str, &n, stream);
subtype_info += 1;
}
else
- print_dynamic_range_bound (raw_type, name, prefix_len, "___L",
+ print_dynamic_range_bound (base_type, name, prefix_len, "___L",
stream);
fprintf_filtered (stream, " .. ");
if (*subtype_info == 'U')
- print_range_bound (raw_type, bounds_str, &n, stream);
+ print_range_bound (base_type, bounds_str, &n, stream);
else
- print_dynamic_range_bound (raw_type, name, prefix_len, "___U",
+ print_dynamic_range_bound (base_type, name, prefix_len, "___U",
stream);
}
}
-/* Print enumerated type TYPE on STREAM. */
+/* Print enumerated type TYPE on STREAM. */
static void
print_enum_type (struct type *type, struct ui_file *stream)
@@ -315,7 +327,7 @@ print_enum_type (struct type *type, struct ui_file *stream)
fprintf_filtered (stream, ")");
}
-/* Print representation of Ada fixed-point type TYPE on STREAM. */
+/* Print representation of Ada fixed-point type TYPE on STREAM. */
static void
print_fixed_point_type (struct type *type, struct ui_file *stream)
@@ -333,7 +345,7 @@ print_fixed_point_type (struct type *type, struct ui_file *stream)
}
}
-/* Print representation of special VAX floating-point type TYPE on STREAM. */
+/* Print representation of special VAX floating-point type TYPE on STREAM. */
static void
print_vax_floating_point_type (struct type *type, struct ui_file *stream)
@@ -342,10 +354,10 @@ print_vax_floating_point_type (struct type *type, struct ui_file *stream)
ada_vax_float_type_suffix (type));
}
-/* Print simple (constrained) array type TYPE on STREAM. LEVEL is the
- recursion (indentation) level, in case the element type itself has
+/* Print simple (constrained) array type TYPE on STREAM. LEVEL is the
+ recursion (indentation) level, in case the element type itself has
nested structure, and SHOW is the number of levels of internal
- structure to show (see ada_print_type). */
+ structure to show (see ada_print_type). */
static void
print_array_type (struct type *type, struct ui_file *stream, int show,
@@ -364,7 +376,12 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
{
if (ada_is_packed_array_type (type))
type = ada_coerce_to_simple_array_type (type);
- if (ada_is_simple_array (type))
+ if (type == NULL)
+ {
+ fprintf_filtered (stream, "<undecipherable array type>");
+ return;
+ }
+ if (ada_is_simple_array_type (type))
{
struct type *range_desc_type =
ada_find_parallel_type (type, "___XA");
@@ -417,7 +434,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
}
/* Print the choices encoded by field FIELD_NUM of variant-part TYPE on
- STREAM, assuming the VAL_TYPE is the type of the values. */
+ STREAM, assuming the VAL_TYPE is the type of the values. */
static void
print_choices (struct type *type, int field_num, struct ui_file *stream,
@@ -429,7 +446,7 @@ print_choices (struct type *type, int field_num, struct ui_file *stream,
have_output = 0;
- /* Skip over leading 'V': NOTE soon to be obsolete. */
+ /* Skip over leading 'V': NOTE soon to be obsolete. */
if (name[0] == 'V')
{
if (!ada_scan_number (name, 1, NULL, &p))
@@ -486,14 +503,14 @@ Huh:
}
-/* Assuming that field FIELD_NUM of TYPE is a VARIANTS field whose
- discriminant is contained in OUTER_TYPE, print its variants on STREAM.
+/* Assuming that field FIELD_NUM of TYPE is a VARIANTS field whose
+ discriminant is contained in OUTER_TYPE, print its variants on STREAM.
LEVEL is the recursion
(indentation) level, in case any of the fields themselves have
nested structure, and SHOW is the number of levels of internal structure
- to show (see ada_print_type). For this purpose, fields nested in a
+ to show (see ada_print_type). For this purpose, fields nested in a
variant part are taken to be at the same level as the fields
- immediately outside the variant part. */
+ immediately outside the variant part. */
static void
print_variant_clauses (struct type *type, int field_num,
@@ -501,7 +518,7 @@ print_variant_clauses (struct type *type, int field_num,
int show, int level)
{
int i;
- struct type *var_type;
+ struct type *var_type, *par_type;
struct type *discr_type;
var_type = TYPE_FIELD_TYPE (type, field_num);
@@ -510,14 +527,14 @@ print_variant_clauses (struct type *type, int field_num,
if (TYPE_CODE (var_type) == TYPE_CODE_PTR)
{
var_type = TYPE_TARGET_TYPE (var_type);
- if (TYPE_FLAGS (var_type) & TYPE_FLAG_STUB)
- {
- var_type = ada_find_parallel_type (var_type, "___XVU");
- if (var_type == NULL)
- return;
- }
+ if (var_type == NULL || TYPE_CODE (var_type) != TYPE_CODE_UNION)
+ return;
}
+ par_type = ada_find_parallel_type (var_type, "___XVU");
+ if (par_type != NULL)
+ var_type = par_type;
+
for (i = 0; i < TYPE_NFIELDS (var_type); i += 1)
{
fprintf_filtered (stream, "\n%*swhen ", level + 4, "");
@@ -529,13 +546,13 @@ print_variant_clauses (struct type *type, int field_num,
}
}
-/* Assuming that field FIELD_NUM of TYPE is a variant part whose
+/* Assuming that field FIELD_NUM of TYPE is a variant part whose
discriminants are contained in OUTER_TYPE, print a description of it
- on STREAM. LEVEL is the recursion (indentation) level, in case any of
- the fields themselves have nested structure, and SHOW is the number of
- levels of internal structure to show (see ada_print_type). For this
- purpose, fields nested in a variant part are taken to be at the same
- level as the fields immediately outside the variant part. */
+ on STREAM. LEVEL is the recursion (indentation) level, in case any of
+ the fields themselves have nested structure, and SHOW is the number of
+ levels of internal structure to show (see ada_print_type). For this
+ purpose, fields nested in a variant part are taken to be at the same
+ level as the fields immediately outside the variant part. */
static void
print_variant_part (struct type *type, int field_num, struct type *outer_type,
@@ -549,14 +566,14 @@ print_variant_part (struct type *type, int field_num, struct type *outer_type,
fprintf_filtered (stream, "\n%*send case;", level + 4, "");
}
-/* Print a description on STREAM of the fields in record type TYPE, whose
- discriminants are in OUTER_TYPE. LEVEL is the recursion (indentation)
- level, in case any of the fields themselves have nested structure,
- and SHOW is the number of levels of internal structure to show
- (see ada_print_type). Does not print parent type information of TYPE.
- Returns 0 if no fields printed, -1 for an incomplete type, else > 0.
+/* Print a description on STREAM of the fields in record type TYPE, whose
+ discriminants are in OUTER_TYPE. LEVEL is the recursion (indentation)
+ level, in case any of the fields themselves have nested structure,
+ and SHOW is the number of levels of internal structure to show
+ (see ada_print_type). Does not print parent type information of TYPE.
+ Returns 0 if no fields printed, -1 for an incomplete type, else > 0.
Prints each field beginning on a new line, but does not put a new line at
- end. */
+ end. */
static int
print_record_field_types (struct type *type, struct type *outer_type,
@@ -598,9 +615,9 @@ print_record_field_types (struct type *type, struct type *outer_type,
return flds;
}
-/* Print record type TYPE on STREAM. LEVEL is the recursion (indentation)
- level, in case the element type itself has nested structure, and SHOW is
- the number of levels of internal structure to show (see ada_print_type). */
+/* Print record type TYPE on STREAM. LEVEL is the recursion (indentation)
+ level, in case the element type itself has nested structure, and SHOW is
+ the number of levels of internal structure to show (see ada_print_type). */
static void
print_record_type (struct type *type0, struct ui_file *stream, int show,
@@ -609,19 +626,15 @@ print_record_type (struct type *type0, struct ui_file *stream, int show,
struct type *parent_type;
struct type *type;
- type = type0;
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
- {
- struct type *type1 = ada_find_parallel_type (type, "___XVE");
- if (type1 != NULL)
- type = type1;
- }
+ type = ada_find_parallel_type (type0, "___XVE");
+ if (type == NULL)
+ type = type0;
parent_type = ada_parent_type (type);
if (ada_type_name (parent_type) != NULL)
fprintf_filtered (stream, "new %s with ",
- demangled_type_name (parent_type));
- else if (parent_type == NULL && ada_is_tagged_type (type))
+ decoded_type_name (parent_type));
+ else if (parent_type == NULL && ada_is_tagged_type (type, 0))
fprintf_filtered (stream, "tagged ");
fprintf_filtered (stream, "record");
@@ -648,9 +661,9 @@ print_record_type (struct type *type0, struct ui_file *stream, int show,
}
/* Print the unchecked union type TYPE in something resembling Ada
- format on STREAM. LEVEL is the recursion (indentation) level
+ format on STREAM. LEVEL is the recursion (indentation) level
in case the element type itself has nested structure, and SHOW is the
- number of levels of internal structure to show (see ada_print_type). */
+ number of levels of internal structure to show (see ada_print_type). */
static void
print_unchecked_union_type (struct type *type, struct ui_file *stream,
int show, int level)
@@ -685,7 +698,7 @@ print_unchecked_union_type (struct type *type, struct ui_file *stream,
/* Print function or procedure type TYPE on STREAM. Make it a header
- for function or procedure NAME if NAME is not null. */
+ for function or procedure NAME if NAME is not null. */
static void
print_func_type (struct type *type, struct ui_file *stream, char *name)
@@ -728,23 +741,21 @@ print_func_type (struct type *type, struct ui_file *stream, char *name)
Output goes to STREAM (via stdio).
If VARSTRING is a non-empty string, print as an Ada variable/field
declaration.
- SHOW+1 is the maximum number of levels of internal type structure
+ SHOW+1 is the maximum number of levels of internal type structure
to show (this applies to record types, enumerated types, and
array types).
SHOW is the number of levels of internal type structure to show
- when there is a type name for the SHOWth deepest level (0th is
+ when there is a type name for the SHOWth deepest level (0th is
outer level).
When SHOW<0, no inner structure is shown.
- LEVEL indicates level of recursion (for nested definitions). */
+ LEVEL indicates level of recursion (for nested definitions). */
void
ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
int show, int level)
{
- enum type_code code;
- int demangled_args;
struct type *type = ada_completed_type (ada_get_base_type (type0));
- char *type_name = demangled_type_name (type);
+ char *type_name = decoded_type_name (type);
int is_var_decl = (varstring != NULL && varstring[0] != '\0');
if (type == NULL)
@@ -834,7 +845,7 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
print_enum_type (type, stream);
break;
case TYPE_CODE_STRUCT:
- if (ada_is_array_descriptor (type))
+ if (ada_is_array_descriptor_type (type))
print_array_type (type, stream, show, level);
else if (ada_is_bogus_array_descriptor (type))
fprintf_filtered (stream,
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index f5f411898b2..3617d76a779 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -1,5 +1,6 @@
-/* Support for printing Ada values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001
+/* Support for printing Ada values for GDB, the GNU debugger.
+ Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001,
+ 2002, 2003, 2004.
Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <ctype.h>
#include "defs.h"
+#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
@@ -32,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "c-lang.h"
#include "infcall.h"
-/* Encapsulates arguments to ada_val_print. */
+/* Encapsulates arguments to ada_val_print. */
struct ada_val_print_args
{
struct type *type;
@@ -69,9 +71,10 @@ static int ada_val_print_stub (void *args0);
static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
struct ui_file *, int, int, int,
enum val_prettyprint);
+static void ada_print_floating (char *, struct type *, struct ui_file *);
-/* Make TYPE unsigned if its range of values includes no negatives. */
+/* Make TYPE unsigned if its range of values includes no negatives. */
static void
adjust_type_signedness (struct type *type)
{
@@ -80,10 +83,10 @@ adjust_type_signedness (struct type *type)
TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
}
-/* Assuming TYPE is a simple array type, prints its lower bound on STREAM,
- if non-standard (i.e., other than 1 for numbers, other than lower bound
- of index type for enumerated type). Returns 1 if something printed,
- otherwise 0. */
+/* Assuming TYPE is a simple, non-empty array type, prints its lower bound
+ on STREAM, if non-standard (i.e., other than 1 for numbers, other
+ than lower bound of index type for enumerated type). Returns 1
+ if something printed, otherwise 0. */
static int
print_optional_low_bound (struct ui_file *stream, struct type *type)
@@ -99,6 +102,8 @@ print_optional_low_bound (struct ui_file *stream, struct type *type)
if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
{
low_bound = TYPE_LOW_BOUND (index_type);
+ if (low_bound > TYPE_HIGH_BOUND (index_type))
+ return 0;
index_type = TYPE_TARGET_TYPE (index_type);
}
else
@@ -127,8 +132,8 @@ print_optional_low_bound (struct ui_file *stream, struct type *type)
/* Version of val_print_array_elements for GNAT-style packed arrays.
Prints elements of packed array of type TYPE at bit offset
BITOFFSET from VALADDR on STREAM. Formats according to FORMAT and
- separates with commas. RECURSE is the recursion (nesting) level.
- If PRETTY, uses "prettier" format. TYPE must have been decoded (as
+ separates with commas. RECURSE is the recursion (nesting) level.
+ If PRETTY, uses "prettier" format. TYPE must have been decoded (as
by ada_coerce_to_simple_array). */
static void
@@ -142,11 +147,6 @@ val_print_packed_array_elements (struct type *type, char *valaddr,
unsigned len;
struct type *elttype;
unsigned eltlen;
- /* Position of the array element we are examining to see
- whether it is repeated. */
- unsigned int rep1;
- /* Number of repetitions we have detected so far. */
- unsigned int reps;
unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
struct value *mark = value_mark ();
@@ -252,7 +252,7 @@ printable_val_type (struct type *type, char *valaddr)
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. TYPE_LEN is the length in bytes
- (1 or 2) of the character. */
+ (1 or 2) of the character. */
void
ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
@@ -274,7 +274,7 @@ ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
}
/* Character #I of STRING, given that TYPE_LEN is the size in bytes (1
- or 2) of a character. */
+ or 2) of a character. */
static int
char_at (char *string, int i, int type_len)
@@ -285,6 +285,71 @@ char_at (char *string, int i, int type_len)
return (int) extract_unsigned_integer (string + 2 * i, 2);
}
+/* Wrapper around memcpy to make it legal argument to ui_file_put */
+static void
+ui_memcpy (void *dest, const char *buffer, long len)
+{
+ memcpy (dest, buffer, (size_t) len);
+ ((char *) dest)[len] = '\0';
+}
+
+/* Print a floating-point value of type TYPE, pointed to in GDB by
+ VALADDR, on STREAM. Use Ada formatting conventions: there must be
+ a decimal point, and at least one digit before and after the
+ point. We use GNAT format for NaNs and infinities. */
+static void
+ada_print_floating (char *valaddr, struct type *type, struct ui_file *stream)
+{
+ char buffer[64];
+ char *s, *result;
+ int len;
+ struct ui_file *tmp_stream = mem_fileopen ();
+ struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_stream);
+
+ print_floating (valaddr, type, tmp_stream);
+ ui_file_put (tmp_stream, ui_memcpy, buffer);
+ do_cleanups (cleanups);
+
+ result = buffer;
+ len = strlen (result);
+
+ /* Modify for Ada rules. */
+
+ s = strstr (result, "inf");
+ if (s == NULL)
+ s = strstr (result, "Inf");
+ if (s == NULL)
+ s = strstr (result, "INF");
+ if (s != NULL)
+ strcpy (s, "Inf");
+
+ if (s == NULL)
+ {
+ s = strstr (result, "nan");
+ if (s == NULL)
+ s = strstr (result, "NaN");
+ if (s == NULL)
+ s = strstr (result, "Nan");
+ if (s != NULL)
+ {
+ s[0] = s[2] = 'N';
+ if (result[0] == '-')
+ result += 1;
+ }
+ }
+
+ if (s == NULL && strchr (result, '.') == NULL)
+ {
+ s = strchr (result, 'e');
+ if (s == NULL)
+ fprintf_filtered (stream, "%s.0", result);
+ else
+ fprintf_filtered (stream, "%.*s.0%s", (int) (s-result), result, s);
+ return;
+ }
+ fprintf_filtered (stream, "%s", result);
+}
+
void
ada_printchar (int c, struct ui_file *stream)
{
@@ -294,7 +359,7 @@ ada_printchar (int c, struct ui_file *stream)
}
/* [From print_type_scalar in typeprint.c]. Print VAL on STREAM in a
- form appropriate for TYPE. */
+ form appropriate for TYPE. */
void
ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
@@ -405,9 +470,9 @@ printstr (struct ui_file *stream, char *string, unsigned int length,
rep1 = i + 1;
reps = 1;
- while (rep1 < length &&
- char_at (string, rep1, type_len) == char_at (string, i,
- type_len))
+ while (rep1 < length
+ && char_at (string, rep1, type_len) == char_at (string, i,
+ type_len))
{
rep1 += 1;
reps += 1;
@@ -463,7 +528,7 @@ printstr (struct ui_file *stream, char *string, unsigned int length,
void
ada_printstr (struct ui_file *stream, char *string, unsigned int length,
- int force_ellipses, int width)
+ int width, int force_ellipses)
{
printstr (stream, string, length, force_ellipses, width);
}
@@ -471,7 +536,7 @@ ada_printstr (struct ui_file *stream, char *string, unsigned int length,
/* Print data of type TYPE located at VALADDR (within GDB), which came from
the inferior at address ADDRESS, onto stdio stream STREAM according to
- FORMAT (a letter as for the printf % codes or 0 for natural format).
+ FORMAT (a letter as for the printf % codes or 0 for natural format).
The data at VALADDR is in target byte order.
If the data is printed as a string, returns the number of string characters
@@ -508,9 +573,9 @@ ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
}
/* Helper for ada_val_print; used as argument to catch_errors to
- unmarshal the arguments to ada_val_print_1, which does the work. */
+ unmarshal the arguments to ada_val_print_1, which does the work. */
static int
-ada_val_print_stub (void * args0)
+ada_val_print_stub (void *args0)
{
struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
return ada_val_print_1 (argsp->type, argsp->valaddr0,
@@ -520,7 +585,7 @@ ada_val_print_stub (void * args0)
}
/* See the comment on ada_val_print. This function differs in that it
- * does not catch evaluation errors (leaving that to ada_val_print). */
+ * does not catch evaluation errors (leaving that to ada_val_print). */
static int
ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
@@ -532,12 +597,11 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
struct type *elttype;
unsigned int eltlen;
LONGEST val;
- CORE_ADDR addr;
char *valaddr = valaddr0 + embedded_offset;
CHECK_TYPEDEF (type);
- if (ada_is_array_descriptor (type) || ada_is_packed_array_type (type))
+ if (ada_is_array_descriptor_type (type) || ada_is_packed_array_type (type))
{
int retn;
struct value *mark = value_mark ();
@@ -567,6 +631,22 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
return c_val_print (type, valaddr0, embedded_offset, address, stream,
format, deref_ref, recurse, pretty);
+ case TYPE_CODE_PTR:
+ {
+ int ret = c_val_print (type, valaddr0, embedded_offset, address,
+ stream, format, deref_ref, recurse, pretty);
+ if (ada_is_tag_type (type))
+ {
+ struct value *val =
+ value_from_contents_and_address (type, valaddr, address);
+ const char *name = ada_tag_name (val);
+ if (name != NULL)
+ fprintf_filtered (stream, " (%s)", name);
+ return 0;
+ }
+ return ret;
+ }
+
case TYPE_CODE_INT:
case TYPE_CODE_RANGE:
if (ada_is_fixed_point_type (type))
@@ -603,7 +683,7 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
fprintf_filtered (stream, "%s", VALUE_CONTENTS (printable_val));
return 0;
}
- /* No special printing function. Do as best we can. */
+ /* No special printing function. Do as best we can. */
}
else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
{
@@ -613,7 +693,7 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
/* Obscure case of range type that has different length from
its base type. Perform a conversion, or we will get a
nonsense value. Actually, we could use the same
- code regardless of lengths; I'm just avoiding a cast. */
+ code regardless of lengths; I'm just avoiding a cast. */
struct value *v = value_cast (target_type,
value_from_contents_and_address
(type, valaddr, 0));
@@ -633,6 +713,20 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
{
print_scalar_formatted (valaddr, type, format, 0, stream);
}
+ else if (ada_is_system_address_type (type))
+ {
+ /* FIXME: We want to print System.Address variables using
+ the same format as for any access type. But for some
+ reason GNAT encodes the System.Address type as an int,
+ so we have to work-around this deficiency by handling
+ System.Address values as a special case. */
+ fprintf_filtered (stream, "(");
+ type_print (type, "", stream, -1);
+ fprintf_filtered (stream, ") ");
+ print_address_numeric
+ (extract_typed_address (valaddr, builtin_type_void_data_ptr),
+ 1, stream);
+ }
else
{
val_print_type_code_int (type, valaddr, stream);
@@ -676,6 +770,14 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
}
break;
+ case TYPE_CODE_FLT:
+ if (format)
+ return c_val_print (type, valaddr0, embedded_offset, address, stream,
+ format, deref_ref, recurse, pretty);
+ else
+ ada_print_floating (valaddr0 + embedded_offset, type, stream);
+ break;
+
case TYPE_CODE_UNION:
case TYPE_CODE_STRUCT:
if (ada_is_bogus_array_descriptor (type))
@@ -690,66 +792,60 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
}
case TYPE_CODE_ARRAY:
- if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
- {
- elttype = TYPE_TARGET_TYPE (type);
- eltlen = TYPE_LENGTH (elttype);
- len = TYPE_LENGTH (type) / eltlen;
+ elttype = TYPE_TARGET_TYPE (type);
+ if (elttype == NULL)
+ eltlen = 0;
+ else
+ eltlen = TYPE_LENGTH (elttype);
+ /* FIXME: This doesn't deal with non-empty arrays of
+ 0-length items (not a typical case!) */
+ if (eltlen == 0)
+ len = 0;
+ else
+ len = TYPE_LENGTH (type) / eltlen;
/* For an array of chars, print with string syntax. */
- if (ada_is_string_type (type) && (format == 0 || format == 's'))
+ if (ada_is_string_type (type) && (format == 0 || format == 's'))
+ {
+ if (prettyprint_arrays)
{
- if (prettyprint_arrays)
- {
- print_spaces_filtered (2 + 2 * recurse, stream);
- }
- /* If requested, look for the first null char and only print
- elements up to it. */
- if (stop_print_at_null)
- {
- int temp_len;
-
- /* Look for a NULL char. */
- for (temp_len = 0;
- temp_len < len && temp_len < print_max
- && char_at (valaddr, temp_len, eltlen) != 0;
- temp_len += 1);
- len = temp_len;
- }
-
- printstr (stream, valaddr, len, 0, eltlen);
+ print_spaces_filtered (2 + 2 * recurse, stream);
}
- else
+ /* If requested, look for the first null char and only print
+ elements up to it. */
+ if (stop_print_at_null)
{
- len = 0;
- fprintf_filtered (stream, "(");
- print_optional_low_bound (stream, type);
- if (TYPE_FIELD_BITSIZE (type, 0) > 0)
- val_print_packed_array_elements (type, valaddr, 0, stream,
- format, recurse, pretty);
- else
- val_print_array_elements (type, valaddr, address, stream,
- format, deref_ref, recurse,
- pretty, 0);
- fprintf_filtered (stream, ")");
+ int temp_len;
+
+ /* Look for a NULL char. */
+ for (temp_len = 0;
+ temp_len < len && temp_len < print_max
+ && char_at (valaddr, temp_len, eltlen) != 0;
+ temp_len += 1);
+ len = temp_len;
}
- gdb_flush (stream);
- return len;
+
+ printstr (stream, valaddr, len, 0, eltlen);
}
+ else
+ {
+ len = 0;
+ fprintf_filtered (stream, "(");
+ print_optional_low_bound (stream, type);
+ if (TYPE_FIELD_BITSIZE (type, 0) > 0)
+ val_print_packed_array_elements (type, valaddr, 0, stream,
+ format, recurse, pretty);
+ else
+ val_print_array_elements (type, valaddr, address, stream,
+ format, deref_ref, recurse,
+ pretty, 0);
+ fprintf_filtered (stream, ")");
+ }
+ gdb_flush (stream);
+ return len;
case TYPE_CODE_REF:
elttype = check_typedef (TYPE_TARGET_TYPE (type));
- if (addressprint)
- {
- fprintf_filtered (stream, "@");
- /* Extract an address, assume that the address is unsigned. */
- print_address_numeric
- (extract_unsigned_integer (valaddr,
- TARGET_PTR_BIT / HOST_CHAR_BIT),
- 1, stream);
- if (deref_ref)
- fputs_filtered (": ", stream);
- }
/* De-reference the reference */
if (deref_ref)
{
@@ -777,6 +873,7 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
}
break;
}
+ gdb_flush (stream);
return 0;
}
@@ -811,26 +908,21 @@ ada_value_print (struct value *val0, struct ui_file *stream, int format,
struct value *val =
value_from_contents_and_address (type, valaddr, address);
- /* If it is a pointer, indicate what it points to. */
- if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF)
+ /* If it is a pointer, indicate what it points to. */
+ if (TYPE_CODE (type) == TYPE_CODE_PTR)
{
- /* Hack: remove (char *) for char strings. Their
- type is indicated by the quoted string anyway. */
- if (TYPE_CODE (type) == TYPE_CODE_PTR &&
- TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof (char) &&
- TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
- !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
- {
- /* Print nothing */
- }
- else
+ /* Hack: don't print (char *) for char strings. Their
+ type is indicated by the quoted string anyway. */
+ if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) != sizeof (char)
+ || TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_INT
+ || TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
{
fprintf_filtered (stream, "(");
type_print (type, "", stream, -1);
fprintf_filtered (stream, ") ");
}
}
- else if (ada_is_array_descriptor (type))
+ else if (ada_is_array_descriptor_type (type))
{
fprintf_filtered (stream, "(");
type_print (type, "", stream, -1);
@@ -843,6 +935,23 @@ ada_value_print (struct value *val0, struct ui_file *stream, int format,
fprintf_filtered (stream, ") (...?)");
return 0;
}
+
+ if (TYPE_CODE (type) == TYPE_CODE_ARRAY
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == 0
+ && TYPE_CODE (TYPE_INDEX_TYPE (type)) == TYPE_CODE_RANGE)
+ {
+ /* This is an array of zero-length elements, that is an array
+ of null records. This array needs to be printed by hand,
+ as the standard routine to print arrays relies on the size of
+ the array elements to be nonzero. This is because it computes
+ the number of elements in the array by dividing the array size
+ by the array element size. */
+ fprintf_filtered (stream, "(%d .. %d => ())",
+ TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
+ TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (type)));
+ return 0;
+ }
+
return (val_print (type, VALUE_CONTENTS (val), 0, address,
stream, format, 1, 0, pretty));
}
@@ -866,18 +975,18 @@ print_record (struct type *type, char *valaddr, struct ui_file *stream,
}
/* Print out fields of value at VALADDR having structure type TYPE.
-
+
TYPE, VALADDR, STREAM, FORMAT, RECURSE, and PRETTY have the
- same meanings as in ada_print_value and ada_val_print.
+ same meanings as in ada_print_value and ada_val_print.
OUTER_TYPE and OUTER_VALADDR give type and address of enclosing record
(used to get discriminant values when printing variant parts).
- COMMA_NEEDED is 1 if fields have been printed at the current recursion
+ COMMA_NEEDED is 1 if fields have been printed at the current recursion
level, so that a comma is needed before any field printed by this
- call.
+ call.
- Returns 1 if COMMA_NEEDED or any fields were printed. */
+ Returns 1 if COMMA_NEEDED or any fields were printed. */
static int
print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 18ee0b1f0f5..11a44712b02 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -48,8 +48,8 @@
#include "inferior.h"
#include "regcache.h"
#include "gdbcmd.h"
-#include "language.h" /* for local_hex_string() */
#include "ppc-tdep.h"
+#include "gdb_string.h"
#include <procinfo.h>
#include <sys/types.h>
@@ -129,7 +129,8 @@ static int pd_active = 0;
static int arch64;
-/* Saved pointer to previous owner of target_new_objfile_hook. */
+/* Saved pointer to previous owner of
+ deprecated_target_new_objfile_hook. */
static void (*target_new_objfile_chain)(struct objfile *);
@@ -312,7 +313,7 @@ pdc_symbol_addrs (pthdb_user_t user, pthdb_symbol_t *symbols, int count)
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = %s\n",
- i, local_hex_string (symbols[i].addr));
+ i, hex_string (symbols[i].addr));
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS\n");
@@ -337,15 +338,15 @@ pdc_read_regs (pthdb_user_t user,
this is needed, I have implemented what I think it should do,
however this code is untested. */
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n",
- (int) tid, local_hex_string (flags));
+ (int) tid, hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
@@ -411,7 +412,7 @@ pdc_write_regs (pthdb_user_t user,
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n",
- (int) tid, local_hex_string (flags));
+ (int) tid, hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
@@ -456,7 +457,7 @@ pdc_read_data (pthdb_user_t user, void *buf,
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
"pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
- user, (long) buf, local_hex_string (addr), len);
+ user, (long) buf, hex_string (addr), len);
status = target_read_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
@@ -478,7 +479,7 @@ pdc_write_data (pthdb_user_t user, void *buf,
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
"pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
- user, (long) buf, local_hex_string (addr), len);
+ user, (long) buf, hex_string (addr), len);
status = target_write_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
@@ -620,6 +621,35 @@ gcmp (const void *t1v, const void *t2v)
return ptid_cmp (t1->ptid, t2->ptid);
}
+/* Search through the list of all kernel threads for the thread
+ that has stopped on a SIGTRAP signal, and return its TID.
+ Return 0 if none found. */
+
+static pthdb_tid_t
+get_signaled_thread (void)
+{
+ struct thrdsinfo64 thrinf;
+ pthdb_tid_t ktid = 0;
+ int result = 0;
+
+ /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file. */
+ extern int getthrds (pid_t, struct thrdsinfo64 *,
+ int, pthdb_tid_t *, int);
+
+ while (1)
+ {
+ if (getthrds (PIDGET (inferior_ptid), &thrinf,
+ sizeof (thrinf), &ktid, 1) != 1)
+ break;
+
+ if (thrinf.ti_cursig == SIGTRAP)
+ return thrinf.ti_tid;
+ }
+
+ /* Didn't find any thread stopped on a SIGTRAP signal. */
+ return 0;
+}
+
/* Synchronize GDB's thread list with libpthdebug's.
There are some benefits of doing this every time the inferior stops:
@@ -746,28 +776,15 @@ sync_threadlists (void)
xfree (gbuf);
}
-/* Iterate_over_threads() callback for locating a thread whose kernel
- thread just received a trap signal. */
+/* Iterate_over_threads() callback for locating a thread, using
+ the TID of its associated kernel thread. */
static int
-iter_trap (struct thread_info *thread, void *unused)
+iter_tid (struct thread_info *thread, void *tidp)
{
- struct thrdsinfo64 thrinf;
- pthdb_tid_t tid;
+ const pthdb_tid_t tid = *(pthdb_tid_t *)tidp;
- /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file. */
- extern int getthrds (pid_t, struct thrdsinfo64 *,
- int, pthdb_tid_t *, int);
-
- tid = thread->private->tid;
- if (tid == PTHDB_INVALID_TID)
- return 0;
-
- if (getthrds (PIDGET (inferior_ptid), &thrinf,
- sizeof (thrinf), &tid, 1) != 1)
- return 0;
-
- return thrinf.ti_cursig == SIGTRAP;
+ return (thread->private->tid == tid);
}
/* Synchronize libpthdebug's state with the inferior and with GDB,
@@ -779,7 +796,8 @@ pd_update (int set_infpid)
{
int status;
ptid_t ptid;
- struct thread_info *thread;
+ pthdb_tid_t tid;
+ struct thread_info *thread = NULL;
if (!pd_active)
return inferior_ptid;
@@ -792,7 +810,9 @@ pd_update (int set_infpid)
/* Define "current thread" as one that just received a trap signal. */
- thread = iterate_over_threads (iter_trap, NULL);
+ tid = get_signaled_thread ();
+ if (tid != 0)
+ thread = iterate_over_threads (iter_tid, &tid);
if (!thread)
ptid = inferior_ptid;
else
@@ -852,7 +872,7 @@ pd_enable (void)
return;
/* Check application word size. */
- arch64 = DEPRECATED_REGISTER_RAW_SIZE (0) == 8;
+ arch64 = register_size (current_gdbarch, 0) == 8;
/* Check whether the application is pthreaded. */
stub_name = NULL;
@@ -893,7 +913,7 @@ pd_disable (void)
unpush_target (&aix_thread_ops);
}
-/* target_new_objfile_hook callback.
+/* deprecated_target_new_objfile_hook callback.
If OBJFILE is non-null, check whether a threaded application is
being debugged, and if so, prepare for thread debugging.
@@ -1000,10 +1020,12 @@ aix_thread_wait (ptid_t ptid, struct target_waitstatus *status)
static void
supply_gprs64 (uint64_t *vals)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < 32; regno++)
- supply_register (regno, (char *) (vals + regno));
+ for (regno = 0; regno < ppc_num_gprs; regno++)
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regno,
+ (char *) (vals + regno));
}
/* Record that 32-bit register REGNO contains VAL. */
@@ -1011,7 +1033,7 @@ supply_gprs64 (uint64_t *vals)
static void
supply_reg32 (int regno, uint32_t val)
{
- supply_register (regno, (char *) &val);
+ regcache_raw_supply (current_regcache, regno, (char *) &val);
}
/* Record that the floating-point registers contain VALS. */
@@ -1019,10 +1041,16 @@ supply_reg32 (int regno, uint32_t val)
static void
supply_fprs (double *vals)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < 32; regno++)
- supply_register (regno + FP0_REGNUM, (char *) (vals + regno));
+ /* This function should never be called on architectures without
+ floating-point registers. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ for (regno = 0; regno < ppc_num_fprs; regno++)
+ regcache_raw_supply (current_regcache, regno + tdep->ppc_fp0_regnum,
+ (char *) (vals + regno));
}
/* Predicate to test whether given register number is a "special" register. */
@@ -1037,7 +1065,7 @@ special_register_p (int regno)
|| regno == tdep->ppc_lr_regnum
|| regno == tdep->ppc_ctr_regnum
|| regno == tdep->ppc_xer_regnum
- || regno == tdep->ppc_fpscr_regnum
+ || (tdep->ppc_fpscr_regnum >= 0 && regno == tdep->ppc_fpscr_regnum)
|| (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum);
}
@@ -1052,13 +1080,15 @@ supply_sprs64 (uint64_t iar, uint64_t msr, uint32_t cr,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- supply_register (PC_REGNUM, (char *) &iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &xer);
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) &iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum, (char *) &msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum, (char *) &cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum, (char *) &lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum, (char *) &xer);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) &fpscr);
}
/* Record that the special registers contain the specified 32-bit
@@ -1071,13 +1101,15 @@ supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- supply_register (PC_REGNUM, (char *) &iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &xer);
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) &iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum, (char *) &msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum, (char *) &cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum, (char *) &lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum, (char *) &xer);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) &fpscr);
}
/* Fetch all registers from pthread PDTID, which doesn't have a kernel
@@ -1090,6 +1122,7 @@ supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr,
static void
fetch_regs_user_thread (pthdb_pthread_t pdtid)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int status, i;
pthdb_context_t ctx;
@@ -1106,12 +1139,13 @@ fetch_regs_user_thread (pthdb_pthread_t pdtid)
if (arch64)
supply_gprs64 (ctx.gpr);
else
- for (i = 0; i < 32; i++)
- supply_reg32 (i, ctx.gpr[i]);
+ for (i = 0; i < ppc_num_gprs; i++)
+ supply_reg32 (tdep->ppc_gp0_regnum + i, ctx.gpr[i]);
/* Floating-point registers. */
- supply_fprs (ctx.fpr);
+ if (ppc_floating_point_unit_p (current_gdbarch))
+ supply_fprs (ctx.fpr);
/* Special registers. */
@@ -1141,9 +1175,10 @@ fetch_regs_user_thread (pthdb_pthread_t pdtid)
static void
fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
int i;
@@ -1154,7 +1189,9 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
(long) tid, regno, arch64);
/* General-purpose registers. */
- if (regno == -1 || regno < FP0_REGNUM)
+ if (regno == -1
+ || (tdep->ppc_gp0_regnum <= regno
+ && regno < tdep->ppc_gp0_regnum + ppc_num_gprs))
{
if (arch64)
{
@@ -1167,14 +1204,17 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
memset (gprs32, 0, sizeof (gprs32));
- for (i = 0; i < 32; i++)
- supply_reg32 (i, gprs32[i]);
+ for (i = 0; i < ppc_num_gprs; i++)
+ supply_reg32 (tdep->ppc_gp0_regnum + i, gprs32[i]);
}
}
/* Floating-point registers. */
- if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+ if (ppc_floating_point_unit_p (current_gdbarch)
+ && (regno == -1
+ || (regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
{
if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
memset (fprs, 0, sizeof (fprs));
@@ -1205,7 +1245,8 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
sprs32.pt_fpscr);
if (tdep->ppc_mq_regnum >= 0)
- supply_register (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq);
+ regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
+ (char *) &sprs32.pt_mq);
}
}
}
@@ -1238,32 +1279,43 @@ aix_thread_fetch_registers (int regno)
static void
fill_gprs64 (uint64_t *vals)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < FP0_REGNUM; regno++)
- if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ for (regno = 0; regno < ppc_num_gprs; regno++)
+ if (register_cached (tdep->ppc_gp0_regnum + regno))
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno,
+ vals + regno);
}
static void
fill_gprs32 (uint32_t *vals)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < FP0_REGNUM; regno++)
- if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ for (regno = 0; regno < ppc_num_gprs; regno++)
+ if (register_cached (tdep->ppc_gp0_regnum + regno))
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno,
+ vals + regno);
}
/* Store the floating point registers into a double array. */
static void
fill_fprs (double *vals)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = FP0_REGNUM; regno < FPLAST_REGNUM; regno++)
+ /* This function should never be called on architectures without
+ floating-point registers. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ for (regno = tdep->ppc_fp0_regnum;
+ regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
+ regno++)
if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ regcache_raw_collect (current_regcache, regno, vals + regno);
}
/* Store the special registers into the specified 64-bit and 32-bit
@@ -1281,22 +1333,23 @@ fill_sprs64 (uint64_t *iar, uint64_t *msr, uint32_t *cr,
they're not, then either GDB has been built incorrectly, or
there's some other kind of internal error. To be really safe,
we should check all of the sizes. */
- gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
+ gdb_assert (sizeof (*iar) == register_size (current_gdbarch, PC_REGNUM));
if (register_cached (PC_REGNUM))
- regcache_collect (PC_REGNUM, iar);
+ regcache_raw_collect (current_regcache, PC_REGNUM, iar);
if (register_cached (tdep->ppc_ps_regnum))
- regcache_collect (tdep->ppc_ps_regnum, msr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr);
if (register_cached (tdep->ppc_cr_regnum))
- regcache_collect (tdep->ppc_cr_regnum, cr);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr);
if (register_cached (tdep->ppc_lr_regnum))
- regcache_collect (tdep->ppc_lr_regnum, lr);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr);
if (register_cached (tdep->ppc_ctr_regnum))
- regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
- regcache_collect (tdep->ppc_xer_regnum, xer);
- if (register_cached (tdep->ppc_fpscr_regnum))
- regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer);
+ if (tdep->ppc_fpscr_regnum >= 0
+ && register_cached (tdep->ppc_fpscr_regnum))
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr);
}
static void
@@ -1316,22 +1369,23 @@ fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr,
built incorrectly. In order to make use of many of the header
files in /usr/include/sys, GDB needs to be configured so that
sizeof (long) == 4). */
- gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
+ gdb_assert (sizeof (*iar) == register_size (current_gdbarch, PC_REGNUM));
if (register_cached (PC_REGNUM))
- regcache_collect (PC_REGNUM, iar);
+ regcache_raw_collect (current_regcache, PC_REGNUM, iar);
if (register_cached (tdep->ppc_ps_regnum))
- regcache_collect (tdep->ppc_ps_regnum, msr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr);
if (register_cached (tdep->ppc_cr_regnum))
- regcache_collect (tdep->ppc_cr_regnum, cr);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr);
if (register_cached (tdep->ppc_lr_regnum))
- regcache_collect (tdep->ppc_lr_regnum, lr);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr);
if (register_cached (tdep->ppc_ctr_regnum))
- regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
- regcache_collect (tdep->ppc_xer_regnum, xer);
- if (register_cached (tdep->ppc_fpscr_regnum))
- regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer);
+ if (tdep->ppc_fpscr_regnum >= 0
+ && register_cached (tdep->ppc_fpscr_regnum))
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr);
}
/* Store all registers into pthread PDTID, which doesn't have a kernel
@@ -1343,6 +1397,7 @@ fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr,
static void
store_regs_user_thread (pthdb_pthread_t pdtid)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int status, i;
pthdb_context_t ctx;
uint32_t int32;
@@ -1362,23 +1417,26 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
/* Collect general-purpose register values from the regcache. */
- for (i = 0; i < 32; i++)
- if (register_cached (i))
+ for (i = 0; i < ppc_num_gprs; i++)
+ if (register_cached (tdep->ppc_gp0_regnum + i))
{
if (arch64)
{
- regcache_collect (i, (void *) &int64);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ (void *) &int64);
ctx.gpr[i] = int64;
}
else
{
- regcache_collect (i, (void *) &int32);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ (void *) &int32);
ctx.gpr[i] = int32;
}
}
/* Collect floating-point register values from the regcache. */
- fill_fprs (ctx.fpr);
+ if (ppc_floating_point_unit_p (current_gdbarch))
+ fill_fprs (ctx.fpr);
/* Special registers (always kept in ctx as 64 bits). */
if (arch64)
@@ -1394,7 +1452,6 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
happens, GDB needs to be reconfigured so that longs are 32-bits.) */
unsigned long tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer,
tmp_fpscr;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
fill_sprs32 (&tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr, &tmp_xer,
&tmp_fpscr);
@@ -1431,13 +1488,13 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
static void
store_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
- uint64_t gprs64[32];
- uint32_t gprs32[32];
- double fprs[32];
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ uint64_t gprs64[ppc_num_gprs];
+ uint32_t gprs32[ppc_num_gprs];
+ double fprs[ppc_num_fprs];
struct ptxsprs sprs64;
struct ptsprs sprs32;
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
@@ -1445,7 +1502,9 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid)
(long) tid, regno);
/* General-purpose registers. */
- if (regno == -1 || regno < FP0_REGNUM)
+ if (regno == -1
+ || (tdep->ppc_gp0_regnum <= regno
+ && regno < tdep->ppc_gp0_regnum + ppc_num_fprs))
{
if (arch64)
{
@@ -1465,7 +1524,10 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid)
/* Floating-point registers. */
- if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+ if (ppc_floating_point_unit_p (current_gdbarch)
+ && (regno == -1
+ || (regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
{
/* Pre-fetch: some regs may not be in the cache. */
ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);
@@ -1499,7 +1561,8 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid)
if (tdep->ppc_mq_regnum >= 0)
if (register_cached (tdep->ppc_mq_regnum))
- regcache_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
+ regcache_raw_collect (current_regcache, tdep->ppc_mq_regnum,
+ &sprs32.pt_mq);
ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL);
}
@@ -1594,10 +1657,10 @@ aix_thread_pid_to_str (ptid_t ptid)
return base_target.to_pid_to_str (ptid);
/* Free previous return value; a new one will be allocated by
- xasprintf(). */
+ xstrprintf(). */
xfree (ret);
- xasprintf (&ret, "Thread %ld", ptid_get_tid (ptid));
+ ret = xstrprintf ("Thread %ld", ptid_get_tid (ptid));
return ret;
}
@@ -1695,13 +1758,14 @@ _initialize_aix_thread (void)
add_target (&aix_thread_ops);
/* Notice when object files get loaded and unloaded. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = new_objfile;
-
- add_show_from_set (add_set_cmd ("aix-thread", no_class, var_zinteger,
- (char *) &debug_aix_thread,
- "Set debugging of AIX thread module.\n"
- "Enables printf debugging output.\n",
- &setdebuglist),
- &showdebuglist);
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = new_objfile;
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("aix-thread", no_class, var_zinteger,
+ (char *) &debug_aix_thread,
+ "Set debugging of AIX thread module.\n"
+ "Enables printf debugging output.\n",
+ &setdebuglist),
+ &showdebuglist);
}
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 344195eee49..02036ba3a59 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -134,11 +134,10 @@ alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_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->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
}
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index 0a78d949170..6fe6bdfeec6 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -99,7 +99,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (CANNOT_FETCH_REGISTER (regno))
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
continue;
}
addr = 8 * core_reg_mapping[regno];
@@ -108,7 +108,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
/* ??? UNIQUE is a new addition. Don't generate an error. */
if (regno == ALPHA_UNIQUE_REGNUM)
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
continue;
}
if (bad_reg < 0)
@@ -116,7 +116,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
}
else
{
- supply_register (regno, core_reg_sect + addr);
+ regcache_raw_supply (current_regcache, regno, core_reg_sect + addr);
}
}
if (bad_reg >= 0)
@@ -267,6 +267,6 @@ static struct core_fns alpha_elf_core_fns =
void
_initialize_core_alpha (void)
{
- add_core_fns (&alpha_osf_core_fns);
- add_core_fns (&alpha_elf_core_fns);
+ deprecated_add_core_fns (&alpha_osf_core_fns);
+ deprecated_add_core_fns (&alpha_elf_core_fns);
}
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index 1fc988956f6..b5879ad551c 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -54,13 +54,13 @@ alpha_osf1_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_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->sigcontext_addr = alpha_osf1_sigcontext_addr;
+ tdep->pc_in_sigtramp = alpha_osf1_pc_in_sigtramp;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 8777afc4176..65fd5c1f0d6 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -40,6 +40,7 @@
#include "arch-utils.h"
#include "osabi.h"
#include "block.h"
+#include "infcall.h"
#include "elf-bfd.h"
@@ -144,18 +145,6 @@ alpha_register_byte (int regno)
return (regno * 8);
}
-static int
-alpha_register_raw_size (int regno)
-{
- return 8;
-}
-
-static int
-alpha_register_virtual_size (int regno)
-{
- 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. */
@@ -263,7 +252,7 @@ alpha_value_to_register (struct frame_info *frame, int regnum,
structure to be returned is passed as a hidden first argument. */
static CORE_ADDR
-alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -281,6 +270,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
struct alpha_arg *m_arg;
char arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
int required_arg_regs;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* The ABI places the address of the called function in T12. */
regcache_cooked_write_signed (regcache, ALPHA_T12_REGNUM, func_addr);
@@ -626,7 +616,7 @@ alpha_read_insn (CORE_ADDR pc)
char buf[4];
int status;
- status = read_memory_nobpt (pc, buf, 4);
+ status = deprecated_read_memory_nobpt (pc, buf, 4);
if (status)
memory_error (status, pc);
return extract_unsigned_integer (buf, 4);
@@ -863,14 +853,20 @@ alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
CORE_ADDR pc = frame_pc_unwind (next_frame);
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)
+ /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
+ look at tramp-frame.h and other simplier per-architecture
+ sigtramp unwinders. */
+
+ /* We shouldn't even bother to try if the OSABI didn't register a
+ sigcontext_addr handler or pc_in_sigtramp hander. */
+ if (gdbarch_tdep (current_gdbarch)->sigcontext_addr == NULL)
+ return NULL;
+ if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp == NULL)
return NULL;
/* Otherwise we should be in a signal frame. */
find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
+ if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp (pc, name))
return &alpha_sigtramp_frame_unwind;
return NULL;
@@ -1029,6 +1025,16 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *next_frame,
{
reg = (word & 0x03e00000) >> 21;
+ /* Ignore this instruction if we have already encountered
+ an instruction saving the same register earlier in the
+ function code. The current instruction does not tell
+ us where the original value upon function entry is saved.
+ All it says is that the function we are scanning reused
+ that register for some computation of its own, and is now
+ saving its result. */
+ if (info->saved_regs[reg])
+ continue;
+
if (reg == 31)
continue;
@@ -1285,16 +1291,16 @@ alpha_supply_int_regs (int regno, const void *r0_r30,
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- supply_register (i, (const char *)r0_r30 + i*8);
+ regcache_raw_supply (current_regcache, i, (const char *)r0_r30 + i*8);
if (regno == ALPHA_ZERO_REGNUM || regno == -1)
- supply_register (ALPHA_ZERO_REGNUM, NULL);
+ regcache_raw_supply (current_regcache, ALPHA_ZERO_REGNUM, NULL);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- supply_register (ALPHA_PC_REGNUM, pc);
+ regcache_raw_supply (current_regcache, ALPHA_PC_REGNUM, pc);
if (regno == ALPHA_UNIQUE_REGNUM || regno == -1)
- supply_register (ALPHA_UNIQUE_REGNUM, unique);
+ regcache_raw_supply (current_regcache, ALPHA_UNIQUE_REGNUM, unique);
}
void
@@ -1304,13 +1310,13 @@ alpha_fill_int_regs (int regno, void *r0_r30, void *pc, void *unique)
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- regcache_collect (i, (char *)r0_r30 + i*8);
+ regcache_raw_collect (current_regcache, i, (char *)r0_r30 + i*8);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- regcache_collect (ALPHA_PC_REGNUM, pc);
+ regcache_raw_collect (current_regcache, ALPHA_PC_REGNUM, pc);
if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
- regcache_collect (ALPHA_UNIQUE_REGNUM, unique);
+ regcache_raw_collect (current_regcache, ALPHA_UNIQUE_REGNUM, unique);
}
void
@@ -1320,10 +1326,11 @@ alpha_supply_fp_regs (int regno, const void *f0_f30, const void *fpcr)
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);
+ regcache_raw_supply (current_regcache, i,
+ (const char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- supply_register (ALPHA_FPCR_REGNUM, fpcr);
+ regcache_raw_supply (current_regcache, ALPHA_FPCR_REGNUM, fpcr);
}
void
@@ -1333,10 +1340,11 @@ alpha_fill_fp_regs (int regno, void *f0_f30, void *fpcr)
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);
+ regcache_raw_collect (current_regcache, i,
+ (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_collect (ALPHA_FPCR_REGNUM, fpcr);
+ regcache_raw_collect (current_regcache, ALPHA_FPCR_REGNUM, fpcr);
}
@@ -1483,7 +1491,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Lowest text address. This is used by heuristic_proc_start()
to decide when to stop looking. */
- tdep->vm_min_address = (CORE_ADDR) 0x120000000;
+ tdep->vm_min_address = (CORE_ADDR) 0x120000000LL;
tdep->dynamic_sigtramp_offset = NULL;
tdep->sigcontext_addr = NULL;
@@ -1511,8 +1519,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, alpha_register_name);
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);
@@ -1532,7 +1538,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Call info. */
- set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, alpha_extract_struct_value_address);
@@ -1601,5 +1607,5 @@ search. The only need to set it is when debugging a stripped executable.",
/* We need to throw away the frame cache when we set this, since it
might change our ability to get backtraces. */
set_cmd_sfunc (c, reinit_frame_cache_sfunc);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
}
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 828a3c6b2f7..60cea0a5cb4 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -23,9 +23,8 @@
#define ALPHA_TDEP_H
/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places;
- DEPRECATED_REGISTER_RAW_SIZE is the real way to know how big a
- register is. */
+ used in push_word and a few other places; register_size() is the
+ real way to know how big a register is. */
#define ALPHA_REGISTER_SIZE 8
/* Number of machine registers. */
@@ -83,6 +82,12 @@ struct gdbarch_tdep
the sigcontext structure for that signal handler. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
+ /* Does the PC fall in a signal trampoline. */
+ /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
+ look at tramp-frame.h and other simplier per-architecture
+ sigtramp unwinders. */
+ int (*pc_in_sigtramp) (CORE_ADDR pc, char *name);
+
/* Offset of registers in `struct sigcontext'. */
int sc_pc_offset;
int sc_regs_offset;
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index 0781698710f..4b1dbde3b1f 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -1,5 +1,6 @@
/* Native-dependent code for Alpha BSD's.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -76,10 +77,9 @@ static int
getregs_supplies (int regno)
{
return ((regno >= ALPHA_V0_REGNUM && regno <= ALPHA_ZERO_REGNUM)
- || regno >= PC_REGNUM);
+ || regno >= ALPHA_PC_REGNUM);
}
-
/* Fetch register REGNO from the inferior. If REGNO is -1, do this
for all registers (including the floating point registers). */
@@ -91,7 +91,7 @@ fetch_inferior_registers (int regno)
struct reg gregs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
perror_with_name ("Couldn't get registers");
alphabsd_supply_reg ((char *) &gregs, regno);
@@ -104,7 +104,7 @@ fetch_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
alphabsd_supply_fpreg ((char *) &fpregs, regno);
@@ -121,13 +121,13 @@ store_inferior_registers (int regno)
{
struct reg gregs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
perror_with_name ("Couldn't get registers");
alphabsd_fill_reg ((char *) &gregs, regno);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
perror_with_name ("Couldn't write registers");
if (regno != -1)
@@ -139,13 +139,13 @@ store_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
alphabsd_fill_fpreg ((char *) &fpregs, regno);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't write floating point status");
}
}
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 77bd6eaac34..8bd48798e91 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -98,12 +98,11 @@ alphafbsd_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
-
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
tdep->sigcontext_addr = alphafbsd_sigcontext_addr;
+ tdep->pc_in_sigtramp = alphafbsd_pc_in_sigtramp;
tdep->sc_pc_offset = 288;
tdep->sc_regs_offset = 24;
tdep->sc_fpregs_offset = 320;
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 6fe92524d21..299ed3af61f 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -27,11 +27,12 @@
#include "value.h"
#include "osabi.h"
-#include "solib-svr4.h"
+#include "gdb_string.h"
#include "alpha-tdep.h"
#include "alphabsd-tdep.h"
#include "nbsd-tdep.h"
+#include "solib-svr4.h"
static void
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
@@ -69,9 +70,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
/* Integer registers. */
for (regno = 0; regno < ALPHA_ZERO_REGNUM; regno++)
- supply_register (regno, regs + (regmap[regno] * 8));
- supply_register (ALPHA_ZERO_REGNUM, NULL);
- supply_register (PC_REGNUM, regs + (28 * 8));
+ regcache_raw_supply (current_regcache, regno, regs + (regmap[regno] * 8));
+ regcache_raw_supply (current_regcache, ALPHA_ZERO_REGNUM, NULL);
+ regcache_raw_supply (current_regcache, PC_REGNUM, regs + (28 * 8));
/* Floating point registers. */
alphabsd_supply_fpreg (fpregs, -1);
@@ -154,7 +155,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
LONGEST off;
int i;
- if (read_memory_nobpt (pc, (char *) w, 4) != 0)
+ if (deprecated_read_memory_nobpt (pc, (char *) w, 4) != 0)
return -1;
for (i = 0; i < RETCODE_NWORDS; i++)
@@ -168,7 +169,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
off = i * 4;
pc -= off;
- if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (deprecated_read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
return -1;
if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0)
@@ -205,8 +206,6 @@ alphanbsd_init_abi (struct gdbarch_info info,
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
-
/* NetBSD/alpha does not provide single step support via ptrace(2); we
must use software single-stepping. */
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
@@ -215,6 +214,7 @@ alphanbsd_init_abi (struct gdbarch_info info,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+ tdep->pc_in_sigtramp = alphanbsd_pc_in_sigtramp;
tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
tdep->jb_pc = 2;
@@ -226,9 +226,7 @@ _initialize_alphanbsd_tdep (void)
{
gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_NETBSD_ELF,
alphanbsd_init_abi);
- gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OPENBSD_ELF,
- alphanbsd_init_abi);
- add_core_fns (&alphanbsd_core_fns);
- add_core_fns (&alphanbsd_elfcore_fns);
+ deprecated_add_core_fns (&alphanbsd_core_fns);
+ deprecated_add_core_fns (&alphanbsd_elfcore_fns);
}
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 72aa73ccd3d..ab4725e1dd6 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -169,7 +169,7 @@ fetch_inferior_registers (int regnum)
return;
}
- if (regnum == -1 || regnum >= AMD64_ST0_REGNUM)
+ if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
{
elf_fpregset_t fpregs;
@@ -210,7 +210,7 @@ store_inferior_registers (int regnum)
return;
}
- if (regnum == -1 || regnum >= AMD64_ST0_REGNUM)
+ if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
{
elf_fpregset_t fpregs;
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 843a84e01b7..2bca2e02f8f 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -25,6 +25,7 @@
#include "gdbcore.h"
#include "regcache.h"
#include "osabi.h"
+#include "symtab.h"
#include "gdb_string.h"
@@ -85,8 +86,9 @@ static const unsigned char linux_sigtramp_code[] =
the routine. Otherwise, return 0. */
static CORE_ADDR
-amd64_linux_sigtramp_start (CORE_ADDR pc)
+amd64_linux_sigtramp_start (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of
@@ -96,7 +98,7 @@ amd64_linux_sigtramp_start (CORE_ADDR pc)
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)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
return 0;
if (buf[0] != LINUX_SIGTRAMP_INSN0)
@@ -106,7 +108,7 @@ amd64_linux_sigtramp_start (CORE_ADDR pc)
pc -= LINUX_SIGTRAMP_OFFSET1;
- if (read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
return 0;
}
@@ -116,11 +118,17 @@ amd64_linux_sigtramp_start (CORE_ADDR pc)
return pc;
}
-/* Return whether PC is in a GNU/Linux sigtramp routine. */
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ GNU/Linux sigtramp routine. */
static int
-amd64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
+amd64_linux_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
/* 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
@@ -128,7 +136,7 @@ amd64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
__sigaction, or __libc_sigaction (all aliases to the same
function). */
if (name == NULL || strstr (name, "sigaction") != NULL)
- return (amd64_linux_sigtramp_start (pc) != 0);
+ return (amd64_linux_sigtramp_start (next_frame) != 0);
return (strcmp ("__restore_rt", name) == 0);
}
@@ -203,7 +211,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
amd64_init_abi (info, gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, amd64_linux_pc_in_sigtramp);
+ tdep->sigtramp_p = amd64_linux_sigtramp_p;
tdep->sigcontext_addr = amd64_linux_sigcontext_addr;
tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 31b360377be..50a03de5822 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -85,7 +85,7 @@ amd64_native_gregset_supplies_p (int regnum)
}
-/* Supply register REGNUM, whose contents are store in BUF, to
+/* Supply register REGNUM, whose contents are stored in GREGS, to
REGCACHE. If REGNUM is -1, supply all appropriate registers. */
void
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 1a66e45b4fe..90a4e11bed0 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -422,11 +422,28 @@ amd64_return_value (struct gdbarch *gdbarch, struct type *type,
amd64_classify (type, class);
/* 2. If the type has class MEMORY, then the caller provides space
- for the return value and passes the address of this storage in
- %rdi as if it were the first argument to the function. In
- effect, this address becomes a hidden first argument. */
+ for the return value and passes the address of this storage in
+ %rdi as if it were the first argument to the function. In effect,
+ this address becomes a hidden first argument.
+
+ On return %rax will contain the address that has been passed in
+ by the caller in %rdi. */
if (class[0] == AMD64_MEMORY)
- return RETURN_VALUE_STRUCT_CONVENTION;
+ {
+ /* As indicated by the comment above, the ABI guarantees that we
+ can always find the return value just after the function has
+ returned. */
+
+ if (readbuf)
+ {
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &addr);
+ read_memory (addr, readbuf, TYPE_LENGTH (type));
+ }
+
+ return RETURN_VALUE_ABI_RETURNS_ADDRESS;
+ }
gdb_assert (class[1] != AMD64_MEMORY);
gdb_assert (len <= 16);
@@ -629,7 +646,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-amd64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -764,7 +781,7 @@ amd64_skip_prologue (CORE_ADDR start_pc)
struct amd64_frame_cache cache;
CORE_ADDR pc;
- pc = amd64_analyze_prologue (start_pc, 0xffffffffffffffff, &cache);
+ pc = amd64_analyze_prologue (start_pc, 0xffffffffffffffffLL, &cache);
if (cache.frameless_p)
return start_pc;
@@ -967,15 +984,26 @@ static const struct frame_unwind amd64_sigtramp_frame_unwind =
static const struct frame_unwind *
amd64_sigtramp_frame_sniffer (struct frame_info *next_frame)
{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- char *name;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame));
+
+ /* We shouldn't even bother if we don't have a sigcontext_addr
+ handler. */
+ if (tdep->sigcontext_addr == NULL)
+ return NULL;
+
+ if (tdep->sigtramp_p != NULL)
+ {
+ if (tdep->sigtramp_p (next_frame))
+ return &amd64_sigtramp_frame_unwind;
+ }
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
+ if (tdep->sigtramp_start != 0)
{
- gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr);
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
- return &amd64_sigtramp_frame_unwind;
+ gdb_assert (tdep->sigtramp_end != 0);
+ if (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end)
+ return &amd64_sigtramp_frame_unwind;
}
return NULL;
@@ -1020,20 +1048,36 @@ amd64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
}
-/* Supply register REGNUM from the floating-point register set REGSET
- to register cache REGCACHE. If REGNUM is -1, do this for all
- registers in REGSET. */
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+ in the floating-point register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
static void
amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
gdb_assert (len == tdep->sizeof_fpregset);
amd64_supply_fxsave (regcache, regnum, fpregs);
}
+/* Collect register REGNUM from the register cache REGCACHE and store
+ it in the buffer specified by FPREGS and LEN as described by the
+ floating-point register set REGSET. If REGNUM is -1, do this for
+ all registers in REGSET. */
+
+static void
+amd64_collect_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len)
+{
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
+
+ gdb_assert (len == tdep->sizeof_fpregset);
+ amd64_collect_fxsave (regcache, regnum, fpregs);
+}
+
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
@@ -1046,11 +1090,8 @@ amd64_regset_from_core_section (struct gdbarch *gdbarch,
if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
{
if (tdep->fpregset == NULL)
- {
- tdep->fpregset = XMALLOC (struct regset);
- tdep->fpregset->descr = tdep;
- tdep->fpregset->supply_regset = amd64_supply_fpregset;
- }
+ tdep->fpregset = regset_alloc (gdbarch, amd64_supply_fpregset,
+ amd64_collect_fpregset);
return tdep->fpregset;
}
@@ -1160,7 +1201,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
{
i387_supply_fxsave (regcache, regnum, fxsave);
- if (fxsave)
+ if (fxsave && gdbarch_ptr_bit (get_regcache_arch (regcache)) == 64)
{
const char *regs = fxsave;
@@ -1184,8 +1225,11 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
i387_collect_fxsave (regcache, regnum, fxsave);
- if (regnum == -1 || regnum == I387_FISEG_REGNUM)
- regcache_raw_collect (regcache, I387_FISEG_REGNUM, regs + 12);
- if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM, regs + 20);
+ if (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 64)
+ {
+ if (regnum == -1 || regnum == I387_FISEG_REGNUM)
+ regcache_raw_collect (regcache, I387_FISEG_REGNUM, regs + 12);
+ if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
+ regcache_raw_collect (regcache, I387_FOSEG_REGNUM, regs + 20);
+ }
}
diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h
index bfc549bd58e..e01be02b1ac 100644
--- a/gdb/amd64-tdep.h
+++ b/gdb/amd64-tdep.h
@@ -45,6 +45,12 @@ enum amd64_regnum
AMD64_R15_REGNUM = 15, /* %r15 */
AMD64_RIP_REGNUM, /* %rip */
AMD64_EFLAGS_REGNUM, /* %eflags */
+ AMD64_CS_REGNUM, /* %cs */
+ AMD64_SS_REGNUM, /* %ss */
+ AMD64_DS_REGNUM, /* %ds */
+ AMD64_ES_REGNUM, /* %es */
+ AMD64_FS_REGNUM, /* %fs */
+ AMD64_GS_REGNUM, /* %gs */
AMD64_ST0_REGNUM = 24, /* %st0 */
AMD64_XMM0_REGNUM = 40, /* %xmm0 */
AMD64_XMM1_REGNUM /* %xmm1 */
diff --git a/gdb/amd64bsd-nat.c b/gdb/amd64bsd-nat.c
index 777fd690b39..b30885aa763 100644
--- a/gdb/amd64bsd-nat.c
+++ b/gdb/amd64bsd-nat.c
@@ -46,7 +46,7 @@ fetch_inferior_registers (int regnum)
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
amd64_supply_native_gregset (current_regcache, &regs, -1);
@@ -54,12 +54,12 @@ fetch_inferior_registers (int regnum)
return;
}
- if (regnum == -1 || regnum >= AMD64_ST0_REGNUM)
+ if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
{
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
amd64_supply_fxsave (current_regcache, -1, &fpregs);
@@ -77,31 +77,31 @@ store_inferior_registers (int regnum)
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
amd64_collect_native_gregset (current_regcache, &regs, regnum);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
if (regnum != -1)
return;
}
- if (regnum == -1 || regnum >= AMD64_ST0_REGNUM)
+ if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
{
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
amd64_collect_fxsave (current_regcache, regnum, &fpregs);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't write floating point status");
}
}
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c
index 61ce73cce9d..caeaee9a75a 100644
--- a/gdb/amd64fbsd-nat.c
+++ b/gdb/amd64fbsd-nat.c
@@ -31,30 +31,17 @@
#include <sys/sysctl.h>
#include <machine/reg.h>
-#ifdef HAVE_SYS_PROCFS_H
-#include <sys/procfs.h>
-#endif
-
-#ifndef HAVE_GREGSET_T
-typedef struct reg gregset_t;
-#endif
-
-#ifndef HAVE_FPREGSET_T
-typedef struct fpreg fpregset_t;
-#endif
-
-#include "gregset.h"
#include "amd64-tdep.h"
#include "amd64-nat.h"
-/* Offset to the gregset_t location where REG is stored. */
-#define REG_OFFSET(reg) offsetof (gregset_t, reg)
+/* Offset in `struct reg' where MEMBER is stored. */
+#define REG_OFFSET(member) offsetof (struct reg, member)
-/* At reg_offset[REGNUM] you'll find the offset to the gregset_t
- location where the GDB register REGNUM is stored. Unsupported
- registers are marked with `-1'. */
-static int reg_offset[] =
+/* At amd64fbsd64_r_reg_offset[REGNUM] you'll find the offset in
+ `struct reg' location where the GDB register REGNUM is stored.
+ Unsupported registers are marked with `-1'. */
+static int amd64fbsd64_r_reg_offset[] =
{
REG_OFFSET (r_rax),
REG_OFFSET (r_rbx),
@@ -104,44 +91,44 @@ static int amd64fbsd32_r_reg_offset[I386_NUM_GREGS] =
};
-/* Transfering the registers between GDB, inferiors and core files. */
-
-/* Fill GDB's register array with the general-purpose register values
- in *GREGSETP. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- amd64_supply_native_gregset (current_regcache, gregsetp, -1);
-}
-
-/* Fill register REGNUM (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
- do this for all registers. */
-
-void
-fill_gregset (gregset_t *gregsetp, int regnum)
-{
- amd64_collect_native_gregset (current_regcache, gregsetp, regnum);
-}
+/* Support for debugging kernel virtual memory images. */
-/* Fill GDB's register array with the floating-point register values
- in *FPREGSETP. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- amd64_supply_fxsave (current_regcache, -1, fpregsetp);
-}
+#include <sys/types.h>
+#include <machine/pcb.h>
-/* Fill register REGNUM (if it is a floating-point register) in
- *FPREGSETP with the value in GDB's register array. If REGNUM is -1,
- do this for all registers. */
+#include "bsd-kvm.h"
-void
-fill_fpregset (fpregset_t *fpregsetp, int regnum)
+static int
+amd64fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
- amd64_collect_fxsave (current_regcache, regnum, fpregsetp);
+ /* The following is true for FreeBSD 5.2:
+
+ The pcb contains %rip, %rbx, %rsp, %rbp, %r12, %r13, %r14, %r15,
+ %ds, %es, %fs and %gs. This accounts for all callee-saved
+ registers specified by the psABI and then some. Here %esp
+ contains the stack pointer at the point just after the call to
+ cpu_switch(). From this information we reconstruct the register
+ state as it would like when we just returned from cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_rsp == 0)
+ return 0;
+
+ pcb->pcb_rsp += 8;
+ regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip);
+ regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx);
+ regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+ regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+ regcache_raw_supply (regcache, 12, &pcb->pcb_r12);
+ regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
+ regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
+ regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
+ regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
+ regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
+ regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
+ regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
+
+ return 1;
}
@@ -154,7 +141,7 @@ _initialize_amd64fbsd_nat (void)
int offset;
amd64_native_gregset32_reg_offset = amd64fbsd32_r_reg_offset;
- amd64_native_gregset64_reg_offset = reg_offset;
+ amd64_native_gregset64_reg_offset = amd64fbsd64_r_reg_offset;
/* To support the recognition of signal handlers, i386bsd-tdep.c
hardcodes some constants. Inclusion of this file means that we
@@ -232,4 +219,7 @@ Please report this to <bug-gdb@gnu.org>.",
amd64fbsd_sigtramp_end_addr = ps_strings;
}
}
+
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (amd64fbsd_supply_pcb);
}
diff --git a/gdb/amd64nbsd-tdep.c b/gdb/amd64nbsd-tdep.c
index cb413f02e16..ffa91100e94 100644
--- a/gdb/amd64nbsd-tdep.c
+++ b/gdb/amd64nbsd-tdep.c
@@ -24,6 +24,7 @@
#include "frame.h"
#include "gdbcore.h"
#include "osabi.h"
+#include "symtab.h"
#include "gdb_assert.h"
@@ -33,18 +34,34 @@
/* Support for signal handlers. */
-/* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
- routine, return the address of the associated sigcontext structure. */
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ NetBSD sigtramp routine. */
+
+static int
+amd64nbsd_sigtramp_p (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ return nbsd_pc_in_sigtramp (pc, name);
+}
+
+/* Assuming NEXT_FRAME is preceded by a frame corresponding to a
+ NetBSD sigtramp routine, return the address of the associated
+ mcontext structure. */
static CORE_ADDR
-amd64nbsd_sigcontext_addr (struct frame_info *next_frame)
+amd64nbsd_mcontext_addr (struct frame_info *next_frame)
{
- CORE_ADDR sp;
+ CORE_ADDR addr;
- /* The stack pointer points at `struct sigcontext' upon entry of a
+ /* The register %r15 points at `struct ucontext' upon entry of a
signal trampoline. */
- sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
- return sp;
+ addr = frame_unwind_register_unsigned (next_frame, AMD64_R15_REGNUM);
+
+ /* The mcontext structure lives as offset 56 in `struct ucontext'. */
+ return addr + 56;
}
/* NetBSD 2.0 or later. */
@@ -85,8 +102,6 @@ static void
amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int *sc_reg_offset;
- int i;
/* Initialize general-purpose register set details first. */
tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
@@ -98,22 +113,10 @@ amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 7 * 8;
/* NetBSD has its own convention for signal trampolines. */
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
- tdep->sigcontext_addr = amd64nbsd_sigcontext_addr;
-
- /* Initialize the array with register offsets in `struct
- sigcontext'. This `struct sigcontext' has an sc_mcontext member
- at offset 32, and in <machine/reg.h> we have an explicit comment
- saying that `struct reg' is the same as mcontext.__gregs. */
+ tdep->sigtramp_p = amd64nbsd_sigtramp_p;
+ tdep->sigcontext_addr = amd64nbsd_mcontext_addr;
+ tdep->sc_reg_offset = amd64nbsd_r_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64nbsd_r_reg_offset);
- tdep->sc_reg_offset = XCALLOC (tdep->sc_num_regs, int);
- for (i = 0; i < tdep->sc_num_regs; i++)
- {
- if (amd64nbsd_r_reg_offset[i] < 0)
- tdep->sc_reg_offset[i] = -1;
- else
- tdep->sc_reg_offset[i] = 32 + amd64nbsd_r_reg_offset[i];
- }
/* NetBSD uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
diff --git a/gdb/amd64obsd-nat.c b/gdb/amd64obsd-nat.c
index e8d92fefa80..0f9b5efac7f 100644
--- a/gdb/amd64obsd-nat.c
+++ b/gdb/amd64obsd-nat.c
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
#include "gdb_assert.h"
@@ -56,6 +58,76 @@ static int amd64obsd32_r_reg_offset[] =
};
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+amd64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ struct switchframe sf;
+ int regnum;
+
+ /* The following is true for OpenBSD 3.5:
+
+ The pcb contains the stack pointer at the point of the context
+ switch in cpu_switch(). At that point we have a stack frame as
+ described by `struct switchframe', which for OpenBSD 3.5 has the
+ following layout:
+
+ interrupt level
+ %r15
+ %r14
+ %r13
+ %r12
+ %rbp
+ %rbx
+ return address
+
+ Together with %rsp in the pcb, this accounts for all callee-saved
+ registers specified by the psABI. From this information we
+ reconstruct the register state as it would look when we just
+ returned from cpu_switch().
+
+ For core dumps the pcb is saved by savectx(). In that case the
+ stack frame only contains the return address, and there is no way
+ to recover the other registers. */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_rsp == 0)
+ return 0;
+
+ /* Read the stack frame, and check its validity. */
+ read_memory (pcb->pcb_rsp, (char *) &sf, sizeof sf);
+ if (sf.sf_rbp == pcb->pcb_rbp)
+ {
+ /* Yes, we have a frame that matches cpu_switch(). */
+ pcb->pcb_rsp += sizeof (struct switchframe);
+ regcache_raw_supply (regcache, 12, &sf.sf_r12);
+ regcache_raw_supply (regcache, 13, &sf.sf_r13);
+ regcache_raw_supply (regcache, 14, &sf.sf_r14);
+ regcache_raw_supply (regcache, 15, &sf.sf_r15);
+ regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx);
+ regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip);
+ }
+ else
+ {
+ /* No, the pcb must have been last updated by savectx(). */
+ pcb->pcb_rsp += 8;
+ regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf);
+ }
+
+ regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+ regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+
+ return 1;
+}
+
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_amd64obsd_nat (void);
@@ -65,4 +137,7 @@ _initialize_amd64obsd_nat (void)
amd64_native_gregset32_reg_offset = amd64obsd32_r_reg_offset;
amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64obsd32_r_reg_offset);
amd64_native_gregset64_reg_offset = amd64obsd_r_reg_offset;
+
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (amd64obsd_supply_pcb);
}
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 70a9da873c3..f97b9a6c57e 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -22,6 +22,8 @@
#include "defs.h"
#include "frame.h"
#include "gdbcore.h"
+#include "symtab.h"
+#include "objfiles.h"
#include "osabi.h"
#include "regset.h"
#include "target.h"
@@ -40,7 +42,7 @@ amd64obsd_supply_regset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *regs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE);
@@ -61,11 +63,7 @@ amd64obsd_regset_from_core_section (struct gdbarch *gdbarch,
&& sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE)
{
if (tdep->gregset == NULL)
- {
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = tdep;
- tdep->gregset->supply_regset = amd64obsd_supply_regset;
- }
+ tdep->gregset = regset_alloc (gdbarch, amd64obsd_supply_regset, NULL);
return tdep->gregset;
}
@@ -75,11 +73,16 @@ amd64obsd_regset_from_core_section (struct gdbarch *gdbarch,
/* Support for signal handlers. */
+/* Default page size. */
static const int amd64obsd_page_size = 4096;
+/* Return whether the frame preceding NEXT_FRAME corresponds to an
+ OpenBSD sigtramp routine. */
+
static int
-amd64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
+amd64obsd_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
CORE_ADDR start_pc = (pc & ~(amd64obsd_page_size - 1));
const char sigreturn[] =
{
@@ -87,18 +90,30 @@ amd64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
0x67, 0x00, 0x00, 0x00, /* movq $SYS_sigreturn, %rax */
0xcd, 0x80 /* int $0x80 */
};
- char *buf;
+ size_t buflen = (sizeof sigreturn) + 1;
+ char *name, *buf;
+
+ /* If the function has a valid symbol name, it isn't a
+ trampoline. */
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (name != NULL)
+ return 0;
- if (name)
+ /* If the function lives in a valid section (even without a starting
+ point) it isn't a trampoline. */
+ if (find_pc_section (pc) != NULL)
return 0;
/* If we can't read the instructions at START_PC, return zero. */
- buf = alloca (sizeof sigreturn);
- if (target_read_memory (start_pc + 0x7, buf, sizeof sigreturn))
+ buf = alloca ((sizeof sigreturn) + 1);
+ if (!safe_frame_unwind_memory (next_frame, start_pc + 6, buf, buflen))
return 0;
- /* Check for sigreturn(2). */
- if (memcmp (buf, sigreturn, sizeof sigreturn))
+ /* Check for sigreturn(2). Depending on how the assembler encoded
+ the `movq %rsp, %rdi' instruction, the code starts at offset 6 or
+ 7. */
+ if (memcmp (buf, sigreturn, sizeof sigreturn)
+ && memcpy (buf + 1, sigreturn, sizeof sigreturn))
return 0;
return 1;
@@ -110,9 +125,25 @@ amd64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
static CORE_ADDR
amd64obsd_sigcontext_addr (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ ULONGEST offset = (pc & (amd64obsd_page_size - 1));
+
/* The %rsp register points at `struct sigcontext' upon entry of a
- signal trampoline. */
- return frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
+ signal trampoline. The relevant part of the trampoline is
+
+ call *%rax
+ movq %rsp, %rdi
+ pushq %rdi
+ movq $SYS_sigreturn,%rax
+ int $0x80
+
+ (see /usr/src/sys/arch/amd64/amd64/locore.S). The `pushq'
+ instruction clobbers %rsp, but its value is saved in `%rdi'. */
+
+ if (offset > 5)
+ return frame_unwind_register_unsigned (next_frame, AMD64_RDI_REGNUM);
+ else
+ return frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
}
/* OpenBSD 3.5 or later. */
@@ -195,7 +226,7 @@ amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 7 * 8;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, amd64obsd_pc_in_sigtramp);
+ tdep->sigtramp_p = amd64obsd_sigtramp_p;
tdep->sigcontext_addr = amd64obsd_sigcontext_addr;
tdep->sc_reg_offset = amd64obsd_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64obsd_sc_reg_offset);
diff --git a/gdb/annotate.c b/gdb/annotate.c
index 0ba9b42f6cd..c84c63d9610 100644
--- a/gdb/annotate.c
+++ b/gdb/annotate.c
@@ -35,11 +35,11 @@ static void print_value_flags (struct type *);
static void breakpoint_changed (struct breakpoint *);
-void (*annotate_starting_hook) (void);
-void (*annotate_stopped_hook) (void);
-void (*annotate_signalled_hook) (void);
-void (*annotate_signal_hook) (void);
-void (*annotate_exited_hook) (void);
+void (*deprecated_annotate_starting_hook) (void);
+void (*deprecated_annotate_stopped_hook) (void);
+void (*deprecated_annotate_signalled_hook) (void);
+void (*deprecated_annotate_signal_hook) (void);
+void (*deprecated_annotate_exited_hook) (void);
static int ignore_count_changed = 0;
@@ -102,8 +102,8 @@ void
annotate_starting (void)
{
- if (annotate_starting_hook)
- annotate_starting_hook ();
+ if (deprecated_annotate_starting_hook)
+ deprecated_annotate_starting_hook ();
else
{
if (annotation_level > 1)
@@ -116,8 +116,8 @@ annotate_starting (void)
void
annotate_stopped (void)
{
- if (annotate_stopped_hook)
- annotate_stopped_hook ();
+ if (deprecated_annotate_stopped_hook)
+ deprecated_annotate_stopped_hook ();
else
{
if (annotation_level > 1)
@@ -133,8 +133,8 @@ annotate_stopped (void)
void
annotate_exited (int exitstatus)
{
- if (annotate_exited_hook)
- annotate_exited_hook ();
+ if (deprecated_annotate_exited_hook)
+ deprecated_annotate_exited_hook ();
else
{
if (annotation_level > 1)
@@ -145,8 +145,8 @@ annotate_exited (int exitstatus)
void
annotate_signalled (void)
{
- if (annotate_signalled_hook)
- annotate_signalled_hook ();
+ if (deprecated_annotate_signalled_hook)
+ deprecated_annotate_signalled_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signalled\n");
@@ -183,8 +183,8 @@ annotate_signal_string_end (void)
void
annotate_signal (void)
{
- if (annotate_signal_hook)
- annotate_signal_hook ();
+ if (deprecated_annotate_signal_hook)
+ deprecated_annotate_signal_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signal\n");
@@ -579,7 +579,7 @@ _initialize_annotate (void)
{
if (annotation_level > 1)
{
- delete_breakpoint_hook = breakpoint_changed;
- modify_breakpoint_hook = breakpoint_changed;
+ deprecated_delete_breakpoint_hook = breakpoint_changed;
+ deprecated_modify_breakpoint_hook = breakpoint_changed;
}
}
diff --git a/gdb/annotate.h b/gdb/annotate.h
index ac3cec8f94f..cca14d38024 100644
--- a/gdb/annotate.h
+++ b/gdb/annotate.h
@@ -99,8 +99,8 @@ extern void annotate_elt_rep_end (void);
extern void annotate_elt (void);
extern void annotate_array_section_end (void);
-extern void (*annotate_starting_hook) (void);
-extern void (*annotate_stopped_hook) (void);
-extern void (*annotate_signalled_hook) (void);
-extern void (*annotate_signal_hook) (void);
-extern void (*annotate_exited_hook) (void);
+extern void (*deprecated_annotate_starting_hook) (void);
+extern void (*deprecated_annotate_stopped_hook) (void);
+extern void (*deprecated_annotate_signalled_hook) (void);
+extern void (*deprecated_annotate_signal_hook) (void);
+extern void (*deprecated_annotate_exited_hook) (void);
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index d76a8e40a7f..b60ed33f556 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1,7 +1,7 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -30,7 +30,7 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "sim-regno.h"
-
+#include "gdbcore.h"
#include "osabi.h"
#include "version.h"
@@ -60,13 +60,46 @@ legacy_store_return_value (struct type *type, struct regcache *regcache,
DEPRECATED_STORE_RETURN_VALUE (type, b);
}
-
int
always_use_struct_convention (int gcc_p, struct type *value_type)
{
return 1;
}
+enum return_value_convention
+legacy_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
+{
+ /* NOTE: cagney/2004-06-13: The gcc_p parameter to
+ USE_STRUCT_CONVENTION isn't used. */
+ int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION
+ || TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
+ && DEPRECATED_USE_STRUCT_CONVENTION (0, valtype));
+
+ if (writebuf != NULL)
+ {
+ gdb_assert (!struct_return);
+ /* NOTE: cagney/2004-06-13: See stack.c:return_command. Old
+ architectures don't expect STORE_RETURN_VALUE to handle small
+ structures. Should not be called with such types. */
+ gdb_assert (TYPE_CODE (valtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (valtype) != TYPE_CODE_UNION);
+ STORE_RETURN_VALUE (valtype, regcache, writebuf);
+ }
+
+ if (readbuf != NULL)
+ {
+ gdb_assert (!struct_return);
+ EXTRACT_RETURN_VALUE (valtype, regcache, readbuf);
+ }
+
+ if (struct_return)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else
+ return RETURN_VALUE_REGISTER_CONVENTION;
+}
int
legacy_register_sim_regno (int regnum)
@@ -84,12 +117,6 @@ legacy_register_sim_regno (int regnum)
return LEGACY_SIM_REGNO_IGNORE;
}
-int
-generic_return_value_on_stack_not (struct type *type)
-{
- return 0;
-}
-
CORE_ADDR
generic_skip_trampoline_code (CORE_ADDR pc)
{
@@ -120,13 +147,6 @@ generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
return 0;
}
-#if defined (CALL_DUMMY)
-LONGEST legacy_call_dummy_words[] = CALL_DUMMY;
-#else
-LONGEST legacy_call_dummy_words[1];
-#endif
-int legacy_sizeof_call_dummy_words = sizeof (legacy_call_dummy_words);
-
void
generic_remote_translate_xfer_address (struct gdbarch *gdbarch,
struct regcache *regcache,
@@ -208,17 +228,6 @@ no_op_reg_to_regnum (int reg)
return reg;
}
-CORE_ADDR
-deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev)
-{
- if (fromleaf && DEPRECATED_SAVED_PC_AFTER_CALL_P ())
- return DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev));
- else if (get_next_frame (prev) != NULL)
- return DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev));
- else
- return read_pc ();
-}
-
void
default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
{
@@ -269,13 +278,7 @@ int
generic_register_size (int regnum)
{
gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
- if (gdbarch_register_type_p (current_gdbarch))
- return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum));
- else
- /* FIXME: cagney/2003-03-01: Once all architectures implement
- gdbarch_register_type(), this entire function can go away. It
- is made obsolete by register_size(). */
- return TYPE_LENGTH (DEPRECATED_REGISTER_VIRTUAL_TYPE (regnum)); /* OK */
+ return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum));
}
/* Assume all registers are adjacent. */
@@ -298,42 +301,17 @@ generic_register_byte (int regnum)
int
legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
-#if !defined (DEPRECATED_IN_SIGTRAMP)
- if (DEPRECATED_SIGTRAMP_START_P ())
- return ((pc) >= DEPRECATED_SIGTRAMP_START (pc)
- && (pc) < DEPRECATED_SIGTRAMP_END (pc));
- else
- return name && strcmp ("_sigtramp", name) == 0;
-#else
+#if defined (DEPRECATED_IN_SIGTRAMP)
return DEPRECATED_IN_SIGTRAMP (pc, name);
+#else
+ return name && strcmp ("_sigtramp", name) == 0;
#endif
}
int
-legacy_convert_register_p (int regnum, struct type *type)
-{
- return (DEPRECATED_REGISTER_CONVERTIBLE_P ()
- && DEPRECATED_REGISTER_CONVERTIBLE (regnum));
-}
-
-void
-legacy_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to)
+generic_convert_register_p (int regnum, struct type *type)
{
- char from[MAX_REGISTER_SIZE];
- get_frame_register (frame, regnum, from);
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
-}
-
-void
-legacy_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *tmp)
-{
- char to[MAX_REGISTER_SIZE];
- char *from = alloca (TYPE_LENGTH (type));
- memcpy (from, from, TYPE_LENGTH (type));
- DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
- put_frame_register (frame, regnum, to);
+ return 0;
}
int
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 8f2e6012f67..cf63b318254 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -1,7 +1,7 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -32,6 +32,15 @@ struct gdbarch_info;
/* gdbarch trace variable */
extern int gdbarch_debug;
+/* An implementation of return_value that props up architectures still
+ using USE_STRUCT_RETURN, EXTRACT_RETURN_VALUE and
+ STORE_RETURN_VALUE. See also the hacks in "stack.c". */
+enum return_value_convention legacy_return_value (struct gdbarch *gdbarch,
+ struct type *valtype,
+ struct regcache *regcache,
+ void *readbuf,
+ const void *writebuf);
+
/* Implementation of extract return value that grubs around in the
register cache. */
extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
@@ -41,16 +50,7 @@ extern gdbarch_store_return_value_ftype legacy_store_return_value;
/* To return any structure or union type by value, store it at the
address passed as an invisible first argument to the function. */
-extern gdbarch_use_struct_convention_ftype always_use_struct_convention;
-
-/* Only structures, unions, and arrays are returned using the struct
- convention. Note that arrays are never passed by value in the C
- language family, so that case is irrelevant for C. */
-extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
-
-/* Backward compatible call_dummy_words. */
-extern LONGEST legacy_call_dummy_words[];
-extern int legacy_sizeof_call_dummy_words;
+extern gdbarch_deprecated_use_struct_convention_ftype always_use_struct_convention;
/* Typical remote_translate_xfer_address */
extern gdbarch_remote_translate_xfer_address_ftype generic_remote_translate_xfer_address;
@@ -72,10 +72,6 @@ extern gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr_ident
extern int no_op_reg_to_regnum (int reg);
-/* Versions of init_frame_pc(). Do nothing; do the default. */
-
-extern CORE_ADDR deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev);
-
/* Do nothing version of elf_make_msymbol_special. */
void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym);
@@ -117,16 +113,8 @@ extern int generic_register_byte (int regnum);
/* Prop up old targets that use various sigtramp macros. */
extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name);
-/* The orginal register_convert*() functions were overloaded. They
- were used to both: convert between virtual and raw register formats
- (something that is discouraged); and to convert a register to the
- type of a corresponding variable. These legacy functions preserve
- that overloaded behavour in existing targets. */
-extern int legacy_convert_register_p (int regnum, struct type *type);
-extern void legacy_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to);
-extern void legacy_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from);
+/* By default, registers are not convertible. */
+extern int generic_convert_register_p (int regnum, struct type *type);
extern int default_stabs_argument_has_addr (struct gdbarch *gdbarch,
struct type *type);
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 8d7ee9de277..fa0fda0147b 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -102,7 +102,7 @@ fetch_nwfpe_single (unsigned int fn, FPA11 * fpa11)
mem[0] = fpa11->fpreg[fn].fSingle;
mem[1] = 0;
mem[2] = 0;
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
@@ -113,7 +113,7 @@ fetch_nwfpe_double (unsigned int fn, FPA11 * fpa11)
mem[0] = fpa11->fpreg[fn].fDouble[1];
mem[1] = fpa11->fpreg[fn].fDouble[0];
mem[2] = 0;
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
@@ -122,7 +122,7 @@ fetch_nwfpe_none (unsigned int fn)
unsigned int mem[3] =
{0, 0, 0};
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
@@ -133,7 +133,7 @@ fetch_nwfpe_extended (unsigned int fn, FPA11 * fpa11)
mem[0] = fpa11->fpreg[fn].fExtended[0]; /* sign & exponent */
mem[1] = fpa11->fpreg[fn].fExtended[2]; /* ls bits */
mem[2] = fpa11->fpreg[fn].fExtended[1]; /* ms bits */
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
@@ -165,7 +165,8 @@ store_nwfpe_single (unsigned int fn, FPA11 *fpa11)
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fSingle = mem[0];
fpa11->fType[fn] = typeSingle;
}
@@ -175,7 +176,8 @@ store_nwfpe_double (unsigned int fn, FPA11 *fpa11)
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fDouble[1] = mem[0];
fpa11->fpreg[fn].fDouble[0] = mem[1];
fpa11->fType[fn] = typeDouble;
@@ -186,7 +188,8 @@ store_nwfpe_extended (unsigned int fn, FPA11 *fpa11)
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fExtended[0] = mem[0]; /* sign & exponent */
fpa11->fpreg[fn].fExtended[2] = mem[1]; /* ls bits */
fpa11->fpreg[fn].fExtended[1] = mem[2]; /* ms bits */
@@ -239,7 +242,7 @@ fetch_fpregister (int regno)
/* Fetch fpsr. */
if (ARM_FPS_REGNUM == regno)
- supply_register (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Fetch the floating point register. */
if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
@@ -287,7 +290,7 @@ fetch_fpregs (void)
}
/* Fetch fpsr. */
- supply_register (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Fetch the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -336,7 +339,7 @@ store_fpregister (int regno)
/* Store fpsr. */
if (ARM_FPS_REGNUM == regno && register_cached (ARM_FPS_REGNUM))
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Store the floating point register. */
if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
@@ -374,7 +377,7 @@ store_fpregs (void)
/* Store fpsr. */
if (register_cached (ARM_FPS_REGNUM))
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Store the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -410,20 +413,23 @@ fetch_register (int regno)
}
if (regno >= ARM_A1_REGNUM && regno < ARM_PC_REGNUM)
- supply_register (regno, (char *) &regs[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) &regs[regno]);
if (ARM_PS_REGNUM == regno)
{
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &regs[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &regs[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) &regs[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &regs[ARM_PC_REGNUM]);
}
if (ARM_PC_REGNUM == regno)
{
regs[ARM_PC_REGNUM] = ADDR_BITS_REMOVE (regs[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) &regs[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) &regs[ARM_PC_REGNUM]);
}
}
@@ -447,15 +453,18 @@ fetch_regs (void)
}
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
- supply_register (regno, (char *) &regs[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) &regs[regno]);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &regs[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &regs[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) &regs[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &regs[ARM_PC_REGNUM]);
regs[ARM_PC_REGNUM] = ADDR_BITS_REMOVE (regs[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) &regs[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) &regs[ARM_PC_REGNUM]);
}
/* Store all general registers of the process from the values in
@@ -482,7 +491,7 @@ store_register (int regno)
}
if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
- regcache_collect (regno, (char *) &regs[regno]);
+ regcache_raw_collect (current_regcache, regno, (char *) &regs[regno]);
ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
if (ret < 0)
@@ -512,7 +521,7 @@ store_regs (void)
for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
{
if (register_cached (regno))
- regcache_collect (regno, (char *) &regs[regno]);
+ regcache_raw_collect (current_regcache, regno, (char *) &regs[regno]);
}
ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
@@ -579,19 +588,21 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
{
int regnum;
for (regnum = ARM_A1_REGNUM; regnum <= ARM_PC_REGNUM; regnum++)
- regcache_collect (regnum, (char *) &(*gregsetp)[regnum]);
+ regcache_raw_collect (current_regcache, regnum,
+ (char *) &(*gregsetp)[regnum]);
}
else if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
- regcache_collect (regno, (char *) &(*gregsetp)[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &(*gregsetp)[regno]);
if (ARM_PS_REGNUM == regno || -1 == regno)
{
if (arm_apcs_32)
- regcache_collect (ARM_PS_REGNUM,
- (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
else
- regcache_collect (ARM_PC_REGNUM,
- (char *) &(*gregsetp)[ARM_PC_REGNUM]);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &(*gregsetp)[ARM_PC_REGNUM]);
}
}
@@ -604,15 +615,18 @@ supply_gregset (gdb_gregset_t *gregsetp)
int regno, reg_pc;
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
- supply_register (regno, (char *) &(*gregsetp)[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &(*gregsetp)[regno]);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) &(*gregsetp)[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_PC_REGNUM]);
reg_pc = ADDR_BITS_REMOVE ((CORE_ADDR)(*gregsetp)[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) &reg_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM, (char *) &reg_pc);
}
/* Fill register regno (if it is a floating-point register) in
@@ -638,7 +652,8 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
/* Store fpsr. */
if (ARM_FPS_REGNUM == regno || -1 == regno)
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp->fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &fp->fpsr);
}
/* Fill GDB's register array with the floating-point register values
@@ -651,7 +666,7 @@ supply_fpregset (gdb_fpregset_t *fpregsetp)
FPA11 *fp = (FPA11 *) fpregsetp;
/* Fetch fpsr. */
- supply_register (ARM_FPS_REGNUM, (char *) &fp->fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp->fpsr);
/* Fetch the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 26b1a173320..98dacca60c2 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -44,20 +44,6 @@ static const char arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef };
static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 };
-/* DEPRECATED_CALL_DUMMY_WORDS:
- This sequence of words is the instructions
-
- mov lr, pc
- mov pc, r4
- swi bkpt_swi
-
- Note this is 12 bytes. */
-
-LONGEST arm_linux_call_dummy_words[] =
-{
- 0xe1a0e00f, 0xe1a0f004, 0xef9f001
-};
-
/* Description of the longjmp buffer. */
#define ARM_LINUX_JB_ELEMENT_SIZE INT_REGISTER_SIZE
#define ARM_LINUX_JB_PC 21
@@ -490,9 +476,6 @@ arm_linux_init_abi (struct gdbarch_info info,
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));
-
/* The following two overrides shouldn't be needed. */
set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value);
set_gdbarch_deprecated_push_arguments (gdbarch, arm_linux_push_arguments);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 3fa37c9a88e..43de3b1f095 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -191,7 +191,7 @@ static int target_is_thumb;
/* Flag set by arm_fix_call_dummy that tells whether the calling
function is a Thumb function. This flag is checked by
- arm_pc_is_thumb and arm_call_dummy_breakpoint_offset. */
+ arm_pc_is_thumb. */
static int caller_is_thumb;
@@ -234,7 +234,7 @@ arm_pc_is_thumb_dummy (CORE_ADDR memaddr)
frame location (true if we have not pushed large data structures or
gone too many levels deep) and that our 1024 is not enough to consider
code regions as part of the stack (true for most practical purposes). */
- if (DEPRECATED_PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024))
+ if (deprecated_pc_in_call_dummy (memaddr))
return caller_is_thumb;
else
return 0;
@@ -269,39 +269,6 @@ arm_saved_pc_after_call (struct frame_info *frame)
return ADDR_BITS_REMOVE (read_register (ARM_LR_REGNUM));
}
-/* Determine whether the function invocation represented by FI has a
- frame on the stack associated with it. If it does return zero,
- otherwise return 1. */
-
-static int
-arm_frameless_function_invocation (struct frame_info *fi)
-{
- CORE_ADDR func_start, after_prologue;
- int frameless;
-
- /* Sometimes we have functions that do a little setup (like saving the
- vN registers with the stmdb instruction, but DO NOT set up a frame.
- The symbol table will report this as a prologue. However, it is
- important not to try to parse these partial frames as frames, or we
- will get really confused.
-
- So I will demand 3 instructions between the start & end of the
- prologue before I call it a real prologue, i.e. at least
- mov ip, sp,
- stmdb sp!, {}
- sub sp, ip, #4. */
-
- func_start = (get_frame_func (fi) + FUNCTION_START_OFFSET);
- after_prologue = SKIP_PROLOGUE (func_start);
-
- /* There are some frameless functions whose first two instructions
- follow the standard APCS form, in which case after_prologue will
- be func_start + 8. */
-
- frameless = (after_prologue < func_start + 12);
- return frameless;
-}
-
/* A typical Thumb prologue looks like this:
push {r7, lr}
add sp, sp, #-28
@@ -407,7 +374,7 @@ arm_skip_prologue (CORE_ADDR pc)
struct symtab_and_line sal;
/* If we're in a dummy frame, don't even try to skip the prologue. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
+ if (deprecated_pc_in_call_dummy (pc))
return pc;
/* See what the symbol table says. */
@@ -993,15 +960,6 @@ arm_prologue_this_id (struct frame_info *next_frame,
return;
id = frame_id_build (cache->prev_sp, func);
-
- /* Check that we're not going round in circles with the same frame
- ID (but avoid applying the test to sentinel frames which do go
- round in circles). */
- if (frame_relative_level (next_frame) >= 0
- && get_frame_type (next_frame) == NORMAL_FRAME
- && frame_id_eq (get_frame_id (next_frame), id))
- return;
-
*this_id = id;
}
@@ -1038,8 +996,8 @@ arm_prologue_prev_register (struct frame_info *next_frame,
return;
}
- trad_frame_prev_register (next_frame, cache->saved_regs, prev_regnum,
- optimized, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, prev_regnum,
+ optimized, lvalp, addrp, realnump, valuep);
}
struct frame_unwind arm_prologue_unwind = {
@@ -1131,8 +1089,8 @@ arm_sigtramp_prev_register (struct frame_info *next_frame,
*this_cache = arm_make_sigtramp_cache (next_frame);
cache = *this_cache;
- trad_frame_prev_register (next_frame, cache->saved_regs, prev_regnum,
- optimized, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, prev_regnum,
+ optimized, lvalp, addrp, realnump, valuep);
}
struct frame_unwind arm_sigtramp_unwind = {
@@ -1144,13 +1102,8 @@ struct frame_unwind arm_sigtramp_unwind = {
static const struct frame_unwind *
arm_sigtramp_unwind_sniffer (struct frame_info *next_frame)
{
- /* Note: If an ARM DEPRECATED_PC_IN_SIGTRAMP method ever needs to
- compare against the name of the function, the code below will
- have to be changed to first fetch the name of the function and
- then pass this name to DEPRECATED_PC_IN_SIGTRAMP. */
-
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
- && DEPRECATED_PC_IN_SIGTRAMP (frame_pc_unwind (next_frame), (char *) 0))
+ && legacy_pc_in_sigtramp (frame_pc_unwind (next_frame), (char *) 0))
return &arm_sigtramp_unwind;
return NULL;
@@ -1187,20 +1140,6 @@ arm_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
return frame_unwind_register_unsigned (this_frame, ARM_SP_REGNUM);
}
-/* DEPRECATED_CALL_DUMMY_WORDS:
- This sequence of words is the instructions
-
- mov lr,pc
- mov pc,r4
- illegal
-
- Note this is 12 bytes. */
-
-static LONGEST arm_call_dummy_words[] =
-{
- 0xe1a0e00f, 0xe1a0f004, 0xe7ffdefe
-};
-
/* When arguments must be pushed onto the stack, they go on in reverse
order. The code below implements a FILO (stack) to do this. */
@@ -1238,7 +1177,7 @@ 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, CORE_ADDR func_addr,
+arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -2738,9 +2677,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->lowest_pc = 0x20;
tdep->jb_pc = -1; /* Longjump support not enabled by default. */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, arm_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
-
set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
set_gdbarch_write_pc (gdbarch, arm_write_pc);
@@ -2750,8 +2686,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc);
set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, arm_frameless_function_invocation);
-
frame_base_set_default (gdbarch, &arm_normal_base);
/* Address manipulation. */
@@ -2776,10 +2710,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM);
set_gdbarch_deprecated_register_byte (gdbarch, arm_register_byte);
- set_gdbarch_deprecated_register_bytes (gdbarch,
- (NUM_GREGS * INT_REGISTER_SIZE
- + NUM_FREGS * FP_REGISTER_SIZE
- + NUM_SREGS * STATUS_REGISTER_SIZE));
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
set_gdbarch_register_type (gdbarch, arm_register_type);
@@ -2793,7 +2723,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Returning results. */
set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value);
set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
- set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, arm_use_struct_convention);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, arm_extract_struct_value_address);
/* Single stepping. */
@@ -2961,7 +2891,7 @@ _initialize_arm_tdep (void)
&setlist);
set_cmd_sfunc (new_set, set_disassembly_style_sfunc);
deprecate_cmd (new_set, "set arm disassembly");
- deprecate_cmd (add_show_from_set (new_set, &showlist),
+ deprecate_cmd (deprecated_add_show_from_set (new_set, &showlist),
"show arm disassembly");
/* And now add the new interface. */
@@ -2970,22 +2900,14 @@ _initialize_arm_tdep (void)
helptext, &setarmcmdlist);
set_cmd_sfunc (new_set, set_disassembly_style_sfunc);
- add_show_from_set (new_set, &showarmcmdlist);
-
- add_setshow_cmd_full ("apcs32", no_class,
- var_boolean, (char *) &arm_apcs_32,
- "Set usage of ARM 32-bit mode.",
- "Show usage of ARM 32-bit mode.",
- NULL, NULL,
- &setlist, &showlist, &new_set, &new_show);
- deprecate_cmd (new_set, "set arm apcs32");
- deprecate_cmd (new_show, "show arm apcs32");
-
- add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
- "Set usage of ARM 32-bit mode. "
- "When off, a 26-bit PC will be used.",
- "Show usage of ARM 32-bit mode. "
- "When off, a 26-bit PC will be used.",
+ deprecated_add_show_from_set (new_set, &showarmcmdlist);
+
+ add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32, "\
+Set usage of ARM 32-bit mode.", "\
+Show usage of ARM 32-bit mode.", "\
+When off, a 26-bit PC will be used.\n\
+When off, a 26-bit PC will be used.", "\
+Usage of ARM 32-bit mode is %s.",
NULL, NULL,
&setarmcmdlist, &showarmcmdlist);
@@ -3000,7 +2922,8 @@ _initialize_arm_tdep (void)
"vfp - VFP co-processor.",
&setarmcmdlist);
set_cmd_sfunc (new_set, set_fp_model_sfunc);
- set_cmd_sfunc (add_show_from_set (new_set, &showarmcmdlist), show_fp_model);
+ set_cmd_sfunc (deprecated_add_show_from_set (new_set, &showarmcmdlist),
+ show_fp_model);
/* Add the deprecated "othernames" command. */
deprecate_cmd (add_com ("othernames", class_obscure, arm_othernames,
@@ -3008,11 +2931,11 @@ _initialize_arm_tdep (void)
"set arm disassembly");
/* Debugging flag. */
- add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug,
- "Set ARM debugging. "
- "When on, arm-specific debugging is enabled.",
- "Show ARM debugging. "
- "When on, arm-specific debugging is enabled.",
+ add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug, "\
+Set ARM debugging.", "\
+Show ARM debugging.", "\
+When on, arm-specific debugging is enabled.", "\
+ARM debugging is %s.",
NULL, NULL,
&setdebuglist, &showdebuglist);
}
diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c
index 88396c06a14..2f10ec12528 100644
--- a/gdb/armnbsd-nat.c
+++ b/gdb/armnbsd-nat.c
@@ -1,5 +1,6 @@
/* Native-dependent code for BSD Unix running on ARM's, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 1999, 2002
+
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 1999, 2002, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -45,18 +46,22 @@ supply_gregset (struct reg *gregset)
/* Integer registers. */
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- supply_register (regno, (char *) &gregset->r[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) &gregset->r[regno]);
- supply_register (ARM_SP_REGNUM, (char *) &gregset->r_sp);
- supply_register (ARM_LR_REGNUM, (char *) &gregset->r_lr);
+ regcache_raw_supply (current_regcache, ARM_SP_REGNUM,
+ (char *) &gregset->r_sp);
+ regcache_raw_supply (current_regcache, ARM_LR_REGNUM,
+ (char *) &gregset->r_lr);
/* This is ok: we're running native... */
r_pc = ADDR_BITS_REMOVE (gregset->r_pc);
- supply_register (ARM_PC_REGNUM, (char *) &r_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM, (char *) &r_pc);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &gregset->r_cpsr);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &gregset->r_cpsr);
else
- supply_register (ARM_PS_REGNUM, (char *) &gregset->r_pc);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &gregset->r_pc);
}
static void
@@ -65,10 +70,11 @@ supply_fparegset (struct fpreg *fparegset)
int regno;
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- supply_register
- (regno, (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
- supply_register (ARM_FPS_REGNUM, (char *) &fparegset->fpr_fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM,
+ (char *) &fparegset->fpr_fpsr);
}
static void
@@ -78,7 +84,7 @@ fetch_register (int regno)
int ret;
ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
{
@@ -89,28 +95,34 @@ fetch_register (int regno)
switch (regno)
{
case ARM_SP_REGNUM:
- supply_register (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache_raw_supply (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- supply_register (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_supply (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
/* This is ok: we're running native... */
inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc);
- supply_register (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
break;
case ARM_PS_REGNUM:
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
- supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_pc);
break;
default:
- supply_register (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
break;
}
}
@@ -123,7 +135,7 @@ fetch_regs (void)
int regno;
ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
{
@@ -141,7 +153,7 @@ fetch_fp_register (int regno)
int ret;
ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
{
@@ -152,13 +164,13 @@ fetch_fp_register (int regno)
switch (regno)
{
case ARM_FPS_REGNUM:
- supply_register (ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- supply_register
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
}
@@ -171,7 +183,7 @@ fetch_fp_regs (void)
int regno;
ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
{
@@ -207,7 +219,7 @@ store_register (int regno)
int ret;
ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
{
@@ -218,21 +230,25 @@ store_register (int regno)
switch (regno)
{
case ARM_SP_REGNUM:
- regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache_raw_collect (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_collect (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
if (arm_apcs_32)
- regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
else
{
unsigned pc_val;
- regcache_collect (ARM_PC_REGNUM, (char *) &pc_val);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &pc_val);
pc_val = ADDR_BITS_REMOVE (pc_val);
inferior_registers.r_pc
@@ -243,12 +259,14 @@ store_register (int regno)
case ARM_PS_REGNUM:
if (arm_apcs_32)
- regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
{
unsigned psr_val;
- regcache_collect (ARM_PS_REGNUM, (char *) &psr_val);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &psr_val);
psr_val ^= ADDR_BITS_REMOVE (psr_val);
inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc);
@@ -257,12 +275,13 @@ store_register (int regno)
break;
default:
- regcache_collect (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
break;
}
ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
warning ("unable to write register %d to inferior", regno);
@@ -277,23 +296,30 @@ store_regs (void)
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- regcache_collect (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
- regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
- regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_collect (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
+ regcache_raw_collect (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
if (arm_apcs_32)
{
- regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
- regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
}
else
{
unsigned pc_val;
unsigned psr_val;
- regcache_collect (ARM_PC_REGNUM, (char *) &pc_val);
- regcache_collect (ARM_PS_REGNUM, (char *) &psr_val);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &pc_val);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &psr_val);
pc_val = ADDR_BITS_REMOVE (pc_val);
psr_val ^= ADDR_BITS_REMOVE (psr_val);
@@ -302,7 +328,7 @@ store_regs (void)
}
ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
warning ("unable to store general registers");
@@ -315,7 +341,7 @@ store_fp_register (int regno)
int ret;
ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
{
@@ -326,18 +352,18 @@ store_fp_register (int regno)
switch (regno)
{
case ARM_FPS_REGNUM:
- regcache_collect (ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- regcache_collect
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
warning ("unable to write register %d to inferior", regno);
@@ -352,13 +378,14 @@ store_fp_regs (void)
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- regcache_collect
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
- regcache_collect (ARM_FPS_REGNUM, (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
warning ("unable to store floating-point registers");
@@ -459,6 +486,6 @@ static struct core_fns arm_netbsd_elfcore_fns =
void
_initialize_arm_netbsd_nat (void)
{
- add_core_fns (&arm_netbsd_core_fns);
- add_core_fns (&arm_netbsd_elfcore_fns);
+ deprecated_add_core_fns (&arm_netbsd_core_fns);
+ deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
}
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index 0ce46e653df..0d7c0b56dca 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -1,5 +1,6 @@
/* Target-specific functions for ARM running under NetBSD.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,6 +22,8 @@
#include "defs.h"
#include "osabi.h"
+#include "gdb_string.h"
+
#include "arm-tdep.h"
#include "nbsd-tdep.h"
#include "solib-svr4.h"
@@ -32,6 +35,9 @@
/* For compatibility with previous implemenations of GDB on arm/NetBSD,
override the default little-endian breakpoint. */
static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6};
+static const char arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11};
+static const char arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
+static const char arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
static int
arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
@@ -49,8 +55,26 @@ arm_netbsd_init_abi_common (struct gdbarch_info info,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->lowest_pc = 0x8000;
- tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
- tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
+ switch (info.byte_order)
+ {
+ case BFD_ENDIAN_LITTLE:
+ tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
+ tdep->thumb_breakpoint = arm_nbsd_thumb_le_breakpoint;
+ tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
+ tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_le_breakpoint);
+ break;
+
+ case BFD_ENDIAN_BIG:
+ tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint;
+ tdep->thumb_breakpoint = arm_nbsd_thumb_be_breakpoint;
+ tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint);
+ tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_be_breakpoint);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__,
+ "arm_gdbarch_init: bad byte order for float format");
+ }
tdep->jb_pc = ARM_NBSD_JB_PC;
tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index d9c16a55aa8..563ecf204e8 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -966,16 +966,6 @@ avr_frame_this_id (struct frame_info *next_frame,
return;
id = frame_id_build (base, func);
-
- /* Check that we're not going round in circles with the same frame
- ID (but avoid applying the test to sentinel frames which do go
- round in circles). Can't use frame_id_eq() as that doesn't yet
- compare the frame's PC value. */
- if (frame_relative_level (next_frame) >= 0
- && get_frame_type (next_frame) != DUMMY_FRAME
- && frame_id_eq (get_frame_id (next_frame), id))
- return;
-
(*this_id) = id;
}
@@ -1035,8 +1025,8 @@ avr_frame_prev_register (struct frame_info *next_frame,
}
}
else
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind avr_frame_unwind = {
@@ -1156,7 +1146,7 @@ pop_stack_item (struct stack_item *si)
registers R0 to R2. */
static CORE_ADDR
-avr_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1302,15 +1292,11 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
- set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
-
set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
-
frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer);
frame_base_set_default (gdbarch, &avr_frame_base);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 5fd20f0e43d..d752c8dd27f 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -43,118 +43,6 @@
void _initialize_blockframe (void);
-/* Is ADDR inside the startup file? Note that if your machine has a
- way to detect the bottom of the stack, there is no need to call
- this function from DEPRECATED_FRAME_CHAIN_VALID; the reason for
- doing so is that some machines have no way of detecting bottom of
- stack.
-
- A PC of zero is always considered to be the bottom of the stack. */
-
-int
-deprecated_inside_entry_file (CORE_ADDR addr)
-{
- if (addr == 0)
- return 1;
- if (symfile_objfile == 0)
- return 0;
- if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT
- || CALL_DUMMY_LOCATION == AT_SYMBOL)
- {
- /* Do not stop backtracing if the pc is in the call dummy
- at the entry point. */
- /* FIXME: Won't always work with zeros for the last two arguments */
- if (DEPRECATED_PC_IN_CALL_DUMMY (addr, 0, 0))
- return 0;
- }
- return (addr >= symfile_objfile->ei.deprecated_entry_file_lowpc &&
- addr < symfile_objfile->ei.deprecated_entry_file_highpc);
-}
-
-/* Test whether PC is in the range of addresses that corresponds to
- the "main" function. */
-
-int
-inside_main_func (CORE_ADDR pc)
-{
- struct minimal_symbol *msymbol;
-
- if (symfile_objfile == 0)
- return 0;
-
- msymbol = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
-
- /* If the address range hasn't been set up at symbol reading time,
- set it up now. */
-
- if (msymbol != NULL
- && symfile_objfile->ei.main_func_lowpc == INVALID_ENTRY_LOWPC
- && symfile_objfile->ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
- {
- /* brobecker/2003-10-10: We used to rely on lookup_symbol() to
- search the symbol associated to the "main" function.
- Unfortunately, lookup_symbol() uses the current-language
- la_lookup_symbol_nonlocal function to do the global symbol
- search. Depending on the language, this can introduce
- certain side-effects, because certain languages, for instance
- Ada, may find more than one match. Therefore we prefer to
- search the "main" function symbol using its address rather
- than its name. */
- struct symbol *mainsym =
- find_pc_function (SYMBOL_VALUE_ADDRESS (msymbol));
-
- if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK)
- {
- symfile_objfile->ei.main_func_lowpc =
- BLOCK_START (SYMBOL_BLOCK_VALUE (mainsym));
- symfile_objfile->ei.main_func_highpc =
- BLOCK_END (SYMBOL_BLOCK_VALUE (mainsym));
- }
- }
-
- /* Not in the normal symbol tables, see if "main" is in the partial
- symbol table. If it's not, then give up. */
- if (msymbol != NULL && MSYMBOL_TYPE (msymbol) == mst_text)
- {
- CORE_ADDR maddr = SYMBOL_VALUE_ADDRESS (msymbol);
- asection *msect = SYMBOL_BFD_SECTION (msymbol);
- struct obj_section *osect = find_pc_sect_section (maddr, msect);
-
- if (osect != NULL)
- {
- int i;
-
- /* Step over other symbols at this same address, and symbols
- in other sections, to find the next symbol in this
- section with a different address. */
- for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
- {
- if (SYMBOL_VALUE_ADDRESS (msymbol + i) != maddr
- && SYMBOL_BFD_SECTION (msymbol + i) == msect)
- break;
- }
-
- symfile_objfile->ei.main_func_lowpc = maddr;
-
- /* Use the lesser of the next minimal symbol in the same
- section, or the end of the section, as the end of the
- function. */
- if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
- && SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
- symfile_objfile->ei.main_func_highpc =
- SYMBOL_VALUE_ADDRESS (msymbol + i);
- else
- /* We got the start address from the last msymbol in the
- objfile. So the end address is the end of the
- section. */
- symfile_objfile->ei.main_func_highpc = osect->endaddr;
- }
- }
-
- return (symfile_objfile->ei.main_func_lowpc <= pc
- && symfile_objfile->ei.main_func_highpc > pc);
-}
-
/* Test whether THIS_FRAME is inside the process entry point function. */
int
@@ -163,66 +51,6 @@ inside_entry_func (struct frame_info *this_frame)
return (get_frame_func (this_frame) == entry_point_address ());
}
-/* Similar to inside_entry_func, but accomodating legacy frame code. */
-
-static int
-legacy_inside_entry_func (CORE_ADDR pc)
-{
- if (symfile_objfile == 0)
- return 0;
-
- if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
- {
- /* Do not stop backtracing if the program counter is in the call
- dummy at the entry point. */
- /* FIXME: This won't always work with zeros for the last two
- arguments. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
- return 0;
- }
-
- return (symfile_objfile->ei.entry_func_lowpc <= pc
- && symfile_objfile->ei.entry_func_highpc > pc);
-}
-
-/* Return nonzero if the function for this frame lacks a prologue.
- Many machines can define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
- to just call this function. */
-
-int
-legacy_frameless_look_for_prologue (struct frame_info *frame)
-{
- CORE_ADDR func_start;
-
- func_start = get_frame_func (frame);
- if (func_start)
- {
- func_start += FUNCTION_START_OFFSET;
- /* NOTE: cagney/2004-02-09: Eliminated per-architecture
- PROLOGUE_FRAMELESS_P call as architectures with custom
- implementations had all been deleted. Eventually even this
- function can go - GDB no longer tries to differentiate
- between framed, frameless and stackless functions. They are
- all now considered equally evil :-^. */
- /* If skipping the prologue ends up skips nothing, there must be
- no prologue and hence no code creating a frame. There for
- the function is "frameless" :-/. */
- return func_start == SKIP_PROLOGUE (func_start);
- }
- else if (get_frame_pc (frame) == 0)
- /* A frame with a zero PC is usually created by dereferencing a
- NULL function pointer, normally causing an immediate core dump
- of the inferior. Mark function as frameless, as the inferior
- has no chance of setting up a stack frame. */
- return 1;
- else
- /* If we can't find the start of the function, we don't really
- know whether the function is frameless, but we should be able
- to get a reasonable (i.e. best we can do under the
- circumstances) backtrace by saying that it isn't. */
- return 0;
-}
-
/* Return the innermost lexical block in execution
in a specified stack frame. The frame address is assumed valid.
@@ -380,23 +208,6 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
&& section == cache_pc_function_section)
goto return_cached_value;
- /* If sigtramp is in the u area, it counts as a function (especially
- important for step_1). */
- /* NOTE: cagney/2004-03-16: Determining if the PC is in a signal
- trampoline typically depends on the detailed analysis of dynamic
- information obtained from the inferior yet this function is
- expected to work using static information obtained from the
- symbol table. */
- if (DEPRECATED_SIGTRAMP_START_P ()
- && DEPRECATED_PC_IN_SIGTRAMP (mapped_pc, (char *) NULL))
- {
- cache_pc_function_low = DEPRECATED_SIGTRAMP_START (mapped_pc);
- cache_pc_function_high = DEPRECATED_SIGTRAMP_END (mapped_pc);
- cache_pc_function_name = "<sigtramp>";
- cache_pc_function_section = section;
- goto return_cached_value;
- }
-
msymbol = lookup_minimal_symbol_by_pc_section (mapped_pc, section);
pst = find_pc_sect_psymtab (mapped_pc, section);
if (pst)
@@ -559,75 +370,3 @@ block_innermost_frame (struct block *block)
return frame;
}
}
-
-/* Are we in a call dummy? The code below which allows DECR_PC_AFTER_BREAK
- below is for infrun.c, which may give the macro a pc without that
- subtracted out. */
-
-/* Is the PC in a call dummy? SP and FRAME_ADDRESS are the bottom and
- top of the stack frame which we are checking, where "bottom" and
- "top" refer to some section of memory which contains the code for
- the call dummy. Calls to this macro assume that the contents of
- SP_REGNUM and DEPRECATED_FP_REGNUM (or the saved values thereof),
- respectively, are the things to pass.
-
- This won't work on the 29k, where SP_REGNUM and
- DEPRECATED_FP_REGNUM don't have that meaning, but the 29k doesn't
- use ON_STACK. This could be fixed by generalizing this scheme,
- perhaps by passing in a frame and adding a few fields, at least on
- machines which need them for DEPRECATED_PC_IN_CALL_DUMMY.
-
- Something simpler, like checking for the stack segment, doesn't work,
- since various programs (threads implementations, gcc nested function
- stubs, etc) may either allocate stack frames in another segment, or
- allocate other kinds of code on the stack. */
-
-int
-deprecated_pc_in_call_dummy_on_stack (CORE_ADDR pc, CORE_ADDR sp,
- CORE_ADDR frame_address)
-{
- return (INNER_THAN ((sp), (pc))
- && (frame_address != 0)
- && INNER_THAN ((pc), (frame_address)));
-}
-
-/* Returns true for a user frame or a call_function_by_hand dummy
- frame, and false for the CRT0 start-up frame. Purpose is to
- terminate backtrace. */
-
-int
-legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
-{
- /* Don't prune CALL_DUMMY frames. */
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
- return 1;
-
- /* If the new frame pointer is zero, then it isn't valid. */
- if (fp == 0)
- return 0;
-
- /* If the new frame would be inside (younger than) the previous frame,
- then it isn't valid. */
- if (INNER_THAN (fp, get_frame_base (fi)))
- return 0;
-
- /* If the architecture has a custom DEPRECATED_FRAME_CHAIN_VALID,
- call it now. */
- if (DEPRECATED_FRAME_CHAIN_VALID_P ())
- return DEPRECATED_FRAME_CHAIN_VALID (fp, fi);
-
- /* If we're already inside the entry function for the main objfile, then it
- isn't valid. */
- if (legacy_inside_entry_func (get_frame_pc (fi)))
- return 0;
-
- /* If we're inside the entry file, it isn't valid. */
- /* NOTE/drow 2002-12-25: should there be a way to disable this check? It
- assumes a single small entry file, and the way some debug readers (e.g.
- dbxread) figure out which object is the entry file is somewhat hokey. */
- if (deprecated_inside_entry_file (frame_pc_unwind (fi)))
- return 0;
-
- return 1;
-}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 61b72255a0a..7e9e669ce25 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -49,6 +49,8 @@
#include "cli/cli-script.h"
#include "gdb_assert.h"
#include "block.h"
+#include "solist.h"
+#include "observer.h"
#include "gdb-events.h"
@@ -266,13 +268,13 @@ int breakpoint_count;
/* Pointer to current exception event record */
static struct exception_event_record *current_exception_event;
-/* Indicator of whether exception catchpoints should be nuked
- between runs of a program */
-int exception_catchpoints_are_fragile = 0;
+/* Indicator of whether exception catchpoints should be nuked between
+ runs of a program. */
+int deprecated_exception_catchpoints_are_fragile = 0;
/* Indicator of when exception catchpoints set-up should be
- reinitialized -- e.g. when program is re-run */
-int exception_support_initialized = 0;
+ reinitialized -- e.g. when program is re-run. */
+int deprecated_exception_support_initialized = 0;
/* This function returns a pointer to the string representation of the
pathname of the dynamically-linked library that has just been
@@ -627,7 +629,7 @@ commands_command (char *arg, int from_tty)
shadow contents, not the breakpoints themselves. From breakpoint.c. */
int
-read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
+deprecated_read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
{
int status;
struct bp_location *b;
@@ -695,7 +697,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
if (bp_addr > memaddr)
{
/* Copy the section of memory before the breakpoint. */
- status = read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
+ status = deprecated_read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
if (status != 0)
return status;
}
@@ -703,7 +705,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
if (bp_addr + bp_size < memaddr + len)
{
/* Copy the section of memory after the breakpoint. */
- status = read_memory_nobpt (bp_addr + bp_size,
+ status = deprecated_read_memory_nobpt (bp_addr + bp_size,
myaddr + bp_addr + bp_size - memaddr,
memaddr + len - (bp_addr + bp_size));
if (status != 0)
@@ -746,6 +748,23 @@ insert_catchpoint (struct ui_out *uo, void *args)
return 0;
}
+/* Helper routine: free the value chain for a breakpoint (watchpoint). */
+
+static void free_valchain (struct bp_location *b)
+{
+ struct value *v;
+ struct value *n;
+
+ /* Free the saved value chain. We will construct a new one
+ the next time the watchpoint is inserted. */
+ for (v = b->owner->val_chain; v; v = n)
+ {
+ n = v->next;
+ value_free (v);
+ }
+ b->owner->val_chain = NULL;
+}
+
/* Insert a low-level "breakpoint" of some type. BPT is the breakpoint.
Any error messages are printed to TMP_ERROR_STREAM; and DISABLED_BREAKS,
PROCESS_WARNING, and HW_BREAKPOINT_ERROR are used to report problems.
@@ -893,18 +912,17 @@ insert_bp_location (struct bp_location *bpt,
must watch. As soon as a many-to-one mapping is available I'll
convert this. */
- struct frame_info *saved_frame;
- int saved_level, within_current_scope;
+ int within_current_scope;
struct value *mark = value_mark ();
struct value *v;
+ struct frame_id saved_frame_id;
- /* Save the current frame and level so we can restore it after
+ /* Save the current frame's ID so we can restore it after
evaluating the watchpoint expression on its own frame. */
/* FIXME drow/2003-09-09: It would be nice if evaluate_expression
took a frame parameter, so that we didn't have to change the
selected frame. */
- saved_frame = deprecated_selected_frame;
- saved_level = frame_relative_level (deprecated_selected_frame);
+ saved_frame_id = get_frame_id (deprecated_selected_frame);
/* Determine if the watchpoint is within scope. */
if (bpt->owner->exp_valid_block == NULL)
@@ -920,6 +938,8 @@ insert_bp_location (struct bp_location *bpt,
if (within_current_scope)
{
+ free_valchain (bpt);
+
/* Evaluate the expression and cut the chain of values
produced off from the value chain.
@@ -999,10 +1019,8 @@ insert_bp_location (struct bp_location *bpt,
bpt->owner->disposition = disp_del_at_next_stop;
}
- /* Restore the frame and level. */
- if (saved_frame != deprecated_selected_frame
- || saved_level != frame_relative_level (deprecated_selected_frame))
- select_frame (saved_frame);
+ /* Restore the selected frame. */
+ select_frame (frame_find_by_id (saved_frame_id));
return val;
}
@@ -1505,15 +1523,6 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
if ((is == mark_uninserted) && (b->inserted))
warning ("Could not remove hardware watchpoint %d.",
b->owner->number);
-
- /* Free the saved value chain. We will construct a new one
- the next time the watchpoint is inserted. */
- for (v = b->owner->val_chain; v; v = n)
- {
- n = v->next;
- value_free (v);
- }
- b->owner->val_chain = NULL;
}
else if ((b->owner->type == bp_catch_fork ||
b->owner->type == bp_catch_vfork ||
@@ -1636,8 +1645,8 @@ breakpoint_init_inferior (enum inf_context context)
default:
/* Likewise for exception catchpoints in dynamic-linked
executables where required */
- if (ep_is_exception_catchpoint (b) &&
- exception_catchpoints_are_fragile)
+ if (ep_is_exception_catchpoint (b)
+ && deprecated_exception_catchpoints_are_fragile)
{
warning_needed = 1;
delete_breakpoint (b);
@@ -1646,8 +1655,8 @@ breakpoint_init_inferior (enum inf_context context)
}
}
- if (exception_catchpoints_are_fragile)
- exception_support_initialized = 0;
+ if (deprecated_exception_catchpoints_are_fragile)
+ deprecated_exception_support_initialized = 0;
/* Don't issue the warning unless it's really needed... */
if (warning_needed && (context != inf_exited))
@@ -1760,37 +1769,6 @@ software_breakpoint_inserted_here_p (CORE_ADDR pc)
return 0;
}
-/* Return nonzero if FRAME is a dummy frame. We can't use
- DEPRECATED_PC_IN_CALL_DUMMY because figuring out the saved SP would
- take too much time, at least using frame_register() on the 68k.
- This means that for this function to work right a port must use the
- bp_call_dummy breakpoint. */
-
-int
-deprecated_frame_in_dummy (struct frame_info *frame)
-{
- struct breakpoint *b;
-
- /* This function is used by two files: get_frame_type(), after first
- checking that !DEPRECATED_USE_GENERIC_DUMMY_FRAMES; and
- sparc-tdep.c, which doesn't yet use generic dummy frames anyway. */
- gdb_assert (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
-
- ALL_BREAKPOINTS (b)
- {
- if (b->type == bp_call_dummy
- && frame_id_eq (b->frame_id, get_frame_id (frame))
- /* We need to check the PC as well as the frame on the sparc,
- for signals.exp in the testsuite. */
- && (get_frame_pc (frame)
- >= (b->loc->address
- - DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * DEPRECATED_REGISTER_SIZE))
- && get_frame_pc (frame) <= b->loc->address)
- return 1;
- }
- return 0;
-}
-
/* breakpoint_thread_match (PC, PTID) returns true if the breakpoint at
PC is valid for process/thread PTID. */
@@ -2583,7 +2561,9 @@ which its expression is valid.\n");
}
/* Get a bpstat associated with having just stopped at address
- BP_ADDR. */
+ BP_ADDR in thread PTID. STOPPED_BY_WATCHPOINT is 1 if the
+ target thinks we stopped due to a hardware watchpoint, 0 if we
+ know we did not trigger a hardware watchpoint, and -1 if we do not know. */
/* Determine whether we stopped at a breakpoint, etc, or whether we
don't understand this stop. Result is a chain of bpstat's such that:
@@ -2600,7 +2580,7 @@ which its expression is valid.\n");
commands, FIXME??? fields. */
bpstat
-bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid)
+bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid, int stopped_by_watchpoint)
{
struct breakpoint *b, *temp;
/* True if we've hit a breakpoint (as opposed to a watchpoint). */
@@ -2635,6 +2615,18 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid)
continue;
}
+ /* Continuable hardware watchpoints are treated as non-existent if the
+ reason we stopped wasn't a hardware watchpoint (we didn't stop on
+ some data address). Otherwise gdb won't stop on a break instruction
+ in the code (not from a breakpoint) when a hardware watchpoint has
+ been defined. */
+
+ if ((b->type == bp_hardware_watchpoint
+ || b->type == bp_read_watchpoint
+ || b->type == bp_access_watchpoint)
+ && !stopped_by_watchpoint)
+ continue;
+
if (b->type == bp_hardware_breakpoint)
{
if (b->loc->address != bp_addr)
@@ -3017,8 +3009,7 @@ bpstat_what (bpstat bs)
/* step_resume entries: a step resume breakpoint overrides another
breakpoint of signal handling (see comment in wait_for_inferior
- at first DEPRECATED_PC_IN_SIGTRAMP where we set the step_resume
- breakpoint). */
+ at where we set the step_resume breakpoint). */
/* We handle the through_sigtramp_breakpoint the same way; having both
one of those and a step_resume_breakpoint is probably very rare (?). */
@@ -3934,8 +3925,8 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
char astr1[40];
char astr2[40];
- strcpy (astr1, local_hex_string_custom ((unsigned long) from_addr, "08l"));
- strcpy (astr2, local_hex_string_custom ((unsigned long) to_addr, "08l"));
+ strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8));
+ strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8));
if (have_bnum)
warning ("Breakpoint %d address previously adjusted from %s to %s.",
bnum, astr1, astr2);
@@ -4269,7 +4260,7 @@ create_thread_event_breakpoint (CORE_ADDR address)
b->enable_state = bp_enabled;
/* addr_string has to be used or breakpoint_re_set will delete me. */
- xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
+ b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
return b;
}
@@ -4399,6 +4390,46 @@ disable_breakpoints_in_shlibs (int silent)
}
}
+/* Disable any breakpoints that are in in an unloaded shared library. Only
+ apply to enabled breakpoints, disabled ones can just stay disabled. */
+
+void
+disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
+{
+ struct breakpoint *b;
+ int disabled_shlib_breaks = 0;
+
+#if defined (PC_SOLIB)
+ /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
+ ALL_BREAKPOINTS (b)
+ {
+ if ((b->loc->loc_type == bp_loc_hardware_breakpoint
+ || b->loc->loc_type == bp_loc_software_breakpoint)
+ && breakpoint_enabled (b)
+ && !b->loc->duplicate)
+ {
+ char *so_name = PC_SOLIB (b->loc->address);
+ if (so_name
+ && !strcmp (so_name, solib->so_name))
+ {
+ b->enable_state = bp_shlib_disabled;
+ /* At this point, we cannot rely on remove_breakpoint
+ succeeding so we must mark the breakpoint as not inserted
+ to prevent future errors occurring in remove_breakpoints. */
+ b->loc->inserted = 0;
+ if (!disabled_shlib_breaks)
+ {
+ target_terminal_ours_for_output ();
+ warning ("Temporarily disabling breakpoints for unloaded shared library \"%s\"",
+ so_name);
+ }
+ disabled_shlib_breaks = 1;
+ }
+ }
+ }
+#endif
+}
+
/* Try to reenable any breakpoints in shared libraries. */
void
re_enable_breakpoints_in_shlibs (void)
@@ -4723,13 +4754,13 @@ mention (struct breakpoint *b)
stb = ui_out_stream_new (uiout);
old_chain = make_cleanup_ui_out_stream_delete (stb);
- /* FIXME: This is misplaced; mention() is called by things (like hitting a
- watchpoint) other than breakpoint creation. It should be possible to
- clean this up and at the same time replace the random calls to
- breakpoint_changed with this hook, as has already been done for
- delete_breakpoint_hook and so on. */
- if (create_breakpoint_hook)
- create_breakpoint_hook (b);
+ /* FIXME: This is misplaced; mention() is called by things (like
+ hitting a watchpoint) other than breakpoint creation. It should
+ be possible to clean this up and at the same time replace the
+ random calls to breakpoint_changed with this hook, as has already
+ been done for deprecated_delete_breakpoint_hook and so on. */
+ if (deprecated_create_breakpoint_hook)
+ deprecated_create_breakpoint_hook (b);
breakpoint_create_event (b->number);
if (b->ops != NULL && b->ops->print_mention != NULL)
@@ -4913,7 +4944,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
else
/* addr_string has to be used or breakpoint_re_set will delete
me. */
- xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
+ b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
b->cond_string = cond_string[i];
b->ignore_count = ignore_count;
b->enable_state = bp_enabled;
@@ -4937,6 +4968,10 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
be copied too. */
if (pending_bp->commands)
b->commands = copy_command_lines (pending_bp->commands);
+
+ /* We have to copy over the ignore_count and thread as well. */
+ b->ignore_count = pending_bp->ignore_count;
+ b->thread = pending_bp->thread;
}
mention (b);
}
@@ -5040,7 +5075,8 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
Give the target a chance to bless sals.sals[i].pc before we
try to make a breakpoint for it. */
- if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
+#ifdef DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE
+ if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
{
if (address == NULL)
error ("Cannot break without a running program.");
@@ -5048,6 +5084,7 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
error ("Cannot break on %s without a running program.",
address);
}
+#endif
}
}
@@ -6086,7 +6123,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
get_frame_id (deprecated_selected_frame),
bp_until);
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
else
old_chain = make_exec_cleanup_delete_breakpoint (breakpoint);
@@ -6098,7 +6135,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
where we get a chance to do that is in fetch_inferior_event, so
we must set things up for that. */
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
{
/* In this case the arg for the continuation is just the point
in the exec_cleanups chain from where to start doing
@@ -6120,7 +6157,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
sal.pc = get_frame_pc (prev_frame);
breakpoint = set_momentary_breakpoint (sal, get_frame_id (prev_frame),
bp_until);
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
make_cleanup_delete_breakpoint (breakpoint);
else
make_exec_cleanup_delete_breakpoint (breakpoint);
@@ -6129,7 +6166,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
/* Do the cleanups now, anly if we are not running asynchronously,
of if we are, but the target is still synchronous. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
do_cleanups (old_chain);
}
@@ -6874,13 +6911,15 @@ delete_breakpoint (struct breakpoint *bpt)
if (bpt->type == bp_none)
return;
- if (delete_breakpoint_hook)
- delete_breakpoint_hook (bpt);
+ if (deprecated_delete_breakpoint_hook)
+ deprecated_delete_breakpoint_hook (bpt);
breakpoint_delete_event (bpt->number);
if (bpt->loc->inserted)
remove_breakpoint (bpt->loc, mark_inserted);
+ free_valchain (bpt->loc);
+
if (breakpoint_chain == bpt)
breakpoint_chain = bpt->next;
@@ -7103,6 +7142,8 @@ breakpoint_re_set_one (void *bint)
struct breakpoint *b = (struct breakpoint *) bint;
struct value *mark;
int i;
+ int not_found;
+ int *not_found_ptr = NULL;
struct symtabs_and_lines sals;
char *s;
enum enable_state save_enable;
@@ -7153,11 +7194,19 @@ breakpoint_re_set_one (void *bint)
save_enable = b->enable_state;
if (b->enable_state != bp_shlib_disabled)
b->enable_state = bp_disabled;
+ else
+ /* If resetting a shlib-disabled breakpoint, we don't want to
+ see an error message if it is not found since we will expect
+ this to occur until the shared library is finally reloaded.
+ We accomplish this by giving decode_line_1 a pointer to use
+ for silent notification that the symbol is not found. */
+ not_found_ptr = &not_found;
set_language (b->language);
input_radix = b->input_radix;
s = b->addr_string;
- sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL, NULL);
+ sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL,
+ not_found_ptr);
for (i = 0; i < sals.nelts; i++)
{
resolve_sal_pc (&sals.sals[i]);
@@ -7507,8 +7556,8 @@ disable_breakpoint (struct breakpoint *bpt)
check_duplicates (bpt);
- if (modify_breakpoint_hook)
- modify_breakpoint_hook (bpt);
+ if (deprecated_modify_breakpoint_hook)
+ deprecated_modify_breakpoint_hook (bpt);
breakpoint_modify_event (bpt->number);
}
@@ -7548,8 +7597,6 @@ disable_command (char *args, int from_tty)
static void
do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
{
- struct frame_info *save_selected_frame = NULL;
- int save_selected_frame_level = -1;
int target_resources_ok, other_type_used;
struct value *mark;
@@ -7596,6 +7643,9 @@ do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
bpt->type == bp_read_watchpoint ||
bpt->type == bp_access_watchpoint)
{
+ struct frame_id saved_frame_id;
+
+ saved_frame_id = get_frame_id (get_selected_frame ());
if (bpt->exp_valid_block != NULL)
{
struct frame_info *fr =
@@ -7608,9 +7658,6 @@ is valid is not currently in scope.\n", bpt->number);
bpt->enable_state = bp_disabled;
return;
}
-
- save_selected_frame = deprecated_selected_frame;
- save_selected_frame_level = frame_relative_level (deprecated_selected_frame);
select_frame (fr);
}
@@ -7645,14 +7692,13 @@ have been allocated for other watchpoints.\n", bpt->number);
}
}
- if (save_selected_frame_level >= 0)
- select_frame (save_selected_frame);
+ select_frame (frame_find_by_id (saved_frame_id));
value_free_to_mark (mark);
}
}
- if (modify_breakpoint_hook)
- modify_breakpoint_hook (bpt);
+ if (deprecated_modify_breakpoint_hook)
+ deprecated_modify_breakpoint_hook (bpt);
breakpoint_modify_event (bpt->number);
}
@@ -7761,6 +7807,10 @@ _initialize_breakpoint (void)
static struct cmd_list_element *breakpoint_show_cmdlist;
struct cmd_list_element *c;
+#ifdef SOLIB_ADD
+ observer_attach_solib_unloaded (disable_breakpoints_in_unloaded_shlib);
+#endif
+
breakpoint_chain = 0;
/* Don't bother to call set_breakpoint_count. $bpnum isn't useful
before a breakpoint is set. */
@@ -8074,7 +8124,7 @@ such is available. (However, any hardware watchpoints that were\n\
created before setting this to nonzero, will continue to use watchpoint\n\
hardware.)",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
can_use_hw_watchpoints = 1;
@@ -8092,16 +8142,13 @@ pending breakpoint behavior",
0/*allow-unknown*/, &showlist);
add_setshow_auto_boolean_cmd ("pending", no_class, &pending_break_support, "\
-Set debugger's behavior regarding pending breakpoints.\n\
-If on, an unrecognized breakpoint location will cause gdb to create a\n\
-pending breakpoint. If off, an unrecognized breakpoint location results in\n\
-an error. If auto, an unrecognized breakpoint location results in a\n\
-user-query to see if a pending breakpoint should be created.","\
-Show debugger's behavior regarding pending breakpoints.\n\
+Set debugger's behavior regarding pending breakpoints.", "\
+Show debugger's behavior regarding pending breakpoints.", "\
If on, an unrecognized breakpoint location will cause gdb to create a\n\
pending breakpoint. If off, an unrecognized breakpoint location results in\n\
an error. If auto, an unrecognized breakpoint location results in a\n\
-user-query to see if a pending breakpoint should be created.",
+user-query to see if a pending breakpoint should be created.", "\
+Debugger's behavior regarding pending breakpoints is %s.",
NULL, NULL,
&breakpoint_set_cmdlist,
&breakpoint_show_cmdlist);
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 41bcb0c3ce1..67a67e34054 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -414,7 +414,8 @@ extern void bpstat_clear (bpstat *);
is part of the bpstat is copied as well. */
extern bpstat bpstat_copy (bpstat);
-extern bpstat bpstat_stop_status (CORE_ADDR pc, ptid_t ptid);
+extern bpstat bpstat_stop_status (CORE_ADDR pc, ptid_t ptid,
+ int stopped_by_watchpoint);
/* This bpstat_what stuff tells wait_for_inferior what to do with a
breakpoint (a challenging task). */
@@ -619,13 +620,6 @@ extern int breakpoint_inserted_here_p (CORE_ADDR);
extern int software_breakpoint_inserted_here_p (CORE_ADDR);
-/* FIXME: cagney/2002-11-10: The current [generic] dummy-frame code
- implements a functional superset of this function. The only reason
- it hasn't been removed is because some architectures still don't
- use the new framework. Once they have been fixed, this can go. */
-struct frame_info;
-extern int deprecated_frame_in_dummy (struct frame_info *);
-
extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
extern void until_break_command (char *, int, int);
@@ -802,4 +796,13 @@ extern void delete_command (char *arg, int from_tty);
remove fails. */
extern int remove_hw_watchpoints (void);
+
+/* Indicator of whether exception catchpoints should be nuked between
+ runs of a program. */
+extern int deprecated_exception_catchpoints_are_fragile;
+
+/* Indicator of when exception catchpoints set-up should be
+ reinitialized -- e.g. when program is re-run. */
+extern int deprecated_exception_support_initialized;
+
#endif /* !defined (BREAKPOINT_H) */
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
new file mode 100644
index 00000000000..64869e5464c
--- /dev/null
+++ b/gdb/bsd-kvm.c
@@ -0,0 +1,307 @@
+/* BSD Kernel Data Access Library (libkvm) interface.
+
+ Copyright 2004 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 "cli/cli-cmds.h"
+#include "command.h"
+#include "frame.h"
+#include "regcache.h"
+#include "target.h"
+#include "value.h"
+#include "gdbcore.h" /* for get_exec_file */
+
+#include "gdb_assert.h"
+#include <fcntl.h>
+#include <kvm.h>
+#ifdef HAVE_NLIST_H
+#include <nlist.h>
+#endif
+#include "readline/readline.h"
+#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/user.h>
+
+#include "bsd-kvm.h"
+
+/* Kernel memory interface descriptor. */
+kvm_t *core_kd;
+
+/* Address of process control block. */
+struct pcb *bsd_kvm_paddr;
+
+/* Pointer to architecture-specific function that reconstructs the
+ register state from PCB and supplies it to REGCACHE. */
+int (*bsd_kvm_supply_pcb)(struct regcache *regcache, struct pcb *pcb);
+
+/* Target ops for libkvm interface. */
+struct target_ops bsd_kvm_ops;
+
+static void
+bsd_kvm_open (char *filename, int from_tty)
+{
+ char errbuf[_POSIX2_LINE_MAX];
+ char *execfile = NULL;
+ kvm_t *temp_kd;
+
+ target_preopen (from_tty);
+
+ if (filename)
+ {
+ char *temp;
+
+ filename = tilde_expand (filename);
+ if (filename[0] != '/')
+ {
+ temp = concat (current_directory, "/", filename, NULL);
+ xfree (filename);
+ filename = temp;
+ }
+ }
+
+ execfile = get_exec_file (0);
+ temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf);
+ if (temp_kd == NULL)
+ error ("%s", errbuf);
+
+ unpush_target (&bsd_kvm_ops);
+ core_kd = temp_kd;
+ push_target (&bsd_kvm_ops);
+
+ target_fetch_registers (-1);
+
+ flush_cached_frames ();
+ select_frame (get_current_frame ());
+ print_stack_frame (get_selected_frame (), -1, 1);
+}
+
+static void
+bsd_kvm_close (int quitting)
+{
+ if (core_kd)
+ {
+ if (kvm_close (core_kd) == -1)
+ warning ("%s", kvm_geterr(core_kd));
+ core_kd = NULL;
+ }
+}
+
+static int
+bsd_kvm_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+ int write, struct mem_attrib *attrib,
+ struct target_ops *ops)
+{
+ if (write)
+ return kvm_write (core_kd, memaddr, myaddr, len);
+ else
+ return kvm_read (core_kd, memaddr, myaddr, len);
+
+ return -1;
+}
+
+/* Fetch process control block at address PADDR. */
+
+static int
+bsd_kvm_fetch_pcb (struct pcb *paddr)
+{
+ struct pcb pcb;
+
+ if (kvm_read (core_kd, (unsigned long) paddr, &pcb, sizeof pcb) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ gdb_assert (bsd_kvm_supply_pcb);
+ return bsd_kvm_supply_pcb (current_regcache, &pcb);
+}
+
+static void
+bsd_kvm_fetch_registers (int regnum)
+{
+ struct nlist nl[2];
+
+ if (bsd_kvm_paddr)
+ {
+ bsd_kvm_fetch_pcb (bsd_kvm_paddr);
+ return;
+ }
+
+ /* On dumping core, BSD kernels store the faulting context (PCB)
+ in the variable "dumppcb". */
+ memset (nl, 0, sizeof nl);
+ nl[0].n_name = "_dumppcb";
+
+ if (kvm_nlist (core_kd, nl) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ if (nl[0].n_value != 0)
+ {
+ /* Found dumppcb. If it contains a valid context, return
+ immediately. */
+ if (bsd_kvm_fetch_pcb ((struct pcb *) nl[0].n_value))
+ return;
+ }
+
+ /* Traditional BSD kernels have a process proc0 that should always
+ be present. The address of proc0's PCB is stored in the variable
+ "proc0paddr". */
+
+ memset (nl, 0, sizeof nl);
+ nl[0].n_name = "_proc0paddr";
+
+ if (kvm_nlist (core_kd, nl) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ if (nl[0].n_value != 0)
+ {
+ struct pcb *paddr;
+
+ /* Found proc0paddr. */
+ if (kvm_read (core_kd, nl[0].n_value, &paddr, sizeof paddr) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ bsd_kvm_fetch_pcb (paddr);
+ return;
+ }
+
+#ifdef HAVE_STRUCT_THREAD_TD_PCB
+ /* In FreeBSD kernels for 5.0-RELEASE and later, the PCB no longer
+ lives in `struct proc' but in `struct thread'. The `struct
+ thread' for the initial thread for proc0 can be found in the
+ variable "thread0". */
+
+ memset (nl, 0, sizeof nl);
+ nl[0].n_name = "_thread0";
+
+ if (kvm_nlist (core_kd, nl) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ if (nl[0].n_value != 0)
+ {
+ struct pcb *paddr;
+
+ /* Found thread0. */
+ nl[0].n_value += offsetof (struct thread, td_pcb);
+ if (kvm_read (core_kd, nl[0].n_value, &paddr, sizeof paddr) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ bsd_kvm_fetch_pcb (paddr);
+ return;
+ }
+#endif
+
+ error ("Cannot find a valid PCB");
+}
+
+
+/* Kernel memory interface commands. */
+struct cmd_list_element *bsd_kvm_cmdlist;
+
+static void
+bsd_kvm_cmd (char *arg, int fromtty)
+{
+ /* ??? Should this become an alias for "target kvm"? */
+}
+
+#ifndef HAVE_STRUCT_THREAD_TD_PCB
+
+static void
+bsd_kvm_proc_cmd (char *arg, int fromtty)
+{
+ CORE_ADDR addr;
+
+ if (arg == NULL)
+ error_no_arg ("proc address");
+
+ if (core_kd == NULL)
+ error ("No kernel memory image.");
+
+ addr = parse_and_eval_address (arg);
+#ifdef HAVE_STRUCT_LWP
+ addr += offsetof (struct lwp, l_addr);
+#else
+ addr += offsetof (struct proc, p_addr);
+#endif
+
+ if (kvm_read (core_kd, addr, &bsd_kvm_paddr, sizeof bsd_kvm_paddr) == -1)
+ error ("%s", kvm_geterr (core_kd));
+
+ target_fetch_registers (-1);
+
+ flush_cached_frames ();
+ select_frame (get_current_frame ());
+ print_stack_frame (get_selected_frame (), -1, 1);
+}
+
+#endif
+
+static void
+bsd_kvm_pcb_cmd (char *arg, int fromtty)
+{
+ if (arg == NULL)
+ error_no_arg ("pcb address");
+
+ if (core_kd == NULL)
+ error ("No kernel memory image.");
+
+ bsd_kvm_paddr = (struct pcb *) parse_and_eval_address (arg);
+
+ target_fetch_registers (-1);
+
+ flush_cached_frames ();
+ select_frame (get_current_frame ());
+ print_stack_frame (get_selected_frame (), -1, 1);
+}
+
+/* Add the libkvm interface to the list of all possible targets and
+ register CUPPLY_PCB as the architecture-specific process control
+ block interpreter. */
+
+void
+bsd_kvm_add_target (int (*supply_pcb)(struct regcache *, struct pcb *))
+{
+ gdb_assert (bsd_kvm_supply_pcb == NULL);
+ bsd_kvm_supply_pcb = supply_pcb;
+
+ bsd_kvm_ops.to_shortname = "kvm";
+ bsd_kvm_ops.to_longname = "Kernel memory interface";
+ bsd_kvm_ops.to_doc = "Use a kernel virtual memory image as a target.\n\
+Optionally specify the filename of a core dump.";
+ bsd_kvm_ops.to_open = bsd_kvm_open;
+ bsd_kvm_ops.to_close = bsd_kvm_close;
+ bsd_kvm_ops.to_fetch_registers = bsd_kvm_fetch_registers;
+ bsd_kvm_ops.to_xfer_memory = bsd_kvm_xfer_memory;
+ bsd_kvm_ops.to_stratum = process_stratum;
+ bsd_kvm_ops.to_has_memory = 1;
+ bsd_kvm_ops.to_has_stack = 1;
+ bsd_kvm_ops.to_has_registers = 1;
+ bsd_kvm_ops.to_magic = OPS_MAGIC;
+
+ add_target (&bsd_kvm_ops);
+
+ add_prefix_cmd ("kvm", class_obscure, bsd_kvm_cmd, "\
+Generic command for manipulating the kernel memory interface.",
+ &bsd_kvm_cmdlist, "kvm ", 0, &cmdlist);
+
+#ifndef HAVE_STRUCT_THREAD_TD_PCB
+ add_cmd ("proc", class_obscure, bsd_kvm_proc_cmd,
+ "Set current context from proc address", &bsd_kvm_cmdlist);
+#endif
+ add_cmd ("pcb", class_obscure, bsd_kvm_pcb_cmd,
+ "Set current context from pcb address", &bsd_kvm_cmdlist);
+}
diff --git a/gdb/config/i386/xm-i386.h b/gdb/bsd-kvm.h
index de29b265998..0660776cf43 100644
--- a/gdb/config/i386/xm-i386.h
+++ b/gdb/bsd-kvm.h
@@ -1,6 +1,6 @@
-/* Host-dependent definitions for the i386.
+/* BSD Kernel Data Access Library (libkvm) interface.
- Copyright 2001, 2004 Free Software Foundation, Inc.
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,13 +19,17 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef XM_I386_H
-#define XM_I386_H
+#ifndef BSD_KVM_H
+#define BSD_KVM_H
-#include "floatformat.h"
+struct pcb;
+struct regcache;
-#define HOST_FLOAT_FORMAT &floatformat_ieee_single_little
-#define HOST_DOUBLE_FORMAT &floatformat_ieee_double_little
-#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
+/* Add the libkvm interface to the list of all possible targets and
+ register CUPPLY_PCB as the architecture-specific process control
+ block interpreter. */
-#endif /* xm-i386.h */
+extern void
+ bsd_kvm_add_target (int (*supply_pcb)(struct regcache *, struct pcb *));
+
+#endif /* bsd-kvm.h */
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 4b362e08a2e..d1ec78ea6e4 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -38,7 +38,6 @@
#include "complaints.h"
#include "gdb_string.h"
#include "expression.h" /* For "enum exp_opcode" used by... */
-#include "language.h" /* For "local_hex_string" */
#include "bcache.h"
#include "filenames.h" /* For DOSish file names */
#include "macrotab.h"
@@ -521,7 +520,7 @@ make_blockvector (struct objfile *objfile)
= BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i));
complaint (&symfile_complaints, "block at %s out of order",
- local_hex_string ((LONGEST) start));
+ hex_string ((LONGEST) start));
}
}
}
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index f11b93e3a2b..27d18487766 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -53,9 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "block.h"
#include "cp-support.h"
-/* Flag indicating we're dealing with HP-compiled objects */
-extern int hp_som_som_object_present;
-
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
yacc generated parsers in gdb. Note that these are only the variables
@@ -504,7 +501,7 @@ exp : VARIABLE
exp : SIZEOF '(' type ')' %prec UNARY
{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
+ write_exp_elt_type (builtin_type (current_gdbarch)->builtin_int);
CHECK_TYPEDEF ($3);
write_exp_elt_longcst ((LONGEST) TYPE_LENGTH ($3));
write_exp_elt_opcode (OP_LONG); }
@@ -520,12 +517,12 @@ exp : STRING
while (count-- > 0)
{
write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_char);
+ write_exp_elt_type (builtin_type (current_gdbarch)->builtin_char);
write_exp_elt_longcst ((LONGEST)(*sp++));
write_exp_elt_opcode (OP_LONG);
}
write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_char);
+ write_exp_elt_type (builtin_type (current_gdbarch)->builtin_char);
write_exp_elt_longcst ((LONGEST)'\0');
write_exp_elt_opcode (OP_LONG);
write_exp_elt_opcode (OP_ARRAY);
@@ -537,14 +534,14 @@ exp : STRING
/* C++. */
exp : TRUEKEYWORD
{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_bool);
+ write_exp_elt_type (builtin_type (current_gdbarch)->builtin_bool);
write_exp_elt_longcst ((LONGEST) 1);
write_exp_elt_opcode (OP_LONG); }
;
exp : FALSEKEYWORD
{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_bool);
+ write_exp_elt_type (builtin_type (current_gdbarch)->builtin_bool);
write_exp_elt_longcst ((LONGEST) 0);
write_exp_elt_opcode (OP_LONG); }
;
@@ -655,8 +652,8 @@ variable: qualified_name
if (msymbol != NULL)
{
write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
+ lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
+ builtin_type (current_gdbarch)->builtin_int);
}
else
if (!have_full_symbols () && !have_partial_symbols ())
@@ -711,8 +708,8 @@ variable: name_not_typename
if (msymbol != NULL)
{
write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
+ lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
+ builtin_type (current_gdbarch)->builtin_int);
}
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
@@ -798,68 +795,68 @@ func_mod: '(' ')'
type : ptype
| typebase COLONCOLON '*'
- { $$ = lookup_member_type (builtin_type_int, $1); }
+ { $$ = lookup_member_type (builtin_type (current_gdbarch)->builtin_int, $1); }
;
typebase /* Implements (approximately): (type-qualifier)* type-specifier */
: TYPENAME
{ $$ = $1.type; }
| INT_KEYWORD
- { $$ = builtin_type_int; }
+ { $$ = builtin_type (current_gdbarch)->builtin_int; }
| LONG
- { $$ = builtin_type_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long; }
| SHORT
- { $$ = builtin_type_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_short; }
| LONG INT_KEYWORD
- { $$ = builtin_type_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long; }
| LONG SIGNED_KEYWORD INT_KEYWORD
- { $$ = builtin_type_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long; }
| LONG SIGNED_KEYWORD
- { $$ = builtin_type_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long; }
| SIGNED_KEYWORD LONG INT_KEYWORD
- { $$ = builtin_type_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long; }
| UNSIGNED LONG INT_KEYWORD
- { $$ = builtin_type_unsigned_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long; }
| LONG UNSIGNED INT_KEYWORD
- { $$ = builtin_type_unsigned_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long; }
| LONG UNSIGNED
- { $$ = builtin_type_unsigned_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long; }
| LONG LONG
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| LONG LONG INT_KEYWORD
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| LONG LONG SIGNED_KEYWORD INT_KEYWORD
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| LONG LONG SIGNED_KEYWORD
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| SIGNED_KEYWORD LONG LONG
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| SIGNED_KEYWORD LONG LONG INT_KEYWORD
- { $$ = builtin_type_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_long; }
| UNSIGNED LONG LONG
- { $$ = builtin_type_unsigned_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long_long; }
| UNSIGNED LONG LONG INT_KEYWORD
- { $$ = builtin_type_unsigned_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long_long; }
| LONG LONG UNSIGNED
- { $$ = builtin_type_unsigned_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long_long; }
| LONG LONG UNSIGNED INT_KEYWORD
- { $$ = builtin_type_unsigned_long_long; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_long_long; }
| SHORT INT_KEYWORD
- { $$ = builtin_type_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_short; }
| SHORT SIGNED_KEYWORD INT_KEYWORD
- { $$ = builtin_type_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_short; }
| SHORT SIGNED_KEYWORD
- { $$ = builtin_type_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_short; }
| UNSIGNED SHORT INT_KEYWORD
- { $$ = builtin_type_unsigned_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_short; }
| SHORT UNSIGNED
- { $$ = builtin_type_unsigned_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_short; }
| SHORT UNSIGNED INT_KEYWORD
- { $$ = builtin_type_unsigned_short; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_short; }
| DOUBLE_KEYWORD
- { $$ = builtin_type_double; }
+ { $$ = builtin_type (current_gdbarch)->builtin_double; }
| LONG DOUBLE_KEYWORD
- { $$ = builtin_type_long_double; }
+ { $$ = builtin_type (current_gdbarch)->builtin_long_double; }
| STRUCT name
{ $$ = lookup_struct (copy_name ($2),
expression_context_block); }
@@ -875,11 +872,11 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
| UNSIGNED typename
{ $$ = lookup_unsigned_typename (TYPE_NAME($2.type)); }
| UNSIGNED
- { $$ = builtin_type_unsigned_int; }
+ { $$ = builtin_type (current_gdbarch)->builtin_unsigned_int; }
| SIGNED_KEYWORD typename
{ $$ = lookup_signed_typename (TYPE_NAME($2.type)); }
| SIGNED_KEYWORD
- { $$ = builtin_type_int; }
+ { $$ = builtin_type (current_gdbarch)->builtin_int; }
/* It appears that this rule for templates is never
reduced; template recognition happens by lookahead
in the token processing code in yylex. */
@@ -969,19 +966,19 @@ typename: TYPENAME
{
$$.stoken.ptr = "int";
$$.stoken.length = 3;
- $$.type = builtin_type_int;
+ $$.type = builtin_type (current_gdbarch)->builtin_int;
}
| LONG
{
$$.stoken.ptr = "long";
$$.stoken.length = 4;
- $$.type = builtin_type_long;
+ $$.type = builtin_type (current_gdbarch)->builtin_long;
}
| SHORT
{
$$.stoken.ptr = "short";
$$.stoken.length = 5;
- $$.type = builtin_type_short;
+ $$.type = builtin_type (current_gdbarch)->builtin_short;
}
;
@@ -1103,11 +1100,11 @@ parse_number (p, len, parsed_float, putithere)
c = tolower (p[len - 1]);
if (c == 'f')
- putithere->typed_val_float.type = builtin_type_float;
+ putithere->typed_val_float.type = builtin_type (current_gdbarch)->builtin_float;
else if (c == 'l')
- putithere->typed_val_float.type = builtin_type_long_double;
+ putithere->typed_val_float.type = builtin_type (current_gdbarch)->builtin_long_double;
else if (isdigit (c) || c == '.')
- putithere->typed_val_float.type = builtin_type_double;
+ putithere->typed_val_float.type = builtin_type (current_gdbarch)->builtin_double;
else
return ERROR;
@@ -1223,15 +1220,15 @@ parse_number (p, len, parsed_float, putithere)
int. This probably should be fixed. GCC gives a warning on
such constants. */
- unsigned_type = builtin_type_unsigned_int;
- signed_type = builtin_type_int;
+ unsigned_type = builtin_type (current_gdbarch)->builtin_unsigned_int;
+ signed_type = builtin_type (current_gdbarch)->builtin_int;
}
else if (long_p <= 1
&& (un >> (TARGET_LONG_BIT - 2)) == 0)
{
high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
- unsigned_type = builtin_type_unsigned_long;
- signed_type = builtin_type_long;
+ unsigned_type = builtin_type (current_gdbarch)->builtin_unsigned_long;
+ signed_type = builtin_type (current_gdbarch)->builtin_long;
}
else
{
@@ -1242,8 +1239,8 @@ parse_number (p, len, parsed_float, putithere)
else
shift = (TARGET_LONG_LONG_BIT - 1);
high_bit = (ULONGEST) 1 << shift;
- unsigned_type = builtin_type_unsigned_long_long;
- signed_type = builtin_type_long_long;
+ unsigned_type = builtin_type (current_gdbarch)->builtin_unsigned_long_long;
+ signed_type = builtin_type (current_gdbarch)->builtin_long_long;
}
putithere->typed_val_int.val = n;
@@ -1395,7 +1392,7 @@ yylex ()
}
yylval.typed_val_int.val = c;
- yylval.typed_val_int.type = builtin_type_char;
+ yylval.typed_val_int.type = builtin_type (current_gdbarch)->builtin_char;
c = *lexptr++;
if (c != '\'')
@@ -1773,7 +1770,10 @@ yylex ()
yylval.tsym.type = SYMBOL_TYPE (sym);
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index ba34540f386..c7eb918ed1a 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -513,39 +513,68 @@ const struct op_print c_op_print_tab[] =
{NULL, 0, 0, 0}
};
-struct type **const (c_builtin_types[]) =
+enum c_primitive_types {
+ c_primitive_type_int,
+ c_primitive_type_long,
+ c_primitive_type_short,
+ c_primitive_type_char,
+ c_primitive_type_float,
+ c_primitive_type_double,
+ c_primitive_type_void,
+ c_primitive_type_long_long,
+ c_primitive_type_signed_char,
+ c_primitive_type_unsigned_char,
+ c_primitive_type_unsigned_short,
+ c_primitive_type_unsigned_int,
+ c_primitive_type_unsigned_long,
+ c_primitive_type_unsigned_long_long,
+ c_primitive_type_long_double,
+ c_primitive_type_complex,
+ c_primitive_type_double_complex,
+ nr_c_primitive_types
+};
+
+void
+c_language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai)
{
- &builtin_type_int,
- &builtin_type_long,
- &builtin_type_short,
- &builtin_type_char,
- &builtin_type_float,
- &builtin_type_double,
- &builtin_type_void,
- &builtin_type_long_long,
- &builtin_type_signed_char,
- &builtin_type_unsigned_char,
- &builtin_type_unsigned_short,
- &builtin_type_unsigned_int,
- &builtin_type_unsigned_long,
- &builtin_type_unsigned_long_long,
- &builtin_type_long_double,
- &builtin_type_complex,
- &builtin_type_double_complex,
- 0
+ const struct builtin_type *builtin = builtin_type (gdbarch);
+ lai->string_char_type = builtin->builtin_char;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_c_primitive_types + 1,
+ struct type *);
+ lai->primitive_type_vector [c_primitive_type_int] = builtin->builtin_int;
+ lai->primitive_type_vector [c_primitive_type_long] = builtin->builtin_long;
+ lai->primitive_type_vector [c_primitive_type_short] = builtin->builtin_short;
+ lai->primitive_type_vector [c_primitive_type_char] = builtin->builtin_char;
+ lai->primitive_type_vector [c_primitive_type_float] = builtin->builtin_float;
+ lai->primitive_type_vector [c_primitive_type_double] = builtin->builtin_double;
+ lai->primitive_type_vector [c_primitive_type_void] = builtin->builtin_void;
+ lai->primitive_type_vector [c_primitive_type_long_long] = builtin->builtin_long_long;
+ lai->primitive_type_vector [c_primitive_type_signed_char] = builtin->builtin_signed_char;
+ lai->primitive_type_vector [c_primitive_type_unsigned_char] = builtin->builtin_unsigned_char;
+ lai->primitive_type_vector [c_primitive_type_unsigned_short] = builtin->builtin_unsigned_short;
+ lai->primitive_type_vector [c_primitive_type_unsigned_int] = builtin->builtin_unsigned_int;
+ lai->primitive_type_vector [c_primitive_type_unsigned_long] = builtin->builtin_unsigned_long;
+ lai->primitive_type_vector [c_primitive_type_unsigned_long_long] = builtin->builtin_unsigned_long_long;
+ lai->primitive_type_vector [c_primitive_type_long_double] = builtin->builtin_long_double;
+ lai->primitive_type_vector [c_primitive_type_complex] = builtin->builtin_complex;
+ lai->primitive_type_vector [c_primitive_type_double_complex] = builtin->builtin_double_complex;
};
const struct language_defn c_language_defn =
{
"c", /* Language name */
language_c,
- c_builtin_types,
+ NULL,
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
+ null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -558,15 +587,13 @@ const struct language_defn c_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ c_language_arch_info,
LANG_MAGIC
};
@@ -601,9 +628,11 @@ const struct language_defn cplus_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
+ null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -616,15 +645,13 @@ const struct language_defn cplus_language_defn =
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
cp_lookup_transparent_type, /* lookup_transparent_type */
cplus_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ cp_class_name_from_physname, /* Language specific class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
default_word_break_characters,
+ NULL, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
@@ -632,13 +659,15 @@ const struct language_defn asm_language_defn =
{
"asm", /* Language name */
language_asm,
- c_builtin_types,
+ NULL,
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
+ null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -651,15 +680,13 @@ const struct language_defn asm_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ c_language_arch_info, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
@@ -672,13 +699,15 @@ const struct language_defn minimal_language_defn =
{
"minimal", /* Language name */
language_minimal,
- c_builtin_types,
+ NULL,
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
+ null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -691,15 +720,13 @@ const struct language_defn minimal_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ c_language_arch_info,
LANG_MAGIC
};
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index dd8f2311702..bce77496529 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -24,6 +24,7 @@
#define C_LANG_H 1
struct ui_file;
+struct language_arch_info;
#include "value.h"
#include "macroexp.h"
@@ -61,7 +62,8 @@ extern void *expression_macro_lookup_baton;
extern struct type *c_create_fundamental_type (struct objfile *, int);
-extern struct type **const (c_builtin_types[]);
+extern void c_language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai);
/* These are in c-typeprint.c: */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 2d2ad850c3f..c9a644229bb 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -38,9 +38,6 @@
#include "gdb_string.h"
#include <errno.h>
-/* Flag indicating target was compiled by HP compiler */
-extern int hp_som_som_object_present;
-
static void cp_type_print_method_args (struct type *mtype, char *prefix,
char *varstring, int staticp,
struct ui_file *stream);
@@ -1078,7 +1075,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
case TYPE_CODE_ENUM:
c_type_print_modifier (type, stream, 0, 1);
/* HP C supports sized enums */
- if (hp_som_som_object_present)
+ if (deprecated_hp_som_som_object_present)
switch (TYPE_LENGTH (type))
{
case 1:
diff --git a/gdb/charset.c b/gdb/charset.c
index 2005a49e009..89e3b75d633 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -1257,7 +1257,7 @@ _initialize_charset (void)
set_cmd_sfunc (new_cmd, set_host_charset_sfunc);
- add_show_from_set (new_cmd, &showlist);
+ deprecated_add_show_from_set (new_cmd, &showlist);
@@ -1273,5 +1273,5 @@ _initialize_charset (void)
&setlist);
set_cmd_sfunc (new_cmd, set_target_charset_sfunc);
- add_show_from_set (new_cmd, &showlist);
+ deprecated_add_show_from_set (new_cmd, &showlist);
}
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 9378ac87064..fbe93c9020d 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -600,7 +600,7 @@ edit_command (char *arg, int from_tty)
if (sal.symtab == 0)
/* FIXME-32x64--assumes sal.pc fits in long. */
error ("No source file for address %s.",
- local_hex_string((unsigned long) sal.pc));
+ hex_string ((unsigned long) sal.pc));
sym = find_pc_function (sal.pc);
if (sym)
{
@@ -767,7 +767,7 @@ list_command (char *arg, int from_tty)
if (sal.symtab == 0)
/* FIXME-32x64--assumes sal.pc fits in long. */
error ("No source file for address %s.",
- local_hex_string ((unsigned long) sal.pc));
+ hex_string ((unsigned long) sal.pc));
sym = find_pc_function (sal.pc);
if (sym)
{
@@ -858,7 +858,7 @@ disassemble_command (char *arg, int from_tty)
/* FIXME: cagney/2004-02-07: This should be an observer. */
low = tui_get_low_disassembly_address (low, pc);
#endif
- low += FUNCTION_START_OFFSET;
+ low += DEPRECATED_FUNCTION_START_OFFSET;
}
else if (!(space_index = (char *) strchr (arg, ' ')))
{
@@ -873,7 +873,7 @@ disassemble_command (char *arg, int from_tty)
/* FIXME: cagney/2004-02-07: This should be an observer. */
low = tui_get_low_disassembly_address (low, pc);
#endif
- low += FUNCTION_START_OFFSET;
+ low += DEPRECATED_FUNCTION_START_OFFSET;
}
else
{
@@ -1119,7 +1119,7 @@ when gdb is started.", &cmdlist);
c = add_set_cmd ("verbose", class_support, var_boolean, (char *) &info_verbose,
"Set ",
&setlist),
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_verbose);
set_verbose (NULL, 0, c);
@@ -1130,7 +1130,7 @@ when gdb is started.", &cmdlist);
"Generic command for showing command history parameters.",
&showhistlist, "show history ", 0, &showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("expansion", no_class, var_boolean, (char *) &history_expansion_p,
"Set history expansion on command input.\n\
Without an argument, history expansion is enabled.", &sethistlist),
@@ -1174,9 +1174,10 @@ is used, the same rules apply to its nested commands as to the first ones.");
/* If target is open when baud changes, it doesn't take effect until the
next open (I think, not sure). */
- add_show_from_set (add_set_cmd ("remotebaud", no_class,
- var_zinteger, (char *) &baud_rate,
- "Set baud rate for remote serial I/O.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotebaud", no_class,
+ var_zinteger, (char *) &baud_rate,
+ "Set baud rate for remote serial I/O.\n\
This value is used to set the speed of the serial port when debugging\n\
using remote targets.", &setlist),
&showlist);
@@ -1187,21 +1188,23 @@ using remote targets.", &setlist),
When enabled, each packet sent or received with the remote target\n\
is displayed.", &setlist);
deprecate_cmd (c, "set debug remote");
- deprecate_cmd (add_show_from_set (c, &showlist), "show debug remote");
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist),
+ "show debug remote");
- add_show_from_set (add_set_cmd ("remote", no_class, var_zinteger,
- (char *) &remote_debug,
- "Set debugging of remote protocol.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remote", no_class, var_zinteger,
+ (char *) &remote_debug,
+ "Set debugging of remote protocol.\n\
When enabled, each packet sent or received with the remote target\n\
is displayed.", &setdebuglist),
&showdebuglist);
- add_show_from_set (
- add_set_cmd ("remotetimeout", no_class, var_integer, (char *) &remote_timeout,
- "Set timeout limit to wait for target to respond.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotetimeout", no_class, var_integer, (char *) &remote_timeout,
+ "Set timeout limit to wait for target to respond.\n\
This value is used to set the time limit for gdb to wait for a response\n\
from the target.", &setlist),
- &showlist);
+ &showlist);
add_prefix_cmd ("debug", no_class, set_debug,
"Generic command for setting gdb debugging flags",
@@ -1279,10 +1282,10 @@ Argument is the name of the user defined command.\n\
With no argument, show definitions of all user defined commands.", &showlist);
add_com ("apropos", class_support, apropos_command, "Search for commands matching a REGEXP");
- add_show_from_set (
- add_set_cmd ("max-user-call-depth", no_class, var_integer,
- (char *) &max_user_call_depth,
- "Set the max call depth for user-defined commands.\n",
- &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("max-user-call-depth", no_class, var_integer,
+ (char *) &max_user_call_depth,
+ "Set the max call depth for user-defined commands.\n",
+ &setlist),
+ &showlist);
}
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 43f2f257304..cf008eb7b89 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -1,6 +1,6 @@
/* Handle lists of commands, their decoding and documentation, for GDB.
- Copyright 1986, 1989, 1990, 1991, 1998, 2000, 2001, 2002 Free
+ Copyright 1986, 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2004 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -320,16 +320,19 @@ add_set_or_show_cmd (char *name,
CLASS is as in add_cmd. VAR_TYPE is the kind of thing we are
setting. VAR is address of the variable being controlled by this
command. SET_FUNC and SHOW_FUNC are the callback functions (if
- non-NULL). SET_DOC and SHOW_DOC are the documentation strings.
- SET_RESULT and SHOW_RESULT, if not NULL, are set to the resulting
- command structures. */
+ non-NULL). SET_DOC, SHOW_DOC and HELP_DOC are the documentation
+ strings. PRINT the format string to print the value. SET_RESULT
+ and SHOW_RESULT, if not NULL, are set to the resulting command
+ structures. */
-void
+static void
add_setshow_cmd_full (char *name,
enum command_class class,
var_types var_type, void *var,
- char *set_doc, char *show_doc,
- cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list,
struct cmd_list_element **set_result,
@@ -337,12 +340,25 @@ add_setshow_cmd_full (char *name,
{
struct cmd_list_element *set;
struct cmd_list_element *show;
+ char *full_set_doc;
+ char *full_show_doc;
+
+ if (help_doc != NULL)
+ {
+ full_set_doc = xstrprintf ("%s\n%s", set_doc, help_doc);
+ full_show_doc = xstrprintf ("%s\n%s", show_doc, help_doc);
+ }
+ else
+ {
+ full_set_doc = xstrdup (set_doc);
+ full_show_doc = xstrdup (show_doc);
+ }
set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
- set_doc, set_list);
+ full_set_doc, set_list);
if (set_func != NULL)
set_cmd_sfunc (set, set_func);
show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
- show_doc, show_list);
+ full_show_doc, show_list);
if (show_func != NULL)
set_cmd_sfunc (show, show_func);
@@ -352,26 +368,6 @@ add_setshow_cmd_full (char *name,
*show_result = show;
}
-/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
- CLASS is as in add_cmd. VAR_TYPE is the kind of thing we are
- setting. VAR is address of the variable being controlled by this
- command. SET_FUNC and SHOW_FUNC are the callback functions (if
- non-NULL). SET_DOC and SHOW_DOC are the documentation strings. */
-
-void
-add_setshow_cmd (char *name,
- enum command_class class,
- var_types var_type, void *var,
- char *set_doc, char *show_doc,
- cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
- struct cmd_list_element **set_list,
- struct cmd_list_element **show_list)
-{
- add_setshow_cmd_full (name, class, var_type, var, set_doc, show_doc,
- set_func, show_func, set_list, show_list,
- NULL, NULL);
-}
-
struct cmd_list_element *
add_set_cmd (char *name,
enum command_class class,
@@ -414,7 +410,8 @@ void
add_setshow_auto_boolean_cmd (char *name,
enum command_class class,
enum auto_boolean *var,
- char *set_doc, char *show_doc,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
@@ -423,7 +420,8 @@ add_setshow_auto_boolean_cmd (char *name,
static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_auto_boolean, var,
- set_doc, show_doc, set_func, show_func,
+ set_doc, show_doc, help_doc, print,
+ set_func, show_func,
set_list, show_list,
&c, NULL);
c->enums = auto_boolean_enums;
@@ -432,11 +430,11 @@ add_setshow_auto_boolean_cmd (char *name,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). CLASS is as in
add_cmd. VAR is address of the variable which will contain the
- value. SET_DOC and SHOW_DOR are the documentation strings. */
+ value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_boolean_cmd (char *name,
- enum command_class class,
- int *var, char *set_doc, char *show_doc,
+add_setshow_boolean_cmd (char *name, enum command_class class, int *var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
@@ -445,7 +443,7 @@ add_setshow_boolean_cmd (char *name,
static const char *boolean_enums[] = { "on", "off", NULL };
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_boolean, var,
- set_doc, show_doc,
+ set_doc, show_doc, help_doc, print,
set_func, show_func,
set_list, show_list,
&c, NULL);
@@ -453,20 +451,80 @@ add_setshow_boolean_cmd (char *name,
}
/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). */
+void
+add_setshow_filename_cmd (char *name, enum command_class class,
+ char **var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ add_setshow_cmd_full (name, class, var_filename, var,
+ set_doc, show_doc, help_doc, print,
+ set_func, show_func,
+ set_list, show_list,
+ NULL, NULL);
+}
+
+/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). */
+void
+add_setshow_string_cmd (char *name, enum command_class class,
+ char **var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ add_setshow_cmd_full (name, class, var_string, var,
+ set_doc, show_doc, help_doc, print,
+ set_func, show_func,
+ set_list, show_list,
+ NULL, NULL);
+}
+
+/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). CLASS is as in
add_cmd. VAR is address of the variable which will contain the
- value. SET_DOC and SHOW_DOR are the documentation strings. */
+ value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_uinteger_cmd (char *name,
- enum command_class class,
- unsigned int *var, char *set_doc, char *show_doc,
+add_setshow_uinteger_cmd (char *name, enum command_class class,
+ unsigned int *var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
add_setshow_cmd_full (name, class, var_uinteger, var,
- set_doc, show_doc,
+ set_doc, show_doc, help_doc, print,
+ set_func, show_func,
+ set_list, show_list,
+ NULL, NULL);
+}
+
+/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). CLASS is as in
+ add_cmd. VAR is address of the variable which will contain the
+ value. SET_DOC and SHOW_DOC are the documentation strings. */
+void
+add_setshow_zinteger_cmd (char *name, enum command_class class,
+ int *var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ add_setshow_cmd_full (name, class, var_zinteger, var,
+ set_doc, show_doc, help_doc, print,
set_func, show_func,
set_list, show_list,
NULL, NULL);
@@ -475,16 +533,16 @@ add_setshow_uinteger_cmd (char *name,
/* Where SETCMD has already been added, add the corresponding show
command to LIST and return a pointer to the added command (not
necessarily the head of LIST). */
-/* NOTE: cagney/2002-03-17: The original version of add_show_from_set
- used memcpy() to clone `set' into `show'. This meant that in
- addition to all the needed fields (var, name, et.al.) some
- unnecessary fields were copied (namely the callback function). The
- function explictly copies relevant fields. For a `set' and `show'
- command to share the same callback, the caller must set both
- explicitly. */
+/* NOTE: cagney/2002-03-17: The original version of
+ deprecated_add_show_from_set used memcpy() to clone `set' into
+ `show'. This meant that in addition to all the needed fields (var,
+ name, et.al.) some unnecessary fields were copied (namely the
+ callback function). The function explictly copies relevant fields.
+ For a `set' and `show' command to share the same callback, the
+ caller must set both explicitly. */
struct cmd_list_element *
-add_show_from_set (struct cmd_list_element *setcmd,
- struct cmd_list_element **list)
+deprecated_add_show_from_set (struct cmd_list_element *setcmd,
+ struct cmd_list_element **list)
{
char *doc;
const static char setstring[] = "Set ";
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index d8ab67d49f0..97e71063973 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -295,9 +295,8 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
- struct cmd_list_element
- **);
+extern struct cmd_list_element *deprecated_add_show_from_set (struct cmd_list_element *,
+ struct cmd_list_element **);
/* Functions that implement commands about CLI commands. */
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index ac54aa675b9..84b4a6d469a 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -427,8 +427,8 @@ add_dump_command (char *name, void (*func) (char *args, char *mode),
set_cmd_context (c, d);
c->func = call_dump_func;
- /* Replace "Dump " at start of docstring with "Append "
- (borrowed from add_show_from_set). */
+ /* Replace "Dump " at start of docstring with "Append " (borrowed
+ from deprecated_add_show_from_set). */
if ( c->doc[0] == 'W'
&& c->doc[1] == 'r'
&& c->doc[2] == 'i'
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index db34b0d9c07..6b32b330ba6 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -1,7 +1,6 @@
/* Command-line output logging for GDB, the GNU debugger.
- Copyright 2003
- Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -175,27 +174,26 @@ _initialize_cli_logging (void)
add_prefix_cmd ("logging", class_support, show_logging_command,
"Show logging options", &show_logging_cmdlist,
"show logging ", 0, &showlist);
- add_setshow_boolean_cmd ("overwrite", class_support, &logging_overwrite,
- "Set whether logging overwrites or appends "
- "to the log file.\n",
- "Show whether logging overwrites or appends "
- "to the log file.\n",
+ add_setshow_boolean_cmd ("overwrite", class_support, &logging_overwrite, "\
+Set whether logging overwrites or appends to the log file.", "\
+Show whether logging overwrites or appends to the log file.", "\
+If set, logging overrides the log file.", "\
+Whether logging overwrites or appends to the log file is %s.",
NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist);
- add_setshow_boolean_cmd ("redirect", class_support, &logging_redirect,
- "Set the logging output mode.\n"
- "If redirect is off, output will go to both the "
- "screen and the log file.\n"
- "If redirect is on, output will go only to the log "
- "file.",
- "Show the logging output mode.\n"
- "If redirect is off, output will go to both the "
- "screen and the log file.\n"
- "If redirect is on, output will go only to the log "
- "file.",
+ add_setshow_boolean_cmd ("redirect", class_support, &logging_redirect, "\
+Set the logging output mode.", "\
+Show the logging output mode.", "\
+If redirect is off, output will go to both the screen and the log file.\n\
+If redirect is on, output will go only to the log file.", "\
+The logging output mode is %s.",
NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist);
- add_setshow_cmd ("file", class_support, var_filename, &logging_filename,
- "Set the current logfile.", "Show the current logfile.",
- NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist);
+ add_setshow_filename_cmd ("file", class_support, &logging_filename, "\
+Set the current logfile.", "\
+Show the current logfile.", "\
+The logfile is used when directing GDB's output.", "\
+The current logfile is %s.",
+ NULL, NULL,
+ &set_logging_cmdlist, &show_logging_cmdlist);
add_cmd ("on", class_support, set_logging_on,
"Enable logging.", &set_logging_cmdlist);
add_cmd ("off", class_support, set_logging_off,
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index ca0c14f043b..1f1cf1df0c3 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1,7 +1,7 @@
/* GDB CLI command scripting.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -685,7 +685,7 @@ read_next_line (struct command_line **command)
error ("Control nesting too deep!\n");
/* Set a prompt based on the nesting of the control commands. */
- if (instream == stdin || (instream == 0 && readline_hook != NULL))
+ if (instream == stdin || (instream == 0 && deprecated_readline_hook != NULL))
{
for (i = 0; i < control_level; i++)
control_prompt[i] = ' ';
@@ -727,9 +727,21 @@ read_next_line (struct command_line **command)
/* Check for while, if, break, continue, etc and build a new command
line structure for them. */
if (p1 - p > 5 && !strncmp (p, "while", 5))
- *command = build_command_line (while_control, p + 6);
+ {
+ char *first_arg;
+ first_arg = p + 5;
+ while (first_arg < p1 && isspace (*first_arg))
+ first_arg++;
+ *command = build_command_line (while_control, first_arg);
+ }
else if (p1 - p > 2 && !strncmp (p, "if", 2))
- *command = build_command_line (if_control, p + 3);
+ {
+ char *first_arg;
+ first_arg = p + 2;
+ while (first_arg < p1 && isspace (*first_arg))
+ first_arg++;
+ *command = build_command_line (if_control, first_arg);
+ }
else if (p1 - p == 10 && !strncmp (p, "loop_break", 10))
{
*command = (struct command_line *)
@@ -893,10 +905,10 @@ read_command_lines (char *prompt_arg, int from_tty)
enum misc_command_type val;
control_level = 0;
- if (readline_begin_hook)
+ if (deprecated_readline_begin_hook)
{
/* Note - intentional to merge messages with no newline */
- (*readline_begin_hook) ("%s %s\n", prompt_arg, END_MESSAGE);
+ (*deprecated_readline_begin_hook) ("%s %s\n", prompt_arg, END_MESSAGE);
}
else if (from_tty && input_from_terminal_p ())
{
@@ -962,9 +974,9 @@ read_command_lines (char *prompt_arg, int from_tty)
do_cleanups (old_chain);
}
- if (readline_end_hook)
+ if (deprecated_readline_end_hook)
{
- (*readline_end_hook) ();
+ (*deprecated_readline_end_hook) ();
}
return (head);
}
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 91b018eeb82..cf87cf6161b 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -344,8 +344,8 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
else
error ("gdb internal error: bad cmd_type in do_setshow_command");
c->func (c, NULL, from_tty);
- if (c->type == set_cmd && set_hook)
- set_hook (c);
+ if (c->type == set_cmd && deprecated_set_hook)
+ deprecated_set_hook (c);
}
/* Show all the settings in a list of show commands. */
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 81e78c5f892..2f6790e2f5f 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -385,13 +385,6 @@ complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
last_source_file = savestring (name, strlen (name));
current_source_start_addr = start_addr;
current_source_end_addr = start_addr + size;
-
- if (current_objfile->ei.entry_point >= current_source_start_addr &&
- current_objfile->ei.entry_point < current_source_end_addr)
- {
- current_objfile->ei.deprecated_entry_file_lowpc = current_source_start_addr;
- current_objfile->ei.deprecated_entry_file_highpc = current_source_end_addr;
- }
}
/* Finish the symbol definitions for one main source file,
@@ -444,14 +437,13 @@ coff_symfile_init (struct objfile *objfile)
{
/* Allocate struct to keep track of stab reading. */
objfile->sym_stab_info = (struct dbx_symfile_info *)
- xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
+ xmalloc (sizeof (struct dbx_symfile_info));
memset (objfile->sym_stab_info, 0,
sizeof (struct dbx_symfile_info));
/* Allocate struct to keep track of the symfile */
- objfile->sym_private = xmmalloc (objfile->md,
- sizeof (struct coff_symfile_info));
+ objfile->sym_private = xmalloc (sizeof (struct coff_symfile_info));
memset (objfile->sym_private, 0, sizeof (struct coff_symfile_info));
@@ -610,6 +602,15 @@ coff_symfile_read (struct objfile *objfile, int mainline)
/* Free the installed minimal symbol data. */
do_cleanups (cleanup_minimal_symbols);
+ /* If we are reinitializing, or if we have not loaded syms yet,
+ empty the psymtab. "mainline" is cleared so the *_read_psymtab
+ functions do not all re-initialize it. */
+ if (mainline)
+ {
+ init_psymbol_list (objfile, 0);
+ mainline = 0;
+ }
+
bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
if (info->stabsects)
@@ -640,6 +641,8 @@ coff_symfile_read (struct objfile *objfile, int mainline)
dwarf2_build_psymtabs (objfile, mainline);
}
+ dwarf2_build_frame_info (objfile);
+
do_cleanups (back_to);
}
@@ -658,7 +661,7 @@ coff_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- xmfree (objfile->md, objfile->sym_private);
+ xfree (objfile->sym_private);
}
/* Let stabs reader clean up */
diff --git a/gdb/command.h b/gdb/command.h
index c4a5f20edd3..8c0461377d1 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -1,7 +1,7 @@
/* Header file for command-reading library command.c.
Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1999,
- 2000, 2002 Free Software Foundation, Inc.
+ 2000, 2002, 2004 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
@@ -153,14 +153,15 @@ extern void execute_cmd_pre_hook (struct cmd_list_element *cmd);
extern void execute_cmd_post_hook (struct cmd_list_element *cmd);
/* Return the type of the command. */
-/* NOTE: cagney/2002-03-17: The add_show_from_set() function clones
- the set command passed as a parameter. The clone operation will
- include (BUG?) any ``set'' command callback, if present. Commands
- like ``info set'' call all the ``show'' command callbacks.
- Unfortunately, for ``show'' commands cloned from ``set'', this
- includes callbacks belonging to ``set'' commands. Making this
- worse, this only occures if add_show_from_set() is called after
- add_cmd_sfunc() (BUG?). */
+/* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
+ function clones the set command passed as a parameter. The clone
+ operation will include (BUG?) any ``set'' command callback, if
+ present. Commands like ``info set'' call all the ``show'' command
+ callbacks. Unfortunately, for ``show'' commands cloned from
+ ``set'', this includes callbacks belonging to ``set'' commands.
+ Making this worse, this only occures if
+ deprecated_add_show_from_set() is called after add_cmd_sfunc()
+ (BUG?). */
extern enum cmd_types cmd_type (struct cmd_list_element *cmd);
@@ -210,26 +211,6 @@ extern void help_list (struct cmd_list_element *, char *,
extern void help_cmd_list (struct cmd_list_element *, enum command_class,
char *, int, struct ui_file *);
-extern void add_setshow_cmd (char *name,
- enum command_class class,
- var_types var_type, void *var,
- char *set_doc, char *show_doc,
- cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
- struct cmd_list_element **set_list,
- struct cmd_list_element **show_list);
-
-extern void add_setshow_cmd_full (char *name,
- enum command_class class,
- var_types var_type, void *var,
- char *set_doc, char *show_doc,
- cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
- struct cmd_list_element **set_list,
- struct cmd_list_element **show_list,
- struct cmd_list_element **set_result,
- struct cmd_list_element **show_result);
-
extern struct cmd_list_element *add_set_cmd (char *name, enum
command_class class,
var_types var_type, void *var,
@@ -246,7 +227,10 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
extern void add_setshow_auto_boolean_cmd (char *name,
enum command_class class,
enum auto_boolean *var,
- char *set_doc, char *show_doc,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
@@ -255,26 +239,63 @@ extern void add_setshow_auto_boolean_cmd (char *name,
extern void add_setshow_boolean_cmd (char *name,
enum command_class class,
int *var,
- char *set_doc,
- char *show_doc,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
+extern void add_setshow_filename_cmd (char *name,
+ enum command_class class,
+ char **var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
+extern void add_setshow_string_cmd (char *name,
+ enum command_class class,
+ char **var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
extern void add_setshow_uinteger_cmd (char *name,
enum command_class class,
unsigned int *var,
- char *set_doc,
- char *show_doc,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
+extern void add_setshow_zinteger_cmd (char *name,
+ enum command_class class,
+ int *var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
-extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
- struct cmd_list_element
- **);
+extern struct cmd_list_element *deprecated_add_show_from_set (struct cmd_list_element *,
+ struct cmd_list_element **);
/* Do a "show" command for each thing on a command list. */
diff --git a/gdb/complaints.c b/gdb/complaints.c
index ed24f432406..8630fde85f7 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -1,7 +1,7 @@
/* Support for complaint handling during symbol reading in GDB.
- Copyright 1990, 1991, 1992, 1993, 1995, 1998, 1999, 2000, 2002 Free
- Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1995, 1998, 1999, 2000, 2002,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -186,8 +186,8 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
if (complaint->file != NULL)
internal_vwarning (complaint->file, complaint->line, complaint->fmt, args);
- else if (warning_hook)
- (*warning_hook) (complaint->fmt, args);
+ else if (deprecated_warning_hook)
+ (*deprecated_warning_hook) (complaint->fmt, args);
else
{
if (complaints->explanation == NULL)
@@ -197,7 +197,7 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
{
char *msg;
struct cleanup *cleanups;
- xvasprintf (&msg, complaint->fmt, args);
+ msg = xstrvprintf (complaint->fmt, args);
cleanups = make_cleanup (xfree, msg);
wrap_here ("");
if (series != SUBSEQUENT_MESSAGE)
@@ -311,11 +311,11 @@ clear_complaints (struct complaints **c, int less_verbose, int noisy)
void
_initialize_complaints (void)
{
- add_setshow_cmd ("complaints", class_support, var_zinteger,
- &stop_whining,
- "Set max number of complaints about incorrect symbols.",
- "Show max number of complaints about incorrect symbols.",
- NULL, NULL,
- &setlist, &showlist);
+ add_setshow_zinteger_cmd ("complaints", class_support, &stop_whining, "\
+Set max number of complaints about incorrect symbols.", "\
+Show max number of complaints about incorrect symbols.", NULL, "\
+Max number of complaints about incorrect symbols is %s.",
+ NULL, NULL,
+ &setlist, &showlist);
}
diff --git a/gdb/config.in b/gdb/config.in
index a1c2b0fc5cc..e97479f2be4 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -173,6 +173,12 @@
/* nativefile */
#undef GDB_NM_FILE
+/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
+ around a <sys/proc.h> problem on IRIX 5. */
+#ifndef _KMEMUSER
+#undef _KMEMUSER
+#endif
+
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
@@ -254,6 +260,9 @@
/* Define if you have the syscall function. */
#undef HAVE_SYSCALL
+/* Define if you have the ttrace function. */
+#undef HAVE_TTRACE
+
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
@@ -263,6 +272,9 @@
/* Define if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
+/* Define if you have the <cursesX.h> header file. */
+#undef HAVE_CURSESX_H
+
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
@@ -296,6 +308,9 @@
/* Define if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
+/* Define if you have the <ncurses/ncurses.h> header file. */
+#undef HAVE_NCURSES_NCURSES_H
+
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
@@ -377,6 +392,9 @@
/* Define if you have the <sys/syscall.h> header file. */
#undef HAVE_SYS_SYSCALL_H
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
/* Define if you have the <sys/user.h> header file. */
#undef HAVE_SYS_USER_H
@@ -444,18 +462,36 @@
#undef HAVE__ETEXT
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
- Solaris 2.[78] when using GCC. */
+ Solaris 2.[789] when using GCC. */
#undef _MSE_INT_H
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETOPT
+/* Define to 1 if we found this declaration otherwise define to 0. */
+#undef HAVE_DECL_PTRACE
+
+/* Define as the return type of ptrace. */
+#undef PTRACE_TYPE_RET
+
+/* Define to the type of arg 3 for ptrace. */
+#undef PTRACE_TYPE_ARG3
+
+/* Define to the type of arg 5 for ptrace. */
+#undef PTRACE_TYPE_ARG5
+
/* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP
/* Define to 1 if the regex included in libiberty should be used. */
#undef USE_INCLUDED_REGEX
+/* Define to 1 if your system has td_pcb in struct thread. */
+#undef HAVE_STRUCT_THREAD_TD_PCB
+
+/* Define to 1 if your system has struct lwp. */
+#undef HAVE_STRUCT_LWP
+
/* Define to 1 if your system has struct reg in <machine/reg.h>. */
#undef HAVE_STRUCT_REG
@@ -531,6 +567,15 @@
/* Define if we can use the tkill syscall. */
#undef HAVE_TKILL_SYSCALL
+/* Host float floatformat */
+#undef GDB_HOST_FLOAT_FORMAT
+
+/* Host double floatformat */
+#undef GDB_HOST_DOUBLE_FORMAT
+
+/* Host long double floatformat */
+#undef GDB_HOST_LONG_DOUBLE_FORMAT
+
/* Define to the default OS ABI for this configuration. */
#undef GDB_OSABI_DEFAULT
diff --git a/gdb/config/alpha/alpha-linux.mh b/gdb/config/alpha/alpha-linux.mh
index 418bc419f8a..d3cbff7ff39 100644
--- a/gdb/config/alpha/alpha-linux.mh
+++ b/gdb/config/alpha/alpha-linux.mh
@@ -1,10 +1,11 @@
# Host: Little-endian Alpha running Linux
-XM_FILE= xm-alphalinux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o linux-proc.o \
fork-child.o proc-service.o thread-db.o lin-lwp.o gcore.o \
linux-nat.o
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
LOADLIBES = -ldl -rdynamic
# doublest.c currently assumes some properties of FP arithmetic
diff --git a/gdb/config/alpha/alpha-linux.mt b/gdb/config/alpha/alpha-linux.mt
index 8fe98f264b7..d07dbee41f2 100644
--- a/gdb/config/alpha/alpha-linux.mt
+++ b/gdb/config/alpha/alpha-linux.mt
@@ -1,4 +1,4 @@
# Target: Little-endian Alpha
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
+DEPRECATED_TM_FILE= tm-alphalinux.h
diff --git a/gdb/config/alpha/alpha-osf1.mh b/gdb/config/alpha/alpha-osf1.mh
index 6d53b44505b..837f73ca227 100644
--- a/gdb/config/alpha/alpha-osf1.mh
+++ b/gdb/config/alpha/alpha-osf1.mh
@@ -1,5 +1,4 @@
# Host: Little-endian Alpha running OSF/1-1.x
-XM_FILE= xm-alphaosf.h
NAT_FILE= nm-osf.h
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
solib-osf.o solib.o
diff --git a/gdb/config/alpha/alpha-osf1.mt b/gdb/config/alpha/alpha-osf1.mt
index 2a47bd41429..d8e227da6bf 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 alpha-mdebug-tdep.o
-TM_FILE= tm-alpha.h
+DEPRECATED_TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/alpha-osf2.mh b/gdb/config/alpha/alpha-osf2.mh
index b853ebb30a9..d861037e60c 100644
--- a/gdb/config/alpha/alpha-osf2.mh
+++ b/gdb/config/alpha/alpha-osf2.mh
@@ -1,5 +1,4 @@
# Host: Little-endian Alpha running OSF/1-2.x using procfs
-XM_FILE= xm-alphaosf.h
NAT_FILE= nm-osf2.h
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \
diff --git a/gdb/config/alpha/alpha-osf3.mh b/gdb/config/alpha/alpha-osf3.mh
index f074444fae0..5a8f2aa04c8 100644
--- a/gdb/config/alpha/alpha-osf3.mh
+++ b/gdb/config/alpha/alpha-osf3.mh
@@ -1,5 +1,4 @@
# Host: Little-endian Alpha running OSF/1-3.x and higher using procfs
-XM_FILE= xm-alphaosf.h
NAT_FILE= nm-osf3.h
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \
diff --git a/gdb/config/alpha/alpha.mt b/gdb/config/alpha/alpha.mt
index dfff657cbcc..703f3fb5e0b 100644
--- a/gdb/config/alpha/alpha.mt
+++ b/gdb/config/alpha/alpha.mt
@@ -1,2 +1,2 @@
TDEPFILES= alpha-tdep.o
-TM_FILE= tm-alpha.h
+DEPRECATED_TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/fbsd.mt b/gdb/config/alpha/fbsd.mt
index b126c682292..7c6892d29f1 100644
--- a/gdb/config/alpha/fbsd.mt
+++ b/gdb/config/alpha/fbsd.mt
@@ -1,3 +1,3 @@
# Target: FreeBSD/alpha
TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
-TM_FILE= tm-alpha.h
+DEPRECATED_TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/nbsd.mt b/gdb/config/alpha/nbsd.mt
index 065a28c9a01..6a8b9c01501 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 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
+DEPRECATED_TM_FILE= tm-nbsd.h
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index a6f9a49f9d6..19589584b20 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -29,14 +29,6 @@
#define U_REGS_OFFSET 0
-/* FIXME: This is probably true, or should be, on all GNU/Linux ports.
- IA64? Sparc64? */
-#define PTRACE_ARG3_TYPE long
-
-/* ptrace transfers longs, the ptrace man page is lying. */
-
-#define PTRACE_XFER_TYPE long
-
/* The alpha does not step over a breakpoint, the manpage is lying again. */
#define CANNOT_STEP_BREAKPOINT 1
diff --git a/gdb/config/alpha/nm-osf.h b/gdb/config/alpha/nm-osf.h
index 326bb3005ca..288bc352dcb 100644
--- a/gdb/config/alpha/nm-osf.h
+++ b/gdb/config/alpha/nm-osf.h
@@ -29,10 +29,6 @@
#define U_REGS_OFFSET 0
-/* FIXME: Shouldn't the default definition in inferior.h be int* ? */
-
-#define PTRACE_ARG3_TYPE int*
-
/* ptrace transfers longs, the ptrace man page is lying. */
#define PTRACE_XFER_TYPE long
diff --git a/gdb/config/alpha/nm-osf2.h b/gdb/config/alpha/nm-osf2.h
index 1f3932df59b..cbd232c0834 100644
--- a/gdb/config/alpha/nm-osf2.h
+++ b/gdb/config/alpha/nm-osf2.h
@@ -35,7 +35,6 @@
#define PROCFS_DONT_TRACE_FAULTS
/* Work around some peculiarities in the OSF/1 procfs implementation. */
-#define PROCFS_SIGPEND_OFFSET
#define PROCFS_NEED_PIOCSSIG_FOR_KILL
#define PROCFS_DONT_PIOCSSIG_CURSIG
@@ -43,10 +42,3 @@
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
-
-/* poll() doesn't seem to work properly for /proc in this version of the OS.
- If we only specify POLLPRI, things hang. It seems to get better when we set
- POLLOUT, but that always returns POLLNVAL!!! Also, POLLOUT causes problems
- on other OSes. */
-
-#define LOSING_POLL
diff --git a/gdb/config/alpha/xm-alphaosf.h b/gdb/config/alpha/xm-alphaosf.h
deleted file mode 100644
index 67d3cc4af8a..00000000000
--- a/gdb/config/alpha/xm-alphaosf.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Host definitions for GDB running on an alpha under OSF/1
- Copyright 1992, 1993, 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The alpha has no siginterrupt routine. */
-#define NO_SIGINTERRUPT
-
-#define HAVE_TERMIOS
diff --git a/gdb/config/arm/embed.mt b/gdb/config/arm/embed.mt
index c854d17a71a..f826bc91681 100644
--- a/gdb/config/arm/embed.mt
+++ b/gdb/config/arm/embed.mt
@@ -1,7 +1,7 @@
# Target: ARM embedded system
TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.o
TDEPLIBS= rdi-share/libangsd.a
-TM_FILE= tm-embed.h
+DEPRECATED_TM_FILE= tm-embed.h
SIM_OBS = remote-sim.o
SIM = ../sim/arm/libsim.a
diff --git a/gdb/config/arm/linux.mh b/gdb/config/arm/linux.mh
index 1b0a3ba46d4..af5b546a7dc 100644
--- a/gdb/config/arm/linux.mh
+++ b/gdb/config/arm/linux.mh
@@ -1,7 +1,5 @@
# Host: ARM based machine running GNU/Linux
-XM_FILE= xm-linux.h
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
core-regset.o arm-linux-nat.o linux-proc.o gcore.o \
diff --git a/gdb/config/arm/linux.mt b/gdb/config/arm/linux.mt
index cd6f01059fb..a2439f8c43c 100644
--- a/gdb/config/arm/linux.mt
+++ b/gdb/config/arm/linux.mt
@@ -1,3 +1,3 @@
# Target: ARM based machine running GNU/Linux
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= tm-linux.h
TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/arm/nbsd.mt b/gdb/config/arm/nbsd.mt
index 1e7d4fa3e61..e9dd0d01496 100644
--- a/gdb/config/arm/nbsd.mt
+++ b/gdb/config/arm/nbsd.mt
@@ -1,3 +1,3 @@
# Target: ARM running NetBSD
TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o
-TM_FILE=tm-nbsd.h
+DEPRECATED_TM_FILE=solib.h
diff --git a/gdb/config/arm/nbsdaout.mh b/gdb/config/arm/nbsdaout.mh
index 100e40b42bb..1d4f9b4a8a1 100644
--- a/gdb/config/arm/nbsdaout.mh
+++ b/gdb/config/arm/nbsdaout.mh
@@ -1,5 +1,4 @@
# Host ARM running NetBSD
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o armnbsd-nat.o \
solib-sunos.o
-XM_FILE=xm-nbsd.h
NAT_FILE=nm-nbsdaout.h
diff --git a/gdb/config/arm/nbsdelf.mh b/gdb/config/arm/nbsdelf.mh
index 481d5cc92a5..b979f6ac125 100644
--- a/gdb/config/arm/nbsdelf.mh
+++ b/gdb/config/arm/nbsdelf.mh
@@ -1,4 +1,3 @@
# Host ARM running NetBSD
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o armnbsd-nat.o
-XM_FILE=xm-nbsd.h
-NAT_FILE=nm-nbsd.h
+NAT_FILE= config/nm-nbsd.h
diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h
index 3de00c915ca..1d7bbaa8650 100644
--- a/gdb/config/arm/nm-linux.h
+++ b/gdb/config/arm/nm-linux.h
@@ -31,6 +31,10 @@
extern int kernel_u_size (void);
#define KERNEL_U_SIZE arm_linux_kernel_u_size()
+/* 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
+
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/arm/nm-nbsdaout.h b/gdb/config/arm/nm-nbsdaout.h
index 3f7fee9de1a..88e42c5aeda 100644
--- a/gdb/config/arm/nm-nbsdaout.h
+++ b/gdb/config/arm/nm-nbsdaout.h
@@ -21,7 +21,7 @@
#ifndef NM_NBSDAOUT_H
#define NM_NBSDAOUT_H
-#include "arm/nm-nbsd.h"
+#include "config/nm-nbsd.h"
/* Get generic NetBSD a.out native definitions. */
#include "config/nm-nbsdaout.h"
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index c62a75d6c39..afc06a8b530 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -22,8 +22,6 @@
#ifndef TM_ARM_H
#define TM_ARM_H
-#define GDB_MULTI_ARCH 1
-
/* Specify that for the native compiler variables for a particular
lexical context are listed after the beginning LBRAC instead of
before in the executables list of symbols. */
diff --git a/gdb/config/arm/tm-embed.h b/gdb/config/arm/tm-embed.h
index 7ad6b688e0b..6a8c87abc4c 100644
--- a/gdb/config/arm/tm-embed.h
+++ b/gdb/config/arm/tm-embed.h
@@ -46,7 +46,4 @@
extern int arm_in_call_stub (CORE_ADDR pc, char *name);
extern CORE_ADDR arm_skip_stub (CORE_ADDR pc);
-#undef DEPRECATED_IN_SIGTRAMP
-#define DEPRECATED_IN_SIGTRAMP(pc, name) 0
-
#endif /* TM_ARMEMBED_H */
diff --git a/gdb/config/arm/wince.mt b/gdb/config/arm/wince.mt
index 92a77ae0ad0..9cdc07ded5e 100644
--- a/gdb/config/arm/wince.mt
+++ b/gdb/config/arm/wince.mt
@@ -1,5 +1,5 @@
# Target: Acorn RISC machine (ARM) with simulator
TDEPFILES= arm-tdep.o wince.o
-TM_FILE= tm-wince.h
+DEPRECATED_TM_FILE= tm-wince.h
MT_CFLAGS=-DARM -U_X86_ -U_M_IX86 -U__i386__ -U__i486__ -U__i586__ -U__i686__ -DUNICODE -D_WIN32_WCE -DWINCE_STUB='"${target_alias}-stub.exe"'
TM_CLIBS=-lrapi
diff --git a/gdb/config/arm/xm-linux.h b/gdb/config/arm/xm-linux.h
deleted file mode 100644
index fa82a1e8f39..00000000000
--- a/gdb/config/arm/xm-linux.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Host definitions for ARM GNU/Linux, for GDB, the GNU debugger.
- Copyright 1999, 2001 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 XM_ARMLINUX_H
-#define XM_ARMLINUX_H
-
-/* 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
-
-#endif /* XM_ARMLINUX_H */
diff --git a/gdb/config/cris/cris.mt b/gdb/config/cris/cris.mt
index 9304d365960..9f91915978f 100644
--- a/gdb/config/cris/cris.mt
+++ b/gdb/config/cris/cris.mt
@@ -1,2 +1,2 @@
TDEPFILES= cris-tdep.o corelow.o solib.o solib-svr4.o
-TM_FILE= tm-cris.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/cris/tm-cris.h b/gdb/config/cris/tm-cris.h
deleted file mode 100644
index fed260112c3..00000000000
--- a/gdb/config/cris/tm-cris.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define GDB_MULTI_ARCH 1
-#include "solib.h"
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 1d9e3936eee..4337b7261a0 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -15,6 +15,9 @@
@V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
@V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
@V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
+@V@/bfd/elf32-crx.c @V@/bfd/elf32crx.c
+@V@/bfd/elf32-cris.c @V@/bfd/elf32cris.c
+@V@/bfd/elf32-cr16c.c @V@/bfd/elf32cr16c.c
@V@/bfd/elf32-fr30.c @V@/bfd/elf32f30.c
@V@/bfd/elf32-frv.c @V@/bfd/elf32fv.c
@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
@@ -26,6 +29,8 @@
@V@/bfd/elf32-ppc.c @V@/bfd/e32ppc.c
@V@/bfd/elf32-sh.c @V@/bfd/e32sh.c
@V@/bfd/elf32-sh64.c @V@/bfd/e32sh64.c
+@V@/bfd/elf32-sh-symbian.c @V@/bfd/e32sh-symbian.c
+@V@/bfd/elf32-sh64-com.c @V@/bfd/e32sh64-com.c
@V@/bfd/elf64-alpha.c @V@/bfd/e64alphf.c
@V@/bfd/elf64-sh64.c @V@/bfd/e64sh64.c
@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
@@ -83,10 +88,7 @@
@V@/gdb/config/alpha/alpha-osf2.mh @V@/gdb/config/alpha/alphosf2.mh
@V@/gdb/config/alpha/alpha-osf3.mh @V@/gdb/config/alpha/alphosf3.mh
@V@/gdb/config/alpha/tm-alphalinux.h @V@/gdb/config/alpha/tm-alplinux.h
-@V@/gdb/config/alpha/xm-alphalinux.h @V@/gdb/config/alpha/xm-alplinux.h
-@V@/gdb/config/alpha/xm-alphaosf.h @V@/gdb/config/alpha/xm-alposf.h
@V@/gdb/config/i386/nm-linux64.h @V@/gdb/config/i386/nm-lx64.h
-@V@/gdb/config/i386/tm-linux64.h @V@/gdb/config/i386/tm-lx64.h
@V@/gdb/config/i386/nm-i386sco4.h @V@/gdb/config/i386/nm-sco4.h
@V@/gdb/config/i386/nm-i386sco5.h @V@/gdb/config/i386/nm-sco5.h
@V@/gdb/config/i386/nm-i386sol2.h @V@/gdb/config/i386/nm-sol2.h
@@ -97,14 +99,9 @@
@V@/gdb/config/m88k/xm-delta88v4.h @V@/gdb/config/m88k/xm-d88v4.h
@V@/gdb/config/mips/tm-linux.h @V@/gdb/config/mips/tm-lx.h
@V@/gdb/config/pa/nm-hppah11.h @V@/gdb/config/pa/nm-hppa11.h
-@V@/gdb/config/powerpc/tm-ppcle-sim.h @V@/gdb/config/powerpc/tm-ppclsim.h
-@V@/gdb/config/powerpc/tm-ppcle-eabi.h @V@/gdb/config/powerpc/tm-ppcleabi.h
-@V@/gdb/config/rs6000/nm-rs6000ly.h @V@/gdb/config/rs6000/nm-rs6kly.h
@V@/gdb/config/rs6000/tm-rs6000.h @V@/gdb/config/rs6000/tm-rs6k.h
@V@/gdb/config/rs6000/tm-rs6000ly.h @V@/gdb/config/rs6000/tm-rs6kly.h
-@V@/gdb/config/rs6000/tm-rs6000-aix4.h @V@/gdb/config/rs6000/tm-rs6kaix4.h
@V@/gdb/config/sparc/tm-sparclynx.h @V@/gdb/config/sparc/tm-splynx.h
-@V@/gdb/config/vax/xm-vaxult2.h @V@/gdb/config/vax/xm-vaxut2.h
@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
@V@/gdb/gdbtk/ChangeLog-2001 @V@/gdb/gdbtk/ChangeLog.001
@V@/gdb/gdbtk/ChangeLog-2002 @V@/gdb/gdbtk/ChangeLog.002
@@ -120,6 +117,8 @@
@V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
@V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in @V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.t-in
@V@/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in @V@/gdb/gdbtk/plugins/rhabout/rhabout.t-in
+@V@/gdb/hppabsd-nat.c @V@/gdb/hppab-nat.c
+@V@/gdb/hppabsd-tdep.c @V@/gdb/hppab-tdep.c
@V@/gdb/i386-interix-nat.c @V@/gdb/i386ix-nat.c
@V@/gdb/i386-interix-tdep.c @V@/gdb/i386ix-tdep.c
@V@/gdb/i386-linux-tdep.c @V@/gdb/i386lx-tdep.c
@@ -141,6 +140,8 @@
@V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
@V@/gdb/m68klinux-nat.c @V@/gdb/m68kl-nat.c
@V@/gdb/m68klinux-tdep.c @V@/gdb/m68kl-tdep.c
+@V@/gdb/m68kbsd-nat.c @V@/gdb/m68bsd-nat.c
+@V@/gdb/m68kbsd-tdep.c @V@/gdb/m68bsd-tdep.c
@V@/gdb/m68knbsd-nat.c @V@/gdb/m6nbsd-nat.c
@V@/gdb/m68knbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
@V@/gdb/mips-linux-nat.c @V@/gdb/mipslnxnat.c
@@ -156,6 +157,8 @@
@V@/gdb/ppc-linux-nat.c @V@/gdb/ppc-lx-nat.c
@V@/gdb/ppcnbsd-nat.c @V@/gdb/ppcnb-nat.c
@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-tdep.c
+@V@/gdb/ppcobsd-nat.c @V@/gdb/ppcob-nat.c
+@V@/gdb/ppcobsd-tdep.c @V@/gdb/ppcob-tdep.c
@V@/gdb/regformats/reg-i386-linux.dat @V@/gdb/regformats/r-i386-lnx.dat
@V@/gdb/regformats/reg-s390x.dat @V@/gdb/regformats/r-s390x.dat
@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
@@ -188,6 +191,8 @@
@V@/gdb/testsuite/gdb.arch/altivec-abi.exp @V@/gdb/testsuite/gdb.arch/av-abi.exp
@V@/gdb/testsuite/gdb.arch/altivec-regs.c @V@/gdb/testsuite/gdb.arch/av-regs.c
@V@/gdb/testsuite/gdb.arch/altivec-regs.exp @V@/gdb/testsuite/gdb.arch/av-regs.exp
+@V@/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp @V@/gdb/testsuite/gdb.arch/ppcaprol.exp
+@V@/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c @V@/gdb/testsuite/gdb.arch/ppcaprol.c
@V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
@V@/gdb/testsuite/gdb.cp/m-static1.cc @V@/gdb/testsuite/gdb.cp/m-stat1.cc
@V@/gdb/testsuite/gdb.cp/namespace1.cc @V@/gdb/testsuite/gdb.cp/namesp1.cc
@@ -232,6 +237,8 @@
@V@/gdb/testsuite/gdb.mi/mi2-var-display.exp @V@/gdb/testsuite/gdb.mi/mi2vardisplay.exp
@V@/gdb/amd64-linux-tdep.c @V@/gdb/amd64-ltdep.c
@V@/gdb/amd64-linux-nat.c @V@/gdb/amd64-lnat.c
+@V@/gdb/hppa-linux-tdep.c @V@/gdb/palnxtdep.c
+@V@/gdb/hppa-linux-nat.c @V@/gdb/palnxnat.c
@V@/include/ChangeLog-9103 @V@/include/ChangeLog.9103
@V@/include/coff/ChangeLog-9103 @V@/include/coff/ChangeLog.9103
@V@/include/elf/ChangeLog-9103 @V@/include/elf/ChangeLog.9103
@@ -328,6 +335,7 @@
@V@/sim/testsuite/sim/arm/misaligned1.ms @V@/sim/testsuite/sim/arm/mis1.ms
@V@/sim/testsuite/sim/arm/misaligned2.ms @V@/sim/testsuite/sim/arm/mis2.ms
@V@/sim/testsuite/sim/arm/misaligned3.ms @V@/sim/testsuite/sim/arm/mis3.ms
+@V@/sim/testsuite/sim/mips/fpu64-ps-sb1.s @V@/sim/testsuite/sim/mips/fpu64ps-sb1.s
@V@/sim/testsuite/sim/frv/interrupts/Ipipe-fr400.cgs @V@/sim/testsuite/sim/frv/interrupts/Ip-fr400.cgs
@V@/sim/testsuite/sim/frv/interrupts/Ipipe-fr500.cgs @V@/sim/testsuite/sim/frv/interrupts/Ip-fr500.cgs
@V@/sim/testsuite/sim/frv/interrupts/badalign-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-badalign.cgs
@@ -335,6 +343,9 @@
@V@/sim/testsuite/sim/frv/interrupts/data_store_error-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-data_store_error.cgs
@V@/sim/testsuite/sim/frv/interrupts/fp_exception-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-fp_exception.cgs
@V@/sim/testsuite/sim/frv/interrupts/insn_access_error-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-insn_access_error.cgs
+@V@/sim/testsuite/sim/mips/hilo-hazard-1.s @V@/sim/testsuite/sim/mips/hilo-hz-1.s
+@V@/sim/testsuite/sim/mips/hilo-hazard-2.s @V@/sim/testsuite/sim/mips/hilo-hz-2.s
+@V@/sim/testsuite/sim/mips/hilo-hazard-3.s @V@/sim/testsuite/sim/mips/hilo-hz-3.s
@V@/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs @V@/sim/testsuite/sim/sh64/compact/mach-ldsl.cgs
@V@/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs @V@/sim/testsuite/sim/sh64/compact/macl-ldsl.cgs
@V@/sim/testsuite/sim/sh64/compact/stsl-mach.cgs @V@/sim/testsuite/sim/sh64/compact/mach-stsl.cgs
diff --git a/gdb/config/frv/frv.mt b/gdb/config/frv/frv.mt
index 5849f0413c3..3ce89837bc4 100644
--- a/gdb/config/frv/frv.mt
+++ b/gdb/config/frv/frv.mt
@@ -1,5 +1,5 @@
# Target: Fujitsu FRV processor
TDEPFILES= frv-tdep.o frv-linux-tdep.o solib.o solib-frv.o
-TM_FILE= tm-frv.h
+DEPRECATED_TM_FILE= tm-frv.h
SIM_OBS = remote-sim.o
SIM = ../sim/frv/libsim.a
diff --git a/gdb/config/frv/tm-frv.h b/gdb/config/frv/tm-frv.h
index 1215c582b74..b8f677df2fc 100644
--- a/gdb/config/frv/tm-frv.h
+++ b/gdb/config/frv/tm-frv.h
@@ -20,11 +20,6 @@
/* This target uses an architecture vector for most architecture methods. */
-#define TARGET_HW_BREAK_LIMIT 4
-#define TARGET_HW_WATCH_LIMIT 4
-
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
frv_check_watch_resources (type, cnt, ot)
extern int frv_check_watch_resources (int type, int cnt, int ot);
diff --git a/gdb/config/h8300/h8300.mt b/gdb/config/h8300/h8300.mt
index c6e25ab8ced..4d27efcd2f5 100644
--- a/gdb/config/h8300/h8300.mt
+++ b/gdb/config/h8300/h8300.mt
@@ -1,6 +1,6 @@
# Target: H8300 with HMS monitor, E7000 ICE and H8 simulator
TDEPFILES= h8300-tdep.o remote-e7000.o ser-e7kpc.o monitor.o remote-hms.o dsrec.o
-TM_FILE= tm-h8300.h
+DEPRECATED_TM_FILE= tm-h8300.h
SIM_OBS = remote-sim.o
SIM = ../sim/h8300/libsim.a
diff --git a/gdb/config/i386/cygwin.mt b/gdb/config/i386/cygwin.mt
index 6c16345e5cf..745b13a3dd8 100644
--- a/gdb/config/i386/cygwin.mt
+++ b/gdb/config/i386/cygwin.mt
@@ -1,6 +1,6 @@
# Target: Intel 386 run win32
TDEPFILES= i386-tdep.o i386-cygwin-tdep.o i387-tdep.o
-TM_FILE= tm-cygwin.h
+DEPRECATED_TM_FILE= tm-cygwin.h
diff --git a/gdb/config/i386/embed.mt b/gdb/config/i386/embed.mt
deleted file mode 100644
index 6925a83501d..00000000000
--- a/gdb/config/i386/embed.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Embedded Intel 386
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/fbsd.mh b/gdb/config/i386/fbsd.mh
index 2d0500e565d..6f539f79eee 100644
--- a/gdb/config/i386/fbsd.mh
+++ b/gdb/config/i386/fbsd.mh
@@ -1,5 +1,7 @@
# Host: FreeBSD/i386
NATDEPFILES= fork-child.o infptrace.o inftarg.o \
- i386-nat.o i386bsd-nat.o i386fbsd-nat.o gcore.o fbsd-proc.o
+ i386-nat.o i386bsd-nat.o i386fbsd-nat.o \
+ gcore.o fbsd-proc.o bsd-kvm.o
NAT_FILE= nm-fbsd.h
-XM_FILE= xm-i386.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/i386/fbsd.mt b/gdb/config/i386/fbsd.mt
index be095e987a8..1a69e7fcd1b 100644
--- a/gdb/config/i386/fbsd.mt
+++ b/gdb/config/i386/fbsd.mt
@@ -1,4 +1,4 @@
# Target: FreeBSD/i386
TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-fbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/fbsd64.mh b/gdb/config/i386/fbsd64.mh
index 6c30e3072df..d2dae259d68 100644
--- a/gdb/config/i386/fbsd64.mh
+++ b/gdb/config/i386/fbsd64.mh
@@ -1,5 +1,7 @@
# Host: FreeBSD/amd64
NATDEPFILES= fork-child.o infptrace.o inftarg.o \
- amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o gcore.o fbsd-proc.o
+ amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o \
+ gcore.o fbsd-proc.o bsd-kvm.o
NAT_FILE= nm-fbsd64.h
-XM_FILE= xm-i386.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/i386/fbsd64.mt b/gdb/config/i386/fbsd64.mt
index d4cb24b76b8..07fbf5a6b7a 100644
--- a/gdb/config/i386/fbsd64.mt
+++ b/gdb/config/i386/fbsd64.mt
@@ -2,4 +2,5 @@
TDEPFILES= amd64-tdep.o amd64fbsd-tdep.o \
i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-fbsd.h
+DEPRECATED_TM_FILE= solib.h
+
diff --git a/gdb/config/i386/go32.mt b/gdb/config/i386/go32.mt
deleted file mode 100644
index 9b82c6426b4..00000000000
--- a/gdb/config/i386/go32.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running DJGPP
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-go32.h
diff --git a/gdb/config/i386/i386.mt b/gdb/config/i386/i386.mt
new file mode 100644
index 00000000000..d2eab6d1e58
--- /dev/null
+++ b/gdb/config/i386/i386.mt
@@ -0,0 +1,2 @@
+# Target: i386
+TDEPFILES= i386-tdep.o i387-tdep.o
diff --git a/gdb/config/i386/i386aout.mt b/gdb/config/i386/i386aout.mt
deleted file mode 100644
index 2a33369b462..00000000000
--- a/gdb/config/i386/i386aout.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 with a.out
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386gnu.mh b/gdb/config/i386/i386gnu.mh
index c2eb7af96ea..35b3947bff6 100644
--- a/gdb/config/i386/i386gnu.mh
+++ b/gdb/config/i386/i386gnu.mh
@@ -4,7 +4,6 @@ NATDEPFILES= i386gnu-nat.o gnu-nat.o corelow.o core-regset.o \
notify_S.o process_reply_S.o msg_reply_S.o \
msg_U.o exc_request_U.o exc_request_S.o
-XM_FILE= xm-i386.h
NAT_FILE= nm-i386gnu.h
MH_CFLAGS = -D_GNU_SOURCE
diff --git a/gdb/config/i386/i386gnu.mt b/gdb/config/i386/i386gnu.mt
index 2029e99bbfc..220b64ab310 100644
--- a/gdb/config/i386/i386gnu.mt
+++ b/gdb/config/i386/i386gnu.mt
@@ -1,3 +1,2 @@
# Target: Intel 386 running the GNU Hurd
TDEPFILES= i386-tdep.o i387-tdep.o i386gnu-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386lynx.mh b/gdb/config/i386/i386lynx.mh
index edfb1b0752b..2565057a5d7 100644
--- a/gdb/config/i386/i386lynx.mh
+++ b/gdb/config/i386/i386lynx.mh
@@ -2,5 +2,5 @@
XM_CLIBS= -lbsd
-NAT_FILE= nm-i386lynx.h
+NAT_FILE= config/nm-lynx.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
diff --git a/gdb/config/i386/i386lynx.mt b/gdb/config/i386/i386lynx.mt
index 6704b43e5b9..fe56c72b1fe 100644
--- a/gdb/config/i386/i386lynx.mt
+++ b/gdb/config/i386/i386lynx.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running LynxOS
TDEPFILES= coff-solib.o i386-tdep.o i386ly-tdep.o
-TM_FILE= tm-i386lynx.h
+DEPRECATED_TM_FILE= config/tm-lynx.h
diff --git a/gdb/config/i386/i386nw.mt b/gdb/config/i386/i386nw.mt
deleted file mode 100644
index 9eafe7dcfd7..00000000000
--- a/gdb/config/i386/i386nw.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running NetWare
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386sco.mh b/gdb/config/i386/i386sco.mh
index d03994486d0..d715439531b 100644
--- a/gdb/config/i386/i386sco.mh
+++ b/gdb/config/i386/i386sco.mh
@@ -1,12 +1,4 @@
# Host: Intel 386 running SCO Unix (pre-SVR4)
-XM_FILE= xm-i386sco.h
-XM_CLIBS= -lPW
-
NAT_FILE= nm-i386sco.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
-
-#msg The SCO C compiler cannot parse symtab.h when value.h has been included.
-#msg This is a bug in the compiler; the code is valid.
-#msg Therefore, you must use GCC to compile GDB on SCO machines.
-CC=gcc -D_POSIX_SOURCE=1
diff --git a/gdb/config/i386/i386sco4.mh b/gdb/config/i386/i386sco4.mh
index 2507e07ec28..219724820df 100644
--- a/gdb/config/i386/i386sco4.mh
+++ b/gdb/config/i386/i386sco4.mh
@@ -1,11 +1,4 @@
# Host: Intel 386 running SCO Unix 3.2v4
-XM_FILE= xm-i386sco.h
-XM_CLIBS= -lPW
-
NAT_FILE= nm-i386sco4.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
-
-# The cc compiler mishandles const in cases like
-# struct type ** const (c_builtin_types[]) =
-MH_CFLAGS=-Dconst=
diff --git a/gdb/config/i386/i386sco5.mh b/gdb/config/i386/i386sco5.mh
index 7b8b8274250..1c3be9a758b 100644
--- a/gdb/config/i386/i386sco5.mh
+++ b/gdb/config/i386/i386sco5.mh
@@ -1,15 +1,6 @@
# Host: Intel 386 running SCO OpenServer 5
# Much like 3.2v4, except we don't have to avoid problems with const
-XM_FILE= xm-i386sco.h
-
-#
-# Not all configurations of SCO OpenServer 5 come with the TCP/IP
-# runtime, but all come with the development system, so we always
-# have socket(), gethostbyname(), and friends.
-#
-XM_CLIBS= -lPW -lsocket
-
NAT_FILE= nm-i386sco5.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corefile.o core-aout.o \
corelow.o i386v-nat.o solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/i386/i386sol2.mh b/gdb/config/i386/i386sol2.mh
index 1245ca7a4bd..c0477cfc55f 100644
--- a/gdb/config/i386/i386sol2.mh
+++ b/gdb/config/i386/i386sol2.mh
@@ -1,8 +1,4 @@
-# Host: Intel 386 running Solaris 2 (SVR4)
-
-XM_FILE= xm-i386.h
-
-NAT_FILE= nm-i386sol2.h
+# Host: Solaris x86
NATDEPFILES= fork-child.o i386v4-nat.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o \
- solib.o solib-svr4.o solib-legacy.o
+ procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o
+NAT_FILE= nm-i386sol2.h
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index 863f61500d7..800ecbab322 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -1,3 +1,4 @@
-# Target: Intel 386 running Solaris 2 (SVR4)
-TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o corelow.o
-TM_FILE= tm-i386sol2.h
+# Target: Solaris x86
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o \
+ corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= tm-i386sol2.h
diff --git a/gdb/config/i386/i386v.mh b/gdb/config/i386/i386v.mh
index 7f0ea6eae72..b1373a7d0be 100644
--- a/gdb/config/i386/i386v.mh
+++ b/gdb/config/i386/i386v.mh
@@ -1,7 +1,4 @@
# Host: Intel 386 running System V
-XM_FILE= xm-i386v.h
-XM_CLIBS= -lPW
-
NAT_FILE= nm-i386v.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
diff --git a/gdb/config/i386/i386v.mt b/gdb/config/i386/i386v.mt
deleted file mode 100644
index 1ee53057979..00000000000
--- a/gdb/config/i386/i386v.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running System V
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386v4.mh b/gdb/config/i386/i386v4.mh
index a3952bc6213..a30c3bc1ad3 100644
--- a/gdb/config/i386/i386v4.mh
+++ b/gdb/config/i386/i386v4.mh
@@ -1,9 +1,5 @@
# Host: Intel 386 running SVR4
-XM_FILE= xm-i386v4.h
-# for network communication
-XM_CLIBS= -lsocket -lnsl
-
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o \
solib.o solib-svr4.o solib-legacy.o \
diff --git a/gdb/config/i386/i386v42mp.mh b/gdb/config/i386/i386v42mp.mh
index 4aac5d97b84..3aadf4e565e 100644
--- a/gdb/config/i386/i386v42mp.mh
+++ b/gdb/config/i386/i386v42mp.mh
@@ -1,9 +1,5 @@
# Host: Intel 386 running SVR4
-XM_FILE= xm-i386v4.h
-# for network communication
-XM_CLIBS= -lsocket -lnsl
-
# we don't want nm-i386v4.h since that defines LOSING_POLL which isn't
# appropriate for i386v42mp
NAT_FILE= nm-i386v42mp.h
diff --git a/gdb/config/i386/interix.mh b/gdb/config/i386/interix.mh
deleted file mode 100644
index c294dd5e808..00000000000
--- a/gdb/config/i386/interix.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: Intel 386 running Interix
-XDEPFILES=
-NATDEPFILES= corelow.o core-regset.o fork-child.o i386-interix-nat.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
-NAT_FILE= nm-interix.h
-XM_FILE= xm-interix.h
diff --git a/gdb/config/i386/interix.mt b/gdb/config/i386/interix.mt
deleted file mode 100644
index 8d609624757..00000000000
--- a/gdb/config/i386/interix.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running Interix
-TDEPFILES= i386-tdep.o i387-tdep.o i386-interix-tdep.o solib.o solib-pei.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/linux.mh b/gdb/config/i386/linux.mh
index 2a20cdd9749..3714e0c2787 100644
--- a/gdb/config/i386/linux.mh
+++ b/gdb/config/i386/linux.mh
@@ -1,7 +1,5 @@
# Host: Intel 386 running GNU/Linux.
-XM_FILE= xm-i386.h
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \
core-aout.o i386-nat.o i386-linux-nat.o \
diff --git a/gdb/config/i386/linux.mt b/gdb/config/i386/linux.mt
index 9e068a47055..3fce56ae07f 100644
--- a/gdb/config/i386/linux.mt
+++ b/gdb/config/i386/linux.mt
@@ -1,4 +1,4 @@
# Target: Intel 386 running GNU/Linux
TDEPFILES= i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \
- solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+ solib.o solib-svr4.o symfile-mem.o
+DEPRECATED_TM_FILE= tm-linux.h
diff --git a/gdb/config/i386/linux64.mh b/gdb/config/i386/linux64.mh
index c02e864a347..1622f18c7c2 100644
--- a/gdb/config/i386/linux64.mh
+++ b/gdb/config/i386/linux64.mh
@@ -3,7 +3,6 @@ NATDEPFILES= infptrace.o inftarg.o fork-child.o \
i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o
NAT_FILE= nm-linux64.h
-XM_FILE= xm-i386.h
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
diff --git a/gdb/config/i386/linux64.mt b/gdb/config/i386/linux64.mt
index f642e317a55..5a4aca12b7a 100644
--- a/gdb/config/i386/linux64.mt
+++ b/gdb/config/i386/linux64.mt
@@ -1,5 +1,5 @@
# Target: GNU/Linux x86-64
TDEPFILES= amd64-tdep.o amd64-linux-tdep.o \
i386-tdep.o i387-tdep.o i386-linux-tdep.o glibc-tdep.o \
- solib.o solib-svr4.o solib-legacy.o corelow.o
-TM_FILE=tm-linux64.h
+ solib.o solib-svr4.o corelow.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/nbsd.mt b/gdb/config/i386/nbsd.mt
index d6699b54ec2..583ef67a07c 100644
--- a/gdb/config/i386/nbsd.mt
+++ b/gdb/config/i386/nbsd.mt
@@ -1,4 +1,4 @@
# Target: NetBSD/i386
TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/nbsd64.mh b/gdb/config/i386/nbsd64.mh
index e10ae7a2be4..32f82a2af1f 100644
--- a/gdb/config/i386/nbsd64.mh
+++ b/gdb/config/i386/nbsd64.mh
@@ -1,5 +1,4 @@
# Host: NetBSD/amd64
NATDEPFILES= fork-child.o infptrace.o inftarg.o \
amd64-nat.o amd64bsd-nat.o amd64nbsd-nat.o
-NAT_FILE= nm-nbsd.h
-XM_FILE= xm-i386.h
+NAT_FILE= config/nm-nbsd.h
diff --git a/gdb/config/i386/nbsd64.mt b/gdb/config/i386/nbsd64.mt
index 3c982116a4c..f33d659b4e6 100644
--- a/gdb/config/i386/nbsd64.mt
+++ b/gdb/config/i386/nbsd64.mt
@@ -1,4 +1,4 @@
# Target: NetBSD/amd64
TDEPFILES= amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/nbsdaout.mh b/gdb/config/i386/nbsdaout.mh
index 98e69c4c97b..d9b94f0d263 100644
--- a/gdb/config/i386/nbsdaout.mh
+++ b/gdb/config/i386/nbsdaout.mh
@@ -2,4 +2,3 @@
NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o \
solib.o solib-sunos.o
NAT_FILE= nm-nbsdaout.h
-XM_FILE= xm-nbsd.h
diff --git a/gdb/config/i386/nbsdelf.mh b/gdb/config/i386/nbsdelf.mh
index 0d313ddac82..4f9a6fdef88 100644
--- a/gdb/config/i386/nbsdelf.mh
+++ b/gdb/config/i386/nbsdelf.mh
@@ -1,4 +1,6 @@
# Host: NetBSD/i386 ELF
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o
-NAT_FILE= nm-nbsd.h
-XM_FILE= xm-nbsd.h
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o
+NAT_FILE= config/nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/i386/ncr3000.mh b/gdb/config/i386/ncr3000.mh
index 4e669ba4ad6..a2d8588c212 100644
--- a/gdb/config/i386/ncr3000.mh
+++ b/gdb/config/i386/ncr3000.mh
@@ -1,16 +1,5 @@
# Host: NCR 3000 (Intel 386 running SVR4)
-# The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
-# This compiler not only emits obnoxious copyright messages every time
-# you run it, but it chokes and dies on a whole bunch of GNU source
-# files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
-# Unfortunately though, the AT&T compiler sometimes generates code that
-# the assembler barfs on if -g is used, so disable it by default as well.
-CC = /usr/ccs/ATT/cc
-CFLAGS =
-
-XM_FILE= xm-i386v4.h
-
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/i386/ncr3000.mt b/gdb/config/i386/ncr3000.mt
index 4773daec1b6..20a072832f0 100644
--- a/gdb/config/i386/ncr3000.mt
+++ b/gdb/config/i386/ncr3000.mt
@@ -1,3 +1,2 @@
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h
index 88eacc8852b..2692cae1995 100644
--- a/gdb/config/i386/nm-i386.h
+++ b/gdb/config/i386/nm-i386.h
@@ -26,10 +26,6 @@
/* Targets should define this to use the generic x86 watchpoint support. */
#ifdef I386_USE_GENERIC_WATCHPOINTS
-#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-#endif
-
/* Clear the reference counts and forget everything we knew about DRi. */
extern void i386_cleanup_dregs (void);
diff --git a/gdb/config/i386/nm-i386gnu.h b/gdb/config/i386/nm-i386gnu.h
index 4fef763ca16..1f3cdb5ae01 100644
--- a/gdb/config/i386/nm-i386gnu.h
+++ b/gdb/config/i386/nm-i386gnu.h
@@ -32,7 +32,4 @@
#define THREAD_STATE_CLEAR_TRACED(state) \
((((struct i386_thread_state *) (state))->efl &= ~0x100), 1)
-/* We can attach and detach. */
-#define ATTACH_DETACH 1
-
#endif /* nm-i386gnu.h */
diff --git a/gdb/config/i386/nm-i386sco4.h b/gdb/config/i386/nm-i386sco4.h
index 6947f3febb1..39d7d50a1a8 100644
--- a/gdb/config/i386/nm-i386sco4.h
+++ b/gdb/config/i386/nm-i386sco4.h
@@ -25,8 +25,6 @@
#include "i386/nm-i386sco.h"
-#define ATTACH_DETACH
-
/* SCO, in its wisdom, does not provide <sys/ptrace.h>. infptrace.c
does not have defaults for these values. */
#define PTRACE_ATTACH 10
diff --git a/gdb/config/i386/nm-i386sco5.h b/gdb/config/i386/nm-i386sco5.h
index 65f317621e6..aa9a910c87e 100644
--- a/gdb/config/i386/nm-i386sco5.h
+++ b/gdb/config/i386/nm-i386sco5.h
@@ -29,7 +29,6 @@
#include "i386/nm-i386sco.h"
/* ... but it can do a lot of SVR4 type stuff too. */
-#define SVR4_SHARED_LIBS
#include "solib.h" /* Pick up shared library support. */
/* SCO is unlike other SVR4 systems in that it has SVR4 style shared
@@ -51,9 +50,6 @@
#define KERNEL_U_SIZE kernel_u_size ()
extern int kernel_u_size (void);
-/* We can attach and detach. */
-#define ATTACH_DETACH
-
/* Hardware-assisted breakpoints and watchpoints. */
/* We can also do hardware watchpoints. */
diff --git a/gdb/config/i386/nm-i386v.h b/gdb/config/i386/nm-i386v.h
index f94c5bb8b35..2d4eb602206 100644
--- a/gdb/config/i386/nm-i386v.h
+++ b/gdb/config/i386/nm-i386v.h
@@ -32,7 +32,10 @@
#define REGISTER_U_ADDR(addr, blockend, regnum) \
(addr) = register_u_addr ((blockend), (regnum))
extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regnum);
-
+
+/* 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 0xe0000000
/* 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
diff --git a/gdb/config/i386/nm-i386v4.h b/gdb/config/i386/nm-i386v4.h
index 356d3cba0ca..821be55fc55 100644
--- a/gdb/config/i386/nm-i386v4.h
+++ b/gdb/config/i386/nm-i386v4.h
@@ -22,5 +22,6 @@
#include "config/nm-sysv4.h"
-/* Poll causes GDB to hang, at least under Unixware 1.1.2. */
-#define LOSING_POLL
+/* 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 0xe0000000
diff --git a/gdb/config/i386/nm-i386v42mp.h b/gdb/config/i386/nm-i386v42mp.h
index f6fced506e8..5b5c7f0308d 100644
--- a/gdb/config/i386/nm-i386v42mp.h
+++ b/gdb/config/i386/nm-i386v42mp.h
@@ -89,4 +89,8 @@
/* Return whether PID contains a user-space thread id. */
#define ISTID(PID) (ptid_get_tid (PID))
+/* 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 0xe0000000
+
#endif /* NM_I386V42MP_H */
diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h
index 1764758f3b9..dacbc81060d 100644
--- a/gdb/config/i386/nm-linux64.h
+++ b/gdb/config/i386/nm-linux64.h
@@ -52,12 +52,6 @@ extern unsigned long amd64_linux_dr_get_status (void);
amd64_linux_dr_get_status ()
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE long
-
-/* 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
diff --git a/gdb/config/i386/nm-nbsdaout.h b/gdb/config/i386/nm-nbsdaout.h
index 375a6a02d95..81866ff64ab 100644
--- a/gdb/config/i386/nm-nbsdaout.h
+++ b/gdb/config/i386/nm-nbsdaout.h
@@ -23,7 +23,7 @@
#ifndef NM_NBSDAOUT_H
#define NM_NBSDAOUT_H
-#include "i386/nm-nbsd.h"
+#include "config/nm-nbsd.h"
/* Get generic NetBSD a.out native definitions. */
#include "config/nm-nbsdaout.h"
diff --git a/gdb/config/i386/nm-nto.h b/gdb/config/i386/nm-nto.h
deleted file mode 100644
index 34d99033e70..00000000000
--- a/gdb/config/i386/nm-nto.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _NM_NTO_H
-#define _NM_NTO_H
-
-/* This file needed to build a native debugger. */
-
-#endif
diff --git a/gdb/config/i386/nto.mh b/gdb/config/i386/nto.mh
index f412579334d..3ec780eb6bd 100644
--- a/gdb/config/i386/nto.mh
+++ b/gdb/config/i386/nto.mh
@@ -1,7 +1,3 @@
# Host: Intel 386 running QNX.
-NAT_FILE= nm-nto.h
-
NATDEPFILES= nto-procfs.o
-
-XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/nto.mt b/gdb/config/i386/nto.mt
index 6655f3eee74..e9d14313c28 100644
--- a/gdb/config/i386/nto.mt
+++ b/gdb/config/i386/nto.mt
@@ -1,4 +1,4 @@
# Target: Intel 386 running qnx6.
TDEPFILES = i386-tdep.o i387-tdep.o corelow.o solib.o solib-svr4.o \
i386-nto-tdep.o nto-tdep.o remote-nto.o
-TM_FILE = tm-nto.h
+DEPRECATED_TM_FILE = tm-nto.h
diff --git a/gdb/config/i386/obsd.mh b/gdb/config/i386/obsd.mh
index 50a4fb71062..5e5781c7aaf 100644
--- a/gdb/config/i386/obsd.mh
+++ b/gdb/config/i386/obsd.mh
@@ -1,4 +1,7 @@
# Host: OpenBSD/i386 ELF
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ i386bsd-nat.o i386obsd-nat.o i386nbsd-nat.o bsd-kvm.o
NAT_FILE= nm-obsd.h
-XM_FILE= xm-i386.h
+
+LOADLIBES= -lkvm
+
diff --git a/gdb/config/i386/obsd.mt b/gdb/config/i386/obsd.mt
index 58e0fc0ebc8..b90fbf38c03 100644
--- a/gdb/config/i386/obsd.mt
+++ b/gdb/config/i386/obsd.mt
@@ -1,4 +1,4 @@
# Target: OpenBSD/i386
TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/obsd64.mh b/gdb/config/i386/obsd64.mh
index 99ccfa2023f..14d341c5a07 100644
--- a/gdb/config/i386/obsd64.mh
+++ b/gdb/config/i386/obsd64.mh
@@ -1,5 +1,6 @@
# Host: OpenBSD/amd64
NATDEPFILES= fork-child.o infptrace.o inftarg.o \
- amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o
-NAT_FILE= nm-nbsd.h
-XM_FILE= xm-i386.h
+ amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o bsd-kvm.o
+NAT_FILE= config/nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/i386/obsd64.mt b/gdb/config/i386/obsd64.mt
index 16be0798e7f..4b1d144e1d6 100644
--- a/gdb/config/i386/obsd64.mt
+++ b/gdb/config/i386/obsd64.mt
@@ -1,5 +1,5 @@
# Target: OpenBSD/amd64
TDEPFILES= amd64-tdep.o amd64obsd-tdep.o \
- i386-tdep.o i387-tdep.o i386bsd-tdep.o \
+ i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/i386/obsdaout.mh b/gdb/config/i386/obsdaout.mh
index 3577178946a..7b6850f6ef7 100644
--- a/gdb/config/i386/obsdaout.mh
+++ b/gdb/config/i386/obsdaout.mh
@@ -2,4 +2,3 @@
NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o \
solib.o solib-sunos.o
NAT_FILE= nm-obsd.h
-XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index e7b49de558d..52ec2751261 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -1,6 +1,7 @@
/* Macro definitions for i386 running under the win32 API Unix.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -19,8 +20,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "i386/tm-i386.h"
-
#define ATTACH_NO_WAIT
#define SOLIB_ADD(filename, from_tty, targ, readsyms) child_solib_add(filename, from_tty, targ, readsyms)
#define PC_SOLIB(addr) solib_address (addr)
diff --git a/gdb/config/i386/tm-go32.h b/gdb/config/i386/tm-go32.h
deleted file mode 100644
index 85e0888ef80..00000000000
--- a/gdb/config/i386/tm-go32.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Target-dependent definitions for Intel x86 running DJGPP.
- Copyright 1995, 1996, 1997, 1999, 2000 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 TM_GO32_H
-#define TM_GO32_H
-
-#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
-
-#include "i386/tm-i386.h"
-
-#endif /* TM_GO32_H */
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
deleted file mode 100644
index e2bd81fdaa8..00000000000
--- a/gdb/config/i386/tm-i386.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Macro definitions for GDB on an Intel i[345]86.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
- 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 TM_I386_H
-#define TM_I386_H 1
-
-#endif /* ifndef TM_I386_H */
diff --git a/gdb/config/i386/tm-i386lynx.h b/gdb/config/i386/tm-i386lynx.h
deleted file mode 100644
index 03fe4ff8bf7..00000000000
--- a/gdb/config/i386/tm-i386lynx.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Macro definitions for Intel 386 running under LynxOS.
- Copyright 1993, 1995, 2002 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 TM_I386LYNX_H
-#define TM_I386LYNX_H
-
-#include "config/tm-lynx.h"
-
-/* Most definitions from sysv could be used. */
-#include "i386/tm-i386.h"
-
-#endif /* TM_I386LYNX_H */
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 921df26dc07..3dfbbbbb85d 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -1,5 +1,6 @@
/* Macro definitions for GDB on an Intel i386 running Solaris 2.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,7 +22,7 @@
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
-#include "i386/tm-i386.h"
+#include "solib.h"
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
@@ -31,4 +32,4 @@ extern char *sunpro_static_transform_name (char *);
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '.')
-#endif /* ifndef TM_I386SOL2_H */
+#endif /* tm-i386sol2.h */
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 83440a8722f..1c8bbafdd05 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -1,7 +1,7 @@
/* Definitions to target GDB to GNU/Linux on 386.
- Copyright 1992, 1993, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free
- Software Foundation, Inc.
+ Copyright 1992, 1993, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,7 +23,6 @@
#ifndef TM_LINUX_H
#define TM_LINUX_H
-#include "i386/tm-i386.h"
#include "config/tm-linux.h"
/* The following works around a problem with /usr/include/sys/procfs.h */
diff --git a/gdb/config/i386/tm-nbsd.h b/gdb/config/i386/tm-nbsd.h
deleted file mode 100644
index 8fd41580765..00000000000
--- a/gdb/config/i386/tm-nbsd.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Target-dependent definitions for NetBSD/i386.
-
- Copyright 1994, 1996, 2000, 2002, 2004 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 TM_NBSD_H
-#define TM_NBSD_H
-
-#include "solib.h"
-
-#endif /* tm-nbsd.h */
diff --git a/gdb/config/i386/tm-nto.h b/gdb/config/i386/tm-nto.h
index ff5eb7837e0..670acc8d926 100644
--- a/gdb/config/i386/tm-nto.h
+++ b/gdb/config/i386/tm-nto.h
@@ -1,6 +1,6 @@
/* QNX Neutrino target header.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This code was donated by QNX Software Systems Ltd.
@@ -24,9 +24,7 @@
#ifndef TM_NTO_H
#define TM_NTO_H 1
-/* Pick up most of what we need from the generic i386 target include file. */
-#include "i386/tm-i386.h"
-#include "tm-nto.h"
+#include "config/tm-nto.h"
#include "solib.h"
diff --git a/gdb/config/i386/tm-vxworks.h b/gdb/config/i386/tm-vxworks.h
deleted file mode 100644
index f9b6be453cb..00000000000
--- a/gdb/config/i386/tm-vxworks.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Target machine description for VxWorks on the 80[3456]86,
- for GDB, the GNU debugger.
- Copyright 1999 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_VXWORKS_H
-#define TM_VXWORKS_H
-
-#include "i386/tm-i386.h"
-#include "config/tm-vxworks.h"
-
-#endif /* ifndef TM_VXWORKS_H */
diff --git a/gdb/config/i386/vxworks.mt b/gdb/config/i386/vxworks.mt
index a14aacc8cd0..7994afe81fa 100644
--- a/gdb/config/i386/vxworks.mt
+++ b/gdb/config/i386/vxworks.mt
@@ -1,3 +1,3 @@
# Target: i386 running VxWorks
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-vxworks.h
+DEPRECATED_TM_FILE= config/tm-vxworks.h
diff --git a/gdb/config/i386/xm-go32.h b/gdb/config/i386/xm-go32.h
index dead9f69e42..3b6b3b02b86 100644
--- a/gdb/config/i386/xm-go32.h
+++ b/gdb/config/i386/xm-go32.h
@@ -18,7 +18,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "i386/xm-i386.h"
#include "fopen-bin.h"
#define GDBINIT_FILENAME "gdb.ini"
diff --git a/gdb/config/i386/xm-i386sco.h b/gdb/config/i386/xm-i386sco.h
deleted file mode 100644
index 18b64bf4207..00000000000
--- a/gdb/config/i386/xm-i386sco.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Macro defintions for i386, running SCO Unix System V/386 3.2.
- Copyright 1989, 1993, 1995 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. */
-
-/* In 3.2v4 <sys/user.h> requires on <sys/dir.h>. */
-#include <sys/types.h>
-#include <sys/dir.h>
-
-#include "i386/xm-i386v.h"
-
-/* SCO 3.2v2 and later have job control. */
-/* SCO 3.2v4 I know has termios; I'm not sure about earlier versions.
- GDB does not currently support the termio/job control combination. */
-#undef HAVE_TERMIO
-#define HAVE_TERMIOS
diff --git a/gdb/config/i386/xm-i386v.h b/gdb/config/i386/xm-i386v.h
deleted file mode 100644
index 1c329054f22..00000000000
--- a/gdb/config/i386/xm-i386v.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Host support for i386.
- Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
- Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
-
- This file is part of GDB.
-
- This 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. */
-
-/* I'm running gdb 3.4 under 386/ix 2.0.2, which is a derivative of AT&T's
- Sys V/386 3.2.
-
- On some machines, gdb crashes when it's starting up while calling the
- vendor's termio tgetent() routine. It always works when run under
- itself (actually, under 3.2, it's not an infinitely recursive bug.)
- After some poking around, it appears that depending on the environment
- size, or whether you're running YP, or the phase of the moon or something,
- the stack is not always long-aligned when main() is called, and tgetent()
- takes strong offense at that. On some machines this bug never appears, but
- on those where it does, it occurs quite reliably. */
-#define ALIGN_STACK_ON_STARTUP
-
-/* define USG if you are using sys5 /usr/include's */
-#define USG
-
-#define HAVE_TERMIO
-
-/* 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 0xe0000000
diff --git a/gdb/config/i386/xm-i386v4.h b/gdb/config/i386/xm-i386v4.h
deleted file mode 100644
index 154986c1880..00000000000
--- a/gdb/config/i386/xm-i386v4.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Macro definitions for GDB on an Intel i386 running SVR4.
- Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
-
- 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. */
-
-/* Pick up most of what we need from the generic i386 host include file. */
-
-#include "i386/xm-i386v.h"
-
-/* Pick up more stuff from the generic SVR4 host include file. */
-
-#include "config/xm-sysv4.h"
diff --git a/gdb/config/i386/xm-nbsd.h b/gdb/config/i386/xm-nbsd.h
deleted file mode 100644
index 703c261ebe8..00000000000
--- a/gdb/config/i386/xm-nbsd.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Host-dependent definitions for NetBSD/i386.
-
- Copyright 1994, 2000, 2004 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 "i386/xm-i386.h"
-
-/* Get generic NetBSD host definitions. */
-#include "config/xm-nbsd.h"
diff --git a/gdb/config/ia64/aix.mh b/gdb/config/ia64/aix.mh
index e1805946970..748c91fddbb 100644
--- a/gdb/config/ia64/aix.mh
+++ b/gdb/config/ia64/aix.mh
@@ -1,7 +1,5 @@
# Host: Intel IA-64 running AIX
-XM_FILE= xm-aix.h
-
NAT_FILE= nm-aix.h
NATDEPFILES= corelow.o core-regset.o solib.o solib-aix5.o fork-child.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
diff --git a/gdb/config/ia64/aix.mt b/gdb/config/ia64/aix.mt
index 0348146c3f5..658bee37d5b 100644
--- a/gdb/config/ia64/aix.mt
+++ b/gdb/config/ia64/aix.mt
@@ -1,4 +1,4 @@
# Target: Intel IA-64 running AIX
TDEPFILES= ia64-tdep.o ia64-linux-tdep.o ia64-aix-tdep.o
-TM_FILE= tm-aix.h
+DEPRECATED_TM_FILE= tm-aix.h
diff --git a/gdb/config/ia64/ia64.mt b/gdb/config/ia64/ia64.mt
index c0f85a4c285..2f9237a1d55 100644
--- a/gdb/config/ia64/ia64.mt
+++ b/gdb/config/ia64/ia64.mt
@@ -1,2 +1,2 @@
TDEPFILES= ia64-tdep.o
-TM_FILE= tm-ia64.h
+DEPRECATED_TM_FILE= tm-ia64.h
diff --git a/gdb/config/ia64/linux.mh b/gdb/config/ia64/linux.mh
index 2013af35505..71fed101a3e 100644
--- a/gdb/config/ia64/linux.mh
+++ b/gdb/config/ia64/linux.mh
@@ -1,7 +1,5 @@
# Host: Intel IA-64 running GNU/Linux
-XM_FILE= xm-linux.h
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o gcore.o \
core-aout.o core-regset.o ia64-linux-nat.o linux-proc.o \
diff --git a/gdb/config/ia64/linux.mt b/gdb/config/ia64/linux.mt
index 3a661b3d947..bdb286c9144 100644
--- a/gdb/config/ia64/linux.mt
+++ b/gdb/config/ia64/linux.mt
@@ -1,4 +1,4 @@
# Target: Intel IA-64 running GNU/Linux
TDEPFILES= ia64-tdep.o ia64-aix-tdep.o ia64-linux-tdep.o \
solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= tm-linux.h
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index 5e9df60021c..1a5539a8fdf 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -1,5 +1,6 @@
/* Native support for GNU/Linux, for GDB, the GNU debugger.
- Copyright 1999, 2000, 2001
+
+ Copyright 1999, 2000, 2001, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,6 +27,10 @@ struct target_ops;
#include "config/nm-linux.h"
+/* 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
+
/* Note: It seems likely that we'll have to eventually define
FETCH_INFERIOR_REGISTERS. But until that time, we'll make do
with the following. */
@@ -38,13 +43,8 @@ extern int ia64_cannot_store_register (int regno);
#define U_REGS_OFFSET 0
-#define PTRACE_ARG3_TYPE long
-#define PTRACE_XFER_TYPE long
-
/* Hardware watchpoints */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
/* The IA-64 architecture can step over a watch point (without triggering
diff --git a/gdb/config/ia64/tm-aix.h b/gdb/config/ia64/tm-aix.h
index 186cd93ae75..aabe0886cbc 100644
--- a/gdb/config/ia64/tm-aix.h
+++ b/gdb/config/ia64/tm-aix.h
@@ -1,5 +1,6 @@
/* Definitions to target GDB to GNU/Linux on IA-64 running AIX.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,8 +25,6 @@
#include "ia64/tm-ia64.h"
#include "config/tm-sysv4.h"
-#define TARGET_ELF64
-
extern int ia64_aix_in_sigtramp (CORE_ADDR pc, char *func_name);
#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_aix_in_sigtramp (pc, func_name)
diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h
index 1b2baacd5a0..5fbcbf8aeec 100644
--- a/gdb/config/ia64/tm-ia64.h
+++ b/gdb/config/ia64/tm-ia64.h
@@ -21,8 +21,6 @@
#ifndef TM_IA64_H
#define TM_IA64_H
-#define GDB_MULTI_ARCH 1
-
/* Register numbers of various important registers */
/* General registers; there are 128 of these 64 bit wide registers. The
diff --git a/gdb/config/ia64/tm-linux.h b/gdb/config/ia64/tm-linux.h
index 4aa6d8598c3..e55acff4a16 100644
--- a/gdb/config/ia64/tm-linux.h
+++ b/gdb/config/ia64/tm-linux.h
@@ -1,5 +1,6 @@
/* Definitions to target GDB to GNU/Linux on IA-64 Linux.
- Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 2000, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,13 +22,9 @@
#ifndef TM_LINUX_H
#define TM_LINUX_H
-#define IA64_GNULINUX_TARGET
-
#include "ia64/tm-ia64.h"
#include "config/tm-linux.h"
-#define TARGET_ELF64
-
extern int ia64_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_linux_in_sigtramp (pc, func_name)
diff --git a/gdb/config/ia64/xm-aix.h b/gdb/config/ia64/xm-aix.h
deleted file mode 100644
index ad717d5c01c..00000000000
--- a/gdb/config/ia64/xm-aix.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Native support for AIX, for GDB, the GNU debugger.
- Copyright 2000, 2001 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 XM_AIX_H
-#define XM_AIX_H
-
-/* Pick up more stuff from the generic SVR4 host include file. */
-
-#include "config/xm-sysv4.h"
-
-#endif /* #ifndef XM_AIX_H */
diff --git a/gdb/config/m68k/3b1.mh b/gdb/config/m68k/3b1.mh
deleted file mode 100644
index 1ebba273f7f..00000000000
--- a/gdb/config/m68k/3b1.mh
+++ /dev/null
@@ -1,12 +0,0 @@
-# OBSOLETE # Host: AT&T 3b1/Unix pc
-# OBSOLETE # I don't think cc has been tried. -traditional for <sys/ioctl.h>
-# OBSOLETE # (not sure whether necessary).
-# OBSOLETE CC= gcc -traditional
-# OBSOLETE # GCC runs out of virtual memory.
-# OBSOLETE # A separate CC for pinsn routines is no longer supported, though.
-# OBSOLETE # FIXME -- someone unlucky enough to have a 3B1, let bug-gcc@prep.ai.mit.edu
-# OBSOLETE # know what works and what fails on the 3B1.
-# OBSOLETE #PINSN_CC= cc
-# OBSOLETE
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-# OBSOLETE XM_FILE= xm-3b1.h
diff --git a/gdb/config/m68k/3b1.mt b/gdb/config/m68k/3b1.mt
deleted file mode 100644
index 745918758b2..00000000000
--- a/gdb/config/m68k/3b1.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: AT&T 3b1/Unix pc
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-3b1.h
diff --git a/gdb/config/m68k/cisco.mt b/gdb/config/m68k/cisco.mt
index bc2e9214d7f..85b46331e48 100644
--- a/gdb/config/m68k/cisco.mt
+++ b/gdb/config/m68k/cisco.mt
@@ -1,3 +1,3 @@
# Target: Cisco Router with 68K processor
TDEPFILES= m68k-tdep.o corelow.o core-aout.o
-TM_FILE= tm-cisco.h
+DEPRECATED_TM_FILE= tm-cisco.h
diff --git a/gdb/config/m68k/delta68.mh b/gdb/config/m68k/delta68.mh
deleted file mode 100644
index cfa14baca26..00000000000
--- a/gdb/config/m68k/delta68.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# OBSOLETE # Host: Motorola Delta Series sysV68 R3V7.1
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-delta68.h
-# OBSOLETE NAT_FILE= nm-delta68.h
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o
diff --git a/gdb/config/m68k/delta68.mt b/gdb/config/m68k/delta68.mt
deleted file mode 100644
index 743a92a3ae6..00000000000
--- a/gdb/config/m68k/delta68.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Motorola Delta Series sysV68 R3V7.1
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-delta68.h
diff --git a/gdb/config/m68k/dpx2.mh b/gdb/config/m68k/dpx2.mh
deleted file mode 100644
index e9c5b68c58e..00000000000
--- a/gdb/config/m68k/dpx2.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Host: Bull DPX2 (68k, System V release 3)
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-dpx2.h
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-dpx2.h
-# OBSOLETE NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
diff --git a/gdb/config/m68k/dpx2.mt b/gdb/config/m68k/dpx2.mt
deleted file mode 100644
index 7cecda6af3d..00000000000
--- a/gdb/config/m68k/dpx2.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Bull DPX2 (68k, System V release 3)
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-dpx2.h
diff --git a/gdb/config/m68k/linux.mh b/gdb/config/m68k/linux.mh
index 7de2c3f6e13..69dce24a01c 100644
--- a/gdb/config/m68k/linux.mh
+++ b/gdb/config/m68k/linux.mh
@@ -1,7 +1,5 @@
# Host: Motorola m68k running GNU/Linux.
-XM_FILE= xm-linux.h
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o \
corelow.o core-aout.o m68klinux-nat.o linux-proc.o gcore.o \
diff --git a/gdb/config/m68k/linux.mt b/gdb/config/m68k/linux.mt
index 42171335aaa..262f67ba005 100644
--- a/gdb/config/m68k/linux.mt
+++ b/gdb/config/m68k/linux.mt
@@ -1,3 +1,3 @@
# Target: Motorola m68k with a.out and ELF
TDEPFILES= m68k-tdep.o m68klinux-tdep.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/m68k/m68klynx.mh b/gdb/config/m68k/m68klynx.mh
deleted file mode 100644
index c76dccecfb1..00000000000
--- a/gdb/config/m68k/m68klynx.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Host: Motorola 680x0 running LynxOS
-# OBSOLETE
-# OBSOLETE XM_CLIBS= -lbsd
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-m68klynx.h
-# OBSOLETE NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
diff --git a/gdb/config/m68k/m68klynx.mt b/gdb/config/m68k/m68klynx.mt
deleted file mode 100644
index e3a3c797ece..00000000000
--- a/gdb/config/m68k/m68klynx.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Target: Motorola 680x0 running LynxOS
-# OBSOLETE TDEPFILES= coff-solib.o m68k-tdep.o
-# OBSOLETE # m68kly-tdep.o
-# OBSOLETE TM_FILE= tm-m68klynx.h
diff --git a/gdb/config/m68k/m68kv4.mh b/gdb/config/m68k/m68kv4.mh
deleted file mode 100644
index 23c64fab82d..00000000000
--- a/gdb/config/m68k/m68kv4.mh
+++ /dev/null
@@ -1,7 +0,0 @@
-# OBSOLETE # Host: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-m68kv4.h
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-sysv4.h
-# OBSOLETE NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o solib-legacy.o \
-# OBSOLETE fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/m68k/m68kv4.mt b/gdb/config/m68k/m68kv4.mt
deleted file mode 100644
index 0a9ad08d795..00000000000
--- a/gdb/config/m68k/m68kv4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-m68kv4.h
diff --git a/gdb/config/m68k/monitor.mt b/gdb/config/m68k/monitor.mt
index 46b1c55ad63..0cae79681f8 100644
--- a/gdb/config/m68k/monitor.mt
+++ b/gdb/config/m68k/monitor.mt
@@ -1,3 +1,3 @@
# Target: Motorola m68k embedded (EST emulator, rom68k and bug monitors)
TDEPFILES= m68k-tdep.o monitor.o remote-est.o cpu32bug-rom.o rom68k-rom.o abug-rom.o dbug-rom.o dsrec.o
-TM_FILE= tm-monitor.h
+DEPRECATED_TM_FILE= tm-monitor.h
diff --git a/gdb/config/m68k/nbsd.mt b/gdb/config/m68k/nbsd.mt
new file mode 100644
index 00000000000..db3e3573d7f
--- /dev/null
+++ b/gdb/config/m68k/nbsd.mt
@@ -0,0 +1,3 @@
+# Target: NetBSD/m68k
+TDEPFILES= m68k-tdep.o m68kbsd-tdep.o corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/m68k/nbsdaout.mh b/gdb/config/m68k/nbsdaout.mh
index 7ce279b332e..90a43d70b68 100644
--- a/gdb/config/m68k/nbsdaout.mh
+++ b/gdb/config/m68k/nbsdaout.mh
@@ -1,5 +1,4 @@
-# Host: Motorola m68k running NetBSD
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o \
+# Host: NetBSD/m68k a.out
+NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o \
solib.o solib-sunos.o
-XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdaout.h
diff --git a/gdb/config/m68k/nbsdaout.mt b/gdb/config/m68k/nbsdaout.mt
deleted file mode 100644
index b6ac5a000e1..00000000000
--- a/gdb/config/m68k/nbsdaout.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Motorola m68k running NetBSD
-TDEPFILES= m68k-tdep.o m68knbsd-tdep.o
-TM_FILE= tm-nbsd.h
diff --git a/gdb/config/m68k/nbsdelf.mh b/gdb/config/m68k/nbsdelf.mh
new file mode 100644
index 00000000000..c58e348be7e
--- /dev/null
+++ b/gdb/config/m68k/nbsdelf.mh
@@ -0,0 +1,5 @@
+# Host: NetBSD/m68k ELF
+NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= config/nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/m68k/nm-delta68.h b/gdb/config/m68k/nm-delta68.h
deleted file mode 100644
index e27bb69a449..00000000000
--- a/gdb/config/m68k/nm-delta68.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// OBSOLETE /* Macro definitions for a Motorola Delta Series sysV68 R3V7.1.
-// OBSOLETE Copyright 1993, 1998 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_SIZE kernel_u_size()
diff --git a/gdb/config/m68k/nm-dpx2.h b/gdb/config/m68k/nm-dpx2.h
deleted file mode 100644
index f6cce8a0412..00000000000
--- a/gdb/config/m68k/nm-dpx2.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// OBSOLETE /* Native support for a Bull DPX2.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993, 2000 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* KERNEL_U_ADDR is determined upon startup in dpx2-xdep.c. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE (addr) = dpx2_register_u_addr ((blockend),(regno));
-// OBSOLETE
-// OBSOLETE extern int dpx2_register_u_addr (int, int);
-// OBSOLETE
-// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-// OBSOLETE #define ONE_PROCESS_WRITETEXT
diff --git a/gdb/config/m68k/nm-linux.h b/gdb/config/m68k/nm-linux.h
index 26aa19768ad..9b6208b3ffd 100644
--- a/gdb/config/m68k/nm-linux.h
+++ b/gdb/config/m68k/nm-linux.h
@@ -28,6 +28,10 @@
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
+/* 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 U_REGS_OFFSET 0
#define REGISTER_U_ADDR(addr, blockend, regno) \
diff --git a/gdb/config/m68k/nm-m68klynx.h b/gdb/config/m68k/nm-m68klynx.h
deleted file mode 100644
index 88b1260522b..00000000000
--- a/gdb/config/m68k/nm-m68klynx.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running LynxOS.
-// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef NM_M68KLYNX_H
-// OBSOLETE #define NM_M68KLYNX_H
-// OBSOLETE
-// OBSOLETE #include "config/nm-lynx.h"
-// OBSOLETE
-// OBSOLETE #endif /* NM_M68KLYNX_H */
diff --git a/gdb/config/m68k/nm-nbsd.h b/gdb/config/m68k/nm-nbsd.h
deleted file mode 100644
index 72c98895a78..00000000000
--- a/gdb/config/m68k/nm-nbsd.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Native-dependent definitions for Motorola m68k running NetBSD, for GDB.
- Copyright 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_NBSD_H
-#define NM_NBSD_H
-
-/* Get generic NetBSD native definitions. */
-#include "config/nm-nbsd.h"
-
-#endif /* NM_NBSD_H */
diff --git a/gdb/config/m68k/nm-nbsdaout.h b/gdb/config/m68k/nm-nbsdaout.h
index cb755f0bed2..e7415891657 100644
--- a/gdb/config/m68k/nm-nbsdaout.h
+++ b/gdb/config/m68k/nm-nbsdaout.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Motorola m68k running NetBSD, for GDB.
- Copyright 1996, 2002 Free Software Foundation, Inc.
+/* Native-dependent definitions for NetBSD/m68k a.out.
+
+ Copyright 1996, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,9 +22,9 @@
#ifndef NM_NBSDAOUT_H
#define NM_NBSDAOUT_H
-#include "m68k/nm-nbsd.h"
+#include "config/nm-nbsd.h"
-/* Get generic NetBSD a.out native definitions. */
+/* Get generic NetBSD a.out native definitions. */
#include "config/nm-nbsdaout.h"
-#endif /* NM_NBSDAOUT_H */
+#endif /* nm-nbsdaout.h */
diff --git a/gdb/config/m68k/nm-sun2.h b/gdb/config/m68k/nm-sun2.h
deleted file mode 100644
index cce4a3e8ee0..00000000000
--- a/gdb/config/m68k/nm-sun2.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Sun2, for GDB, the GNU debugger.
-// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Do implement the attach and detach commands. */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* This is a piece of magic that is given a register number REGNO
-// OBSOLETE and as BLOCKEND the address in the system of the end of the user structure
-// OBSOLETE and stores in ADDR the address in the kernel or core dump
-// OBSOLETE of that register. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = blockend + regno * 4; }
diff --git a/gdb/config/m68k/nm-sun3.h b/gdb/config/m68k/nm-sun3.h
deleted file mode 100644
index 9e50707b9dc..00000000000
--- a/gdb/config/m68k/nm-sun3.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// OBSOLETE /* Native-only definitions for Sun-3 for GDB, the GNU debugger.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1996
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Do implement the attach and detach commands. */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* We have to grab the regs since we store all regs at once. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
diff --git a/gdb/config/m68k/nm-sysv4.h b/gdb/config/m68k/nm-sysv4.h
deleted file mode 100644
index 6e3a45205c7..00000000000
--- a/gdb/config/m68k/nm-sysv4.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running SVR4.
-// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Include the generic SVR4 definitions. */
-// OBSOLETE
-// OBSOLETE #include "config/nm-sysv4.h"
diff --git a/gdb/config/m68k/obsd.mh b/gdb/config/m68k/obsd.mh
new file mode 100644
index 00000000000..54e4e9d7c2b
--- /dev/null
+++ b/gdb/config/m68k/obsd.mh
@@ -0,0 +1,6 @@
+# Host: OpenBSD/m68k
+NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o \
+ solib.o solib-sunos.o
+NAT_FILE= nm-nbsdaout.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/m68k/obsd.mt b/gdb/config/m68k/obsd.mt
new file mode 100644
index 00000000000..98531211fc2
--- /dev/null
+++ b/gdb/config/m68k/obsd.mt
@@ -0,0 +1,3 @@
+# Target: OpenBSD/m68k
+TDEPFILES= m68k-tdep.o m68kbsd-tdep.o corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/m68k/os68k.mt b/gdb/config/m68k/os68k.mt
index 391dd894366..e1a4344b32b 100644
--- a/gdb/config/m68k/os68k.mt
+++ b/gdb/config/m68k/os68k.mt
@@ -1,3 +1,3 @@
# Target: VxWorks running on a 68000
TDEPFILES= m68k-tdep.o
-TM_FILE= tm-os68k.h
+DEPRECATED_TM_FILE= tm-os68k.h
diff --git a/gdb/config/m68k/st2000.mt b/gdb/config/m68k/st2000.mt
index 06dfe5cbc0d..8c503a45983 100644
--- a/gdb/config/m68k/st2000.mt
+++ b/gdb/config/m68k/st2000.mt
@@ -1,3 +1,2 @@
# Target: Tandem ST-2000 phone switch
TDEPFILES= m68k-tdep.o remote-st.o
-TM_FILE= tm-st2000.h
diff --git a/gdb/config/m68k/sun2os3.mh b/gdb/config/m68k/sun2os3.mh
deleted file mode 100644
index 2243a280e34..00000000000
--- a/gdb/config/m68k/sun2os3.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sun 2, running SunOS 3
-# OBSOLETE XM_FILE= xm-sun2.h
-# OBSOLETE NAT_FILE= nm-sun2.h
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os3.mt b/gdb/config/m68k/sun2os3.mt
deleted file mode 100644
index 343bccd16f0..00000000000
--- a/gdb/config/m68k/sun2os3.mt
+++ /dev/null
@@ -1,7 +0,0 @@
-# OBSOLETE # Target: Sun 2, running SunOS 3
-# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
-# OBSOLETE # can't find "gcc_compiled.".
-# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
-# OBSOLETE #msg
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-sun2.h
diff --git a/gdb/config/m68k/sun2os4.mh b/gdb/config/m68k/sun2os4.mh
deleted file mode 100644
index ab9c7204938..00000000000
--- a/gdb/config/m68k/sun2os4.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sun 2, running SunOS 4
-# OBSOLETE XM_FILE= xm-sun2.h
-# OBSOLETE NAT_FILE= nm-sun2.h
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os4.mt b/gdb/config/m68k/sun2os4.mt
deleted file mode 100644
index 30ff4e3971a..00000000000
--- a/gdb/config/m68k/sun2os4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sun 2, running SunOS 4
-# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-# OBSOLETE TM_FILE= tm-sun2os4.h
diff --git a/gdb/config/m68k/sun3os3.mh b/gdb/config/m68k/sun3os3.mh
deleted file mode 100644
index e7c820f43a0..00000000000
--- a/gdb/config/m68k/sun3os3.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sun 3, running SunOS 3
-# OBSOLETE XM_FILE= xm-sun3.h
-# OBSOLETE NAT_FILE= nm-sun3.h
-# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os3.mt b/gdb/config/m68k/sun3os3.mt
deleted file mode 100644
index 4ea0d2741ae..00000000000
--- a/gdb/config/m68k/sun3os3.mt
+++ /dev/null
@@ -1,8 +0,0 @@
-# OBSOLETE # Target: Sun 3, running SunOS 3
-# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
-# OBSOLETE # can't find "gcc_compiled.".
-# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
-# OBSOLETE #msg
-# OBSOLETE
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-sun3.h
diff --git a/gdb/config/m68k/sun3os4.mh b/gdb/config/m68k/sun3os4.mh
deleted file mode 100644
index dc3f9afde76..00000000000
--- a/gdb/config/m68k/sun3os4.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sun 3, running SunOS 4
-# OBSOLETE XM_FILE= xm-sun3os4.h
-# OBSOLETE NAT_FILE= nm-sun3.h
-# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os4.mt b/gdb/config/m68k/sun3os4.mt
deleted file mode 100644
index decf0b30d4d..00000000000
--- a/gdb/config/m68k/sun3os4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sun 3, running SunOS 4, as a target system
-# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-# OBSOLETE TM_FILE= tm-sun3os4.h
diff --git a/gdb/config/m68k/tm-3b1.h b/gdb/config/m68k/tm-3b1.h
deleted file mode 100644
index df845bd30ac..00000000000
--- a/gdb/config/m68k/tm-3b1.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// OBSOLETE /* Parameters for targeting GDB to a 3b1.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* The child target can't deal with floating registers. */
-// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-// OBSOLETE
-// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
-// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
-// OBSOLETE
-// OBSOLETE #define BPT_VECTOR 0x1
-// OBSOLETE
-// OBSOLETE /* Address of end of stack space. */
-// OBSOLETE
-// OBSOLETE #define STACK_END_ADDR 0x300000
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-cisco.h b/gdb/config/m68k/tm-cisco.h
index 51e2cdc39a2..0b60444ddc8 100644
--- a/gdb/config/m68k/tm-cisco.h
+++ b/gdb/config/m68k/tm-cisco.h
@@ -22,8 +22,6 @@
#define DEFAULT_PROMPT "(cisco-68k-gdb) " /* Default prompt */
-#include "m68k/tm-m68k.h"
-
/* Offsets (in target ints) into jmp_buf. Defined in /csc/sys/sun/asm.S. */
#define JB_ELEMENT_SIZE 4
@@ -42,13 +40,6 @@
#define JB_A6 11
#define JB_SP 12
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- 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 ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
/* BFD handles finding the registers in the core file, so they are at
the start of the BFD .reg section. */
#define REGISTER_U_ADDR(addr,blockend,regno) (addr = DEPRECATED_REGISTER_BYTE (regno))
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
deleted file mode 100644
index c041060a8a6..00000000000
--- a/gdb/config/m68k/tm-delta68.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// OBSOLETE /* Target definitions for delta68.
-// OBSOLETE Copyright 1993, 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE struct frame_info;
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
-// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
-// OBSOLETE
-// OBSOLETE #define BPT_VECTOR 0x1
-// OBSOLETE
-// OBSOLETE #define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
-// OBSOLETE #define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
-// OBSOLETE On the Delta, the kernel decrements it for us. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Not sure what happens if we try to store this register, but
-// OBSOLETE phdm@info.ucl.ac.be says we need this define. */
-// OBSOLETE
-// OBSOLETE #define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
-// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
-// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
-// OBSOLETE &REGBUF[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], \
-// OBSOLETE VALBUF); \
-// OBSOLETE else \
-// OBSOLETE memcpy ((VALBUF), \
-// OBSOLETE (char *) ((REGBUF) + \
-// OBSOLETE (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
-// OBSOLETE (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
-// OBSOLETE TYPE_LENGTH(TYPE))
-// OBSOLETE
-// OBSOLETE /* Write into appropriate registers a function return value
-// OBSOLETE of type TYPE, given in virtual format. */
-// OBSOLETE
-// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
-// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
-// OBSOLETE { \
-// OBSOLETE char raw_buf[DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)]; \
-// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
-// OBSOLETE deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
-// OBSOLETE raw_buf, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)); \
-// OBSOLETE } \
-// OBSOLETE else \
-// OBSOLETE deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
-// OBSOLETE VALBUF, TYPE_LENGTH (TYPE))
-// OBSOLETE
-// OBSOLETE /* Return number of args passed to a frame.
-// OBSOLETE Can return -1, meaning no way to tell. */
-// OBSOLETE
-// OBSOLETE extern int delta68_frame_num_args (struct frame_info *fi);
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
-// OBSOLETE
-// OBSOLETE /* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
-// OBSOLETE the processor's instruction cache as it should. */
-// OBSOLETE #define CLEAR_INSN_CACHE() clear_insn_cache()
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-m68k.h"
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE the address in which a function should return its structure value,
-// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
-// OBSOLETE (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
-// OBSOLETE
-// OBSOLETE extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
-// OBSOLETE #define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
-// OBSOLETE #undef DEPRECATED_FRAME_SAVED_PC
-// OBSOLETE #define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-// OBSOLETE #undef DEPRECATED_FRAME_ARGS_ADDRESS
-// OBSOLETE #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
diff --git a/gdb/config/m68k/tm-dpx2.h b/gdb/config/m68k/tm-dpx2.h
deleted file mode 100644
index f641ad3cad1..00000000000
--- a/gdb/config/m68k/tm-dpx2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// OBSOLETE /* Parameters for targeting to a Bull DPX2.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993, 1994
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
-// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
-// OBSOLETE
-// OBSOLETE #define BPT_VECTOR 0xe
-// OBSOLETE
-// OBSOLETE /* Need to get function ends by adding this to epilogue address from .bf
-// OBSOLETE record, not using x_fsize field. */
-// OBSOLETE #define FUNCTION_EPILOGUE_SIZE 4
-// OBSOLETE
-// OBSOLETE /* The child target can't deal with writing floating registers. */
-// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-// OBSOLETE
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h
deleted file mode 100644
index fc191b16404..00000000000
--- a/gdb/config/m68k/tm-linux.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Definitions to target GDB to GNU/Linux on m680x0.
-
- Copyright 1996, 1998, 1999, 2000, 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. */
-
-/* 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. */
-
-#define SVR4_SHARED_LIBS
-#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
deleted file mode 100644
index 17b31981f19..00000000000
--- a/gdb/config/m68k/tm-m68k.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters for execution on a 68000 series machine.
- Copyright 1986, 1987, 1989, 1990, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 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. */
-
-extern int m68k_get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
deleted file mode 100644
index e82fbee9e93..00000000000
--- a/gdb/config/m68k/tm-m68klynx.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// OBSOLETE /* Macro definitions for Motorola 680x0 running under LynxOS.
-// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef TM_M68KLYNX_H
-// OBSOLETE #define TM_M68KLYNX_H
-// OBSOLETE
-// OBSOLETE #include "config/tm-lynx.h"
-// OBSOLETE
-// OBSOLETE /* If PC-2 contains this instruction, then we know what we are in a system
-// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
-// OBSOLETE
-// OBSOLETE #define SYSCALL_TRAP 0x4e4a /* trap #10 */
-// OBSOLETE #define SYSCALL_TRAP_OFFSET 2 /* PC is after trap instruction */
-// OBSOLETE
-// OBSOLETE /* Use the generic 68k definitions. */
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-m68k.h"
-// OBSOLETE
-// OBSOLETE /* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
-// OBSOLETE
-// OBSOLETE #endif /* TM_M68KLYNX_H */
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
deleted file mode 100644
index 95696b60b49..00000000000
--- a/gdb/config/m68k/tm-m68kv4.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// OBSOLETE /* Target definitions for GDB on a Motorola 680x0 running SVR4.
-// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
-// OBSOLETE Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygint)
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
-// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
-// OBSOLETE
-// OBSOLETE #define BPT_VECTOR 0x1
-// OBSOLETE
-// OBSOLETE /* How much to decrement the PC after a trap. Depends on kernel. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0 /* No decrement required */
-// OBSOLETE
-// OBSOLETE #include "config/tm-sysv4.h"
-// OBSOLETE #include "m68k/tm-m68k.h"
-// OBSOLETE
-// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined in any system header
-// OBSOLETE file, so we have to step through setjmp/longjmp with a debugger and figure
-// OBSOLETE them out. As a double check, note that <setjmp> defines _JBLEN as 13,
-// OBSOLETE which matches the number of elements we see saved by setjmp(). */
-// OBSOLETE
-// OBSOLETE #define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
-// OBSOLETE
-// OBSOLETE #define JB_D2 0
-// OBSOLETE #define JB_D3 1
-// OBSOLETE #define JB_D4 2
-// OBSOLETE #define JB_D5 3
-// OBSOLETE #define JB_D6 4
-// OBSOLETE #define JB_D7 5
-// OBSOLETE #define JB_A1 6
-// OBSOLETE #define JB_A2 7
-// OBSOLETE #define JB_A3 8
-// OBSOLETE #define JB_A4 9
-// OBSOLETE #define JB_A5 10
-// OBSOLETE #define JB_A6 11
-// OBSOLETE #define JB_A7 12
-// OBSOLETE
-// OBSOLETE #define JB_PC JB_A1 /* Setjmp()'s return PC saved in A1 */
-// OBSOLETE
-// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
-// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
-// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
-// OBSOLETE This routine returns true on success */
-// OBSOLETE
-// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-// OBSOLETE
-// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
-// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 16 ? (num) : (num)+FP0_REGNUM-16)
diff --git a/gdb/config/m68k/tm-monitor.h b/gdb/config/m68k/tm-monitor.h
index 1b00a8f05de..02d550d937a 100644
--- a/gdb/config/m68k/tm-monitor.h
+++ b/gdb/config/m68k/tm-monitor.h
@@ -36,6 +36,4 @@
/*#define NUM_REGS 18 */
-#include "m68k/tm-m68k.h"
-
/* FIXME, should do GET_LONGJMP_TARGET for newlib. */
diff --git a/gdb/config/m68k/tm-nbsd.h b/gdb/config/m68k/tm-nbsd.h
deleted file mode 100644
index 05deff7cc57..00000000000
--- a/gdb/config/m68k/tm-nbsd.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Macro definitions for m68k running under NetBSD.
- Copyright 1994, 1996, 2001 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 TM_NBSD_H
-#define TM_NBSD_H
-
-#include <sys/param.h>
-#include <machine/vmparam.h>
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-#define BPT_VECTOR 0xf
-#define REMOTE_BPT_VECTOR 0xf
-
-/* Address of end of stack space. */
-#define STACK_END_ADDR USRSTACK
-
-/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */
-#define DEPRECATED_SIGTRAMP_START(pc) (STACK_END_ADDR - 32)
-#define DEPRECATED_SIGTRAMP_END(pc) (STACK_END_ADDR)
-
-#include "m68k/tm-m68k.h"
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- (name && !strcmp(name, "_DYNAMIC"))
-
-extern use_struct_convention_fn m68knbsd_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
- m68knbsd_use_struct_convention(gcc_p, type)
-
-#endif /* TM_NBSD_H */
diff --git a/gdb/config/m68k/tm-os68k.h b/gdb/config/m68k/tm-os68k.h
index 815efff3b02..8787624ebe7 100644
--- a/gdb/config/m68k/tm-os68k.h
+++ b/gdb/config/m68k/tm-os68k.h
@@ -23,8 +23,6 @@
#define DEFAULT_PROMPT "(os68k) "
-#include "m68k/tm-m68k.h"
-
/* We have more complex, useful breakpoints on the target. */
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
diff --git a/gdb/config/m68k/tm-sun2.h b/gdb/config/m68k/tm-sun2.h
deleted file mode 100644
index 199530abe20..00000000000
--- a/gdb/config/m68k/tm-sun2.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
-// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* The child target can't deal with floating registers. */
-// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-sun2os4.h b/gdb/config/m68k/tm-sun2os4.h
deleted file mode 100644
index 83beb6cf665..00000000000
--- a/gdb/config/m68k/tm-sun2os4.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// OBSOLETE /* Copyright (C) 1990, Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-sun2.h"
-// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
deleted file mode 100644
index f51666dc044..00000000000
--- a/gdb/config/m68k/tm-sun3.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef TM_SUN3_H
-// OBSOLETE #define TM_SUN3_H
-// OBSOLETE
-// OBSOLETE /* Sun3 status includes fpflags, which shows whether the FPU has been used
-// OBSOLETE by the process, and whether the FPU was done with an instruction or
-// OBSOLETE was interrupted in the middle of a long instruction. See
-// OBSOLETE <machine/reg.h>. */
-// OBSOLETE /* a&d, pc,sr, fp, fpstat, fpflags */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
-// OBSOLETE
-// OBSOLETE #define NUM_REGS 31
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTES_OK(b) \
-// OBSOLETE ((b) == DEPRECATED_REGISTER_BYTES \
-// OBSOLETE || (b) == REGISTER_BYTES_FP \
-// OBSOLETE || (b) == REGISTER_BYTES_NOFP)
-// OBSOLETE
-// OBSOLETE /* If PC contains this instruction, then we know what we are in a system
-// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
-// OBSOLETE
-// OBSOLETE #define SYSCALL_TRAP 0x4e40 /* trap #0 */
-// OBSOLETE #define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-m68k.h"
-// OBSOLETE
-// OBSOLETE /* Disable alternate breakpoint mechanism needed by 68k stub. */
-// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
-// OBSOLETE
-// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
-// OBSOLETE documented in a comment in <machine/setjmp.h>! */
-// OBSOLETE
-// OBSOLETE #define JB_ELEMENT_SIZE 4
-// OBSOLETE
-// OBSOLETE #define JB_ONSSTACK 0
-// OBSOLETE #define JB_SIGMASK 1
-// OBSOLETE #define JB_SP 2
-// OBSOLETE #define JB_PC 3
-// OBSOLETE #define JB_PSL 4
-// OBSOLETE #define JB_D2 5
-// OBSOLETE #define JB_D3 6
-// OBSOLETE #define JB_D4 7
-// OBSOLETE #define JB_D5 8
-// OBSOLETE #define JB_D6 9
-// OBSOLETE #define JB_D7 10
-// OBSOLETE #define JB_A2 11
-// OBSOLETE #define JB_A3 12
-// OBSOLETE #define JB_A4 13
-// OBSOLETE #define JB_A5 14
-// OBSOLETE #define JB_A6 15
-// OBSOLETE
-// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
-// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
-// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
-// OBSOLETE This routine returns true on success */
-// OBSOLETE
-// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-// OBSOLETE
-// OBSOLETE /* If sun3 pcc says that a parameter is a short, it's a short. */
-// OBSOLETE #define BELIEVE_PCC_PROMOTION_TYPE 1
-// OBSOLETE
-// OBSOLETE /* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
-// OBSOLETE Apparently Sun fixed this for the sparc but not the sun3. */
-// OBSOLETE
-// OBSOLETE /* The code which tries to deal with this bug is never harmful on a sun3. */
-// OBSOLETE #define SUN_FIXED_LBRAC_BUG (0)
-// OBSOLETE
-// OBSOLETE #endif /* TM_SUN3_H */
diff --git a/gdb/config/m68k/tm-sun3os4.h b/gdb/config/m68k/tm-sun3os4.h
deleted file mode 100644
index 7e1ffb21fe2..00000000000
--- a/gdb/config/m68k/tm-sun3os4.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// OBSOLETE /* Target machine parameters for Sun-3 under SunOS 4.x, for GDB.
-// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "m68k/tm-sun3.h"
-// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 6eaf4189435..93d49544652 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -30,7 +30,6 @@
/* We have more complex, useful breakpoints on the target. */
#define DECR_PC_AFTER_BREAK 0
-#include "m68k/tm-m68k.h"
#include "config/tm-vxworks.h"
/* Takes the current frame-struct pointer and returns the chain-pointer
@@ -64,15 +63,3 @@
#define JB_A4 13
#define JB_A5 14
#define JB_A6 15
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- 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 ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-/* Number of registers in a ptrace_getfpregs call. */
-
-#define VX_SIZE_FPREGS (8 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) \
- + (3 * DEPRECATED_REGISTER_SIZE))
diff --git a/gdb/config/m68k/vxworks68.mt b/gdb/config/m68k/vxworks68.mt
index 8c9774496cb..e396f627528 100644
--- a/gdb/config/m68k/vxworks68.mt
+++ b/gdb/config/m68k/vxworks68.mt
@@ -1,3 +1,3 @@
# Target: Motorola m68k running VxWorks
TDEPFILES= m68k-tdep.o remote-vx.o remote-vx68.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
-TM_FILE= tm-vx68.h
+DEPRECATED_TM_FILE= tm-vx68.h
diff --git a/gdb/config/m68k/xm-3b1.h b/gdb/config/m68k/xm-3b1.h
deleted file mode 100644
index 7257b69dc9a..00000000000
--- a/gdb/config/m68k/xm-3b1.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// OBSOLETE /* Parameters for execution on a 3b1.
-// OBSOLETE Copyright 1986, 1987, 1989, 1999 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #define HAVE_TERMIO
-// OBSOLETE #define USG
-// OBSOLETE
-// OBSOLETE /* This is the amount to subtract from u.u_ar0
-// OBSOLETE to get the offset in the core file of the register values. */
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0x70000
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = blockend + regno * 4; }
-// OBSOLETE
-// OBSOLETE /* Interface definitions for kernel debugger KDB. */
-// OBSOLETE
-// OBSOLETE /* Map machine fault codes into signal numbers.
-// OBSOLETE First subtract 0, divide by 4, then index in a table.
-// OBSOLETE Faults for which the entry in this table is 0
-// OBSOLETE are not handled by KDB; the program's own trap handler
-// OBSOLETE gets to handle then. */
-// OBSOLETE
-// OBSOLETE #define FAULT_CODE_ORIGIN 0
-// OBSOLETE #define FAULT_CODE_UNITS 4
-// OBSOLETE #define FAULT_TABLE \
-// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
-// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
-// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
-// OBSOLETE SIGILL }
-// OBSOLETE
-// OBSOLETE /* Start running with a stack stretching from BEG to END.
-// OBSOLETE BEG and END should be symbols meaningful to the assembler.
-// OBSOLETE This is used only for kdb. */
-// OBSOLETE
-// OBSOLETE #define INIT_STACK(beg, end) \
-// OBSOLETE { asm (".globl end"); \
-// OBSOLETE asm ("movel $ end, sp"); \
-// OBSOLETE asm ("clrl fp"); }
-// OBSOLETE
-// OBSOLETE /* Push the frame pointer register on the stack. */
-// OBSOLETE #define PUSH_FRAME_PTR \
-// OBSOLETE asm ("movel fp, -(sp)");
-// OBSOLETE
-// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
-// OBSOLETE #define POP_FRAME_PTR \
-// OBSOLETE asm ("movl (sp), fp");
-// OBSOLETE
-// OBSOLETE /* After KDB is entered by a fault, push all registers
-// OBSOLETE that GDB thinks about (all NUM_REGS of them),
-// OBSOLETE so that they appear in order of ascending GDB register number.
-// OBSOLETE The fault code will be on the stack beyond the last register. */
-// OBSOLETE
-// OBSOLETE #define PUSH_REGISTERS \
-// OBSOLETE { asm ("clrw -(sp)"); \
-// OBSOLETE asm ("pea 10(sp)"); \
-// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
-// OBSOLETE
-// OBSOLETE /* Assuming the registers (including processor status) have been
-// OBSOLETE pushed on the stack in order of ascending GDB register number,
-// OBSOLETE restore them and return to the address in the saved PC register. */
-// OBSOLETE
-// OBSOLETE #define POP_REGISTERS \
-// OBSOLETE { asm ("subil $8,28(sp)"); \
-// OBSOLETE asm ("movem (sp),$ 0xffff"); \
-// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-delta68.h b/gdb/config/m68k/xm-delta68.h
deleted file mode 100644
index 9b8f0af39ce..00000000000
--- a/gdb/config/m68k/xm-delta68.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// OBSOLETE /* Macro definitions for a Delta.
-// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* I'm running gdb 4.9 under sysV68 R3V7.1.
-// OBSOLETE
-// OBSOLETE On some machines, gdb crashes when it's starting up while calling the
-// OBSOLETE vendor's termio tgetent() routine. It always works when run under
-// OBSOLETE itself (actually, under 3.2, it's not an infinitely recursive bug.)
-// OBSOLETE After some poking around, it appears that depending on the environment
-// OBSOLETE size, or whether you're running YP, or the phase of the moon or something,
-// OBSOLETE the stack is not always long-aligned when main() is called, and tgetent()
-// OBSOLETE takes strong offense at that. On some machines this bug never appears, but
-// OBSOLETE on those where it does, it occurs quite reliably. */
-// OBSOLETE #define ALIGN_STACK_ON_STARTUP
-// OBSOLETE
-// OBSOLETE #define USG
-// OBSOLETE
-// OBSOLETE #define HAVE_TERMIO
diff --git a/gdb/config/m68k/xm-dpx2.h b/gdb/config/m68k/xm-dpx2.h
deleted file mode 100644
index 0a42203ef67..00000000000
--- a/gdb/config/m68k/xm-dpx2.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Bull DPX2.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #define HAVE_TERMIOS
-// OBSOLETE #define USG
diff --git a/gdb/config/m68k/xm-linux.h b/gdb/config/m68k/xm-linux.h
deleted file mode 100644
index e5839b99bbf..00000000000
--- a/gdb/config/m68k/xm-linux.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Native support for linux, for GDB, the GNU debugger.
- Copyright 1996, 1998, 2001 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 XM_LINUX_H
-#define XM_LINUX_H
-
-/* Pick up most of what we need from the generic m68k host include file. */
-
-#include "m68k/xm-m68k.h"
-
-/* 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 HOST_LONG_DOUBLE_FORMAT &floatformat_m68881_ext
-
-#endif /* #ifndef XM_LINUX_H */
diff --git a/gdb/config/m68k/xm-m68k.h b/gdb/config/m68k/xm-m68k.h
deleted file mode 100644
index 5dc40ecb8f7..00000000000
--- a/gdb/config/m68k/xm-m68k.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Macro definitions for running gdb on host machines with m68k cpu's.
- Copyright (C) 1991, Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygint)
-
- 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. */
-
diff --git a/gdb/config/m68k/xm-m68kv4.h b/gdb/config/m68k/xm-m68kv4.h
deleted file mode 100644
index 044371cfa79..00000000000
--- a/gdb/config/m68k/xm-m68kv4.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// OBSOLETE /* Host definitions for GDB on a Motorola 680x0 running SVR4.
-// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
-// OBSOLETE Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
-// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Pick up most of what we need from the generic m68k host include file. */
-// OBSOLETE
-// OBSOLETE #include "m68k/xm-m68k.h"
-// OBSOLETE
-// OBSOLETE /* Pick up more stuff from the generic SVR4 host include file. */
-// OBSOLETE
-// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/m68k/xm-nbsd.h b/gdb/config/m68k/xm-nbsd.h
deleted file mode 100644
index 6c735fa1a8c..00000000000
--- a/gdb/config/m68k/xm-nbsd.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters for execution on a Motorola m68k running NetBSD, for GDB.
- Copyright 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Get generic NetBSD host definitions. */
-#include "config/xm-nbsd.h"
diff --git a/gdb/config/m68k/xm-sun2.h b/gdb/config/m68k/xm-sun2.h
deleted file mode 100644
index f17ad3cb6a1..00000000000
--- a/gdb/config/m68k/xm-sun2.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
-// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* This is the amount to subtract from u.u_ar0
-// OBSOLETE to get the offset in the core file of the register values. */
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0x2800
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Interface definitions for kernel debugger KDB. */
-// OBSOLETE
-// OBSOLETE /* Map machine fault codes into signal numbers.
-// OBSOLETE First subtract 0, divide by 4, then index in a table.
-// OBSOLETE Faults for which the entry in this table is 0
-// OBSOLETE are not handled by KDB; the program's own trap handler
-// OBSOLETE gets to handle then. */
-// OBSOLETE
-// OBSOLETE #define FAULT_CODE_ORIGIN 0
-// OBSOLETE #define FAULT_CODE_UNITS 4
-// OBSOLETE #define FAULT_TABLE \
-// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
-// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
-// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
-// OBSOLETE SIGILL }
-// OBSOLETE
-// OBSOLETE /* Start running with a stack stretching from BEG to END.
-// OBSOLETE BEG and END should be symbols meaningful to the assembler.
-// OBSOLETE This is used only for kdb. */
-// OBSOLETE
-// OBSOLETE #define INIT_STACK(beg, end) \
-// OBSOLETE { asm (".globl end"); \
-// OBSOLETE asm ("movel $ end, sp"); \
-// OBSOLETE asm ("clrl fp"); }
-// OBSOLETE
-// OBSOLETE /* Push the frame pointer register on the stack. */
-// OBSOLETE #define PUSH_FRAME_PTR \
-// OBSOLETE asm ("movel fp, -(sp)");
-// OBSOLETE
-// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
-// OBSOLETE #define POP_FRAME_PTR \
-// OBSOLETE asm ("movl (sp), fp");
-// OBSOLETE
-// OBSOLETE /* After KDB is entered by a fault, push all registers
-// OBSOLETE that GDB thinks about (all NUM_REGS of them),
-// OBSOLETE so that they appear in order of ascending GDB register number.
-// OBSOLETE The fault code will be on the stack beyond the last register. */
-// OBSOLETE
-// OBSOLETE #define PUSH_REGISTERS \
-// OBSOLETE { asm ("clrw -(sp)"); \
-// OBSOLETE asm ("pea 10(sp)"); \
-// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
-// OBSOLETE
-// OBSOLETE /* Assuming the registers (including processor status) have been
-// OBSOLETE pushed on the stack in order of ascending GDB register number,
-// OBSOLETE restore them and return to the address in the saved PC register. */
-// OBSOLETE
-// OBSOLETE #define POP_REGISTERS \
-// OBSOLETE { asm ("subil $8,28(sp)"); \
-// OBSOLETE asm ("movem (sp),$ 0xffff"); \
-// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3.h b/gdb/config/m68k/xm-sun3.h
deleted file mode 100644
index 5f04e024b07..00000000000
--- a/gdb/config/m68k/xm-sun3.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
-// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Interface definitions for kernel debugger KDB. */
-// OBSOLETE
-// OBSOLETE /* Map machine fault codes into signal numbers.
-// OBSOLETE First subtract 0, divide by 4, then index in a table.
-// OBSOLETE Faults for which the entry in this table is 0
-// OBSOLETE are not handled by KDB; the program's own trap handler
-// OBSOLETE gets to handle then. */
-// OBSOLETE
-// OBSOLETE #define FAULT_CODE_ORIGIN 0
-// OBSOLETE #define FAULT_CODE_UNITS 4
-// OBSOLETE #define FAULT_TABLE \
-// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
-// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
-// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
-// OBSOLETE SIGILL }
-// OBSOLETE
-// OBSOLETE /* Start running with a stack stretching from BEG to END.
-// OBSOLETE BEG and END should be symbols meaningful to the assembler.
-// OBSOLETE This is used only for kdb. */
-// OBSOLETE
-// OBSOLETE #define INIT_STACK(beg, end) \
-// OBSOLETE { asm (".globl end"); \
-// OBSOLETE asm ("movel #end, sp"); \
-// OBSOLETE asm ("movel #0,a6"); }
-// OBSOLETE
-// OBSOLETE /* Push the frame pointer register on the stack. */
-// OBSOLETE #define PUSH_FRAME_PTR \
-// OBSOLETE asm ("movel a6,sp@-");
-// OBSOLETE
-// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
-// OBSOLETE #define POP_FRAME_PTR \
-// OBSOLETE asm ("movl sp@,a6");
-// OBSOLETE
-// OBSOLETE /* After KDB is entered by a fault, push all registers
-// OBSOLETE that GDB thinks about (all NUM_REGS of them),
-// OBSOLETE so that they appear in order of ascending GDB register number.
-// OBSOLETE The fault code will be on the stack beyond the last register. */
-// OBSOLETE
-// OBSOLETE #define PUSH_REGISTERS \
-// OBSOLETE { asm ("clrw -(sp)"); \
-// OBSOLETE asm ("pea sp@(10)"); \
-// OBSOLETE asm ("movem #0xfffe,sp@-"); }
-// OBSOLETE
-// OBSOLETE /* Assuming the registers (including processor status) have been
-// OBSOLETE pushed on the stack in order of ascending GDB register number,
-// OBSOLETE restore them and return to the address in the saved PC register. */
-// OBSOLETE
-// OBSOLETE #define POP_REGISTERS \
-// OBSOLETE { asm ("subil #8,sp@(28)"); \
-// OBSOLETE asm ("movem sp@,#0xffff"); \
-// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3os4.h b/gdb/config/m68k/xm-sun3os4.h
deleted file mode 100644
index 5062071999a..00000000000
--- a/gdb/config/m68k/xm-sun3os4.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// OBSOLETE /* Macro definitions for a sun 3 running os 4.
-// OBSOLETE Copyright 1989, 1996, 1998 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "m68k/xm-sun3.h"
-// OBSOLETE #define FPU
diff --git a/gdb/config/m88k/obsd.mh b/gdb/config/m88k/obsd.mh
new file mode 100644
index 00000000000..e9281bcecd7
--- /dev/null
+++ b/gdb/config/m88k/obsd.mh
@@ -0,0 +1,3 @@
+# Host: OpenBSD/m88k
+NATDEPFILES= m88kbsd-nat.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= config/nm-bsd.h
diff --git a/gdb/config/m88k/obsd.mt b/gdb/config/m88k/obsd.mt
new file mode 100644
index 00000000000..36e61bbadac
--- /dev/null
+++ b/gdb/config/m88k/obsd.mt
@@ -0,0 +1,2 @@
+# Target: OpenBSD/m88k
+TDEPFILES= m88k-tdep.o corelow.o
diff --git a/gdb/config/mips/decstation.mh b/gdb/config/mips/decstation.mh
deleted file mode 100644
index 63de3da10b5..00000000000
--- a/gdb/config/mips/decstation.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
-# OBSOLETE XM_FILE= xm-mips.h
-# OBSOLETE NAT_FILE= nm-mips.h
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o corelow.o mips-nat.o fork-child.o
diff --git a/gdb/config/mips/embed.mt b/gdb/config/mips/embed.mt
index 3dad52bd920..c1cabfe71a1 100644
--- a/gdb/config/mips/embed.mt
+++ b/gdb/config/mips/embed.mt
@@ -1,4 +1,4 @@
TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-mips.h
+DEPRECATED_TM_FILE= tm-mips.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/irix5.mh b/gdb/config/mips/irix5.mh
index 12690b0bc8b..38c9b3045ed 100644
--- a/gdb/config/mips/irix5.mh
+++ b/gdb/config/mips/irix5.mh
@@ -1,7 +1,4 @@
# Host: SGI Iris running irix 5.x
-XM_FILE= xm-irix5.h
NAT_FILE= nm-irix5.h
NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
-
-XM_CLIBS=-lbsd -lsun
diff --git a/gdb/config/mips/irix5.mt b/gdb/config/mips/irix5.mt
index 81e0f159eba..56995896648 100644
--- a/gdb/config/mips/irix5.mt
+++ b/gdb/config/mips/irix5.mt
@@ -1,3 +1,3 @@
# Target: MIPS SGI running Irix 5
TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
-TM_FILE= tm-irix5.h
+DEPRECATED_TM_FILE= tm-mips.h
diff --git a/gdb/config/mips/irix6.mh b/gdb/config/mips/irix6.mh
index 141bff6a887..de14401d6a6 100644
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,7 +1,4 @@
# Host: SGI Iris running irix 6.x
-XM_FILE= xm-irix5.h
NAT_FILE= nm-irix5.h
NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
-
-XM_CLIBS=-lbsd
diff --git a/gdb/config/mips/irix6.mt b/gdb/config/mips/irix6.mt
index 3a5a77442ea..dde6a0775ad 100644
--- a/gdb/config/mips/irix6.mt
+++ b/gdb/config/mips/irix6.mt
@@ -1,3 +1,3 @@
# Target: MIPS SGI running Irix 6.x
TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
-TM_FILE= tm-irix6.h
+DEPRECATED_TM_FILE= tm-mips.h
diff --git a/gdb/config/mips/linux.mt b/gdb/config/mips/linux.mt
index 25d99b370ca..bcad141b5d2 100644
--- a/gdb/config/mips/linux.mt
+++ b/gdb/config/mips/linux.mt
@@ -1,7 +1,7 @@
# Target: Linux/MIPS
TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
solib.o solib-svr4.o
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/littlemips.mh b/gdb/config/mips/littlemips.mh
deleted file mode 100644
index 30c40ad847c..00000000000
--- a/gdb/config/mips/littlemips.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-# OBSOLETE XM_FILE= xm-mips.h
diff --git a/gdb/config/mips/mipsv4.mh b/gdb/config/mips/mipsv4.mh
deleted file mode 100644
index 1a6104b3f94..00000000000
--- a/gdb/config/mips/mipsv4.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: Mips running SVR4
-XM_FILE= xm-mipsv4.h
-NAT_FILE= ../nm-sysv4.h
-NATDEPFILES= fork-child.o mipsv4-nat.o corelow.o core-regset.o \
- solib.o solib-svr4.o solib-legacy.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/mips/mipsv4.mt b/gdb/config/mips/mipsv4.mt
deleted file mode 100644
index 13320c20ae6..00000000000
--- a/gdb/config/mips/mipsv4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: MIPS running SVR4
-# OBSOLETE TDEPFILES= mips-tdep.o
-# OBSOLETE TM_FILE= tm-mipsv4.h
diff --git a/gdb/config/mips/nbsd.mh b/gdb/config/mips/nbsd.mh
index 4556fc60b27..5209d29bf39 100644
--- a/gdb/config/mips/nbsd.mh
+++ b/gdb/config/mips/nbsd.mh
@@ -1,4 +1,4 @@
# Host: MIPS running NetBSD
NAT_CLIBS=
NATDEPFILES= infptrace.o inftarg.o fork-child.o mipsnbsd-nat.o
-NAT_FILE= nm-nbsd.h
+NAT_FILE= config/nm-nbsd.h
diff --git a/gdb/config/mips/nbsd.mt b/gdb/config/mips/nbsd.mt
index eb5d8871d79..119a7f0a92a 100644
--- a/gdb/config/mips/nbsd.mt
+++ b/gdb/config/mips/nbsd.mt
@@ -1,7 +1,7 @@
# Target: MIPS running NetBSD
TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o \
nbsd-tdep.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= tm-nbsd.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/news-mips.mh b/gdb/config/mips/news-mips.mh
deleted file mode 100644
index f2c7f89b3ed..00000000000
--- a/gdb/config/mips/news-mips.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Host: Big-endian MIPS machine such as Sony News
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-# OBSOLETE NAT_FILE= nm-news-mips.h
diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h
index 6bdab300b19..33a8a8ce924 100644
--- a/gdb/config/mips/nm-irix5.h
+++ b/gdb/config/mips/nm-irix5.h
@@ -45,3 +45,10 @@ extern int procfs_stopped_by_watchpoint (ptid_t);
extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
+
+/* Override register locations in upage for SGI machines */
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+ if (regno < PC_REGNUM) \
+ addr = regno; \
+ else \
+ addr = regno + NSIG_HNDLRS; /* Skip over signal handlers */
diff --git a/gdb/config/mips/nm-mips.h b/gdb/config/mips/nm-mips.h
deleted file mode 100644
index f20ddf1d466..00000000000
--- a/gdb/config/mips/nm-mips.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// OBSOLETE /* Native definitions for GDB on DECstations, Sony News. and MIPS Riscos systems
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1995, 1996, 2000
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
-// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* Figure out where the longjmp will land. We expect that we have just entered
-// OBSOLETE longjmp and haven't yet setup the stack frame, so the args are still in the
-// OBSOLETE argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we
-// OBSOLETE extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
-// OBSOLETE This routine returns true on success */
-// OBSOLETE
-// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-// OBSOLETE extern int get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/mips/nm-nbsd.h b/gdb/config/mips/nm-nbsd.h
deleted file mode 100644
index 67628c2fa97..00000000000
--- a/gdb/config/mips/nm-nbsd.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Native-dependent definitions for NetBSD/mips.
- Copyright 2002 Free Software Foundation, Inc.
- Contributed by Wasabi Systems, 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 NM_NBSD_H
-#define NM_NBSD_H
-
-/* Get generic NetBSD native definitions. */
-#include "config/nm-nbsd.h"
-
-#endif /* NM_NBSD_H */
diff --git a/gdb/config/mips/nm-news-mips.h b/gdb/config/mips/nm-news-mips.h
deleted file mode 100644
index 15d9b7b2c36..00000000000
--- a/gdb/config/mips/nm-news-mips.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1996 Free Software Foundation, Inc.
-// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
-// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef NM_NEWS_MIPS_H
-// OBSOLETE #define NM_NEWS_MIPS_H 1
-// OBSOLETE
-// OBSOLETE /* Needed for RISC NEWS core files. */
-// OBSOLETE #include <machine/machparam.h>
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE #define KERNEL_U_ADDR UADDR
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
-// OBSOLETE else addr = 0; /* ..somewhere in the pcb */
-// OBSOLETE
-// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-// OBSOLETE #define ONE_PROCESS_WRITETEXT
-// OBSOLETE
-// OBSOLETE #include "mips/nm-mips.h"
-// OBSOLETE
-// OBSOLETE /* Apparently not in <sys/types.h> */
-// OBSOLETE typedef int pid_t;
-// OBSOLETE
-// OBSOLETE #endif /* NM_NEWS_MIPS_H */
diff --git a/gdb/config/mips/nm-riscos.h b/gdb/config/mips/nm-riscos.h
deleted file mode 100644
index dba51b2775c..00000000000
--- a/gdb/config/mips/nm-riscos.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// OBSOLETE /* This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* MIPS running RISC/os 4.52C. */
-// OBSOLETE
-// OBSOLETE #define PCB_OFFSET(FIELD) ((int)&((struct user*)0)->u_pcb.FIELD)
-// OBSOLETE
-// OBSOLETE /* RISC/os 5.0 defines this in machparam.h. */
-// OBSOLETE #include <bsd43/machine/machparam.h>
-// OBSOLETE #define NBPG BSD43_NBPG
-// OBSOLETE #define UPAGES BSD43_UPAGES
-// OBSOLETE
-// OBSOLETE /* Where is this used? I don't see any uses in mips-nat.c, and I don't think
-// OBSOLETE the uses in infptrace.c are used if FETCH_INFERIOR_REGISTERS is defined.
-// OBSOLETE Does the compiler react badly to "extern CORE_ADDR kernel_u_addr" (even
-// OBSOLETE if never referenced)? */
-// OBSOLETE #define KERNEL_U_ADDR BSD43_UADDR
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE if (regno < FP0_REGNUM) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*((regno)+EF_AT-1); \
-// OBSOLETE else if (regno < PC_REGNUM) \
-// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
-// OBSOLETE else if (regno == PS_REGNUM) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->badvaddr) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->lo) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->hi) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->cause) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->pc) \
-// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
-// OBSOLETE else if (regno < mips_regnum (current_gdbarch)->fp_control_status) \
-// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_control_status) \
-// OBSOLETE addr = PCB_OFFSET(pcb_fpc_csr); \
-// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) \
-// OBSOLETE addr = PCB_OFFSET(pcb_fpc_eir); \
-// OBSOLETE else \
-// OBSOLETE addr = 0;
-// OBSOLETE
-// OBSOLETE #include "mips/nm-mips.h"
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/mips/riscos.mh b/gdb/config/mips/riscos.mh
deleted file mode 100644
index 0a1c31c65f1..00000000000
--- a/gdb/config/mips/riscos.mh
+++ /dev/null
@@ -1,16 +0,0 @@
-# OBSOLETE # Host: MIPS running RISC/os
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-riscos.h
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-riscos.h
-# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-# OBSOLETE
-# OBSOLETE MH_CFLAGS=-Wf,-XNh10000
-# OBSOLETE
-# OBSOLETE # ptrace(2) apparently has problems in the BSD environment. No workaround is
-# OBSOLETE # known except to select the sysv environment. Could we use /proc instead?
-# OBSOLETE # These "sysv environments" and "bsd environments" often end up being a pain.
-# OBSOLETE #
-# OBSOLETE # This is not part of CFLAGS because perhaps not all C compilers have this
-# OBSOLETE # option.
-# OBSOLETE CC= cc -systype sysv
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
deleted file mode 100644
index ff40d66e735..00000000000
--- a/gdb/config/mips/tm-irix5.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Target machine description for SGI Iris under Irix 5, for GDB.
-
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 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 "mips/tm-mips.h"
-
-/* Offsets for register values in _sigtramp frame.
- sigcontext is immediately above the _sigtramp frame on Irix. */
-#define SIGFRAME_BASE 0x0
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4)
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4)
-
-/* The signal handler trampoline is called _sigtramp. */
-#undef DEPRECATED_IN_SIGTRAMP
-#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
-
-/* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to
- get to the saved PC (the register mask and status register are both
- 32 bits) and then another 4 to get to the lower 32 bits. We skip
- the same 4 bytes, plus the 8 bytes for the PC to get to the
- registers, and add another 4 to get to the lower 32 bits. We skip
- 8 bytes per register. */
-#undef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4 + 4)
-#undef SIGFRAME_REGSAVE_OFF
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
-#undef SIGFRAME_FPREGSAVE_OFF
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
deleted file mode 100644
index 88abf806c4d..00000000000
--- a/gdb/config/mips/tm-irix6.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Target machine description for SGI Iris under Irix 6.x, for GDB.
-
- Copyright 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 "mips/tm-mips.h"
-#include "solib.h"
-
-/* The signal handler trampoline is called _sigtramp. */
-#undef DEPRECATED_IN_SIGTRAMP
-#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
-
-/* Offsets for register values in _sigtramp frame.
- sigcontext is immediately above the _sigtramp frame on Irix. */
-#undef SIGFRAME_BASE
-#define SIGFRAME_BASE 0
-
-/* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to
- get to the saved PC (the register mask and status register are both
- 32 bits) and then another 4 to get to the lower 32 bits. We skip
- the same 4 bytes, plus the 8 bytes for the PC to get to the
- registers, and add another 4 to get to the lower 32 bits. We skip
- 8 bytes per register. */
-#undef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4 + 4)
-#undef SIGFRAME_REGSAVE_OFF
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
-#undef SIGFRAME_FPREGSAVE_OFF
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
diff --git a/gdb/config/mips/tm-linux.h b/gdb/config/mips/tm-linux.h
index 4227cd3e426..7b10e4e6d54 100644
--- a/gdb/config/mips/tm-linux.h
+++ b/gdb/config/mips/tm-linux.h
@@ -44,11 +44,6 @@
#define SOFTWARE_SINGLE_STEP_P() 1
#define SOFTWARE_SINGLE_STEP(sig,bp_p) mips_software_single_step (sig, bp_p)
-/* FIXME: This still needs to be implemented. */
-
-#undef DEPRECATED_IN_SIGTRAMP
-#define DEPRECATED_IN_SIGTRAMP(pc, name) (0)
-
#undef IN_SOLIB_DYNSYM_RESOLVE_CODE
#define IN_SOLIB_DYNSYM_RESOLVE_CODE(PC) mips_linux_in_dynsym_resolve_code (PC)
int mips_linux_in_dynsym_resolve_code (CORE_ADDR pc);
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index be0d6b75eb1..040ab157059 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -26,8 +26,6 @@
#ifndef TM_MIPS_H
#define TM_MIPS_H 1
-#define GDB_MULTI_ARCH 1
-
#include "regcache.h"
struct frame_info;
@@ -56,7 +54,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define V0_REGNUM 2 /* Function integer return value */
#define A0_REGNUM 4 /* Loc of first arg during a subr call */
#define T9_REGNUM 25 /* Contains address of callee in PIC */
-#define SP_REGNUM 29 /* Contains address of top of stack */
#define RA_REGNUM 31 /* Contains return address value */
#define PS_REGNUM 32 /* Contains processor status */
#define UNUSED_REGNUM 73 /* Never used, FIXME */
@@ -99,12 +96,8 @@ typedef struct mips_extra_func_info
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-/* 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);
-
/* Functions for dealing with MIPS16 call and return stubs. */
-#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
+#define DEPRECATED_IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
/* Definitions and declarations used by mips-tdep.c and remote-mips.c */
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
deleted file mode 100644
index 94607414f3b..00000000000
--- a/gdb/config/mips/tm-mipsv4.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// OBSOLETE /* Target machine description for MIPS running SVR4, for GDB.
-// OBSOLETE Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "mips/tm-mips.h"
-// OBSOLETE #include "config/tm-sysv4.h"
-// OBSOLETE
-// OBSOLETE /* The signal handler trampoline is called _sigtramp. */
-// OBSOLETE #undef IN_SIGTRAMP
-// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
-// OBSOLETE
-// OBSOLETE /* On entry to the signal handler trampoline, an ucontext is already
-// OBSOLETE pushed on the stack. We can get at the saved registers via the
-// OBSOLETE mcontext which is contained within the ucontext. */
-// OBSOLETE #define SIGFRAME_BASE 0
-// OBSOLETE #define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 40)
-// OBSOLETE #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
-// OBSOLETE #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
-// OBSOLETE
-// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
-// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
diff --git a/gdb/config/mips/tm-nbsd.h b/gdb/config/mips/tm-nbsd.h
index eb8e292e2dc..209e28e6116 100644
--- a/gdb/config/mips/tm-nbsd.h
+++ b/gdb/config/mips/tm-nbsd.h
@@ -29,9 +29,6 @@
#undef IN_SOLIB_CALL_TRAMPOLINE
#undef IN_SOLIB_RETURN_TRAMPOLINE
#undef SKIP_TRAMPOLINE_CODE
-#undef IGNORE_HELPER_CALL
-
-/* XXX undef a bunch of stuff we want to use multi-arch */
-#undef DEPRECATED_IN_SIGTRAMP
+#undef DEPRECATED_IGNORE_HELPER_CALL
#endif /* TM_NBSD_H */
diff --git a/gdb/config/mips/vxmips.mt b/gdb/config/mips/vxmips.mt
index a20cf96ab72..1fa433876eb 100644
--- a/gdb/config/mips/vxmips.mt
+++ b/gdb/config/mips/vxmips.mt
@@ -1,3 +1,3 @@
# Target: MIPS running VxWorks
TDEPFILES= mips-tdep.o remote-vx.o remote-vxmips.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
-TM_FILE= tm-vxmips.h
+DEPRECATED_TM_FILE= tm-vxmips.h
diff --git a/gdb/config/mips/wince.mt b/gdb/config/mips/wince.mt
index 6aa5733808a..82ec9ff41f4 100644
--- a/gdb/config/mips/wince.mt
+++ b/gdb/config/mips/wince.mt
@@ -1,5 +1,5 @@
# Target: Little-endian MIPS machine such as DECstation.
TDEPFILES= mips-tdep.o wince.o
-TM_FILE= tm-wince.h
+DEPRECATED_TM_FILE= tm-wince.h
MT_CFLAGS=-DMIPS -U_X86_ -U_M_IX86 -U__i386__ -U__i486__ -U__i586__ -U__i686__ -DUNICODE -D_WIN32_WCE -DWINCE_STUB='"${target_alias}-stub.exe"'
TM_CLIBS=-lrapi
diff --git a/gdb/config/mips/xm-irix5.h b/gdb/config/mips/xm-irix5.h
deleted file mode 100644
index 7d61ff059cc..00000000000
--- a/gdb/config/mips/xm-irix5.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Definitions for irix5 hosting support.
-
- Copyright 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "config/xm-sysv4.h"
-
-/* Override register locations in upage for SGI machines */
-#undef REGISTER_U_ADDR
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < PC_REGNUM) \
- addr = regno; \
- else \
- addr = regno + NSIG_HNDLRS; /* Skip over signal handlers */
-
-/* This enables reliable signals (and the associated setjmp/longjmp), and gives
- bsdish prototypes for getpgrp/setpgrg/setgroups and initgroups. */
-#define _BSD_COMPAT
diff --git a/gdb/config/mips/xm-mips.h b/gdb/config/mips/xm-mips.h
deleted file mode 100644
index bc3aa6e40c4..00000000000
--- a/gdb/config/mips/xm-mips.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
-// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifdef ultrix
-// OBSOLETE /* Needed for DECstation core files. */
-// OBSOLETE #include <machine/param.h>
-// OBSOLETE #define KERNEL_U_ADDR UADDR
-// OBSOLETE
-// OBSOLETE /* Native Ultrix cc has broken long long support. */
-// OBSOLETE #ifndef __GNUC__
-// OBSOLETE #undef CC_HAS_LONG_LONG
-// OBSOLETE #endif
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE #if ! defined (__GNUC__) && ! defined (offsetof)
-// OBSOLETE #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Only used for core files on DECstations.
-// OBSOLETE First four registers at u.u_ar0 are saved arguments, and
-// OBSOLETE there is no r0 saved. Float registers are saved
-// OBSOLETE in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { \
-// OBSOLETE if (regno < FP0_REGNUM) \
-// OBSOLETE addr = blockend + sizeof(int) * (4 + regno - 1); \
-// OBSOLETE else \
-// OBSOLETE addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
-// OBSOLETE sizeof (int) * (regno - FP0_REGNUM); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-// OBSOLETE #define ONE_PROCESS_WRITETEXT
-// OBSOLETE
-// OBSOLETE /* HAVE_SGTTY also works, last we tried.
-// OBSOLETE
-// OBSOLETE But we have termios, at least as of Ultrix 4.2A, so use it. */
-// OBSOLETE #define HAVE_TERMIOS
diff --git a/gdb/config/mips/xm-mipsv4.h b/gdb/config/mips/xm-mipsv4.h
deleted file mode 100644
index 1f39e31ae1d..00000000000
--- a/gdb/config/mips/xm-mipsv4.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// OBSOLETE /* Definitions for MIPS running SVR4 hosting support.
-// OBSOLETE
-// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/mips/xm-riscos.h b/gdb/config/mips/xm-riscos.h
deleted file mode 100644
index d8a65334a66..00000000000
--- a/gdb/config/mips/xm-riscos.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// OBSOLETE /* Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #define HAVE_TERMIO
-// OBSOLETE
-// OBSOLETE #define USG 1
-// OBSOLETE
-// OBSOLETE /* setjmp.h requires uid_t. */
-// OBSOLETE #include <sys/types.h>
diff --git a/gdb/config/nm-bsd.h b/gdb/config/nm-bsd.h
index b44dd5eff1d..6597d0edabe 100644
--- a/gdb/config/nm-bsd.h
+++ b/gdb/config/nm-bsd.h
@@ -19,11 +19,5 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
#define FETCH_INFERIOR_REGISTERS
-
-/* We can attach and detach. */
-#define ATTACH_DETACH
diff --git a/gdb/config/nm-gnu.h b/gdb/config/nm-gnu.h
index 73a41803cf8..b64af737d10 100644
--- a/gdb/config/nm-gnu.h
+++ b/gdb/config/nm-gnu.h
@@ -30,14 +30,12 @@
extern char *gnu_target_pid_to_str (int pid);
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, deprecated_register_bytes ())
/* Don't do wait_for_inferior on attach. */
#define ATTACH_NO_WAIT
/* Use SVR4 style shared library support */
-#define SVR4_SHARED_LIBS
#include "solib.h"
-#define NO_CORE_OPS
#endif /* __NM_GNU_H__ */
diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h
index 950e5afb8a9..870e40d34dc 100644
--- a/gdb/config/nm-linux.h
+++ b/gdb/config/nm-linux.h
@@ -24,9 +24,6 @@ struct target_ops;
/* GNU/Linux is SVR4-ish but its /proc file system isn't. */
#undef USE_PROC_FS
-/* Tell GDB that we can attach and detach other processes. */
-#define ATTACH_DETACH
-
/* Since we're building a native debugger, we can include <signal.h>
to find the range of real-time signals. */
@@ -41,7 +38,6 @@ struct target_ops;
style shared libraries. */
#ifdef HAVE_LINK_H
-#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
#endif
@@ -57,10 +53,6 @@ extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
extern void lin_thread_get_thread_signals (sigset_t *mask);
#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
-/* Defined to make stepping-over-breakpoints be thread-atomic. */
-#define USE_THREAD_STEP_NEEDED 1
-
-
/* Use elf_gregset_t and elf_fpregset_t, rather than
gregset_t and fpregset_t. */
diff --git a/gdb/config/nm-nbsd.h b/gdb/config/nm-nbsd.h
index 5078c567968..72f49c971e9 100644
--- a/gdb/config/nm-nbsd.h
+++ b/gdb/config/nm-nbsd.h
@@ -1,5 +1,6 @@
/* Native-dependent definitions for NetBSD.
- Copyright 1994, 1996, 1999 Free Software Foundation, Inc.
+
+ Copyright 1994, 1996, 1999, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,10 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define PTRACE_ARG3_TYPE char*
-
#define FETCH_INFERIOR_REGISTERS
-#define ATTACH_DETACH
-
#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/nm-sysv4.h b/gdb/config/nm-sysv4.h
index 4b4f09897bc..ca281c92950 100644
--- a/gdb/config/nm-sysv4.h
+++ b/gdb/config/nm-sysv4.h
@@ -21,14 +21,8 @@
/* Use SVR4 style shared library support */
-#define SVR4_SHARED_LIBS
#include "solib.h"
/* SVR4 has /proc support, so use it instead of ptrace. */
#define USE_PROC_FS
-
-/* SVR4 machines can easily do attach and detach via /proc (procfs.c)
- support */
-
-#define ATTACH_DETACH
diff --git a/gdb/config/ns32k/nbsdaout.mh b/gdb/config/ns32k/nbsdaout.mh
index 8cf47816a1e..db6fb9a840f 100644
--- a/gdb/config/ns32k/nbsdaout.mh
+++ b/gdb/config/ns32k/nbsdaout.mh
@@ -1,5 +1,4 @@
# Host: PC532 running NetBSD
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o ns32knbsd-nat.o \
solib.o solib-sunos.o
-XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdaout.h
diff --git a/gdb/config/ns32k/nbsdaout.mt b/gdb/config/ns32k/nbsdaout.mt
index e2d68d01091..130c2605222 100644
--- a/gdb/config/ns32k/nbsdaout.mt
+++ b/gdb/config/ns32k/nbsdaout.mt
@@ -1,3 +1,3 @@
# Target: PC532 running NetBSD
TDEPFILES= ns32k-tdep.o ns32knbsd-tdep.o
-TM_FILE= tm-ns32k.h
+DEPRECATED_TM_FILE= tm-ns32k.h
diff --git a/gdb/config/ns32k/xm-nbsd.h b/gdb/config/ns32k/xm-nbsd.h
deleted file mode 100644
index 962664b70b9..00000000000
--- a/gdb/config/ns32k/xm-nbsd.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters for execution on a ns32k running NetBSD, for GDB.
- Copyright 1994 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. */
-
-/* Get generic NetBSD host definitions. */
-#include "config/xm-nbsd.h"
diff --git a/gdb/config/pa/hppa.mt b/gdb/config/pa/hppa.mt
index be778922f34..5ba51fab90d 100644
--- a/gdb/config/pa/hppa.mt
+++ b/gdb/config/pa/hppa.mt
@@ -1,2 +1,2 @@
TDEPFILES= hppa-tdep.o
-TM_FILE= tm-hppa.h
+DEPRECATED_TM_FILE= tm-hppa.h
diff --git a/gdb/config/pa/hppa64.mt b/gdb/config/pa/hppa64.mt
index 10d9fc67129..f7baa4a6703 100644
--- a/gdb/config/pa/hppa64.mt
+++ b/gdb/config/pa/hppa64.mt
@@ -1,3 +1,3 @@
# Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o
-TM_FILE= tm-hppa64.h
+DEPRECATED_TM_FILE= tm-hppa64.h
diff --git a/gdb/config/pa/hppahpux.mh b/gdb/config/pa/hppahpux.mh
index c0520576afb..b80a085c888 100644
--- a/gdb/config/pa/hppahpux.mh
+++ b/gdb/config/pa/hppahpux.mh
@@ -1,7 +1,5 @@
# Host: Hewlett-Packard PA-RISC machine, running HPUX
-XM_FILE= xm-hppah.h
-
NAT_FILE= nm-hppah.h
NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
diff --git a/gdb/config/pa/hppahpux.mt b/gdb/config/pa/hppahpux.mt
index 806e91c7f4d..f997d89891b 100644
--- a/gdb/config/pa/hppahpux.mt
+++ b/gdb/config/pa/hppahpux.mt
@@ -1,3 +1,3 @@
# Target: HP PA-RISC running hpux
TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o
-TM_FILE= tm-hppah.h
+DEPRECATED_TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/hpux1020.mh b/gdb/config/pa/hpux1020.mh
index 18f542ee885..9a727eb67c6 100644
--- a/gdb/config/pa/hpux1020.mh
+++ b/gdb/config/pa/hpux1020.mh
@@ -6,8 +6,6 @@
MH_CFLAGS = -D__HP_CURSES -Dvfork=fork
-XM_FILE= xm-hppah.h
-
NAT_FILE= nm-hppah.h
NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infptrace.o somread.o hpread.o somsolib.o
diff --git a/gdb/config/pa/hpux11.mh b/gdb/config/pa/hpux11.mh
index 25504e030c9..b5466ffa1f7 100644
--- a/gdb/config/pa/hpux11.mh
+++ b/gdb/config/pa/hpux11.mh
@@ -6,8 +6,6 @@
MH_CFLAGS = -D__HP_CURSES -Dvfork=fork
-XM_FILE= xm-hppah.h
-
NAT_FILE= nm-hppah11.h
NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o somread.o hpread.o somsolib.o
diff --git a/gdb/config/pa/hpux11w.mh b/gdb/config/pa/hpux11w.mh
index cd897aa866b..c59f3fc78b5 100644
--- a/gdb/config/pa/hpux11w.mh
+++ b/gdb/config/pa/hpux11w.mh
@@ -6,8 +6,6 @@
MH_CFLAGS = -D__HP_CURSES -Dvfork=fork
-XM_FILE= xm-hppah.h
-
NAT_FILE= nm-hppah11.h
NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o hpread.o pa64solib.o solib.o
diff --git a/gdb/config/pa/linux.mh b/gdb/config/pa/linux.mh
new file mode 100644
index 00000000000..596857c0b9c
--- /dev/null
+++ b/gdb/config/pa/linux.mh
@@ -0,0 +1,8 @@
+# Host: Hewlett-Packard PA-RISC machine, running Linux
+XDEPFILES=
+NAT_FILE= nm-linux.h
+NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o gcore.o \
+ core-regset.o hppa-linux-nat.o linux-proc.o \
+ proc-service.o thread-db.o lin-lwp.o linux-nat.o
+
+LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/pa/linux.mt b/gdb/config/pa/linux.mt
new file mode 100644
index 00000000000..d2168668559
--- /dev/null
+++ b/gdb/config/pa/linux.mt
@@ -0,0 +1,3 @@
+# Target: HP PA-RISC running Linux
+TDEPFILES= hppa-tdep.o hppa-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE=tm-linux.h
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index bf4fd3c475f..24d02567136 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -41,10 +41,6 @@ struct target_ops;
So I don't feel the least bit guilty about this. */
#define PTRACE_ARG3_TYPE CORE_ADDR
-/* HPUX 8.0, in its infinite wisdom, has chosen to prototype ptrace
- with five arguments, so programs written for normal ptrace lose. */
-#define FIVE_ARG_PTRACE
-
/* We need to figure out where the text region is so that we use the
appropriate ptrace operator to manipulate text. Simply
reading/writing user space will crap out HPUX. */
@@ -91,15 +87,6 @@ extern int hppa_require_detach (int, int);
#define PT_WRITE_I PT_WIUSER
#define PT_WRITE_D PT_WDUSER
-/* attach/detach works to some extent under BSD and HPUX. So long
- as the process you're attaching to isn't blocked waiting on io,
- blocked waiting on a signal, or in a system call things work
- fine. (The problems in those cases are related to the fact that
- the kernel can't provide complete register information for the
- target process... Which really pisses off GDB.) */
-
-#define ATTACH_DETACH
-
/* In infptrace or infttrace.c: */
/* Starting with HP-UX 10.30, support is provided (in the form of
@@ -111,8 +98,6 @@ extern int hppa_require_detach (int, int);
10.20 will at least link. However, the "can I use a fast watchpoint?"
query will always return "No" for 10.20. */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
/* The PA can watch any number of locations (generic routines already check
that all intermediates are in watchable memory locations). */
extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot);
@@ -126,31 +111,6 @@ extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot);
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
(1)
-/* However, some addresses may not be profitable to use hardware to watch,
- or may be difficult to understand when the addressed object is out of
- scope, and hence should be unwatched. On some targets, this may have
- severe performance penalties, such that we might as well use regular
- watchpoints, and save (possibly precious) hardware watchpoints for other
- locations.
-
- On HP-UX, we choose not to watch stack-based addresses, because
-
- [1] Our implementation relies on page protection traps. The granularity
- of these is large and so can generate many false hits, which are expensive
- to respond to.
-
- [2] Watches of "*p" where we may not know the symbol that p points to,
- make it difficult to know when the addressed object is out of scope, and
- hence shouldn't be watched. Page protection that isn't removed when the
- addressed object is out of scope will either degrade execution speed
- (false hits) or give false triggers (when the address is recycled by
- other calls).
-
- Since either of these points results in a slow-running inferior, we might
- as well use normal watchpoints, aka single-step & test. */
-#define TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT(pid,start,len) \
- hppa_range_profitable_for_hw_watchpoint(pid, start, (LONGEST)(len))
-
/* On HP-UX, we're using page-protection to implement hardware watchpoints.
When an instruction attempts to write to a write-protected memory page,
a SIGBUS is raised. At that point, the write has not actually occurred.
@@ -258,10 +218,6 @@ extern int hppa_resume_execd_vforking_child_to_get_parent_vfork (void);
#define HPUXHPPA
-#define MAY_SWITCH_FROM_INFERIOR_PID (1)
-
#define MAY_FOLLOW_EXEC (1)
-#define USE_THREAD_STEP_NEEDED (1)
-
#include "infttrace.h" /* For parent_attach_all. */
diff --git a/gdb/config/ia64/xm-linux.h b/gdb/config/pa/nm-linux.h
index adf6b21b4cc..08b79156aab 100644
--- a/gdb/config/ia64/xm-linux.h
+++ b/gdb/config/pa/nm-linux.h
@@ -1,5 +1,5 @@
/* Native support for GNU/Linux, for GDB, the GNU debugger.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,11 +18,15 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef XM_LINUX_H
-#define XM_LINUX_H
+#ifndef PA_NM_LINUX_H
+#define PA_NM_LINUX_H
-/* 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
+#include "config/nm-linux.h"
+
+#define U_REGS_OFFSET 0
+
+/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
+#define FETCH_INFERIOR_REGISTERS
+
+#endif
-#endif /* #ifndef XM_LINUX_H */
diff --git a/gdb/config/pa/obsd.mh b/gdb/config/pa/obsd.mh
new file mode 100644
index 00000000000..2c3dba97f59
--- /dev/null
+++ b/gdb/config/pa/obsd.mh
@@ -0,0 +1,3 @@
+# Host: OpenBSD/hppa
+NATDEPFILES= fork-child.o infptrace.o inftarg.o hppabsd-nat.o
+NAT_FILE= config/nm-bsd.h
diff --git a/gdb/config/pa/obsd.mt b/gdb/config/pa/obsd.mt
new file mode 100644
index 00000000000..b7a6888b4fc
--- /dev/null
+++ b/gdb/config/pa/obsd.mt
@@ -0,0 +1,3 @@
+# Target: OpenBSD/hppa
+TDEPFILES= hppa-tdep.o hppabsd-tdep.o corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 1a78c6ceb6f..efcf99764da 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -26,72 +26,8 @@
#include "regcache.h"
-#define GDB_MULTI_ARCH 1
-
-/* Hack, get around problem with including "arch-utils.h". */
-struct frame_info;
-
-/* Forward declarations of some types we use in prototypes */
-
-struct frame_info;
-struct frame_saved_regs;
-struct value;
-struct type;
-struct inferior_status;
-
-/* Sequence of bytes for breakpoint instruction. */
-
-const unsigned char *hppa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr);
-#define BREAKPOINT_FROM_PC(PCPTR,LENPTR) hppa_breakpoint_from_pc ((PCPTR), (LENPTR))
-#define BREAKPOINT32 0x10004
-
extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
-#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define R0_REGNUM 0 /* Doesn't actually exist, used as base for
- other r registers. */
-#define FLAGS_REGNUM 0 /* Various status flags */
-#define RP_REGNUM 2 /* return pointer */
-#define HPPA_FP_REGNUM 3 /* The ABI's frame pointer, when used */
-#define HPPA_SP_REGNUM 30 /* Stack pointer. */
-#define SAR_REGNUM 32 /* Shift Amount Register */
-#define IPSW_REGNUM 41 /* Interrupt Processor Status Word */
-#define PCOQ_HEAD_REGNUM 33 /* instruction offset queue head */
-#define PCSQ_HEAD_REGNUM 34 /* instruction space queue head */
-#define PCOQ_TAIL_REGNUM 35 /* instruction offset queue tail */
-#define PCSQ_TAIL_REGNUM 36 /* instruction space queue tail */
-#define EIEM_REGNUM 37 /* External Interrupt Enable Mask */
-#define IIR_REGNUM 38 /* Interrupt Instruction Register */
-#define IOR_REGNUM 40 /* Interrupt Offset Register */
-#define SR4_REGNUM 43 /* space register 4 */
-#define RCR_REGNUM 51 /* Recover Counter (also known as cr0) */
-#define CCR_REGNUM 54 /* Coprocessor Configuration Register */
-#define TR0_REGNUM 57 /* Temporary Registers (cr24 -> cr31) */
-#define CR27_REGNUM 60 /* Base register for thread-local storage, cr27 */
-#define HPPA_FP0_REGNUM 64 /* First floating-point. */
-#define FP4_REGNUM 72
-
-#define ARG0_REGNUM 26 /* The first argument of a callee. */
-#define ARG1_REGNUM 25 /* The second argument of a callee. */
-#define ARG2_REGNUM 24 /* The third argument of a callee. */
-#define ARG3_REGNUM 23 /* The fourth argument of a callee. */
-
-/* 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. */
-
-#define DEPRECATED_CLEAN_UP_REGISTER_VALUE(regno, buf) \
- do { \
- if ((regno) == PCOQ_HEAD_REGNUM || (regno) == PCOQ_TAIL_REGNUM) \
- (buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
- } while (0)
+#define DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
/* PA specific macro to see if the current instruction is nullified. */
#ifndef INSTRUCTION_NULLIFIED
@@ -99,115 +35,6 @@ extern int hppa_instruction_nullified (void);
#define INSTRUCTION_NULLIFIED hppa_instruction_nullified ()
#endif
-#define INSTRUCTION_SIZE 4
-
-#define REG_PARM_STACK_SPACE 16
-
-/*
- * Unwind table and descriptor.
- */
-
-struct unwind_table_entry
- {
- CORE_ADDR region_start;
- CORE_ADDR region_end;
-
- unsigned int Cannot_unwind:1; /* 0 */
- unsigned int Millicode:1; /* 1 */
- unsigned int Millicode_save_sr0:1; /* 2 */
- unsigned int Region_description:2; /* 3..4 */
- unsigned int reserved1:1; /* 5 */
- unsigned int Entry_SR:1; /* 6 */
- unsigned int Entry_FR:4; /* number saved *//* 7..10 */
- unsigned int Entry_GR:5; /* number saved *//* 11..15 */
- unsigned int Args_stored:1; /* 16 */
- unsigned int Variable_Frame:1; /* 17 */
- unsigned int Separate_Package_Body:1; /* 18 */
- unsigned int Frame_Extension_Millicode:1; /* 19 */
- unsigned int Stack_Overflow_Check:1; /* 20 */
- unsigned int Two_Instruction_SP_Increment:1; /* 21 */
- unsigned int Ada_Region:1; /* 22 */
- unsigned int cxx_info:1; /* 23 */
- unsigned int cxx_try_catch:1; /* 24 */
- unsigned int sched_entry_seq:1; /* 25 */
- unsigned int reserved2:1; /* 26 */
- unsigned int Save_SP:1; /* 27 */
- unsigned int Save_RP:1; /* 28 */
- unsigned int Save_MRP_in_frame:1; /* 29 */
- unsigned int extn_ptr_defined:1; /* 30 */
- unsigned int Cleanup_defined:1; /* 31 */
-
- unsigned int MPE_XL_interrupt_marker:1; /* 0 */
- unsigned int HP_UX_interrupt_marker:1; /* 1 */
- unsigned int Large_frame:1; /* 2 */
- unsigned int Pseudo_SP_Set:1; /* 3 */
- unsigned int reserved4:1; /* 4 */
- unsigned int Total_frame_size:27; /* 5..31 */
-
- /* This is *NOT* part of an actual unwind_descriptor in an object
- file. It is *ONLY* part of the "internalized" descriptors that
- we create from those in a file.
- */
- struct
- {
- unsigned int stub_type:4; /* 0..3 */
- unsigned int padding:28; /* 4..31 */
- }
- stub_unwind;
- };
-
-/* HP linkers also generate unwinds for various linker-generated stubs.
- GDB reads in the stubs from the $UNWIND_END$ subspace, then
- "converts" them into normal unwind entries using some of the reserved
- fields to store the stub type. */
-
-/* The gaps represent linker stubs used in MPE and space for future
- expansion. */
-enum unwind_stub_types
- {
- LONG_BRANCH = 1,
- PARAMETER_RELOCATION = 2,
- EXPORT = 10,
- IMPORT = 11,
- IMPORT_SHLIB = 12,
- };
-
-/* We use the objfile->obj_private pointer for two things:
-
- * 1. An unwind table;
- *
- * 2. A pointer to any associated shared library object.
- *
- * #defines are used to help refer to these objects.
- */
-
-/* Info about the unwind table associated with an object file.
-
- * This is hung off of the "objfile->obj_private" pointer, and
- * is allocated in the objfile's psymbol obstack. This allows
- * us to have unique unwind info for each executable and shared
- * library that we are debugging.
- */
-struct obj_unwind_info
- {
- struct unwind_table_entry *table; /* Pointer to unwind info */
- struct unwind_table_entry *cache; /* Pointer to last entry we found */
- int last; /* Index of last entry */
- };
-
-typedef struct obj_private_struct
- {
- struct obj_unwind_info *unwind_info; /* a pointer */
- struct so_list *so_info; /* a pointer */
- CORE_ADDR dp;
- }
-obj_private_data_t;
-
-/* For a number of horrible reasons we may have to adjust the location
- of variables on the stack. Ugh. */
-#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
-extern int hpread_adjust_stack_address (CORE_ADDR);
-
/* Here's how to step off a permanent breakpoint. */
#define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
extern void hppa_skip_permanent_breakpoint (void);
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 79fd15cea1c..7a257d4cf18 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -48,44 +48,11 @@ struct frame_info;
#define SR5_REGNUM 48
-/* For a number of horrible reasons we may have to adjust the location
- of variables on the stack. Ugh. jimb: why? */
-#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
-
-extern int hpread_adjust_stack_address (CORE_ADDR);
-
-
/* jimb: omitted dynamic linking stuff here */
-/* The PA64 ABI reserves 64 bytes of stack space for outgoing register
- parameters. */
-#undef REG_PARM_STACK_SPACE
-#define REG_PARM_STACK_SPACE 64
-
-/* Use the 64-bit calling conventions designed for the PA2.0 in wide mode. */
-#define PA20W_CALLING_CONVENTIONS
-
#undef FUNC_LDIL_OFFSET
#undef FUNC_LDO_OFFSET
#undef SR4EXPORT_LDIL_OFFSET
#undef SR4EXPORT_LDO_OFFSET
-#undef FRAME_SAVED_PC_IN_SIGTRAMP
-extern void hppa64_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
- hppa64_hpux_frame_saved_pc_in_sigtramp (FRAME, TMP)
-
-#undef FRAME_BASE_BEFORE_SIGTRAMP
-extern void hppa64_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
- hppa64_hpux_frame_base_before_sigtramp (FRAME, TMP)
-
-#undef FRAME_FIND_SAVED_REGS_IN_SIGTRAMP
-extern void hppa64_hpux_frame_find_saved_regs_in_sigtramp
- (struct frame_info *fi, CORE_ADDR *fsr);
-#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
- hppa64_hpux_frame_find_saved_regs_in_sigtramp (FRAME, FSR)
-
/* jimb: omitted purify call support */
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 0d0dde3b703..d330d46f1c3 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -36,21 +36,6 @@ struct frame_info;
#include "somsolib.h"
#endif
-extern void hppa32_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
- hppa32_hpux_frame_saved_pc_in_sigtramp (FRAME, TMP)
-
-extern void hppa32_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
- hppa32_hpux_frame_base_before_sigtramp (FRAME, TMP)
-
-extern void hppa32_hpux_frame_find_saved_regs_in_sigtramp
- (struct frame_info *fi, CORE_ADDR *fsr);
-#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
- hppa32_hpux_frame_find_saved_regs_in_sigtramp (FRAME, FSR)
-
/* For HP-UX on PA-RISC we have an implementation
for the exception handling target op (in hppa-tdep.c) */
#define CHILD_ENABLE_EXCEPTION_CALLBACK
diff --git a/gdb/config/i386/nm-nbsd.h b/gdb/config/pa/tm-linux.h
index fef50f37bf5..e8b31c57f3b 100644
--- a/gdb/config/i386/nm-nbsd.h
+++ b/gdb/config/pa/tm-linux.h
@@ -1,7 +1,5 @@
-/* Native-dependent definitions for NetBSD/i386.
-
- Copyright 1986, 1987, 1989, 1992, 1994, 2000, 2002, 2004
- Free Software Foundation, Inc.
+/* Definitions to target GDB to GNU/Linux on hppa-linux.
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,10 +18,13 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_NBSD_H
-#define NM_NBSD_H
+#ifndef TM_LINUX_H
+#define TM_LINUX_H
+
+#include "pa/tm-hppa.h"
+#include "config/tm-linux.h"
-/* Get generic NetBSD native definitions. */
-#include "config/nm-nbsd.h"
+#undef IN_SOLIB_CALL_TRAMPOLINE
+#undef SKIP_TRAMPOLINE_CODE
-#endif /* nm-nbsd.h */
+#endif /* #ifndef TM_LINUX_H */
diff --git a/gdb/config/pa/xm-hppah.h b/gdb/config/pa/xm-hppah.h
deleted file mode 100644
index a2ed9ba407f..00000000000
--- a/gdb/config/pa/xm-hppah.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Parameters for hosting on an HPPA-RISC machine running HPUX, for GDB.
- Copyright 1991, 1992, 1993, 1995, 1996, 2000
- Free Software Foundation, Inc.
-
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu).
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define USG
-
-#define HAVE_TERMIOS
diff --git a/gdb/config/powerpc/aix.mh b/gdb/config/powerpc/aix.mh
index d0913b70289..9ee2f2fb7bf 100644
--- a/gdb/config/powerpc/aix.mh
+++ b/gdb/config/powerpc/aix.mh
@@ -1,16 +1,11 @@
# Host: IBM PowerPC running AIX
-XM_FILE= xm-aix.h
-
NAT_FILE= nm-aix.h
+
+# aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure.
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
xcoffread.o xcoffsolib.o
# When compiled with cc, for debugging, this argument should be passed.
# We have no idea who our current compiler is though, so we skip it.
# MH_CFLAGS = -bnodelcsect
-
-# gdb is too big for all of its external symbols to fit in a small TOC
-# It looks like the GNU linker doesn't understand the -bbigtoc switch.
-# This switch may be needed for some vendor compilers.
-# MH_LDFLAGS = -Wl,-bbigtoc
diff --git a/gdb/config/powerpc/aix.mt b/gdb/config/powerpc/aix.mt
index d7ba624da91..b736d5a4257 100644
--- a/gdb/config/powerpc/aix.mt
+++ b/gdb/config/powerpc/aix.mt
@@ -1,3 +1,3 @@
# Target: PowerPC running AIX
TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-ppc-aix.h
+DEPRECATED_TM_FILE= config/rs6000/tm-rs6000.h
diff --git a/gdb/config/powerpc/aix432.mh b/gdb/config/powerpc/aix432.mh
deleted file mode 100644
index fc7a8b18e27..00000000000
--- a/gdb/config/powerpc/aix432.mh
+++ /dev/null
@@ -1,19 +0,0 @@
-# Host: IBM PowerPC running AIX 4.3.2+
-
-XM_FILE= xm-aix.h
-
-NAT_FILE= nm-aix.h
-
-# aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \
- rs6000-nat.o xcoffread.o xcoffsolib.o
-
-# When compiled with cc, for debugging, this argument should be passed.
-# We have no idea who our current compiler is though, so we skip it.
-# MH_CFLAGS = -bnodelcsect
-
-# gdb is too big for all of its external symbols to fit in a small TOC
-# It looks like the GNU linker doesn't understand the -bbigtoc switch.
-# This switch may be needed for some vendor compilers.
-# MH_LDFLAGS = -Wl,-bbigtoc
-
diff --git a/gdb/config/powerpc/linux.mh b/gdb/config/powerpc/linux.mh
index 925650dd272..450a7775c2e 100644
--- a/gdb/config/powerpc/linux.mh
+++ b/gdb/config/powerpc/linux.mh
@@ -1,6 +1,5 @@
# Host: PowerPC, running Linux
-XM_FILE= xm-linux.h
XM_CLIBS=
NAT_FILE= nm-linux.h
diff --git a/gdb/config/powerpc/linux.mt b/gdb/config/powerpc/linux.mt
index 1fb6fd8b8af..61a9dcd128e 100644
--- a/gdb/config/powerpc/linux.mt
+++ b/gdb/config/powerpc/linux.mt
@@ -1,7 +1,7 @@
# Target: Motorola PPC on Linux
TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o solib.o \
solib-svr4.o solib-legacy.o corelow.o
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
SIM = ../sim/ppc/libsim.a
diff --git a/gdb/config/powerpc/nbsd.mh b/gdb/config/powerpc/nbsd.mh
index 26ba24d9860..4e7388bf962 100644
--- a/gdb/config/powerpc/nbsd.mh
+++ b/gdb/config/powerpc/nbsd.mh
@@ -1,3 +1,5 @@
# Host: PowerPC, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o ppcnbsd-nat.o
-NAT_FILE= nm-nbsd.h
+NATDEPFILES= fork-child.o inf-child.o inf-ptrace.o infptrace.o ppcnbsd-nat.o bsd-kvm.o
+NAT_FILE= config/nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/powerpc/nbsd.mt b/gdb/config/powerpc/nbsd.mt
index d492f9d763c..2f50c21a1eb 100644
--- a/gdb/config/powerpc/nbsd.mt
+++ b/gdb/config/powerpc/nbsd.mt
@@ -1,7 +1,7 @@
# Target: PowerPC, running NetBSD
TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o ppcnbsd-tdep.o nbsd-tdep.o corelow.o \
solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= tm-ppc-eabi.h
SIM_OBS = remote-sim.o
SIM = ../sim/ppc/libsim.a
diff --git a/gdb/config/powerpc/nm-aix.h b/gdb/config/powerpc/nm-aix.h
index 8c8a939cca2..8dd21045e91 100644
--- a/gdb/config/powerpc/nm-aix.h
+++ b/gdb/config/powerpc/nm-aix.h
@@ -20,4 +20,3 @@
#include "rs6000/nm-rs6000.h"
-#define PTRACE_ARG3_TYPE int*
diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h
index 6e3f3a0a5c2..70c7fe3844f 100644
--- a/gdb/config/powerpc/nm-linux.h
+++ b/gdb/config/powerpc/nm-linux.h
@@ -28,6 +28,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
+/* 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 FETCH_INFERIOR_REGISTERS
#endif /* #ifndef NM_LINUX_H */
diff --git a/gdb/config/powerpc/obsd.mh b/gdb/config/powerpc/obsd.mh
new file mode 100644
index 00000000000..0482d3d3c67
--- /dev/null
+++ b/gdb/config/powerpc/obsd.mh
@@ -0,0 +1,3 @@
+# Host: OpenBSD/powerpc
+NATDEPFILES= ppcobsd-nat.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= config/nm-bsd.h
diff --git a/gdb/config/powerpc/obsd.mt b/gdb/config/powerpc/obsd.mt
new file mode 100644
index 00000000000..a0adcdb3738
--- /dev/null
+++ b/gdb/config/powerpc/obsd.mt
@@ -0,0 +1,4 @@
+# Target: OpenBSD/powerpc
+TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o ppcobsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= tm-nbsd.h
diff --git a/gdb/config/powerpc/ppc-eabi.mt b/gdb/config/powerpc/ppc-eabi.mt
index 5ef8cd9befb..eac4c14d023 100644
--- a/gdb/config/powerpc/ppc-eabi.mt
+++ b/gdb/config/powerpc/ppc-eabi.mt
@@ -1,3 +1,3 @@
# Target: PowerPC running eabi
TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-ppc-eabi.h
+DEPRECATED_TM_FILE= tm-ppc-eabi.h
diff --git a/gdb/config/powerpc/ppc-sim.mt b/gdb/config/powerpc/ppc-sim.mt
index 187bf39e8d5..3fc6883e30f 100644
--- a/gdb/config/powerpc/ppc-sim.mt
+++ b/gdb/config/powerpc/ppc-sim.mt
@@ -1,6 +1,6 @@
# Target: PowerPC running eabi and including the simulator
TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-ppc-eabi.h
+DEPRECATED_TM_FILE= tm-ppc-eabi.h
SIM_OBS = remote-sim.o
SIM = ../sim/ppc/libsim.a
diff --git a/gdb/config/powerpc/ppc64-linux.mh b/gdb/config/powerpc/ppc64-linux.mh
index dd815863f64..b22408a9e4d 100644
--- a/gdb/config/powerpc/ppc64-linux.mh
+++ b/gdb/config/powerpc/ppc64-linux.mh
@@ -1,6 +1,5 @@
# Host: PowerPC64, running Linux
-XM_FILE= xm-linux.h
XM_CLIBS=
NAT_FILE= nm-ppc64-linux.h
diff --git a/gdb/config/powerpc/tm-nbsd.h b/gdb/config/powerpc/tm-nbsd.h
deleted file mode 100644
index d167830523c..00000000000
--- a/gdb/config/powerpc/tm-nbsd.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Macro definitions for PowerPC running under NetBSD.
- Copyright 2000, 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 TM_NBSD_H
-#define TM_NBSD_H
-
-#include "powerpc/tm-ppc-eabi.h"
-
-#endif /* TM_NBSD_H */
diff --git a/gdb/config/powerpc/tm-ppc-aix.h b/gdb/config/powerpc/tm-ppc-aix.h
deleted file mode 100644
index 03809c9e696..00000000000
--- a/gdb/config/powerpc/tm-ppc-aix.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macro definitions for Power PC running AIX.
- Copyright 1995, 2000 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 TM_PPC_AIX_H
-#define TM_PPC_AIX_H
-
-/* Use generic RS6000 definitions. */
-#include "rs6000/tm-rs6000.h"
-
-#endif /* TM_PPC_AIX_H */
diff --git a/gdb/config/powerpc/tm-ppcle-eabi.h b/gdb/config/powerpc/tm-ppcle-eabi.h
deleted file mode 100644
index cc4c752e396..00000000000
--- a/gdb/config/powerpc/tm-ppcle-eabi.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Macro definitions for Power PC running embedded ABI
- in little endian mode.
- Copyright 1995, 1998 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_PPCLE_EABI_H
-#define TM_PPCLE_EABI_H
-
-/* Use normal ppc-eabi definitions */
-#include "powerpc/tm-ppc-eabi.h"
-
-#endif /* TM_PPCLE_EABI_H */
diff --git a/gdb/config/powerpc/tm-ppcle-sim.h b/gdb/config/powerpc/tm-ppcle-sim.h
deleted file mode 100644
index 02707f40019..00000000000
--- a/gdb/config/powerpc/tm-ppcle-sim.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Macro definitions for Power PC running embedded ABI under the simulator.
- Copyright 1995 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 TM_PPCLE_SIM_H
-#define TM_PPCLE_SIM_H
-
-#include "powerpc/tm-ppcle-eabi.h"
-
-#endif /* TM_PPCLE_SIM_H */
diff --git a/gdb/config/powerpc/vxworks.mt b/gdb/config/powerpc/vxworks.mt
index eca028f80aa..ae321f81779 100644
--- a/gdb/config/powerpc/vxworks.mt
+++ b/gdb/config/powerpc/vxworks.mt
@@ -1,3 +1,3 @@
# Target: Powerpc running VxWorks
TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-vxworks.h
+DEPRECATED_TM_FILE= tm-vxworks.h
diff --git a/gdb/config/powerpc/xm-aix.h b/gdb/config/powerpc/xm-aix.h
deleted file mode 100644
index e663453f40e..00000000000
--- a/gdb/config/powerpc/xm-aix.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Parameters for hosting on an PowerPC, for GDB, the GNU debugger.
- Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
- Contributed by Cygnus Corporation.
-
- 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 "config/xm-aix4.h"
-
-/* This doesn't seem to be declared in any header file I can find. */
-char *termdef (int, int);
-
-/* UINT_MAX is defined in <sys/limits.h> as a decimal constant (4294967295)
- which is too large to fit in a signed int when it is parsed by the
- compiler, so it issues a diagnostic. Just undef it here so that we
- use gdb's version in defs.h */
-#undef UINT_MAX
diff --git a/gdb/config/powerpc/xm-linux.h b/gdb/config/powerpc/xm-linux.h
deleted file mode 100644
index 73e7c406445..00000000000
--- a/gdb/config/powerpc/xm-linux.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Native support for linux, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2001
- 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 XM_LINUX_H
-#define XM_LINUX_H
-
-/* 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
-
-#endif /* #ifndef XM_LINUX_H */
diff --git a/gdb/config/rs6000/aix4.mh b/gdb/config/rs6000/aix4.mh
index e6253be9a22..f3164224e42 100644
--- a/gdb/config/rs6000/aix4.mh
+++ b/gdb/config/rs6000/aix4.mh
@@ -1,7 +1,5 @@
# Host: IBM RS/6000 running AIX4
-XM_FILE= xm-aix4.h
-
NAT_FILE= nm-rs6000.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
xcoffsolib.o
diff --git a/gdb/config/rs6000/aix4.mt b/gdb/config/rs6000/aix4.mt
index 388c4f237d8..0729ffab582 100644
--- a/gdb/config/rs6000/aix4.mt
+++ b/gdb/config/rs6000/aix4.mt
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX4
TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-rs6000-aix4.h
+DEPRECATED_TM_FILE= config/rs6000/tm-rs6000.h
diff --git a/gdb/config/rs6000/nm-rs6000.h b/gdb/config/rs6000/nm-rs6000.h
index 34bc0feebcd..ee5f918ca63 100644
--- a/gdb/config/rs6000/nm-rs6000.h
+++ b/gdb/config/rs6000/nm-rs6000.h
@@ -19,10 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/rs6000/nm-rs6000ly.h b/gdb/config/rs6000/nm-rs6000ly.h
deleted file mode 100644
index 51d12f8ac70..00000000000
--- a/gdb/config/rs6000/nm-rs6000ly.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Native-dependent definitions for RS6000 running LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_RS6000LYNX_H
-#define NM_RS6000LYNX_H
-
-#include "config/nm-lynx.h"
-
-#endif /* NM_RS6000LYNX_H */
diff --git a/gdb/config/rs6000/rs6000.mh b/gdb/config/rs6000/rs6000.mh
index c57319be4fc..e518975a961 100644
--- a/gdb/config/rs6000/rs6000.mh
+++ b/gdb/config/rs6000/rs6000.mh
@@ -1,7 +1,5 @@
# Host: IBM RS/6000 running AIX
-XM_FILE= xm-rs6000.h
-
NAT_FILE= nm-rs6000.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
xcoffsolib.o
diff --git a/gdb/config/rs6000/rs6000.mt b/gdb/config/rs6000/rs6000.mt
index 86b4c58b5e3..02c22304d53 100644
--- a/gdb/config/rs6000/rs6000.mt
+++ b/gdb/config/rs6000/rs6000.mt
@@ -1,3 +1,3 @@
# Target: IBM RS/6000 running AIX
TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-rs6000.h
+DEPRECATED_TM_FILE= tm-rs6000.h
diff --git a/gdb/config/rs6000/rs6000lynx.mh b/gdb/config/rs6000/rs6000lynx.mh
index 096473f1a60..fbe4147f0a0 100644
--- a/gdb/config/rs6000/rs6000lynx.mh
+++ b/gdb/config/rs6000/rs6000lynx.mh
@@ -2,5 +2,5 @@
XM_CLIBS= -lbsd
-NAT_FILE= nm-rs6000ly.h
+NAT_FILE= config/nm-lynx.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o xcoffread.o
diff --git a/gdb/config/rs6000/rs6000lynx.mt b/gdb/config/rs6000/rs6000lynx.mt
index 89ed7a288f8..200a64709d9 100644
--- a/gdb/config/rs6000/rs6000lynx.mt
+++ b/gdb/config/rs6000/rs6000lynx.mt
@@ -1,3 +1,3 @@
# Target: IBM RS6000 running LynxOS
TDEPFILES= coff-solib.o rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-rs6000ly.h
+DEPRECATED_TM_FILE= tm-rs6000ly.h
diff --git a/gdb/config/rs6000/tm-rs6000-aix4.h b/gdb/config/rs6000/tm-rs6000-aix4.h
deleted file mode 100644
index 243befe7d6f..00000000000
--- a/gdb/config/rs6000/tm-rs6000-aix4.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macro definitions for RS/6000 running AIX4.
- Copyright 1995, 1997 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 TM_RS6000_AIX4_H
-#define TM_RS6000_AIX4_H
-
-/* Use generic RS6000 definitions. */
-#include "rs6000/tm-rs6000.h"
-
-#endif /* TM_RS6000_AIX4_H */
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 4422fcbf3c8..8afd2cadc94 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -24,8 +24,6 @@
struct frame_info;
-#define GDB_MULTI_ARCH 1
-
/* Minimum possible text address in AIX */
#define TEXT_SEGMENT_BASE 0x10000000
@@ -71,8 +69,11 @@ extern void aix_process_linenos (void);
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
+/* Don't use this in code specific to the RS6000 and its descendants;
+ use tdep->ppc_fp0_regnum instead. FP0_REGNUM will be deprecated
+ soon, but we still need to define it here for the uses in
+ architecture-independent code. */
#define FP0_REGNUM 32 /* Floating point register 0 */
-#define FPLAST_REGNUM 63 /* Last floating point register */
/* Notice when a new child process is started. */
diff --git a/gdb/config/rs6000/xm-aix4.h b/gdb/config/rs6000/xm-aix4.h
deleted file mode 100644
index 4ca0abb8cf1..00000000000
--- a/gdb/config/rs6000/xm-aix4.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Parameters for hosting on an RS6000, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996
- Free Software Foundation, Inc.
- Contributed by IBM Corporation.
-
- 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 "config/xm-aix4.h"
-
-/* AIX 4.x uses nonstandard "int *" as type of third argument to ptrace() */
-
-#define PTRACE_ARG3_TYPE int*
diff --git a/gdb/config/rs6000/xm-rs6000.h b/gdb/config/rs6000/xm-rs6000.h
deleted file mode 100644
index 51096e643b0..00000000000
--- a/gdb/config/rs6000/xm-rs6000.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Parameters for hosting on an RS6000, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 2000, 2001 Free Software Foundation, Inc.
- Contributed by IBM Corporation.
-
- 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. */
-
-/* The following text is taken from config/rs6000.mh:
- * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says
- * # `extern fd_set svc_fdset;' without ever defining the type fd_set.
- * # Unfortunately this occurs in the vx-share code, which is not configured
- * # like the rest of GDB (e.g. it doesn't include "defs.h").
- * # We circumvent this bug by #define-ing fd_set here, but undefining it in
- * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM!
- * MH_CFLAGS='-Dfd_set=int'
- * So, here we do the undefine...which has to occur before we include
- * <sys/select.h> below.
- */
-#undef fd_set
-
-#include <sys/select.h>
-
-/* Big end is at the low address */
-
-/* At least as of AIX 3.2, we have termios. */
-#define HAVE_TERMIOS 1
-/* #define HAVE_TERMIO 1 */
-
-#define USG 1
-
-#define FIVE_ARG_PTRACE
-
-/* This system requires that we open a terminal with O_NOCTTY for it to
- not become our controlling terminal. */
-
-#define USE_O_NOCTTY
-
-/* Brain death inherited from PC's pervades. */
-#undef NULL
-#define NULL 0
-
-/* The IBM compiler requires this in order to properly compile alloca(). */
-#pragma alloca
-
-/* There is no vfork. */
-
-#define vfork fork
-
-/* Signal handler for SIGWINCH `window size changed'. */
-
-#define SIGWINCH_HANDLER aix_resizewindow
-extern void aix_resizewindow (int);
-
-/* This doesn't seem to be declared in any header file I can find. */
-char *termdef (int, int);
-
-/* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */
-
-#define SIGWINCH_HANDLER_BODY \
- \
-/* Respond to SIGWINCH `window size changed' signal, and reset GDB's \
- window settings appropriately. */ \
- \
-void \
-aix_resizewindow (signo) \
- int signo; \
-{ \
- int fd = fileno (stdout); \
- if (isatty (fd)) { \
- int val; \
- \
- val = atoi (termdef (fd, 'l')); \
- if (val > 0) \
- lines_per_page = val; \
- val = atoi (termdef (fd, 'c')); \
- if (val > 0) \
- chars_per_line = val; \
- } \
-}
diff --git a/gdb/config/s390/nm-linux.h b/gdb/config/s390/nm-linux.h
index 955110c5074..bf283cea80b 100644
--- a/gdb/config/s390/nm-linux.h
+++ b/gdb/config/s390/nm-linux.h
@@ -45,7 +45,6 @@ extern int s390_stopped_by_watchpoint (void);
extern int s390_insert_watchpoint (CORE_ADDR addr, int len);
extern int s390_remove_watchpoint (CORE_ADDR addr, int len);
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr, len) 1
#define HAVE_CONTINUABLE_WATCHPOINT 1
diff --git a/gdb/config/s390/s390.mt b/gdb/config/s390/s390.mt
index 86b6a3371cc..84eca833667 100644
--- a/gdb/config/s390/s390.mt
+++ b/gdb/config/s390/s390.mt
@@ -1,5 +1,5 @@
# Target: S390 running Linux
-TM_FILE= tm-linux.h
+DEPRECATED_TM_FILE= config/tm-linux.h
TDEPFILES=s390-tdep.o solib.o
# Post 5.0 tdep-files
TDEPFILES+=solib-svr4.o solib-legacy.o
diff --git a/gdb/config/sh/embed.mt b/gdb/config/sh/embed.mt
index 807aa110e99..65d8b5957e6 100644
--- a/gdb/config/sh/embed.mt
+++ b/gdb/config/sh/embed.mt
@@ -1,6 +1,6 @@
# Target: Embedded Renesas Super-H with ICE and simulator
-TDEPFILES= sh-tdep.o sh64-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o
-TM_FILE= tm-sh.h
+TDEPFILES= sh-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o
+DEPRECATED_TM_FILE= tm-sh.h
SIM_OBS = remote-sim.o
SIM = ../sim/sh/libsim.a
diff --git a/gdb/config/sh/linux.mt b/gdb/config/sh/linux.mt
index 83ada467161..332ce72cd37 100644
--- a/gdb/config/sh/linux.mt
+++ b/gdb/config/sh/linux.mt
@@ -1,6 +1,6 @@
# Target: Renesas Super-H running GNU/Linux
-TDEPFILES= sh-tdep.o sh64-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+TDEPFILES= sh-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o solib.o solib-svr4.o solib-legacy.o
+DEPRECATED_TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
SIM = ../sim/sh/libsim.a
diff --git a/gdb/config/sh/nbsd.mh b/gdb/config/sh/nbsd.mh
index dd677b60e4b..9c7cec9c5c0 100644
--- a/gdb/config/sh/nbsd.mh
+++ b/gdb/config/sh/nbsd.mh
@@ -1,4 +1,4 @@
# Host: SuperH running NetBSD
NAT_CLIBS=
NATDEPFILES= infptrace.o inftarg.o fork-child.o shnbsd-nat.o
-NAT_FILE= nm-nbsd.h
+NAT_FILE= config/nm-nbsd.h
diff --git a/gdb/config/sh/nbsd.mt b/gdb/config/sh/nbsd.mt
index 85d9bb04398..5c74d577d9d 100644
--- a/gdb/config/sh/nbsd.mt
+++ b/gdb/config/sh/nbsd.mt
@@ -1,6 +1,6 @@
# Target: SuperH running NetBSD
-TDEPFILES= sh-tdep.o sh64-tdep.o shnbsd-tdep.o corelow.o nbsd-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+TDEPFILES= sh-tdep.o shnbsd-tdep.o corelow.o nbsd-tdep.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= tm-nbsd.h
SIM_OBS = remote-sim.o
SIM = ../sim/sh/libsim.a
diff --git a/gdb/config/sh/nm-nbsd.h b/gdb/config/sh/nm-nbsd.h
deleted file mode 100644
index eb38d6b49ea..00000000000
--- a/gdb/config/sh/nm-nbsd.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Native-dependent definitions for SuperH running NetBSD, for GDB.
- Copyright 2002 Free Software Foundation, Inc.
- Contributed by Wasabi Systems, 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 NM_NBSD_H
-#define NM_NBSD_H
-
-/* Get generic NetBSD native definitions. */
-#include "config/nm-nbsd.h"
-
-#endif /* NM_NBSD_H */
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 228e0bcc5f3..b6a4fb525b2 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -21,8 +21,6 @@
/* Contributed by Steve Chamberlain sac@cygnus.com */
-#define GDB_MULTI_ARCH 1
-
#define NUM_REALREGS 59 /* used in remote-e7000.c which is not multiarched. */
#define DEPRECATED_BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
diff --git a/gdb/config/sh/wince.mt b/gdb/config/sh/wince.mt
index 89a5a89ce69..4187aefa024 100644
--- a/gdb/config/sh/wince.mt
+++ b/gdb/config/sh/wince.mt
@@ -1,5 +1,5 @@
# Target: Renesas Super-H running on Windows CE
-TDEPFILES= sh-tdep.o sh64-tdep.o wince.o
-TM_FILE= tm-wince.h
+TDEPFILES= sh-tdep.o wince.o
+DEPRECATED_TM_FILE= tm-wince.h
MT_CFLAGS=-DSHx -U_X86_ -U_M_IX86 -U__i386__ -U__i486__ -U__i586__ -U__i686__ -DUNICODE -D_WIN32_WCE -DWINCE_STUB='"${target_alias}-stub.exe"'
TM_CLIBS=-lrapi
diff --git a/gdb/config/sparc/fbsd.mt b/gdb/config/sparc/fbsd.mt
index 8e4dead7add..36696ffd1a4 100644
--- a/gdb/config/sparc/fbsd.mt
+++ b/gdb/config/sparc/fbsd.mt
@@ -1,3 +1,2 @@
# Target: FreeBSD/sparc64
TDEPFILES= sparc-tdep.o sparc64-tdep.o sparc64fbsd-tdep.o corelow.o
-TM_FILE= tm-fbsd.h
diff --git a/gdb/config/sparc/linux.mt b/gdb/config/sparc/linux.mt
index e053f302c4f..180b0c753c9 100644
--- a/gdb/config/sparc/linux.mt
+++ b/gdb/config/sparc/linux.mt
@@ -1,4 +1,4 @@
# Target: GNU/Linux SPARC
TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
- solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+ solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/sparc/linux64.mt b/gdb/config/sparc/linux64.mt
index 4121314318b..deb4008c928 100644
--- a/gdb/config/sparc/linux64.mt
+++ b/gdb/config/sparc/linux64.mt
@@ -1,5 +1,5 @@
# Target: GNU/Linux UltraSPARC
TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc64-linux-tdep.o \
sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
- solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-linux.h
+ solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/sparc/nbsd.mt b/gdb/config/sparc/nbsd.mt
index 25dbefff703..7a5cf680576 100644
--- a/gdb/config/sparc/nbsd.mt
+++ b/gdb/config/sparc/nbsd.mt
@@ -1,4 +1,4 @@
# Target: NetBSD/sparc
TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/sparc/nbsd64.mh b/gdb/config/sparc/nbsd64.mh
index e8ac58bda2b..9ac8cf477d2 100644
--- a/gdb/config/sparc/nbsd64.mh
+++ b/gdb/config/sparc/nbsd64.mh
@@ -1,4 +1,6 @@
# Host: NetBSD/sparc64
-NATDEPFILES= sparc64nbsd-nat.o sparc-nat.o \
+NATDEPFILES= sparc64nbsd-nat.o sparc-nat.o bsd-kvm.o \
fork-child.o infptrace.o inftarg.o
NAT_FILE= nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/sparc/nbsd64.mt b/gdb/config/sparc/nbsd64.mt
index 4a1b13b9bb6..6d8eb1b3050 100644
--- a/gdb/config/sparc/nbsd64.mt
+++ b/gdb/config/sparc/nbsd64.mt
@@ -2,4 +2,4 @@
TDEPFILES= sparc64-tdep.o sparc64nbsd-tdep.o \
sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/nbsdelf.mh b/gdb/config/sparc/nbsdelf.mh
index 45309ecaec0..611a6a4d2ad 100644
--- a/gdb/config/sparc/nbsdelf.mh
+++ b/gdb/config/sparc/nbsdelf.mh
@@ -1,4 +1,6 @@
# Host: NetBSD/sparc ELF
-NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
+NATDEPFILES= sparc-nat.o sparcnbsd-nat.o bsd-kvm.o \
fork-child.o infptrace.o inftarg.o
NAT_FILE= nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/sparc/obsd.mt b/gdb/config/sparc/obsd.mt
index 800cb048eac..0dffffcfae8 100644
--- a/gdb/config/sparc/obsd.mt
+++ b/gdb/config/sparc/obsd.mt
@@ -1,4 +1,4 @@
# Target: OpenBSD/sparc
TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/obsd64.mt b/gdb/config/sparc/obsd64.mt
index a69281754c4..8f5ef801aaa 100644
--- a/gdb/config/sparc/obsd64.mt
+++ b/gdb/config/sparc/obsd64.mt
@@ -1,5 +1,5 @@
# Target: OpenBSD/sparc64
TDEPFILES= sparc64-tdep.o sparc64nbsd-tdep.o sparc64obsd-tdep.o \
- sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
+ sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o nbsd-tdep.o \
corelow.o solib.o solib-svr4.o
-TM_FILE= tm-nbsd.h
+DEPRECATED_TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/sol2-64.mt b/gdb/config/sparc/sol2-64.mt
index 92f848929fe..809fc11b811 100644
--- a/gdb/config/sparc/sol2-64.mt
+++ b/gdb/config/sparc/sol2-64.mt
@@ -1,3 +1,4 @@
# Target: Solaris UltraSPARC
-TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o
-TM_FILE= tm-sol2.h
+TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o \
+ solib.o solib-svr4.o
+DEPRECATED_TM_FILE= tm-sol2.h
diff --git a/gdb/config/sparc/sol2.mh b/gdb/config/sparc/sol2.mh
index 735b9ee8096..44a06018e19 100644
--- a/gdb/config/sparc/sol2.mh
+++ b/gdb/config/sparc/sol2.mh
@@ -2,5 +2,4 @@
NAT_FILE= nm-sol2.h
NATDEPFILES= sparc-sol2-nat.o \
corelow.o core-regset.o fork-child.o gcore.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
- solib.o solib-svr4.o solib-legacy.o
+ procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/sparc/sol2.mt b/gdb/config/sparc/sol2.mt
index 4037956317c..a305d56c10d 100644
--- a/gdb/config/sparc/sol2.mt
+++ b/gdb/config/sparc/sol2.mt
@@ -1,3 +1,3 @@
# Target: Solaris SPARC
-TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o
-TM_FILE= tm-sol2.h
+TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= tm-sol2.h
diff --git a/gdb/config/sparc/tm-fbsd.h b/gdb/config/sparc/tm-fbsd.h
deleted file mode 100644
index f441937668a..00000000000
--- a/gdb/config/sparc/tm-fbsd.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Target-dependent definitions for FreeBSD/sparc64.
-
- Copyright 2002, 2003 Free Software Foundation, Inc.
- Contributed by David E. O'Brien <obrien@FreeBSD.org>.
-
- 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#ifndef TM_FBSD_H
-#define TM_FBSD_H
-
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-
-#endif /* tm-fbsd.h */
diff --git a/gdb/config/sparc/tm-linux.h b/gdb/config/sparc/tm-linux.h
deleted file mode 100644
index ae853ba0acb..00000000000
--- a/gdb/config/sparc/tm-linux.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Target-dependent definitions for GNU/Linux SPARC.
-
- 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#ifndef TM_LINUX_H
-#define TM_LINUX_H
-
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-
-/* Shared library support. */
-#include "solib.h"
-
-#endif /* tm-linux.h */
diff --git a/gdb/config/sparc/tm-nbsd.h b/gdb/config/sparc/tm-nbsd.h
deleted file mode 100644
index 301136bbead..00000000000
--- a/gdb/config/sparc/tm-nbsd.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Target-dependent definitions for NetBSD/sparc.
-
- Copyright 1994, 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. */
-
-#ifndef TM_NBSD_H
-#define TM_NBSD_H
-
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-
-/* Shared library support. */
-#include "solib.h"
-
-#endif /* tm-nbsd.h */
diff --git a/gdb/config/sparc/tm-nbsd64.h b/gdb/config/sparc/tm-nbsd64.h
deleted file mode 100644
index cc1d6b32297..00000000000
--- a/gdb/config/sparc/tm-nbsd64.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macro definitions for UltraSPARC running under NetBSD.
- Copyright 1994, 2002 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 TM_NBSD64_H
-#define TM_NBSD64_H
-
-#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
-#include "solib.h"
-
-#endif /* TM_NBSD64_H */
diff --git a/gdb/config/sparc/tm-sol2.h b/gdb/config/sparc/tm-sol2.h
index d111c1a7768..d4ca102f225 100644
--- a/gdb/config/sparc/tm-sol2.h
+++ b/gdb/config/sparc/tm-sol2.h
@@ -1,6 +1,6 @@
/* Target-dependent definitions for Solaris SPARC.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,7 +21,8 @@
#ifndef TM_SOL2_H
#define TM_SOL2_H
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
+/* Shared library support. */
+#include "solib.h"
/* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
SunPRO) compiler puts out 0 instead of the address in N_SO stabs.
diff --git a/gdb/config/sparc/tm-vxworks.h b/gdb/config/sparc/tm-vxworks.h
deleted file mode 100644
index 7b0474847c6..00000000000
--- a/gdb/config/sparc/tm-vxworks.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Target-dependent defenitions for VxWorks SPARC.
-
- Copyright 1993, 1999, 2004 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
- 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 TM_VXWORKS_H
-#define TM_VXWORKS_H
-
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-
-/* Get generic VxWorks definitions. */
-#include "config/tm-vxworks.h"
-
-#endif /* tm-vxworks.h */
diff --git a/gdb/config/sparc/vxworks.mt b/gdb/config/sparc/vxworks.mt
index 175f92ed981..e84f6b70f1b 100644
--- a/gdb/config/sparc/vxworks.mt
+++ b/gdb/config/sparc/vxworks.mt
@@ -1,4 +1,4 @@
# Target: VxWorks SPARC
TDEPFILES= sparc-tdep.o \
remote-vx.o remote-vxsparc.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
-TM_FILE= tm-vxworks.h
+DEPRECATED_TM_FILE= config/tm-vxworks.h
diff --git a/gdb/config/tm-linux.h b/gdb/config/tm-linux.h
index caf008a9cb1..2ee2acd786b 100644
--- a/gdb/config/tm-linux.h
+++ b/gdb/config/tm-linux.h
@@ -32,11 +32,4 @@
#include "config/tm-sysv4.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. */
-
-#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/tm-nto.h b/gdb/config/tm-nto.h
index 359ff068b7a..98494a97fc3 100644
--- a/gdb/config/tm-nto.h
+++ b/gdb/config/tm-nto.h
@@ -32,30 +32,4 @@
#define REALTIME_LO 41
#define REALTIME_HI 56
-/* Set up the undefined useable signals. */
-#define RAW_SIGNAL_LO 32
-#define RAW_SIGNAL_HI (REALTIME_LO - 1)
-
-#define TARGET_SIGNAL_RAW_VALUES \
-TARGET_SIGNAL_RAW0, \
-TARGET_SIGNAL_RAW1, \
-TARGET_SIGNAL_RAW2, \
-TARGET_SIGNAL_RAW3, \
-TARGET_SIGNAL_RAW4, \
-TARGET_SIGNAL_RAW5, \
-TARGET_SIGNAL_RAW6, \
-TARGET_SIGNAL_RAW7, \
-TARGET_SIGNAL_RAW8
-
-#define TARGET_SIGNAL_RAW_TABLE \
-{"SIGNAL32", "Signal 32"}, \
-{"SIGNAL33", "Signal 33"}, \
-{"SIGNAL34", "Signal 34"}, \
-{"SIGNAL35", "Signal 35"}, \
-{"SIGNAL36", "Signal 36"}, \
-{"SIGNAL37", "Signal 37"}, \
-{"SIGNAL38", "Signal 38"}, \
-{"SIGNAL39", "Signal 39"}, \
-{"SIGNAL40", "Signal 40"}
-
#endif /* _TM_QNXNTO_H */
diff --git a/gdb/config/tm-sunos.h b/gdb/config/tm-sunos.h
deleted file mode 100644
index c8db07e865e..00000000000
--- a/gdb/config/tm-sunos.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Target machine sub-description for SunOS version 4.
- This is included by other tm-*.h files to specify SunOS-specific stuff.
- Copyright 1990, 1991, 1992, 1993, 1994 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 "solib.h" /* Support for shared libraries. */
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- lookup_solib_trampoline_symbol_by_pc (pc)
-
-/* If PC is in a shared library trampoline code, return the PC
- where the function itself actually starts. If not, return 0. */
-
-#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
diff --git a/gdb/config/vax/nbsd.mt b/gdb/config/vax/nbsd.mt
new file mode 100644
index 00000000000..dfe746fd520
--- /dev/null
+++ b/gdb/config/vax/nbsd.mt
@@ -0,0 +1,3 @@
+# Target: NetBSD/vax
+TDEPFILES= vax-tdep.o vaxnbsd-tdep.o corelow.o solib.o solib-svr4.o
+DEPRECATED_TM_FILE= solib.h
diff --git a/gdb/config/vax/nbsdaout.mh b/gdb/config/vax/nbsdaout.mh
new file mode 100644
index 00000000000..688713530d0
--- /dev/null
+++ b/gdb/config/vax/nbsdaout.mh
@@ -0,0 +1,6 @@
+# Host: NetBSD/vax a.out
+NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o \
+ solib.o solib-sunos.o
+NAT_FILE= nm-nbsdaout.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/vax/nbsdelf.mh b/gdb/config/vax/nbsdelf.mh
new file mode 100644
index 00000000000..06dda18f70a
--- /dev/null
+++ b/gdb/config/vax/nbsdelf.mh
@@ -0,0 +1,5 @@
+# Host: NetBSD/vax ELF
+NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= config/nm-nbsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/arm/nm-nbsd.h b/gdb/config/vax/nm-nbsdaout.h
index 63be920092f..02504f5e984 100644
--- a/gdb/config/arm/nm-nbsd.h
+++ b/gdb/config/vax/nm-nbsdaout.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for ARM running NetBSD, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1994, 1999 Free Software Foundation, Inc.
+/* Native-dependent definitions for NetBSD/vax a.out.
+
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,10 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_NBSD_H
-#define NM_NBSD_H
+#ifndef NM_NBSDAOUT_H
+#define NM_NBSDAOUT_H
-/* Get generic NetBSD native definitions. */
#include "config/nm-nbsd.h"
-#endif /* NM_NBSD_H */
+/* Get generic NetBSD a.out native definitions. */
+#include "config/nm-nbsdaout.h"
+
+#endif /* nm-nbsdaout.h */
diff --git a/gdb/config/vax/nm-vax.h b/gdb/config/vax/nm-vax.h
index 2518047290f..78313cacaf8 100644
--- a/gdb/config/vax/nm-vax.h
+++ b/gdb/config/vax/nm-vax.h
@@ -1,5 +1,6 @@
-/* Common definitions for GDB native support on Vaxen under 4.2bsd and Ultrix.
- Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Native-dependent definitions for VAXen under 4.2 BSD and ULTRIX.
+
+ Copyright 1986, 1987, 1989, 1992, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,12 +19,14 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define AP_REGNUM 12 /* XXXJRT */
+#ifndef NM_VAX_H
+#define NM_VAX_H
+
+extern CORE_ADDR vax_kernel_u_addr;
+#define KERNEL_U_ADDR vax_kernel_u_addr
+
+extern CORE_ADDR vax_register_u_addr (CORE_ADDR u_ar0, int regnum);
+#define REGISTER_U_ADDR(addr, u_ar0, regnum) \
+ (addr) = vax_register_u_addr (u_ar0, regnum)
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = blockend - 0110 + regno * 4; \
- if (regno == PC_REGNUM) addr = blockend - 8; \
- if (regno == PS_REGNUM) addr = blockend - 4; \
- if (regno == DEPRECATED_FP_REGNUM) addr = blockend - 0120; \
- if (regno == AP_REGNUM) addr = blockend - 0124; \
- if (regno == SP_REGNUM) addr = blockend - 20; }
+#endif /* nm-vax.h */
diff --git a/gdb/config/vax/obsd.mh b/gdb/config/vax/obsd.mh
new file mode 100644
index 00000000000..416f2c62d14
--- /dev/null
+++ b/gdb/config/vax/obsd.mh
@@ -0,0 +1,5 @@
+# Host: OpenBSD/vax
+NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= config/nm-bsd.h
+
+LOADLIBES= -lkvm
diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h
deleted file mode 100644
index 16f08d44655..00000000000
--- a/gdb/config/vax/tm-vaxbsd.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Definitions to make GDB run on a vax under 4.2bsd.
- Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
- 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 TM_VAXBSD_H
-#define TM_VAXBSD_H
-
-#define TARGET_UPAGES 14
-#define TARGET_NBPG 512
-#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
-
-/* On the VAX, sigtramp is in the u area. Can't check the exact
- addresses because for cross-debugging we don't have VAX include
- files around. This should be close enough. */
-#define DEPRECATED_SIGTRAMP_START(pc) STACK_END_ADDR
-#define DEPRECATED_SIGTRAMP_END(pc) 0x80000000
-
-#endif /* TM_VAXBSD_H */
diff --git a/gdb/config/vax/vax.mh b/gdb/config/vax/vax.mh
new file mode 100644
index 00000000000..341aa6bde38
--- /dev/null
+++ b/gdb/config/vax/vax.mh
@@ -0,0 +1,4 @@
+# Host: VAX running 4.2BSD or Ultrix
+NATDEPFILES= vax-nat.o fork-child.o infptrace.o inftarg.o \
+ corelow.o core-aout.o
+NAT_FILE= nm-vax.h
diff --git a/gdb/config/vax/vax.mt b/gdb/config/vax/vax.mt
index 06ab9b2b821..4d7af45813b 100644
--- a/gdb/config/vax/vax.mt
+++ b/gdb/config/vax/vax.mt
@@ -1,3 +1,2 @@
-# Target: DEC VAX running BSD or Ultrix
+# Target: VAX running 4.2BSD or Ultrix
TDEPFILES= vax-tdep.o
-TM_FILE= tm-vaxbsd.h
diff --git a/gdb/config/vax/vaxbsd.mh b/gdb/config/vax/vaxbsd.mh
deleted file mode 100644
index db1e1d4371d..00000000000
--- a/gdb/config/vax/vaxbsd.mh
+++ /dev/null
@@ -1,13 +0,0 @@
-# Host: DEC VAX running BSD
-
-# The following types of /bin/cc failures have been observed:
-# 1. Something in readline.c which I have never seen
-# 2. ``"values.c", line 816: compiler error: schain botch''
-#msg /bin/cc has been known to fail on VAXen running BSD4.3
-#msg If this occurs, use gcc
-#msg (but see comments in Makefile.dist about compiling with gcc).
-
-XM_FILE= xm-vaxbsd.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-
-NAT_FILE= nm-vax.h
diff --git a/gdb/config/vax/vaxult.mh b/gdb/config/vax/vaxult.mh
deleted file mode 100644
index f05a33fa198..00000000000
--- a/gdb/config/vax/vaxult.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: DEC VAX running Ultrix
-
-XM_FILE= xm-vaxult.h
-
-NAT_FILE= nm-vax.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
diff --git a/gdb/config/vax/vaxult2.mh b/gdb/config/vax/vaxult2.mh
deleted file mode 100644
index 4170a841257..00000000000
--- a/gdb/config/vax/vaxult2.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: DEC VAX running Ultrix
-
-XM_FILE= xm-vaxult2.h
-
-NAT_FILE= nm-vax.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
diff --git a/gdb/config/vax/xm-vax.h b/gdb/config/vax/xm-vax.h
deleted file mode 100644
index 9924f260140..00000000000
--- a/gdb/config/vax/xm-vax.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Common definitions to make GDB run on Vaxen under 4.2bsd and Ultrix.
- Copyright (C) 1986, 1987, 1989, 1992 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. */
-
-/* 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 (0x80000000 - (UPAGES * NBPG))
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
- 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0}
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movl $ end, sp"); \
- asm ("clrl fp"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("pushl fp");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl (sp), fp");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("pushl 8(sp)"); \
- asm ("pushl 8(sp)"); \
- asm ("pushal 0x14(sp)"); \
- asm ("pushr $037777"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("popr $037777"); \
- asm ("subl2 $8,(sp)"); \
- asm ("movl (sp),sp"); \
- asm ("rei"); }
diff --git a/gdb/config/vax/xm-vaxbsd.h b/gdb/config/vax/xm-vaxbsd.h
deleted file mode 100644
index 6defcc6e079..00000000000
--- a/gdb/config/vax/xm-vaxbsd.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Definitions to make GDB run on a vax under BSD, 4.3 or 4.4. */
-
-/* This should exist on either 4.3 or 4.4. 4.3 doesn't have limits.h
- or machine/limits.h. */
-#include <sys/param.h>
-
-#include "vax/xm-vax.h"
diff --git a/gdb/config/vax/xm-vaxult.h b/gdb/config/vax/xm-vaxult.h
deleted file mode 100644
index 576a44fde57..00000000000
--- a/gdb/config/vax/xm-vaxult.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Definitions to make GDB run on a vax under Ultrix. */
-
-#include "vax/xm-vax.h"
-/* This is required for Ultrix 3.1b, not for later versions. Ultrix
- 3.1b can't just use xm-vaxult2.h because Ultrix 3.1b does define
- FD_SET. Sure, we could have separate configurations for vaxult2,
- vaxult3, and vaxult, but why bother? Defining the ptrace constants
- in infptrace.c isn't going to do any harm; it's not like they are
- going to change. */
-#define NO_PTRACE_H
diff --git a/gdb/config/vax/xm-vaxult2.h b/gdb/config/vax/xm-vaxult2.h
deleted file mode 100644
index a46669830cd..00000000000
--- a/gdb/config/vax/xm-vaxult2.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Definitions to make GDB run on a vax under Ultrix. */
-
-#include "vax/xm-vax.h"
-#define NO_PTRACE_H
-
-/* Old versions of ultrix have fd_set but not the FD_* macros. */
-
-#define FD_SET(bit,fdsetp) ((fdsetp)->fds_bits[(n) / 32] |= (1 << ((n) % 32)))
-#define FD_ZERO(fdsetp) memset (fdsetp, 0, sizeof (*fdsetp))
diff --git a/gdb/config/xm-aix4.h b/gdb/config/xm-aix4.h
deleted file mode 100644
index bea086a371b..00000000000
--- a/gdb/config/xm-aix4.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Parameters for hosting on an PowerPC, for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
- Contributed by Cygnus Corporation.
-
- 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. */
-
-/* The following text is taken from config/rs6000.mh:
- * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says
- * # `extern fd_set svc_fdset;' without ever defining the type fd_set.
- * # Unfortunately this occurs in the vx-share code, which is not configured
- * # like the rest of GDB (e.g. it doesn't include "defs.h").
- * # We circumvent this bug by #define-ing fd_set here, but undefining it in
- * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM!
- * MH_CFLAGS='-Dfd_set=int'
- * So, here we do the undefine...which has to occur before we include
- * <sys/select.h> below.
- */
-#undef fd_set
-
-#include <sys/select.h>
-
-/* At least as of AIX 3.2, we have termios. */
-#define HAVE_TERMIOS 1
-/* #define HAVE_TERMIO 1 */
-
-#define USG 1
-
-#define FIVE_ARG_PTRACE
-
-/* This system requires that we open a terminal with O_NOCTTY for it to
- not become our controlling terminal. */
-
-#define USE_O_NOCTTY
-
-/* Brain death inherited from PC's pervades. */
-#undef NULL
-#define NULL 0
-
-/* The IBM compiler requires this in order to properly compile alloca(). */
-#pragma alloca
-
-/* There is no vfork. */
-
-#define vfork fork
-
-char *termdef ();
-
-/* Signal handler for SIGWINCH `window size changed'. */
-
-#define SIGWINCH_HANDLER aix_resizewindow
-extern void aix_resizewindow (int);
-
-/* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */
-
-#define SIGWINCH_HANDLER_BODY \
- \
-/* Respond to SIGWINCH `window size changed' signal, and reset GDB's \
- window settings appropriately. */ \
- \
-void \
-aix_resizewindow (signo) \
- int signo; \
-{ \
- int fd = fileno (stdout); \
- if (isatty (fd)) { \
- int val; \
- \
- val = atoi (termdef (fd, 'l')); \
- if (val > 0) \
- lines_per_page = val; \
- val = atoi (termdef (fd, 'c')); \
- if (val > 0) \
- chars_per_line = val; \
- } \
-}
diff --git a/gdb/config/xm-nbsd.h b/gdb/config/xm-nbsd.h
deleted file mode 100644
index c8d00f6dd63..00000000000
--- a/gdb/config/xm-nbsd.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Host-dependent definitions for any CPU running NetBSD.
- Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Include this to get things like NGROUPS which <limits.h> doesn't
- define on some systems. */
-#include <sys/param.h>
-
-/* NetBSD has termios facilities. */
-#define HAVE_TERMIOS
diff --git a/gdb/config/xm-sysv4.h b/gdb/config/xm-sysv4.h
deleted file mode 100644
index 614d4032772..00000000000
--- a/gdb/config/xm-sysv4.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Definitions for running gdb on a host machine running any flavor of SVR4.
- Copyright 1991, 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
-
- 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. */
-
-/* SVR4 has termios facilities. */
-
-#undef HAVE_TERMIO
-#define HAVE_TERMIOS
-
-/* SVR4 is a derivative of System V Release 3 (USG) */
-
-#define USG
diff --git a/gdb/configure b/gdb/configure
index bc8ccbb7949..349fdfd9fac 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -1231,9 +1231,20 @@ fi
fi
-ALL_LINGUAS=
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
+
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1248: 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
@@ -1262,7 +1273,7 @@ fi
# 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:1266: checking for $ac_word" >&5
+echo "configure:1277: 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
@@ -1290,12 +1301,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1294: checking for ANSI C header files" >&5
+echo "configure:1305: 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 1299 "configure"
+#line 1310 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1303,7 +1314,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1318: \"$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*
@@ -1320,7 +1331,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 1324 "configure"
+#line 1335 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1338,7 +1349,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 1342 "configure"
+#line 1353 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1359,7 +1370,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1363 "configure"
+#line 1374 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1370,7 +1381,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1394,12 +1405,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1398: checking for working const" >&5
+echo "configure:1409: 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 1403 "configure"
+#line 1414 "configure"
#include "confdefs.h"
int main() {
@@ -1448,7 +1459,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1469,21 +1480,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1473: checking for inline" >&5
+echo "configure:1484: 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 1480 "configure"
+#line 1491 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1509,12 +1520,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1513: checking for off_t" >&5
+echo "configure:1524: 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 1518 "configure"
+#line 1529 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1542,12 +1553,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1546: checking for size_t" >&5
+echo "configure:1557: 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 1551 "configure"
+#line 1562 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1577,19 +1588,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:1581: checking for working alloca.h" >&5
+echo "configure:1592: 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 1586 "configure"
+#line 1597 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1604: \"$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
@@ -1610,12 +1621,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1614: checking for alloca" >&5
+echo "configure:1625: 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 1619 "configure"
+#line 1630 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1643,7 +1654,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1658: \"$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
@@ -1675,12 +1686,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1679: checking whether alloca needs Cray hooks" >&5
+echo "configure:1690: 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 1684 "configure"
+#line 1695 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1705,12 +1716,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:1709: checking for $ac_func" >&5
+echo "configure:1720: 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 1714 "configure"
+#line 1725 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1733,7 +1744,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1748: \"$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
@@ -1760,7 +1771,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1764: checking stack direction for C alloca" >&5
+echo "configure:1775: 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
@@ -1768,7 +1779,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1772 "configure"
+#line 1783 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1787,7 +1798,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1802: \"$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
@@ -1812,17 +1823,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:1816: checking for $ac_hdr" >&5
+echo "configure:1827: 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 1821 "configure"
+#line 1832 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1837: \"$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*
@@ -1851,12 +1862,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1855: checking for $ac_func" >&5
+echo "configure:1866: 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 1860 "configure"
+#line 1871 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1879,7 +1890,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1894: \"$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
@@ -1904,7 +1915,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1908: checking for working mmap" >&5
+echo "configure:1919: 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
@@ -1912,7 +1923,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1916 "configure"
+#line 1927 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2052,7 +2063,7 @@ main()
}
EOF
-if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2067: \"$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
@@ -2080,17 +2091,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:2084: checking for $ac_hdr" >&5
+echo "configure:2095: 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 2089 "configure"
+#line 2100 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2105: \"$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*
@@ -2120,12 +2131,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2124: checking for $ac_func" >&5
+echo "configure:2135: 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 2129 "configure"
+#line 2140 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2148,7 +2159,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2163: \"$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
@@ -2177,12 +2188,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2181: checking for $ac_func" >&5
+echo "configure:2192: 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 2186 "configure"
+#line 2197 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2205,7 +2216,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2220: \"$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
@@ -2239,19 +2250,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2243: checking for LC_MESSAGES" >&5
+echo "configure:2254: 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 2248 "configure"
+#line 2259 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2266: \"$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
@@ -2272,7 +2283,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2276: checking whether NLS is requested" >&5
+echo "configure:2287: 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"
@@ -2292,7 +2303,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2296: checking whether included gettext is requested" >&5
+echo "configure:2307: 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"
@@ -2311,17 +2322,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2315: checking for libintl.h" >&5
+echo "configure:2326: 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 2320 "configure"
+#line 2331 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2336: \"$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*
@@ -2338,19 +2349,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:2342: checking for gettext in libc" >&5
+echo "configure:2353: 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 2347 "configure"
+#line 2358 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2365: \"$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
@@ -2366,7 +2377,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:2370: checking for bindtextdomain in -lintl" >&5
+echo "configure:2381: 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
@@ -2374,7 +2385,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2378 "configure"
+#line 2389 "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
@@ -2385,7 +2396,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2400: \"$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
@@ -2401,19 +2412,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:2405: checking for gettext in libintl" >&5
+echo "configure:2416: 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 2410 "configure"
+#line 2421 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2428: \"$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
@@ -2441,7 +2452,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:2445: checking for $ac_word" >&5
+echo "configure:2456: 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
@@ -2475,12 +2486,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2479: checking for $ac_func" >&5
+echo "configure:2490: 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 2484 "configure"
+#line 2495 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2503,7 +2514,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2518: \"$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
@@ -2530,7 +2541,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:2534: checking for $ac_word" >&5
+echo "configure:2545: 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
@@ -2566,7 +2577,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:2570: checking for $ac_word" >&5
+echo "configure:2581: 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
@@ -2598,7 +2609,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2602 "configure"
+#line 2613 "configure"
#include "confdefs.h"
int main() {
@@ -2606,7 +2617,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2638,7 +2649,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:2642: checking for $ac_word" >&5
+echo "configure:2653: 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
@@ -2672,7 +2683,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:2676: checking for $ac_word" >&5
+echo "configure:2687: 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
@@ -2708,7 +2719,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:2712: checking for $ac_word" >&5
+echo "configure:2723: 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
@@ -2798,7 +2809,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2802: checking for catalogs to be installed" >&5
+echo "configure:2813: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2826,17 +2837,17 @@ echo "configure:2802: 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:2830: checking for linux/version.h" >&5
+echo "configure:2841: 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 2835 "configure"
+#line 2846 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2851: \"$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*
@@ -2897,11 +2908,59 @@ fi
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-cat >> confdefs.h <<\EOF
-#define PACKAGE "gdb"
+
+localedir='${datadir}/locale'
+
+
+if test "x$POSUB" != x; then
+
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:2919: checking for catalogs to be installed" >&5
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ echo "$ac_t""$LINGUAS" 1>&6
+
+ CONFIG_ALL="$CONFIG_ALL all-po"
+ CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
+ CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
+
+PACKAGE=gdb
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
EOF
+
debugdir=${libdir}/debug
# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
@@ -2923,16 +2982,6 @@ EOF
#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
-
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
-
subdirs="doc testsuite"
configdirs=
@@ -3031,146 +3080,6 @@ if test x"$enable_gdbmi" = xyes; then
fi
fi
-# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
-# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
-# Makefile fragments. That's why we need to have `Hcurses' before
-# `curses'. I don't see why we should use HP curses if a more
-# standard curses is available, except that according to HP's
-# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
-# HP-UX 10.10 and 10.20.
-
-
-echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
-echo "configure:3045: checking for library containing initscr" >&5
-if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_initscr="no"
-cat > conftest.$ac_ext <<EOF
-#line 3052 "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 initscr();
-
-int main() {
-initscr()
-; return 0; }
-EOF
-if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_initscr="none required"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3074 "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 initscr();
-
-int main() {
-initscr()
-; return 0; }
-EOF
-if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_initscr="-l$i"
-break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_initscr" 1>&6
-if test "$ac_cv_search_initscr" != "no"; then
- test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
-
-else :
- echo "configure: warning: no curses library found" 1>&2
-fi
-
-# Check whether the wborder function is provided by the curses
-# library detected above. In certain implementations such as
-# the HP/UX Hcurses for instance, this function is provided by an
-# additional library. So if we did not find this function inside
-# the curses library, try some alternate libraries we know might
-# provide it.
-
-echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
-echo "configure:3114: checking for library containing wborder" >&5
-if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_wborder="no"
-cat > conftest.$ac_ext <<EOF
-#line 3121 "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 wborder();
-
-int main() {
-wborder()
-; return 0; }
-EOF
-if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_wborder="none required"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3143 "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 wborder();
-
-int main() {
-wborder()
-; return 0; }
-EOF
-if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_wborder="-l$i"
-break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_wborder" 1>&6
-if test "$ac_cv_search_wborder" != "no"; then
- test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
-
-else :
- echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
-fi
-
# Enable TUI.
# Check whether --enable-tui or --disable-tui was given.
if test "${enable_tui+set}" = set; then
@@ -3241,17 +3150,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3245: checking for $ac_hdr" >&5
+echo "configure:3154: 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 3250 "configure"
+#line 3159 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3164: \"$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*
@@ -3281,17 +3190,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3285: checking for $ac_hdr" >&5
+echo "configure:3194: 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 3290 "configure"
+#line 3199 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3204: \"$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*
@@ -3329,17 +3238,17 @@ if test x"$enable_libunwind" = xyes; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3333: checking for $ac_hdr" >&5
+echo "configure:3242: 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 3338 "configure"
+#line 3247 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3252: \"$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*
@@ -3369,17 +3278,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3373: checking for $ac_hdr" >&5
+echo "configure:3282: 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 3378 "configure"
+#line 3287 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3292: \"$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*
@@ -3432,12 +3341,12 @@ fi
for ac_func in monstartup _mcleanup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3436: checking for $ac_func" >&5
+echo "configure:3345: 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 3441 "configure"
+#line 3350 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3460,7 +3369,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3373: \"$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
@@ -3485,12 +3394,12 @@ fi
done
echo $ac_n "checking for _etext""... $ac_c" 1>&6
-echo "configure:3489: checking for _etext" >&5
+echo "configure:3398: checking for _etext" >&5
if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3494 "configure"
+#line 3403 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern char _etext;
@@ -3499,7 +3408,7 @@ int main() {
free (&_etext);
; return 0; }
EOF
-if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var__etext=yes
else
@@ -3527,19 +3436,19 @@ if test "$enable_profiling" = yes ; then
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
-echo "configure:3531: checking whether $CC supports -pg" >&5
+echo "configure:3440: checking whether $CC supports -pg" >&5
if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3536 "configure"
+#line 3445 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cc_supports_pg=yes
else
@@ -3569,7 +3478,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3573: checking for $ac_word" >&5
+echo "configure:3482: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3610,7 +3519,7 @@ done
# 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:3614: checking for a BSD compatible install" >&5
+echo "configure:3523: 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
@@ -3663,7 +3572,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3667: checking whether ln -s works" >&5
+echo "configure:3576: 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
@@ -3686,7 +3595,7 @@ fi
# 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:3690: checking for $ac_word" >&5
+echo "configure:3599: 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
@@ -3718,7 +3627,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3722: checking for $ac_word" >&5
+echo "configure:3631: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3752,7 +3661,7 @@ test -n "$YACC" || YACC="yacc"
# 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:3756: checking for $ac_word" >&5
+echo "configure:3665: 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
@@ -3784,7 +3693,7 @@ fi
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3788: checking for $ac_word" >&5
+echo "configure:3697: 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
@@ -3816,7 +3725,7 @@ fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3820: checking for $ac_word" >&5
+echo "configure:3729: 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
@@ -3850,7 +3759,7 @@ fi
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3854: checking for $ac_word" >&5
+echo "configure:3763: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3886,7 +3795,7 @@ fi
# We might need to link with -lm; most simulators need it.
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3890: checking for main in -lm" >&5
+echo "configure:3799: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3894,14 +3803,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3898 "configure"
+#line 3807 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3814: \"$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
@@ -3934,12 +3843,12 @@ fi
# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
# is known to have this problem). Therefore we avoid libw if we can.
echo $ac_n "checking for wctype""... $ac_c" 1>&6
-echo "configure:3938: checking for wctype" >&5
+echo "configure:3847: checking for wctype" >&5
if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3943 "configure"
+#line 3852 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wctype(); below. */
@@ -3962,7 +3871,7 @@ wctype();
; return 0; }
EOF
-if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_wctype=yes"
else
@@ -3980,7 +3889,7 @@ if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:3984: checking for wctype in -lw" >&5
+echo "configure:3893: checking for wctype in -lw" >&5
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3988,7 +3897,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3992 "configure"
+#line 3901 "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
@@ -3999,7 +3908,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3912: \"$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
@@ -4032,14 +3941,14 @@ fi
# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
-echo "configure:4036: checking for library containing gethostbyname" >&5
+echo "configure:3945: checking for library containing gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
cat > conftest.$ac_ext <<EOF
-#line 4043 "configure"
+#line 3952 "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
@@ -4050,7 +3959,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="none required"
else
@@ -4061,7 +3970,7 @@ rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4065 "configure"
+#line 3974 "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
@@ -4072,7 +3981,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="-l$i"
break
@@ -4096,14 +4005,14 @@ fi
# Some systems (e.g. Solaris) have `socketpair' in libsocket.
echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
-echo "configure:4100: checking for library containing socketpair" >&5
+echo "configure:4009: checking for library containing socketpair" >&5
if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_socketpair="no"
cat > conftest.$ac_ext <<EOF
-#line 4107 "configure"
+#line 4016 "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
@@ -4114,7 +4023,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socketpair="none required"
else
@@ -4125,7 +4034,7 @@ rm -f conftest*
test "$ac_cv_search_socketpair" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4129 "configure"
+#line 4038 "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
@@ -4136,7 +4045,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socketpair="-l$i"
break
@@ -4175,14 +4084,14 @@ case $host_os in
# ??? Why?
echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:4179: checking for library containing tgetent" >&5
+echo "configure:4088: checking for library containing tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_tgetent="no"
cat > conftest.$ac_ext <<EOF
-#line 4186 "configure"
+#line 4095 "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
@@ -4193,7 +4102,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="none required"
else
@@ -4204,7 +4113,7 @@ rm -f conftest*
test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4208 "configure"
+#line 4117 "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
@@ -4215,7 +4124,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="-l$i"
break
@@ -4242,14 +4151,14 @@ esac
# Readline doesn't, so I think we're safe with leaving them out.
echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:4246: checking for library containing tgetent" >&5
+echo "configure:4155: checking for library containing tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_tgetent="no"
cat > conftest.$ac_ext <<EOF
-#line 4253 "configure"
+#line 4162 "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
@@ -4260,7 +4169,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="none required"
else
@@ -4271,7 +4180,7 @@ rm -f conftest*
test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4275 "configure"
+#line 4184 "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
@@ -4282,7 +4191,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="-l$i"
break
@@ -4307,6 +4216,152 @@ if test "$ac_cv_search_tgetent" = no; then
{ echo "configure: error: no termcap library found" 1>&2; exit 1; }
fi
+# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
+# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
+# Makefile fragments. That's why we need to have `Hcurses' before
+# `curses'. I don't see why we should use HP curses if a more
+# standard curses is available, except that according to HP's
+# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
+# HP-UX 10.10 and 10.20.
+
+# FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
+# and probably other platforms. AC_SEARCH_LIBS finds the library
+# in a place such as /usr/local/lib/libncurses.a, but does not
+# do anything to look for the matching include files.
+# -- chastain 2004-05-01
+
+
+echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
+echo "configure:4236: checking for library containing initscr" >&5
+if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_initscr="no"
+cat > conftest.$ac_ext <<EOF
+#line 4243 "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 initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initscr="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses cursesX curses pdcurses; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4265 "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 initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initscr="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_initscr" 1>&6
+if test "$ac_cv_search_initscr" != "no"; then
+ test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
+
+else :
+ echo "configure: warning: no curses library found" 1>&2
+fi
+
+# Check whether the wborder function is provided by the curses
+# library detected above. In certain implementations such as
+# the HP/UX Hcurses for instance, this function is provided by an
+# additional library. So if we did not find this function inside
+# the curses library, try some alternate libraries we know might
+# provide it.
+
+echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
+echo "configure:4305: checking for library containing wborder" >&5
+if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_wborder="no"
+cat > conftest.$ac_ext <<EOF
+#line 4312 "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 wborder();
+
+int main() {
+wborder()
+; return 0; }
+EOF
+if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_wborder="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4334 "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 wborder();
+
+int main() {
+wborder()
+; return 0; }
+EOF
+if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_wborder="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_wborder" 1>&6
+if test "$ac_cv_search_wborder" != "no"; then
+ test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
+
+else :
+ echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
+fi
+
# ------------------------- #
# Checks for header files. #
# ------------------------- #
@@ -4316,12 +4371,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4320: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4375: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4325 "configure"
+#line 4380 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4329,7 +4384,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4354,7 +4409,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4358: checking for opendir in -ldir" >&5
+echo "configure:4413: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4362,7 +4417,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4366 "configure"
+#line 4421 "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
@@ -4373,7 +4428,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4432: \"$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
@@ -4395,7 +4450,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4399: checking for opendir in -lx" >&5
+echo "configure:4454: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4403,7 +4458,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4407 "configure"
+#line 4462 "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
@@ -4414,7 +4469,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4473: \"$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
@@ -4437,12 +4492,12 @@ fi
fi
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:4441: checking whether stat file-mode macros are broken" >&5
+echo "configure:4496: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4446 "configure"
+#line 4501 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -4493,12 +4548,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4497: checking for ANSI C header files" >&5
+echo "configure:4552: 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 4502 "configure"
+#line 4557 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4506,7 +4561,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4565: \"$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*
@@ -4523,7 +4578,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 4527 "configure"
+#line 4582 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -4541,7 +4596,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 4545 "configure"
+#line 4600 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -4562,7 +4617,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 4566 "configure"
+#line 4621 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4573,7 +4628,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4600,17 +4655,17 @@ for ac_hdr in link.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4604: checking for $ac_hdr" >&5
+echo "configure:4659: 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 4609 "configure"
+#line 4664 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4669: \"$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*
@@ -4640,17 +4695,17 @@ for ac_hdr in machine/reg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4644: checking for $ac_hdr" >&5
+echo "configure:4699: 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 4649 "configure"
+#line 4704 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4709: \"$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*
@@ -4680,17 +4735,17 @@ for ac_hdr in nlist.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4684: checking for $ac_hdr" >&5
+echo "configure:4739: 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 4689 "configure"
+#line 4744 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4749: \"$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*
@@ -4720,17 +4775,17 @@ for ac_hdr in poll.h sys/poll.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4724: checking for $ac_hdr" >&5
+echo "configure:4779: 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 4729 "configure"
+#line 4784 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4789: \"$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*
@@ -4760,17 +4815,17 @@ for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4764: checking for $ac_hdr" >&5
+echo "configure:4819: 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 4769 "configure"
+#line 4824 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4829: \"$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*
@@ -4800,17 +4855,17 @@ for ac_hdr in stddef.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4804: checking for $ac_hdr" >&5
+echo "configure:4859: 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 4809 "configure"
+#line 4864 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4869: \"$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*
@@ -4840,17 +4895,17 @@ for ac_hdr in stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4844: checking for $ac_hdr" >&5
+echo "configure:4899: 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 4849 "configure"
+#line 4904 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4909: \"$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*
@@ -4880,17 +4935,17 @@ for ac_hdr in stdint.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4884: checking for $ac_hdr" >&5
+echo "configure:4939: 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 4889 "configure"
+#line 4944 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4949: \"$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*
@@ -4920,17 +4975,17 @@ for ac_hdr in string.h memory.h strings.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4924: checking for $ac_hdr" >&5
+echo "configure:4979: 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 4929 "configure"
+#line 4984 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4989: \"$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*
@@ -4960,17 +5015,17 @@ for ac_hdr in sys/fault.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4964: checking for $ac_hdr" >&5
+echo "configure:5019: 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 4969 "configure"
+#line 5024 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5029: \"$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*
@@ -5000,17 +5055,17 @@ for ac_hdr in sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5004: checking for $ac_hdr" >&5
+echo "configure:5059: 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 5009 "configure"
+#line 5064 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5069: \"$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*
@@ -5040,17 +5095,17 @@ for ac_hdr in sys/filio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5044: checking for $ac_hdr" >&5
+echo "configure:5099: 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 5049 "configure"
+#line 5104 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5109: \"$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*
@@ -5080,17 +5135,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5084: checking for $ac_hdr" >&5
+echo "configure:5139: 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 5089 "configure"
+#line 5144 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5149: \"$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*
@@ -5120,17 +5175,17 @@ for ac_hdr in 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:5124: checking for $ac_hdr" >&5
+echo "configure:5179: 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 5129 "configure"
+#line 5184 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5189: \"$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*
@@ -5160,17 +5215,17 @@ for ac_hdr in sys/proc.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5164: checking for $ac_hdr" >&5
+echo "configure:5219: 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 5169 "configure"
+#line 5224 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5229: \"$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*
@@ -5200,17 +5255,17 @@ for ac_hdr in sys/procfs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5204: checking for $ac_hdr" >&5
+echo "configure:5259: 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 5209 "configure"
+#line 5264 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5269: \"$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*
@@ -5240,17 +5295,17 @@ for ac_hdr in sys/ptrace.h ptrace.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5244: checking for $ac_hdr" >&5
+echo "configure:5299: 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 5249 "configure"
+#line 5304 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5309: \"$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*
@@ -5280,17 +5335,17 @@ for ac_hdr in sys/reg.h sys/debugreg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5284: checking for $ac_hdr" >&5
+echo "configure:5339: 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 5289 "configure"
+#line 5344 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5349: \"$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*
@@ -5320,17 +5375,17 @@ for ac_hdr in sys/select.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5324: checking for $ac_hdr" >&5
+echo "configure:5379: 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 5329 "configure"
+#line 5384 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5389: \"$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*
@@ -5360,17 +5415,57 @@ for ac_hdr in sys/syscall.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5364: checking for $ac_hdr" >&5
+echo "configure:5419: 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 5369 "configure"
+#line 5424 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5429: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/types.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5459: 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 5464 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5469: \"$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*
@@ -5400,17 +5495,17 @@ for ac_hdr in sys/user.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5404: checking for $ac_hdr" >&5
+echo "configure:5499: 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 5409 "configure"
+#line 5504 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5509: \"$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*
@@ -5440,17 +5535,17 @@ for ac_hdr in sys/wait.h wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5444: checking for $ac_hdr" >&5
+echo "configure:5539: 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 5449 "configure"
+#line 5544 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5549: \"$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*
@@ -5480,17 +5575,17 @@ for ac_hdr in termios.h termio.h sgtty.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5484: checking for $ac_hdr" >&5
+echo "configure:5579: 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 5489 "configure"
+#line 5584 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5589: \"$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*
@@ -5520,17 +5615,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:5524: checking for $ac_hdr" >&5
+echo "configure:5619: 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 5529 "configure"
+#line 5624 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5629: \"$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*
@@ -5557,11 +5652,11 @@ fi
done
-# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
# think that we don't have <curses.h> if we're using GCC.
case $host_os in
- solaris2.[78])
+ solaris2.[789])
if test "$GCC" = yes; then
cat >> confdefs.h <<\EOF
#define _MSE_INT_H 1
@@ -5569,21 +5664,21 @@ EOF
fi ;;
esac
-for ac_hdr in curses.h ncurses.h term.h
+for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5577: checking for $ac_hdr" >&5
+echo "configure:5672: 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 5582 "configure"
+#line 5677 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5682: \"$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*
@@ -5616,17 +5711,17 @@ for ac_hdr in ctype.h time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5620: checking for $ac_hdr" >&5
+echo "configure:5715: 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 5625 "configure"
+#line 5720 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5725: \"$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*
@@ -5654,12 +5749,12 @@ done
echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:5658: checking for member st_blocks in struct stat" >&5
+echo "configure:5753: checking for member st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5663 "configure"
+#line 5758 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -5667,7 +5762,7 @@ int main() {
struct stat st; (void) st.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_stat_with_st_blocks_member=yes
else
@@ -5686,6 +5781,7 @@ if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
EOF
fi
+
# ------------------------- #
# Checks for declarations. #
# ------------------------- #
@@ -5694,12 +5790,12 @@ 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:5698: checking whether $ac_func is declared" >&5
+echo "configure:5794: 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 5703 "configure"
+#line 5799 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -5711,7 +5807,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -5748,12 +5844,12 @@ fi
# ------------------ #
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5752: checking return type of signal handlers" >&5
+echo "configure:5848: 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 5757 "configure"
+#line 5853 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5770,7 +5866,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5794,12 +5890,12 @@ EOF
# ------------------------------------- #
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5798: checking for working const" >&5
+echo "configure:5894: 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 5803 "configure"
+#line 5899 "configure"
#include "confdefs.h"
int main() {
@@ -5848,7 +5944,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -5869,21 +5965,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5873: checking for inline" >&5
+echo "configure:5969: 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 5880 "configure"
+#line 5976 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:5887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -5916,19 +6012,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:5920: checking for working alloca.h" >&5
+echo "configure:6016: 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 5925 "configure"
+#line 6021 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6028: \"$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
@@ -5949,12 +6045,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5953: checking for alloca" >&5
+echo "configure:6049: 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 5958 "configure"
+#line 6054 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5982,7 +6078,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6082: \"$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
@@ -6014,12 +6110,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:6018: checking whether alloca needs Cray hooks" >&5
+echo "configure:6114: 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 6023 "configure"
+#line 6119 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -6044,12 +6140,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:6048: checking for $ac_func" >&5
+echo "configure:6144: 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 6053 "configure"
+#line 6149 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6072,7 +6168,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6172: \"$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
@@ -6099,7 +6195,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:6103: checking stack direction for C alloca" >&5
+echo "configure:6199: 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
@@ -6107,7 +6203,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 6111 "configure"
+#line 6207 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -6126,7 +6222,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6226: \"$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
@@ -6151,17 +6247,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:6155: checking for $ac_hdr" >&5
+echo "configure:6251: 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 6160 "configure"
+#line 6256 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6261: \"$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*
@@ -6190,12 +6286,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6194: checking for $ac_func" >&5
+echo "configure:6290: 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 6199 "configure"
+#line 6295 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6218,7 +6314,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6318: \"$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
@@ -6243,7 +6339,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6247: checking for working mmap" >&5
+echo "configure:6343: 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
@@ -6251,7 +6347,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6255 "configure"
+#line 6351 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6391,7 +6487,7 @@ main()
}
EOF
-if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6491: \"$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
@@ -6414,12 +6510,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:6418: checking for pid_t" >&5
+echo "configure:6514: 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 6423 "configure"
+#line 6519 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6448,17 +6544,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:6452: checking for vfork.h" >&5
+echo "configure:6548: 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 6457 "configure"
+#line 6553 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6558: \"$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*
@@ -6483,18 +6579,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:6487: checking for working vfork" >&5
+echo "configure:6583: 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:6493: checking for vfork" >&5
+echo "configure:6589: 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 6498 "configure"
+#line 6594 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -6517,7 +6613,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6617: \"$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
@@ -6539,7 +6635,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 6543 "configure"
+#line 6639 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -6634,7 +6730,7 @@ main() {
}
}
EOF
-if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6734: \"$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
@@ -6659,12 +6755,12 @@ fi
for ac_func in canonicalize_file_name realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6663: checking for $ac_func" >&5
+echo "configure:6759: 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 6668 "configure"
+#line 6764 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6687,7 +6783,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6787: \"$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
@@ -6714,12 +6810,12 @@ done
for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6718: checking for $ac_func" >&5
+echo "configure:6814: 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 6723 "configure"
+#line 6819 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6742,7 +6838,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6842: \"$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
@@ -6769,12 +6865,12 @@ done
for ac_func in pread64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6773: checking for $ac_func" >&5
+echo "configure:6869: 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 6778 "configure"
+#line 6874 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6797,7 +6893,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6897: \"$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
@@ -6824,12 +6920,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6828: checking for $ac_func" >&5
+echo "configure:6924: 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 6833 "configure"
+#line 6929 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6852,7 +6948,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6952: \"$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
@@ -6879,12 +6975,12 @@ done
for ac_func in setpgid setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6883: checking for $ac_func" >&5
+echo "configure:6979: 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 6888 "configure"
+#line 6984 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6907,7 +7003,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7007: \"$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
@@ -6934,12 +7030,12 @@ done
for ac_func in sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6938: checking for $ac_func" >&5
+echo "configure:7034: 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 6943 "configure"
+#line 7039 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6962,7 +7058,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7062: \"$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
@@ -6989,12 +7085,12 @@ done
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6993: checking for $ac_func" >&5
+echo "configure:7089: 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 6998 "configure"
+#line 7094 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7017,7 +7113,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7117: \"$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
@@ -7044,12 +7140,12 @@ done
for ac_func in syscall
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7048: checking for $ac_func" >&5
+echo "configure:7144: 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 7053 "configure"
+#line 7149 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7072,7 +7168,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7172: \"$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
@@ -7096,10 +7192,244 @@ else
fi
done
+for ac_func in ttrace
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7199: 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 7204 "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:7227: \"$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
+
+
+# Check the return and argument types of ptrace. No canned test for
+# this, so roll our own.
+gdb_ptrace_headers='
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+for ac_func in ptrace
+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:7270: 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 7275 "configure"
+#include "confdefs.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $gdb_ptrace_headers
+
+int main() {
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:7287: \"$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
+
+ : ${gdb_cv_func_ptrace_ret='int'}
+ : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
+fi
+
+done
+if test x = y ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_PTRACE 1
+EOF
+fi
+
+# Check return type.
+echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
+echo "configure:7323: checking return type of ptrace" >&5
+if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7328 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
+int main() {
+extern int ptrace ();
+; return 0; }
+EOF
+if { (eval echo configure:7335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_func_ptrace_ret='int'
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_func_ptrace_ret='long'
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
+cat >> confdefs.h <<EOF
+#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
+EOF
+
+# Check argument types.
+echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
+echo "configure:7354: checking types of arguments for ptrace" >&5
+if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+ for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
+ for gdb_arg4 in 'int' 'long'; do
+ cat > conftest.$ac_ext <<EOF
+#line 7364 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
+int main() {
+
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
+; return 0; }
+EOF
+if { (eval echo configure:7374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+ break 4;
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ for gdb_arg5 in 'int *' 'int' 'long'; do
+ cat > conftest.$ac_ext <<EOF
+#line 7385 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
+int main() {
+
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
+; return 0; }
+EOF
+if { (eval echo configure:7395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+ break 5;
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ done
+ done
+ done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
+fi
+
+echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+cat >> confdefs.h <<EOF
+#define PTRACE_TYPE_ARG3 $3
+EOF
+
+if test -n "$5"; then
+ cat >> confdefs.h <<EOF
+#define PTRACE_TYPE_ARG5 $5
+EOF
+
+fi
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:7103: checking whether setpgrp takes no argument" >&5
+echo "configure:7433: 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
@@ -7107,7 +7437,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 7111 "configure"
+#line 7441 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -7127,7 +7457,7 @@ main()
}
EOF
-if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7461: \"$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
@@ -7152,12 +7482,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:7156: checking whether setpgrp takes no argument" >&5
+echo "configure:7486: 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 7161 "configure"
+#line 7491 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -7171,7 +7501,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:7175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -7195,12 +7525,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:7199: checking for sigsetjmp" >&5
+echo "configure:7529: 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 7204 "configure"
+#line 7534 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -7209,7 +7539,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:7213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -7235,12 +7565,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:7239: checking for GNU regex" >&5
+echo "configure:7569: 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 7244 "configure"
+#line 7574 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
int main() {
@@ -7250,7 +7580,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:7254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -7282,14 +7612,84 @@ EOF
fi
+# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
+echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
+echo "configure:7618: checking for td_pcb in struct thread" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7623 "configure"
+#include "confdefs.h"
+#include <sys/param.h>
+#include <sys/proc.h>
+int main() {
+struct thread td; td.td_pcb;
+; return 0; }
+EOF
+if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_struct_thread_td_pcb=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_struct_thread_td_pcb=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
+if test $gdb_cv_struct_thread_td_pcb = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_THREAD_TD_PCB 1
+EOF
+
+fi
+
+# See if <sys/lwp.h> defines `struct lwp`.
+echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
+echo "configure:7653: checking for struct lwp" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7658 "configure"
+#include "confdefs.h"
+#include <sys/param.h>
+#include <sys/lwp.h>
+int main() {
+struct lwp l;
+; return 0; }
+EOF
+if { (eval echo configure:7666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_struct_lwp=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_struct_lwp=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
+if test $gdb_cv_struct_lwp = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LWP 1
+EOF
+
+fi
+
# See if <machine/reg.h> degines `struct reg'.
echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
-echo "configure:7288: checking for struct reg in machine/reg.h" >&5
+echo "configure:7688: checking for struct reg in machine/reg.h" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7293 "configure"
+#line 7693 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <machine/reg.h>
@@ -7297,7 +7697,7 @@ int main() {
struct reg r;
; return 0; }
EOF
-if { (eval echo configure:7301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg=yes
else
@@ -7320,19 +7720,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:7324: checking for r_fs in struct reg" >&5
+echo "configure:7724: 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 7329 "configure"
+#line 7729 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:7336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -7352,19 +7752,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:7356: checking for r_gs in struct reg" >&5
+echo "configure:7756: 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 7361 "configure"
+#line 7761 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:7368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -7386,19 +7786,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:7390: checking for PTRACE_GETREGS" >&5
+echo "configure:7790: 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 7395 "configure"
+#line 7795 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:7402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -7420,19 +7820,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:7424: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:7824: 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 7429 "configure"
+#line 7829 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:7436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -7454,12 +7854,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:7458: checking for PT_GETDBREGS" >&5
+echo "configure:7858: 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 7463 "configure"
+#line 7863 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -7467,7 +7867,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:7471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -7489,12 +7889,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:7493: checking for PT_GETXMMREGS" >&5
+echo "configure:7893: 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 7498 "configure"
+#line 7898 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -7502,7 +7902,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -7525,19 +7925,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:7529: checking for uintptr_t in stdint.h" >&5
+echo "configure:7929: 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 7534 "configure"
+#line 7934 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
uintptr_t foo = 0;
; return 0; }
EOF
-if { (eval echo configure:7541: \"$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*
gdb_cv_have_uintptr_t=yes
else
@@ -7558,12 +7958,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:7562: checking whether malloc must be declared" >&5
+echo "configure:7962: 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 7567 "configure"
+#line 7967 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7584,7 +7984,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -7605,12 +8005,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:7609: checking whether realloc must be declared" >&5
+echo "configure:8009: 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 7614 "configure"
+#line 8014 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7631,7 +8031,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -7652,12 +8052,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:7656: checking whether free must be declared" >&5
+echo "configure:8056: 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 7661 "configure"
+#line 8061 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7678,7 +8078,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:7682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -7699,12 +8099,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:7703: checking whether strerror must be declared" >&5
+echo "configure:8103: 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 7708 "configure"
+#line 8108 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7725,7 +8125,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:7729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -7746,12 +8146,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:7750: checking whether strdup must be declared" >&5
+echo "configure:8150: 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 7755 "configure"
+#line 8155 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7772,7 +8172,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:7776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -7793,12 +8193,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:7797: checking whether strstr must be declared" >&5
+echo "configure:8197: 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 7802 "configure"
+#line 8202 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7819,7 +8219,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:7823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -7840,12 +8240,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:7844: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:8244: 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 7849 "configure"
+#line 8249 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7866,7 +8266,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:7870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -7892,9 +8292,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:7896: checking for HPUX save_state structure" >&5
+echo "configure:8296: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 7898 "configure"
+#line 8298 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7909,7 +8309,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 7913 "configure"
+#line 8313 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7974,17 +8374,24 @@ EOF
EOF
;;
+ mips-sgi-irix5*)
+ # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
+ cat >> confdefs.h <<\EOF
+#define _KMEMUSER 1
+EOF
+
+ ;;
esac
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:7983: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:8390: 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 7988 "configure"
+#line 8395 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7993,7 +8400,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:7997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -8015,12 +8422,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:8019: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:8426: 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 8024 "configure"
+#line 8431 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8029,7 +8436,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:8033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -8051,12 +8458,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:8055: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:8462: 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 8060 "configure"
+#line 8467 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8065,7 +8472,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:8069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -8087,12 +8494,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:8091: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:8498: 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 8096 "configure"
+#line 8503 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8101,7 +8508,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:8105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -8123,12 +8530,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:8127: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:8534: 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 8132 "configure"
+#line 8539 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8137,7 +8544,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:8141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -8159,12 +8566,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:8163: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:8570: 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 8168 "configure"
+#line 8575 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8173,7 +8580,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -8195,12 +8602,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:8199: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:8606: 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 8204 "configure"
+#line 8611 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8209,7 +8616,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:8213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -8231,12 +8638,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:8235: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:8642: 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 8240 "configure"
+#line 8647 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8245,7 +8652,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:8249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -8267,12 +8674,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:8271: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:8678: 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 8276 "configure"
+#line 8683 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8281,7 +8688,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -8303,12 +8710,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:8307: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:8714: 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 8312 "configure"
+#line 8719 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8317,7 +8724,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:8321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -8339,12 +8746,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:8343: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:8750: 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 8348 "configure"
+#line 8755 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8353,7 +8760,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:8357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -8375,12 +8782,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:8379: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:8786: 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 8384 "configure"
+#line 8791 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8389,7 +8796,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:8393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -8411,12 +8818,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:8415: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:8822: 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 8420 "configure"
+#line 8827 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8425,7 +8832,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:8429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -8447,12 +8854,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:8451: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:8858: 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 8456 "configure"
+#line 8863 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8461,7 +8868,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -8488,7 +8895,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:8492: checking whether prfpregset_t type is broken" >&5
+echo "configure:8899: 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
@@ -8496,7 +8903,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 8500 "configure"
+#line 8907 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -8506,7 +8913,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8917: \"$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
@@ -8531,12 +8938,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:8535: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:8942: 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 8540 "configure"
+#line 8947 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -8549,7 +8956,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -8573,19 +8980,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:8577: checking for member l_addr in struct link_map" >&5
+echo "configure:8984: 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 8582 "configure"
+#line 8989 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:8589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -8607,12 +9014,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8611: checking for member lm_addr in struct link_map" >&5
+echo "configure:9018: 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 8616 "configure"
+#line 9023 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -8620,7 +9027,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:8624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -8642,12 +9049,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:8646: checking for member som_addr in struct so_map" >&5
+echo "configure:9053: 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 8651 "configure"
+#line 9058 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -8658,7 +9065,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:8662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -8680,12 +9087,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:8684: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:9091: 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 8689 "configure"
+#line 9096 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -8693,7 +9100,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:8697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -8720,12 +9127,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:8724: checking for long long support in compiler" >&5
+echo "configure:9131: 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 8729 "configure"
+#line 9136 "configure"
#include "confdefs.h"
int main() {
@@ -8735,7 +9142,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -8757,7 +9164,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:8761: checking for long long support in printf" >&5
+echo "configure:9168: 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
@@ -8765,7 +9172,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 8769 "configure"
+#line 9176 "configure"
#include "confdefs.h"
int main () {
@@ -8779,7 +9186,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9190: \"$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
@@ -8803,19 +9210,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:8807: checking for long double support in compiler" >&5
+echo "configure:9214: 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 8812 "configure"
+#line 9219 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:8819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -8837,7 +9244,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:8841: checking for long double support in printf" >&5
+echo "configure:9248: 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
@@ -8845,7 +9252,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8849 "configure"
+#line 9256 "configure"
#include "confdefs.h"
int main () {
@@ -8855,7 +9262,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9266: \"$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
@@ -8879,7 +9286,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:8883: checking for long double support in scanf" >&5
+echo "configure:9290: 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
@@ -8887,7 +9294,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8891 "configure"
+#line 9298 "configure"
#include "confdefs.h"
int main () {
@@ -8897,7 +9304,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9308: \"$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
@@ -8922,7 +9329,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:8926: checking for -bbigtoc option" >&5
+echo "configure:9333: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8936,14 +9343,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 8940 "configure"
+#line 9347 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -8952,6 +9359,7 @@ else
gdb_cv_bigtoc=
fi
rm -f conftest*
+ LDFLAGS="${SAVE_LDFLAGS}"
fi
@@ -8966,7 +9374,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:8970: checking for HPUX/OSF thread support" >&5
+echo "configure:9378: 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
@@ -8989,7 +9397,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:8993: checking for Solaris thread debugging library" >&5
+echo "configure:9401: 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
@@ -8999,7 +9407,7 @@ EOF
CONFIG_OBS="${CONFIG_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:9003: checking for dlopen in -ldl" >&5
+echo "configure:9411: 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
@@ -9007,7 +9415,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9011 "configure"
+#line 9419 "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
@@ -9018,7 +9426,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9430: \"$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
@@ -9050,17 +9458,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:9054: checking for the ld -export-dynamic flag" >&5
+echo "configure:9462: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 9057 "configure"
+#line 9465 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -9079,13 +9487,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:9083: checking if <proc_service.h> is old" >&5
+echo "configure:9491: 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 9089 "configure"
+#line 9497 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -9096,7 +9504,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:9100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -9122,12 +9530,12 @@ EOF
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:9126: checking for AiX thread debugging library" >&5
+echo "configure:9534: 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 9131 "configure"
+#line 9539 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -9136,7 +9544,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:9140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -9161,19 +9569,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:9165: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:9573: 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 9170 "configure"
+#line 9578 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
@@ -9198,19 +9606,19 @@ 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:9202: checking whether <sys/syscall.h> has __NR_tkill" >&5
+echo "configure:9610: 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 9207 "configure"
+#line 9615 "configure"
#include "confdefs.h"
#include <sys/syscall.h>
int main() {
int i = __NR_tkill;
; return 0; }
EOF
-if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_sys_syscall_h_has_tkill=yes
else
@@ -9322,7 +9730,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:9326: checking compiler warning flags" >&5
+echo "configure:9734: 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
@@ -9332,14 +9740,14 @@ echo "configure:9326: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 9336 "configure"
+#line 9744 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:9343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -9357,12 +9765,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:9361: checking for cygwin" >&5
+echo "configure:9769: 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 9366 "configure"
+#line 9774 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -9411,7 +9819,14 @@ WIN32LDAPP=
-configdir="unix"
+case "${host}" in
+*-*-cygwin*)
+ configdir="win"
+ ;;
+*)
+ configdir="unix"
+ ;;
+esac
GDBTKLIBS=
if test "${enable_gdbtk}" = "yes"; then
@@ -9440,7 +9855,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:9444: checking for Tcl configuration" >&5
+echo "configure:9859: 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
@@ -9549,7 +9964,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:9553: checking for Tk configuration" >&5
+echo "configure:9968: 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
@@ -9616,14 +10031,7 @@ fi
# now look for Tcl library stuff
- case "${host}" in
- *-*-cygwin*)
- tcldir=../tcl/win/
- ;;
- *)
- tcldir=../tcl/unix/
- ;;
- esac
+ tcldir="../tcl/${configdir}/"
TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
@@ -9658,7 +10066,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:9662: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:10070: 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"
@@ -9724,17 +10132,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:9728: checking for tclInt.h" >&5
+echo "configure:10136: 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 9733 "configure"
+#line 10141 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10146: \"$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*
@@ -9794,7 +10202,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9798: checking for Tk private headers" >&5
+echo "configure:10206: 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"
@@ -9860,17 +10268,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:9864: checking for tk.h" >&5
+echo "configure:10272: 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 9869 "configure"
+#line 10277 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10282: \"$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*
@@ -9916,7 +10324,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9920: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:10328: 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
@@ -9939,7 +10347,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9943: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:10351: 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
@@ -9964,14 +10372,7 @@ fi
# now look for Tk library stuff
- case "${host}" in
- *-*-cygwin*)
- tkdir=../tk/win/
- ;;
- *)
- tkdir=../tk/unix/
- ;;
- esac
+ tkdir="../tk/${configdir}/"
TK_DEPS="${tkdir}${TK_LIB_FILE}"
@@ -9994,7 +10395,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9998: checking for Itcl configuration" >&5
+echo "configure:10399: 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
@@ -10097,7 +10498,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:10101: checking for Itk configuration" >&5
+echo "configure:10502: 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
@@ -10239,7 +10640,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:10243: checking for X" >&5
+echo "configure:10644: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -10301,12 +10702,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 10305 "configure"
+#line 10706 "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:10310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10711: \"$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*
@@ -10375,14 +10776,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 10379 "configure"
+#line 10780 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10787: \"$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.
@@ -10521,6 +10922,20 @@ fi
+# List of host floatformats.
+cat >> confdefs.h <<EOF
+#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
+EOF
+
+cat >> confdefs.h <<EOF
+#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
+EOF
+
+cat >> confdefs.h <<EOF
+#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
+EOF
+
+
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
@@ -10557,7 +10972,7 @@ s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${host_makefile_frag}`
targetfile=`sed -n '
-s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${target_makefile_frag}`
if test "${target}" = "${host}"; then
@@ -10594,7 +11009,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:10598: checking whether gdbserver is supported on this host" >&5
+echo "configure:11013: 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
@@ -10606,9 +11021,9 @@ fi
subdirs="doc testsuite $configdirs"
-# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
-# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
-# version.
+# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
+# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
+# to an empty version.
files=
links=
@@ -10617,11 +11032,14 @@ rm -f xm.h
xm_h=""
if test "${hostfile}" != ""; then
xm_h=xm.h
- GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+ case "${hostfile}" in
+ xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
+ * ) GDB_XM_FILE="${hostfile}"
+ esac
files="${files} ${GDB_XM_FILE}"
links="${links} xm.h"
cat >> confdefs.h <<EOF
-#define GDB_XM_FILE ${GDB_XM_FILE}
+#define GDB_XM_FILE "${GDB_XM_FILE}"
EOF
fi
@@ -10631,11 +11049,14 @@ rm -f tm.h
tm_h=""
if test "${targetfile}" != ""; then
tm_h=tm.h
- GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+ case "${targetfile}" in
+ tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
+ * ) GDB_TM_FILE="${targetfile}"
+ esac
files="${files} ${GDB_TM_FILE}"
links="${links} tm.h"
cat >> confdefs.h <<EOF
-#define GDB_TM_FILE ${GDB_TM_FILE}
+#define GDB_TM_FILE "${GDB_TM_FILE}"
EOF
fi
@@ -10645,11 +11066,14 @@ rm -f nm.h
nm_h=""
if test "${nativefile}" != ""; then
nm_h=nm.h
- GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+ case "${nativefile}" in
+ nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
+ * ) GDB_NM_FILE="${nativefile}"
+ esac
files="${files} ${GDB_NM_FILE}"
links="${links} nm.h"
cat >> confdefs.h <<EOF
-#define GDB_NM_FILE ${GDB_NM_FILE}
+#define GDB_NM_FILE "${GDB_NM_FILE}"
EOF
fi
@@ -10658,12 +11082,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10662: checking for Cygwin environment" >&5
+echo "configure:11086: 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 10667 "configure"
+#line 11091 "configure"
#include "confdefs.h"
int main() {
@@ -10674,7 +11098,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:10678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -10691,19 +11115,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:10695: checking for mingw32 environment" >&5
+echo "configure:11119: 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 10700 "configure"
+#line 11124 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:10707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -10722,7 +11146,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:10726: checking for executable suffix" >&5
+echo "configure:11150: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10732,7 +11156,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:11160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -10774,7 +11198,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10778: checking for iconv" >&5
+echo "configure:11202: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10782,7 +11206,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 10786 "configure"
+#line 11210 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10792,7 +11216,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -10804,7 +11228,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10808 "configure"
+#line 11232 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10814,7 +11238,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11242: \"$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
@@ -10835,13 +11259,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10839: checking for iconv declaration" >&5
+echo "configure:11263: 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 10845 "configure"
+#line 11269 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -10860,7 +11284,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:10864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -11064,6 +11488,8 @@ s%@GT_NO@%$GT_NO%g
s%@GT_YES@%$GT_YES%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%g
+s%@localedir@%$localedir%g
+s%@PACKAGE@%$PACKAGE%g
s%@subdirs@%$subdirs%g
s%@AWK@%$AWK%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
@@ -11429,7 +11855,7 @@ if test "${nativefile}" = ""; then
mv -f Makefile.tem Makefile
fi
-sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
+sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
mv -f Makefile.tmp Makefile
diff --git a/gdb/configure.host b/gdb/configure.host
index d652e1f1c2f..f7308911621 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -2,8 +2,11 @@
# invoked from the autoconf generated configure script.
# This file sets the following shell variables:
-# gdb_host_cpu generic name of host's CPU
-# gdb_host name of GDB host definition to use
+# gdb_host_cpu generic name of host's CPU
+# gdb_host name of GDB host definition to use
+# gdb_host_float_format host's float floatformat, or 0
+# gdb_host_double_format host's double floatformat, or 0
+# gdb_host_long_double_format host's long double floatformat, or 0
# Map host cpu into the config cpu subdirectory name.
# The default is $host_cpu.
@@ -15,6 +18,7 @@ arm*) gdb_host_cpu=arm ;;
hppa*) gdb_host_cpu=pa ;;
i[34567]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
+m88*) gdb_host_cpu=m88k ;;
mips*) gdb_host_cpu=mips ;;
powerpc*) gdb_host_cpu=powerpc ;;
sparcv9 | sparc64) gdb_host_cpu=sparc ;;
@@ -35,12 +39,15 @@ alpha*-*-osf1*) gdb_host=alpha-osf1 ;;
alpha*-*-osf2*) gdb_host=alpha-osf2 ;;
alpha*-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
alpha*-*-linux*) gdb_host=alpha-linux ;;
-alpha*-*-freebsd*) gdb_host=fbsd ;;
-alpha*-*-netbsd*) gdb_host=nbsd ;;
+alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ gdb_host=fbsd ;;
+alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
alpha*-*-openbsd*) gdb_host=nbsd ;;
arm*-*-linux*) gdb_host=linux ;;
-arm*-*-netbsdelf*) gdb_host=nbsdelf ;;
+arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu)
+ gdb_host=nbsdelf ;;
arm*-*-netbsd*) gdb_host=nbsdaout ;;
hppa*-*-hiux*) gdb_host=hppahpux ;;
@@ -48,6 +55,8 @@ hppa*-*-hpux10.20) gdb_host=hpux1020 ;;
hppa*64*-*-hpux11*) gdb_host=hpux11w ;;
hppa*-*-hpux11*) gdb_host=hpux11 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
+hppa*-*-linux*) gdb_host=linux ;;
+hppa*-*-openbsd*) gdb_host=obsd ;;
i[34567]86-ncr-*) gdb_host=ncr3000 ;;
i[34567]86-*-dgux*) gdb_host=i386v4 ;;
@@ -55,7 +64,6 @@ i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
gdb_host=fbsd ;;
i[34567]86-*-netbsdelf* | i[34567]86-*-knetbsd*-gnu)
gdb_host=nbsdelf ;;
-i[34567]86-*-freebsd*) gdb_host=fbsd ;;
i[34567]86-*-netbsd*) gdb_host=nbsdaout ;;
i[34567]86-*-go32*) gdb_host=go32 ;;
i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
@@ -82,40 +90,27 @@ i[34567]86-*-cygwin*) gdb_host=cygwin ;;
ia64-*-aix*) gdb_host=aix ;;
ia64-*-linux*) gdb_host=linux ;;
-# OBSOLETE m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
-# OBSOLETE m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
-
-# OBSOLETE m68*-att-*) gdb_host=3b1 ;;
-# OBSOLETE m68*-bull*-sysv*) gdb_host=dpx2 ;;
m68*-*-linux*) gdb_host=linux ;;
-# OBSOLETE m68*-*-lynxos*) gdb_host=m68klynx ;;
+m68*-*-netbsdelf* | m68*-*-knetbsd*-gnu)
+ gdb_host=nbsdelf ;;
m68*-*-netbsd*) gdb_host=nbsdaout ;;
-# OBSOLETE m68*-*-sysv4*) gdb_host=m68kv4 ;;
-# OBSOLETE m68*-motorola-*) gdb_host=delta68 ;;
-# OBSOLETE m68*-sun-sunos3*) gdb_host=sun3os3 ;;
-# OBSOLETE m68*-sun-sunos4*) gdb_host=sun3os4 ;;
-# OBSOLETE m68*-sun-*) gdb_host=sun3os4 ;;
-
-# OBSOLETE mips-dec-*) gdb_host=decstation ;;
-# OBSOLETE mips-little-*) gdb_host=littlemips ;;
+m68*-*-openbsd*) gdb_host=obsd ;;
+
+m88*-*-openbsd*) gdb_host=obsd ;;
+
mips-sgi-irix5*) gdb_host=irix5 ;;
mips-sgi-irix6*) gdb_host=irix6 ;;
-# OBSOLETE mips-sony-*) gdb_host=news-mips ;;
mips*-*-linux*) gdb_host=linux ;;
-mips*-*-netbsd*) gdb_host=nbsd ;;
-# OBSOLETE mips-*-mach3*) gdb_host=mipsm3 ;;
-# OBSOLETE mips-*-sysv4*) gdb_host=mipsv4 ;;
-# OBSOLETE mips-*-sysv*) gdb_host=riscos ;;
-# OBSOLETE mips-*-riscos*) gdb_host=riscos ;;
+mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
ns32k-*-netbsd*) gdb_host=nbsdaout ;;
-powerpc-*-aix3*) gdb_host=aix ;;
-powerpc-*-aix4.[0-2]*) gdb_host=aix ;;
-powerpc-*-aix4.3.[0-1]*) gdb_host=aix ;;
-powerpc-*-aix*) gdb_host=aix432 ;;
+powerpc-*-aix*) gdb_host=aix ;;
powerpc-*-linux*) gdb_host=linux ;;
-powerpc-*-netbsd*) gdb_host=nbsd ;;
+powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
+powerpc-*-openbsd*) gdb_host=obsd ;;
powerpc64-*-linux*) gdb_host=ppc64-linux ;;
@@ -125,30 +120,62 @@ rs6000-*-*) gdb_host=rs6000 ;;
s390*-*-*) gdb_host=s390 ;;
-sh*-*-netbsdelf*) gdb_host=nbsd ;;
+sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
-sparc64-*-freebsd*) gdb_host=fbsd ;;
+sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
+ gdb_host=fbsd ;;
sparc-*-linux*) gdb_host=linux ;;
sparc64-*-linux*) gdb_host=linux64 ;;
-sparc-*-netbsdelf*) gdb_host=nbsdelf ;;
+sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu)
+ gdb_host=nbsdelf ;;
sparc-*-netbsdaout*) gdb_host=nbsdaout ;;
sparc-*-netbsd*) gdb_host=nbsdaout ;;
-sparc64-*-netbsd*) gdb_host=nbsd64 ;;
+sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
+ gdb_host=nbsd64 ;;
sparc-*-openbsd*) gdb_host=nbsdelf ;;
sparc64-*-openbsd*) gdb_host=nbsd64 ;;
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
gdb_host=sol2
;;
-vax-*-bsd*) gdb_host=vaxbsd ;;
-vax-*-ultrix2*) gdb_host=vaxult2 ;;
-vax-*-ultrix*) gdb_host=vaxult ;;
+vax-*-bsd*) gdb_host=vax ;;
+vax-*-netbsdelf* | vax-*-knetbsd*-gnu)
+ gdb_host=nbsdelf ;;
+vax-*-netbsd*) gdb_host=nbsdaout ;;
+vax-*-openbsd*) gdb_host=obsd ;;
+vax-*-ultrix*) gdb_host=vax ;;
x86_64-*-linux*) gdb_host=linux64 ;;
-x86_64-*-freebsd*) gdb_host=fbsd64 ;;
-x86_64-*-netbsd*) gdb_host=nbsd64 ;;
+x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
+ gdb_host=fbsd64 ;;
+x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
+ gdb_host=nbsd64 ;;
x86_64-*-openbsd*) gdb_host=obsd64 ;;
m32r*-*-linux*) gdb_host=linux ;;
esac
+
+
+
+# Map the host/cpu onto the floatformat correspondong to C's "float",
+# "double" and "long double" types.
+
+case "${host}" in
+i[34567]86-*-*)
+ gdb_host_float_format="&floatformat_ieee_single_little"
+ gdb_host_double_format="&floatformat_ieee_double_little"
+ gdb_host_long_double_format="&floatformat_i387_ext"
+ ;;
+hppa*-*-linux*)
+ gdb_host_float_format="&floatformat_ieee_single_big"
+ gdb_host_double_format="&floatformat_ieee_double_big"
+ gdb_host_long_double_format="&floatformat_ieee_double_big"
+ ;;
+*)
+ gdb_host_float_format=0
+ gdb_host_double_format=0
+ gdb_host_long_double_format=0
+ ;;
+esac
diff --git a/gdb/configure.in b/gdb/configure.in
index 2781b41f73c..81be74b8d49 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -42,10 +42,70 @@ AC_CANONICAL_SYSTEM
# 2.5x.
AC_CHECK_TOOL(RANLIB, ranlib, :)
+dnl List of object files and targets accumulated by configure.
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
dnl Set up for gettext. PACKAGE is used when we call bindtextdomain.
-ALL_LINGUAS=
+
CY_GNU_GETTEXT
-AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+
+localedir='${datadir}/locale'
+AC_SUBST(localedir)
+
+if test "x$POSUB" != x; then
+
+ dnl Lifted from GCC's config/gettext.m4.
+ AC_MSG_CHECKING(for catalogs to be installed)
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS= AC_SUBST(CATALOGS)
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ AC_MSG_RESULT($LINGUAS)
+
+ CONFIG_ALL="$CONFIG_ALL all-po"
+ CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
+ CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
+
+PACKAGE=gdb
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
+AC_SUBST(PACKAGE)
debugdir=${libdir}/debug
@@ -57,17 +117,6 @@ AC_DEFINE_DIR(DEBUGDIR, debugdir,
[Global directory for separate debug files. ])
#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
-dnl List of object files added by configure.
-
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
-
AC_CONFIG_SUBDIRS(doc testsuite)
configdirs=
@@ -135,26 +184,6 @@ if test x"$enable_gdbmi" = xyes; then
fi
fi
-# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
-# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
-# Makefile fragments. That's why we need to have `Hcurses' before
-# `curses'. I don't see why we should use HP curses if a more
-# standard curses is available, except that according to HP's
-# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
-# HP-UX 10.10 and 10.20.
-
-AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses pdcurses], [],
- [AC_MSG_WARN([no curses library found])])
-
-# Check whether the wborder function is provided by the curses
-# library detected above. In certain implementations such as
-# the HP/UX Hcurses for instance, this function is provided by an
-# additional library. So if we did not find this function inside
-# the curses library, try some alternate libraries we know might
-# provide it.
-AC_SEARCH_LIBS(wborder, [cur_colr], [],
- [AC_MSG_WARN([wborder function not found, tui will be disabled])])
-
# Enable TUI.
AC_ARG_ENABLE(tui,
[ --enable-tui enable full-screen terminal user interface (TUI)],
@@ -331,6 +360,32 @@ if test "$ac_cv_search_tgetent" = no; then
AC_MSG_ERROR([no termcap library found])
fi
+# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
+# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
+# Makefile fragments. That's why we need to have `Hcurses' before
+# `curses'. I don't see why we should use HP curses if a more
+# standard curses is available, except that according to HP's
+# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
+# HP-UX 10.10 and 10.20.
+
+# FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
+# and probably other platforms. AC_SEARCH_LIBS finds the library
+# in a place such as /usr/local/lib/libncurses.a, but does not
+# do anything to look for the matching include files.
+# -- chastain 2004-05-01
+
+AC_SEARCH_LIBS(initscr, [ncurses Hcurses cursesX curses pdcurses], [],
+ [AC_MSG_WARN([no curses library found])])
+
+# Check whether the wborder function is provided by the curses
+# library detected above. In certain implementations such as
+# the HP/UX Hcurses for instance, this function is provided by an
+# additional library. So if we did not find this function inside
+# the curses library, try some alternate libraries we know might
+# provide it.
+AC_SEARCH_LIBS(wborder, [cur_colr], [],
+ [AC_MSG_WARN([wborder function not found, tui will be disabled])])
+
# ------------------------- #
# Checks for header files. #
# ------------------------- #
@@ -358,23 +413,24 @@ AC_CHECK_HEADERS(sys/ptrace.h ptrace.h)
AC_CHECK_HEADERS(sys/reg.h sys/debugreg.h)
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/types.h)
AC_CHECK_HEADERS(sys/user.h)
AC_CHECK_HEADERS(sys/wait.h wait.h)
AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
AC_CHECK_HEADERS(unistd.h)
-# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
# think that we don't have <curses.h> if we're using GCC.
case $host_os in
- solaris2.[[78]])
+ solaris2.[[789]])
if test "$GCC" = yes; then
AC_DEFINE(_MSE_INT_H, 1,
[[Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
- Solaris 2.[78] when using GCC. ]])
+ Solaris 2.[789] when using GCC. ]])
fi ;;
esac
-AC_CHECK_HEADERS(curses.h ncurses.h term.h)
+AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h)
# FIXME: kettenis/20030102: In most cases we include these
# unconditionally, so what's the point in checking these?
@@ -392,6 +448,7 @@ AC_MSG_RESULT($gdb_cv_have_struct_stat_with_st_blocks_member)
if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
fi
+
# ------------------------- #
# Checks for declarations. #
# ------------------------- #
@@ -426,6 +483,70 @@ AC_CHECK_FUNCS(setpgid setpgrp)
AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
AC_CHECK_FUNCS(socketpair)
AC_CHECK_FUNCS(syscall)
+AC_CHECK_FUNCS(ttrace)
+
+# Check the return and argument types of ptrace. No canned test for
+# this, so roll our own.
+gdb_ptrace_headers='
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+gcc_AC_CHECK_DECLS(ptrace, , [
+ : ${gdb_cv_func_ptrace_ret='int'}
+ : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+], $gdb_ptrace_headers)
+# Check return type.
+AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
+ AC_TRY_COMPILE($gdb_ptrace_headers,
+ [extern int ptrace ();],
+ gdb_cv_func_ptrace_ret='int',
+ gdb_cv_func_ptrace_ret='long'))
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
+ [Define as the return type of ptrace.])
+# Check argument types.
+AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+ for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
+ for gdb_arg4 in 'int' 'long'; do
+ AC_TRY_COMPILE($gdb_ptrace_headers, [
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+ break 4;])
+ for gdb_arg5 in 'int *' 'int' 'long'; do
+ AC_TRY_COMPILE($gdb_ptrace_headers, [
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+], [
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+ break 5;])
+ done
+ done
+ done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+])
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3],
+ [Define to the type of arg 3 for ptrace.])
+if test -n "$[5]"; then
+ AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5],
+ [Define to the type of arg 5 for ptrace.])
+fi
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
@@ -488,6 +609,26 @@ if test "$gdb_with_regex" = yes; then
[Define to 1 if the regex included in libiberty should be used.])
fi
+# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
+AC_CACHE_CHECK([for td_pcb in struct thread], gdb_cv_struct_thread_td_pcb,
+[AC_TRY_COMPILE([#include <sys/param.h>
+#include <sys/proc.h>], [struct thread td; td.td_pcb;],
+gdb_cv_struct_thread_td_pcb=yes, gdb_cv_struct_thread_td_pcb=no)])
+if test $gdb_cv_struct_thread_td_pcb = yes; then
+ AC_DEFINE(HAVE_STRUCT_THREAD_TD_PCB, 1,
+ [Define to 1 if your system has td_pcb in struct thread.])
+fi
+
+# See if <sys/lwp.h> defines `struct lwp`.
+AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
+[AC_TRY_COMPILE([#include <sys/param.h>
+#include <sys/lwp.h>], [struct lwp l;],
+gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
+if test $gdb_cv_struct_lwp = yes; then
+ AC_DEFINE(HAVE_STRUCT_LWP, 1,
+ [Define to 1 if your system has struct lwp.])
+fi
+
# See if <machine/reg.h> degines `struct reg'.
AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
[AC_TRY_COMPILE([#include <sys/types.h>
@@ -622,6 +763,10 @@ if test "${target}" = "${host}"; then
*-*-solaris2.[[6789]])
AC_DEFINE(NEW_PROC_API)
;;
+ mips-sgi-irix5*)
+ # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
+ AC_DEFINE([_KMEMUSER], 1)
+ ;;
esac
fi
@@ -852,6 +997,7 @@ aix*)
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=])
+ LDFLAGS="${SAVE_LDFLAGS}"
])
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
;;
@@ -1114,7 +1260,14 @@ WIN32LDAPP=
AC_SUBST(WIN32LIBS)
AC_SUBST(WIN32LDAPP)
-configdir="unix"
+case "${host}" in
+*-*-cygwin*)
+ configdir="win"
+ ;;
+*)
+ configdir="unix"
+ ;;
+esac
GDBTKLIBS=
if test "${enable_gdbtk}" = "yes"; then
@@ -1133,14 +1286,7 @@ if test "${enable_gdbtk}" = "yes"; then
# now look for Tcl library stuff
- case "${host}" in
- *-*-cygwin*)
- tcldir=../tcl/win/
- ;;
- *)
- tcldir=../tcl/unix/
- ;;
- esac
+ tcldir="../tcl/${configdir}/"
TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
@@ -1156,14 +1302,7 @@ if test "${enable_gdbtk}" = "yes"; then
# now look for Tk library stuff
- case "${host}" in
- *-*-cygwin*)
- tkdir=../tk/win/
- ;;
- *)
- tkdir=../tk/unix/
- ;;
- esac
+ tkdir="../tk/${configdir}/"
TK_DEPS="${tkdir}${TK_LIB_FILE}"
@@ -1286,6 +1425,11 @@ AC_SUBST(CONFIG_CLEAN)
AC_SUBST(CONFIG_INSTALL)
AC_SUBST(CONFIG_UNINSTALL)
+# List of host floatformats.
+AC_DEFINE_UNQUOTED(GDB_HOST_FLOAT_FORMAT,$gdb_host_float_format,[Host float floatformat])
+AC_DEFINE_UNQUOTED(GDB_HOST_DOUBLE_FORMAT,$gdb_host_double_format,[Host double floatformat])
+AC_DEFINE_UNQUOTED(GDB_HOST_LONG_DOUBLE_FORMAT,$gdb_host_long_double_format,[Host long double floatformat])
+
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
@@ -1323,7 +1467,7 @@ s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${host_makefile_frag}`
targetfile=`sed -n '
-s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${target_makefile_frag}`
if test "${target}" = "${host}"; then
@@ -1365,9 +1509,9 @@ fi
AC_CONFIG_SUBDIRS($configdirs)
-# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
-# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
-# version.
+# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
+# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
+# to an empty version.
files=
links=
@@ -1376,10 +1520,13 @@ rm -f xm.h
xm_h=""
if test "${hostfile}" != ""; then
xm_h=xm.h
- GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+ case "${hostfile}" in
+ xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
+ * ) GDB_XM_FILE="${hostfile}"
+ esac
files="${files} ${GDB_XM_FILE}"
links="${links} xm.h"
- AC_DEFINE_UNQUOTED(GDB_XM_FILE, ${GDB_XM_FILE})
+ AC_DEFINE_UNQUOTED(GDB_XM_FILE, "${GDB_XM_FILE}")
fi
AC_SUBST(xm_h)
@@ -1387,10 +1534,13 @@ rm -f tm.h
tm_h=""
if test "${targetfile}" != ""; then
tm_h=tm.h
- GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+ case "${targetfile}" in
+ tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
+ * ) GDB_TM_FILE="${targetfile}"
+ esac
files="${files} ${GDB_TM_FILE}"
links="${links} tm.h"
- AC_DEFINE_UNQUOTED(GDB_TM_FILE, ${GDB_TM_FILE})
+ AC_DEFINE_UNQUOTED(GDB_TM_FILE, "${GDB_TM_FILE}")
fi
AC_SUBST(tm_h)
@@ -1398,10 +1548,13 @@ rm -f nm.h
nm_h=""
if test "${nativefile}" != ""; then
nm_h=nm.h
- GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+ case "${nativefile}" in
+ nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
+ * ) GDB_NM_FILE="${nativefile}"
+ esac
files="${files} ${GDB_NM_FILE}"
links="${links} nm.h"
- AC_DEFINE_UNQUOTED(GDB_NM_FILE, ${GDB_NM_FILE})
+ AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}")
fi
AC_SUBST(nm_h)
@@ -1437,7 +1590,7 @@ mv -f Makefile.tem Makefile
fi
changequote(,)dnl
-sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
+sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
mv -f Makefile.tmp Makefile
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index c13bb71d4bf..a7c14d8966f 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -19,6 +19,7 @@ hppa*) gdb_target_cpu=pa ;;
i[34567]86*) gdb_target_cpu=i386 ;;
m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
m68*) gdb_target_cpu=m68k ;;
+m88*) gdb_target_cpu=m88k ;;
mips*) gdb_target_cpu=mips ;;
powerpc*) gdb_target_cpu=powerpc ;;
sparc*) gdb_target_cpu=sparc ;;
@@ -37,12 +38,15 @@ esac
case "${target}" in
-x86_64-*-freebsd*) gdb_target=fbsd64 ;;
-*-*-freebsd*) gdb_target=fbsd ;;
+x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
+ gdb_target=fbsd64 ;;
+*-*-freebsd* | *-*-kfreebsd*-gnu)
+ gdb_target=fbsd ;;
alpha*-*-osf*) gdb_target=alpha-osf1 ;;
alpha*-*-linux*) gdb_target=alpha-linux ;;
-alpha*-*-netbsd*) gdb_target=nbsd ;;
+alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
alpha*-*-openbsd*) gdb_target=nbsd ;;
alpha*-*-*) gdb_target=alpha ;;
@@ -50,7 +54,8 @@ arm*-wince-pe) gdb_target=wince ;;
arm*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-arm*-*-netbsd*) gdb_target=nbsd ;;
+arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
arm-*-nto*) gdb_target=nto ;;
arm*-*-* | thumb*-*-* | strongarm*-*-*)
gdb_target=embed
@@ -74,29 +79,26 @@ frv-*-*) gdb_target=frv ;;
hppa*64*-*-hpux11*) gdb_target=hppa64 ;;
hppa*-*-hpux*) gdb_target=hppahpux ;;
hppa*-*-hiux*) gdb_target=hppahpux ;;
+hppa*-*-linux*) gdb_target=linux ;;
+hppa*-*-openbsd*) gdb_target=obsd ;;
hppa*-*-*) gdb_target=hppa ;;
i[34567]86-ncr-*) gdb_target=ncr3000 ;;
i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
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[34567]86-*-isc*) gdb_target=i386v ;;
i[34567]86-*-gnu*) gdb_target=i386gnu ;;
-i[34567]86-*-netware*) gdb_target=i386nw
- configdirs="${configdirs} nlm" ;;
+i[34567]86-*-netware*) gdb_target=i386
+ configdirs="${configdirs} nlm" ;;
i[34567]86-*-cygwin*) gdb_target=cygwin ;;
i[34567]86-*-vxworks*) gdb_target=vxworks ;;
-i[34567]86-*-*) gdb_target=embed ;;
+i[34567]86-*-*) gdb_target=i386 ;;
ia64-*-aix*) gdb_target=aix ;;
ia64-*-linux*) gdb_target=linux
@@ -108,13 +110,7 @@ m32r-*-*) gdb_target=m32r ;;
m68hc11*-*-*|m6811*-*-*) gdb_target=m68hc11 ;;
-# OBSOLETE m68000-*-sunos3*) gdb_target=sun2os3 ;;
-# OBSOLETE m68000-*-sunos4*) gdb_target=sun2os4 ;;
-
-# OBSOLETE m68*-bull-sysv*) gdb_target=dpx2 ;;
-# OBSOLETE m68*-att-*) gdb_target=3b1 ;;
m68*-cisco*-*) gdb_target=cisco ;;
-# OBSOLETE m68*-motorola-*) gdb_target=delta68 ;;
m68*-netx-*) gdb_target=vxworks68 ;;
m68*-tandem-*) gdb_target=st2000 ;;
m68*-*-aout*) gdb_target=monitor ;;
@@ -123,15 +119,15 @@ m68*-*-elf*) gdb_target=monitor ;;
m68*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-# OBSOLETE m68*-*-lynxos*) gdb_target=m68klynx ;;
-m68*-*-netbsd*) gdb_target=nbsdaout ;;
+m68*-*-netbsd* | m68*-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
+m68*-*-openbsd*) gdb_target=obsd ;;
m68*-*-os68k*) gdb_target=os68k ;;
-# OBSOLETE m68*-*-sunos3*) gdb_target=sun3os3 ;;
-# OBSOLETE m68*-*-sunos4*) gdb_target=sun3os4 ;;
-# OBSOLETE m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-uclinux*) gdb_target=monitor ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
+m88*-*-openbsd*) gdb_target=obsd ;;
+
mcore*-*-*) gdb_target=mcore ;;
mips*-*-pe) gdb_target=wince ;;
@@ -140,8 +136,8 @@ mips*-sgi-irix6*) gdb_target=irix6 ;;
mips*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-mips*-*-netbsd*) gdb_target=nbsd ;;
-# OBSOLETE mips*-*-sysv4*) gdb_target=mipsv4 ;;
+mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
mips*-*-*) gdb_target=embed ;;
@@ -149,7 +145,9 @@ mn10300-*-*) gdb_target=mn10300 ;;
ns32k-*-netbsd*) gdb_target=nbsdaout ;;
-powerpc-*-netbsd*) gdb_target=nbsd ;;
+powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
+powerpc-*-openbsd*) gdb_target=obsd ;;
powerpc-*-aix*) gdb_target=aix ;;
powerpc-*-linux*) gdb_target=linux
build_gdbserver=yes
@@ -177,14 +175,17 @@ sh-*-elf*) gdb_target=embed ;;
sh-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-sh*-*-netbsdelf*) gdb_target=nbsd ;;
+sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
sh-*-nto*) gdb_target=nto ;;
sh*) gdb_target=embed ;;
sparc-*-linux*) gdb_target=linux ;;
sparc64-*-linux*) gdb_target=linux64 ;;
-sparc-*-netbsd*) gdb_target=nbsd ;;
-sparc64-*-netbsd*) gdb_target=nbsd64 ;;
+sparc-*-netbsd* | sparc-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
+sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
+ gdb_target=nbsd64 ;;
sparc-*-openbsd*) gdb_target=obsd ;;
sparc64-*-openbsd*) gdb_target=obsd64
gdb_osabi=GDB_OSABI_OPENBSD_ELF
@@ -201,6 +202,9 @@ sparc64-*-*) gdb_target=sparc64 ;;
xstormy16-*-*) gdb_target=xstormy16 ;;
+vax-*-netbsd* | vax-*-knetbsd*-gnu)
+ gdb_target=nbsd ;;
+vax-*-openbsd*) gdb_target=nbsd ;;
vax-*-*) gdb_target=vax ;;
v850*-*-*) gdb_target=v850
@@ -214,8 +218,11 @@ v850*-*-*) gdb_target=v850
x86_64-*-linux*) gdb_target=linux64
build_gdbserver=yes
;;
-x86_64-*-netbsd*) gdb_target=nbsd64 ;;
-x86_64-*-openbsd*) gdb_target=obsd64 ;;
+x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
+ gdb_target=nbsd64 ;;
+x86_64-*-openbsd*) gdb_target=obsd64
+ gdb_osabi=GDB_OSABI_OPENBSD_ELF
+ ;;
esac
@@ -223,7 +230,8 @@ esac
case "${target}" in
*-*-linux*) gdb_osabi=GDB_OSABI_LINUX ;;
-*-*-gnu*) gdb_osabi=GDB_OSABI_HURD ;;
*-*-nto*) gdb_osabi=GDB_OSABI_QNXNTO ;;
*-*-solaris*) gdb_osabi=GDB_OSABI_SOLARIS ;;
+*-*-*-gnu*) ;; # prevent non-GNU kernels to match the Hurd rule below
+*-*-gnu*) gdb_osabi=GDB_OSABI_HURD ;;
esac
diff --git a/gdb/core-aout.c b/gdb/core-aout.c
index 0329302dc1e..659c8180f19 100644
--- a/gdb/core-aout.c
+++ b/gdb/core-aout.c
@@ -37,16 +37,14 @@
#include <sys/types.h>
#include <sys/param.h>
#include "gdbcore.h"
-#include "value.h" /* For supply_register. */
+#include "value.h"
#include "regcache.h"
/* These are needed on various systems to expand REGISTER_U_ADDR. */
-#ifndef USG
#include "gdb_dirent.h"
#include <sys/file.h>
#include "gdb_stat.h"
#include <sys/user.h>
-#endif
#ifndef CORE_REGISTER_ADDR
#define CORE_REGISTER_ADDR(regno, regptr) register_addr(regno, regptr)
@@ -99,7 +97,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
&& bad_reg < 0)
bad_reg = regno;
else
- supply_register (regno, core_reg_sect + addr);
+ regcache_raw_supply (current_regcache, regno, core_reg_sect + addr);
}
if (bad_reg >= 0)
@@ -142,5 +140,5 @@ static struct core_fns aout_core_fns =
void
_initialize_core_aout (void)
{
- add_core_fns (&aout_core_fns);
+ deprecated_add_core_fns (&aout_core_fns);
}
diff --git a/gdb/core-regset.c b/gdb/core-regset.c
index 0600837e1a0..529c51f7c21 100644
--- a/gdb/core-regset.c
+++ b/gdb/core-regset.c
@@ -115,5 +115,5 @@ extern void _initialize_core_regset (void);
void
_initialize_core_regset (void)
{
- add_core_fns (&regset_core_fns);
+ deprecated_add_core_fns (&regset_core_fns);
}
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 572b4486cd4..91519b97f63 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -41,17 +41,18 @@
extern void _initialize_core (void);
static void call_extra_exec_file_hooks (char *filename);
-/* You can have any number of hooks for `exec_file_command' command to call.
- If there's only one hook, it is set in exec_file_display hook.
- If there are two or more hooks, they are set in exec_file_extra_hooks[],
- and exec_file_display_hook is set to a function that calls all of them.
- This extra complexity is needed to preserve compatibility with
- old code that assumed that only one hook could be set, and which called
- exec_file_display_hook directly. */
+/* You can have any number of hooks for `exec_file_command' command to
+ call. If there's only one hook, it is set in exec_file_display
+ hook. If there are two or more hooks, they are set in
+ exec_file_extra_hooks[], and deprecated_exec_file_display_hook is
+ set to a function that calls all of them. This extra complexity is
+ needed to preserve compatibility with old code that assumed that
+ only one hook could be set, and which called
+ deprecated_exec_file_display_hook directly. */
typedef void (*hook_type) (char *);
-hook_type exec_file_display_hook; /* the original hook */
+hook_type deprecated_exec_file_display_hook; /* the original hook */
static hook_type *exec_file_extra_hooks; /* array of additional hooks */
static int exec_file_hook_count = 0; /* size of array */
@@ -100,7 +101,7 @@ specify_exec_file_hook (void (*hook) (char *))
{
hook_type *new_array;
- if (exec_file_display_hook != NULL)
+ if (deprecated_exec_file_display_hook != NULL)
{
/* There's already a hook installed. Arrange to have both it
* and the subsequent hooks called. */
@@ -108,8 +109,8 @@ specify_exec_file_hook (void (*hook) (char *))
{
/* If this is the first extra hook, initialize the hook array. */
exec_file_extra_hooks = (hook_type *) xmalloc (sizeof (hook_type));
- exec_file_extra_hooks[0] = exec_file_display_hook;
- exec_file_display_hook = call_extra_exec_file_hooks;
+ exec_file_extra_hooks[0] = deprecated_exec_file_display_hook;
+ deprecated_exec_file_display_hook = call_extra_exec_file_hooks;
exec_file_hook_count = 1;
}
@@ -124,7 +125,7 @@ specify_exec_file_hook (void (*hook) (char *))
exec_file_extra_hooks[exec_file_hook_count - 1] = hook;
}
else
- exec_file_display_hook = hook;
+ deprecated_exec_file_display_hook = hook;
}
/* The exec file must be closed before running an inferior.
@@ -449,7 +450,7 @@ No arg means have no core file. This command has been superseded by the\n\
Use `set gnutarget auto' to specify automatic detection.",
&setlist);
set_cmd_sfunc (c, set_gnutarget_command);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
if (getenv ("GNUTARGET"))
set_gnutarget (getenv ("GNUTARGET"));
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 403cfa31338..a9d21328438 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -43,16 +43,20 @@
#include "symfile.h"
#include "exec.h"
#include "readline/readline.h"
-
+#include "observer.h"
#include "gdb_assert.h"
#ifndef O_BINARY
#define O_BINARY 0
#endif
-/* List of all available core_fns. On gdb startup, each core file register
- reader calls add_core_fns() to register information on each core format it
- is prepared to read. */
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+/* List of all available core_fns. On gdb startup, each core file
+ register reader calls deprecated_add_core_fns() to register
+ information on each core format it is prepared to read. */
static struct core_fns *core_file_fns = NULL;
@@ -104,7 +108,7 @@ struct target_ops core_ops;
handle. */
void
-add_core_fns (struct core_fns *cf)
+deprecated_add_core_fns (struct core_fns *cf)
{
cf->next = core_file_fns;
core_file_fns = cf;
@@ -280,6 +284,7 @@ core_open (char *filename, int from_tty)
bfd *temp_bfd;
int ontop;
int scratch_chan;
+ int flags;
target_preopen (from_tty);
if (!filename)
@@ -299,7 +304,12 @@ core_open (char *filename, int from_tty)
old_chain = make_cleanup (xfree, filename);
- scratch_chan = open (filename, O_BINARY | ( write_files ? O_RDWR : O_RDONLY ), 0);
+ flags = O_BINARY | O_LARGEFILE;
+ if (write_files)
+ flags |= O_RDWR;
+ else
+ flags |= O_RDONLY;
+ scratch_chan = open (filename, flags, 0);
if (scratch_chan < 0)
perror_with_name (filename);
@@ -355,6 +365,10 @@ core_open (char *filename, int from_tty)
ontop = !push_target (&core_ops);
discard_cleanups (old_chain);
+ /* This is done first, before anything has a chance to query the
+ inferior for information such as symbols. */
+ observer_notify_inferior_created (&core_ops, from_tty);
+
p = bfd_core_file_failing_command (core_bfd);
if (p)
printf_filtered ("Core was generated by `%s'.\n", p);
@@ -388,8 +402,7 @@ core_open (char *filename, int from_tty)
/* Now, set up the frame cache, and print the top of stack. */
flush_cached_frames ();
select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
else
{
@@ -552,9 +565,9 @@ core_xfer_partial (struct target_ops *ops, enum target_object object,
size -= offset;
if (size > len)
size = len;
- if (size > 0 &&
- ! bfd_get_section_contents (core_bfd, section, readbuf,
- (file_ptr) offset, size))
+ if (size > 0
+ && !bfd_get_section_contents (core_bfd, section, readbuf,
+ (file_ptr) offset, size))
{
warning ("Couldn't read NT_AUXV note in core file.");
return -1;
@@ -564,6 +577,38 @@ core_xfer_partial (struct target_ops *ops, enum target_object object,
}
return -1;
+ case TARGET_OBJECT_WCOOKIE:
+ if (readbuf)
+ {
+ /* When the StackGhost cookie is stored in core file, BFD
+ represents this with a fake section called ".wcookie". */
+
+ struct bfd_section *section;
+ bfd_size_type size;
+ char *contents;
+
+ section = bfd_get_section_by_name (core_bfd, ".wcookie");
+ if (section == NULL)
+ return -1;
+
+ size = bfd_section_size (core_bfd, section);
+ if (offset >= size)
+ return 0;
+ size -= offset;
+ if (size > len)
+ size = len;
+ if (size > 0
+ && !bfd_get_section_contents (core_bfd, section, readbuf,
+ (file_ptr) offset, size))
+ {
+ warning ("Couldn't read StackGhost cookie in core file.");
+ return -1;
+ }
+
+ return size;
+ }
+ return -1;
+
default:
if (ops->beneath != NULL)
return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 4344545c3e9..a182dd9a232 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -148,7 +148,7 @@ find_last_component (const char *name)
/* Return the name of the class containing method PHYSNAME. */
char *
-class_name_from_physname (const char *physname)
+cp_class_name_from_physname (const char *physname)
{
char *ret = NULL;
const char *end;
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index bbf911a387f..569aeacb7d2 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -52,7 +52,7 @@ struct using_direct
/* Functions from cp-support.c. */
-extern char *class_name_from_physname (const char *physname);
+extern char *cp_class_name_from_physname (const char *physname);
extern char *method_name_from_physname (const char *physname);
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 42a48f55676..6f9bb353f5f 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -36,10 +36,6 @@
#include "cp-abi.h"
#include "valprint.h"
-/* Indication of presence of HP-compiled object files */
-extern int hp_som_som_object_present; /* defined in symtab.c */
-
-
int vtblprint; /* Controls printing of vtbl's */
int objectprint; /* Controls looking up an object's derived type
using what we find in its vtables. */
@@ -115,7 +111,7 @@ cp_print_class_method (char *valaddr,
if (sym == 0)
{
/* 1997-08-01 Currently unsupported with HP aCC */
- if (hp_som_som_object_present)
+ if (deprecated_hp_som_som_object_present)
{
fputs_filtered ("?? <not supported with HP aCC>", stream);
return;
@@ -808,7 +804,7 @@ cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
void
_initialize_cp_valprint (void)
{
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("static-members", class_support, var_boolean,
(char *) &static_field_print,
"Set printing of C++ static members.",
@@ -817,13 +813,13 @@ _initialize_cp_valprint (void)
/* Turn on printing of static fields. */
static_field_print = 1;
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("vtbl", class_support, var_boolean, (char *) &vtblprint,
"Set printing of C++ virtual function tables.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("object", class_support, var_boolean, (char *) &objectprint,
"Set printing of object's derived type based on vtable info.",
&setprintlist),
diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c
index 03b31321577..1d1f8500c51 100644
--- a/gdb/cpu32bug-rom.c
+++ b/gdb/cpu32bug-rom.c
@@ -142,7 +142,7 @@ init_cpu32bug_cmds (void)
cpu32bug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
cpu32bug_cmds.dump_registers = "rd\r"; /* dump_registers */
cpu32bug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- cpu32bug_cmds.supply_register = cpu32bug_supply_register; /* supply_register */
+ cpu32bug_cmds.supply_register = cpu32bug_supply_register;
cpu32bug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
cpu32bug_cmds.load = "lo\r"; /* download command */
cpu32bug_cmds.loadresp = "\n"; /* load response */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 0ebfedac865..1cb0d529380 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -470,8 +470,8 @@ cris_frame_prev_register (struct frame_info *next_frame,
{
struct cris_unwind_cache *info
= cris_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
@@ -511,7 +511,7 @@ cris_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-cris_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1211,7 +1211,7 @@ cris_register_offset (int regno)
of data in register regno. */
static struct type *
-cris_register_virtual_type (int regno)
+cris_register_type (struct gdbarch *gdbarch, int regno)
{
if (regno == SP_REGNUM || regno == PC_REGNUM
|| (regno > P8_REGNUM && regno < USP_REGNUM))
@@ -1320,7 +1320,7 @@ cris_register_name (int regno)
static int
cris_register_bytes_ok (long bytes)
{
- return (bytes == DEPRECATED_REGISTER_BYTES);
+ return (bytes == deprecated_register_bytes ());
}
/* Extract from an array regbuf containing the raw register state a function
@@ -3336,7 +3336,7 @@ supply_gregset (elf_gregset_t *gregsetp)
knows about the actual size of each register so that's no problem. */
for (i = 0; i < NUM_GENREGS + NUM_SPECREGS; i++)
{
- supply_register (i, (char *)&regp[i]);
+ regcache_raw_supply (current_regcache, i, (char *)&regp[i]);
}
}
@@ -3632,20 +3632,20 @@ _initialize_cris_tdep (void)
(char *) &usr_cmd_cris_version,
"Set the current CRIS version.", &setlist);
set_cmd_sfunc (c, cris_version_update);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
c = add_set_enum_cmd ("cris-mode", class_support, cris_mode_enums,
&usr_cmd_cris_mode,
"Set the current CRIS mode.", &setlist);
set_cmd_sfunc (c, cris_mode_update);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
c = add_cmd ("cris-fpless-backtrace", class_support, cris_fpless_backtrace,
"Display call chain using the subroutine return pointer.\n"
"Note that this displays the address after the jump to the "
"subroutine.", &cmdlist);
- add_core_fns (&cris_elf_core_fns);
+ deprecated_add_core_fns (&cris_elf_core_fns);
}
@@ -3670,14 +3670,15 @@ cris_version_update (char *ignore_args, int from_tty,
{
struct gdbarch_info info;
- /* NOTE: cagney/2002-03-17: The add_show_from_set() function clones
- the set command passed as a parameter. The clone operation will
- include (BUG?) any ``set'' command callback, if present.
- Commands like ``info set'' call all the ``show'' command
- callbacks. Unfortunately, for ``show'' commands cloned from
- ``set'', this includes callbacks belonging to ``set'' commands.
- Making this worse, this only occures if add_show_from_set() is
- called after add_cmd_sfunc() (BUG?). */
+ /* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
+ function clones the set command passed as a parameter. The clone
+ operation will include (BUG?) any ``set'' command callback, if
+ present. Commands like ``info set'' call all the ``show''
+ command callbacks. Unfortunately, for ``show'' commands cloned
+ from ``set'', this includes callbacks belonging to ``set''
+ commands. Making this worse, this only occures if
+ deprecated_add_show_from_set() is called after add_cmd_sfunc()
+ (BUG?). */
/* From here on, trust the user's CRIS version setting. */
if (cmd_type (c) == set_cmd)
@@ -3697,14 +3698,15 @@ cris_mode_update (char *ignore_args, int from_tty,
{
struct gdbarch_info info;
- /* NOTE: cagney/2002-03-17: The add_show_from_set() function clones
- the set command passed as a parameter. The clone operation will
- include (BUG?) any ``set'' command callback, if present.
- Commands like ``info set'' call all the ``show'' command
- callbacks. Unfortunately, for ``show'' commands cloned from
- ``set'', this includes callbacks belonging to ``set'' commands.
- Making this worse, this only occures if add_show_from_set() is
- called after add_cmd_sfunc() (BUG?). */
+ /* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
+ function clones the set command passed as a parameter. The clone
+ operation will include (BUG?) any ``set'' command callback, if
+ present. Commands like ``info set'' call all the ``show''
+ command callbacks. Unfortunately, for ``show'' commands cloned
+ from ``set'', this includes callbacks belonging to ``set''
+ commands. Making this worse, this only occures if
+ deprecated_add_show_from_set() is called after add_cmd_sfunc()
+ (BUG?). */
/* From here on, trust the user's CRIS mode setting. */
if (cmd_type (c) == set_cmd)
@@ -3795,7 +3797,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_return_value (gdbarch, cris_return_value);
set_gdbarch_deprecated_reg_struct_has_addr (gdbarch,
cris_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
/* There are 32 registers (some of which may not be implemented). */
set_gdbarch_num_regs (gdbarch, 32);
@@ -3804,8 +3806,8 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, cris_register_name);
/* Length of ordinary registers used in push_word and a few other
- places. DEPRECATED_REGISTER_RAW_SIZE is the real way to know how
- big a register is. */
+ places. register_size() is the real way to know how big a
+ register is. */
set_gdbarch_deprecated_register_size (gdbarch, 4);
set_gdbarch_double_bit (gdbarch, 64);
/* The default definition of a long double is 2 * TARGET_DOUBLE_BIT,
@@ -3848,25 +3850,11 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
internal_error (__FILE__, __LINE__, "cris_gdbarch_init: unknown CRIS version");
}
- set_gdbarch_deprecated_register_bytes (gdbarch, register_bytes);
-
/* Returns the register offset for the first byte of register regno's space
in the saved register state. */
set_gdbarch_deprecated_register_byte (gdbarch, cris_register_offset);
- /* The length of the registers in the actual machine representation. */
- set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size);
-
- /* The largest value DEPRECATED_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_deprecated_register_virtual_size (gdbarch, cris_register_size);
-
- /* The largest value DEPRECATED_REGISTER_VIRTUAL_SIZE can have. */
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 32);
-
- set_gdbarch_deprecated_register_virtual_type (gdbarch, cris_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, cris_register_type);
/* Dummy frame functions. */
set_gdbarch_push_dummy_code (gdbarch, cris_push_dummy_code);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 4b977c68771..b0da9bee9c0 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -282,9 +282,9 @@ static struct type *
d10v_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr == D10V_PC_REGNUM)
- return builtin_type_void_func_ptr;
+ return builtin_type (gdbarch)->builtin_func_ptr;
if (reg_nr == D10V_SP_REGNUM || reg_nr == D10V_FP_REGNUM)
- return builtin_type_void_data_ptr;
+ return builtin_type (gdbarch)->builtin_data_ptr;
else if (reg_nr >= a0_regnum (gdbarch)
&& reg_nr < (a0_regnum (gdbarch) + NR_A_REGS))
return builtin_type_int64;
@@ -953,7 +953,7 @@ d10v_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+d10v_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1313,7 +1313,7 @@ display_trace (int low, int high)
if (!suppress)
/* FIXME-32x64--assumes sal.pc fits in long. */
printf_filtered ("No source file for address %s.\n",
- local_hex_string ((unsigned long) sal.pc));
+ hex_string ((unsigned long) sal.pc));
suppress = 1;
}
}
@@ -1375,8 +1375,8 @@ d10v_frame_prev_register (struct frame_info *next_frame,
{
struct d10v_unwind_cache *info
= d10v_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind d10v_frame_unwind = {
@@ -1542,8 +1542,8 @@ _initialize_d10v_tdep (void)
{
register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init);
- target_resume_hook = d10v_eva_prepare_to_trace;
- target_wait_loop_hook = d10v_eva_get_trace_data;
+ deprecated_target_resume_hook = d10v_eva_prepare_to_trace;
+ deprecated_target_wait_loop_hook = d10v_eva_get_trace_data;
deprecate_cmd (add_com ("regs", class_vars, show_regs,
"Print all registers"),
@@ -1563,13 +1563,17 @@ as reported by info trace (NOT addresses!).");
add_info ("itrace", trace_info,
"Display info about the trace data buffer.");
- add_setshow_boolean_cmd ("itracedisplay", no_class, &trace_display,
- "Set automatic display of trace.\n",
- "Show automatic display of trace.\n",
+ add_setshow_boolean_cmd ("itracedisplay", no_class, &trace_display, "\
+Set automatic display of trace.", "\
+Show automatic display of trace.", "\
+Controls the display of d10v specific instruction trace information.", "\
+Automatic display of trace is %s.",
NULL, NULL, &setlist, &showlist);
add_setshow_boolean_cmd ("itracesource", no_class,
- &default_trace_show_source,
- "Set display of source code with trace.\n",
- "Show display of source code with trace.\n",
+ &default_trace_show_source, "\
+Set display of source code with trace.", "\
+Show display of source code with trace.", "\
+When on source code is included in the d10v instruction trace display.", "\
+Display of source code with trace is %s.",
NULL, NULL, &setlist, &showlist);
}
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index a592334ea05..075f01a58f4 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -140,7 +140,7 @@ init_dbug_cmds (void)
dbug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
dbug_cmds.dump_registers = "rd\r"; /* dump_registers */
dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- dbug_cmds.supply_register = dbug_supply_register; /* supply_register */
+ dbug_cmds.supply_register = dbug_supply_register;
dbug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
dbug_cmds.load = "dl\r"; /* download command */
dbug_cmds.loadresp = "\n"; /* load response */
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index efbbf2ac695..32db167c375 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -37,7 +37,7 @@
#include "defs.h"
#include "gdb_string.h"
-#if defined(USG) || defined(__CYGNUSCLIB__)
+#if defined(__CYGNUSCLIB__)
#include <sys/types.h>
#include <fcntl.h>
#endif
@@ -54,7 +54,6 @@
#include "stabsread.h"
#include "gdb-stabs.h"
#include "demangle.h"
-#include "language.h" /* Needed for local_hex_string */
#include "complaints.h"
#include "cp-abi.h"
#include "gdb_assert.h"
@@ -625,7 +624,7 @@ dbx_symfile_init (struct objfile *objfile)
/* Allocate struct to keep track of the symfile */
objfile->sym_stab_info = (struct dbx_symfile_info *)
- xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
+ xmalloc (sizeof (struct dbx_symfile_info));
memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
DBX_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
@@ -748,7 +747,7 @@ dbx_symfile_finish (struct objfile *objfile)
}
xfree (hfiles);
}
- xmfree (objfile->md, objfile->sym_stab_info);
+ xfree (objfile->sym_stab_info);
}
free_header_files ();
}
@@ -892,7 +891,7 @@ init_bincl_list (int number, struct objfile *objfile)
{
bincls_allocated = number;
next_bincl = bincl_list = (struct header_file_location *)
- xmmalloc (objfile->md, bincls_allocated * sizeof (struct header_file_location));
+ xmalloc (bincls_allocated * sizeof (struct header_file_location));
}
/* Add a bincl to the list. */
@@ -905,8 +904,8 @@ add_bincl_to_list (struct partial_symtab *pst, char *name, int instance)
int offset = next_bincl - bincl_list;
bincls_allocated *= 2;
bincl_list = (struct header_file_location *)
- xmrealloc (pst->objfile->md, (char *) bincl_list,
- bincls_allocated * sizeof (struct header_file_location));
+ xrealloc ((char *) bincl_list,
+ bincls_allocated * sizeof (struct header_file_location));
next_bincl = bincl_list + offset;
}
next_bincl->pst = pst;
@@ -937,7 +936,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
static void
free_bincl_list (struct objfile *objfile)
{
- xmfree (objfile->md, bincl_list);
+ xfree (bincl_list);
bincls_allocated = 0;
}
@@ -1358,12 +1357,6 @@ read_dbx_symtab (struct objfile *objfile)
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
&& namestring[nsl - 2] == '.'))
{
- if (objfile->ei.entry_point < nlist.n_value &&
- objfile->ei.entry_point >= last_o_file_start)
- {
- objfile->ei.deprecated_entry_file_lowpc = last_o_file_start;
- objfile->ei.deprecated_entry_file_highpc = nlist.n_value;
- }
if (past_first_source_file && pst
/* The gould NP1 uses low values for .o and -l symbols
which are not the address. */
@@ -1463,6 +1456,7 @@ read_dbx_symtab (struct objfile *objfile)
static int prev_so_symnum = -10;
static int first_so_symnum;
char *p;
+ static char *dirname_nso;
int prev_textlow_not_set;
valu = nlist.n_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
@@ -1520,18 +1514,27 @@ read_dbx_symtab (struct objfile *objfile)
p = strrchr (namestring, '/');
if (p && *(p + 1) == '\000')
- continue; /* Simply ignore directory name SOs */
+ {
+ /* Save the directory name SOs locally, then save it into
+ the psymtab when it's created below. */
+ dirname_nso = namestring;
+ continue;
+ }
/* Some other compilers (C++ ones in particular) emit useless
SOs for non-existant .c files. We ignore all subsequent SOs that
immediately follow the first. */
if (!pst)
+ {
pst = start_psymtab (objfile,
namestring, valu,
first_so_symnum * symbol_size,
objfile->global_psymbols.next,
objfile->static_psymbols.next);
+ pst->dirname = dirname_nso;
+ dirname_nso = NULL;
+ }
continue;
}
@@ -2093,22 +2096,12 @@ read_dbx_symtab (struct objfile *objfile)
default:
/* If we haven't found it yet, ignore it. It's probably some
new type we don't know about yet. */
- unknown_symtype_complaint (local_hex_string (nlist.n_type));
+ unknown_symtype_complaint (hex_string (nlist.n_type));
continue;
}
}
/* If there's stuff to be cleaned up, clean it up. */
- if (DBX_SYMCOUNT (objfile) > 0 /* We have some syms */
- /*FIXME, does this have a bug at start address 0? */
- && last_o_file_start
- && objfile->ei.entry_point < nlist.n_value
- && objfile->ei.entry_point >= last_o_file_start)
- {
- objfile->ei.deprecated_entry_file_lowpc = last_o_file_start;
- objfile->ei.deprecated_entry_file_highpc = nlist.n_value;
- }
-
if (pst)
{
/* Don't set pst->texthigh lower than it already is. */
@@ -2654,17 +2647,6 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
struct section_offsets *section_offsets,
struct objfile *objfile)
{
-#ifdef SUN_FIXED_LBRAC_BUG
- /* If SUN_FIXED_LBRAC_BUG is defined, then it tells us whether we need
- to correct the address of N_LBRAC's. If it is not defined, then
- we never need to correct the addresses. */
-
- /* This records the last pc address we've seen. We depend on there being
- an SLINE or FUN or SO before the first LBRAC, since the variable does
- not get reset in between reads of different symbol files. */
- static CORE_ADDR last_pc_address;
-#endif
-
struct context_stack *new;
/* This remembers the address of the start of a function. It is used
because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries are
@@ -2772,14 +2754,6 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
N_SO, the linker did not relocate them (sigh). */
valu += last_source_start_addr;
-#ifdef SUN_FIXED_LBRAC_BUG
- if (!SUN_FIXED_LBRAC_BUG && valu < last_pc_address)
- {
- /* Patch current LBRAC pc value to match last handy pc value */
- complaint (&symfile_complaints, "bad block start address patched");
- valu = last_pc_address;
- }
-#endif
new = push_context (desc, valu);
break;
@@ -2893,18 +2867,6 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
n_opt_found = 0;
-#ifdef SUN_FIXED_LBRAC_BUG
- last_pc_address = valu; /* Save for SunOS bug circumcision */
-#endif
-
-#ifdef PCC_SOL_BROKEN
- /* pcc bug, occasionally puts out SO for SOL. */
- if (context_stack_depth > 0)
- {
- start_subfile (name, NULL);
- break;
- }
-#endif
if (last_source_file)
{
/* Check if previous symbol was also an N_SO (with some
@@ -2965,9 +2927,6 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
/* Relocate for dynamic loading and for ELF acc fn-relative syms. */
valu += function_start_offset;
-#ifdef SUN_FIXED_LBRAC_BUG
- last_pc_address = valu; /* Save for SunOS bug circumcision */
-#endif
/* If this is the first SLINE note in the function, record it at
the start of the function instead of at the listed location. */
if (within_function && sline_found_in_function == 0)
@@ -3078,7 +3037,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
case N_NBBSS:
case N_NBSTS:
case N_NBLCS:
- unknown_symtype_complaint (local_hex_string (type));
+ unknown_symtype_complaint (hex_string (type));
/* FALLTHROUGH */
/* The following symbol types don't need the address field relocated,
@@ -3127,56 +3086,6 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
}
#endif
-#ifdef SUN_FIXED_LBRAC_BUG
- /* The Sun acc compiler, under SunOS4, puts out
- functions with N_GSYM or N_STSYM. The problem is
- that the address of the symbol is no good (for N_GSYM
- it doesn't even attept an address; for N_STSYM it
- puts out an address but then it gets relocated
- relative to the data segment, not the text segment).
- Currently we can't fix this up later as we do for
- some types of symbol in scan_file_globals.
- Fortunately we do have a way of finding the address -
- we know that the value in last_pc_address is either
- the one we want (if we're dealing with the first
- function in an object file), or somewhere in the
- previous function. This means that we can use the
- minimal symbol table to get the address. */
-
- /* Starting with release 3.0, the Sun acc compiler,
- under SunOS4, puts out functions with N_FUN and a value
- of zero. This gets relocated to the start of the text
- segment of the module, which is no good either.
- Under SunOS4 we can deal with this as N_SLINE and N_SO
- entries contain valid absolute addresses.
- Release 3.0 acc also puts out N_OPT entries, which makes
- it possible to discern acc from cc or gcc. */
-
- if (type == N_GSYM || type == N_STSYM
- || (type == N_FUN
- && n_opt_found && !block_address_function_relative))
- {
- struct minimal_symbol *m;
- int l = colon_pos - name;
-
- m = lookup_minimal_symbol_by_pc (last_pc_address);
- if (m && strncmp (DEPRECATED_SYMBOL_NAME (m), name, l) == 0
- && DEPRECATED_SYMBOL_NAME (m)[l] == '\0')
- /* last_pc_address was in this function */
- valu = SYMBOL_VALUE (m);
- else if (m && DEPRECATED_SYMBOL_NAME (m + 1)
- && strncmp (DEPRECATED_SYMBOL_NAME (m + 1), name, l) == 0
- && DEPRECATED_SYMBOL_NAME (m + 1)[l] == '\0')
- /* last_pc_address was in last function */
- valu = SYMBOL_VALUE (m + 1);
- else
- /* Not found - use last_pc_address (for finish_block) */
- valu = last_pc_address;
- }
-
- last_pc_address = valu; /* Save for SunOS bug circumcision */
-#endif
-
if (block_address_function_relative)
/* For Solaris 2.0 compilers, the block addresses and
N_SLINE's are relative to the start of the
@@ -3392,8 +3301,7 @@ coffstab_build_psymtabs (struct objfile *objfile, int mainline,
}
/* Scan and build partial symbols for an ELF symbol file.
- This ELF file has already been processed to get its minimal symbols,
- and any DWARF symbols that were in it.
+ This ELF file has already been processed to get its minimal symbols.
This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
rolled into one.
diff --git a/gdb/dcache.c b/gdb/dcache.c
index ee690948fdc..e3ffa4a9d18 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -585,7 +585,7 @@ dcache_info (char *exp, int tty)
void
_initialize_dcache (void)
{
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("remotecache", class_support, var_boolean,
(char *) &dcache_enabled_p,
"\
diff --git a/gdb/defs.h b/gdb/defs.h
index e49f9e0e5ba..63477de5968 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -66,29 +66,6 @@
/* For BFD64 and bfd_vma. */
#include "bfd.h"
-
-/* The target is partially multi-arched. Both "tm.h" and the
- multi-arch vector provide definitions. "tm.h" normally overrides
- the multi-arch vector (but there are a few exceptions). */
-
-#define GDB_MULTI_ARCH_PARTIAL 1
-
-/* The target is partially multi-arched. Both the multi-arch vector
- and "tm.h" provide definitions. "tm.h" cannot override a definition
- provided by the multi-arch vector. It is detected as a compilation
- error.
-
- This setting is only useful during a multi-arch conversion. */
-
-#define GDB_MULTI_ARCH_TM 2
-
-/* The target is pure multi-arch. The MULTI-ARCH vector provides all
- definitions. "tm.h" is linked to an empty file. */
-
-#define GDB_MULTI_ARCH_PURE 3
-
-
-
/* An address in the program being debugged. Host byte order. Rather
than duplicate all the logic in BFD which figures out what type
this is (long, long long, etc.) and whether it needs to be 64
@@ -198,7 +175,7 @@ extern void quit (void);
#else
#define QUIT { \
if (quit_flag) quit (); \
- if (interactive_hook) interactive_hook (); \
+ if (deprecated_interactive_hook) deprecated_interactive_hook (); \
}
#endif
@@ -220,7 +197,8 @@ enum language
language_asm, /* Assembly language */
language_scm, /* Scheme / Guile */
language_pascal, /* Pascal */
- language_minimal /* All other languages, minimal support only */
+ language_minimal, /* All other languages, minimal support only */
+ nr_languages
};
enum precision_type
@@ -250,7 +228,19 @@ enum return_value_convention
should be stored. While typically, and historically, used for
large structs, this is convention is applied to values of many
different types. */
- RETURN_VALUE_STRUCT_CONVENTION
+ RETURN_VALUE_STRUCT_CONVENTION,
+ /* Like the "struct return convention" above, but where the ABI
+ guarantees that the called function stores the address at which
+ the value being returned is stored in a well-defined location,
+ such as a register or memory slot in the stack frame. Don't use
+ this if the ABI doesn't explicitly guarantees this. */
+ RETURN_VALUE_ABI_RETURNS_ADDRESS,
+ /* Like the "struct return convention" above, but where the ABI
+ guarantees that the address at which the value being returned is
+ stored will be available in a well-defined location, such as a
+ register or memory slot in the stack frame. Don't use this if
+ the ABI doesn't explicitly guarantees this. */
+ RETURN_VALUE_ABI_PRESERVES_ADDRESS,
};
/* the cleanup list records things that have to be undone
@@ -327,10 +317,6 @@ struct frame_info;
extern int inside_entry_func (struct frame_info *this_frame);
-extern int deprecated_inside_entry_file (CORE_ADDR addr);
-
-extern int inside_main_func (CORE_ADDR pc);
-
/* From utils.c */
extern void initialize_utils (void);
@@ -347,8 +333,6 @@ extern int subset_compare (char *, char *);
extern char *safe_strerror (int);
-extern void init_malloc (void *);
-
extern void request_quit (int);
extern void do_cleanups (struct cleanup *);
@@ -376,6 +360,10 @@ extern struct cleanup *make_cleanup_freeargv (char **);
struct ui_file;
extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
+struct section_addr_info;
+extern struct cleanup *(make_cleanup_free_section_addr_info
+ (struct section_addr_info *));
+
extern struct cleanup *make_cleanup_close (int fd);
extern struct cleanup *make_cleanup_bfd_close (bfd *abfd);
@@ -527,6 +515,7 @@ extern char *paddr_d (LONGEST addr);
extern char *phex (ULONGEST l, int sizeof_l);
extern char *phex_nz (ULONGEST l, int sizeof_l);
+extern char *int_string (LONGEST, int, int, int, int);
/* Like paddr() only print/scan raw CORE_ADDR. The output from
core_addr_to_string() can be passed direct to
@@ -535,6 +524,11 @@ extern const char *core_addr_to_string (const CORE_ADDR addr);
extern const char *core_addr_to_string_nz (const CORE_ADDR addr);
extern CORE_ADDR string_to_core_addr (const char *my_string);
+/* Return a string that contains a number formatted as a hex
+ string. */
+extern char *hex_string (LONGEST);
+extern char *hex_string_custom (LONGEST, int);
+
extern void fprintf_symbol_filtered (struct ui_file *, char *,
enum language, int);
@@ -600,6 +594,9 @@ extern void print_address (CORE_ADDR, struct ui_file *);
/* From source.c */
+#define OPF_TRY_CWD_FIRST 0x01
+#define OPF_SEARCH_IN_PATH 0x02
+
extern int openp (const char *, int, const char *, int, int, char **);
extern int source_full_path_of (char *, char **);
@@ -616,8 +613,6 @@ extern void init_source_path (void);
extern void init_last_source_visited (void);
-extern char *symtab_to_filename (struct symtab *);
-
/* From exec.c */
extern void exec_set_section_offsets (bfd_signed_vma text_off,
@@ -861,13 +856,6 @@ extern char *msavestring (void *, const char *, size_t);
extern char *mstrsave (void *, const char *);
-/* Robust versions of same. Throw an internal error when no memory,
- guard against stray NULL arguments. */
-extern void *xmmalloc (void *md, size_t size);
-extern void *xmrealloc (void *md, void *ptr, size_t size);
-extern void *xmcalloc (void *md, size_t number, size_t size);
-extern void xmfree (void *md, void *ptr);
-
/* xmalloc(), xrealloc() and xcalloc() have already been declared in
"libiberty.h". */
extern void xfree (void *);
@@ -884,8 +872,10 @@ extern void xfree (void *);
extern void xasprintf (char **ret, const char *format, ...) ATTR_FORMAT (printf, 2, 3);
extern void xvasprintf (char **ret, const char *format, va_list ap);
-/* Like asprintf, but return the string, throw an error if no memory. */
+/* Like asprintf and vasprintf, but return the string, throw an error
+ if no memory. */
extern char *xstrprintf (const char *format, ...) ATTR_FORMAT (printf, 1, 2);
+extern char *xstrvprintf (const char *format, va_list ap);
extern int parse_escape (char **);
@@ -1067,10 +1057,6 @@ enum gdb_osabi
Libiberty thingies are no longer declared here. We include libiberty.h
above, instead. */
-#ifndef GETENV_PROVIDED
-extern char *getenv (const char *);
-#endif
-
/* From other system libraries */
#ifdef HAVE_STDDEF_H
@@ -1088,15 +1074,6 @@ extern char *getenv (const char *);
#endif
-/* We take the address of fclose later, but some stdio's forget
- to declare this. We can't always declare it since there's
- no way to declare the parameters without upsetting some compiler
- somewhere. */
-
-#ifndef FCLOSE_PROVIDED
-extern int fclose (FILE *);
-#endif
-
#ifndef atof
extern double atof (const char *); /* X3.159-1989 4.10.1.1 */
#endif
@@ -1122,15 +1099,6 @@ extern void *alloca ();
#endif /* Not GNU C */
#endif /* alloca not defined */
-/* Is GDB multi-arch? If there's a "tm.h" file, it is not. */
-#ifndef GDB_MULTI_ARCH
-#ifdef GDB_TM_FILE
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
-#else
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PURE
-#endif
-#endif
-
/* Dynamic target-system-dependent parameters for GDB. */
#include "gdbarch.h"
@@ -1197,57 +1165,59 @@ extern int watchdog;
extern char *interpreter_p;
/* If a given interpreter matches INTERPRETER_P then it should update
- command_loop_hook and init_ui_hook with the per-interpreter
- implementation. */
-/* FIXME: command_loop_hook and init_ui_hook should be moved here. */
+ deprecated_command_loop_hook and deprecated_init_ui_hook with the
+ per-interpreter implementation. */
+/* FIXME: deprecated_command_loop_hook and deprecated_init_ui_hook
+ should be moved here. */
struct target_waitstatus;
struct cmd_list_element;
-/* Should the asynchronous variant of the interpreter (using the
- event-loop) be enabled? */
-extern int event_loop_p;
-
-extern void (*init_ui_hook) (char *argv0);
-extern void (*command_loop_hook) (void);
-extern void (*show_load_progress) (const char *section,
- unsigned long section_sent,
- unsigned long section_size,
- unsigned long total_sent,
- unsigned long total_size);
-extern void (*print_frame_info_listing_hook) (struct symtab * s,
- int line, int stopline,
- int noerror);
+extern void (*deprecated_pre_add_symbol_hook) (const char *);
+extern void (*deprecated_post_add_symbol_hook) (void);
+extern void (*selected_frame_level_changed_hook) (int);
+extern int (*deprecated_ui_loop_hook) (int signo);
+extern void (*deprecated_init_ui_hook) (char *argv0);
+extern void (*deprecated_command_loop_hook) (void);
+extern void (*deprecated_show_load_progress) (const char *section,
+ unsigned long section_sent,
+ unsigned long section_size,
+ unsigned long total_sent,
+ unsigned long total_size);
+extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
+ int line, int stopline,
+ int noerror);
extern struct frame_info *parse_frame_specification (char *frame_exp);
-extern int (*query_hook) (const char *, va_list);
-extern void (*warning_hook) (const char *, va_list);
-extern void (*flush_hook) (struct ui_file * stream);
-extern void (*create_breakpoint_hook) (struct breakpoint * b);
-extern void (*delete_breakpoint_hook) (struct breakpoint * bpt);
-extern void (*modify_breakpoint_hook) (struct breakpoint * bpt);
-extern void (*interactive_hook) (void);
-extern void (*registers_changed_hook) (void);
-extern void (*readline_begin_hook) (char *,...);
-extern char *(*readline_hook) (char *);
-extern void (*readline_end_hook) (void);
-extern void (*register_changed_hook) (int regno);
-extern void (*memory_changed_hook) (CORE_ADDR addr, int len);
-extern void (*context_hook) (int);
-extern ptid_t (*target_wait_hook) (ptid_t ptid,
+extern int (*deprecated_query_hook) (const char *, va_list);
+extern void (*deprecated_warning_hook) (const char *, va_list);
+extern void (*deprecated_flush_hook) (struct ui_file * stream);
+extern void (*deprecated_create_breakpoint_hook) (struct breakpoint * b);
+extern void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt);
+extern void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt);
+extern void (*deprecated_interactive_hook) (void);
+extern void (*deprecated_registers_changed_hook) (void);
+extern void (*deprecated_readline_begin_hook) (char *,...);
+extern char *(*deprecated_readline_hook) (char *);
+extern void (*deprecated_readline_end_hook) (void);
+extern void (*deprecated_register_changed_hook) (int regno);
+extern void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len);
+extern void (*deprecated_context_hook) (int);
+extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
struct target_waitstatus * status);
-extern void (*attach_hook) (void);
-extern void (*detach_hook) (void);
-extern void (*call_command_hook) (struct cmd_list_element * c,
- char *cmd, int from_tty);
+extern void (*deprecated_attach_hook) (void);
+extern void (*deprecated_detach_hook) (void);
+extern void (*deprecated_call_command_hook) (struct cmd_list_element * c,
+ char *cmd, int from_tty);
-extern void (*set_hook) (struct cmd_list_element * c);
+extern void (*deprecated_set_hook) (struct cmd_list_element * c);
-extern NORETURN void (*error_hook) (void) ATTR_NORETURN;
+extern void (*deprecated_error_hook) (void);
-extern void (*error_begin_hook) (void);
+extern void (*deprecated_error_begin_hook) (void);
-extern int (*ui_load_progress_hook) (const char *section, unsigned long num);
+extern int (*deprecated_ui_load_progress_hook) (const char *section,
+ unsigned long num);
/* Inhibit window interface if non-zero. */
diff --git a/gdb/delta68-nat.c b/gdb/delta68-nat.c
deleted file mode 100644
index e74a51bf048..00000000000
--- a/gdb/delta68-nat.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Functions specific to running gdb native on a Motorola Delta Series sysV68.
- Copyright 1993, 1996, 1998, 2000 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 <sys/signal.h> /* for MAXSIG in sys/user.h */
-#include <sys/types.h> /* for ushort in sys/dir.h */
-#include <sys/dir.h> /* for struct direct in sys/user.h */
-#include <sys/user.h>
-
-#include <nlist.h>
-
-#if !defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
-/* Return the address in the core dump or inferior of register REGNO.
- BLOCKEND is the address of the end of the user structure. */
-
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
-{
- static int sysv68reg[] =
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16};
-
- if (regno >= 0 && regno < sizeof (sysv68reg) / sizeof (sysv68reg[0]))
- return blockend + sysv68reg[regno] * 4;
- else if (regno < FPC_REGNUM)
- return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM][0]);
- else if (regno == FPC_REGNUM)
- return offsetof (struct user, u_fpu.regs.control);
- else if (regno == FPS_REGNUM)
- return offsetof (struct user, u_fpu.regs.status);
- else if (regno == FPI_REGNUM)
- return offsetof (struct user, u_fpu.regs.iaddr);
- else
- {
- fprintf_unfiltered (gdb_stderr, "\
-Internal error: invalid register number %d in REGISTER_U_ADDR\n",
- regno);
- return blockend;
- }
-}
-
-CORE_ADDR kernel_u_addr;
-
-/* Read the value of the u area from the kernel. */
-void
-_initialize_delta68_nat (void)
-{
- struct nlist nl[2];
-
- nl[0].n_name = "u";
- nl[1].n_name = NULL;
- if (nlist ("/sysV68", nl) == 0 && nl[0].n_scnum != 0)
- kernel_u_addr = nl[0].n_value;
- else
- {
- perror ("Cannot get kernel u area address");
- exit (1);
- }
-}
-
-clear_insn_cache (void)
-{
-#ifdef MCT_TEXT /* in sys/signal.h on sysV68 R3V7.1 */
- memctl (0, 4096, MCT_TEXT);
-#endif
-}
-
-kernel_u_size (void)
-{
- return sizeof (struct user);
-}
diff --git a/gdb/demangle.c b/gdb/demangle.c
index bcf9b77de51..423ae7c7e8c 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -195,7 +195,7 @@ _initialize_demangler (void)
"Set the current C++ demangling style.\n\
Use `set demangle-style' without arguments for a list of demangling styles.",
&setlist);
- show = add_show_from_set (set, &showlist);
+ show = deprecated_add_show_from_set (set, &showlist);
set_cmd_sfunc (set, set_demangling_command);
/* Set the default demangling style chosen at compilation time. */
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index 38020007637..09851ef69f1 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -99,7 +99,7 @@ enum dict_type
/* Symbols are stored in a fixed-size array. */
DICT_LINEAR,
/* Symbols are stored in an expandable array. */
- DICT_LINEAR_EXPANDABLE,
+ DICT_LINEAR_EXPANDABLE
};
/* The virtual function table. */
@@ -636,7 +636,7 @@ iter_name_first_hashed (const struct dictionary *dict,
sym = sym->hash_next)
{
/* Warning: the order of arguments to strcmp_iw matters! */
- if (strcmp_iw (SYMBOL_NATURAL_NAME (sym), name) == 0)
+ if (strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
{
break;
}
@@ -656,7 +656,7 @@ iter_name_next_hashed (const char *name, struct dict_iterator *iterator)
next != NULL;
next = next->hash_next)
{
- if (strcmp_iw (SYMBOL_NATURAL_NAME (next), name) == 0)
+ if (strcmp_iw (SYMBOL_SEARCH_NAME (next), name) == 0)
break;
}
@@ -674,7 +674,7 @@ insert_symbol_hashed (struct dictionary *dict,
unsigned int hash_index;
struct symbol **buckets = DICT_HASHED_BUCKETS (dict);
- hash_index = (msymbol_hash_iw (SYMBOL_NATURAL_NAME (sym))
+ hash_index = (msymbol_hash_iw (SYMBOL_SEARCH_NAME (sym))
% DICT_HASHED_NBUCKETS (dict));
sym->hash_next = buckets[hash_index];
buckets[hash_index] = sym;
@@ -789,7 +789,7 @@ iter_name_next_linear (const char *name, struct dict_iterator *iterator)
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)
+ if (strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
{
retval = sym;
break;
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 72c5e6ae64e..2d3035ed3d5 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,207 @@
+2004-09-12 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Native Debugging): Delete description of
+ FILES_INFO_HOOK.
+
+2004-09-11 Paul Hilfinger <hilfinger@gnat.com>
+
+ * gdbint.texinfo (User Interface): Change local_hex_string_custom
+ to hex_string_custom (not historically correct, but more
+ understandable, given the current code).
+
+2004-09-03 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Native Debugging): Delete SVR4_SHARED_LIBS.
+
+2004-09-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * observer.texi (solib_unloaded): New observer.
+
+2004-08-24 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Add missing
+ comma.
+
+2004-08-20 Michael Chastain <mec.gnu@mindspring.com>
+
+ * (Using the Testsuite): build != host is supported,
+ but some test scripts do not support build != host.
+
+2004-08-14 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Host Definition): Delete description of
+ FCLOSE_PROVIDED and GETENV_PROVIDED.
+
+2004-08-05 Mark Kettenis <kettenis@chello.nl>
+
+ * gdbint.texinfo (Host Definition): Delete description of
+ NO_SYS_FILE.
+ (Native Debugging): Delete description of KERNEL_U_ADDR_BSD and
+ PTRACE_FP_BUG.
+
+2004-08-05 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ reference to deprecated_read_fp.
+
+2004-08-02 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DEPRECATED_REGISTER_BYTES.
+
+2004-07-30 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
+
+ * gdb.texinfo (Source Path): Document the new behavior of
+ searching for the source files.
+
+2004-07-17 Eli Zaretskii <eliz@gnu.org>
+
+ * gdb.texinfo (Edit): Fix markup of EDITOR and improve wording.
+ (Search, Expressions, Arrays, Variables, Data, Machine Code)
+ (Auto Display): Improve indexing.
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.texinfo (Mode Options): Delete documentation on "-async" and
+ "-noasync".
+
+2004-07-09 Eli Zaretskii <eliz@gnu.org>
+
+ * gdb.texinfo: Fix @kindex entries so that multiple commands that
+ have the same prefix have only their prefix in the index.
+
+2004-07-03 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.texinfo (BSD libkvm Interface): New node (section)
+ (Native): Add it to the menu.
+
+2004-07-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Remove
+ PCC_SOL_BROKEN.
+
+2004-06-24 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Remove
+ SUN_FIXED_LBRAC_BUG.
+
+2004-06-26 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Coding): Replace xasprintf with xstrprintf.
+
+2004-06-20 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ USE_STRUCT_CONVENTION.
+
+2004-06-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ gdb.texinfo (Bug Reporting): Mention session recording,
+ with the script command or Emacs.
+
+2004-06-18 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ FUNCTION_START_OFFSET.
+
+2004-06-14 Andrew Cagney <cagney@gnu.org>
+
+ Based on changes from Karl Berry.
+ * gdb.texinfo: Do not use @sc in a direntry.
+ * stabs.texinfo: Change @dircateogry to "Software development".
+ * gdbint.texinfo, gdb.texinfo, annotate.texinfo: Ditto.
+
+2004-06-13 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of RETURN_VALUE_ON_STACK.
+
+2004-06-09 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Native Debugging): Restore "@table @code"
+ deleted by previous patch.
+
+2004-06-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdbint.texinfo (Native Debugging): Delete documentation on
+ ATTACH_DETACH.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * gdb.texinfo (push_dummy_call): Use @code{struct value}.
+
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * gdb.texinfo (push_dummy_call): Update argument list to match
+ the new push_dummy_call method signature. Describe the function
+ argument.
+
+2004-05-24 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.texinfo (Starting): Document new start command.
+
+2004-05-21 Andrew Cagney <cagney@redhat.com>
+
+ * observer.texi (GDB Observers): Document "inferior_created".
+
+2004-05-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DO_DEFERRED_STORES.
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ references to DEPRECATED_FIX_CALL_DUMMY.
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DEPRECATED_CALL_DUMMY_WORDS,
+ DEPRECATED_SIZEOF_CALL_DUMMY_WORDS, and CALL_DUMMY.
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DEPRECATED_PUSH_DUMMY_FRAME.
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ reference to DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
+
+2004-05-07 Andrew Cagney <cagney@redhat.com>
+
+ * observer.texi (GDB Observers): Add "Debugging" section. Include
+ cross reference to "set/show debug observer".
+ * gdb.texinfo (Debugging Output): Document "set/show debug
+ observer".
+
+2004-05-01 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DEPRECATED_PC_IN_SIGTRAMP.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation for BELIEVE_PCC_PROMOTION_TYPE, no longer defined.
+
+2004-04-30 Orjan Friberg <orjanf@axis.com>
+
+ * observer.texi (GDB Observers): Correct spelling.
+
+2004-04-26 Orjan Friberg <orjanf@axis.com>
+
+ * observer.texi (GDB Observers): Add target_changed event.
+
+2004-04-08 Andrew Cagney <cagney@redhat.com>
+
+ * observer.texi (GDB Observers): Rework, provide generic observer
+ definitions and then a list of observable events.
+
+2004-04-04 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Host Definition): Delete reference to
+ NO_SIGINTERRUPT.
+
+2004-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ reference to DEPRECATED_CALL_DUMMY_LENGTH.
+
2004-03-28 Stephane Carrez <stcarrez@nerim.fr>
* gdb.texinfo (TUI Commands): Document tui reg commands.
diff --git a/gdb/doc/annotate.texinfo b/gdb/doc/annotate.texinfo
index 86b90cc74e7..2fb79d39d0e 100644
--- a/gdb/doc/annotate.texinfo
+++ b/gdb/doc/annotate.texinfo
@@ -4,7 +4,7 @@
@c This is a dir.info fragment to support semi-automated addition of
@c manuals to an info tree.
-@dircategory Programming & development tools.
+@dircategory Software development
@direntry
* Annotate: (annotate). The obsolete annotation interface.
@end direntry
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7ace6cd3f87..e3288b6bb9f 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -38,9 +38,9 @@
@c This is a dir.info fragment to support semi-automated addition of
@c manuals to an info tree.
-@dircategory Programming & development tools.
+@dircategory Software development
@direntry
-* Gdb: (gdb). The @sc{gnu} debugger.
+* Gdb: (gdb). The GNU debugger.
@end direntry
@ifinfo
@@ -1065,30 +1065,6 @@ that control @value{GDBN}, and level 2 has been deprecated.
The annotation mechanism has largely been superseeded by @sc{gdb/mi}
(@pxref{GDB/MI}).
-@item -async
-@cindex @code{--async}
-Use the asynchronous event loop for the command-line interface.
-@value{GDBN} processes all events, such as user keyboard input, via a
-special event loop. This allows @value{GDBN} to accept and process user
-commands in parallel with the debugged process being
-run@footnote{@value{GDBN} built with @sc{djgpp} tools for
-MS-DOS/MS-Windows supports this mode of operation, but the event loop is
-suspended when the debuggee runs.}, so you don't need to wait for
-control to return to @value{GDBN} before you type the next command.
-(@emph{Note:} as of version 5.1, the target side of the asynchronous
-operation is not yet in place, so @samp{-async} does not work fully
-yet.)
-@c FIXME: when the target side of the event loop is done, the above NOTE
-@c should be removed.
-
-When the standard input is connected to a terminal device, @value{GDBN}
-uses the asynchronous event loop by default, unless disabled by the
-@samp{-noasync} option.
-
-@item -noasync
-@cindex @code{--noasync}
-Disable the asynchronous event loop for the command-line interface.
-
@item --args
@cindex @code{--args}
Change interpretation of command line so that arguments following the
@@ -1685,6 +1661,7 @@ Some things do not work as well with @samp{-g -O} as with just
@samp{-g}, particularly on machines with instruction scheduling. If in
doubt, recompile with @samp{-g} alone, and if this fixes the problem,
please report it to us as a bug (including a test case!).
+@xref{Variables}, for more information about debugging optimized code.
Older versions of the @sc{gnu} C compiler permitted a variant option
@w{@samp{-gg}} for debugging information. @value{GDBN} no longer supports this
@@ -1768,6 +1745,42 @@ time @value{GDBN} read its symbols, @value{GDBN} discards its symbol
table, and reads it again. When it does this, @value{GDBN} tries to retain
your current breakpoints.
+@table @code
+@kindex start
+@item start
+@cindex run to main procedure
+The name of the main procedure can vary from language to language.
+With C or C@t{++}, the main procedure name is always @code{main}, but
+other languages such as Ada do not require a specific name for their
+main procedure. The debugger provides a convenient way to start the
+execution of the program and to stop at the beginning of the main
+procedure, depending on the language used.
+
+The @samp{start} command does the equivalent of setting a temporary
+breakpoint at the beginning of the main procedure and then invoking
+the @samp{run} command.
+
+Some programs contain an elaboration phase where some startup code is
+executed before the main program is called. This depends on the
+languages used to write your program. In C@t{++} for instance,
+constructors for static and global objects are executed before
+@code{main} is called. It is therefore possible that the debugger stops
+before reaching the main procedure. However, the temporary breakpoint
+will remain to halt execution.
+
+Specify the arguments to give to your program as arguments to the
+@samp{start} command. These arguments will be given verbatim to the
+underlying @samp{run} command. Note that the same arguments will be
+reused if no argument is provided during subsequent calls to
+@samp{start} or @samp{run}.
+
+It is sometimes necessary to debug the program during elaboration. In
+these cases, using the @code{start} command would stop the execution of
+your program too late, as the program would have already completed the
+elaboration phase. Under these circumstances, insert breakpoints in your
+elaboration code before running your program.
+@end table
+
@node Arguments
@section Your program's arguments
@@ -2162,8 +2175,8 @@ For example,
On HP-UX systems:
-@cindex thread number
-@cindex thread identifier (GDB)
+@cindex debugging multithreaded programs (on HP-UX)
+@cindex thread identifier (GDB), on HP-UX
For debugging purposes, @value{GDBN} associates its own thread
number---a small integer assigned in thread-creation order---with each
thread in your program.
@@ -2187,7 +2200,7 @@ HP-UX, you see
when @value{GDBN} notices a new thread.
@table @code
-@kindex info threads
+@kindex info threads (HP-UX)
@item info threads
Display a summary of all threads currently in your
program. @value{GDBN} displays for each thread (in this order):
@@ -2239,7 +2252,6 @@ As with the @samp{[New @dots{}]} message, the form of the text after
@samp{Switching to} depends on your system's conventions for identifying
threads.
-@kindex thread apply
@item thread apply [@var{threadno}] [@var{all}] @var{args}
The @code{thread apply} command allows you to apply a command to one or
more threads. Specify the numbers of the threads that you want affected
@@ -2862,34 +2874,30 @@ shared library. Use the @code{catch} command to set a catchpoint.
Stop when @var{event} occurs. @var{event} can be any of the following:
@table @code
@item throw
-@kindex catch throw
+@cindex stop on C@t{++} exceptions
The throwing of a C@t{++} exception.
@item catch
-@kindex catch catch
The catching of a C@t{++} exception.
@item exec
-@kindex catch exec
+@cindex break on fork/exec
A call to @code{exec}. This is currently only available for HP-UX.
@item fork
-@kindex catch fork
A call to @code{fork}. This is currently only available for HP-UX.
@item vfork
-@kindex catch vfork
A call to @code{vfork}. This is currently only available for HP-UX.
@item load
@itemx load @var{libname}
-@kindex catch load
+@cindex break on load/unload of shared library
The dynamic loading of any shared library, or the loading of the library
@var{libname}. This is currently only available for HP-UX.
@item unload
@itemx unload @var{libname}
-@kindex catch unload
The unloading of any dynamically loaded shared library, or the unloading
of the library @var{libname}. This is currently only available for HP-UX.
@end table
@@ -3002,8 +3010,7 @@ confirm off}). You can abbreviate this command as @code{d}.
@node Disabling
@subsection Disabling breakpoints
-@kindex disable breakpoints
-@kindex enable breakpoints
+@cindex enable/disable a breakpoint
Rather than deleting a breakpoint, watchpoint, or catchpoint, you might
prefer to @dfn{disable} it. This makes the breakpoint inoperative as if
it had been deleted, but remembers the information on the breakpoint so
@@ -3037,7 +3044,6 @@ You can use the following commands to enable or disable breakpoints,
watchpoints, and catchpoints:
@table @code
-@kindex disable breakpoints
@kindex disable
@kindex dis @r{(@code{disable})}
@item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
@@ -3047,7 +3053,6 @@ options such as ignore-counts, conditions and commands are remembered in
case the breakpoint is enabled again later. You may abbreviate
@code{disable} as @code{dis}.
-@kindex enable breakpoints
@kindex enable
@item enable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
Enable the specified breakpoints (or all defined breakpoints). They
@@ -4046,7 +4051,6 @@ Similar, but print only the outermost @var{n} frames.
@kindex where
@kindex info stack
-@kindex info s @r{(@code{info stack})}
The names @code{where} and @code{info stack} (abbreviated @code{info s})
are additional aliases for @code{backtrace}.
@@ -4076,11 +4080,6 @@ The display for frame zero does not begin with a program counter
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
-@kindex set backtrace past-main
-@kindex show backtrace past-main
-@kindex set backtrace limit
-@kindex show backtrace limit
-
Most programs have a standard user entry point---a place where system
libraries and startup code transition into user code. For C this is
@code{main}. When @value{GDBN} finds the entry function in a backtrace
@@ -4093,6 +4092,7 @@ in a backtrace, you can change this behavior:
@table @code
@item set backtrace past-main
@itemx set backtrace past-main on
+@kindex set backtrace
Backtraces will continue past the user entry point.
@item set backtrace past-main off
@@ -4100,6 +4100,7 @@ Backtraces will stop when they encounter the user entry point. This is the
default.
@item show backtrace past-main
+@kindex show backtrace
Display the current user entry point backtrace policy.
@item set backtrace limit @var{n}
@@ -4464,25 +4465,26 @@ following command-line syntax:
@smallexample
ex +@var{number} file
@end smallexample
-The optional numeric value +@var{number} designates the active line in
-the file.}. By default, it is @value{EDITOR}, but you can change this
+The optional numeric value +@var{number} specifies the number of the line in
+the file where to start editing.}.
+By default, it is @file{@value{EDITOR}}, but you can change this
by setting the environment variable @code{EDITOR} before using
@value{GDBN}. For example, to configure @value{GDBN} to use the
@code{vi} editor, you could use these commands with the @code{sh} shell:
@smallexample
EDITOR=/usr/bin/vi
export EDITOR
-gdb ...
+gdb @dots{}
@end smallexample
or in the @code{csh} shell,
@smallexample
setenv EDITOR /usr/bin/vi
-gdb ...
+gdb @dots{}
@end smallexample
@node Search
@section Searching source files
-@cindex searching
+@cindex searching source files
@kindex reverse-search
There are two commands for searching through the current source file for a
@@ -4517,16 +4519,30 @@ the directories could be moved between the compilation and your debugging
session. @value{GDBN} has a list of directories to search for source files;
this is called the @dfn{source path}. Each time @value{GDBN} wants a source file,
it tries all the directories in the list, in the order they are present
-in the list, until it finds a file with the desired name. Note that
-the executable search path is @emph{not} used for this purpose. Neither is
-the current working directory, unless it happens to be in the source
-path.
-
-If @value{GDBN} cannot find a source file in the source path, and the
-object program records a directory, @value{GDBN} tries that directory
-too. If the source path is empty, and there is no record of the
-compilation directory, @value{GDBN} looks in the current directory as a
-last resort.
+in the list, until it finds a file with the desired name.
+
+For example, suppose an executable references the file
+@file{/usr/src/foo-1.0/lib/foo.c}, and our source path is
+@file{/mnt/cross}. The file is first looked up literally; if this
+fails, @file{/mnt/cross/usr/src/foo-1.0/lib/foo.c} is tried; if this
+fails, @file{/mnt/cross/foo.c} is opened; if this fails, an error
+message is printed. @value{GDBN} does not look up the parts of the
+source file name, such as @file{/mnt/cross/src/foo-1.0/lib/foo.c}.
+Likewise, the subdirectories of the source path are not searched: if
+the source path is @file{/mnt/cross}, and the binary refers to
+@file{foo.c}, @value{GDBN} would not find it under
+@file{/mnt/cross/usr/src/foo-1.0/lib}.
+
+Plain file names, relative file names with leading directories, file
+names containing dots, etc.@: are all treated as described above; for
+instance, if the source path is @file{/mnt/cross}, and the source file
+is recorded as @file{../lib/foo.c}, @value{GDBN} would first try
+@file{../lib/foo.c}, then @file{/mnt/cross/../lib/foo.c}, and after
+that---@file{/mnt/cross/foo.c}.
+
+Note that the executable search path is @emph{not} used to locate the
+source files. Neither is the current working directory, unless it
+happens to be in the source path.
Whenever you reset or rearrange the source path, @value{GDBN} clears out
any information it has cached about where source files are found and where
@@ -4591,6 +4607,7 @@ directories in one command.
@node Machine Code
@section Source and machine code
+@cindex source line and its code address
You can use the command @code{info line} to map source lines to program
addresses (and vice versa), and the command @code{disassemble} to display
@@ -4620,6 +4637,7 @@ Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350.
@end smallexample
@noindent
+@cindex code address and its source line
We can also inquire (using @code{*@var{addr}} as the form for
@var{linespec}) what source line covers a particular address:
@smallexample
@@ -4628,6 +4646,7 @@ Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
@end smallexample
@cindex @code{$_} and @code{info line}
+@cindex @code{x} command, default address
@kindex x@r{(examine), and} info line
After @code{info line}, the default address for the @code{x} command
is changed to the starting address of the line, so that @samp{x/i} is
@@ -4673,10 +4692,6 @@ mnemonics or other syntax.
@table @code
@kindex set disassembly-flavor
-@cindex assembly instructions
-@cindex instructions, assembly
-@cindex machine instructions
-@cindex listing machine instructions
@cindex Intel disassembly flavor
@cindex AT&T disassembly flavor
@item set disassembly-flavor @var{instruction-set}
@@ -4717,6 +4732,7 @@ formats}.
@item print
@itemx print /@var{f}
+@cindex reprint the last value
If you omit @var{expr}, @value{GDBN} displays the last value again (from the
@dfn{value history}; @pxref{Value History, ,Value history}). This allows you to
conveniently inspect the same value in an alternative format.
@@ -4763,6 +4779,7 @@ casts, and string constants. It also includes preprocessor macros, if
you compiled your program to include this information; see
@ref{Compilation}.
+@cindex arrays in expressions
@value{GDBN} supports array constants in expressions input by
the user. The syntax is @{@var{element}, @var{element}@dots{}@}. For example,
you can use the command @code{print @{1, 2, 3@}} to build up an array in
@@ -4776,6 +4793,7 @@ languages.
In this section, we discuss operators that you can use in @value{GDBN}
expressions regardless of your programming language.
+@cindex casts, in expressions
Casts are supported in all languages, not just in C, because it is so
useful to cast a number into a pointer in order to examine a structure
at that address in memory.
@@ -4854,7 +4872,7 @@ in this file. But it is possible to have more than one such variable or
function with the same name (in different source files). If that
happens, referring to that name has unpredictable effects. If you wish,
you can specify a static variable in a particular function or file,
-using the colon-colon notation:
+using the colon-colon (@code{::}) notation:
@cindex colon-colon, context for variables/functions
@iftex
@@ -4885,6 +4903,8 @@ scope resolution operator in @value{GDBN} expressions.
@cindex wrong values
@cindex variable values, wrong
+@cindex function entry/exit, wrong values of variables
+@cindex optimized code, wrong values of variables
@quotation
@emph{Warning:} Occasionally, a local variable may appear to have the
wrong value at certain points in a function---just after entry to a new
@@ -4917,18 +4937,20 @@ No symbol "foo" in current context.
To solve such problems, either recompile without optimizations, or use a
different debug info format, if the compiler supports several such
-formats. For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler
+formats. For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler,
usually supports the @option{-gstabs+} option. @option{-gstabs+}
produces debug info in a format that is superior to formats such as
COFF. You may be able to use DWARF 2 (@option{-gdwarf-2}), which is also
an effective form for debug info. @xref{Debugging Options,,Options
for Debugging Your Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}.
-
+@xref{C, , Debugging C++}, for more info about debug info formats
+that are best suited to C@t{++} programs.
@node Arrays
@section Artificial arrays
@cindex artificial array
+@cindex arrays
@kindex @@@r{, referencing memory as an array}
It is often useful to print out several successive objects of the
same type in memory; a section of an array, or an array of
@@ -5261,6 +5283,7 @@ It also includes expressions which would not be displayed right now
because they refer to automatic variables not currently available.
@end table
+@cindex display disabled out of scope
If a display expression refers to local variables, then it does not make
sense outside the lexical context for which it was set up. Such an
expression is disabled when execution enters a context where one of its
@@ -5284,9 +5307,10 @@ and symbols are printed.
These settings are useful for debugging programs in any language:
@table @code
-@kindex set print address
+@kindex set print
@item set print address
@itemx set print address on
+@cindex print/don't print memory addresses
@value{GDBN} prints memory addresses showing the location of stack
traces, structure values, pointer values, breakpoints, and so forth,
even when it also displays the contents of those addresses. The default
@@ -5320,7 +5344,7 @@ dependent displays from the @value{GDBN} interface. For example, with
@code{print address off}, you should get the same text for backtraces on
all machines---whether or not they involve pointer arguments.
-@kindex show print address
+@kindex show print
@item show print address
Show whether or not addresses are to be printed.
@end table
@@ -5334,8 +5358,8 @@ you can set @value{GDBN} to print the source file and line number when
it prints a symbolic address:
@table @code
-@kindex set print symbol-filename
@item set print symbol-filename on
+@cindex closest symbol and offset for an address
Tell @value{GDBN} to print the source file name and line number of a
symbol in the symbolic form of an address.
@@ -5343,7 +5367,6 @@ symbol in the symbolic form of an address.
Do not print source file name and line number of a symbol. This is the
default.
-@kindex show print symbol-filename
@item show print symbol-filename
Show whether or not @value{GDBN} will print the source file name and
line number of a symbol in the symbolic form of an address.
@@ -5357,14 +5380,13 @@ Also, you may wish to see the symbolic form only if the address being
printed is reasonably close to the closest earlier symbol:
@table @code
-@kindex set print max-symbolic-offset
@item set print max-symbolic-offset @var{max-offset}
+@cindex maximum value for offset of closest symbol
Tell @value{GDBN} to only display the symbolic form of an address if the
offset between the closest earlier symbol and the address is less than
@var{max-offset}. The default is 0, which tells @value{GDBN}
to always print the symbolic form of an address if any symbol precedes it.
-@kindex show print max-symbolic-offset
@item show print max-symbolic-offset
Ask how large the maximum offset is that @value{GDBN} prints in a
symbolic address.
@@ -5394,22 +5416,21 @@ the appropriate @code{set print} options turned on.
Other settings control how different kinds of objects are printed:
@table @code
-@kindex set print array
@item set print array
@itemx set print array on
+@cindex pretty print arrays
Pretty print arrays. This format is more convenient to read,
but uses more space. The default is off.
@item set print array off
Return to compressed format for arrays.
-@kindex show print array
@item show print array
Show whether compressed or pretty format is selected for displaying
arrays.
-@kindex set print elements
@item set print elements @var{number-of-elements}
+@cindex number of array elements to print
Set a limit on how many elements of an array @value{GDBN} will print.
If @value{GDBN} is printing a large array, it stops printing after it has
printed the number of elements set by the @code{set print elements} command.
@@ -5417,19 +5438,17 @@ This limit also applies to the display of strings.
When @value{GDBN} starts, this limit is set to 200.
Setting @var{number-of-elements} to zero means that the printing is unlimited.
-@kindex show print elements
@item show print elements
Display the number of elements of a large array that @value{GDBN} will print.
If the number is 0, then the printing is unlimited.
-@kindex set print null-stop
@item set print null-stop
+@cindex @sc{null} elements in arrays
Cause @value{GDBN} to stop printing the characters of an array when the first
@sc{null} is encountered. This is useful when large arrays actually
contain only short strings.
The default is off.
-@kindex set print pretty
@item set print pretty on
Cause @value{GDBN} to print structures in an indented format with one member
per line, like this:
@@ -5460,12 +5479,12 @@ meat = 0x54 "Pork"@}
@noindent
This is the default format.
-@kindex show print pretty
@item show print pretty
Show which format @value{GDBN} is using to print structures.
-@kindex set print sevenbit-strings
@item set print sevenbit-strings on
+@cindex eight-bit characters in strings
+@cindex octal escapes in strings
Print using only seven-bit characters; if this option is set,
@value{GDBN} displays any eight-bit characters (in strings or
character values) using the notation @code{\}@var{nnn}. This setting is
@@ -5476,19 +5495,17 @@ high-order bit of characters as a marker or ``meta'' bit.
Print full eight-bit characters. This allows the use of more
international character sets, and is the default.
-@kindex show print sevenbit-strings
@item show print sevenbit-strings
Show whether or not @value{GDBN} is printing only seven-bit characters.
-@kindex set print union
@item set print union on
+@cindex unions in structures, printing
Tell @value{GDBN} to print unions which are contained in structures. This
is the default setting.
@item set print union off
Tell @value{GDBN} not to print unions which are contained in structures.
-@kindex show print union
@item show print union
Ask @value{GDBN} whether or not it will print unions which are contained in
structures.
@@ -5532,31 +5549,26 @@ $1 = @{it = Tree, form = @{...@}@}
These settings are of interest when debugging C@t{++} programs:
@table @code
-@cindex demangling
-@kindex set print demangle
+@cindex demangling C@t{++} names
@item set print demangle
@itemx set print demangle on
Print C@t{++} names in their source form rather than in the encoded
(``mangled'') form passed to the assembler and linker for type-safe
linkage. The default is on.
-@kindex show print demangle
@item show print demangle
Show whether C@t{++} names are printed in mangled or demangled form.
-@kindex set print asm-demangle
@item set print asm-demangle
@itemx set print asm-demangle on
Print C@t{++} names in their source form rather than their mangled form, even
in assembler code printouts such as instruction disassemblies.
The default is off.
-@kindex show print asm-demangle
@item show print asm-demangle
Show whether C@t{++} names in assembly listings are printed in mangled
or demangled form.
-@kindex set demangle-style
@cindex C@t{++} symbol decoding style
@cindex symbol decoding style, C@t{++}
@item set demangle-style @var{style}
@@ -5586,13 +5598,12 @@ require further enhancement to permit that.
@end table
If you omit @var{style}, you will see a list of possible formats.
-@kindex show demangle-style
@item show demangle-style
Display the encoding style currently in use for decoding C@t{++} symbols.
-@kindex set print object
@item set print object
@itemx set print object on
+@cindex derived type of an object, printing
When displaying a pointer to an object, identify the @emph{actual}
(derived) type of the object rather than the @emph{declared} type, using
the virtual function table.
@@ -5601,26 +5612,24 @@ the virtual function table.
Display only the declared type of objects, without reference to the
virtual function table. This is the default setting.
-@kindex show print object
@item show print object
Show whether actual, or declared, object types are displayed.
-@kindex set print static-members
@item set print static-members
@itemx set print static-members on
+@cindex static members of C@t{++} objects
Print static members when displaying a C@t{++} object. The default is on.
@item set print static-members off
Do not print static members when displaying a C@t{++} object.
-@kindex show print static-members
@item show print static-members
Show whether C@t{++} static members are printed, or not.
@c These don't work with HP ANSI C++ yet.
-@kindex set print vtbl
@item set print vtbl
@itemx set print vtbl on
+@cindex pretty print C@t{++} virtual function tables
Pretty print C@t{++} virtual function tables. The default is off.
(The @code{vtbl} commands do not work on programs compiled with the HP
ANSI C@t{++} compiler (@code{aCC}).)
@@ -5628,7 +5637,6 @@ ANSI C@t{++} compiler (@code{aCC}).)
@item set print vtbl off
Do not pretty print C@t{++} virtual function tables.
-@kindex show print vtbl
@item show print vtbl
Show whether C@t{++} virtual function tables are pretty printed, or not.
@end table
@@ -6439,9 +6447,9 @@ Show the results of expanding all preprocessor macro invocations in
not parse the result, @var{expression} need not be a valid expression;
it can be any string of tokens.
-@kindex macro expand-once
@item macro expand-once @var{expression}
@itemx macro exp1 @var{expression}
+@cindex expand macro once
@i{(This command is not yet implemented.)} Show the results of
expanding those preprocessor macro invocations that appear explicitly in
@var{expression}. Macro invocations appearing in that expansion are
@@ -7414,14 +7422,13 @@ you can abbreviate this as @code{ov} or @code{ovly}. The commands are:
@table @code
@item overlay off
-@kindex overlay off
+@kindex overlay
Disable @value{GDBN}'s overlay support. When overlay support is
disabled, @value{GDBN} assumes that all functions and variables are
always present at their mapped addresses. By default, @value{GDBN}'s
overlay support is disabled.
@item overlay manual
-@kindex overlay manual
@cindex manual overlay debugging
Enable @dfn{manual} overlay debugging. In this mode, @value{GDBN}
relies on you to tell it which overlays are mapped, and which are not,
@@ -7430,7 +7437,6 @@ commands described below.
@item overlay map-overlay @var{overlay}
@itemx overlay map @var{overlay}
-@kindex overlay map-overlay
@cindex map an overlay
Tell @value{GDBN} that @var{overlay} is now mapped; @var{overlay} must
be the name of the object file section containing the overlay. When an
@@ -7441,7 +7447,6 @@ that any other overlays whose mapped ranges overlap that of
@item overlay unmap-overlay @var{overlay}
@itemx overlay unmap @var{overlay}
-@kindex overlay unmap-overlay
@cindex unmap an overlay
Tell @value{GDBN} that @var{overlay} is no longer mapped; @var{overlay}
must be the name of the object file section containing the overlay.
@@ -7449,7 +7454,6 @@ When an overlay is unmapped, @value{GDBN} assumes it can find the
overlay's functions and variables at their load addresses.
@item overlay auto
-@kindex overlay auto
Enable @dfn{automatic} overlay debugging. In this mode, @value{GDBN}
consults a data structure the overlay manager maintains in the inferior
to see which overlays are mapped. For details, see @ref{Automatic
@@ -7457,7 +7461,6 @@ Overlay Debugging}.
@item overlay load-target
@itemx overlay load
-@kindex overlay load-target
@cindex reloading the overlay table
Re-read the overlay table from the inferior. Normally, @value{GDBN}
re-reads the table @value{GDBN} automatically each time the inferior
@@ -7794,8 +7797,6 @@ The following commands help you find out which language is the
working language, and also what language source files were written in.
@kindex show language
-@kindex info frame@r{, show the source language}
-@kindex info source@r{, show the source language}
@table @code
@item show language
Display the current working language. This is the
@@ -7803,12 +7804,14 @@ language you can use with commands such as @code{print} to
build and compute expressions that may involve variables in your program.
@item info frame
+@kindex info frame@r{, show the source language}
Display the source language for this frame. This language becomes the
working language if you use an identifier from this frame.
@xref{Frame Info, ,Information about a frame}, to identify the other
information listed here.
@item info source
+@kindex info source@r{, show the source language}
Display the source language of this source file.
@xref{Symbols, ,Examining the Symbol Table}, to identify the other
information listed here.
@@ -7903,7 +7906,6 @@ details on specific languages.
@value{GDBN} provides some additional commands for controlling the type checker:
-@kindex set check@r{, type}
@kindex set check type
@kindex show check type
@table @code
@@ -7964,7 +7966,6 @@ Supported languages}, for further details on specific languages.
@value{GDBN} provides some additional commands for controlling the range checker:
-@kindex set check@r{, range}
@kindex set check range
@kindex show check range
@table @code
@@ -9888,9 +9889,9 @@ symbol table. It cannot be shared across multiple host platforms.
@c (eg rooted in val of env var GDBSYMS) could exist for mappable symbol
@c files.
-@kindex core
@kindex core-file
@item core-file @r{[} @var{filename} @r{]}
+@itemx core
Specify the whereabouts of a core dump file to be used as the ``contents
of memory''. Traditionally, core files contain only some parts of the
address space of the process that generated them; @value{GDBN} can access the
@@ -10308,7 +10309,7 @@ polynomials, reversals, byte ordering, etc.), the simplest way to
describe the CRC used in @code{.gnu_debuglink} sections is to give the
complete code for a function that computes it:
-@kindex @code{gnu_debuglink_crc32}
+@kindex gnu_debuglink_crc32
@smallexample
unsigned long
gnu_debuglink_crc32 (unsigned long crc,
@@ -10580,22 +10581,24 @@ Use the @code{show gnutarget} command to display what file format
and @code{show gnutarget} displays @samp{The current BDF target is "auto"}.
@end table
+@cindex common targets
Here are some common targets (available, or not, depending on the GDB
configuration):
@table @code
-@kindex target exec
+@kindex target
@item target exec @var{program}
+@cindex executable file target
An executable file. @samp{target exec @var{program}} is the same as
@samp{exec-file @var{program}}.
-@kindex target core
@item target core @var{filename}
+@cindex core dump file target
A core dump file. @samp{target core @var{filename}} is the same as
@samp{core-file @var{filename}}.
-@kindex target remote
@item target remote @var{dev}
+@cindex remote target
Remote serial target in GDB-specific protocol. The argument @var{dev}
specifies what serial device to use for the connection (e.g.
@file{/dev/ttya}). @xref{Remote, ,Remote debugging}. @code{target remote}
@@ -10603,8 +10606,8 @@ supports the @code{load} command. This is only useful if you have
some other way of getting the stub to the target system, and you can put
it somewhere in memory where it won't get clobbered by the download.
-@kindex target sim
@item target sim
+@cindex built-in simulator target
Builtin CPU simulator. @value{GDBN} includes simulators for most architectures.
In general,
@smallexample
@@ -10625,8 +10628,8 @@ Some configurations may include these targets as well:
@table @code
-@kindex target nrom
@item target nrom @var{dev}
+@cindex NetROM ROM emulator target
NetROM ROM emulator. This target only supports downloading.
@end table
@@ -10675,15 +10678,13 @@ which to use. However, you may still find it useful to adjust
@value{GDBN}'s idea of processor endian-ness manually.
@table @code
-@kindex set endian big
+@kindex set endian
@item set endian big
Instruct @value{GDBN} to assume the target is big-endian.
-@kindex set endian little
@item set endian little
Instruct @value{GDBN} to assume the target is little-endian.
-@kindex set endian auto
@item set endian auto
Instruct @value{GDBN} to use the byte order associated with the
executable.
@@ -11156,14 +11157,14 @@ subroutines:
@table @code
@item set_debug_traps
-@kindex set_debug_traps
+@findex set_debug_traps
@cindex remote serial stub, initialization
This routine arranges for @code{handle_exception} to run when your
program stops. You must call this subroutine explicitly near the
beginning of your program.
@item handle_exception
-@kindex handle_exception
+@findex handle_exception
@cindex remote serial stub, main routine
This is the central workhorse, but your program never calls it
explicitly---the setup code arranges for @code{handle_exception} to
@@ -11211,13 +11212,13 @@ serial port.
@table @code
@item int getDebugChar()
-@kindex getDebugChar
+@findex getDebugChar
Write this subroutine to read a single character from the serial port.
It may be identical to @code{getchar} for your target system; a
different name is used to allow you to distinguish the two if you wish.
@item void putDebugChar(int)
-@kindex putDebugChar
+@findex putDebugChar
Write this subroutine to write a single character to the serial port.
It may be identical to @code{putchar} for your target system; a
different name is used to allow you to distinguish the two if you wish.
@@ -11240,7 +11241,7 @@ Other routines you need to supply are:
@table @code
@item void exceptionHandler (int @var{exception_number}, void *@var{exception_address})
-@kindex exceptionHandler
+@findex exceptionHandler
Write this function to install @var{exception_address} in the exception
handling tables. You need to do this because the stub does not have any
way of knowing what the exception handling tables on your target system
@@ -11262,7 +11263,7 @@ should be at privilege level 0 (the most privileged level). The
help from @code{exceptionHandler}.
@item void flush_i_cache()
-@kindex flush_i_cache
+@findex flush_i_cache
On @sc{sparc} and @sc{sparclite} only, write this subroutine to flush the
instruction cache, if any, on your target machine. If there is no
instruction cache, this subroutine may be a no-op.
@@ -11276,7 +11277,7 @@ You must also make sure this library routine is available:
@table @code
@item void *memset(void *, int, int)
-@kindex memset
+@findex memset
This is the standard library function @code{memset} that sets an area of
memory to a known value. If you have one of the free versions of
@code{libc.a}, @code{memset} can be found there; otherwise, you must
@@ -11376,6 +11377,7 @@ configurations.
@menu
* HP-UX:: HP-UX
+* BSD libkvm Interface:: Debugging BSD kernel memory images
* SVR4 Process Information:: SVR4 process information
* DJGPP Native:: Features specific to the DJGPP port
* Cygwin Native:: Features specific to the Cygwin port
@@ -11388,6 +11390,46 @@ On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, @value{GDBN} searches for a user or system
name first, before it searches for a convenience variable.
+@node BSD libkvm Interface
+@subsection BSD libkvm Interface
+
+@cindex libkvm
+@cindex kernel memory image
+@cindex kernel crash dump
+
+BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory
+interface that provides a uniform interface for accessing kernel virtual
+memory images, including live systems and crash dumps. @value{GDBN}
+uses this interface to allow you to debug live kernels and kernel crash
+dumps on many native BSD configurations. This is implemented as a
+special @code{kvm} debugging target. For debugging a live system, load
+the currently running kernel into @value{GDBN} and connect to the
+@code{kvm} target:
+
+@smallexample
+(@value{GDBP}) @b{target kvm}
+@end smallexample
+
+For debugging crash dumps, provide the file name of the crash dump as an
+argument:
+
+@smallexample
+(@value{GDBP}) @b{target kvm /var/crash/bsd.0}
+@end smallexample
+
+Once connected to the @code{kvm} target, the following commands are
+available:
+
+@table @code
+@kindex kvm
+@item kvm pcb
+Set current context from pcb address.
+
+@item kvm proc
+Set current context from proc address. This command isn't available on
+modern FreeBSD systems.
+@end table
+
@node SVR4 Process Information
@subsection SVR4 process information
@@ -11843,7 +11885,7 @@ The following information on connecting to VxWorks was current when
this manual was produced; newer releases of VxWorks may use revised
procedures.
-@kindex INCLUDE_RDB
+@findex INCLUDE_RDB
To use @value{GDBN} with VxWorks, you must rebuild your VxWorks kernel
to include the remote debugging interface routines in the VxWorks
library @file{rdb.a}. To do this, define @code{INCLUDE_RDB} in the
@@ -12503,49 +12545,39 @@ or Data. For example:
@code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)}
-@kindex htrace info
+@kindex htrace
@item htrace info
Display information about current HW trace configuration.
-@kindex htrace trigger
@item htrace trigger @var{conditional}
Set starting criteria for HW trace.
-@kindex htrace qualifier
@item htrace qualifier @var{conditional}
Set acquisition qualifier for HW trace.
-@kindex htrace stop
@item htrace stop @var{conditional}
Set HW trace stopping criteria.
-@kindex htrace record
@item htrace record [@var{data}]*
Selects the data to be recorded, when qualifier is met and HW trace was
triggered.
-@kindex htrace enable
@item htrace enable
-@kindex htrace disable
@itemx htrace disable
Enables/disables the HW trace.
-@kindex htrace rewind
@item htrace rewind [@var{filename}]
Clears currently recorded trace data.
If filename is specified, new trace file is made and any newly collected data
will be written there.
-@kindex htrace print
@item htrace print [@var{start} [@var{len}]]
Prints trace buffer, using current record configuration.
-@kindex htrace mode continuous
@item htrace mode continuous
Set continuous trace mode.
-@kindex htrace mode suspend
@item htrace mode suspend
Set suspend trace mode.
@@ -13038,7 +13070,7 @@ history facility.
@cindex history substitution
@cindex history file
@kindex set history filename
-@kindex GDBHISTFILE
+@cindex @env{GDBHISTFILE}, environment variable
@item set history filename @var{fname}
Set the name of the @value{GDBN} command history file to @var{fname}.
This is the file where @value{GDBN} reads an initial command history
@@ -13050,7 +13082,7 @@ to the value of the environment variable @code{GDBHISTFILE}, or to
is not set.
@cindex history save
-@kindex set history save
+@kindex set history
@item set history save
@itemx set history save on
Record command history in a file, whose name may be specified with the
@@ -13060,7 +13092,6 @@ Record command history in a file, whose name may be specified with the
Stop recording command history in a file.
@cindex history size
-@kindex set history size
@item set history size @var{size}
Set the number of commands which @value{GDBN} keeps in its history list.
This defaults to the value of the environment variable
@@ -13084,9 +13115,9 @@ history facilities do not attempt substitution on the strings
The commands to control history expansion are:
@table @code
-@kindex set history expansion
@item set history expansion on
@itemx set history expansion
+@cindex history expansion
Enable history expansion. History expansion is off by default.
@item set history expansion off
@@ -13373,80 +13404,79 @@ Displays state of confirmation requests.
@node Debugging Output
@section Optional messages about internal happenings
+@cindex optional debugging messages
+
@table @code
-@kindex set debug arch
+@kindex set debug
+@cindex gdbarch debugging info
@item set debug arch
Turns on or off display of gdbarch debugging info. The default is off
-@kindex show debug arch
+@kindex show debug
@item show debug arch
Displays the current state of displaying gdbarch debugging info.
-@kindex set debug event
@item set debug event
+@cindex event debugging info
Turns on or off display of @value{GDBN} event debugging info. The
default is off.
-@kindex show debug event
@item show debug event
Displays the current state of displaying @value{GDBN} event debugging
info.
-@kindex set debug expression
@item set debug expression
+@cindex expression debugging info
Turns on or off display of @value{GDBN} expression debugging info. The
default is off.
-@kindex show debug expression
@item show debug expression
Displays the current state of displaying @value{GDBN} expression
debugging info.
-@kindex set debug frame
@item set debug frame
+@cindex frame debugging info
Turns on or off display of @value{GDBN} frame debugging info. The
default is off.
-@kindex show debug frame
@item show debug frame
Displays the current state of displaying @value{GDBN} frame debugging
info.
-@kindex set debug overload
+@item set debug observer
+@cindex observer debugging info
+Turns on or off display of @value{GDBN} observer debugging. This
+includes info such as the notification of observable events.
+@item show debug observer
+Displays the current state of observer debugging.
@item set debug overload
+@cindex C@t{++} overload debugging info
Turns on or off display of @value{GDBN} C@t{++} overload debugging
info. This includes info such as ranking of functions, etc. The default
is off.
-@kindex show debug overload
@item show debug overload
Displays the current state of displaying @value{GDBN} C@t{++} overload
debugging info.
-@kindex set debug remote
@cindex packets, reporting on stdout
@cindex serial connections, debugging
@item set debug remote
Turns on or off display of reports on all packets sent back and forth across
the serial line to the remote machine. The info is printed on the
@value{GDBN} standard output stream. The default is off.
-@kindex show debug remote
@item show debug remote
Displays the state of display of remote packets.
-@kindex set debug serial
@item set debug serial
Turns on or off display of @value{GDBN} serial debugging info. The
default is off.
-@kindex show debug serial
@item show debug serial
Displays the current state of displaying @value{GDBN} serial debugging
info.
-@kindex set debug target
@item set debug target
+@cindex target debugging info
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
default is 0. Set it to 1 to track events, and to 2 to also track the
value of large memory transfers. Changes to this flag do not take effect
until the next time you connect to a target or use the @code{run} command.
-@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
info.
-@kindex set debug varobj
@item set debug varobj
+@cindex variable object debugging info
Turns on or off display of @value{GDBN} variable object debugging
info. The default is off.
-@kindex show debug varobj
@item show debug varobj
Displays the current state of displaying @value{GDBN} variable object
debugging info.
@@ -13575,7 +13605,6 @@ messages when used in a user-defined command.
@cindex hooks, pre-command
@kindex hook
-@kindex hook-
You may define @dfn{hooks}, which are a special kind of user-defined
command. Whenever you run the command @samp{foo}, if the user-defined
command @samp{hook-foo} exists, it is executed (with no arguments)
@@ -13583,7 +13612,6 @@ before that command.
@cindex hooks, post-command
@kindex hookpost
-@kindex hookpost-
A hook may also be defined which is run after the command you executed.
Whenever you run the command @samp{foo}, if the user-defined command
@samp{hookpost-foo} exists, it is executed (with no arguments) after
@@ -14204,27 +14232,22 @@ in the TUI mode.
List and give the size of all displayed windows.
@item layout next
-@kindex layout next
+@kindex layout
Display the next layout.
@item layout prev
-@kindex layout prev
Display the previous layout.
@item layout src
-@kindex layout src
Display the source window only.
@item layout asm
-@kindex layout asm
Display the assembly window only.
@item layout split
-@kindex layout split
Display the source and assembly window.
@item layout regs
-@kindex layout regs
Display the register window together with the source or assembly window.
@item focus next | prev | src | asm | regs | split
@@ -16805,14 +16828,24 @@ There's no @value{GDBN} command which directly corresponds to this one.
List the source files for the current executable.
+It will always output the filename, but only when GDB can find the absolute
+file name of a source file, will it output the fullname.
+
@subsubheading @value{GDBN} Command
There's no @value{GDBN} command which directly corresponds to this one.
@code{gdbtk} has an analogous command @samp{gdb_listfiles}.
@subsubheading Example
-N.A.
-
+@smallexample
+(@value{GDBP})
+-file-list-exec-source-files
+^done,files=[
+@{file=foo.c,fullname=/home/foo.c@},
+@{file=/home/bar.c,fullname=/home/bar.c@},
+@{file=gdb_could_not_find_fullpath.c@}]
+(@value{GDBP})
+@end smallexample
@subheading The @code{-file-list-shared-libraries} Command
@findex -file-list-shared-libraries
@@ -18907,6 +18940,16 @@ ours fails to crash, we would know that the bug was not happening for
us. If you had not told us to expect a crash, then we would not be able
to draw any conclusion from our observations.
+@pindex script
+@cindex recording a session script
+To collect all this information, you can use a session recording program
+such as @command{script}, which is available on many Unix systems.
+Just run your @value{GDBN} session inside @command{script} and then
+include the @file{typescript} file with your bug report.
+
+Another way to record a @value{GDBN} session is to run @value{GDBN}
+inside Emacs and then save the entire buffer to a file.
+
@item
If you wish to suggest changes to the @value{GDBN} source, send us context
diffs. If you even discuss something in the @value{GDBN} source, refer to
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index aafc256a5b5..d0f73923b65 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -1,7 +1,7 @@
\input texinfo @c -*- texinfo -*-
@setfilename gdbint.info
@include gdb-cfg.texi
-@dircategory Programming & development tools.
+@dircategory Software development
@direntry
* Gdb-Internals: (gdbint). The GNU debugger's internals.
@end direntry
@@ -38,7 +38,7 @@ Free Documentation License''.
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.188.2.1 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.188.2.2 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -1372,7 +1372,7 @@ Finally, here's an example of printing an address. The original code:
@smallexample
annotate_field (4);
printf_filtered ("%s ",
- local_hex_string_custom ((unsigned long) b->address, "08l"));
+ hex_string_custom ((unsigned long) b->address, 8));
@end smallexample
It became:
@@ -2134,9 +2134,6 @@ The default name of @value{GDBN}'s initialization file (normally
@item NO_STD_REGS
This macro is deprecated.
-@item NO_SYS_FILE
-Define this if your system does not have a @code{<sys/file.h>}.
-
@item SIGWINCH_HANDLER
If your host defines @code{SIGWINCH}, you can define this to be the name
of a function to be called if @code{SIGWINCH} is received.
@@ -2168,19 +2165,9 @@ The default value of the prompt string (normally @code{"(gdb) "}).
@cindex terminal device
The name of the generic TTY device, defaults to @code{"/dev/tty"}.
-@item FCLOSE_PROVIDED
-Define this if the system declares @code{fclose} in the headers included
-in @code{defs.h}. This isn't needed unless your compiler is unusually
-anal.
-
@item FOPEN_RB
Define this if binary files are opened the same way as text files.
-@item GETENV_PROVIDED
-Define this if the system declares @code{getenv} in its headers included
-in @code{defs.h}. This isn't needed unless your compiler is unusually
-anal.
-
@item HAVE_MMAP
@findex mmap
In some cases, use the system call @code{mmap} for reading symbol
@@ -2251,10 +2238,6 @@ of functions to indicate that they never return. The default is already
set correctly if compiling with GCC. This will almost never need to be
defined.
-@item NO_SIGINTERRUPT
-@findex siginterrupt
-Define this to indicate that @code{siginterrupt} is not available.
-
@item SEEK_CUR
@itemx SEEK_SET
Define these to appropriate value for the system @code{lseek}, if not already
@@ -2264,11 +2247,6 @@ defined.
This is the signal for stopping @value{GDBN}. Defaults to
@code{SIGTSTP}. (Only redefined for the Convex.)
-@item USE_O_NOCTTY
-Define this if the interior's tty should be opened with the @code{O_NOCTTY}
-flag. (FIXME: This should be a native-only flag, but @file{inflow.c} is
-always linked in.)
-
@item USG
Means that System V (prior to SVR4) include files are in use. (FIXME:
This symbol is abused in @file{infrun.c}, @file{regex.c}, and
@@ -2930,12 +2908,6 @@ Define if the compiler promotes a @code{short} or @code{char}
parameter to an @code{int}, but still reports the parameter as its
original type, rather than the promoted type.
-@item BELIEVE_PCC_PROMOTION_TYPE
-@findex BELIEVE_PCC_PROMOTION_TYPE
-Define this if @value{GDBN} should believe the type of a @code{short}
-argument when compiled by @code{pcc}, but look within a full int space to get
-its value. Only defined for Sun-3 at present.
-
@item BITS_BIG_ENDIAN
@findex BITS_BIG_ENDIAN
Define this if the numbering of bits in the targets does @strong{not} match the
@@ -3041,35 +3013,6 @@ Since the adjustment of a breakpoint may significantly alter a user's
expectation, @value{GDBN} prints a warning when an adjusted breakpoint
is initially set and each time that that breakpoint is hit.
-@item DEPRECATED_CALL_DUMMY_WORDS
-@findex DEPRECATED_CALL_DUMMY_WORDS
-Pointer to an array of @code{LONGEST} words of data containing
-host-byte-ordered @code{DEPRECATED_REGISTER_SIZE} sized values that
-partially specify the sequence of instructions needed for an inferior
-function call.
-
-Should be deprecated in favor of a macro that uses target-byte-ordered
-data.
-
-This method has been replaced by @code{push_dummy_code}
-(@pxref{push_dummy_code}).
-
-@item DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
-@findex DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
-The size of @code{DEPRECATED_CALL_DUMMY_WORDS}. This must return a
-positive value. See also @code{DEPRECATED_CALL_DUMMY_LENGTH}.
-
-This method has been replaced by @code{push_dummy_code}
-(@pxref{push_dummy_code}).
-
-@item CALL_DUMMY
-@findex CALL_DUMMY
-A static initializer for @code{DEPRECATED_CALL_DUMMY_WORDS}.
-Deprecated.
-
-This method has been replaced by @code{push_dummy_code}
-(@pxref{push_dummy_code}).
-
@item CALL_DUMMY_LOCATION
@findex CALL_DUMMY_LOCATION
See the file @file{inferior.h}.
@@ -3090,15 +3033,6 @@ written to the target. This is often the case for program counters,
status words, and other special registers. If this is not defined,
@value{GDBN} will assume that all registers may be written.
-@item DO_DEFERRED_STORES
-@itemx CLEAR_DEFERRED_STORES
-@findex CLEAR_DEFERRED_STORES
-@findex DO_DEFERRED_STORES
-Define this to execute any deferred stores of registers into the inferior,
-and to cancel any deferred stores.
-
-Currently only implemented correctly for native Sparc configurations?
-
@item int CONVERT_REGISTER_P(@var{regnum})
@findex CONVERT_REGISTER_P
Return non-zero if register @var{regnum} can represent data values in a
@@ -3308,20 +3242,20 @@ function end symbol is 0. For such targets, you must define
@code{FUNCTION_EPILOGUE_SIZE} to expand into the standard size of a
function's epilogue.
-@item FUNCTION_START_OFFSET
-@findex FUNCTION_START_OFFSET
+@item DEPRECATED_FUNCTION_START_OFFSET
+@findex DEPRECATED_FUNCTION_START_OFFSET
An integer, giving the offset in bytes from a function's address (as
used in the values of symbols, function pointers, etc.), and the
function's first genuine instruction.
This is zero on almost all machines: the function's address is usually
-the address of its first instruction. However, on the VAX, for example,
-each function starts with two bytes containing a bitmask indicating
-which registers to save upon entry to the function. The VAX @code{call}
-instructions check this value, and save the appropriate registers
-automatically. Thus, since the offset from the function's address to
-its first instruction is two bytes, @code{FUNCTION_START_OFFSET} would
-be 2 on the VAX.
+the address of its first instruction. However, on the VAX, for
+example, each function starts with two bytes containing a bitmask
+indicating which registers to save upon entry to the function. The
+VAX @code{call} instructions check this value, and save the
+appropriate registers automatically. Thus, since the offset from the
+function's address to its first instruction is two bytes,
+@code{DEPRECATED_FUNCTION_START_OFFSET} would be 2 on the VAX.
@item GCC_COMPILED_FLAG_SYMBOL
@itemx GCC2_COMPILED_FLAG_SYMBOL
@@ -3551,43 +3485,6 @@ form.
Return the appropriate register set for a core file section with name
@var{sect_name} and size @var{sect_size}.
-
-@item RETURN_VALUE_ON_STACK(@var{type})
-@findex RETURN_VALUE_ON_STACK
-@cindex returning structures by value
-@cindex structures, returning by value
-
-Return non-zero if values of type TYPE are returned on the stack, using
-the ``struct convention'' (i.e., the caller provides a pointer to a
-buffer in which the callee should store the return value). This
-controls how the @samp{finish} command finds a function's return value,
-and whether an inferior function call reserves space on the stack for
-the return value.
-
-The full logic @value{GDBN} uses here is kind of odd.
-
-@itemize @bullet
-@item
-If the type being returned by value is not a structure, union, or array,
-and @code{RETURN_VALUE_ON_STACK} returns zero, then @value{GDBN}
-concludes the value is not returned using the struct convention.
-
-@item
-Otherwise, @value{GDBN} calls @code{USE_STRUCT_CONVENTION} (see below).
-If that returns non-zero, @value{GDBN} assumes the struct convention is
-in use.
-@end itemize
-
-In other words, to indicate that a given type is returned by value using
-the struct convention, that type must be either a struct, union, array,
-or something @code{RETURN_VALUE_ON_STACK} likes, @emph{and} something
-that @code{USE_STRUCT_CONVENTION} likes.
-
-Note that, in C and C@t{++}, arrays are never returned by value. In those
-languages, these predicates will always see a pointer type, never an
-array type. All the references above to arrays being returned by value
-apply only to other languages.
-
@item SOFTWARE_SINGLE_STEP_P()
@findex SOFTWARE_SINGLE_STEP_P
Define this as 1 if the target does not have a hardware single-step
@@ -3632,22 +3529,6 @@ and guess the starting and ending addresses of the compilation unit from
them.
@end itemize
-@item PCC_SOL_BROKEN
-@findex PCC_SOL_BROKEN
-(Used only in the Convex target.)
-
-@item DEPRECATED_PC_IN_SIGTRAMP (@var{pc}, @var{name})
-@findex DEPRECATED_PC_IN_SIGTRAMP
-@cindex sigtramp
-The @dfn{sigtramp} is a routine that the kernel calls (which then calls
-the signal handler). On most machines it is a library routine that is
-linked into the executable.
-
-This function, given a program counter value in @var{pc} and the
-(possibly NULL) name of the function in which that @var{pc} resides,
-returns nonzero if the @var{pc} and/or @var{name} show that we are in
-sigtramp.
-
@item PC_LOAD_SEGMENT
@findex PC_LOAD_SEGMENT
If defined, print information about the load segment for the program
@@ -3695,7 +3576,7 @@ 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{func_addr}, @var{regcache}, @var{pc_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
+@item push_dummy_call (@var{gdbarch}, @var{function}, @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
@@ -3703,13 +3584,15 @@ 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}).
+@var{function} is a pointer to a @code{struct value}; on architectures that use
+function descriptors, this contains the function descriptor value.
+
Returns the updated top-of-stack pointer.
This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}.
@item CORE_ADDR push_dummy_code (@var{gdbarch}, @var{sp}, @var{funaddr}, @var{using_gcc}, @var{args}, @var{nargs}, @var{value_type}, @var{real_pc}, @var{bp_addr})
@findex push_dummy_code
-@findex DEPRECATED_FIX_CALL_DUMMY
@anchor{push_dummy_code} Given a stack based call dummy, push the
instruction sequence (including space for a breakpoint) to which the
called function should return.
@@ -3722,23 +3605,8 @@ By default, the stack is grown sufficient to hold a frame-aligned
(@pxref{frame_align}) breakpoint, @var{bp_addr} is set to the address
reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}.
-This method replaces @code{DEPRECATED_CALL_DUMMY_WORDS},
-@code{DEPRECATED_SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY},
-@code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE},
-@code{DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET}, and
-@code{DEPRECATED_FIX_CALL_DUMMY}.
-
-@item DEPRECATED_PUSH_DUMMY_FRAME
-@findex DEPRECATED_PUSH_DUMMY_FRAME
-Used in @samp{call_function_by_hand} to create an artificial stack frame.
-
-@item DEPRECATED_REGISTER_BYTES
-@findex DEPRECATED_REGISTER_BYTES
-The total amount of space needed to store @value{GDBN}'s copy of the
-machine's register state.
-
-This is no longer needed. @value{GDBN} instead computes the size of the
-register buffer at run-time.
+This method replaces @code{CALL_DUMMY_LOCATION},
+@code{DEPRECATED_REGISTER_SIZE}.
@item REGISTER_NAME(@var{i})
@findex REGISTER_NAME
@@ -3869,10 +3737,6 @@ value that is to be returned.
This method has been deprecated in favour of @code{gdbarch_return_value}
(@pxref{gdbarch_return_value}).
-@item SUN_FIXED_LBRAC_BUG
-@findex SUN_FIXED_LBRAC_BUG
-(Used only for Sun-3 and Sun-4 targets.)
-
@item SYMBOL_RELOADING_DEFAULT
@findex SYMBOL_RELOADING_DEFAULT
The default value of the ``symbol-reloading'' variable. (Never defined in
@@ -3952,9 +3816,9 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex read_sp
@findex read_fp
@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.
+@code{write_pc}, and @code{read_sp}. 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
@@ -3995,8 +3859,8 @@ frame. The value returned must match the dummy frame stack value
previously saved using @code{SAVE_DUMMY_FRAME_TOS}.
@xref{SAVE_DUMMY_FRAME_TOS}.
-@item USE_STRUCT_CONVENTION (@var{gcc_p}, @var{type})
-@findex USE_STRUCT_CONVENTION
+@item DEPRECATED_USE_STRUCT_CONVENTION (@var{gcc_p}, @var{type})
+@findex DEPRECATED_USE_STRUCT_CONVENTION
If defined, this must be an expression that is nonzero if a value of the
given @var{type} being returned from a function must have space
allocated for it on the stack. @var{gcc_p} is true if the function
@@ -4470,10 +4334,6 @@ target systems are the same. These macros should be defined (or left
undefined) in @file{nm-@var{system}.h}.
@table @code
-@item ATTACH_DETACH
-@findex ATTACH_DETACH
-If defined, then @value{GDBN} will include support for the @code{attach} and
-@code{detach} commands.
@item CHILD_PREPARE_TO_STORE
@findex CHILD_PREPARE_TO_STORE
@@ -4492,10 +4352,6 @@ Define this if the native-dependent code will provide its own routines
@file{infptrace.c} is included in this configuration, the default
routines in @file{infptrace.c} are used for these functions.
-@item FILES_INFO_HOOK
-@findex FILES_INFO_HOOK
-(Only defined for Convex.)
-
@item FP0_REGNUM
@findex FP0_REGNUM
This macro is normally defined to be the number of the first floating
@@ -4526,12 +4382,6 @@ needs to know this so that it can subtract this address from absolute
addresses in the upage, that are obtained via ptrace or from core files.
On systems that don't need this value, set it to zero.
-@item KERNEL_U_ADDR_BSD
-@findex KERNEL_U_ADDR_BSD
-Define this to cause @value{GDBN} to determine the address of @code{u} at
-runtime, by using Berkeley-style @code{nlist} on the kernel's image in
-the root directory.
-
@item KERNEL_U_ADDR_HPUX
@findex KERNEL_U_ADDR_HPUX
Define this to cause @value{GDBN} to determine the address of @code{u} at
@@ -4549,10 +4399,6 @@ Defines the format for the name of a @file{/proc} device. Should be
defined in @file{nm.h} @emph{only} in order to override the default
definition in @file{procfs.c}.
-@item PTRACE_FP_BUG
-@findex PTRACE_FP_BUG
-See @file{mach386-xdep.c}.
-
@item PTRACE_ARG3_TYPE
@findex PTRACE_ARG3_TYPE
The type of the third argument to the @code{ptrace} system call, if it
@@ -4592,10 +4438,6 @@ the shell execs, and once when the program itself execs. If the actual
number of traps is something other than 2, then define this macro to
expand into the number expected.
-@item SVR4_SHARED_LIBS
-@findex SVR4_SHARED_LIBS
-Define this to indicate that SVR4-style shared libraries are in use.
-
@item USE_PROC_FS
@findex USE_PROC_FS
This determines whether small routines in @file{*-tdep.c}, which
@@ -5048,7 +4890,7 @@ allocation of small temporary values (such as strings).
restrict the memory being allocated to no more than a few kilobytes.}
@value{GDBN} uses the string function @code{xstrdup} and the print
-function @code{xasprintf}.
+function @code{xstrprintf}.
@emph{Pragmatics: @code{asprintf} and @code{strdup} can fail. Print
functions such as @code{sprintf} are very prone to buffer overflow
@@ -6429,6 +6271,15 @@ difficult to test, such as code that handles host OS failures or bugs
in particular versions of compilers, and it's OK not to try to write
tests for all of those.
+DejaGNU supports separate build, host, and target machines. However,
+some @value{GDBN} test scripts do not work if the build machine and
+the host machine are not the same. In such an environment, these scripts
+will give a result of ``UNRESOLVED'', like this:
+
+@smallexample
+UNRESOLVED: gdb.base/example.exp: This test script does not work on a remote host.
+@end smallexample
+
@section Testsuite Organization
@cindex test suite organization
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index de48a192a36..caa35652309 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -35,6 +35,11 @@ The observer implementation is also currently not reentrant.
In particular, it is therefore not possible to call the attach
or detach routines during a notification.
+@section Debugging
+Observer notifications can be traced using the command @samp{set debug
+observer 1} (@pxref{Debugging Output, , Optional messages about
+internal happenings, gdb, Debugging with @var{GDBN}}).
+
@section @code{normal_stop} Notifications
@cindex @code{normal_stop} observer
@cindex notification about inferior execution stop
@@ -50,21 +55,43 @@ a condition that is not met. If the breakpoint has any associated
commands list, the commands are executed after the notification
is emitted.
-The following interface is available to manage @code{normal_stop}
-observers:
+The following interfaces are available to manage observers:
-@deftypefun extern struct observer *observer_attach_normal_stop (observer_normal_stop_ftype *@var{f})
-Attach the given @code{normal_stop} callback function @var{f} and
-return the associated observer.
+@deftypefun extern struct observer *observer_attach_@var{event} (observer_@var{event}_ftype *@var{f})
+Using the function @var{f}, create an observer that is notified when
+ever @var{event} occures, return the observer.
@end deftypefun
-@deftypefun extern void observer_detach_normal_stop (struct observer *@var{observer});
+@deftypefun extern void observer_detach_@var{event} (struct observer *@var{observer});
Remove @var{observer} from the list of observers to be notified when
-a @code{normal_stop} event occurs.
+@var{event} occurs.
+@end deftypefun
+
+@deftypefun extern void observer_notify_@var{event} (void);
+Send a notification to all @var{event} observers.
+@end deftypefun
+
+The following observable events are defined:
+
+@c note: all events must take at least one parameter.
+
+@deftypefun void normal_stop (struct bpstats *@var{bs})
+The inferior has stopped for real.
@end deftypefun
-@deftypefun extern void observer_notify_normal_stop (void);
-Send a notification to all @code{normal_stop} observers.
+@deftypefun void target_changed (struct target_ops *@var{target})
+The target's register contents have changed.
@end deftypefun
+@deftypefun void inferior_created (struct target_ops *@var{objfile}, int @var{from_tty})
+@value{GDBN} has just connected to an inferior. For @samp{run},
+@value{GDBN} calls this observer while the inferior is still stopped
+at the entry-point instruction. For @samp{attach} and @samp{core},
+@value{GDBN} calls this observer immediately after connecting to the
+inferior, and before any information on the inferior has been printed.
+@end deftypefun
+
+@deftypefun void solib_unloaded (struct so_list *@var{solib})
+The specified shared library has been discovered to be unloaded.
+@end deftypefun
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index d1abcfe04b7..f36a046dd0b 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -5,7 +5,7 @@
@c This is a dir.info fragment to support semi-automated addition of
@c manuals to an info tree.
-@dircategory Programming & development tools.
+@dircategory Software development
@direntry
* Stabs: (stabs). The "stabs" debugging information format.
@end direntry
@@ -35,7 +35,7 @@ Free Documentation License''.
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.13.4.1 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.13.4.2 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill \manvers\par
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 3f283e13ffa..82441b6f15c 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -1,8 +1,8 @@
/* Floating point routines for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation,
- Inc.
+ 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -91,10 +91,17 @@ get_field (unsigned char *data, enum floatformat_byteorders order,
{
result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little || order == floatformat_littlebyte_bigword)
- ++cur_byte;
- else
- --cur_byte;
+ switch (order)
+ {
+ case floatformat_little:
+ ++cur_byte;
+ break;
+ case floatformat_big:
+ --cur_byte;
+ break;
+ case floatformat_littlebyte_bigword:
+ break;
+ }
}
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
/* Mask out bits which are not part of the field */
@@ -554,19 +561,9 @@ floatformat_mantissa (const struct floatformat *fmt, char *val)
increase precision as necessary. Otherwise, we call the conversion
routine and let it do the dirty work. */
-#ifndef HOST_FLOAT_FORMAT
-#define HOST_FLOAT_FORMAT 0
-#endif
-#ifndef HOST_DOUBLE_FORMAT
-#define HOST_DOUBLE_FORMAT 0
-#endif
-#ifndef HOST_LONG_DOUBLE_FORMAT
-#define HOST_LONG_DOUBLE_FORMAT 0
-#endif
-
-static const struct floatformat *host_float_format = HOST_FLOAT_FORMAT;
-static const struct floatformat *host_double_format = HOST_DOUBLE_FORMAT;
-static const struct floatformat *host_long_double_format = HOST_LONG_DOUBLE_FORMAT;
+static const struct floatformat *host_float_format = GDB_HOST_FLOAT_FORMAT;
+static const struct floatformat *host_double_format = GDB_HOST_DOUBLE_FORMAT;
+static const struct floatformat *host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT;
void
floatformat_to_doublest (const struct floatformat *fmt,
@@ -621,8 +618,8 @@ floatformat_from_doublest (const struct floatformat *fmt,
/* Return a floating-point format for a floating-point variable of
- length LEN. Return NULL, if no suitable floating-point format
- could be found.
+ length LEN. If no suitable floating-point format is found, an
+ error is thrown.
We need this functionality since information about the
floating-point format of a type is not always available to GDB; the
@@ -636,12 +633,13 @@ floatformat_from_doublest (const struct floatformat *fmt,
static const struct floatformat *
floatformat_from_length (int len)
{
+ const struct floatformat *format;
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
- return TARGET_FLOAT_FORMAT;
+ format = TARGET_FLOAT_FORMAT;
else if (len * TARGET_CHAR_BIT == TARGET_DOUBLE_BIT)
- return TARGET_DOUBLE_FORMAT;
+ format = TARGET_DOUBLE_FORMAT;
else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT)
- return TARGET_LONG_DOUBLE_FORMAT;
+ format = TARGET_LONG_DOUBLE_FORMAT;
/* On i386 the 'long double' type takes 96 bits,
while the real number of used bits is only 80,
both in processor and in memory.
@@ -649,9 +647,13 @@ floatformat_from_length (int len)
else if ((TARGET_LONG_DOUBLE_FORMAT != NULL)
&& (len * TARGET_CHAR_BIT ==
TARGET_LONG_DOUBLE_FORMAT->totalsize))
- return TARGET_LONG_DOUBLE_FORMAT;
-
- return NULL;
+ format = TARGET_LONG_DOUBLE_FORMAT;
+ else
+ format = NULL;
+ if (format == NULL)
+ error ("Unrecognized %d-bit floating-point type.",
+ len * TARGET_CHAR_BIT);
+ return format;
}
const struct floatformat *
@@ -678,12 +680,6 @@ extract_floating_by_length (const void *addr, int len)
const struct floatformat *fmt = floatformat_from_length (len);
DOUBLEST val;
- if (fmt == NULL)
- {
- warning ("Can't extract a floating-point number of %d bytes.", len);
- return NAN;
- }
-
floatformat_to_doublest (fmt, addr, &val);
return val;
}
@@ -702,13 +698,6 @@ store_floating_by_length (void *addr, int len, DOUBLEST val)
{
const struct floatformat *fmt = floatformat_from_length (len);
- if (fmt == NULL)
- {
- warning ("Can't store a floating-point number of %d bytes.", len);
- memset (addr, 0, len);
- return;
- }
-
floatformat_from_doublest (fmt, &val, addr);
}
@@ -822,3 +811,26 @@ convert_typed_floating (const void *from, const struct type *from_type,
floatformat_from_doublest (to_fmt, &d, to);
}
}
+
+const struct floatformat *floatformat_ieee_single[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ieee_double[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ieee_quad[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_arm_ext[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ia64_spill[BFD_ENDIAN_UNKNOWN];
+
+extern void _initialize_doublest (void);
+
+extern void
+_initialize_doublest (void)
+{
+ floatformat_ieee_single[BFD_ENDIAN_LITTLE] = &floatformat_ieee_single_little;
+ floatformat_ieee_single[BFD_ENDIAN_BIG] = &floatformat_ieee_single_big;
+ floatformat_ieee_double[BFD_ENDIAN_LITTLE] = &floatformat_ieee_double_little;
+ floatformat_ieee_double[BFD_ENDIAN_BIG] = &floatformat_ieee_double_big;
+ floatformat_arm_ext[BFD_ENDIAN_LITTLE] = &floatformat_arm_ext_littlebyte_bigword;
+ floatformat_arm_ext[BFD_ENDIAN_BIG] = &floatformat_arm_ext_big;
+ floatformat_ia64_spill[BFD_ENDIAN_LITTLE] = &floatformat_ia64_spill_little;
+ floatformat_ia64_spill[BFD_ENDIAN_BIG] = &floatformat_ia64_spill_big;
+ floatformat_ieee_quad[BFD_ENDIAN_LITTLE] = &floatformat_ia64_quad_little;
+ floatformat_ieee_quad[BFD_ENDIAN_BIG] = &floatformat_ia64_quad_big;
+}
diff --git a/gdb/doublest.h b/gdb/doublest.h
index 668efa71cf3..8510baa310a 100644
--- a/gdb/doublest.h
+++ b/gdb/doublest.h
@@ -25,6 +25,7 @@
#define DOUBLEST_H
struct type;
+struct floatformat;
/* Setup definitions for host and target floating point formats. We need to
consider the format for `float', `double', and `long double' for both target
@@ -87,4 +88,11 @@ extern void convert_typed_floating (const void *from,
const struct type *from_type,
void *to, const struct type *to_type);
+/* Table of convenient float-formats. */
+extern const struct floatformat *floatformat_ieee_single[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ieee_double[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ieee_quad[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_arm_ext[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ia64_spill[BFD_ENDIAN_UNKNOWN];
+
#endif
diff --git a/gdb/dpx2-nat.c b/gdb/dpx2-nat.c
deleted file mode 100644
index 488c06a5383..00000000000
--- a/gdb/dpx2-nat.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* DPX2 host interface.
- Copyright 1988, 1989, 1991, 1993, 1995, 2000
- 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 "gdbcore.h"
-
-#include "gdb_string.h"
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/user.h>
-#include <sys/reg.h>
-#include <sys/utsname.h>
-
-
-/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
-/* symbols like 'A0' come from <sys/reg.h> */
-static int regmap[] =
-{
- R0, R1, R2, R3, R4, R5, R6, R7,
- A0, A1, A2, A3, A4, A5, A6, SP,
- PS, PC,
- FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7,
- FP_CR, FP_SR, FP_IAR
-};
-
-/* blockend is the value of u.u_ar0, and points to the
- * place where D0 is stored
- */
-
-int
-dpx2_register_u_addr (int blockend, int regnum)
-{
- if (regnum < FP0_REGNUM)
- return (blockend + 4 * regmap[regnum]);
- else
- return (int) &(((struct user *) 0)->u_fpstate[regmap[regnum]]);
-}
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values.
- Unfortunately this is not provided in the system header files.
- To make matters worse, this value also differs between
- the dpx/2200 and dpx/2300 models and nlist is not available on the dpx2.
- We use utsname() to decide on which model we are running.
- FIXME: This breaks cross examination of core files (it would not be hard
- to check whether u.u_ar0 is between 0x7fff5000 and 0x7fffc000 and if so
- use 0x7fff5000 and if not use 0x7fffc000. FIXME). */
-
-#define KERNEL_U_ADDR_200 0x7fff5000
-#define KERNEL_U_ADDR_300 0x7fffc000
-
-CORE_ADDR kernel_u_addr;
-
-void
-_initialize_dpx2_nat (void)
-{
- struct utsname uts;
-
- if (uname (&uts) == 0 && strcmp (uts.machine, "DPX/2200") == 0)
- kernel_u_addr = KERNEL_U_ADDR_200;
- else
- kernel_u_addr = KERNEL_U_ADDR_300;
-}
diff --git a/gdb/dsrec.c b/gdb/dsrec.c
index 142260002ff..2ca91fe5e21 100644
--- a/gdb/dsrec.c
+++ b/gdb/dsrec.c
@@ -1,5 +1,5 @@
/* S-record download support for GDB, the GNU debugger.
- Copyright 1995, 1996, 1997, 1999, 2000, 2001
+ Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -93,7 +93,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
{
int numbytes;
bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
- bfd_size_type size = bfd_get_section_size_before_reloc (s);
+ bfd_size_type size = bfd_get_section_size (s);
char *section_name = (char *) bfd_get_section_name (abfd, s);
/* Both GDB and BFD have mechanisms for printing addresses.
In the below, GDB's is used so that the address is
@@ -124,8 +124,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
do
{
serial_write (desc, srec, reclen);
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
}
while (waitack != NULL && !waitack ());
@@ -137,8 +138,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
}
} /* Per-packet (or S-record) loop */
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
putchar_unfiltered ('\n');
}
@@ -261,7 +263,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
if (sect && abfd)
{
payload_size = (*maxrecsize - (1 + 1 + 2 + addr_size * 2 + 2)) / 2;
- payload_size = min (payload_size, sect->_raw_size - sectoff);
+ payload_size = min (payload_size, bfd_get_section_size (sect) - sectoff);
bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
}
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 2c5153ebe20..95d0adf1466 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -1,8 +1,8 @@
/* Code dealing with dummy stack frames, for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -31,12 +31,7 @@
#include "frame-unwind.h"
#include "command.h"
#include "gdbcmd.h"
-
-static void dummy_frame_this_id (struct frame_info *next_frame,
- void **this_prologue_cache,
- struct frame_id *this_id);
-
-static int pc_in_dummy_frame (CORE_ADDR pc);
+#include "gdb_string.h"
/* Dummy frame. This saves the processor state just prior to setting
up the inferior function call. Older targets save the registers
@@ -45,180 +40,64 @@ static int pc_in_dummy_frame (CORE_ADDR pc);
struct dummy_frame
{
struct dummy_frame *next;
-
- /* These values belong to the caller (the previous frame, the frame
- that this unwinds back to). */
- CORE_ADDR pc;
- CORE_ADDR fp;
- CORE_ADDR sp;
- CORE_ADDR top;
+ /* This frame's ID. Must match the value returned by
+ gdbarch_unwind_dummy_id. */
struct frame_id id;
+ /* The caller's regcache. */
struct regcache *regcache;
-
- /* Address range of the call dummy code. Look for PC in the range
- [LO..HI) (after allowing for DECR_PC_AFTER_BREAK). */
- CORE_ADDR call_lo;
- CORE_ADDR call_hi;
};
static struct dummy_frame *dummy_frame_stack = NULL;
-/* Function: find_dummy_frame(pc, fp, sp)
-
- Search the stack of dummy frames for one matching the given PC and
- FP/SP. Unlike pc_in_dummy_frame(), this function doesn't need to
- adjust for DECR_PC_AFTER_BREAK. This is because it is only legal
- to call this function after the PC has been adjusted. */
+/* Function: deprecated_pc_in_call_dummy (pc)
-static struct dummy_frame *
-find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
-{
- struct dummy_frame *dummyframe;
+ Return non-zero if the PC falls in a dummy frame created by gdb for
+ an inferior call. The code below which allows DECR_PC_AFTER_BREAK
+ is for infrun.c, which may give the function a PC without that
+ subtracted out.
- for (dummyframe = dummy_frame_stack; dummyframe != NULL;
- dummyframe = dummyframe->next)
- {
- /* Does the PC fall within the dummy frame's breakpoint
- instruction. If not, discard this one. */
- if (!(pc >= dummyframe->call_lo && pc < dummyframe->call_hi))
- continue;
- /* Does the FP match? */
- if (dummyframe->top != 0)
- {
- /* If the target architecture explicitly saved the
- top-of-stack before the inferior function call, assume
- that that same architecture will always pass in an FP
- (frame base) value that eactly matches that saved TOS.
- Don't check the saved SP and SP as they can lead to false
- hits. */
- if (fp != dummyframe->top)
- continue;
- }
- else
- {
- /* An older target that hasn't explicitly or implicitly
- saved the dummy frame's top-of-stack. Try matching the
- FP against the saved SP and FP. NOTE: If you're trying
- to fix a problem with GDB not correctly finding a dummy
- frame, check the comments that go with FRAME_ALIGN() and
- UNWIND_DUMMY_ID(). */
- if (fp != dummyframe->fp && fp != dummyframe->sp)
- continue;
- }
- /* The FP matches this dummy frame. */
- return dummyframe;
- }
-
- return NULL;
-}
-
-struct regcache *
-deprecated_find_dummy_frame_regcache (CORE_ADDR pc, CORE_ADDR fp)
-{
- struct dummy_frame *dummy = find_dummy_frame (pc, fp);
- if (dummy != NULL)
- return dummy->regcache;
- else
- return NULL;
-}
-
-char *
-deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
-{
- struct regcache *regcache = deprecated_find_dummy_frame_regcache (pc, fp);
- if (regcache == NULL)
- return NULL;
- return deprecated_grub_regcache_for_registers (regcache);
-}
+ FIXME: cagney/2002-11-23: This is silly. Surely "infrun.c" can
+ figure out what the real PC (as in the resume address) is BEFORE
+ calling this function.
-/* Function: pc_in_call_dummy (pc, sp, fp)
+ NOTE: cagney/2004-08-02: I'm pretty sure that, with the introduction of
+ infrun.c:adjust_pc_after_break (thanks), this function is now
+ always called with a correctly adjusted PC!
- Return true if the PC falls in a dummy frame created by gdb for an
- inferior call. The code below which allows DECR_PC_AFTER_BREAK is
- for infrun.c, which may give the function a PC without that
- subtracted out. */
+ NOTE: cagney/2004-08-02: Code should not need to call this. */
int
-deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
-{
- return pc_in_dummy_frame (pc);
-}
-
-/* Return non-zero if the PC falls in a dummy frame.
-
- The code below which allows DECR_PC_AFTER_BREAK is for infrun.c,
- which may give the function a PC without that subtracted out.
-
- FIXME: cagney/2002-11-23: This is silly. Surely "infrun.c" can
- figure out what the real PC (as in the resume address) is BEFORE
- calling this function (Oh, and I'm not even sure that this function
- is called with an decremented PC, the call to pc_in_call_dummy() in
- that file is conditional on
- !DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET_P yet generic dummy
- targets set DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET. True?). */
-
-static int
-pc_in_dummy_frame (CORE_ADDR pc)
+deprecated_pc_in_call_dummy (CORE_ADDR pc)
{
struct dummy_frame *dummyframe;
for (dummyframe = dummy_frame_stack;
dummyframe != NULL;
dummyframe = dummyframe->next)
{
- if ((pc >= dummyframe->call_lo)
- && (pc < dummyframe->call_hi + DECR_PC_AFTER_BREAK))
+ if ((pc >= dummyframe->id.code_addr)
+ && (pc <= dummyframe->id.code_addr + DECR_PC_AFTER_BREAK))
return 1;
}
return 0;
}
-/* Function: read_register_dummy
- Find a saved register from before GDB calls a function in the inferior */
-
-CORE_ADDR
-deprecated_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
-{
- struct regcache *dummy_regs = deprecated_find_dummy_frame_regcache (pc, fp);
-
- if (dummy_regs)
- {
- /* NOTE: cagney/2002-08-12: Replaced a call to
- regcache_raw_read_as_address() with a call to
- regcache_cooked_read_unsigned(). The old, ...as_address
- function was eventually calling extract_unsigned_integer (nee
- extract_address) to unpack the registers value. The below is
- doing an unsigned extract so that it is functionally
- equivalent. The read needs to be cooked as, otherwise, it
- will never correctly return the value of a register in the
- [NUM_REGS .. NUM_REGS+NUM_PSEUDO_REGS) range. */
- ULONGEST val;
- regcache_cooked_read_unsigned (dummy_regs, regno, &val);
- return val;
- }
- else
- return 0;
-}
-
-/* Save all the registers on the dummy frame stack. Most ports save the
- registers on the target stack. This results in lots of unnecessary memory
- references, which are slow when debugging via a serial line. Instead, we
- save all the registers internally, and never write them to the stack. The
- registers get restored when the called function returns to the entry point,
- where a breakpoint is laying in wait. */
+/* Push the caller's state, along with the dummy frame info, onto a
+ dummy-frame stack. */
void
-generic_push_dummy_frame (void)
+dummy_frame_push (struct regcache *caller_regcache,
+ const struct frame_id *dummy_id)
{
struct dummy_frame *dummy_frame;
- CORE_ADDR fp = get_frame_base (get_current_frame ());
-
- /* check to see if there are stale dummy frames,
- perhaps left over from when a longjump took us out of a
- function that was called by the debugger */
+ /* Check to see if there are stale dummy frames, perhaps left over
+ from when a longjump took us out of a function that was called by
+ the debugger. */
dummy_frame = dummy_frame_stack;
while (dummy_frame)
- if (INNER_THAN (dummy_frame->fp, fp)) /* stale -- destroy! */
+ /* FIXME: cagney/2004-08-02: Should just test IDs. */
+ if (frame_id_inner (dummy_frame->id, (*dummy_id)))
+ /* Stale -- destroy! */
{
dummy_frame_stack = dummy_frame->next;
regcache_xfree (dummy_frame->regcache);
@@ -228,60 +107,58 @@ generic_push_dummy_frame (void)
else
dummy_frame = dummy_frame->next;
- dummy_frame = xmalloc (sizeof (struct dummy_frame));
- dummy_frame->regcache = regcache_xmalloc (current_gdbarch);
-
- dummy_frame->pc = read_pc ();
- dummy_frame->sp = read_sp ();
- dummy_frame->top = 0;
- dummy_frame->fp = fp;
- dummy_frame->id = get_frame_id (get_current_frame ());
- regcache_cpy (dummy_frame->regcache, current_regcache);
+ dummy_frame = XZALLOC (struct dummy_frame);
+ dummy_frame->regcache = caller_regcache;
+ dummy_frame->id = (*dummy_id);
dummy_frame->next = dummy_frame_stack;
dummy_frame_stack = dummy_frame;
}
-void
-generic_save_dummy_frame_tos (CORE_ADDR sp)
+/* Return the dummy frame cache, it contains both the ID, and a
+ pointer to the regcache. */
+struct dummy_frame_cache
{
- dummy_frame_stack->top = sp;
-}
-
-/* Record the upper/lower bounds on the address of the call dummy. */
-
-void
-generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi)
-{
- dummy_frame_stack->call_lo = lo;
- dummy_frame_stack->call_hi = hi;
-}
-
-/* Discard the innermost dummy frame from the dummy frame stack
- (passed in as a parameter). */
-
-static void
-discard_innermost_dummy (struct dummy_frame **stack)
-{
- struct dummy_frame *tbd = (*stack);
- (*stack) = (*stack)->next;
- regcache_xfree (tbd->regcache);
- xfree (tbd);
-}
+ struct frame_id this_id;
+ struct regcache *prev_regcache;
+};
-void
-deprecated_pop_dummy_frame (void)
+int
+dummy_frame_sniffer (const struct frame_unwind *self,
+ struct frame_info *next_frame,
+ void **this_prologue_cache)
{
- struct dummy_frame *dummy_frame = dummy_frame_stack;
-
- /* FIXME: what if the first frame isn't the right one, eg..
- because one call-by-hand function has done a longjmp into another one? */
-
- if (!dummy_frame)
- error ("Can't pop dummy frame!");
- regcache_cpy (current_regcache, dummy_frame->regcache);
- flush_cached_frames ();
+ struct dummy_frame *dummyframe;
+ struct frame_id this_id;
- discard_innermost_dummy (&dummy_frame_stack);
+ /* When unwinding a normal frame, the stack structure is determined
+ by analyzing the frame's function's code (be it using brute force
+ prologue analysis, or the dwarf2 CFI). In the case of a dummy
+ frame, that simply isn't possible. The PC is either the program
+ entry point, or some random address on the stack. Trying to use
+ that PC to apply standard frame ID unwind techniques is just
+ asking for trouble. */
+ /* 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
+ determine the dummy frame's ID. */
+ this_id = gdbarch_unwind_dummy_id (get_frame_arch (next_frame), next_frame);
+
+ /* Use that ID to find the corresponding cache entry. */
+ for (dummyframe = dummy_frame_stack;
+ dummyframe != NULL;
+ dummyframe = dummyframe->next)
+ {
+ if (frame_id_eq (dummyframe->id, this_id))
+ {
+ struct dummy_frame_cache *cache;
+ cache = FRAME_OBSTACK_ZALLOC (struct dummy_frame_cache);
+ cache->prev_regcache = dummyframe->regcache;
+ cache->this_id = this_id;
+ (*this_prologue_cache) = cache;
+ return 1;
+ }
+ }
+ return 0;
}
/* Given a call-dummy dummy-frame, return the registers. Here the
@@ -294,14 +171,9 @@ dummy_frame_prev_register (struct frame_info *next_frame,
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnum, void *bufferp)
{
- struct dummy_frame *dummy;
- struct frame_id id;
-
- /* Call the ID method which, if at all possible, will set the
- prologue cache. */
- dummy_frame_this_id (next_frame, this_prologue_cache, &id);
- dummy = (*this_prologue_cache);
- gdb_assert (dummy != NULL);
+ /* The dummy-frame sniffer always fills in the cache. */
+ struct dummy_frame_cache *cache = (*this_prologue_cache);
+ gdb_assert (cache != NULL);
/* Describe the register's location. Generic dummy frames always
have the register value in an ``expression''. */
@@ -317,7 +189,7 @@ dummy_frame_prev_register (struct frame_info *next_frame,
/* Use the regcache_cooked_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- regcache_cooked_read (dummy->regcache, regnum, bufferp);
+ regcache_cooked_read (cache->prev_regcache, regnum, bufferp);
}
}
@@ -332,78 +204,24 @@ dummy_frame_this_id (struct frame_info *next_frame,
void **this_prologue_cache,
struct frame_id *this_id)
{
- struct dummy_frame *dummy = (*this_prologue_cache);
- if (dummy != NULL)
- {
- (*this_id) = dummy->id;
- return;
- }
- /* When unwinding a normal frame, the stack structure is determined
- by analyzing the frame's function's code (be it using brute force
- prologue analysis, or the dwarf2 CFI). In the case of a dummy
- frame, that simply isn't possible. The The PC is either the
- program entry point, or some random address on the stack. Trying
- to use that PC to apply standard frame ID unwind techniques is
- just asking for trouble. */
- if (gdbarch_unwind_dummy_id_p (current_gdbarch))
- {
- /* 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
- determine the dummy frame's ID. */
- (*this_id) = gdbarch_unwind_dummy_id (current_gdbarch, next_frame);
- }
- else if (frame_relative_level (next_frame) < 0)
- {
- /* We're unwinding a sentinel frame, the PC of which is pointing
- at a stack dummy. Fake up the dummy frame's ID using the
- same sequence as is found a traditional unwinder. Once all
- architectures supply the unwind_dummy_id method, this code
- can go away. */
- (*this_id) = frame_id_build (deprecated_read_fp (), read_pc ());
- }
- else if (legacy_frame_p (current_gdbarch)
- && get_prev_frame (next_frame))
- {
- /* Things are looking seriously grim! Assume that the legacy
- get_prev_frame code has already created THIS frame and linked
- it in to the frame chain (a pretty bold assumption), extract
- the ID from THIS base / pc. */
- (*this_id) = frame_id_build (get_frame_base (get_prev_frame (next_frame)),
- get_frame_pc (get_prev_frame (next_frame)));
- }
- else
- {
- /* Ouch! We're not trying to find the innermost frame's ID yet
- we're trying to unwind to a dummy. The architecture must
- provide the unwind_dummy_id() method. Abandon the unwind
- process but only after first warning the user. */
- internal_warning (__FILE__, __LINE__,
- "Missing unwind_dummy_id architecture method");
- (*this_id) = null_frame_id;
- return;
- }
- (*this_prologue_cache) = find_dummy_frame ((*this_id).code_addr,
- (*this_id).stack_addr);
+ /* The dummy-frame sniffer always fills in the cache. */
+ struct dummy_frame_cache *cache = (*this_prologue_cache);
+ gdb_assert (cache != NULL);
+ (*this_id) = cache->this_id;
}
-static struct frame_unwind dummy_frame_unwind =
+static const struct frame_unwind dummy_frame_unwinder =
{
DUMMY_FRAME,
dummy_frame_this_id,
- dummy_frame_prev_register
+ dummy_frame_prev_register,
+ NULL,
+ dummy_frame_sniffer,
};
-const struct frame_unwind *
-dummy_frame_sniffer (struct frame_info *next_frame)
-{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
- if (pc_in_dummy_frame (pc))
- return &dummy_frame_unwind;
- else
- return NULL;
-}
+const struct frame_unwind *const dummy_frame_unwind = {
+ &dummy_frame_unwinder
+};
static void
fprint_dummy_frames (struct ui_file *file)
@@ -413,14 +231,8 @@ fprint_dummy_frames (struct ui_file *file)
{
gdb_print_host_address (s, file);
fprintf_unfiltered (file, ":");
- fprintf_unfiltered (file, " pc=0x%s", paddr (s->pc));
- fprintf_unfiltered (file, " fp=0x%s", paddr (s->fp));
- fprintf_unfiltered (file, " sp=0x%s", paddr (s->sp));
- fprintf_unfiltered (file, " top=0x%s", paddr (s->top));
fprintf_unfiltered (file, " id=");
fprint_frame_id (file, s->id);
- fprintf_unfiltered (file, " call_lo=0x%s", paddr (s->call_lo));
- fprintf_unfiltered (file, " call_hi=0x%s", paddr (s->call_hi));
fprintf_unfiltered (file, "\n");
}
}
diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h
index 6d565d1091a..7ce7973f0a2 100644
--- a/gdb/dummy-frame.h
+++ b/gdb/dummy-frame.h
@@ -1,6 +1,6 @@
/* Code dealing with dummy stack frames, for GDB, the GNU debugger.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,35 +27,25 @@ struct regcache;
struct frame_unwind;
struct frame_id;
-/* GENERIC DUMMY FRAMES
-
- The following code serves to maintain the dummy stack frames for
- inferior function calls (ie. when gdb calls into the inferior via
- call_function_by_hand). This code saves the machine state before
- the call in host memory, so we must maintain an independent stack
- and keep it consistant etc. I am attempting to make this code
- generic enough to be used by many targets.
-
- The cheapest and most generic way to do CALL_DUMMY on a new target
- is probably to define CALL_DUMMY to be empty,
- DEPRECATED_CALL_DUMMY_LENGTH to zero, and CALL_DUMMY_LOCATION to
- AT_ENTRY. Then you must remember to define PUSH_RETURN_ADDRESS,
- because no call instruction will be being executed by the target.
- Also DEPRECATED_FRAME_CHAIN_VALID as
- generic_{file,func}_frame_chain_valid and do not set
- DEPRECATED_FIX_CALL_DUMMY. */
+/* Push the information needed to identify, and unwind from, a dummy
+ frame onto the dummy frame stack. */
+
+/* NOTE: cagney/2004-08-02: This interface will eventually need to be
+ parameterized with the caller's thread - that will allow per-thread
+ dummy-frame stacks and, hence, per-thread inferior function
+ calls. */
+
+/* NOTE: cagney/2004-08-02: In the case of ABIs using push_dummy_code
+ containing more than one instruction, this interface many need to
+ be expanded so that it knowns the lower/upper extent of the dummy
+ frame's code. */
+
+extern void dummy_frame_push (struct regcache *regcache,
+ const struct frame_id *dummy_id);
/* If the PC falls in a dummy frame, return a dummy frame
unwinder. */
-extern const struct frame_unwind *dummy_frame_sniffer (struct frame_info *next_frame);
-
-/* Return the regcache that belongs to the dummy-frame identifed by PC
- and FP, or NULL if no such frame exists. */
-/* FIXME: cagney/2002-11-08: The function only exists because of
- deprecated_generic_get_saved_register. Eliminate that function and
- this, to, can go. */
+extern const struct frame_unwind *const dummy_frame_unwind;
-extern struct regcache *deprecated_find_dummy_frame_regcache (CORE_ADDR pc,
- CORE_ADDR fp);
#endif /* !defined (DUMMY_FRAME_H) */
diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c
index fe2fcedce65..a7cfb22547c 100644
--- a/gdb/dve3900-rom.c
+++ b/gdb/dve3900-rom.c
@@ -472,8 +472,8 @@ fetch_bitmapped_register (int regno, struct bit_field *bf)
/* supply register stores in target byte order, so swap here */
- store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
- supply_register (regno, regbuf);
+ store_unsigned_integer (regbuf, register_size (current_gdbarch, regno), val);
+ regcache_raw_supply (current_regcache, regno, regbuf);
}
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 13c836e7dc4..005592c1994 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -372,11 +372,17 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
{
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);
+ if (old_rs == NULL)
+ {
+ complaint (&symfile_complaints, "\
+bad CFI data; mismatched DW_CFA_restore_state at 0x%s", paddr (fs->pc));
+ }
+ else
+ {
+ xfree (fs->regs.reg);
+ fs->regs = *old_rs;
+ xfree (old_rs);
+ }
}
break;
@@ -420,7 +426,7 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
case DW_CFA_offset_extended_sf:
insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
- offset += fs->data_align;
+ offset *= fs->data_align;
dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset;
@@ -884,9 +890,6 @@ struct comp_unit
/* 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;
@@ -1082,6 +1085,14 @@ read_encoded_value (struct comp_unit *unit, unsigned char encoding,
case DW_EH_PE_textrel:
base = unit->tbase;
break;
+ case DW_EH_PE_funcrel:
+ /* FIXME: kettenis/20040501: For now just pretend
+ DW_EH_PE_funcrel is equivalent to DW_EH_PE_absptr. For
+ reading the initial location of an FDE it should be treated
+ as such, and currently that's the only place where this code
+ is used. */
+ base = 0;
+ break;
case DW_EH_PE_aligned:
base = 0;
offset = buf - unit->dwarf_frame_buffer;
@@ -1254,6 +1265,7 @@ decode_frame_entry_1 (struct comp_unit *unit, char *start, int eh_frame_p)
/* This is a CIE. */
struct dwarf2_cie *cie;
char *augmentation;
+ unsigned int cie_version;
/* Record the offset into the .debug_frame section of this CIE. */
cie_pointer = start - unit->dwarf_frame_buffer;
@@ -1269,12 +1281,12 @@ decode_frame_entry_1 (struct comp_unit *unit, char *start, int eh_frame_p)
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);
+ depends on the target address size. */
+ cie->encoding = DW_EH_PE_absptr;
/* Check version number. */
- if (read_1_byte (unit->abfd, buf) != DW_CIE_VERSION)
+ cie_version = read_1_byte (unit->abfd, buf);
+ if (cie_version != 1 && cie_version != 3)
return NULL;
buf += 1;
@@ -1300,8 +1312,15 @@ decode_frame_entry_1 (struct comp_unit *unit, char *start, int eh_frame_p)
read_signed_leb128 (unit->abfd, buf, &bytes_read);
buf += bytes_read;
- cie->return_address_register = read_1_byte (unit->abfd, buf);
- buf += 1;
+ if (cie_version == 1)
+ {
+ cie->return_address_register = read_1_byte (unit->abfd, buf);
+ bytes_read = 1;
+ }
+ else
+ cie->return_address_register = read_unsigned_leb128 (unit->abfd, buf,
+ &bytes_read);
+ buf += bytes_read;
cie->saw_z_augmentation = (*augmentation == 'z');
if (cie->saw_z_augmentation)
@@ -1534,7 +1553,6 @@ dwarf2_build_frame_info (struct objfile *objfile)
/* 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;
unit.tbase = 0;
@@ -1548,8 +1566,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
dwarf_eh_frame_section);
- unit.dwarf_frame_size
- = bfd_get_section_size_before_reloc (dwarf_eh_frame_section);
+ unit.dwarf_frame_size = bfd_get_section_size (dwarf_eh_frame_section);
unit.dwarf_frame_section = dwarf_eh_frame_section;
/* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
@@ -1576,8 +1593,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
unit.cie = NULL;
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
dwarf_frame_section);
- unit.dwarf_frame_size
- = bfd_get_section_size_before_reloc (dwarf_frame_section);
+ unit.dwarf_frame_size = bfd_get_section_size (dwarf_frame_section);
unit.dwarf_frame_section = dwarf_frame_section;
frame_ptr = unit.dwarf_frame_buffer;
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 50baced5f2e..a60e5a90e86 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -42,6 +42,8 @@ new_dwarf_expr_context (void)
retval->stack_len = 0;
retval->stack_allocated = 10;
retval->stack = xmalloc (retval->stack_allocated * sizeof (CORE_ADDR));
+ retval->num_pieces = 0;
+ retval->pieces = 0;
return retval;
}
@@ -51,6 +53,7 @@ void
free_dwarf_expr_context (struct dwarf_expr_context *ctx)
{
xfree (ctx->stack);
+ xfree (ctx->pieces);
xfree (ctx);
}
@@ -100,6 +103,29 @@ dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
}
+/* Add a new piece to CTX's piece list. */
+static void
+add_piece (struct dwarf_expr_context *ctx,
+ int in_reg, CORE_ADDR value, ULONGEST size)
+{
+ struct dwarf_expr_piece *p;
+
+ ctx->num_pieces++;
+
+ if (ctx->pieces)
+ ctx->pieces = xrealloc (ctx->pieces,
+ (ctx->num_pieces
+ * sizeof (struct dwarf_expr_piece)));
+ else
+ ctx->pieces = xmalloc (ctx->num_pieces
+ * sizeof (struct dwarf_expr_piece));
+
+ p = &ctx->pieces[ctx->num_pieces - 1];
+ p->in_reg = in_reg;
+ p->value = value;
+ p->size = size;
+}
+
/* Evaluate the expression at ADDR (LEN bytes long) using the context
CTX. */
@@ -575,6 +601,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr,
break;
case DW_OP_div:
binop = BINOP_DIV;
+ break;
case DW_OP_minus:
binop = BINOP_SUB;
break;
@@ -595,6 +622,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr,
break;
case DW_OP_shr:
binop = BINOP_RSH;
+ break;
case DW_OP_shra:
binop = BINOP_RSH;
val1 = value_from_longest (signed_address_type (), first);
@@ -659,6 +687,22 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr,
case DW_OP_nop:
goto no_push;
+ case DW_OP_piece:
+ {
+ ULONGEST size;
+ CORE_ADDR addr_or_regnum;
+
+ /* Record the piece. */
+ op_ptr = read_uleb128 (op_ptr, op_end, &size);
+ addr_or_regnum = dwarf_expr_fetch (ctx, 0);
+ add_piece (ctx, ctx->in_reg, addr_or_regnum, size);
+
+ /* Pop off the address/regnum, and clear the in_reg flag. */
+ dwarf_expr_pop (ctx);
+ ctx->in_reg = 0;
+ }
+ goto no_push;
+
default:
error ("Unhandled dwarf expression opcode 0x%x", op);
}
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index 0a60edb8237..f22d085273d 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -74,6 +74,49 @@ struct dwarf_expr_context
/* Non-zero if the result is in a register. The register number
will be on the expression stack. */
int in_reg;
+
+ /* An array of pieces. PIECES points to its first element;
+ NUM_PIECES is its length.
+
+ Each time DW_OP_piece is executed, we add a new element to the
+ end of this array, recording the current top of the stack, the
+ current in_reg flag, and the size given as the operand to
+ DW_OP_piece. We then pop the top value from the stack, clear the
+ in_reg flag, and resume evaluation.
+
+ The Dwarf spec doesn't say whether DW_OP_piece pops the top value
+ from the stack. We do, ensuring that clients of this interface
+ expecting to see a value left on the top of the stack (say, code
+ evaluating frame base expressions or CFA's specified with
+ DW_CFA_def_cfa_expression) will get an error if the expression
+ actually marks all the values it computes as pieces.
+
+ If an expression never uses DW_OP_piece, num_pieces will be zero.
+ (It would be nice to present these cases as expressions yielding
+ a single piece, with in_reg clear, so that callers need not
+ distinguish between the no-DW_OP_piece and one-DW_OP_piece cases.
+ But expressions with no DW_OP_piece operations have no value to
+ place in a piece's 'size' field; the size comes from the
+ surrounding data. So the two cases need to be handled
+ separately.) */
+ int num_pieces;
+ struct dwarf_expr_piece *pieces;
+};
+
+
+/* A piece of an object, as recorded by DW_OP_piece. */
+struct dwarf_expr_piece
+{
+ /* If IN_REG is zero, then the piece is in memory, and VALUE is its address.
+ If IN_REG is non-zero, then the piece is in a register, and VALUE
+ is the register number. */
+ int in_reg;
+
+ /* This piece's address or register number. */
+ CORE_ADDR value;
+
+ /* The length of the piece, in bytes. */
+ ULONGEST size;
};
struct dwarf_expr_context *new_dwarf_expr_context (void);
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index ef333f7e770..c281642ced8 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -53,11 +53,14 @@ static char *
find_location_expression (struct dwarf2_loclist_baton *baton,
size_t *locexpr_length, CORE_ADDR pc)
{
- CORE_ADDR base_address = baton->base_address;
CORE_ADDR low, high;
char *loc_ptr, *buf_end;
unsigned int addr_size = TARGET_ADDR_BIT / TARGET_CHAR_BIT, length;
CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
+ /* Adjust base_address for relocatable objects. */
+ CORE_ADDR base_offset = ANOFFSET (baton->objfile->section_offsets,
+ SECT_OFF_TEXT (baton->objfile));
+ CORE_ADDR base_address = baton->base_address + base_offset;
loc_ptr = baton->data;
buf_end = baton->data + baton->size;
@@ -202,7 +205,7 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
unsigned char *data, unsigned short size,
struct objfile *objfile)
{
- CORE_ADDR result;
+ struct gdbarch *arch = get_frame_arch (frame);
struct value *retval;
struct dwarf_expr_baton baton;
struct dwarf_expr_context *ctx;
@@ -225,21 +228,30 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
ctx->get_tls_address = dwarf_expr_tls_address;
dwarf_expr_eval (ctx, data, size);
- result = dwarf_expr_fetch (ctx, 0);
-
- if (ctx->in_reg)
+ if (ctx->num_pieces > 0)
+ {
+ /* We haven't implemented splicing together pieces from
+ arbitrary sources yet. */
+ error ("The value of variable '%s' is distributed across several\n"
+ "locations, and GDB cannot access its value.\n",
+ SYMBOL_NATURAL_NAME (var));
+ }
+ else if (ctx->in_reg)
{
- int regnum = DWARF2_REG_TO_REGNUM (result);
- retval = value_from_register (SYMBOL_TYPE (var), regnum, frame);
+ CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0);
+ int gdb_regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum);
+ retval = value_from_register (SYMBOL_TYPE (var), gdb_regnum, frame);
}
else
{
+ CORE_ADDR address = dwarf_expr_fetch (ctx, 0);
+
retval = allocate_value (SYMBOL_TYPE (var));
VALUE_BFD_SECTION (retval) = SYMBOL_BFD_SECTION (var);
VALUE_LVAL (retval) = lval_memory;
VALUE_LAZY (retval) = 1;
- VALUE_ADDRESS (retval) = result;
+ VALUE_ADDRESS (retval) = address;
}
free_dwarf_expr_context (ctx);
@@ -319,6 +331,17 @@ dwarf2_loc_desc_needs_frame (unsigned char *data, unsigned short size)
in_reg = ctx->in_reg;
+ if (ctx->num_pieces > 0)
+ {
+ int i;
+
+ /* If the location has several pieces, and any of them are in
+ registers, then we will need a frame to fetch them from. */
+ for (i = 0; i < ctx->num_pieces; i++)
+ if (ctx->pieces[i].in_reg)
+ in_reg = 1;
+ }
+
free_dwarf_expr_context (ctx);
return baton.needs_frame || in_reg;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0d51c13fb70..e8d696923d8 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -44,10 +44,10 @@
#include "dwarf2expr.h"
#include "dwarf2loc.h"
#include "cp-support.h"
-#include "splay-tree.h"
#include "hashtab.h"
#include "command.h"
#include "gdbcmd.h"
+#include "splay-tree.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -282,6 +282,8 @@ struct dwarf2_cu
enum language language;
const struct language_defn *language_defn;
+ const char *producer;
+
/* The generic symbol table building routines have separate lists for
file scope symbols and all all other scopes (local scopes). So
we need to select the right one to pass to add_symbol_to_list().
@@ -410,6 +412,7 @@ struct line_header
unsigned int dir_index;
unsigned int mod_time;
unsigned int length;
+ int included_p; /* Non-zero if referenced by the Line Number Program. */
} *file_names;
/* The start and end of the statement program following this
@@ -437,6 +440,7 @@ struct partial_die_info
unsigned int is_declaration : 1;
unsigned int has_type : 1;
unsigned int has_specification : 1;
+ unsigned int has_stmt_list : 1;
unsigned int has_pc_info : 1;
/* Flag set if the SCOPE field of this structure has been
@@ -447,6 +451,7 @@ struct partial_die_info
sometimes DW_TAG_MIPS_linkage_name or a string computed in some
other fashion. */
char *name;
+ char *dirname;
/* The scope to prepend to our children. This is generally
allocated on the comp_unit_obstack, so will disappear
@@ -469,6 +474,9 @@ struct partial_die_info
DW_AT_extension). */
unsigned int spec_offset;
+ /* If HAS_STMT_LIST, the offset of the Line Number Information data. */
+ unsigned int line_offset;
+
/* Pointers to this DIE's parent, first child, and next sibling,
if any. */
struct partial_die_info *die_parent, *die_child, *die_sibling;
@@ -705,6 +713,13 @@ static void dwarf2_locate_sections (bfd *, asection *, void *);
static void dwarf2_build_psymtabs_easy (struct objfile *, int);
#endif
+static void dwarf2_create_include_psymtab (char *, struct partial_symtab *,
+ struct objfile *);
+
+static void dwarf2_build_include_psymtabs (struct dwarf2_cu *,
+ struct partial_die_info *,
+ struct partial_symtab *);
+
static void dwarf2_build_psymtabs_hard (struct objfile *, int);
static void scan_partial_symbols (struct partial_die_info *,
@@ -808,6 +823,9 @@ static struct attribute *dwarf2_attr_with_cu (struct die_info *,
struct dwarf2_cu *,
struct dwarf2_cu **);
+static int dwarf2_flag_true_p (struct die_info *die, unsigned name,
+ struct dwarf2_cu *cu);
+
static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu);
static struct die_info *die_specification (struct die_info *die,
@@ -816,12 +834,15 @@ static struct die_info *die_specification (struct die_info *die,
static void free_line_header (struct line_header *lh);
+static void add_file_name (struct line_header *, char *, unsigned int,
+ unsigned int, unsigned int);
+
static struct line_header *(dwarf_decode_line_header
(unsigned int offset,
bfd *abfd, struct dwarf2_cu *cu));
static void dwarf_decode_lines (struct line_header *, char *, bfd *,
- struct dwarf2_cu *);
+ struct dwarf2_cu *, struct partial_symtab *);
static void dwarf2_start_subfile (char *, char *);
@@ -907,6 +928,9 @@ static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *);
static void read_array_type (struct die_info *, struct dwarf2_cu *);
+static enum dwarf_array_dim_ordering read_array_order (struct die_info *,
+ struct dwarf2_cu *);
+
static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *);
static void read_tag_ptr_to_member_type (struct die_info *,
@@ -1012,6 +1036,16 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
static char *skip_one_die (char *info_ptr, struct abbrev_info *abbrev,
struct dwarf2_cu *cu);
+static void free_stack_comp_unit (void *);
+
+static void *hashtab_obstack_allocate (void *data, size_t size, size_t count);
+
+static void dummy_obstack_deallocate (void *object, void *data);
+
+static hashval_t partial_die_hash (const void *item);
+
+static int partial_die_eq (const void *item_lhs, const void *item_rhs);
+
static struct dwarf2_per_cu_data *dwarf2_find_containing_comp_unit
(unsigned long offset, struct objfile *objfile);
@@ -1023,8 +1057,6 @@ static struct partial_symtab *dwarf2_find_comp_unit_psymtab
static void free_one_comp_unit (void *);
-static void free_stack_comp_unit (void *);
-
static void free_cached_comp_units (void *);
static void age_cached_comp_units (void *);
@@ -1052,14 +1084,6 @@ static void dwarf2_mark (struct dwarf2_cu *);
static void dwarf2_clear_marks (struct dwarf2_per_cu_data *);
-static void *hashtab_obstack_allocate (void *data, size_t size, size_t count);
-
-static void dummy_obstack_deallocate (void *object, void *data);
-
-static hashval_t partial_die_hash (const void *item);
-
-static int partial_die_eq (const void *item_lhs, const void *item_rhs);
-
/* Allocation function for the libiberty splay tree which uses an obstack. */
static void *
splay_tree_obstack_allocate (int size, void *data)
@@ -1104,47 +1128,47 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
if (strcmp (sectp->name, INFO_SECTION) == 0)
{
- dwarf2_per_objfile->info_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->info_size = bfd_get_section_size (sectp);
dwarf_info_section = sectp;
}
else if (strcmp (sectp->name, ABBREV_SECTION) == 0)
{
- dwarf2_per_objfile->abbrev_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->abbrev_size = bfd_get_section_size (sectp);
dwarf_abbrev_section = sectp;
}
else if (strcmp (sectp->name, LINE_SECTION) == 0)
{
- dwarf2_per_objfile->line_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->line_size = bfd_get_section_size (sectp);
dwarf_line_section = sectp;
}
else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0)
{
- dwarf2_per_objfile->pubnames_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->pubnames_size = bfd_get_section_size (sectp);
dwarf_pubnames_section = sectp;
}
else if (strcmp (sectp->name, ARANGES_SECTION) == 0)
{
- dwarf2_per_objfile->aranges_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->aranges_size = bfd_get_section_size (sectp);
dwarf_aranges_section = sectp;
}
else if (strcmp (sectp->name, LOC_SECTION) == 0)
{
- dwarf2_per_objfile->loc_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->loc_size = bfd_get_section_size (sectp);
dwarf_loc_section = sectp;
}
else if (strcmp (sectp->name, MACINFO_SECTION) == 0)
{
- dwarf2_per_objfile->macinfo_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->macinfo_size = bfd_get_section_size (sectp);
dwarf_macinfo_section = sectp;
}
else if (strcmp (sectp->name, STR_SECTION) == 0)
{
- dwarf2_per_objfile->str_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->str_size = bfd_get_section_size (sectp);
dwarf_str_section = sectp;
}
else if (strcmp (sectp->name, FRAME_SECTION) == 0)
{
- dwarf2_per_objfile->frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->frame_size = bfd_get_section_size (sectp);
dwarf_frame_section = sectp;
}
else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0)
@@ -1152,13 +1176,13 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
if (aflag & SEC_HAS_CONTENTS)
{
- dwarf2_per_objfile->eh_frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->eh_frame_size = bfd_get_section_size (sectp);
dwarf_eh_frame_section = sectp;
}
}
else if (strcmp (sectp->name, RANGES_SECTION) == 0)
{
- dwarf2_per_objfile->ranges_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf2_per_objfile->ranges_size = bfd_get_section_size (sectp);
dwarf_ranges_section = sectp;
}
}
@@ -1318,6 +1342,68 @@ partial_read_comp_unit_head (struct comp_unit_head *header, char *info_ptr,
return info_ptr;
}
+/* Allocate a new partial symtab for file named NAME and mark this new
+ partial symtab as being an include of PST. */
+
+static void
+dwarf2_create_include_psymtab (char *name, struct partial_symtab *pst,
+ struct objfile *objfile)
+{
+ struct partial_symtab *subpst = allocate_psymtab (name, objfile);
+
+ subpst->section_offsets = pst->section_offsets;
+ subpst->textlow = 0;
+ subpst->texthigh = 0;
+
+ subpst->dependencies = (struct partial_symtab **)
+ obstack_alloc (&objfile->objfile_obstack,
+ sizeof (struct partial_symtab *));
+ subpst->dependencies[0] = pst;
+ subpst->number_of_dependencies = 1;
+
+ subpst->globals_offset = 0;
+ subpst->n_global_syms = 0;
+ subpst->statics_offset = 0;
+ subpst->n_static_syms = 0;
+ subpst->symtab = NULL;
+ subpst->read_symtab = pst->read_symtab;
+ subpst->readin = 0;
+
+ /* No private part is necessary for include psymtabs. This property
+ can be used to differentiate between such include psymtabs and
+ the regular ones. If it ever happens that a regular psymtab can
+ legitimally have a NULL private part, then we'll have to add a
+ dedicated field for that in the dwarf2_pinfo structure. */
+ subpst->read_symtab_private = NULL;
+}
+
+/* Read the Line Number Program data and extract the list of files
+ included by the source file represented by PST. Build an include
+ partial symtab for each of these included files.
+
+ This procedure assumes that there *is* a Line Number Program in
+ the given CU. Callers should check that PDI->HAS_STMT_LIST is set
+ before calling this procedure. */
+
+static void
+dwarf2_build_include_psymtabs (struct dwarf2_cu *cu,
+ struct partial_die_info *pdi,
+ struct partial_symtab *pst)
+{
+ struct objfile *objfile = cu->objfile;
+ bfd *abfd = objfile->obfd;
+ struct line_header *lh;
+
+ lh = dwarf_decode_line_header (pdi->line_offset, abfd, cu);
+ if (lh == NULL)
+ return; /* No linetable, so no includes. */
+
+ dwarf_decode_lines (lh, NULL, abfd, cu, pst);
+
+ free_line_header (lh);
+}
+
+
/* Build the partial symbol table by doing a quick pass through the
.debug_info and .debug_abbrev sections. */
@@ -1342,7 +1428,7 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
/* Since the objects we're extracting from .debug_info vary in
length, only the individual functions to extract them (like
- read_comp_unit_head and read_partial_die) can really know whether
+ read_comp_unit_head and load_partial_die) can really know whether
the buffer is large enough to hold another complete object.
At the moment, they don't actually check that. If .debug_info
@@ -1406,6 +1492,9 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
objfile->global_psymbols.next,
objfile->static_psymbols.next);
+ if (comp_unit_die.dirname)
+ pst->dirname = xstrdup (comp_unit_die.dirname);
+
pst->read_symtab_private = (char *)
obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo));
DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf2_per_objfile->info_buffer;
@@ -1481,6 +1570,13 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
also happen.) This happens in VxWorks. */
free_named_symtabs (pst->filename);
+ if (comp_unit_die.has_stmt_list)
+ {
+ /* Get the list of files included in the current compilation unit,
+ and build a psymtab for each of them. */
+ dwarf2_build_include_psymtabs (&cu, &comp_unit_die, pst);
+ }
+
info_ptr = beg_of_comp_unit + cu.header.length
+ cu.header.initial_length_size;
@@ -2029,7 +2125,8 @@ guess_structure_name (struct partial_die_info *struct_pdi,
if (child_pdi->tag == DW_TAG_subprogram)
{
char *actual_class_name
- = class_name_from_physname (child_pdi->name);
+ = language_class_name_from_physname (cu->language_defn,
+ child_pdi->name);
if (actual_class_name != NULL)
{
struct_pdi->name
@@ -2371,7 +2468,35 @@ dwarf2_release_queue (void *dummy)
static void
psymtab_to_symtab_1 (struct partial_symtab *pst)
{
- struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
+ struct cleanup *back_to;
+ int i;
+
+ for (i = 0; i < pst->number_of_dependencies; i++)
+ if (!pst->dependencies[i]->readin)
+ {
+ /* Inform about additional files that need to be read in. */
+ if (info_verbose)
+ {
+ fputs_filtered (" ", gdb_stdout);
+ wrap_here ("");
+ fputs_filtered ("and ", gdb_stdout);
+ wrap_here ("");
+ printf_filtered ("%s...", pst->dependencies[i]->filename);
+ wrap_here (""); /* Flush output */
+ gdb_flush (gdb_stdout);
+ }
+ psymtab_to_symtab_1 (pst->dependencies[i]);
+ }
+
+ if (pst->read_symtab_private == NULL)
+ {
+ /* It's an include file, no symbols to read for it.
+ Everything is in the parent symtab. */
+ pst->readin = 1;
+ return;
+ }
+
+ back_to = make_cleanup (null_cleanup, NULL);
if (dwarf2_per_objfile->all_comp_units == NULL)
{
@@ -2415,6 +2540,7 @@ load_full_comp_unit (struct partial_symtab *pst,
char *info_ptr;
struct cleanup *back_to, *free_cu_cleanup;
struct attribute *attr;
+ CORE_ADDR baseaddr;
dwarf2_per_objfile = objfile_data (pst->objfile, dwarf2_objfile_data_key);
@@ -2689,13 +2815,16 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
}
}
- if (objfile->ei.entry_point >= lowpc &&
- objfile->ei.entry_point < highpc)
+ attr = dwarf2_attr (die, DW_AT_language, cu);
+ if (attr)
{
- objfile->ei.deprecated_entry_file_lowpc = lowpc;
- objfile->ei.deprecated_entry_file_highpc = highpc;
+ set_cu_language (DW_UNSND (attr), cu);
}
+ attr = dwarf2_attr (die, DW_AT_producer, cu);
+ if (attr)
+ cu->producer = DW_STRING (attr);
+
/* We assume that we're processing GCC output. */
processing_gcc_compilation = 2;
#if 0
@@ -2736,7 +2865,7 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
{
make_cleanup ((make_cleanup_ftype *) free_line_header,
(void *) line_header);
- dwarf_decode_lines (line_header, comp_dir, abfd, cu);
+ dwarf_decode_lines (line_header, comp_dir, abfd, cu, NULL);
}
}
@@ -2840,13 +2969,6 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
/* Record the function range for dwarf_decode_lines. */
add_to_cu_func_list (name, lowpc, highpc, cu);
- if (objfile->ei.entry_point >= lowpc &&
- objfile->ei.entry_point < highpc)
- {
- objfile->ei.entry_func_lowpc = lowpc;
- objfile->ei.entry_func_highpc = highpc;
- }
-
new = push_context (0, lowpc);
new->name = new_symbol (die, die->type, cu);
@@ -3599,6 +3721,23 @@ dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type,
TYPE_NFN_FIELDS_TOTAL (type) = total_length;
}
+
+/* Returns non-zero if NAME is the name of a vtable member in CU's
+ language, zero otherwise. */
+static int
+is_vtable_name (const char *name, struct dwarf2_cu *cu)
+{
+ static const char vptr[] = "_vptr";
+
+ /* C++ and some implementations of Java use this name. */
+ if (strncmp (name, vptr, sizeof (vptr) - 1) == 0
+ && is_cplus_marker (name[sizeof (vptr) - 1]))
+ return 1;
+
+ return 0;
+}
+
+
/* Called when we find the DIE that starts a structure or union scope
(definition) to process all dies that define the members of the
structure or union.
@@ -3678,6 +3817,9 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
TYPE_LENGTH (type) = 0;
}
+ if (die_is_declaration (die, cu))
+ TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
+
/* We need to add the type field to the die immediately so we don't
infinitely recurse when dealing with pointers to the structure
type within the structure itself. */
@@ -3740,8 +3882,6 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
TYPE_VPTR_BASETYPE (type) = t;
if (type == t)
{
- static const char vptr_name[] =
- {'_', 'v', 'p', 't', 'r', '\0'};
int i;
/* Our own class provides vtbl ptr. */
@@ -3751,10 +3891,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
{
char *fieldname = TYPE_FIELD_NAME (t, i);
- if ((strncmp (fieldname, vptr_name,
- strlen (vptr_name) - 1)
- == 0)
- && is_cplus_marker (fieldname[strlen (vptr_name)]))
+ if (is_vtable_name (fieldname, cu))
{
TYPE_VPTR_FIELDNO (type) = i;
break;
@@ -3777,11 +3914,6 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
do_cleanups (back_to);
}
- else
- {
- /* No children, must be stub. */
- TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
- }
processing_current_prefix = previous_prefix;
if (back_to != NULL)
@@ -3910,7 +4042,9 @@ determine_class_name (struct die_info *die, struct dwarf2_cu *cu)
{
if (child->tag == DW_TAG_subprogram)
{
- new_prefix = class_name_from_physname (dwarf2_linkage_name
+ new_prefix
+ = language_class_name_from_physname (cu->language_defn,
+ dwarf2_linkage_name
(child, cu));
if (new_prefix != NULL)
@@ -4069,9 +4203,20 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
/* Dwarf2 dimensions are output from left to right, create the
necessary array types in backwards order. */
+
type = element_type;
- while (ndim-- > 0)
- type = create_array_type (NULL, type, range_types[ndim]);
+
+ if (read_array_order (die, cu) == DW_ORD_col_major)
+ {
+ int i = 0;
+ while (i < ndim)
+ type = create_array_type (NULL, type, range_types[i++]);
+ }
+ else
+ {
+ while (ndim-- > 0)
+ type = create_array_type (NULL, type, range_types[ndim]);
+ }
/* Understand Dwarf2 support for vector types (like they occur on
the PowerPC w/ AltiVec). Gcc just adds another attribute to the
@@ -4089,6 +4234,41 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
set_die_type (die, type, cu);
}
+static enum dwarf_array_dim_ordering
+read_array_order (struct die_info *die, struct dwarf2_cu *cu)
+{
+ struct attribute *attr;
+
+ attr = dwarf2_attr (die, DW_AT_ordering, cu);
+
+ if (attr) return DW_SND (attr);
+
+ /*
+ GNU F77 is a special case, as at 08/2004 array type info is the
+ opposite order to the dwarf2 specification, but data is still
+ laid out as per normal fortran.
+
+ FIXME: dsl/2004-8-20: If G77 is ever fixed, this will also need
+ version checking.
+ */
+
+ if (cu->language == language_fortran &&
+ cu->producer && strstr (cu->producer, "GNU F77"))
+ {
+ return DW_ORD_row_major;
+ }
+
+ switch (cu->language_defn->la_array_ordering)
+ {
+ case array_column_major:
+ return DW_ORD_col_major;
+ case array_row_major:
+ default:
+ return DW_ORD_row_major;
+ };
+}
+
+
/* First cut: install each common block member as a global variable. */
static void
@@ -4807,7 +4987,7 @@ dwarf2_read_section (struct objfile *objfile, asection *sectp)
{
bfd *abfd = objfile->obfd;
char *buf, *retbuf;
- bfd_size_type size = bfd_get_section_size_before_reloc (sectp);
+ bfd_size_type size = bfd_get_section_size (sectp);
if (size == 0)
return NULL;
@@ -5233,6 +5413,10 @@ read_partial_die (struct partial_die_info *part_die,
if (part_die->name == NULL)
part_die->name = DW_STRING (&attr);
break;
+ case DW_AT_comp_dir:
+ if (part_die->dirname == NULL)
+ part_die->dirname = DW_STRING (&attr);
+ break;
case DW_AT_MIPS_linkage_name:
part_die->name = DW_STRING (&attr);
break;
@@ -5287,6 +5471,10 @@ read_partial_die (struct partial_die_info *part_die,
part_die->sibling = dwarf2_per_objfile->info_buffer
+ dwarf2_get_ref_die_offset (&attr, cu);
break;
+ case DW_AT_stmt_list:
+ part_die->has_stmt_list = 1;
+ part_die->line_offset = DW_UNSND (&attr);
+ break;
default:
break;
}
@@ -6038,11 +6226,31 @@ dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu)
return dwarf2_attr_with_cu (die, name, cu, NULL);
}
+/* Return non-zero iff the attribute NAME is defined for the given DIE,
+ and holds a non-zero value. This function should only be used for
+ DW_FORM_flag attributes. */
+
+static int
+dwarf2_flag_true_p (struct die_info *die, unsigned name, struct dwarf2_cu *cu)
+{
+ struct attribute *attr = dwarf2_attr (die, name, cu);
+
+ return (attr && DW_UNSND (attr));
+}
+
static int
die_is_declaration (struct die_info *die, struct dwarf2_cu *cu)
{
struct dwarf2_cu *spec_cu;
- return (dwarf2_attr (die, DW_AT_declaration, cu)
+
+ /* A DIE is a declaration if it has a DW_AT_declaration attribute
+ which value is non-zero. However, we have to be careful with
+ DIEs having a DW_AT_specification attribute, because dwarf2_attr()
+ (via dwarf2_flag_true_p) follows this attribute. So we may
+ end up accidently finding a declaration attribute that belongs
+ to a different DIE referenced by the specification attribute,
+ even though the given DIE does not have a declaration attribute. */
+ return (dwarf2_flag_true_p (die, DW_AT_declaration, cu)
&& ! dwarf2_attr_with_cu (die, DW_AT_specification, cu, &spec_cu));
}
@@ -6136,6 +6344,7 @@ add_file_name (struct line_header *lh,
fe->dir_index = dir_index;
fe->mod_time = mod_time;
fe->length = length;
+ fe->included_p = 0;
}
@@ -6293,13 +6502,27 @@ check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu)
return fn->lowpc;
}
-/* Decode the line number information for the compilation unit whose
- line number info is at OFFSET in the .debug_line section.
- The compilation directory of the file is passed in COMP_DIR. */
+/* Decode the Line Number Program (LNP) for the given line_header
+ structure and CU. The actual information extracted and the type
+ of structures created from the LNP depends on the value of PST.
+
+ 1. If PST is NULL, then this procedure uses the data from the program
+ to create all necessary symbol tables, and their linetables.
+ The compilation directory of the file is passed in COMP_DIR,
+ and must not be NULL.
+
+ 2. If PST is not NULL, this procedure reads the program to determine
+ the list of files included by the unit represented by PST, and
+ builds all the associated partial symbol tables. In this case,
+ the value of COMP_DIR is ignored, and can thus be NULL (the COMP_DIR
+ is not used to compute the full name of the symtab, and therefore
+ omitting it when building the partial symtab does not introduce
+ the potential for inconsistency - a partial symtab and its associated
+ symbtab having a different fullname -). */
static void
dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
- struct dwarf2_cu *cu)
+ struct dwarf2_cu *cu, struct partial_symtab *pst)
{
char *line_ptr;
char *line_end;
@@ -6307,6 +6530,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
unsigned char op_code, extended_op, adj_opcode;
CORE_ADDR baseaddr;
struct objfile *objfile = cu->objfile;
+ const int decode_for_pst_p = (pst != NULL);
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
@@ -6325,9 +6549,9 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
int basic_block = 0;
int end_sequence = 0;
- /* Start a subfile for the current file of the state machine. */
- if (lh->num_file_names >= file)
+ if (!decode_for_pst_p && lh->num_file_names >= file)
{
+ /* Start a subfile for the current file of the state machine. */
/* lh->include_dirs and lh->file_names are 0-based, but the
directory and file name numbers in the statement program
are 1-based. */
@@ -6352,22 +6576,29 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
address += (adj_opcode / lh->line_range)
* lh->minimum_instruction_length;
line += lh->line_base + (adj_opcode % lh->line_range);
- /* append row to matrix using current values */
- record_line (current_subfile, line,
- check_cu_functions (address, cu));
+ lh->file_names[file - 1].included_p = 1;
+ if (!decode_for_pst_p)
+ {
+ /* append row to matrix using current values */
+ record_line (current_subfile, line,
+ check_cu_functions (address, cu));
+ }
basic_block = 1;
}
else switch (op_code)
{
case DW_LNS_extended_op:
- line_ptr += 1; /* ignore length */
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
extended_op = read_1_byte (abfd, line_ptr);
line_ptr += 1;
switch (extended_op)
{
case DW_LNE_end_sequence:
end_sequence = 1;
- record_line (current_subfile, 0, address);
+ lh->file_names[file - 1].included_p = 1;
+ if (!decode_for_pst_p)
+ record_line (current_subfile, 0, address);
break;
case DW_LNE_set_address:
address = read_address (abfd, line_ptr, cu, &bytes_read);
@@ -6400,8 +6631,10 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
}
break;
case DW_LNS_copy:
- record_line (current_subfile, line,
- check_cu_functions (address, cu));
+ lh->file_names[file - 1].included_p = 1;
+ if (!decode_for_pst_p)
+ record_line (current_subfile, line,
+ check_cu_functions (address, cu));
basic_block = 0;
break;
case DW_LNS_advance_pc:
@@ -6427,7 +6660,8 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
dir = lh->include_dirs[fe->dir_index - 1];
else
dir = comp_dir;
- dwarf2_start_subfile (fe->name, dir);
+ if (!decode_for_pst_p)
+ dwarf2_start_subfile (fe->name, dir);
}
break;
case DW_LNS_set_column:
@@ -6465,6 +6699,22 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
}
}
}
+
+ if (decode_for_pst_p)
+ {
+ int file_index;
+
+ /* Now that we're done scanning the Line Header Program, we can
+ create the psymtab of each included file. */
+ for (file_index = 0; file_index < lh->num_file_names; file_index++)
+ if (lh->file_names[file_index].included_p == 1)
+ {
+ char *include_name = lh->file_names [file_index].name;
+
+ if (strcmp (include_name, pst->filename) != 0)
+ dwarf2_create_include_psymtab (include_name, pst, objfile);
+ }
+ }
}
/* Start a subfile for DWARF. FILENAME is the name of the file and
@@ -9484,17 +9734,19 @@ _initialize_dwarf2_read (void)
&show_dwarf2_cmdlist, "maintenance show dwarf2 ",
0/*allow-unknown*/, &maintenance_show_cmdlist);
- add_setshow_cmd ("max-cache-age", class_obscure, var_zinteger,
- &dwarf2_max_cache_age,
- "Set an upper bound on the age of cached "
- "compilation units.\n"
- "A higher limit means that cached "
- "compilation units will be stored\n"
- "in memory longer, and more total memory will "
- "be used. Zero disables\n"
- "caching, which can slow down startup.",
- "Show the upper bound on the age of cached "
- "dwarf2 compilation units.",
- NULL, NULL, &set_dwarf2_cmdlist,
- &show_dwarf2_cmdlist);
+ add_setshow_zinteger_cmd ("max-cache-age", class_obscure,
+ &dwarf2_max_cache_age,
+ "Set the upper bound on the age of cached "
+ "dwarf2 compilation units.",
+ "Show the upper bound on the age of cached "
+ "dwarf2 compilation units.",
+ "A higher limit means that cached "
+ "compilation units will be stored\n"
+ "in memory longer, and more total memory will "
+ "be used. Zero disables\n"
+ "caching, which can slow down startup.",
+ "The upper bound on the age of cached "
+ "dwarf2 compilation units is %d.",
+ NULL, NULL, &set_dwarf2_cmdlist,
+ &show_dwarf2_cmdlist);
}
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index c245108c08e..f8aa4a8d096 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -29,7 +29,7 @@
DWARF-1 is slowly headed for obsoletion.
- In gcc HEAD 2003-11-29 16:28:31 UTC, no targets prefer dwarf-1.
+ In gcc 3.4.0, support for dwarf-1 has been removed.
In gcc 3.3.2, these targets prefer dwarf-1:
@@ -73,11 +73,22 @@
Some non-gcc compilers produce dwarf-1:
PR gdb/1179 was from a user with Diab C++ 4.3.
+ On 2003-07-25 the gdb list received a report from a user
+ with Diab Compiler 4.4b.
Other users have also reported using Diab compilers with dwarf-1.
+
+ Diab Compiler Suite 5.0.1 supports dwarf-2/dwarf-3 for C and C++.
+ (Diab(tm) Compiler Suite 5.0.1 Release Notes, DOC-14691-ZD-00,
+ Wind River Systems, 2002-07-31).
+
On 2003-06-09 the gdb list received a report from a user
with Absoft ProFortran f77 which is dwarf-1.
- -- chastain 2003-12-01
+ Absoft ProFortran Linux[sic] Fortran User Guide (no version,
+ but copyright dates are 1991-2001) says that Absoft ProFortran
+ supports -gdwarf1 and -gdwarf2.
+
+ -- chastain 2004-04-24
*/
/*
@@ -1781,12 +1792,6 @@ read_func_scope (struct dieinfo *dip, char *thisdie, char *enddie,
return;
}
- if (objfile->ei.entry_point >= dip->at_low_pc &&
- objfile->ei.entry_point < dip->at_high_pc)
- {
- objfile->ei.entry_func_lowpc = dip->at_low_pc;
- objfile->ei.entry_func_highpc = dip->at_high_pc;
- }
new = push_context (0, dip->at_low_pc);
new->name = new_symbol (dip, objfile);
list_in_scope = &local_symbols;
@@ -1882,12 +1887,6 @@ read_file_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct cleanup *back_to;
struct symtab *symtab;
- if (objfile->ei.entry_point >= dip->at_low_pc &&
- objfile->ei.entry_point < dip->at_high_pc)
- {
- objfile->ei.deprecated_entry_file_lowpc = dip->at_low_pc;
- objfile->ei.deprecated_entry_file_highpc = dip->at_high_pc;
- }
set_cu_language (dip);
if (dip->at_producer != NULL)
{
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7b13cb98e14..3aa2f66eec4 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -83,12 +83,12 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
if (strcmp (sectp->name, ".debug") == 0)
{
ei->dboffset = sectp->filepos;
- ei->dbsize = bfd_get_section_size_before_reloc (sectp);
+ ei->dbsize = bfd_get_section_size (sectp);
}
else if (strcmp (sectp->name, ".line") == 0)
{
ei->lnoffset = sectp->filepos;
- ei->lnsize = bfd_get_section_size_before_reloc (sectp);
+ ei->lnsize = bfd_get_section_size (sectp);
}
else if (strcmp (sectp->name, ".stab") == 0)
{
@@ -377,7 +377,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
+ (sizeof (CORE_ADDR)
* max_index));
sectinfo = (struct stab_section_info *)
- xmmalloc (objfile->md, size);
+ xmalloc (size);
memset (sectinfo, 0, size);
sectinfo->num_sections = max_index;
if (filesym == NULL)
@@ -499,7 +499,7 @@ elf_symfile_read (struct objfile *objfile, int mainline)
/* Allocate struct to keep track of the symfile */
objfile->sym_stab_info = (struct dbx_symfile_info *)
- xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
+ xmalloc (sizeof (struct dbx_symfile_info));
memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
make_cleanup (free_elfinfo, (void *) objfile);
@@ -608,7 +608,7 @@ free_elfinfo (void *objp)
while (ssi)
{
nssi = ssi->next;
- xmfree (objfile->md, ssi);
+ xfree (ssi);
ssi = nssi;
}
@@ -639,7 +639,7 @@ elf_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
- xmfree (objfile->md, objfile->sym_stab_info);
+ xfree (objfile->sym_stab_info);
}
}
diff --git a/gdb/eval.c b/gdb/eval.c
index 452aeb7f243..4418e0ad29b 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -37,9 +37,6 @@
#include "block.h"
#include "parser-defs.h"
-/* Defined in symtab.c */
-extern int hp_som_som_object_present;
-
/* This is defined in valops.c */
extern int overload_resolution;
@@ -972,7 +969,7 @@ evaluate_subexp_standard (struct type *expect_type,
/* 1997-08-01 Currently we do not support function invocation
via pointers-to-methods with HP aCC. Pointer does not point
to the function, but possibly to some thunk. */
- if (hp_som_som_object_present)
+ if (deprecated_hp_som_som_object_present)
{
error ("Not implemented: function invocation through pointer to method with HP aCC");
}
@@ -1368,7 +1365,7 @@ evaluate_subexp_standard (struct type *expect_type,
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
/* With HP aCC, pointers to methods do not point to the function code */
- if (hp_som_som_object_present &&
+ if (deprecated_hp_som_som_object_present &&
(TYPE_CODE (VALUE_TYPE (arg2)) == TYPE_CODE_PTR) &&
(TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (arg2))) == TYPE_CODE_METHOD))
error ("Pointers to methods not supported with HP aCC"); /* 1997-08-19 */
@@ -1381,7 +1378,7 @@ evaluate_subexp_standard (struct type *expect_type,
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
/* With HP aCC, pointers to methods do not point to the function code */
- if (hp_som_som_object_present &&
+ if (deprecated_hp_som_som_object_present &&
(TYPE_CODE (VALUE_TYPE (arg2)) == TYPE_CODE_PTR) &&
(TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (arg2))) == TYPE_CODE_METHOD))
error ("Pointers to methods not supported with HP aCC"); /* 1997-08-19 */
@@ -1391,7 +1388,7 @@ evaluate_subexp_standard (struct type *expect_type,
handle_pointer_to_member:
/* HP aCC generates offsets that have bit #29 set; turn it off to get
a real offset to the member. */
- if (hp_som_som_object_present)
+ if (deprecated_hp_som_som_object_present)
{
if (!mem_offset) /* no bias -> really null */
error ("Attempted dereference of null pointer-to-member");
@@ -1431,7 +1428,7 @@ evaluate_subexp_standard (struct type *expect_type,
arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
/* Do special stuff for HP aCC pointers to members */
- if (hp_som_som_object_present)
+ if (deprecated_hp_som_som_object_present)
{
/* 1997-08-19 Can't assign HP aCC pointers to methods. No details of
the implementation yet; but the pointer appears to point to a code
@@ -1613,9 +1610,8 @@ evaluate_subexp_standard (struct type *expect_type,
multi_f77_subscript:
{
- int subscript_array[MAX_FORTRAN_DIMS + 1]; /* 1-based array of
- subscripts, max == 7 */
- int array_size_array[MAX_FORTRAN_DIMS + 1];
+ int subscript_array[MAX_FORTRAN_DIMS];
+ int array_size_array[MAX_FORTRAN_DIMS];
int ndimensions = 1, i;
struct type *tmp_type;
int offset_item; /* The array offset where the item lives */
@@ -1633,7 +1629,8 @@ evaluate_subexp_standard (struct type *expect_type,
let us actually find out where this element exists in the array. */
offset_item = 0;
- for (i = 1; i <= nargs; i++)
+ /* Take array indices left to right */
+ for (i = 0; i < nargs; i++)
{
/* Evaluate each subscript, It must be a legal integer in F77 */
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
@@ -1641,7 +1638,11 @@ evaluate_subexp_standard (struct type *expect_type,
/* Fill in the subscript and array size arrays */
subscript_array[i] = value_as_long (arg2);
+ }
+ /* Internal type of array is arranged right to left */
+ for (i = 0; i < nargs; i++)
+ {
retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
if (retcode == BOUND_FETCH_ERROR)
error ("Cannot obtain dynamic upper bound");
@@ -1650,11 +1651,11 @@ evaluate_subexp_standard (struct type *expect_type,
if (retcode == BOUND_FETCH_ERROR)
error ("Cannot obtain dynamic lower bound");
- array_size_array[i] = upper - lower + 1;
+ array_size_array[nargs - i - 1] = upper - lower + 1;
/* Zero-normalize subscripts so that offsetting will work. */
- subscript_array[i] -= lower;
+ subscript_array[nargs - i - 1] -= lower;
/* If we are at the bottom of a multidimensional
array type then keep a ptr to the last ARRAY
@@ -1664,17 +1665,17 @@ evaluate_subexp_standard (struct type *expect_type,
of base element type that we apply a simple
offset to. */
- if (i < nargs)
+ if (i < nargs - 1)
tmp_type = check_typedef (TYPE_TARGET_TYPE (tmp_type));
}
/* Now let us calculate the offset for this item */
- offset_item = subscript_array[ndimensions];
+ offset_item = subscript_array[ndimensions - 1];
- for (i = ndimensions - 1; i >= 1; i--)
+ for (i = ndimensions - 1; i > 0; --i)
offset_item =
- array_size_array[i] * offset_item + subscript_array[i];
+ array_size_array[i - 1] * offset_item + subscript_array[i - 1];
/* Construct a value node with the value of the offset */
@@ -1934,7 +1935,7 @@ evaluate_subexp_standard (struct type *expect_type,
{
struct value *retvalp = evaluate_subexp_for_address (exp, pos, noside);
/* If HP aCC object, use bias for pointers to members */
- if (hp_som_som_object_present &&
+ if (deprecated_hp_som_som_object_present &&
(TYPE_CODE (VALUE_TYPE (retvalp)) == TYPE_CODE_PTR) &&
(TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (retvalp))) == TYPE_CODE_MEMBER))
{
diff --git a/gdb/event-top.c b/gdb/event-top.c
index f4ba015e817..01f1f51c265 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -1106,58 +1106,55 @@ set_async_prompt (char *args, int from_tty, struct cmd_list_element *c)
void
gdb_setup_readline (void)
{
- /* This function is a noop for the sync case. The assumption is that
- the sync setup is ALL done in gdb_init, and we would only mess it up
- here. The sync stuff should really go away over time. */
-
- if (event_loop_p)
+ /* This function is a noop for the sync case. The assumption is
+ that the sync setup is ALL done in gdb_init, and we would only
+ mess it up here. The sync stuff should really go away over
+ time. */
+
+ gdb_stdout = stdio_fileopen (stdout);
+ gdb_stderr = stdio_fileopen (stderr);
+ gdb_stdlog = gdb_stderr; /* for moment */
+ gdb_stdtarg = gdb_stderr; /* for moment */
+
+ /* If the input stream is connected to a terminal, turn on
+ editing. */
+ if (ISATTY (instream))
{
- gdb_stdout = stdio_fileopen (stdout);
- gdb_stderr = stdio_fileopen (stderr);
- gdb_stdlog = gdb_stderr; /* for moment */
- gdb_stdtarg = gdb_stderr; /* for moment */
-
- /* If the input stream is connected to a terminal, turn on
- editing. */
- if (ISATTY (instream))
- {
- /* Tell gdb that we will be using the readline library. This
- could be overwritten by a command in .gdbinit like 'set
- editing on' or 'off'. */
- async_command_editing_p = 1;
+ /* Tell gdb that we will be using the readline library. This
+ could be overwritten by a command in .gdbinit like 'set
+ editing on' or 'off'. */
+ async_command_editing_p = 1;
- /* When a character is detected on instream by select or
- poll, readline will be invoked via this callback
- function. */
- call_readline = rl_callback_read_char_wrapper;
- }
- else
- {
- async_command_editing_p = 0;
- call_readline = gdb_readline2;
- }
-
- /* When readline has read an end-of-line character, it passes
- the complete line to gdb for processing. command_line_handler
- is the function that does this. */
- input_handler = command_line_handler;
-
- /* Tell readline to use the same input stream that gdb uses. */
- rl_instream = instream;
-
- /* Get a file descriptor for the input stream, so that we can
- register it with the event loop. */
- input_fd = fileno (instream);
-
- /* Now we need to create the event sources for the input file
- descriptor. */
- /* At this point in time, this is the only event source that we
- register with the even loop. Another source is going to be
- the target program (inferior), but that must be registered
- only when it actually exists (I.e. after we say 'run' or
- after we connect to a remote target. */
- add_file_handler (input_fd, stdin_event_handler, 0);
+ /* When a character is detected on instream by select or poll,
+ readline will be invoked via this callback function. */
+ call_readline = rl_callback_read_char_wrapper;
}
+ else
+ {
+ async_command_editing_p = 0;
+ call_readline = gdb_readline2;
+ }
+
+ /* When readline has read an end-of-line character, it passes the
+ complete line to gdb for processing. command_line_handler is the
+ function that does this. */
+ input_handler = command_line_handler;
+
+ /* Tell readline to use the same input stream that gdb uses. */
+ rl_instream = instream;
+
+ /* Get a file descriptor for the input stream, so that we can
+ register it with the event loop. */
+ input_fd = fileno (instream);
+
+ /* Now we need to create the event sources for the input file
+ descriptor. */
+ /* At this point in time, this is the only event source that we
+ register with the even loop. Another source is going to be the
+ target program (inferior), but that must be registered only when
+ it actually exists (I.e. after we say 'run' or after we connect
+ to a remote target. */
+ add_file_handler (input_fd, stdin_event_handler, 0);
}
/* Disable command input through the standard CLI channels. Used in
@@ -1166,22 +1163,18 @@ gdb_setup_readline (void)
void
gdb_disable_readline (void)
{
- if (event_loop_p)
- {
- /* FIXME - It is too heavyweight to delete and remake these
- every time you run an interpreter that needs readline.
- It is probably better to have the interpreters cache these,
- which in turn means that this needs to be moved into interpreter
- specific code. */
+ /* FIXME - It is too heavyweight to delete and remake these every
+ time you run an interpreter that needs readline. It is probably
+ better to have the interpreters cache these, which in turn means
+ that this needs to be moved into interpreter specific code. */
#if 0
- ui_file_delete (gdb_stdout);
- ui_file_delete (gdb_stderr);
- gdb_stdlog = NULL;
- gdb_stdtarg = NULL;
+ ui_file_delete (gdb_stdout);
+ ui_file_delete (gdb_stderr);
+ gdb_stdlog = NULL;
+ gdb_stdtarg = NULL;
#endif
- rl_callback_handler_remove ();
- delete_file_handler (input_fd);
- }
+ rl_callback_handler_remove ();
+ delete_file_handler (input_fd);
}
diff --git a/gdb/exec.c b/gdb/exec.c
index 418b0b3aa35..7eaa15ab2ff 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -33,10 +33,6 @@
#include "value.h"
#include "exec.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <fcntl.h>
#include "readline/readline.h"
#include "gdb_string.h"
@@ -53,7 +49,7 @@
struct vmap *map_vmap (bfd *, bfd *);
-void (*file_changed_hook) (char *);
+void (*deprecated_file_changed_hook) (char *);
/* Prototypes for local functions */
@@ -194,7 +190,7 @@ exec_file_attach (char *filename, int from_tty)
char *scratch_pathname;
int scratch_chan;
- scratch_chan = openp (getenv ("PATH"), 1, filename,
+ scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename,
write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY, 0,
&scratch_pathname);
#if defined(__GO32__) || defined(_WIN32) || defined(__CYGWIN__)
@@ -202,8 +198,9 @@ exec_file_attach (char *filename, int from_tty)
{
char *exename = alloca (strlen (filename) + 5);
strcat (strcpy (exename, filename), ".exe");
- scratch_chan = openp (getenv ("PATH"), 1, exename, write_files ?
- O_RDWR | O_BINARY : O_RDONLY | O_BINARY, 0, &scratch_pathname);
+ scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename,
+ write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY, 0,
+ &scratch_pathname);
}
#endif
if (scratch_chan < 0)
@@ -267,9 +264,10 @@ exec_file_attach (char *filename, int from_tty)
push_target (&exec_ops);
/* Tell display code (if any) about the changed file name. */
- if (exec_file_display_hook)
- (*exec_file_display_hook) (filename);
+ if (deprecated_exec_file_display_hook)
+ (*deprecated_exec_file_display_hook) (filename);
}
+ bfd_cache_close_all ();
}
/* Process the first arg in ARGS as the new exec file.
@@ -324,8 +322,8 @@ file_command (char *arg, int from_tty)
the exec file, but that's rough. */
exec_file_command (arg, from_tty);
symbol_file_command (arg, from_tty);
- if (file_changed_hook)
- file_changed_hook (arg);
+ if (deprecated_file_changed_hook)
+ deprecated_file_changed_hook (arg);
}
@@ -524,8 +522,8 @@ void
print_section_info (struct target_ops *t, bfd *abfd)
{
struct section_table *p;
- /* FIXME: "016l" is not wide enough when TARGET_ADDR_BIT > 64. */
- char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l";
+ /* FIXME: 16 is not wide enough when TARGET_ADDR_BIT > 64. */
+ int wid = TARGET_ADDR_BIT <= 32 ? 8 : 16;
printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
wrap_here (" ");
@@ -538,8 +536,8 @@ print_section_info (struct target_ops *t, bfd *abfd)
}
for (p = t->to_sections; p < t->to_sections_end; p++)
{
- printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt));
- printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt));
+ printf_filtered ("\t%s", hex_string_custom (p->addr, wid));
+ printf_filtered (" - %s", hex_string_custom (p->endaddr, wid));
/* FIXME: A format of "08l" is not wide enough for file offsets
larger than 4GB. OTOH, making it "016l" isn't desirable either
@@ -548,7 +546,7 @@ print_section_info (struct target_ops *t, bfd *abfd)
format string accordingly. */
if (info_verbose)
printf_filtered (" @ %s",
- local_hex_string_custom (p->the_bfd_section->filepos, "08l"));
+ hex_string_custom (p->the_bfd_section->filepos, 8));
printf_filtered (" is %s", bfd_section_name (p->bfd, p->the_bfd_section));
if (p->bfd != abfd)
{
@@ -745,7 +743,7 @@ This can be used if the exec file does not contain section addresses,\n\
file itself are wrong. Each section must be changed separately. The\n\
``info files'' command lists all the sections and their addresses.");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("write", class_support, var_boolean, (char *) &write_files,
"Set writing into executable and core files.",
&setlist),
diff --git a/gdb/expression.h b/gdb/expression.h
index 03b45c2ef9a..2b09716e907 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -378,6 +378,8 @@ struct expression
extern struct expression *parse_expression (char *);
+extern struct expression *parse_expression_in_context (char *, int);
+
extern struct expression *parse_exp_1 (char **, struct block *, int);
/* The innermost context required by the stack and register variables
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index adff33b4dd3..5ef65d3bee6 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -1150,7 +1150,10 @@ yylex ()
yylval.tsym.type = SYMBOL_TYPE (sym);
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 1e7cd45362c..e058dd4aa43 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -462,9 +462,11 @@ const struct language_defn f_language_defn =
range_check_on,
type_check_on,
case_sensitive_off,
+ array_column_major,
&exp_descriptor_standard,
f_parse, /* parser */
f_error, /* parser error function */
+ null_post_parser,
f_printchar, /* Print character constant */
f_printstr, /* function to print string constant */
f_emit_char, /* Function to print a single character */
@@ -477,15 +479,13 @@ const struct language_defn f_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
f_op_print_tab, /* expression operators for printing */
0, /* arrays are first-class (not c-style) */
1, /* String lower bound */
&builtin_type_f_character, /* Type of string elements */
default_word_break_characters,
+ NULL, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
diff --git a/gdb/fbsd-proc.c b/gdb/fbsd-proc.c
index 16813a9a1c8..f021d275b9a 100644
--- a/gdb/fbsd-proc.c
+++ b/gdb/fbsd-proc.c
@@ -22,22 +22,23 @@
#include "defs.h"
#include "gdbcore.h"
#include "inferior.h"
-#include "gdb_string.h"
+#include "regcache.h"
+#include "regset.h"
+#include "gdb_assert.h"
+#include "gdb_string.h"
#include <sys/procfs.h>
#include <sys/types.h>
#include "elf-bfd.h"
-#include "gregset.h"
-
char *
child_pid_to_exec_file (int pid)
{
char *path;
char *buf;
- xasprintf (&path, "/proc/%d/file", pid);
+ path = xstrprintf ("/proc/%d/file", pid);
buf = xcalloc (MAXPATHLEN, sizeof (char));
make_cleanup (xfree, path);
make_cleanup (xfree, buf);
@@ -81,7 +82,7 @@ fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
char protection[4];
int read, write, exec;
- xasprintf (&mapfilename, "/proc/%ld/map", (long) pid);
+ mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
mapfile = fopen (mapfilename, "r");
if (mapfile == NULL)
error ("Couldn't open %s\n", mapfilename);
@@ -120,21 +121,35 @@ fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
static char *
fbsd_make_corefile_notes (bfd *obfd, int *note_size)
{
+ struct gdbarch *gdbarch = current_gdbarch;
+ const struct regcache *regcache = current_regcache;
gregset_t gregs;
fpregset_t fpregs;
char *note_data = NULL;
Elf_Internal_Ehdr *i_ehdrp;
+ const struct regset *regset;
+ size_t size;
/* Put a "FreeBSD" label in the ELF header. */
i_ehdrp = elf_elfheader (obfd);
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
- fill_gregset (&gregs, -1);
+ gdb_assert (gdbarch_regset_from_core_section_p (gdbarch));
+
+ size = sizeof gregs;
+ regset = gdbarch_regset_from_core_section (gdbarch, ".reg", size);
+ gdb_assert (regset && regset->collect_regset);
+ regset->collect_regset (regset, regcache, -1, &gregs, size);
+
note_data = elfcore_write_prstatus (obfd, note_data, note_size,
ptid_get_pid (inferior_ptid),
stop_signal, &gregs);
- fill_fpregset (&fpregs, -1);
+ size = sizeof fpregs;
+ regset = gdbarch_regset_from_core_section (gdbarch, ".reg2", size);
+ gdb_assert (regset && regset->collect_regset);
+ regset->collect_regset (regset, regcache, -1, &fpregs, size);
+
note_data = elfcore_write_prfpreg (obfd, note_data, note_size,
&fpregs, sizeof (fpregs));
diff --git a/gdb/findvar.c b/gdb/findvar.c
index cb1ef655dc2..3d5d3f3a729 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -282,24 +282,8 @@ value_of_register (int regnum, struct frame_info *frame)
reg_val = allocate_value (register_type (current_gdbarch, regnum));
- /* Convert raw data to virtual format if necessary. */
-
- if (DEPRECATED_REGISTER_CONVERTIBLE_P ()
- && DEPRECATED_REGISTER_CONVERTIBLE (regnum))
- {
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
- raw_buffer, VALUE_CONTENTS_RAW (reg_val));
- }
- else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))
- memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
- else
- internal_error (__FILE__, __LINE__,
- "Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
- REGISTER_NAME (regnum),
- regnum,
- DEPRECATED_REGISTER_RAW_SIZE (regnum),
- DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
+ memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
+ register_size (current_gdbarch, regnum));
VALUE_LVAL (reg_val) = lval;
VALUE_ADDRESS (reg_val) = addr;
VALUE_REGNO (reg_val) = regnum;
@@ -671,7 +655,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
/* Copy all of the data out, whereever it may be. */
for (local_regnum = regnum, value_bytes_copied = 0;
value_bytes_copied < len;
- (value_bytes_copied += DEPRECATED_REGISTER_RAW_SIZE (local_regnum),
+ (value_bytes_copied += register_size (current_gdbarch, local_regnum),
++local_regnum))
{
int realnum;
@@ -737,9 +721,9 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
some fiddling with the last register copied here for little
endian machines. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && len < DEPRECATED_REGISTER_RAW_SIZE (regnum))
+ && len < register_size (current_gdbarch, regnum))
/* Big-endian, and we want less than full size. */
- VALUE_OFFSET (v) = DEPRECATED_REGISTER_RAW_SIZE (regnum) - len;
+ VALUE_OFFSET (v) = register_size (current_gdbarch, regnum) - len;
else
VALUE_OFFSET (v) = 0;
memcpy (VALUE_CONTENTS_RAW (v), value_bytes + VALUE_OFFSET (v), len);
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index 0fce6bcfce9..0961033b3eb 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -39,24 +39,12 @@ default_frame_base_address (struct frame_info *next_frame, void **this_cache)
static CORE_ADDR
default_frame_locals_address (struct frame_info *next_frame, void **this_cache)
{
- if (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())
- {
- /* This is bad. The computation of per-frame locals address
- should use a per-frame frame-base. */
- struct frame_info *this_frame = get_prev_frame (next_frame);
- return DEPRECATED_FRAME_LOCALS_ADDRESS (this_frame);
- }
return default_frame_base_address (next_frame, this_cache);
}
static CORE_ADDR
default_frame_args_address (struct frame_info *next_frame, void **this_cache)
{
- if (DEPRECATED_FRAME_ARGS_ADDRESS_P ())
- {
- struct frame_info *this_frame = get_prev_frame (next_frame);
- return DEPRECATED_FRAME_ARGS_ADDRESS (this_frame);
- }
return default_frame_base_address (next_frame, this_cache);
}
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index cacb2ed4160..9e30c7802fe 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -37,8 +37,9 @@ struct frame_unwind_table_entry
struct frame_unwind_table
{
- struct frame_unwind_table_entry *head;
- struct frame_unwind_table_entry **tail;
+ struct frame_unwind_table_entry *list;
+ /* The head of the OSABI part of the search list. */
+ struct frame_unwind_table_entry **osabi_head;
};
static void *
@@ -46,9 +47,12 @@ frame_unwind_init (struct obstack *obstack)
{
struct frame_unwind_table *table
= OBSTACK_ZALLOC (obstack, struct frame_unwind_table);
- table->head = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
- table->head->sniffer = dummy_frame_sniffer;
- table->tail = &table->head->next;
+ /* Start the table out with a few default sniffers. OSABI code
+ can't override this. */
+ table->list = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
+ table->list->unwinder = dummy_frame_unwind;
+ /* The insertion point for OSABI sniffers. */
+ table->osabi_head = &table->list->next;
return table;
}
@@ -57,20 +61,26 @@ frame_unwind_append_sniffer (struct gdbarch *gdbarch,
frame_unwind_sniffer_ftype *sniffer)
{
struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
- (*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind_table_entry);
- (*table->tail)->sniffer = sniffer;
- table->tail = &((*table->tail)->next);
+ struct frame_unwind_table_entry **ip;
+
+ /* Find the end of the list and insert the new entry there. */
+ for (ip = table->osabi_head; (*ip) != NULL; ip = &(*ip)->next);
+ (*ip) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind_table_entry);
+ (*ip)->sniffer = sniffer;
}
void
-frame_unwind_register_unwinder (struct gdbarch *gdbarch,
+frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
const struct frame_unwind *unwinder)
{
struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
- (*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch,
- struct frame_unwind_table_entry);
- (*table->tail)->unwinder = unwinder;
- table->tail = &((*table->tail)->next);
+ struct frame_unwind_table_entry *entry;
+
+ /* Insert the new entry at the start of the list. */
+ entry = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind_table_entry);
+ entry->unwinder = unwinder;
+ entry->next = (*table->osabi_head);
+ (*table->osabi_head) = entry;
}
const struct frame_unwind *
@@ -80,13 +90,7 @@ frame_unwind_find_by_frame (struct frame_info *next_frame, void **this_cache)
struct gdbarch *gdbarch = get_frame_arch (next_frame);
struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
- if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES && legacy_frame_p (gdbarch))
- /* Seriously old code. Don't even try to use this new mechanism.
- (Note: The variable USE_GENERIC_DUMMY_FRAMES is deprecated, not
- the dummy frame mechanism. All architectures should be using
- generic dummy frames). */
- return legacy_saved_regs_unwind;
- for (entry = table->head; entry != NULL; entry = entry->next)
+ for (entry = table->list; entry != NULL; entry = entry->next)
{
if (entry->sniffer != NULL)
{
@@ -102,7 +106,7 @@ frame_unwind_find_by_frame (struct frame_info *next_frame, void **this_cache)
return entry->unwinder;
}
}
- return legacy_saved_regs_unwind;
+ internal_error (__FILE__, __LINE__, "frame_unwind_find_by_frame failed");
}
extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index 49f28896ffe..12d6dd240ed 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -131,11 +131,14 @@ struct frame_unwind
frame_sniffer_ftype *sniffer;
};
-/* Register a frame unwinder, _appending_ it to the end of the search
- list. */
-extern void frame_unwind_register_unwinder (struct gdbarch *gdbarch,
- const struct frame_unwind *unwinder);
-
+/* Register a frame unwinder, _prepending_ it to the front of the
+ search list (so it is sniffed before previously registered
+ unwinders). By using a prepend, later calls can install unwinders
+ that override earlier calls. This allows, for instance, an OSABI
+ to install a a more specific sigtramp unwinder that overrides the
+ traditional brute-force unwinder. */
+extern void frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
+ const struct frame_unwind *unwinder);
/* Given the NEXT frame, take a wiff of THIS frame's registers (namely
the PC and attributes) and if it is the applicable unwinder return
diff --git a/gdb/frame.c b/gdb/frame.c
index d725e8758dd..0d0e2c9094d 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -39,6 +39,8 @@
#include "frame-base.h"
#include "command.h"
#include "gdbcmd.h"
+#include "observer.h"
+#include "objfiles.h"
static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame);
@@ -59,39 +61,16 @@ struct frame_info
increases. This is a cached value. It could just as easily be
computed by counting back from the selected frame to the inner
most frame. */
- /* NOTE: cagney/2002-04-05: Perhaphs a level of ``-1'' should be
+ /* NOTE: cagney/2002-04-05: Perhaps a level of ``-1'' should be
reserved to indicate a bogus frame - one that has been created
just to keep GDB happy (GDB always needs a frame). For the
moment leave this as speculation. */
int level;
- /* The frame's type. */
- /* FIXME: cagney/2003-04-02: Should instead be returning
- ->unwind->type. Unfortunately, legacy code is still explicitly
- setting the type using the method deprecated_set_frame_type.
- Eliminate that method and this field can be eliminated. */
- enum frame_type type;
-
- /* For each register, address of where it was saved on entry to the
- frame, or zero if it was not saved on entry to this frame. This
- includes special registers such as pc and fp saved in special
- ways in the stack frame. The SP_REGNUM is even more special, the
- address here is the sp for the previous frame, not the address
- where the sp was saved. */
- /* Allocated by frame_saved_regs_zalloc () which is called /
- initialized by DEPRECATED_FRAME_INIT_SAVED_REGS(). */
- CORE_ADDR *saved_regs; /*NUM_REGS + NUM_PSEUDO_REGS*/
-
- /* Anything extra for this structure that may have been defined in
- the machine dependent files. */
- /* Allocated by frame_extra_info_zalloc () which is called /
- initialized by DEPRECATED_INIT_EXTRA_FRAME_INFO */
- struct frame_extra_info *extra_info;
-
/* The frame's low-level unwinder and corresponding cache. The
low-level unwinder is responsible for unwinding register values
for the previous frame. The low-level unwind methods are
- selected based on the presence, or otherwize, of register unwind
+ selected based on the presence, or otherwise, of register unwind
information such as CFI. */
void *prologue_cache;
const struct frame_unwind *unwind;
@@ -138,14 +117,25 @@ static int frame_debug;
static int backtrace_past_main;
static unsigned int backtrace_limit = UINT_MAX;
+static void
+fprint_field (struct ui_file *file, const char *name, int p, CORE_ADDR addr)
+{
+ if (p)
+ fprintf_unfiltered (file, "%s=0x%s", name, paddr_nz (addr));
+ else
+ fprintf_unfiltered (file, "!%s", name);
+}
void
fprint_frame_id (struct ui_file *file, struct frame_id id)
{
- fprintf_unfiltered (file, "{stack=0x%s,code=0x%s,special=0x%s}",
- paddr_nz (id.stack_addr),
- paddr_nz (id.code_addr),
- paddr_nz (id.special_addr));
+ fprintf_unfiltered (file, "{");
+ fprint_field (file, "stack", id.stack_addr_p, id.stack_addr);
+ fprintf_unfiltered (file, ",");
+ fprint_field (file, "code", id.code_addr_p, id.code_addr);
+ fprintf_unfiltered (file, ",");
+ fprint_field (file, "special", id.special_addr_p, id.special_addr);
+ fprintf_unfiltered (file, "}");
}
static void
@@ -153,9 +143,6 @@ fprint_frame_type (struct ui_file *file, enum frame_type type)
{
switch (type)
{
- case UNKNOWN_FRAME:
- fprintf_unfiltered (file, "UNKNOWN_FRAME");
- return;
case NORMAL_FRAME:
fprintf_unfiltered (file, "NORMAL_FRAME");
return;
@@ -183,7 +170,10 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
fprintf_unfiltered (file, "level=%d", fi->level);
fprintf_unfiltered (file, ",");
fprintf_unfiltered (file, "type=");
- fprint_frame_type (file, fi->type);
+ if (fi->unwind != NULL)
+ fprint_frame_type (file, fi->unwind->type);
+ else
+ fprintf_unfiltered (file, "<unknown>");
fprintf_unfiltered (file, ",");
fprintf_unfiltered (file, "unwind=");
if (fi->unwind != NULL)
@@ -223,22 +213,13 @@ get_frame_id (struct frame_info *fi)
}
if (!fi->this_id.p)
{
- gdb_assert (!legacy_frame_p (current_gdbarch));
if (frame_debug)
fprintf_unfiltered (gdb_stdlog, "{ get_frame_id (fi=%d) ",
fi->level);
/* Find the unwinder. */
if (fi->unwind == NULL)
- {
- fi->unwind = frame_unwind_find_by_frame (fi->next,
- &fi->prologue_cache);
- /* FIXME: cagney/2003-04-02: Rather than storing the frame's
- type in the frame, the unwinder's type should be returned
- directly. Unfortunately, legacy code, called by
- legacy_get_prev_frame, explicitly set the frames type
- using the method deprecated_set_frame_type(). */
- fi->type = fi->unwind->type;
- }
+ fi->unwind = frame_unwind_find_by_frame (fi->next,
+ &fi->prologue_cache);
/* Find THIS frame's ID. */
fi->unwind->this_id (fi->next, &fi->prologue_cache, &fi->this_id.value);
fi->this_id.p = 1;
@@ -268,25 +249,42 @@ struct frame_id
frame_id_build_special (CORE_ADDR stack_addr, CORE_ADDR code_addr,
CORE_ADDR special_addr)
{
- struct frame_id id;
+ struct frame_id id = null_frame_id;
id.stack_addr = stack_addr;
+ id.stack_addr_p = 1;
id.code_addr = code_addr;
+ id.code_addr_p = 1;
id.special_addr = special_addr;
+ id.special_addr_p = 1;
return id;
}
struct frame_id
frame_id_build (CORE_ADDR stack_addr, CORE_ADDR code_addr)
{
- return frame_id_build_special (stack_addr, code_addr, 0);
+ struct frame_id id = null_frame_id;
+ id.stack_addr = stack_addr;
+ id.stack_addr_p = 1;
+ id.code_addr = code_addr;
+ id.code_addr_p = 1;
+ return id;
+}
+
+struct frame_id
+frame_id_build_wild (CORE_ADDR stack_addr)
+{
+ struct frame_id id = null_frame_id;
+ id.stack_addr = stack_addr;
+ id.stack_addr_p = 1;
+ return id;
}
int
frame_id_p (struct frame_id l)
{
int p;
- /* The .code can be NULL but the .stack cannot. */
- p = (l.stack_addr != 0);
+ /* The frame is valid iff it has a valid stack address. */
+ p = l.stack_addr_p;
if (frame_debug)
{
fprintf_unfiltered (gdb_stdlog, "{ frame_id_p (l=");
@@ -300,20 +298,21 @@ int
frame_id_eq (struct frame_id l, struct frame_id r)
{
int eq;
- if (l.stack_addr == 0 || r.stack_addr == 0)
- /* Like a NaN, if either ID is invalid, the result is false. */
+ if (!l.stack_addr_p || !r.stack_addr_p)
+ /* Like a NaN, if either ID is invalid, the result is false.
+ Note that a frame ID is invalid iff it is the null frame ID. */
eq = 0;
else if (l.stack_addr != r.stack_addr)
/* If .stack addresses are different, the frames are different. */
eq = 0;
- else if (l.code_addr == 0 || r.code_addr == 0)
- /* A zero code addr is a wild card, always succeed. */
+ else if (!l.code_addr_p || !r.code_addr_p)
+ /* An invalid code addr is a wild card, always succeed. */
eq = 1;
else if (l.code_addr != r.code_addr)
/* If .code addresses are different, the frames are different. */
eq = 0;
- else if (l.special_addr == 0 || r.special_addr == 0)
- /* A zero special addr is a wild card (or unused), always succeed. */
+ else if (!l.special_addr_p || !r.special_addr_p)
+ /* An invalid special addr is a wild card (or unused), always succeed. */
eq = 1;
else if (l.special_addr == r.special_addr)
/* Frames are equal. */
@@ -336,7 +335,7 @@ int
frame_id_inner (struct frame_id l, struct frame_id r)
{
int inner;
- if (l.stack_addr == 0 || r.stack_addr == 0)
+ if (!l.stack_addr_p || !r.stack_addr_p)
/* Like NaN, any operation involving an invalid ID always fails. */
inner = 0;
else
@@ -377,8 +376,8 @@ frame_find_by_id (struct frame_id id)
if (frame_id_inner (id, this))
/* Gone to far. */
return NULL;
- /* Either, we're not yet gone far enough out along the frame
- chain (inner(this,id), or we're comparing frameless functions
+ /* Either we're not yet gone far enough out along the frame
+ chain (inner(this,id)), or we're comparing frameless functions
(same .base, different .func, no test available). Struggle
on until we've definitly gone to far. */
}
@@ -413,21 +412,13 @@ frame_pc_unwind (struct frame_info *this_frame)
}
else if (this_frame->level < 0)
{
- /* FIXME: cagney/2003-03-06: Old code and and a sentinel
+ /* FIXME: cagney/2003-03-06: Old code and a sentinel
frame. Do like was always done. Fetch the PC's value
- direct from the global registers array (via read_pc).
+ directly from the global registers array (via read_pc).
This assumes that this frame belongs to the current
global register cache. The assumption is dangerous. */
pc = read_pc ();
}
- else if (DEPRECATED_FRAME_SAVED_PC_P ())
- {
- /* FIXME: cagney/2003-03-06: Old code, but not a sentinel
- frame. Do like was always done. Note that this method,
- unlike unwind_pc(), tries to handle all the different
- frame cases directly. It fails. */
- pc = DEPRECATED_FRAME_SAVED_PC (this_frame);
- }
else
internal_error (__FILE__, __LINE__, "No gdbarch_unwind_pc method");
this_frame->prev_pc.value = pc;
@@ -466,48 +457,46 @@ get_frame_func (struct frame_info *fi)
}
static int
-do_frame_unwind_register (void *src, int regnum, void *buf)
+do_frame_register_read (void *src, int regnum, void *buf)
{
- frame_unwind_register (src, regnum, buf);
+ frame_register_read (src, regnum, buf);
return 1;
}
+struct regcache *
+frame_save_as_regcache (struct frame_info *this_frame)
+{
+ struct regcache *regcache = regcache_xmalloc (current_gdbarch);
+ struct cleanup *cleanups = make_cleanup_regcache_xfree (regcache);
+ regcache_save (regcache, do_frame_register_read, this_frame);
+ discard_cleanups (cleanups);
+ return regcache;
+}
+
void
frame_pop (struct frame_info *this_frame)
{
- struct regcache *scratch_regcache;
- struct cleanup *cleanups;
+ /* Make a copy of all the register values unwound from this frame.
+ Save them in a scratch buffer so that there isn't a race between
+ trying to extract the old values from the current_regcache while
+ at the same time writing new values into that same cache. */
+ struct regcache *scratch
+ = frame_save_as_regcache (get_prev_frame_1 (this_frame));
+ struct cleanup *cleanups = make_cleanup_regcache_xfree (scratch);
+
+ /* FIXME: cagney/2003-03-16: It should be possible to tell the
+ target's register cache that it is about to be hit with a burst
+ register transfer and that the sequence of register writes should
+ be batched. The pair target_prepare_to_store() and
+ target_store_registers() kind of suggest this functionality.
+ Unfortunately, they don't implement it. Their lack of a formal
+ definition can lead to targets writing back bogus values
+ (arguably a bug in the target code mind). */
+ /* Now copy those saved registers into the current regcache.
+ Here, regcache_cpy() calls regcache_restore(). */
+ regcache_cpy (current_regcache, scratch);
+ do_cleanups (cleanups);
- if (DEPRECATED_POP_FRAME_P ())
- {
- /* A legacy architecture that has implemented a custom pop
- function. All new architectures should instead be using the
- generic code below. */
- DEPRECATED_POP_FRAME;
- }
- else
- {
- /* Make a copy of all the register values unwound from this
- frame. Save them in a scratch buffer so that there isn't a
- race betweening trying to extract the old values from the
- current_regcache while, at the same time writing new values
- into that same cache. */
- struct regcache *scratch = regcache_xmalloc (current_gdbarch);
- struct cleanup *cleanups = make_cleanup_regcache_xfree (scratch);
- regcache_save (scratch, do_frame_unwind_register, this_frame);
- /* FIXME: cagney/2003-03-16: It should be possible to tell the
- target's register cache that it is about to be hit with a
- burst register transfer and that the sequence of register
- writes should be batched. The pair target_prepare_to_store()
- and target_store_registers() kind of suggest this
- functionality. Unfortunately, they don't implement it. Their
- lack of a formal definition can lead to targets writing back
- bogus values (arguably a bug in the target code mind). */
- /* Now copy those saved registers into the current regcache.
- Here, regcache_cpy() calls regcache_restore(). */
- regcache_cpy (current_regcache, scratch);
- do_cleanups (cleanups);
- }
/* We've made right mess of GDB's local state, just discard
everything. */
flush_cached_frames ();
@@ -538,25 +527,17 @@ frame_register_unwind (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-11-27: A program trying to unwind a NULL frame
is broken. There is always a frame. If there, for some reason,
- isn't, there is some pretty busted code as it should have
+ isn't a frame, there is some pretty busted code as it should have
detected the problem before calling here. */
gdb_assert (frame != NULL);
/* Find the unwinder. */
if (frame->unwind == NULL)
- {
- frame->unwind = frame_unwind_find_by_frame (frame->next,
- &frame->prologue_cache);
- /* FIXME: cagney/2003-04-02: Rather than storing the frame's
- type in the frame, the unwinder's type should be returned
- directly. Unfortunately, legacy code, called by
- legacy_get_prev_frame, explicitly set the frames type using
- the method deprecated_set_frame_type(). */
- frame->type = frame->unwind->type;
- }
+ frame->unwind = frame_unwind_find_by_frame (frame->next,
+ &frame->prologue_cache);
/* Ask this frame to unwind its register. See comment in
- "frame-unwind.h" for why NEXT frame and this unwind cace are
+ "frame-unwind.h" for why NEXT frame and this unwind cache are
passed in. */
frame->unwind->prev_register (frame->next, &frame->prologue_cache, regnum,
optimizedp, lvalp, addrp, realnump, bufferp);
@@ -596,33 +577,6 @@ frame_register (struct frame_info *frame, int regnum,
gdb_assert (realnump != NULL);
/* gdb_assert (bufferp != NULL); */
- /* Ulgh! Old code that, for lval_register, sets ADDRP to the offset
- of the register in the register cache. It should instead return
- the REGNUM corresponding to that register. Translate the . */
- if (DEPRECATED_GET_SAVED_REGISTER_P ())
- {
- DEPRECATED_GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame,
- regnum, lvalp);
- /* Compute the REALNUM if the caller wants it. */
- if (*lvalp == lval_register)
- {
- int regnum;
- for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
- {
- if (*addrp == register_offset_hack (current_gdbarch, regnum))
- {
- *realnump = regnum;
- return;
- }
- }
- internal_error (__FILE__, __LINE__,
- "Failed to compute the register number corresponding"
- " to 0x%s", paddr_d (*addrp));
- }
- *realnump = -1;
- return;
- }
-
/* Obtain the register value by unwinding the register from the next
(more inner frame). */
gdb_assert (frame != NULL && frame->next != NULL);
@@ -653,7 +607,8 @@ frame_unwind_register_signed (struct frame_info *frame, int regnum)
{
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
- return extract_signed_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
+ return extract_signed_integer (buf, register_size (get_frame_arch (frame),
+ regnum));
}
LONGEST
@@ -667,7 +622,8 @@ frame_unwind_register_unsigned (struct frame_info *frame, int regnum)
{
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
- return extract_unsigned_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
+ return extract_unsigned_integer (buf, register_size (get_frame_arch (frame),
+ regnum));
}
ULONGEST
@@ -682,7 +638,9 @@ frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
{
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
- (*val) = extract_unsigned_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
+ (*val) = extract_unsigned_integer (buf,
+ register_size (get_frame_arch (frame),
+ regnum));
}
void
@@ -718,8 +676,7 @@ put_frame_register (struct frame_info *frame, int regnum, const void *buf)
/* frame_register_read ()
Find and return the value of REGNUM for the specified stack frame.
- The number of bytes copied is DEPRECATED_REGISTER_RAW_SIZE
- (REGNUM).
+ The number of bytes copied is REGISTER_SIZE (REGNUM).
Returns 0 if the register value could not be found. */
@@ -732,7 +689,7 @@ frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
int realnum;
frame_register (frame, regnum, &optimized, &lval, &addr, &realnum, myaddr);
- /* FIXME: cagney/2002-05-15: This test, is just bogus.
+ /* FIXME: cagney/2002-05-15: This test is just bogus.
It indicates that the target failed to supply a value for a
register because it was "not available" at this time. Problem
@@ -768,7 +725,6 @@ static struct frame_info *
create_sentinel_frame (struct regcache *regcache)
{
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
- frame->type = NORMAL_FRAME;
frame->level = -1;
/* Explicitly initialize the sentinel frame's cache. Provide it
with the underlying regcache. In the future additional
@@ -810,20 +766,6 @@ frame_obstack_zalloc (unsigned long size)
return data;
}
-CORE_ADDR *
-frame_saved_regs_zalloc (struct frame_info *fi)
-{
- fi->saved_regs = (CORE_ADDR *)
- frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
- return fi->saved_regs;
-}
-
-CORE_ADDR *
-deprecated_get_frame_saved_regs (struct frame_info *fi)
-{
- return fi->saved_regs;
-}
-
/* Return the innermost (currently executing) stack frame. This is
split into two functions. The function unwind_to_current_frame()
is wrapped in catch exceptions so that, even when the unwind of the
@@ -833,7 +775,7 @@ static int
unwind_to_current_frame (struct ui_out *ui_out, void *args)
{
struct frame_info *frame = get_prev_frame (args);
- /* A sentinel frame can fail to unwind, eg, because it's PC value
+ /* A sentinel frame can fail to unwind, e.g., because its PC value
lands in somewhere like start. */
if (frame == NULL)
return 1;
@@ -875,7 +817,7 @@ get_current_frame (void)
struct frame_info *deprecated_selected_frame;
-/* Return the selected frame. Always non-null (unless there isn't an
+/* Return the selected frame. Always non-NULL (unless there isn't an
inferior sufficient for creating a frame) in which case an error is
thrown. */
@@ -892,9 +834,9 @@ get_selected_frame (void)
return deprecated_selected_frame;
}
-/* This is a variant of get_selected_frame which can be called when
+/* This is a variant of get_selected_frame() which can be called when
the inferior does not have a frame; in that case it will return
- NULL instead of calling error (). */
+ NULL instead of calling error(). */
struct frame_info *
deprecated_safe_get_selected_frame (void)
@@ -912,26 +854,26 @@ select_frame (struct frame_info *fi)
struct symtab *s;
deprecated_selected_frame = fi;
- /* NOTE: cagney/2002-05-04: FI can be NULL. This occures when the
+ /* NOTE: cagney/2002-05-04: FI can be NULL. This occurs when the
frame is being invalidated. */
- if (selected_frame_level_changed_hook)
- selected_frame_level_changed_hook (frame_relative_level (fi));
+ if (deprecated_selected_frame_level_changed_hook)
+ deprecated_selected_frame_level_changed_hook (frame_relative_level (fi));
/* FIXME: kseitz/2002-08-28: It would be nice to call
- selected_frame_level_changed_event right here, but due to limitations
+ selected_frame_level_changed_event() right here, but due to limitations
in the current interfaces, we would end up flooding UIs with events
- because select_frame is used extensively internally.
+ because select_frame() is used extensively internally.
Once we have frame-parameterized frame (and frame-related) commands,
the event notification can be moved here, since this function will only
- be called when the users selected frame is being changed. */
+ be called when the user's selected frame is being changed. */
/* Ensure that symbols for this frame are read in. Also, determine the
source language of this frame, and switch to it if desired. */
if (fi)
{
/* We retrieve the frame's symtab by using the frame PC. However
- we cannot use the frame pc as is, because it usually points to
+ we cannot use the frame PC as-is, because it usually points to
the instruction following the "call", which is sometimes the
first instruction of another function. So we rely on
get_frame_address_in_block() which provides us with a PC which
@@ -946,240 +888,7 @@ select_frame (struct frame_info *fi)
}
}
}
-
-/* Return the register saved in the simplistic ``saved_regs'' cache.
- If the value isn't here AND a value is needed, try the next inner
- most frame. */
-
-static void
-legacy_saved_regs_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)
-{
- /* HACK: New code is passed the next frame and this cache.
- Unfortunately, old code expects this frame. Since this is a
- backward compatibility hack, cheat by walking one level along the
- prologue chain to the frame the old code expects.
-
- Do not try this at home. Professional driver, closed course. */
- struct frame_info *frame = next_frame->prev;
- gdb_assert (frame != NULL);
-
- if (deprecated_get_frame_saved_regs (frame) == NULL)
- {
- /* If nothing's initialized the saved regs, do it now. */
- gdb_assert (DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
- gdb_assert (deprecated_get_frame_saved_regs (frame) != NULL);
- }
-
- if (deprecated_get_frame_saved_regs (frame) != NULL
- && deprecated_get_frame_saved_regs (frame)[regnum] != 0)
- {
- if (regnum == SP_REGNUM)
- {
- /* SP register treated specially. */
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = -1;
- if (bufferp != NULL)
- /* NOTE: cagney/2003-05-09: In-lined store_address with
- it's body - store_unsigned_integer. */
- store_unsigned_integer (bufferp, DEPRECATED_REGISTER_RAW_SIZE (regnum),
- deprecated_get_frame_saved_regs (frame)[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 = deprecated_get_frame_saved_regs (frame)[regnum];
- *realnump = -1;
- if (bufferp != NULL)
- {
-#if 1
- /* Save each register value, as it is read in, in a
- frame based cache. */
- void **regs = (*this_prologue_cache);
- if (regs == NULL)
- {
- int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
- * sizeof (void *));
- regs = frame_obstack_zalloc (sizeof_cache);
- (*this_prologue_cache) = regs;
- }
- if (regs[regnum] == NULL)
- {
- regs[regnum]
- = frame_obstack_zalloc (DEPRECATED_REGISTER_RAW_SIZE (regnum));
- read_memory (deprecated_get_frame_saved_regs (frame)[regnum], regs[regnum],
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
- }
- memcpy (bufferp, regs[regnum], DEPRECATED_REGISTER_RAW_SIZE (regnum));
-#else
- /* Read the value in from memory. */
- read_memory (deprecated_get_frame_saved_regs (frame)[regnum], bufferp,
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
-#endif
- }
- }
- return;
- }
-
- /* No luck. Assume this and the next frame have the same register
- value. Pass the unwind request down the frame chain to the next
- frame. Hopefully that frame will find the register's location. */
- frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
-}
-
-static void
-legacy_saved_regs_this_id (struct frame_info *next_frame,
- void **this_prologue_cache,
- struct frame_id *id)
-{
- /* A developer is trying to bring up a new architecture, help them
- by providing a default unwinder that refuses to unwind anything
- (the ID is always NULL). In the case of legacy code,
- legacy_get_prev_frame() will have previously set ->this_id.p, so
- this code won't be called. */
- (*id) = null_frame_id;
-}
-const struct frame_unwind legacy_saved_regs_unwinder = {
- /* Not really. It gets overridden by legacy_get_prev_frame. */
- UNKNOWN_FRAME,
- legacy_saved_regs_this_id,
- legacy_saved_regs_prev_register
-};
-const struct frame_unwind *legacy_saved_regs_unwind = &legacy_saved_regs_unwinder;
-
-
-/* Function: deprecated_generic_get_saved_register
- Find register number REGNUM relative to FRAME and put its (raw,
- target format) contents in *RAW_BUFFER.
-
- Set *OPTIMIZED if the variable was optimized out (and thus can't be
- fetched). Note that this is never set to anything other than zero
- in this implementation.
-
- Set *LVAL to lval_memory, lval_register, or not_lval, depending on
- whether the value was fetched from memory, from a register, or in a
- strange and non-modifiable way (e.g. a frame pointer which was
- calculated rather than fetched). We will use not_lval for values
- fetched from generic dummy frames.
-
- Set *ADDRP to the address, either in memory or as a
- DEPRECATED_REGISTER_BYTE offset into the registers array. If the
- value is stored in a dummy frame, set *ADDRP to zero.
-
- The argument RAW_BUFFER must point to aligned memory. */
-
-void
-deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
- CORE_ADDR *addrp,
- struct frame_info *frame, int regnum,
- enum lval_type *lval)
-{
- if (!target_has_registers)
- error ("No registers.");
-
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
-
- if (addrp) /* default assumption: not found in memory */
- *addrp = 0;
-
- /* Note: since the current frame's registers could only have been
- saved by frames INTERIOR TO the current frame, we skip examining
- the current frame itself: otherwise, we would be getting the
- previous frame's registers which were saved by the current frame. */
-
- if (frame != NULL)
- {
- for (frame = get_next_frame (frame);
- frame_relative_level (frame) >= 0;
- frame = get_next_frame (frame))
- {
- if (get_frame_type (frame) == DUMMY_FRAME)
- {
- if (lval) /* found it in a CALL_DUMMY frame */
- *lval = not_lval;
- if (raw_buffer)
- /* FIXME: cagney/2002-06-26: This should be via the
- gdbarch_register_read() method so that it, on the
- fly, constructs either a raw or pseudo register
- from the raw register cache. */
- regcache_raw_read
- (deprecated_find_dummy_frame_regcache (get_frame_pc (frame),
- get_frame_base (frame)),
- regnum, raw_buffer);
- return;
- }
-
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
- if (deprecated_get_frame_saved_regs (frame) != NULL
- && deprecated_get_frame_saved_regs (frame)[regnum] != 0)
- {
- if (lval) /* found it saved on the stack */
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer) /* SP register treated specially */
- /* NOTE: cagney/2003-05-09: In-line store_address
- with it's body - store_unsigned_integer. */
- store_unsigned_integer (raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (regnum),
- deprecated_get_frame_saved_regs (frame)[regnum]);
- }
- else
- {
- if (addrp) /* any other register */
- *addrp = deprecated_get_frame_saved_regs (frame)[regnum];
- if (raw_buffer)
- read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
- }
- return;
- }
- }
- }
-
- /* If we get thru the loop to this point, it means the register was
- not saved in any frame. Return the actual live-register value. */
-
- if (lval) /* found it in a live register */
- *lval = lval_register;
- if (addrp)
- *addrp = DEPRECATED_REGISTER_BYTE (regnum);
- if (raw_buffer)
- deprecated_read_register_gen (regnum, raw_buffer);
-}
-
-/* Determine the frame's type based on its PC. */
-
-static enum frame_type
-frame_type_from_pc (CORE_ADDR pc)
-{
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && deprecated_pc_in_call_dummy (pc, 0, 0))
- return DUMMY_FRAME;
- else
- {
- char *name;
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
- return SIGTRAMP_FRAME;
- else
- return NORMAL_FRAME;
- }
-}
-
/* Create an arbitrary (i.e. address specified by user) or innermost frame.
Always returns a non-NULL value. */
@@ -1202,18 +911,11 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
/* Select/initialize both the unwind function and the frame's type
based on the PC. */
fi->unwind = frame_unwind_find_by_frame (fi->next, &fi->prologue_cache);
- if (fi->unwind->type != UNKNOWN_FRAME)
- fi->type = fi->unwind->type;
- else
- fi->type = frame_type_from_pc (pc);
fi->this_id.p = 1;
deprecated_update_frame_base_hack (fi, addr);
deprecated_update_frame_pc_hack (fi, pc);
- if (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ())
- DEPRECATED_INIT_EXTRA_FRAME_INFO (0, fi);
-
if (frame_debug)
{
fprintf_unfiltered (gdb_stdlog, "-> ");
@@ -1237,6 +939,14 @@ get_next_frame (struct frame_info *this_frame)
return NULL;
}
+/* Observer for the target_changed event. */
+
+void
+frame_observer_target_changed (struct target_ops *target)
+{
+ flush_cached_frames ();
+}
+
/* Flush the entire frame cache. */
void
@@ -1267,471 +977,6 @@ reinit_frame_cache (void)
}
}
-/* Create the previous frame using the deprecated methods
- INIT_EXTRA_INFO, INIT_FRAME_PC and INIT_FRAME_PC_FIRST. */
-
-static struct frame_info *
-legacy_get_prev_frame (struct frame_info *this_frame)
-{
- CORE_ADDR address = 0;
- struct frame_info *prev;
- int fromleaf;
-
- /* Don't frame_debug print legacy_get_prev_frame() here, just
- confuses the output. */
-
- /* Allocate the new frame.
-
- There is no reason to worry about memory leaks, should the
- remainder of the function fail. The allocated memory will be
- quickly reclaimed when the frame cache is flushed, and the `we've
- been here before' check, in get_prev_frame will stop repeated
- memory allocation calls. */
- prev = FRAME_OBSTACK_ZALLOC (struct frame_info);
- prev->level = this_frame->level + 1;
-
- /* Do not completely wire it in to the frame chain. Some (bad) code
- in INIT_FRAME_EXTRA_INFO tries to look along frame->prev to pull
- some fancy tricks (of course such code is, by definition,
- recursive).
-
- On the other hand, methods, such as get_frame_pc() and
- get_frame_base() rely on being able to walk along the frame
- chain. Make certain that at least they work by providing that
- link. Of course things manipulating prev can't go back. */
- prev->next = this_frame;
-
- /* NOTE: cagney/2002-11-18: Should have been correctly setting the
- frame's type here, before anything else, and not last, at the
- bottom of this function. The various
- DEPRECATED_INIT_EXTRA_FRAME_INFO, DEPRECATED_INIT_FRAME_PC,
- DEPRECATED_INIT_FRAME_PC_FIRST and
- DEPRECATED_FRAME_INIT_SAVED_REGS methods are full of work-arounds
- that handle the frame not being correctly set from the start.
- Unfortunately those same work-arounds rely on the type defaulting
- to NORMAL_FRAME. Ulgh! The new frame code does not have this
- problem. */
- prev->type = UNKNOWN_FRAME;
-
- /* A legacy frame's ID is always computed here. Mark it as valid. */
- prev->this_id.p = 1;
-
- /* Handle sentinel frame unwind as a special case. */
- if (this_frame->level < 0)
- {
- /* Try to unwind the PC. If that doesn't work, assume we've reached
- the oldest frame and simply return. Is there a better sentinal
- value? The unwound PC value is then used to initialize the new
- previous frame's type.
-
- Note that the pc-unwind is intentionally performed before the
- frame chain. This is ok since, for old targets, both
- frame_pc_unwind (nee, DEPRECATED_FRAME_SAVED_PC) and
- DEPRECATED_FRAME_CHAIN()) assume THIS_FRAME's data structures
- have already been initialized (using
- DEPRECATED_INIT_EXTRA_FRAME_INFO) and hence the call order
- doesn't matter.
-
- By unwinding the PC first, it becomes possible to, in the case of
- a dummy frame, avoid also unwinding the frame ID. This is
- because (well ignoring the PPC) a dummy frame can be located
- using THIS_FRAME's frame ID. */
-
- deprecated_update_frame_pc_hack (prev, frame_pc_unwind (this_frame));
- if (get_frame_pc (prev) == 0)
- {
- /* The allocated PREV_FRAME will be reclaimed when the frame
- obstack is next purged. */
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog,
- " // unwound legacy PC zero }\n");
- }
- return NULL;
- }
-
- /* Set the unwind functions based on that identified PC. Ditto
- for the "type" but strongly prefer the unwinder's frame type. */
- prev->unwind = frame_unwind_find_by_frame (prev->next,
- &prev->prologue_cache);
- if (prev->unwind->type == UNKNOWN_FRAME)
- prev->type = frame_type_from_pc (get_frame_pc (prev));
- else
- prev->type = prev->unwind->type;
-
- /* Find the prev's frame's ID. */
- if (prev->type == DUMMY_FRAME
- && gdbarch_unwind_dummy_id_p (current_gdbarch))
- {
- /* When unwinding a normal frame, the stack structure is
- determined by analyzing the frame's function's code (be
- it using brute force prologue analysis, or the dwarf2
- CFI). In the case of a dummy frame, that simply isn't
- possible. The The PC is either the program entry point,
- or some random address on the stack. Trying to use that
- PC to apply standard frame ID unwind techniques is just
- asking for trouble. */
- /* 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 determine the dummy frame's ID. */
- prev->this_id.value = gdbarch_unwind_dummy_id (current_gdbarch,
- this_frame);
- }
- else
- {
- /* We're unwinding a sentinel frame, the PC of which is
- pointing at a stack dummy. Fake up the dummy frame's ID
- using the same sequence as is found a traditional
- unwinder. Once all architectures supply the
- unwind_dummy_id method, this code can go away. */
- prev->this_id.value = frame_id_build (deprecated_read_fp (),
- read_pc ());
- }
-
- /* Check that the unwound ID is valid. */
- if (!frame_id_p (prev->this_id.value))
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog,
- " // unwound legacy ID invalid }\n");
- }
- return NULL;
- }
-
- /* Check that the new frame isn't inner to (younger, below,
- next) the old frame. If that happens the frame unwind is
- going backwards. */
- /* FIXME: cagney/2003-02-25: Ignore the sentinel frame since
- that doesn't have a valid frame ID. Should instead set the
- sentinel frame's frame ID to a `sentinel'. Leave it until
- after the switch to storing the frame ID, instead of the
- frame base, in the frame object. */
-
- /* Link it in. */
- this_frame->prev = prev;
-
- /* FIXME: cagney/2002-01-19: This call will go away. Instead of
- initializing extra info, all frames will use the frame_cache
- (passed to the unwind functions) to store additional frame
- info. Unfortunately legacy targets can't use
- legacy_get_prev_frame() to unwind the sentinel frame and,
- consequently, are forced to take this code path and rely on
- the below call to DEPRECATED_INIT_EXTRA_FRAME_INFO to
- initialize the inner-most frame. */
- if (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ())
- {
- DEPRECATED_INIT_EXTRA_FRAME_INFO (0, prev);
- }
-
- if (prev->type == NORMAL_FRAME)
- prev->this_id.value.code_addr
- = get_pc_function_start (prev->this_id.value.code_addr);
-
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, prev);
- fprintf_unfiltered (gdb_stdlog, " } // legacy innermost frame\n");
- }
- return prev;
- }
-
- /* This code only works on normal frames. A sentinel frame, where
- the level is -1, should never reach this code. */
- gdb_assert (this_frame->level >= 0);
-
- /* On some machines it is possible to call a function without
- setting up a stack frame for it. On these machines, we
- define this macro to take two args; a frameinfo pointer
- identifying a frame and a variable to set or clear if it is
- or isn't leafless. */
-
- /* Still don't want to worry about this except on the innermost
- frame. This macro will set FROMLEAF if THIS_FRAME is a frameless
- function invocation. */
- if (this_frame->level == 0)
- /* FIXME: 2002-11-09: Frameless functions can occure anywhere in
- the frame chain, not just the inner most frame! The generic,
- per-architecture, frame code should handle this and the below
- should simply be removed. */
- fromleaf = (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
- && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (this_frame));
- else
- fromleaf = 0;
-
- if (fromleaf)
- /* A frameless inner-most frame. The `FP' (which isn't an
- architecture frame-pointer register!) of the caller is the same
- as the callee. */
- /* FIXME: 2002-11-09: There isn't any reason to special case this
- edge condition. Instead the per-architecture code should hande
- it locally. */
- /* FIXME: cagney/2003-06-16: This returns the inner most stack
- address for the previous frame, that, however, is wrong. It
- should be the inner most stack address for the previous to
- previous frame. This is because it is the previous to previous
- frame's innermost stack address that is constant through out
- the lifetime of the previous frame (trust me :-). */
- address = get_frame_base (this_frame);
- else
- {
- /* Two macros defined in tm.h specify the machine-dependent
- actions to be performed here.
-
- First, get the frame's chain-pointer.
-
- If that is zero, the frame is the outermost frame or a leaf
- called by the outermost frame. This means that if start
- calls main without a frame, we'll return 0 (which is fine
- anyway).
-
- Nope; there's a problem. This also returns when the current
- routine is a leaf of main. This is unacceptable. We move
- this to after the ffi test; I'd rather have backtraces from
- start go curfluy than have an abort called from main not show
- main. */
- if (DEPRECATED_FRAME_CHAIN_P ())
- address = DEPRECATED_FRAME_CHAIN (this_frame);
- else
- {
- /* Someone is part way through coverting an old architecture
- to the new frame code. Implement FRAME_CHAIN the way the
- new frame will. */
- /* Find PREV frame's unwinder. */
- prev->unwind = frame_unwind_find_by_frame (this_frame,
- &prev->prologue_cache);
- /* FIXME: cagney/2003-04-02: Rather than storing the frame's
- type in the frame, the unwinder's type should be returned
- directly. Unfortunately, legacy code, called by
- legacy_get_prev_frame, explicitly set the frames type
- using the method deprecated_set_frame_type(). */
- prev->type = prev->unwind->type;
- /* Find PREV frame's ID. */
- prev->unwind->this_id (this_frame,
- &prev->prologue_cache,
- &prev->this_id.value);
- prev->this_id.p = 1;
- address = prev->this_id.value.stack_addr;
- }
-
- if (!legacy_frame_chain_valid (address, this_frame))
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog,
- " // legacy frame chain invalid }\n");
- }
- return NULL;
- }
- }
- if (address == 0)
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog,
- " // legacy frame chain NULL }\n");
- }
- return NULL;
- }
-
- /* Link in the already allocated prev frame. */
- this_frame->prev = prev;
- deprecated_update_frame_base_hack (prev, address);
-
- /* This change should not be needed, FIXME! We should determine
- whether any targets *need* DEPRECATED_INIT_FRAME_PC to happen
- after DEPRECATED_INIT_EXTRA_FRAME_INFO and come up with a simple
- way to express what goes on here.
-
- DEPRECATED_INIT_EXTRA_FRAME_INFO is called from two places:
- create_new_frame (where the PC is already set up) and here (where
- it isn't). DEPRECATED_INIT_FRAME_PC is only called from here,
- always after DEPRECATED_INIT_EXTRA_FRAME_INFO.
-
- The catch is the MIPS, where DEPRECATED_INIT_EXTRA_FRAME_INFO
- requires the PC value (which hasn't been set yet). Some other
- machines appear to require DEPRECATED_INIT_EXTRA_FRAME_INFO
- before they can do DEPRECATED_INIT_FRAME_PC. Phoo.
-
- We shouldn't need DEPRECATED_INIT_FRAME_PC_FIRST to add more
- complication to an already overcomplicated part of GDB.
- gnu@cygnus.com, 15Sep92.
-
- Assuming that some machines need DEPRECATED_INIT_FRAME_PC after
- DEPRECATED_INIT_EXTRA_FRAME_INFO, one possible scheme:
-
- SETUP_INNERMOST_FRAME(): Default version is just create_new_frame
- (deprecated_read_fp ()), read_pc ()). Machines with extra frame
- info would do that (or the local equivalent) and then set the
- extra fields.
-
- SETUP_ARBITRARY_FRAME(argc, argv): Only change here is that
- create_new_frame would no longer init extra frame info;
- SETUP_ARBITRARY_FRAME would have to do that.
-
- INIT_PREV_FRAME(fromleaf, prev) Replace
- DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC.
- This should also return a flag saying whether to keep the new
- frame, or whether to discard it, because on some machines (e.g.
- mips) it is really awkward to have DEPRECATED_FRAME_CHAIN_VALID
- called BEFORE DEPRECATED_INIT_EXTRA_FRAME_INFO (there is no good
- way to get information deduced in DEPRECATED_FRAME_CHAIN_VALID
- into the extra fields of the new frame). std_frame_pc(fromleaf,
- prev)
-
- This is the default setting for INIT_PREV_FRAME. It just does
- what the default DEPRECATED_INIT_FRAME_PC does. Some machines
- will call it from INIT_PREV_FRAME (either at the beginning, the
- end, or in the middle). Some machines won't use it.
-
- kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
-
- /* NOTE: cagney/2002-11-09: Just ignore the above! There is no
- reason for things to be this complicated.
-
- The trick is to assume that there is always a frame. Instead of
- special casing the inner-most frame, create fake frame
- (containing the hardware registers) that is inner to the
- user-visible inner-most frame (...) and then unwind from that.
- That way architecture code can use use the standard
- frame_XX_unwind() functions and not differentiate between the
- inner most and any other case.
-
- Since there is always a frame to unwind from, there is always
- somewhere (THIS_FRAME) to store all the info needed to construct
- a new (previous) frame without having to first create it. This
- means that the convolution below - needing to carefully order a
- frame's initialization - isn't needed.
-
- The irony here though, is that DEPRECATED_FRAME_CHAIN(), at least
- for a more up-to-date architecture, always calls
- FRAME_SAVED_PC(), and FRAME_SAVED_PC() computes the PC but
- without first needing the frame! Instead of the convolution
- below, we could have simply called FRAME_SAVED_PC() and been done
- with it! Note that FRAME_SAVED_PC() is being superseed by
- frame_pc_unwind() and that function does have somewhere to cache
- that PC value. */
-
- if (DEPRECATED_INIT_FRAME_PC_FIRST_P ())
- deprecated_update_frame_pc_hack (prev,
- DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf,
- prev));
-
- if (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ())
- DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, prev);
-
- /* This entry is in the frame queue now, which is good since
- FRAME_SAVED_PC may use that queue to figure out its value (see
- tm-sparc.h). We want the pc saved in the inferior frame. */
- if (DEPRECATED_INIT_FRAME_PC_P ())
- deprecated_update_frame_pc_hack (prev,
- DEPRECATED_INIT_FRAME_PC (fromleaf,
- prev));
-
- /* If ->frame and ->pc are unchanged, we are in the process of
- getting ourselves into an infinite backtrace. Some architectures
- check this in DEPRECATED_FRAME_CHAIN or thereabouts, but it seems
- like there is no reason this can't be an architecture-independent
- check. */
- if (get_frame_base (prev) == get_frame_base (this_frame)
- && get_frame_pc (prev) == get_frame_pc (this_frame))
- {
- this_frame->prev = NULL;
- obstack_free (&frame_cache_obstack, prev);
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog,
- " // legacy this.id == prev.id }\n");
- }
- return NULL;
- }
-
- /* Initialize the code used to unwind the frame PREV based on the PC
- (and probably other architectural information). The PC lets you
- check things like the debug info at that point (dwarf2cfi?) and
- use that to decide how the frame should be unwound.
-
- If there isn't a FRAME_CHAIN, the code above will have already
- done this. */
- if (prev->unwind == NULL)
- prev->unwind = frame_unwind_find_by_frame (prev->next,
- &prev->prologue_cache);
-
- /* If the unwinder provides a frame type, use it. Otherwize
- continue on to that heuristic mess. */
- if (prev->unwind->type != UNKNOWN_FRAME)
- {
- prev->type = prev->unwind->type;
- if (prev->type == NORMAL_FRAME)
- /* FIXME: cagney/2003-06-16: would get_frame_pc() be better? */
- prev->this_id.value.code_addr
- = get_pc_function_start (prev->this_id.value.code_addr);
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, prev);
- fprintf_unfiltered (gdb_stdlog, " } // legacy with unwound type\n");
- }
- return prev;
- }
-
- /* NOTE: cagney/2002-11-18: The code segments, found in
- create_new_frame and get_prev_frame(), that initializes the
- frames type is subtly different. The latter only updates ->type
- when it encounters a SIGTRAMP_FRAME or DUMMY_FRAME. This stops
- get_prev_frame() overriding the frame's type when the INIT code
- has previously set it. This is really somewhat bogus. The
- initialization, as seen in create_new_frame(), should occur
- before the INIT function has been called. */
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0))
- prev->type = DUMMY_FRAME;
- else
- {
- /* FIXME: cagney/2002-11-10: This should be moved to before the
- INIT code above so that the INIT code knows what the frame's
- type is (in fact, for a [generic] dummy-frame, the type can
- be set and then the entire initialization can be skipped.
- Unforunatly, its the INIT code that sets the PC (Hmm, catch
- 22). */
- char *name;
- find_pc_partial_function (get_frame_pc (prev), &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (get_frame_pc (prev), name))
- prev->type = SIGTRAMP_FRAME;
- /* FIXME: cagney/2002-11-11: Leave prev->type alone. Some
- architectures are forcing the frame's type in INIT so we
- don't want to override it here. Remember, NORMAL_FRAME == 0,
- so it all works (just :-/). Once this initialization is
- moved to the start of this function, all this nastness will
- go away. */
- }
-
- if (prev->type == NORMAL_FRAME)
- prev->this_id.value.code_addr
- = get_pc_function_start (prev->this_id.value.code_addr);
-
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, prev);
- fprintf_unfiltered (gdb_stdlog, " } // legacy with confused type\n");
- }
-
- return prev;
-}
-
/* Return a "struct frame_info" corresponding to the frame that called
THIS_FRAME. Returns NULL if there is no such frame.
@@ -1742,6 +987,7 @@ static struct frame_info *
get_prev_frame_1 (struct frame_info *this_frame)
{
struct frame_info *prev_frame;
+ struct frame_id this_id;
gdb_assert (this_frame != NULL);
@@ -1768,18 +1014,11 @@ get_prev_frame_1 (struct frame_info *this_frame)
}
this_frame->prev_p = 1;
- /* If any of the old frame initialization methods are around, use
- the legacy get_prev_frame method. */
- if (legacy_frame_p (current_gdbarch))
- {
- prev_frame = legacy_get_prev_frame (this_frame);
- return prev_frame;
- }
-
/* Check that this frame's ID was valid. If it wasn't, don't try to
unwind to the prev frame. Be careful to not apply this test to
the sentinel frame. */
- if (this_frame->level >= 0 && !frame_id_p (get_frame_id (this_frame)))
+ this_id = get_frame_id (this_frame);
+ if (this_frame->level >= 0 && !frame_id_p (this_id))
{
if (frame_debug)
{
@@ -1792,19 +1031,18 @@ get_prev_frame_1 (struct frame_info *this_frame)
/* Check that this frame's ID isn't inner to (younger, below, next)
the next frame. This happens when a frame unwind goes backwards.
- Since the sentinel frame doesn't really exist, don't compare the
- inner-most against that sentinel. */
- if (this_frame->level > 0
- && frame_id_inner (get_frame_id (this_frame),
- get_frame_id (this_frame->next)))
+ Exclude signal trampolines (due to sigaltstack the frame ID can
+ go backwards) and sentinel frames (the test is meaningless). */
+ if (this_frame->next->level >= 0
+ && this_frame->next->unwind->type != SIGTRAMP_FRAME
+ && frame_id_inner (this_id, get_frame_id (this_frame->next)))
error ("Previous frame inner to this frame (corrupt stack?)");
/* Check that this and the next frame are not identical. If they
are, there is most likely a stack cycle. As with the inner-than
test above, avoid comparing the inner-most and sentinel frames. */
if (this_frame->level > 0
- && frame_id_eq (get_frame_id (this_frame),
- get_frame_id (this_frame->next)))
+ && frame_id_eq (this_id, get_frame_id (this_frame->next)))
error ("Previous frame identical to this frame (corrupt stack?)");
/* Allocate the new frame but do not wire it in to the frame chain.
@@ -1871,6 +1109,27 @@ frame_debug_got_null_frame (struct ui_file *file,
}
}
+/* Is this (non-sentinel) frame in the "main"() function? */
+
+static int
+inside_main_func (struct frame_info *this_frame)
+{
+ struct minimal_symbol *msymbol;
+ CORE_ADDR maddr;
+
+ if (symfile_objfile == 0)
+ return 0;
+ msymbol = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
+ if (msymbol == NULL)
+ return 0;
+ /* Make certain that the code, and not descriptor, address is
+ returned. */
+ maddr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ SYMBOL_VALUE_ADDRESS (msymbol),
+ &current_target);
+ return maddr == get_frame_func (this_frame);
+}
+
/* Return a structure containing various interesting information about
the frame that called THIS_FRAME. Returns NULL if there is entier
no such frame or the frame fails any of a set of target-independent
@@ -1896,9 +1155,9 @@ get_prev_frame (struct frame_info *this_frame)
while (1) { frame = get_prev_frame (frame); .... }. Ulgh! Why
it couldn't be written better, I don't know.
- NOTE: cagney/2003-01-11: I suspect what is happening is
+ NOTE: cagney/2003-01-11: I suspect what is happening in
block_innermost_frame() is, when the target has no state
- (registers, memory, ...), still calling this function. The
+ (registers, memory, ...), it is still calling this function. The
assumption being that this function will return NULL indicating
that a frame isn't possible, rather than checking that the target
has state and then calling get_current_frame() and
@@ -1926,17 +1185,13 @@ get_prev_frame (struct frame_info *this_frame)
get_current_frame(). */
gdb_assert (this_frame != NULL);
- /* Make sure we pass an address within THIS_FRAME's code block to
- inside_main_func. Otherwise, we might stop unwinding at a
- function which has a call instruction as its last instruction if
- that function immediately precedes main(). */
if (this_frame->level >= 0
&& !backtrace_past_main
- && inside_main_func (get_frame_address_in_block (this_frame)))
- /* Don't unwind past main(), bug always unwind the sentinel frame.
- Note, this is done _before_ the frame has been marked as
- previously unwound. That way if the user later decides to
- allow unwinds past main(), that just happens. */
+ && inside_main_func (this_frame))
+ /* Don't unwind past main(). Note, this is done _before_ the
+ frame has been marked as previously unwound. That way if the
+ user later decides to enable unwinds past main(), that will
+ automatically happen. */
{
frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside main func");
return NULL;
@@ -1949,22 +1204,21 @@ get_prev_frame (struct frame_info *this_frame)
/* If we're already inside the entry function for the main objfile,
then it isn't valid. Don't apply this test to a dummy frame -
- dummy frame PC's typically land in the entry func. Don't apply
+ dummy frame PCs typically land in the entry func. Don't apply
this test to the sentinel frame. Sentinel frames should always
be allowed to unwind. */
/* NOTE: cagney/2003-02-25: Don't enable until someone has found
hard evidence that this is needed. */
- /* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func - wasn't
- checking for "main" in the minimal symbols. With that fixed
- asm-source tests now stop in "main" instead of halting the
- backtrace in wierd and wonderful ways somewhere inside the entry
- file. Suspect that deprecated_inside_entry_file and
- inside_entry_func tests were added to work around that (now
- fixed) case. */
+ /* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func() -
+ wasn't checking for "main" in the minimal symbols. With that
+ fixed asm-source tests now stop in "main" instead of halting the
+ backtrace in weird and wonderful ways somewhere inside the entry
+ file. Suspect that tests for inside the entry file/func were
+ added to work around that (now fixed) case. */
/* NOTE: cagney/2003-07-15: danielj (if I'm reading it right)
suggested having the inside_entry_func test use the
- inside_main_func msymbol trick (along with entry_point_address I
- guess) to determine the address range of the start function.
+ inside_main_func() msymbol trick (along with entry_point_address()
+ I guess) to determine the address range of the start function.
That should provide a far better stopper than the current
heuristics. */
/* NOTE: cagney/2003-07-15: Need to add a "set backtrace
@@ -1974,42 +1228,13 @@ get_prev_frame (struct frame_info *this_frame)
#if 0
&& backtrace_beyond_entry_func
#endif
- && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
+ && this_frame->unwind->type != DUMMY_FRAME && this_frame->level >= 0
&& inside_entry_func (this_frame))
{
frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry func");
return NULL;
}
- /* If we're inside the entry file, it isn't valid. Don't apply this
- test to a dummy frame - dummy frame PC's typically land in the
- entry file. Don't apply this test to the sentinel frame.
- Sentinel frames should always be allowed to unwind. */
- /* NOTE: drow/2002-12-25: should there be a way to disable this
- check? It assumes a single small entry file, and the way some
- debug readers (e.g. dbxread) figure out which object is the
- entry file is somewhat hokey. */
- /* NOTE: cagney/2003-01-10: If there is a way of disabling this test
- then it should probably be moved to before the ->prev_p test,
- above. */
- /* NOTE: vinschen/2003-04-01: Disabled. It turns out that the call
- to deprecated_inside_entry_file destroys a meaningful backtrace
- under some conditions. E. g. the backtrace tests in the
- asm-source testcase are broken for some targets. In this test
- the functions are all implemented as part of one file and the
- testcase is not necessarily linked with a start file (depending
- on the target). What happens is, that the first frame is printed
- normaly and following frames are treated as being inside the
- enttry file then. This way, only the #0 frame is printed in the
- backtrace output. */
- if (0
- && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
- && deprecated_inside_entry_file (get_frame_pc (this_frame)))
- {
- frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry file");
- return NULL;
- }
-
return get_prev_frame_1 (this_frame);
}
@@ -2034,7 +1259,7 @@ frame_unwind_address_in_block (struct frame_info *next_frame)
"call". Adjust that PC value so that it falls on the call
instruction (which, hopefully, falls within THIS frame's code
block. So far it's proved to be a very good approximation. See
- get_frame_type for why ->type can't be used. */
+ get_frame_type() for why ->type can't be used. */
if (next_frame->level >= 0
&& get_frame_type (next_frame) == NORMAL_FRAME)
--pc;
@@ -2145,53 +1370,12 @@ frame_relative_level (struct frame_info *fi)
enum frame_type
get_frame_type (struct frame_info *frame)
{
- /* Some targets still don't use [generic] dummy frames. Catch them
- here. */
- if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && deprecated_frame_in_dummy (frame))
- return DUMMY_FRAME;
-
- /* Some legacy code, e.g, mips_init_extra_frame_info() wants
- to determine the frame's type prior to it being completely
- initialized. Don't attempt to lazily initialize ->unwind for
- legacy code. It will be initialized in legacy_get_prev_frame(). */
- if (frame->unwind == NULL && !legacy_frame_p (current_gdbarch))
- {
- /* Initialize the frame's unwinder because it is that which
- provides the frame's type. */
- frame->unwind = frame_unwind_find_by_frame (frame->next,
- &frame->prologue_cache);
- /* FIXME: cagney/2003-04-02: Rather than storing the frame's
- type in the frame, the unwinder's type should be returned
- directly. Unfortunately, legacy code, called by
- legacy_get_prev_frame, explicitly set the frames type using
- the method deprecated_set_frame_type(). */
- frame->type = frame->unwind->type;
- }
- if (frame->type == UNKNOWN_FRAME)
- return NORMAL_FRAME;
- else
- return frame->type;
-}
-
-void
-deprecated_set_frame_type (struct frame_info *frame, enum frame_type type)
-{
- /* Arrrg! See comment in "frame.h". */
- frame->type = type;
-}
-
-struct frame_extra_info *
-get_frame_extra_info (struct frame_info *fi)
-{
- return fi->extra_info;
-}
-
-struct frame_extra_info *
-frame_extra_info_zalloc (struct frame_info *fi, long size)
-{
- fi->extra_info = frame_obstack_zalloc (size);
- return fi->extra_info;
+ if (frame->unwind == NULL)
+ /* Initialize the frame's unwinder because that's what
+ provides the frame's type. */
+ frame->unwind = frame_unwind_find_by_frame (frame->next,
+ &frame->prologue_cache);
+ return frame->unwind->type;
}
void
@@ -2202,7 +1386,7 @@ deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
"{ deprecated_update_frame_pc_hack (frame=%d,pc=0x%s) }\n",
frame->level, paddr_nz (pc));
/* NOTE: cagney/2003-03-11: Some architectures (e.g., Arm) are
- maintaining a locally allocated frame object. Since such frame's
+ maintaining a locally allocated frame object. Since such frames
are not in the frame chain, it isn't possible to assume that the
frame has a next. Sigh. */
if (frame->next != NULL)
@@ -2226,27 +1410,6 @@ deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
frame->this_id.value.stack_addr = base;
}
-struct frame_info *
-deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
- long sizeof_extra_info)
-{
- struct frame_info *frame = XMALLOC (struct frame_info);
- memset (frame, 0, sizeof (*frame));
- frame->this_id.p = 1;
- make_cleanup (xfree, frame);
- if (sizeof_saved_regs > 0)
- {
- frame->saved_regs = xcalloc (1, sizeof_saved_regs);
- make_cleanup (xfree, frame->saved_regs);
- }
- if (sizeof_extra_info > 0)
- {
- frame->extra_info = xcalloc (1, sizeof_extra_info);
- make_cleanup (xfree, frame->extra_info);
- }
- return frame;
-}
-
/* Memory access methods. */
void
@@ -2270,6 +1433,14 @@ get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr,
return read_memory_unsigned_integer (addr, len);
}
+int
+safe_frame_unwind_memory (struct frame_info *this_frame,
+ CORE_ADDR addr, void *buf, int len)
+{
+ /* NOTE: deprecated_read_memory_nobpt returns zero on success! */
+ return !deprecated_read_memory_nobpt (addr, buf, len);
+}
+
/* Architecture method. */
struct gdbarch *
@@ -2289,12 +1460,12 @@ get_frame_sp (struct frame_info *this_frame)
CORE_ADDR
frame_sp_unwind (struct frame_info *next_frame)
{
- /* Normality, an architecture that provides a way of obtaining any
+ /* 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. */
+ 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
@@ -2308,34 +1479,6 @@ frame_sp_unwind (struct frame_info *next_frame)
internal_error (__FILE__, __LINE__, "Missing unwind SP method");
}
-
-int
-legacy_frame_p (struct gdbarch *current_gdbarch)
-{
- if (DEPRECATED_INIT_FRAME_PC_P ()
- || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
- || DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
- || DEPRECATED_FRAME_CHAIN_P ())
- /* No question, it's a legacy frame. */
- return 1;
- if (gdbarch_unwind_dummy_id_p (current_gdbarch))
- /* No question, it's not a legacy frame (provided none of the
- deprecated methods checked above are present that is). */
- return 0;
- if (DEPRECATED_TARGET_READ_FP_P ()
- || DEPRECATED_FP_REGNUM >= 0)
- /* Assume it's legacy. If you're trying to convert a legacy frame
- target to the new mechanism, get rid of these. legacy
- get_prev_frame requires these when unwind_frame_id isn't
- available. */
- return 1;
- /* Default to assuming that it's brand new code, and hence not
- legacy. Force it down the non-legacy path so that the new code
- uses the new frame mechanism from day one. Dummy frame's won't
- work very well but we can live with that. */
- return 0;
-}
-
extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
static struct cmd_list_element *set_backtrace_cmdlist;
@@ -2358,6 +1501,8 @@ _initialize_frame (void)
{
obstack_init (&frame_cache_obstack);
+ observer_attach_target_changed (frame_observer_target_changed);
+
add_prefix_cmd ("backtrace", class_maintenance, set_backtrace_cmd, "\
Set backtrace specific variables.\n\
Configure backtrace variables such as the backtrace limit",
@@ -2371,29 +1516,29 @@ Show backtrace variables such as the backtrace limit",
add_setshow_boolean_cmd ("past-main", class_obscure,
&backtrace_past_main, "\
-Set whether backtraces should continue past \"main\".\n\
+Set whether backtraces should continue past \"main\".", "\
+Show whether backtraces should continue past \"main\".", "\
Normally the caller of \"main\" is not of interest, so GDB will terminate\n\
the backtrace at \"main\". Set this variable if you need to see the rest\n\
of the stack trace.", "\
-Show whether backtraces should continue past \"main\".\n\
-Normally the caller of \"main\" is not of interest, so GDB will terminate\n\
-the backtrace at \"main\". Set this variable if you need to see the rest\n\
-of the stack trace.",
+Whether backtraces should continue past \"main\" is %s.",
NULL, NULL, &set_backtrace_cmdlist,
&show_backtrace_cmdlist);
add_setshow_uinteger_cmd ("limit", class_obscure,
&backtrace_limit, "\
-Set an upper bound on the number of backtrace levels.\n\
+Set an upper bound on the number of backtrace levels.", "\
+Show the upper bound on the number of backtrace levels.", "\
No more than the specified number of frames can be displayed or examined.\n\
Zero is unlimited.", "\
-Show the upper bound on the number of backtrace levels.",
+An upper bound on the number of backtrace levels is %s.",
NULL, NULL, &set_backtrace_cmdlist,
&show_backtrace_cmdlist);
/* Debug this files internals. */
- add_show_from_set (add_set_cmd ("frame", class_maintenance, var_zinteger,
- &frame_debug, "Set frame debugging.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("frame", class_maintenance, var_zinteger,
+ &frame_debug, "Set frame debugging.\n\
When non-zero, frame specific internal debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
}
diff --git a/gdb/frame.h b/gdb/frame.h
index 3e38c6106b5..f4b10891b46 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -40,8 +40,8 @@
strongly hinting at its unsafeness)
safe_....(): Safer version of various functions, doesn't throw an
- error (leave this for later?). Returns non-zero if the fetch
- succeeds. Return a freshly allocated error message?
+ error (leave this for later?). Returns non-zero / non-NULL if the
+ request succeeds, zero / NULL otherwize.
Suffixes:
@@ -71,10 +71,6 @@ struct block;
struct gdbarch;
struct ui_file;
-/* A legacy unwinder to prop up architectures using the old style
- saved regs array. */
-extern const struct frame_unwind *legacy_saved_regs_unwind;
-
/* The frame object. */
struct frame_info;
@@ -94,23 +90,39 @@ struct frame_id
outer-most address (the inner-most address of the previous frame)
is used. Watch out for all the legacy targets that still use the
function pointer register or stack pointer register. They are
- wrong. */
+ wrong.
+
+ This field is valid only if stack_addr_p is true. Otherwise, this
+ frame represents the null frame. */
CORE_ADDR stack_addr;
+
/* The frame's code address. This shall be constant through out the
lifetime of the frame. While the PC (a.k.a. resume address)
changes as the function is executed, this code address cannot.
Typically, it is set to the address of the entry point of the
- frame's function (as returned by frame_func_unwind(). */
+ frame's function (as returned by frame_func_unwind().
+
+ This field is valid only if code_addr_p is true. Otherwise, this
+ frame is considered to have a wildcard code address, i.e. one that
+ matches every address value in frame comparisons. */
CORE_ADDR code_addr;
+
/* The frame's special address. This shall be constant through out the
lifetime of the frame. This is used for architectures that may have
frames that do not change the stack but are still distinct and have
some form of distinct identifier (e.g. the ia64 which uses a 2nd
stack for registers). This field is treated as unordered - i.e. will
not be used in frame ordering comparisons such as frame_id_inner().
- A zero in this field will be treated as a wild-card when comparing
- frames for equality. */
+
+ This field is valid only if special_addr_p is true. Otherwise, this
+ frame is considered to have a wildcard special address, i.e. one that
+ matches every address value in frame comparisons. */
CORE_ADDR special_addr;
+
+ /* Flags to indicate the above fields have valid contents. */
+ unsigned int stack_addr_p : 1;
+ unsigned int code_addr_p : 1;
+ unsigned int special_addr_p : 1;
};
/* Methods for constructing and comparing Frame IDs.
@@ -135,22 +147,24 @@ extern const struct frame_id null_frame_id;
/* Construct a frame ID. The first parameter is the frame's constant
stack address (typically the outer-bound), and the second the
- frame's constant code address (typically the entry point) (or zero,
- to indicate a wild card). The special identifier address is
- defaulted to zero. */
+ frame's constant code address (typically the entry point).
+ The special identifier address is set to indicate a wild card. */
extern struct frame_id frame_id_build (CORE_ADDR stack_addr,
CORE_ADDR code_addr);
/* Construct a special frame ID. The first parameter is the frame's constant
stack address (typically the outer-bound), the second is the
- frame's constant code address (typically the entry point) (or zero,
- to indicate a wild card), and the third parameter is the frame's
- special identifier address (or zero to indicate a wild card or
- unused default). */
+ frame's constant code address (typically the entry point),
+ and the third parameter is the frame's special identifier address. */
extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr,
CORE_ADDR code_addr,
CORE_ADDR special_addr);
+/* Construct a wild card frame ID. The parameter is the frame's constant
+ stack address (typically the outer-bound). The code address as well
+ as the special identifier address are set to indicate wild cards. */
+extern struct frame_id frame_id_build_wild (CORE_ADDR stack_addr);
+
/* Returns non-zero when L is a valid frame (a valid frame has a
non-zero .base). */
extern int frame_id_p (struct frame_id l);
@@ -175,7 +189,7 @@ extern void fprint_frame_id (struct ui_file *file, struct frame_id id);
CLI (selected using `up', `down', ...). The frames are created
on-demand (via get_prev_frame()) and then held in a frame cache. */
/* FIXME: cagney/2002-11-28: Er, there is a lie here. If you do the
- sequence: `thread 1; up; thread 2; thread 1' you loose thread 1's
+ sequence: `thread 1; up; thread 2; thread 1' you lose thread 1's
selected frame. At present GDB only tracks the selected frame of
the current thread. But be warned, that might change. */
/* FIXME: cagney/2002-11-14: At any time, only one thread's selected
@@ -193,11 +207,11 @@ extern struct frame_info *get_current_frame (void);
FIXME: cagney/2002-11-28: The only difference between
flush_cached_frames() and reinit_frame_cache() is that the latter
- explicitly sets the selected frame back to the current frame there
+ explicitly sets the selected frame back to the current frame -- there
isn't any real difference (except that one delays the selection of
a new frame). Code can instead simply rely on get_selected_frame()
- to reinit's the selected frame as needed. As for invalidating the
- cache, there should be two methods one that reverts the thread's
+ to reinit the selected frame as needed. As for invalidating the
+ cache, there should be two methods: one that reverts the thread's
selected frame back to current frame (for when the inferior
resumes) and one that does not (for when the user modifies the
target invalidating the frame cache). */
@@ -234,7 +248,7 @@ 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 *);
-/* An address (not necessarily alligned to an instruction boundary)
+/* An address (not necessarily aligned to an instruction boundary)
that falls within THIS frame's code block.
When a function call is the last statement in a block, the return
@@ -267,8 +281,8 @@ extern CORE_ADDR get_frame_func (struct frame_info *fi);
attributes that are determined by the PC. Note that for a normal
frame, the PC refers to the resume address after the return, and
not the call instruction. In such a case, the address is adjusted
- so that it (approximatly) identifies the call site (and not return
- site).
+ so that it (approximately) identifies the call site (and not the
+ return site).
NOTE: cagney/2002-11-28: The frame cache could be used to cache the
computed value. Working on the assumption that the bottle-neck is
@@ -310,7 +324,22 @@ extern CORE_ADDR get_frame_base (struct frame_info *);
/* Return the per-frame unique identifer. Can be used to relocate a
frame after a frame cache flush (and other similar operations). If
- FI is NULL, return the null_frame_id. */
+ FI is NULL, return the null_frame_id.
+
+ NOTE: kettenis/20040508: These functions return a structure. On
+ platforms where structures are returned in static storage (vax,
+ m68k), this may trigger compiler bugs in code like:
+
+ if (frame_id_eq (get_frame_id (l), get_frame_id (r)))
+
+ where the return value from the first get_frame_id (l) gets
+ overwritten by the second get_frame_id (r). Please avoid writing
+ code like this. Use code like:
+
+ struct frame_id id = get_frame_id (l);
+ if (frame_id_eq (id, get_frame_id (r)))
+
+ instead, since that avoids the bug. */
extern struct frame_id get_frame_id (struct frame_info *fi);
extern struct frame_id frame_unwind_id (struct frame_info *next_frame);
@@ -342,11 +371,6 @@ extern int frame_relative_level (struct frame_info *fi);
enum frame_type
{
- /* The frame's type hasn't yet been defined. This is a catch-all
- for legacy code that uses really strange technicques, such as
- deprecated_set_frame_type, to set the frame's type. New code
- should not use this value. */
- UNKNOWN_FRAME,
/* A true stack frame, created by the target program during normal
execution. */
NORMAL_FRAME,
@@ -355,23 +379,13 @@ enum frame_type
DUMMY_FRAME,
/* In a signal handler, various OSs handle this in various ways.
The main thing is that the frame may be far from normal. */
- SIGTRAMP_FRAME
+ SIGTRAMP_FRAME,
+ /* Sentinel or registers frame. This frame obtains register values
+ direct from the inferior's registers. */
+ SENTINEL_FRAME
};
extern enum frame_type get_frame_type (struct frame_info *);
-/* FIXME: cagney/2002-11-10: Some targets want to directly mark a
- frame as being of a specific type. This shouldn't be necessary.
- DEPRECATED_PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and
- DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME. I suspect
- the real problem here is that get_prev_frame() only sets
- initialized after DEPRECATED_INIT_EXTRA_FRAME_INFO as been called.
- Consequently, some targets found that the frame's type was wrong
- and tried to fix it. The correct fix is to modify get_prev_frame()
- so that it initializes the frame's type before calling any other
- functions. */
-extern void deprecated_set_frame_type (struct frame_info *,
- enum frame_type type);
-
/* Unwind the stack frame so that the value of REGNUM, in the previous
(up, older) frame is returned. If VALUEP is NULL, don't
fetch/compute the value. Instead just return the location of the
@@ -406,7 +420,7 @@ extern void frame_unwind_unsigned_register (struct frame_info *frame,
int regnum, ULONGEST *val);
/* Get the value of the register that belongs to this FRAME. This
- function is a wrapper to the call sequence ``frame_unwind_register
+ function is a wrapper to the call sequence ``frame_register_unwind
(get_next_frame (FRAME))''. As per frame_register_unwind(), if
VALUEP is NULL, the registers value is not fetched/computed. */
@@ -461,12 +475,17 @@ extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
CORE_ADDR memaddr, int len);
+/* Same as above, but return non-zero when the entire memory read
+ succeeds, zero otherwize. */
+extern int safe_frame_unwind_memory (struct frame_info *this_frame,
+ CORE_ADDR addr, void *buf, 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(). */
+/* Values for the source flag to be used in print_frame_info_base(). */
enum print_what
{
/* Print only the source line, like in stepi. */
@@ -483,7 +502,7 @@ enum print_what
/* Allocate additional space for appendices to a struct frame_info.
NOTE: Much of GDB's code works on the assumption that the allocated
saved_regs[] array is the size specified below. If you try to make
- that array smaller, GDB will happily walk off its end. */
+ that array smaller, GDB will happily walk off its end. */
#ifdef SIZEOF_FRAME_SAVED_REGS
#error "SIZEOF_FRAME_SAVED_REGS can not be re-defined"
@@ -499,16 +518,8 @@ extern void *frame_obstack_zalloc (unsigned long size);
#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
#define FRAME_OBSTACK_CALLOC(NUMBER,TYPE) ((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE)))
-/* If legacy_frame_chain_valid() returns zero it means that the given
- frame is the outermost one and has no caller.
-
- This method has been superseeded by the per-architecture
- frame_unwind_pc() (returns 0 to indicate an invalid return address)
- and per-frame this_id() (returns a NULL frame ID to indicate an
- invalid frame). */
-extern int legacy_frame_chain_valid (CORE_ADDR, struct frame_info *);
-
-extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
+/* Create a regcache, and copy the frame's registers into it. */
+struct regcache *frame_save_as_regcache (struct frame_info *this_frame);
extern struct block *get_frame_block (struct frame_info *,
CORE_ADDR *addr_in_block);
@@ -526,7 +537,7 @@ extern struct block *get_frame_block (struct frame_info *,
Should it look at the most recently specified SAL? If the target
has no state, should this function try to extract a block from the
most recently selected SAL? That way `list foo' would give it some
- sort of reference point. Then again, perhaphs that would confuse
+ sort of reference point. Then again, perhaps that would confuse
things.
Calls to this function can be broken down into two categories: Code
@@ -536,7 +547,7 @@ extern struct block *get_frame_block (struct frame_info *,
The latter can be eliminated by correctly parameterizing the code,
the former though is more interesting. Per the "address" command,
- it occures in the CLI code and makes it possible for commands to
+ it occurs in the CLI code and makes it possible for commands to
work, even when the inferior has no state. */
extern struct block *get_selected_block (CORE_ADDR *addr_in_block);
@@ -545,48 +556,22 @@ extern struct symbol *get_frame_function (struct frame_info *);
extern CORE_ADDR get_pc_function_start (CORE_ADDR);
-extern int legacy_frameless_look_for_prologue (struct frame_info *);
-
extern struct frame_info *find_relative_frame (struct frame_info *, int *);
-extern void show_and_print_stack_frame (struct frame_info *fi, int level,
- int source);
+extern void show_and_print_stack_frame (struct frame_info *fi, int print_level,
+ enum print_what print_what);
-extern void print_stack_frame (struct frame_info *, int, int);
+extern void print_stack_frame (struct frame_info *, int print_level,
+ enum print_what print_what);
extern void show_stack_frame (struct frame_info *);
-extern void print_frame_info (struct frame_info *, int, int, int);
-
-extern void show_frame_info (struct frame_info *, int, int, int);
+extern void print_frame_info (struct frame_info *, int print_level,
+ enum print_what print_what, int args);
extern struct frame_info *block_innermost_frame (struct block *);
-/* NOTE: cagney/2002-09-13: There is no need for this function. */
-extern CORE_ADDR deprecated_read_register_dummy (CORE_ADDR pc,
- CORE_ADDR fp, int);
-extern void generic_push_dummy_frame (void);
-extern void deprecated_pop_dummy_frame (void);
-
-extern int deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp,
- CORE_ADDR fp);
-
-/* NOTE: cagney/2002-06-26: Targets should no longer use this
- function. Instead, the contents of a dummy frames registers can be
- obtained by applying: frame_register_unwind to the dummy frame; or
- frame_register_unwind() to the next outer frame. */
-
-extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
-
-
-/* The DEPRECATED_GET_SAVED_REGISTER architecture interface is
- entirely redundant. New architectures should implement per-frame
- unwinders (ref "frame-unwind.h"). */
-extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
- struct frame_info *, int,
- enum lval_type *);
-
-extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
+extern int deprecated_pc_in_call_dummy (CORE_ADDR pc);
/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a
function called get_frame_register_p(). This slightly weird (and
@@ -606,7 +591,7 @@ extern void args_info (char *, int);
extern void locals_info (char *, int);
-extern void (*selected_frame_level_changed_hook) (int);
+extern void (*deprecated_selected_frame_level_changed_hook) (int);
extern void return_command (char *, int);
@@ -619,11 +604,11 @@ extern void return_command (char *, int);
Unfortunately, it isn't that easy.
The relevant code needs to be audited to determine if it is
- possible (or pratical) to instead pass the applicable frame in as a
+ possible (or practical) to instead pass the applicable frame in as a
parameter. For instance, DEPRECATED_DO_REGISTERS_INFO() relied on
the deprecated_selected_frame global, while its replacement,
PRINT_REGISTERS_INFO(), is parameterized with the selected frame.
- The only real exceptions occure at the edge (in the CLI code) where
+ The only real exceptions occur at the edge (in the CLI code) where
user commands need to pick up the selected frame before proceeding.
This is important. GDB is trying to stamp out the hack:
@@ -655,22 +640,6 @@ extern struct frame_info *deprecated_safe_get_selected_frame (void);
extern struct frame_info *create_new_frame (CORE_ADDR base, CORE_ADDR pc);
-
-/* Create/access the frame's `extra info'. The extra info is used by
- older code to store information such as the analyzed prologue. The
- zalloc() should only be called by the INIT_EXTRA_INFO method. */
-
-extern struct frame_extra_info *frame_extra_info_zalloc (struct frame_info *fi,
- long size);
-extern struct frame_extra_info *get_frame_extra_info (struct frame_info *fi);
-
-/* Create/access the frame's `saved_regs'. The saved regs are used by
- older code to store the address of each register (except for
- SP_REGNUM where the value of the register in the previous frame is
- stored). */
-extern CORE_ADDR *frame_saved_regs_zalloc (struct frame_info *);
-extern CORE_ADDR *deprecated_get_frame_saved_regs (struct frame_info *);
-
/* FIXME: cagney/2002-12-06: Has the PC in the current frame changed?
"infrun.c", Thanks to DECR_PC_AFTER_BREAK, can change the PC after
the initial frame create. This puts things back in sync.
@@ -681,7 +650,7 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
/* FIXME: cagney/2002-12-18: Has the frame's base changed? Or to be
more exact, was that initial guess at the frame's base as returned
- by deprecated_read_fp() wrong? If it was, fix it. This shouldn't
+ by the deleted read_fp() wrong? If it was, fix it. This shouldn't
be necessary since the code should be getting the frame's base
correct from the outset.
@@ -689,17 +658,4 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
extern void deprecated_update_frame_base_hack (struct frame_info *frame,
CORE_ADDR base);
-/* FIXME: cagney/2003-01-05: Allocate a frame, along with the
- saved_regs and extra_info. Set up cleanups for all three. Same as
- for deprecated_frame_xmalloc, targets are calling this when
- creating a scratch `struct frame_info'. The frame overhaul makes
- this unnecessary since all frame queries are parameterized with a
- common cache parameter and a frame. */
-extern struct frame_info *deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
- long sizeof_extra_info);
-
-/* Return non-zero if the architecture is relying on legacy frame
- code. */
-extern int legacy_frame_p (struct gdbarch *gdbarch);
-
#endif /* !defined (FRAME_H) */
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index e8626259530..b365915fc81 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -26,6 +26,8 @@
#include "elf-bfd.h"
#include "elf/frv.h"
#include "frv-tdep.h"
+#include "trad-frame.h"
+#include "frame-unwind.h"
/* Define the size (in bytes) of an FR-V instruction. */
static const int frv_instr_size = 4;
@@ -151,7 +153,7 @@ frv_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
void *extension;
} __attribute__((aligned(8))); */
-static CORE_ADDR
+static LONGEST
frv_linux_sigcontext_reg_addr (struct frame_info *next_frame, int regno,
CORE_ADDR *sc_addr_cache_ptr)
{
@@ -233,15 +235,93 @@ frv_linux_sigcontext_reg_addr (struct frame_info *next_frame, int regno,
}
}
+/* Signal trampolines. */
+
+static struct trad_frame_cache *
+frv_linux_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct trad_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR addr;
+ char buf[4];
+ int regnum;
+ CORE_ADDR sc_addr_cache_val = 0;
+ struct frame_id this_id;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = trad_frame_cache_zalloc (next_frame);
+
+ /* FIXME: cagney/2004-05-01: This is is long standing broken code.
+ The frame ID's code address should be the start-address of the
+ signal trampoline and not the current PC within that
+ trampoline. */
+ frame_unwind_register (next_frame, sp_regnum, buf);
+ this_id = frame_id_build (extract_unsigned_integer (buf, sizeof buf),
+ frame_pc_unwind (next_frame));
+ trad_frame_set_id (cache, this_id);
+
+ for (regnum = 0; regnum < frv_num_regs; regnum++)
+ {
+ LONGEST reg_addr = frv_linux_sigcontext_reg_addr (next_frame, regnum,
+ &sc_addr_cache_val);
+ if (reg_addr != -1)
+ trad_frame_set_reg_addr (cache, regnum, reg_addr);
+ }
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+frv_linux_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct trad_frame_cache *cache =
+ frv_linux_sigtramp_frame_cache (next_frame, this_cache);
+ trad_frame_get_id (cache, this_id);
+}
+
+static void
+frv_linux_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. */
+ struct trad_frame_cache *cache =
+ frv_linux_sigtramp_frame_cache (next_frame, this_cache);
+ trad_frame_get_register (cache, next_frame, regnum, optimizedp, lvalp,
+ addrp, realnump, valuep);
+}
+
+static const struct frame_unwind frv_linux_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ frv_linux_sigtramp_frame_this_id,
+ frv_linux_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+frv_linux_sigtramp_frame_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (frv_linux_pc_in_sigtramp (pc, name))
+ return &frv_linux_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
static void
frv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- /* When the FR-V Linux kernel calls a signal handler, the return
- address points to a bit of code on the stack. This function is
- used to identify this bit of code as a signal trampoline in order
- to support backtracing through calls to signal handlers. */
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, frv_linux_pc_in_sigtramp);
- frv_set_sigcontext_reg_addr (gdbarch, frv_linux_sigcontext_reg_addr);
+ /* Set the sigtramp frame sniffer. */
+ frame_unwind_append_sniffer (gdbarch, frv_linux_sigtramp_frame_sniffer);
}
static enum gdb_osabi
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 8028e46c80d..7bc09f0208d 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -37,6 +37,7 @@
#include "elf-bfd.h"
#include "elf/frv.h"
#include "osabi.h"
+#include "infcall.h"
#include "frv-tdep.h"
extern void _initialize_frv_tdep (void);
@@ -96,11 +97,6 @@ struct gdbarch_tdep
/* Register names. */
char **register_names;
-
- /* Given NEXT_FRAME, determine the address of register REGNO saved in
- the calling sigtramp frame. */
- CORE_ADDR (*sigcontext_reg_addr) (struct frame_info *next_frame, int regno,
- CORE_ADDR *);
};
#define CURRENT_VARIANT (gdbarch_tdep (current_gdbarch))
@@ -112,15 +108,6 @@ frv_abi (struct gdbarch *gdbarch)
return gdbarch_tdep (gdbarch)->frv_abi;
}
-/* Set sigcontext_reg_addr. */
-void
-frv_set_sigcontext_reg_addr (struct gdbarch *gdbarch,
- CORE_ADDR (*sigcontext_reg_addr)
- (struct frame_info *, int, CORE_ADDR *))
-{
- gdbarch_tdep (gdbarch)->sigcontext_reg_addr = sigcontext_reg_addr;
-}
-
/* Fetch the interpreter and executable loadmap addresses (for shared
library support) for the FDPIC ABI. Return 0 if successful, -1 if
not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
@@ -200,6 +187,44 @@ new_variant (void)
var->register_names[iacc0l_regnum] = "iacc0l";
var->register_names[iacc0_regnum] = "iacc0";
+ /* fsr0 (Found on FR555 and FR501.) */
+ var->register_names[fsr0_regnum] = "fsr0";
+
+ /* acc0 - acc7. The architecture provides for the possibility of many
+ more (up to 64 total), but we don't want to make that big of a hole
+ in the G packet. If we need more in the future, we'll add them
+ elsewhere. */
+ for (r = acc0_regnum; r <= acc7_regnum; r++)
+ {
+ char *buf;
+ buf = xstrprintf ("acc%d", r - acc0_regnum);
+ var->register_names[r] = buf;
+ }
+
+ /* accg0 - accg7: These are one byte registers. The remote protocol
+ provides the raw values packed four into a slot. accg0123 and
+ accg4567 correspond to accg0 - accg3 and accg4-accg7 respectively.
+ We don't provide names for accg0123 and accg4567 since the user will
+ likely not want to see these raw values. */
+
+ for (r = accg0_regnum; r <= accg7_regnum; r++)
+ {
+ char *buf;
+ buf = xstrprintf ("accg%d", r - accg0_regnum);
+ var->register_names[r] = buf;
+ }
+
+ /* msr0 and msr1. */
+
+ var->register_names[msr0_regnum] = "msr0";
+ var->register_names[msr1_regnum] = "msr1";
+
+ /* gner and fner registers. */
+ var->register_names[gner0_regnum] = "gner0";
+ var->register_names[gner1_regnum] = "gner1";
+ var->register_names[fner0_regnum] = "fner0";
+ var->register_names[fner1_regnum] = "fner1";
+
return var;
}
@@ -290,6 +315,21 @@ frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
regcache_raw_read (regcache, iacc0h_regnum, buffer);
regcache_raw_read (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
}
+ else if (accg0_regnum <= reg && reg <= accg7_regnum)
+ {
+ /* The accg raw registers have four values in each slot with the
+ lowest register number occupying the first byte. */
+
+ int raw_regnum = accg0123_regnum + (reg - accg0_regnum) / 4;
+ int byte_num = (reg - accg0_regnum) % 4;
+ bfd_byte buf[4];
+
+ regcache_raw_read (regcache, raw_regnum, buf);
+ memset (buffer, 0, 4);
+ /* FR-V is big endian, so put the requested byte in the first byte
+ of the buffer allocated to hold the pseudo-register. */
+ ((bfd_byte *) buffer)[0] = buf[byte_num];
+ }
}
static void
@@ -301,6 +341,19 @@ frv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
regcache_raw_write (regcache, iacc0h_regnum, buffer);
regcache_raw_write (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
}
+ else if (accg0_regnum <= reg && reg <= accg7_regnum)
+ {
+ /* The accg raw registers have four values in each slot with the
+ lowest register number occupying the first byte. */
+
+ int raw_regnum = accg0123_regnum + (reg - accg0_regnum) / 4;
+ int byte_num = (reg - accg0_regnum) % 4;
+ char buf[4];
+
+ regcache_raw_read (regcache, raw_regnum, buf);
+ buf[byte_num] = ((bfd_byte *) buffer)[0];
+ regcache_raw_write (regcache, raw_regnum, buf);
+ }
}
static int
@@ -311,8 +364,8 @@ frv_register_sim_regno (int reg)
H_SPR_PSR, /* psr_regnum */
H_SPR_CCR, /* ccr_regnum */
H_SPR_CCCR, /* cccr_regnum */
- -1, /* 132 */
- -1, /* 133 */
+ -1, /* fdpic_loadmap_exec_regnum */
+ -1, /* fdpic_loadmap_interp_regnum */
-1, /* 134 */
H_SPR_TBR, /* tbr_regnum */
H_SPR_BRR, /* brr_regnum */
@@ -320,14 +373,32 @@ frv_register_sim_regno (int reg)
H_SPR_DBAR1, /* dbar1_regnum */
H_SPR_DBAR2, /* dbar2_regnum */
H_SPR_DBAR3, /* dbar3_regnum */
- -1, /* 141 */
- -1, /* 142 */
- -1, /* 143 */
- -1, /* 144 */
+ H_SPR_SCR0, /* scr0_regnum */
+ H_SPR_SCR1, /* scr1_regnum */
+ H_SPR_SCR2, /* scr2_regnum */
+ H_SPR_SCR3, /* scr3_regnum */
H_SPR_LR, /* lr_regnum */
H_SPR_LCR, /* lcr_regnum */
H_SPR_IACC0H, /* iacc0h_regnum */
- H_SPR_IACC0L /* iacc0l_regnum */
+ H_SPR_IACC0L, /* iacc0l_regnum */
+ H_SPR_FSR0, /* fsr0_regnum */
+ /* FIXME: Add infrastructure for fetching/setting ACC and ACCG regs. */
+ -1, /* acc0_regnum */
+ -1, /* acc1_regnum */
+ -1, /* acc2_regnum */
+ -1, /* acc3_regnum */
+ -1, /* acc4_regnum */
+ -1, /* acc5_regnum */
+ -1, /* acc6_regnum */
+ -1, /* acc7_regnum */
+ -1, /* acc0123_regnum */
+ -1, /* acc4567_regnum */
+ H_SPR_MSR0, /* msr0_regnum */
+ H_SPR_MSR1, /* msr1_regnum */
+ H_SPR_GNER0, /* gner0_regnum */
+ H_SPR_GNER1, /* gner1_regnum */
+ H_SPR_FNER0, /* fner0_regnum */
+ H_SPR_FNER1, /* fner1_regnum */
};
gdb_assert (reg >= 0 && reg < NUM_REGS);
@@ -385,7 +456,7 @@ frv_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr
char instr[frv_instr_size];
int status;
- status = read_memory_nobpt (addr, instr, sizeof instr);
+ status = deprecated_read_memory_nobpt (addr, instr, sizeof instr);
if (status != 0)
break;
@@ -995,12 +1066,6 @@ frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
write_register (struct_return_regnum, addr);
}
-static int
-frv_frameless_function_invocation (struct frame_info *frame)
-{
- return legacy_frameless_look_for_prologue (frame);
-}
-
static CORE_ADDR
frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
@@ -1048,7 +1113,7 @@ frv_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
}
static CORE_ADDR
-frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1065,6 +1130,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int stack_space;
int stack_offset;
enum frv_abi abi = frv_abi (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
#if 0
printf("Push %d args at sp = %x, struct_return=%d (%x)\n",
@@ -1286,16 +1352,6 @@ frv_frame_this_id (struct frame_info *next_frame,
return;
id = frame_id_build (base, func);
-
- /* Check that we're not going round in circles with the same frame
- ID (but avoid applying the test to sentinel frames which do go
- round in circles). Can't use frame_id_eq() as that doesn't yet
- compare the frame's PC value. */
- if (frame_relative_level (next_frame) >= 0
- && get_frame_type (next_frame) != DUMMY_FRAME
- && frame_id_eq (get_frame_id (next_frame), id))
- return;
-
(*this_id) = id;
}
@@ -1308,8 +1364,8 @@ frv_frame_prev_register (struct frame_info *next_frame,
{
struct frv_unwind_cache *info
= frv_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind frv_frame_unwind = {
@@ -1358,102 +1414,6 @@ frv_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
frame_pc_unwind (next_frame));
}
-/* Signal trampolines. */
-
-static struct frv_unwind_cache *
-frv_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
-{
- struct frv_unwind_cache *cache;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR addr;
- char buf[4];
- int regno;
- CORE_ADDR sc_addr_cache_val = 0;
-
- if (*this_cache)
- return *this_cache;
-
- cache = FRAME_OBSTACK_ZALLOC (struct frv_unwind_cache);
- cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
-
- frame_unwind_register (next_frame, sp_regnum, buf);
- cache->base = extract_unsigned_integer (buf, sizeof buf);
-
- for (regno = 0; regno < frv_num_regs; regno++)
- {
- cache->saved_regs[regno].addr
- = tdep->sigcontext_reg_addr (next_frame, regno, &sc_addr_cache_val);
- }
-
-
- if (cache->saved_regs[sp_regnum].addr != -1
- && target_read_memory (cache->saved_regs[sp_regnum].addr,
- buf, sizeof buf) == 0)
- {
- cache->prev_sp = extract_unsigned_integer (buf, sizeof buf);
-
- /* Now that we've bothered to read it out of memory, save the
- prev frame's SP value in the cache. */
- trad_frame_set_value (cache->saved_regs, sp_regnum, cache->prev_sp);
- }
- else
- {
- warning ("Can't read SP value from sigtramp frame");
- }
-
- *this_cache = cache;
- return cache;
-}
-
-static void
-frv_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
- struct frame_id *this_id)
-{
- struct frv_unwind_cache *cache =
- frv_sigtramp_frame_cache (next_frame, this_cache);
-
- (*this_id) = frame_id_build (cache->base, frame_pc_unwind (next_frame));
-}
-
-static void
-frv_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. */
- frv_sigtramp_frame_cache (next_frame, this_cache);
-
- frv_frame_prev_register (next_frame, this_cache, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
-}
-
-static const struct frame_unwind frv_sigtramp_frame_unwind =
-{
- SIGTRAMP_FRAME,
- frv_sigtramp_frame_this_id,
- frv_sigtramp_frame_prev_register
-};
-
-static const struct frame_unwind *
-frv_sigtramp_frame_sniffer (struct frame_info *next_frame)
-{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- char *name;
-
- /* We shouldn't even bother to try if the OSABI didn't register
- a sigcontext_reg_addr handler. */
- if (!gdbarch_tdep (current_gdbarch)->sigcontext_reg_addr)
- return NULL;
-
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
- return &frv_sigtramp_frame_unwind;
-
- return NULL;
-}
-
static struct gdbarch *
frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -1530,9 +1490,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
set_gdbarch_adjust_breakpoint_address (gdbarch, frv_gdbarch_adjust_breakpoint_address);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
-
- set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value);
set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
@@ -1593,9 +1551,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- /* Set the sigtramp frame sniffer. */
- frame_unwind_append_sniffer (gdbarch, frv_sigtramp_frame_sniffer);
-
/* Set the fallback (prologue based) frame sniffer. */
frame_unwind_append_sniffer (gdbarch, frv_frame_sniffer);
diff --git a/gdb/frv-tdep.h b/gdb/frv-tdep.h
index 5b9b88b93a5..73122a6240b 100644
--- a/gdb/frv-tdep.h
+++ b/gdb/frv-tdep.h
@@ -66,7 +66,18 @@ enum {
lcr_regnum = 146,
iacc0h_regnum = 147,
iacc0l_regnum = 148,
- last_spr_regnum = 148,
+ fsr0_regnum = 149,
+ acc0_regnum = 150,
+ acc7_regnum = 157,
+ accg0123_regnum = 158,
+ accg4567_regnum = 159,
+ msr0_regnum = 160,
+ msr1_regnum = 161,
+ gner0_regnum = 162,
+ gner1_regnum = 163,
+ fner0_regnum = 164,
+ fner1_regnum = 165,
+ last_spr_regnum = 165,
/* The total number of registers we know exist. */
frv_num_regs = last_spr_regnum + 1,
@@ -76,19 +87,16 @@ enum {
/* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */
iacc0_regnum = first_pseudo_regnum + 0,
+ accg0_regnum = first_pseudo_regnum + 1,
+ accg7_regnum = accg0_regnum + 7,
- last_pseudo_regnum = iacc0_regnum,
+ last_pseudo_regnum = accg7_regnum,
frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1,
};
/* Return the FR-V ABI associated with GDBARCH. */
enum frv_abi frv_abi (struct gdbarch *gdbarch);
-/* Associate a sigcontext address fetcher with GDBARCH. */
-void frv_set_sigcontext_reg_addr (struct gdbarch *gdbarch,
- CORE_ADDR (*sigcontext_reg_addr)
- (struct frame_info *, int, CORE_ADDR *));
-
/* Fetch the interpreter and executable loadmap addresses (for shared
library support) for the FDPIC ABI. Return 0 if successful, -1 if
not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
diff --git a/gdb/gcore.c b/gdb/gcore.c
index b5513728ef5..3b3a259574f 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -244,7 +244,7 @@ derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
|| strcmp (".bss", bfd_section_name (abfd, sec)) == 0)
{
sec_vaddr = bfd_get_section_vma (abfd, sec);
- sec_size = bfd_get_section_size_before_reloc (sec);
+ sec_size = bfd_get_section_size (sec);
if (sec_vaddr + sec_size > top_of_data_memory)
top_of_data_memory = sec_vaddr + sec_size;
}
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index 63ee3bc400b..42d93bfb020 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -1,6 +1,6 @@
/* User Interface Events.
- Copyright 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
@@ -39,16 +39,12 @@
#include "gdb-events.h"
#include "gdbcmd.h"
-#if WITH_GDB_EVENTS
static struct gdb_events null_event_hooks;
static struct gdb_events queue_event_hooks;
static struct gdb_events *current_event_hooks = &null_event_hooks;
-#endif
int gdb_events_debug;
-#if WITH_GDB_EVENTS
-
void
breakpoint_create_event (int b)
{
@@ -119,41 +115,8 @@ architecture_changed_event (void)
current_event_hooks->architecture_changed ();
}
-void
-target_changed_event (void)
-{
- if (gdb_events_debug)
- fprintf_unfiltered (gdb_stdlog, "target_changed_event\n");
- if (!current_event_hooks->target_changed)
- return;
- current_event_hooks->target_changed ();
-}
-
-void
-selected_frame_level_changed_event (int level)
-{
- if (gdb_events_debug)
- fprintf_unfiltered (gdb_stdlog, "selected_frame_level_changed_event\n");
- if (!current_event_hooks->selected_frame_level_changed)
- return;
- current_event_hooks->selected_frame_level_changed (level);
-}
-
-void
-selected_thread_changed_event (int thread_num)
-{
- if (gdb_events_debug)
- fprintf_unfiltered (gdb_stdlog, "selected_thread_changed_event\n");
- if (!current_event_hooks->selected_thread_changed)
- return;
- current_event_hooks->selected_thread_changed (thread_num);
-}
-
-#endif
-
-#if WITH_GDB_EVENTS
struct gdb_events *
-set_gdb_event_hooks (struct gdb_events *vector)
+deprecated_set_gdb_event_hooks (struct gdb_events *vector)
{
struct gdb_events *old_events = current_event_hooks;
if (vector == NULL)
@@ -162,15 +125,12 @@ set_gdb_event_hooks (struct gdb_events *vector)
current_event_hooks = vector;
return old_events;
}
-#endif
-#if WITH_GDB_EVENTS
void
clear_gdb_event_hooks (void)
{
- set_gdb_event_hooks (&null_event_hooks);
+ deprecated_set_gdb_event_hooks (&null_event_hooks);
}
-#endif
enum gdb_event
{
@@ -181,9 +141,6 @@ enum gdb_event
tracepoint_delete,
tracepoint_modify,
architecture_changed,
- target_changed,
- selected_frame_level_changed,
- selected_thread_changed,
nr_gdb_events
};
@@ -217,16 +174,6 @@ struct tracepoint_modify
int number;
};
-struct selected_frame_level_changed
- {
- int level;
- };
-
-struct selected_thread_changed
- {
- int thread_num;
- };
-
struct event
{
enum gdb_event type;
@@ -239,8 +186,6 @@ struct event
struct tracepoint_create tracepoint_create;
struct tracepoint_delete tracepoint_delete;
struct tracepoint_modify tracepoint_modify;
- struct selected_frame_level_changed selected_frame_level_changed;
- struct selected_thread_changed selected_thread_changed;
}
data;
};
@@ -319,32 +264,6 @@ queue_architecture_changed (void)
append (event);
}
-static void
-queue_target_changed (void)
-{
- struct event *event = XMALLOC (struct event);
- event->type = target_changed;
- append (event);
-}
-
-static void
-queue_selected_frame_level_changed (int level)
-{
- struct event *event = XMALLOC (struct event);
- event->type = selected_frame_level_changed;
- event->data.selected_frame_level_changed.level = level;
- append (event);
-}
-
-static void
-queue_selected_thread_changed (int thread_num)
-{
- struct event *event = XMALLOC (struct event);
- event->type = selected_thread_changed;
- event->data.selected_thread_changed.thread_num = thread_num;
- append (event);
-}
-
void
gdb_events_deliver (struct gdb_events *vector)
{
@@ -393,17 +312,6 @@ gdb_events_deliver (struct gdb_events *vector)
case architecture_changed:
vector->architecture_changed ();
break;
- case target_changed:
- vector->target_changed ();
- break;
- case selected_frame_level_changed:
- vector->selected_frame_level_changed
- (event->data.selected_frame_level_changed.level);
- break;
- case selected_thread_changed:
- vector->selected_thread_changed
- (event->data.selected_thread_changed.thread_num);
- break;
}
delivering_events = event->next;
xfree (event);
@@ -415,7 +323,6 @@ void
_initialize_gdb_events (void)
{
struct cmd_list_element *c;
-#if WITH_GDB_EVENTS
queue_event_hooks.breakpoint_create = queue_breakpoint_create;
queue_event_hooks.breakpoint_delete = queue_breakpoint_delete;
queue_event_hooks.breakpoint_modify = queue_breakpoint_modify;
@@ -423,22 +330,20 @@ _initialize_gdb_events (void)
queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
queue_event_hooks.architecture_changed = queue_architecture_changed;
- queue_event_hooks.target_changed = queue_target_changed;
- queue_event_hooks.selected_frame_level_changed = queue_selected_frame_level_changed;
- queue_event_hooks.selected_thread_changed = queue_selected_thread_changed;
-#endif
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
(char *) (&gdb_events_debug), "Set event debugging.\n\
When non-zero, event/notify debugging is enabled.", &setlist);
deprecate_cmd (c, "set debug event");
- deprecate_cmd (add_show_from_set (c, &showlist), "show debug event");
-
- add_show_from_set (add_set_cmd ("event",
- class_maintenance,
- var_zinteger,
- (char *) (&gdb_events_debug),
- "Set event debugging.\n\
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist),
+ "show debug event");
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("event",
+ class_maintenance,
+ var_zinteger,
+ (char *) (&gdb_events_debug),
+ "Set event debugging.\n\
When non-zero, event/notify debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
}
diff --git a/gdb/gdb-events.h b/gdb/gdb-events.h
index 2ce193f19ea..386250b5450 100644
--- a/gdb/gdb-events.h
+++ b/gdb/gdb-events.h
@@ -38,10 +38,6 @@
#ifndef GDB_EVENTS_H
#define GDB_EVENTS_H
-#ifndef WITH_GDB_EVENTS
-#define WITH_GDB_EVENTS 1
-#endif
-
/* COMPAT: pointer variables for old, unconverted events.
A call to set_gdb_events() will automatically update these. */
@@ -59,9 +55,6 @@ typedef void (gdb_events_tracepoint_create_ftype) (int number);
typedef void (gdb_events_tracepoint_delete_ftype) (int number);
typedef void (gdb_events_tracepoint_modify_ftype) (int number);
typedef void (gdb_events_architecture_changed_ftype) (void);
-typedef void (gdb_events_target_changed_ftype) (void);
-typedef void (gdb_events_selected_frame_level_changed_ftype) (int level);
-typedef void (gdb_events_selected_thread_changed_ftype) (int thread_num);
/* gdb-events: object. */
@@ -75,9 +68,6 @@ struct gdb_events
gdb_events_tracepoint_delete_ftype *tracepoint_delete;
gdb_events_tracepoint_modify_ftype *tracepoint_modify;
gdb_events_architecture_changed_ftype *architecture_changed;
- gdb_events_target_changed_ftype *target_changed;
- gdb_events_selected_frame_level_changed_ftype *selected_frame_level_changed;
- gdb_events_selected_thread_changed_ftype *selected_thread_changed;
};
@@ -91,28 +81,9 @@ extern void tracepoint_create_event (int number);
extern void tracepoint_delete_event (int number);
extern void tracepoint_modify_event (int number);
extern void architecture_changed_event (void);
-extern void target_changed_event (void);
-extern void selected_frame_level_changed_event (int level);
-extern void selected_thread_changed_event (int thread_num);
-
-
-/* When GDB_EVENTS are not being used, completely disable them. */
-
-#if !WITH_GDB_EVENTS
-#define breakpoint_create_event(b) 0
-#define breakpoint_delete_event(b) 0
-#define breakpoint_modify_event(b) 0
-#define tracepoint_create_event(number) 0
-#define tracepoint_delete_event(number) 0
-#define tracepoint_modify_event(number) 0
-#define architecture_changed_event() 0
-#define target_changed_event() 0
-#define selected_frame_level_changed_event(level) 0
-#define selected_thread_changed_event(thread_num) 0
-#endif
/* Install custom gdb-events hooks. */
-extern struct gdb_events *set_gdb_event_hooks (struct gdb_events *vector);
+extern struct gdb_events *deprecated_set_gdb_event_hooks (struct gdb_events *vector);
/* Deliver any pending events. */
extern void gdb_events_deliver (struct gdb_events *vector);
@@ -120,10 +91,4 @@ extern void gdb_events_deliver (struct gdb_events *vector);
/* Clear event handlers */
extern void clear_gdb_event_hooks (void);
-#if !WITH_GDB_EVENTS
-#define set_gdb_events(x) 0
-#define set_gdb_event_hooks(x) 0
-#define gdb_events_deliver(x) 0
-#endif
-
#endif
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index bd0779404cd..4da00a5a059 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -21,24 +21,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# What happens next:
-#
-
-# The gdb-events.h/gdb-events.c files this script generates are commited
-# and published.
-
-# Any UI module that is installing events is changed so that the
-# events are installed using the ``set_gdb_events()'' and
-# ``gdb_event_hooks()'' interfaces. There could prove to be an issue
-# here with respect to annotate. We might need to accomodate a hook
-# stack that allows several ui blocks to install their own events.
-
-# Each of the variable events (as currently generated) is converted
-# to either a straight function call or a function call with a
-# predicate.
-
-
IFS=:
read="class returntype function formal actual attrib"
@@ -65,46 +47,6 @@ f:void:tracepoint_create:int number:number
f:void:tracepoint_delete:int number:number
f:void:tracepoint_modify:int number:number
f:void:architecture_changed:void
-f:void:target_changed:void
-f:void:selected_frame_level_changed:int level:level
-f:void:selected_thread_changed:int thread_num:thread_num
-#*:void:annotate_starting_hook:void
-#*:void:annotate_stopped_hook:void
-#*:void:annotate_signalled_hook:void
-#*:void:annotate_signal_hook:void
-#*:void:annotate_exited_hook:void
-##*:void:print_register_hook:int
-##*:CORE_ADDR:find_toc_address_hook:CORE_ADDR
-##*:void:sparc_print_register_hook:int regno:regno
-#*:void:target_resume_hook:void
-#*:void:target_wait_loop_hook:void
-#*:void:init_gdb_hook:char *argv0:argv0
-#*:void:command_loop_hook:void
-#*:void:fputs_unfiltered_hook:const char *linebuff,struct ui_file *stream:linebuff, stream
-#*:void:print_frame_info_listing_hook:struct symtab *s, int line, int stopline, int noerror:s, line, stopline, noerror
-#*:int:query_hook:const char *query, va_list args:query, args
-#*:void:warning_hook:const char *string, va_list args:string, args
-#*:void:target_output_hook:char *b:b
-#*:void:interactive_hook:void
-#*:void:registers_changed_hook:void
-#*:void:readline_begin_hook:char *format, ...:format
-#*:char *:readline_hook:char *prompt:prompt
-#*:void:readline_end_hook:void
-#*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status
-#*:void:call_command_hook:struct cmd_list_element *c, char *cmd, int from_tty:c, cmd, from_tty
-#*:NORETURN void:error_hook:void:: ATTR_NORETURN
-#*:void:error_begin_hook:void
-##*:int:target_architecture_hook:const struct bfd_arch_info *
-#*:void:exec_file_display_hook:char *filename:filename
-#*:void:file_changed_hook:char *filename:filename
-##*:void:specify_exec_file_hook:
-#*:int:gdb_load_progress_hook:char *section, unsigned long num:section, num
-#*:void:pre_add_symbol_hook:char *name:name
-#*:void:post_add_symbol_hook:void
-#*:void:selected_frame_level_changed_hook:int level:level
-#*:int:gdb_loop_hook:int signo:signo
-##*:void:solib_create_inferior_hook:void
-##*:void:xcoff_relocate_symtab_hook:unsigned int
EOF
grep -v '^#'
}
@@ -114,7 +56,7 @@ copyright ()
cat <<EOF
/* User Interface Events.
- Copyright 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
@@ -161,10 +103,6 @@ cat <<EOF
#ifndef GDB_EVENTS_H
#define GDB_EVENTS_H
-
-#ifndef WITH_GDB_EVENTS
-#define WITH_GDB_EVENTS 1
-#endif
EOF
# pointer declarations
@@ -235,46 +173,17 @@ do
esac
done
-# function macros
-echo ""
-echo ""
-cat <<EOF
-/* When GDB_EVENTS are not being used, completely disable them. */
-EOF
-echo ""
-echo "#if !WITH_GDB_EVENTS"
-function_list | while eval read $read
-do
- case "${class}" in
- "*" ) continue ;;
- "?" )
- echo "#define ${function}_event_p() 0"
- echo "#define ${function}_event(${actual}) 0"
- ;;
- "f" )
- echo "#define ${function}_event(${actual}) 0"
- ;;
- esac
-done
-echo "#endif"
-
# our set function
cat <<EOF
/* Install custom gdb-events hooks. */
-extern struct gdb_events *set_gdb_event_hooks (struct gdb_events *vector);
+extern struct gdb_events *deprecated_set_gdb_event_hooks (struct gdb_events *vector);
/* Deliver any pending events. */
extern void gdb_events_deliver (struct gdb_events *vector);
/* Clear event handlers */
extern void clear_gdb_event_hooks (void);
-
-#if !WITH_GDB_EVENTS
-#define set_gdb_events(x) 0
-#define set_gdb_event_hooks(x) 0
-#define gdb_events_deliver(x) 0
-#endif
EOF
# close it off
@@ -307,29 +216,14 @@ cat <<EOF
#include "gdb-events.h"
#include "gdbcmd.h"
-#if WITH_GDB_EVENTS
static struct gdb_events null_event_hooks;
static struct gdb_events queue_event_hooks;
static struct gdb_events *current_event_hooks = &null_event_hooks;
-#endif
int gdb_events_debug;
EOF
-# global pointer variables - always have this
-#echo ""
-#function_list | while eval read $read
-#do
-# case "${class}" in
-# "*" )
-# echo "${returntype} (*${function}_event) (${formal})${attrib} = 0;"
-# ;;
-# esac
-#done
-
# function bodies
-echo ""
-echo "#if WITH_GDB_EVENTS"
function_list | while eval read $read
do
case "${class}" in
@@ -366,15 +260,12 @@ EOF
;;
esac
done
-echo ""
-echo "#endif"
# Set hooks function
echo ""
cat <<EOF
-#if WITH_GDB_EVENTS
struct gdb_events *
-set_gdb_event_hooks (struct gdb_events *vector)
+deprecated_set_gdb_event_hooks (struct gdb_events *vector)
{
struct gdb_events *old_events = current_event_hooks;
if (vector == NULL)
@@ -393,19 +284,16 @@ do
done
cat <<EOF
}
-#endif
EOF
# Clear hooks function
echo ""
cat <<EOF
-#if WITH_GDB_EVENTS
void
clear_gdb_event_hooks (void)
{
- set_gdb_event_hooks (&null_event_hooks);
+ deprecated_set_gdb_event_hooks (&null_event_hooks);
}
-#endif
EOF
# event type
@@ -571,7 +459,6 @@ void
_initialize_gdb_events (void)
{
struct cmd_list_element *c;
-#if WITH_GDB_EVENTS
EOF
function_list | while eval read $read
do
@@ -582,21 +469,22 @@ do
esac
done
cat <<EOF
-#endif
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
(char *) (&gdb_events_debug), "Set event debugging.\n\\
When non-zero, event/notify debugging is enabled.", &setlist);
deprecate_cmd (c, "set debug event");
- deprecate_cmd (add_show_from_set (c, &showlist), "show debug event");
-
- add_show_from_set (add_set_cmd ("event",
- class_maintenance,
- var_zinteger,
- (char *) (&gdb_events_debug),
- "Set event debugging.\n\\
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist),
+ "show debug event");
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("event",
+ class_maintenance,
+ var_zinteger,
+ (char *) (&gdb_events_debug),
+ "Set event debugging.\n\\
When non-zero, event/notify debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
}
EOF
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
index 074313e068d..4371d4f89d9 100644
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -22,10 +22,14 @@
#ifndef GDB_CURSES_H
#define GDB_CURSES_H 1
-#if defined (HAVE_NCURSES_H)
+#if defined (HAVE_NCURSES_NCURSES_H)
+#include <ncurses/ncurses.h>
+#elif defined (HAVE_NCURSES_H)
#include <ncurses.h>
+#elif defined (HAVE_CURSESX_H)
+#include <cursesX.h>
#elif defined (HAVE_CURSES_H)
#include <curses.h>
#endif
-#endif
+#endif /* gdb_curses.h */
diff --git a/gdb/gdb_mbuild.sh b/gdb/gdb_mbuild.sh
index fc1721904b8..f7037a3c6e9 100755
--- a/gdb/gdb_mbuild.sh
+++ b/gdb/gdb_mbuild.sh
@@ -205,7 +205,7 @@ do
trap "exit 1" 1 2 15
dir=${builddir}/${target}
- # Should a scratch rebuild be forced, for perhaphs the entire
+ # Should a scratch rebuild be forced, for perhaps the entire
# build be skipped?
if ${force}
diff --git a/gdb/gdb_ptrace.h b/gdb/gdb_ptrace.h
new file mode 100644
index 00000000000..62a9949d413
--- /dev/null
+++ b/gdb/gdb_ptrace.h
@@ -0,0 +1,114 @@
+/* Portable <sys/ptrace.h>
+
+ Copyright 2004 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 GDB_PTRACE_H
+#define GDB_PTRACE_H
+
+/* The <sys/ptrace.h> header was introduced with 4.4BSD, and provided
+ the PT_* symbolic constants for the ptrace(2) request numbers. The
+ ptrace(2) prototype was added later to the same header on BSD.
+ SunOS and GNU/Linux have slightly different symbolic names for the
+ constants that start with PTRACE_*. System V still doesn't have
+ (and probably never will have) a <sys/ptrace.h> with symbolic
+ constants; the ptrace(2) prototype can be found in <unistd.h>.
+ Fortunately all systems use the same numerical constants for the
+ common ptrace requests. */
+
+#ifdef HAVE_PTRACE_H
+# include <ptrace.h>
+#elif defined(HAVE_SYS_PTRACE_H)
+# include <sys/ptrace.h>
+#endif
+
+/* No need to include <unistd.h> since it's already included by
+ "defs.h". */
+
+#ifndef PT_READ_I
+# define PT_READ_I 1 /* Read word in child's I space. */
+#endif
+
+#ifndef PT_READ_D
+# define PT_READ_D 2 /* Read word in child's D space. */
+#endif
+
+#ifndef PT_READ_U
+# define PT_READ_U 3 /* Read word in child's U space. */
+#endif
+
+#ifndef PT_WRITE_I
+# define PT_WRITE_I 4 /* Write word in child's I space. */
+#endif
+
+#ifndef PT_WRITE_D
+# define PT_WRITE_D 5 /* Write word in child's D space. */
+#endif
+
+#ifndef PT_WRITE_U
+# define PT_WRITE_U 6 /* Write word in child's U space. */
+#endif
+
+/* HP-UX doesn't define PT_CONTINUE and PT_STEP. Instead of those two
+ ptrace requests, it has PT_CONTIN, PT_CONTIN1, PT_SINGLE and
+ PT_SINGLE1. PT_CONTIN1 and PT_SINGLE1 preserve pending signals,
+ which apparently is what is wanted by the HP-UX native code. */
+
+#ifndef PT_CONTINUE
+# ifdef PT_CONTIN1
+# define PT_CONTINUE PT_CONTIN1
+# else
+# define PT_CONTINUE 7 /* Continue the child. */
+# endif
+#endif
+
+#ifndef PT_KILL
+# define PT_KILL 8 /* Kill the child process. */
+#endif
+
+#ifndef PT_STEP
+# ifdef PT_SINGLE1
+# define PT_STEP PT_SINGLE1
+# else
+# define PT_STEP 9 /* Single step the child. */
+# endif
+#endif
+
+/* Not all systems support attaching and detaching. */
+
+#ifndef PT_ATTCH
+# ifdef PTRACE_DETACH
+# define PT_ATTACH PTRACE_ATTACH
+# endif
+#endif
+
+#ifndef PT_DETACH
+# ifdef PTRACE_DETACH
+# define PT_DETACH PTRACE_DETACH
+# endif
+#endif
+
+/* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64
+ or whatever it's called these days, don't provide a prototype for
+ ptrace. Provide one to silence compiler warnings. */
+#ifndef HAVE_DECL_PTRACE
+extern PTRACE_TYPE_RET ptrace();
+#endif
+
+#endif /* gdb_ptrace.h */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index d6246af2a80..7eb4aeb14be 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -62,6 +62,15 @@ static void alloc_gdbarch_data (struct gdbarch *);
#endif
int gdbarch_debug = GDBARCH_DEBUG;
+static const char *
+pformat (const struct floatformat *format)
+{
+ if (format == NULL)
+ return "(null)";
+ else
+ return format->name;
+}
+
/* Maintain the struct gdbarch object */
@@ -120,8 +129,11 @@ struct gdbarch
int long_bit;
int long_long_bit;
int float_bit;
+ const struct floatformat * float_format;
int double_bit;
+ const struct floatformat * double_format;
int long_double_bit;
+ const struct floatformat * long_double_format;
int ptr_bit;
int addr_bit;
int bfd_vma_bit;
@@ -145,33 +157,14 @@ struct gdbarch
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
gdbarch_register_type_ftype *register_type;
- gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
- int deprecated_register_bytes;
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;
- int deprecated_max_register_virtual_size;
gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
- gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
int deprecated_fp_regnum;
- gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
gdbarch_push_dummy_call_ftype *push_dummy_call;
gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
- int deprecated_use_generic_dummy_frames;
- gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
- gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
int deprecated_register_size;
int call_dummy_location;
- CORE_ADDR deprecated_call_dummy_start_offset;
- CORE_ADDR deprecated_call_dummy_breakpoint_offset;
- int deprecated_call_dummy_length;
- LONGEST * deprecated_call_dummy_words;
- int deprecated_sizeof_call_dummy_words;
- gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
gdbarch_push_dummy_code_ftype *push_dummy_code;
- gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
- 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;
gdbarch_print_vector_info_ftype *print_vector_info;
@@ -180,33 +173,21 @@ struct gdbarch
gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
gdbarch_cannot_store_register_ftype *cannot_store_register;
gdbarch_get_longjmp_target_ftype *get_longjmp_target;
- gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
- gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
- gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
int believe_pcc_promotion;
- int believe_pcc_promotion_type;
- gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
- 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;
gdbarch_pointer_to_address_ftype *pointer_to_address;
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
- gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
gdbarch_return_value_ftype *return_value;
- gdbarch_return_value_on_stack_ftype *return_value_on_stack;
gdbarch_extract_return_value_ftype *extract_return_value;
gdbarch_store_return_value_ftype *store_return_value;
gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
- gdbarch_use_struct_convention_ftype *use_struct_convention;
+ gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
- gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
- gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
gdbarch_skip_prologue_ftype *skip_prologue;
gdbarch_inner_than_ftype *inner_than;
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
@@ -214,17 +195,11 @@ struct gdbarch
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
CORE_ADDR decr_pc_after_break;
- CORE_ADDR function_start_offset;
+ CORE_ADDR deprecated_function_start_offset;
gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
CORE_ADDR frame_args_skip;
- gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
- gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
- 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_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
- gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
@@ -232,10 +207,6 @@ struct gdbarch
gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
int frame_red_zone_size;
- int parm_boundary;
- const struct floatformat * float_format;
- const struct floatformat * double_format;
- const struct floatformat * long_double_format;
gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
gdbarch_addr_bits_remove_ftype *addr_bits_remove;
gdbarch_smash_text_address_ftype *smash_text_address;
@@ -245,9 +216,6 @@ struct gdbarch
gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
- gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp;
- gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start;
- gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end;
gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
@@ -287,8 +255,11 @@ struct gdbarch startup_gdbarch =
8 * sizeof (long), /* long_bit */
8 * sizeof (LONGEST), /* long_long_bit */
8 * sizeof (float), /* float_bit */
+ 0, /* float_format */
8 * sizeof (double), /* double_bit */
+ 0, /* double_format */
8 * sizeof (long double), /* long_double_bit */
+ 0, /* long_double_format */
8 * sizeof (void*), /* ptr_bit */
8 * sizeof (void*), /* addr_bit */
8 * sizeof (void*), /* bfd_vma_bit */
@@ -312,33 +283,14 @@ struct gdbarch startup_gdbarch =
0, /* dwarf2_reg_to_regnum */
0, /* register_name */
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, /* unwind_dummy_id */
- 0, /* deprecated_save_dummy_frame_tos */
-1, /* deprecated_fp_regnum */
- 0, /* deprecated_target_read_fp */
0, /* push_dummy_call */
0, /* deprecated_push_arguments */
- 0, /* deprecated_use_generic_dummy_frames */
- 0, /* deprecated_push_return_address */
- 0, /* deprecated_dummy_write_sp */
0, /* deprecated_register_size */
0, /* call_dummy_location */
- 0, /* deprecated_call_dummy_start_offset */
- 0, /* deprecated_call_dummy_breakpoint_offset */
- 0, /* deprecated_call_dummy_length */
- 0, /* deprecated_call_dummy_words */
- 0, /* deprecated_sizeof_call_dummy_words */
- 0, /* deprecated_fix_call_dummy */
0, /* push_dummy_code */
- 0, /* deprecated_push_dummy_frame */
- 0, /* deprecated_do_registers_info */
default_print_registers_info, /* print_registers_info */
0, /* print_float_info */
0, /* print_vector_info */
@@ -347,33 +299,21 @@ struct gdbarch startup_gdbarch =
0, /* cannot_fetch_register */
0, /* cannot_store_register */
0, /* get_longjmp_target */
- deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
- 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, /* deprecated_pop_frame */
0, /* deprecated_store_struct_return */
0, /* return_value */
- 0, /* return_value_on_stack */
0, /* extract_return_value */
0, /* store_return_value */
0, /* deprecated_extract_return_value */
0, /* deprecated_store_return_value */
- 0, /* use_struct_convention */
+ 0, /* deprecated_use_struct_convention */
0, /* deprecated_extract_struct_value_address */
- 0, /* deprecated_frame_init_saved_regs */
- 0, /* deprecated_init_extra_frame_info */
0, /* skip_prologue */
0, /* inner_than */
0, /* breakpoint_from_pc */
@@ -381,17 +321,11 @@ struct gdbarch startup_gdbarch =
0, /* memory_insert_breakpoint */
0, /* memory_remove_breakpoint */
0, /* decr_pc_after_break */
- 0, /* function_start_offset */
+ 0, /* deprecated_function_start_offset */
generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
0, /* frame_args_skip */
- 0, /* deprecated_frameless_function_invocation */
- 0, /* deprecated_frame_chain */
- 0, /* deprecated_frame_chain_valid */
- 0, /* deprecated_frame_saved_pc */
0, /* unwind_pc */
0, /* unwind_sp */
- get_frame_base, /* deprecated_frame_args_address */
- get_frame_base, /* deprecated_frame_locals_address */
0, /* deprecated_saved_pc_after_call */
0, /* frame_num_args */
0, /* deprecated_stack_align */
@@ -399,10 +333,6 @@ struct gdbarch startup_gdbarch =
0, /* deprecated_reg_struct_has_addr */
default_stabs_argument_has_addr, /* stabs_argument_has_addr */
0, /* frame_red_zone_size */
- 0, /* parm_boundary */
- 0, /* float_format */
- 0, /* double_format */
- 0, /* long_double_format */
convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
0, /* addr_bits_remove */
0, /* smash_text_address */
@@ -412,9 +342,6 @@ struct gdbarch startup_gdbarch =
generic_skip_solib_resolver, /* skip_solib_resolver */
0, /* in_solib_call_trampoline */
0, /* in_solib_return_trampoline */
- 0, /* deprecated_pc_in_sigtramp */
- 0, /* deprecated_sigtramp_start */
- 0, /* deprecated_sigtramp_end */
generic_in_function_epilogue_p, /* in_function_epilogue_p */
construct_inferior_arguments, /* construct_inferior_arguments */
0, /* elf_make_msymbol_special */
@@ -488,32 +415,22 @@ 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->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->deprecated_fp_regnum = -1;
- current_gdbarch->deprecated_use_generic_dummy_frames = 1;
current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
- current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
- current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
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;
current_gdbarch->cannot_store_register = cannot_register_not;
- current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
- 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;
+ current_gdbarch->convert_register_p = generic_convert_register_p;
current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
- current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
+ current_gdbarch->return_value = legacy_return_value;
current_gdbarch->extract_return_value = legacy_extract_return_value;
current_gdbarch->store_return_value = legacy_store_return_value;
- current_gdbarch->use_struct_convention = generic_use_struct_convention;
+ current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
- current_gdbarch->deprecated_frame_args_address = get_frame_base;
- current_gdbarch->deprecated_frame_locals_address = get_frame_base;
current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
@@ -522,7 +439,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
- current_gdbarch->deprecated_pc_in_sigtramp = legacy_pc_in_sigtramp;
current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
@@ -592,8 +508,14 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of long_bit, invalid_p == 0 */
/* Skip verify of long_long_bit, invalid_p == 0 */
/* Skip verify of float_bit, invalid_p == 0 */
+ if (current_gdbarch->float_format == 0)
+ current_gdbarch->float_format = default_float_format (current_gdbarch);
/* Skip verify of double_bit, invalid_p == 0 */
+ if (current_gdbarch->double_format == 0)
+ current_gdbarch->double_format = default_double_format (current_gdbarch);
/* Skip verify of long_double_bit, invalid_p == 0 */
+ if (current_gdbarch->long_double_format == 0)
+ current_gdbarch->long_double_format = default_double_format (current_gdbarch);
/* Skip verify of ptr_bit, invalid_p == 0 */
if (current_gdbarch->addr_bit == 0)
current_gdbarch->addr_bit = TARGET_PTR_BIT;
@@ -606,8 +528,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
/* Skip verify of pseudo_register_read, has predicate */
/* Skip verify of pseudo_register_write, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (current_gdbarch->num_regs == -1))
+ if (current_gdbarch->num_regs == -1)
fprintf_unfiltered (log, "\n\tnum_regs");
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
/* Skip verify of sp_regnum, invalid_p == 0 */
@@ -620,28 +541,13 @@ verify_gdbarch (struct gdbarch *current_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_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, has predicate */
- /* Skip verify of deprecated_register_virtual_size, has predicate */
- /* Skip verify of deprecated_max_register_raw_size, has predicate */
- /* Skip verify of deprecated_max_register_virtual_size, has predicate */
/* Skip verify of unwind_dummy_id, has predicate */
- /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
- /* Skip verify of deprecated_target_read_fp, has predicate */
/* Skip verify of push_dummy_call, has predicate */
/* Skip verify of deprecated_push_arguments, has predicate */
- /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
- /* Skip verify of deprecated_push_return_address, has predicate */
- /* Skip verify of deprecated_dummy_write_sp, has predicate */
/* Skip verify of call_dummy_location, invalid_p == 0 */
- /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
- /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
- /* Skip verify of deprecated_fix_call_dummy, has predicate */
/* Skip verify of push_dummy_code, has predicate */
- /* Skip verify of deprecated_push_dummy_frame, 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 */
/* Skip verify of print_vector_info, has predicate */
@@ -650,79 +556,47 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
/* Skip verify of cannot_store_register, invalid_p == 0 */
/* Skip verify of get_longjmp_target, has predicate */
- /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
- /* 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 deprecated_register_convertible, has predicate */
- /* 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 */
/* Skip verify of pointer_to_address, invalid_p == 0 */
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
- /* Skip verify of deprecated_pop_frame, has predicate */
/* Skip verify of deprecated_store_struct_return, has predicate */
/* Skip verify of return_value, has predicate */
- /* Skip verify of return_value_on_stack, invalid_p == 0 */
/* Skip verify of extract_return_value, invalid_p == 0 */
/* Skip verify of store_return_value, invalid_p == 0 */
- /* Skip verify of use_struct_convention, invalid_p == 0 */
+ /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
/* Skip verify of deprecated_extract_struct_value_address, has predicate */
- /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
- /* Skip verify of deprecated_init_extra_frame_info, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (current_gdbarch->skip_prologue == 0))
+ if (current_gdbarch->skip_prologue == 0)
fprintf_unfiltered (log, "\n\tskip_prologue");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (current_gdbarch->inner_than == 0))
+ if (current_gdbarch->inner_than == 0)
fprintf_unfiltered (log, "\n\tinner_than");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (current_gdbarch->breakpoint_from_pc == 0))
+ if (current_gdbarch->breakpoint_from_pc == 0)
fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
/* Skip verify of adjust_breakpoint_address, has predicate */
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
/* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
/* Skip verify of decr_pc_after_break, invalid_p == 0 */
- /* Skip verify of function_start_offset, invalid_p == 0 */
+ /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
/* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
/* Skip verify of frame_args_skip, invalid_p == 0 */
- /* Skip verify of deprecated_frameless_function_invocation, has predicate */
- /* Skip verify of deprecated_frame_chain, has predicate */
- /* 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 deprecated_frame_args_address, has predicate */
- /* Skip verify of deprecated_frame_locals_address, has predicate */
/* Skip verify of deprecated_saved_pc_after_call, has predicate */
/* Skip verify of frame_num_args, has predicate */
/* Skip verify of deprecated_stack_align, has predicate */
/* Skip verify of frame_align, has predicate */
/* Skip verify of deprecated_reg_struct_has_addr, has predicate */
/* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
- if (current_gdbarch->float_format == 0)
- current_gdbarch->float_format = default_float_format (current_gdbarch);
- if (current_gdbarch->double_format == 0)
- current_gdbarch->double_format = default_double_format (current_gdbarch);
- if (current_gdbarch->long_double_format == 0)
- current_gdbarch->long_double_format = default_double_format (current_gdbarch);
/* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
/* Skip verify of addr_bits_remove, invalid_p == 0 */
/* Skip verify of smash_text_address, invalid_p == 0 */
/* Skip verify of software_single_step, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (current_gdbarch->print_insn == 0))
+ if (current_gdbarch->print_insn == 0)
fprintf_unfiltered (log, "\n\tprint_insn");
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
/* Skip verify of skip_solib_resolver, 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 deprecated_pc_in_sigtramp, has predicate */
- /* Skip verify of deprecated_sigtramp_start, has predicate */
- /* Skip verify of deprecated_sigtramp_end, has predicate */
/* Skip verify of in_function_epilogue_p, invalid_p == 0 */
/* Skip verify of construct_inferior_arguments, invalid_p == 0 */
/* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
@@ -757,1695 +631,1013 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
void
gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
{
+ const char *gdb_xm_file = "<not-defined>";
+ const char *gdb_nm_file = "<not-defined>";
+ const char *gdb_tm_file = "<not-defined>";
+#if defined (GDB_XM_FILE)
+ gdb_xm_file = GDB_XM_FILE;
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
- GDB_MULTI_ARCH);
- fprintf_unfiltered (file,
- "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
- (long) current_gdbarch->convert_from_func_ptr_addr);
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
- gdbarch_frame_align_p (current_gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: frame_align = 0x%08lx\n",
- (long) current_gdbarch->frame_align);
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
- gdbarch_regset_from_core_section_p (current_gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
- (long) current_gdbarch->regset_from_core_section);
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_return_value_p() = %d\n",
- gdbarch_return_value_p (current_gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: return_value = 0x%08lx\n",
- (long) current_gdbarch->return_value);
- fprintf_unfiltered (file,
- "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
- (long) current_gdbarch->in_function_epilogue_p);
+ "gdbarch_dump: GDB_XM_FILE = %s\n",
+ gdb_xm_file);
+#if defined (GDB_NM_FILE)
+ gdb_nm_file = GDB_NM_FILE;
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
- (long) current_gdbarch->register_reggroup_p);
+ "gdbarch_dump: GDB_NM_FILE = %s\n",
+ gdb_nm_file);
+#if defined (GDB_TM_FILE)
+ gdb_tm_file = GDB_TM_FILE;
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
- (long) current_gdbarch->stabs_argument_has_addr);
+ "gdbarch_dump: GDB_TM_FILE = %s\n",
+ gdb_tm_file);
+#ifdef TARGET_ADDR_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
- gdbarch_pseudo_register_read_p (current_gdbarch));
+ "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
+ XSTRING (TARGET_ADDR_BIT));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
- (long) current_gdbarch->pseudo_register_read);
+ "gdbarch_dump: addr_bit = %s\n",
+ paddr_d (current_gdbarch->addr_bit));
+#ifdef ADDR_BITS_REMOVE
fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
- gdbarch_pseudo_register_write_p (current_gdbarch));
+ "gdbarch_dump: %s # %s\n",
+ "ADDR_BITS_REMOVE(addr)",
+ XSTRING (ADDR_BITS_REMOVE (addr)));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
- (long) current_gdbarch->pseudo_register_write);
+ "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
+ (long) current_gdbarch->addr_bits_remove);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
+ "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
(long) current_gdbarch->address_class_name_to_type_flags);
#ifdef ADDRESS_CLASS_TYPE_FLAGS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"ADDRESS_CLASS_TYPE_FLAGS_P()",
XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
- ADDRESS_CLASS_TYPE_FLAGS_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
+ gdbarch_address_class_type_flags_p (current_gdbarch));
#ifdef ADDRESS_CLASS_TYPE_FLAGS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
- fprintf_unfiltered (file,
- "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
- (long) current_gdbarch->address_class_type_flags
- /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
#endif
fprintf_unfiltered (file,
+ "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
+ (long) current_gdbarch->address_class_type_flags);
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
+ "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
(long) current_gdbarch->address_class_type_flags_to_name);
#ifdef ADDRESS_TO_POINTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"ADDRESS_TO_POINTER(type, buf, addr)",
XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
- (long) current_gdbarch->address_to_pointer
- /*ADDRESS_TO_POINTER ()*/);
#endif
-#ifdef ADDR_BITS_REMOVE
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "ADDR_BITS_REMOVE(addr)",
- XSTRING (ADDR_BITS_REMOVE (addr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
- (long) current_gdbarch->addr_bits_remove
- /*ADDR_BITS_REMOVE ()*/);
-#endif
+ "gdbarch_dump: address_to_pointer = <0x%lx>\n",
+ (long) current_gdbarch->address_to_pointer);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
gdbarch_adjust_breakpoint_address_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
+ "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
(long) current_gdbarch->adjust_breakpoint_address);
#ifdef BELIEVE_PCC_PROMOTION
fprintf_unfiltered (file,
"gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
XSTRING (BELIEVE_PCC_PROMOTION));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
- BELIEVE_PCC_PROMOTION);
+ "gdbarch_dump: believe_pcc_promotion = %s\n",
+ paddr_d (current_gdbarch->believe_pcc_promotion));
+#ifdef TARGET_ARCHITECTURE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
+ XSTRING (TARGET_ARCHITECTURE));
#endif
-#ifdef BELIEVE_PCC_PROMOTION_TYPE
fprintf_unfiltered (file,
- "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
- XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
+ "gdbarch_dump: bfd_arch_info = %s\n",
+ TARGET_ARCHITECTURE->printable_name);
+#ifdef TARGET_BFD_VMA_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
- BELIEVE_PCC_PROMOTION_TYPE);
+ "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
+ XSTRING (TARGET_BFD_VMA_BIT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: bfd_vma_bit = %s\n",
+ paddr_d (current_gdbarch->bfd_vma_bit));
#ifdef BREAKPOINT_FROM_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"BREAKPOINT_FROM_PC(pcptr, lenptr)",
XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
+ (long) current_gdbarch->breakpoint_from_pc);
+#ifdef TARGET_BYTE_ORDER
fprintf_unfiltered (file,
- "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
- (long) current_gdbarch->breakpoint_from_pc
- /*BREAKPOINT_FROM_PC ()*/);
+ "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
+ XSTRING (TARGET_BYTE_ORDER));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: byte_order = %s\n",
+ paddr_d (current_gdbarch->byte_order));
#ifdef CALL_DUMMY_LOCATION
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
XSTRING (CALL_DUMMY_LOCATION));
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
- CALL_DUMMY_LOCATION);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: call_dummy_location = %s\n",
+ paddr_d (current_gdbarch->call_dummy_location));
#ifdef CANNOT_FETCH_REGISTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"CANNOT_FETCH_REGISTER(regnum)",
XSTRING (CANNOT_FETCH_REGISTER (regnum)));
- fprintf_unfiltered (file,
- "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
- (long) current_gdbarch->cannot_fetch_register
- /*CANNOT_FETCH_REGISTER ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
+ (long) current_gdbarch->cannot_fetch_register);
#ifdef CANNOT_STEP_BREAKPOINT
fprintf_unfiltered (file,
"gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
XSTRING (CANNOT_STEP_BREAKPOINT));
- fprintf_unfiltered (file,
- "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
- CANNOT_STEP_BREAKPOINT);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: cannot_step_breakpoint = %s\n",
+ paddr_d (current_gdbarch->cannot_step_breakpoint));
#ifdef CANNOT_STORE_REGISTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"CANNOT_STORE_REGISTER(regnum)",
XSTRING (CANNOT_STORE_REGISTER (regnum)));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: cannot_store_register = <0x%lx>\n",
+ (long) current_gdbarch->cannot_store_register);
+#ifdef TARGET_CHAR_SIGNED
fprintf_unfiltered (file,
- "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
- (long) current_gdbarch->cannot_store_register
- /*CANNOT_STORE_REGISTER ()*/);
+ "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
+ XSTRING (TARGET_CHAR_SIGNED));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: char_signed = %s\n",
+ paddr_d (current_gdbarch->char_signed));
#ifdef COFF_MAKE_MSYMBOL_SPECIAL
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
- fprintf_unfiltered (file,
- "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
- (long) current_gdbarch->coff_make_msymbol_special
- /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
#endif
fprintf_unfiltered (file,
- "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
+ "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
+ (long) current_gdbarch->coff_make_msymbol_special);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
(long) current_gdbarch->construct_inferior_arguments);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
+ (long) current_gdbarch->convert_from_func_ptr_addr);
#ifdef CONVERT_REGISTER_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"CONVERT_REGISTER_P(regnum, type)",
XSTRING (CONVERT_REGISTER_P (regnum, type)));
- fprintf_unfiltered (file,
- "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
- (long) current_gdbarch->convert_register_p
- /*CONVERT_REGISTER_P ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: convert_register_p = <0x%lx>\n",
+ (long) current_gdbarch->convert_register_p);
#ifdef DECR_PC_AFTER_BREAK
fprintf_unfiltered (file,
"gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
XSTRING (DECR_PC_AFTER_BREAK));
- fprintf_unfiltered (file,
- "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
- (long) DECR_PC_AFTER_BREAK);
#endif
-#ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
- XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
- (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
-#endif
-#ifdef DEPRECATED_CALL_DUMMY_LENGTH
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
- XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
- DEPRECATED_CALL_DUMMY_LENGTH);
-#endif
-#ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
- XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
- (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
-#endif
-#ifdef DEPRECATED_CALL_DUMMY_WORDS
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
- XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
- (long) DEPRECATED_CALL_DUMMY_WORDS);
-#endif
-#ifdef DEPRECATED_DO_REGISTERS_INFO_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_DO_REGISTERS_INFO_P()",
- XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
- DEPRECATED_DO_REGISTERS_INFO_P ());
-#endif
-#ifdef DEPRECATED_DO_REGISTERS_INFO
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
- XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_do_registers_info
- /*DEPRECATED_DO_REGISTERS_INFO ()*/);
-#endif
-#ifdef DEPRECATED_DUMMY_WRITE_SP_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_DUMMY_WRITE_SP_P()",
- XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
- DEPRECATED_DUMMY_WRITE_SP_P ());
-#endif
-#ifdef DEPRECATED_DUMMY_WRITE_SP
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_DUMMY_WRITE_SP(val)",
- XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_dummy_write_sp
- /*DEPRECATED_DUMMY_WRITE_SP ()*/);
-#endif
+ "gdbarch_dump: decr_pc_after_break = 0x%s\n",
+ paddr_nz (current_gdbarch->decr_pc_after_break));
#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_extract_return_value
- /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_extract_return_value);
#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
+ gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_extract_struct_value_address
- /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
-#endif
-#ifdef DEPRECATED_FIX_CALL_DUMMY_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FIX_CALL_DUMMY_P()",
- XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
- DEPRECATED_FIX_CALL_DUMMY_P ());
#endif
-#ifdef DEPRECATED_FIX_CALL_DUMMY
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
- XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_fix_call_dummy
- /*DEPRECATED_FIX_CALL_DUMMY ()*/);
-#endif
+ "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_extract_struct_value_address);
#ifdef DEPRECATED_FP_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
XSTRING (DEPRECATED_FP_REGNUM));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
- DEPRECATED_FP_REGNUM);
-#endif
-#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
- XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
- DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
-#endif
-#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
- XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frameless_function_invocation
- /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
-#endif
-#ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
- XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
- DEPRECATED_FRAME_ARGS_ADDRESS_P ());
-#endif
-#ifdef DEPRECATED_FRAME_ARGS_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
- XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_args_address
- /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
#endif
-#ifdef DEPRECATED_FRAME_CHAIN_P
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_CHAIN_P()",
- XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
- DEPRECATED_FRAME_CHAIN_P ());
-#endif
-#ifdef DEPRECATED_FRAME_CHAIN
+ "gdbarch_dump: deprecated_fp_regnum = %s\n",
+ paddr_d (current_gdbarch->deprecated_fp_regnum));
+#ifdef DEPRECATED_FUNCTION_START_OFFSET
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_CHAIN(frame)",
- XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_chain
- /*DEPRECATED_FRAME_CHAIN ()*/);
+ "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
+ XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
#endif
-#ifdef DEPRECATED_FRAME_CHAIN_VALID_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_CHAIN_VALID_P()",
- XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
- DEPRECATED_FRAME_CHAIN_VALID_P ());
-#endif
-#ifdef DEPRECATED_FRAME_CHAIN_VALID
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
- XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_chain_valid
- /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
-#endif
-#ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
- XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
- DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
-#endif
-#ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
- XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_init_saved_regs
- /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
-#endif
-#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
- XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
- DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
-#endif
-#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
- XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_locals_address
- /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
-#endif
-#ifdef DEPRECATED_FRAME_SAVED_PC_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_SAVED_PC_P()",
- XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
- DEPRECATED_FRAME_SAVED_PC_P ());
-#endif
-#ifdef DEPRECATED_FRAME_SAVED_PC
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_FRAME_SAVED_PC(fi)",
- XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_frame_saved_pc
- /*DEPRECATED_FRAME_SAVED_PC ()*/);
-#endif
-#ifdef DEPRECATED_GET_SAVED_REGISTER_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_GET_SAVED_REGISTER_P()",
- XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
- DEPRECATED_GET_SAVED_REGISTER_P ());
-#endif
-#ifdef DEPRECATED_GET_SAVED_REGISTER
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
- XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_get_saved_register
- /*DEPRECATED_GET_SAVED_REGISTER ()*/);
-#endif
-#ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
- XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
- DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
-#endif
-#ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
- XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_init_extra_frame_info
- /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
-#endif
-#ifdef DEPRECATED_INIT_FRAME_PC_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_FRAME_PC_P()",
- XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
- DEPRECATED_INIT_FRAME_PC_P ());
-#endif
-#ifdef DEPRECATED_INIT_FRAME_PC
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
- XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_init_frame_pc
- /*DEPRECATED_INIT_FRAME_PC ()*/);
-#endif
-#ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
- XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
- DEPRECATED_INIT_FRAME_PC_FIRST_P ());
-#endif
-#ifdef DEPRECATED_INIT_FRAME_PC_FIRST
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
- XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_init_frame_pc_first
- /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
-#endif
-#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
- XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
- DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
-#endif
-#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
- XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
- DEPRECATED_MAX_REGISTER_RAW_SIZE);
-#endif
-#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
- XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
- DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
-#endif
-#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
- XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
- DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
-#endif
-#ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PC_IN_CALL_DUMMY_P()",
- XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
- DEPRECATED_PC_IN_CALL_DUMMY_P ());
-#endif
-#ifdef DEPRECATED_PC_IN_CALL_DUMMY
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
- XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_pc_in_call_dummy
- /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
-#endif
-#ifdef DEPRECATED_PC_IN_SIGTRAMP_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PC_IN_SIGTRAMP_P()",
- XSTRING (DEPRECATED_PC_IN_SIGTRAMP_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP_P() = %d\n",
- DEPRECATED_PC_IN_SIGTRAMP_P ());
-#endif
-#ifdef DEPRECATED_PC_IN_SIGTRAMP
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PC_IN_SIGTRAMP(pc, name)",
- XSTRING (DEPRECATED_PC_IN_SIGTRAMP (pc, name)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_pc_in_sigtramp
- /*DEPRECATED_PC_IN_SIGTRAMP ()*/);
-#endif
-#ifdef DEPRECATED_POP_FRAME_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_POP_FRAME_P()",
- XSTRING (DEPRECATED_POP_FRAME_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
- DEPRECATED_POP_FRAME_P ());
-#endif
-#ifdef DEPRECATED_POP_FRAME
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_POP_FRAME(-)",
- XSTRING (DEPRECATED_POP_FRAME (-)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_pop_frame
- /*DEPRECATED_POP_FRAME ()*/);
-#endif
+ "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
+ paddr_nz (current_gdbarch->deprecated_function_start_offset));
#ifdef DEPRECATED_PUSH_ARGUMENTS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_PUSH_ARGUMENTS_P()",
XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
- DEPRECATED_PUSH_ARGUMENTS_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
+ gdbarch_deprecated_push_arguments_p (current_gdbarch));
#ifdef DEPRECATED_PUSH_ARGUMENTS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_push_arguments
- /*DEPRECATED_PUSH_ARGUMENTS ()*/);
#endif
-#ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PUSH_DUMMY_FRAME_P()",
- XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
- DEPRECATED_PUSH_DUMMY_FRAME_P ());
-#endif
-#ifdef DEPRECATED_PUSH_DUMMY_FRAME
+ "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_push_arguments);
+#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "DEPRECATED_PUSH_DUMMY_FRAME(-)",
- XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_push_dummy_frame
- /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
+ "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
+ XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
#endif
-#ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
- XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
- DEPRECATED_PUSH_RETURN_ADDRESS_P ());
-#endif
-#ifdef DEPRECATED_PUSH_RETURN_ADDRESS
+ "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
+ gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
+#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
- XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_push_return_address
- /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
+ "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
+ XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_reg_struct_has_addr);
#ifdef DEPRECATED_REGISTER_BYTE_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_REGISTER_BYTE_P()",
XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
- DEPRECATED_REGISTER_BYTE_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
+ gdbarch_deprecated_register_byte_p (current_gdbarch));
#ifdef DEPRECATED_REGISTER_BYTE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_REGISTER_BYTE(reg_nr)",
XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_byte
- /*DEPRECATED_REGISTER_BYTE ()*/);
-#endif
-#ifdef DEPRECATED_REGISTER_BYTES
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
- XSTRING (DEPRECATED_REGISTER_BYTES));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
- DEPRECATED_REGISTER_BYTES);
-#endif
-#ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_CONVERTIBLE_P()",
- XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
- DEPRECATED_REGISTER_CONVERTIBLE_P ());
-#endif
-#ifdef DEPRECATED_REGISTER_CONVERTIBLE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
- XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
- 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
- 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)));
- 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
- 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)));
- 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_RAW_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_RAW_SIZE_P()",
- XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
- DEPRECATED_REGISTER_RAW_SIZE_P ());
#endif
-#ifdef DEPRECATED_REGISTER_RAW_SIZE
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
- XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_raw_size
- /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
-#endif
+ "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_register_byte);
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
XSTRING (DEPRECATED_REGISTER_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
- DEPRECATED_REGISTER_SIZE);
-#endif
-#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
- DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
-#endif
-#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_virtual_size
- /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
-#endif
-#ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
- DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
#endif
-#ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_virtual_type
- /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
-#endif
-#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
- XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
- DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
-#endif
-#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
- XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_reg_struct_has_addr
- /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
-#endif
+ "gdbarch_dump: deprecated_register_size = %s\n",
+ paddr_d (current_gdbarch->deprecated_register_size));
#ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_SAVED_PC_AFTER_CALL_P()",
XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
- DEPRECATED_SAVED_PC_AFTER_CALL_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_saved_pc_after_call_p() = %d\n",
+ gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch));
#ifdef DEPRECATED_SAVED_PC_AFTER_CALL
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_saved_pc_after_call
- /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
-#endif
-#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
- XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
- DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
-#endif
-#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
- XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_save_dummy_frame_tos
- /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
#endif
-#ifdef DEPRECATED_SIGTRAMP_END_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SIGTRAMP_END_P()",
- XSTRING (DEPRECATED_SIGTRAMP_END_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIGTRAMP_END_P() = %d\n",
- DEPRECATED_SIGTRAMP_END_P ());
-#endif
-#ifdef DEPRECATED_SIGTRAMP_END
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SIGTRAMP_END(pc)",
- XSTRING (DEPRECATED_SIGTRAMP_END (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIGTRAMP_END = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_sigtramp_end
- /*DEPRECATED_SIGTRAMP_END ()*/);
-#endif
-#ifdef DEPRECATED_SIGTRAMP_START_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SIGTRAMP_START_P()",
- XSTRING (DEPRECATED_SIGTRAMP_START_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIGTRAMP_START_P() = %d\n",
- DEPRECATED_SIGTRAMP_START_P ());
-#endif
-#ifdef DEPRECATED_SIGTRAMP_START
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_SIGTRAMP_START(pc)",
- XSTRING (DEPRECATED_SIGTRAMP_START (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIGTRAMP_START = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_sigtramp_start
- /*DEPRECATED_SIGTRAMP_START ()*/);
-#endif
-#ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
- XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
- DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
-#endif
+ "gdbarch_dump: deprecated_saved_pc_after_call = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_saved_pc_after_call);
#ifdef DEPRECATED_STACK_ALIGN_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_STACK_ALIGN_P()",
XSTRING (DEPRECATED_STACK_ALIGN_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
- DEPRECATED_STACK_ALIGN_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
+ gdbarch_deprecated_stack_align_p (current_gdbarch));
#ifdef DEPRECATED_STACK_ALIGN
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_STACK_ALIGN(sp)",
XSTRING (DEPRECATED_STACK_ALIGN (sp)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_stack_align
- /*DEPRECATED_STACK_ALIGN ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_stack_align);
#ifdef DEPRECATED_STORE_RETURN_VALUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_store_return_value
- /*DEPRECATED_STORE_RETURN_VALUE ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_store_return_value);
#ifdef DEPRECATED_STORE_STRUCT_RETURN_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_STORE_STRUCT_RETURN_P()",
XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
- DEPRECATED_STORE_STRUCT_RETURN_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
+ gdbarch_deprecated_store_struct_return_p (current_gdbarch));
#ifdef DEPRECATED_STORE_STRUCT_RETURN
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_store_struct_return
- /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
#endif
-#ifdef DEPRECATED_TARGET_READ_FP_P
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_TARGET_READ_FP_P()",
- XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
+ "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_store_struct_return);
+#ifdef DEPRECATED_USE_STRUCT_CONVENTION
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
- DEPRECATED_TARGET_READ_FP_P ());
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
+ XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
#endif
-#ifdef DEPRECATED_TARGET_READ_FP
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_TARGET_READ_FP()",
- XSTRING (DEPRECATED_TARGET_READ_FP ()));
+ "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
+ (long) current_gdbarch->deprecated_use_struct_convention);
+#ifdef TARGET_DOUBLE_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_target_read_fp
- /*DEPRECATED_TARGET_READ_FP ()*/);
+ "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
+ XSTRING (TARGET_DOUBLE_BIT));
#endif
-#ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
- XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
+ "gdbarch_dump: double_bit = %s\n",
+ paddr_d (current_gdbarch->double_bit));
+#ifdef TARGET_DOUBLE_FORMAT
fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
- DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+ "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
+ XSTRING (TARGET_DOUBLE_FORMAT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: double_format = %s\n",
+ pformat (current_gdbarch->double_format));
#ifdef DWARF2_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
- (long) current_gdbarch->dwarf2_reg_to_regnum
- /*DWARF2_REG_TO_REGNUM ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
+ (long) current_gdbarch->dwarf2_reg_to_regnum);
#ifdef DWARF_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"DWARF_REG_TO_REGNUM(dwarf_regnr)",
XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
- (long) current_gdbarch->dwarf_reg_to_regnum
- /*DWARF_REG_TO_REGNUM ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
+ (long) current_gdbarch->dwarf_reg_to_regnum);
#ifdef ECOFF_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"ECOFF_REG_TO_REGNUM(ecoff_regnr)",
XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
- (long) current_gdbarch->ecoff_reg_to_regnum
- /*ECOFF_REG_TO_REGNUM ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
+ (long) current_gdbarch->ecoff_reg_to_regnum);
#ifdef ELF_MAKE_MSYMBOL_SPECIAL
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
- fprintf_unfiltered (file,
- "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
- (long) current_gdbarch->elf_make_msymbol_special
- /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
+ (long) current_gdbarch->elf_make_msymbol_special);
#ifdef EXTRACT_RETURN_VALUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
- (long) current_gdbarch->extract_return_value
- /*EXTRACT_RETURN_VALUE ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: extract_return_value = <0x%lx>\n",
+ (long) current_gdbarch->extract_return_value);
#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
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
+ gdbarch_fetch_pointer_argument_p (current_gdbarch));
#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)));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
- (long) current_gdbarch->fetch_pointer_argument
- /*FETCH_POINTER_ARGUMENT ()*/);
+ "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
+ (long) current_gdbarch->fetch_pointer_argument);
+#ifdef TARGET_FLOAT_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
+ XSTRING (TARGET_FLOAT_BIT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: float_bit = %s\n",
+ paddr_d (current_gdbarch->float_bit));
+#ifdef TARGET_FLOAT_FORMAT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
+ XSTRING (TARGET_FLOAT_FORMAT));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: float_format = %s\n",
+ pformat (current_gdbarch->float_format));
#ifdef FP0_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: FP0_REGNUM # %s\n",
XSTRING (FP0_REGNUM));
- fprintf_unfiltered (file,
- "gdbarch_dump: FP0_REGNUM = %d\n",
- FP0_REGNUM);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: fp0_regnum = %s\n",
+ paddr_d (current_gdbarch->fp0_regnum));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
+ gdbarch_frame_align_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: frame_align = <0x%lx>\n",
+ (long) current_gdbarch->frame_align);
#ifdef FRAME_ARGS_SKIP
fprintf_unfiltered (file,
"gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
XSTRING (FRAME_ARGS_SKIP));
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
- (long) FRAME_ARGS_SKIP);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: frame_args_skip = 0x%s\n",
+ paddr_nz (current_gdbarch->frame_args_skip));
#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
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
+ gdbarch_frame_num_args_p (current_gdbarch));
#ifdef FRAME_NUM_ARGS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"FRAME_NUM_ARGS(frame)",
XSTRING (FRAME_NUM_ARGS (frame)));
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
- (long) current_gdbarch->frame_num_args
- /*FRAME_NUM_ARGS ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: frame_num_args = <0x%lx>\n",
+ (long) current_gdbarch->frame_num_args);
#ifdef FRAME_RED_ZONE_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
XSTRING (FRAME_RED_ZONE_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
- FRAME_RED_ZONE_SIZE);
#endif
-#ifdef FUNCTION_START_OFFSET
fprintf_unfiltered (file,
- "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
- XSTRING (FUNCTION_START_OFFSET));
- fprintf_unfiltered (file,
- "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
- (long) FUNCTION_START_OFFSET);
-#endif
+ "gdbarch_dump: frame_red_zone_size = %s\n",
+ paddr_d (current_gdbarch->frame_red_zone_size));
#ifdef GET_LONGJMP_TARGET_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"GET_LONGJMP_TARGET_P()",
XSTRING (GET_LONGJMP_TARGET_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
- GET_LONGJMP_TARGET_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
+ gdbarch_get_longjmp_target_p (current_gdbarch));
#ifdef GET_LONGJMP_TARGET
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"GET_LONGJMP_TARGET(pc)",
XSTRING (GET_LONGJMP_TARGET (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
- (long) current_gdbarch->get_longjmp_target
- /*GET_LONGJMP_TARGET ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
+ (long) current_gdbarch->get_longjmp_target);
#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
fprintf_unfiltered (file,
"gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
+ paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
fprintf_unfiltered (file,
- "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
- HAVE_NONSTEPPABLE_WATCHPOINT);
+ "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
+ (long) current_gdbarch->in_function_epilogue_p);
+#ifdef IN_SOLIB_CALL_TRAMPOLINE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
+ XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
+ (long) current_gdbarch->in_solib_call_trampoline);
+#ifdef IN_SOLIB_RETURN_TRAMPOLINE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
+ XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
+ (long) current_gdbarch->in_solib_return_trampoline);
#ifdef INNER_THAN
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"INNER_THAN(lhs, rhs)",
XSTRING (INNER_THAN (lhs, rhs)));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
- (long) current_gdbarch->inner_than
- /*INNER_THAN ()*/);
+ "gdbarch_dump: inner_than = <0x%lx>\n",
+ (long) current_gdbarch->inner_than);
+#ifdef TARGET_INT_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_INT_BIT # %s\n",
+ XSTRING (TARGET_INT_BIT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: int_bit = %s\n",
+ paddr_d (current_gdbarch->int_bit));
#ifdef INTEGER_TO_ADDRESS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"INTEGER_TO_ADDRESS_P()",
XSTRING (INTEGER_TO_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
- INTEGER_TO_ADDRESS_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
+ gdbarch_integer_to_address_p (current_gdbarch));
#ifdef INTEGER_TO_ADDRESS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"INTEGER_TO_ADDRESS(type, buf)",
XSTRING (INTEGER_TO_ADDRESS (type, buf)));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->integer_to_address
- /*INTEGER_TO_ADDRESS ()*/);
+ "gdbarch_dump: integer_to_address = <0x%lx>\n",
+ (long) current_gdbarch->integer_to_address);
+#ifdef TARGET_LONG_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_LONG_BIT # %s\n",
+ XSTRING (TARGET_LONG_BIT));
#endif
-#ifdef IN_SOLIB_CALL_TRAMPOLINE
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
- XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
+ "gdbarch_dump: long_bit = %s\n",
+ paddr_d (current_gdbarch->long_bit));
+#ifdef TARGET_LONG_DOUBLE_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
- (long) current_gdbarch->in_solib_call_trampoline
- /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
+ "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
+ XSTRING (TARGET_LONG_DOUBLE_BIT));
#endif
-#ifdef IN_SOLIB_RETURN_TRAMPOLINE
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
- XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
+ "gdbarch_dump: long_double_bit = %s\n",
+ paddr_d (current_gdbarch->long_double_bit));
+#ifdef TARGET_LONG_DOUBLE_FORMAT
fprintf_unfiltered (file,
- "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
- (long) current_gdbarch->in_solib_return_trampoline
- /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
+ "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
+ XSTRING (TARGET_LONG_DOUBLE_FORMAT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: long_double_format = %s\n",
+ pformat (current_gdbarch->long_double_format));
+#ifdef TARGET_LONG_LONG_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
+ XSTRING (TARGET_LONG_LONG_BIT));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: long_long_bit = %s\n",
+ paddr_d (current_gdbarch->long_long_bit));
#ifdef MEMORY_INSERT_BREAKPOINT
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
- fprintf_unfiltered (file,
- "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
- (long) current_gdbarch->memory_insert_breakpoint
- /*MEMORY_INSERT_BREAKPOINT ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
+ (long) current_gdbarch->memory_insert_breakpoint);
#ifdef MEMORY_REMOVE_BREAKPOINT
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
- fprintf_unfiltered (file,
- "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
- (long) current_gdbarch->memory_remove_breakpoint
- /*MEMORY_REMOVE_BREAKPOINT ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
+ (long) current_gdbarch->memory_remove_breakpoint);
#ifdef NAME_OF_MALLOC
fprintf_unfiltered (file,
"gdbarch_dump: NAME_OF_MALLOC # %s\n",
XSTRING (NAME_OF_MALLOC));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: NAME_OF_MALLOC = %s\n",
+ "gdbarch_dump: name_of_malloc = %s\n",
NAME_OF_MALLOC);
-#endif
#ifdef NUM_PSEUDO_REGS
fprintf_unfiltered (file,
"gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
XSTRING (NUM_PSEUDO_REGS));
- fprintf_unfiltered (file,
- "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
- NUM_PSEUDO_REGS);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: num_pseudo_regs = %s\n",
+ paddr_d (current_gdbarch->num_pseudo_regs));
#ifdef NUM_REGS
fprintf_unfiltered (file,
"gdbarch_dump: NUM_REGS # %s\n",
XSTRING (NUM_REGS));
- fprintf_unfiltered (file,
- "gdbarch_dump: NUM_REGS = %d\n",
- NUM_REGS);
#endif
-#ifdef PARM_BOUNDARY
fprintf_unfiltered (file,
- "gdbarch_dump: PARM_BOUNDARY # %s\n",
- XSTRING (PARM_BOUNDARY));
+ "gdbarch_dump: num_regs = %s\n",
+ paddr_d (current_gdbarch->num_regs));
+#ifdef TARGET_OSABI
fprintf_unfiltered (file,
- "gdbarch_dump: PARM_BOUNDARY = %d\n",
- PARM_BOUNDARY);
+ "gdbarch_dump: TARGET_OSABI # %s\n",
+ XSTRING (TARGET_OSABI));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: osabi = %s\n",
+ paddr_d (current_gdbarch->osabi));
#ifdef PC_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: PC_REGNUM # %s\n",
XSTRING (PC_REGNUM));
- fprintf_unfiltered (file,
- "gdbarch_dump: PC_REGNUM = %d\n",
- PC_REGNUM);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: pc_regnum = %s\n",
+ paddr_d (current_gdbarch->pc_regnum));
#ifdef POINTER_TO_ADDRESS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"POINTER_TO_ADDRESS(type, buf)",
XSTRING (POINTER_TO_ADDRESS (type, buf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->pointer_to_address
- /*POINTER_TO_ADDRESS ()*/);
#endif
fprintf_unfiltered (file,
+ "gdbarch_dump: pointer_to_address = <0x%lx>\n",
+ (long) current_gdbarch->pointer_to_address);
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
gdbarch_print_float_info_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: print_float_info = 0x%08lx\n",
+ "gdbarch_dump: print_float_info = <0x%lx>\n",
(long) current_gdbarch->print_float_info);
+#ifdef TARGET_PRINT_INSN
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_PRINT_INSN(vma, info)",
+ XSTRING (TARGET_PRINT_INSN (vma, info)));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: print_insn = <0x%lx>\n",
+ (long) current_gdbarch->print_insn);
fprintf_unfiltered (file,
- "gdbarch_dump: print_registers_info = 0x%08lx\n",
+ "gdbarch_dump: print_registers_info = <0x%lx>\n",
(long) current_gdbarch->print_registers_info);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
gdbarch_print_vector_info_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: print_vector_info = 0x%08lx\n",
+ "gdbarch_dump: print_vector_info = <0x%lx>\n",
(long) current_gdbarch->print_vector_info);
#ifdef PS_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: PS_REGNUM # %s\n",
XSTRING (PS_REGNUM));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: ps_regnum = %s\n",
+ paddr_d (current_gdbarch->ps_regnum));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
+ gdbarch_pseudo_register_read_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
+ (long) current_gdbarch->pseudo_register_read);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
+ gdbarch_pseudo_register_write_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: PS_REGNUM = %d\n",
- PS_REGNUM);
+ "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
+ (long) current_gdbarch->pseudo_register_write);
+#ifdef TARGET_PTR_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_PTR_BIT # %s\n",
+ XSTRING (TARGET_PTR_BIT));
#endif
fprintf_unfiltered (file,
+ "gdbarch_dump: ptr_bit = %s\n",
+ paddr_d (current_gdbarch->ptr_bit));
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
gdbarch_push_dummy_call_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: push_dummy_call = 0x%08lx\n",
+ "gdbarch_dump: push_dummy_call = <0x%lx>\n",
(long) current_gdbarch->push_dummy_call);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
gdbarch_push_dummy_code_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: push_dummy_code = 0x%08lx\n",
+ "gdbarch_dump: push_dummy_code = <0x%lx>\n",
(long) current_gdbarch->push_dummy_code);
+#ifdef TARGET_READ_PC_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_PC_P()",
+ XSTRING (TARGET_READ_PC_P ()));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
+ gdbarch_read_pc_p (current_gdbarch));
+#ifdef TARGET_READ_PC
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_PC(ptid)",
+ XSTRING (TARGET_READ_PC (ptid)));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: read_pc = <0x%lx>\n",
+ (long) current_gdbarch->read_pc);
+#ifdef TARGET_READ_SP_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_SP_P()",
+ XSTRING (TARGET_READ_SP_P ()));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
+ gdbarch_read_sp_p (current_gdbarch));
+#ifdef TARGET_READ_SP
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_SP()",
+ XSTRING (TARGET_READ_SP ()));
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: read_sp = <0x%lx>\n",
+ (long) current_gdbarch->read_sp);
#ifdef REGISTER_BYTES_OK_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_BYTES_OK_P()",
XSTRING (REGISTER_BYTES_OK_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
- REGISTER_BYTES_OK_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
+ gdbarch_register_bytes_ok_p (current_gdbarch));
#ifdef REGISTER_BYTES_OK
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_BYTES_OK(nr_bytes)",
XSTRING (REGISTER_BYTES_OK (nr_bytes)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
- (long) current_gdbarch->register_bytes_ok
- /*REGISTER_BYTES_OK ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
+ (long) current_gdbarch->register_bytes_ok);
#ifdef REGISTER_NAME
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_NAME(regnr)",
XSTRING (REGISTER_NAME (regnr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
- (long) current_gdbarch->register_name
- /*REGISTER_NAME ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: register_name = <0x%lx>\n",
+ (long) current_gdbarch->register_name);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
+ (long) current_gdbarch->register_reggroup_p);
#ifdef REGISTER_SIM_REGNO
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_SIM_REGNO(reg_nr)",
XSTRING (REGISTER_SIM_REGNO (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
- (long) current_gdbarch->register_sim_regno
- /*REGISTER_SIM_REGNO ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: register_sim_regno = <0x%lx>\n",
+ (long) current_gdbarch->register_sim_regno);
#ifdef REGISTER_TO_VALUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"REGISTER_TO_VALUE(frame, regnum, type, buf)",
XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
- (long) current_gdbarch->register_to_value
- /*REGISTER_TO_VALUE ()*/);
#endif
fprintf_unfiltered (file,
+ "gdbarch_dump: register_to_value = <0x%lx>\n",
+ (long) current_gdbarch->register_to_value);
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_register_type_p() = %d\n",
gdbarch_register_type_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: register_type = 0x%08lx\n",
+ "gdbarch_dump: register_type = <0x%lx>\n",
(long) current_gdbarch->register_type);
fprintf_unfiltered (file,
- "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
+ "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
+ gdbarch_regset_from_core_section_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
+ (long) current_gdbarch->regset_from_core_section);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
(long) current_gdbarch->remote_translate_xfer_address);
-#ifdef RETURN_VALUE_ON_STACK
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "RETURN_VALUE_ON_STACK(type)",
- XSTRING (RETURN_VALUE_ON_STACK (type)));
+ "gdbarch_dump: gdbarch_return_value_p() = %d\n",
+ gdbarch_return_value_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
- (long) current_gdbarch->return_value_on_stack
- /*RETURN_VALUE_ON_STACK ()*/);
-#endif
+ "gdbarch_dump: return_value = <0x%lx>\n",
+ (long) current_gdbarch->return_value);
#ifdef SDB_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SDB_REG_TO_REGNUM(sdb_regnr)",
XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
- (long) current_gdbarch->sdb_reg_to_regnum
- /*SDB_REG_TO_REGNUM ()*/);
+ "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
+ (long) current_gdbarch->sdb_reg_to_regnum);
+#ifdef TARGET_SHORT_BIT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
+ XSTRING (TARGET_SHORT_BIT));
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: short_bit = %s\n",
+ paddr_d (current_gdbarch->short_bit));
#ifdef SKIP_PROLOGUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SKIP_PROLOGUE(ip)",
XSTRING (SKIP_PROLOGUE (ip)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
- (long) current_gdbarch->skip_prologue
- /*SKIP_PROLOGUE ()*/);
#endif
fprintf_unfiltered (file,
- "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
+ "gdbarch_dump: skip_prologue = <0x%lx>\n",
+ (long) current_gdbarch->skip_prologue);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
(long) current_gdbarch->skip_solib_resolver);
#ifdef SKIP_TRAMPOLINE_CODE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SKIP_TRAMPOLINE_CODE(pc)",
XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
- (long) current_gdbarch->skip_trampoline_code
- /*SKIP_TRAMPOLINE_CODE ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
+ (long) current_gdbarch->skip_trampoline_code);
#ifdef SMASH_TEXT_ADDRESS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SMASH_TEXT_ADDRESS(addr)",
XSTRING (SMASH_TEXT_ADDRESS (addr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->smash_text_address
- /*SMASH_TEXT_ADDRESS ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: smash_text_address = <0x%lx>\n",
+ (long) current_gdbarch->smash_text_address);
#ifdef SOFTWARE_SINGLE_STEP_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SOFTWARE_SINGLE_STEP_P()",
XSTRING (SOFTWARE_SINGLE_STEP_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
- SOFTWARE_SINGLE_STEP_P ());
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
+ gdbarch_software_single_step_p (current_gdbarch));
#ifdef SOFTWARE_SINGLE_STEP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
- (long) current_gdbarch->software_single_step
- /*SOFTWARE_SINGLE_STEP ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: software_single_step = <0x%lx>\n",
+ (long) current_gdbarch->software_single_step);
#ifdef SP_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: SP_REGNUM # %s\n",
XSTRING (SP_REGNUM));
- fprintf_unfiltered (file,
- "gdbarch_dump: SP_REGNUM = %d\n",
- SP_REGNUM);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: sp_regnum = %s\n",
+ paddr_d (current_gdbarch->sp_regnum));
#ifdef STAB_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"STAB_REG_TO_REGNUM(stab_regnr)",
XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
- (long) current_gdbarch->stab_reg_to_regnum
- /*STAB_REG_TO_REGNUM ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
+ (long) current_gdbarch->stab_reg_to_regnum);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
+ (long) current_gdbarch->stabs_argument_has_addr);
#ifdef STORE_RETURN_VALUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"STORE_RETURN_VALUE(type, regcache, valbuf)",
XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
- (long) current_gdbarch->store_return_value
- /*STORE_RETURN_VALUE ()*/);
-#endif
-#ifdef TARGET_ADDR_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
- XSTRING (TARGET_ADDR_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
- TARGET_ADDR_BIT);
#endif
-#ifdef TARGET_ARCHITECTURE
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
- XSTRING (TARGET_ARCHITECTURE));
- if (TARGET_ARCHITECTURE != NULL)
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
- TARGET_ARCHITECTURE->printable_name);
-#endif
-#ifdef TARGET_BFD_VMA_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
- XSTRING (TARGET_BFD_VMA_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
- TARGET_BFD_VMA_BIT);
-#endif
-#ifdef TARGET_BYTE_ORDER
+ "gdbarch_dump: store_return_value = <0x%lx>\n",
+ (long) current_gdbarch->store_return_value);
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
- XSTRING (TARGET_BYTE_ORDER));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
- (long) TARGET_BYTE_ORDER);
-#endif
-#ifdef TARGET_CHAR_SIGNED
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
- XSTRING (TARGET_CHAR_SIGNED));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
- TARGET_CHAR_SIGNED);
-#endif
-#ifdef TARGET_DOUBLE_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
- XSTRING (TARGET_DOUBLE_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
- TARGET_DOUBLE_BIT);
-#endif
-#ifdef TARGET_DOUBLE_FORMAT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
- XSTRING (TARGET_DOUBLE_FORMAT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
- (TARGET_DOUBLE_FORMAT)->name);
-#endif
-#ifdef TARGET_FLOAT_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
- XSTRING (TARGET_FLOAT_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
- TARGET_FLOAT_BIT);
-#endif
-#ifdef TARGET_FLOAT_FORMAT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
- XSTRING (TARGET_FLOAT_FORMAT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
- (TARGET_FLOAT_FORMAT)->name);
-#endif
-#ifdef TARGET_INT_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_INT_BIT # %s\n",
- XSTRING (TARGET_INT_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_INT_BIT = %d\n",
- TARGET_INT_BIT);
-#endif
-#ifdef TARGET_LONG_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_BIT # %s\n",
- XSTRING (TARGET_LONG_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_BIT = %d\n",
- TARGET_LONG_BIT);
-#endif
-#ifdef TARGET_LONG_DOUBLE_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
- XSTRING (TARGET_LONG_DOUBLE_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
- TARGET_LONG_DOUBLE_BIT);
-#endif
-#ifdef TARGET_LONG_DOUBLE_FORMAT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
- XSTRING (TARGET_LONG_DOUBLE_FORMAT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
- (TARGET_LONG_DOUBLE_FORMAT)->name);
-#endif
-#ifdef TARGET_LONG_LONG_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
- XSTRING (TARGET_LONG_LONG_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
- TARGET_LONG_LONG_BIT);
-#endif
-#ifdef TARGET_OSABI
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_OSABI # %s\n",
- XSTRING (TARGET_OSABI));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_OSABI = %ld\n",
- (long) TARGET_OSABI);
-#endif
-#ifdef TARGET_PRINT_INSN
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "TARGET_PRINT_INSN(vma, info)",
- XSTRING (TARGET_PRINT_INSN (vma, info)));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
- (long) current_gdbarch->print_insn
- /*TARGET_PRINT_INSN ()*/);
-#endif
-#ifdef TARGET_PTR_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_PTR_BIT # %s\n",
- XSTRING (TARGET_PTR_BIT));
- fprintf_unfiltered (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 ()));
+ "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
+ gdbarch_unwind_dummy_id_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
- TARGET_READ_PC_P ());
-#endif
-#ifdef TARGET_READ_PC
+ "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
+ (long) current_gdbarch->unwind_dummy_id);
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "TARGET_READ_PC(ptid)",
- XSTRING (TARGET_READ_PC (ptid)));
+ "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
+ gdbarch_unwind_pc_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
- (long) current_gdbarch->read_pc
- /*TARGET_READ_PC ()*/);
-#endif
-#ifdef TARGET_READ_SP_P
+ "gdbarch_dump: unwind_pc = <0x%lx>\n",
+ (long) current_gdbarch->unwind_pc);
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "TARGET_READ_SP_P()",
- XSTRING (TARGET_READ_SP_P ()));
+ "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
+ gdbarch_unwind_sp_p (current_gdbarch));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
- TARGET_READ_SP_P ());
-#endif
-#ifdef TARGET_READ_SP
+ "gdbarch_dump: unwind_sp = <0x%lx>\n",
+ (long) current_gdbarch->unwind_sp);
+#ifdef VALUE_TO_REGISTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "TARGET_READ_SP()",
- XSTRING (TARGET_READ_SP ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
- (long) current_gdbarch->read_sp
- /*TARGET_READ_SP ()*/);
+ "VALUE_TO_REGISTER(frame, regnum, type, buf)",
+ XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
#endif
-#ifdef TARGET_SHORT_BIT
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
- XSTRING (TARGET_SHORT_BIT));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
- TARGET_SHORT_BIT);
-#endif
+ "gdbarch_dump: value_to_register = <0x%lx>\n",
+ (long) current_gdbarch->value_to_register);
#ifdef TARGET_VIRTUAL_FRAME_POINTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
- (long) current_gdbarch->virtual_frame_pointer
- /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
+ (long) current_gdbarch->virtual_frame_pointer);
#ifdef TARGET_WRITE_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
"TARGET_WRITE_PC(val, ptid)",
XSTRING (TARGET_WRITE_PC (val, ptid)));
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
- (long) current_gdbarch->write_pc
- /*TARGET_WRITE_PC ()*/);
#endif
fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
- gdbarch_unwind_dummy_id_p (current_gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
- (long) current_gdbarch->unwind_dummy_id);
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
- gdbarch_unwind_pc_p (current_gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: unwind_pc = 0x%08lx\n",
- (long) current_gdbarch->unwind_pc);
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
- gdbarch_unwind_sp_p (current_gdbarch));
- 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",
- "USE_STRUCT_CONVENTION(gcc_p, value_type)",
- XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
- fprintf_unfiltered (file,
- "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
- (long) current_gdbarch->use_struct_convention
- /*USE_STRUCT_CONVENTION ()*/);
-#endif
-#ifdef VALUE_TO_REGISTER
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "VALUE_TO_REGISTER(frame, regnum, type, buf)",
- XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
- fprintf_unfiltered (file,
- "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
- (long) current_gdbarch->value_to_register
- /*VALUE_TO_REGISTER ()*/);
-#endif
+ "gdbarch_dump: write_pc = <0x%lx>\n",
+ (long) current_gdbarch->write_pc);
if (current_gdbarch->dump_tdep != NULL)
current_gdbarch->dump_tdep (current_gdbarch, file);
}
@@ -2571,6 +1763,22 @@ set_gdbarch_float_bit (struct gdbarch *gdbarch,
gdbarch->float_bit = float_bit;
}
+const struct floatformat *
+gdbarch_float_format (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
+ return gdbarch->float_format;
+}
+
+void
+set_gdbarch_float_format (struct gdbarch *gdbarch,
+ const struct floatformat * float_format)
+{
+ gdbarch->float_format = float_format;
+}
+
int
gdbarch_double_bit (struct gdbarch *gdbarch)
{
@@ -2588,6 +1796,22 @@ set_gdbarch_double_bit (struct gdbarch *gdbarch,
gdbarch->double_bit = double_bit;
}
+const struct floatformat *
+gdbarch_double_format (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
+ return gdbarch->double_format;
+}
+
+void
+set_gdbarch_double_format (struct gdbarch *gdbarch,
+ const struct floatformat * double_format)
+{
+ gdbarch->double_format = double_format;
+}
+
int
gdbarch_long_double_bit (struct gdbarch *gdbarch)
{
@@ -2605,6 +1829,22 @@ set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
gdbarch->long_double_bit = long_double_bit;
}
+const struct floatformat *
+gdbarch_long_double_format (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
+ return gdbarch->long_double_format;
+}
+
+void
+set_gdbarch_long_double_format (struct gdbarch *gdbarch,
+ const struct floatformat * long_double_format)
+{
+ gdbarch->long_double_format = long_double_format;
+}
+
int
gdbarch_ptr_bit (struct gdbarch *gdbarch)
{
@@ -3035,46 +2275,6 @@ set_gdbarch_register_type (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_virtual_type != NULL;
-}
-
-struct type *
-gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
- return gdbarch->deprecated_register_virtual_type (reg_nr);
-}
-
-void
-set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
-{
- gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
-}
-
-int
-gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
- return gdbarch->deprecated_register_bytes;
-}
-
-void
-set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
- int deprecated_register_bytes)
-{
- gdbarch->deprecated_register_bytes = deprecated_register_bytes;
-}
-
-int
gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3100,102 +2300,6 @@ set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_raw_size != generic_register_size;
-}
-
-int
-gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
- /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
- return gdbarch->deprecated_register_raw_size (reg_nr);
-}
-
-void
-set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
-{
- gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
-}
-
-int
-gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_virtual_size != generic_register_size;
-}
-
-int
-gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
- /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
- return gdbarch->deprecated_register_virtual_size (reg_nr);
-}
-
-void
-set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
-{
- gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
-}
-
-int
-gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_raw_size != 0;
-}
-
-int
-gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
- return gdbarch->deprecated_max_register_raw_size;
-}
-
-void
-set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
- int deprecated_max_register_raw_size)
-{
- gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
-}
-
-int
-gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_virtual_size != 0;
-}
-
-int
-gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
- return gdbarch->deprecated_max_register_virtual_size;
-}
-
-void
-set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
- int deprecated_max_register_virtual_size)
-{
- gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
-}
-
-int
gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3220,30 +2324,6 @@ set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_save_dummy_frame_tos != NULL;
-}
-
-void
-gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
- gdbarch->deprecated_save_dummy_frame_tos (sp);
-}
-
-void
-set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
- gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
-{
- gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
-}
-
-int
gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3261,30 +2341,6 @@ set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_target_read_fp != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
- return gdbarch->deprecated_target_read_fp ();
-}
-
-void
-set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
- gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
-{
- gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
-}
-
-int
gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3292,13 +2348,13 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
}
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)
+gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, 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);
gdb_assert (gdbarch->push_dummy_call != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
- return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
+ return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
}
void
@@ -3333,71 +2389,6 @@ set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
- return gdbarch->deprecated_use_generic_dummy_frames;
-}
-
-void
-set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
- int deprecated_use_generic_dummy_frames)
-{
- gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
-}
-
-int
-gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_return_address != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_push_return_address != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
- return gdbarch->deprecated_push_return_address (pc, sp);
-}
-
-void
-set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
- gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
-{
- gdbarch->deprecated_push_return_address = deprecated_push_return_address;
-}
-
-int
-gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_dummy_write_sp != NULL;
-}
-
-void
-gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
- gdbarch->deprecated_dummy_write_sp (val);
-}
-
-void
-set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
- gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
-{
- gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
-}
-
-int
gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3430,112 +2421,6 @@ set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
gdbarch->call_dummy_location = call_dummy_location;
}
-CORE_ADDR
-gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
- return gdbarch->deprecated_call_dummy_start_offset;
-}
-
-void
-set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
- CORE_ADDR deprecated_call_dummy_start_offset)
-{
- gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
-}
-
-CORE_ADDR
-gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
- return gdbarch->deprecated_call_dummy_breakpoint_offset;
-}
-
-void
-set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
- CORE_ADDR deprecated_call_dummy_breakpoint_offset)
-{
- gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
-}
-
-int
-gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
- return gdbarch->deprecated_call_dummy_length;
-}
-
-void
-set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
- int deprecated_call_dummy_length)
-{
- gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
-}
-
-LONGEST *
-gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
- return gdbarch->deprecated_call_dummy_words;
-}
-
-void
-set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
- LONGEST * deprecated_call_dummy_words)
-{
- gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
-}
-
-int
-gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
- return gdbarch->deprecated_sizeof_call_dummy_words;
-}
-
-void
-set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
- int deprecated_sizeof_call_dummy_words)
-{
- gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
-}
-
-int
-gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_fix_call_dummy != NULL;
-}
-
-void
-gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
- gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
-}
-
-void
-set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
- gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
-{
- gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
-}
-
int
gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
{
@@ -3560,54 +2445,6 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
gdbarch->push_dummy_code = push_dummy_code;
}
-int
-gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_dummy_frame != NULL;
-}
-
-void
-gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
- gdbarch->deprecated_push_dummy_frame ();
-}
-
-void
-set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
- gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
-{
- gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
-}
-
-int
-gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_do_registers_info != NULL;
-}
-
-void
-gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
- gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
-}
-
-void
-set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
- gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
-{
- gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
-}
-
void
gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
{
@@ -3773,79 +2610,6 @@ set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
-}
-
-int
-gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
- /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
- return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
-}
-
-void
-set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
- gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
-{
- gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
-}
-
-int
-gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_frame_pc_first != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_init_frame_pc_first != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
- return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
-}
-
-void
-set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
- gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
-{
- gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
-}
-
-int
-gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_frame_pc != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
- return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
-}
-
-void
-set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
- gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
-{
- gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
-}
-
-int
gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3862,104 +2626,6 @@ set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
}
int
-gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
- return gdbarch->believe_pcc_promotion_type;
-}
-
-void
-set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
- int believe_pcc_promotion_type)
-{
- gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
-}
-
-int
-gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_get_saved_register != NULL;
-}
-
-void
-gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
- gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
-}
-
-void
-set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
- gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
-{
- gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
-}
-
-int
-gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_convertible != NULL;
-}
-
-int
-gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_convertible != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
- return gdbarch->deprecated_register_convertible (nr);
-}
-
-void
-set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
-{
- gdbarch->deprecated_register_convertible = deprecated_register_convertible;
-}
-
-void
-gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
- if (gdbarch_debug >= 2)
- 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_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
-{
- gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
-}
-
-void
-gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
- if (gdbarch_debug >= 2)
- 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_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
-{
- gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
-}
-
-int
gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
gdb_assert (gdbarch != NULL);
@@ -4069,30 +2735,6 @@ set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_pop_frame != NULL;
-}
-
-void
-gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_pop_frame != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
- gdbarch->deprecated_pop_frame ();
-}
-
-void
-set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
- gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
-{
- gdbarch->deprecated_pop_frame = deprecated_pop_frame;
-}
-
-int
gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4120,7 +2762,7 @@ int
gdbarch_return_value_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->return_value != NULL;
+ return gdbarch->return_value != legacy_return_value;
}
enum return_value_convention
@@ -4128,6 +2770,7 @@ gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regc
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->return_value != NULL);
+ /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
@@ -4140,23 +2783,6 @@ set_gdbarch_return_value (struct gdbarch *gdbarch,
gdbarch->return_value = return_value;
}
-int
-gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->return_value_on_stack != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
- return gdbarch->return_value_on_stack (type);
-}
-
-void
-set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
- gdbarch_return_value_on_stack_ftype return_value_on_stack)
-{
- gdbarch->return_value_on_stack = return_value_on_stack;
-}
-
void
gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
{
@@ -4226,20 +2852,20 @@ set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
}
int
-gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
+gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
{
gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->use_struct_convention != NULL);
+ gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
- return gdbarch->use_struct_convention (gcc_p, value_type);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
+ return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
}
void
-set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
- gdbarch_use_struct_convention_ftype use_struct_convention)
+set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
+ gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
{
- gdbarch->use_struct_convention = use_struct_convention;
+ gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
}
int
@@ -4266,54 +2892,6 @@ set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
}
-int
-gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_init_saved_regs != NULL;
-}
-
-void
-gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
- gdbarch->deprecated_frame_init_saved_regs (frame);
-}
-
-void
-set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
-{
- gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
-}
-
-int
-gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_extra_frame_info != NULL;
-}
-
-void
-gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
- gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
-}
-
-void
-set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
- gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
-{
- gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
-}
-
CORE_ADDR
gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
{
@@ -4441,20 +3019,20 @@ set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
}
CORE_ADDR
-gdbarch_function_start_offset (struct gdbarch *gdbarch)
+gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- /* Skip verify of function_start_offset, invalid_p == 0 */
+ /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
- return gdbarch->function_start_offset;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
+ return gdbarch->deprecated_function_start_offset;
}
void
-set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
- CORE_ADDR function_start_offset)
+set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
+ CORE_ADDR deprecated_function_start_offset)
{
- gdbarch->function_start_offset = function_start_offset;
+ gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
}
void
@@ -4492,102 +3070,6 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frameless_function_invocation != NULL;
-}
-
-int
-gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
- return gdbarch->deprecated_frameless_function_invocation (fi);
-}
-
-void
-set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
- gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
-{
- gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
-}
-
-int
-gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_chain != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_chain != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
- return gdbarch->deprecated_frame_chain (frame);
-}
-
-void
-set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
-{
- gdbarch->deprecated_frame_chain = deprecated_frame_chain;
-}
-
-int
-gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_chain_valid != NULL;
-}
-
-int
-gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
- return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
-}
-
-void
-set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
-{
- gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
-}
-
-int
-gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_saved_pc != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
- return gdbarch->deprecated_frame_saved_pc (fi);
-}
-
-void
-set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
-{
- gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
-}
-
-int
gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4636,56 +3118,6 @@ set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_args_address != get_frame_base;
-}
-
-CORE_ADDR
-gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
- /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
- return gdbarch->deprecated_frame_args_address (fi);
-}
-
-void
-set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
-{
- gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
-}
-
-int
-gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_locals_address != get_frame_base;
-}
-
-CORE_ADDR
-gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
- /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
- return gdbarch->deprecated_frame_locals_address (fi);
-}
-
-void
-set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
- gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
-{
- gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
-}
-
-int
gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4838,70 +3270,6 @@ set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
gdbarch->frame_red_zone_size = frame_red_zone_size;
}
-int
-gdbarch_parm_boundary (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
- return gdbarch->parm_boundary;
-}
-
-void
-set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
- int parm_boundary)
-{
- gdbarch->parm_boundary = parm_boundary;
-}
-
-const struct floatformat *
-gdbarch_float_format (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
- return gdbarch->float_format;
-}
-
-void
-set_gdbarch_float_format (struct gdbarch *gdbarch,
- const struct floatformat * float_format)
-{
- gdbarch->float_format = float_format;
-}
-
-const struct floatformat *
-gdbarch_double_format (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
- return gdbarch->double_format;
-}
-
-void
-set_gdbarch_double_format (struct gdbarch *gdbarch,
- const struct floatformat * double_format)
-{
- gdbarch->double_format = double_format;
-}
-
-const struct floatformat *
-gdbarch_long_double_format (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
- return gdbarch->long_double_format;
-}
-
-void
-set_gdbarch_long_double_format (struct gdbarch *gdbarch,
- const struct floatformat * long_double_format)
-{
- gdbarch->long_double_format = long_double_format;
-}
-
CORE_ADDR
gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
{
@@ -5063,79 +3431,6 @@ set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp;
-}
-
-int
-gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_pc_in_sigtramp != NULL);
- /* Do not check predicate: gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_sigtramp called\n");
- return gdbarch->deprecated_pc_in_sigtramp (pc, name);
-}
-
-void
-set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch,
- gdbarch_deprecated_pc_in_sigtramp_ftype deprecated_pc_in_sigtramp)
-{
- gdbarch->deprecated_pc_in_sigtramp = deprecated_pc_in_sigtramp;
-}
-
-int
-gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_sigtramp_start != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_sigtramp_start != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_start called\n");
- return gdbarch->deprecated_sigtramp_start (pc);
-}
-
-void
-set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch,
- gdbarch_deprecated_sigtramp_start_ftype deprecated_sigtramp_start)
-{
- gdbarch->deprecated_sigtramp_start = deprecated_sigtramp_start;
-}
-
-int
-gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_sigtramp_end != NULL;
-}
-
-CORE_ADDR
-gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_sigtramp_end != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_end called\n");
- return gdbarch->deprecated_sigtramp_end (pc);
-}
-
-void
-set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch,
- gdbarch_deprecated_sigtramp_end_ftype deprecated_sigtramp_end)
-{
- gdbarch->deprecated_sigtramp_end = deprecated_sigtramp_end;
-}
-
-int
gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
@@ -5913,13 +4208,14 @@ _initialize_gdbarch (void)
{
struct cmd_list_element *c;
- add_show_from_set (add_set_cmd ("arch",
- class_maintenance,
- var_zinteger,
- (char *)&gdbarch_debug,
- "Set architecture debugging.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("arch",
+ class_maintenance,
+ var_zinteger,
+ (char *)&gdbarch_debug,
+ "Set architecture debugging.\n\
When non-zero, architecture debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
c = add_set_cmd ("archdebug",
class_maintenance,
var_zinteger,
@@ -5928,5 +4224,5 @@ When non-zero, architecture debugging is enabled.", &setdebuglist),
When non-zero, architecture debugging is enabled.", &setlist);
deprecate_cmd (c, "set debug arch");
- deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");
}
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 8585b701a4a..78b27ba4ef7 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -53,19 +53,11 @@ struct obstack;
extern struct gdbarch *current_gdbarch;
-/* If any of the following are defined, the target wasn't correctly
- converted. */
-
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
-#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
-#endif
-
-
/* The following are pre-initialized by GDBARCH. */
extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
/* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
+#if !defined (GDB_TM_FILE) && defined (TARGET_ARCHITECTURE)
#error "Non multi-arch definition of TARGET_ARCHITECTURE"
#endif
#if !defined (TARGET_ARCHITECTURE)
@@ -74,7 +66,7 @@ extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbar
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)
+#if !defined (GDB_TM_FILE) && defined (TARGET_BYTE_ORDER)
#error "Non multi-arch definition of TARGET_BYTE_ORDER"
#endif
#if !defined (TARGET_BYTE_ORDER)
@@ -83,7 +75,7 @@ extern int gdbarch_byte_order (struct gdbarch *gdbarch);
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)
+#if !defined (GDB_TM_FILE) && defined (TARGET_OSABI)
#error "Non multi-arch definition of TARGET_OSABI"
#endif
#if !defined (TARGET_OSABI)
@@ -95,13 +87,13 @@ extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
/* Number of bits in a char or unsigned char for the target machine.
Just like CHAR_BIT in <limits.h> but describes the target machine.
- v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
+ v:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
Number of bits in a short or unsigned short for the target machine. */
extern int gdbarch_short_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_SHORT_BIT)
#error "Non multi-arch definition of TARGET_SHORT_BIT"
#endif
#if !defined (TARGET_SHORT_BIT)
@@ -112,7 +104,7 @@ extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
extern int gdbarch_int_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_INT_BIT)
#error "Non multi-arch definition of TARGET_INT_BIT"
#endif
#if !defined (TARGET_INT_BIT)
@@ -123,7 +115,7 @@ extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
extern int gdbarch_long_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_BIT"
#endif
#if !defined (TARGET_LONG_BIT)
@@ -135,46 +127,71 @@ extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
extern int gdbarch_long_long_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_LONG_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
#endif
#if !defined (TARGET_LONG_LONG_BIT)
#define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
#endif
-/* Number of bits in a float for the target machine. */
+/* The ABI default bit-size and format for "float", "double", and "long
+ double". These bit/format pairs should eventually be combined into
+ a single object. For the moment, just initialize them as a pair. */
extern int gdbarch_float_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_FLOAT_BIT)
#error "Non multi-arch definition of TARGET_FLOAT_BIT"
#endif
#if !defined (TARGET_FLOAT_BIT)
#define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
#endif
-/* Number of bits in a double for the target machine. */
+extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
+#if !defined (GDB_TM_FILE) && defined (TARGET_FLOAT_FORMAT)
+#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
+#endif
+#if !defined (TARGET_FLOAT_FORMAT)
+#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
+#endif
extern int gdbarch_double_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
#endif
#if !defined (TARGET_DOUBLE_BIT)
#define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
#endif
-/* Number of bits in a long double for the target machine. */
+extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
+#if !defined (GDB_TM_FILE) && defined (TARGET_DOUBLE_FORMAT)
+#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
+#endif
+#if !defined (TARGET_DOUBLE_FORMAT)
+#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
+#endif
extern int gdbarch_long_double_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_LONG_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
#endif
#if !defined (TARGET_LONG_DOUBLE_BIT)
#define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
#endif
+extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
+#if !defined (GDB_TM_FILE) && defined (TARGET_LONG_DOUBLE_FORMAT)
+#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
+#endif
+#if !defined (TARGET_LONG_DOUBLE_FORMAT)
+#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
+#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
target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
@@ -187,7 +204,7 @@ extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_doubl
extern int gdbarch_ptr_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_PTR_BIT)
#error "Non multi-arch definition of TARGET_PTR_BIT"
#endif
#if !defined (TARGET_PTR_BIT)
@@ -198,7 +215,7 @@ extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
+#if !defined (GDB_TM_FILE) && defined (TARGET_ADDR_BIT)
#error "Non multi-arch definition of TARGET_ADDR_BIT"
#endif
#if !defined (TARGET_ADDR_BIT)
@@ -209,7 +226,7 @@ extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
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)
+#if !defined (GDB_TM_FILE) && defined (TARGET_BFD_VMA_BIT)
#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
#endif
#if !defined (TARGET_BFD_VMA_BIT)
@@ -220,7 +237,7 @@ extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
extern int gdbarch_char_signed (struct gdbarch *gdbarch);
extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
+#if !defined (GDB_TM_FILE) && defined (TARGET_CHAR_SIGNED)
#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
#endif
#if !defined (TARGET_CHAR_SIGNED)
@@ -235,17 +252,17 @@ extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
#endif
extern int gdbarch_read_pc_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P)
+#if !defined (GDB_TM_FILE) && 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)
+#if !defined (TARGET_READ_PC_P)
#define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid);
extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
+#if !defined (GDB_TM_FILE) && defined (TARGET_READ_PC)
#error "Non multi-arch definition of TARGET_READ_PC"
#endif
#if !defined (TARGET_READ_PC)
@@ -255,7 +272,7 @@ extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype
typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid);
extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid);
extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
+#if !defined (GDB_TM_FILE) && defined (TARGET_WRITE_PC)
#error "Non multi-arch definition of TARGET_WRITE_PC"
#endif
#if !defined (TARGET_WRITE_PC)
@@ -272,17 +289,17 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp
#endif
extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P)
+#if !defined (GDB_TM_FILE) && 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)
+#if !defined (TARGET_READ_SP_P)
#define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
+#if !defined (GDB_TM_FILE) && defined (TARGET_READ_SP)
#error "Non multi-arch definition of TARGET_READ_SP"
#endif
#if !defined (TARGET_READ_SP)
@@ -296,7 +313,7 @@ extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype
typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
+#if !defined (GDB_TM_FILE) && defined (TARGET_VIRTUAL_FRAME_POINTER)
#error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
#endif
#if !defined (TARGET_VIRTUAL_FRAME_POINTER)
@@ -317,7 +334,7 @@ extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_
extern int gdbarch_num_regs (struct gdbarch *gdbarch);
extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
+#if !defined (GDB_TM_FILE) && defined (NUM_REGS)
#error "Non multi-arch definition of NUM_REGS"
#endif
#if !defined (NUM_REGS)
@@ -331,7 +348,7 @@ extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
+#if !defined (GDB_TM_FILE) && defined (NUM_PSEUDO_REGS)
#error "Non multi-arch definition of NUM_PSEUDO_REGS"
#endif
#if !defined (NUM_PSEUDO_REGS)
@@ -345,7 +362,7 @@ extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo
extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (SP_REGNUM)
#error "Non multi-arch definition of SP_REGNUM"
#endif
#if !defined (SP_REGNUM)
@@ -354,7 +371,7 @@ extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (PC_REGNUM)
#error "Non multi-arch definition of PC_REGNUM"
#endif
#if !defined (PC_REGNUM)
@@ -363,7 +380,7 @@ extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (PS_REGNUM)
#error "Non multi-arch definition of PS_REGNUM"
#endif
#if !defined (PS_REGNUM)
@@ -372,7 +389,7 @@ extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (FP0_REGNUM)
#error "Non multi-arch definition of FP0_REGNUM"
#endif
#if !defined (FP0_REGNUM)
@@ -384,7 +401,7 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (STAB_REG_TO_REGNUM)
#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
#endif
#if !defined (STAB_REG_TO_REGNUM)
@@ -396,7 +413,7 @@ extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sta
typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (ECOFF_REG_TO_REGNUM)
#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
#endif
#if !defined (ECOFF_REG_TO_REGNUM)
@@ -408,7 +425,7 @@ extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ec
typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (DWARF_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
#endif
#if !defined (DWARF_REG_TO_REGNUM)
@@ -420,7 +437,7 @@ extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dw
typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (SDB_REG_TO_REGNUM)
#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
#endif
#if !defined (SDB_REG_TO_REGNUM)
@@ -430,7 +447,7 @@ extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_
typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (DWARF2_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
#endif
#if !defined (DWARF2_REG_TO_REGNUM)
@@ -440,7 +457,7 @@ extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_d
typedef const char * (gdbarch_register_name_ftype) (int regnr);
extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
+#if !defined (GDB_TM_FILE) && defined (REGISTER_NAME)
#error "Non multi-arch definition of REGISTER_NAME"
#endif
#if !defined (REGISTER_NAME)
@@ -455,45 +472,6 @@ typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, in
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 DEPRECATED_REGISTER_VIRTUAL_TYPE. */
-
-#if defined (DEPRECATED_REGISTER_VIRTUAL_TYPE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_TYPE */
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
-#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 (DEPRECATED_REGISTER_VIRTUAL_TYPE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE"
-#endif
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE)
-#define DEPRECATED_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)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
-#endif
-#if !defined (DEPRECATED_REGISTER_BYTES)
-#define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
-#endif
-
/* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
register offsets computed using just REGISTER_TYPE, this can be
deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
@@ -510,137 +488,23 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#endif
extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_BYTE_P)
#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_BYTE_P)
+#if !defined (DEPRECATED_REGISTER_BYTE_P)
#define DEPRECATED_REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
#endif
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 (DEPRECATED_REGISTER_BYTE)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_BYTE)
#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
#endif
#if !defined (DEPRECATED_REGISTER_BYTE)
#define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif
-/* If all registers have identical raw and virtual sizes and those
- sizes agree with the value computed from REGISTER_TYPE,
- DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
- registers. */
-
-#if defined (DEPRECATED_REGISTER_RAW_SIZE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_RAW_SIZE */
-#if !defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_REGISTER_RAW_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
-#endif
-
-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 (DEPRECATED_REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_RAW_SIZE)
-#define DEPRECATED_REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
-#endif
-
-/* If all registers have identical raw and virtual sizes and those
- sizes agree with the value computed from REGISTER_TYPE,
- DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
- registers. */
-
-#if defined (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_SIZE */
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
-#endif
-
-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 (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-#define DEPRECATED_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 */
-#if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
-#endif
-
-extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
-#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 !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
-#define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
-#endif
-
-/* 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 */
-#if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
-#endif
-
-extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
-#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 !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
-#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
-#endif
-
/* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
@@ -650,80 +514,24 @@ extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct
extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
- SAVE_DUMMY_FRAME_TOS. */
-
-#if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
-/* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */
-#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
-#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
-#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
-#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
-extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
-extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
-#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
-#endif
-#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
-#define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp))
-#endif
-
-/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
DEPRECATED_FP_REGNUM. */
extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_FP_REGNUM)
#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
#endif
#if !defined (DEPRECATED_FP_REGNUM)
#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
#endif
-/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
- DEPRECATED_TARGET_READ_FP. */
-
-#if defined (DEPRECATED_TARGET_READ_FP)
-/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
-#if !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
-#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
-extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
-#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 !defined (DEPRECATED_TARGET_READ_FP)
-#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
-#endif
-
/* See gdbint.texinfo. See infcall.c. New, all singing all dancing,
replacement for DEPRECATED_PUSH_ARGUMENTS. */
extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
-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);
+typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct value *function, 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, struct value *function, 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);
/* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */
@@ -736,94 +544,28 @@ extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_d
#endif
extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
#define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_PUSH_ARGUMENTS)
#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
#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
-/* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */
-
-extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-#error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
-#endif
-#if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
-#endif
-
-/* Implement PUSH_RETURN_ADDRESS, and then merge in
- DEPRECATED_PUSH_RETURN_ADDRESS. */
-
-#if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
-/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
-#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
-extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
-extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
-#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 !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
-#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
-#endif
-
-/* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */
-
-#if defined (DEPRECATED_DUMMY_WRITE_SP)
-/* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
-#if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#define DEPRECATED_DUMMY_WRITE_SP_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
-extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
-extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
-#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 !defined (DEPRECATED_DUMMY_WRITE_SP)
-#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
-#endif
-
/* DEPRECATED_REGISTER_SIZE can be deleted. */
extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_SIZE)
#error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
#endif
#if !defined (DEPRECATED_REGISTER_SIZE)
@@ -832,156 +574,19 @@ extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int d
extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
+#if !defined (GDB_TM_FILE) && defined (CALL_DUMMY_LOCATION)
#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
#endif
#if !defined (CALL_DUMMY_LOCATION)
#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
#endif
-/* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */
-
-extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
-#define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
-#endif
-
-/* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */
-
-extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
-#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
-#endif
-
-/* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
-
-extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
-#define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
-#endif
-
-/* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
-
-extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS)
-#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS"
-#endif
-#if !defined (DEPRECATED_CALL_DUMMY_WORDS)
-#define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
-#endif
-
-/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */
-
-extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
-#error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS"
-#endif
-#if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
-#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
-#endif
-
-/* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
- PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */
-
-#if defined (DEPRECATED_FIX_CALL_DUMMY)
-/* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
-#if !defined (DEPRECATED_FIX_CALL_DUMMY_P)
-#define DEPRECATED_FIX_CALL_DUMMY_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P)
-#error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P)
-#define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
-extern void gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
-extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy);
-#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 !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
-
-/* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
-
extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (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);
extern CORE_ADDR gdbarch_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);
extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
-/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */
-
-#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
-/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
-#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
-extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
-#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 !defined (DEPRECATED_PUSH_DUMMY_FRAME)
-#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
-#endif
-
-#if defined (DEPRECATED_DO_REGISTERS_INFO)
-/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
-#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#define DEPRECATED_DO_REGISTERS_INFO_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
-extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
-extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
-#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 !defined (DEPRECATED_DO_REGISTERS_INFO)
-#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
-#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);
extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
@@ -1004,7 +609,7 @@ extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_prin
typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
+#if !defined (GDB_TM_FILE) && defined (REGISTER_SIM_REGNO)
#error "Non multi-arch definition of REGISTER_SIM_REGNO"
#endif
#if !defined (REGISTER_SIM_REGNO)
@@ -1019,17 +624,17 @@ extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_reg
#endif
extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
+#if !defined (GDB_TM_FILE) && defined (REGISTER_BYTES_OK_P)
#error "Non multi-arch definition of REGISTER_BYTES_OK"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
+#if !defined (REGISTER_BYTES_OK_P)
#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
#endif
typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
+#if !defined (GDB_TM_FILE) && defined (REGISTER_BYTES_OK)
#error "Non multi-arch definition of REGISTER_BYTES_OK"
#endif
#if !defined (REGISTER_BYTES_OK)
@@ -1039,7 +644,7 @@ extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_regi
typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
+#if !defined (GDB_TM_FILE) && defined (CANNOT_FETCH_REGISTER)
#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
#endif
#if !defined (CANNOT_FETCH_REGISTER)
@@ -1049,7 +654,7 @@ extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_
typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
+#if !defined (GDB_TM_FILE) && defined (CANNOT_STORE_REGISTER)
#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
#endif
#if !defined (CANNOT_STORE_REGISTER)
@@ -1066,205 +671,36 @@ extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_
#endif
extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
+#if !defined (GDB_TM_FILE) && defined (GET_LONGJMP_TARGET_P)
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
+#if !defined (GET_LONGJMP_TARGET_P)
#define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
#endif
typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
+#if !defined (GDB_TM_FILE) && defined (GET_LONGJMP_TARGET)
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
#endif
#if !defined (GET_LONGJMP_TARGET)
#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
#endif
-/* NOTE: cagney/2002-11-24: 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_PC_IN_CALL_DUMMY(),
- doesn't need to be modified. */
-
-#if defined (DEPRECATED_PC_IN_CALL_DUMMY)
-/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
-#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
-#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 !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
-
-#if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
-/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
-#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
-#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
-extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
-extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
-#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 !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
-
-#if defined (DEPRECATED_INIT_FRAME_PC)
-/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
-#if !defined (DEPRECATED_INIT_FRAME_PC_P)
-#define DEPRECATED_INIT_FRAME_PC_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
-#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
-#define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
-extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
-extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
-#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 !defined (DEPRECATED_INIT_FRAME_PC)
-#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
-#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)
+#if !defined (GDB_TM_FILE) && defined (BELIEVE_PCC_PROMOTION)
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
#endif
#if !defined (BELIEVE_PCC_PROMOTION)
#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
#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);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
-#endif
-#if !defined (BELIEVE_PCC_PROMOTION_TYPE)
-#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
-#endif
-
-#if defined (DEPRECATED_GET_SAVED_REGISTER)
-/* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
-#if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
-#define DEPRECATED_GET_SAVED_REGISTER_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
-#error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
-#define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
-extern void gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
-extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
-#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 !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
-
-/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
- For raw <-> cooked register conversions, replaced by pseudo registers. */
-
-#if defined (DEPRECATED_REGISTER_CONVERTIBLE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_CONVERTIBLE */
-#if !defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
-#define DEPRECATED_REGISTER_CONVERTIBLE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_CONVERTIBLE_P)
-#define DEPRECATED_REGISTER_CONVERTIBLE_P() (gdbarch_deprecated_register_convertible_p (current_gdbarch))
-#endif
-
-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. */
-
-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. */
-
-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
-
typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
+#if !defined (GDB_TM_FILE) && defined (CONVERT_REGISTER_P)
#error "Non multi-arch definition of CONVERT_REGISTER_P"
#endif
#if !defined (CONVERT_REGISTER_P)
@@ -1274,7 +710,7 @@ extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_con
typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf);
extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf);
extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
+#if !defined (GDB_TM_FILE) && defined (REGISTER_TO_VALUE)
#error "Non multi-arch definition of REGISTER_TO_VALUE"
#endif
#if !defined (REGISTER_TO_VALUE)
@@ -1284,7 +720,7 @@ extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_regi
typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf);
extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf);
extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
+#if !defined (GDB_TM_FILE) && defined (VALUE_TO_REGISTER)
#error "Non multi-arch definition of VALUE_TO_REGISTER"
#endif
#if !defined (VALUE_TO_REGISTER)
@@ -1294,7 +730,7 @@ extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_valu
typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
+#if !defined (GDB_TM_FILE) && defined (POINTER_TO_ADDRESS)
#error "Non multi-arch definition of POINTER_TO_ADDRESS"
#endif
#if !defined (POINTER_TO_ADDRESS)
@@ -1304,7 +740,7 @@ extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_poi
typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
+#if !defined (GDB_TM_FILE) && defined (ADDRESS_TO_POINTER)
#error "Non multi-arch definition of ADDRESS_TO_POINTER"
#endif
#if !defined (ADDRESS_TO_POINTER)
@@ -1319,48 +755,23 @@ extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_add
#endif
extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
+#if !defined (GDB_TM_FILE) && defined (INTEGER_TO_ADDRESS_P)
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
+#if !defined (INTEGER_TO_ADDRESS_P)
#define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
+#if !defined (GDB_TM_FILE) && defined (INTEGER_TO_ADDRESS)
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
#endif
#if !defined (INTEGER_TO_ADDRESS)
#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
#endif
-#if defined (DEPRECATED_POP_FRAME)
-/* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
-#if !defined (DEPRECATED_POP_FRAME_P)
-#define DEPRECATED_POP_FRAME_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P)
-#error "Non multi-arch definition of DEPRECATED_POP_FRAME"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P)
-#define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_pop_frame_ftype) (void);
-extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
-#error "Non multi-arch definition of DEPRECATED_POP_FRAME"
-#endif
-#if !defined (DEPRECATED_POP_FRAME)
-#define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
-#endif
-
/* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
#if defined (DEPRECATED_STORE_STRUCT_RETURN)
@@ -1371,17 +782,17 @@ extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_d
#endif
extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
#define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
#endif
typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN)
#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
#endif
#if !defined (DEPRECATED_STORE_STRUCT_RETURN)
@@ -1390,7 +801,10 @@ extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
/* It has been suggested that this, well actually its predecessor,
should take the type/value of the function to be called and not the
- return type. This is left as an exercise for the reader. */
+ return type. This is left as an exercise for the reader.
+ NOTE: cagney/2004-06-13: The function stack.c:return_command uses
+ the predicate with default hack to avoid calling STORE_RETURN_VALUE
+ (via legacy_return_value), when a small struct is involved. */
extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
@@ -1398,24 +812,15 @@ typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarc
extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
-/* The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
- STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded
- into RETURN_VALUE. */
-
-typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
-extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
-extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
-#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 !defined (RETURN_VALUE_ON_STACK)
-#define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
-#endif
+/* The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
+ DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
+ RETURN_VALUE. */
typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
+#if !defined (GDB_TM_FILE) && defined (EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
#endif
#if !defined (EXTRACT_RETURN_VALUE)
@@ -1425,7 +830,7 @@ extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_e
typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
+#if !defined (GDB_TM_FILE) && defined (STORE_RETURN_VALUE)
#error "Non multi-arch definition of STORE_RETURN_VALUE"
#endif
#if !defined (STORE_RETURN_VALUE)
@@ -1435,7 +840,7 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto
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);
extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
#endif
#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
@@ -1445,21 +850,21 @@ extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch
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);
extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
#endif
#if !defined (DEPRECATED_STORE_RETURN_VALUE)
#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
#endif
-typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
-extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
-extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
-#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
+typedef int (gdbarch_deprecated_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
+extern int gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
+extern void set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention);
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_USE_STRUCT_CONVENTION)
+#error "Non multi-arch definition of DEPRECATED_USE_STRUCT_CONVENTION"
#endif
-#if !defined (USE_STRUCT_CONVENTION)
-#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
+#if !defined (DEPRECATED_USE_STRUCT_CONVENTION)
+#define DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_deprecated_use_struct_convention (current_gdbarch, gcc_p, value_type))
#endif
/* As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
@@ -1478,7 +883,7 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
will be needed for that case to work. NB: It is passed the callers
frame since it is only after the callee has returned that this
function is used.
- M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame */
+ M::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame */
#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -1488,77 +893,27 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
#endif
extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (struct regcache *regcache);
extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regcache))
#endif
-#if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
-#if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
-#define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
-#define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame);
-extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
-extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs);
-#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 !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
-#define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
-#endif
-
-#if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
-/* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
-#if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
-#define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
-#error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
-#define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
-extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
-extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info);
-#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 !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
-
typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
+#if !defined (GDB_TM_FILE) && defined (SKIP_PROLOGUE)
#error "Non multi-arch definition of SKIP_PROLOGUE"
#endif
#if !defined (SKIP_PROLOGUE)
@@ -1568,7 +923,7 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
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);
extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
+#if !defined (GDB_TM_FILE) && defined (INNER_THAN)
#error "Non multi-arch definition of INNER_THAN"
#endif
#if !defined (INNER_THAN)
@@ -1578,7 +933,7 @@ extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_
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);
extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
+#if !defined (GDB_TM_FILE) && defined (BREAKPOINT_FROM_PC)
#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
#endif
#if !defined (BREAKPOINT_FROM_PC)
@@ -1594,7 +949,7 @@ extern void set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, gdba
typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
+#if !defined (GDB_TM_FILE) && defined (MEMORY_INSERT_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
#endif
#if !defined (MEMORY_INSERT_BREAKPOINT)
@@ -1604,7 +959,7 @@ extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbar
typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
+#if !defined (GDB_TM_FILE) && defined (MEMORY_REMOVE_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
#endif
#if !defined (MEMORY_REMOVE_BREAKPOINT)
@@ -1613,20 +968,28 @@ extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbar
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)
+#if !defined (GDB_TM_FILE) && defined (DECR_PC_AFTER_BREAK)
#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
#endif
#if !defined (DECR_PC_AFTER_BREAK)
#define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
#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"
+/* A function can be addressed by either it's "pointer" (possibly a
+ descriptor address) or "entry point" (first executable instruction).
+ The method "convert_from_func_ptr_addr" converting the former to the
+ latter. DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+ a simplified subset of that functionality - the function's address
+ corresponds to the "function pointer" and the function's start
+ corresponds to the "function entry point" - and hence is redundant. */
+
+extern CORE_ADDR gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset);
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_FUNCTION_START_OFFSET)
+#error "Non multi-arch definition of DEPRECATED_FUNCTION_START_OFFSET"
#endif
-#if !defined (FUNCTION_START_OFFSET)
-#define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
+#if !defined (DEPRECATED_FUNCTION_START_OFFSET)
+#define DEPRECATED_FUNCTION_START_OFFSET (gdbarch_deprecated_function_start_offset (current_gdbarch))
#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);
@@ -1635,121 +998,13 @@ extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
+#if !defined (GDB_TM_FILE) && defined (FRAME_ARGS_SKIP)
#error "Non multi-arch definition of FRAME_ARGS_SKIP"
#endif
#if !defined (FRAME_ARGS_SKIP)
#define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
#endif
-/* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new
- frame code works regardless of the type of frame - frameless,
- stackless, or normal. */
-
-#if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */
-#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi);
-extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
-#endif
-#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi))
-#endif
-
-#if defined (DEPRECATED_FRAME_CHAIN)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
-#if !defined (DEPRECATED_FRAME_CHAIN_P)
-#define DEPRECATED_FRAME_CHAIN_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P)
-#define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame);
-extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
-extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
-#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
-#endif
-#if !defined (DEPRECATED_FRAME_CHAIN)
-#define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
-#endif
-
-#if defined (DEPRECATED_FRAME_CHAIN_VALID)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
-#if !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
-#define DEPRECATED_FRAME_CHAIN_VALID_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
-#define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
-extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
-extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid);
-#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 !defined (DEPRECATED_FRAME_CHAIN_VALID)
-#define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
-#endif
-
-/* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
- note, per UNWIND_PC's doco, that while the two have similar
- interfaces they have very different underlying implementations. */
-
-#if defined (DEPRECATED_FRAME_SAVED_PC)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */
-#if !defined (DEPRECATED_FRAME_SAVED_PC_P)
-#define DEPRECATED_FRAME_SAVED_PC_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P)
-#define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc);
-#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 !defined (DEPRECATED_FRAME_SAVED_PC)
-#define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
-#endif
-
extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
@@ -1762,62 +1017,9 @@ typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct fra
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);
-/* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
- frame-base. Enable frame-base before frame-unwind. */
-
-#if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
-#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
-#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
-#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
-#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
-#endif
-#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
-#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
-#endif
-
/* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
frame-base. Enable frame-base before frame-unwind. */
-#if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
-#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
-#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
-#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
-#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
-#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
-#endif
-#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
-#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
-#endif
-
#if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
/* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
#if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
@@ -1826,17 +1028,17 @@ extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch
#endif
extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
#error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
+#if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
#define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame);
extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
#error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
#endif
#if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
@@ -1851,17 +1053,17 @@ extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
#endif
extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
+#if !defined (GDB_TM_FILE) && 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)
+#if !defined (FRAME_NUM_ARGS_P)
#define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
#endif
typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
+#if !defined (GDB_TM_FILE) && defined (FRAME_NUM_ARGS)
#error "Non multi-arch definition of FRAME_NUM_ARGS"
#endif
#if !defined (FRAME_NUM_ARGS)
@@ -1881,17 +1083,17 @@ extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_n
#endif
extern int gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STACK_ALIGN_P)
#error "Non multi-arch definition of DEPRECATED_STACK_ALIGN"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STACK_ALIGN_P)
+#if !defined (DEPRECATED_STACK_ALIGN_P)
#define DEPRECATED_STACK_ALIGN_P() (gdbarch_deprecated_stack_align_p (current_gdbarch))
#endif
typedef CORE_ADDR (gdbarch_deprecated_stack_align_ftype) (CORE_ADDR sp);
extern CORE_ADDR gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
extern void set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, gdbarch_deprecated_stack_align_ftype *deprecated_stack_align);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STACK_ALIGN)
#error "Non multi-arch definition of DEPRECATED_STACK_ALIGN"
#endif
#if !defined (DEPRECATED_STACK_ALIGN)
@@ -1915,17 +1117,17 @@ extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_alig
#endif
extern int gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
#error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
+#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
#define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch))
#endif
typedef int (gdbarch_deprecated_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
extern int gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
extern void set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
+#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
#error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR"
#endif
#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
@@ -1938,49 +1140,13 @@ extern void set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, gdbarc
extern int gdbarch_frame_red_zone_size (struct gdbarch *gdbarch);
extern void set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, int frame_red_zone_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_RED_ZONE_SIZE)
+#if !defined (GDB_TM_FILE) && defined (FRAME_RED_ZONE_SIZE)
#error "Non multi-arch definition of FRAME_RED_ZONE_SIZE"
#endif
#if !defined (FRAME_RED_ZONE_SIZE)
#define FRAME_RED_ZONE_SIZE (gdbarch_frame_red_zone_size (current_gdbarch))
#endif
-extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
-extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
-#error "Non multi-arch definition of PARM_BOUNDARY"
-#endif
-#if !defined (PARM_BOUNDARY)
-#define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
-#endif
-
-extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
-#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
-#endif
-#if !defined (TARGET_FLOAT_FORMAT)
-#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
-#endif
-
-extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
-#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
-#endif
-#if !defined (TARGET_DOUBLE_FORMAT)
-#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
-#endif
-
-extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
-#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 !defined (TARGET_LONG_DOUBLE_FORMAT)
-#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
-#endif
-
typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ);
extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ);
extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
@@ -1998,7 +1164,7 @@ extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdb
typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
+#if !defined (GDB_TM_FILE) && defined (ADDR_BITS_REMOVE)
#error "Non multi-arch definition of ADDR_BITS_REMOVE"
#endif
#if !defined (ADDR_BITS_REMOVE)
@@ -2011,7 +1177,7 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
+#if !defined (GDB_TM_FILE) && defined (SMASH_TEXT_ADDRESS)
#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
#endif
#if !defined (SMASH_TEXT_ADDRESS)
@@ -2035,17 +1201,17 @@ extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_sma
#endif
extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
+#if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP_P)
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
+#if !defined (SOFTWARE_SINGLE_STEP_P)
#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
#endif
typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
+#if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP)
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
#endif
#if !defined (SOFTWARE_SINGLE_STEP)
@@ -2053,12 +1219,12 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
#endif
/* FIXME: cagney/2003-08-28: Need to find a better way of selecting the
- disassembler. Perhaphs objdump can handle it? */
+ disassembler. Perhaps objdump can handle it? */
typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, struct disassemble_info *info);
extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info);
extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
+#if !defined (GDB_TM_FILE) && defined (TARGET_PRINT_INSN)
#error "Non multi-arch definition of TARGET_PRINT_INSN"
#endif
#if !defined (TARGET_PRINT_INSN)
@@ -2068,7 +1234,7 @@ extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_
typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
+#if !defined (GDB_TM_FILE) && defined (SKIP_TRAMPOLINE_CODE)
#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
#endif
#if !defined (SKIP_TRAMPOLINE_CODE)
@@ -2090,7 +1256,7 @@ extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_sk
typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
+#if !defined (GDB_TM_FILE) && defined (IN_SOLIB_CALL_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
#endif
#if !defined (IN_SOLIB_CALL_TRAMPOLINE)
@@ -2102,92 +1268,13 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#if !defined (GDB_TM_FILE) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
#endif
#if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
#endif
-/* NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START,
- DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been
- superseeded by signal trampoline frame sniffers. */
-
-#if defined (DEPRECATED_PC_IN_SIGTRAMP)
-/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */
-#if !defined (DEPRECATED_PC_IN_SIGTRAMP_P)
-#define DEPRECATED_PC_IN_SIGTRAMP_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP_P)
-#error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_SIGTRAMP_P)
-#define DEPRECATED_PC_IN_SIGTRAMP_P() (gdbarch_deprecated_pc_in_sigtramp_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
-extern int gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
-extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP)
-#error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP"
-#endif
-#if !defined (DEPRECATED_PC_IN_SIGTRAMP)
-#define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name))
-#endif
-
-#if defined (DEPRECATED_SIGTRAMP_START)
-/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */
-#if !defined (DEPRECATED_SIGTRAMP_START_P)
-#define DEPRECATED_SIGTRAMP_START_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P)
-#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P)
-#define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc);
-extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern void set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START)
-#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START"
-#endif
-#if !defined (DEPRECATED_SIGTRAMP_START)
-#define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc))
-#endif
-
-#if defined (DEPRECATED_SIGTRAMP_END)
-/* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */
-#if !defined (DEPRECATED_SIGTRAMP_END_P)
-#define DEPRECATED_SIGTRAMP_END_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P)
-#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P)
-#define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc);
-extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern void set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END)
-#error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END"
-#endif
-#if !defined (DEPRECATED_SIGTRAMP_END)
-#define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc))
-#endif
-
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
as the first action in a funtion's epilogue. in_function_epilogue_p()
@@ -2218,7 +1305,7 @@ extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, g
typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (GDB_TM_FILE) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
#endif
#if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
@@ -2228,7 +1315,7 @@ extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbar
typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (GDB_TM_FILE) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
#endif
#if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
@@ -2237,7 +1324,7 @@ extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdba
extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
+#if !defined (GDB_TM_FILE) && defined (NAME_OF_MALLOC)
#error "Non multi-arch definition of NAME_OF_MALLOC"
#endif
#if !defined (NAME_OF_MALLOC)
@@ -2246,7 +1333,7 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na
extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
+#if !defined (GDB_TM_FILE) && defined (CANNOT_STEP_BREAKPOINT)
#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
#endif
#if !defined (CANNOT_STEP_BREAKPOINT)
@@ -2255,7 +1342,7 @@ extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int can
extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#if !defined (GDB_TM_FILE) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
#endif
#if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
@@ -2270,17 +1357,17 @@ extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, i
#endif
extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#if !defined (GDB_TM_FILE) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
#endif
typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
+#if !defined (GDB_TM_FILE) && defined (ADDRESS_CLASS_TYPE_FLAGS)
#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
#endif
#if !defined (ADDRESS_CLASS_TYPE_FLAGS)
@@ -2315,17 +1402,17 @@ extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_re
#endif
extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
+#if !defined (GDB_TM_FILE) && 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)
+#if !defined (FETCH_POINTER_ARGUMENT_P)
#define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
#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)
+#if !defined (GDB_TM_FILE) && defined (FETCH_POINTER_ARGUMENT)
#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
#endif
#if !defined (FETCH_POINTER_ARGUMENT)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 7292a0bb0c5..3ffb85e24da 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -44,7 +44,7 @@ compare_new ()
# Format of the input table
-read="class level macro returntype function formal actual attrib staticdefault predefault postdefault invalid_p fmt print print_p description"
+read="class macro returntype function formal actual staticdefault predefault postdefault invalid_p print garbage_at_eol"
do_read ()
{
@@ -75,6 +75,13 @@ ${line}
EOF
IFS="${OFS}"
+ if test -n "${garbage_at_eol}"
+ then
+ echo "Garbage at end-of-line in ${line}" 1>&2
+ kill $$
+ exit 1
+ fi
+
# .... and then going back through each field and strip out those
# that ended up with just that space character.
for r in ${read}
@@ -85,36 +92,35 @@ EOF
fi
done
- case "${level}" in
- 1 ) gt_level=">= GDB_MULTI_ARCH_PARTIAL" ;;
- 2 ) gt_level="> GDB_MULTI_ARCH_PARTIAL" ;;
- "" ) gt_level="> GDB_MULTI_ARCH_PARTIAL" ;;
- * ) error "Error: bad level for ${function}" 1>&2 ; kill $$ ; exit 1 ;;
- esac
+ FUNCTION=`echo ${function} | tr '[a-z]' '[A-Z]'`
+ if test "x${macro}" = "x="
+ then
+ # Provide a UCASE version of function (for when there isn't MACRO)
+ macro="${FUNCTION}"
+ elif test "${macro}" = "${FUNCTION}"
+ then
+ echo "${function}: Specify = for macro field" 1>&2
+ kill $$
+ exit 1
+ fi
+ # Check that macro definition wasn't supplied for multi-arch
+ case "${class}" in
+ [mM] )
+ if test "${macro}" != ""
+ then
+ echo "Error: Function ${function} multi-arch yet macro ${macro} supplied" 1>&2
+ kill $$
+ exit 1
+ fi
+ esac
+
case "${class}" in
m ) staticdefault="${predefault}" ;;
M ) staticdefault="0" ;;
* ) test "${staticdefault}" || staticdefault=0 ;;
esac
- # come up with a format, use a few guesses for variables
- case ":${class}:${fmt}:${print}:" in
- :[vV]::: )
- if [ "${returntype}" = int ]
- then
- fmt="%d"
- print="${macro}"
- elif [ "${returntype}" = long ]
- then
- fmt="%ld"
- print="${macro}"
- fi
- ;;
- esac
- test "${fmt}" || fmt="%ld"
- test "${print}" || print="(long) ${macro}"
-
case "${class}" in
F | V | M )
case "${invalid_p}" in
@@ -241,15 +247,11 @@ do
# M -> multi-arch function + predicate
# hiding a multi-arch function + predicate to test function validity
- level ) : ;;
-
- # See GDB_MULTI_ARCH description. Having GDB_MULTI_ARCH >=
- # LEVEL is a predicate on checking that a given method is
- # initialized (using INVALID_P).
-
macro ) : ;;
- # The name of the MACRO that this method is to be accessed by.
+ # The name of the legacy C macro by which this method can be
+ # accessed. If empty, no macro is defined. If "=", a macro
+ # formed from the upper-case function name is used.
returntype ) : ;;
@@ -274,11 +276,6 @@ do
# match the FORMAL list given above. Functions with out
# arguments leave this blank.
- attrib ) : ;;
-
- # Any GCC attributes that should be attached to the function
- # declaration. At present this field is unused.
-
staticdefault ) : ;;
# To help with the GDB startup a static gdbarch object is
@@ -347,35 +344,17 @@ do
# See also PREDEFAULT and POSTDEFAULT.
- fmt ) : ;;
-
- # printf style format string that can be used to print out the
- # MEMBER. Sometimes "%s" is useful. For functions, this is
- # ignored and the function address is printed.
-
- # If FMT is empty, ``%ld'' is used.
-
print ) : ;;
- # An optional equation that casts MEMBER to a value suitable
- # for formatting by FMT.
-
- # If PRINT is empty, ``(long)'' is used.
-
- print_p ) : ;;
-
- # An optional indicator for any predicte to wrap around the
- # print member code.
+ # An optional expression that convers MEMBER to a value
+ # suitable for formatting using %s.
- # () -> Call a custom function to do the dump.
- # exp -> Wrap print up in ``if (${print_p}) ...
- # ``'' -> No predicate
+ # If PRINT is empty, paddr_nz (for CORE_ADDR) or paddr_d
+ # (anything else) is used.
- # If PRINT_P is empty, ``1'' is always used.
+ garbage_at_eol ) : ;;
- description ) : ;;
-
- # Currently unused.
+ # Catches stray fields.
*)
echo "Bad field ${field}"
@@ -388,30 +367,36 @@ function_list ()
{
# See below (DOCO) for description of each field
cat <<EOF
-i:2:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name:TARGET_ARCHITECTURE != NULL
+i:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info:::&bfd_default_arch_struct::::TARGET_ARCHITECTURE->printable_name
#
-i:2:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
+i:TARGET_BYTE_ORDER:int:byte_order:::BFD_ENDIAN_BIG
#
-i:2:TARGET_OSABI:enum gdb_osabi:osabi::::GDB_OSABI_UNKNOWN
+i:TARGET_OSABI:enum gdb_osabi:osabi:::GDB_OSABI_UNKNOWN
# Number of bits in a char or unsigned char for the target machine.
# Just like CHAR_BIT in <limits.h> but describes the target machine.
-# v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
+# v:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
#
# Number of bits in a short or unsigned short for the target machine.
-v:2:TARGET_SHORT_BIT:int:short_bit::::8 * sizeof (short):2*TARGET_CHAR_BIT::0
+v:TARGET_SHORT_BIT:int:short_bit:::8 * sizeof (short):2*TARGET_CHAR_BIT::0
# Number of bits in an int or unsigned int for the target machine.
-v:2:TARGET_INT_BIT:int:int_bit::::8 * sizeof (int):4*TARGET_CHAR_BIT::0
+v:TARGET_INT_BIT:int:int_bit:::8 * sizeof (int):4*TARGET_CHAR_BIT::0
# Number of bits in a long or unsigned long for the target machine.
-v:2:TARGET_LONG_BIT:int:long_bit::::8 * sizeof (long):4*TARGET_CHAR_BIT::0
+v:TARGET_LONG_BIT:int:long_bit:::8 * sizeof (long):4*TARGET_CHAR_BIT::0
# Number of bits in a long long or unsigned long long for the target
# machine.
-v:2:TARGET_LONG_LONG_BIT:int:long_long_bit::::8 * sizeof (LONGEST):2*TARGET_LONG_BIT::0
-# Number of bits in a float for the target machine.
-v:2:TARGET_FLOAT_BIT:int:float_bit::::8 * sizeof (float):4*TARGET_CHAR_BIT::0
-# Number of bits in a double for the target machine.
-v:2:TARGET_DOUBLE_BIT:int:double_bit::::8 * sizeof (double):8*TARGET_CHAR_BIT::0
-# Number of bits in a long double for the target machine.
-v:2:TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
+v:TARGET_LONG_LONG_BIT:int:long_long_bit:::8 * sizeof (LONGEST):2*TARGET_LONG_BIT::0
+
+# The ABI default bit-size and format for "float", "double", and "long
+# double". These bit/format pairs should eventually be combined into
+# a single object. For the moment, just initialize them as a pair.
+
+v:TARGET_FLOAT_BIT:int:float_bit:::8 * sizeof (float):4*TARGET_CHAR_BIT::0
+v:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format:::::default_float_format (current_gdbarch)::pformat (current_gdbarch->float_format)
+v:TARGET_DOUBLE_BIT:int:double_bit:::8 * sizeof (double):8*TARGET_CHAR_BIT::0
+v:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format:::::default_double_format (current_gdbarch)::pformat (current_gdbarch->double_format)
+v:TARGET_LONG_DOUBLE_BIT:int:long_double_bit:::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
+v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format:::::default_double_format (current_gdbarch)::pformat (current_gdbarch->long_double_format)
+
# 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
# target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
@@ -421,60 +406,55 @@ v:2:TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TAR
# also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
#
# ptr_bit is the size of a pointer on the target
-v:2:TARGET_PTR_BIT:int:ptr_bit::::8 * sizeof (void*):TARGET_INT_BIT::0
+v:TARGET_PTR_BIT:int:ptr_bit:::8 * sizeof (void*):TARGET_INT_BIT::0
# addr_bit is the size of a target address as represented in gdb
-v:2:TARGET_ADDR_BIT:int:addr_bit::::8 * sizeof (void*):0:TARGET_PTR_BIT:
+v:TARGET_ADDR_BIT:int:addr_bit:::8 * sizeof (void*):0:TARGET_PTR_BIT:
# Number of bits in a BFD_VMA for the target object file format.
-v:2:TARGET_BFD_VMA_BIT:int:bfd_vma_bit::::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
+v:TARGET_BFD_VMA_BIT:int:bfd_vma_bit:::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
#
# One if \`char' acts like \`signed char', zero if \`unsigned char'.
-v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
+v:TARGET_CHAR_SIGNED:int:char_signed:::1:-1:1
#
-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
+F:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid
+f:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid:0:generic_target_write_pc::0
# UNWIND_SP is a direct replacement for TARGET_READ_SP.
-F:2:TARGET_READ_SP:CORE_ADDR:read_sp:void
+F:TARGET_READ_SP:CORE_ADDR:read_sp:void
# Function for getting target's idea of a frame pointer. FIXME: GDB's
# whole scheme for dealing with "frames" and "frame pointers" needs a
# serious shakedown.
-f:2:TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
+f:TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset:0:legacy_virtual_frame_pointer::0
#
-M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf
-M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf
+M::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf
+M::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf
#
-v:2:NUM_REGS:int:num_regs::::0:-1
+v:=:int:num_regs:::0:-1
# This macro gives the number of pseudo-registers that live in the
# register namespace but do not get fetched or stored on the target.
# These pseudo-registers may be aliases for other registers,
# combinations of other registers, or they may be computed by GDB.
-v:2:NUM_PSEUDO_REGS:int:num_pseudo_regs::::0:0::0:::
+v:=: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
-v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0
-v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0
-v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
+v:=:int:sp_regnum:::-1:-1::0
+v:=:int:pc_regnum:::-1:-1::0
+v:=:int:ps_regnum:::-1:-1::0
+v:=:int:fp0_regnum:::0:-1::0
# Convert stab register number (from \`r\' declaration) to a gdb REGNUM.
-f:2:STAB_REG_TO_REGNUM:int:stab_reg_to_regnum:int stab_regnr:stab_regnr:::no_op_reg_to_regnum::0
+f:=:int:stab_reg_to_regnum:int stab_regnr:stab_regnr::no_op_reg_to_regnum::0
# Provide a default mapping from a ecoff register number to a gdb REGNUM.
-f:2:ECOFF_REG_TO_REGNUM:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr:::no_op_reg_to_regnum::0
+f:=:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr::no_op_reg_to_regnum::0
# Provide a default mapping from a DWARF register number to a gdb REGNUM.
-f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no_op_reg_to_regnum::0
+f:=:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr::no_op_reg_to_regnum::0
# Convert from an sdb register number to an internal gdb register number.
-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::REGISTER_NAME:const char *:register_name:int regnr:regnr
+f:=:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0
+f:=:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0
+f:=:const char *:register_name:int regnr:regnr
# REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE.
-M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr
-# REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE.
-F:2:DEPRECATED_REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg_nr:reg_nr
-# DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
-# from REGISTER_TYPE.
-v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
+M::struct type *:register_type:int reg_nr:reg_nr
# If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
# register offsets computed using just REGISTER_TYPE, this can be
# deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
@@ -482,132 +462,69 @@ v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
# 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::DEPRECATED_REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
-# If all registers have identical raw and virtual sizes and those
-# sizes agree with the value computed from REGISTER_TYPE,
-# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
-# registers.
-F:2:DEPRECATED_REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
-# If all registers have identical raw and virtual sizes and those
-# sizes agree with the value computed from REGISTER_TYPE,
-# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
-# registers.
-F:2:DEPRECATED_REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
-# 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
-# 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
+F:=:int:deprecated_register_byte:int reg_nr:reg_nr:generic_register_byte:generic_register_byte
# See gdbint.texinfo, and PUSH_DUMMY_CALL.
-M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info
-# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
-# SAVE_DUMMY_FRAME_TOS.
-F:2:DEPRECATED_SAVE_DUMMY_FRAME_TOS:void:deprecated_save_dummy_frame_tos:CORE_ADDR sp:sp
+M::struct frame_id:unwind_dummy_id:struct frame_info *info:info
# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
# DEPRECATED_FP_REGNUM.
-v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0
-# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
-# DEPRECATED_TARGET_READ_FP.
-F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
+v:=:int:deprecated_fp_regnum:::-1:-1::0
# See gdbint.texinfo. See infcall.c. New, all singing all dancing,
# replacement for DEPRECATED_PUSH_ARGUMENTS.
-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
+M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
# PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS.
-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
-# DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true.
-v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
-# Implement PUSH_RETURN_ADDRESS, and then merge in
-# DEPRECATED_PUSH_RETURN_ADDRESS.
-F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp
-# Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP.
-F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
+F:=: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
# DEPRECATED_REGISTER_SIZE can be deleted.
-v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size
-v::CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
-# DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted.
-v::DEPRECATED_CALL_DUMMY_START_OFFSET:CORE_ADDR:deprecated_call_dummy_start_offset
-# DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted.
-v::DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:deprecated_call_dummy_breakpoint_offset
-# DEPRECATED_CALL_DUMMY_LENGTH can be deleted.
-v::DEPRECATED_CALL_DUMMY_LENGTH:int:deprecated_call_dummy_length
-# DEPRECATED_CALL_DUMMY_WORDS can be deleted.
-v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
-# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS.
-v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
-# DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
-# PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK.
-F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
-# This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
-M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code: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:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
-# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME.
-F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-
-
-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
-M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
+v:=:int:deprecated_register_size
+v:=:int:call_dummy_location::::AT_ENTRY_POINT::0
+M::CORE_ADDR:push_dummy_code: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:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
+
+m::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::void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
+M::void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
# MAP a GDB RAW register number onto a simulator register number. See
# also include/...-sim.h.
-f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::legacy_register_sim_regno::0
-F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes
-f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_register_not::0
-f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
+f:=:int:register_sim_regno:int reg_nr:reg_nr::legacy_register_sim_regno::0
+F:=:int:register_bytes_ok:long nr_bytes:nr_bytes
+f:=:int:cannot_fetch_register:int regnum:regnum::cannot_register_not::0
+f:=:int:cannot_store_register:int regnum:regnum::cannot_register_not::0
# setjmp/longjmp support.
-F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc
-# NOTE: cagney/2002-11-24: 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_PC_IN_CALL_DUMMY(),
-# doesn't need to be modified.
-F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::deprecated_pc_in_call_dummy:deprecated_pc_in_call_dummy
-F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
-F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
-#
-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:=:int:get_longjmp_target:CORE_ADDR *pc:pc
#
-# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
-# For raw <-> cooked register conversions, replaced by pseudo registers.
-F::DEPRECATED_REGISTER_CONVERTIBLE:int:deprecated_register_convertible:int nr:nr
-# 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
+v:=:int:believe_pcc_promotion:::::::
#
-f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:legacy_convert_register_p::0
-f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0:legacy_register_to_value::0
-f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0:legacy_value_to_register::0
+f:=:int:convert_register_p:int regnum, struct type *type:regnum, type:0:generic_convert_register_p::0
+f:=:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf:0
+f:=:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf:0
#
-f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0
-f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
-F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
+f:=:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf::unsigned_pointer_to_address::0
+f:=:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
+F:=:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
#
-F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-
# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
-F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp
+F:=:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp
# It has been suggested that this, well actually its predecessor,
# should take the type/value of the function to be called and not the
# return type. This is left as an exercise for the reader.
-M:::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf:valtype, regcache, readbuf, writebuf
+# NOTE: cagney/2004-06-13: The function stack.c:return_command uses
+# the predicate with default hack to avoid calling STORE_RETURN_VALUE
+# (via legacy_return_value), when a small struct is involved.
-# The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
-# STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded
-# into RETURN_VALUE.
+M::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf:valtype, regcache, readbuf, writebuf::legacy_return_value
-f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
-f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0
-f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf
-f:2:DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf
-f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0
+# The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+# DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
+# DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
+# RETURN_VALUE.
+
+f:=:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf::legacy_extract_return_value::0
+f:=:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf::legacy_store_return_value::0
+f:=:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf
+f:=:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf
+f:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type::generic_use_struct_convention::0
# As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
# ABI suitable for the implementation of a robust extract
@@ -627,62 +544,51 @@ f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *valu
# frame since it is only after the callee has returned that this
# function is used.
-#M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame
-F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:regcache
+#M::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame
+F:=:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:regcache
-F:2:DEPRECATED_FRAME_INIT_SAVED_REGS:void:deprecated_frame_init_saved_regs:struct frame_info *frame:frame
-F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame
-#
-f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
-f:2:INNER_THAN:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs::0:0
-f::BREAKPOINT_FROM_PC:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:::0:
-M:2:ADJUST_BREAKPOINT_ADDRESS:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
-f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint::0
-f:2:MEMORY_REMOVE_BREAKPOINT:int:memory_remove_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_remove_breakpoint::0
-v:2:DECR_PC_AFTER_BREAK:CORE_ADDR:decr_pc_after_break::::0:::0
-v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:::0
#
-m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
+f:=:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
+f:=:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
+f:=:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
+M::CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
+f:=:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache:0:default_memory_insert_breakpoint::0
+f:=:int:memory_remove_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache:0:default_memory_remove_breakpoint::0
+v:=:CORE_ADDR:decr_pc_after_break:::0:::0
+
+# A function can be addressed by either it's "pointer" (possibly a
+# descriptor address) or "entry point" (first executable instruction).
+# The method "convert_from_func_ptr_addr" converting the former to the
+# latter. DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+# a simplified subset of that functionality - the function's address
+# corresponds to the "function pointer" and the function's start
+# corresponds to the "function entry point" - and hence is redundant.
+
+v:=:CORE_ADDR:deprecated_function_start_offset:::0:::0
+
+m::void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len::generic_remote_translate_xfer_address::0
#
-v::FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:::0
-# DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new
-# frame code works regardless of the type of frame - frameless,
-# stackless, or normal.
-F::DEPRECATED_FRAMELESS_FUNCTION_INVOCATION:int:deprecated_frameless_function_invocation:struct frame_info *fi:fi
-F:2:DEPRECATED_FRAME_CHAIN:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame
-F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe
-# DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
-# note, per UNWIND_PC's doco, that while the two have similar
-# interfaces they have very different underlying implementations.
-F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi
-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
-# DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
-# frame-base. Enable frame-base before frame-unwind.
-F::DEPRECATED_FRAME_ARGS_ADDRESS:CORE_ADDR:deprecated_frame_args_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
+v:=:CORE_ADDR:frame_args_skip:::0:::0
+M::CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame
+M::CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame
# DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
# frame-base. Enable frame-base before frame-unwind.
-F::DEPRECATED_FRAME_LOCALS_ADDRESS:CORE_ADDR:deprecated_frame_locals_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
-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
+F:=:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
+F:=:int:frame_num_args:struct frame_info *frame:frame
#
# DEPRECATED_STACK_ALIGN has been replaced by an initial aligning call
# to frame_align and the requirement that methods such as
# push_dummy_call and frame_red_zone_size maintain correct stack/frame
# alignment.
-F:2:DEPRECATED_STACK_ALIGN:CORE_ADDR:deprecated_stack_align:CORE_ADDR sp:sp
-M:::CORE_ADDR:frame_align:CORE_ADDR address:address
+F:=:CORE_ADDR:deprecated_stack_align:CORE_ADDR sp:sp
+M::CORE_ADDR:frame_align:CORE_ADDR address:address
# DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by
# stabs_argument_has_addr.
-F:2:DEPRECATED_REG_STRUCT_HAS_ADDR:int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
-m:::int:stabs_argument_has_addr:struct type *type:type:::default_stabs_argument_has_addr::0
-v::FRAME_RED_ZONE_SIZE:int:frame_red_zone_size
-v:2:PARM_BOUNDARY:int:parm_boundary
+F:=:int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
+m::int:stabs_argument_has_addr:struct type *type:type::default_stabs_argument_has_addr::0
+v:=:int:frame_red_zone_size
#
-v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (current_gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
-v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (current_gdbarch)::%s:(TARGET_DOUBLE_FORMAT)->name
-v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (current_gdbarch)::%s:(TARGET_LONG_DOUBLE_FORMAT)->name
-m:::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ:addr, targ:::convert_from_func_ptr_addr_identity::0
+m::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ:addr, targ::convert_from_func_ptr_addr_identity::0
# 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.
# for special purposes. ADDR_BITS_REMOVE takes out any such bits so
@@ -692,10 +598,10 @@ m:::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ
# being a few stray bits in the PC which would mislead us, not as some
# sort of generic thing to handle alignment or segmentation (it's
# possible it should be in TARGET_READ_PC instead).
-f:2:ADDR_BITS_REMOVE:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr:::core_addr_identity::0
+f:=:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0
# It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
# ADDR_BITS_REMOVE.
-f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_addr_identity::0
+f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0
# 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.
#
@@ -704,31 +610,25 @@ f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_a
#
# FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
# single step. If not, then implement single step using breakpoints.
-F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
+F:=:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
# FIXME: cagney/2003-08-28: Need to find a better way of selecting the
-# disassembler. Perhaphs objdump can handle it?
-f::TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info:::0:
-f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
+# disassembler. Perhaps objdump can handle it?
+f:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info::0:
+f:=:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc::generic_skip_trampoline_code::0
# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
# evaluates non-zero, this is the address where the debugger will place
# a step-resume breakpoint to get us past the dynamic linker.
-m:2:SKIP_SOLIB_RESOLVER:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc:::generic_skip_solib_resolver::0
+m::CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc::generic_skip_solib_resolver::0
# For SVR4 shared libraries, each call goes through a small piece of
# trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
# to nonzero if we are currently stopped in one of these.
-f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
+f:=:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name::generic_in_solib_call_trampoline::0
# Some systems also have trampoline code for returning from shared libs.
-f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_return_trampoline::0
-
-# NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START,
-# DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been
-# superseeded by signal trampoline frame sniffers.
-F::DEPRECATED_PC_IN_SIGTRAMP:int:deprecated_pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp
-F:2:DEPRECATED_SIGTRAMP_START:CORE_ADDR:deprecated_sigtramp_start:CORE_ADDR pc:pc
-F:2:DEPRECATED_SIGTRAMP_END:CORE_ADDR:deprecated_sigtramp_end:CORE_ADDR pc:pc
+f:=:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name::generic_in_solib_return_trampoline::0
+
# A target might have problems with watchpoints as soon as the stack
# frame of the current function has been destroyed. This mostly happens
# as the first action in a funtion's epilogue. in_function_epilogue_p()
@@ -738,7 +638,7 @@ F:2:DEPRECATED_SIGTRAMP_END:CORE_ADDR:deprecated_sigtramp_end:CORE_ADDR pc:pc
# already been invalidated regardless of the value of addr. Targets
# which don't suffer from that problem could just let this functionality
# untouched.
-m:::int:in_function_epilogue_p:CORE_ADDR addr:addr::0:generic_in_function_epilogue_p::0
+m::int:in_function_epilogue_p:CORE_ADDR addr:addr:0:generic_in_function_epilogue_p::0
# Given a vector of command-line arguments, return a newly allocated
# string which, when passed to the create_inferior function, will be
# parsed (on Unix systems, by the shell) to yield the same vector.
@@ -747,23 +647,23 @@ m:::int:in_function_epilogue_p:CORE_ADDR addr:addr::0:generic_in_function_epilog
# command-line arguments.
# ARGC is the number of elements in the vector.
# ARGV is an array of strings, one per argument.
-m::CONSTRUCT_INFERIOR_ARGUMENTS:char *:construct_inferior_arguments:int argc, char **argv:argc, argv:::construct_inferior_arguments::0
-f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
-f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
-v:2:NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0:%s:NAME_OF_MALLOC
-v:2:CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
-v:2:HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
-F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
-M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_name:int type_flags:type_flags
-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
+m::char *:construct_inferior_arguments:int argc, char **argv:argc, argv::construct_inferior_arguments::0
+f:=:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0
+f:=:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0
+v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC
+v:=:int:cannot_step_breakpoint:::0:0::0
+v:=:int:have_nonsteppable_watchpoint:::0:0::0
+F:=:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
+M::const char *:address_class_type_flags_to_name:int type_flags:type_flags
+M::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
+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
+F:=:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
# Return the appropriate register set for a core file section with
# name SECT_NAME and size SECT_SIZE.
-M:::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
+M::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
EOF
}
@@ -774,8 +674,7 @@ exec > new-gdbarch.log
function_list | while do_read
do
cat <<EOF
-${class} ${macro}(${actual})
- ${returntype} ${function} ($formal)${attrib}
+${class} ${returntype} ${function} ($formal)
EOF
for r in ${read}
do
@@ -783,7 +682,7 @@ EOF
done
if class_is_predicate_p && fallback_default_p
then
- echo "Error: predicate function ${macro} can not have a non- multi-arch default" 1>&2
+ echo "Error: predicate function ${function} can not have a non- multi-arch default" 1>&2
kill $$
exit 1
fi
@@ -798,7 +697,7 @@ EOF
if class_is_predicate_p ; then :
elif test "x${predefault}" = "x"
then
- echo "Error: pure multi-arch function must have a predefault" 1>&2
+ echo "Error: pure multi-arch function ${function} must have a predefault" 1>&2
kill $$
exit 1
fi
@@ -876,14 +775,6 @@ struct target_ops;
struct obstack;
extern struct gdbarch *current_gdbarch;
-
-
-/* If any of the following are defined, the target wasn't correctly
- converted. */
-
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
-#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
-#endif
EOF
# function typedef's
@@ -897,12 +788,15 @@ do
printf "\n"
printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);\n"
printf "/* set_gdbarch_${function}() - not applicable - pre-initialized. */\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
- printf "#error \"Non multi-arch definition of ${macro}\"\n"
- printf "#endif\n"
- printf "#if !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
+ if test -n "${macro}"
+ then
+ printf "#if !defined (GDB_TM_FILE) && defined (${macro})\n"
+ printf "#error \"Non multi-arch definition of ${macro}\"\n"
+ printf "#endif\n"
+ printf "#if !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
+ fi
fi
done
@@ -919,30 +813,27 @@ do
-e '3,$ s,#, ,' \
-e '$ s,$, */,'
fi
- if class_is_multiarch_p
+
+ if class_is_predicate_p
then
- if class_is_predicate_p
- then
- printf "\n"
- printf "extern int gdbarch_${function}_p (struct gdbarch *gdbarch);\n"
- fi
- else
- if class_is_predicate_p
+ if test -n "${macro}"
then
printf "\n"
printf "#if defined (${macro})\n"
printf "/* Legacy for systems yet to multi-arch ${macro} */\n"
- #printf "#if (GDB_MULTI_ARCH <= GDB_MULTI_ARCH_PARTIAL) && defined (${macro})\n"
printf "#if !defined (${macro}_P)\n"
printf "#define ${macro}_P() (1)\n"
printf "#endif\n"
printf "#endif\n"
- printf "\n"
- printf "extern int gdbarch_${function}_p (struct gdbarch *gdbarch);\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro}_P)\n"
+ fi
+ printf "\n"
+ printf "extern int gdbarch_${function}_p (struct gdbarch *gdbarch);\n"
+ if test -n "${macro}"
+ then
+ printf "#if !defined (GDB_TM_FILE) && defined (${macro}_P)\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro}_P)\n"
+ printf "#if !defined (${macro}_P)\n"
printf "#define ${macro}_P() (gdbarch_${function}_p (current_gdbarch))\n"
printf "#endif\n"
fi
@@ -952,12 +843,15 @@ do
printf "\n"
printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);\n"
printf "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, ${returntype} ${function});\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
- printf "#error \"Non multi-arch definition of ${macro}\"\n"
- printf "#endif\n"
- printf "#if !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
+ if test -n "${macro}"
+ then
+ printf "#if !defined (GDB_TM_FILE) && defined (${macro})\n"
+ printf "#error \"Non multi-arch definition of ${macro}\"\n"
+ printf "#endif\n"
+ printf "#if !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
+ fi
fi
if class_is_function_p
then
@@ -978,9 +872,9 @@ do
printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch, ${formal});\n"
fi
printf "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, gdbarch_${function}_ftype *${function});\n"
- if class_is_multiarch_p ; then :
- else
- printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
+ if test -n "${macro}"
+ then
+ printf "#if !defined (GDB_TM_FILE) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
if [ "x${actual}" = "x" ]
@@ -1286,6 +1180,15 @@ static void alloc_gdbarch_data (struct gdbarch *);
#endif
int gdbarch_debug = GDBARCH_DEBUG;
+static const char *
+pformat (const struct floatformat *format)
+{
+ if (format == NULL)
+ return "(null)";
+ else
+ return format->name;
+}
+
EOF
# gdbarch open the gdbarch object
@@ -1355,7 +1258,7 @@ do
printf " ${returntype} ${function};\n"
elif class_is_function_p
then
- printf " gdbarch_${function}_ftype *${function}${attrib};\n"
+ printf " gdbarch_${function}_ftype *${function};\n"
fi
done
printf "};\n"
@@ -1548,13 +1451,11 @@ do
printf " current_gdbarch->${function} = ${postdefault};\n"
elif [ -n "${invalid_p}" ]
then
- printf " if ((GDB_MULTI_ARCH ${gt_level})\n"
- printf " && (${invalid_p}))\n"
+ printf " if (${invalid_p})\n"
printf " fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
elif [ -n "${predefault}" ]
then
- printf " if ((GDB_MULTI_ARCH ${gt_level})\n"
- printf " && (current_gdbarch->${function} == ${predefault}))\n"
+ printf " if (current_gdbarch->${function} == ${predefault})\n"
printf " fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
fi
fi
@@ -1585,77 +1486,88 @@ cat <<EOF
void
gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
{
+ const char *gdb_xm_file = "<not-defined>";
+ const char *gdb_nm_file = "<not-defined>";
+ const char *gdb_tm_file = "<not-defined>";
+#if defined (GDB_XM_FILE)
+ gdb_xm_file = GDB_XM_FILE;
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: GDB_XM_FILE = %s\\n",
+ gdb_xm_file);
+#if defined (GDB_NM_FILE)
+ gdb_nm_file = GDB_NM_FILE;
+#endif
+ fprintf_unfiltered (file,
+ "gdbarch_dump: GDB_NM_FILE = %s\\n",
+ gdb_nm_file);
+#if defined (GDB_TM_FILE)
+ gdb_tm_file = GDB_TM_FILE;
+#endif
fprintf_unfiltered (file,
- "gdbarch_dump: GDB_MULTI_ARCH = %d\\n",
- GDB_MULTI_ARCH);
+ "gdbarch_dump: GDB_TM_FILE = %s\\n",
+ gdb_tm_file);
EOF
-function_list | sort -t: -k 3 | while do_read
+function_list | sort -t: -k 4 | while do_read
do
# First the predicate
if class_is_predicate_p
then
- if class_is_multiarch_p
+ if test -n "${macro}"
then
- printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: gdbarch_${function}_p() = %%d\\\\n\",\n"
- printf " gdbarch_${function}_p (current_gdbarch));\n"
- else
printf "#ifdef ${macro}_P\n"
printf " fprintf_unfiltered (file,\n"
printf " \"gdbarch_dump: %%s # %%s\\\\n\",\n"
printf " \"${macro}_P()\",\n"
printf " XSTRING (${macro}_P ()));\n"
- printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${macro}_P() = %%d\\\\n\",\n"
- printf " ${macro}_P ());\n"
printf "#endif\n"
fi
- fi
- # multiarch functions don't have macros.
- if class_is_multiarch_p
- then
printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${function} = 0x%%08lx\\\\n\",\n"
- printf " (long) current_gdbarch->${function});\n"
- continue
+ printf " \"gdbarch_dump: gdbarch_${function}_p() = %%d\\\\n\",\n"
+ printf " gdbarch_${function}_p (current_gdbarch));\n"
fi
# Print the macro definition.
- printf "#ifdef ${macro}\n"
- if class_is_function_p
+ if test -n "${macro}"
then
- printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: %%s # %%s\\\\n\",\n"
- printf " \"${macro}(${actual})\",\n"
- printf " XSTRING (${macro} (${actual})));\n"
- else
- printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${macro} # %%s\\\\n\",\n"
- printf " XSTRING (${macro}));\n"
+ printf "#ifdef ${macro}\n"
+ if class_is_function_p
+ then
+ printf " fprintf_unfiltered (file,\n"
+ printf " \"gdbarch_dump: %%s # %%s\\\\n\",\n"
+ printf " \"${macro}(${actual})\",\n"
+ printf " XSTRING (${macro} (${actual})));\n"
+ else
+ printf " fprintf_unfiltered (file,\n"
+ printf " \"gdbarch_dump: ${macro} # %%s\\\\n\",\n"
+ printf " XSTRING (${macro}));\n"
+ fi
+ printf "#endif\n"
fi
- if [ "x${print_p}" = "x()" ]
- then
- printf " gdbarch_dump_${function} (current_gdbarch);\n"
- elif [ "x${print_p}" = "x0" ]
- then
- printf " /* skip print of ${macro}, print_p == 0. */\n"
- elif [ -n "${print_p}" ]
- then
- printf " if (${print_p})\n"
- printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${macro} = %s\\\\n\",\n" "${fmt}"
- printf " ${print});\n"
- elif class_is_function_p
+ # Print the corresponding value.
+ if class_is_function_p
then
printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${macro} = <0x%%08lx>\\\\n\",\n"
- printf " (long) current_gdbarch->${function}\n"
- printf " /*${macro} ()*/);\n"
+ printf " \"gdbarch_dump: ${function} = <0x%%lx>\\\\n\",\n"
+ printf " (long) current_gdbarch->${function});\n"
else
+ # It is a variable
+ case "${print}:${returntype}" in
+ :CORE_ADDR )
+ fmt="0x%s"
+ print="paddr_nz (current_gdbarch->${function})"
+ ;;
+ :* )
+ fmt="%s"
+ print="paddr_d (current_gdbarch->${function})"
+ ;;
+ * )
+ fmt="%s"
+ ;;
+ esac
printf " fprintf_unfiltered (file,\n"
- printf " \"gdbarch_dump: ${macro} = %s\\\\n\",\n" "${fmt}"
+ printf " \"gdbarch_dump: ${function} = %s\\\\n\",\n" "${fmt}"
printf " ${print});\n"
fi
- printf "#endif\n"
done
cat <<EOF
if (current_gdbarch->dump_tdep != NULL)
@@ -2307,13 +2219,14 @@ _initialize_gdbarch (void)
{
struct cmd_list_element *c;
- add_show_from_set (add_set_cmd ("arch",
- class_maintenance,
- var_zinteger,
- (char *)&gdbarch_debug,
- "Set architecture debugging.\\n\\
+ deprecated_add_show_from_set
+ (add_set_cmd ("arch",
+ class_maintenance,
+ var_zinteger,
+ (char *)&gdbarch_debug,
+ "Set architecture debugging.\\n\\
When non-zero, architecture debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
c = add_set_cmd ("archdebug",
class_maintenance,
var_zinteger,
@@ -2322,7 +2235,7 @@ When non-zero, architecture debugging is enabled.", &setdebuglist),
When non-zero, architecture debugging is enabled.", &setlist);
deprecate_cmd (c, "set debug arch");
- deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");
}
EOF
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index e03ebf47fa7..734e7dfc760 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -1,6 +1,8 @@
/* Machine independent variables that describe the core file under GDB.
- Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -43,7 +45,12 @@ extern int have_core_file_p (void);
address out of bounds. If breakpoints are inserted, returns shadow
contents, not the breakpoints themselves. From breakpoint.c. */
-extern int read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len);
+/* NOTE: cagney/2004-06-10: Code reading from a live inferior can use
+ the get_frame_memory methods, code reading from an exec can use the
+ target methods. */
+
+extern int deprecated_read_memory_nobpt (CORE_ADDR memaddr, char *myaddr,
+ unsigned len);
/* Report a memory error with error(). */
@@ -96,12 +103,12 @@ extern void generic_search (int len, char *data, char *mask,
/* Hook for `exec_file_command' command to call. */
-extern void (*exec_file_display_hook) (char *filename);
+extern void (*deprecated_exec_file_display_hook) (char *filename);
/* Hook for "file_command", which is more useful than above
(because it is invoked AFTER symbols are read, not before) */
-extern void (*file_changed_hook) (char *filename);
+extern void (*deprecated_file_changed_hook) (char *filename);
extern void specify_exec_file_hook (void (*hook) (char *filename));
@@ -194,15 +201,18 @@ struct core_fns
unsigned core_reg_size,
int which, CORE_ADDR reg_addr);
- /* Finds the next struct core_fns. They are allocated and initialized
- in whatever module implements the functions pointed to; an
- initializer calls add_core_fns to add them to the global chain. */
+ /* Finds the next struct core_fns. They are allocated and
+ initialized in whatever module implements the functions pointed
+ to; an initializer calls deprecated_add_core_fns to add them to
+ the global chain. */
struct core_fns *next;
};
-extern void add_core_fns (struct core_fns *cf);
+/* NOTE: cagney/2004-04-05: Replaced by "regset.h" and
+ regset_from_core_section(). */
+extern void deprecated_add_core_fns (struct core_fns *cf);
extern int default_core_sniffer (struct core_fns *cf, bfd * abfd);
extern int default_check_format (bfd * abfd);
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 3168606c938..0095e5f87e0 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-02 Andrew Cagney <cagney@gnu.org>
+
+ * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
+
2004-03-23 Daniel Jacobowitz <drow@mvista.com>
* linux-low.c (linux_wait): Clear all_processes list also.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 3af7eb46180..a5c1f95531b 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -183,7 +183,7 @@ gdbreplay: gdbreplay.o
# specific routine gets the one for the correct machine.
# The xyzzy stuff below deals with empty DEPFILES
TAGS: ${TAGFILES}
- etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
+ etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
`find ${srcdir}/../config -name ${XM_FILE} -print` \
`find ${srcdir}/../config -name ${NAT_FILE} -print` \
`for i in yzzy ${DEPFILES}; do \
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 09dea26ca8c..c58a38eab67 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -45,11 +45,9 @@ struct thread_info
/* State from wait_for_inferior */
CORE_ADDR prev_pc;
struct breakpoint *step_resume_breakpoint;
- struct breakpoint *through_sigtramp_breakpoint;
CORE_ADDR step_range_start;
CORE_ADDR step_range_end;
struct frame_id step_frame_id;
- CORE_ADDR step_sp;
int current_line;
struct symtab *current_symtab;
int trap_expected;
@@ -67,10 +65,6 @@ struct thread_info
when we finally do stop stepping. */
bpstat stepping_through_solib_catchpoints;
- /* This is set to TRUE when this thread is in a signal handler
- trampoline and we're single-stepping through it. */
- int stepping_through_sigtramp;
-
/* Private data used by the target vector implementation. */
struct private_thread_info *private;
};
@@ -118,7 +112,6 @@ extern void save_infrun_state (ptid_t ptid,
CORE_ADDR prev_pc,
int trap_expected,
struct breakpoint *step_resume_breakpoint,
- struct breakpoint *through_sigtramp_breakpoint,
CORE_ADDR step_range_start,
CORE_ADDR step_range_end,
const struct frame_id *step_frame_id,
@@ -126,10 +119,8 @@ extern void save_infrun_state (ptid_t ptid,
int another_trap,
int stepping_through_solib_after_catch,
bpstat stepping_through_solib_catchpoints,
- int stepping_through_sigtramp,
int current_line,
- struct symtab *current_symtab,
- CORE_ADDR step_sp);
+ struct symtab *current_symtab);
/* infrun context switch: load the debugger state previously saved
for the given thread. */
@@ -137,7 +128,6 @@ extern void load_infrun_state (ptid_t ptid,
CORE_ADDR *prev_pc,
int *trap_expected,
struct breakpoint **step_resume_breakpoint,
- struct breakpoint **through_sigtramp_breakpoint,
CORE_ADDR *step_range_start,
CORE_ADDR *step_range_end,
struct frame_id *step_frame_id,
@@ -145,10 +135,8 @@ extern void load_infrun_state (ptid_t ptid,
int *another_trap,
int *stepping_through_solib_affter_catch,
bpstat *stepping_through_solib_catchpoints,
- int *stepping_through_sigtramp,
int *current_line,
- struct symtab **current_symtab,
- CORE_ADDR *step_sp);
+ struct symtab **current_symtab);
/* Commands with a prefix of `thread'. */
extern struct cmd_list_element *thread_cmd_list;
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 1349ffbbe19..f8604bc151a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -97,8 +97,10 @@ struct type *builtin_type_vec64;
struct type *builtin_type_vec64i;
struct type *builtin_type_vec128;
struct type *builtin_type_vec128i;
+struct type *builtin_type_ieee_single[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ieee_single_big;
struct type *builtin_type_ieee_single_little;
+struct type *builtin_type_ieee_double[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ieee_double_big;
struct type *builtin_type_ieee_double_little;
struct type *builtin_type_ieee_double_littlebyte_bigword;
@@ -107,10 +109,13 @@ struct type *builtin_type_m68881_ext;
struct type *builtin_type_i960_ext;
struct type *builtin_type_m88110_ext;
struct type *builtin_type_m88110_harris_ext;
+struct type *builtin_type_arm_ext[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_arm_ext_big;
struct type *builtin_type_arm_ext_littlebyte_bigword;
+struct type *builtin_type_ia64_spill[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ia64_spill_big;
struct type *builtin_type_ia64_spill_little;
+struct type *builtin_type_ia64_quad[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ia64_quad_big;
struct type *builtin_type_ia64_quad_little;
struct type *builtin_type_void_data_ptr;
@@ -774,8 +779,12 @@ create_array_type (struct type *result_type, struct type *element_type,
struct type *
create_string_type (struct type *result_type, struct type *range_type)
{
+ struct type *string_char_type;
+
+ string_char_type = language_string_char_type (current_language,
+ current_gdbarch);
result_type = create_array_type (result_type,
- *current_language->string_char_type,
+ string_char_type,
range_type);
TYPE_CODE (result_type) = TYPE_CODE_STRING;
return (result_type);
@@ -1026,24 +1035,6 @@ type_name_no_tag (const struct type *type)
return TYPE_NAME (type);
}
-/* Lookup a primitive type named NAME.
- Return zero if NAME is not a primitive type. */
-
-struct type *
-lookup_primitive_typename (char *name)
-{
- struct type **const *p;
-
- for (p = current_language->la_builtin_type_vector; *p != NULL; p++)
- {
- if (strcmp (TYPE_NAME (**p), name) == 0)
- {
- return (**p);
- }
- }
- return (NULL);
-}
-
/* Lookup a typedef or primitive type named NAME,
visible in lexical block BLOCK.
If NOERR is nonzero, return zero if NAME is not suitably defined. */
@@ -1057,7 +1048,9 @@ lookup_typename (char *name, struct block *block, int noerr)
sym = lookup_symbol (name, block, VAR_DOMAIN, 0, (struct symtab **) NULL);
if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF)
{
- tmp = lookup_primitive_typename (name);
+ tmp = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch,
+ name);
if (tmp)
{
return (tmp);
@@ -3227,57 +3220,13 @@ build_gdbtypes (void)
init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0,
"string", (struct objfile *) NULL);
- builtin_type_int0 =
- init_type (TYPE_CODE_INT, 0 / 8,
- 0,
- "int0_t", (struct objfile *) NULL);
- builtin_type_int8 =
- init_type (TYPE_CODE_INT, 8 / 8,
- 0,
- "int8_t", (struct objfile *) NULL);
- builtin_type_uint8 =
- init_type (TYPE_CODE_INT, 8 / 8,
- TYPE_FLAG_UNSIGNED,
- "uint8_t", (struct objfile *) NULL);
- builtin_type_int16 =
- init_type (TYPE_CODE_INT, 16 / 8,
- 0,
- "int16_t", (struct objfile *) NULL);
- builtin_type_uint16 =
- init_type (TYPE_CODE_INT, 16 / 8,
- TYPE_FLAG_UNSIGNED,
- "uint16_t", (struct objfile *) NULL);
- builtin_type_int32 =
- init_type (TYPE_CODE_INT, 32 / 8,
- 0,
- "int32_t", (struct objfile *) NULL);
- builtin_type_uint32 =
- init_type (TYPE_CODE_INT, 32 / 8,
- TYPE_FLAG_UNSIGNED,
- "uint32_t", (struct objfile *) NULL);
- builtin_type_int64 =
- init_type (TYPE_CODE_INT, 64 / 8,
- 0,
- "int64_t", (struct objfile *) NULL);
- builtin_type_uint64 =
- init_type (TYPE_CODE_INT, 64 / 8,
- TYPE_FLAG_UNSIGNED,
- "uint64_t", (struct objfile *) NULL);
- builtin_type_int128 =
- init_type (TYPE_CODE_INT, 128 / 8,
- 0,
- "int128_t", (struct objfile *) NULL);
- builtin_type_uint128 =
- init_type (TYPE_CODE_INT, 128 / 8,
- TYPE_FLAG_UNSIGNED,
- "uint128_t", (struct objfile *) NULL);
builtin_type_bool =
init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0,
"bool", (struct objfile *) NULL);
/* Add user knob for controlling resolution of opaque types */
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("opaque-type-resolution", class_support, var_boolean, (char *) &opaque_type_resolution,
"Set resolution of opaque struct/class/union types (if set before loading symbols).",
&setlist),
@@ -3360,13 +3309,223 @@ build_gdbtypes (void)
"__bfd_vma", (struct objfile *) NULL);
}
+static struct gdbarch_data *gdbtypes_data;
+
+const struct builtin_type *
+builtin_type (struct gdbarch *gdbarch)
+{
+ return gdbarch_data (gdbarch, gdbtypes_data);
+}
+
+
+static struct type *
+build_flt (int bit, char *name, const struct floatformat *floatformat)
+{
+ struct type *t;
+ if (bit <= 0 || floatformat == NULL)
+ {
+ gdb_assert (builtin_type_error != NULL);
+ return builtin_type_error;
+ }
+ t = init_type (TYPE_CODE_FLT, bit / TARGET_CHAR_BIT,
+ 0, name, (struct objfile *) NULL);
+ TYPE_FLOATFORMAT (t) = floatformat;
+ return t;
+}
+
+static struct type *
+build_complex (int bit, char *name, struct type *target_type)
+{
+ struct type *t;
+ if (bit <= 0 || target_type == builtin_type_error)
+ {
+ gdb_assert (builtin_type_error != NULL);
+ return builtin_type_error;
+ }
+ t = init_type (TYPE_CODE_COMPLEX, 2 * bit / TARGET_CHAR_BIT,
+ 0, name, (struct objfile *) NULL);
+ TYPE_TARGET_TYPE (t) = target_type;
+ return t;
+}
+
+static void *
+gdbtypes_post_init (struct gdbarch *gdbarch)
+{
+ struct builtin_type *builtin_type
+ = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct builtin_type);
+
+ builtin_type->builtin_void =
+ init_type (TYPE_CODE_VOID, 1,
+ 0,
+ "void", (struct objfile *) NULL);
+ builtin_type->builtin_char =
+ init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ (TYPE_FLAG_NOSIGN
+ | (TARGET_CHAR_SIGNED ? 0 : TYPE_FLAG_UNSIGNED)),
+ "char", (struct objfile *) NULL);
+ builtin_type->builtin_true_char =
+ init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0,
+ "true character", (struct objfile *) NULL);
+ builtin_type->builtin_signed_char =
+ init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0,
+ "signed char", (struct objfile *) NULL);
+ builtin_type->builtin_unsigned_char =
+ init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED,
+ "unsigned char", (struct objfile *) NULL);
+ builtin_type->builtin_short =
+ init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+ 0,
+ "short", (struct objfile *) NULL);
+ builtin_type->builtin_unsigned_short =
+ init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED,
+ "unsigned short", (struct objfile *) NULL);
+ builtin_type->builtin_int =
+ init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
+ 0,
+ "int", (struct objfile *) NULL);
+ builtin_type->builtin_unsigned_int =
+ init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED,
+ "unsigned int", (struct objfile *) NULL);
+ builtin_type->builtin_long =
+ init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+ 0,
+ "long", (struct objfile *) NULL);
+ builtin_type->builtin_unsigned_long =
+ init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED,
+ "unsigned long", (struct objfile *) NULL);
+ builtin_type->builtin_long_long =
+ init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+ 0,
+ "long long", (struct objfile *) NULL);
+ builtin_type->builtin_unsigned_long_long =
+ init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+ TYPE_FLAG_UNSIGNED,
+ "unsigned long long", (struct objfile *) NULL);
+ builtin_type->builtin_float
+ = build_flt (gdbarch_float_bit (gdbarch), "float",
+ gdbarch_float_format (gdbarch));
+ builtin_type->builtin_double
+ = build_flt (gdbarch_double_bit (gdbarch), "double",
+ gdbarch_double_format (gdbarch));
+ builtin_type->builtin_long_double
+ = build_flt (gdbarch_long_double_bit (gdbarch), "long double",
+ gdbarch_long_double_format (gdbarch));
+ builtin_type->builtin_complex
+ = build_complex (gdbarch_float_bit (gdbarch), "complex",
+ builtin_type->builtin_float);
+ builtin_type->builtin_double_complex
+ = build_complex (gdbarch_double_bit (gdbarch), "double complex",
+ builtin_type->builtin_double);
+ builtin_type->builtin_string =
+ init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0,
+ "string", (struct objfile *) NULL);
+ builtin_type->builtin_bool =
+ init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+ 0,
+ "bool", (struct objfile *) NULL);
+
+ /* Pointer/Address types. */
+
+ /* NOTE: on some targets, addresses and pointers are not necessarily
+ the same --- for example, on the D10V, pointers are 16 bits long,
+ but addresses are 32 bits long. See doc/gdbint.texinfo,
+ ``Pointers Are Not Always Addresses''.
+
+ The upshot is:
+ - gdb's `struct type' always describes the target's
+ representation.
+ - gdb's `struct value' objects should always hold values in
+ target form.
+ - gdb's CORE_ADDR values are addresses in the unified virtual
+ address space that the assembler and linker work with. Thus,
+ since target_read_memory takes a CORE_ADDR as an argument, it
+ can access any memory on the target, even if the processor has
+ separate code and data address spaces.
+
+ So, for example:
+ - If v is a value holding a D10V code pointer, its contents are
+ in target form: a big-endian address left-shifted two bits.
+ - If p is a D10V pointer type, TYPE_LENGTH (p) == 2, just as
+ sizeof (void *) == 2 on the target.
+
+ In this context, builtin_type->CORE_ADDR is a bit odd: it's a
+ target type for a value the target will never see. It's only
+ used to hold the values of (typeless) linker symbols, which are
+ indeed in the unified virtual address space. */
+ builtin_type->builtin_data_ptr
+ = make_pointer_type (builtin_type->builtin_void, NULL);
+ builtin_type->builtin_func_ptr
+ = lookup_pointer_type (lookup_function_type (builtin_type->builtin_void));
+ builtin_type->builtin_core_addr =
+ init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
+ TYPE_FLAG_UNSIGNED,
+ "__CORE_ADDR", (struct objfile *) NULL);
+
+ return builtin_type;
+}
+
extern void _initialize_gdbtypes (void);
void
_initialize_gdbtypes (void)
{
struct cmd_list_element *c;
+
+ builtin_type_int0 =
+ init_type (TYPE_CODE_INT, 0 / 8,
+ 0,
+ "int0_t", (struct objfile *) NULL);
+ builtin_type_int8 =
+ init_type (TYPE_CODE_INT, 8 / 8,
+ 0,
+ "int8_t", (struct objfile *) NULL);
+ builtin_type_uint8 =
+ init_type (TYPE_CODE_INT, 8 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint8_t", (struct objfile *) NULL);
+ builtin_type_int16 =
+ init_type (TYPE_CODE_INT, 16 / 8,
+ 0,
+ "int16_t", (struct objfile *) NULL);
+ builtin_type_uint16 =
+ init_type (TYPE_CODE_INT, 16 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint16_t", (struct objfile *) NULL);
+ builtin_type_int32 =
+ init_type (TYPE_CODE_INT, 32 / 8,
+ 0,
+ "int32_t", (struct objfile *) NULL);
+ builtin_type_uint32 =
+ init_type (TYPE_CODE_INT, 32 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint32_t", (struct objfile *) NULL);
+ builtin_type_int64 =
+ init_type (TYPE_CODE_INT, 64 / 8,
+ 0,
+ "int64_t", (struct objfile *) NULL);
+ builtin_type_uint64 =
+ init_type (TYPE_CODE_INT, 64 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint64_t", (struct objfile *) NULL);
+ builtin_type_int128 =
+ init_type (TYPE_CODE_INT, 128 / 8,
+ 0,
+ "int128_t", (struct objfile *) NULL);
+ builtin_type_uint128 =
+ init_type (TYPE_CODE_INT, 128 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint128_t", (struct objfile *) NULL);
+
build_gdbtypes ();
+ gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
+
/* FIXME - For the moment, handle types by swapping them in and out.
Should be using the per-architecture data-pointer and a large
struct. */
@@ -3388,16 +3547,6 @@ _initialize_gdbtypes (void)
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_complex);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_double_complex);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_string);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int8);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_uint8);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int16);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_uint16);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int32);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_uint32);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int64);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_uint64);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int128);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_uint128);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_v4sf);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_v4si);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_v16qi);
@@ -3433,6 +3582,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ieee_single_little.totalsize / 8,
0, "builtin_type_ieee_single_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ieee_single_little) = &floatformat_ieee_single_little;
+ builtin_type_ieee_single[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ieee_single_big.totalsize,
+ "builtin_type_ieee_single_big",
+ &floatformat_ieee_single_big);
+ builtin_type_ieee_single[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ieee_single_little.totalsize,
+ "builtin_type_ieee_single_little",
+ &floatformat_ieee_single_little);
builtin_type_ieee_double_big =
init_type (TYPE_CODE_FLT, floatformat_ieee_double_big.totalsize / 8,
0, "builtin_type_ieee_double_big", NULL);
@@ -3441,6 +3598,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ieee_double_little.totalsize / 8,
0, "builtin_type_ieee_double_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ieee_double_little) = &floatformat_ieee_double_little;
+ builtin_type_ieee_double[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ieee_double_big.totalsize,
+ "builtin_type_ieee_double_big",
+ &floatformat_ieee_double_big);
+ builtin_type_ieee_double[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ieee_double_little.totalsize,
+ "builtin_type_ieee_double_little",
+ &floatformat_ieee_double_little);
builtin_type_ieee_double_littlebyte_bigword =
init_type (TYPE_CODE_FLT, floatformat_ieee_double_littlebyte_bigword.totalsize / 8,
0, "builtin_type_ieee_double_littlebyte_bigword", NULL);
@@ -3473,6 +3638,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_arm_ext_littlebyte_bigword.totalsize / 8,
0, "builtin_type_arm_ext_littlebyte_bigword", NULL);
TYPE_FLOATFORMAT (builtin_type_arm_ext_littlebyte_bigword) = &floatformat_arm_ext_littlebyte_bigword;
+ builtin_type_arm_ext[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_arm_ext_big.totalsize,
+ "builtin_type_arm_ext_big",
+ &floatformat_arm_ext_big);
+ builtin_type_arm_ext[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_arm_ext_littlebyte_bigword.totalsize,
+ "builtin_type_arm_ext_littlebyte_bigword",
+ &floatformat_arm_ext_littlebyte_bigword);
builtin_type_ia64_spill_big =
init_type (TYPE_CODE_FLT, floatformat_ia64_spill_big.totalsize / 8,
0, "builtin_type_ia64_spill_big", NULL);
@@ -3481,6 +3654,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ia64_spill_little.totalsize / 8,
0, "builtin_type_ia64_spill_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_spill_little) = &floatformat_ia64_spill_little;
+ builtin_type_ia64_spill[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ia64_spill_big.totalsize,
+ "builtin_type_ia64_spill_big",
+ &floatformat_ia64_spill_big);
+ builtin_type_ia64_spill[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ia64_spill_little.totalsize,
+ "builtin_type_ia64_spill_little",
+ &floatformat_ia64_spill_little);
builtin_type_ia64_quad_big =
init_type (TYPE_CODE_FLT, floatformat_ia64_quad_big.totalsize / 8,
0, "builtin_type_ia64_quad_big", NULL);
@@ -3489,11 +3670,18 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ia64_quad_little.totalsize / 8,
0, "builtin_type_ia64_quad_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_quad_little) = &floatformat_ia64_quad_little;
-
- add_show_from_set (
- add_set_cmd ("overload", no_class, var_zinteger, (char *) &overload_debug,
- "Set debugging of C++ overloading.\n\
- When enabled, ranking of the functions\n\
- is displayed.", &setdebuglist),
- &showdebuglist);
+ builtin_type_ia64_quad[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ia64_quad_big.totalsize,
+ "builtin_type_ia64_quad_big",
+ &floatformat_ia64_quad_big);
+ builtin_type_ia64_quad[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ia64_quad_little.totalsize,
+ "builtin_type_ia64_quad_little",
+ &floatformat_ia64_quad_little);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("overload", no_class, var_zinteger, (char *) &overload_debug,
+ "Set debugging of C++ overloading.\n\
+When enabled, ranking of the functions is displayed.", &setdebuglist),
+ &showdebuglist);
}
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index a1141d72e25..4f95e136707 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -82,7 +82,27 @@ enum type_code
{
TYPE_CODE_UNDEF, /* Not used; catches errors */
TYPE_CODE_PTR, /* Pointer type */
- TYPE_CODE_ARRAY, /* Array type with lower & upper bounds. */
+
+ /* Array type with lower & upper bounds.
+
+ Regardless of the language, GDB represents multidimensional
+ array types the way C does: as arrays of arrays. So an
+ instance of a GDB array type T can always be seen as a series
+ of instances of TYPE_TARGET_TYPE (T) laid out sequentially in
+ memory.
+
+ Row-major languages like C lay out multi-dimensional arrays so
+ that incrementing the rightmost index in a subscripting
+ expression results in the smallest change in the address of the
+ element referred to. Column-major languages like Fortran lay
+ them out so that incrementing the leftmost index results in the
+ smallest change.
+
+ This means that, in column-major languages, working our way
+ from type to target type corresponds to working through indices
+ from right to left, not left to right. */
+ TYPE_CODE_ARRAY,
+
TYPE_CODE_STRUCT, /* C struct or Pascal record */
TYPE_CODE_UNION, /* C union or Pascal variant part */
TYPE_CODE_ENUM, /* Enumeration type */
@@ -136,7 +156,7 @@ enum type_code
TYPE_CODE_TEMPLATE, /* C++ template */
TYPE_CODE_TEMPLATE_ARG, /* C++ template arg */
- TYPE_CODE_NAMESPACE, /* C++ namespace. */
+ TYPE_CODE_NAMESPACE /* C++ namespace. */
};
/* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an
@@ -923,7 +943,58 @@ extern void allocate_cplus_struct_type (struct type *);
(TYPE_NFIELDS (thistype) == 0) && \
(TYPE_CPLUS_SPECIFIC (thistype) && (TYPE_NFN_FIELDS (thistype) == 0)))
+struct builtin_type
+{
+ /* Address/pointer types. */
+
+ /* `pointer to data' type. Some target platforms use an implicitly
+ {sign,zero} -extended 32-bit ABI pointer on a 64-bit ISA. */
+ struct type *builtin_data_ptr;
+
+ /* `pointer to function (returning void)' type. Harvard
+ architectures mean that ABI function and code pointers are not
+ interconvertible. Similarly, since ANSI, C standards have
+ explicitly said that pointers to functions and pointers to data
+ are not interconvertible --- that is, you can't cast a function
+ pointer to void * and back, and expect to get the same value.
+ However, all function pointer types are interconvertible, so void
+ (*) () can server as a generic function pointer. */
+ struct type *builtin_func_ptr;
+
+ /* The target CPU's address type. This is the ISA address size. */
+ struct type *builtin_core_addr;
+
+ /* Integral types. */
+
+ /* We use this for the '/c' print format, because c_char is just a
+ one-byte integral type, which languages less laid back than C
+ will print as ... well, a one-byte integral type. */
+ struct type *builtin_true_char;
+
+ /* Implicit size/sign (based on the the architecture's ABI). */
+ struct type *builtin_void;
+ struct type *builtin_char;
+ struct type *builtin_short;
+ struct type *builtin_int;
+ struct type *builtin_long;
+ struct type *builtin_signed_char;
+ struct type *builtin_unsigned_char;
+ struct type *builtin_unsigned_short;
+ struct type *builtin_unsigned_int;
+ struct type *builtin_unsigned_long;
+ struct type *builtin_float;
+ struct type *builtin_double;
+ struct type *builtin_long_double;
+ struct type *builtin_complex;
+ struct type *builtin_double_complex;
+ struct type *builtin_string;
+ struct type *builtin_bool;
+ struct type *builtin_long_long;
+ struct type *builtin_unsigned_long_long;
+};
+/* Return the type table for the specified architecture. */
+extern const struct builtin_type *builtin_type (struct gdbarch *gdbarch);
/* Implicit sizes */
extern struct type *builtin_type_void;
@@ -999,8 +1070,10 @@ extern struct type *builtin_type_vec128;
extern struct type *builtin_type_vec128i;
/* Explicit floating-point formats. See "floatformat.h". */
+extern struct type *builtin_type_ieee_single[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ieee_single_big;
extern struct type *builtin_type_ieee_single_little;
+extern struct type *builtin_type_ieee_double[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ieee_double_big;
extern struct type *builtin_type_ieee_double_little;
extern struct type *builtin_type_ieee_double_littlebyte_bigword;
@@ -1009,10 +1082,13 @@ extern struct type *builtin_type_m68881_ext;
extern struct type *builtin_type_i960_ext;
extern struct type *builtin_type_m88110_ext;
extern struct type *builtin_type_m88110_harris_ext;
+extern struct type *builtin_type_arm_ext[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_arm_ext_big;
extern struct type *builtin_type_arm_ext_littlebyte_bigword;
+extern struct type *builtin_type_ia64_spill[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ia64_spill_big;
extern struct type *builtin_type_ia64_spill_little;
+extern struct type *builtin_type_ia64_quad[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ia64_quad_big;
extern struct type *builtin_type_ia64_quad_little;
@@ -1153,12 +1229,8 @@ extern struct type *check_typedef (struct type *);
extern void check_stub_method_group (struct type *, int);
-extern struct type *lookup_primitive_typename (char *);
-
extern char *gdb_mangle_name (struct type *, int, int);
-extern struct type *builtin_type (char **);
-
extern struct type *lookup_typename (char *, struct block *, int);
extern struct type *lookup_template_type (char *, struct type *,
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index a61d577f839..f43d1ba0d13 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1574,7 +1574,7 @@ rewait:
}
/* Pass back out our results. */
- bcopy (&inf->wait.status, status, sizeof (*status));
+ memcpy (status, &inf->wait.status, sizeof (*status));
thread = inf->wait.thread;
if (thread)
@@ -2040,7 +2040,8 @@ cur_inf (void)
}
static void
-gnu_create_inferior (char *exec_file, char *allargs, char **env)
+gnu_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct inf *inf = cur_inf ();
@@ -2102,8 +2103,6 @@ gnu_can_run (void)
}
-#ifdef ATTACH_DETACH
-
/* Attach to process PID, then initialize for debugging it
and wait for the trace-trap that results from attaching. */
static void
@@ -2188,8 +2187,6 @@ gnu_detach (char *args, int from_tty)
unpush_target (&gnu_ops); /* Pop out of handling an inferior */
}
-#endif /* ATTACH_DETACH */
-
static void
gnu_terminal_init_inferior (void)
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 0932ddb541c..ec3b5aa650b 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -183,7 +183,7 @@ static int go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
static void go32_files_info (struct target_ops *target);
static void go32_stop (void);
static void go32_kill_inferior (void);
-static void go32_create_inferior (char *exec_file, char *args, char **env);
+static void go32_create_inferior (char *exec_file, char *args, char **env, int from_tty);
static void go32_mourn_inferior (void);
static int go32_can_run (void);
@@ -466,7 +466,8 @@ static void
fetch_register (int regno)
{
if (regno < FP0_REGNUM)
- supply_register (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_supply_fsave (current_regcache, regno, &npx);
else
@@ -491,7 +492,8 @@ static void
store_register (int regno)
{
if (regno < FP0_REGNUM)
- regcache_collect (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_fill_fsave ((char *) &npx, regno);
else
@@ -574,7 +576,7 @@ go32_kill_inferior (void)
}
static void
-go32_create_inferior (char *exec_file, char *args, char **env)
+go32_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
extern char **environ;
jmp_buf start_state;
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index c6f55f887fd..0d6c3bcbb26 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -519,9 +519,7 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
static CORE_ADDR
h8300_frame_chain (struct frame_info *thisframe)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe),
- get_frame_base (thisframe),
- get_frame_base (thisframe)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (thisframe)))
{ /* initialize the from_pc now */
get_frame_extra_info (thisframe)->from_pc =
deprecated_read_register_dummy (get_frame_pc (thisframe),
@@ -540,9 +538,7 @@ h8300_frame_chain (struct frame_info *thisframe)
static CORE_ADDR
h8300_frame_saved_pc (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
return deprecated_read_register_dummy (get_frame_pc (frame),
get_frame_base (frame),
E_PC_REGNUM);
@@ -632,7 +628,7 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
to begin with. */
static CORE_ADDR
-h8300_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -739,9 +735,7 @@ h8300_pop_frame (void)
unsigned regno;
struct frame_info *frame = get_current_frame ();
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
{
deprecated_pop_dummy_frame ();
}
@@ -1323,10 +1317,9 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
*/
/* Stack grows up. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
set_gdbarch_push_dummy_code (gdbarch, h8300_push_dummy_code);
set_gdbarch_push_dummy_call (gdbarch, h8300_push_dummy_call);
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 9be842bf319..78f3e2abf85 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -24,145 +24,1424 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "osabi.h"
#include "gdb_string.h"
#include "frame.h"
+#include "frame-unwind.h"
+#include "trad-frame.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "inferior.h"
+#include "infcall.h"
+#include "observer.h"
+#include "hppa-tdep.h"
+
+#include <dl.h>
+#include <machine/save_state.h>
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
/* Forward declarations. */
extern void _initialize_hppa_hpux_tdep (void);
extern initialize_file_ftype _initialize_hppa_hpux_tdep;
-/* FIXME: brobecker 2002-12-25. The following functions will eventually
- become static, after the multiarching conversion is done. */
-int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
-void hppa32_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-void hppa32_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-void hppa32_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *fsr);
-void hppa64_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-void hppa64_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp);
-void hppa64_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *fsr);
+typedef struct
+ {
+ struct minimal_symbol *msym;
+ CORE_ADDR solib_handle;
+ CORE_ADDR return_val;
+ }
+args_for_find_stub;
-int
-hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name)
+/* Return one if PC is in the call path of a trampoline, else return zero.
+
+ Note we return one for *any* call trampoline (long-call, arg-reloc), not
+ just shared library trampolines (import, export). */
+
+static int
+hppa32_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
{
- /* Actually, for a PA running HPUX the kernel calls the signal handler
- without an intermediate trampoline. Luckily the kernel always sets
- the return pointer for the signal handler to point to _sigreturn. */
- return (name && (strcmp ("_sigreturn", name) == 0));
+ struct minimal_symbol *minsym;
+ struct unwind_table_entry *u;
+
+ /* First see if PC is in one of the two C-library trampolines. */
+ if (pc == hppa_symbol_address("$$dyncall")
+ || pc == hppa_symbol_address("_sr4export"))
+ return 1;
+
+ minsym = lookup_minimal_symbol_by_pc (pc);
+ if (minsym && strcmp (DEPRECATED_SYMBOL_NAME (minsym), ".stub") == 0)
+ return 1;
+
+ /* Get the unwind descriptor corresponding to PC, return zero
+ if no unwind was found. */
+ u = find_unwind_entry (pc);
+ if (!u)
+ return 0;
+
+ /* If this isn't a linker stub, then return now. */
+ if (u->stub_unwind.stub_type == 0)
+ return 0;
+
+ /* By definition a long-branch stub is a call stub. */
+ if (u->stub_unwind.stub_type == LONG_BRANCH)
+ return 1;
+
+ /* The call and return path execute the same instructions within
+ an IMPORT stub! So an IMPORT stub is both a call and return
+ trampoline. */
+ if (u->stub_unwind.stub_type == IMPORT)
+ return 1;
+
+ /* Parameter relocation stubs always have a call path and may have a
+ return path. */
+ if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
+ || u->stub_unwind.stub_type == EXPORT)
+ {
+ CORE_ADDR addr;
+
+ /* Search forward from the current PC until we hit a branch
+ or the end of the stub. */
+ for (addr = pc; addr <= u->region_end; addr += 4)
+ {
+ unsigned long insn;
+
+ insn = read_memory_integer (addr, 4);
+
+ /* Does it look like a bl? If so then it's the call path, if
+ we find a bv or be first, then we're on the return path. */
+ if ((insn & 0xfc00e000) == 0xe8000000)
+ return 1;
+ else if ((insn & 0xfc00e001) == 0xe800c000
+ || (insn & 0xfc000000) == 0xe0000000)
+ return 0;
+ }
+
+ /* Should never happen. */
+ warning ("Unable to find branch in parameter relocation stub.\n");
+ return 0;
+ }
+
+ /* Unknown stub type. For now, just return zero. */
+ return 0;
}
-/* For hppa32_hpux_frame_saved_pc_in_sigtramp,
- hppa32_hpux_frame_base_before_sigtramp and
- hppa32_hpux_frame_find_saved_regs_in_sigtramp:
+static int
+hppa64_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ /* PA64 has a completely different stub/trampoline scheme. Is it
+ better? Maybe. It's certainly harder to determine with any
+ certainty that we are in a stub because we can not refer to the
+ unwinders to help.
- The signal context structure pointer is always saved at the base
- of the frame which "calls" the signal handler. We only want to find
- the hardware save state structure, which lives 10 32bit words into
- sigcontext structure.
+ The heuristic is simple. Try to lookup the current PC value in th
+ minimal symbol table. If that fails, then assume we are not in a
+ stub and return.
- Within the hardware save state structure, registers are found in the
- same order as the register numbers in GDB.
+ Then see if the PC value falls within the section bounds for the
+ section containing the minimal symbol we found in the first
+ step. If it does, then assume we are not in a stub and return.
- At one time we peeked at %r31 rather than the PC queues to determine
- what instruction took the fault. This was done on purpose, but I don't
- remember why. Looking at the PC queues is really the right way, and
- I don't remember why that didn't work when this code was originally
- written. */
+ Finally peek at the instructions to see if they look like a stub. */
+ struct minimal_symbol *minsym;
+ asection *sec;
+ CORE_ADDR addr;
+ int insn, i;
-void
-hppa32_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi, CORE_ADDR *tmp)
+ minsym = lookup_minimal_symbol_by_pc (pc);
+ if (! minsym)
+ return 0;
+
+ sec = SYMBOL_BFD_SECTION (minsym);
+
+ if (bfd_get_section_vma (sec->owner, sec) <= pc
+ && pc < (bfd_get_section_vma (sec->owner, sec)
+ + bfd_section_size (sec->owner, sec)))
+ return 0;
+
+ /* We might be in a stub. Peek at the instructions. Stubs are 3
+ instructions long. */
+ insn = read_memory_integer (pc, 4);
+
+ /* Find out where we think we are within the stub. */
+ if ((insn & 0xffffc00e) == 0x53610000)
+ addr = pc;
+ else if ((insn & 0xffffffff) == 0xe820d000)
+ addr = pc - 4;
+ else if ((insn & 0xffffc00e) == 0x537b0000)
+ addr = pc - 8;
+ else
+ return 0;
+
+ /* Now verify each insn in the range looks like a stub instruction. */
+ insn = read_memory_integer (addr, 4);
+ if ((insn & 0xffffc00e) != 0x53610000)
+ return 0;
+
+ /* Now verify each insn in the range looks like a stub instruction. */
+ insn = read_memory_integer (addr + 4, 4);
+ if ((insn & 0xffffffff) != 0xe820d000)
+ return 0;
+
+ /* Now verify each insn in the range looks like a stub instruction. */
+ insn = read_memory_integer (addr + 8, 4);
+ if ((insn & 0xffffc00e) != 0x537b0000)
+ return 0;
+
+ /* Looks like a stub. */
+ return 1;
+}
+
+/* Return one if PC is in the return path of a trampoline, else return zero.
+
+ Note we return one for *any* call trampoline (long-call, arg-reloc), not
+ just shared library trampolines (import, export). */
+
+static int
+hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name)
{
- *tmp = read_memory_integer (get_frame_base (fi) + (43 * 4), 4);
+ struct unwind_table_entry *u;
+
+ /* Get the unwind descriptor corresponding to PC, return zero
+ if no unwind was found. */
+ u = find_unwind_entry (pc);
+ if (!u)
+ return 0;
+
+ /* If this isn't a linker stub or it's just a long branch stub, then
+ return zero. */
+ if (u->stub_unwind.stub_type == 0 || u->stub_unwind.stub_type == LONG_BRANCH)
+ return 0;
+
+ /* The call and return path execute the same instructions within
+ an IMPORT stub! So an IMPORT stub is both a call and return
+ trampoline. */
+ if (u->stub_unwind.stub_type == IMPORT)
+ return 1;
+
+ /* Parameter relocation stubs always have a call path and may have a
+ return path. */
+ if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
+ || u->stub_unwind.stub_type == EXPORT)
+ {
+ CORE_ADDR addr;
+
+ /* Search forward from the current PC until we hit a branch
+ or the end of the stub. */
+ for (addr = pc; addr <= u->region_end; addr += 4)
+ {
+ unsigned long insn;
+
+ insn = read_memory_integer (addr, 4);
+
+ /* Does it look like a bl? If so then it's the call path, if
+ we find a bv or be first, then we're on the return path. */
+ if ((insn & 0xfc00e000) == 0xe8000000)
+ return 0;
+ else if ((insn & 0xfc00e001) == 0xe800c000
+ || (insn & 0xfc000000) == 0xe0000000)
+ return 1;
+ }
+
+ /* Should never happen. */
+ warning ("Unable to find branch in parameter relocation stub.\n");
+ return 0;
+ }
+
+ /* Unknown stub type. For now, just return zero. */
+ return 0;
+
}
-void
-hppa32_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp)
+/* Figure out if PC is in a trampoline, and if so find out where
+ the trampoline will jump to. If not in a trampoline, return zero.
+
+ Simple code examination probably is not a good idea since the code
+ sequences in trampolines can also appear in user code.
+
+ We use unwinds and information from the minimal symbol table to
+ determine when we're in a trampoline. This won't work for ELF
+ (yet) since it doesn't create stub unwind entries. Whether or
+ not ELF will create stub unwinds or normal unwinds for linker
+ stubs is still being debated.
+
+ This should handle simple calls through dyncall or sr4export,
+ long calls, argument relocation stubs, and dyncall/sr4export
+ calling an argument relocation stub. It even handles some stubs
+ used in dynamic executables. */
+
+static CORE_ADDR
+hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
+{
+ long orig_pc = pc;
+ long prev_inst, curr_inst, loc;
+ struct minimal_symbol *msym;
+ struct unwind_table_entry *u;
+
+ /* Addresses passed to dyncall may *NOT* be the actual address
+ of the function. So we may have to do something special. */
+ if (pc == hppa_symbol_address("$$dyncall"))
+ {
+ pc = (CORE_ADDR) read_register (22);
+
+ /* If bit 30 (counting from the left) is on, then pc is the address of
+ the PLT entry for this function, not the address of the function
+ itself. Bit 31 has meaning too, but only for MPE. */
+ if (pc & 0x2)
+ pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
+ }
+ if (pc == hppa_symbol_address("$$dyncall_external"))
+ {
+ pc = (CORE_ADDR) read_register (22);
+ pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
+ }
+ else if (pc == hppa_symbol_address("_sr4export"))
+ pc = (CORE_ADDR) (read_register (22));
+
+ /* Get the unwind descriptor corresponding to PC, return zero
+ if no unwind was found. */
+ u = find_unwind_entry (pc);
+ if (!u)
+ return 0;
+
+ /* If this isn't a linker stub, then return now. */
+ /* elz: attention here! (FIXME) because of a compiler/linker
+ error, some stubs which should have a non zero stub_unwind.stub_type
+ have unfortunately a value of zero. So this function would return here
+ as if we were not in a trampoline. To fix this, we go look at the partial
+ symbol information, which reports this guy as a stub.
+ (FIXME): Unfortunately, we are not that lucky: it turns out that the
+ partial symbol information is also wrong sometimes. This is because
+ when it is entered (somread.c::som_symtab_read()) it can happen that
+ if the type of the symbol (from the som) is Entry, and the symbol is
+ in a shared library, then it can also be a trampoline. This would
+ be OK, except that I believe the way they decide if we are ina shared library
+ does not work. SOOOO..., even if we have a regular function w/o trampolines
+ its minimal symbol can be assigned type mst_solib_trampoline.
+ Also, if we find that the symbol is a real stub, then we fix the unwind
+ descriptor, and define the stub type to be EXPORT.
+ Hopefully this is correct most of the times. */
+ if (u->stub_unwind.stub_type == 0)
+ {
+
+/* elz: NOTE (FIXME!) once the problem with the unwind information is fixed
+ we can delete all the code which appears between the lines */
+/*--------------------------------------------------------------------------*/
+ msym = lookup_minimal_symbol_by_pc (pc);
+
+ if (msym == NULL || MSYMBOL_TYPE (msym) != mst_solib_trampoline)
+ return orig_pc == pc ? 0 : pc & ~0x3;
+
+ else if (msym != NULL && MSYMBOL_TYPE (msym) == mst_solib_trampoline)
+ {
+ struct objfile *objfile;
+ struct minimal_symbol *msymbol;
+ int function_found = 0;
+
+ /* go look if there is another minimal symbol with the same name as
+ this one, but with type mst_text. This would happen if the msym
+ is an actual trampoline, in which case there would be another
+ symbol with the same name corresponding to the real function */
+
+ ALL_MSYMBOLS (objfile, msymbol)
+ {
+ if (MSYMBOL_TYPE (msymbol) == mst_text
+ && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
+ {
+ function_found = 1;
+ break;
+ }
+ }
+
+ if (function_found)
+ /* the type of msym is correct (mst_solib_trampoline), but
+ the unwind info is wrong, so set it to the correct value */
+ u->stub_unwind.stub_type = EXPORT;
+ else
+ /* the stub type info in the unwind is correct (this is not a
+ trampoline), but the msym type information is wrong, it
+ should be mst_text. So we need to fix the msym, and also
+ get out of this function */
+ {
+ MSYMBOL_TYPE (msym) = mst_text;
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+ }
+
+/*--------------------------------------------------------------------------*/
+ }
+
+ /* It's a stub. Search for a branch and figure out where it goes.
+ Note we have to handle multi insn branch sequences like ldil;ble.
+ Most (all?) other branches can be determined by examining the contents
+ of certain registers and the stack. */
+
+ loc = pc;
+ curr_inst = 0;
+ prev_inst = 0;
+ while (1)
+ {
+ /* Make sure we haven't walked outside the range of this stub. */
+ if (u != find_unwind_entry (loc))
+ {
+ warning ("Unable to find branch in linker stub");
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+
+ prev_inst = curr_inst;
+ curr_inst = read_memory_integer (loc, 4);
+
+ /* Does it look like a branch external using %r1? Then it's the
+ branch from the stub to the actual function. */
+ if ((curr_inst & 0xffe0e000) == 0xe0202000)
+ {
+ /* Yup. See if the previous instruction loaded
+ a value into %r1. If so compute and return the jump address. */
+ if ((prev_inst & 0xffe00000) == 0x20200000)
+ return (hppa_extract_21 (prev_inst) + hppa_extract_17 (curr_inst)) & ~0x3;
+ else
+ {
+ warning ("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1).");
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+ }
+
+ /* Does it look like a be 0(sr0,%r21)? OR
+ Does it look like a be, n 0(sr0,%r21)? OR
+ Does it look like a bve (r21)? (this is on PA2.0)
+ Does it look like a bve, n(r21)? (this is also on PA2.0)
+ That's the branch from an
+ import stub to an export stub.
+
+ It is impossible to determine the target of the branch via
+ simple examination of instructions and/or data (consider
+ that the address in the plabel may be the address of the
+ bind-on-reference routine in the dynamic loader).
+
+ So we have try an alternative approach.
+
+ Get the name of the symbol at our current location; it should
+ be a stub symbol with the same name as the symbol in the
+ shared library.
+
+ Then lookup a minimal symbol with the same name; we should
+ get the minimal symbol for the target routine in the shared
+ library as those take precedence of import/export stubs. */
+ if ((curr_inst == 0xe2a00000) ||
+ (curr_inst == 0xe2a00002) ||
+ (curr_inst == 0xeaa0d000) ||
+ (curr_inst == 0xeaa0d002))
+ {
+ struct minimal_symbol *stubsym, *libsym;
+
+ stubsym = lookup_minimal_symbol_by_pc (loc);
+ if (stubsym == NULL)
+ {
+ warning ("Unable to find symbol for 0x%lx", loc);
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+
+ libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL);
+ if (libsym == NULL)
+ {
+ warning ("Unable to find library symbol for %s\n",
+ DEPRECATED_SYMBOL_NAME (stubsym));
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+
+ return SYMBOL_VALUE (libsym);
+ }
+
+ /* Does it look like bl X,%rp or bl X,%r0? Another way to do a
+ branch from the stub to the actual function. */
+ /*elz */
+ else if ((curr_inst & 0xffe0e000) == 0xe8400000
+ || (curr_inst & 0xffe0e000) == 0xe8000000
+ || (curr_inst & 0xffe0e000) == 0xe800A000)
+ return (loc + hppa_extract_17 (curr_inst) + 8) & ~0x3;
+
+ /* Does it look like bv (rp)? Note this depends on the
+ current stack pointer being the same as the stack
+ pointer in the stub itself! This is a branch on from the
+ stub back to the original caller. */
+ /*else if ((curr_inst & 0xffe0e000) == 0xe840c000) */
+ else if ((curr_inst & 0xffe0f000) == 0xe840c000)
+ {
+ /* Yup. See if the previous instruction loaded
+ rp from sp - 8. */
+ if (prev_inst == 0x4bc23ff1)
+ return (read_memory_integer
+ (read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3;
+ else
+ {
+ warning ("Unable to find restore of %%rp before bv (%%rp).");
+ return orig_pc == pc ? 0 : pc & ~0x3;
+ }
+ }
+
+ /* elz: added this case to capture the new instruction
+ at the end of the return part of an export stub used by
+ the PA2.0: BVE, n (rp) */
+ else if ((curr_inst & 0xffe0f000) == 0xe840d000)
+ {
+ return (read_memory_integer
+ (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
+ }
+
+ /* What about be,n 0(sr0,%rp)? It's just another way we return to
+ the original caller from the stub. Used in dynamic executables. */
+ else if (curr_inst == 0xe0400002)
+ {
+ /* The value we jump to is sitting in sp - 24. But that's
+ loaded several instructions before the be instruction.
+ I guess we could check for the previous instruction being
+ mtsp %r1,%sr0 if we want to do sanity checking. */
+ return (read_memory_integer
+ (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
+ }
+
+ /* Haven't found the branch yet, but we're still in the stub.
+ Keep looking. */
+ loc += 4;
+ }
+}
+
+
+/* Exception handling support for the HP-UX ANSI C++ compiler.
+ The compiler (aCC) provides a callback for exception events;
+ GDB can set a breakpoint on this callback and find out what
+ exception event has occurred. */
+
+/* The name of the hook to be set to point to the callback function */
+static char HP_ACC_EH_notify_hook[] = "__eh_notify_hook";
+/* The name of the function to be used to set the hook value */
+static char HP_ACC_EH_set_hook_value[] = "__eh_set_hook_value";
+/* The name of the callback function in end.o */
+static char HP_ACC_EH_notify_callback[] = "__d_eh_notify_callback";
+/* Name of function in end.o on which a break is set (called by above) */
+static char HP_ACC_EH_break[] = "__d_eh_break";
+/* Name of flag (in end.o) that enables catching throws */
+static char HP_ACC_EH_catch_throw[] = "__d_eh_catch_throw";
+/* Name of flag (in end.o) that enables catching catching */
+static char HP_ACC_EH_catch_catch[] = "__d_eh_catch_catch";
+/* The enum used by aCC */
+typedef enum
+ {
+ __EH_NOTIFY_THROW,
+ __EH_NOTIFY_CATCH
+ }
+__eh_notification;
+
+/* Is exception-handling support available with this executable? */
+static int hp_cxx_exception_support = 0;
+/* Has the initialize function been run? */
+static int hp_cxx_exception_support_initialized = 0;
+/* Address of __eh_notify_hook */
+static CORE_ADDR eh_notify_hook_addr = 0;
+/* Address of __d_eh_notify_callback */
+static CORE_ADDR eh_notify_callback_addr = 0;
+/* Address of __d_eh_break */
+static CORE_ADDR eh_break_addr = 0;
+/* Address of __d_eh_catch_catch */
+static CORE_ADDR eh_catch_catch_addr = 0;
+/* Address of __d_eh_catch_throw */
+static CORE_ADDR eh_catch_throw_addr = 0;
+/* Sal for __d_eh_break */
+static struct symtab_and_line *break_callback_sal = 0;
+
+/* Code in end.c expects __d_pid to be set in the inferior,
+ otherwise __d_eh_notify_callback doesn't bother to call
+ __d_eh_break! So we poke the pid into this symbol
+ ourselves.
+ 0 => success
+ 1 => failure */
+int
+setup_d_pid_in_inferior (void)
{
- *tmp = read_memory_integer (get_frame_base (fi) + (40 * 4), 4);
+ CORE_ADDR anaddr;
+ struct minimal_symbol *msymbol;
+ char buf[4]; /* FIXME 32x64? */
+
+ /* Slam the pid of the process into __d_pid; failing is only a warning! */
+ msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
+ if (msymbol == NULL)
+ {
+ warning ("Unable to find __d_pid symbol in object file.");
+ warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
+ return 1;
+ }
+
+ anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */
+ if (target_write_memory (anaddr, buf, 4)) /* FIXME 32x64? */
+ {
+ warning ("Unable to write __d_pid");
+ warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
+ return 1;
+ }
+ return 0;
}
-void
-hppa32_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *fsr)
+/* elz: Used to lookup a symbol in the shared libraries.
+ This function calls shl_findsym, indirectly through a
+ call to __d_shl_get. __d_shl_get is in end.c, which is always
+ linked in by the hp compilers/linkers.
+ The call to shl_findsym cannot be made directly because it needs
+ to be active in target address space.
+ inputs: - minimal symbol pointer for the function we want to look up
+ - address in target space of the descriptor for the library
+ where we want to look the symbol up.
+ This address is retrieved using the
+ som_solib_get_solib_by_pc function (somsolib.c).
+ output: - real address in the library of the function.
+ note: the handle can be null, in which case shl_findsym will look for
+ the symbol in all the loaded shared libraries.
+ files to look at if you need reference on this stuff:
+ dld.c, dld_shl_findsym.c
+ end.c
+ man entry for shl_findsym */
+
+CORE_ADDR
+find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
+{
+ struct symbol *get_sym, *symbol2;
+ struct minimal_symbol *buff_minsym, *msymbol;
+ struct type *ftype;
+ struct value **args;
+ struct value *funcval;
+ struct value *val;
+
+ int x, namelen, err_value, tmp = -1;
+ CORE_ADDR endo_buff_addr, value_return_addr, errno_return_addr;
+ CORE_ADDR stub_addr;
+
+
+ args = alloca (sizeof (struct value *) * 8); /* 6 for the arguments and one null one??? */
+ funcval = find_function_in_inferior ("__d_shl_get");
+ get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_DOMAIN, NULL, NULL);
+ buff_minsym = lookup_minimal_symbol ("__buffer", NULL, NULL);
+ msymbol = lookup_minimal_symbol ("__shldp", NULL, NULL);
+ symbol2 = lookup_symbol ("__shldp", NULL, VAR_DOMAIN, NULL, NULL);
+ endo_buff_addr = SYMBOL_VALUE_ADDRESS (buff_minsym);
+ namelen = strlen (DEPRECATED_SYMBOL_NAME (function));
+ value_return_addr = endo_buff_addr + namelen;
+ ftype = check_typedef (SYMBOL_TYPE (get_sym));
+
+ /* do alignment */
+ if ((x = value_return_addr % 64) != 0)
+ value_return_addr = value_return_addr + 64 - x;
+
+ errno_return_addr = value_return_addr + 64;
+
+
+ /* set up stuff needed by __d_shl_get in buffer in end.o */
+
+ target_write_memory (endo_buff_addr, DEPRECATED_SYMBOL_NAME (function), namelen);
+
+ target_write_memory (value_return_addr, (char *) &tmp, 4);
+
+ target_write_memory (errno_return_addr, (char *) &tmp, 4);
+
+ target_write_memory (SYMBOL_VALUE_ADDRESS (msymbol),
+ (char *) &handle, 4);
+
+ /* now prepare the arguments for the call */
+
+ args[0] = value_from_longest (TYPE_FIELD_TYPE (ftype, 0), 12);
+ args[1] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 1), SYMBOL_VALUE_ADDRESS (msymbol));
+ args[2] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 2), endo_buff_addr);
+ args[3] = value_from_longest (TYPE_FIELD_TYPE (ftype, 3), TYPE_PROCEDURE);
+ args[4] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 4), value_return_addr);
+ args[5] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 5), errno_return_addr);
+
+ /* now call the function */
+
+ val = call_function_by_hand (funcval, 6, args);
+
+ /* now get the results */
+
+ target_read_memory (errno_return_addr, (char *) &err_value, sizeof (err_value));
+
+ target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
+ if (stub_addr <= 0)
+ error ("call to __d_shl_get failed, error code is %d", err_value);
+
+ return (stub_addr);
+}
+
+/* Cover routine for find_stub_with_shl_get to pass to catch_errors */
+static int
+cover_find_stub_with_shl_get (void *args_untyped)
+{
+ args_for_find_stub *args = args_untyped;
+ args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
+ return 0;
+}
+
+/* Initialize exception catchpoint support by looking for the
+ necessary hooks/callbacks in end.o, etc., and set the hook value to
+ point to the required debug function
+
+ Return 0 => failure
+ 1 => success */
+
+static int
+initialize_hp_cxx_exception_support (void)
{
+ struct symtabs_and_lines sals;
+ struct cleanup *old_chain;
+ struct cleanup *canonical_strings_chain = NULL;
int i;
- const CORE_ADDR tmp = get_frame_base (fi) + (10 * 4);
+ char *addr_start;
+ char *addr_end = NULL;
+ char **canonical = (char **) NULL;
+ int thread = -1;
+ struct symbol *sym = NULL;
+ struct minimal_symbol *msym = NULL;
+ struct objfile *objfile;
+ asection *shlib_info;
+
+ /* Detect and disallow recursion. On HP-UX with aCC, infinite
+ recursion is a possibility because finding the hook for exception
+ callbacks involves making a call in the inferior, which means
+ re-inserting breakpoints which can re-invoke this code */
+
+ static int recurse = 0;
+ if (recurse > 0)
+ {
+ hp_cxx_exception_support_initialized = 0;
+ deprecated_exception_support_initialized = 0;
+ return 0;
+ }
+
+ hp_cxx_exception_support = 0;
+
+ /* First check if we have seen any HP compiled objects; if not,
+ it is very unlikely that HP's idiosyncratic callback mechanism
+ for exception handling debug support will be available!
+ This will percolate back up to breakpoint.c, where our callers
+ will decide to try the g++ exception-handling support instead. */
+ if (!deprecated_hp_som_som_object_present)
+ return 0;
+
+ /* We have a SOM executable with SOM debug info; find the hooks */
+
+ /* First look for the notify hook provided by aCC runtime libs */
+ /* If we find this symbol, we conclude that the executable must
+ have HP aCC exception support built in. If this symbol is not
+ found, even though we're a HP SOM-SOM file, we may have been
+ built with some other compiler (not aCC). This results percolates
+ back up to our callers in breakpoint.c which can decide to
+ try the g++ style of exception support instead.
+ If this symbol is found but the other symbols we require are
+ not found, there is something weird going on, and g++ support
+ should *not* be tried as an alternative.
- for (i = 0; i < NUM_REGS; i++)
+ ASSUMPTION: Only HP aCC code will have __eh_notify_hook defined.
+ ASSUMPTION: HP aCC and g++ modules cannot be linked together. */
+
+ /* libCsup has this hook; it'll usually be non-debuggable */
+ msym = lookup_minimal_symbol (HP_ACC_EH_notify_hook, NULL, NULL);
+ if (msym)
+ {
+ eh_notify_hook_addr = SYMBOL_VALUE_ADDRESS (msym);
+ hp_cxx_exception_support = 1;
+ }
+ else
{
- if (i == SP_REGNUM)
- fsr[SP_REGNUM] = read_memory_integer (tmp + SP_REGNUM * 4, 4);
+ warning ("Unable to find exception callback hook (%s).", HP_ACC_EH_notify_hook);
+ warning ("Executable may not have been compiled debuggable with HP aCC.");
+ warning ("GDB will be unable to intercept exception events.");
+ eh_notify_hook_addr = 0;
+ hp_cxx_exception_support = 0;
+ return 0;
+ }
+
+ /* Next look for the notify callback routine in end.o */
+ /* This is always available in the SOM symbol dictionary if end.o is linked in */
+ msym = lookup_minimal_symbol (HP_ACC_EH_notify_callback, NULL, NULL);
+ if (msym)
+ {
+ eh_notify_callback_addr = SYMBOL_VALUE_ADDRESS (msym);
+ hp_cxx_exception_support = 1;
+ }
+ else
+ {
+ warning ("Unable to find exception callback routine (%s).", HP_ACC_EH_notify_callback);
+ warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
+ warning ("GDB will be unable to intercept exception events.");
+ eh_notify_callback_addr = 0;
+ return 0;
+ }
+
+#ifndef GDB_TARGET_IS_HPPA_20W
+ /* Check whether the executable is dynamically linked or archive bound */
+ /* With an archive-bound executable we can use the raw addresses we find
+ for the callback function, etc. without modification. For an executable
+ with shared libraries, we have to do more work to find the plabel, which
+ can be the target of a call through $$dyncall from the aCC runtime support
+ library (libCsup) which is linked shared by default by aCC. */
+ /* This test below was copied from somsolib.c/somread.c. It may not be a very
+ reliable one to test that an executable is linked shared. pai/1997-07-18 */
+ shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
+ if (shlib_info && (bfd_section_size (symfile_objfile->obfd, shlib_info) != 0))
+ {
+ /* The minsym we have has the local code address, but that's not the
+ plabel that can be used by an inter-load-module call. */
+ /* Find solib handle for main image (which has end.o), and use that
+ and the min sym as arguments to __d_shl_get() (which does the equivalent
+ of shl_findsym()) to find the plabel. */
+
+ args_for_find_stub args;
+ static char message[] = "Error while finding exception callback hook:\n";
+
+ args.solib_handle = som_solib_get_solib_by_pc (eh_notify_callback_addr);
+ args.msym = msym;
+ args.return_val = 0;
+
+ recurse++;
+ catch_errors (cover_find_stub_with_shl_get, &args, message,
+ RETURN_MASK_ALL);
+ eh_notify_callback_addr = args.return_val;
+ recurse--;
+
+ deprecated_exception_catchpoints_are_fragile = 1;
+
+ if (!eh_notify_callback_addr)
+ {
+ /* We can get here either if there is no plabel in the export list
+ for the main image, or if something strange happened (?) */
+ warning ("Couldn't find a plabel (indirect function label) for the exception callback.");
+ warning ("GDB will not be able to intercept exception events.");
+ return 0;
+ }
+ }
+ else
+ deprecated_exception_catchpoints_are_fragile = 0;
+#endif
+
+ /* Now, look for the breakpointable routine in end.o */
+ /* This should also be available in the SOM symbol dict. if end.o linked in */
+ msym = lookup_minimal_symbol (HP_ACC_EH_break, NULL, NULL);
+ if (msym)
+ {
+ eh_break_addr = SYMBOL_VALUE_ADDRESS (msym);
+ hp_cxx_exception_support = 1;
+ }
+ else
+ {
+ warning ("Unable to find exception callback routine to set breakpoint (%s).", HP_ACC_EH_break);
+ warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
+ warning ("GDB will be unable to intercept exception events.");
+ eh_break_addr = 0;
+ return 0;
+ }
+
+ /* Next look for the catch enable flag provided in end.o */
+ sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
+ VAR_DOMAIN, 0, (struct symtab **) NULL);
+ if (sym) /* sometimes present in debug info */
+ {
+ eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (sym);
+ hp_cxx_exception_support = 1;
+ }
+ else
+ /* otherwise look in SOM symbol dict. */
+ {
+ msym = lookup_minimal_symbol (HP_ACC_EH_catch_catch, NULL, NULL);
+ if (msym)
+ {
+ eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (msym);
+ hp_cxx_exception_support = 1;
+ }
+ else
+ {
+ warning ("Unable to enable interception of exception catches.");
+ warning ("Executable may not have been compiled debuggable with HP aCC.");
+ warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
+ return 0;
+ }
+ }
+
+ /* Next look for the catch enable flag provided end.o */
+ sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
+ VAR_DOMAIN, 0, (struct symtab **) NULL);
+ if (sym) /* sometimes present in debug info */
+ {
+ eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (sym);
+ hp_cxx_exception_support = 1;
+ }
+ else
+ /* otherwise look in SOM symbol dict. */
+ {
+ msym = lookup_minimal_symbol (HP_ACC_EH_catch_throw, NULL, NULL);
+ if (msym)
+ {
+ eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (msym);
+ hp_cxx_exception_support = 1;
+ }
else
- fsr[i] = tmp + i * 4;
+ {
+ warning ("Unable to enable interception of exception throws.");
+ warning ("Executable may not have been compiled debuggable with HP aCC.");
+ warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
+ return 0;
+ }
}
+
+ /* Set the flags */
+ hp_cxx_exception_support = 2; /* everything worked so far */
+ hp_cxx_exception_support_initialized = 1;
+ deprecated_exception_support_initialized = 1;
+
+ return 1;
}
-/* For hppa64_hpux_frame_saved_pc_in_sigtramp,
- hppa64_hpux_frame_base_before_sigtramp and
- hppa64_hpux_frame_find_saved_regs_in_sigtramp:
+/* Target operation for enabling or disabling interception of
+ exception events.
+ KIND is either EX_EVENT_THROW or EX_EVENT_CATCH
+ ENABLE is either 0 (disable) or 1 (enable).
+ Return value is NULL if no support found;
+ -1 if something went wrong,
+ or a pointer to a symtab/line struct if the breakpointable
+ address was found. */
- These functions are the PA64 ABI equivalents of the 32bits counterparts
- above. See the comments there.
+struct symtab_and_line *
+child_enable_exception_callback (enum exception_event_kind kind, int enable)
+{
+ char buf[4];
- For PA64, the save_state structure is at an offset of 24 32-bit words
- from the sigcontext structure. The 64 bit general registers are at an
- offset of 640 bytes from the beginning of the save_state structure,
- and the floating pointer register are at an offset of 256 bytes from
- the beginning of the save_state structure. */
+ if (!deprecated_exception_support_initialized
+ || !hp_cxx_exception_support_initialized)
+ if (!initialize_hp_cxx_exception_support ())
+ return NULL;
-void
-hppa64_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi, CORE_ADDR *tmp)
+ switch (hp_cxx_exception_support)
+ {
+ case 0:
+ /* Assuming no HP support at all */
+ return NULL;
+ case 1:
+ /* HP support should be present, but something went wrong */
+ return (struct symtab_and_line *) -1; /* yuck! */
+ /* there may be other cases in the future */
+ }
+
+ /* Set the EH hook to point to the callback routine */
+ store_unsigned_integer (buf, 4, enable ? eh_notify_callback_addr : 0); /* FIXME 32x64 problem */
+ /* pai: (temp) FIXME should there be a pack operation first? */
+ if (target_write_memory (eh_notify_hook_addr, buf, 4)) /* FIXME 32x64 problem */
+ {
+ warning ("Could not write to target memory for exception event callback.");
+ warning ("Interception of exception events may not work.");
+ return (struct symtab_and_line *) -1;
+ }
+ if (enable)
+ {
+ /* Ensure that __d_pid is set up correctly -- end.c code checks this. :-( */
+ if (PIDGET (inferior_ptid) > 0)
+ {
+ if (setup_d_pid_in_inferior ())
+ return (struct symtab_and_line *) -1;
+ }
+ else
+ {
+ warning ("Internal error: Invalid inferior pid? Cannot intercept exception events.");
+ return (struct symtab_and_line *) -1;
+ }
+ }
+
+ switch (kind)
+ {
+ case EX_EVENT_THROW:
+ store_unsigned_integer (buf, 4, enable ? 1 : 0);
+ if (target_write_memory (eh_catch_throw_addr, buf, 4)) /* FIXME 32x64? */
+ {
+ warning ("Couldn't enable exception throw interception.");
+ return (struct symtab_and_line *) -1;
+ }
+ break;
+ case EX_EVENT_CATCH:
+ store_unsigned_integer (buf, 4, enable ? 1 : 0);
+ if (target_write_memory (eh_catch_catch_addr, buf, 4)) /* FIXME 32x64? */
+ {
+ warning ("Couldn't enable exception catch interception.");
+ return (struct symtab_and_line *) -1;
+ }
+ break;
+ default:
+ error ("Request to enable unknown or unsupported exception event.");
+ }
+
+ /* Copy break address into new sal struct, malloc'ing if needed. */
+ if (!break_callback_sal)
+ {
+ break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
+ }
+ init_sal (break_callback_sal);
+ break_callback_sal->symtab = NULL;
+ break_callback_sal->pc = eh_break_addr;
+ break_callback_sal->line = 0;
+ break_callback_sal->end = eh_break_addr;
+
+ return break_callback_sal;
+}
+
+/* Record some information about the current exception event */
+static struct exception_event_record current_ex_event;
+/* Convenience struct */
+static struct symtab_and_line null_symtab_and_line =
+{NULL, 0, 0, 0};
+
+/* Report current exception event. Returns a pointer to a record
+ that describes the kind of the event, where it was thrown from,
+ and where it will be caught. More information may be reported
+ in the future */
+struct exception_event_record *
+child_get_current_exception_event (void)
{
- *tmp = read_memory_integer
- (get_frame_base (fi) + (24 * 4) + 640 + (33 * 8), 8);
+ CORE_ADDR event_kind;
+ CORE_ADDR throw_addr;
+ CORE_ADDR catch_addr;
+ struct frame_info *fi, *curr_frame;
+ int level = 1;
+
+ curr_frame = get_current_frame ();
+ if (!curr_frame)
+ return (struct exception_event_record *) NULL;
+
+ /* Go up one frame to __d_eh_notify_callback, because at the
+ point when this code is executed, there's garbage in the
+ arguments of __d_eh_break. */
+ fi = find_relative_frame (curr_frame, &level);
+ if (level != 0)
+ return (struct exception_event_record *) NULL;
+
+ select_frame (fi);
+
+ /* Read in the arguments */
+ /* __d_eh_notify_callback() is called with 3 arguments:
+ 1. event kind catch or throw
+ 2. the target address if known
+ 3. a flag -- not sure what this is. pai/1997-07-17 */
+ event_kind = read_register (HPPA_ARG0_REGNUM);
+ catch_addr = read_register (HPPA_ARG1_REGNUM);
+
+ /* Now go down to a user frame */
+ /* For a throw, __d_eh_break is called by
+ __d_eh_notify_callback which is called by
+ __notify_throw which is called
+ from user code.
+ For a catch, __d_eh_break is called by
+ __d_eh_notify_callback which is called by
+ <stackwalking stuff> which is called by
+ __throw__<stuff> or __rethrow_<stuff> which is called
+ from user code. */
+ /* FIXME: Don't use such magic numbers; search for the frames */
+ level = (event_kind == EX_EVENT_THROW) ? 3 : 4;
+ fi = find_relative_frame (curr_frame, &level);
+ if (level != 0)
+ return (struct exception_event_record *) NULL;
+
+ select_frame (fi);
+ throw_addr = get_frame_pc (fi);
+
+ /* Go back to original (top) frame */
+ select_frame (curr_frame);
+
+ current_ex_event.kind = (enum exception_event_kind) event_kind;
+ current_ex_event.throw_sal = find_pc_line (throw_addr, 1);
+ current_ex_event.catch_sal = find_pc_line (catch_addr, 1);
+
+ return &current_ex_event;
}
-void
-hppa64_hpux_frame_base_before_sigtramp (struct frame_info *fi,
- CORE_ADDR *tmp)
+/* Signal frames. */
+struct hppa_hpux_sigtramp_unwind_cache
+{
+ CORE_ADDR base;
+ struct trad_frame_saved_reg *saved_regs;
+};
+
+static int hppa_hpux_tramp_reg[] = {
+ HPPA_SAR_REGNUM,
+ HPPA_PCOQ_HEAD_REGNUM,
+ HPPA_PCSQ_HEAD_REGNUM,
+ HPPA_PCOQ_TAIL_REGNUM,
+ HPPA_PCSQ_TAIL_REGNUM,
+ HPPA_EIEM_REGNUM,
+ HPPA_IIR_REGNUM,
+ HPPA_ISR_REGNUM,
+ HPPA_IOR_REGNUM,
+ HPPA_IPSW_REGNUM,
+ -1,
+ HPPA_SR4_REGNUM,
+ HPPA_SR4_REGNUM + 1,
+ HPPA_SR4_REGNUM + 2,
+ HPPA_SR4_REGNUM + 3,
+ HPPA_SR4_REGNUM + 4,
+ HPPA_SR4_REGNUM + 5,
+ HPPA_SR4_REGNUM + 6,
+ HPPA_SR4_REGNUM + 7,
+ HPPA_RCR_REGNUM,
+ HPPA_PID0_REGNUM,
+ HPPA_PID1_REGNUM,
+ HPPA_CCR_REGNUM,
+ HPPA_PID2_REGNUM,
+ HPPA_PID3_REGNUM,
+ HPPA_TR0_REGNUM,
+ HPPA_TR0_REGNUM + 1,
+ HPPA_TR0_REGNUM + 2,
+ HPPA_CR27_REGNUM
+};
+
+static struct hppa_hpux_sigtramp_unwind_cache *
+hppa_hpux_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_cache)
+
{
- *tmp = read_memory_integer
- (get_frame_base (fi) + (24 * 4) + 640 + (30 * 8), 8);
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ struct hppa_hpux_sigtramp_unwind_cache *info;
+ unsigned int flag;
+ CORE_ADDR sp, scptr;
+ int i, incr, off, szoff;
+
+ if (*this_cache)
+ return *this_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct hppa_hpux_sigtramp_unwind_cache);
+ *this_cache = info;
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+ sp = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+
+ scptr = sp - 1352;
+ off = scptr;
+
+ /* See /usr/include/machine/save_state.h for the structure of the save_state_t
+ structure. */
+
+ flag = read_memory_unsigned_integer(scptr, 4);
+
+ if (!(flag & 0x40))
+ {
+ /* Narrow registers. */
+ off = scptr + offsetof (save_state_t, ss_narrow);
+ incr = 4;
+ szoff = 0;
+ }
+ else
+ {
+ /* Wide registers. */
+ off = scptr + offsetof (save_state_t, ss_wide) + 8;
+ incr = 8;
+ szoff = (tdep->bytes_per_address == 4 ? 4 : 0);
+ }
+
+ for (i = 1; i < 32; i++)
+ {
+ info->saved_regs[HPPA_R0_REGNUM + i].addr = off + szoff;
+ off += incr;
+ }
+
+ for (i = 0;
+ i < sizeof(hppa_hpux_tramp_reg) / sizeof(hppa_hpux_tramp_reg[0]);
+ i++)
+ {
+ if (hppa_hpux_tramp_reg[i] > 0)
+ info->saved_regs[hppa_hpux_tramp_reg[i]].addr = off + szoff;
+ off += incr;
+ }
+
+ /* TODO: fp regs */
+
+ info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+
+ return info;
}
-void
-hppa64_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
- CORE_ADDR *fsr)
+static void
+hppa_hpux_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
{
- int i;
- const CORE_ADDR tmp1 = get_frame_base (fi) + (24 * 4) + 640;
- const CORE_ADDR tmp2 = get_frame_base (fi) + (24 * 4) + 256;
+ struct hppa_hpux_sigtramp_unwind_cache *info
+ = hppa_hpux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ *this_id = frame_id_build (info->base, frame_pc_unwind (next_frame));
+}
+
+static void
+hppa_hpux_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 *valuep)
+{
+ struct hppa_hpux_sigtramp_unwind_cache *info
+ = hppa_hpux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind hppa_hpux_sigtramp_frame_unwind = {
+ SIGTRAMP_FRAME,
+ hppa_hpux_sigtramp_frame_this_id,
+ hppa_hpux_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+hppa_hpux_sigtramp_unwind_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
+ if (name && strcmp(name, "_sigreturn") == 0)
+ return &hppa_hpux_sigtramp_frame_unwind;
- for (i = 0; i < NUM_REGS; i++)
+ return NULL;
+}
+
+static CORE_ADDR
+hppa_hpux_som_find_global_pointer (struct value *function)
+{
+ CORE_ADDR faddr;
+
+ faddr = value_as_address (function);
+
+ /* Is this a plabel? If so, dereference it to get the gp value. */
+ if (faddr & 2)
{
- if (i == SP_REGNUM)
- fsr[SP_REGNUM] = read_memory_integer (tmp1 + SP_REGNUM * 8, 8);
- else if (i >= FP0_REGNUM)
- fsr[i] = tmp2 + (i - FP0_REGNUM) * 8;
+ int status;
+ char buf[4];
+
+ faddr &= ~3;
+
+ status = target_read_memory (faddr + 4, buf, sizeof (buf));
+ if (status == 0)
+ return extract_unsigned_integer (buf, sizeof (buf));
+ }
+
+ return som_solib_get_got_by_pc (faddr);
+}
+
+static CORE_ADDR
+hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
+ CORE_ADDR funcaddr, int using_gcc,
+ struct value **args, int nargs,
+ struct type *value_type,
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+{
+ /* FIXME: tausq/2004-06-09: This needs much more testing. It is broken
+ for pa64, but we should be able to get it to work with a little bit
+ of work. gdb-6.1 has a lot of code to handle various cases; I've tried to
+ simplify it and avoid compile-time conditionals. */
+
+ /* On HPUX, functions in the main executable and in libraries can be located
+ in different spaces. In order for us to be able to select the right
+ space for the function call, we need to go through an instruction seqeunce
+ to select the right space for the target function, call it, and then
+ restore the space on return.
+
+ There are two helper routines that can be used for this task -- if
+ an application is linked with gcc, it will contain a __gcc_plt_call
+ helper function. __gcc_plt_call, when passed the entry point of an
+ import stub, will do the necessary space setting/restoration for the
+ target function.
+
+ For programs that are compiled/linked with the HP compiler, a similar
+ function called __d_plt_call exists; __d_plt_call expects a PLABEL instead
+ of an import stub as an argument.
+
+ // *INDENT-OFF*
+ To summarize, the call flow is:
+ current function -> dummy frame -> __gcc_plt_call (import stub)
+ -> target function
+ or
+ current function -> dummy frame -> __d_plt_call (plabel)
+ -> target function
+ // *INDENT-ON*
+
+ In general the "funcaddr" argument passed to push_dummy_code is the actual
+ entry point of the target function. For __gcc_plt_call, we need to
+ locate the import stub for the corresponding function. Failing that,
+ we construct a dummy "import stub" on the stack to pass as an argument.
+ For __d_plt_call, we similarly synthesize a PLABEL on the stack to
+ pass to the helper function.
+
+ An additional twist is that, in order for us to restore the space register
+ to its starting state, we need __gcc_plt_call/__d_plt_call to return
+ to the instruction where we started the call. However, if we put
+ the breakpoint there, gdb will complain because it will find two
+ frames on the stack with the same (sp, pc) (with the dummy frame in
+ between). Currently, we set the return pointer to (pc - 4) of the
+ current function. FIXME: This is not an ideal solution; possibly if the
+ current pc is at the beginning of a page, this will cause a page fault.
+ Need to understand this better and figure out a better way to fix it. */
+
+ struct minimal_symbol *sym;
+
+ /* Nonzero if we will use GCC's PLT call routine. This routine must be
+ passed an import stub, not a PLABEL. It is also necessary to get %r19
+ before performing the call. (This is done by push_dummy_call.) */
+ int use_gcc_plt_call = 1;
+
+ /* See if __gcc_plt_call is available; if not we will use the HP version
+ instead. */
+ sym = lookup_minimal_symbol ("__gcc_plt_call", NULL, NULL);
+ if (sym == NULL)
+ use_gcc_plt_call = 0;
+
+ /* If using __gcc_plt_call, we need to make sure we pass in an import
+ stub. funcaddr can be pointing to an export stub or a real function,
+ so we try to resolve it to the import stub. */
+ if (use_gcc_plt_call)
+ {
+ struct objfile *objfile;
+ struct minimal_symbol *funsym, *stubsym;
+ CORE_ADDR stubaddr = 0;
+
+ funsym = lookup_minimal_symbol_by_pc (funcaddr);
+ if (!funsym)
+ error ("Unable to find symbol for target function.\n");
+
+ ALL_OBJFILES (objfile)
+ {
+ stubsym = lookup_minimal_symbol_solib_trampoline
+ (SYMBOL_LINKAGE_NAME (funsym), objfile);
+
+ if (stubsym)
+ {
+ struct unwind_table_entry *u;
+
+ u = find_unwind_entry (SYMBOL_VALUE (stubsym));
+ if (u == NULL
+ || (u->stub_unwind.stub_type != IMPORT
+ && u->stub_unwind.stub_type != IMPORT_SHLIB))
+ continue;
+
+ stubaddr = SYMBOL_VALUE (stubsym);
+
+ /* If we found an IMPORT stub, then we can stop searching;
+ if we found an IMPORT_SHLIB, we want to continue the search
+ in the hopes that we will find an IMPORT stub. */
+ if (u->stub_unwind.stub_type == IMPORT)
+ break;
+ }
+ }
+
+ if (stubaddr != 0)
+ {
+ /* Argument to __gcc_plt_call is passed in r22. */
+ regcache_cooked_write_unsigned (current_regcache, 22, stubaddr);
+ }
else
- fsr[i] = tmp1 + i * 8;
+ {
+ /* No import stub found; let's synthesize one. */
+
+ /* ldsid %r21, %r1 */
+ write_memory_unsigned_integer (sp, 4, 0x02a010a1);
+ /* mtsp %r1,%sr0 */
+ write_memory_unsigned_integer (sp + 4, 4, 0x00011820);
+ /* be 0(%sr0, %r21) */
+ write_memory_unsigned_integer (sp + 8, 4, 0xe2a00000);
+ /* nop */
+ write_memory_unsigned_integer (sp + 12, 4, 0x08000240);
+
+ regcache_cooked_write_unsigned (current_regcache, 21, funcaddr);
+ regcache_cooked_write_unsigned (current_regcache, 22, sp);
+ }
+
+ /* We set the breakpoint address and r31 to (close to) where the current
+ pc is; when __gcc_plt_call returns, it will restore pcsqh to the
+ current value based on this. The -4 is needed for frame unwinding
+ to work properly -- we need to land in a different function than
+ the current function. */
+ *bp_addr = (read_register (HPPA_PCOQ_HEAD_REGNUM) & ~3) - 4;
+ regcache_cooked_write_unsigned (current_regcache, 31, *bp_addr);
+
+ /* Continue from __gcc_plt_call. */
+ *real_pc = SYMBOL_VALUE (sym);
}
+ else
+ {
+ unsigned int gp;
+
+ /* Use __d_plt_call as a fallback; __d_plt_call expects to be called
+ with a plabel, so we need to build one. */
+
+ sym = lookup_minimal_symbol ("__d_plt_call", NULL, NULL);
+ if (sym == NULL)
+ error("Can't find an address for __d_plt_call or __gcc_plt_call "
+ "trampoline\nSuggest linking executable with -g or compiling "
+ "with gcc.");
+
+ gp = gdbarch_tdep (gdbarch)->find_global_pointer (funcaddr);
+ write_memory_unsigned_integer (sp, 4, funcaddr);
+ write_memory_unsigned_integer (sp + 4, 4, gp);
+
+ /* plabel is passed in r22 */
+ regcache_cooked_write_unsigned (current_regcache, 22, sp);
+ }
+
+ /* Pushed one stack frame, which has to be 64-byte aligned. */
+ sp += 64;
+
+ return sp;
+}
+
+static void
+hppa_hpux_inferior_created (struct target_ops *objfile, int from_tty)
+{
+ /* Some HP-UX related globals to clear when a new "main"
+ symbol file is loaded. HP-specific. */
+ deprecated_hp_som_som_object_present = 0;
+ hp_cxx_exception_support_initialized = 0;
}
static void
hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ if (tdep->bytes_per_address == 4)
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ hppa32_hpux_in_solib_call_trampoline);
+ else
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ hppa64_hpux_in_solib_call_trampoline);
+
+ set_gdbarch_in_solib_return_trampoline (gdbarch,
+ hppa_hpux_in_solib_return_trampoline);
+ set_gdbarch_skip_trampoline_code (gdbarch, hppa_hpux_skip_trampoline_code);
+
+ set_gdbarch_push_dummy_code (gdbarch, hppa_hpux_push_dummy_code);
+ set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+
+ frame_unwind_append_sniffer (gdbarch, hppa_hpux_sigtramp_unwind_sniffer);
+
+ observer_attach_inferior_created (hppa_hpux_inferior_created);
}
static void
hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ tdep->is_elf = 0;
+
+ tdep->find_global_pointer = hppa_hpux_som_find_global_pointer;
hppa_hpux_init_abi (info, gdbarch);
}
static void
hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ tdep->is_elf = 1;
hppa_hpux_init_abi (info, gdbarch);
}
diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c
new file mode 100644
index 00000000000..b6a4f2091a4
--- /dev/null
+++ b/gdb/hppa-linux-nat.c
@@ -0,0 +1,376 @@
+/* Functions specific to running GDB native on HPPA running GNU/Linux.
+
+ Copyright 2004 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 "gdbcore.h"
+#include "regcache.h"
+#include "gdb_string.h"
+#include "inferior.h"
+
+#include <sys/procfs.h>
+#include <sys/ptrace.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43)
+#include <asm/offset.h>
+#else
+#include <asm/offsets.h>
+#endif
+
+#include "hppa-tdep.h"
+
+/* Prototypes for supply_gregset etc. */
+#include "gregset.h"
+
+/* These must match the order of the register names.
+
+ Some sort of lookup table is needed because the offsets associated
+ with the registers are all over the board. */
+
+static const int u_offsets[] =
+ {
+ /* general registers */
+ -1,
+ PT_GR1,
+ PT_GR2,
+ PT_GR3,
+ PT_GR4,
+ PT_GR5,
+ PT_GR6,
+ PT_GR7,
+ PT_GR8,
+ PT_GR9,
+ PT_GR10,
+ PT_GR11,
+ PT_GR12,
+ PT_GR13,
+ PT_GR14,
+ PT_GR15,
+ PT_GR16,
+ PT_GR17,
+ PT_GR18,
+ PT_GR19,
+ PT_GR20,
+ PT_GR21,
+ PT_GR22,
+ PT_GR23,
+ PT_GR24,
+ PT_GR25,
+ PT_GR26,
+ PT_GR27,
+ PT_GR28,
+ PT_GR29,
+ PT_GR30,
+ PT_GR31,
+
+ PT_SAR,
+ PT_IAOQ0,
+ PT_IASQ0,
+ PT_IAOQ1,
+ PT_IASQ1,
+ -1, /* eiem */
+ PT_IIR,
+ PT_ISR,
+ PT_IOR,
+ PT_PSW,
+ -1, /* goto */
+
+ PT_SR4,
+ PT_SR0,
+ PT_SR1,
+ PT_SR2,
+ PT_SR3,
+ PT_SR5,
+ PT_SR6,
+ PT_SR7,
+
+ -1, /* cr0 */
+ -1, /* pid0 */
+ -1, /* pid1 */
+ -1, /* ccr */
+ -1, /* pid2 */
+ -1, /* pid3 */
+ -1, /* cr24 */
+ -1, /* cr25 */
+ -1, /* cr26 */
+ PT_CR27,
+ -1, /* cr28 */
+ -1, /* cr29 */
+ -1, /* cr30 */
+
+ /* Floating point regs. */
+ PT_FR0, PT_FR0 + 4,
+ PT_FR1, PT_FR1 + 4,
+ PT_FR2, PT_FR2 + 4,
+ PT_FR3, PT_FR3 + 4,
+ PT_FR4, PT_FR4 + 4,
+ PT_FR5, PT_FR5 + 4,
+ PT_FR6, PT_FR6 + 4,
+ PT_FR7, PT_FR7 + 4,
+ PT_FR8, PT_FR8 + 4,
+ PT_FR9, PT_FR9 + 4,
+ PT_FR10, PT_FR10 + 4,
+ PT_FR11, PT_FR11 + 4,
+ PT_FR12, PT_FR12 + 4,
+ PT_FR13, PT_FR13 + 4,
+ PT_FR14, PT_FR14 + 4,
+ PT_FR15, PT_FR15 + 4,
+ PT_FR16, PT_FR16 + 4,
+ PT_FR17, PT_FR17 + 4,
+ PT_FR18, PT_FR18 + 4,
+ PT_FR19, PT_FR19 + 4,
+ PT_FR20, PT_FR20 + 4,
+ PT_FR21, PT_FR21 + 4,
+ PT_FR22, PT_FR22 + 4,
+ PT_FR23, PT_FR23 + 4,
+ PT_FR24, PT_FR24 + 4,
+ PT_FR25, PT_FR25 + 4,
+ PT_FR26, PT_FR26 + 4,
+ PT_FR27, PT_FR27 + 4,
+ PT_FR28, PT_FR28 + 4,
+ PT_FR29, PT_FR29 + 4,
+ PT_FR30, PT_FR30 + 4,
+ PT_FR31, PT_FR31 + 4,
+ };
+
+CORE_ADDR
+register_addr (int regno, CORE_ADDR blockend)
+{
+ CORE_ADDR addr;
+
+ if ((unsigned) regno >= NUM_REGS)
+ error ("Invalid register number %d.", regno);
+
+ if (u_offsets[regno] == -1)
+ addr = 0;
+ else
+ {
+ addr = (CORE_ADDR) u_offsets[regno];
+ }
+
+ return addr;
+}
+
+/*
+ * Registers saved in a coredump:
+ * gr0..gr31
+ * sr0..sr7
+ * iaoq0..iaoq1
+ * iasq0..iasq1
+ * sar, iir, isr, ior, ipsw
+ * cr0, cr24..cr31
+ * cr8,9,12,13
+ * cr10, cr15
+ */
+#define GR_REGNUM(_n) (HPPA_R0_REGNUM+_n)
+#define TR_REGNUM(_n) (HPPA_TR0_REGNUM+_n)
+static const int greg_map[] =
+ {
+ GR_REGNUM(0), GR_REGNUM(1), GR_REGNUM(2), GR_REGNUM(3),
+ GR_REGNUM(4), GR_REGNUM(5), GR_REGNUM(6), GR_REGNUM(7),
+ GR_REGNUM(8), GR_REGNUM(9), GR_REGNUM(10), GR_REGNUM(11),
+ GR_REGNUM(12), GR_REGNUM(13), GR_REGNUM(14), GR_REGNUM(15),
+ GR_REGNUM(16), GR_REGNUM(17), GR_REGNUM(18), GR_REGNUM(19),
+ GR_REGNUM(20), GR_REGNUM(21), GR_REGNUM(22), GR_REGNUM(23),
+ GR_REGNUM(24), GR_REGNUM(25), GR_REGNUM(26), GR_REGNUM(27),
+ GR_REGNUM(28), GR_REGNUM(29), GR_REGNUM(30), GR_REGNUM(31),
+
+ HPPA_SR4_REGNUM+1, HPPA_SR4_REGNUM+2, HPPA_SR4_REGNUM+3, HPPA_SR4_REGNUM+4,
+ HPPA_SR4_REGNUM, HPPA_SR4_REGNUM+5, HPPA_SR4_REGNUM+6, HPPA_SR4_REGNUM+7,
+
+ HPPA_PCOQ_HEAD_REGNUM, HPPA_PCOQ_TAIL_REGNUM,
+ HPPA_PCSQ_HEAD_REGNUM, HPPA_PCSQ_TAIL_REGNUM,
+
+ HPPA_SAR_REGNUM, HPPA_IIR_REGNUM, HPPA_ISR_REGNUM, HPPA_IOR_REGNUM,
+ HPPA_IPSW_REGNUM, HPPA_RCR_REGNUM,
+
+ TR_REGNUM(0), TR_REGNUM(1), TR_REGNUM(2), TR_REGNUM(3),
+ TR_REGNUM(4), TR_REGNUM(5), TR_REGNUM(6), TR_REGNUM(7),
+
+ HPPA_PID0_REGNUM, HPPA_PID1_REGNUM, HPPA_PID2_REGNUM, HPPA_PID3_REGNUM,
+ HPPA_CCR_REGNUM, HPPA_EIEM_REGNUM,
+ };
+
+
+
+/* Fetch one register. */
+
+static void
+fetch_register (int regno)
+{
+ int tid;
+ int val;
+
+ if (CANNOT_FETCH_REGISTER (regno))
+ {
+ regcache_raw_supply (current_regcache, regno, NULL);
+ return;
+ }
+
+ /* GNU/Linux LWP ID's are process ID's. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+
+ errno = 0;
+ val = ptrace (PTRACE_PEEKUSER, tid, register_addr (regno, 0), 0);
+ if (errno != 0)
+ error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno),
+ regno, safe_strerror (errno));
+
+ regcache_raw_supply (current_regcache, regno, &val);
+}
+
+/* Store one register. */
+
+static void
+store_register (int regno)
+{
+ int tid;
+ int val;
+
+ if (CANNOT_STORE_REGISTER (regno))
+ return;
+
+ /* GNU/Linux LWP ID's are process ID's. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+
+ errno = 0;
+ regcache_raw_collect (current_regcache, regno, &val);
+ ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
+ if (errno != 0)
+ error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno),
+ regno, safe_strerror (errno));
+}
+
+/* Fetch registers from the child process. Fetch all registers if
+ regno == -1, otherwise fetch all general registers or all floating
+ point registers depending upon the value of regno. */
+
+void
+fetch_inferior_registers (int regno)
+{
+ if (-1 == regno)
+ {
+ for (regno = 0; regno < NUM_REGS; regno++)
+ fetch_register (regno);
+ }
+ else
+ {
+ fetch_register (regno);
+ }
+}
+
+/* Store registers back into the inferior. Store all registers if
+ regno == -1, otherwise store all general registers or all floating
+ point registers depending upon the value of regno. */
+
+void
+store_inferior_registers (int regno)
+{
+ if (-1 == regno)
+ {
+ for (regno = 0; regno < NUM_REGS; regno++)
+ store_register (regno);
+ }
+ else
+ {
+ store_register (regno);
+ }
+}
+
+/* Fill GDB's register array with the general-purpose register values
+ in *gregsetp. */
+
+void
+supply_gregset (gdb_gregset_t *gregsetp)
+{
+ int i;
+ greg_t *regp = (elf_greg_t *) gregsetp;
+
+ for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++)
+ {
+ int regno = greg_map[i];
+ regcache_raw_supply (current_regcache, regno, regp);
+ }
+}
+
+/* Fill register regno (if it is a general-purpose register) in
+ *gregsetp with the appropriate value from GDB's register array.
+ If regno is -1, do this for all registers. */
+
+void
+fill_gregset (gdb_gregset_t *gregsetp, int regno)
+{
+ int i;
+
+ for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++)
+ {
+ int mregno = greg_map[i];
+
+ if (regno == -1 || regno == mregno)
+ {
+ regcache_raw_collect(current_regcache, mregno, &(*gregsetp)[i]);
+ }
+ }
+}
+
+/* Given a pointer to a floating point register set in /proc format
+ (fpregset_t *), unpack the register contents and supply them as gdb's
+ idea of the current floating point register values. */
+
+void
+supply_fpregset (gdb_fpregset_t *fpregsetp)
+{
+ int regi;
+ char *from;
+
+ for (regi = 0; regi <= 31; regi++)
+ {
+ from = (char *) &((*fpregsetp)[regi]);
+ regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM, from);
+ regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM + 1,
+ from + 4);
+ }
+}
+
+/* Given a pointer to a floating point register set in /proc format
+ (fpregset_t *), update the register specified by REGNO from gdb's idea
+ of the current floating point register set. If REGNO is -1, update
+ them all. */
+
+void
+fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
+{
+ int i;
+
+ for (i = HPPA_FP0_REGNUM; i < HPPA_FP0_REGNUM + 32 * 2; i++)
+ {
+ /* Gross. fpregset_t is double, registers[x] has single
+ precision reg. */
+ char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
+ if ((i - HPPA_FP0_REGNUM) & 1)
+ to += 4;
+ regcache_raw_collect (current_regcache, i, to);
+ }
+}
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
new file mode 100644
index 00000000000..7f32236274d
--- /dev/null
+++ b/gdb/hppa-linux-tdep.c
@@ -0,0 +1,592 @@
+/* Target-dependent code for GNU/Linux running on PA-RISC, for GDB.
+
+ Copyright 2004 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 "gdbcore.h"
+#include "osabi.h"
+#include "target.h"
+#include "objfiles.h"
+#include "solib-svr4.h"
+#include "glibc-tdep.h"
+#include "frame-unwind.h"
+#include "trad-frame.h"
+#include "dwarf2-frame.h"
+#include "value.h"
+#include "hppa-tdep.h"
+
+#include "elf/common.h"
+
+#if 0
+/* Convert DWARF register number REG to the appropriate register
+ number used by GDB. */
+static int
+hppa_dwarf_reg_to_regnum (int reg)
+{
+ /* registers 0 - 31 are the same in both sets */
+ if (reg < 32)
+ return reg;
+
+ /* dwarf regs 32 to 85 are fpregs 4 - 31 */
+ if (reg >= 32 && reg <= 85)
+ return HPPA_FP4_REGNUM + (reg - 32);
+
+ warning ("Unmapped DWARF Register #%d encountered\n", reg);
+ return -1;
+}
+#endif
+
+static void
+hppa_linux_target_write_pc (CORE_ADDR v, ptid_t ptid)
+{
+ /* Probably this should be done by the kernel, but it isn't. */
+ write_register_pid (HPPA_PCOQ_HEAD_REGNUM, v | 0x3, ptid);
+ write_register_pid (HPPA_PCOQ_TAIL_REGNUM, (v + 4) | 0x3, ptid);
+}
+
+/* An instruction to match. */
+struct insn_pattern
+{
+ unsigned int data; /* See if it matches this.... */
+ unsigned int mask; /* ... with this mask. */
+};
+
+/* See bfd/elf32-hppa.c */
+static struct insn_pattern hppa_long_branch_stub[] = {
+ /* ldil LR'xxx,%r1 */
+ { 0x20200000, 0xffe00000 },
+ /* be,n RR'xxx(%sr4,%r1) */
+ { 0xe0202002, 0xffe02002 },
+ { 0, 0 }
+};
+
+static struct insn_pattern hppa_long_branch_pic_stub[] = {
+ /* b,l .+8, %r1 */
+ { 0xe8200000, 0xffe00000 },
+ /* addil LR'xxx - ($PIC_pcrel$0 - 4), %r1 */
+ { 0x28200000, 0xffe00000 },
+ /* be,n RR'xxxx - ($PIC_pcrel$0 - 8)(%sr4, %r1) */
+ { 0xe0202002, 0xffe02002 },
+ { 0, 0 }
+};
+
+static struct insn_pattern hppa_import_stub[] = {
+ /* addil LR'xxx, %dp */
+ { 0x2b600000, 0xffe00000 },
+ /* ldw RR'xxx(%r1), %r21 */
+ { 0x48350000, 0xffffb000 },
+ /* bv %r0(%r21) */
+ { 0xeaa0c000, 0xffffffff },
+ /* ldw RR'xxx+4(%r1), %r19 */
+ { 0x48330000, 0xffffb000 },
+ { 0, 0 }
+};
+
+static struct insn_pattern hppa_import_pic_stub[] = {
+ /* addil LR'xxx,%r19 */
+ { 0x2a600000, 0xffe00000 },
+ /* ldw RR'xxx(%r1),%r21 */
+ { 0x48350000, 0xffffb000 },
+ /* bv %r0(%r21) */
+ { 0xeaa0c000, 0xffffffff },
+ /* ldw RR'xxx+4(%r1),%r19 */
+ { 0x48330000, 0xffffb000 },
+ { 0, 0 },
+};
+
+static struct insn_pattern hppa_plt_stub[] = {
+ /* b,l 1b, %r20 - 1b is 3 insns before here */
+ { 0xea9f1fdd, 0xffffffff },
+ /* depi 0,31,2,%r20 */
+ { 0xd6801c1e, 0xffffffff },
+ { 0, 0 }
+};
+
+static struct insn_pattern hppa_sigtramp[] = {
+ /* ldi 0, %r25 or ldi 1, %r25 */
+ { 0x34190000, 0xfffffffd },
+ /* ldi __NR_rt_sigreturn, %r20 */
+ { 0x3414015a, 0xffffffff },
+ /* be,l 0x100(%sr2, %r0), %sr0, %r31 */
+ { 0xe4008200, 0xffffffff },
+ /* nop */
+ { 0x08000240, 0xffffffff },
+ { 0, 0 }
+};
+
+#define HPPA_MAX_INSN_PATTERN_LEN (4)
+
+/* Return non-zero if the instructions at PC match the series
+ described in PATTERN, or zero otherwise. PATTERN is an array of
+ 'struct insn_pattern' objects, terminated by an entry whose mask is
+ zero.
+
+ When the match is successful, fill INSN[i] with what PATTERN[i]
+ matched. */
+static int
+insns_match_pattern (CORE_ADDR pc,
+ struct insn_pattern *pattern,
+ unsigned int *insn)
+{
+ int i;
+ CORE_ADDR npc = pc;
+
+ for (i = 0; pattern[i].mask; i++)
+ {
+ char buf[4];
+
+ deprecated_read_memory_nobpt (npc, buf, 4);
+ insn[i] = extract_unsigned_integer (buf, 4);
+ if ((insn[i] & pattern[i].mask) == pattern[i].data)
+ npc += 4;
+ else
+ return 0;
+ }
+ return 1;
+}
+
+static int
+hppa_linux_in_dyncall (CORE_ADDR pc)
+{
+ return pc == hppa_symbol_address("$$dyncall");
+}
+
+/* There are several kinds of "trampolines" that we need to deal with:
+ - long branch stubs: these are inserted by the linker when a branch
+ target is too far away for a branch insn to reach
+ - plt stubs: these should go into the .plt section, so are easy to find
+ - import stubs: used to call from object to shared lib or shared lib to
+ shared lib; these go in regular text sections. In fact the linker tries
+ to put them throughout the code because branches have limited reachability.
+ We use the same mechanism as ppc64 to recognize the stub insn patterns.
+ - $$dyncall: similar to hpux, hppa-linux uses $$dyncall for indirect function
+ calls. $$dyncall is exported by libgcc.a */
+static int
+hppa_linux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ unsigned int insn[HPPA_MAX_INSN_PATTERN_LEN];
+ int r;
+
+ r = in_plt_section (pc, name)
+ || hppa_linux_in_dyncall (pc)
+ || insns_match_pattern (pc, hppa_import_stub, insn)
+ || insns_match_pattern (pc, hppa_import_pic_stub, insn)
+ || insns_match_pattern (pc, hppa_long_branch_stub, insn)
+ || insns_match_pattern (pc, hppa_long_branch_pic_stub, insn);
+
+ return r;
+}
+
+static CORE_ADDR
+hppa_linux_skip_trampoline_code (CORE_ADDR pc)
+{
+ unsigned int insn[HPPA_MAX_INSN_PATTERN_LEN];
+ int dp_rel, pic_rel;
+
+ /* dyncall handles both PLABELs and direct addresses */
+ if (hppa_linux_in_dyncall (pc))
+ {
+ pc = (CORE_ADDR) read_register (22);
+
+ /* PLABELs have bit 30 set; if it's a PLABEL, then dereference it */
+ if (pc & 0x2)
+ pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
+
+ return pc;
+ }
+
+ dp_rel = pic_rel = 0;
+ if ((dp_rel = insns_match_pattern (pc, hppa_import_stub, insn))
+ || (pic_rel = insns_match_pattern (pc, hppa_import_pic_stub, insn)))
+ {
+ /* Extract the target address from the addil/ldw sequence. */
+ pc = hppa_extract_21 (insn[0]) + hppa_extract_14 (insn[1]);
+
+ if (dp_rel)
+ pc += (CORE_ADDR) read_register (27);
+ else
+ pc += (CORE_ADDR) read_register (19);
+
+ /* fallthrough */
+ }
+
+ if (in_plt_section (pc, NULL))
+ {
+ pc = (CORE_ADDR) read_memory_integer (pc, TARGET_PTR_BIT / 8);
+
+ /* if the plt slot has not yet been resolved, the target will
+ be the plt stub */
+ if (in_plt_section (pc, NULL))
+ {
+ /* Sanity check: are we pointing to the plt stub? */
+ if (insns_match_pattern (pc, hppa_plt_stub, insn))
+ {
+ /* this should point to the fixup routine */
+ pc = (CORE_ADDR) read_memory_integer (pc + 8, TARGET_PTR_BIT / 8);
+ }
+ else
+ {
+ error ("Cannot resolve plt stub at 0x%s\n",
+ paddr_nz (pc));
+ pc = 0;
+ }
+ }
+ }
+
+ return pc;
+}
+
+/* Signal frames. */
+
+/* (This is derived from MD_FALLBACK_FRAME_STATE_FOR in gcc.)
+
+ Unfortunately, because of various bugs and changes to the kernel,
+ we have several cases to deal with.
+
+ In 2.4, the signal trampoline is 4 bytes, and pc should point directly at
+ the beginning of the trampoline and struct rt_sigframe.
+
+ In <= 2.6.5-rc2-pa3, the signal trampoline is 9 bytes, and pc points at
+ the 4th word in the trampoline structure. This is wrong, it should point
+ at the 5th word. This is fixed in 2.6.5-rc2-pa4.
+
+ To detect these cases, we first take pc, align it to 64-bytes
+ to get the beginning of the signal frame, and then check offsets 0, 4
+ and 5 to see if we found the beginning of the trampoline. This will
+ tell us how to locate the sigcontext structure.
+
+ Note that with a 2.4 64-bit kernel, the signal context is not properly
+ passed back to userspace so the unwind will not work correctly. */
+static CORE_ADDR
+hppa_linux_sigtramp_find_sigcontext (CORE_ADDR pc)
+{
+ unsigned int dummy[HPPA_MAX_INSN_PATTERN_LEN];
+ int offs = 0;
+ int try;
+ /* offsets to try to find the trampoline */
+ static int pcoffs[] = { 0, 4*4, 5*4 };
+ /* offsets to the rt_sigframe structure */
+ static int sfoffs[] = { 4*4, 10*4, 10*4 };
+ CORE_ADDR sp;
+
+ /* Most of the time, this will be correct. The one case when this will
+ fail is if the user defined an alternate stack, in which case the
+ beginning of the stack will not be align_down (pc, 64). */
+ sp = align_down (pc, 64);
+
+ /* rt_sigreturn trampoline:
+ 3419000x ldi 0, %r25 or ldi 1, %r25 (x = 0 or 2)
+ 3414015a ldi __NR_rt_sigreturn, %r20
+ e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
+ 08000240 nop */
+
+ for (try = 0; try < ARRAY_SIZE (pcoffs); try++)
+ {
+ if (insns_match_pattern (sp + pcoffs[try], hppa_sigtramp, dummy))
+ {
+ offs = sfoffs[try];
+ break;
+ }
+ }
+
+ if (offs == 0)
+ {
+ if (insns_match_pattern (pc, hppa_sigtramp, dummy))
+ {
+ /* sigaltstack case: we have no way of knowing which offset to
+ use in this case; default to new kernel handling. If this is
+ wrong the unwinding will fail. */
+ try = 2;
+ sp = pc - pcoffs[try];
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ /* sp + sfoffs[try] points to a struct rt_sigframe, which contains
+ a struct siginfo and a struct ucontext. struct ucontext contains
+ a struct sigcontext. Return an offset to this sigcontext here. Too
+ bad we cannot include system specific headers :-(.
+ sizeof(struct siginfo) == 128
+ offsetof(struct ucontext, uc_mcontext) == 24. */
+ return sp + sfoffs[try] + 128 + 24;
+}
+
+struct hppa_linux_sigtramp_unwind_cache
+{
+ CORE_ADDR base;
+ struct trad_frame_saved_reg *saved_regs;
+};
+
+static struct hppa_linux_sigtramp_unwind_cache *
+hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_cache)
+{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct hppa_linux_sigtramp_unwind_cache *info;
+ CORE_ADDR pc, scptr;
+ int i;
+
+ if (*this_cache)
+ return *this_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct hppa_linux_sigtramp_unwind_cache);
+ *this_cache = info;
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+ pc = frame_pc_unwind (next_frame);
+ scptr = hppa_linux_sigtramp_find_sigcontext (pc);
+
+ /* structure of struct sigcontext:
+
+ struct sigcontext {
+ unsigned long sc_flags;
+ unsigned long sc_gr[32];
+ unsigned long long sc_fr[32];
+ unsigned long sc_iasq[2];
+ unsigned long sc_iaoq[2];
+ unsigned long sc_sar; */
+
+ /* Skip sc_flags. */
+ scptr += 4;
+
+ /* GR[0] is the psw, we don't restore that. */
+ scptr += 4;
+
+ /* General registers. */
+ for (i = 1; i < 32; i++)
+ {
+ info->saved_regs[HPPA_R0_REGNUM + i].addr = scptr;
+ scptr += 4;
+ }
+
+ /* Pad. */
+ scptr += 4;
+
+ /* FP regs; FP0-3 are not restored. */
+ scptr += (8 * 4);
+
+ for (i = 4; i < 32; i++)
+ {
+ info->saved_regs[HPPA_FP0_REGNUM + (i * 2)].addr = scptr;
+ scptr += 4;
+ info->saved_regs[HPPA_FP0_REGNUM + (i * 2) + 1].addr = scptr;
+ scptr += 4;
+ }
+
+ /* IASQ/IAOQ. */
+ info->saved_regs[HPPA_PCSQ_HEAD_REGNUM].addr = scptr;
+ scptr += 4;
+ info->saved_regs[HPPA_PCSQ_TAIL_REGNUM].addr = scptr;
+ scptr += 4;
+
+ info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = scptr;
+ scptr += 4;
+ info->saved_regs[HPPA_PCOQ_TAIL_REGNUM].addr = scptr;
+ scptr += 4;
+
+ info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+
+ return info;
+}
+
+static void
+hppa_linux_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
+{
+ struct hppa_linux_sigtramp_unwind_cache *info
+ = hppa_linux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ *this_id = frame_id_build (info->base, frame_pc_unwind (next_frame));
+}
+
+static void
+hppa_linux_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 *valuep)
+{
+ struct hppa_linux_sigtramp_unwind_cache *info
+ = hppa_linux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind hppa_linux_sigtramp_frame_unwind = {
+ SIGTRAMP_FRAME,
+ hppa_linux_sigtramp_frame_this_id,
+ hppa_linux_sigtramp_frame_prev_register
+};
+
+/* hppa-linux always uses "new-style" rt-signals. The signal handler's return
+ address should point to a signal trampoline on the stack. The signal
+ trampoline is embedded in a rt_sigframe structure that is aligned on
+ the stack. We take advantage of the fact that sp must be 64-byte aligned,
+ and the trampoline is small, so by rounding down the trampoline address
+ we can find the beginning of the struct rt_sigframe. */
+static const struct frame_unwind *
+hppa_linux_sigtramp_unwind_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+
+ if (hppa_linux_sigtramp_find_sigcontext (pc))
+ return &hppa_linux_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
+/* Attempt to find (and return) the global pointer for the given
+ function.
+
+ This is a rather nasty bit of code searchs for the .dynamic section
+ in the objfile corresponding to the pc of the function we're trying
+ to call. Once it finds the addresses at which the .dynamic section
+ lives in the child process, it scans the Elf32_Dyn entries for a
+ DT_PLTGOT tag. If it finds one of these, the corresponding
+ d_un.d_ptr value is the global pointer. */
+
+static CORE_ADDR
+hppa_linux_find_global_pointer (struct value *function)
+{
+ struct obj_section *faddr_sect;
+ CORE_ADDR faddr;
+
+ faddr = value_as_address (function);
+
+ /* Is this a plabel? If so, dereference it to get the gp value. */
+ if (faddr & 2)
+ {
+ int status;
+ char buf[4];
+
+ faddr &= ~3;
+
+ status = target_read_memory (faddr + 4, buf, sizeof (buf));
+ if (status == 0)
+ return extract_unsigned_integer (buf, sizeof (buf));
+ }
+
+ /* If the address is in the plt section, then the real function hasn't
+ yet been fixed up by the linker so we cannot determine the gp of
+ that function. */
+ if (in_plt_section (faddr, NULL))
+ return 0;
+
+ faddr_sect = find_pc_section (faddr);
+ if (faddr_sect != NULL)
+ {
+ struct obj_section *osect;
+
+ ALL_OBJFILE_OSECTIONS (faddr_sect->objfile, osect)
+ {
+ if (strcmp (osect->the_bfd_section->name, ".dynamic") == 0)
+ break;
+ }
+
+ if (osect < faddr_sect->objfile->sections_end)
+ {
+ CORE_ADDR addr;
+
+ addr = osect->addr;
+ while (addr < osect->endaddr)
+ {
+ int status;
+ LONGEST tag;
+ char buf[4];
+
+ status = target_read_memory (addr, buf, sizeof (buf));
+ if (status != 0)
+ break;
+ tag = extract_signed_integer (buf, sizeof (buf));
+
+ if (tag == DT_PLTGOT)
+ {
+ CORE_ADDR global_pointer;
+
+ status = target_read_memory (addr + 4, buf, sizeof (buf));
+ if (status != 0)
+ break;
+ global_pointer = extract_unsigned_integer (buf, sizeof (buf));
+
+ /* The payoff... */
+ return global_pointer;
+ }
+
+ if (tag == DT_NULL)
+ break;
+
+ addr += 8;
+ }
+ }
+ }
+ return 0;
+}
+
+/* Forward declarations. */
+extern initialize_file_ftype _initialize_hppa_linux_tdep;
+
+static void
+hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* GNU/Linux is always ELF. */
+ tdep->is_elf = 1;
+
+ tdep->find_global_pointer = hppa_linux_find_global_pointer;
+
+ set_gdbarch_write_pc (gdbarch, hppa_linux_target_write_pc);
+
+ frame_unwind_append_sniffer (gdbarch, hppa_linux_sigtramp_unwind_sniffer);
+
+ /* GNU/Linux uses SVR4-style shared libraries. */
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, hppa_linux_in_solib_call_trampoline);
+ set_gdbarch_skip_trampoline_code
+ (gdbarch, hppa_linux_skip_trampoline_code);
+
+ /* GNU/Linux uses the dynamic linker included in the GNU C Library. */
+ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
+
+ /* On hppa-linux, currently, sizeof(long double) == 8. There has been
+ some discussions to support 128-bit long double, but it requires some
+ more work in gcc and glibc first. */
+ set_gdbarch_long_double_bit (gdbarch, 64);
+
+#if 0
+ /* Dwarf-2 unwinding support. Not yet working. */
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, hppa_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, hppa_dwarf_reg_to_regnum);
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+ frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
+#endif
+}
+
+void
+_initialize_hppa_linux_tdep (void)
+{
+ gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_LINUX, hppa_linux_init_abi);
+}
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 432507169bb..1209584e93e 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -25,150 +25,53 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "frame.h"
#include "bfd.h"
#include "inferior.h"
-#include "value.h"
#include "regcache.h"
#include "completer.h"
-#include "language.h"
#include "osabi.h"
#include "gdb_assert.h"
-#include "infttrace.h"
#include "arch-utils.h"
/* For argument passing to the inferior */
#include "symtab.h"
-#include "infcall.h"
#include "dis-asm.h"
#include "trad-frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <dl.h>
-#include <sys/param.h>
-#include <signal.h>
-
-#include <sys/ptrace.h>
-#include <machine/save_state.h>
-
-#ifdef COFF_ENCAPSULATE
-#include "a.out.encap.h"
-#else
-#endif
-
-/*#include <sys/user.h> After a.out.h */
-#include <sys/file.h>
-#include "gdb_stat.h"
-#include "gdb_wait.h"
-
#include "gdbcore.h"
#include "gdbcmd.h"
-#include "target.h"
-#include "symfile.h"
#include "objfiles.h"
#include "hppa-tdep.h"
+static int hppa_debug = 0;
+
/* Some local constants. */
static const int hppa32_num_regs = 128;
static const int hppa64_num_regs = 96;
+/* hppa-specific object data -- unwind and solib info.
+ TODO/maybe: think about splitting this into two parts; the unwind data is
+ common to all hppa targets, but is only used in this file; we can register
+ that separately and make this static. The solib data is probably hpux-
+ specific, so we can create a separate extern objfile_data that is registered
+ by hppa-hpux-tdep.c and shared with pa64solib.c and somsolib.c. */
+const struct objfile_data *hppa_objfile_priv_data = NULL;
+
/* 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
-/* Define offsets into the call dummy for the _sr4export address.
- See comments related to CALL_DUMMY for more info. */
-#define SR4EXPORT_LDIL_OFFSET (INSTRUCTION_SIZE * 12)
-#define SR4EXPORT_LDO_OFFSET (INSTRUCTION_SIZE * 13)
-
-/* To support detection of the pseudo-initial frame
- that threads have. */
-#define THREAD_INITIAL_FRAME_SYMBOL "__pthread_exit"
-#define THREAD_INITIAL_FRAME_SYM_LEN sizeof(THREAD_INITIAL_FRAME_SYMBOL)
-
/* Sizes (in bytes) of the native unwind entries. */
#define UNWIND_ENTRY_SIZE 16
#define STUB_UNWIND_ENTRY_SIZE 8
-static int get_field (unsigned word, int from, int to);
-
-static int extract_5_load (unsigned int);
-
-static unsigned extract_5R_store (unsigned int);
-
-static unsigned extract_5r_store (unsigned int);
-
-struct unwind_table_entry *find_unwind_entry (CORE_ADDR);
-
-static int extract_17 (unsigned int);
-
-static int extract_21 (unsigned);
-
-static int extract_14 (unsigned);
-
-static void unwind_command (char *, int);
-
-static int low_sign_extend (unsigned int, unsigned int);
-
-static int sign_extend (unsigned int, unsigned int);
-
-static int hppa_alignof (struct type *);
-
-static int prologue_inst_adjust_sp (unsigned long);
-
-static int is_branch (unsigned long);
-
-static int inst_saves_gr (unsigned long);
-
-static int inst_saves_fr (unsigned long);
-
-static int compare_unwind_entries (const void *, const void *);
-
-static void read_unwind_info (struct objfile *);
-
-static void internalize_unwinds (struct objfile *,
- struct unwind_table_entry *,
- asection *, unsigned int,
- unsigned int, CORE_ADDR);
-static void record_text_segment_lowaddr (bfd *, asection *, void *);
/* FIXME: brobecker 2002-11-07: We will likely be able to make the
following functions static, once we hppa is partially multiarched. */
-int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
-CORE_ADDR hppa_skip_prologue (CORE_ADDR pc);
-CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR pc);
-int hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name);
-int hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name);
-int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
int hppa_pc_requires_run_before_use (CORE_ADDR pc);
int hppa_instruction_nullified (void);
-int hppa_cannot_store_register (int regnum);
-CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
-CORE_ADDR hppa_target_read_pc (ptid_t ptid);
-void hppa_target_write_pc (CORE_ADDR v, ptid_t ptid);
-
-typedef struct
- {
- struct minimal_symbol *msym;
- CORE_ADDR solib_handle;
- CORE_ADDR return_val;
- }
-args_for_find_stub;
-
-static int cover_find_stub_with_shl_get (void *);
-
-static int is_pa_2 = 0; /* False */
-
-/* This is declared in symtab.c; set to 1 in hp-symtab-read.c */
-extern int hp_som_som_object_present;
-
-/* In breakpoint.c */
-extern int exception_catchpoints_are_fragile;
/* Handle 32/64-bit struct return conventions. */
@@ -177,22 +80,12 @@ hppa32_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
void *readbuf, const void *writebuf)
{
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
- {
- if (readbuf != NULL)
- regcache_cooked_read_part (regcache, FP4_REGNUM, 0,
- TYPE_LENGTH (type), readbuf);
- if (writebuf != NULL)
- regcache_cooked_write_part (regcache, FP4_REGNUM, 0,
- TYPE_LENGTH (type), writebuf);
- return RETURN_VALUE_REGISTER_CONVENTION;
- }
if (TYPE_LENGTH (type) <= 2 * 4)
{
/* The value always lives in the right hand end of the register
(or register pair)? */
int b;
- int reg = 28;
+ int reg = TYPE_CODE (type) == TYPE_CODE_FLT ? HPPA_FP4_REGNUM : 28;
int part = TYPE_LENGTH (type) % 4;
/* The left hand register contains only part of the value,
transfer that first so that the rest can be xfered as entire
@@ -235,19 +128,19 @@ hppa64_return_value (struct gdbarch *gdbarch,
&& TYPE_LENGTH (type) <= 8)
{
/* Floats are right aligned? */
- int offset = register_size (gdbarch, FP4_REGNUM) - TYPE_LENGTH (type);
+ int offset = register_size (gdbarch, HPPA_FP4_REGNUM) - TYPE_LENGTH (type);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, FP4_REGNUM, offset,
+ regcache_cooked_read_part (regcache, HPPA_FP4_REGNUM, offset,
TYPE_LENGTH (type), readbuf);
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, FP4_REGNUM, offset,
+ regcache_cooked_write_part (regcache, HPPA_FP4_REGNUM, offset,
TYPE_LENGTH (type), writebuf);
return RETURN_VALUE_REGISTER_CONVENTION;
}
else if (TYPE_LENGTH (type) <= 8 && is_integral_type (type))
{
/* Integrals are right aligned. */
- int offset = register_size (gdbarch, FP4_REGNUM) - TYPE_LENGTH (type);
+ int offset = register_size (gdbarch, HPPA_FP4_REGNUM) - TYPE_LENGTH (type);
if (readbuf != NULL)
regcache_cooked_read_part (regcache, 28, offset,
TYPE_LENGTH (type), readbuf);
@@ -282,16 +175,16 @@ hppa64_return_value (struct gdbarch *gdbarch,
/* This assumes that no garbage lies outside of the lower bits of
value. */
-static int
-sign_extend (unsigned val, unsigned bits)
+int
+hppa_sign_extend (unsigned val, unsigned bits)
{
return (int) (val >> (bits - 1) ? (-1 << bits) | val : val);
}
/* For many immediate values the sign bit is the low bit! */
-static int
-low_sign_extend (unsigned val, unsigned bits)
+int
+hppa_low_hppa_sign_extend (unsigned val, unsigned bits)
{
return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
}
@@ -299,76 +192,88 @@ low_sign_extend (unsigned val, unsigned bits)
/* Extract the bits at positions between FROM and TO, using HP's numbering
(MSB = 0). */
-static int
-get_field (unsigned word, int from, int to)
+int
+hppa_get_field (unsigned word, int from, int to)
{
return ((word) >> (31 - (to)) & ((1 << ((to) - (from) + 1)) - 1));
}
/* extract the immediate field from a ld{bhw}s instruction */
-static int
-extract_5_load (unsigned word)
+int
+hppa_extract_5_load (unsigned word)
{
- return low_sign_extend (word >> 16 & MASK_5, 5);
+ return hppa_low_hppa_sign_extend (word >> 16 & MASK_5, 5);
}
/* extract the immediate field from a break instruction */
-static unsigned
-extract_5r_store (unsigned word)
+unsigned
+hppa_extract_5r_store (unsigned word)
{
return (word & MASK_5);
}
/* extract the immediate field from a {sr}sm instruction */
-static unsigned
-extract_5R_store (unsigned word)
+unsigned
+hppa_extract_5R_store (unsigned word)
{
return (word >> 16 & MASK_5);
}
/* extract a 14 bit immediate field */
-static int
-extract_14 (unsigned word)
+int
+hppa_extract_14 (unsigned word)
{
- return low_sign_extend (word & MASK_14, 14);
+ return hppa_low_hppa_sign_extend (word & MASK_14, 14);
}
/* extract a 21 bit constant */
-static int
-extract_21 (unsigned word)
+int
+hppa_extract_21 (unsigned word)
{
int val;
word &= MASK_21;
word <<= 11;
- val = get_field (word, 20, 20);
+ val = hppa_get_field (word, 20, 20);
val <<= 11;
- val |= get_field (word, 9, 19);
+ val |= hppa_get_field (word, 9, 19);
val <<= 2;
- val |= get_field (word, 5, 6);
+ val |= hppa_get_field (word, 5, 6);
val <<= 5;
- val |= get_field (word, 0, 4);
+ val |= hppa_get_field (word, 0, 4);
val <<= 2;
- val |= get_field (word, 7, 8);
- return sign_extend (val, 21) << 11;
+ val |= hppa_get_field (word, 7, 8);
+ return hppa_sign_extend (val, 21) << 11;
}
/* extract a 17 bit constant from branch instructions, returning the
19 bit signed value. */
-static int
-extract_17 (unsigned word)
+int
+hppa_extract_17 (unsigned word)
{
- return sign_extend (get_field (word, 19, 28) |
- get_field (word, 29, 29) << 10 |
- get_field (word, 11, 15) << 11 |
+ return hppa_sign_extend (hppa_get_field (word, 19, 28) |
+ hppa_get_field (word, 29, 29) << 10 |
+ hppa_get_field (word, 11, 15) << 11 |
(word & 0x1) << 16, 17) << 2;
}
+
+CORE_ADDR
+hppa_symbol_address(const char *sym)
+{
+ struct minimal_symbol *minsym;
+
+ minsym = lookup_minimal_symbol (sym, NULL, NULL);
+ if (minsym)
+ return SYMBOL_VALUE_ADDRESS (minsym);
+ else
+ return (CORE_ADDR)-1;
+}
/* Compare the start address for two unwind entries returning 1 if
@@ -389,15 +294,18 @@ compare_unwind_entries (const void *arg1, const void *arg2)
return 0;
}
-static CORE_ADDR low_text_segment_address;
-
static void
-record_text_segment_lowaddr (bfd *abfd, asection *section, void *ignored)
+record_text_segment_lowaddr (bfd *abfd, asection *section, void *data)
{
- if (((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
+ if ((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
== (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
- && section->vma < low_text_segment_address)
- low_text_segment_address = section->vma;
+ {
+ bfd_vma value = section->vma - section->filepos;
+ CORE_ADDR *low_text_segment_address = (CORE_ADDR *)data;
+
+ if (value < *low_text_segment_address)
+ *low_text_segment_address = value;
+ }
}
static void
@@ -407,30 +315,29 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
{
/* We will read the unwind entries into temporary memory, then
fill in the actual unwind table. */
+
if (size > 0)
{
unsigned long tmp;
unsigned i;
char *buf = alloca (size);
+ CORE_ADDR low_text_segment_address;
- low_text_segment_address = -1;
-
- /* If addresses are 64 bits wide, then unwinds are supposed to
+ /* For ELF targets, then unwinds are supposed to
be segment relative offsets instead of absolute addresses.
Note that when loading a shared library (text_offset != 0) the
unwinds are already relative to the text_offset that will be
passed in. */
- if (TARGET_PTR_BIT == 64 && text_offset == 0)
+ if (gdbarch_tdep (current_gdbarch)->is_elf && text_offset == 0)
{
+ low_text_segment_address = -1;
+
bfd_map_over_sections (objfile->obfd,
- record_text_segment_lowaddr, NULL);
+ record_text_segment_lowaddr,
+ &low_text_segment_address);
- /* ?!? Mask off some low bits. Should this instead subtract
- out the lowest section's filepos or something like that?
- This looks very hokey to me. */
- low_text_segment_address &= ~0xfff;
- text_offset += low_text_segment_address;
+ text_offset = low_text_segment_address;
}
bfd_get_section_contents (objfile->obfd, section, buf, 0, size);
@@ -502,12 +409,12 @@ read_unwind_info (struct objfile *objfile)
unsigned index, unwind_entries;
unsigned stub_entries, total_entries;
CORE_ADDR text_offset;
- struct obj_unwind_info *ui;
- obj_private_data_t *obj_private;
+ struct hppa_unwind_info *ui;
+ struct hppa_objfile_private *obj_private;
text_offset = ANOFFSET (objfile->section_offsets, 0);
- ui = (struct obj_unwind_info *) obstack_alloc (&objfile->objfile_obstack,
- sizeof (struct obj_unwind_info));
+ ui = (struct hppa_unwind_info *) obstack_alloc (&objfile->objfile_obstack,
+ sizeof (struct hppa_unwind_info));
ui->table = NULL;
ui->cache = NULL;
@@ -616,18 +523,18 @@ read_unwind_info (struct objfile *objfile)
compare_unwind_entries);
/* Keep a pointer to the unwind information. */
- if (objfile->obj_private == NULL)
+ obj_private = (struct hppa_objfile_private *)
+ objfile_data (objfile, hppa_objfile_priv_data);
+ if (obj_private == NULL)
{
- obj_private = (obj_private_data_t *)
- obstack_alloc (&objfile->objfile_obstack,
- sizeof (obj_private_data_t));
+ obj_private = (struct hppa_objfile_private *)
+ obstack_alloc (&objfile->objfile_obstack,
+ sizeof (struct hppa_objfile_private));
+ set_objfile_data (objfile, hppa_objfile_priv_data, obj_private);
obj_private->unwind_info = NULL;
obj_private->so_info = NULL;
obj_private->dp = 0;
-
- objfile->obj_private = obj_private;
}
- obj_private = (obj_private_data_t *) objfile->obj_private;
obj_private->unwind_info = ui;
}
@@ -641,24 +548,35 @@ find_unwind_entry (CORE_ADDR pc)
{
int first, middle, last;
struct objfile *objfile;
+ struct hppa_objfile_private *priv;
+
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "{ find_unwind_entry 0x%s -> ",
+ paddr_nz (pc));
/* A function at address 0? Not in HP-UX! */
if (pc == (CORE_ADDR) 0)
- return NULL;
+ {
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "NULL }\n");
+ return NULL;
+ }
ALL_OBJFILES (objfile)
{
- struct obj_unwind_info *ui;
+ struct hppa_unwind_info *ui;
ui = NULL;
- if (objfile->obj_private)
- ui = ((obj_private_data_t *) (objfile->obj_private))->unwind_info;
+ priv = objfile_data (objfile, hppa_objfile_priv_data);
+ if (priv)
+ ui = ((struct hppa_objfile_private *) priv)->unwind_info;
if (!ui)
{
read_unwind_info (objfile);
- if (objfile->obj_private == NULL)
+ priv = objfile_data (objfile, hppa_objfile_priv_data);
+ if (priv == NULL)
error ("Internal error reading unwind information.");
- ui = ((obj_private_data_t *) (objfile->obj_private))->unwind_info;
+ ui = ((struct hppa_objfile_private *) priv)->unwind_info;
}
/* First, check the cache */
@@ -666,7 +584,12 @@ find_unwind_entry (CORE_ADDR pc)
if (ui->cache
&& pc >= ui->cache->region_start
&& pc <= ui->cache->region_end)
- return ui->cache;
+ {
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "0x%s (cached) }\n",
+ paddr_nz ((CORE_ADDR) ui->cache));
+ return ui->cache;
+ }
/* Not in the cache, do a binary search */
@@ -680,6 +603,9 @@ find_unwind_entry (CORE_ADDR pc)
&& pc <= ui->table[middle].region_end)
{
ui->cache = &ui->table[middle];
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "0x%s }\n",
+ paddr_nz ((CORE_ADDR) ui->cache));
return &ui->table[middle];
}
@@ -689,10 +615,14 @@ find_unwind_entry (CORE_ADDR pc)
first = middle + 1;
}
} /* ALL_OBJFILES() */
+
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "NULL (not found) }\n");
+
return NULL;
}
-const unsigned char *
+static const unsigned char *
hppa_breakpoint_from_pc (CORE_ADDR *pc, int *len)
{
static const unsigned char breakpoint[] = {0x00, 0x01, 0x00, 0x04};
@@ -780,26 +710,6 @@ hppa64_register_name (int i)
return names[i];
}
-
-
-/* Return the adjustment necessary to make for addresses on the stack
- as presented by hpread.c.
-
- This is necessary because of the stack direction on the PA and the
- bizarre way in which someone (?) decided they wanted to handle
- frame pointerless code in GDB. */
-int
-hpread_adjust_stack_address (CORE_ADDR func_addr)
-{
- struct unwind_table_entry *u;
-
- u = find_unwind_entry (func_addr);
- if (!u)
- return 0;
- else
- return u->Total_frame_size << 3;
-}
-
/* This function pushes a stack frame with arguments as part of the
inferior function calling mechanism.
@@ -811,14 +721,11 @@ hpread_adjust_stack_address (CORE_ADDR func_addr)
arguments into their proper slots. */
CORE_ADDR
-hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- /* NOTE: cagney/2004-02-27: This is a guess - its implemented by
- reverse engineering testsuite failures. */
-
/* Stack base address at which any pass-by-reference parameters are
stored. */
CORE_ADDR struct_end = 0;
@@ -832,12 +739,22 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Two passes. First pass computes the location of everything,
second pass writes the bytes out. */
int write_pass;
+
+ /* Global pointer (r19) of the function we are trying to call. */
+ CORE_ADDR gp;
+
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
for (write_pass = 0; write_pass < 2; write_pass++)
{
CORE_ADDR struct_ptr = 0;
- CORE_ADDR param_ptr = 0;
- int reg = 27; /* NOTE: Registers go down. */
+ /* The first parameter goes into sp-36, each stack slot is 4-bytes.
+ struct_ptr is adjusted for each argument below, so the first
+ argument will end up at sp-36. */
+ CORE_ADDR param_ptr = 32;
int i;
+ int small_struct = 0;
+
for (i = 0; i < nargs; i++)
{
struct value *arg = args[i];
@@ -868,23 +785,64 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
unpack_long (type,
VALUE_CONTENTS (arg)));
}
+ else if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ {
+ /* Floating point value store, right aligned. */
+ param_len = align_up (TYPE_LENGTH (type), 4);
+ memcpy (param_val, VALUE_CONTENTS (arg), param_len);
+ }
else
{
- /* Small struct value, store right aligned? */
param_len = align_up (TYPE_LENGTH (type), 4);
+
+ /* Small struct value are stored right-aligned. */
memcpy (param_val + param_len - TYPE_LENGTH (type),
VALUE_CONTENTS (arg), TYPE_LENGTH (type));
+
+ /* Structures of size 5, 6 and 7 bytes are special in that
+ the higher-ordered word is stored in the lower-ordered
+ argument, and even though it is a 8-byte quantity the
+ registers need not be 8-byte aligned. */
+ if (param_len > 4 && param_len < 8)
+ small_struct = 1;
}
+
param_ptr += param_len;
- reg -= param_len / 4;
+ if (param_len == 8 && !small_struct)
+ param_ptr = align_up (param_ptr, 8);
+
+ /* First 4 non-FP arguments are passed in gr26-gr23.
+ First 4 32-bit FP arguments are passed in fr4L-fr7L.
+ First 2 64-bit FP arguments are passed in fr5 and fr7.
+
+ The rest go on the stack, starting at sp-36, towards lower
+ addresses. 8-byte arguments must be aligned to a 8-byte
+ stack boundary. */
if (write_pass)
{
write_memory (param_end - param_ptr, param_val, param_len);
- if (reg >= 23)
+
+ /* There are some cases when we don't know the type
+ expected by the callee (e.g. for variadic functions), so
+ pass the parameters in both general and fp regs. */
+ if (param_ptr <= 48)
{
- regcache_cooked_write (regcache, reg, param_val);
+ int grreg = 26 - (param_ptr - 36) / 4;
+ int fpLreg = 72 + (param_ptr - 36) / 4 * 2;
+ int fpreg = 74 + (param_ptr - 32) / 8 * 4;
+
+ regcache_cooked_write (regcache, grreg, param_val);
+ regcache_cooked_write (regcache, fpLreg, param_val);
+
if (param_len > 4)
- regcache_cooked_write (regcache, reg + 1, param_val + 4);
+ {
+ regcache_cooked_write (regcache, grreg + 1,
+ param_val + 4);
+
+ regcache_cooked_write (regcache, fpreg, param_val);
+ regcache_cooked_write (regcache, fpreg + 1,
+ param_val + 4);
+ }
}
}
}
@@ -892,14 +850,13 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Update the various stack pointers. */
if (!write_pass)
{
- struct_end = sp + struct_ptr;
+ struct_end = sp + align_up (struct_ptr, 64);
/* PARAM_PTR already accounts for all the arguments passed
by the user. However, the ABI mandates minimum stack
space allocations for outgoing arguments. The ABI also
mandates minimum stack alignments which we must
preserve. */
- param_end = struct_end + max (align_up (param_ptr, 8),
- REG_PARM_STACK_SPACE);
+ param_end = struct_end + align_up (param_ptr, 64);
}
}
@@ -908,14 +865,18 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (struct_return)
write_register (28, struct_addr);
+ gp = tdep->find_global_pointer (function);
+
+ if (gp != 0)
+ write_register (19, gp);
+
/* Set the return address. */
- regcache_cooked_write_unsigned (regcache, RP_REGNUM, bp_addr);
+ regcache_cooked_write_unsigned (regcache, HPPA_RP_REGNUM, bp_addr);
/* Update the Stack Pointer. */
- regcache_cooked_write_unsigned (regcache, SP_REGNUM, param_end + 32);
+ regcache_cooked_write_unsigned (regcache, HPPA_SP_REGNUM, param_end);
- /* The stack will have 32 bytes of additional space for a frame marker. */
- return param_end + 32;
+ return param_end;
}
/* This function pushes a stack frame with arguments as part of the
@@ -932,7 +893,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
to the callee, so we do that too. */
CORE_ADDR
-hppa64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1022,8 +983,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
space allocations for outgoing arguments. The ABI also
mandates minimum stack alignments which we must
preserve. */
- param_end = struct_end + max (align_up (param_ptr, 16),
- REG_PARM_STACK_SPACE);
+ param_end = struct_end + max (align_up (param_ptr, 16), 64);
}
}
@@ -1033,16 +993,32 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
write_register (28, struct_addr);
/* Set the return address. */
- regcache_cooked_write_unsigned (regcache, RP_REGNUM, bp_addr);
+ regcache_cooked_write_unsigned (regcache, HPPA_RP_REGNUM, bp_addr);
/* Update the Stack Pointer. */
- regcache_cooked_write_unsigned (regcache, SP_REGNUM, param_end + 64);
+ regcache_cooked_write_unsigned (regcache, HPPA_SP_REGNUM, param_end + 64);
/* The stack will have 32 bytes of additional space for a frame marker. */
return param_end + 64;
}
static CORE_ADDR
+hppa32_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
+ CORE_ADDR addr,
+ struct target_ops *targ)
+{
+ if (addr & 2)
+ {
+ CORE_ADDR plabel;
+
+ plabel = addr & ~3;
+ target_read_memory(plabel, (char *)&addr, 4);
+ }
+
+ return addr;
+}
+
+static CORE_ADDR
hppa32_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
{
/* HP frames are 64-byte (or cache line) aligned (yes that's _byte_
@@ -1060,109 +1036,13 @@ hppa64_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
}
-/* elz: Used to lookup a symbol in the shared libraries.
- This function calls shl_findsym, indirectly through a
- call to __d_shl_get. __d_shl_get is in end.c, which is always
- linked in by the hp compilers/linkers.
- The call to shl_findsym cannot be made directly because it needs
- to be active in target address space.
- inputs: - minimal symbol pointer for the function we want to look up
- - address in target space of the descriptor for the library
- where we want to look the symbol up.
- This address is retrieved using the
- som_solib_get_solib_by_pc function (somsolib.c).
- output: - real address in the library of the function.
- note: the handle can be null, in which case shl_findsym will look for
- the symbol in all the loaded shared libraries.
- files to look at if you need reference on this stuff:
- dld.c, dld_shl_findsym.c
- end.c
- man entry for shl_findsym */
-
-CORE_ADDR
-find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
-{
- struct symbol *get_sym, *symbol2;
- struct minimal_symbol *buff_minsym, *msymbol;
- struct type *ftype;
- struct value **args;
- struct value *funcval;
- struct value *val;
-
- int x, namelen, err_value, tmp = -1;
- CORE_ADDR endo_buff_addr, value_return_addr, errno_return_addr;
- CORE_ADDR stub_addr;
-
-
- args = alloca (sizeof (struct value *) * 8); /* 6 for the arguments and one null one??? */
- funcval = find_function_in_inferior ("__d_shl_get");
- get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_DOMAIN, NULL, NULL);
- buff_minsym = lookup_minimal_symbol ("__buffer", NULL, NULL);
- msymbol = lookup_minimal_symbol ("__shldp", NULL, NULL);
- symbol2 = lookup_symbol ("__shldp", NULL, VAR_DOMAIN, NULL, NULL);
- endo_buff_addr = SYMBOL_VALUE_ADDRESS (buff_minsym);
- namelen = strlen (DEPRECATED_SYMBOL_NAME (function));
- value_return_addr = endo_buff_addr + namelen;
- ftype = check_typedef (SYMBOL_TYPE (get_sym));
-
- /* do alignment */
- if ((x = value_return_addr % 64) != 0)
- value_return_addr = value_return_addr + 64 - x;
-
- errno_return_addr = value_return_addr + 64;
-
-
- /* set up stuff needed by __d_shl_get in buffer in end.o */
-
- target_write_memory (endo_buff_addr, DEPRECATED_SYMBOL_NAME (function), namelen);
-
- target_write_memory (value_return_addr, (char *) &tmp, 4);
-
- target_write_memory (errno_return_addr, (char *) &tmp, 4);
-
- target_write_memory (SYMBOL_VALUE_ADDRESS (msymbol),
- (char *) &handle, 4);
-
- /* now prepare the arguments for the call */
-
- args[0] = value_from_longest (TYPE_FIELD_TYPE (ftype, 0), 12);
- args[1] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 1), SYMBOL_VALUE_ADDRESS (msymbol));
- args[2] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 2), endo_buff_addr);
- args[3] = value_from_longest (TYPE_FIELD_TYPE (ftype, 3), TYPE_PROCEDURE);
- args[4] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 4), value_return_addr);
- args[5] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 5), errno_return_addr);
-
- /* now call the function */
-
- val = call_function_by_hand (funcval, 6, args);
-
- /* now get the results */
-
- target_read_memory (errno_return_addr, (char *) &err_value, sizeof (err_value));
-
- target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
- if (stub_addr <= 0)
- error ("call to __d_shl_get failed, error code is %d", err_value);
-
- return (stub_addr);
-}
-
-/* Cover routine for find_stub_with_shl_get to pass to catch_errors */
-static int
-cover_find_stub_with_shl_get (void *args_untyped)
-{
- args_for_find_stub *args = args_untyped;
- args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
- return 0;
-}
-
/* Get the PC from %r31 if currently in a syscall. Also mask out privilege
bits. */
-CORE_ADDR
+static CORE_ADDR
hppa_target_read_pc (ptid_t ptid)
{
- int flags = read_register_pid (FLAGS_REGNUM, ptid);
+ int flags = read_register_pid (HPPA_FLAGS_REGNUM, ptid);
/* The following test does not belong here. It is OS-specific, and belongs
in native code. */
@@ -1170,16 +1050,16 @@ hppa_target_read_pc (ptid_t ptid)
if (flags & 2)
return read_register_pid (31, ptid) & ~0x3;
- return read_register_pid (PCOQ_HEAD_REGNUM, ptid) & ~0x3;
+ return read_register_pid (HPPA_PCOQ_HEAD_REGNUM, ptid) & ~0x3;
}
/* Write out the PC. If currently in a syscall, then also write the new
PC value into %r31. */
-void
+static void
hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
{
- int flags = read_register_pid (FLAGS_REGNUM, ptid);
+ int flags = read_register_pid (HPPA_FLAGS_REGNUM, ptid);
/* The following test does not belong here. It is OS-specific, and belongs
in native code. */
@@ -1189,8 +1069,8 @@ hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
if (flags & 2)
write_register_pid (31, v | 0x3, ptid);
- write_register_pid (PCOQ_HEAD_REGNUM, v, ptid);
- write_register_pid (PCOQ_TAIL_REGNUM, v + 4, ptid);
+ write_register_pid (HPPA_PCOQ_HEAD_REGNUM, v, ptid);
+ write_register_pid (HPPA_PCOQ_TAIL_REGNUM, v + 4, ptid);
}
/* return the alignment of a type in bytes. Structures have the maximum
@@ -1228,515 +1108,6 @@ hppa_alignof (struct type *type)
}
}
-/* Return one if PC is in the call path of a trampoline, else return zero.
-
- Note we return one for *any* call trampoline (long-call, arg-reloc), not
- just shared library trampolines (import, export). */
-
-int
-hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
- struct minimal_symbol *minsym;
- struct unwind_table_entry *u;
- static CORE_ADDR dyncall = 0;
- static CORE_ADDR sr4export = 0;
-
-#ifdef GDB_TARGET_IS_HPPA_20W
- /* PA64 has a completely different stub/trampoline scheme. Is it
- better? Maybe. It's certainly harder to determine with any
- certainty that we are in a stub because we can not refer to the
- unwinders to help.
-
- The heuristic is simple. Try to lookup the current PC value in th
- minimal symbol table. If that fails, then assume we are not in a
- stub and return.
-
- Then see if the PC value falls within the section bounds for the
- section containing the minimal symbol we found in the first
- step. If it does, then assume we are not in a stub and return.
-
- Finally peek at the instructions to see if they look like a stub. */
- {
- struct minimal_symbol *minsym;
- asection *sec;
- CORE_ADDR addr;
- int insn, i;
-
- minsym = lookup_minimal_symbol_by_pc (pc);
- if (! minsym)
- return 0;
-
- sec = SYMBOL_BFD_SECTION (minsym);
-
- if (bfd_get_section_vma (sec->owner, sec) <= pc
- && pc < (bfd_get_section_vma (sec->owner, sec)
- + bfd_section_size (sec->owner, sec)))
- return 0;
-
- /* We might be in a stub. Peek at the instructions. Stubs are 3
- instructions long. */
- insn = read_memory_integer (pc, 4);
-
- /* Find out where we think we are within the stub. */
- if ((insn & 0xffffc00e) == 0x53610000)
- addr = pc;
- else if ((insn & 0xffffffff) == 0xe820d000)
- addr = pc - 4;
- else if ((insn & 0xffffc00e) == 0x537b0000)
- addr = pc - 8;
- else
- return 0;
-
- /* Now verify each insn in the range looks like a stub instruction. */
- insn = read_memory_integer (addr, 4);
- if ((insn & 0xffffc00e) != 0x53610000)
- return 0;
-
- /* Now verify each insn in the range looks like a stub instruction. */
- insn = read_memory_integer (addr + 4, 4);
- if ((insn & 0xffffffff) != 0xe820d000)
- return 0;
-
- /* Now verify each insn in the range looks like a stub instruction. */
- insn = read_memory_integer (addr + 8, 4);
- if ((insn & 0xffffc00e) != 0x537b0000)
- return 0;
-
- /* Looks like a stub. */
- return 1;
- }
-#endif
-
- /* FIXME XXX - dyncall and sr4export must be initialized whenever we get a
- new exec file */
-
- /* First see if PC is in one of the two C-library trampolines. */
- if (!dyncall)
- {
- minsym = lookup_minimal_symbol ("$$dyncall", NULL, NULL);
- if (minsym)
- dyncall = SYMBOL_VALUE_ADDRESS (minsym);
- else
- dyncall = -1;
- }
-
- if (!sr4export)
- {
- minsym = lookup_minimal_symbol ("_sr4export", NULL, NULL);
- if (minsym)
- sr4export = SYMBOL_VALUE_ADDRESS (minsym);
- else
- sr4export = -1;
- }
-
- if (pc == dyncall || pc == sr4export)
- return 1;
-
- minsym = lookup_minimal_symbol_by_pc (pc);
- if (minsym && strcmp (DEPRECATED_SYMBOL_NAME (minsym), ".stub") == 0)
- return 1;
-
- /* Get the unwind descriptor corresponding to PC, return zero
- if no unwind was found. */
- u = find_unwind_entry (pc);
- if (!u)
- return 0;
-
- /* If this isn't a linker stub, then return now. */
- if (u->stub_unwind.stub_type == 0)
- return 0;
-
- /* By definition a long-branch stub is a call stub. */
- if (u->stub_unwind.stub_type == LONG_BRANCH)
- return 1;
-
- /* The call and return path execute the same instructions within
- an IMPORT stub! So an IMPORT stub is both a call and return
- trampoline. */
- if (u->stub_unwind.stub_type == IMPORT)
- return 1;
-
- /* Parameter relocation stubs always have a call path and may have a
- return path. */
- if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
- || u->stub_unwind.stub_type == EXPORT)
- {
- CORE_ADDR addr;
-
- /* Search forward from the current PC until we hit a branch
- or the end of the stub. */
- for (addr = pc; addr <= u->region_end; addr += 4)
- {
- unsigned long insn;
-
- insn = read_memory_integer (addr, 4);
-
- /* Does it look like a bl? If so then it's the call path, if
- we find a bv or be first, then we're on the return path. */
- if ((insn & 0xfc00e000) == 0xe8000000)
- return 1;
- else if ((insn & 0xfc00e001) == 0xe800c000
- || (insn & 0xfc000000) == 0xe0000000)
- return 0;
- }
-
- /* Should never happen. */
- warning ("Unable to find branch in parameter relocation stub.\n");
- return 0;
- }
-
- /* Unknown stub type. For now, just return zero. */
- return 0;
-}
-
-/* Return one if PC is in the return path of a trampoline, else return zero.
-
- Note we return one for *any* call trampoline (long-call, arg-reloc), not
- just shared library trampolines (import, export). */
-
-int
-hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name)
-{
- struct unwind_table_entry *u;
-
- /* Get the unwind descriptor corresponding to PC, return zero
- if no unwind was found. */
- u = find_unwind_entry (pc);
- if (!u)
- return 0;
-
- /* If this isn't a linker stub or it's just a long branch stub, then
- return zero. */
- if (u->stub_unwind.stub_type == 0 || u->stub_unwind.stub_type == LONG_BRANCH)
- return 0;
-
- /* The call and return path execute the same instructions within
- an IMPORT stub! So an IMPORT stub is both a call and return
- trampoline. */
- if (u->stub_unwind.stub_type == IMPORT)
- return 1;
-
- /* Parameter relocation stubs always have a call path and may have a
- return path. */
- if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
- || u->stub_unwind.stub_type == EXPORT)
- {
- CORE_ADDR addr;
-
- /* Search forward from the current PC until we hit a branch
- or the end of the stub. */
- for (addr = pc; addr <= u->region_end; addr += 4)
- {
- unsigned long insn;
-
- insn = read_memory_integer (addr, 4);
-
- /* Does it look like a bl? If so then it's the call path, if
- we find a bv or be first, then we're on the return path. */
- if ((insn & 0xfc00e000) == 0xe8000000)
- return 0;
- else if ((insn & 0xfc00e001) == 0xe800c000
- || (insn & 0xfc000000) == 0xe0000000)
- return 1;
- }
-
- /* Should never happen. */
- warning ("Unable to find branch in parameter relocation stub.\n");
- return 0;
- }
-
- /* Unknown stub type. For now, just return zero. */
- return 0;
-
-}
-
-/* Figure out if PC is in a trampoline, and if so find out where
- the trampoline will jump to. If not in a trampoline, return zero.
-
- Simple code examination probably is not a good idea since the code
- sequences in trampolines can also appear in user code.
-
- We use unwinds and information from the minimal symbol table to
- determine when we're in a trampoline. This won't work for ELF
- (yet) since it doesn't create stub unwind entries. Whether or
- not ELF will create stub unwinds or normal unwinds for linker
- stubs is still being debated.
-
- This should handle simple calls through dyncall or sr4export,
- long calls, argument relocation stubs, and dyncall/sr4export
- calling an argument relocation stub. It even handles some stubs
- used in dynamic executables. */
-
-CORE_ADDR
-hppa_skip_trampoline_code (CORE_ADDR pc)
-{
- long orig_pc = pc;
- long prev_inst, curr_inst, loc;
- static CORE_ADDR dyncall = 0;
- static CORE_ADDR dyncall_external = 0;
- static CORE_ADDR sr4export = 0;
- struct minimal_symbol *msym;
- struct unwind_table_entry *u;
-
- /* FIXME XXX - dyncall and sr4export must be initialized whenever we get a
- new exec file */
-
- if (!dyncall)
- {
- msym = lookup_minimal_symbol ("$$dyncall", NULL, NULL);
- if (msym)
- dyncall = SYMBOL_VALUE_ADDRESS (msym);
- else
- dyncall = -1;
- }
-
- if (!dyncall_external)
- {
- msym = lookup_minimal_symbol ("$$dyncall_external", NULL, NULL);
- if (msym)
- dyncall_external = SYMBOL_VALUE_ADDRESS (msym);
- else
- dyncall_external = -1;
- }
-
- if (!sr4export)
- {
- msym = lookup_minimal_symbol ("_sr4export", NULL, NULL);
- if (msym)
- sr4export = SYMBOL_VALUE_ADDRESS (msym);
- else
- sr4export = -1;
- }
-
- /* Addresses passed to dyncall may *NOT* be the actual address
- of the function. So we may have to do something special. */
- if (pc == dyncall)
- {
- pc = (CORE_ADDR) read_register (22);
-
- /* If bit 30 (counting from the left) is on, then pc is the address of
- the PLT entry for this function, not the address of the function
- itself. Bit 31 has meaning too, but only for MPE. */
- if (pc & 0x2)
- pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
- }
- if (pc == dyncall_external)
- {
- pc = (CORE_ADDR) read_register (22);
- pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
- }
- else if (pc == sr4export)
- pc = (CORE_ADDR) (read_register (22));
-
- /* Get the unwind descriptor corresponding to PC, return zero
- if no unwind was found. */
- u = find_unwind_entry (pc);
- if (!u)
- return 0;
-
- /* If this isn't a linker stub, then return now. */
- /* elz: attention here! (FIXME) because of a compiler/linker
- error, some stubs which should have a non zero stub_unwind.stub_type
- have unfortunately a value of zero. So this function would return here
- as if we were not in a trampoline. To fix this, we go look at the partial
- symbol information, which reports this guy as a stub.
- (FIXME): Unfortunately, we are not that lucky: it turns out that the
- partial symbol information is also wrong sometimes. This is because
- when it is entered (somread.c::som_symtab_read()) it can happen that
- if the type of the symbol (from the som) is Entry, and the symbol is
- in a shared library, then it can also be a trampoline. This would
- be OK, except that I believe the way they decide if we are ina shared library
- does not work. SOOOO..., even if we have a regular function w/o trampolines
- its minimal symbol can be assigned type mst_solib_trampoline.
- Also, if we find that the symbol is a real stub, then we fix the unwind
- descriptor, and define the stub type to be EXPORT.
- Hopefully this is correct most of the times. */
- if (u->stub_unwind.stub_type == 0)
- {
-
-/* elz: NOTE (FIXME!) once the problem with the unwind information is fixed
- we can delete all the code which appears between the lines */
-/*--------------------------------------------------------------------------*/
- msym = lookup_minimal_symbol_by_pc (pc);
-
- if (msym == NULL || MSYMBOL_TYPE (msym) != mst_solib_trampoline)
- return orig_pc == pc ? 0 : pc & ~0x3;
-
- else if (msym != NULL && MSYMBOL_TYPE (msym) == mst_solib_trampoline)
- {
- struct objfile *objfile;
- struct minimal_symbol *msymbol;
- int function_found = 0;
-
- /* go look if there is another minimal symbol with the same name as
- this one, but with type mst_text. This would happen if the msym
- is an actual trampoline, in which case there would be another
- symbol with the same name corresponding to the real function */
-
- ALL_MSYMBOLS (objfile, msymbol)
- {
- if (MSYMBOL_TYPE (msymbol) == mst_text
- && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
- {
- function_found = 1;
- break;
- }
- }
-
- if (function_found)
- /* the type of msym is correct (mst_solib_trampoline), but
- the unwind info is wrong, so set it to the correct value */
- u->stub_unwind.stub_type = EXPORT;
- else
- /* the stub type info in the unwind is correct (this is not a
- trampoline), but the msym type information is wrong, it
- should be mst_text. So we need to fix the msym, and also
- get out of this function */
- {
- MSYMBOL_TYPE (msym) = mst_text;
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
- }
-
-/*--------------------------------------------------------------------------*/
- }
-
- /* It's a stub. Search for a branch and figure out where it goes.
- Note we have to handle multi insn branch sequences like ldil;ble.
- Most (all?) other branches can be determined by examining the contents
- of certain registers and the stack. */
-
- loc = pc;
- curr_inst = 0;
- prev_inst = 0;
- while (1)
- {
- /* Make sure we haven't walked outside the range of this stub. */
- if (u != find_unwind_entry (loc))
- {
- warning ("Unable to find branch in linker stub");
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
-
- prev_inst = curr_inst;
- curr_inst = read_memory_integer (loc, 4);
-
- /* Does it look like a branch external using %r1? Then it's the
- branch from the stub to the actual function. */
- if ((curr_inst & 0xffe0e000) == 0xe0202000)
- {
- /* Yup. See if the previous instruction loaded
- a value into %r1. If so compute and return the jump address. */
- if ((prev_inst & 0xffe00000) == 0x20200000)
- return (extract_21 (prev_inst) + extract_17 (curr_inst)) & ~0x3;
- else
- {
- warning ("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1).");
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
- }
-
- /* Does it look like a be 0(sr0,%r21)? OR
- Does it look like a be, n 0(sr0,%r21)? OR
- Does it look like a bve (r21)? (this is on PA2.0)
- Does it look like a bve, n(r21)? (this is also on PA2.0)
- That's the branch from an
- import stub to an export stub.
-
- It is impossible to determine the target of the branch via
- simple examination of instructions and/or data (consider
- that the address in the plabel may be the address of the
- bind-on-reference routine in the dynamic loader).
-
- So we have try an alternative approach.
-
- Get the name of the symbol at our current location; it should
- be a stub symbol with the same name as the symbol in the
- shared library.
-
- Then lookup a minimal symbol with the same name; we should
- get the minimal symbol for the target routine in the shared
- library as those take precedence of import/export stubs. */
- if ((curr_inst == 0xe2a00000) ||
- (curr_inst == 0xe2a00002) ||
- (curr_inst == 0xeaa0d000) ||
- (curr_inst == 0xeaa0d002))
- {
- struct minimal_symbol *stubsym, *libsym;
-
- stubsym = lookup_minimal_symbol_by_pc (loc);
- if (stubsym == NULL)
- {
- warning ("Unable to find symbol for 0x%lx", loc);
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
-
- libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL);
- if (libsym == NULL)
- {
- warning ("Unable to find library symbol for %s\n",
- DEPRECATED_SYMBOL_NAME (stubsym));
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
-
- return SYMBOL_VALUE (libsym);
- }
-
- /* Does it look like bl X,%rp or bl X,%r0? Another way to do a
- branch from the stub to the actual function. */
- /*elz */
- else if ((curr_inst & 0xffe0e000) == 0xe8400000
- || (curr_inst & 0xffe0e000) == 0xe8000000
- || (curr_inst & 0xffe0e000) == 0xe800A000)
- return (loc + extract_17 (curr_inst) + 8) & ~0x3;
-
- /* Does it look like bv (rp)? Note this depends on the
- current stack pointer being the same as the stack
- pointer in the stub itself! This is a branch on from the
- stub back to the original caller. */
- /*else if ((curr_inst & 0xffe0e000) == 0xe840c000) */
- else if ((curr_inst & 0xffe0f000) == 0xe840c000)
- {
- /* Yup. See if the previous instruction loaded
- rp from sp - 8. */
- if (prev_inst == 0x4bc23ff1)
- return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3;
- else
- {
- warning ("Unable to find restore of %%rp before bv (%%rp).");
- return orig_pc == pc ? 0 : pc & ~0x3;
- }
- }
-
- /* elz: added this case to capture the new instruction
- at the end of the return part of an export stub used by
- the PA2.0: BVE, n (rp) */
- else if ((curr_inst & 0xffe0f000) == 0xe840d000)
- {
- return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
- }
-
- /* What about be,n 0(sr0,%rp)? It's just another way we return to
- the original caller from the stub. Used in dynamic executables. */
- else if (curr_inst == 0xe0400002)
- {
- /* The value we jump to is sitting in sp - 24. But that's
- loaded several instructions before the be instruction.
- I guess we could check for the previous instruction being
- mtsp %r1,%sr0 if we want to do sanity checking. */
- return (read_memory_integer
- (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
- }
-
- /* Haven't found the branch yet, but we're still in the stub.
- Keep looking. */
- loc += 4;
- }
-}
-
-
/* For the given instruction (INST), return any adjustment it makes
to the stack pointer or zero for no adjustment.
@@ -1750,11 +1121,11 @@ prologue_inst_adjust_sp (unsigned long inst)
/* The most common way to perform a stack adjustment ldo X(sp),sp */
if ((inst & 0xffffc000) == 0x37de0000)
- return extract_14 (inst);
+ return hppa_extract_14 (inst);
/* stwm X,D(sp) */
if ((inst & 0xffe00000) == 0x6fc00000)
- return extract_14 (inst);
+ return hppa_extract_14 (inst);
/* std,ma X,D(sp) */
if ((inst & 0xffe00008) == 0x73c00008)
@@ -1764,16 +1135,16 @@ prologue_inst_adjust_sp (unsigned long inst)
save high bits in save_high21 for later use. */
if ((inst & 0xffe00000) == 0x28200000)
{
- save_high21 = extract_21 (inst);
+ save_high21 = hppa_extract_21 (inst);
return 0;
}
if ((inst & 0xffff0000) == 0x343e0000)
- return save_high21 + extract_14 (inst);
+ return save_high21 + hppa_extract_14 (inst);
/* fstws as used by the HP compilers. */
if ((inst & 0xffffffe0) == 0x2fd01220)
- return extract_5_load (inst);
+ return hppa_extract_5_load (inst);
/* No adjustment. */
return 0;
@@ -1822,17 +1193,17 @@ inst_saves_gr (unsigned long inst)
|| (inst >> 26) == 0x1f
|| ((inst >> 26) == 0x1f
&& ((inst >> 6) == 0xa)))
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
/* Does it look like a std? */
if ((inst >> 26) == 0x1c
|| ((inst >> 26) == 0x03
&& ((inst >> 6) & 0xf) == 0xb))
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
/* Does it look like a stwm? GCC & HPC may use this in prologues. */
if ((inst >> 26) == 0x1b)
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
/* Does it look like sth or stb? HPC versions 9.0 and later use these
too. */
@@ -1840,7 +1211,7 @@ inst_saves_gr (unsigned long inst)
|| ((inst >> 26) == 0x3
&& (((inst >> 6) & 0xf) == 0x8
|| (inst >> 6) & 0xf) == 0x9))
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
return 0;
}
@@ -1858,14 +1229,14 @@ inst_saves_fr (unsigned long inst)
{
/* is this an FSTD ? */
if ((inst & 0xfc00dfc0) == 0x2c001200)
- return extract_5r_store (inst);
+ return hppa_extract_5r_store (inst);
if ((inst & 0xfc000002) == 0x70000002)
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
/* is this an FSTW ? */
if ((inst & 0xfc00df80) == 0x24001200)
- return extract_5r_store (inst);
+ return hppa_extract_5r_store (inst);
if ((inst & 0xfc000002) == 0x7c000000)
- return extract_5R_store (inst);
+ return hppa_extract_5R_store (inst);
return 0;
}
@@ -1956,7 +1327,7 @@ restart:
old_save_sp = save_sp;
old_stack_remaining = stack_remaining;
- status = target_read_memory (pc, buf, 4);
+ status = deprecated_read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -2005,7 +1376,7 @@ restart:
while (reg_num >= (TARGET_PTR_BIT == 64 ? 19 : 23) && reg_num <= 26)
{
pc += 4;
- status = target_read_memory (pc, buf, 4);
+ status = deprecated_read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -2018,7 +1389,7 @@ restart:
reg_num = inst_saves_fr (inst);
save_fr &= ~(1 << reg_num);
- status = target_read_memory (pc + 4, buf, 4);
+ status = deprecated_read_memory_nobpt (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -2045,13 +1416,13 @@ restart:
while (reg_num >= 4 && reg_num <= (TARGET_PTR_BIT == 64 ? 11 : 7))
{
pc += 8;
- status = target_read_memory (pc, buf, 4);
+ status = deprecated_read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
if ((inst & 0xfc000000) != 0x34000000)
break;
- status = target_read_memory (pc + 4, buf, 4);
+ status = deprecated_read_memory_nobpt (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -2149,7 +1520,7 @@ after_prologue (CORE_ADDR pc)
Currently we must not skip more on the alpha, but we might the lenient
stuff some day. */
-CORE_ADDR
+static CORE_ADDR
hppa_skip_prologue (CORE_ADDR pc)
{
unsigned long inst;
@@ -2190,10 +1561,20 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
CORE_ADDR this_sp;
long frame_size;
struct unwind_table_entry *u;
+ CORE_ADDR prologue_end;
int i;
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "{ hppa_frame_cache (frame=%d) -> ",
+ frame_relative_level(next_frame));
+
if ((*this_cache) != NULL)
- return (*this_cache);
+ {
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "base=0x%s (cached) }",
+ paddr_nz (((struct hppa_frame_cache *)*this_cache)->base));
+ return (*this_cache);
+ }
cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
@@ -2201,7 +1582,11 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
/* Yow! */
u = find_unwind_entry (frame_func_unwind (next_frame));
if (!u)
- return (*this_cache);
+ {
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "base=NULL (no unwind entry) }");
+ return (*this_cache);
+ }
/* Turn the Entry_GR field into a bitmask. */
saved_gr_mask = 0;
@@ -2235,26 +1620,36 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
GCC code. */
{
int final_iteration = 0;
- CORE_ADDR pc;
- CORE_ADDR end_pc = skip_prologue_using_sal (pc);
+ CORE_ADDR pc, end_pc;
int looking_for_sp = u->Save_SP;
int looking_for_rp = u->Save_RP;
int fp_loc = -1;
- if (end_pc == 0)
- end_pc = frame_pc_unwind (next_frame);
+
+ /* We have to use hppa_skip_prologue instead of just
+ skip_prologue_using_sal, in case we stepped into a function without
+ symbol information. hppa_skip_prologue also bounds the returned
+ pc by the passed in pc, so it will not return a pc in the next
+ function. */
+ prologue_end = hppa_skip_prologue (frame_func_unwind (next_frame));
+ end_pc = frame_pc_unwind (next_frame);
+
+ if (prologue_end != 0 && end_pc > prologue_end)
+ end_pc = prologue_end;
+
frame_size = 0;
+
for (pc = frame_func_unwind (next_frame);
((saved_gr_mask || saved_fr_mask
|| looking_for_sp || looking_for_rp
|| frame_size < (u->Total_frame_size << 3))
- && pc <= end_pc);
+ && pc < end_pc);
pc += 4)
{
int reg;
char buf4[4];
- long status = target_read_memory (pc, buf4, sizeof buf4);
+ long status = deprecated_read_memory_nobpt (pc, buf4, sizeof buf4);
long inst = extract_unsigned_integer (buf4, sizeof buf4);
-
+
/* Note the interesting effects of this instruction. */
frame_size += prologue_inst_adjust_sp (inst);
@@ -2263,12 +1658,12 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
if (inst == 0x6bc23fd9) /* stw rp,-0x14(sr0,sp) */
{
looking_for_rp = 0;
- cache->saved_regs[RP_REGNUM].addr = -20;
+ cache->saved_regs[HPPA_RP_REGNUM].addr = -20;
}
else if (inst == 0x0fc212c1) /* std rp,-0x10(sr0,sp) */
{
looking_for_rp = 0;
- cache->saved_regs[RP_REGNUM].addr = -16;
+ cache->saved_regs[HPPA_RP_REGNUM].addr = -16;
}
/* Check to see if we saved SP into the stack. This also
@@ -2287,7 +1682,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
&& (!u->Save_SP || reg != HPPA_FP_REGNUM))
{
saved_gr_mask &= ~(1 << reg);
- if ((inst >> 26) == 0x1b && extract_14 (inst) >= 0)
+ if ((inst >> 26) == 0x1b && hppa_extract_14 (inst) >= 0)
/* stwm with a positive displacement is a _post_
_modify_. */
cache->saved_regs[reg].addr = 0;
@@ -2301,9 +1696,9 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
if ((inst >> 26) == 0x1c)
offset = (inst & 0x1 ? -1 << 13 : 0) | (((inst >> 4) & 0x3ff) << 3);
else if ((inst >> 26) == 0x03)
- offset = low_sign_extend (inst & 0x1f, 5);
+ offset = hppa_low_hppa_sign_extend (inst & 0x1f, 5);
else
- offset = extract_14 (inst);
+ offset = hppa_extract_14 (inst);
/* Handle code with and without frame pointers. */
if (u->Save_SP)
@@ -2325,7 +1720,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
/* ldo X(%r3),%r1 or ldo X(%r30),%r1. */
if ((inst & 0xffffc000) == 0x34610000
|| (inst & 0xffffc000) == 0x37c10000)
- fp_loc = extract_14 (inst);
+ fp_loc = hppa_extract_14 (inst);
reg = inst_saves_fr (inst);
if (reg >= 12 && reg <= 21)
@@ -2339,7 +1734,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
/* 1st HP CC FP register store. After this
instruction we've set enough state that the GCC and
HPCC code are both handled in the same manner. */
- cache->saved_regs[reg + FP4_REGNUM + 4].addr = 0;
+ cache->saved_regs[reg + HPPA_FP4_REGNUM + 4].addr = 0;
fp_loc = 8;
}
else
@@ -2364,26 +1759,102 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
the current function (and is thus equivalent to the "saved"
stack pointer. */
CORE_ADDR this_sp = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
- /* FIXME: cagney/2004-02-22: This assumes that the frame has been
- created. If it hasn't everything will be out-of-wack. */
- if (u->Save_SP && trad_frame_addr_p (cache->saved_regs, HPPA_SP_REGNUM))
- /* Both we're expecting the SP to be saved and the SP has been
- saved. The entry SP value is saved at this frame's SP
- address. */
- cache->base = read_memory_integer (this_sp, TARGET_PTR_BIT / 8);
+ CORE_ADDR fp;
+
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, " (this_sp=0x%s, pc=0x%s, "
+ "prologue_end=0x%s) ",
+ paddr_nz (this_sp),
+ paddr_nz (frame_pc_unwind (next_frame)),
+ paddr_nz (prologue_end));
+
+ /* Check to see if a frame pointer is available, and use it for
+ frame unwinding if it is.
+
+ There are some situations where we need to rely on the frame
+ pointer to do stack unwinding. For example, if a function calls
+ alloca (), the stack pointer can get adjusted inside the body of
+ the function. In this case, the ABI requires that the compiler
+ maintain a frame pointer for the function.
+
+ The unwind record has a flag (alloca_frame) that indicates that
+ a function has a variable frame; unfortunately, gcc/binutils
+ does not set this flag. Instead, whenever a frame pointer is used
+ and saved on the stack, the Save_SP flag is set. We use this to
+ decide whether to use the frame pointer for unwinding.
+
+ fp may be zero if it is not available in an inner frame because
+ it has been modified by not yet saved.
+
+ TODO: For the HP compiler, maybe we should use the alloca_frame flag
+ instead of Save_SP. */
+
+ fp = frame_unwind_register_unsigned (next_frame, HPPA_FP_REGNUM);
+
+ if (frame_pc_unwind (next_frame) >= prologue_end
+ && u->Save_SP && fp != 0)
+ {
+ cache->base = fp;
+
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, " (base=0x%s) [frame pointer] }",
+ paddr_nz (cache->base));
+ }
+ else if (u->Save_SP
+ && trad_frame_addr_p (cache->saved_regs, HPPA_SP_REGNUM))
+ {
+ /* Both we're expecting the SP to be saved and the SP has been
+ saved. The entry SP value is saved at this frame's SP
+ address. */
+ cache->base = read_memory_integer (this_sp, TARGET_PTR_BIT / 8);
+
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, " (base=0x%s) [saved] }",
+ paddr_nz (cache->base));
+ }
else
- /* The prologue has been slowly allocating stack space. Adjust
- the SP back. */
- cache->base = this_sp - frame_size;
+ {
+ /* The prologue has been slowly allocating stack space. Adjust
+ the SP back. */
+ cache->base = this_sp - frame_size;
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, " (base=0x%s) [unwind adjust] } ",
+ paddr_nz (cache->base));
+
+ }
trad_frame_set_value (cache->saved_regs, HPPA_SP_REGNUM, cache->base);
}
/* The PC is found in the "return register", "Millicode" uses "r31"
as the return register while normal code uses "rp". */
if (u->Millicode)
- cache->saved_regs[PCOQ_HEAD_REGNUM] = cache->saved_regs[31];
+ {
+ if (trad_frame_addr_p (cache->saved_regs, 31))
+ cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM] = cache->saved_regs[31];
+ else
+ {
+ ULONGEST r31 = frame_unwind_register_unsigned (next_frame, 31);
+ trad_frame_set_value (cache->saved_regs, HPPA_PCOQ_HEAD_REGNUM, r31);
+ }
+ }
else
- cache->saved_regs[PCOQ_HEAD_REGNUM] = cache->saved_regs[RP_REGNUM];
+ {
+ if (trad_frame_addr_p (cache->saved_regs, HPPA_RP_REGNUM))
+ cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM] = cache->saved_regs[HPPA_RP_REGNUM];
+ else
+ {
+ ULONGEST rp = frame_unwind_register_unsigned (next_frame, HPPA_RP_REGNUM);
+ trad_frame_set_value (cache->saved_regs, HPPA_PCOQ_HEAD_REGNUM, rp);
+ }
+ }
+
+ /* If the frame pointer was not saved in this frame, but we should be saving
+ it, set it to an invalid value so that another frame will not pick up the
+ wrong frame pointer. This can happen if we start unwinding after the
+ frame pointer has been modified, but before we've saved it to the
+ stack. */
+ if (u->Save_SP && !trad_frame_addr_p (cache->saved_regs, HPPA_FP_REGNUM))
+ trad_frame_set_value (cache->saved_regs, HPPA_FP_REGNUM, 0);
{
/* Convert all the offsets into addresses. */
@@ -2395,6 +1866,9 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache)
}
}
+ if (hppa_debug)
+ fprintf_unfiltered (gdb_stdlog, "base=0x%s }",
+ paddr_nz (((struct hppa_frame_cache *)*this_cache)->base));
return (*this_cache);
}
@@ -2408,42 +1882,14 @@ hppa_frame_this_id (struct frame_info *next_frame, void **this_cache,
static void
hppa_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)
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
{
struct hppa_frame_cache *info = hppa_frame_cache (next_frame, this_cache);
- struct gdbarch *gdbarch = get_frame_arch (next_frame);
- if (regnum == PCOQ_TAIL_REGNUM)
- {
- /* The PCOQ TAIL, or NPC, needs to be computed from the unwound
- PC register. */
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = 0;
- if (valuep)
- {
- int regsize = register_size (gdbarch, PCOQ_HEAD_REGNUM);
- CORE_ADDR pc;
- int optimized;
- enum lval_type lval;
- CORE_ADDR addr;
- int realnum;
- bfd_byte value[MAX_REGISTER_SIZE];
- trad_frame_prev_register (next_frame, info->saved_regs,
- PCOQ_HEAD_REGNUM, &optimized, &lval, &addr,
- &realnum, &value);
- pc = extract_unsigned_integer (&value, regsize);
- store_unsigned_integer (valuep, regsize, pc + 4);
- }
- }
- else
- {
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
- }
+ hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind hppa_frame_unwind =
@@ -2456,497 +1902,215 @@ static const struct frame_unwind hppa_frame_unwind =
static const struct frame_unwind *
hppa_frame_unwind_sniffer (struct frame_info *next_frame)
{
- return &hppa_frame_unwind;
-}
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
-static CORE_ADDR
-hppa_frame_base_address (struct frame_info *next_frame,
- void **this_cache)
-{
- struct hppa_frame_cache *info = hppa_frame_cache (next_frame,
- this_cache);
- return info->base;
+ if (find_unwind_entry (pc))
+ return &hppa_frame_unwind;
+
+ return NULL;
}
-static const struct frame_base hppa_frame_base = {
- &hppa_frame_unwind,
- hppa_frame_base_address,
- hppa_frame_base_address,
- hppa_frame_base_address
-};
+/* This is a generic fallback frame unwinder that kicks in if we fail all
+ the other ones. Normally we would expect the stub and regular unwinder
+ to work, but in some cases we might hit a function that just doesn't
+ have any unwind information available. In this case we try to do
+ unwinding solely based on code reading. This is obviously going to be
+ slow, so only use this as a last resort. Currently this will only
+ identify the stack and pc for the frame. */
-static const struct frame_base *
-hppa_frame_base_sniffer (struct frame_info *next_frame)
+static struct hppa_frame_cache *
+hppa_fallback_frame_cache (struct frame_info *next_frame, void **this_cache)
{
- return &hppa_frame_base;
-}
+ struct hppa_frame_cache *cache;
+ unsigned int frame_size;
+ CORE_ADDR pc, start_pc, end_pc, cur_pc;
-static struct frame_id
-hppa_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_id_build (frame_unwind_register_unsigned (next_frame,
- HPPA_SP_REGNUM),
- frame_pc_unwind (next_frame));
-}
+ cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache);
+ (*this_cache) = cache;
+ cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
-static CORE_ADDR
-hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_signed (next_frame, PCOQ_HEAD_REGNUM) & ~3;
-}
-
-/* Exception handling support for the HP-UX ANSI C++ compiler.
- The compiler (aCC) provides a callback for exception events;
- GDB can set a breakpoint on this callback and find out what
- exception event has occurred. */
-
-/* The name of the hook to be set to point to the callback function */
-static char HP_ACC_EH_notify_hook[] = "__eh_notify_hook";
-/* The name of the function to be used to set the hook value */
-static char HP_ACC_EH_set_hook_value[] = "__eh_set_hook_value";
-/* The name of the callback function in end.o */
-static char HP_ACC_EH_notify_callback[] = "__d_eh_notify_callback";
-/* Name of function in end.o on which a break is set (called by above) */
-static char HP_ACC_EH_break[] = "__d_eh_break";
-/* Name of flag (in end.o) that enables catching throws */
-static char HP_ACC_EH_catch_throw[] = "__d_eh_catch_throw";
-/* Name of flag (in end.o) that enables catching catching */
-static char HP_ACC_EH_catch_catch[] = "__d_eh_catch_catch";
-/* The enum used by aCC */
-typedef enum
- {
- __EH_NOTIFY_THROW,
- __EH_NOTIFY_CATCH
- }
-__eh_notification;
-
-/* Is exception-handling support available with this executable? */
-static int hp_cxx_exception_support = 0;
-/* Has the initialize function been run? */
-int hp_cxx_exception_support_initialized = 0;
-/* Similar to above, but imported from breakpoint.c -- non-target-specific */
-extern int exception_support_initialized;
-/* Address of __eh_notify_hook */
-static CORE_ADDR eh_notify_hook_addr = 0;
-/* Address of __d_eh_notify_callback */
-static CORE_ADDR eh_notify_callback_addr = 0;
-/* Address of __d_eh_break */
-static CORE_ADDR eh_break_addr = 0;
-/* Address of __d_eh_catch_catch */
-static CORE_ADDR eh_catch_catch_addr = 0;
-/* Address of __d_eh_catch_throw */
-static CORE_ADDR eh_catch_throw_addr = 0;
-/* Sal for __d_eh_break */
-static struct symtab_and_line *break_callback_sal = 0;
-
-/* Code in end.c expects __d_pid to be set in the inferior,
- otherwise __d_eh_notify_callback doesn't bother to call
- __d_eh_break! So we poke the pid into this symbol
- ourselves.
- 0 => success
- 1 => failure */
-int
-setup_d_pid_in_inferior (void)
-{
- CORE_ADDR anaddr;
- struct minimal_symbol *msymbol;
- char buf[4]; /* FIXME 32x64? */
+ pc = frame_func_unwind (next_frame);
+ cur_pc = frame_pc_unwind (next_frame);
+ frame_size = 0;
- /* Slam the pid of the process into __d_pid; failing is only a warning! */
- msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
- if (msymbol == NULL)
- {
- warning ("Unable to find __d_pid symbol in object file.");
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
- return 1;
- }
+ find_pc_partial_function (pc, NULL, &start_pc, &end_pc);
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
- store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */
- if (target_write_memory (anaddr, buf, 4)) /* FIXME 32x64? */
+ if (start_pc == 0 || end_pc == 0)
{
- warning ("Unable to write __d_pid");
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
- return 1;
+ error ("Cannot find bounds of current function (@0x%s), unwinding will "
+ "fail.", paddr_nz (pc));
+ return cache;
}
- return 0;
-}
-/* Initialize exception catchpoint support by looking for the
- necessary hooks/callbacks in end.o, etc., and set the hook value to
- point to the required debug function
+ if (end_pc > cur_pc)
+ end_pc = cur_pc;
- Return 0 => failure
- 1 => success */
+ for (pc = start_pc; pc < end_pc; pc += 4)
+ {
+ unsigned int insn;
-static int
-initialize_hp_cxx_exception_support (void)
-{
- struct symtabs_and_lines sals;
- struct cleanup *old_chain;
- struct cleanup *canonical_strings_chain = NULL;
- int i;
- char *addr_start;
- char *addr_end = NULL;
- char **canonical = (char **) NULL;
- int thread = -1;
- struct symbol *sym = NULL;
- struct minimal_symbol *msym = NULL;
- struct objfile *objfile;
- asection *shlib_info;
+ insn = read_memory_unsigned_integer (pc, 4);
- /* Detect and disallow recursion. On HP-UX with aCC, infinite
- recursion is a possibility because finding the hook for exception
- callbacks involves making a call in the inferior, which means
- re-inserting breakpoints which can re-invoke this code */
+ frame_size += prologue_inst_adjust_sp (insn);
- static int recurse = 0;
- if (recurse > 0)
- {
- hp_cxx_exception_support_initialized = 0;
- exception_support_initialized = 0;
- return 0;
+ /* There are limited ways to store the return pointer into the
+ stack. */
+ if (insn == 0x6bc23fd9) /* stw rp,-0x14(sr0,sp) */
+ cache->saved_regs[HPPA_RP_REGNUM].addr = -20;
+ else if (insn == 0x0fc212c1) /* std rp,-0x10(sr0,sp) */
+ cache->saved_regs[HPPA_RP_REGNUM].addr = -16;
}
- hp_cxx_exception_support = 0;
-
- /* First check if we have seen any HP compiled objects; if not,
- it is very unlikely that HP's idiosyncratic callback mechanism
- for exception handling debug support will be available!
- This will percolate back up to breakpoint.c, where our callers
- will decide to try the g++ exception-handling support instead. */
- if (!hp_som_som_object_present)
- return 0;
+ cache->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM) - frame_size;
+ trad_frame_set_value (cache->saved_regs, HPPA_SP_REGNUM, cache->base);
- /* We have a SOM executable with SOM debug info; find the hooks */
-
- /* First look for the notify hook provided by aCC runtime libs */
- /* If we find this symbol, we conclude that the executable must
- have HP aCC exception support built in. If this symbol is not
- found, even though we're a HP SOM-SOM file, we may have been
- built with some other compiler (not aCC). This results percolates
- back up to our callers in breakpoint.c which can decide to
- try the g++ style of exception support instead.
- If this symbol is found but the other symbols we require are
- not found, there is something weird going on, and g++ support
- should *not* be tried as an alternative.
-
- ASSUMPTION: Only HP aCC code will have __eh_notify_hook defined.
- ASSUMPTION: HP aCC and g++ modules cannot be linked together. */
-
- /* libCsup has this hook; it'll usually be non-debuggable */
- msym = lookup_minimal_symbol (HP_ACC_EH_notify_hook, NULL, NULL);
- if (msym)
+ if (trad_frame_addr_p (cache->saved_regs, HPPA_RP_REGNUM))
{
- eh_notify_hook_addr = SYMBOL_VALUE_ADDRESS (msym);
- hp_cxx_exception_support = 1;
+ cache->saved_regs[HPPA_RP_REGNUM].addr += cache->base;
+ cache->saved_regs[HPPA_PCOQ_HEAD_REGNUM] = cache->saved_regs[HPPA_RP_REGNUM];
}
else
{
- warning ("Unable to find exception callback hook (%s).", HP_ACC_EH_notify_hook);
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("GDB will be unable to intercept exception events.");
- eh_notify_hook_addr = 0;
- hp_cxx_exception_support = 0;
- return 0;
+ ULONGEST rp = frame_unwind_register_unsigned (next_frame, HPPA_RP_REGNUM);
+ trad_frame_set_value (cache->saved_regs, HPPA_PCOQ_HEAD_REGNUM, rp);
}
- /* Next look for the notify callback routine in end.o */
- /* This is always available in the SOM symbol dictionary if end.o is linked in */
- msym = lookup_minimal_symbol (HP_ACC_EH_notify_callback, NULL, NULL);
- if (msym)
- {
- eh_notify_callback_addr = SYMBOL_VALUE_ADDRESS (msym);
- hp_cxx_exception_support = 1;
- }
- else
- {
- warning ("Unable to find exception callback routine (%s).", HP_ACC_EH_notify_callback);
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
- warning ("GDB will be unable to intercept exception events.");
- eh_notify_callback_addr = 0;
- return 0;
- }
+ return cache;
+}
-#ifndef GDB_TARGET_IS_HPPA_20W
- /* Check whether the executable is dynamically linked or archive bound */
- /* With an archive-bound executable we can use the raw addresses we find
- for the callback function, etc. without modification. For an executable
- with shared libraries, we have to do more work to find the plabel, which
- can be the target of a call through $$dyncall from the aCC runtime support
- library (libCsup) which is linked shared by default by aCC. */
- /* This test below was copied from somsolib.c/somread.c. It may not be a very
- reliable one to test that an executable is linked shared. pai/1997-07-18 */
- shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
- if (shlib_info && (bfd_section_size (symfile_objfile->obfd, shlib_info) != 0))
- {
- /* The minsym we have has the local code address, but that's not the
- plabel that can be used by an inter-load-module call. */
- /* Find solib handle for main image (which has end.o), and use that
- and the min sym as arguments to __d_shl_get() (which does the equivalent
- of shl_findsym()) to find the plabel. */
+static void
+hppa_fallback_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct hppa_frame_cache *info =
+ hppa_fallback_frame_cache (next_frame, this_cache);
+ (*this_id) = frame_id_build (info->base, frame_func_unwind (next_frame));
+}
- args_for_find_stub args;
- static char message[] = "Error while finding exception callback hook:\n";
+static void
+hppa_fallback_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 hppa_frame_cache *info =
+ hppa_fallback_frame_cache (next_frame, this_cache);
+ hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
- args.solib_handle = som_solib_get_solib_by_pc (eh_notify_callback_addr);
- args.msym = msym;
- args.return_val = 0;
+static const struct frame_unwind hppa_fallback_frame_unwind =
+{
+ NORMAL_FRAME,
+ hppa_fallback_frame_this_id,
+ hppa_fallback_frame_prev_register
+};
- recurse++;
- catch_errors (cover_find_stub_with_shl_get, &args, message,
- RETURN_MASK_ALL);
- eh_notify_callback_addr = args.return_val;
- recurse--;
+static const struct frame_unwind *
+hppa_fallback_unwind_sniffer (struct frame_info *next_frame)
+{
+ return &hppa_fallback_frame_unwind;
+}
- exception_catchpoints_are_fragile = 1;
+/* Stub frames, used for all kinds of call stubs. */
+struct hppa_stub_unwind_cache
+{
+ CORE_ADDR base;
+ struct trad_frame_saved_reg *saved_regs;
+};
- if (!eh_notify_callback_addr)
- {
- /* We can get here either if there is no plabel in the export list
- for the main image, or if something strange happened (?) */
- warning ("Couldn't find a plabel (indirect function label) for the exception callback.");
- warning ("GDB will not be able to intercept exception events.");
- return 0;
- }
- }
- else
- exception_catchpoints_are_fragile = 0;
-#endif
+static struct hppa_stub_unwind_cache *
+hppa_stub_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_cache)
+{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct hppa_stub_unwind_cache *info;
+ struct unwind_table_entry *u;
- /* Now, look for the breakpointable routine in end.o */
- /* This should also be available in the SOM symbol dict. if end.o linked in */
- msym = lookup_minimal_symbol (HP_ACC_EH_break, NULL, NULL);
- if (msym)
- {
- eh_break_addr = SYMBOL_VALUE_ADDRESS (msym);
- hp_cxx_exception_support = 1;
- }
- else
- {
- warning ("Unable to find exception callback routine to set breakpoint (%s).", HP_ACC_EH_break);
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
- warning ("GDB will be unable to intercept exception events.");
- eh_break_addr = 0;
- return 0;
- }
+ if (*this_cache)
+ return *this_cache;
- /* Next look for the catch enable flag provided in end.o */
- sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
- VAR_DOMAIN, 0, (struct symtab **) NULL);
- if (sym) /* sometimes present in debug info */
- {
- eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (sym);
- hp_cxx_exception_support = 1;
- }
- else
- /* otherwise look in SOM symbol dict. */
- {
- msym = lookup_minimal_symbol (HP_ACC_EH_catch_catch, NULL, NULL);
- if (msym)
- {
- eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (msym);
- hp_cxx_exception_support = 1;
- }
- else
- {
- warning ("Unable to enable interception of exception catches.");
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
- return 0;
- }
- }
+ info = FRAME_OBSTACK_ZALLOC (struct hppa_stub_unwind_cache);
+ *this_cache = info;
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
- /* Next look for the catch enable flag provided end.o */
- sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
- VAR_DOMAIN, 0, (struct symtab **) NULL);
- if (sym) /* sometimes present in debug info */
- {
- eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (sym);
- hp_cxx_exception_support = 1;
- }
- else
- /* otherwise look in SOM symbol dict. */
+ info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+
+ if (gdbarch_osabi (gdbarch) == GDB_OSABI_HPUX_SOM)
{
- msym = lookup_minimal_symbol (HP_ACC_EH_catch_throw, NULL, NULL);
- if (msym)
- {
- eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (msym);
- hp_cxx_exception_support = 1;
- }
- else
+ /* HPUX uses export stubs in function calls; the export stub clobbers
+ the return value of the caller, and, later restores it from the
+ stack. */
+ u = find_unwind_entry (frame_pc_unwind (next_frame));
+
+ if (u && u->stub_unwind.stub_type == EXPORT)
{
- warning ("Unable to enable interception of exception throws.");
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
- return 0;
+ info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24;
+
+ return info;
}
}
- /* Set the flags */
- hp_cxx_exception_support = 2; /* everything worked so far */
- hp_cxx_exception_support_initialized = 1;
- exception_support_initialized = 1;
+ /* By default we assume that stubs do not change the rp. */
+ info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].realreg = HPPA_RP_REGNUM;
- return 1;
+ return info;
}
-/* Target operation for enabling or disabling interception of
- exception events.
- KIND is either EX_EVENT_THROW or EX_EVENT_CATCH
- ENABLE is either 0 (disable) or 1 (enable).
- Return value is NULL if no support found;
- -1 if something went wrong,
- or a pointer to a symtab/line struct if the breakpointable
- address was found. */
+static void
+hppa_stub_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
+{
+ struct hppa_stub_unwind_cache *info
+ = hppa_stub_frame_unwind_cache (next_frame, this_prologue_cache);
+ *this_id = frame_id_build (info->base, frame_pc_unwind (next_frame));
+}
-struct symtab_and_line *
-child_enable_exception_callback (enum exception_event_kind kind, int enable)
+static void
+hppa_stub_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 *valuep)
{
- char buf[4];
+ struct hppa_stub_unwind_cache *info
+ = hppa_stub_frame_unwind_cache (next_frame, this_prologue_cache);
+ hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
- if (!exception_support_initialized || !hp_cxx_exception_support_initialized)
- if (!initialize_hp_cxx_exception_support ())
- return NULL;
+static const struct frame_unwind hppa_stub_frame_unwind = {
+ NORMAL_FRAME,
+ hppa_stub_frame_this_id,
+ hppa_stub_frame_prev_register
+};
- switch (hp_cxx_exception_support)
- {
- case 0:
- /* Assuming no HP support at all */
- return NULL;
- case 1:
- /* HP support should be present, but something went wrong */
- return (struct symtab_and_line *) -1; /* yuck! */
- /* there may be other cases in the future */
- }
+static const struct frame_unwind *
+hppa_stub_unwind_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
- /* Set the EH hook to point to the callback routine */
- store_unsigned_integer (buf, 4, enable ? eh_notify_callback_addr : 0); /* FIXME 32x64 problem */
- /* pai: (temp) FIXME should there be a pack operation first? */
- if (target_write_memory (eh_notify_hook_addr, buf, 4)) /* FIXME 32x64 problem */
- {
- warning ("Could not write to target memory for exception event callback.");
- warning ("Interception of exception events may not work.");
- return (struct symtab_and_line *) -1;
- }
- if (enable)
- {
- /* Ensure that __d_pid is set up correctly -- end.c code checks this. :-( */
- if (PIDGET (inferior_ptid) > 0)
- {
- if (setup_d_pid_in_inferior ())
- return (struct symtab_and_line *) -1;
- }
- else
- {
- warning ("Internal error: Invalid inferior pid? Cannot intercept exception events.");
- return (struct symtab_and_line *) -1;
- }
- }
+ if (pc == 0
+ || IN_SOLIB_CALL_TRAMPOLINE (pc, NULL)
+ || IN_SOLIB_RETURN_TRAMPOLINE (pc, NULL))
+ return &hppa_stub_frame_unwind;
+ return NULL;
+}
- switch (kind)
- {
- case EX_EVENT_THROW:
- store_unsigned_integer (buf, 4, enable ? 1 : 0);
- if (target_write_memory (eh_catch_throw_addr, buf, 4)) /* FIXME 32x64? */
- {
- warning ("Couldn't enable exception throw interception.");
- return (struct symtab_and_line *) -1;
- }
- break;
- case EX_EVENT_CATCH:
- store_unsigned_integer (buf, 4, enable ? 1 : 0);
- if (target_write_memory (eh_catch_catch_addr, buf, 4)) /* FIXME 32x64? */
- {
- warning ("Couldn't enable exception catch interception.");
- return (struct symtab_and_line *) -1;
- }
- break;
- default:
- error ("Request to enable unknown or unsupported exception event.");
- }
+static struct frame_id
+hppa_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_id_build (frame_unwind_register_unsigned (next_frame,
+ HPPA_SP_REGNUM),
+ frame_pc_unwind (next_frame));
+}
- /* Copy break address into new sal struct, malloc'ing if needed. */
- if (!break_callback_sal)
- {
- break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
- }
- init_sal (break_callback_sal);
- break_callback_sal->symtab = NULL;
- break_callback_sal->pc = eh_break_addr;
- break_callback_sal->line = 0;
- break_callback_sal->end = eh_break_addr;
-
- return break_callback_sal;
-}
-
-/* Record some information about the current exception event */
-static struct exception_event_record current_ex_event;
-/* Convenience struct */
-static struct symtab_and_line null_symtab_and_line =
-{NULL, 0, 0, 0};
-
-/* Report current exception event. Returns a pointer to a record
- that describes the kind of the event, where it was thrown from,
- and where it will be caught. More information may be reported
- in the future */
-struct exception_event_record *
-child_get_current_exception_event (void)
-{
- CORE_ADDR event_kind;
- CORE_ADDR throw_addr;
- CORE_ADDR catch_addr;
- struct frame_info *fi, *curr_frame;
- int level = 1;
-
- curr_frame = get_current_frame ();
- if (!curr_frame)
- return (struct exception_event_record *) NULL;
-
- /* Go up one frame to __d_eh_notify_callback, because at the
- point when this code is executed, there's garbage in the
- arguments of __d_eh_break. */
- fi = find_relative_frame (curr_frame, &level);
- if (level != 0)
- return (struct exception_event_record *) NULL;
-
- select_frame (fi);
-
- /* Read in the arguments */
- /* __d_eh_notify_callback() is called with 3 arguments:
- 1. event kind catch or throw
- 2. the target address if known
- 3. a flag -- not sure what this is. pai/1997-07-17 */
- event_kind = read_register (ARG0_REGNUM);
- catch_addr = read_register (ARG1_REGNUM);
-
- /* Now go down to a user frame */
- /* For a throw, __d_eh_break is called by
- __d_eh_notify_callback which is called by
- __notify_throw which is called
- from user code.
- For a catch, __d_eh_break is called by
- __d_eh_notify_callback which is called by
- <stackwalking stuff> which is called by
- __throw__<stuff> or __rethrow_<stuff> which is called
- from user code. */
- /* FIXME: Don't use such magic numbers; search for the frames */
- level = (event_kind == EX_EVENT_THROW) ? 3 : 4;
- fi = find_relative_frame (curr_frame, &level);
- if (level != 0)
- return (struct exception_event_record *) NULL;
-
- select_frame (fi);
- throw_addr = get_frame_pc (fi);
-
- /* Go back to original (top) frame */
- select_frame (curr_frame);
-
- current_ex_event.kind = (enum exception_event_kind) event_kind;
- current_ex_event.throw_sal = find_pc_line (throw_addr, 1);
- current_ex_event.catch_sal = find_pc_line (catch_addr, 1);
-
- return &current_ex_event;
+static CORE_ADDR
+hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_unwind_register_signed (next_frame, HPPA_PCOQ_HEAD_REGNUM) & ~3;
}
/* Instead of this nasty cast, add a method pvoid() that prints out a
@@ -3039,29 +2203,14 @@ hppa_skip_permanent_breakpoint (void)
front to the back. But what do we put in the back? What
instruction comes after that one? Because of the branch delay
slot, the next insn is always at the back + 4. */
- write_register (PCOQ_HEAD_REGNUM, read_register (PCOQ_TAIL_REGNUM));
- write_register (PCSQ_HEAD_REGNUM, read_register (PCSQ_TAIL_REGNUM));
+ write_register (HPPA_PCOQ_HEAD_REGNUM, read_register (HPPA_PCOQ_TAIL_REGNUM));
+ write_register (HPPA_PCSQ_HEAD_REGNUM, read_register (HPPA_PCSQ_TAIL_REGNUM));
- write_register (PCOQ_TAIL_REGNUM, read_register (PCOQ_TAIL_REGNUM) + 4);
+ write_register (HPPA_PCOQ_TAIL_REGNUM, read_register (HPPA_PCOQ_TAIL_REGNUM) + 4);
/* We can leave the tail's space the same, since there's no jump. */
}
int
-hppa_reg_struct_has_addr (int gcc_p, struct type *type)
-{
- /* On the PA, any pass-by-value structure > 8 bytes is actually passed
- via a pointer regardless of its type or the compiler used. */
- return (TYPE_LENGTH (type) > 8);
-}
-
-int
-hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs)
-{
- /* Stack grows upward */
- return (lhs > rhs);
-}
-
-int
hppa_pc_requires_run_before_use (CORE_ADDR pc)
{
/* Sometimes we may pluck out a minimal symbol that has a negative address.
@@ -3095,8 +2244,8 @@ hppa_instruction_nullified (void)
/* brobecker 2002/11/07: Couldn't we use a ULONGEST here? It would
avoid the type cast. I'm leaving it as is for now as I'm doing
semi-mechanical multiarching-related changes. */
- const int ipsw = (int) read_register (IPSW_REGNUM);
- const int flags = (int) read_register (FLAGS_REGNUM);
+ const int ipsw = (int) read_register (HPPA_IPSW_REGNUM);
+ const int flags = (int) read_register (HPPA_FLAGS_REGNUM);
return ((ipsw & 0x00200000) && !(flags & 0x2));
}
@@ -3107,7 +2256,7 @@ hppa_instruction_nullified (void)
static struct type *
hppa32_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- if (reg_nr < FP4_REGNUM)
+ if (reg_nr < HPPA_FP4_REGNUM)
return builtin_type_uint32;
else
return builtin_type_ieee_single_big;
@@ -3119,7 +2268,7 @@ hppa32_register_type (struct gdbarch *gdbarch, int reg_nr)
static struct type *
hppa64_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- if (reg_nr < FP4_REGNUM)
+ if (reg_nr < HPPA_FP4_REGNUM)
return builtin_type_uint64;
else
return builtin_type_ieee_double_big;
@@ -3128,17 +2277,17 @@ hppa64_register_type (struct gdbarch *gdbarch, int reg_nr)
/* Return True if REGNUM is not a register available to the user
through ptrace(). */
-int
+static int
hppa_cannot_store_register (int regnum)
{
return (regnum == 0
- || regnum == PCSQ_HEAD_REGNUM
- || (regnum >= PCSQ_TAIL_REGNUM && regnum < IPSW_REGNUM)
- || (regnum > IPSW_REGNUM && regnum < FP4_REGNUM));
+ || regnum == HPPA_PCSQ_HEAD_REGNUM
+ || (regnum >= HPPA_PCSQ_TAIL_REGNUM && regnum < HPPA_IPSW_REGNUM)
+ || (regnum > HPPA_IPSW_REGNUM && regnum < HPPA_FP4_REGNUM));
}
-CORE_ADDR
+static CORE_ADDR
hppa_smash_text_address (CORE_ADDR addr)
{
/* The low two bits of the PC on the PA contain the privilege level.
@@ -3157,10 +2306,62 @@ hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type)
{
CORE_ADDR addr;
- get_frame_register (frame, R0_REGNUM + 26 - argi, &addr);
+ get_frame_register (frame, HPPA_R0_REGNUM + 26 - argi, &addr);
return addr;
}
+static void
+hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int regnum, void *buf)
+{
+ ULONGEST tmp;
+
+ regcache_raw_read_unsigned (regcache, regnum, &tmp);
+ if (regnum == HPPA_PCOQ_HEAD_REGNUM || regnum == HPPA_PCOQ_TAIL_REGNUM)
+ tmp &= ~0x3;
+ store_unsigned_integer (buf, sizeof(tmp), tmp);
+}
+
+static CORE_ADDR
+hppa_find_global_pointer (struct value *function)
+{
+ return 0;
+}
+
+void
+hppa_frame_prev_register_helper (struct frame_info *next_frame,
+ struct trad_frame_saved_reg saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ if (regnum == HPPA_PCOQ_TAIL_REGNUM)
+ {
+ if (valuep)
+ {
+ CORE_ADDR pc;
+
+ trad_frame_get_prev_register (next_frame, saved_regs,
+ HPPA_PCOQ_HEAD_REGNUM, optimizedp,
+ lvalp, addrp, realnump, valuep);
+
+ pc = extract_unsigned_integer (valuep, 4);
+ store_unsigned_integer (valuep, 4, pc + 4);
+ }
+
+ /* It's a computed value. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ return;
+ }
+
+ trad_frame_get_prev_register (next_frame, saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+
/* Here is a table of C type sizes on hppa with various compiles
and options. I measured this on PA 9000/800 with HP-UX 11.11
and these compilers:
@@ -3216,7 +2417,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (arches->gdbarch);
/* If none found, then allocate and initialize one. */
- tdep = XMALLOC (struct gdbarch_tdep);
+ tdep = XZALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
/* Determine from the bfd_arch_info structure if we are dealing with
@@ -3228,6 +2429,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
tdep->bytes_per_address = 4;
+ tdep->find_global_pointer = hppa_find_global_pointer;
+
/* Some parts of the gdbarch vector depend on whether we are running
on a 32 bits or 64 bits target. */
switch (tdep->bytes_per_address)
@@ -3259,14 +2462,11 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* The following gdbarch vector elements do not depend on the address
size, or in any other gdbarch element previously set. */
set_gdbarch_skip_prologue (gdbarch, hppa_skip_prologue);
- set_gdbarch_skip_trampoline_code (gdbarch, hppa_skip_trampoline_code);
- set_gdbarch_in_solib_call_trampoline (gdbarch, hppa_in_solib_call_trampoline);
- set_gdbarch_in_solib_return_trampoline (gdbarch,
- hppa_in_solib_return_trampoline);
- set_gdbarch_inner_than (gdbarch, hppa_inner_than);
+ set_gdbarch_inner_than (gdbarch, core_addr_greaterthan);
set_gdbarch_sp_regnum (gdbarch, HPPA_SP_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, HPPA_FP0_REGNUM);
set_gdbarch_cannot_store_register (gdbarch, hppa_cannot_store_register);
+ set_gdbarch_cannot_fetch_register (gdbarch, hppa_cannot_store_register);
set_gdbarch_addr_bits_remove (gdbarch, hppa_smash_text_address);
set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
@@ -3290,6 +2490,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
case 4:
set_gdbarch_push_dummy_call (gdbarch, hppa32_push_dummy_call);
set_gdbarch_frame_align (gdbarch, hppa32_frame_align);
+ set_gdbarch_convert_from_func_ptr_addr
+ (gdbarch, hppa32_convert_from_func_ptr_addr);
break;
case 8:
set_gdbarch_push_dummy_call (gdbarch, hppa64_push_dummy_call);
@@ -3312,22 +2514,32 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
internal_error (__FILE__, __LINE__, "bad switch");
}
+ set_gdbarch_breakpoint_from_pc (gdbarch, hppa_breakpoint_from_pc);
+ set_gdbarch_pseudo_register_read (gdbarch, hppa_pseudo_register_read);
+
/* Frame unwind methods. */
set_gdbarch_unwind_dummy_id (gdbarch, hppa_unwind_dummy_id);
set_gdbarch_unwind_pc (gdbarch, hppa_unwind_pc);
- frame_unwind_append_sniffer (gdbarch, hppa_frame_unwind_sniffer);
- frame_base_append_sniffer (gdbarch, hppa_frame_base_sniffer);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
+ /* Hook in the default unwinders. */
+ frame_unwind_append_sniffer (gdbarch, hppa_stub_unwind_sniffer);
+ frame_unwind_append_sniffer (gdbarch, hppa_frame_unwind_sniffer);
+ frame_unwind_append_sniffer (gdbarch, hppa_fallback_unwind_sniffer);
+
return gdbarch;
}
static void
hppa_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
{
- /* Nothing to print for the moment. */
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ fprintf_unfiltered (file, "bytes_per_address = %d\n",
+ tdep->bytes_per_address);
+ fprintf_unfiltered (file, "elf = %s\n", tdep->is_elf ? "yes" : "no");
}
void
@@ -3340,6 +2552,8 @@ _initialize_hppa_tdep (void)
gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
+ hppa_objfile_priv_data = register_objfile_data ();
+
add_cmd ("unwind", class_maintenance, unwind_command,
"Print unwind table entry at given address.",
&maintenanceprintlist);
@@ -3373,5 +2587,11 @@ be no argument or the argument must be a depth.\n"), NULL);
break_at_finish_at_depth_command,
"Set breakpoint at procedure exit. Either there should\n\
be no argument or the argument must be a depth.\n"), NULL);
-}
+ /* Debug this files internals. */
+ deprecated_add_show_from_set
+ (add_set_cmd ("hppa", class_maintenance, var_zinteger,
+ &hppa_debug, "Set hppa debugging.\n\
+When non-zero, hppa specific debugging is enabled.", &setdebuglist),
+ &showdebuglist);
+}
diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h
index 05a4e8965ad..26a7556a686 100644
--- a/gdb/hppa-tdep.h
+++ b/gdb/hppa-tdep.h
@@ -1,5 +1,5 @@
/* Common target dependent code for GDB on HPPA systems.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,12 +21,186 @@
#ifndef HPPA_TDEP_H
#define HPPA_TDEP_H
+struct trad_frame_saved_reg;
+
+/* Register numbers of various important registers.
+ Note that some of these values are "real" register numbers,
+ and correspond to the general registers of the machine,
+ and some are "phony" register numbers which are too large
+ to be actual register numbers as far as the user is concerned
+ but do serve to get the desired values when passed to read_register. */
+
+enum hppa_regnum
+{
+ HPPA_R0_REGNUM = 0, /* Doesn't actually exist, used as base for
+ other r registers. */
+ HPPA_R1_REGNUM = 1,
+ HPPA_FLAGS_REGNUM = 0, /* Various status flags */
+ HPPA_RP_REGNUM = 2, /* return pointer */
+ HPPA_FP_REGNUM = 3, /* The ABI's frame pointer, when used */
+ HPPA_SP_REGNUM = 30, /* Stack pointer. */
+ HPPA_R31_REGNUM = 31,
+ HPPA_SAR_REGNUM = 32, /* Shift Amount Register */
+ HPPA_IPSW_REGNUM = 41, /* Interrupt Processor Status Word */
+ HPPA_PCOQ_HEAD_REGNUM = 33, /* instruction offset queue head */
+ HPPA_PCSQ_HEAD_REGNUM = 34, /* instruction space queue head */
+ HPPA_PCOQ_TAIL_REGNUM = 35, /* instruction offset queue tail */
+ HPPA_PCSQ_TAIL_REGNUM = 36, /* instruction space queue tail */
+ HPPA_EIEM_REGNUM = 37, /* External Interrupt Enable Mask */
+ HPPA_IIR_REGNUM = 38, /* Interrupt Instruction Register */
+ HPPA_ISR_REGNUM = 39, /* Interrupt Space Register */
+ HPPA_IOR_REGNUM = 40, /* Interrupt Offset Register */
+ HPPA_SR4_REGNUM = 43, /* space register 4 */
+ HPPA_RCR_REGNUM = 51, /* Recover Counter (also known as cr0) */
+ HPPA_PID0_REGNUM = 52, /* Protection ID */
+ HPPA_PID1_REGNUM = 53, /* Protection ID */
+ HPPA_PID2_REGNUM = 55, /* Protection ID */
+ HPPA_PID3_REGNUM = 56, /* Protection ID */
+ HPPA_CCR_REGNUM = 54, /* Coprocessor Configuration Register */
+ HPPA_TR0_REGNUM = 57, /* Temporary Registers (cr24 -> cr31) */
+ HPPA_CR27_REGNUM = 60, /* Base register for thread-local storage, cr27 */
+ HPPA_FP0_REGNUM = 64, /* First floating-point. */
+ HPPA_FP4_REGNUM = 72,
+
+ HPPA_ARG0_REGNUM = 26, /* The first argument of a callee. */
+ HPPA_ARG1_REGNUM = 25, /* The second argument of a callee. */
+ HPPA_ARG2_REGNUM = 24, /* The third argument of a callee. */
+ HPPA_ARG3_REGNUM = 23 /* The fourth argument of a callee. */
+};
+
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
/* The number of bytes in an address. For now, this field is designed
to allow us to differentiate hppa32 from hppa64 targets. */
int bytes_per_address;
+
+ /* Is this an ELF target? This can be 64-bit HP-UX, or a 32/64-bit GNU/Linux
+ system. */
+ int is_elf;
+
+ /* Given a function address, try to find the global pointer for the
+ corresponding shared object. */
+ CORE_ADDR (*find_global_pointer) (struct value *);
};
+/*
+ * Unwind table and descriptor.
+ */
+
+struct unwind_table_entry
+ {
+ CORE_ADDR region_start;
+ CORE_ADDR region_end;
+
+ unsigned int Cannot_unwind:1; /* 0 */
+ unsigned int Millicode:1; /* 1 */
+ unsigned int Millicode_save_sr0:1; /* 2 */
+ unsigned int Region_description:2; /* 3..4 */
+ unsigned int reserved1:1; /* 5 */
+ unsigned int Entry_SR:1; /* 6 */
+ unsigned int Entry_FR:4; /* number saved *//* 7..10 */
+ unsigned int Entry_GR:5; /* number saved *//* 11..15 */
+ unsigned int Args_stored:1; /* 16 */
+ unsigned int Variable_Frame:1; /* 17 */
+ unsigned int Separate_Package_Body:1; /* 18 */
+ unsigned int Frame_Extension_Millicode:1; /* 19 */
+ unsigned int Stack_Overflow_Check:1; /* 20 */
+ unsigned int Two_Instruction_SP_Increment:1; /* 21 */
+ unsigned int Ada_Region:1; /* 22 */
+ unsigned int cxx_info:1; /* 23 */
+ unsigned int cxx_try_catch:1; /* 24 */
+ unsigned int sched_entry_seq:1; /* 25 */
+ unsigned int reserved2:1; /* 26 */
+ unsigned int Save_SP:1; /* 27 */
+ unsigned int Save_RP:1; /* 28 */
+ unsigned int Save_MRP_in_frame:1; /* 29 */
+ unsigned int extn_ptr_defined:1; /* 30 */
+ unsigned int Cleanup_defined:1; /* 31 */
+
+ unsigned int MPE_XL_interrupt_marker:1; /* 0 */
+ unsigned int HP_UX_interrupt_marker:1; /* 1 */
+ unsigned int Large_frame:1; /* 2 */
+ unsigned int Pseudo_SP_Set:1; /* 3 */
+ unsigned int reserved4:1; /* 4 */
+ unsigned int Total_frame_size:27; /* 5..31 */
+
+ /* This is *NOT* part of an actual unwind_descriptor in an object
+ file. It is *ONLY* part of the "internalized" descriptors that
+ we create from those in a file.
+ */
+ struct
+ {
+ unsigned int stub_type:4; /* 0..3 */
+ unsigned int padding:28; /* 4..31 */
+ }
+ stub_unwind;
+ };
+
+/* HP linkers also generate unwinds for various linker-generated stubs.
+ GDB reads in the stubs from the $UNWIND_END$ subspace, then
+ "converts" them into normal unwind entries using some of the reserved
+ fields to store the stub type. */
+
+/* The gaps represent linker stubs used in MPE and space for future
+ expansion. */
+enum unwind_stub_types
+ {
+ LONG_BRANCH = 1,
+ PARAMETER_RELOCATION = 2,
+ EXPORT = 10,
+ IMPORT = 11,
+ IMPORT_SHLIB = 12,
+ };
+
+struct unwind_table_entry *find_unwind_entry (CORE_ADDR);
+
+/* We use the objfile->obj_private pointer for two things:
+ * 1. An unwind table;
+ *
+ * 2. A pointer to any associated shared library object.
+ *
+ * #defines are used to help refer to these objects.
+ */
+
+/* Info about the unwind table associated with an object file.
+ * This is hung off of the "objfile->obj_private" pointer, and
+ * is allocated in the objfile's psymbol obstack. This allows
+ * us to have unique unwind info for each executable and shared
+ * library that we are debugging.
+ */
+struct hppa_unwind_info
+ {
+ struct unwind_table_entry *table; /* Pointer to unwind info */
+ struct unwind_table_entry *cache; /* Pointer to last entry we found */
+ int last; /* Index of last entry */
+ };
+
+struct hppa_objfile_private
+ {
+ struct hppa_unwind_info *unwind_info; /* a pointer */
+ struct so_list *so_info; /* a pointer */
+ CORE_ADDR dp;
+ };
+
+extern const struct objfile_data *hppa_objfile_priv_data;
+
+int hppa_get_field (unsigned word, int from, int to);
+int hppa_extract_5_load (unsigned int);
+unsigned hppa_extract_5R_store (unsigned int);
+unsigned hppa_extract_5r_store (unsigned int);
+int hppa_extract_17 (unsigned int);
+int hppa_extract_21 (unsigned);
+int hppa_extract_14 (unsigned);
+int hppa_low_sign_extend (unsigned int, unsigned int);
+int hppa_sign_extend (unsigned int, unsigned int);
+CORE_ADDR hppa_symbol_address(const char *sym);
+
+void
+hppa_frame_prev_register_helper (struct frame_info *next_frame,
+ struct trad_frame_saved_reg *saved_regs,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep);
+
#endif /* HPPA_TDEP_H */
diff --git a/gdb/hppabsd-nat.c b/gdb/hppabsd-nat.c
new file mode 100644
index 00000000000..fb53c967558
--- /dev/null
+++ b/gdb/hppabsd-nat.c
@@ -0,0 +1,119 @@
+/* Native-dependent code for HP PA-RISC BSD's.
+
+ Copyright 2004 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 "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "hppa-tdep.h"
+
+static int
+hppabsd_gregset_supplies_p (int regnum)
+{
+ return (regnum >= HPPA_R0_REGNUM && regnum <= HPPA_PCOQ_TAIL_REGNUM);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
+
+static void
+hppabsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+ const char *regs = gregs;
+ int regnum;
+
+ for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+
+ regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
+ regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+ in GREGS. */
+
+static void
+hppabsd_collect_gregset (const struct regcache *regcache,
+ void *gregs, int regnum)
+{
+ char *regs = gregs;
+ int i;
+
+ for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (regcache, i, regs + i * 4);
+ }
+
+ if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+ regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
+ if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+ regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+ regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+}
+
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers (including the floating-point registers). */
+
+void
+fetch_inferior_registers (int regnum)
+{
+ struct regcache *regcache = current_regcache;
+
+ if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
+ {
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ hppabsd_supply_gregset (regcache, &regs);
+ }
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers (including the floating-point registers). */
+
+void
+store_inferior_registers (int regnum)
+{
+ if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
+ {
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ hppabsd_collect_gregset (current_regcache, &regs, regnum);
+
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't write registers");
+ }
+}
diff --git a/gdb/hppabsd-tdep.c b/gdb/hppabsd-tdep.c
new file mode 100644
index 00000000000..0a54371527d
--- /dev/null
+++ b/gdb/hppabsd-tdep.c
@@ -0,0 +1,137 @@
+/* Target-dependent code for HP PA-RISC BSD's.
+
+ Copyright 2004 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 "arch-utils.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "hppa-tdep.h"
+#include "solib-svr4.h"
+
+/* Core file support. */
+
+/* Sizeof `struct reg' in <machine/reg.h>. */
+#define HPPABSD_SIZEOF_GREGS (34 * 4)
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+hppabsd_supply_gregset (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
+{
+ const char *regs = gregs;
+ size_t offset;
+ int i;
+
+ gdb_assert (len >= HPPABSD_SIZEOF_GREGS);
+
+ for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_supply (regcache, i, regs + offset);
+ }
+
+ if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
+ regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
+ if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
+ regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
+ regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+}
+
+/* OpenBSD/hppa register set. */
+
+static struct regset hppabsd_gregset =
+{
+ NULL,
+ hppabsd_supply_gregset
+};
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+hppabsd_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= HPPABSD_SIZEOF_GREGS)
+ return &hppabsd_gregset;
+
+ return NULL;
+}
+
+
+static void
+hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Core file support. */
+ set_gdbarch_regset_from_core_section
+ (gdbarch, hppabsd_regset_from_core_section);
+
+ /* OpenBSD and NetBSD use ELF. */
+ tdep->is_elf = 1;
+
+ /* OpenBSD and NetBSD uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, generic_in_solib_call_trampoline);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* OpenBSD uses uses the traditional NetBSD core file format, even for
+ ports that use ELF. */
+#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
+
+static enum gdb_osabi
+hppabsd_core_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
+ return GDB_OSABI_NETBSD_CORE;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_hppabsd_tdep (void);
+
+void
+_initialize_hppabsd_tdep (void)
+{
+ /* BFD doesn't set a flavour for NetBSD style a.out core files. */
+ gdbarch_register_osabi_sniffer (bfd_arch_hppa, bfd_target_unknown_flavour,
+ hppabsd_core_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_NETBSD_ELF,
+ hppabsd_init_abi);
+ gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_OPENBSD_ELF,
+ hppabsd_init_abi);
+}
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index ea4015a8d32..60e28890c8c 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -32,13 +32,10 @@
#include "gdb_wait.h"
#include "regcache.h"
#include "gdb_string.h"
+#include "infttrace.h"
#include <signal.h>
-extern int hpux_has_forked (int pid, int *childpid);
-extern int hpux_has_vforked (int pid, int *childpid);
-extern int hpux_has_execd (int pid, char **execd_pathname);
-extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
- int *syscall_id);
+#include "hppa-tdep.h"
static CORE_ADDR text_end;
@@ -98,7 +95,7 @@ store_inferior_registers (int regno)
return;
offset = 0;
- len = DEPRECATED_REGISTER_RAW_SIZE (regno);
+ len = register_size (current_gdbarch, regno);
/* Requests for register zero actually want the save_state's
ss_flags member. As RM says: "Oh, what a hack!" */
@@ -109,17 +106,16 @@ store_inferior_registers (int regno)
len = sizeof (ss.ss_flags);
/* Note that ss_flags is always an int, no matter what
- DEPRECATED_REGISTER_RAW_SIZE(0) says. Assuming all HP-UX
- PA machines are big-endian, put it at the least
- significant end of the value, and zap the rest of the
- buffer. */
- offset = DEPRECATED_REGISTER_RAW_SIZE (0) - len;
+ register_size (0) says. Assuming all HP-UX PA machines
+ are big-endian, put it at the least significant end of
+ the value, and zap the rest of the buffer. */
+ offset = register_size (current_gdbarch, 0) - len;
}
/* Floating-point registers come from the ss_fpblock area. */
- else if (regno >= FP0_REGNUM)
+ else if (regno >= HPPA_FP0_REGNUM)
addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
- + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (FP0_REGNUM)));
+ + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (HPPA_FP0_REGNUM)));
/* Wide registers come from the ss_wide area.
I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
@@ -145,7 +141,7 @@ store_inferior_registers (int regno)
layering will not allow us to perform a 64bit register store.
What a crock. */
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM && len == 8)
+ if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM && len == 8)
{
CORE_ADDR temp;
@@ -173,7 +169,7 @@ store_inferior_registers (int regno)
/* Another crock. HPUX complains if you write a nonzero value to
the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */
- if (regno == IPSW_REGNUM && len == 8)
+ if (regno == HPPA_IPSW_REGNUM && len == 8)
*(int *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)] = 0;
#endif
@@ -193,7 +189,7 @@ store_inferior_registers (int regno)
REGISTER_NAME (regno), err);
/* If we fail to write the PC, give a true error instead of
just a warning. */
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
+ if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM)
perror_with_name (msg);
else
warning (msg);
@@ -216,7 +212,7 @@ fetch_register (int regno)
int i;
offset = 0;
- len = DEPRECATED_REGISTER_RAW_SIZE (regno);
+ len = register_size (current_gdbarch, regno);
/* Requests for register zero actually want the save_state's
ss_flags member. As RM says: "Oh, what a hack!" */
@@ -227,17 +223,17 @@ fetch_register (int regno)
len = sizeof (ss.ss_flags);
/* Note that ss_flags is always an int, no matter what
- DEPRECATED_REGISTER_RAW_SIZE(0) says. Assuming all HP-UX PA
- machines are big-endian, put it at the least significant end
- of the value, and zap the rest of the buffer. */
- offset = DEPRECATED_REGISTER_RAW_SIZE (0) - len;
+ register_size (0) says. Assuming all HP-UX PA machines are
+ big-endian, put it at the least significant end of the value,
+ and zap the rest of the buffer. */
+ offset = register_size (current_gdbarch, 0) - len;
memset (buf, 0, sizeof (buf));
}
/* Floating-point registers come from the ss_fpblock area. */
- else if (regno >= FP0_REGNUM)
+ else if (regno >= HPPA_FP0_REGNUM)
addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
- + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (FP0_REGNUM)));
+ + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (HPPA_FP0_REGNUM)));
/* Wide registers come from the ss_wide area.
I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
@@ -282,10 +278,10 @@ fetch_register (int regno)
/* If we're reading an address from the instruction address queue,
mask out the bottom two bits --- they contain the privilege
level. */
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
+ if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM)
buf[len - 1] &= ~0x3;
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 76e96961f9e..de1670aba07 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -37,6 +37,7 @@
#include "demangle.h"
#include "somsolib.h"
#include "gdb_assert.h"
+#include "hppa-tdep.h"
/* Private information attached to an objfile which we use to find
and internalize the HP C debug symbols within that objfile. */
@@ -234,15 +235,12 @@ static void fixup_class_method_type
static void hpread_adjust_bitoffsets (struct type *, int);
+static int hpread_adjust_stack_address (CORE_ADDR func_addr);
+
static dnttpointer hpread_get_next_skip_over_anon_unions
(int, dnttpointer, union dnttentry **, struct objfile *);
-/* Global to indicate presence of HP-compiled objects,
- in particular, SOM executable file with SOM debug info
- Defined in symtab.c, used in hppa-tdep.c. */
-extern int hp_som_som_object_present;
-
/* Static used to indicate a class type that requires a
fix-up of one of its method types */
static struct type *fixup_class = NULL;
@@ -385,6 +383,7 @@ hpread_pxdb_needed (bfd *sym_bfd)
if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header))
{
buf = alloca (sizeof (DOC_info_PXDB_header));
+ memset (buf, 0, sizeof (DOC_info_PXDB_header));
if (!bfd_get_section_contents (sym_bfd,
header_section,
@@ -452,6 +451,7 @@ hpread_pxdb_needed (bfd *sym_bfd)
{
buf = alloca (sizeof (PXDB_header));
+ memset (buf, 0, sizeof (PXDB_header));
if (!bfd_get_section_contents (sym_bfd,
header_section,
buf, 0,
@@ -1668,7 +1668,7 @@ hpread_symfile_init (struct objfile *objfile)
/* Allocate struct to keep track of the symfile */
objfile->sym_private =
- xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
+ xmalloc (sizeof (struct hpread_symfile_info));
memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
/* We haven't read in any types yet. */
@@ -2286,7 +2286,7 @@ hpread_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- xmfree (objfile->md, objfile->sym_private);
+ xfree (objfile->sym_private);
}
}
@@ -2875,7 +2875,7 @@ hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
}
current_objfile = NULL;
- hp_som_som_object_present = 1; /* Indicate we've processed an HP SOM SOM file */
+ deprecated_hp_som_som_object_present = 1; /* Indicate we've processed an HP SOM SOM file */
return end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
}
@@ -3024,7 +3024,7 @@ hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
{
DNTT_TYPE_VECTOR_LENGTH (objfile) = LNTT_SYMCOUNT (objfile) + GNTT_SYMCOUNT (objfile);
DNTT_TYPE_VECTOR (objfile) = (struct type **)
- xmmalloc (objfile->md, DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
+ xmalloc (DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
memset (&DNTT_TYPE_VECTOR (objfile)[old_len], 0,
(DNTT_TYPE_VECTOR_LENGTH (objfile) - old_len) *
sizeof (struct type *));
@@ -3042,8 +3042,7 @@ hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
if (size_changed)
{
DNTT_TYPE_VECTOR (objfile) = (struct type **)
- xmrealloc (objfile->md,
- (char *) DNTT_TYPE_VECTOR (objfile),
+ xrealloc ((char *) DNTT_TYPE_VECTOR (objfile),
(DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *)));
memset (&DNTT_TYPE_VECTOR (objfile)[old_len], 0,
@@ -3252,10 +3251,9 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
if (paramp->dfparam.copyparam)
{
SYMBOL_VALUE (sym) = paramp->dfparam.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
+ += hpread_adjust_stack_address (CURRENT_FUNCTION_VALUE (objfile));
+
/* This is likely a pass-by-invisible reference parameter,
Hack on the symbol class to make GDB happy. */
/* ??rehrauer: This appears to be broken w/r/t to passing
@@ -3431,10 +3429,9 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
if (paramp->dfparam.copyparam)
{
SYMBOL_VALUE (sym) = paramp->dfparam.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
+ += hpread_adjust_stack_address(CURRENT_FUNCTION_VALUE (objfile));
+
/* This is likely a pass-by-invisible reference parameter,
Hack on the symbol class to make GDB happy. */
/* ??rehrauer: This appears to be broken w/r/t to passing
@@ -3690,6 +3687,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -3768,6 +3766,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
n_templ_args++;
/* Allocate and fill in a struct next_template */
t_new = (struct next_template *) alloca (sizeof (struct next_template));
+ memset (t_new, 0, sizeof (struct next_template));
t_new->next = t_list;
t_list = t_new;
t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name;
@@ -3908,6 +3907,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
/* Get space to record this member function */
/* Note: alloca used; this will disappear on routine exit */
fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field));
+ memset (fn_new, 0, sizeof (struct next_fn_field));
fn_new->next = fn_list;
fn_list = fn_new;
@@ -4025,6 +4025,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
/* Get space to record this static member */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -4055,6 +4056,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set");
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -4086,6 +4088,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set");
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -4106,6 +4109,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set");
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -4154,6 +4158,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
@@ -4237,6 +4242,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
break;
i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation));
+ memset (i_new, 0, sizeof (struct next_instantiation));
i_new->next = i_list;
i_list = i_new;
i_list->t = hpread_type_lookup (field, objfile);
@@ -5702,10 +5708,8 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
if (dn_bufp->dfparam.copyparam)
{
SYMBOL_VALUE (sym) = dn_bufp->dfparam.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
+ += hpread_adjust_stack_address (CURRENT_FUNCTION_VALUE (objfile));
}
else
SYMBOL_VALUE (sym) = dn_bufp->dfparam.location;
@@ -5747,7 +5751,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
/* Thread-local variable.
*/
SYMBOL_CLASS (sym) = LOC_HP_THREAD_LOCAL_STATIC;
- SYMBOL_BASEREG (sym) = CR27_REGNUM;
+ SYMBOL_BASEREG (sym) = HPPA_CR27_REGNUM;
if (objfile->flags & OBJF_SHARED)
{
@@ -5759,11 +5763,14 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
* to "somsolib.c". But C lets us point to one.
*/
struct so_list *so;
+ struct hppa_objfile_private *priv;
- if (objfile->obj_private == NULL)
+ priv = (struct hppa_objfile_private *)
+ objfile_data (objfile, hppa_objfile_priv_data);
+ if (priv == NULL)
error ("Internal error in reading shared library information.");
- so = ((obj_private_data_t *) (objfile->obj_private))->so_info;
+ so = ((struct hppa_objfile_private *) priv)->so_info;
if (so == NULL)
error ("Internal error in reading shared library information.");
@@ -5786,10 +5793,8 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
SYMBOL_CLASS (sym) = LOC_LOCAL;
SYMBOL_VALUE (sym) = dn_bufp->ddvar.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
+ += hpread_adjust_stack_address (CURRENT_FUNCTION_VALUE (objfile));
SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->ddvar.type, objfile);
if (dn_bufp->ddvar.global)
add_symbol_to_list (sym, &global_symbols);
@@ -6269,6 +6274,24 @@ hpread_adjust_bitoffsets (struct type *type, int bits)
TYPE_FIELD_BITPOS (type, i) -= bits;
}
+/* Return the adjustment necessary to make for addresses on the stack
+ as presented by hpread.c.
+
+ This is necessary because of the stack direction on the PA and the
+ bizarre way in which someone (?) decided they wanted to handle
+ frame pointerless code in GDB. */
+int
+hpread_adjust_stack_address (CORE_ADDR func_addr)
+{
+ struct unwind_table_entry *u;
+
+ u = find_unwind_entry (func_addr);
+ if (!u)
+ return 0;
+ else
+ return u->Total_frame_size << 3;
+}
+
/* Because of quirks in HP compilers' treatment of anonymous unions inside
classes, we have to chase through a chain of threaded FIELD entries.
If we encounter an anonymous union in the chain, we must recursively skip over
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 242d3a39a09..5664314225c 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -291,15 +291,15 @@ hpux_thread_fetch_registers (int regno)
if (regno == FLAGS_REGNUM)
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL */
- memset (buf, '\000', DEPRECATED_REGISTER_RAW_SIZE (regno));
+ memset (buf, '\000', register_size (current_gdbarch, regno));
else if (regno == SP_REGNUM)
store_unsigned_integer (buf, sizeof sp, sp);
else if (regno == PC_REGNUM)
- read_memory (sp - 20, buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ read_memory (sp - 20, buf, register_size (current_gdbarch, regno));
else
- read_memory (sp + regmap[regno], buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ read_memory (sp + regmap[regno], buf, register_size (current_gdbarch, regno));
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
@@ -357,19 +357,19 @@ hpux_thread_store_registers (int regno)
{
write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_RAW_SIZE (regno));
+ register_size (current_gdbarch, regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
(extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_RAW_SIZE (regno)) + 160);
+ register_size (current_gdbarch, regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_RAW_SIZE (regno));
+ register_size (current_gdbarch, regno));
else
write_memory (sp + regmap[regno],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_RAW_SIZE (regno));
+ register_size (current_gdbarch, regno));
}
}
@@ -431,9 +431,10 @@ hpux_thread_notice_signals (ptid_t ptid)
/* Fork an inferior process, and start debugging it with /proc. */
static void
-hpux_thread_create_inferior (char *exec_file, char *allargs, char **env)
+hpux_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- child_ops.to_create_inferior (exec_file, allargs, env);
+ child_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (hpux_thread_active)
{
@@ -581,6 +582,6 @@ _initialize_hpux_thread (void)
child_suppress_run = 1;
/* Hook into new_objfile notification. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = hpux_thread_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = hpux_thread_new_objfile;
}
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 443f8f7c223..9dc5b39c321 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -26,11 +26,27 @@
#include "i386-tdep.h"
+static CORE_ADDR
+i386_cygwin_skip_trampoline_code (CORE_ADDR pc)
+{
+ return i386_pe_skip_trampoline_code (pc, NULL);
+}
+
+static int
+i386_cygwin_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return (i386_pe_skip_trampoline_code (pc, name) != 0);
+}
+
static void
i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ i386_cygwin_in_solib_call_trampoline);
+ set_gdbarch_skip_trampoline_code (gdbarch, i386_cygwin_skip_trampoline_code);
+
tdep->struct_return = reg_struct_return;
}
diff --git a/gdb/i386-interix-nat.c b/gdb/i386-interix-nat.c
deleted file mode 100644
index 91b9be29319..00000000000
--- a/gdb/i386-interix-nat.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Native-dependent code for Interix running on i386's, for GDB.
- Copyright 2002 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 <sys/procfs.h>
-#include <inferior.h>
-#include <fcntl.h>
-
-#include <i386-tdep.h>
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "gregset.h"
-#include "regcache.h"
-
-typedef unsigned long greg_t;
-
-/* This is a duplicate of the table in i386-linux-nat.c. */
-
-static int regmap[] = {
- EAX, ECX, EDX, EBX,
- UESP, EBP, ESI, EDI,
- EIP, EFL, CS, SS,
- DS, ES, FS, GS,
-};
-
-/* Forward declarations. */
-extern void _initialize_core_interix (void);
-extern initialize_file_ftype _initialize_core_interix;
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- int regi;
- greg_t *regp = (greg_t *) & gregsetp->gregs;
-
- for (regi = 0; regi < I386_NUM_GREGS; regi++)
- {
- supply_register (regi, (char *) (regp + regmap[regi]));
- }
-}
-
-/* Store GDB's value for REGNO in *GREGSETP. If REGNO is -1, do all
- of them. */
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- greg_t *regp = (greg_t *) gregsetp->gregs;
-
- for (regi = 0; regi < I386_NUM_GREGS; regi++)
- if (regno == -1 || regi == regno)
- regcache_collect (regi, (void *) (regp + regmap[regi]));
-}
-
-/* Fill GDB's register file with the floating-point register values in
- *FPREGSETP. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- i387_supply_fsave (current_regcache, -1, fpregsetp);
-}
-
-/* Given a pointer to a floating point register set in (fpregset_t *)
- format, update all of the registers from gdb's idea of the current
- floating point register set. */
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- i387_fill_fsave ((char *) fpregsetp, regno);
-}
-
-/* Read the values of either the general register set (WHICH equals 0)
- or the floating point register set (WHICH equals 2) from the core
- file data (pointed to by CORE_REG_SECT), and update gdb's idea of
- their current values. The CORE_REG_SIZE parameter is compared to
- the size of the gregset or fpgregset structures (as appropriate) to
- validate the size of the structure from the core file. The
- REG_ADDR parameter is ignored. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR reg_addr)
-{
- gdb_gregset_t gregset;
- gdb_fpregset_t fpregset;
-
- if (which == 0)
- {
- if (core_reg_size != sizeof (gregset))
- {
- warning ("wrong size gregset struct in core file");
- }
- else
- {
- memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
- }
- }
- else if (which == 2)
- {
- if (core_reg_size != sizeof (fpregset))
- {
- warning ("wrong size fpregset struct in core file");
- }
- else
- {
- memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
- }
- }
-}
-
-#include <setjmp.h>
-
-static struct core_fns interix_core_fns =
-{
- bfd_target_coff_flavour, /* core_flavour (more or less) */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_interix (void)
-{
- add_core_fns (&interix_core_fns);
-}
-
-/* We don't have a /proc/pid/file or /proc/pid/exe to read a link from,
- so read it from the same place ps gets the name. */
-
-char *
-child_pid_to_exec_file (int pid)
-{
- char *path;
- char *buf;
- int fd, c;
- char *p;
-
- xasprintf (&path, "/proc/%d/stat", pid);
- buf = xcalloc (MAXPATHLEN + 1, sizeof (char));
- make_cleanup (xfree, path);
- make_cleanup (xfree, buf);
-
- fd = open (path, O_RDONLY);
-
- if (fd < 0)
- return NULL;
-
- /* Skip over "Argv0\t". */
- lseek (fd, 6, SEEK_SET);
-
- c = read (fd, buf, MAXPATHLEN);
- close (fd);
-
- if (c < 0)
- return NULL;
-
- buf[c] = '\0'; /* Ensure null termination. */
- p = strchr (buf, '\n');
- if (p != NULL)
- *p = '\0';
-
- return buf;
-}
diff --git a/gdb/i386-interix-tdep.c b/gdb/i386-interix-tdep.c
deleted file mode 100644
index 02c37012ef8..00000000000
--- a/gdb/i386-interix-tdep.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/* Target-dependent code for Interix running on i386's, for GDB.
- Copyright 2002 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 "arch-utils.h"
-
-#include "frame.h"
-#include "gdb_string.h"
-#include "gdb-stabs.h"
-#include "gdbcore.h"
-#include "gdbtypes.h"
-#include "i386-tdep.h"
-#include "inferior.h"
-#include "libbfd.h"
-#include "objfiles.h"
-#include "osabi.h"
-#include "regcache.h"
-
-/* offsetof (mcontext_t, gregs.gregs[EBP]) */
-static const int mcontext_EBP_greg_offset = 180;
-
-/* offsetof (mcontext_t, gregs.gregs[EIP]) */
-static const int mcontext_EIP_greg_offset = 184;
-
-/* offsetof (mcontext_t, gregs.gregs[UESP]) */
-static const int mcontext_UESP_greg_offset = 196;
-
-/* offsetof (mcontext_t, gregs.reserved[1]) */
-static const int mcontext_syscall_greg_offset = 4;
-
-/* offsetof (_JUMP_BUFFER, Eip) */
-static const int jump_buffer_Eip_offset = 20;
-
-/* See procfs.c and *interix*.h in config/[alpha,i386]. */
-/* ??? These should be static, but this needs a bit of work before this
- can be done. */
-CORE_ADDR tramp_start;
-CORE_ADDR tramp_end;
-CORE_ADDR null_start;
-CORE_ADDR null_end;
-int winver; /* Windows NT version number */
-
-/* Forward declarations. */
-extern void _initialize_i386_interix_tdep (void);
-extern initialize_file_ftype _initialize_i386_interix_tdep;
-
-/* Adjust the section offsets in an objfile structure so that it's correct
- for the type of symbols being read (or undo it with the _restore
- arguments).
-
- If main programs ever start showing up at other than the default Image
- Base, this is where that would likely be applied. */
-
-void
-pei_adjust_objfile_offsets (struct objfile *objfile,
- enum objfile_adjusts type)
-{
- int i;
- CORE_ADDR symbols_offset;
-
- switch (type)
- {
- case adjust_for_symtab:
- symbols_offset = NONZERO_LINK_BASE (objfile->obfd);
- break;
- case adjust_for_symtab_restore:
- symbols_offset = -NONZERO_LINK_BASE (objfile->obfd);
- break;
- case adjust_for_stabs:
- case adjust_for_stabs_restore:
- case adjust_for_dwarf:
- case adjust_for_dwarf_restore:
- default:
- return;
- }
-
- for (i = 0; i < objfile->num_sections; i++)
- {
- (objfile->section_offsets)->offsets[i] += symbols_offset;
- }
-}
-
-static int
-i386_interix_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
- /* This is sufficient, where used, but is NOT a complete test; There
- is more in DEPRECATED_INIT_EXTRA_FRAME_INFO
- (a.k.a. interix_back_one_frame). */
- return ((pc >= tramp_start && pc < tramp_end)
- || (pc >= null_start && pc < null_end));
-}
-
-static int
-i386_interix_in_solib_call_trampoline (CORE_ADDR pc, char *name)
-{
- return i386_pe_skip_trampoline_code (pc, name);
-}
-
-static CORE_ADDR
-i386_interix_skip_trampoline_code (CORE_ADDR pc)
-{
- return i386_pe_skip_trampoline_code (pc, 0);
-}
-
-static int
-i386_interix_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
- && !deprecated_inside_entry_file (read_memory_integer
- (thisframe->frame + 4, 4))));
-}
-
-/* We want to find the previous frame, which on Interix is tricky when
- signals are involved; set frame->frame appropriately, and also get
- the pc and tweak tye frame's type; this replaces a boatload of
- nested macros, as well. */
-static void
-i386_interix_back_one_frame (int fromleaf, struct frame_info *frame)
-{
- CORE_ADDR ra;
- CORE_ADDR fm;
- CORE_ADDR context;
- long t;
-
- if (frame == NULL)
- internal_error (__FILE__, __LINE__, "unexpected NULL frame");
-
- if (fromleaf)
- {
- frame->pc = DEPRECATED_SAVED_PC_AFTER_CALL (frame->next);
- return;
- }
-
- if (!frame->next)
- {
- frame->pc = read_pc ();
-
- /* Part of the signal stuff... See below. */
- if (stopped_by_random_signal)
- {
- /* We know we're in a system call mini-frame; was it
- NullApi or something else? */
- ra = DEPRECATED_SAVED_PC_AFTER_CALL (frame);
- if (ra >= null_start && ra < null_end)
- deprecated_set_frame_type (frame, SIGTRAMP_FRAME);
- /* There might also be an indirect call to the mini-frame,
- putting one more return address on the stack. (XP only,
- I think?) This can't (reasonably) return the address of the
- signal handler caller unless it's that situation, so this
- is safe. */
- ra = read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
- if (ra >= null_start && ra < null_end)
- deprecated_set_frame_type (frame, SIGTRAMP_FRAME);
- }
- return;
- }
-
- if (!(get_frame_type (frame->next) == SIGTRAMP_FRAME))
- {
- frame->pc = read_memory_integer (frame->next->frame + 4, 4);
- return;
- }
-
- /* This is messy (actually AWFUL)... The "trampoline" might be 2, 3
- or all 5 entities on the frame.
-
- Chunk 1 will be present when we're actually in a signal handler.
- Chunk 2 will be present when an asynchronous signal (one that
- didn't come in with a system call) is present.
- We may not (yet) be in the handler, if we're just returning
- from the call.
- When we're actually in a handler taken from an asynchronous
- signal, both will be present.
-
- Chunk 1:
- PdxSignalDeliverer's frame
- + Context struct -- not accounted for in any frame
-
- Chunk 2:
- + PdxNullPosixApi's frame
- + PdxNullApiCaller's frame
- + Context struct = 0x230 not accounted for in any frame
-
- The symbol names come from examining objdumps of psxdll.dll;
- they don't appear in the runtime image.
-
- For gdb's purposes, we can pile all this into one frame. */
-
- ra = frame->next->pc;
- /* Are we already pointing at PdxNullPosixApi? We are if
- this is a signal frame, we're at next-to-top, and were stopped
- by a random signal (if it wasn't the right address under
- these circumstances, we wouldn't be here at all by tests above
- on the prior frame). */
- if (frame->next->next == NULL && stopped_by_random_signal)
- {
- /* We're pointing at the frame FOR PdxNullApi. */
- fm = frame->frame;
- }
- else
- {
- /* No... We must be pointing at the frame that was called
- by PdxSignalDeliverer; back up across the whole mess. */
-
- /* Extract the frame for PdxSignalDeliverer. Note:
- DEPRECATED_FRAME_CHAIN used the "old" frame pointer because
- we were a deliverer. Get the address of the context record
- that's on here frameless. */
- context = read_memory_integer (frame->frame, 4); /* an Arg */
-
- /* Now extract the frame pointer contained in the context. */
- fm = read_memory_integer (context + mcontext_EBP_greg_offset, 4);
-
- ra = read_memory_integer (context + mcontext_EIP_greg_offset, 4);
-
- /* We need to know if we're in a system call because we'll be
- in a syscall mini-frame, if so, and the rules are different. */
- t = (long) read_memory_integer (context + mcontext_syscall_greg_offset,
- 4);
- /* t contains 0 if running free, 1 if blocked on a system call,
- and 2 if blocked on an exception message (e.g. a trap);
- we don't expect to get here with a 2. */
- if (t != 1)
- {
- /* Not at a system call, therefore it can't be NullApi. */
- frame->pc = ra;
- frame->frame = fm;
- return;
- }
-
- /* It's a system call... Mini frame, then look for NullApi. */
- /* Get the RA (on the stack) associated with this... It's
- a system call mini-frame. */
- ra = read_memory_integer (context + mcontext_UESP_greg_offset, 4);
-
- if (winver >= 51)
- {
- /* Newer versions of Windows NT interpose another return
- address (but no other "stack frame" stuff) that we need
- to simply ignore here. */
- ra += 4;
- }
-
- ra = read_memory_integer (ra, 4);
-
- if (!(ra >= null_start && ra < null_end))
- {
- /* No Null API present; we're done. */
- frame->pc = ra;
- frame->frame = fm;
- return;
- }
- }
-
- /* At this point, we're looking at the frame for PdxNullPosixApi,
- in either case.
-
- PdxNullPosixApi is called by PdxNullApiCaller (which in turn
- is called by _PdxNullApiCaller (note the _).)
- PdxNullPosixApiCaller (no _) is a frameless function.
-
- The saved frame pointer is as fm, but it's not of interest
- to us because it skips us over the saved context, which is
- the wrong thing to do, because it skips the interrrupted
- routine! PdxNullApiCaller takes as its only argument the
- address of the context of the interrupded function (which
- is really in no frame, but jammed on the stack by the system)
-
- So: fm+0: saved bp
- fm+4: return address to _PdxNullApiCaller
- fm+8: arg to PdxNullApiCaller pushed by _Pdx... */
-
- fm = read_memory_integer (fm + 0x8, 4);
-
- /* Extract the second context record. */
-
- ra = read_memory_integer (fm + mcontext_EIP_greg_offset, 4);
- fm = read_memory_integer (fm + mcontext_EBP_greg_offset, 4);
-
- frame->frame = fm;
- frame->pc = ra;
-
- return;
-}
-
-static CORE_ADDR
-i386_interix_frame_saved_pc (struct frame_info *fi)
-{
- /* Assume that we've already unwound enough to have the caller's address
- if we're dealing with a signal handler caller (And if that fails,
- return 0). */
- if ((get_frame_type (fi) == SIGTRAMP_FRAME))
- return fi->next ? fi->next->pc : 0;
- else
- return read_memory_integer (fi->frame + 4, 4);
-}
-
-static void
-i386_interix_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- tdep->struct_return = reg_struct_return;
- tdep->jb_pc_offset = jump_buffer_Eip_offset;
-
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_interix_pc_in_sigtramp);
- set_gdbarch_in_solib_call_trampoline (gdbarch,
- i386_interix_in_solib_call_trampoline);
- set_gdbarch_skip_trampoline_code (gdbarch,
- i386_interix_skip_trampoline_code);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, i386_interix_back_one_frame);
- set_gdbarch_deprecated_frame_chain_valid (gdbarch, i386_interix_frame_chain_valid);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_interix_frame_saved_pc);
- set_gdbarch_name_of_malloc (gdbarch, "_malloc");
-}
-
-static enum gdb_osabi
-i386_interix_osabi_sniffer (bfd * abfd)
-{
- char *target_name = bfd_get_target (abfd);
-
- if (strcmp (target_name, "pei-i386") == 0)
- return GDB_OSABI_INTERIX;
-
- return GDB_OSABI_UNKNOWN;
-}
-
-void
-_initialize_i386_interix_tdep (void)
-{
- gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
- i386_interix_osabi_sniffer);
-
- gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_INTERIX,
- i386_interix_init_abi);
-}
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 16436615883..d61c9993086 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -1,6 +1,6 @@
-/* Native-dependent code for GNU/Linux x86.
+/* Native-dependent code for GNU/Linux i386.
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -62,20 +62,12 @@
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
-/* Prototypes for i387_supply_fsave etc. */
#include "i387-tdep.h"
-
-/* Defines for XMM0_REGNUM etc. */
#include "i386-tdep.h"
-
-/* 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);
/* The register sets used in GNU/Linux ELF core-dumps are identical to
@@ -114,11 +106,8 @@ static int regmap[] =
#define GETREGS_SUPPLIES(regno) \
((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM)
-#define GETFPREGS_SUPPLIES(regno) \
- (FP0_REGNUM <= (regno) && (regno) <= LAST_FPU_CTRL_REGNUM)
-
#define GETFPXREGS_SUPPLIES(regno) \
- (FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM)
+ (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS)
/* Does the current host support the GETREGS request? */
int have_ptrace_getregs =
@@ -179,7 +168,7 @@ fetch_register (int regno)
gdb_assert (!have_ptrace_getregs);
if (cannot_fetch_register (regno))
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
return;
}
@@ -194,7 +183,7 @@ fetch_register (int regno)
error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno),
regno, safe_strerror (errno));
- supply_register (regno, &val);
+ regcache_raw_supply (current_regcache, regno, &val);
}
/* Store one register. */
@@ -215,7 +204,7 @@ store_register (int regno)
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
errno = 0;
- regcache_collect (regno, &val);
+ regcache_raw_collect (current_regcache, regno, &val);
ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
if (errno != 0)
error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno),
@@ -236,10 +225,11 @@ supply_gregset (elf_gregset_t *gregsetp)
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, regp + regmap[i]);
+ regcache_raw_supply (current_regcache, i, regp + regmap[i]);
if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
- supply_register (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
+ regcache_raw_supply (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
+ regp + ORIG_EAX);
}
/* Fill register REGNO (if it is a general-purpose register) in
@@ -254,11 +244,12 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
&& I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
- regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
+ regcache_raw_collect (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
+ regp + ORIG_EAX);
}
#ifdef HAVE_PTRACE_GETREGS
@@ -321,7 +312,6 @@ void
supply_fpregset (elf_fpregset_t *fpregsetp)
{
i387_supply_fsave (current_regcache, -1, fpregsetp);
- dummy_sse_values ();
}
/* Fill register REGNO (if it is a floating-point register) in
@@ -456,32 +446,10 @@ store_fpxregs (int tid, int regno)
return 1;
}
-/* Fill the XMM registers in the register array with dummy values. For
- cases where we don't have access to the XMM registers. I think
- this is cleaner than printing a warning. For a cleaner solution,
- we should gdbarchify the i386 family. */
-
-static void
-dummy_sse_values (void)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- /* C doesn't have a syntax for NaN's, so write it out as an array of
- longs. */
- static long dummy[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
- static long mxcsr = 0x1f80;
- int reg;
-
- for (reg = 0; reg < tdep->num_xmm_regs; reg++)
- supply_register (XMM0_REGNUM + reg, (char *) dummy);
- if (tdep->num_xmm_regs > 0)
- supply_register (MXCSR_REGNUM, (char *) &mxcsr);
-}
-
#else
static int fetch_fpxregs (int tid) { return 0; }
static int store_fpxregs (int tid, int regno) { return 0; }
-static void dummy_sse_values (void) {}
#endif /* HAVE_PTRACE_GETFPXREGS */
@@ -657,7 +625,7 @@ i386_linux_dr_get (int regnum)
/* 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
+ stuff to the target vector. For now, just return zero if the
ptrace call fails. */
errno = 0;
value = ptrace (PTRACE_PEEKUSER, tid,
@@ -738,7 +706,7 @@ ps_get_thread_area (const struct ps_prochandle *ph,
Is this function needed? I'm guessing that the `base' is the
address of a a descriptor that libthread_db uses to find the
- thread local address base that GDB needs. Perhaphs that
+ thread local address base that GDB needs. Perhaps that
descriptor is defined by the ABI. Anyway, given that
libthread_db calls this function without prompting (gdb
requesting tls base) I guess it needs info in there anyway. */
@@ -767,7 +735,7 @@ static const unsigned char linux_syscall[] = { 0xcd, 0x80 };
#define LINUX_SYSCALL_LEN (sizeof linux_syscall)
/* The system call number is stored in the %eax register. */
-#define LINUX_SYSCALL_REGNUM 0 /* %eax */
+#define LINUX_SYSCALL_REGNUM I386_EAX_REGNUM
/* We are specifically interested in the sigreturn and rt_sigreturn
system calls. */
@@ -815,7 +783,7 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
that's about to be restored, and set the trace flag there. */
/* First check if PC is at a system call. */
- if (read_memory_nobpt (pc, (char *) buf, LINUX_SYSCALL_LEN) == 0
+ if (deprecated_read_memory_nobpt (pc, (char *) buf, LINUX_SYSCALL_LEN) == 0
&& memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0)
{
int syscall = read_register_pid (LINUX_SYSCALL_REGNUM,
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index e177d59d75d..f42f6b7bddf 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -83,13 +83,13 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
Checking for the code sequence should be somewhat reliable, because
the effect is to call the system call sigreturn. This is unlikely
- to occur anywhere other than a signal trampoline.
+ to occur anywhere other than in a signal trampoline.
It kind of sucks that we have to read memory from the process in
order to identify a signal trampoline, but there doesn't seem to be
- any other way. The DEPRECATED_PC_IN_SIGTRAMP macro in tm-linux.h
- arranges to only call us if no function name could be identified,
- which should be the case since the code is on the stack.
+ any other way. Therefore we only do the memory reads if no
+ function name could be identified, which should be the case since
+ the code is on the stack.
Detection of signal trampolines for handlers that set the
SA_RESTORER flag is in general not possible. Unfortunately this is
@@ -115,12 +115,13 @@ static const unsigned char linux_sigtramp_code[] =
#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
-/* If PC is in a sigtramp routine, return the address of the start of
- the routine. Otherwise, return 0. */
+/* If NEXT_FRAME unwinds into a sigtramp routine, return the address
+ of the start of the routine. Otherwise, return 0. */
static CORE_ADDR
-i386_linux_sigtramp_start (CORE_ADDR pc)
+i386_linux_sigtramp_start (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of
@@ -130,7 +131,7 @@ i386_linux_sigtramp_start (CORE_ADDR pc)
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)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
return 0;
if (buf[0] != LINUX_SIGTRAMP_INSN0)
@@ -151,7 +152,7 @@ i386_linux_sigtramp_start (CORE_ADDR pc)
pc -= adjust;
- if (read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
return 0;
}
@@ -182,12 +183,13 @@ static const unsigned char linux_rt_sigtramp_code[] =
#define LINUX_RT_SIGTRAMP_LEN (sizeof linux_rt_sigtramp_code)
-/* If PC is in a RT sigtramp routine, return the address of the start
- of the routine. Otherwise, return 0. */
+/* If NEXT_FRAME unwinds into an RT sigtramp routine, return the
+ address of the start of the routine. Otherwise, return 0. */
static CORE_ADDR
-i386_linux_rt_sigtramp_start (CORE_ADDR pc)
+i386_linux_rt_sigtramp_start (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_RT_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of
@@ -197,7 +199,7 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
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_RT_SIGTRAMP_LEN) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_RT_SIGTRAMP_LEN))
return 0;
if (buf[0] != LINUX_RT_SIGTRAMP_INSN0)
@@ -207,7 +209,8 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
pc -= LINUX_RT_SIGTRAMP_OFFSET1;
- if (read_memory_nobpt (pc, (char *) buf, LINUX_RT_SIGTRAMP_LEN) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, buf,
+ LINUX_RT_SIGTRAMP_LEN))
return 0;
}
@@ -217,19 +220,25 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
return pc;
}
-/* Return whether PC is in a GNU/Linux sigtramp routine. */
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ GNU/Linux sigtramp routine. */
static int
-i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386_linux_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
/* If we have NAME, we can optimize the search. The trampolines are
named __restore and __restore_rt. However, they aren'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 (i386_linux_sigtramp_start (pc) != 0
- || i386_linux_rt_sigtramp_start (pc) != 0);
+ return (i386_linux_sigtramp_start (next_frame) != 0
+ || i386_linux_rt_sigtramp_start (next_frame) != 0);
return (strcmp ("__restore", name) == 0
|| strcmp ("__restore_rt", name) == 0);
@@ -251,7 +260,7 @@ i386_linux_sigcontext_addr (struct frame_info *next_frame)
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4);
- pc = i386_linux_sigtramp_start (frame_pc_unwind (next_frame));
+ pc = i386_linux_sigtramp_start (next_frame);
if (pc)
{
/* The sigcontext structure lives on the stack, right after
@@ -265,7 +274,7 @@ i386_linux_sigcontext_addr (struct frame_info *next_frame)
return sp;
}
- pc = i386_linux_rt_sigtramp_start (frame_pc_unwind (next_frame));
+ pc = i386_linux_rt_sigtramp_start (next_frame);
if (pc)
{
CORE_ADDR ucontext_addr;
@@ -394,16 +403,11 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
+ tdep->sigtramp_p = i386_linux_sigtramp_p;
tdep->sigcontext_addr = i386_linux_sigcontext_addr;
tdep->sc_reg_offset = i386_linux_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (i386_linux_sc_reg_offset);
- /* When the i386 Linux kernel calls a signal handler, the return
- address points to a bit of code on the stack. This function is
- used to identify this bit of code as a signal trampoline in order
- to support backtracing through calls to signal handlers. */
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
-
/* GNU/Linux uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 69a945e772f..eed66a975d8 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -1,6 +1,6 @@
-/* i386-nto-tdep.c - i386 specific functionality for QNX Neutrino.
+/* Target-dependent code for QNX Neutrino x86.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
@@ -73,13 +73,13 @@ i386nto_supply_gregset (char *gpregs)
unsigned regno;
int empty = 0;
- for (regno = 0; regno < FP0_REGNUM; regno++)
+ for (regno = 0; regno < I386_NUM_GREGS; regno++)
{
int offset = nto_reg_offset (regno);
if (offset == -1)
- supply_register (regno, (char *) &empty);
+ regcache_raw_supply (current_regcache, regno, (char *) &empty);
else
- supply_register (regno, gpregs + offset);
+ regcache_raw_supply (current_regcache, regno, gpregs + offset);
}
}
@@ -111,9 +111,9 @@ i386nto_regset_id (int regno)
{
if (regno == -1)
return NTO_REG_END;
- else if (regno < FP0_REGNUM)
+ else if (regno < I386_NUM_GREGS)
return NTO_REG_GENERAL;
- else if (regno < FPC_REGNUM)
+ else if (regno < I386_NUM_GREGS + I386_NUM_FREGS)
return NTO_REG_FLOAT;
return -1; /* Error. */
@@ -176,7 +176,7 @@ i386nto_regset_fill (int regset, char *data)
{
int offset = nto_reg_offset (regno);
if (offset != -1)
- regcache_collect (regno, data + offset);
+ regcache_raw_collect (current_regcache, regno, data + offset);
}
}
else if (regset == NTO_REG_FLOAT)
@@ -225,9 +225,16 @@ i386nto_svr4_fetch_link_map_offsets (void)
return lmp;
}
+/* Return whether the frame preceding NEXT_FRAME corresponds to a QNX
+ Neutrino sigtramp routine. */
+
static int
-i386nto_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386nto_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
return name && strcmp ("__signalstub", name) == 0;
}
@@ -242,7 +249,7 @@ i386nto_sigcontext_addr (struct frame_info *next_frame)
char buf[4];
CORE_ADDR sp;
- frame_unwind_register (next_frame, SP_REGNUM, buf);
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4);
return sp + I386_NTO_SIGCONTEXT_OFFSET;
@@ -278,7 +285,7 @@ i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386nto_pc_in_sigtramp);
+ tdep->sigtramp_p = i386nto_sigtramp_p;
tdep->sigcontext_addr = i386nto_sigcontext_addr;
tdep->sc_pc_offset = 56;
tdep->sc_sp_offset = 68;
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index 96cd10d4ce2..46a7a7c6caf 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -1,5 +1,6 @@
/* Target-dependent code for Solaris x86.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,7 +23,10 @@
#include "value.h"
#include "osabi.h"
+#include "gdb_string.h"
+
#include "i386-tdep.h"
+#include "solib-svr4.h"
/* From <ia32/sys/reg.h>. */
static int i386_sol2_gregset_reg_offset[] =
@@ -45,12 +49,18 @@ static int i386_sol2_gregset_reg_offset[] =
0 * 4 /* %gs */
};
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ Solaris sigtramp routine. */
+
static int
-i386_sol2_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386_sol2_sigtramp_p (struct frame_info *next_frame)
{
- /* Signal handler frames under Solaris 2 are recognized by a return
- address of 0xffffffff. */
- return (pc == 0xffffffff);
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ return (name && (strcmp ("sigacthandler", name) == 0
+ || strcmp (name, "ucbsigvechandler") == 0));
}
/* Solaris doesn't have a `struct sigcontext', but it does have a
@@ -85,12 +95,14 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sizeof_gregset = 19 * 4;
tdep->sizeof_fpregset = 380;
+ /* Signal trampolines are slightly different from SVR4. */
+ tdep->sigtramp_p = i386_sol2_sigtramp_p;
tdep->sigcontext_addr = i386_sol2_mcontext_addr;
tdep->sc_reg_offset = tdep->gregset_reg_offset;
tdep->sc_num_regs = tdep->gregset_num_regs;
- /* Signal trampolines are slightly different from SVR4. */
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b3a27931a93..cc727c81d98 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -51,8 +51,7 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
-/* Names of the registers. The first 10 registers match the register
- numbering scheme used by GCC for stabs and DWARF. */
+/* Register names. */
static char *i386_register_names[] =
{
@@ -71,7 +70,7 @@ static char *i386_register_names[] =
static const int i386_num_register_names = ARRAY_SIZE (i386_register_names);
-/* MMX registers. */
+/* Register names for MMX pseudo-registers. */
static char *i386_mmx_names[] =
{
@@ -166,53 +165,24 @@ i386_register_name (int reg)
return NULL;
}
-
-/* FIXME: jimb/2004-04-01: I don't think these functions are right.
- For a given platform, GCC always uses the same register numbering
- in both STABS and Dwarf2: gcc/dbxout.c and gcc/dwarf2out.c both use
- the DBX_REGISTER_NUMBER macro, as defined by the config headers.
- If you compile a program so that its variables are allocated to
- floating-point registers, first with STABS and again with Dwarf 2,
- you'll see that the variable's register numbers are the same in
- each case.
-
- GCC does use (at least) two different register numberings on the
- i386; they differ in how they number %ebp, %esp, %eflags, and the
- floating-point registers. And it has a third numbering for "64bit
- mode", which I assume is x86_64. But it always uses a given
- numbering in both STABS and Dwarf.
-
- This does not match the arrangement we have below, which presumes
- that STABS and Dwarf numberings are different, and does some
- strange mixing and matching (e.g., registering the Dwarf 2 function
- as the STABS function for "Generic i386 ELF") to get close enough
- to the right effect on the platforms we care about.
-
- If we wanted to match GCC, we should have two separate register
- number translation functions (we handle x86_64 in a separate tdep
- file altogether), one corresponding to each of GCC's i386 register
- maps. And for a given platform, we would register one of them as
- both the STABS and Dwarf 2 functions.
-
- However, we don't aspire to match GCC; we aspire to match the
- native system's tools. I don't have access to lots of different
- native compilers and debuggers to verify that GCC is matching their
- behavior in this regard. Is it sufficient to argue that we at
- least want to match GNU's compiler, and say we'll fix bugs relative
- to native tools as they're reported? */
-
-
-/* Convert stabs register number REG to the appropriate register
+/* Convert a dbx register number REG to the appropriate register
number used by GDB. */
static int
-i386_stab_reg_to_regnum (int reg)
+i386_dbx_reg_to_regnum (int reg)
{
- /* This implements what GCC calls the "default" register map. */
+ /* This implements what GCC calls the "default" register map
+ (dbx_register_map[]). */
+
if (reg >= 0 && reg <= 7)
{
- /* General-purpose registers. */
- return reg;
+ /* General-purpose registers. The debug info calls %ebp
+ register 4, and %esp register 5. */
+ if (reg == 4)
+ return 5;
+ else if (reg == 5)
+ return 4;
+ else return reg;
}
else if (reg >= 12 && reg <= 19)
{
@@ -234,13 +204,16 @@ i386_stab_reg_to_regnum (int reg)
return NUM_REGS + NUM_PSEUDO_REGS;
}
-/* Convert DWARF register number REG to the appropriate register
- number used by GDB. */
+/* Convert SVR4 register number REG to the appropriate register number
+ used by GDB. */
static int
-i386_dwarf_reg_to_regnum (int reg)
+i386_svr4_reg_to_regnum (int reg)
{
- /* The DWARF register numbering includes %eip and %eflags, and
+ /* This implements the GCC register map that tries to be compatible
+ with the SVR4 C compiler for DWARF (svr4_dbx_register_map[]). */
+
+ /* The SVR4 register numbering includes %eip and %eflags, and
numbers the floating point registers differently. */
if (reg >= 0 && reg <= 9)
{
@@ -254,8 +227,8 @@ i386_dwarf_reg_to_regnum (int reg)
}
else if (reg >= 21)
{
- /* The SSE and MMX registers have identical numbers as in stabs. */
- return i386_stab_reg_to_regnum (reg);
+ /* The SSE and MMX registers have the same numbers as with dbx. */
+ return i386_dbx_reg_to_regnum (reg);
}
/* This will hopefully provoke a warning. */
@@ -499,21 +472,123 @@ i386_skip_probe (CORE_ADDR pc)
return pc;
}
+/* Maximum instruction length we need to handle. */
+#define I386_MAX_INSN_LEN 6
+
+/* Instruction description. */
+struct i386_insn
+{
+ size_t len;
+ unsigned char insn[I386_MAX_INSN_LEN];
+ unsigned char mask[I386_MAX_INSN_LEN];
+};
+
+/* Search for the instruction at PC in the list SKIP_INSNS. Return
+ the first instruction description that matches. Otherwise, return
+ NULL. */
+
+static struct i386_insn *
+i386_match_insn (CORE_ADDR pc, struct i386_insn *skip_insns)
+{
+ struct i386_insn *insn;
+ unsigned char op;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
+ for (insn = skip_insns; insn->len > 0; insn++)
+ {
+ if ((op & insn->mask[0]) == insn->insn[0])
+ {
+ unsigned char buf[I386_MAX_INSN_LEN - 1];
+ size_t i;
+
+ gdb_assert (insn->len > 1);
+ gdb_assert (insn->len <= I386_MAX_INSN_LEN);
+
+ read_memory (pc + 1, buf, insn->len - 1);
+ for (i = 1; i < insn->len; i++)
+ {
+ if ((buf[i - 1] & insn->mask[i]) != insn->insn[i])
+ break;
+
+ return insn;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+/* Some special instructions that might be migrated by GCC into the
+ part of the prologue that sets up the new stack frame. Because the
+ stack frame hasn't been setup yet, no registers have been saved
+ yet, and only the scratch registers %eax, %ecx and %edx can be
+ touched. */
+
+struct i386_insn i386_frame_setup_skip_insns[] =
+{
+ /* Check for `movb imm8, r' and `movl imm32, r'.
+
+ ??? Should we handle 16-bit operand-sizes here? */
+
+ /* `movb imm8, %al' and `movb imm8, %ah' */
+ /* `movb imm8, %cl' and `movb imm8, %ch' */
+ { 2, { 0xb0, 0x00 }, { 0xfa, 0x00 } },
+ /* `movb imm8, %dl' and `movb imm8, %dh' */
+ { 2, { 0xb2, 0x00 }, { 0xfb, 0x00 } },
+ /* `movl imm32, %eax' and `movl imm32, %ecx' */
+ { 5, { 0xb8 }, { 0xfe } },
+ /* `movl imm32, %edx' */
+ { 5, { 0xba }, { 0xff } },
+
+ /* Check for `mov imm32, r32'. Note that there is an alternative
+ encoding for `mov m32, %eax'.
+
+ ??? Should we handle SIB adressing here?
+ ??? Should we handle 16-bit operand-sizes here? */
+
+ /* `movl m32, %eax' */
+ { 5, { 0xa1 }, { 0xff } },
+ /* `movl m32, %eax' and `mov; m32, %ecx' */
+ { 6, { 0x89, 0x05 }, {0xff, 0xf7 } },
+ /* `movl m32, %edx' */
+ { 6, { 0x89, 0x15 }, {0xff, 0xff } },
+
+ /* Check for `xorl r32, r32' and the equivalent `subl r32, r32'.
+ Because of the symmetry, there are actually two ways to encode
+ these instructions; opcode bytes 0x29 and 0x2b for `subl' and
+ opcode bytes 0x31 and 0x33 for `xorl'. */
+
+ /* `subl %eax, %eax' */
+ { 2, { 0x29, 0xc0 }, { 0xfd, 0xff } },
+ /* `subl %ecx, %ecx' */
+ { 2, { 0x29, 0xc9 }, { 0xfd, 0xff } },
+ /* `subl %edx, %edx' */
+ { 2, { 0x29, 0xd2 }, { 0xfd, 0xff } },
+ /* `xorl %eax, %eax' */
+ { 2, { 0x31, 0xc0 }, { 0xfd, 0xff } },
+ /* `xorl %ecx, %ecx' */
+ { 2, { 0x31, 0xc9 }, { 0xfd, 0xff } },
+ /* `xorl %edx, %edx' */
+ { 2, { 0x31, 0xd2 }, { 0xfd, 0xff } },
+ { 0 }
+};
+
/* 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. */
+ instruction after the sequence that sets up the frame or LIMIT,
+ whichever is smaller. If we don't recognize the code, return PC. */
static CORE_ADDR
-i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
+i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR limit,
struct i386_frame_cache *cache)
{
+ struct i386_insn *insn;
unsigned char op;
int skip = 0;
- if (current_pc <= pc)
- return current_pc;
+ if (limit <= pc)
+ return limit;
op = read_memory_unsigned_integer (pc, 1);
@@ -523,65 +598,48 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
starts this instruction sequence. */
cache->saved_regs[I386_EBP_REGNUM] = 0;
cache->sp_offset += 4;
+ pc++;
/* If that's all, return now. */
- if (current_pc <= pc + 1)
- return current_pc;
-
- op = read_memory_unsigned_integer (pc + 1, 1);
-
- /* Check for some special instructions that might be migrated
- by GCC into the prologue. We check for
-
- xorl %ebx, %ebx
- xorl %ecx, %ecx
- xorl %edx, %edx
- xorl %eax, %eax
-
- and the equivalent
+ if (limit <= pc)
+ return limit;
- subl %ebx, %ebx
- subl %ecx, %ecx
- subl %edx, %edx
- subl %eax, %eax
-
- Because of the symmetry, there are actually two ways to
- encode these instructions; with opcode bytes 0x29 and 0x2b
- for `subl' and opcode bytes 0x31 and 0x33 for `xorl'.
+ /* Check for some special instructions that might be migrated by
+ GCC into the prologue and skip them. At this point in the
+ prologue, code should only touch the scratch registers %eax,
+ %ecx and %edx, so while the number of posibilities is sheer,
+ it is limited.
Make sure we only skip these instructions if we later see the
`movl %esp, %ebp' that actually sets up the frame. */
- while (op == 0x29 || op == 0x2b || op == 0x31 || op == 0x33)
+ while (pc + skip < limit)
{
- op = read_memory_unsigned_integer (pc + skip + 2, 1);
- switch (op)
- {
- case 0xdb: /* %ebx */
- case 0xc9: /* %ecx */
- case 0xd2: /* %edx */
- case 0xc0: /* %eax */
- skip += 2;
- break;
- default:
- return pc + 1;
- }
+ insn = i386_match_insn (pc + skip, i386_frame_setup_skip_insns);
+ if (insn == NULL)
+ break;
- op = read_memory_unsigned_integer (pc + skip + 1, 1);
+ skip += insn->len;
}
+ /* If that's all, return now. */
+ if (limit <= pc + skip)
+ return limit;
+
+ op = read_memory_unsigned_integer (pc + skip, 1);
+
/* Check for `movl %esp, %ebp' -- can be written in two ways. */
switch (op)
{
case 0x8b:
- if (read_memory_unsigned_integer (pc + skip + 2, 1) != 0xec)
- return pc + 1;
+ if (read_memory_unsigned_integer (pc + skip + 1, 1) != 0xec)
+ return pc;
break;
case 0x89:
- if (read_memory_unsigned_integer (pc + skip + 2, 1) != 0xe5)
- return pc + 1;
+ if (read_memory_unsigned_integer (pc + skip + 1, 1) != 0xe5)
+ return pc;
break;
default:
- return pc + 1;
+ return pc;
}
/* OK, we actually have a frame. We just don't know how large
@@ -589,49 +647,49 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
necessary. We also now commit to skipping the special
instructions mentioned before. */
cache->locals = 0;
- pc += skip;
+ pc += (skip + 2);
/* If that's all, return now. */
- if (current_pc <= pc + 3)
- return current_pc;
+ if (limit <= pc)
+ return limit;
/* Check for stack adjustment
subl $XXX, %esp
- NOTE: You can't subtract a 16 bit immediate from a 32 bit
+ 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 = read_memory_unsigned_integer (pc + 3, 1);
+ op = read_memory_unsigned_integer (pc, 1);
if (op == 0x83)
{
- /* `subl' with 8 bit immediate. */
- if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
+ /* `subl' with 8-bit immediate. */
+ if (read_memory_unsigned_integer (pc + 1, 1) != 0xec)
/* Some instruction starting with 0x83 other than `subl'. */
- return pc + 3;
+ return pc;
- /* `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;
+ /* `subl' with signed 8-bit immediate (though it wouldn't
+ make sense to be negative). */
+ cache->locals = read_memory_integer (pc + 2, 1);
+ return pc + 3;
}
else if (op == 0x81)
{
- /* Maybe it is `subl' with a 32 bit immedediate. */
- if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
+ /* Maybe it is `subl' with a 32-bit immediate. */
+ if (read_memory_unsigned_integer (pc + 1, 1) != 0xec)
/* Some instruction starting with 0x81 other than `subl'. */
- return pc + 3;
+ return pc;
- /* It is `subl' with a 32 bit immediate. */
- cache->locals = read_memory_integer (pc + 5, 4);
- return pc + 9;
+ /* It is `subl' with a 32-bit immediate. */
+ cache->locals = read_memory_integer (pc + 2, 4);
+ return pc + 6;
}
else
{
/* Some instruction other than `subl'. */
- return pc + 3;
+ return pc;
}
}
- else if (op == 0xc8) /* enter $XXX */
+ else if (op == 0xc8) /* enter */
{
cache->locals = read_memory_unsigned_integer (pc + 1, 2);
return pc + 4;
@@ -684,9 +742,9 @@ i386_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
once used in the System V compiler).
Local space is allocated just below the saved %ebp by either the
- 'enter' instruction, or by "subl $<size>, %esp". 'enter' has a 16
- bit unsigned argument for space to allocate, and the 'addl'
- instruction could have either a signed byte, or 32 bit immediate.
+ 'enter' instruction, or by "subl $<size>, %esp". 'enter' has a
+ 16-bit unsigned argument for space to allocate, and the 'addl'
+ instruction could have either a signed byte, or 32-bit immediate.
Next, the registers used by this function are pushed. With the
System V compiler they will always be in the order: %edi, %esi,
@@ -777,7 +835,13 @@ i386_skip_prologue (CORE_ADDR start_pc)
}
}
- return i386_follow_jump (pc);
+ /* If the function starts with a branch (to startup code at the end)
+ the last instruction should bring us back to the first
+ instruction of the real code. */
+ if (i386_follow_jump (start_pc) != start_pc)
+ pc = i386_follow_jump (pc);
+
+ return pc;
}
/* This function is 64-bit safe. */
@@ -1046,17 +1110,27 @@ static const struct frame_unwind i386_sigtramp_frame_unwind =
static const struct frame_unwind *
i386_sigtramp_frame_sniffer (struct frame_info *next_frame)
{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- char *name;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame));
- /* We shouldn't even bother to try if the OSABI didn't register
- a sigcontext_addr handler. */
- if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ /* We shouldn't even bother if we don't have a sigcontext_addr
+ handler. */
+ if (tdep->sigcontext_addr == NULL)
return NULL;
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
- return &i386_sigtramp_frame_unwind;
+ if (tdep->sigtramp_p != NULL)
+ {
+ if (tdep->sigtramp_p (next_frame))
+ return &i386_sigtramp_frame_unwind;
+ }
+
+ if (tdep->sigtramp_start != 0)
+ {
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+
+ gdb_assert (tdep->sigtramp_end != 0);
+ if (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end)
+ return &i386_sigtramp_frame_unwind;
+ }
return NULL;
}
@@ -1130,7 +1204,7 @@ i386_get_longjmp_target (CORE_ADDR *pc)
static CORE_ADDR
-i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -1178,7 +1252,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
(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
+ definition 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
@@ -1363,7 +1437,28 @@ i386_return_value (struct gdbarch *gdbarch, struct type *type,
if ((code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION)
&& !i386_reg_struct_return_p (gdbarch, type))
- return RETURN_VALUE_STRUCT_CONVENTION;
+ {
+ /* The System V ABI says that:
+
+ "A function that returns a structure or union also sets %eax
+ to the value of the original address of the caller's area
+ before it returns. Thus when the caller receives control
+ again, the address of the returned object resides in register
+ %eax and can be used to access the object."
+
+ So the ABI guarantees that we can always find the return
+ value just after the function has returned. */
+
+ if (readbuf)
+ {
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, I386_EAX_REGNUM, &addr);
+ read_memory (addr, readbuf, TYPE_LENGTH (type));
+ }
+
+ return RETURN_VALUE_ABI_RETURNS_ADDRESS;
+ }
/* This special case is for structures consisting of a single
`float' or `double' member. These structures are returned in
@@ -1550,7 +1645,7 @@ i386_register_to_value (struct frame_info *frame, int regnum,
return;
}
- /* Read a value spread accross multiple registers. */
+ /* Read a value spread across multiple registers. */
gdb_assert (len > 4 && len % 4 == 0);
@@ -1582,7 +1677,7 @@ i386_value_to_register (struct frame_info *frame, int regnum,
return;
}
- /* Write a value spread accross multiple registers. */
+ /* Write a value spread across multiple registers. */
gdb_assert (len > 4 && len % 4 == 0);
@@ -1598,15 +1693,15 @@ i386_value_to_register (struct frame_info *frame, int regnum,
}
}
-/* Supply register REGNUM from the general-purpose register set REGSET
- to register cache REGCACHE. If REGNUM is -1, do this for all
- registers in REGSET. */
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
void
i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
const char *regs = gregs;
int i;
@@ -1620,15 +1715,39 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
}
}
-/* Supply register REGNUM from the floating-point register set REGSET
- to register cache REGCACHE. If REGNUM is -1, do this for all
- registers in REGSET. */
+/* Collect register REGNUM from the register cache REGCACHE and store
+ it in the buffer specified by GREGS and LEN as described by the
+ general-purpose register set REGSET. If REGNUM is -1, do this for
+ all registers in REGSET. */
+
+void
+i386_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len)
+{
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
+ char *regs = gregs;
+ int i;
+
+ gdb_assert (len == tdep->sizeof_gregset);
+
+ for (i = 0; i < tdep->gregset_num_regs; i++)
+ {
+ if ((regnum == i || regnum == -1)
+ && tdep->gregset_reg_offset[i] != -1)
+ regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
+ }
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+ in the floating-point register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
static void
i386_supply_fpregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
if (len == I387_SIZEOF_FXSAVE)
{
@@ -1640,6 +1759,28 @@ i386_supply_fpregset (const struct regset *regset, struct regcache *regcache,
i387_supply_fsave (regcache, regnum, fpregs);
}
+/* Collect register REGNUM from the register cache REGCACHE and store
+ it in the buffer specified by FPREGS and LEN as described by the
+ floating-point register set REGSET. If REGNUM is -1, do this for
+ all registers in REGSET. */
+
+static void
+i386_collect_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len)
+{
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
+
+ if (len == I387_SIZEOF_FXSAVE)
+ {
+ i387_collect_fxsave (regcache, regnum, fpregs);
+ return;
+ }
+
+ gdb_assert (len == tdep->sizeof_fpregset);
+ i387_collect_fsave (regcache, regnum, fpregs);
+}
+
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
@@ -1652,11 +1793,8 @@ i386_regset_from_core_section (struct gdbarch *gdbarch,
if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset)
{
if (tdep->gregset == NULL)
- {
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = tdep;
- tdep->gregset->supply_regset = i386_supply_gregset;
- }
+ tdep->gregset = regset_alloc (gdbarch, i386_supply_gregset,
+ i386_collect_gregset);
return tdep->gregset;
}
@@ -1665,11 +1803,8 @@ i386_regset_from_core_section (struct gdbarch *gdbarch,
&& sect_size == I387_SIZEOF_FXSAVE))
{
if (tdep->fpregset == NULL)
- {
- tdep->fpregset = XMALLOC (struct regset);
- tdep->fpregset->descr = tdep;
- tdep->fpregset->supply_regset = i386_supply_fpregset;
- }
+ tdep->fpregset = regset_alloc (gdbarch, i386_supply_fpregset,
+ i386_collect_fpregset);
return tdep->fpregset;
}
@@ -1726,12 +1861,16 @@ i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name)
}
-/* Return non-zero if PC and NAME show that we are in a signal
- trampoline. */
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ sigtramp routine. */
static int
-i386_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
return (name && strcmp ("_sigtramp", name) == 0);
}
@@ -1761,11 +1900,18 @@ i386_print_insn (bfd_vma pc, struct disassemble_info *info)
/* System V Release 4 (SVR4). */
+/* Return whether the frame preceding NEXT_FRAME corresponds to a SVR4
+ sigtramp routine. */
+
static int
-i386_svr4_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386_svr4_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
/* UnixWare uses _sigacthandler. The origin of the other symbols is
currently unknown. */
+ find_pc_partial_function (pc, &name, NULL, NULL);
return (name && (strcmp ("_sigreturn", name) == 0
|| strcmp ("_sigacthandler", name) == 0
|| strcmp ("sigvechandler", name) == 0));
@@ -1788,23 +1934,13 @@ i386_svr4_sigcontext_addr (struct frame_info *next_frame)
}
-/* DJGPP. */
-
-static int
-i386_go32_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
- /* DJGPP doesn't have any special frames for signal handlers. */
- return 0;
-}
-
-
/* Generic ELF. */
void
i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- /* We typically use stabs-in-ELF with the DWARF register numbering. */
- set_gdbarch_stab_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+ /* We typically use stabs-in-ELF with the SVR4 register numbering. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
}
/* System V Release 4 (SVR4). */
@@ -1821,7 +1957,7 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
+ tdep->sigtramp_p = i386_svr4_sigtramp_p;
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
tdep->sc_pc_offset = 36 + 14 * 4;
tdep->sc_sp_offset = 36 + 17 * 4;
@@ -1836,7 +1972,8 @@ i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_go32_pc_in_sigtramp);
+ /* DJGPP doesn't have any special frames for signal handlers. */
+ tdep->sigtramp_p = NULL;
tdep->jb_pc_offset = 36;
}
@@ -1941,7 +2078,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->sizeof_fpregset = I387_SIZEOF_FSAVE;
/* The default settings include the FPU registers, the MMX registers
- and the SSE registers. This can be overidden for a specific ABI
+ and the SSE registers. This can be overridden for a specific ABI
by adjusting the members `st0_regnum', `mm0_regnum' and
`num_xmm_regs' of `struct gdbarch_tdep', otherwise the registers
will show up in the output of "info all-registers". Ideally we
@@ -1957,7 +2094,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->st0_regnum = I386_ST0_REGNUM;
/* The MMX registers are implemented as pseudo-registers. Put off
- caclulating the register number for %mm0 until we know the number
+ calculating the register number for %mm0 until we know the number
of raw registers. */
tdep->mm0_regnum = 0;
@@ -1968,6 +2105,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->struct_return = pcc_struct_return;
tdep->sigtramp_start = 0;
tdep->sigtramp_end = 0;
+ tdep->sigtramp_p = i386_sigtramp_p;
tdep->sigcontext_addr = NULL;
tdep->sc_reg_offset = NULL;
tdep->sc_pc_offset = -1;
@@ -1996,13 +2134,43 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
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);
- set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
-
- /* Use the DWARF register numbering scheme for DWARF and DWARF 2. */
- set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+ /* NOTE: kettenis/20040418: GCC does have two possible register
+ numbering schemes on the i386: dbx and SVR4. These schemes
+ differ in how they number %ebp, %esp, %eflags, and the
+ floating-point registers, and are implemented by the arrays
+ dbx_register_map[] and svr4_dbx_register_map in
+ gcc/config/i386.c. GCC also defines a third numbering scheme in
+ gcc/config/i386.c, which it designates as the "default" register
+ map used in 64bit mode. This last register numbering scheme is
+ implemented in dbx64_register_map, and is used for AMD64; see
+ amd64-tdep.c.
+
+ Currently, each GCC i386 target always uses the same register
+ numbering scheme across all its supported debugging formats
+ i.e. SDB (COFF), stabs and DWARF 2. This is because
+ gcc/sdbout.c, gcc/dbxout.c and gcc/dwarf2out.c all use the
+ DBX_REGISTER_NUMBER macro which is defined by each target's
+ respective config header in a manner independent of the requested
+ output debugging format.
+
+ This does not match the arrangement below, which presumes that
+ the SDB and stabs numbering schemes differ from the DWARF and
+ DWARF 2 ones. The reason for this arrangement is that it is
+ likely to get the numbering scheme for the target's
+ default/native debug format right. For targets where GCC is the
+ native compiler (FreeBSD, NetBSD, OpenBSD, GNU/Linux) or for
+ targets where the native toolchain uses a different numbering
+ scheme for a particular debug format (stabs-in-ELF on Solaris)
+ the defaults below will have to be overridden, like
+ i386_elf_init_abi() does. */
+
+ /* Use the dbx register numbering scheme for stabs and COFF. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum);
+ set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum);
+
+ /* Use the SVR4 register numbering scheme for DWARF and DWARF 2. */
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
/* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
be in use on any of the supported i386 targets. */
@@ -2029,7 +2197,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
/* Wire in the MMX registers. */
set_gdbarch_num_pseudo_regs (gdbarch, i386_num_mmx_regs);
@@ -2111,7 +2278,7 @@ _initialize_i386_tdep (void)
Set the disassembly flavor, the valid values are \"att\" and \"intel\", \
and the default value is \"att\".",
&setlist);
- add_show_from_set (new_cmd, &showlist);
+ deprecated_add_show_from_set (new_cmd, &showlist);
}
/* Add the variable that controls the convention for returning
@@ -2125,7 +2292,7 @@ and the default value is \"att\".",
Set the convention for returning small structs, valid values \
are \"default\", \"pcc\" and \"reg\", and the default value is \"default\".",
&setlist);
- add_show_from_set (new_cmd, &showlist);
+ deprecated_add_show_from_set (new_cmd, &showlist);
}
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 9cb87653e12..29f2f27ecec 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -89,6 +89,9 @@ struct gdbarch_tdep
CORE_ADDR sigtramp_start;
CORE_ADDR sigtramp_end;
+ /* Detect sigtramp. */
+ int (*sigtramp_p) (struct frame_info *);
+
/* Get address of sigcontext for sigtramp. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
@@ -108,48 +111,11 @@ struct gdbarch_tdep
(at most) in the FPU, but are zero-extended to 32 bits in GDB's
register cache. */
-/* "Generic" floating point control register. */
-#define FPC_REGNUM (FP0_REGNUM + 8)
-
-/* FPU control word. */
-#define FCTRL_REGNUM FPC_REGNUM
-
-/* FPU status word. */
-#define FSTAT_REGNUM (FPC_REGNUM + 1)
-
-/* FPU register tag word. */
-#define FTAG_REGNUM (FPC_REGNUM + 2)
-
-/* FPU instruction's code segment selector, called "FPU Instruction
- Pointer Selector" in the IA-32 manuals. */
-#define FISEG_REGNUM (FPC_REGNUM + 3)
-
-/* FPU instruction's offset within segment. */
-#define FIOFF_REGNUM (FPC_REGNUM + 4)
-
-/* FPU operand's data segment. */
-#define FOSEG_REGNUM (FPC_REGNUM + 5)
-
-/* FPU operand's offset within segment */
-#define FOOFF_REGNUM (FPC_REGNUM + 6)
-
-/* FPU opcode, bottom eleven bits. */
-#define FOP_REGNUM (FPC_REGNUM + 7)
-
/* Return non-zero if REGNUM matches the FP register and the FP
register set is active. */
extern int i386_fp_regnum_p (int regnum);
extern int i386_fpc_regnum_p (int regnum);
-/* SSE registers. */
-
-/* First SSE data register. */
-#define XMM0_REGNUM (FPC_REGNUM + 8)
-
-/* SSE control/status register. */
-#define MXCSR_REGNUM \
- (XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs)
-
/* Register numbers of various important registers. */
enum i386_regnum
@@ -185,10 +151,9 @@ enum i386_regnum
/* Functions exported from i386-tdep.c. */
extern CORE_ADDR i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name);
-extern int i386_frameless_signal_p (struct frame_info *frame);
-/* Return the name of register REG. */
-extern char const *i386_register_name (int reg);
+/* Return the name of register REGNUM. */
+extern char const *i386_register_name (int regnum);
/* Return non-zero if REGNUM is a member of the specified group. */
extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
@@ -217,9 +182,6 @@ extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
/* Functions and variables exported from i386bsd-tdep.c. */
extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
-extern int i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name);
-extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
-extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
extern CORE_ADDR i386fbsd_sigtramp_start_addr;
extern CORE_ADDR i386fbsd_sigtramp_end_addr;
extern CORE_ADDR i386obsd_sigtramp_start_addr;
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index 0f06b2b9ba5..f54d2f0fb72 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -31,20 +31,8 @@
#include <machine/reg.h>
#include <machine/frame.h>
-#ifdef HAVE_SYS_PROCFS_H
-#include <sys/procfs.h>
-#endif
-
-#ifndef HAVE_GREGSET_T
-typedef struct reg gregset_t;
-#endif
-
-#ifndef HAVE_FPREGSET_T
-typedef struct fpreg fpregset_t;
-#endif
-
-#include "gregset.h"
#include "i386-tdep.h"
+#include "i387-tdep.h"
/* In older BSD versions we cannot get at some of the segment
@@ -52,21 +40,13 @@ typedef struct fpreg fpregset_t;
registers until the 3.0 release. We have autoconf checks for their
presence, and deal gracefully with their absence. */
-/* Registers we shouldn't try to fetch. */
-#undef CANNOT_FETCH_REGISTER
-#define CANNOT_FETCH_REGISTER(regnum) cannot_fetch_register (regnum)
-
-/* Registers we shouldn't try to store. */
-#undef CANNOT_STORE_REGISTER
-#define CANNOT_STORE_REGISTER(regnum) cannot_fetch_register (regnum)
-
-/* Offset to the gregset_t location where REG is stored. */
-#define REG_OFFSET(reg) offsetof (gregset_t, reg)
+/* Offset in `struct reg' where MEMBER is stored. */
+#define REG_OFFSET(member) offsetof (struct reg, member)
-/* At reg_offset[REGNUM] you'll find the offset to the gregset_t
- location where the GDB register REGNUM is stored. Unsupported
+/* At i386bsd_reg_offset[REGNUM] you'll find the offset in `struct
+ reg' where the GDB register REGNUM is stored. Unsupported
registers are marked with `-1'. */
-static int reg_offset[] =
+static int i386bsd_r_reg_offset[] =
{
REG_OFFSET (r_eax),
REG_OFFSET (r_ecx),
@@ -94,8 +74,6 @@ static int reg_offset[] =
#endif
};
-#define REG_ADDR(regset, regnum) ((char *) (regset) + reg_offset[regnum])
-
/* Macro to determine if a register is fetched with PT_GETREGS. */
#define GETREGS_SUPPLIES(regnum) \
((0 <= (regnum) && (regnum) <= 15))
@@ -105,68 +83,46 @@ static int reg_offset[] =
so that we try PT_GETXMMREGS the first time around. */
static int have_ptrace_xmmregs = -1;
#endif
-
-/* Return nonzero if we shouldn't try to fetch register REGNUM. */
-
-static int
-cannot_fetch_register (int regnum)
-{
- return (reg_offset[regnum] == -1);
-}
-/* Transfering the registers between GDB, inferiors and core files. */
+/* Supply the general-purpose registers in GREGS, to REGCACHE. */
-/* Fill GDB's register array with the general-purpose register values
- in *GREGSETP. */
-
-void
-supply_gregset (gregset_t *gregsetp)
+static void
+i386bsd_supply_gregset (struct regcache *regcache, const void *gregs)
{
- int i;
+ const char *regs = gregs;
+ int regnum;
- for (i = 0; i < I386_NUM_GREGS; i++)
+ for (regnum = 0; regnum < ARRAY_SIZE (i386bsd_r_reg_offset); regnum++)
{
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
- else
- supply_register (i, REG_ADDR (gregsetp, i));
+ int offset = i386bsd_r_reg_offset[regnum];
+
+ if (offset != -1)
+ regcache_raw_supply (regcache, regnum, regs + offset);
}
}
-/* Fill register REGNUM (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
- do this for all registers. */
+/* Collect register REGNUM from REGCACHE and store its contents in
+ GREGS. If REGNUM is -1, collect and store all appropriate
+ registers. */
-void
-fill_gregset (gregset_t *gregsetp, int regnum)
+static void
+i386bsd_collect_gregset (const struct regcache *regcache,
+ void *gregs, int regnum)
{
+ char *regs = gregs;
int i;
- for (i = 0; i < I386_NUM_GREGS; i++)
- if ((regnum == -1 || regnum == i) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, REG_ADDR (gregsetp, i));
-}
-
-#include "i387-tdep.h"
-
-/* Fill GDB's register array with the floating-point register values
- in *FPREGSETP. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- i387_supply_fsave (current_regcache, -1, fpregsetp);
-}
-
-/* Fill register REGNUM (if it is a floating-point register) in
- *FPREGSETP with the value in GDB's register array. If REGNUM is
- -1, do this for all registers. */
+ for (i = 0; i < ARRAY_SIZE (i386bsd_r_reg_offset); i++)
+ {
+ if (regnum == -1 || regnum == i)
+ {
+ int offset = i386bsd_r_reg_offset[i];
-void
-fill_fpregset (fpregset_t *fpregsetp, int regnum)
-{
- i387_collect_fsave (current_regcache, regnum, fpregsetp);
+ if (offset != -1)
+ regcache_raw_collect (regcache, i, regs + offset);
+ }
+ }
}
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
@@ -177,26 +133,26 @@ fetch_inferior_registers (int regnum)
{
if (regnum == -1 || GETREGS_SUPPLIES (regnum))
{
- gregset_t gregs;
+ struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
- supply_gregset (&gregs);
+ i386bsd_supply_gregset (current_regcache, &regs);
if (regnum != -1)
return;
}
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
{
- fpregset_t fpregs;
+ struct fpreg fpregs;
#ifdef HAVE_PT_GETXMMREGS
char xmmregs[512];
if (have_ptrace_xmmregs != 0
&& ptrace(PT_GETXMMREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) xmmregs, 0) == 0)
+ (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
{
have_ptrace_xmmregs = 1;
i387_supply_fxsave (current_regcache, -1, xmmregs);
@@ -204,14 +160,14 @@ fetch_inferior_registers (int regnum)
else
{
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
i387_supply_fsave (current_regcache, -1, &fpregs);
}
#else
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
i387_supply_fsave (current_regcache, -1, &fpregs);
@@ -227,16 +183,16 @@ store_inferior_registers (int regnum)
{
if (regnum == -1 || GETREGS_SUPPLIES (regnum))
{
- gregset_t gregs;
+ struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
- fill_gregset (&gregs, regnum);
+ i386bsd_collect_gregset (current_regcache, &regs, regnum);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
if (regnum != -1)
@@ -245,20 +201,20 @@ store_inferior_registers (int regnum)
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
{
- fpregset_t fpregs;
+ struct fpreg fpregs;
#ifdef HAVE_PT_GETXMMREGS
char xmmregs[512];
if (have_ptrace_xmmregs != 0
&& ptrace(PT_GETXMMREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) xmmregs, 0) == 0)
+ (PTRACE_TYPE_ARG3) xmmregs, 0) == 0)
{
have_ptrace_xmmregs = 1;
i387_collect_fxsave (current_regcache, regnum, xmmregs);
if (ptrace (PT_SETXMMREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) xmmregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) xmmregs, 0) == -1)
perror_with_name ("Couldn't write XMM registers");
}
else
@@ -266,13 +222,13 @@ store_inferior_registers (int regnum)
have_ptrace_xmmregs = 0;
#endif
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
i387_collect_fsave (current_regcache, regnum, &fpregs);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't write floating point status");
#ifdef HAVE_PT_GETXMMREGS
}
@@ -297,7 +253,7 @@ i386bsd_dr_set (int regnum, unsigned int value)
struct dbreg dbregs;
if (ptrace (PT_GETDBREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
perror_with_name ("Couldn't get debug registers");
/* For some mysterious reason, some of the reserved bits in the
@@ -308,7 +264,7 @@ i386bsd_dr_set (int regnum, unsigned int value)
DBREG_DRX ((&dbregs), regnum) = value;
if (ptrace (PT_SETDBREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
perror_with_name ("Couldn't write debug registers");
}
@@ -345,7 +301,7 @@ i386bsd_dr_get_status (void)
stuff to the target vector. For now, just return zero if the
ptrace call fails. */
if (ptrace (PT_GETDBREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & dbregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
#if 0
perror_with_name ("Couldn't read debug registers");
#else
@@ -366,7 +322,9 @@ i386bsd_dr_get_status (void)
CORE_ADDR
register_u_addr (CORE_ADDR blockend, int regnum)
{
- return (CORE_ADDR) REG_ADDR (blockend, regnum);
+ gdb_assert (regnum >= 0 && regnum < ARRAY_SIZE (i386bsd_r_reg_offset));
+
+ return blockend + i386bsd_r_reg_offset[regnum];
}
#include <sys/param.h>
@@ -399,10 +357,10 @@ _initialize_i386bsd_nat (void)
#define SC_REG_OFFSET i386nbsd_sc_reg_offset
#elif defined (OpenBSD)
#define SC_REG_OFFSET i386obsd_sc_reg_offset
-#else
-#define SC_REG_OFFSET i386bsd_sc_reg_offset
#endif
+#ifdef SC_REG_OFFSET
+
/* 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
@@ -452,4 +410,6 @@ Please report this to <bug-gdb@gnu.org>.",
}
SC_FP_OFFSET = offset;
+
+#endif /* SC_REG_OFFSET */
}
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index d501f7380db..4b4bffbb4fd 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -32,16 +32,6 @@
/* Support for signal handlers. */
-/* Return whether PC is in a BSD sigtramp routine. */
-
-int
-i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
-}
-
/* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
routine, return the address of the associated sigcontext structure. */
@@ -56,22 +46,6 @@ i386bsd_sigcontext_addr (struct frame_info *next_frame)
return read_memory_unsigned_integer (sp + 8, 4);
}
-
-/* Return the start address of the sigtramp routine. */
-
-CORE_ADDR
-i386bsd_sigtramp_start (CORE_ADDR pc)
-{
- return gdbarch_tdep (current_gdbarch)->sigtramp_start;
-}
-
-/* Return the end address of the sigtramp routine. */
-
-CORE_ADDR
-i386bsd_sigtramp_end (CORE_ADDR pc)
-{
- return gdbarch_tdep (current_gdbarch)->sigtramp_end;
-}
/* Support for shared libraries. */
@@ -112,12 +86,6 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
-
- /* Allow the recognition of sigtramps as a function named <sigtramp>. */
- set_gdbarch_deprecated_sigtramp_start (gdbarch, i386bsd_sigtramp_start);
- set_gdbarch_deprecated_sigtramp_end (gdbarch, i386bsd_sigtramp_end);
-
/* Assume SunOS-style shared libraries. */
set_gdbarch_in_solib_call_trampoline (gdbarch,
i386bsd_aout_in_solib_call_trampoline);
diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c
index efc61b6cbbb..ed07711ab31 100644
--- a/gdb/i386fbsd-nat.c
+++ b/gdb/i386fbsd-nat.c
@@ -29,9 +29,6 @@
#include "i386-tdep.h"
-/* Prevent warning from -Wmissing-prototypes. */
-void _initialize_i386fbsd_nat (void);
-
/* Resume execution of the inferior process.
If STEP is nonzero, single-step it.
If SIGNAL is nonzero, give it that signal. */
@@ -79,6 +76,46 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
perror_with_name ("ptrace");
}
+
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ /* The following is true for FreeBSD 4.7:
+
+ The pcb contains %eip, %ebx, %esp, %ebp, %esi, %edi and %gs.
+ This accounts for all callee-saved registers specified by the
+ psABI and then some. Here %esp contains the stack pointer at the
+ point just after the call to cpu_switch(). From this information
+ we reconstruct the register state as it would look when we just
+ returned from cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_esp == 0)
+ return 0;
+
+ pcb->pcb_esp += 4;
+ regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi);
+ regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi);
+ regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx);
+ regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip);
+ regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs);
+
+ return 1;
+}
+
+
+/* Prevent warning from -Wmissing-prototypes. */
+void _initialize_i386fbsd_nat (void);
+
void
_initialize_i386fbsd_nat (void)
{
@@ -104,4 +141,7 @@ _initialize_i386fbsd_nat (void)
}
}
#endif
+
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (i386fbsd_supply_pcb);
}
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 7533f0965d5..f694eba91e5 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -1,5 +1,6 @@
/* Low level interface to i386 running the GNU Hurd.
- Copyright 1992, 1995, 1996, 1998, 2000, 2001
+
+ Copyright 1992, 1995, 1996, 1998, 2000, 2001, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -83,7 +84,7 @@ fetch_fpregs (struct proc *thread)
int i;
for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
return;
}
@@ -100,7 +101,7 @@ supply_gregset (gdb_gregset_t *gregs)
{
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, REG_ADDR (gregs, i));
+ regcache_raw_supply (current_regcache, i, REG_ADDR (gregs, i));
}
void
@@ -144,14 +145,15 @@ gnu_fetch_registers (int regno)
proc_debug (thread, "fetching all register");
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, REG_ADDR (state, i));
+ regcache_raw_supply (current_regcache, i, REG_ADDR (state, i));
thread->fetched_regs = ~0;
}
else
{
proc_debug (thread, "fetching register %s", REGISTER_NAME (regno));
- supply_register (regno, REG_ADDR (state, regno));
+ regcache_raw_supply (current_regcache, regno,
+ REG_ADDR (state, regno));
thread->fetched_regs |= (1 << regno);
}
}
@@ -201,6 +203,7 @@ store_fpregs (struct proc *thread, int regno)
void
gnu_store_registers (int regno)
{
+ struct regcache *regcache = current_regcache;
struct proc *thread;
/* Make sure we know about new threads. */
@@ -242,23 +245,20 @@ gnu_store_registers (int regno)
if ((thread->fetched_regs & (1 << check_regno))
&& memcpy (REG_ADDR (&old_state, check_regno),
REG_ADDR (state, check_regno),
- DEPRECATED_REGISTER_RAW_SIZE (check_regno)))
+ register_size (current_gdbarch, check_regno)))
/* Register CHECK_REGNO has changed! Ack! */
{
warning ("Register %s changed after the thread was aborted",
REGISTER_NAME (check_regno));
if (regno >= 0 && regno != check_regno)
/* Update GDB's copy of the register. */
- supply_register (check_regno, REG_ADDR (state, check_regno));
+ regcache_raw_supply (regcache, check_regno,
+ REG_ADDR (state, check_regno));
else
warning ("... also writing this register! Suspicious...");
}
}
-#define fill(state, regno) \
- memcpy (REG_ADDR(state, regno), &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)], \
- DEPRECATED_REGISTER_RAW_SIZE (regno))
-
if (regno == -1)
{
int i;
@@ -266,15 +266,15 @@ gnu_store_registers (int regno)
proc_debug (thread, "storing all registers");
for (i = 0; i < I386_NUM_GREGS; i++)
- if (deprecated_register_valid[i])
- fill (state, i);
+ if (regcache_valid_p (regcache, i))
+ regcache_raw_collect (regcache, i, REG_ADDR (state, i));
}
else
{
proc_debug (thread, "storing register %s", REGISTER_NAME (regno));
- gdb_assert (deprecated_register_valid[regno]);
- fill (state, regno);
+ gdb_assert (regcache_valid_p (regcache, regno));
+ regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
}
/* Restore the T bit. */
@@ -282,8 +282,6 @@ gnu_store_registers (int regno)
((struct i386_thread_state *)state)->efl |= trace;
}
-#undef fill
-
if (regno >= I386_NUM_GREGS || regno == -1)
{
proc_debug (thread, "storing floating-point registers");
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index 2374b71aa1f..d749dc4e552 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -41,7 +41,7 @@ i386lynx_saved_pc_after_call (struct frame_info *frame)
static const unsigned char call_inst[] =
{ 0x9a, 0, 0, 0, 0, 8, 0 }; /* lcall 0x8,0x0 */
- read_memory_nobpt (frame->pc - 7, opcode, 7);
+ deprecated_read_memory_nobpt (frame->pc - 7, opcode, 7);
if (memcmp (opcode, call_inst, 7) == 0)
return read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
diff --git a/gdb/i386nbsd-nat.c b/gdb/i386nbsd-nat.c
new file mode 100644
index 00000000000..92da7e18dcd
--- /dev/null
+++ b/gdb/i386nbsd-nat.c
@@ -0,0 +1,82 @@
+/* Native-dependent code for NetBSD/i386.
+
+ Copyright 2004 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 "gdbcore.h"
+#include "regcache.h"
+
+#include "i386-tdep.h"
+
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ struct switchframe sf;
+
+ /* The following is true for NetBSD 1.6.2:
+
+ The pcb contains %esp and %ebp at the point of the context switch
+ in cpu_switch(). At that point we have a stack frame as
+ described by `struct switchframe', which for NetBSD 1.6.2 has the
+ following layout:
+
+ interrupt level
+ %edi
+ %esi
+ %ebx
+ %eip
+
+ we reconstruct the register state as it would look when we just
+ returned from cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_esp == 0)
+ return 0;
+
+ read_memory (pcb->pcb_esp, (char *) &sf, sizeof sf);
+ pcb->pcb_esp += sizeof (struct switchframe);
+ regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
+ regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
+ regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
+ regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+
+ return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386nbsd_nat (void);
+
+void
+_initialize_i386nbsd_nat (void)
+{
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (i386nbsd_supply_pcb);
+}
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index e1e05aabf29..da7d8c62622 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -23,10 +23,12 @@
#include "defs.h"
#include "arch-utils.h"
+#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
#include "regset.h"
#include "osabi.h"
+#include "symtab.h"
#include "gdb_assert.h"
#include "gdb_string.h"
@@ -62,7 +64,7 @@ i386nbsd_aout_supply_regset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *regs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
@@ -84,11 +86,8 @@ i386nbsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
&& sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE)
{
if (tdep->gregset == NULL)
- {
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = tdep;
- tdep->gregset->supply_regset = i386nbsd_aout_supply_regset;
- }
+ tdep->gregset =
+ regset_alloc (gdbarch, i386nbsd_aout_supply_regset, NULL);
return tdep->gregset;
}
@@ -133,13 +132,14 @@ static const unsigned char sigtramp_retcode[] =
};
static LONGEST
-i386nbsd_sigtramp_offset (CORE_ADDR pc)
+i386nbsd_sigtramp_offset (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char ret[sizeof(sigtramp_retcode)], insn;
LONGEST off;
int i;
- if (read_memory_nobpt (pc, &insn, 1) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, &insn, 1))
return -1;
switch (insn)
@@ -151,7 +151,7 @@ i386nbsd_sigtramp_offset (CORE_ADDR pc)
case RETCODE_INSN2:
/* INSN2 and INSN3 are the same. Read at the location of PC+1
to determine if we're actually looking at INSN2 or INSN3. */
- if (read_memory_nobpt (pc + 1, &insn, 1) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc + 1, &insn, 1))
return -1;
if (insn == RETCODE_INSN3)
@@ -174,7 +174,7 @@ i386nbsd_sigtramp_offset (CORE_ADDR pc)
pc -= off;
- if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, ret, sizeof (ret)))
return -1;
if (memcmp (ret, sigtramp_retcode, sizeof (ret)) == 0)
@@ -183,11 +183,18 @@ i386nbsd_sigtramp_offset (CORE_ADDR pc)
return -1;
}
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+ NetBSD sigtramp routine. */
+
static int
-i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386nbsd_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
return (nbsd_pc_in_sigtramp (pc, name)
- || i386nbsd_sigtramp_offset (pc) >= 0);
+ || i386nbsd_sigtramp_offset (next_frame) >= 0);
}
/* From <machine/signal.h>. */
@@ -225,12 +232,9 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sizeof_gregset = 16 * 4;
/* NetBSD has different signal trampoline conventions. */
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
- /* FIXME: kettenis/20020906: We should probably provide
- NetBSD-specific versions of these functions if we want to
- recognize signal trampolines that live on the stack. */
- set_gdbarch_deprecated_sigtramp_start (gdbarch, NULL);
- set_gdbarch_deprecated_sigtramp_end (gdbarch, NULL);
+ tdep->sigtramp_start = 0;
+ tdep->sigtramp_end = 0;
+ tdep->sigtramp_p = i386nbsd_sigtramp_p;
/* NetBSD uses -freg-struct-return by default. */
tdep->struct_return = reg_struct_return;
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 740bae37456..9ef868d6ec4 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -23,9 +23,12 @@
#include "defs.h"
#include "arch-utils.h"
+#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
#include "regset.h"
+#include "symtab.h"
+#include "objfiles.h"
#include "osabi.h"
#include "target.h"
@@ -48,11 +51,13 @@
/* Default page size. */
static const int i386obsd_page_size = 4096;
-/* Return whether PC is in an OpenBSD sigtramp routine. */
+/* Return whether the frame preceding NEXT_FRAME corresponds to an
+ OpenBSD sigtramp routine. */
static int
-i386obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
+i386obsd_sigtramp_p (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
const char sigreturn[] =
{
@@ -60,52 +65,40 @@ i386obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
0x67, 0x00, 0x00, 0x00, /* movl $SYS_sigreturn, %eax */
0xcd, 0x80 /* int $0x80 */
};
- char *buf;
+ size_t buflen = sizeof sigreturn;
+ char *name, *buf;
- /* Avoid reading memory from the target if possible. If we're in a
- named function, we're certainly not in a sigtramp routine
- provided by the kernel. Take synthetic function names into
- account though. */
- if (name && name[0] != '<')
+ /* If the function has a valid symbol name, it isn't a
+ trampoline. */
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (name != NULL)
return 0;
+ /* If the function lives in a valid section (even without a starting
+ point) it isn't a trampoline. */
+ if (find_pc_section (pc) != NULL)
+ return 0;
+
+ /* Allocate buffer. */
+ buf = alloca (buflen);
+
/* If we can't read the instructions at START_PC, return zero. */
- buf = alloca (sizeof sigreturn);
- if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+ if (!safe_frame_unwind_memory (next_frame, start_pc + 0x0a, buf, buflen))
return 0;
/* Check for sigreturn(2). */
- if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
+ if (memcmp (buf, sigreturn, buflen) == 0)
return 1;
- /* Check for a traditional BSD sigtramp routine. */
- return i386bsd_pc_in_sigtramp (pc, name);
-}
-
-/* Return the start address of the sigtramp routine. */
-
-static CORE_ADDR
-i386obsd_sigtramp_start (CORE_ADDR pc)
-{
- CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
-
- if (i386bsd_pc_in_sigtramp (pc, NULL))
- return i386bsd_sigtramp_start (pc);
-
- return start_pc;
-}
-
-/* Return the end address of the sigtramp routine. */
-
-static CORE_ADDR
-i386obsd_sigtramp_end (CORE_ADDR pc)
-{
- CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
+ /* If we can't read the instructions at START_PC, return zero. */
+ if (!safe_frame_unwind_memory (next_frame, start_pc + 0x14, buf, buflen))
+ return 0;
- if (i386bsd_pc_in_sigtramp (pc, NULL))
- return i386bsd_sigtramp_end (pc);
+ /* Check for sigreturn(2) (again). */
+ if (memcmp (buf, sigreturn, buflen) == 0)
+ return 1;
- return start_pc + 0x22;
+ return 0;
}
/* Mapping between the general-purpose registers in `struct reg'
@@ -137,7 +130,7 @@ i386obsd_aout_supply_regset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *regs, size_t len)
{
- const struct gdbarch_tdep *tdep = regset->descr;
+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
@@ -159,11 +152,8 @@ i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
&& sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE)
{
if (tdep->gregset == NULL)
- {
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = tdep;
- tdep->gregset->supply_regset = i386obsd_aout_supply_regset;
- }
+ tdep->gregset =
+ regset_alloc (gdbarch, i386obsd_aout_supply_regset, NULL);
return tdep->gregset;
}
@@ -215,9 +205,7 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* OpenBSD uses a different memory layout. */
tdep->sigtramp_start = i386obsd_sigtramp_start_addr;
tdep->sigtramp_end = i386obsd_sigtramp_end_addr;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, i386obsd_pc_in_sigtramp);
- set_gdbarch_deprecated_sigtramp_start (gdbarch, i386obsd_sigtramp_start);
- set_gdbarch_deprecated_sigtramp_end (gdbarch, i386obsd_sigtramp_end);
+ tdep->sigtramp_p = i386obsd_sigtramp_p;
/* OpenBSD has a `struct sigcontext' that's different from the
original 4.3 BSD. */
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 678eabc346d..bae840626cd 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -35,10 +35,6 @@
#include "language.h"
#include "gdbcore.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index 188f01b4c12..a2f3cd323ea 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -1,6 +1,7 @@
-/* Native-dependent code for SVR4 Unix running on i386's.
+/* Native-dependent code for Unix SVR4 running on i386's.
+
Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -95,7 +96,7 @@ static int regmap[] =
EAX, ECX, EDX, EBX,
UESP, EBP, ESI, EDI,
EIP, EFL, CS, SS,
- DS, ES, FS, GS,
+ DS, ES, FS, GS
};
/* Fill GDB's register array with the general-purpose register values
@@ -105,25 +106,25 @@ void
supply_gregset (gregset_t *gregsetp)
{
greg_t *regp = (greg_t *) gregsetp;
- int i;
+ int regnum;
- for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, (char *) (regp + regmap[i]));
+ for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
+ regcache_raw_supply (current_regcache, regnum, regp + regmap[regnum]);
}
-/* Fill register REGNO (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNO is -1,
+/* Fill register REGNUM (if it is a general-purpose register) in
+ *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
do this for all registers. */
void
-fill_gregset (gregset_t *gregsetp, int regno)
+fill_gregset (gregset_t *gregsetp, int regnum)
{
greg_t *regp = (greg_t *) gregsetp;
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 4b212c4cd97..04b43df0b26 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -121,7 +121,7 @@ static void
print_i387_status_word (unsigned int status, struct ui_file *file)
{
fprintf_filtered (file, "Status Word: %s",
- local_hex_string_custom (status, "04"));
+ hex_string_custom (status, 4));
fputs_filtered (" ", file);
fprintf_filtered (file, " %s", (status & 0x0001) ? "IE" : " ");
fprintf_filtered (file, " %s", (status & 0x0002) ? "DE" : " ");
@@ -151,7 +151,7 @@ static void
print_i387_control_word (unsigned int control, struct ui_file *file)
{
fprintf_filtered (file, "Control Word: %s",
- local_hex_string_custom (control, "04"));
+ hex_string_custom (control, 4));
fputs_filtered (" ", file);
fprintf_filtered (file, " %s", (control & 0x0001) ? "IM" : " ");
fprintf_filtered (file, " %s", (control & 0x0002) ? "DM" : " ");
@@ -276,15 +276,15 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
print_i387_status_word (fstat, file);
print_i387_control_word (fctrl, file);
fprintf_filtered (file, "Tag Word: %s\n",
- local_hex_string_custom (ftag, "04"));
+ hex_string_custom (ftag, 4));
fprintf_filtered (file, "Instruction Pointer: %s:",
- local_hex_string_custom (fiseg, "02"));
- fprintf_filtered (file, "%s\n", local_hex_string_custom (fioff, "08"));
+ hex_string_custom (fiseg, 2));
+ fprintf_filtered (file, "%s\n", hex_string_custom (fioff, 8));
fprintf_filtered (file, "Operand Pointer: %s:",
- local_hex_string_custom (foseg, "02"));
- fprintf_filtered (file, "%s\n", local_hex_string_custom (fooff, "08"));
+ hex_string_custom (foseg, 2));
+ fprintf_filtered (file, "%s\n", hex_string_custom (fooff, 8));
fprintf_filtered (file, "Opcode: %s\n",
- local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
+ hex_string_custom (fop ? (fop | 0xd800) : 0, 4));
#undef I387_ST0_REGNUM
}
@@ -340,7 +340,6 @@ i387_value_to_register (struct frame_info *frame, int regnum,
put_frame_register (frame, regnum, to);
}
-
/* Handle FSAVE and FXSAVE formats. */
@@ -391,9 +390,11 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
- /* Define I387_ST0_REGNUM such that we use the proper definitions
- for REGCACHE's architecture. */
+ /* Define I387_ST0_REGNUM and I387_NUM_XMM_REGS such that we use the
+ proper definitions for REGCACHE's architecture. */
+
#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
for (i = I387_ST0_REGNUM; i < I387_XMM0_REGNUM; i++)
if (regnum == -1 || regnum == i)
@@ -420,7 +421,21 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
else
regcache_raw_supply (regcache, i, FSAVE_ADDR (regs, i));
}
+
+ /* Provide dummy values for the SSE registers. */
+ for (i = I387_XMM0_REGNUM; i < I387_MXCSR_REGNUM; i++)
+ if (regnum == -1 || regnum == i)
+ regcache_raw_supply (regcache, i, NULL);
+ if (regnum == -1 || regnum == I387_MXCSR_REGNUM)
+ {
+ char buf[4];
+
+ store_unsigned_integer (buf, 4, 0x1f80);
+ regcache_raw_supply (regcache, I387_MXCSR_REGNUM, buf);
+ }
+
#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c
index 61f34e1e34d..9f37f8f8405 100644
--- a/gdb/ia64-aix-nat.c
+++ b/gdb/ia64-aix-nat.c
@@ -42,31 +42,45 @@ supply_gregset (prgregset_t *gregsetp)
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
- supply_register (regi,
- (char *) &(gregsetp->__gpr[regi - IA64_GR0_REGNUM]));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) &(gregsetp->__gpr[regi - IA64_GR0_REGNUM]));
}
for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++)
{
- supply_register (regi,
- (char *) &(gregsetp->__br[regi - IA64_BR0_REGNUM]));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) &(gregsetp->__br[regi - IA64_BR0_REGNUM]));
}
- supply_register (IA64_PSR_REGNUM, (char *) &(gregsetp->__psr));
- supply_register (IA64_IP_REGNUM, (char *) &(gregsetp->__ip));
- supply_register (IA64_CFM_REGNUM, (char *) &(gregsetp->__ifs));
- supply_register (IA64_RSC_REGNUM, (char *) &(gregsetp->__rsc));
- supply_register (IA64_BSP_REGNUM, (char *) &(gregsetp->__bsp));
- supply_register (IA64_BSPSTORE_REGNUM, (char *) &(gregsetp->__bspstore));
- supply_register (IA64_RNAT_REGNUM, (char *) &(gregsetp->__rnat));
- supply_register (IA64_PFS_REGNUM, (char *) &(gregsetp->__pfs));
- supply_register (IA64_UNAT_REGNUM, (char *) &(gregsetp->__unat));
- supply_register (IA64_PR_REGNUM, (char *) &(gregsetp->__preds));
- supply_register (IA64_CCV_REGNUM, (char *) &(gregsetp->__ccv));
- supply_register (IA64_LC_REGNUM, (char *) &(gregsetp->__lc));
- supply_register (IA64_EC_REGNUM, (char *) &(gregsetp->__ec));
+ regcache_raw_supply (current_regcache, IA64_PSR_REGNUM,
+ (char *) &(gregsetp->__psr));
+ regcache_raw_supply (current_regcache, IA64_IP_REGNUM,
+ (char *) &(gregsetp->__ip));
+ regcache_raw_supply (current_regcache, IA64_CFM_REGNUM,
+ (char *) &(gregsetp->__ifs));
+ regcache_raw_supply (current_regcache, IA64_RSC_REGNUM,
+ (char *) &(gregsetp->__rsc));
+ regcache_raw_supply (current_regcache, IA64_BSP_REGNUM,
+ (char *) &(gregsetp->__bsp));
+ regcache_raw_supply (current_regcache, IA64_BSPSTORE_REGNUM,
+ (char *) &(gregsetp->__bspstore));
+ regcache_raw_supply (current_regcache, IA64_RNAT_REGNUM,
+ (char *) &(gregsetp->__rnat));
+ regcache_raw_supply (current_regcache, IA64_PFS_REGNUM,
+ (char *) &(gregsetp->__pfs));
+ regcache_raw_supply (current_regcache, IA64_UNAT_REGNUM,
+ (char *) &(gregsetp->__unat));
+ regcache_raw_supply (current_regcache, IA64_PR_REGNUM,
+ (char *) &(gregsetp->__preds));
+ regcache_raw_supply (current_regcache, IA64_CCV_REGNUM,
+ (char *) &(gregsetp->__ccv));
+ regcache_raw_supply (current_regcache, IA64_LC_REGNUM,
+ (char *) &(gregsetp->__lc));
+ regcache_raw_supply (current_regcache, IA64_EC_REGNUM,
+ (char *) &(gregsetp->__ec));
/* FIXME: __nats */
- supply_register (IA64_FPSR_REGNUM, (char *) &(gregsetp->__fpsr));
+ regcache_raw_supply (current_regcache, IA64_FPSR_REGNUM,
+ (char *) &(gregsetp->__fpsr));
/* These (for the most part) are pseudo registers and are obtained
by other means. Those that aren't are already handled by the
@@ -87,7 +101,7 @@ fill_gregset (prgregset_t *gregsetp, int regno)
#define COPY_REG(_fld_,_regi_) \
if ((regno == -1) || regno == _regi_) \
memcpy (&(gregsetp->_fld_), &deprecated_registers[DEPRECATED_REGISTER_BYTE (_regi_)], \
- DEPRECATED_REGISTER_RAW_SIZE (_regi_))
+ register_size (current_gdbarch, _regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -110,10 +124,10 @@ fill_gregset (prgregset_t *gregsetp, int regno)
{
memcpy (&(gregsetp->__bspstore),
&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
}
#if 0
@@ -139,7 +153,7 @@ supply_fpregset (prfpregset_t *fpregsetp)
int regi;
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
- supply_register (regi,
+ regcache_raw_supply (current_regcache, regi,
(char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]));
}
@@ -156,7 +170,7 @@ fill_fpregset (prfpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, register_size (current_gdbarch, regi));
}
}
}
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 00f66fb2e83..09daf246c15 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -1,8 +1,8 @@
/* Functions specific to running gdb native on IA-64 running
GNU/Linux.
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -367,32 +367,47 @@ supply_gregset (gregset_t *gregsetp)
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
- supply_register (regi, (char *) (regp + (regi - IA64_GR0_REGNUM)));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + (regi - IA64_GR0_REGNUM)));
}
/* FIXME: NAT collection bits are at index 32; gotta deal with these
somehow... */
- supply_register (IA64_PR_REGNUM, (char *) (regp + 33));
+ regcache_raw_supply (current_regcache, IA64_PR_REGNUM, (char *) (regp + 33));
for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++)
{
- supply_register (regi, (char *) (regp + 34 + (regi - IA64_BR0_REGNUM)));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + 34 + (regi - IA64_BR0_REGNUM)));
}
- supply_register (IA64_IP_REGNUM, (char *) (regp + 42));
- supply_register (IA64_CFM_REGNUM, (char *) (regp + 43));
- supply_register (IA64_PSR_REGNUM, (char *) (regp + 44));
- supply_register (IA64_RSC_REGNUM, (char *) (regp + 45));
- supply_register (IA64_BSP_REGNUM, (char *) (regp + 46));
- supply_register (IA64_BSPSTORE_REGNUM, (char *) (regp + 47));
- supply_register (IA64_RNAT_REGNUM, (char *) (regp + 48));
- supply_register (IA64_CCV_REGNUM, (char *) (regp + 49));
- supply_register (IA64_UNAT_REGNUM, (char *) (regp + 50));
- supply_register (IA64_FPSR_REGNUM, (char *) (regp + 51));
- supply_register (IA64_PFS_REGNUM, (char *) (regp + 52));
- supply_register (IA64_LC_REGNUM, (char *) (regp + 53));
- supply_register (IA64_EC_REGNUM, (char *) (regp + 54));
+ regcache_raw_supply (current_regcache, IA64_IP_REGNUM,
+ (char *) (regp + 42));
+ regcache_raw_supply (current_regcache, IA64_CFM_REGNUM,
+ (char *) (regp + 43));
+ regcache_raw_supply (current_regcache, IA64_PSR_REGNUM,
+ (char *) (regp + 44));
+ regcache_raw_supply (current_regcache, IA64_RSC_REGNUM,
+ (char *) (regp + 45));
+ regcache_raw_supply (current_regcache, IA64_BSP_REGNUM,
+ (char *) (regp + 46));
+ regcache_raw_supply (current_regcache, IA64_BSPSTORE_REGNUM,
+ (char *) (regp + 47));
+ regcache_raw_supply (current_regcache, IA64_RNAT_REGNUM,
+ (char *) (regp + 48));
+ regcache_raw_supply (current_regcache, IA64_CCV_REGNUM,
+ (char *) (regp + 49));
+ regcache_raw_supply (current_regcache, IA64_UNAT_REGNUM,
+ (char *) (regp + 50));
+ regcache_raw_supply (current_regcache, IA64_FPSR_REGNUM,
+ (char *) (regp + 51));
+ regcache_raw_supply (current_regcache, IA64_PFS_REGNUM,
+ (char *) (regp + 52));
+ regcache_raw_supply (current_regcache, IA64_LC_REGNUM,
+ (char *) (regp + 53));
+ regcache_raw_supply (current_regcache, IA64_EC_REGNUM,
+ (char *) (regp + 54));
}
void
@@ -404,7 +419,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
memcpy (regp + _idx_, &deprecated_registers[DEPRECATED_REGISTER_BYTE (_regi_)], \
- DEPRECATED_REGISTER_RAW_SIZE (_regi_))
+ register_size (current_gdbarch, _regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -448,7 +463,7 @@ supply_fpregset (fpregset_t *fpregsetp)
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
from = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
- supply_register (regi, from);
+ regcache_raw_supply (current_regcache, regi, from);
}
}
@@ -470,7 +485,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, register_size (current_gdbarch, regi));
}
}
}
@@ -502,7 +517,7 @@ fetch_debug_register (ptid_t ptid, int idx)
if (tid == 0)
tid = PIDGET (ptid);
- val = ptrace (PT_READ_U, tid, (PTRACE_ARG3_TYPE) (PT_DBR + 8 * idx), 0);
+ val = ptrace (PT_READ_U, tid, (PTRACE_TYPE_ARG3) (PT_DBR + 8 * idx), 0);
return val;
}
@@ -516,7 +531,7 @@ store_debug_register (ptid_t ptid, int idx, long val)
if (tid == 0)
tid = PIDGET (ptid);
- (void) ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) (PT_DBR + 8 * idx), val);
+ (void) ptrace (PT_WRITE_U, tid, (PTRACE_TYPE_ARG3) (PT_DBR + 8 * idx), val);
}
static void
@@ -633,7 +648,7 @@ ia64_linux_stopped_by_watchpoint (ptid_t ptid)
tid = PIDGET (ptid);
errno = 0;
- ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
+ ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_TYPE_ARG3) 0, &siginfo);
if (errno != 0 || siginfo.si_signo != SIGTRAP ||
(siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 8defe3b377e..0f948a1aa36 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -36,11 +36,12 @@
#include "objfiles.h"
#include "elf/common.h" /* for DT_PLTGOT value */
#include "elf-bfd.h"
-#include "elf.h" /* for PT_IA64_UNWIND value */
#include "dis-asm.h"
+#include "infcall.h"
#include "ia64-tdep.h"
#ifdef HAVE_LIBUNWIND_IA64_H
+#include "elf/ia64.h" /* for PT_IA_64_UNWIND value */
#include "libunwind-frame.h"
#include "libunwind-ia64.h"
#endif
@@ -98,7 +99,6 @@ static gdbarch_register_type_ftype ia64_register_type;
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc;
static gdbarch_skip_prologue_ftype ia64_skip_prologue;
static gdbarch_extract_return_value_ftype ia64_extract_return_value;
-static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
static struct type *is_float_or_hfa_type (struct type *t);
static struct type *builtin_type_ia64_ext;
@@ -1116,7 +1116,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *next_frame,
if (next_pc == 0)
break;
- if (it == B && ((instr & 0x1e1f800003f) != 0x04000000000))
+ if (it == B && ((instr & 0x1e1f800003fLL) != 0x04000000000LL))
{
/* Exit loop upon hitting a non-nop branch instruction. */
if (trust_limit)
@@ -1228,7 +1228,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *next_frame,
{
cache->saved_regs[IA64_FR0_REGNUM + fM] = spill_addr;
- if ((instr & 0x1efc0000000) == 0x0eec0000000)
+ if ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
spill_addr += imm;
else
spill_addr = 0; /* last one; must be done */
@@ -2048,7 +2048,7 @@ ia64_sigtramp_frame_sniffer (struct frame_info *next_frame)
CORE_ADDR pc = frame_pc_unwind (next_frame);
find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
+ if (legacy_pc_in_sigtramp (pc, name))
return &ia64_sigtramp_frame_unwind;
return NULL;
@@ -2583,6 +2583,10 @@ ia64_libunwind_frame_prev_register (struct frame_info *next_frame,
libunwind_frame_prev_register (next_frame, this_cache, reg,
optimizedp, lvalp, addrp, realnump, valuep);
+ /* No more to do if the value is not supposed to be supplied. */
+ if (!valuep)
+ return;
+
if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
{
ULONGEST prN_val;
@@ -3019,7 +3023,7 @@ ia64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
}
static CORE_ADDR
-ia64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -3031,6 +3035,7 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int nslots, rseslots, memslots, slotnum, nfuncargs;
int floatreg;
CORE_ADDR bsp, cfm, pfs, new_bsp, funcdescaddr, pc, global_pointer;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
nslots = 0;
nfuncargs = 0;
@@ -3328,7 +3333,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_skip_prologue (gdbarch, ia64_skip_prologue);
- set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, ia64_use_struct_convention);
set_gdbarch_extract_return_value (gdbarch, ia64_extract_return_value);
set_gdbarch_store_return_value (gdbarch, ia64_store_return_value);
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
new file mode 100644
index 00000000000..f729611173a
--- /dev/null
+++ b/gdb/inf-child.c
@@ -0,0 +1,241 @@
+/* Default child (native) target interface, for GDB when running under
+ Unix.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1998, 1999, 2000, 2001, 2002, 2004 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 "regcache.h"
+#include "memattr.h"
+#include "symtab.h"
+#include "target.h"
+#include "inferior.h"
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
+
+static void
+inf_child_fetch_inferior_registers (int regnum)
+{
+ if (regnum == -1)
+ {
+ for (regnum = 0; regnum < NUM_REGS; regnum++)
+ regcache_raw_supply (current_regcache, regnum, NULL);
+ }
+ else
+ regcache_raw_supply (current_regcache, regnum, NULL);
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers (including the floating point registers). */
+
+static void
+inf_child_store_inferior_registers (int regnum)
+{
+}
+
+void
+inf_child_post_wait (ptid_t ptid, int wait_status)
+{
+ /* This version of Unix doesn't require a meaningful "post wait"
+ operation.
+ */
+}
+
+static void
+inf_child_post_attach (int pid)
+{
+ /* This version of Unix doesn't require a meaningful "post attach"
+ operation by a debugger. */
+}
+
+/* Get ready to modify the registers array. On machines which store
+ individual registers, this doesn't need to do anything. On
+ machines which store all the registers in one fell swoop, this
+ makes sure that registers contains all the registers from the
+ program being debugged. */
+
+static void
+inf_child_prepare_to_store (void)
+{
+}
+
+static void
+inf_child_open (char *arg, int from_tty)
+{
+ error ("Use the \"run\" command to start a Unix child process.");
+}
+
+static void
+inf_child_post_startup_inferior (ptid_t ptid)
+{
+ /* This version of Unix doesn't require a meaningful "post startup
+ inferior" operation by a debugger. */
+}
+
+static void
+inf_child_acknowledge_created_inferior (int pid)
+{
+ /* This version of Unix doesn't require a meaningful "acknowledge
+ created inferior" operation by a debugger. */
+}
+
+static int
+inf_child_insert_fork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of fork
+ events. */
+ return 0;
+}
+
+static int
+inf_child_remove_fork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of fork
+ events. */
+ return 0;
+}
+
+static int
+inf_child_insert_vfork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of vfork
+ events. */
+ return 0;
+}
+
+static int
+inf_child_remove_vfork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of vfork
+ events. */
+ return 0;
+}
+
+static int
+inf_child_follow_fork (int follow_child)
+{
+ /* This version of Unix doesn't support following fork or vfork
+ events. */
+ return 0;
+}
+
+static int
+inf_child_insert_exec_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of exec
+ events. */
+ return 0;
+}
+
+static int
+inf_child_remove_exec_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of exec
+ events. */
+ return 0;
+}
+
+static int
+inf_child_reported_exec_events_per_exec_call (void)
+{
+ /* This version of Unix doesn't support notification of exec
+ events. */
+ return 1;
+}
+
+static int
+inf_child_can_run (void)
+{
+ return 1;
+}
+
+static struct symtab_and_line *
+inf_child_enable_exception_callback (enum exception_event_kind kind,
+ int enable)
+{
+ return (struct symtab_and_line *) NULL;
+}
+
+static struct exception_event_record *
+inf_child_get_current_exception_event (void)
+{
+ return (struct exception_event_record *) NULL;
+}
+
+static char *
+inf_child_pid_to_exec_file (int pid)
+{
+ /* This version of Unix doesn't support translation of a process ID
+ to the filename of the executable file. */
+ return NULL;
+}
+
+static char *
+inf_child_core_file_to_sym_file (char *core)
+{
+ /* The target stratum for a running executable need not support this
+ operation. */
+ return NULL;
+}
+
+struct target_ops *
+inf_child_target (void)
+{
+ struct target_ops *t = XZALLOC (struct target_ops);
+ t->to_shortname = "child";
+ t->to_longname = "Unix child process";
+ t->to_doc = "Unix child process (started by the \"run\" command).";
+ t->to_open = inf_child_open;
+ t->to_post_attach = inf_child_post_attach;
+ t->to_post_wait = inf_child_post_wait;
+ t->to_prepare_to_store = inf_child_prepare_to_store;
+ t->to_insert_breakpoint = memory_insert_breakpoint;
+ t->to_remove_breakpoint = memory_remove_breakpoint;
+ t->to_terminal_init = terminal_init_inferior;
+ t->to_terminal_inferior = terminal_inferior;
+ t->to_terminal_ours_for_output = terminal_ours_for_output;
+ t->to_terminal_save_ours = terminal_save_ours;
+ t->to_terminal_ours = terminal_ours;
+ t->to_terminal_info = child_terminal_info;
+ t->to_post_startup_inferior = inf_child_post_startup_inferior;
+ t->to_acknowledge_created_inferior = inf_child_acknowledge_created_inferior;
+ t->to_insert_fork_catchpoint = inf_child_insert_fork_catchpoint;
+ t->to_remove_fork_catchpoint = inf_child_remove_fork_catchpoint;
+ t->to_insert_vfork_catchpoint = inf_child_insert_vfork_catchpoint;
+ t->to_remove_vfork_catchpoint = inf_child_remove_vfork_catchpoint;
+ t->to_follow_fork = inf_child_follow_fork;
+ t->to_insert_exec_catchpoint = inf_child_insert_exec_catchpoint;
+ t->to_remove_exec_catchpoint = inf_child_remove_exec_catchpoint;
+ t->to_reported_exec_events_per_exec_call =
+ inf_child_reported_exec_events_per_exec_call;
+ t->to_can_run = inf_child_can_run;
+ t->to_enable_exception_callback = inf_child_enable_exception_callback;
+ t->to_get_current_exception_event = inf_child_get_current_exception_event;
+ t->to_pid_to_exec_file = inf_child_pid_to_exec_file;
+ t->to_stratum = process_stratum;
+ t->to_has_all_memory = 1;
+ t->to_has_memory = 1;
+ t->to_has_stack = 1;
+ t->to_has_registers = 1;
+ t->to_has_execution = 1;
+ t->to_magic = OPS_MAGIC;
+ return t;
+}
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/inf-child.h
index 98a2702175c..5b6edec1052 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/inf-child.h
@@ -1,6 +1,6 @@
-/* Target-dependent definitions for FreeBSD/i386.
+/* Low level Unix child interface, for GDB when running under Unix.
- Copyright 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,13 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_FBSD_H
-#define TM_FBSD_H
+#ifndef INF_CHILD_H
+#define INF_CHILD_H
-#include "solib.h"
+/* Create a prototype child target. The client can override it with
+ local methods. */
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
+extern struct target_ops *inf_child_target (void);
-#endif /* tm-fbsd.h */
+#endif
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
new file mode 100644
index 00000000000..f79f7863ba6
--- /dev/null
+++ b/gdb/inf-ptrace.c
@@ -0,0 +1,685 @@
+/* Low level Unix child interface to ptrace, for GDB when running under Unix.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1998, 1999, 2000, 2001, 2002, 2004 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 "observer.h"
+#include "gdb_ptrace.h"
+#include "inflow.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "command.h"
+#include "gdbcore.h"
+#include "inf-child.h"
+#include "gdbcmd.h"
+
+#include <sys/wait.h>
+#include <signal.h>
+
+/* HACK: Save the ptrace ops returned by ptrace_target. */
+static struct target_ops *ptrace_ops_hack;
+
+static void
+inf_ptrace_kill_inferior (void)
+{
+ int status;
+ int pid = PIDGET (inferior_ptid);
+
+ if (pid == 0)
+ return;
+
+ /* This once used to call "kill" to kill the inferior just in case
+ the inferior was still running. As others have noted in the past
+ (kingdon) there shouldn't be any way to get here if the inferior
+ is still running -- else there's a major problem elsewere in gdb
+ and it needs to be fixed.
+
+ The kill call causes problems under hpux10, so it's been removed;
+ if this causes problems we'll deal with them as they arise. */
+ call_ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3) 0, 0);
+ ptrace_wait (null_ptid, &status);
+ target_mourn_inferior ();
+}
+
+/* Resume execution of the inferior process. If STEP is nonzero,
+ single-step it. If SIGNAL is nonzero, give it that signal. */
+
+static void
+inf_ptrace_resume (ptid_t ptid, int step, enum target_signal signal)
+{
+ int request = PT_CONTINUE;
+ int pid = PIDGET (ptid);
+
+ if (pid == -1)
+ /* Resume all threads. */
+ /* I think this only gets used in the non-threaded case, where
+ "resume all threads" and "resume inferior_ptid" are the
+ same. */
+ pid = PIDGET (inferior_ptid);
+
+ if (step)
+ {
+ /* If this system does not support PT_STEP, a higher level
+ function will have called single_step() to transmute the step
+ request into a continue request (by setting breakpoints on
+ all possible successor instructions), so we don't have to
+ worry about that here. */
+ request = PT_STEP;
+ }
+
+ /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from
+ where it was. If GDB wanted it to start some other way, we have
+ already written a new PC value to the child. */
+ errno = 0;
+ ptrace (request, pid, (PTRACE_TYPE_ARG3) 1, target_signal_to_host (signal));
+ if (errno != 0)
+ perror_with_name ("ptrace");
+}
+
+/* Set an upper limit on alloca. */
+#define GDB_MAX_ALLOCA 0x1000
+
+/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
+ in the NEW_SUN_PTRACE case. It ought to be straightforward. But
+ it appears that writing did not write the data that I specified. I
+ cannot understand where it got the data that it actually did
+ write. */
+
+/* Copy LEN bytes to or from inferior's memory starting at MEMADDR to
+ debugger memory starting at MYADDR. Copy to inferior if WRITE is
+ nonzero. TARGET is ignored.
+
+ Returns the length copied, which is either the LEN argument or
+ zero. This xfer function does not do partial moves, since
+ ptrace_ops_hack doesn't allow memory operations to cross below us in the
+ target stack anyway. */
+
+int
+inf_ptrace_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+ struct mem_attrib *attrib, struct target_ops *target)
+{
+ int i;
+ /* Round starting address down to longword boundary. */
+ CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_TYPE_RET);
+ /* Round ending address up; get number of longwords that makes. */
+ int count = ((((memaddr + len) - addr) + sizeof (PTRACE_TYPE_RET) - 1)
+ / sizeof (PTRACE_TYPE_RET));
+ int alloc = count * sizeof (PTRACE_TYPE_RET);
+ PTRACE_TYPE_RET *buffer;
+ struct cleanup *old_chain = NULL;
+
+#ifdef PT_IO
+ /* OpenBSD 3.1, NetBSD 1.6 and FreeBSD 5.0 have a new PT_IO request
+ that promises to be much more efficient in reading and writing
+ data in the traced process's address space. */
+
+ {
+ struct ptrace_io_desc piod;
+
+ /* NOTE: We assume that there are no distinct address spaces for
+ instruction and data. */
+ piod.piod_op = write ? PIOD_WRITE_D : PIOD_READ_D;
+ piod.piod_offs = (void *) memaddr;
+ piod.piod_addr = myaddr;
+ piod.piod_len = len;
+
+ if (ptrace (PT_IO, PIDGET (inferior_ptid), (caddr_t) & piod, 0) == -1)
+ {
+ /* If the PT_IO request is somehow not supported, fallback on
+ using PT_WRITE_D/PT_READ_D. Otherwise we will return zero
+ to indicate failure. */
+ if (errno != EINVAL)
+ return 0;
+ }
+ else
+ {
+ /* Return the actual number of bytes read or written. */
+ return piod.piod_len;
+ }
+ }
+#endif
+
+ /* Allocate buffer of that many longwords. */
+ if (len < GDB_MAX_ALLOCA)
+ {
+ buffer = (PTRACE_TYPE_RET *) alloca (alloc);
+ }
+ else
+ {
+ buffer = (PTRACE_TYPE_RET *) xmalloc (alloc);
+ old_chain = make_cleanup (xfree, buffer);
+ }
+
+ if (write)
+ {
+ /* Fill start and end extra bytes of buffer with existing memory
+ data. */
+ if (addr != memaddr || len < (int) sizeof (PTRACE_TYPE_RET))
+ {
+ /* Need part of initial word -- fetch it. */
+ buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) addr, 0);
+ }
+
+ if (count > 1) /* FIXME, avoid if even boundary. */
+ {
+ buffer[count - 1] =
+ ptrace (PT_READ_I, PIDGET (inferior_ptid),
+ ((PTRACE_TYPE_ARG3)
+ (addr + (count - 1) * sizeof (PTRACE_TYPE_RET))), 0);
+ }
+
+ /* Copy data to be written over corresponding part of buffer. */
+ memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_TYPE_RET) - 1)),
+ myaddr, len);
+
+ /* Write the entire buffer. */
+ for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
+ {
+ errno = 0;
+ ptrace (PT_WRITE_D, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
+ if (errno)
+ {
+ /* Using the appropriate one (I or D) is necessary for
+ Gould NP1, at least. */
+ errno = 0;
+ ptrace (PT_WRITE_I, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
+ }
+ if (errno)
+ return 0;
+ }
+ }
+ else
+ {
+ /* Read all the longwords. */
+ for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
+ {
+ errno = 0;
+ buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) addr, 0);
+ if (errno)
+ return 0;
+ QUIT;
+ }
+
+ /* Copy appropriate bytes out of the buffer. */
+ memcpy (myaddr,
+ (char *) buffer + (memaddr & (sizeof (PTRACE_TYPE_RET) - 1)),
+ len);
+ }
+
+ if (old_chain != NULL)
+ do_cleanups (old_chain);
+ return len;
+}
+
+/* Wait for child to do something. Return pid of child, or -1 in case
+ of error; store status through argument pointer OURSTATUS. */
+
+static ptid_t
+inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+{
+ int save_errno;
+ int status;
+ char *execd_pathname = NULL;
+ int exit_status;
+ int related_pid;
+ int syscall_id;
+ enum target_waitkind kind;
+ int pid;
+
+ do
+ {
+ set_sigint_trap (); /* Causes SIGINT to be passed on to the
+ attached process. */
+ set_sigio_trap ();
+
+ pid = ptrace_wait (inferior_ptid, &status);
+
+ save_errno = errno;
+
+ clear_sigio_trap ();
+
+ clear_sigint_trap ();
+
+ if (pid == -1)
+ {
+ if (save_errno == EINTR)
+ continue;
+
+ fprintf_unfiltered (gdb_stderr,
+ "Child process unexpectedly missing: %s.\n",
+ safe_strerror (save_errno));
+
+ /* Claim it exited with unknown signal. */
+ ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
+ ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ return pid_to_ptid (-1);
+ }
+
+ /* Did it exit?
+ */
+ if (target_has_exited (pid, status, &exit_status))
+ {
+ /* ??rehrauer: For now, ignore this. */
+ continue;
+ }
+
+ if (!target_thread_alive (pid_to_ptid (pid)))
+ {
+ ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
+ return pid_to_ptid (pid);
+ }
+ }
+ while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */
+
+ store_waitstatus (ourstatus, status);
+ return pid_to_ptid (pid);
+}
+
+void
+inf_ptrace_post_wait (ptid_t ptid, int wait_status)
+{
+ /* This version of Unix doesn't require a meaningful "post wait"
+ operation.
+ */
+}
+
+/* Check to see if the given thread is alive.
+
+ FIXME: Is kill() ever the right way to do this? I doubt it, but
+ for now we're going to try and be compatable with the old thread
+ code. */
+
+static int
+inf_ptrace_thread_alive (ptid_t ptid)
+{
+ pid_t pid = PIDGET (ptid);
+
+ return (kill (pid, 0) != -1);
+}
+
+/* Attach to process PID, then initialize for debugging it. */
+
+static void
+inf_ptrace_attach (char *args, int from_tty)
+{
+ char *exec_file;
+ int pid;
+ char *dummy;
+
+ if (!args)
+ error_no_arg ("process-id to attach");
+
+ dummy = args;
+ pid = strtol (args, &dummy, 0);
+ /* Some targets don't set errno on errors, grrr! */
+ if ((pid == 0) && (args == dummy))
+ error ("Illegal process-id: %s\n", args);
+
+ if (pid == getpid ()) /* Trying to masturbate? */
+ error ("I refuse to debug myself!");
+
+ if (from_tty)
+ {
+ exec_file = (char *) get_exec_file (0);
+
+ if (exec_file)
+ printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
+ target_pid_to_str (pid_to_ptid (pid)));
+ else
+ printf_unfiltered ("Attaching to %s\n",
+ target_pid_to_str (pid_to_ptid (pid)));
+
+ gdb_flush (gdb_stdout);
+ }
+
+ attach (pid);
+
+ inferior_ptid = pid_to_ptid (pid);
+ push_target (ptrace_ops_hack);
+}
+
+static void
+inf_ptrace_post_attach (int pid)
+{
+ /* This version of Unix doesn't require a meaningful "post attach"
+ operation by a debugger. */
+}
+
+/* Take a program previously attached to and detaches it. The program
+ resumes execution and will no longer stop on signals, etc. We'd
+ better not have left any breakpoints in the program or it'll die
+ when it hits one. For this to work, it may be necessary for the
+ process to have been previously attached. It *might* work if the
+ program was started via the normal ptrace (PTRACE_TRACEME). */
+
+static void
+inf_ptrace_detach (char *args, int from_tty)
+{
+ int siggnal = 0;
+ int pid = PIDGET (inferior_ptid);
+
+ if (from_tty)
+ {
+ char *exec_file = get_exec_file (0);
+ if (exec_file == 0)
+ exec_file = "";
+ printf_unfiltered ("Detaching from program: %s, %s\n", exec_file,
+ target_pid_to_str (pid_to_ptid (pid)));
+ gdb_flush (gdb_stdout);
+ }
+ if (args)
+ siggnal = atoi (args);
+
+ detach (siggnal);
+
+ inferior_ptid = null_ptid;
+ unpush_target (ptrace_ops_hack);
+}
+
+/* Get ready to modify the registers array. On machines which store
+ individual registers, this doesn't need to do anything. On
+ machines which store all the registers in one fell swoop, this
+ makes sure that registers contains all the registers from the
+ program being debugged. */
+
+static void
+inf_ptrace_prepare_to_store (void)
+{
+}
+
+/* Print status information about what we're accessing. */
+
+static void
+inf_ptrace_files_info (struct target_ops *ignore)
+{
+ printf_unfiltered ("\tUsing the running image of %s %s.\n",
+ attach_flag ? "attached" : "child",
+ target_pid_to_str (inferior_ptid));
+}
+
+static void
+inf_ptrace_open (char *arg, int from_tty)
+{
+ error ("Use the \"run\" command to start a Unix child process.");
+}
+
+/* Stub function which causes the inferior that runs it, to be ptrace-able
+ by its parent process. */
+
+static void
+inf_ptrace_me (void)
+{
+ /* "Trace me, Dr. Memory!" */
+ call_ptrace (0, 0, (PTRACE_TYPE_ARG3) 0, 0);
+}
+
+/* Stub function which causes the GDB that runs it, to start ptrace-ing
+ the child process. */
+
+static void
+inf_ptrace_him (int pid)
+{
+ push_target (ptrace_ops_hack);
+
+ /* On some targets, there must be some explicit synchronization
+ between the parent and child processes after the debugger
+ forks, and before the child execs the debuggee program. This
+ call basically gives permission for the child to exec.
+ */
+
+ target_acknowledge_created_inferior (pid);
+
+ /* START_INFERIOR_TRAPS_EXPECTED is defined in inferior.h,
+ * and will be 1 or 2 depending on whether we're starting
+ * without or with a shell.
+ */
+ startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
+
+ /* On some targets, there must be some explicit actions taken after
+ the inferior has been started up.
+ */
+ target_post_startup_inferior (pid_to_ptid (pid));
+}
+
+/* Start an inferior Unix child process and sets inferior_ptid to its
+ pid. EXEC_FILE is the file to run. ALLARGS is a string containing
+ the arguments to the program. ENV is the environment vector to
+ pass. Errors reported with error(). */
+
+static void
+inf_ptrace_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
+{
+ fork_inferior (exec_file, allargs, env, inf_ptrace_me, inf_ptrace_him,
+ NULL, NULL);
+ /* We are at the first instruction we care about. */
+ observer_notify_inferior_created (&current_target, from_tty);
+ /* Pedal to the metal... */
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
+}
+
+static void
+inf_ptrace_post_startup_inferior (ptid_t ptid)
+{
+ /* This version of Unix doesn't require a meaningful "post startup inferior"
+ operation by a debugger.
+ */
+}
+
+static void
+inf_ptrace_acknowledge_created_inferior (int pid)
+{
+ /* This version of Unix doesn't require a meaningful "acknowledge created inferior"
+ operation by a debugger.
+ */
+}
+
+static int
+inf_ptrace_insert_fork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of fork events. */
+ return 0;
+}
+
+static int
+inf_ptrace_remove_fork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of fork events. */
+ return 0;
+}
+
+static int
+inf_ptrace_insert_vfork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of vfork events. */
+ return 0;
+}
+
+static int
+inf_ptrace_remove_vfork_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of vfork events. */
+ return 0;
+}
+
+static int
+inf_ptrace_follow_fork (int follow_child)
+{
+ /* This version of Unix doesn't support following fork or vfork events. */
+ return 0;
+}
+
+static int
+inf_ptrace_insert_exec_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of exec events. */
+ return 0;
+}
+
+static int
+inf_ptrace_remove_exec_catchpoint (int pid)
+{
+ /* This version of Unix doesn't support notification of exec events. */
+ return 0;
+}
+
+static int
+inf_ptrace_reported_exec_events_per_exec_call (void)
+{
+ /* This version of Unix doesn't support notification of exec events.
+ */
+ return 1;
+}
+
+static int
+inf_ptrace_has_exited (int pid, int wait_status, int *exit_status)
+{
+ if (WIFEXITED (wait_status))
+ {
+ *exit_status = WEXITSTATUS (wait_status);
+ return 1;
+ }
+
+ if (WIFSIGNALED (wait_status))
+ {
+ *exit_status = 0; /* ?? Don't know what else to say here. */
+ return 1;
+ }
+
+ /* ?? Do we really need to consult the event state, too? Assume the
+ wait_state alone suffices.
+ */
+ return 0;
+}
+
+static void
+inf_ptrace_mourn_inferior (void)
+{
+ unpush_target (ptrace_ops_hack);
+ generic_mourn_inferior ();
+}
+
+static int
+inf_ptrace_can_run (void)
+{
+ return 1;
+}
+
+/* Send a SIGINT to the process group. This acts just like the user
+ typed a ^C on the controlling terminal.
+
+ XXX - This may not be correct for all systems. Some may want to
+ use killpg() instead of kill (-pgrp). */
+
+static void
+inf_ptrace_stop (void)
+{
+ kill (-inferior_process_group, SIGINT);
+}
+
+/* Perform a partial transfer to/from the specified object. For
+ memory transfers, fall back to the old memory xfer functions. */
+
+static LONGEST
+inf_ptrace_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, void *readbuf,
+ const void *writebuf, ULONGEST offset, LONGEST len)
+{
+ switch (object)
+ {
+ case TARGET_OBJECT_MEMORY:
+ if (readbuf)
+ return inf_ptrace_xfer_memory (offset, readbuf, len, 0 /*write */ ,
+ NULL, ops);
+ if (writebuf)
+ return inf_ptrace_xfer_memory (offset, readbuf, len, 1 /*write */ ,
+ NULL, ops);
+ return -1;
+
+ case TARGET_OBJECT_UNWIND_TABLE:
+ return -1;
+
+ case TARGET_OBJECT_AUXV:
+ return -1;
+
+ case TARGET_OBJECT_WCOOKIE:
+ return -1;
+
+ default:
+ return -1;
+ }
+}
+
+static char *
+inf_ptrace_pid_to_str (ptid_t ptid)
+{
+ return normal_pid_to_str (ptid);
+}
+
+struct target_ops *
+inf_ptrace_target (void)
+{
+ struct target_ops *t = inf_child_target ();
+ t->to_open = inf_ptrace_open;
+ t->to_attach = inf_ptrace_attach;
+ t->to_post_attach = inf_ptrace_post_attach;
+ t->to_detach = inf_ptrace_detach;
+ t->to_resume = inf_ptrace_resume;
+ t->to_wait = inf_ptrace_wait;
+ t->to_post_wait = inf_ptrace_post_wait;
+ t->to_prepare_to_store = inf_ptrace_prepare_to_store;
+ t->to_xfer_memory = inf_ptrace_xfer_memory;
+ t->to_xfer_partial = inf_ptrace_xfer_partial;
+ t->to_files_info = inf_ptrace_files_info;
+ t->to_kill = inf_ptrace_kill_inferior;
+ t->to_create_inferior = inf_ptrace_create_inferior;
+ t->to_post_startup_inferior = inf_ptrace_post_startup_inferior;
+ t->to_acknowledge_created_inferior =
+ inf_ptrace_acknowledge_created_inferior;
+ t->to_insert_fork_catchpoint = inf_ptrace_insert_fork_catchpoint;
+ t->to_remove_fork_catchpoint = inf_ptrace_remove_fork_catchpoint;
+ t->to_insert_vfork_catchpoint = inf_ptrace_insert_vfork_catchpoint;
+ t->to_remove_vfork_catchpoint = inf_ptrace_remove_vfork_catchpoint;
+ t->to_follow_fork = inf_ptrace_follow_fork;
+ t->to_insert_exec_catchpoint = inf_ptrace_insert_exec_catchpoint;
+ t->to_remove_exec_catchpoint = inf_ptrace_remove_exec_catchpoint;
+ t->to_reported_exec_events_per_exec_call =
+ inf_ptrace_reported_exec_events_per_exec_call;
+ t->to_has_exited = inf_ptrace_has_exited;
+ t->to_mourn_inferior = inf_ptrace_mourn_inferior;
+ t->to_can_run = inf_ptrace_can_run;
+ t->to_thread_alive = inf_ptrace_thread_alive;
+ t->to_pid_to_str = inf_ptrace_pid_to_str;
+ t->to_stop = inf_ptrace_stop;
+ t->to_stratum = process_stratum;
+ t->to_has_all_memory = 1;
+ t->to_has_memory = 1;
+ t->to_has_stack = 1;
+ t->to_has_registers = 1;
+ t->to_has_execution = 1;
+ t->to_magic = OPS_MAGIC;
+ ptrace_ops_hack = t;
+ return t;
+}
diff --git a/gdb/config/powerpc/nm-nbsd.h b/gdb/inf-ptrace.h
index 5de6c9a0d21..e9ceae3c963 100644
--- a/gdb/config/powerpc/nm-nbsd.h
+++ b/gdb/inf-ptrace.h
@@ -1,5 +1,7 @@
-/* Native-dependent definitions for PowerPC running NetBSD ELF, for GDB.
- Copyright 2000, 2002 Free Software Foundation, Inc.
+/* Low level Unix child interface to ptrace, for GDB when running
+ under Unix.
+
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,10 +20,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_NBSD_H
-#define NM_NBSD_H
+#ifndef INF_PTRACE_H
+#define INF_PTRACE_H
+
+/* Create a prototype ptrace target. The client can override it with
+ local methods. */
-/* Get generic NetBSD native definitions. */
-#include "config/nm-nbsd.h"
+extern struct target_ops *inf_ptrace_target (void);
#endif
diff --git a/gdb/infcall.c b/gdb/infcall.c
index b10f8071daf..53bcffd3ae7 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -35,6 +35,7 @@
#include "command.h"
#include "gdb_string.h"
#include "infcall.h"
+#include "dummy-frame.h"
/* NOTE: cagney/2003-04-16: What's the future of this code?
@@ -205,8 +206,9 @@ find_function_addr (struct value *function, struct type **retval_type)
else
error ("Invalid data type for function to be called.");
- *retval_type = value_type;
- return funaddr;
+ if (retval_type != NULL)
+ *retval_type = value_type;
+ return funaddr + DEPRECATED_FUNCTION_START_OFFSET;
}
/* Call breakpoint_auto_delete on the current contents of the bpstat
@@ -219,85 +221,6 @@ breakpoint_auto_delete_contents (void *arg)
}
static CORE_ADDR
-legacy_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)
-{
- /* CALL_DUMMY is an array of words (DEPRECATED_REGISTER_SIZE), but
- each word is in host byte order. Before calling
- DEPRECATED_FIX_CALL_DUMMY, we byteswap it and remove any extra
- bytes which might exist because ULONGEST is bigger than
- DEPRECATED_REGISTER_SIZE. */
- /* NOTE: This is pretty wierd, as the call dummy is actually a
- sequence of instructions. But CISC machines will have to pack
- the instructions into DEPRECATED_REGISTER_SIZE units (and so will
- RISC machines for which INSTRUCTION_SIZE is not
- DEPRECATED_REGISTER_SIZE). */
- /* NOTE: This is pretty stupid. CALL_DUMMY should be in strict
- target byte order. */
- CORE_ADDR start_sp;
- ULONGEST *dummy = alloca (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
- int sizeof_dummy1 = (DEPRECATED_REGISTER_SIZE
- * DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
- / sizeof (ULONGEST));
- char *dummy1 = alloca (sizeof_dummy1);
- memcpy (dummy, DEPRECATED_CALL_DUMMY_WORDS,
- DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
- if (INNER_THAN (1, 2))
- {
- /* Stack grows down */
- sp -= sizeof_dummy1;
- start_sp = sp;
- }
- else
- {
- /* Stack grows up */
- start_sp = sp;
- sp += sizeof_dummy1;
- }
- /* NOTE: cagney/2002-09-10: Don't bother re-adjusting the stack
- after allocating space for the call dummy. A target can specify
- a SIZEOF_DUMMY1 (via DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) such
- that all local alignment requirements are met. */
- /* Create a call sequence customized for this function and the
- number of arguments for it. */
- {
- int i;
- for (i = 0; i < (int) (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (dummy[0]));
- i++)
- store_unsigned_integer (&dummy1[i * DEPRECATED_REGISTER_SIZE],
- DEPRECATED_REGISTER_SIZE,
- (ULONGEST) dummy[i]);
- }
- /* NOTE: cagney/2003-04-22: This computation of REAL_PC, BP_ADDR and
- DUMMY_ADDR is pretty messed up. It comes from constant tinkering
- with the values. Instead a DEPRECATED_FIX_CALL_DUMMY replacement
- (PUSH_DUMMY_BREAKPOINT?) should just do everything. */
- if (!gdbarch_push_dummy_call_p (current_gdbarch))
- {
- if (DEPRECATED_FIX_CALL_DUMMY_P ())
- {
- /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true? */
- DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
- value_type, using_gcc);
- }
- (*real_pc) = start_sp;
- }
- /* Yes, the offset is applied to the real_pc and not the dummy addr.
- Ulgh! Blame the HP/UX target. */
- (*bp_addr) = (*real_pc) + DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET;
- /* Yes, the offset is applied to the real_pc and not the
- dummy_addr. Ulgh! Blame the HP/UX target. */
- (*real_pc) += DEPRECATED_CALL_DUMMY_START_OFFSET;
- write_memory (start_sp, (char *) dummy1, sizeof_dummy1);
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
- generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
- return sp;
-}
-
-static CORE_ADDR
generic_push_dummy_code (struct gdbarch *gdbarch,
CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
struct value **args, int nargs,
@@ -333,8 +256,8 @@ generic_push_dummy_code (struct gdbarch *gdbarch,
return sp;
}
-/* Provide backward compatibility. Once DEPRECATED_FIX_CALL_DUMMY is
- eliminated, this can be simplified. */
+/* For CALL_DUMMY_ON_STACK, push a breakpoint sequence that the called
+ function returns to. */
static CORE_ADDR
push_dummy_code (struct gdbarch *gdbarch,
@@ -346,10 +269,6 @@ push_dummy_code (struct gdbarch *gdbarch,
if (gdbarch_push_dummy_code_p (gdbarch))
return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
args, nargs, value_type, real_pc, bp_addr);
- else if (DEPRECATED_FIX_CALL_DUMMY_P ()
- && !gdbarch_push_dummy_call_p (gdbarch))
- return legacy_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
- args, nargs, value_type, real_pc, bp_addr);
else
return generic_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
args, nargs, value_type, real_pc, bp_addr);
@@ -390,6 +309,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
CORE_ADDR real_pc;
struct type *ftype = check_typedef (SYMBOL_TYPE (function));
CORE_ADDR bp_addr;
+ struct regcache *caller_regcache;
+ struct cleanup *caller_regcache_cleanup;
+ struct frame_id dummy_id;
if (!target_has_execution)
noprocess ();
@@ -407,34 +329,12 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
inf_status = save_inferior_status (1);
inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
- if (DEPRECATED_PUSH_DUMMY_FRAME_P ())
- {
- /* DEPRECATED_PUSH_DUMMY_FRAME is responsible for saving the
- inferior registers (and frame_pop() for restoring them). (At
- least on most machines) they are saved on the stack in the
- inferior. */
- DEPRECATED_PUSH_DUMMY_FRAME;
- }
- else
- {
- /* FIXME: cagney/2003-02-26: Step zero of this little tinker is
- to extract the generic dummy frame code from the architecture
- vector. Hence this direct call.
-
- A follow-on change is to modify this interface so that it takes
- thread OR frame OR ptid as a parameter, and returns a dummy
- frame handle. The handle can then be used further down as a
- parameter to generic_save_dummy_frame_tos(). Hmm, thinking
- about it, since everything is ment to be using generic dummy
- frames, why not even use some of the dummy frame code to here -
- do a regcache dup and then pass the duped regcache, along with
- all the other stuff, at one single point.
-
- In fact, you can even save the structure's return address in the
- dummy frame and fix one of those nasty lost struct return edge
- conditions. */
- generic_push_dummy_frame ();
- }
+ /* Save the caller's registers so that they can be restored once the
+ callee returns. To allow nested calls the registers are (further
+ down) pushed onto a dummy frame stack. Include a cleanup (which
+ is tossed once the regcache has been pushed). */
+ caller_regcache = frame_save_as_regcache (get_current_frame ());
+ caller_regcache_cleanup = make_cleanup_regcache_xfree (caller_regcache);
/* Ensure that the initial SP is correctly aligned. */
{
@@ -545,18 +445,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
}
break;
case AT_ENTRY_POINT:
- if (DEPRECATED_FIX_CALL_DUMMY_P ()
- && !gdbarch_push_dummy_call_p (current_gdbarch))
- {
- /* 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 = entry_point_address ();
/* Make certain that the address points at real code, and not a
@@ -596,11 +484,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
internal_error (__FILE__, __LINE__, "bad switch");
}
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
- /* Save where the breakpoint is going to be inserted so that the
- dummy-frame code is later able to re-identify it. */
- generic_save_call_dummy_addr (bp_addr, bp_addr + 1);
-
if (nargs < TYPE_NFIELDS (ftype))
error ("too few arguments in function call");
@@ -691,14 +574,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
arg_type = check_typedef (VALUE_ENCLOSING_TYPE (args[i]));
len = TYPE_LENGTH (arg_type);
- if (DEPRECATED_STACK_ALIGN_P ())
- /* MVS 11/22/96: I think at least some of this
- stack_align code is really broken. Better to let
- PUSH_ARGUMENTS adjust the stack in a target-defined
- manner. */
- aligned_len = DEPRECATED_STACK_ALIGN (len);
- else
- aligned_len = len;
+ aligned_len = len;
if (INNER_THAN (1, 2))
{
/* stack grows downward */
@@ -734,10 +610,6 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
if (struct_return)
{
int len = TYPE_LENGTH (value_type);
- if (DEPRECATED_STACK_ALIGN_P ())
- /* NOTE: cagney/2003-03-22: Should rely on frame align, rather
- than stack align to force the alignment of the stack. */
- len = DEPRECATED_STACK_ALIGN (len);
if (INNER_THAN (1, 2))
{
/* Stack grows downward. Align STRUCT_ADDR and SP after
@@ -767,7 +639,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, funaddr, current_regcache,
+ sp = gdbarch_push_dummy_call (current_gdbarch, function, current_regcache,
bp_addr, nargs, args, sp, struct_return,
struct_addr);
else if (DEPRECATED_PUSH_ARGUMENTS_P ())
@@ -775,114 +647,46 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
sp = DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return,
struct_addr);
else
- sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
-
- if (DEPRECATED_PUSH_RETURN_ADDRESS_P ())
- /* for targets that use no CALL_DUMMY */
- /* There are a number of targets now which actually don't write
- any CALL_DUMMY instructions into the target, but instead just
- save the machine state, push the arguments, and jump directly
- to the callee function. Since this doesn't actually involve
- executing a JSR/BSR instruction, the return address must be set
- up by hand, either by pushing onto the stack or copying into a
- return-address register as appropriate. Formerly this has been
- done in PUSH_ARGUMENTS, but that's overloading its
- functionality a bit, so I'm making it explicit to do it here. */
- /* NOTE: cagney/2003-04-22: The first parameter ("real_pc") has
- been replaced with zero, it turns out that no implementation
- used that parameter. This occured because the value being
- supplied - the address of the called function's entry point
- instead of the address of the breakpoint that the called
- function should return to - wasn't useful. */
- sp = DEPRECATED_PUSH_RETURN_ADDRESS (0, sp);
-
- /* NOTE: cagney/2003-03-23: Diable this code when there is a
- push_dummy_call() method. Since that method will have already
- handled any alignment issues, the code below is entirely
- redundant. */
- if (!gdbarch_push_dummy_call_p (current_gdbarch)
- && DEPRECATED_STACK_ALIGN_P () && !INNER_THAN (1, 2))
- {
- /* If stack grows up, we must leave a hole at the bottom, note
- that sp already has been advanced for the arguments! */
- sp = DEPRECATED_STACK_ALIGN (sp);
- }
+ error ("This target does not support function calls");
- /* Store the address at which the structure is supposed to be
- written. */
- /* NOTE: 2003-03-24: Since PUSH_ARGUMENTS can (and typically does)
- store the struct return address, this call is entirely redundant. */
- 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: 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 (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 (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ())
- DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp);
+ /* Set up a frame ID for the dummy frame so we can pass it to
+ set_momentary_breakpoint. We need to give the breakpoint a frame
+ ID so that the breakpoint code can correctly re-identify the
+ dummy breakpoint. */
+ /* 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. */
+ dummy_id = frame_id_build (sp, bp_addr);
- /* Now proceed, having reached the desired place. */
- clear_proceed_status ();
-
/* Create a momentary breakpoint at the return address of the
inferior. That way it breaks when it returns. */
{
struct breakpoint *bpt;
struct symtab_and_line sal;
- struct frame_id frame;
init_sal (&sal); /* initialize to zeroes */
sal.pc = bp_addr;
sal.section = find_pc_overlay (sal.pc);
- /* Set up a frame ID for the dummy frame so we can pass it to
- set_momentary_breakpoint. We need to give the breakpoint a
- frame ID so that the breakpoint code can correctly re-identify
- the dummy breakpoint. */
- 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
- {
- /* The assumption here is that push_dummy_call() returned the
- stack part of the frame ID. Unfortunately, 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);
+ /* 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. */
+ bpt = set_momentary_breakpoint (sal, dummy_id, bp_call_dummy);
bpt->disposition = disp_del;
}
+ /* Everything's ready, push all the info needed to restore the
+ caller (and identify the dummy-frame) onto the dummy-frame
+ stack. */
+ dummy_frame_push (caller_regcache, &dummy_id);
+ discard_cleanups (caller_regcache_cleanup);
+
+ /* - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP -
+ If you're looking to implement asynchronous dummy-frames, then
+ just below is the place to chop this function in two.. */
+
+ /* Now proceed, having reached the desired place. */
+ clear_proceed_status ();
+
/* Execute a "stack dummy", a piece of code stored in the stack by
the debugger to be executed in the inferior.
@@ -942,7 +746,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
{
/* Can't use a cleanup here. It is discarded, instead use
an alloca. */
- char *tmp = xstrprintf ("at %s", local_hex_string (funaddr));
+ char *tmp = xstrprintf ("at %s", hex_string (funaddr));
char *a = alloca (strlen (tmp) + 1);
strcpy (a, tmp);
xfree (tmp);
@@ -1032,9 +836,14 @@ the function call).", name);
leave the RETBUF alone. */
do_cleanups (inf_status_cleanup);
- /* Figure out the value returned by the function. */
- if (struct_return)
- {
+ /* Figure out the value returned by the function, return that. */
+ {
+ struct value *retval;
+ if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
+ /* If the function returns void, don't bother fetching the
+ return value. */
+ retval = allocate_value (value_type);
+ else if (struct_return)
/* NOTE: cagney/2003-09-27: This assumes that PUSH_DUMMY_CALL
has correctly stored STRUCT_ADDR in the target. In the past
that hasn't been the case, the old MIPS PUSH_ARGUMENTS
@@ -1043,18 +852,21 @@ the function call).", name);
you're seeing problems with values being returned using the
"struct return convention", check that PUSH_DUMMY_CALL isn't
playing tricks. */
- struct value *retval = value_at (value_type, struct_addr, NULL);
- do_cleanups (retbuf_cleanup);
- return retval;
- }
- else
- {
- /* The non-register case was handled above. */
- struct value *retval = register_value_being_returned (value_type,
- retbuf);
- do_cleanups (retbuf_cleanup);
- return retval;
- }
+ retval = value_at (value_type, struct_addr, NULL);
+ else
+ {
+ /* This code only handles "register convention". */
+ retval = allocate_value (value_type);
+ gdb_assert (gdbarch_return_value (current_gdbarch, value_type,
+ NULL, NULL, NULL)
+ == RETURN_VALUE_REGISTER_CONVENTION);
+ gdbarch_return_value (current_gdbarch, value_type, retbuf,
+ VALUE_CONTENTS_RAW (retval) /*read*/,
+ NULL /*write*/);
+ }
+ do_cleanups (retbuf_cleanup);
+ return retval;
+ }
}
void _initialize_infcall (void);
@@ -1064,7 +876,8 @@ _initialize_infcall (void)
{
add_setshow_boolean_cmd ("coerce-float-to-double", class_obscure,
&coerce_float_to_double_p, "\
-Set coercion of floats to doubles when calling functions\n\
+Set coercion of floats to doubles when calling functions.", "\
+Show coercion of floats to doubles when calling functions", "\
Variables of type float should generally be converted to doubles before\n\
calling an unprototyped function, and left alone when calling a prototyped\n\
function. However, some older debug info formats do not provide enough\n\
@@ -1072,27 +885,17 @@ information to determine that a function is prototyped. If this flag is\n\
set, GDB will perform the conversion for a function it considers\n\
unprototyped.\n\
The default is to perform the conversion.\n", "\
-Show coercion of floats to doubles when calling functions\n\
-Variables of type float should generally be converted to doubles before\n\
-calling an unprototyped function, and left alone when calling a prototyped\n\
-function. However, some older debug info formats do not provide enough\n\
-information to determine that a function is prototyped. If this flag is\n\
-set, GDB will perform the conversion for a function it considers\n\
-unprototyped.\n\
-The default is to perform the conversion.\n",
+Coercion of floats to doubles when calling functions is %s.",
NULL, NULL, &setlist, &showlist);
add_setshow_boolean_cmd ("unwindonsignal", no_class,
&unwind_on_signal_p, "\
-Set unwinding of stack if a signal is received while in a call dummy.\n\
+Set unwinding of stack if a signal is received while in a call dummy.", "\
+Show unwinding of stack if a signal is received while in a call dummy.", "\
The unwindonsignal lets the user determine what gdb should do if a signal\n\
is received while in a function called from gdb (call dummy). If set, gdb\n\
unwinds the stack and restore the context to what as it was before the call.\n\
The default is to stop in the frame where the signal was received.", "\
-Set unwinding of stack if a signal is received while in a call dummy.\n\
-The unwindonsignal lets the user determine what gdb should do if a signal\n\
-is received while in a function called from gdb (call dummy). If set, gdb\n\
-unwinds the stack and restore the context to what as it was before the call.\n\
-The default is to stop in the frame where the signal was received.",
+Unwinding of stack if a signal is received while in a call dummy is %s.",
NULL, NULL, &setlist, &showlist);
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 1ad12bf706e..afa07c474f0 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -186,10 +186,6 @@ CORE_ADDR step_range_end; /* Exclusive */
struct frame_id step_frame_id;
-/* Our notion of the current stack pointer. */
-
-CORE_ADDR step_sp;
-
enum step_over_calls_kind step_over_calls;
/* If stepping, nonzero means step count is > 1
@@ -379,13 +375,14 @@ tty_command (char *file, int from_tty)
inferior_io_terminal = savestring (file, strlen (file));
}
-static void
-run_command (char *args, int from_tty)
-{
- char *exec_file;
-
- dont_repeat ();
+/* Kill the inferior if already running. This function is designed
+ to be called when we are about to start the execution of the program
+ from the beginning. Ask the user to confirm that he wants to restart
+ the program being debugged when FROM_TTY is non-null. */
+void
+kill_if_already_running (int from_tty)
+{
if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
{
if (from_tty
@@ -398,7 +395,16 @@ Start it from the beginning? "))
#endif
init_wait_for_inferior ();
}
+}
+
+static void
+run_command (char *args, int from_tty)
+{
+ char *exec_file;
+ dont_repeat ();
+
+ kill_if_already_running (from_tty);
clear_breakpoint_hit_counts ();
/* Purge old solib objfiles. */
@@ -428,7 +434,7 @@ Start it from the beginning? "))
if (!args)
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
async_disable_stdin ();
}
else
@@ -437,12 +443,12 @@ Start it from the beginning? "))
/* If we get a request for running in the bg but the target
doesn't support it, error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we don't get a request of running in the bg, then we need
to simulate synchronous (fg) execution. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
@@ -473,7 +479,7 @@ Start it from the beginning? "))
/* We call get_inferior_args() because we might need to compute
the value now. */
target_create_inferior (exec_file, get_inferior_args (),
- environ_vector (inferior_environ));
+ environ_vector (inferior_environ), from_tty);
}
@@ -485,6 +491,29 @@ run_no_args_command (char *args, int from_tty)
}
+/* Start the execution of the program up until the beginning of the main
+ program. */
+
+static void
+start_command (char *args, int from_tty)
+{
+ /* Some languages such as Ada need to search inside the program
+ minimal symbols for the location where to put the temporary
+ breakpoint before starting. */
+ if (!have_minimal_symbols ())
+ error ("No symbol table loaded. Use the \"file\" command.");
+
+ /* If the inferior is already running, we want to ask the user if we
+ should restart it or not before we insert the temporary breakpoint.
+ This makes sure that this command doesn't have any side effect if
+ the user changes its mind. */
+ kill_if_already_running (from_tty);
+
+ /* Insert the temporary breakpoint, and run... */
+ tbreak_command (main_name (), 0);
+ run_command (args, from_tty);
+}
+
void
continue_command (char *proc_count_exp, int from_tty)
{
@@ -497,12 +526,12 @@ continue_command (char *proc_count_exp, int from_tty)
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
@@ -591,12 +620,12 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
/* If we get a request for running in the bg but the target
doesn't support it, error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we don't get a request of running in the bg, then we need
to simulate synchronous (fg) execution. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
@@ -607,14 +636,14 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
if (!single_inst || skip_subroutines) /* leave si command alone */
{
enable_longjmp_breakpoint ();
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
cleanups = make_cleanup (disable_longjmp_breakpoint_cleanup, 0 /*ignore*/);
else
make_exec_cleanup (disable_longjmp_breakpoint_cleanup, 0 /*ignore*/);
}
/* In synchronous case, all is well, just use the regular for loop. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
{
for (; count > 0; count--)
{
@@ -624,7 +653,6 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
if (!frame) /* Avoid coredump here. Why tho? */
error ("No current frame");
step_frame_id = get_frame_id (frame);
- step_sp = read_sp ();
if (!single_inst)
{
@@ -673,7 +701,7 @@ which has no line number information.\n", name);
and handle them one at the time, through step_once(). */
else
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
step_once (skip_subroutines, single_inst, count);
}
}
@@ -724,7 +752,6 @@ step_once (int skip_subroutines, int single_inst, int count)
if (!frame) /* Avoid coredump here. Why tho? */
error ("No current frame");
step_frame_id = get_frame_id (frame);
- step_sp = read_sp ();
if (!single_inst)
{
@@ -801,12 +828,12 @@ jump_command (char *arg, int from_tty)
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
@@ -977,7 +1004,6 @@ until_next_command (int from_tty)
step_over_calls = STEP_OVER_ALL;
step_frame_id = get_frame_id (frame);
- step_sp = read_sp ();
step_multi = 0; /* Only one call to proceed */
@@ -998,12 +1024,12 @@ until_command (char *arg, int from_tty)
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
@@ -1032,12 +1058,12 @@ advance_command (char *arg, int from_tty)
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution. */
async_disable_stdin ();
@@ -1046,80 +1072,62 @@ advance_command (char *arg, int from_tty)
until_break_command (arg, from_tty, 1);
}
-
/* Print the result of a function at the end of a 'finish' command. */
static void
print_return_value (int struct_return, struct type *value_type)
{
+ struct gdbarch *gdbarch = current_gdbarch;
struct cleanup *old_chain;
struct ui_stream *stb;
struct value *value;
- if (!struct_return)
- {
- /* The return value can be found in the inferior's registers. */
- value = register_value_being_returned (value_type, stop_registers);
- }
- /* FIXME: cagney/2004-01-17: When both return_value and
- extract_returned_value_address are available, should use that to
- find the address of and then extract the returned value. */
+ gdb_assert (TYPE_CODE (value_type) != TYPE_CODE_VOID);
+
/* FIXME: 2003-09-27: When returning from a nested inferior function
call, it's possible (with no help from the architecture vector)
to locate and return/print a "struct return" value. This is just
a more complicated case of what is already being done in in the
inferior function call code. In fact, when inferior function
calls are made async, this will likely be made the norm. */
- else if (gdbarch_return_value_p (current_gdbarch))
- /* We cannot determine the contents of the structure because it is
- on the stack, and we don't know where, since we did not
- initiate the call, as opposed to the call_function_by_hand
- case. */
+
+ switch (gdbarch_return_value (gdbarch, value_type, NULL, NULL, NULL))
+ {
+ case RETURN_VALUE_REGISTER_CONVENTION:
+ case RETURN_VALUE_ABI_RETURNS_ADDRESS:
+ value = allocate_value (value_type);
+ CHECK_TYPEDEF (value_type);
+ gdbarch_return_value (current_gdbarch, value_type, stop_registers,
+ VALUE_CONTENTS_RAW (value), NULL);
+ break;
+ case RETURN_VALUE_STRUCT_CONVENTION:
+ value = NULL;
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
+ }
+
+ if (value)
+ {
+ /* Print it. */
+ stb = ui_out_stream_new (uiout);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
+ ui_out_text (uiout, "Value returned is ");
+ ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
+ record_latest_value (value));
+ ui_out_text (uiout, " = ");
+ value_print (value, stb->stream, 0, Val_no_prettyprint);
+ ui_out_field_stream (uiout, "return-value", stb);
+ ui_out_text (uiout, "\n");
+ do_cleanups (old_chain);
+ }
+ else
{
- gdb_assert (gdbarch_return_value (current_gdbarch, value_type,
- NULL, NULL, NULL)
- == RETURN_VALUE_STRUCT_CONVENTION);
ui_out_text (uiout, "Value returned has type: ");
ui_out_field_string (uiout, "return-type", TYPE_NAME (value_type));
ui_out_text (uiout, ".");
ui_out_text (uiout, " Cannot determine contents\n");
- return;
- }
- else
- {
- if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
- {
- CORE_ADDR addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (stop_registers);
- if (!addr)
- error ("Function return value unknown.");
- value = value_at (value_type, addr, NULL);
- }
- else
- {
- /* It is "struct return" yet the value is being extracted,
- presumably from registers, using EXTRACT_RETURN_VALUE.
- This doesn't make sense. Unfortunately, the legacy
- interfaces allowed this behavior. Sigh! */
- value = allocate_value (value_type);
- CHECK_TYPEDEF (value_type);
- /* If the function returns void, don't bother fetching the
- return value. */
- EXTRACT_RETURN_VALUE (value_type, stop_registers,
- VALUE_CONTENTS_RAW (value));
- }
}
-
- /* Print it. */
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
- ui_out_text (uiout, "Value returned is ");
- ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
- record_latest_value (value));
- ui_out_text (uiout, " = ");
- value_print (value, stb->stream, 0, Val_no_prettyprint);
- ui_out_field_stream (uiout, "return-value", stb);
- ui_out_text (uiout, "\n");
- do_cleanups (old_chain);
}
/* Stuff that needs to be done by the finish command after the target
@@ -1191,12 +1199,12 @@ finish_command (char *arg, int from_tty)
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution. */
async_disable_stdin ();
@@ -1220,7 +1228,7 @@ finish_command (char *arg, int from_tty)
breakpoint = set_momentary_breakpoint (sal, get_frame_id (frame), bp_finish);
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
else
old_chain = make_exec_cleanup_delete_breakpoint (breakpoint);
@@ -1234,15 +1242,14 @@ finish_command (char *arg, int from_tty)
if (from_tty)
{
printf_filtered ("Run till exit from ");
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 0);
+ print_stack_frame (get_selected_frame (), 1, LOCATION);
}
/* If running asynchronously and the target support asynchronous
execution, set things up for the rest of the finish command to be
completed later on, when gdb has detected that the target has
stopped, in fetch_inferior_event. */
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
{
arg1 =
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
@@ -1265,7 +1272,7 @@ finish_command (char *arg, int from_tty)
/* Do this only if not running asynchronously or if the target
cannot do async execution. Otherwise, complete this command when
the target actually stops, in fetch_inferior_event. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
{
/* Did we stop at our breakpoint? */
if (bpstat_find_breakpoint (stop_bpstat, breakpoint) != NULL
@@ -1310,7 +1317,7 @@ program_info (char *args, int from_tty)
target_files_info ();
printf_filtered ("Program stopped at %s.\n",
- local_hex_string ((unsigned long) stop_pc));
+ hex_string ((unsigned long) stop_pc));
if (stop_step)
printf_filtered ("It stopped after being stepped.\n");
else if (num != 0)
@@ -1505,14 +1512,7 @@ default_print_registers_info (struct gdbarch *gdbarch,
{
int i;
const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
- char raw_buffer[MAX_REGISTER_SIZE];
- char virtual_buffer[MAX_REGISTER_SIZE];
-
- if (DEPRECATED_DO_REGISTERS_INFO_P ())
- {
- DEPRECATED_DO_REGISTERS_INFO (regnum, print_all);
- return;
- }
+ char buffer[MAX_REGISTER_SIZE];
for (i = 0; i < numregs; i++)
{
@@ -1546,60 +1546,44 @@ default_print_registers_info (struct gdbarch *gdbarch,
print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
/* Get the data in raw format. */
- if (! frame_register_read (frame, i, raw_buffer))
+ if (! frame_register_read (frame, i, buffer))
{
fprintf_filtered (file, "*value not available*\n");
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 (DEPRECATED_REGISTER_CONVERTIBLE_P ()
- && DEPRECATED_REGISTER_CONVERTIBLE (i))
- {
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
- raw_buffer, virtual_buffer);
- }
- else
- {
- memcpy (virtual_buffer, raw_buffer,
- DEPRECATED_REGISTER_VIRTUAL_SIZE (i));
- }
-
/* If virtual format is floating, print it that way, and in raw
hex. */
if (TYPE_CODE (register_type (current_gdbarch, i)) == TYPE_CODE_FLT)
{
int j;
- val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
+ val_print (register_type (current_gdbarch, i), buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (i); j++)
+ for (j = 0; j < register_size (current_gdbarch, i); j++)
{
int idx;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
idx = j;
else
- idx = DEPRECATED_REGISTER_RAW_SIZE (i) - 1 - j;
- fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ idx = register_size (current_gdbarch, i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]);
}
fprintf_filtered (file, ")");
}
else
{
/* Print the register in hex. */
- val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
+ val_print (register_type (current_gdbarch, i), buffer, 0, 0,
file, 'x', 1, 0, Val_pretty_default);
/* If not a vector register, print it also according to its
natural format. */
if (TYPE_VECTOR (register_type (current_gdbarch, i)) == 0)
{
fprintf_filtered (file, "\t");
- val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
+ val_print (register_type (current_gdbarch, i), buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
}
}
@@ -1798,9 +1782,6 @@ attach_command (char *args, int from_tty)
based on what modes we are starting it with. */
target_terminal_init ();
- /* Install inferior's terminal modes. */
- target_terminal_inferior ();
-
/* Set up execution context to know that we should return from
wait_for_inferior as soon as the target reports a stop. */
init_wait_for_inferior ();
@@ -1859,10 +1840,13 @@ attach_command (char *args, int from_tty)
*/
target_post_attach (PIDGET (inferior_ptid));
+ /* Install inferior's terminal modes. */
+ target_terminal_inferior ();
+
normal_stop ();
- if (attach_hook)
- attach_hook ();
+ if (deprecated_attach_hook)
+ deprecated_attach_hook ();
}
/*
@@ -1884,8 +1868,8 @@ detach_command (char *args, int from_tty)
#if defined(SOLIB_RESTART)
SOLIB_RESTART ();
#endif
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
/* Disconnect from the current target without resuming it (leaving it
@@ -1904,8 +1888,8 @@ disconnect_command (char *args, int from_tty)
#if defined(SOLIB_RESTART)
SOLIB_RESTART ();
#endif
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
/* Stop the execution of the target while running in async mode, in
@@ -1913,7 +1897,7 @@ disconnect_command (char *args, int from_tty)
void
interrupt_target_command (char *args, int from_tty)
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
{
dont_repeat (); /* Not for the faint of heart */
target_stop ();
@@ -1980,7 +1964,7 @@ Follow this command with any number of args, to be passed to the program.",
&setlist);
set_cmd_completer (c, filename_completer);
set_cmd_sfunc (c, notice_args_set);
- c = add_show_from_set (c, &showlist);
+ c = deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, notice_args_read);
c = add_cmd
@@ -2134,6 +2118,13 @@ use \"set args\" without arguments.");
add_com ("R", class_run, run_no_args_command,
"Start debugged program with no arguments.");
+ c = add_com ("start", class_run, start_command,
+ "\
+Run the debugged program until the beginning of the main procedure.\n\
+You may specify arguments to give to your program, just as with the\n\
+\"run\" command.");
+ set_cmd_completer (c, filename_completer);
+
add_com ("interrupt", class_run, interrupt_target_command,
"Interrupt the execution of the debugged program.");
diff --git a/gdb/inferior.h b/gdb/inferior.h
index ab5a25bfc86..4a8f62932ee 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -176,10 +176,6 @@ extern void generic_target_write_pc (CORE_ADDR, ptid_t);
extern CORE_ADDR read_sp (void);
-extern void deprecated_write_sp (CORE_ADDR);
-
-extern CORE_ADDR deprecated_read_fp (void);
-
extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf);
extern void unsigned_address_to_pointer (struct type *type, void *buf,
@@ -241,7 +237,7 @@ int ptrace_wait (ptid_t, int *);
extern void child_resume (ptid_t, int, enum target_signal);
#ifndef PTRACE_ARG3_TYPE
-#define PTRACE_ARG3_TYPE int /* Correct definition for most systems. */
+#define PTRACE_ARG3_TYPE PTRACE_TYPE_ARG3
#endif
extern int call_ptrace (int, int, PTRACE_ARG3_TYPE, int);
@@ -364,10 +360,6 @@ extern CORE_ADDR step_range_end; /* Exclusive */
extern struct frame_id step_frame_id;
-/* Our notion of the current stack pointer. */
-
-extern CORE_ADDR step_sp;
-
/* 1 means step over all subroutine calls.
-1 means step over calls to undebuggable functions. */
@@ -440,29 +432,6 @@ extern int attach_flag;
#define AT_ENTRY_POINT 4
#define AT_SYMBOL 5
-/* FIXME: cagney/2000-04-17: gdbarch should manage this. The default
- shouldn't be necessary. */
-
-#if !defined PUSH_DUMMY_FRAME
-#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
-#endif
-
-#if !defined STORE_STRUCT_RETURN
-#define STORE_STRUCT_RETURN(a1,a2) (internal_error (__FILE__, __LINE__, "STORE_STRUCT_RETURN"), 0)
-#endif
-
-
-/* Are we in a call dummy? */
-
-/* NOTE: cagney/2002-11-24 cagney/2004-03-22: Targets need to both
- switch to generic dummy frames. The generic version should be able
- to handle all cases since that code works by saving the address of
- the dummy's breakpoint (where ever it is). */
-
-extern int deprecated_pc_in_call_dummy_on_stack (CORE_ADDR pc,
- CORE_ADDR sp,
- CORE_ADDR frame_address);
-
/* If STARTUP_WITH_SHELL is set, GDB's "run"
will attempts to start up the debugee under a shell.
This is in order for argument-expansion to occur. E.g.,
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 35cd79968b9..eb5c89bda57 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -42,6 +42,10 @@
#include <sys/ioctl.h>
#endif
+#ifndef O_NOCTTY
+#define O_NOCTTY 0
+#endif
+
#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)
static void handle_sigio (int);
#endif
@@ -537,12 +541,7 @@ new_tty (void)
#endif
/* Now open the specified new terminal. */
-
-#ifdef USE_O_NOCTTY
tty = open (inferior_thisrun_terminal, O_RDWR | O_NOCTTY);
-#else
- tty = open (inferior_thisrun_terminal, O_RDWR);
-#endif
if (tty == -1)
{
print_sys_errmsg (inferior_thisrun_terminal, errno);
@@ -595,9 +594,9 @@ kill_command (char *arg, int from_tty)
if (deprecated_selected_frame == NULL)
fputs_filtered ("No selected stack frame.\n", gdb_stdout);
else
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
+ bfd_cache_close_all ();
}
/* Call set_sigint_trap when you need to pass a signal on to an attached
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index ef86f90cf2e..fb7736c2fc5 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -1,6 +1,6 @@
/* Low level Unix child interface to ptrace, for GDB when running under Unix.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000, 2001, 2002
+ 1998, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,96 +21,36 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "command.h"
#include "frame.h"
+#include "gdbcore.h"
#include "inferior.h"
-#include "target.h"
-#include "gdb_string.h"
#include "regcache.h"
+#include "target.h"
+#include "gdb_assert.h"
#include "gdb_wait.h"
-
-#include "command.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
+#include "gdb_string.h"
#include <sys/param.h>
#include "gdb_dirent.h"
#include <signal.h>
#include <sys/ioctl.h>
-#ifdef HAVE_PTRACE_H
-#include <ptrace.h>
-#else
-#ifdef HAVE_SYS_PTRACE_H
-#include <sys/ptrace.h>
-#endif
-#endif
-
-#if !defined (PT_READ_I)
-#define PT_READ_I 1 /* Read word from text space */
-#endif
-#if !defined (PT_READ_D)
-#define PT_READ_D 2 /* Read word from data space */
-#endif
-#if !defined (PT_READ_U)
-#define PT_READ_U 3 /* Read word from kernel user struct */
-#endif
-#if !defined (PT_WRITE_I)
-#define PT_WRITE_I 4 /* Write word to text space */
-#endif
-#if !defined (PT_WRITE_D)
-#define PT_WRITE_D 5 /* Write word to data space */
-#endif
-#if !defined (PT_WRITE_U)
-#define PT_WRITE_U 6 /* Write word to kernel user struct */
-#endif
-#if !defined (PT_CONTINUE)
-#define PT_CONTINUE 7 /* Continue after signal */
-#endif
-#if !defined (PT_STEP)
-#define PT_STEP 9 /* Set flag for single stepping */
-#endif
-#if !defined (PT_KILL)
-#define PT_KILL 8 /* Send child a SIGKILL signal */
-#endif
-
-#ifndef PT_ATTACH
-#define PT_ATTACH PTRACE_ATTACH
-#endif
-#ifndef PT_DETACH
-#define PT_DETACH PTRACE_DETACH
-#endif
+#include "gdb_ptrace.h"
-#include "gdbcore.h"
-#ifndef NO_SYS_FILE
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#if 0
-/* Don't think this is used anymore. On the sequent (not sure whether it's
- dynix or ptx or both), it is included unconditionally by sys/user.h and
- not protected against multiple inclusion. */
-#include "gdb_stat.h"
-#endif
#if !defined (FETCH_INFERIOR_REGISTERS)
#include <sys/user.h> /* Probably need to poke the user structure */
-#if defined (KERNEL_U_ADDR_BSD)
-#include <a.out.h> /* For struct nlist */
-#endif /* KERNEL_U_ADDR_BSD. */
#endif /* !FETCH_INFERIOR_REGISTERS */
#if !defined (CHILD_XFER_MEMORY)
static void udot_info (char *, int);
#endif
-#if !defined (FETCH_INFERIOR_REGISTERS)
-static void fetch_register (int);
-static void store_register (int);
-#endif
-
-void _initialize_kernel_u_addr (void);
void _initialize_infptrace (void);
@@ -133,7 +73,7 @@ call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
if (request == PT_SETTRC)
{
errno = 0;
-#if !defined (FIVE_ARG_PTRACE)
+#ifndef PTRACE_TYPE_ARG5
pt_status = ptrace (PT_SETTRC, pid, addr, data);
#else
/* Deal with HPUX 8.0 braindamage. We never use the
@@ -170,7 +110,7 @@ call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
saved_errno = errno;
errno = 0;
#endif
-#if !defined (FIVE_ARG_PTRACE)
+#ifndef PTRACE_TYPE_ARG5
pt_status = ptrace (request, pid, addr, data);
#else
/* Deal with HPUX 8.0 braindamage. We never use the
@@ -189,7 +129,7 @@ call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
}
-#if defined (DEBUG_PTRACE) || defined (FIVE_ARG_PTRACE)
+#if defined (DEBUG_PTRACE) || defined (PTRACE_TYPE_ARG5)
/* For the rest of the file, use an extra level of indirection */
/* This lets us breakpoint usefully on call_ptrace. */
#define ptrace call_ptrace
@@ -226,7 +166,7 @@ kill_inferior (void)
The kill call causes problems under hpux10, so it's been removed;
if this causes problems we'll deal with them as they arise. */
- ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
+ ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3) 0, 0);
ptrace_wait (null_ptid, &status);
target_mourn_inferior ();
}
@@ -241,245 +181,199 @@ kill_inferior (void)
void
child_resume (ptid_t ptid, int step, enum target_signal signal)
{
+ int request = PT_CONTINUE;
int pid = PIDGET (ptid);
- errno = 0;
-
if (pid == -1)
/* Resume all threads. */
/* I think this only gets used in the non-threaded case, where "resume
all threads" and "resume inferior_ptid" are the same. */
pid = PIDGET (inferior_ptid);
- /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
- it was. (If GDB wanted it to start some other way, we have already
- written a new PC value to the child.)
-
- If this system does not support PT_STEP, a higher level function will
- have called single_step() to transmute the step request into a
- continue request (by setting breakpoints on all possible successor
- instructions), so we don't have to worry about that here. */
-
if (step)
{
- if (SOFTWARE_SINGLE_STEP_P ())
- internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Make sure this doesn't happen. */
- else
- ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1,
- target_signal_to_host (signal));
+ /* If this system does not support PT_STEP, a higher level
+ function will have called single_step() to transmute the step
+ request into a continue request (by setting breakpoints on
+ all possible successor instructions), so we don't have to
+ worry about that here. */
+
+ gdb_assert (!SOFTWARE_SINGLE_STEP_P ());
+ request = PT_STEP;
}
- else
- ptrace (PT_CONTINUE, pid, (PTRACE_ARG3_TYPE) 1,
- target_signal_to_host (signal));
- if (errno)
- {
- perror_with_name ("ptrace");
- }
+ /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from
+ where it was. If GDB wanted it to start some other way, we have
+ already written a new PC value to the child. */
+
+ errno = 0;
+ ptrace (request, pid, (PTRACE_TYPE_ARG3)1, target_signal_to_host (signal));
+ if (errno != 0)
+ perror_with_name ("ptrace");
}
#endif /* CHILD_RESUME */
-#ifdef ATTACH_DETACH
/* Start debugging the process whose number is PID. */
+
int
attach (int pid)
{
+#ifdef PT_ATTACH
errno = 0;
- ptrace (PT_ATTACH, pid, (PTRACE_ARG3_TYPE) 0, 0);
- if (errno)
+ ptrace (PT_ATTACH, pid, (PTRACE_TYPE_ARG3) 0, 0);
+ if (errno != 0)
perror_with_name ("ptrace");
attach_flag = 1;
return pid;
+#else
+ error ("This system does not support attaching to a process");
+#endif
}
-/* Stop debugging the process whose number is PID
- and continue it with signal number SIGNAL.
- SIGNAL = 0 means just continue it. */
+/* Stop debugging the process whose number is PID and continue it with
+ signal number SIGNAL. SIGNAL = 0 means just continue it. */
void
detach (int signal)
{
+#ifdef PT_DETACH
+ int pid = PIDGET (inferior_ptid);
+
errno = 0;
- ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
- signal);
- if (errno)
- print_sys_errmsg ("ptrace", errno);
+ ptrace (PT_DETACH, pid, (PTRACE_TYPE_ARG3) 1, signal);
+ if (errno != 0)
+ perror_with_name ("ptrace");
attach_flag = 0;
+#else
+ error ("This system does not support detaching from a process");
+#endif
}
-#endif /* ATTACH_DETACH */
-/* Default the type of the ptrace transfer to int. */
-#ifndef PTRACE_XFER_TYPE
-#define PTRACE_XFER_TYPE int
-#endif
-/* KERNEL_U_ADDR is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#if defined (KERNEL_U_ADDR_BSD) && !defined (FETCH_INFERIOR_REGISTERS)
-/* Get kernel_u_addr using BSD-style nlist(). */
-CORE_ADDR kernel_u_addr;
-#endif /* KERNEL_U_ADDR_BSD. */
-
-void
-_initialize_kernel_u_addr (void)
-{
-#if defined (KERNEL_U_ADDR_BSD) && !defined (FETCH_INFERIOR_REGISTERS)
- struct nlist names[2];
+#ifndef FETCH_INFERIOR_REGISTERS
- names[0].n_un.n_name = "_u";
- names[1].n_un.n_name = NULL;
- if (nlist ("/vmunix", names) == 0)
- kernel_u_addr = names[0].n_value;
- else
- internal_error (__FILE__, __LINE__,
- "Unable to get kernel u area address.");
-#endif /* KERNEL_U_ADDR_BSD. */
-}
-
-#if !defined (FETCH_INFERIOR_REGISTERS)
+/* U_REGS_OFFSET is the offset of the registers within the u area. */
+#ifndef U_REGS_OFFSET
-#if !defined (offsetof)
+#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
#endif
-/* U_REGS_OFFSET is the offset of the registers within the u area. */
-#if !defined (U_REGS_OFFSET)
#define U_REGS_OFFSET \
ptrace (PT_READ_U, PIDGET (inferior_ptid), \
- (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
+ (PTRACE_TYPE_ARG3) (offsetof (struct user, u_ar0)), 0) \
- KERNEL_U_ADDR
#endif
-/* Fetch one register. */
+/* Fetch register REGNUM from the inferior. */
static void
-fetch_register (int regno)
+fetch_register (int regnum)
{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- int i;
- unsigned int offset; /* Offset of registers within the u area. */
- char buf[MAX_REGISTER_SIZE];
- int tid;
+ CORE_ADDR addr;
+ size_t size;
+ PTRACE_TYPE_RET *buf;
+ int tid, i;
- if (CANNOT_FETCH_REGISTER (regno))
+ if (CANNOT_FETCH_REGISTER (regnum))
{
- memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regnum, NULL);
return;
}
- /* Overload thread id onto process id */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
+ /* GNU/Linux LWP ID's are process ID's. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
- offset = U_REGS_OFFSET;
+ /* This isn't really an address. But ptrace thinks of it as one. */
+ addr = register_addr (regnum, U_REGS_OFFSET);
+ size = register_size (current_gdbarch, regnum);
+
+ gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
+ buf = alloca (size);
- regaddr = register_addr (regno, offset);
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ /* Read the register contents from the inferior a chuck at the time. */
+ for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
{
errno = 0;
- *(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (PTRACE_XFER_TYPE);
+ buf[i] = ptrace (PT_READ_U, tid, (PTRACE_TYPE_ARG3) addr, 0);
if (errno != 0)
- {
- sprintf (mess, "reading register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
+ error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regnum),
+ regnum, safe_strerror (errno));
+
+ addr += sizeof (PTRACE_TYPE_RET);
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regnum, buf);
}
-
-/* Fetch register values from the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
void
-fetch_inferior_registers (int regno)
+fetch_inferior_registers (int regnum)
{
- if (regno >= 0)
- {
- fetch_register (regno);
- }
+ if (regnum == -1)
+ for (regnum = 0; regnum < NUM_REGS; regnum++)
+ fetch_register (regnum);
else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- fetch_register (regno);
- }
- }
+ fetch_register (regnum);
}
-/* Store one register. */
+/* Store register REGNUM into the inferior. */
static void
-store_register (int regno)
+store_register (int regnum)
{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- int i;
- unsigned int offset; /* Offset of registers within the u area. */
- int tid;
- char buf[MAX_REGISTER_SIZE];
+ CORE_ADDR addr;
+ size_t size;
+ PTRACE_TYPE_RET *buf;
+ int tid, i;
- if (CANNOT_STORE_REGISTER (regno))
- {
- return;
- }
-
- /* Overload thread id onto process id */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
+ if (CANNOT_STORE_REGISTER (regnum))
+ return;
- offset = U_REGS_OFFSET;
+ /* GNU/Linux LWP ID's are process ID's. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
- regaddr = register_addr (regno, offset);
+ /* This isn't really an address. But ptrace thinks of it as one. */
+ addr = register_addr (regnum, U_REGS_OFFSET);
+ size = register_size (current_gdbarch, regnum);
- /* Put the contents of regno into a local buffer */
- regcache_collect (regno, buf);
+ gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
+ buf = alloca (size);
- /* Store the local buffer into the inferior a chunk at the time. */
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ /* Write the register contents into the inferior a chunk at the time. */
+ regcache_raw_collect (current_regcache, regnum, buf);
+ for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
{
errno = 0;
- ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
- *(PTRACE_XFER_TYPE *) (buf + i));
- regaddr += sizeof (PTRACE_XFER_TYPE);
+ ptrace (PT_WRITE_U, tid, (PTRACE_TYPE_ARG3) addr, buf[i]);
if (errno != 0)
- {
- sprintf (mess, "writing register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
+ error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regnum),
+ regnum, safe_strerror (errno));
+
+ addr += sizeof (PTRACE_TYPE_RET);
}
}
-/* Store our register values back into the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers (including the floating point registers). */
void
-store_inferior_registers (int regno)
+store_inferior_registers (int regnum)
{
- if (regno >= 0)
- {
- store_register (regno);
- }
+ if (regnum == -1)
+ for (regnum = 0; regnum < NUM_REGS; regnum++)
+ store_register (regnum);
else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- store_register (regno);
- }
- }
+ store_register (regnum);
}
-#endif /* !defined (FETCH_INFERIOR_REGISTERS). */
+
+#endif /* not FETCH_INFERIOR_REGISTERS. */
/* Set an upper limit on alloca. */
@@ -508,12 +402,12 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
{
int i;
/* Round starting address down to longword boundary. */
- CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE);
+ CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_TYPE_RET);
/* Round ending address up; get number of longwords that makes. */
- int count = ((((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1)
- / sizeof (PTRACE_XFER_TYPE));
- int alloc = count * sizeof (PTRACE_XFER_TYPE);
- PTRACE_XFER_TYPE *buffer;
+ int count = ((((memaddr + len) - addr) + sizeof (PTRACE_TYPE_RET) - 1)
+ / sizeof (PTRACE_TYPE_RET));
+ int alloc = count * sizeof (PTRACE_TYPE_RET);
+ PTRACE_TYPE_RET *buffer;
struct cleanup *old_chain = NULL;
#ifdef PT_IO
@@ -550,11 +444,11 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
/* Allocate buffer of that many longwords. */
if (len < GDB_MAX_ALLOCA)
{
- buffer = (PTRACE_XFER_TYPE *) alloca (alloc);
+ buffer = (PTRACE_TYPE_RET *) alloca (alloc);
}
else
{
- buffer = (PTRACE_XFER_TYPE *) xmalloc (alloc);
+ buffer = (PTRACE_TYPE_RET *) xmalloc (alloc);
old_chain = make_cleanup (xfree, buffer);
}
@@ -562,54 +456,51 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
{
/* Fill start and end extra bytes of buffer with existing memory
data. */
- if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
+ if (addr != memaddr || len < (int) sizeof (PTRACE_TYPE_RET))
{
/* Need part of initial word -- fetch it. */
buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, 0);
+ (PTRACE_TYPE_ARG3) addr, 0);
}
if (count > 1) /* FIXME, avoid if even boundary. */
{
buffer[count - 1] =
ptrace (PT_READ_I, PIDGET (inferior_ptid),
- ((PTRACE_ARG3_TYPE)
- (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))), 0);
+ ((PTRACE_TYPE_ARG3)
+ (addr + (count - 1) * sizeof (PTRACE_TYPE_RET))), 0);
}
/* Copy data to be written over corresponding part of buffer. */
- memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
+ memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_TYPE_RET) - 1)),
myaddr, len);
/* Write the entire buffer. */
- for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
{
errno = 0;
ptrace (PT_WRITE_D, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, buffer[i]);
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
if (errno)
{
/* Using the appropriate one (I or D) is necessary for
Gould NP1, at least. */
errno = 0;
ptrace (PT_WRITE_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, buffer[i]);
+ (PTRACE_TYPE_ARG3) addr, buffer[i]);
}
if (errno)
return 0;
}
-#ifdef CLEAR_INSN_CACHE
- CLEAR_INSN_CACHE ();
-#endif
}
else
{
/* Read all the longwords. */
- for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
{
errno = 0;
buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, 0);
+ (PTRACE_TYPE_ARG3) addr, 0);
if (errno)
return 0;
QUIT;
@@ -617,7 +508,7 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
/* Copy appropriate bytes out of the buffer. */
memcpy (myaddr,
- (char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
+ (char *) buffer + (memaddr & (sizeof (PTRACE_TYPE_RET) - 1)),
len);
}
@@ -661,7 +552,7 @@ udot_info (char *dummy1, int dummy2)
}
printf_filtered ("%s:", paddr (udot_off));
}
- udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) udot_off, 0);
+ udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_TYPE_ARG3) udot_off, 0);
if (errno != 0)
{
sprintf (mess, "\nreading user struct at offset 0x%s",
diff --git a/gdb/infrun.c b/gdb/infrun.c
index b1d03e3ca4b..cc302c2948b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -60,8 +60,6 @@ static void resume_cleanups (void *);
static int hook_stop_stub (void *);
-static void delete_breakpoint_current_contents (void *);
-
static int restore_selected_frame (void *);
static void build_infrun (void);
@@ -163,14 +161,6 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) 0
#endif
-/* On MIPS16, a function that returns a floating point value may call
- a library helper function to copy the return value to a floating point
- register. The IGNORE_HELPER_CALL macro returns non-zero if we
- should ignore (i.e. step over) this function call. */
-#ifndef IGNORE_HELPER_CALL
-#define IGNORE_HELPER_CALL(pc) 0
-#endif
-
/* On some systems, the PC may be left pointing at an instruction that won't
actually be executed. This is usually indicated by a bit in the PSW. If
we find ourselves in such a state, then we step the target beyond the
@@ -264,14 +254,6 @@ static int trap_expected;
static int stop_on_solib_events;
#endif
-#ifdef HP_OS_BUG
-/* Nonzero if the next time we try to continue the inferior, it will
- step one instruction and generate a spurious trace trap.
- This is used to compensate for a bug in HP-UX. */
-
-static int trap_expected_after_continue;
-#endif
-
/* Nonzero means expecting a trace trap
and should stop the inferior and return silently when it happens. */
@@ -305,7 +287,6 @@ static int breakpoints_failed;
static int stop_print_frame;
static struct breakpoint *step_resume_breakpoint = NULL;
-static struct breakpoint *through_sigtramp_breakpoint = NULL;
/* On some platforms (e.g., HP-UX), hardware watchpoints have bad
interactions with an inferior that is running a kernel function
@@ -316,8 +297,8 @@ static struct breakpoint *through_sigtramp_breakpoint = NULL;
static int number_of_threads_in_syscalls;
/* This is a cached copy of the pid/waitstatus of the last event
- returned by target_wait()/target_wait_hook(). This information is
- returned by get_last_target_status(). */
+ returned by target_wait()/deprecated_target_wait_hook(). This
+ information is returned by get_last_target_status(). */
static ptid_t target_last_wait_ptid;
static struct target_waitstatus target_last_waitstatus;
@@ -423,9 +404,6 @@ follow_exec (int pid, char *execd_pathname)
step_range_start = 0;
step_range_end = 0;
- /* If there was one, it's gone now. */
- through_sigtramp_breakpoint = NULL;
-
/* What is this a.out's name? */
printf_unfiltered ("Executing new program: %s\n", execd_pathname);
@@ -506,14 +484,15 @@ static const char *scheduler_enums[] = {
static void
set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
{
- /* NOTE: cagney/2002-03-17: The add_show_from_set() function clones
- the set command passed as a parameter. The clone operation will
- include (BUG?) any ``set'' command callback, if present.
- Commands like ``info set'' call all the ``show'' command
- callbacks. Unfortunately, for ``show'' commands cloned from
- ``set'', this includes callbacks belonging to ``set'' commands.
- Making this worse, this only occures if add_show_from_set() is
- called after add_cmd_sfunc() (BUG?). */
+ /* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
+ function clones the set command passed as a parameter. The clone
+ operation will include (BUG?) any ``set'' command callback, if
+ present. Commands like ``info set'' call all the ``show''
+ command callbacks. Unfortunately, for ``show'' commands cloned
+ from ``set'', this includes callbacks belonging to ``set''
+ commands. Making this worse, this only occures if
+ deprecated_add_show_from_set() is called after add_cmd_sfunc()
+ (BUG?). */
if (cmd_type (c) == set_cmd)
if (!target_can_lock_scheduler)
{
@@ -572,11 +551,6 @@ resume (int step, enum target_signal sig)
singlestep_ptid = inferior_ptid;
}
- /* Handle any optimized stores to the inferior NOW... */
-#ifdef DO_DEFERRED_STORES
- DO_DEFERRED_STORES;
-#endif
-
/* If there were any forks/vforks/execs that were caught and are
now to be followed, then do so. */
switch (pending_follow.kind)
@@ -606,9 +580,9 @@ resume (int step, enum target_signal sig)
resume_ptid = RESUME_ALL; /* Default */
- if ((step || singlestep_breakpoints_inserted_p) &&
- (stepping_past_singlestep_breakpoint
- || (!breakpoints_inserted && breakpoint_here_p (read_pc ()))))
+ if ((step || singlestep_breakpoints_inserted_p)
+ && (stepping_past_singlestep_breakpoint
+ || (!breakpoints_inserted && breakpoint_here_p (read_pc ()))))
{
/* Stepping past a breakpoint without inserting breakpoints.
Make sure only the current thread gets to step, so that
@@ -618,9 +592,9 @@ resume (int step, enum target_signal sig)
resume_ptid = inferior_ptid;
}
- if ((scheduler_mode == schedlock_on) ||
- (scheduler_mode == schedlock_step &&
- (step || singlestep_breakpoints_inserted_p)))
+ if ((scheduler_mode == schedlock_on)
+ || (scheduler_mode == schedlock_step
+ && (step || singlestep_breakpoints_inserted_p)))
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -675,8 +649,8 @@ prepare_to_proceed (void)
/* Make sure we were stopped either at a breakpoint, or because
of a Ctrl-C. */
if (wait_status.kind != TARGET_WAITKIND_STOPPED
- || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
- wait_status.value.sig != TARGET_SIGNAL_INT))
+ || (wait_status.value.sig != TARGET_SIGNAL_TRAP
+ && wait_status.value.sig != TARGET_SIGNAL_INT))
{
return 0;
}
@@ -700,15 +674,15 @@ prepare_to_proceed (void)
select_frame (get_current_frame ());
}
- /* We return 1 to indicate that there is a breakpoint here,
- so we need to step over it before continuing to avoid
- hitting it straight away. */
- if (breakpoint_here_p (wait_pc))
- return 1;
+ /* We return 1 to indicate that there is a breakpoint here,
+ so we need to step over it before continuing to avoid
+ hitting it straight away. */
+ if (breakpoint_here_p (wait_pc))
+ return 1;
}
return 0;
-
+
}
/* Record the pc of the program the last time it stopped. This is
@@ -779,18 +753,6 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
if (prepare_to_proceed () && breakpoint_here_p (read_pc ()))
oneproc = 1;
-#ifdef HP_OS_BUG
- if (trap_expected_after_continue)
- {
- /* If (step == 0), a trap will be automatically generated after
- the first instruction is executed. Force step one
- instruction to clear this condition. This should not occur
- if step is nonzero, but it is harmless in that case. */
- oneproc = 1;
- trap_expected_after_continue = 0;
- }
-#endif /* HP_OS_BUG */
-
if (oneproc)
/* We will get a trace trap after one instruction.
Continue it automatically and insert breakpoints then. */
@@ -799,7 +761,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
{
insert_breakpoints ();
/* If we get here there was no call to error() in
- insert breakpoints -- so they were inserted. */
+ insert breakpoints -- so they were inserted. */
breakpoints_inserted = 1;
}
@@ -837,7 +799,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
cannot be read unless the inferior is stopped. At that point, we
are not guaranteed the inferior is stopped and so the read_pc ()
call can fail. Setting the prev_pc value here ensures the value is
- updated correctly when the inferior is stopped. */
+ updated correctly when the inferior is stopped. */
prev_pc = read_pc ();
/* Resume inferior. */
@@ -847,7 +809,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
and in any case decode why it stopped, and act accordingly. */
/* Do this only if we are not using the event loop, or if the target
does not support asynchronous execution. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
{
wait_for_inferior ();
normal_stop ();
@@ -891,9 +853,6 @@ init_wait_for_inferior (void)
/* These are meaningless until the first time through wait_for_inferior. */
prev_pc = 0;
-#ifdef HP_OS_BUG
- trap_expected_after_continue = 0;
-#endif
breakpoints_inserted = 0;
breakpoint_init_inferior (inf_starting);
@@ -910,17 +869,6 @@ init_wait_for_inferior (void)
stepping_past_singlestep_breakpoint = 0;
}
-
-static void
-delete_breakpoint_current_contents (void *arg)
-{
- struct breakpoint **breakpointp = (struct breakpoint **) arg;
- if (*breakpointp != NULL)
- {
- delete_breakpoint (*breakpointp);
- *breakpointp = NULL;
- }
-}
/* This enum encodes possible reasons for doing a target_wait, so that
wfi can call target_wait in one place. (Ultimately the call will be
@@ -966,17 +914,15 @@ struct execution_control_state
CORE_ADDR stop_func_end;
char *stop_func_name;
struct symtab_and_line sal;
- int remove_breakpoints_on_following_step;
int current_line;
struct symtab *current_symtab;
int handling_longjmp; /* FIXME */
ptid_t ptid;
ptid_t saved_inferior_ptid;
- int update_step_sp;
+ int step_after_step_resume_breakpoint;
int stepping_through_solib_after_catch;
bpstat stepping_through_solib_catchpoints;
int enable_hw_watchpoints_after_wait;
- int stepping_through_sigtramp;
int new_thread_event;
struct target_waitstatus tmpstatus;
enum infwait_states infwait_state;
@@ -986,12 +932,12 @@ struct execution_control_state
void init_execution_control_state (struct execution_control_state *ecs);
-static void handle_step_into_function (struct execution_control_state *ecs);
void handle_inferior_event (struct execution_control_state *ecs);
-static void check_sigtramp2 (struct execution_control_state *ecs);
static void step_into_function (struct execution_control_state *ecs);
-static void step_over_function (struct execution_control_state *ecs);
+static void insert_step_resume_breakpoint (struct frame_info *step_frame,
+ struct execution_control_state
+ *ecs);
static void stop_stepping (struct execution_control_state *ecs);
static void prepare_to_wait (struct execution_control_state *ecs);
static void keep_going (struct execution_control_state *ecs);
@@ -1013,8 +959,6 @@ wait_for_inferior (void)
old_cleanups = make_cleanup (delete_step_resume_breakpoint,
&step_resume_breakpoint);
- make_cleanup (delete_breakpoint_current_contents,
- &through_sigtramp_breakpoint);
/* wfi still stays in a loop, so it's OK just to take the address of
a local to get the ecs pointer. */
@@ -1038,8 +982,8 @@ wait_for_inferior (void)
while (1)
{
- if (target_wait_hook)
- ecs->ptid = target_wait_hook (ecs->waiton_ptid, ecs->wp);
+ if (deprecated_target_wait_hook)
+ ecs->ptid = deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp);
else
ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp);
@@ -1075,8 +1019,6 @@ fetch_inferior_event (void *client_data)
{
old_cleanups = make_exec_cleanup (delete_step_resume_breakpoint,
&step_resume_breakpoint);
- make_exec_cleanup (delete_breakpoint_current_contents,
- &through_sigtramp_breakpoint);
/* Fill in with reasonable starting values. */
init_execution_control_state (async_ecs);
@@ -1095,9 +1037,9 @@ fetch_inferior_event (void *client_data)
registers_changed ();
}
- if (target_wait_hook)
+ if (deprecated_target_wait_hook)
async_ecs->ptid =
- target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
+ deprecated_target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
else
async_ecs->ptid = target_wait (async_ecs->waiton_ptid, async_ecs->wp);
@@ -1126,13 +1068,11 @@ init_execution_control_state (struct execution_control_state *ecs)
{
/* ecs->another_trap? */
ecs->random_signal = 0;
- ecs->remove_breakpoints_on_following_step = 0;
+ ecs->step_after_step_resume_breakpoint = 0;
ecs->handling_longjmp = 0; /* FIXME */
- ecs->update_step_sp = 0;
ecs->stepping_through_solib_after_catch = 0;
ecs->stepping_through_solib_catchpoints = NULL;
ecs->enable_hw_watchpoints_after_wait = 0;
- ecs->stepping_through_sigtramp = 0;
ecs->sal = find_pc_line (prev_pc, 0);
ecs->current_line = ecs->sal.line;
ecs->current_symtab = ecs->sal.symtab;
@@ -1154,9 +1094,9 @@ check_for_old_step_resume_breakpoint (void)
}
/* Return the cached copy of the last pid/waitstatus returned by
- target_wait()/target_wait_hook(). The data is actually cached by
- handle_inferior_event(), which gets called immediately after
- target_wait()/target_wait_hook(). */
+ target_wait()/deprecated_target_wait_hook(). The data is actually
+ cached by handle_inferior_event(), which gets called immediately
+ after target_wait()/deprecated_target_wait_hook(). */
void
get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status)
@@ -1181,160 +1121,30 @@ context_switch (struct execution_control_state *ecs)
/* Save infrun state for the old thread. */
save_infrun_state (inferior_ptid, prev_pc,
trap_expected, step_resume_breakpoint,
- through_sigtramp_breakpoint, step_range_start,
+ step_range_start,
step_range_end, &step_frame_id,
ecs->handling_longjmp, ecs->another_trap,
ecs->stepping_through_solib_after_catch,
ecs->stepping_through_solib_catchpoints,
- ecs->stepping_through_sigtramp,
- ecs->current_line, ecs->current_symtab, step_sp);
+ ecs->current_line, ecs->current_symtab);
/* Load infrun state for the new thread. */
load_infrun_state (ecs->ptid, &prev_pc,
&trap_expected, &step_resume_breakpoint,
- &through_sigtramp_breakpoint, &step_range_start,
+ &step_range_start,
&step_range_end, &step_frame_id,
&ecs->handling_longjmp, &ecs->another_trap,
&ecs->stepping_through_solib_after_catch,
&ecs->stepping_through_solib_catchpoints,
- &ecs->stepping_through_sigtramp,
- &ecs->current_line, &ecs->current_symtab, &step_sp);
+ &ecs->current_line, &ecs->current_symtab);
}
inferior_ptid = ecs->ptid;
}
-/* Wrapper for DEPRECATED_PC_IN_SIGTRAMP that takes care of the need
- to find the function's name.
-
- In a classic example of "left hand VS right hand", "infrun.c" was
- trying to improve GDB's performance by caching the result of calls
- to calls to find_pc_partial_funtion, while at the same time
- find_pc_partial_function was also trying to ramp up performance by
- caching its most recent return value. The below makes the the
- function find_pc_partial_function solely responsibile for
- performance issues (the local cache that relied on a global
- variable - arrrggg - deleted).
-
- Using the testsuite and gcov, it was found that dropping the local
- "infrun.c" cache and instead relying on find_pc_partial_function
- increased the number of calls to 12000 (from 10000), but the number
- of times find_pc_partial_function's cache missed (this is what
- matters) was only increased by only 4 (to 3569). (A quick back of
- envelope caculation suggests that the extra 2000 function calls
- @1000 extra instructions per call make the 1 MIP VAX testsuite run
- take two extra seconds, oops :-)
-
- Long term, this function can be eliminated, replaced by the code:
- get_frame_type(current_frame()) == SIGTRAMP_FRAME (for new
- architectures this is very cheap). */
-
-static int
-pc_in_sigtramp (CORE_ADDR pc)
-{
- char *name;
- find_pc_partial_function (pc, &name, NULL, NULL);
- return DEPRECATED_PC_IN_SIGTRAMP (pc, name);
-}
-
-/* Handle the inferior event in the cases when we just stepped
- into a function. */
-
-static void
-handle_step_into_function (struct execution_control_state *ecs)
-{
- CORE_ADDR real_stop_pc;
-
- if ((step_over_calls == STEP_OVER_NONE)
- || ((step_range_end == 1)
- && in_prologue (prev_pc, ecs->stop_func_start)))
- {
- /* I presume that step_over_calls is only 0 when we're
- supposed to be stepping at the assembly language level
- ("stepi"). Just stop. */
- /* Also, maybe we just did a "nexti" inside a prolog,
- so we thought it was a subroutine call but it was not.
- Stop as well. FENN */
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
- return;
- }
-
- if (step_over_calls == STEP_OVER_ALL || IGNORE_HELPER_CALL (stop_pc))
- {
- /* We're doing a "next". */
-
- if (legacy_frame_p (current_gdbarch)
- && pc_in_sigtramp (stop_pc)
- && frame_id_inner (step_frame_id,
- frame_id_build (read_sp (), 0)))
- /* NOTE: cagney/2004-03-15: This is only needed for legacy
- systems. On non-legacy systems step_over_function doesn't
- use STEP_FRAME_ID and hence the below update "hack" isn't
- needed. */
- /* We stepped out of a signal handler, and into its calling
- trampoline. This is misdetected as a subroutine call, but
- stepping over the signal trampoline isn't such a bad idea.
- In order to do that, we have to ignore the value in
- step_frame_id, since that doesn't represent the frame
- that'll reach when we return from the signal trampoline.
- Otherwise we'll probably continue to the end of the
- program. */
- step_frame_id = null_frame_id;
-
- step_over_function (ecs);
- keep_going (ecs);
- return;
- }
-
- /* If we are in a function call trampoline (a stub between
- the calling routine and the real function), locate the real
- function. That's what tells us (a) whether we want to step
- into it at all, and (b) what prologue we want to run to
- the end of, if we do step into it. */
- real_stop_pc = skip_language_trampoline (stop_pc);
- if (real_stop_pc == 0)
- real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
- if (real_stop_pc != 0)
- ecs->stop_func_start = real_stop_pc;
-
- /* If we have line number information for the function we
- are thinking of stepping into, step into it.
-
- If there are several symtabs at that PC (e.g. with include
- files), just want to know whether *any* of them have line
- numbers. find_pc_line handles this. */
- {
- struct symtab_and_line tmp_sal;
-
- tmp_sal = find_pc_line (ecs->stop_func_start, 0);
- if (tmp_sal.line != 0)
- {
- step_into_function (ecs);
- return;
- }
- }
-
- /* If we have no line number and the step-stop-if-no-debug
- is set, we stop the step so that the user has a chance to
- switch in assembly mode. */
- if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
- {
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
- return;
- }
-
- step_over_function (ecs);
- keep_going (ecs);
- return;
-}
-
static void
adjust_pc_after_break (struct execution_control_state *ecs)
{
- CORE_ADDR stop_pc;
+ CORE_ADDR breakpoint_pc;
/* If this target does not decrement the PC after breakpoints, then
we have nothing to do. */
@@ -1348,14 +1158,14 @@ adjust_pc_after_break (struct execution_control_state *ecs)
affected by DECR_PC_AFTER_BREAK. Other waitkinds which are implemented
by software breakpoints should be handled through the normal breakpoint
layer.
-
+
NOTE drow/2004-01-31: On some targets, breakpoints may generate
different signals (SIGILL or SIGEMT for instance), but it is less
clear where the PC is pointing afterwards. It may not match
DECR_PC_AFTER_BREAK. I don't know any specific target that generates
these signals at breakpoints (the code has been in GDB since at least
1992) so I can not guess how to handle them here.
-
+
In earlier versions of GDB, a target with HAVE_NONSTEPPABLE_WATCHPOINTS
would have the PC after hitting a watchpoint affected by
DECR_PC_AFTER_BREAK. I haven't found any target with both of these set
@@ -1368,46 +1178,61 @@ adjust_pc_after_break (struct execution_control_state *ecs)
if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
return;
- /* Find the location where (if we've hit a breakpoint) the breakpoint would
- be. */
- stop_pc = read_pc_pid (ecs->ptid) - DECR_PC_AFTER_BREAK;
-
- /* If we're software-single-stepping, then assume this is a breakpoint.
- NOTE drow/2004-01-17: This doesn't check that the PC matches, or that
- we're even in the right thread. The software-single-step code needs
- some modernization.
-
- If we're not software-single-stepping, then we first check that there
- is an enabled software breakpoint at this address. If there is, and
- we weren't using hardware-single-step, then we've hit the breakpoint.
-
- If we were using hardware-single-step, we check prev_pc; if we just
- stepped over an inserted software breakpoint, then we should decrement
- the PC and eventually report hitting the breakpoint. The prev_pc check
- prevents us from decrementing the PC if we just stepped over a jump
- instruction and landed on the instruction after a breakpoint.
-
- The last bit checks that we didn't hit a breakpoint in a signal handler
- without an intervening stop in sigtramp, which is detected by a new
- stack pointer value below any usual function calling stack adjustments.
-
- NOTE drow/2004-01-17: I'm not sure that this is necessary. The check
- predates checking for software single step at the same time. Also,
- if we've moved into a signal handler we should have seen the
- signal. */
-
- if ((SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
- || (software_breakpoint_inserted_here_p (stop_pc)
- && !(currently_stepping (ecs)
- && prev_pc != stop_pc
- && !(step_range_end && INNER_THAN (read_sp (), (step_sp - 16))))))
- write_pc_pid (stop_pc, ecs->ptid);
+ /* Find the location where (if we've hit a breakpoint) the
+ breakpoint would be. */
+ breakpoint_pc = read_pc_pid (ecs->ptid) - DECR_PC_AFTER_BREAK;
+
+ if (SOFTWARE_SINGLE_STEP_P ())
+ {
+ /* When using software single-step, a SIGTRAP can only indicate
+ an inserted breakpoint. This actually makes things
+ easier. */
+ if (singlestep_breakpoints_inserted_p)
+ /* When software single stepping, the instruction at [prev_pc]
+ is never a breakpoint, but the instruction following
+ [prev_pc] (in program execution order) always is. Assume
+ that following instruction was reached and hence a software
+ breakpoint was hit. */
+ write_pc_pid (breakpoint_pc, ecs->ptid);
+ else if (software_breakpoint_inserted_here_p (breakpoint_pc))
+ /* The inferior was free running (i.e., no single-step
+ breakpoints inserted) and it hit a software breakpoint. */
+ write_pc_pid (breakpoint_pc, ecs->ptid);
+ }
+ else
+ {
+ /* When using hardware single-step, a SIGTRAP is reported for
+ both a completed single-step and a software breakpoint. Need
+ to differentiate between the two as the latter needs
+ adjusting but the former does not. */
+ if (currently_stepping (ecs))
+ {
+ if (prev_pc == breakpoint_pc
+ && software_breakpoint_inserted_here_p (breakpoint_pc))
+ /* Hardware single-stepped a software breakpoint (as
+ occures when the inferior is resumed with PC pointing
+ at not-yet-hit software breakpoint). Since the
+ breakpoint really is executed, the inferior needs to be
+ backed up to the breakpoint address. */
+ write_pc_pid (breakpoint_pc, ecs->ptid);
+ }
+ else
+ {
+ if (software_breakpoint_inserted_here_p (breakpoint_pc))
+ /* The inferior was free running (i.e., no hardware
+ single-step and no possibility of a false SIGTRAP) and
+ hit a software breakpoint. */
+ write_pc_pid (breakpoint_pc, ecs->ptid);
+ }
+ }
}
/* Given an execution control state that has been freshly filled in
by an event from the inferior, figure out what it means and take
appropriate action. */
+int stepped_after_stopped_by_watchpoint;
+
void
handle_inferior_event (struct execution_control_state *ecs)
{
@@ -1416,8 +1241,8 @@ handle_inferior_event (struct execution_control_state *ecs)
isn't used, then you're wrong! The macro STOPPED_BY_WATCHPOINT,
defined in the file "config/pa/nm-hppah.h", accesses the variable
indirectly. Mutter something rude about the HP merge. */
- int stepped_after_stopped_by_watchpoint;
int sw_single_step_trap_p = 0;
+ int stopped_by_watchpoint = -1; /* Mark as unknown. */
/* Cache the last pid/waitstatus. */
target_last_wait_ptid = ecs->ptid;
@@ -1474,6 +1299,7 @@ handle_inferior_event (struct execution_control_state *ecs)
/* If it's a new process, add it to the thread database */
ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid)
+ && !ptid_equal (ecs->ptid, minus_one_ptid)
&& !in_thread_list (ecs->ptid));
if (ecs->ws.kind != TARGET_WAITKIND_EXITED
@@ -1484,31 +1310,6 @@ handle_inferior_event (struct execution_control_state *ecs)
ui_out_text (uiout, "[New ");
ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
ui_out_text (uiout, "]\n");
-
-#if 0
- /* NOTE: This block is ONLY meant to be invoked in case of a
- "thread creation event"! If it is invoked for any other
- sort of event (such as a new thread landing on a breakpoint),
- the event will be discarded, which is almost certainly
- a bad thing!
-
- To avoid this, the low-level module (eg. target_wait)
- should call in_thread_list and add_thread, so that the
- new thread is known by the time we get here. */
-
- /* We may want to consider not doing a resume here in order
- to give the user a chance to play with the new thread.
- It might be good to make that a user-settable option. */
-
- /* At this point, all threads are stopped (happens
- automatically in either the OS or the native code).
- Therefore we need to continue all threads in order to
- make progress. */
-
- target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
- prepare_to_wait (ecs);
- return;
-#endif
}
switch (ecs->ws.kind)
@@ -1531,20 +1332,20 @@ handle_inferior_event (struct execution_control_state *ecs)
breakpoint_re_set. */
target_terminal_ours_for_output ();
/* NOTE: cagney/2003-11-25: Make certain that the target
- stack's section table is kept up-to-date. Architectures,
- (e.g., PPC64), use the section table to perform
- operations such as address => section name and hence
- require the table to contain all sections (including
- those found in shared libraries). */
+ stack's section table is kept up-to-date. Architectures,
+ (e.g., PPC64), use the section table to perform
+ operations such as address => section name and hence
+ require the table to contain all sections (including
+ those found in shared libraries). */
/* NOTE: cagney/2003-11-25: Pass current_target and not
- exec_ops to SOLIB_ADD. This is because current GDB is
- only tooled to propagate section_table changes out from
- the "current_target" (see target_resize_to_sections), and
- not up from the exec stratum. This, of course, isn't
- right. "infrun.c" should only interact with the
- exec/process stratum, instead relying on the target stack
- to propagate relevant changes (stop, section table
- changed, ...) up to other layers. */
+ exec_ops to SOLIB_ADD. This is because current GDB is
+ only tooled to propagate section_table changes out from
+ the "current_target" (see target_resize_to_sections), and
+ not up from the exec stratum. This, of course, isn't
+ right. "infrun.c" should only interact with the
+ exec/process stratum, instead relying on the target stack
+ to propagate relevant changes (stop, section table
+ changed, ...) up to other layers. */
SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior ();
@@ -1607,7 +1408,7 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_pc = read_pc ();
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid, 0);
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
@@ -1624,8 +1425,8 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_signal = TARGET_SIGNAL_TRAP;
/* NOTE drow/2002-12-05: This code should be pushed down into the
- target_wait function. Until then following vfork on HP/UX 10.20
- is probably broken by this. Of course, it's broken anyway. */
+ target_wait function. Until then following vfork on HP/UX 10.20
+ is probably broken by this. Of course, it's broken anyway. */
/* Is this a target which reports multiple exec events per actual
call to exec()? (HP-UX using ptrace does, for example.) If so,
ignore all but the last one. Just resume the exec'r, and wait
@@ -1656,7 +1457,7 @@ handle_inferior_event (struct execution_control_state *ecs)
ecs->saved_inferior_ptid = inferior_ptid;
inferior_ptid = ecs->ptid;
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid, 0);
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
inferior_ptid = ecs->saved_inferior_ptid;
@@ -1730,12 +1531,12 @@ handle_inferior_event (struct execution_control_state *ecs)
/* We had an event in the inferior, but we are not interested
in handling it at this level. The lower layers have already
done what needs to be done, if anything.
-
- One of the possible circumstances for this is when the
- inferior produces output for the console. The inferior has
- not stopped, and we are ignoring the event. Another possible
- circumstance is any event which the lower level knows will be
- reported multiple times without an intervening resume. */
+
+ One of the possible circumstances for this is when the
+ inferior produces output for the console. The inferior has
+ not stopped, and we are ignoring the event. Another possible
+ circumstance is any event which the lower level knows will be
+ reported multiple times without an intervening resume. */
case TARGET_WAITKIND_IGNORE:
prepare_to_wait (ecs);
return;
@@ -1759,17 +1560,18 @@ handle_inferior_event (struct execution_control_state *ecs)
if (stepping_past_singlestep_breakpoint)
{
- gdb_assert (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p);
+ gdb_assert (SOFTWARE_SINGLE_STEP_P ()
+ && singlestep_breakpoints_inserted_p);
gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid));
gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid));
stepping_past_singlestep_breakpoint = 0;
/* We've either finished single-stepping past the single-step
- breakpoint, or stopped for some other reason. It would be nice if
- we could tell, but we can't reliably. */
+ breakpoint, or stopped for some other reason. It would be nice if
+ we could tell, but we can't reliably. */
if (stop_signal == TARGET_SIGNAL_TRAP)
- {
+ {
/* Pull the single step breakpoints out of the target. */
SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0;
@@ -1778,8 +1580,8 @@ handle_inferior_event (struct execution_control_state *ecs)
ecs->ptid = saved_singlestep_ptid;
context_switch (ecs);
- if (context_hook)
- context_hook (pid_to_thread_id (ecs->ptid));
+ if (deprecated_context_hook)
+ deprecated_context_hook (pid_to_thread_id (ecs->ptid));
resume (1, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
@@ -1823,66 +1625,66 @@ handle_inferior_event (struct execution_control_state *ecs)
}
if (thread_hop_needed)
- {
- int remove_status;
+ {
+ int remove_status;
- /* Saw a breakpoint, but it was hit by the wrong thread.
- Just continue. */
+ /* Saw a breakpoint, but it was hit by the wrong thread.
+ Just continue. */
- if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
- {
- /* Pull the single step breakpoints out of the target. */
- SOFTWARE_SINGLE_STEP (0, 0);
- singlestep_breakpoints_inserted_p = 0;
- }
+ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
+ {
+ /* Pull the single step breakpoints out of the target. */
+ SOFTWARE_SINGLE_STEP (0, 0);
+ singlestep_breakpoints_inserted_p = 0;
+ }
- remove_status = remove_breakpoints ();
- /* Did we fail to remove breakpoints? If so, try
- to set the PC past the bp. (There's at least
- one situation in which we can fail to remove
- the bp's: On HP-UX's that use ttrace, we can't
- change the address space of a vforking child
- process until the child exits (well, okay, not
- then either :-) or execs. */
- if (remove_status != 0)
- {
- /* FIXME! This is obviously non-portable! */
- write_pc_pid (stop_pc + 4, ecs->ptid);
- /* We need to restart all the threads now,
- * unles we're running in scheduler-locked mode.
- * Use currently_stepping to determine whether to
- * step or continue.
- */
- /* FIXME MVS: is there any reason not to call resume()? */
- if (scheduler_mode == schedlock_on)
- target_resume (ecs->ptid,
- currently_stepping (ecs), TARGET_SIGNAL_0);
- else
- target_resume (RESUME_ALL,
- currently_stepping (ecs), TARGET_SIGNAL_0);
- prepare_to_wait (ecs);
- return;
- }
+ remove_status = remove_breakpoints ();
+ /* Did we fail to remove breakpoints? If so, try
+ to set the PC past the bp. (There's at least
+ one situation in which we can fail to remove
+ the bp's: On HP-UX's that use ttrace, we can't
+ change the address space of a vforking child
+ process until the child exits (well, okay, not
+ then either :-) or execs. */
+ if (remove_status != 0)
+ {
+ /* FIXME! This is obviously non-portable! */
+ write_pc_pid (stop_pc + 4, ecs->ptid);
+ /* We need to restart all the threads now,
+ * unles we're running in scheduler-locked mode.
+ * Use currently_stepping to determine whether to
+ * step or continue.
+ */
+ /* FIXME MVS: is there any reason not to call resume()? */
+ if (scheduler_mode == schedlock_on)
+ target_resume (ecs->ptid,
+ currently_stepping (ecs), TARGET_SIGNAL_0);
else
- { /* Single step */
- breakpoints_inserted = 0;
- if (!ptid_equal (inferior_ptid, ecs->ptid))
- context_switch (ecs);
- ecs->waiton_ptid = ecs->ptid;
- ecs->wp = &(ecs->ws);
- ecs->another_trap = 1;
-
- ecs->infwait_state = infwait_thread_hop_state;
- keep_going (ecs);
- registers_changed ();
- return;
- }
+ target_resume (RESUME_ALL,
+ currently_stepping (ecs), TARGET_SIGNAL_0);
+ prepare_to_wait (ecs);
+ return;
+ }
+ else
+ { /* Single step */
+ breakpoints_inserted = 0;
+ if (!ptid_equal (inferior_ptid, ecs->ptid))
+ context_switch (ecs);
+ ecs->waiton_ptid = ecs->ptid;
+ ecs->wp = &(ecs->ws);
+ ecs->another_trap = 1;
+
+ ecs->infwait_state = infwait_thread_hop_state;
+ keep_going (ecs);
+ registers_changed ();
+ return;
+ }
}
else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
- {
- sw_single_step_trap_p = 1;
- ecs->random_signal = 0;
- }
+ {
+ sw_single_step_trap_p = 1;
+ ecs->random_signal = 0;
+ }
}
else
ecs->random_signal = 1;
@@ -1893,8 +1695,8 @@ handle_inferior_event (struct execution_control_state *ecs)
{
context_switch (ecs);
- if (context_hook)
- context_hook (pid_to_thread_id (ecs->ptid));
+ if (deprecated_context_hook)
+ deprecated_context_hook (pid_to_thread_id (ecs->ptid));
flush_cached_frames ();
}
@@ -1972,7 +1774,7 @@ handle_inferior_event (struct execution_control_state *ecs)
/* It may be possible to simply continue after a watchpoint. */
if (HAVE_CONTINUABLE_WATCHPOINT)
- STOPPED_BY_WATCHPOINT (ecs->ws);
+ stopped_by_watchpoint = STOPPED_BY_WATCHPOINT (ecs->ws);
ecs->stop_func_start = 0;
ecs->stop_func_end = 0;
@@ -1981,7 +1783,7 @@ handle_inferior_event (struct execution_control_state *ecs)
will both be 0 if it doesn't work. */
find_pc_partial_function (stop_pc, &ecs->stop_func_name,
&ecs->stop_func_start, &ecs->stop_func_end);
- ecs->stop_func_start += FUNCTION_START_OFFSET;
+ ecs->stop_func_start += DEPRECATED_FUNCTION_START_OFFSET;
ecs->another_trap = 0;
bpstat_clear (&stop_bpstat);
stop_step = 0;
@@ -2011,12 +1813,11 @@ handle_inferior_event (struct execution_control_state *ecs)
stack. */
if (stop_signal == TARGET_SIGNAL_TRAP
- || (breakpoints_inserted &&
- (stop_signal == TARGET_SIGNAL_ILL
- || stop_signal == TARGET_SIGNAL_SEGV
- || stop_signal == TARGET_SIGNAL_EMT))
- || stop_soon == STOP_QUIETLY
- || stop_soon == STOP_QUIETLY_NO_SIGSTOP)
+ || (breakpoints_inserted
+ && (stop_signal == TARGET_SIGNAL_ILL
+ || stop_signal == TARGET_SIGNAL_SEGV
+ || stop_signal == TARGET_SIGNAL_EMT))
+ || stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_NO_SIGSTOP)
{
if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
{
@@ -2045,20 +1846,15 @@ handle_inferior_event (struct execution_control_state *ecs)
return;
}
- /* Don't even think about breakpoints
- if just proceeded over a breakpoint.
-
- However, if we are trying to proceed over a breakpoint
- and end up in sigtramp, then through_sigtramp_breakpoint
- will be set and we should check whether we've hit the
- step breakpoint. */
- if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected
- && through_sigtramp_breakpoint == NULL)
+ /* Don't even think about breakpoints if just proceeded over a
+ breakpoint. */
+ if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected)
bpstat_clear (&stop_bpstat);
else
{
/* See if there is a breakpoint at the current PC. */
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid,
+ stopped_by_watchpoint);
/* Following in case break condition called a
function. */
@@ -2066,13 +1862,13 @@ handle_inferior_event (struct execution_control_state *ecs)
}
/* NOTE: cagney/2003-03-29: These two checks for a random signal
- at one stage in the past included checks for an inferior
- function call's call dummy's return breakpoint. The original
- comment, that went with the test, read:
+ at one stage in the past included checks for an inferior
+ function call's call dummy's return breakpoint. The original
+ comment, that went with the test, read:
- ``End of a stack dummy. Some systems (e.g. Sony news) give
- another signal besides SIGTRAP, so check here as well as
- above.''
+ ``End of a stack dummy. Some systems (e.g. Sony news) give
+ another signal besides SIGTRAP, so check here as well as
+ above.''
If someone ever tries to get get call dummys on a
non-executable stack to work (where the target would stop
@@ -2081,9 +1877,9 @@ handle_inferior_event (struct execution_control_state *ecs)
enabled when momentary breakpoints were not being used, I
suspect that it won't be the case.
- NOTE: kettenis/2004-02-05: Indeed such checks don't seem to
- be necessary for call dummies on a non-executable stack on
- SPARC. */
+ NOTE: kettenis/2004-02-05: Indeed such checks don't seem to
+ be necessary for call dummies on a non-executable stack on
+ SPARC. */
if (stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
@@ -2136,39 +1932,41 @@ process_event_stop_test:
if (signal_program[stop_signal] == 0)
stop_signal = TARGET_SIGNAL_0;
- /* I'm not sure whether this needs to be check_sigtramp2 or
- whether it could/should be keep_going.
-
- This used to jump to step_over_function if we are stepping,
- which is wrong.
-
- Suppose the user does a `next' over a function call, and while
- that call is in progress, the inferior receives a signal for
- which GDB does not stop (i.e., signal_stop[SIG] is false). In
- that case, when we reach this point, there is already a
- step-resume breakpoint established, right where it should be:
- immediately after the function call the user is "next"-ing
- over. If we call step_over_function now, two bad things
- happen:
-
- - we'll create a new breakpoint, at wherever the current
- frame's return address happens to be. That could be
- anywhere, depending on what function call happens to be on
- the top of the stack at that point. Point is, it's probably
- not where we need it.
-
- - the existing step-resume breakpoint (which is at the correct
- address) will get orphaned: step_resume_breakpoint will point
- to the new breakpoint, and the old step-resume breakpoint
- will never be cleaned up.
-
- The old behavior was meant to help HP-UX single-step out of
- sigtramps. It would place the new breakpoint at prev_pc, which
- was certainly wrong. I don't know the details there, so fixing
- this probably breaks that. As with anything else, it's up to
- the HP-UX maintainer to furnish a fix that doesn't break other
- platforms. --JimB, 20 May 1999 */
- check_sigtramp2 (ecs);
+ if (prev_pc == read_pc ()
+ && !breakpoints_inserted
+ && breakpoint_here_p (read_pc ())
+ && step_resume_breakpoint == NULL)
+ {
+ /* We were just starting a new sequence, attempting to
+ single-step off of a breakpoint and expecting a SIGTRAP.
+ Intead this signal arrives. This signal will take us out
+ of the stepping range so GDB needs to remember to, when
+ the signal handler returns, resume stepping off that
+ breakpoint. */
+ /* To simplify things, "continue" is forced to use the same
+ code paths as single-step - set a breakpoint at the
+ signal return address and then, once hit, step off that
+ breakpoint. */
+ insert_step_resume_breakpoint (get_current_frame (), ecs);
+ ecs->step_after_step_resume_breakpoint = 1;
+ }
+ else if (step_range_end != 0
+ && stop_signal != TARGET_SIGNAL_0
+ && stop_pc >= step_range_start && stop_pc < step_range_end
+ && frame_id_eq (get_frame_id (get_current_frame ()),
+ step_frame_id))
+ {
+ /* The inferior is about to take a signal that will take it
+ out of the single step range. Set a breakpoint at the
+ current PC (which is presumably where the signal handler
+ will eventually return) and then allow the inferior to
+ run free.
+
+ Note that this is only needed for a signal delivered
+ while in the single-step range. Nested signals aren't a
+ problem as they eventually all return. */
+ insert_step_resume_breakpoint (get_current_frame (), ecs);
+ }
keep_going (ecs);
return;
}
@@ -2183,9 +1981,6 @@ process_event_stop_test:
if (what.call_dummy)
{
stop_stack_dummy = 1;
-#ifdef HP_OS_BUG
- trap_expected_after_continue = 1;
-#endif
}
switch (what.main_action)
@@ -2209,21 +2004,8 @@ process_event_stop_test:
{
delete_step_resume_breakpoint (&step_resume_breakpoint);
}
- /* Not sure whether we need to blow this away too, but probably
- it is like the step-resume breakpoint. */
- if (through_sigtramp_breakpoint != NULL)
- {
- delete_breakpoint (through_sigtramp_breakpoint);
- through_sigtramp_breakpoint = NULL;
- }
-#if 0
- /* FIXME - Need to implement nested temporary breakpoints */
- if (step_over_calls > 0)
- set_longjmp_resume_breakpoint (jmp_buf_pc, get_current_frame ());
- else
-#endif /* 0 */
- set_longjmp_resume_breakpoint (jmp_buf_pc, null_frame_id);
+ set_longjmp_resume_breakpoint (jmp_buf_pc, null_frame_id);
ecs->handling_longjmp = 1; /* FIXME */
keep_going (ecs);
return;
@@ -2232,17 +2014,6 @@ process_event_stop_test:
case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
remove_breakpoints ();
breakpoints_inserted = 0;
-#if 0
- /* FIXME - Need to implement nested temporary breakpoints */
- if (step_over_calls
- && (frame_id_inner (get_frame_id (get_current_frame ()),
- step_frame_id)))
- {
- ecs->another_trap = 1;
- keep_going (ecs);
- return;
- }
-#endif /* 0 */
disable_longjmp_breakpoint ();
ecs->handling_longjmp = 0; /* FIXME */
if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
@@ -2263,9 +2034,8 @@ process_event_stop_test:
case BPSTAT_WHAT_STOP_NOISY:
stop_print_frame = 1;
- /* We are about to nuke the step_resume_breakpoint and
- through_sigtramp_breakpoint via the cleanup chain, so
- no need to worry about it here. */
+ /* We are about to nuke the step_resume_breakpointt via the
+ cleanup chain, so no need to worry about it here. */
stop_stepping (ecs);
return;
@@ -2273,9 +2043,8 @@ process_event_stop_test:
case BPSTAT_WHAT_STOP_SILENT:
stop_print_frame = 0;
- /* We are about to nuke the step_resume_breakpoint and
- through_sigtramp_breakpoint via the cleanup chain, so
- no need to worry about it here. */
+ /* We are about to nuke the step_resume_breakpoin via the
+ cleanup chain, so no need to worry about it here. */
stop_stepping (ecs);
return;
@@ -2304,13 +2073,21 @@ process_event_stop_test:
bpstat_find_step_resume_breakpoint (stop_bpstat);
}
delete_step_resume_breakpoint (&step_resume_breakpoint);
+ if (ecs->step_after_step_resume_breakpoint)
+ {
+ /* Back when the step-resume breakpoint was inserted, we
+ were trying to single-step off a breakpoint. Go back
+ to doing that. */
+ ecs->step_after_step_resume_breakpoint = 0;
+ remove_breakpoints ();
+ breakpoints_inserted = 0;
+ ecs->another_trap = 1;
+ keep_going (ecs);
+ return;
+ }
break;
case BPSTAT_WHAT_THROUGH_SIGTRAMP:
- if (through_sigtramp_breakpoint)
- delete_breakpoint (through_sigtramp_breakpoint);
- through_sigtramp_breakpoint = NULL;
-
/* If were waiting for a trap, hitting the step_resume_break
doesn't count as getting it. */
if (trap_expected)
@@ -2334,20 +2111,20 @@ process_event_stop_test:
breakpoint_re_set. */
target_terminal_ours_for_output ();
/* NOTE: cagney/2003-11-25: Make certain that the target
- stack's section table is kept up-to-date. Architectures,
- (e.g., PPC64), use the section table to perform
- operations such as address => section name and hence
- require the table to contain all sections (including
- those found in shared libraries). */
+ stack's section table is kept up-to-date. Architectures,
+ (e.g., PPC64), use the section table to perform
+ operations such as address => section name and hence
+ require the table to contain all sections (including
+ those found in shared libraries). */
/* NOTE: cagney/2003-11-25: Pass current_target and not
- exec_ops to SOLIB_ADD. This is because current GDB is
- only tooled to propagate section_table changes out from
- the "current_target" (see target_resize_to_sections), and
- not up from the exec stratum. This, of course, isn't
- right. "infrun.c" should only interact with the
- exec/process stratum, instead relying on the target stack
- to propagate relevant changes (stop, section table
- changed, ...) up to other layers. */
+ exec_ops to SOLIB_ADD. This is because current GDB is
+ only tooled to propagate section_table changes out from
+ the "current_target" (see target_resize_to_sections), and
+ not up from the exec stratum. This, of course, isn't
+ right. "infrun.c" should only interact with the
+ exec/process stratum, instead relying on the target stack
+ to propagate relevant changes (stop, section table
+ changed, ...) up to other layers. */
SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior ();
@@ -2375,8 +2152,8 @@ process_event_stop_test:
the call that caused this catchpoint to trigger. That
gives the user a more useful vantage from which to
examine their program's state. */
- else if (what.main_action ==
- BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
+ else if (what.main_action
+ == BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
{
/* ??rehrauer: If I could figure out how to get the
right return PC from here, we could just set a temp
@@ -2454,9 +2231,6 @@ process_event_stop_test:
/* Having a step-resume breakpoint overrides anything
else having to do with stepping commands until
that breakpoint is reached. */
- /* I'm not sure whether this needs to be check_sigtramp2 or
- whether it could/should be keep_going. */
- check_sigtramp2 (ecs);
keep_going (ecs);
return;
}
@@ -2464,9 +2238,6 @@ process_event_stop_test:
if (step_range_end == 0)
{
/* Likewise if we aren't even stepping. */
- /* I'm not sure whether this needs to be check_sigtramp2 or
- whether it could/should be keep_going. */
- check_sigtramp2 (ecs);
keep_going (ecs);
return;
}
@@ -2478,9 +2249,6 @@ process_event_stop_test:
within it! */
if (stop_pc >= step_range_start && stop_pc < step_range_end)
{
- /* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
- So definately need to check for sigtramp here. */
- check_sigtramp2 (ecs);
keep_going (ecs);
return;
}
@@ -2516,114 +2284,134 @@ process_event_stop_test:
return;
}
- /* We can't update step_sp every time through the loop, because
- reading the stack pointer would slow down stepping too much.
- But we can update it every time we leave the step range. */
- ecs->update_step_sp = 1;
-
- /* Did we just step into a singal trampoline (either by stepping out
- of a handler, or by taking a signal)? */
- /* NOTE: cagney/2004-03-16: Replaced (except for legacy) a check for
- "pc_in_sigtramp(stop_pc) != pc_in_sigtramp(step_pc)" with
- frame_type == SIGTRAMP && !frame_id_eq. The latter is far more
- robust as it will correctly handle nested signal trampolines. */
- if (legacy_frame_p (current_gdbarch)
- ? (pc_in_sigtramp (stop_pc)
- && !pc_in_sigtramp (prev_pc)
- && INNER_THAN (read_sp (), step_sp))
- : (get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME
- && !frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id)))
+ if (step_range_end != 1
+ && (step_over_calls == STEP_OVER_UNDEBUGGABLE
+ || step_over_calls == STEP_OVER_ALL)
+ && get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME)
{
- {
- struct frame_id current_frame = get_frame_id (get_current_frame ());
-
- if (frame_id_inner (current_frame, step_frame_id))
- {
- /* We have just taken a signal; go until we are back to
- the point where we took it and one more. */
-
- /* This code is needed at least in the following case:
- The user types "next" and then a signal arrives (before
- the "next" is done). */
-
- /* Note that if we are stopped at a breakpoint, then we need
- the step_resume breakpoint to override any breakpoints at
- the same location, so that we will still step over the
- breakpoint even though the signal happened. */
- struct symtab_and_line sr_sal;
-
- init_sal (&sr_sal);
- sr_sal.symtab = NULL;
- sr_sal.line = 0;
- sr_sal.pc = prev_pc;
- /* We could probably be setting the frame to
- step_frame_id; I don't think anyone thought to try it. */
- check_for_old_step_resume_breakpoint ();
- step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
- if (breakpoints_inserted)
- insert_breakpoints ();
- }
- else
- {
- /* We just stepped out of a signal handler and into
- its calling trampoline.
-
- Normally, we'd call step_over_function from
- here, but for some reason GDB can't unwind the
- stack correctly to find the real PC for the point
- user code where the signal trampoline will return
- -- FRAME_SAVED_PC fails, at least on HP-UX 10.20.
- But signal trampolines are pretty small stubs of
- code, anyway, so it's OK instead to just
- single-step out. Note: assuming such trampolines
- don't exhibit recursion on any platform... */
- find_pc_partial_function (stop_pc, &ecs->stop_func_name,
- &ecs->stop_func_start,
- &ecs->stop_func_end);
- /* Readjust stepping range */
- step_range_start = ecs->stop_func_start;
- step_range_end = ecs->stop_func_end;
- ecs->stepping_through_sigtramp = 1;
- }
- }
-
-
- /* If this is stepi or nexti, make sure that the stepping range
- gets us past that instruction. */
- if (step_range_end == 1)
- /* FIXME: Does this run afoul of the code below which, if
- we step into the middle of a line, resets the stepping
- range? */
- step_range_end = (step_range_start = prev_pc) + 1;
-
- ecs->remove_breakpoints_on_following_step = 1;
+ /* The inferior, while doing a "step" or "next", has ended up in
+ a signal trampoline (either by a signal being delivered or by
+ the signal handler returning). Just single-step until the
+ inferior leaves the trampoline (either by calling the handler
+ or returning). */
keep_going (ecs);
return;
}
- if (((stop_pc == ecs->stop_func_start /* Quick test */
- || in_prologue (stop_pc, ecs->stop_func_start))
- && !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
- || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name)
- || ecs->stop_func_name == 0)
+ if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
{
/* It's a subroutine call. */
- handle_step_into_function (ecs);
- return;
- }
+ CORE_ADDR real_stop_pc;
- /* We've wandered out of the step range. */
+ if ((step_over_calls == STEP_OVER_NONE)
+ || ((step_range_end == 1)
+ && in_prologue (prev_pc, ecs->stop_func_start)))
+ {
+ /* I presume that step_over_calls is only 0 when we're
+ supposed to be stepping at the assembly language level
+ ("stepi"). Just stop. */
+ /* Also, maybe we just did a "nexti" inside a prolog, so we
+ thought it was a subroutine call but it was not. Stop as
+ well. FENN */
+ stop_step = 1;
+ print_stop_reason (END_STEPPING_RANGE, 0);
+ stop_stepping (ecs);
+ return;
+ }
- ecs->sal = find_pc_line (stop_pc, 0);
+#ifdef DEPRECATED_IGNORE_HELPER_CALL
+ /* On MIPS16, a function that returns a floating point value may
+ call a library helper function to copy the return value to a
+ floating point register. The DEPRECATED_IGNORE_HELPER_CALL
+ macro returns non-zero if we should ignore (i.e. step over)
+ this function call. */
+ /* FIXME: cagney/2004-07-21: These custom ``ignore frame when
+ stepping'' function attributes (SIGTRAMP_FRAME,
+ DEPRECATED_IGNORE_HELPER_CALL, SKIP_TRAMPOLINE_CODE,
+ skip_language_trampoline frame, et.al.) need to be replaced
+ with generic attributes bound to the frame's function. */
+ if (DEPRECATED_IGNORE_HELPER_CALL (stop_pc))
+ {
+ /* We're doing a "next", set a breakpoint at callee's return
+ address (the address at which the caller will
+ resume). */
+ insert_step_resume_breakpoint (get_prev_frame
+ (get_current_frame ()), ecs);
+ keep_going (ecs);
+ return;
+ }
+#endif
+ if (step_over_calls == STEP_OVER_ALL)
+ {
+ /* We're doing a "next", set a breakpoint at callee's return
+ address (the address at which the caller will
+ resume). */
+ insert_step_resume_breakpoint (get_prev_frame
+ (get_current_frame ()), ecs);
+ keep_going (ecs);
+ return;
+ }
- if (step_range_end == 1)
- {
- /* It is stepi or nexti. We always want to stop stepping after
- one instruction. */
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
+ /* If we are in a function call trampoline (a stub between the
+ calling routine and the real function), locate the real
+ function. That's what tells us (a) whether we want to step
+ into it at all, and (b) what prologue we want to run to the
+ end of, if we do step into it. */
+ real_stop_pc = skip_language_trampoline (stop_pc);
+ if (real_stop_pc == 0)
+ real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ if (real_stop_pc != 0)
+ ecs->stop_func_start = real_stop_pc;
+
+ if (IN_SOLIB_DYNSYM_RESOLVE_CODE (ecs->stop_func_start))
+ {
+ struct symtab_and_line sr_sal;
+ init_sal (&sr_sal);
+ sr_sal.pc = ecs->stop_func_start;
+
+ check_for_old_step_resume_breakpoint ();
+ step_resume_breakpoint =
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
+ if (breakpoints_inserted)
+ insert_breakpoints ();
+
+ keep_going (ecs);
+ return;
+ }
+
+ /* If we have line number information for the function we are
+ thinking of stepping into, step into it.
+
+ If there are several symtabs at that PC (e.g. with include
+ files), just want to know whether *any* of them have line
+ numbers. find_pc_line handles this. */
+ {
+ struct symtab_and_line tmp_sal;
+
+ tmp_sal = find_pc_line (ecs->stop_func_start, 0);
+ if (tmp_sal.line != 0)
+ {
+ step_into_function (ecs);
+ return;
+ }
+ }
+
+ /* If we have no line number and the step-stop-if-no-debug is
+ set, we stop the step so that the user has a chance to switch
+ in assembly mode. */
+ if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
+ {
+ stop_step = 1;
+ print_stop_reason (END_STEPPING_RANGE, 0);
+ stop_stepping (ecs);
+ return;
+ }
+
+ /* Set a breakpoint at callee's return address (the address at
+ which the caller will resume). */
+ insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()),
+ ecs);
+ keep_going (ecs);
return;
}
@@ -2659,6 +2447,51 @@ process_event_stop_test:
}
}
+ /* NOTE: tausq/2004-05-24: This if block used to be done before all
+ the trampoline processing logic, however, there are some trampolines
+ that have no names, so we should do trampoline handling first. */
+ if (step_over_calls == STEP_OVER_UNDEBUGGABLE
+ && ecs->stop_func_name == NULL)
+ {
+ /* The inferior just stepped into, or returned to, an
+ undebuggable function (where there is no symbol, not even a
+ minimal symbol, corresponding to the address where the
+ inferior stopped). Since we want to skip this kind of code,
+ we keep going until the inferior returns from this
+ function. */
+ if (step_stop_if_no_debug)
+ {
+ /* If we have no line number and the step-stop-if-no-debug
+ is set, we stop the step so that the user has a chance to
+ switch in assembly mode. */
+ stop_step = 1;
+ print_stop_reason (END_STEPPING_RANGE, 0);
+ stop_stepping (ecs);
+ return;
+ }
+ else
+ {
+ /* Set a breakpoint at callee's return address (the address
+ at which the caller will resume). */
+ insert_step_resume_breakpoint (get_prev_frame
+ (get_current_frame ()), ecs);
+ keep_going (ecs);
+ return;
+ }
+ }
+
+ if (step_range_end == 1)
+ {
+ /* It is stepi or nexti. We always want to stop stepping after
+ one instruction. */
+ stop_step = 1;
+ print_stop_reason (END_STEPPING_RANGE, 0);
+ stop_stepping (ecs);
+ return;
+ }
+
+ ecs->sal = find_pc_line (stop_pc, 0);
+
if (ecs->sal.line == 0)
{
/* We have no line number information. That means to stop
@@ -2719,15 +2552,15 @@ process_event_stop_test:
stackless leaf function. I think the logic should instead look
at the unwound frame ID has that should give a more robust
indication of what happened. */
- if (step-ID == current-ID)
- still stepping in same function;
- else if (step-ID == unwind (current-ID))
- stepped into a function;
- else
- stepped out of a function;
- /* Of course this assumes that the frame ID unwind code is robust
- and we're willing to introduce frame unwind logic into this
- function. Fortunately, those days are nearly upon us. */
+ if (step - ID == current - ID)
+ still stepping in same function;
+ else if (step - ID == unwind (current - ID))
+ stepped into a function;
+ else
+ stepped out of a function;
+ /* Of course this assumes that the frame ID unwind code is robust
+ and we're willing to introduce frame unwind logic into this
+ function. Fortunately, those days are nearly upon us. */
#endif
{
struct frame_id current_frame = get_frame_id (get_current_frame ());
@@ -2743,50 +2576,13 @@ process_event_stop_test:
static int
currently_stepping (struct execution_control_state *ecs)
{
- return ((through_sigtramp_breakpoint == NULL
- && !ecs->handling_longjmp
+ return ((!ecs->handling_longjmp
&& ((step_range_end && step_resume_breakpoint == NULL)
|| trap_expected))
|| ecs->stepping_through_solib_after_catch
|| bpstat_should_step ());
}
-static void
-check_sigtramp2 (struct execution_control_state *ecs)
-{
- if (trap_expected
- && pc_in_sigtramp (stop_pc)
- && !pc_in_sigtramp (prev_pc)
- && INNER_THAN (read_sp (), step_sp))
- {
- /* What has happened here is that we have just stepped the
- inferior with a signal (because it is a signal which
- shouldn't make us stop), thus stepping into sigtramp.
-
- So we need to set a step_resume_break_address breakpoint and
- continue until we hit it, and then step. FIXME: This should
- be more enduring than a step_resume breakpoint; we should
- know that we will later need to keep going rather than
- re-hitting the breakpoint here (see the testsuite,
- gdb.base/signals.exp where it says "exceedingly difficult"). */
-
- struct symtab_and_line sr_sal;
-
- init_sal (&sr_sal); /* initialize to zeroes */
- sr_sal.pc = prev_pc;
- sr_sal.section = find_pc_overlay (sr_sal.pc);
- /* We perhaps could set the frame if we kept track of what the
- frame corresponding to prev_pc was. But we don't, so don't. */
- through_sigtramp_breakpoint =
- set_momentary_breakpoint (sr_sal, null_frame_id, bp_through_sigtramp);
- if (breakpoints_inserted)
- insert_breakpoints ();
-
- ecs->remove_breakpoints_on_following_step = 1;
- ecs->another_trap = 1;
- }
-}
-
/* Subroutine call with source code we should not step over. Do step
to the first line of code in it. */
@@ -2817,7 +2613,7 @@ step_into_function (struct execution_control_state *ecs)
``ecs->stop_func_start == stop_pc'' will never succeed. Adjust
ecs->stop_func_start to an address at which a breakpoint may be
legitimately placed.
-
+
Note: kevinb/2004-01-19: On FR-V, if this adjustment is not
made, GDB will enter an infinite loop when stepping through
optimized code consisting of VLIW instructions which contain
@@ -2827,12 +2623,12 @@ step_into_function (struct execution_control_state *ecs)
set, GDB will adjust the breakpoint address to the beginning of
the VLIW instruction. Thus, we need to make the corresponding
adjustment here when computing the stop address. */
-
+
if (gdbarch_adjust_breakpoint_address_p (current_gdbarch))
{
ecs->stop_func_start
= gdbarch_adjust_breakpoint_address (current_gdbarch,
- ecs->stop_func_start);
+ ecs->stop_func_start);
}
if (ecs->stop_func_start == stop_pc)
@@ -2864,104 +2660,36 @@ step_into_function (struct execution_control_state *ecs)
keep_going (ecs);
}
-/* We've just entered a callee, and we wish to resume until it returns
- to the caller. Setting a step_resume breakpoint on the return
- address will catch a return from the callee.
-
- However, if the callee is recursing, we want to be careful not to
- catch returns of those recursive calls, but only of THIS instance
- of the caller.
+/* Insert a "step resume breakpoint" at RETURN_FRAME.pc. This is used
+ to skip a function (next, skip-no-debug) or signal. It's assumed
+ that the function/signal handler being skipped eventually returns
+ to the breakpoint inserted at RETURN_FRAME.pc.
+
+ For the skip-function case, the function may have been reached by
+ either single stepping a call / return / signal-return instruction,
+ or by hitting a breakpoint. In all cases, the RETURN_FRAME belongs
+ to the skip-function's caller.
- To do this, we set the step_resume bp's frame to our current
- caller's frame (obtained by doing a frame ID unwind). */
+ For the signals case, this is called with the interrupted
+ function's frame. The signal handler, when it returns, will resume
+ the interrupted function at RETURN_FRAME.pc. */
static void
-step_over_function (struct execution_control_state *ecs)
+insert_step_resume_breakpoint (struct frame_info *return_frame,
+ struct execution_control_state *ecs)
{
struct symtab_and_line sr_sal;
- struct frame_id sr_id;
init_sal (&sr_sal); /* initialize to zeros */
- /* NOTE: cagney/2003-04-06:
-
- At this point the equality get_frame_pc() == get_frame_func()
- should hold. This may make it possible for this code to tell the
- frame where it's function is, instead of the reverse. This would
- avoid the need to search for the frame's function, which can get
- very messy when there is no debug info available (look at the
- heuristic find pc start code found in targets like the MIPS). */
-
- /* NOTE: cagney/2003-04-06:
-
- The intent of DEPRECATED_SAVED_PC_AFTER_CALL was to:
-
- - provide a very light weight equivalent to frame_unwind_pc()
- (nee FRAME_SAVED_PC) that avoids the prologue analyzer
-
- - avoid handling the case where the PC hasn't been saved in the
- prologue analyzer
-
- Unfortunately, not five lines further down, is a call to
- get_frame_id() and that is guarenteed to trigger the prologue
- analyzer.
-
- The `correct fix' is for the prologe analyzer to handle the case
- where the prologue is incomplete (PC in prologue) and,
- consequently, the return pc has not yet been saved. It should be
- noted that the prologue analyzer needs to handle this case
- anyway: frameless leaf functions that don't save the return PC;
- single stepping through a prologue.
-
- The d10v handles all this by bailing out of the prologue analsis
- when it reaches the current instruction. */
-
- if (DEPRECATED_SAVED_PC_AFTER_CALL_P ())
- sr_sal.pc = ADDR_BITS_REMOVE (DEPRECATED_SAVED_PC_AFTER_CALL (get_current_frame ()));
- else
- sr_sal.pc = ADDR_BITS_REMOVE (frame_pc_unwind (get_current_frame ()));
+ sr_sal.pc = ADDR_BITS_REMOVE (get_frame_pc (return_frame));
sr_sal.section = find_pc_overlay (sr_sal.pc);
check_for_old_step_resume_breakpoint ();
- /* NOTE: cagney/2004-03-15: Code using the current value of
- "step_frame_id", instead of unwinding that frame ID, removed (at
- least for non-legacy platforms). On s390 GNU/Linux, after taking
- a signal, the program is directly resumed at the signal handler
- and, consequently, the PC would point at at the first instruction
- of that signal handler but STEP_FRAME_ID would [incorrectly] at
- the interrupted code when it should point at the signal
- trampoline. By always and locally doing a frame ID unwind, it's
- possible to assert that the code is always using the correct
- ID. */
- if (legacy_frame_p (current_gdbarch))
- {
- if (frame_id_p (step_frame_id)
- && !IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc))
- /* NOTE: cagney/2004-02-27: Use the global state's idea of the
- stepping frame ID. I suspect this is done as it is lighter
- weight than a call to get_prev_frame. */
- /* NOTE: cagney/2004-03-15: See comment above about how this
- is also broken. */
- sr_id = step_frame_id;
- else
- /* NOTE: cagney/2004-03-15: This is the way it was 'cos this
- is the way it always was. It should be using the unwound
- (or caller's) ID, and not this (or the callee's) ID. It
- appeared to work because: legacy architectures used the
- wrong end of the frame for the ID.stack (inner-most rather
- than outer-most) so that the callee's id.stack (un
- adjusted) matched the caller's id.stack giving the
- "correct" id; more often than not
- !IN_SOLIB_DYNSYM_RESOLVE_CODE and hence the code above (it
- was originally later in the function) fixed the ID by using
- global state. */
- sr_id = get_frame_id (get_current_frame ());
- }
- else
- sr_id = frame_unwind_id (get_current_frame ());
-
- step_resume_breakpoint = set_momentary_breakpoint (sr_sal, sr_id, bp_step_resume);
+ step_resume_breakpoint
+ = set_momentary_breakpoint (sr_sal, get_frame_id (return_frame),
+ bp_step_resume);
if (breakpoints_inserted)
insert_breakpoints ();
@@ -2984,10 +2712,6 @@ keep_going (struct execution_control_state *ecs)
/* Save the pc before execution, to compare with pc after stop. */
prev_pc = read_pc (); /* Might have been DECR_AFTER_BREAK */
- if (ecs->update_step_sp)
- step_sp = read_sp ();
- ecs->update_step_sp = 0;
-
/* If we did not do break;, it means we should keep running the
inferior and not return to debugger. */
@@ -3007,22 +2731,9 @@ keep_going (struct execution_control_state *ecs)
The signal was SIGTRAP, e.g. it was our signal, but we
decided we should resume from it.
- We're going to run this baby now!
+ We're going to run this baby now! */
- Insert breakpoints now, unless we are trying to one-proceed
- past a breakpoint. */
- /* If we've just finished a special step resume and we don't
- want to hit a breakpoint, pull em out. */
- if (step_resume_breakpoint == NULL
- && through_sigtramp_breakpoint == NULL
- && ecs->remove_breakpoints_on_following_step)
- {
- ecs->remove_breakpoints_on_following_step = 0;
- remove_breakpoints ();
- breakpoints_inserted = 0;
- }
- else if (!breakpoints_inserted &&
- (through_sigtramp_breakpoint != NULL || !ecs->another_trap))
+ if (!breakpoints_inserted && !ecs->another_trap)
{
breakpoints_failed = insert_breakpoints ();
if (breakpoints_failed)
@@ -3288,8 +2999,8 @@ normal_stop (void)
{
case PRINT_UNKNOWN:
/* FIXME: cagney/2002-12-01: Given that a frame ID does
- (or should) carry around the function and does (or
- should) use that when doing a frame comparison. */
+ (or should) carry around the function and does (or
+ should) use that when doing a frame comparison. */
if (stop_step
&& frame_id_eq (step_frame_id,
get_frame_id (get_current_frame ()))
@@ -3325,7 +3036,7 @@ normal_stop (void)
LOCATION: Print only location
SRC_AND_LOC: Print location and source line */
if (do_frame_printing)
- print_stack_frame (deprecated_selected_frame, -1, source_flag);
+ print_stack_frame (get_selected_frame (), 0, source_flag);
/* Display the auto-display expressions. */
do_displays ();
@@ -3354,7 +3065,7 @@ normal_stop (void)
done:
annotate_stopped ();
- observer_notify_normal_stop ();
+ observer_notify_normal_stop (stop_bpstat);
}
static int
@@ -3755,7 +3466,7 @@ void
write_inferior_status_register (struct inferior_status *inf_status, int regno,
LONGEST val)
{
- int size = DEPRECATED_REGISTER_RAW_SIZE (regno);
+ int size = register_size (current_gdbarch, regno);
void *buf = alloca (size);
store_signed_integer (buf, size, val);
regcache_raw_write (inf_status->registers, regno, buf);
@@ -4149,7 +3860,7 @@ of the program stops.", &cmdlist);
signal_print[TARGET_SIGNAL_CANCEL] = 0;
#ifdef SOLIB_ADD
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("stop-on-solib-events", class_support, var_zinteger,
(char *) &stop_on_solib_events,
"Set stopping for shared library events.\n\
@@ -4168,7 +3879,7 @@ A fork or vfork creates a new process. follow-fork-mode can be:\n\
child - the new process is debugged after a fork\n\
The unfollowed process will continue to run.\n\
By default, the debugger will follow the parent process.", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
c = add_set_enum_cmd ("scheduler-locking", class_run, scheduler_enums, /* array of string names */
&scheduler_mode, /* current mode */
@@ -4180,7 +3891,7 @@ step == scheduler locked during every single-step operation.\n\
Other threads may run while stepping over a function call ('next').", &setlist);
set_cmd_sfunc (c, set_schedlock_func); /* traps on target vector */
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
c = add_set_cmd ("step-mode", class_run,
var_boolean, (char *) &step_stop_if_no_debug,
@@ -4188,7 +3899,7 @@ step == scheduler locked during every single-step operation.\n\
function without debug line information will stop at the first\n\
instruction of that function. Otherwise, the function is skipped and\n\
the step command stops at a different source line.", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
/* ptid initializations */
null_ptid = ptid_build (0, 0, 0);
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index a6f40ec12c2..68efdac3077 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -34,7 +34,7 @@
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
-
+#include "observer.h"
#include "gdb_wait.h"
#include "inflow.h"
@@ -73,7 +73,7 @@ static void ptrace_me (void);
static void ptrace_him (int);
-static void child_create_inferior (char *, char *, char **);
+static void child_create_inferior (char *, char *, char **, int);
static void child_mourn_inferior (void);
@@ -194,46 +194,40 @@ child_thread_alive (ptid_t ptid)
static void
child_attach (char *args, int from_tty)
{
+ char *exec_file;
+ int pid;
+ char *dummy;
+
if (!args)
error_no_arg ("process-id to attach");
-#ifndef ATTACH_DETACH
- error ("Can't attach to a process on this machine.");
-#else
- {
- char *exec_file;
- int pid;
- char *dummy;
-
- dummy = args;
- pid = strtol (args, &dummy, 0);
- /* Some targets don't set errno on errors, grrr! */
- if ((pid == 0) && (args == dummy))
+ dummy = args;
+ pid = strtol (args, &dummy, 0);
+ /* Some targets don't set errno on errors, grrr! */
+ if ((pid == 0) && (args == dummy))
error ("Illegal process-id: %s\n", args);
+
+ if (pid == getpid ()) /* Trying to masturbate? */
+ error ("I refuse to debug myself!");
+
+ if (from_tty)
+ {
+ exec_file = (char *) get_exec_file (0);
+
+ if (exec_file)
+ printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
+ target_pid_to_str (pid_to_ptid (pid)));
+ else
+ printf_unfiltered ("Attaching to %s\n",
+ target_pid_to_str (pid_to_ptid (pid)));
+
+ gdb_flush (gdb_stdout);
+ }
- if (pid == getpid ()) /* Trying to masturbate? */
- error ("I refuse to debug myself!");
-
- if (from_tty)
- {
- exec_file = (char *) get_exec_file (0);
-
- if (exec_file)
- printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
- target_pid_to_str (pid_to_ptid (pid)));
- else
- printf_unfiltered ("Attaching to %s\n",
- target_pid_to_str (pid_to_ptid (pid)));
-
- gdb_flush (gdb_stdout);
- }
-
- attach (pid);
-
- inferior_ptid = pid_to_ptid (pid);
- push_target (&child_ops);
- }
-#endif /* ATTACH_DETACH */
+ attach (pid);
+
+ inferior_ptid = pid_to_ptid (pid);
+ push_target (&child_ops);
}
#if !defined(CHILD_POST_ATTACH)
@@ -256,31 +250,25 @@ child_post_attach (int pid)
static void
child_detach (char *args, int from_tty)
{
-#ifdef ATTACH_DETACH
- {
- int siggnal = 0;
- int pid = PIDGET (inferior_ptid);
-
- if (from_tty)
- {
- char *exec_file = get_exec_file (0);
- if (exec_file == 0)
- exec_file = "";
- printf_unfiltered ("Detaching from program: %s, %s\n", exec_file,
- target_pid_to_str (pid_to_ptid (pid)));
- gdb_flush (gdb_stdout);
- }
- if (args)
- siggnal = atoi (args);
-
- detach (siggnal);
-
- inferior_ptid = null_ptid;
- unpush_target (&child_ops);
- }
-#else
- error ("This version of Unix does not support detaching a process.");
-#endif
+ int siggnal = 0;
+ int pid = PIDGET (inferior_ptid);
+
+ if (from_tty)
+ {
+ char *exec_file = get_exec_file (0);
+ if (exec_file == 0)
+ exec_file = "";
+ printf_unfiltered ("Detaching from program: %s, %s\n", exec_file,
+ target_pid_to_str (pid_to_ptid (pid)));
+ gdb_flush (gdb_stdout);
+ }
+ if (args)
+ siggnal = atoi (args);
+
+ detach (siggnal);
+
+ inferior_ptid = null_ptid;
+ unpush_target (&child_ops);
}
/* Get ready to modify the registers array. On machines which store
@@ -319,7 +307,7 @@ static void
ptrace_me (void)
{
/* "Trace me, Dr. Memory!" */
- call_ptrace (0, 0, (PTRACE_ARG3_TYPE) 0, 0);
+ call_ptrace (0, 0, (PTRACE_TYPE_ARG3) 0, 0);
}
/* Stub function which causes the GDB that runs it, to start ptrace-ing
@@ -356,7 +344,8 @@ ptrace_him (int pid)
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *allargs, char **env)
+child_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
#ifdef HPUXHPPA
fork_inferior (exec_file, allargs, env, ptrace_me, ptrace_him, pre_fork_inferior, NULL);
@@ -364,6 +353,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env)
fork_inferior (exec_file, allargs, env, ptrace_me, ptrace_him, NULL, NULL);
#endif
/* We are at the first instruction we care about. */
+ observer_notify_inferior_created (&current_target, from_tty);
/* Pedal to the metal... */
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index 3f76edbbd1a..fcb4d028bd9 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -1,7 +1,7 @@
/* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -28,6 +28,7 @@
#include "gdb_wait.h"
#include "command.h"
#include "gdbthread.h"
+#include "infttrace.h"
/* We need pstat functionality so that we can get the exec file
for a process we attach to.
@@ -45,10 +46,6 @@
#undef NO_FLAGS
#endif
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
@@ -118,7 +115,7 @@
#endif
#include "gdbcore.h"
-#ifndef NO_SYS_FILE
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
@@ -4559,8 +4556,6 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
}
#endif /* CHILD_RESUME */
-
-#ifdef ATTACH_DETACH
/*
* Like it says.
*
@@ -4732,10 +4727,8 @@ update_thread_state_after_attach (int pid, attach_continue_t kind_of_go)
attach_flag = 1;
}
-#endif /* ATTACH_DETACH */
-#ifdef ATTACH_DETACH
/* Start debugging the process whose number is PID.
* (A _real_ pid).
*/
@@ -4802,7 +4795,6 @@ detach (int signal)
/* Process-state? */
}
-#endif /* ATTACH_DETACH */
/* Default the type of the ttrace transfer to int. */
diff --git a/gdb/infttrace.h b/gdb/infttrace.h
index d3330e3b85a..c947cc02b92 100644
--- a/gdb/infttrace.h
+++ b/gdb/infttrace.h
@@ -1,6 +1,6 @@
/* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,7 +22,14 @@
#ifndef INFTTRACE_H
#define INFTTRACE_H
+enum target_waitkind;
+
extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
extern pid_t hppa_switched_threads (pid_t gdb_pid);
+extern int hpux_has_forked (int pid, int *childpid);
+extern int hpux_has_vforked (int pid, int *childpid);
+extern int hpux_has_execd (int pid, char **execd_pathname);
+extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
+ int *syscall_id);
#endif
diff --git a/gdb/interps.c b/gdb/interps.c
index 82e9af690b1..2a4cc0b52f6 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -268,17 +268,15 @@ void
current_interp_command_loop (void)
{
/* Somewhat messy. For the moment prop up all the old ways of
- selecting the command loop. `command_loop_hook' should be
- deprecated. */
- if (command_loop_hook != NULL)
- command_loop_hook ();
+ selecting the command loop. `deprecated_command_loop_hook'
+ should be deprecated. */
+ if (deprecated_command_loop_hook != NULL)
+ deprecated_command_loop_hook ();
else if (current_interpreter != NULL
&& current_interpreter->procs->command_loop_proc != NULL)
current_interpreter->procs->command_loop_proc (current_interpreter->data);
- else if (event_loop_p)
- cli_command_loop ();
else
- command_loop ();
+ cli_command_loop ();
}
int
@@ -322,27 +320,27 @@ interp_exec (struct interp *interp, const char *command_str)
void
clear_interpreter_hooks (void)
{
- init_ui_hook = 0;
- print_frame_info_listing_hook = 0;
+ deprecated_init_ui_hook = 0;
+ deprecated_print_frame_info_listing_hook = 0;
/*print_frame_more_info_hook = 0; */
- query_hook = 0;
- warning_hook = 0;
- create_breakpoint_hook = 0;
- delete_breakpoint_hook = 0;
- modify_breakpoint_hook = 0;
- interactive_hook = 0;
- registers_changed_hook = 0;
- readline_begin_hook = 0;
- readline_hook = 0;
- readline_end_hook = 0;
- register_changed_hook = 0;
- memory_changed_hook = 0;
- context_hook = 0;
- target_wait_hook = 0;
- call_command_hook = 0;
- error_hook = 0;
- error_begin_hook = 0;
- command_loop_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_warning_hook = 0;
+ deprecated_create_breakpoint_hook = 0;
+ deprecated_delete_breakpoint_hook = 0;
+ deprecated_modify_breakpoint_hook = 0;
+ deprecated_interactive_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_readline_begin_hook = 0;
+ deprecated_readline_hook = 0;
+ deprecated_readline_end_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_memory_changed_hook = 0;
+ deprecated_context_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_call_command_hook = 0;
+ deprecated_error_hook = 0;
+ deprecated_error_begin_hook = 0;
+ deprecated_command_loop_hook = 0;
clear_gdb_event_hooks ();
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 93727a65289..5cf60555f04 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -1,6 +1,8 @@
/* Native support for the SGI Iris running IRIX version 5, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
Implemented for Irix 4.x by Garrett A. Wollman.
@@ -56,23 +58,24 @@ supply_gregset (gregset_t *gregsetp)
{
int regi;
greg_t *regp = &(*gregsetp)[0];
- int gregoff = sizeof (greg_t) - mips_regsize (current_gdbarch);
+ int gregoff = sizeof (greg_t) - mips_isa_regsize (current_gdbarch);
static char zerobuf[32] = {0};
for (regi = 0; regi <= CTX_RA; regi++)
- supply_register (regi, (char *) (regp + regi) + gregoff);
-
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *) (regp + CTX_EPC) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *) (regp + CTX_MDHI) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *) (regp + CTX_MDLO) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *) (regp + CTX_CAUSE) + gregoff);
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + regi) + gregoff);
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CTX_EPC) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CTX_MDHI) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CTX_MDLO) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CTX_CAUSE) + gregoff);
/* Fill inaccessible registers with zero. */
- supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr, zerobuf);
}
void
@@ -89,28 +92,28 @@ fill_gregset (gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)],
- DEPRECATED_REGISTER_RAW_SIZE (regi));
+ register_size (current_gdbarch, regi));
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->pc));
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->pc));
if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->cause))
*(regp + CTX_CAUSE) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->cause)],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->cause));
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->cause));
if ((regno == -1)
|| (regno == mips_regnum (current_gdbarch)->hi))
*(regp + CTX_MDHI) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->hi));
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->hi));
if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->lo))
*(regp + CTX_MDLO) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->lo));
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->lo));
}
/*
@@ -130,15 +133,17 @@ supply_fpregset (fpregset_t *fpregsetp)
/* FIXME, this is wrong for the N32 ABI which has 64 bit FP regs. */
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *) &fpregsetp->fp_csr);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
/* FIXME: how can we supply FCRIR? SGI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
@@ -155,7 +160,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, register_size (current_gdbarch, regi));
}
}
@@ -205,12 +210,12 @@ static void
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
int which, CORE_ADDR reg_addr)
{
- if (core_reg_size == DEPRECATED_REGISTER_BYTES)
+ if (core_reg_size == deprecated_register_bytes ())
{
memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
- else if (mips_regsize (current_gdbarch) == 4 &&
- core_reg_size == (2 * mips_regsize (current_gdbarch)) * NUM_REGS)
+ else if (mips_isa_regsize (current_gdbarch) == 4 &&
+ core_reg_size == (2 * mips_isa_regsize (current_gdbarch)) * NUM_REGS)
{
/* This is a core file from a N32 executable, 64 bits are saved
for all registers. */
@@ -228,7 +233,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
*dstp++ = *srcp++;
*dstp++ = *srcp++;
*dstp++ = *srcp++;
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 4)
+ if (register_size (current_gdbarch, regno) == 4)
{
/* copying 4 bytes from eight bytes?
I don't see how this can be right... */
@@ -277,5 +282,5 @@ static struct core_fns irix5_core_fns =
void
_initialize_core_irix5 (void)
{
- add_core_fns (&irix5_core_fns);
+ deprecated_add_core_fns (&irix5_core_fns);
}
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 6db6e88efa5..4b7cf28ede9 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -62,6 +62,8 @@ static struct value *java_value_string (char *ptr, int len);
static void java_emit_char (int c, struct ui_file * stream, int quoter);
+static char *java_class_name_from_physname (const char *physname);
+
/* This objfile contains symtabs that have been dynamically created
to record dynamically loaded Java classes and dynamically
compiled java methods. */
@@ -975,6 +977,59 @@ static char *java_demangle (const char *mangled, int options)
return cplus_demangle (mangled, options | DMGL_JAVA);
}
+/* Find the member function name of the demangled name NAME. NAME
+ must be a method name including arguments, in order to correctly
+ locate the last component.
+
+ This function return a pointer to the first dot before the
+ member function name, or NULL if the name was not of the
+ expected form. */
+
+static const char *
+java_find_last_component (const char *name)
+{
+ const char *p;
+
+ /* Find argument list. */
+ p = strchr (name, '(');
+
+ if (p == NULL)
+ return NULL;
+
+ /* Back up and find first dot prior to argument list. */
+ while (p > name && *p != '.')
+ p--;
+
+ if (p == name)
+ return NULL;
+
+ return p;
+}
+
+/* Return the name of the class containing method PHYSNAME. */
+
+static char *
+java_class_name_from_physname (const char *physname)
+{
+ char *ret = NULL;
+ const char *end;
+ int depth = 0;
+ char *demangled_name = java_demangle (physname, DMGL_PARAMS | DMGL_ANSI);
+
+ if (demangled_name == NULL)
+ return NULL;
+
+ end = java_find_last_component (demangled_name);
+ if (end != NULL)
+ {
+ ret = xmalloc (end - demangled_name + 1);
+ memcpy (ret, demangled_name, end - demangled_name);
+ ret[end - demangled_name] = '\0';
+ }
+
+ xfree (demangled_name);
+ return ret;
+}
/* Table mapping opcodes into strings for printing operators
and precedences of the operators. */
@@ -1029,13 +1084,15 @@ const struct language_defn java_language_defn =
{
"java", /* Language name */
language_java,
- c_builtin_types,
+ NULL,
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_java,
java_parse,
java_error,
+ null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
java_emit_char, /* Function to print a single character */
@@ -1048,15 +1105,13 @@ const struct language_defn java_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
java_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ java_class_name_from_physname,/* Language specific class name */
java_op_print_tab, /* expression operators for printing */
0, /* not c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ c_language_arch_info,
LANG_MAGIC
};
diff --git a/gdb/kod.c b/gdb/kod.c
index 6cb3622f87a..15db43055ce 100644
--- a/gdb/kod.c
+++ b/gdb/kod.c
@@ -134,14 +134,15 @@ kod_set_os (char *arg, int from_tty, struct cmd_list_element *command)
{
char *p;
- /* NOTE: cagney/2002-03-17: The add_show_from_set() function clones
- the set command passed as a parameter. The clone operation will
- include (BUG?) any ``set'' command callback, if present.
- Commands like ``info set'' call all the ``show'' command
- callbacks. Unfortunately, for ``show'' commands cloned from
- ``set'', this includes callbacks belonging to ``set'' commands.
- Making this worse, this only occures if add_show_from_set() is
- called after add_cmd_sfunc() (BUG?). */
+ /* NOTE: cagney/2002-03-17: The deprecated_add_show_from_set()
+ function clones the set command passed as a parameter. The clone
+ operation will include (BUG?) any ``set'' command callback, if
+ present. Commands like ``info set'' call all the ``show''
+ command callbacks. Unfortunately, for ``show'' commands cloned
+ from ``set'', this includes callbacks belonging to ``set''
+ commands. Making this worse, this only occures if
+ deprecated_add_show_from_set() is called after add_cmd_sfunc()
+ (BUG?). */
if (cmd_type (command) != set_cmd)
return;
@@ -237,5 +238,5 @@ _initialize_kod (void)
"Set operating system",
&setlist);
set_cmd_sfunc (c, kod_set_os);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
}
diff --git a/gdb/language.c b/gdb/language.c
index bc00b473a6c..d7050622a3a 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -578,131 +578,6 @@ binop_result_type (struct value *v1, struct value *v2)
}
#endif /* 0 */
-
-
-/* This page contains functions that return format strings for
- printf for printing out numbers in different formats */
-
-/* Returns the appropriate printf format for hexadecimal
- numbers. */
-char *
-local_hex_format_custom (char *pre)
-{
- static char form[50];
-
- strcpy (form, local_hex_format_prefix ());
- strcat (form, "%");
- strcat (form, pre);
- strcat (form, local_hex_format_specifier ());
- strcat (form, local_hex_format_suffix ());
- return form;
-}
-
-/* Converts a LONGEST to custom hexadecimal and stores it in a static
- string. Returns a pointer to this string. */
-char *
-local_hex_string (LONGEST num)
-{
- return local_hex_string_custom (num, "l");
-}
-
-/* Converts a LONGEST number to custom hexadecimal and stores it in a static
- string. Returns a pointer to this string. Note that the width parameter
- should end with "l", e.g. "08l" as with calls to local_hex_string_custom */
-
-char *
-local_hex_string_custom (LONGEST num, char *width)
-{
-#define RESULT_BUF_LEN 50
- static char res2[RESULT_BUF_LEN];
- char format[RESULT_BUF_LEN];
- int field_width;
- int num_len;
- int num_pad_chars;
- char *pad_char; /* string with one character */
- int pad_on_left;
- char *parse_ptr;
- char temp_nbr_buf[RESULT_BUF_LEN];
-
- /* Use phex_nz to print the number into a string, then
- build the result string from local_hex_format_prefix, padding and
- the hex representation as indicated by "width". */
- strcpy (temp_nbr_buf, phex_nz (num, sizeof (num)));
- /* parse width */
- parse_ptr = width;
- pad_on_left = 1;
- pad_char = " ";
- if (*parse_ptr == '-')
- {
- parse_ptr++;
- pad_on_left = 0;
- }
- if (*parse_ptr == '0')
- {
- parse_ptr++;
- if (pad_on_left)
- pad_char = "0"; /* If padding is on the right, it is blank */
- }
- field_width = atoi (parse_ptr);
- num_len = strlen (temp_nbr_buf);
- num_pad_chars = field_width - strlen (temp_nbr_buf); /* possibly negative */
-
- if (strlen (local_hex_format_prefix ()) + num_len + num_pad_chars
- >= RESULT_BUF_LEN) /* paranoia */
- internal_error (__FILE__, __LINE__,
- "local_hex_string_custom: insufficient space to store result");
-
- strcpy (res2, local_hex_format_prefix ());
- if (pad_on_left)
- {
- while (num_pad_chars > 0)
- {
- strcat (res2, pad_char);
- num_pad_chars--;
- }
- }
- strcat (res2, temp_nbr_buf);
- if (!pad_on_left)
- {
- while (num_pad_chars > 0)
- {
- strcat (res2, pad_char);
- num_pad_chars--;
- }
- }
- return res2;
-
-} /* local_hex_string_custom */
-
-/* Returns the appropriate printf format for octal
- numbers. */
-char *
-local_octal_format_custom (char *pre)
-{
- static char form[50];
-
- strcpy (form, local_octal_format_prefix ());
- strcat (form, "%");
- strcat (form, pre);
- strcat (form, local_octal_format_specifier ());
- strcat (form, local_octal_format_suffix ());
- return form;
-}
-
-/* Returns the appropriate printf format for decimal numbers. */
-char *
-local_decimal_format_custom (char *pre)
-{
- static char form[50];
-
- strcpy (form, local_decimal_format_prefix ());
- strcat (form, "%");
- strcat (form, pre);
- strcat (form, local_decimal_format_specifier ());
- strcat (form, local_decimal_format_suffix ());
- return form;
-}
-
#if 0
/* This page contains functions that are used in type/range checking.
They all return zero if the type/range check fails.
@@ -1176,6 +1051,16 @@ language_demangle (const struct language_defn *current_language,
return NULL;
}
+/* Return class name from physname or NULL. */
+char *
+language_class_name_from_physname (const struct language_defn *current_language,
+ const char *physname)
+{
+ if (current_language != NULL && current_language->la_class_name_from_physname)
+ return current_language->la_class_name_from_physname (physname);
+ return NULL;
+}
+
/* Return the default string containing the list of characters
delimiting words. This is a reasonable default value that
most languages should be able to use. */
@@ -1258,27 +1143,38 @@ static char *unk_lang_demangle (const char *mangled, int options)
return cplus_demangle (mangled, options);
}
-
-static struct type **const (unknown_builtin_types[]) =
+static char *unk_lang_class_name (const char *mangled)
{
- 0
-};
+ return NULL;
+}
+
static const struct op_print unk_op_print_tab[] =
{
{NULL, OP_NULL, PREC_NULL, 0}
};
+static void
+unknown_language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai)
+{
+ lai->string_char_type = builtin_type (gdbarch)->builtin_char;
+ lai->primitive_type_vector = GDBARCH_OBSTACK_CALLOC (gdbarch, 1,
+ struct type *);
+}
+
const struct language_defn unknown_language_defn =
{
"unknown",
language_unknown,
- &unknown_builtin_types[0],
+ NULL,
range_check_off,
type_check_off,
+ array_row_major,
case_sensitive_on,
&exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
+ null_post_parser,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1291,15 +1187,13 @@ const struct language_defn unknown_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ unk_lang_class_name, /* Language specific class_name_from_physname */
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ unknown_language_arch_info, /* la_language_arch_info. */
LANG_MAGIC
};
@@ -1308,13 +1202,15 @@ const struct language_defn auto_language_defn =
{
"auto",
language_auto,
- &unknown_builtin_types[0],
+ NULL,
range_check_off,
type_check_off,
+ array_row_major,
case_sensitive_on,
&exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
+ null_post_parser,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1327,15 +1223,13 @@ const struct language_defn auto_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ unk_lang_class_name, /* Language specific class_name_from_physname */
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ unknown_language_arch_info, /* la_language_arch_info. */
LANG_MAGIC
};
@@ -1343,13 +1237,15 @@ const struct language_defn local_language_defn =
{
"local",
language_auto,
- &unknown_builtin_types[0],
+ NULL,
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
+ null_post_parser,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1362,18 +1258,86 @@ const struct language_defn local_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ unk_lang_class_name, /* Language specific class_name_from_physname */
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ unknown_language_arch_info, /* la_language_arch_info. */
LANG_MAGIC
};
+/* Per-architecture language information. */
+
+static struct gdbarch_data *language_gdbarch_data;
+
+struct language_gdbarch
+{
+ /* A vector of per-language per-architecture info. Indexed by "enum
+ language". */
+ struct language_arch_info arch_info[nr_languages];
+};
+
+static void *
+language_gdbarch_post_init (struct gdbarch *gdbarch)
+{
+ struct language_gdbarch *l;
+ int i;
+
+ l = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct language_gdbarch);
+ for (i = 0; i <= languages_size; i++)
+ {
+ if (languages[i] != NULL
+ && languages[i]->la_language_arch_info != NULL)
+ languages[i]->la_language_arch_info
+ (gdbarch, l->arch_info + languages[i]->la_language);
+ }
+ return l;
+}
+
+struct type *
+language_string_char_type (const struct language_defn *la,
+ struct gdbarch *gdbarch)
+{
+ struct language_gdbarch *ld = gdbarch_data (gdbarch,
+ language_gdbarch_data);
+ if (ld->arch_info[la->la_language].string_char_type != NULL)
+ return ld->arch_info[la->la_language].string_char_type;
+ else
+ return (*la->string_char_type);
+}
+
+struct type *
+language_lookup_primitive_type_by_name (const struct language_defn *la,
+ struct gdbarch *gdbarch,
+ const char *name)
+{
+ struct language_gdbarch *ld = gdbarch_data (gdbarch,
+ language_gdbarch_data);
+ if (ld->arch_info[la->la_language].primitive_type_vector != NULL)
+ {
+ struct type *const *p;
+ for (p = ld->arch_info[la->la_language].primitive_type_vector;
+ (*p) != NULL;
+ p++)
+ {
+ if (strcmp (TYPE_NAME (*p), name) == 0)
+ return (*p);
+ }
+ }
+ else
+ {
+ struct type **const *p;
+ for (p = current_language->la_builtin_type_vector; *p != NULL; p++)
+ {
+ if (strcmp (TYPE_NAME (**p), name) == 0)
+ return (**p);
+ }
+ }
+ return (NULL);
+}
+
/* Initialize the language routines */
void
@@ -1381,13 +1345,16 @@ _initialize_language (void)
{
struct cmd_list_element *set, *show;
+ language_gdbarch_data
+ = gdbarch_data_register_post_init (language_gdbarch_post_init);
+
/* GDB commands for language specific stuff */
set = add_set_cmd ("language", class_support, var_string_noescape,
(char *) &language,
"Set the current source language.",
&setlist);
- show = add_show_from_set (set, &showlist);
+ show = deprecated_add_show_from_set (set, &showlist);
set_cmd_cfunc (set, set_language_command);
set_cmd_cfunc (show, show_language_command);
@@ -1407,7 +1374,7 @@ _initialize_language (void)
(char *) &type,
"Set type checking. (on/warn/off/auto)",
&setchecklist);
- show = add_show_from_set (set, &showchecklist);
+ show = deprecated_add_show_from_set (set, &showchecklist);
set_cmd_cfunc (set, set_type_command);
set_cmd_cfunc (show, show_type_command);
@@ -1415,7 +1382,7 @@ _initialize_language (void)
(char *) &range,
"Set range checking. (on/warn/off/auto)",
&setchecklist);
- show = add_show_from_set (set, &showchecklist);
+ show = deprecated_add_show_from_set (set, &showchecklist);
set_cmd_cfunc (set, set_range_command);
set_cmd_cfunc (show, show_range_command);
@@ -1424,7 +1391,7 @@ _initialize_language (void)
"Set case sensitivity in name search. (on/off/auto)\n\
For Fortran the default is off; for other languages the default is on.",
&setlist);
- show = add_show_from_set (set, &showlist);
+ show = deprecated_add_show_from_set (set, &showlist);
set_cmd_cfunc (set, set_case_command);
set_cmd_cfunc (show, show_case_command);
diff --git a/gdb/language.h b/gdb/language.h
index 8ed9fb08417..1a54f05f29e 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -96,6 +96,17 @@ extern enum case_mode
}
case_mode;
+/* array_ordering ==
+ array_row_major: Arrays are in row major order
+ array_column_major: Arrays are in column major order.*/
+
+extern enum array_ordering
+ {
+ array_row_major, array_column_major
+ }
+array_ordering;
+
+
/* case_sensitivity ==
case_sensitive_on: Case sensitivity in name matching is used
case_sensitive_off: Case sensitivity in name matching is not used */
@@ -106,36 +117,25 @@ extern enum case_sensitivity
}
case_sensitivity;
-/* Information for doing language dependent formatting of printed values. */
-
-struct language_format_info
- {
- /* The format that can be passed directly to standard C printf functions
- to generate a completely formatted value in the format appropriate for
- the language. */
-
- char *la_format;
-
- /* The prefix to be used when directly printing a value, or constructing
- a standard C printf format. This generally is everything up to the
- conversion specification (the part introduced by the '%' character
- and terminated by the conversion specifier character). */
-
- char *la_format_prefix;
-
- /* The conversion specifier. This is generally everything after the
- field width and precision, typically only a single character such
- as 'o' for octal format or 'x' for hexadecimal format. */
-
- char *la_format_specifier;
-
- /* The suffix to be used when directly printing a value, or constructing
- a standard C printf format. This generally is everything after the
- conversion specification (the part introduced by the '%' character
- and terminated by the conversion specifier character). */
-
- char *la_format_suffix; /* Suffix for custom format string */
- };
+/* Per architecture (OS/ABI) language information. */
+
+struct language_arch_info
+{
+ /* Its primitive types. This is a vector ended by a NULL pointer.
+ These types can be specified by name in parsing types in
+ expressions, regardless of whether the program being debugged
+ actually defines such a type. */
+ struct type **primitive_type_vector;
+ /* Type of elements of strings. */
+ struct type *string_char_type;
+};
+
+struct type *language_string_char_type (const struct language_defn *l,
+ struct gdbarch *gdbarch);
+
+struct type *language_lookup_primitive_type_by_name (const struct language_defn *l,
+ struct gdbarch *gdbarch,
+ const char *name);
/* Structure tying together assorted information about a language. */
@@ -167,6 +167,9 @@ struct language_defn
/* Default case sensitivity */
enum case_sensitivity la_case_sensitivity;
+ /* Multi-dimensional array ordering */
+ enum array_ordering la_array_ordering;
+
/* Definitions related to expression printing, prefixifying, and
dumping */
@@ -180,6 +183,14 @@ struct language_defn
void (*la_error) (char *);
+ /* Given an expression *EXPP created by prefixifying the result of
+ la_parser, perform any remaining processing necessary to complete
+ its translation. *EXPP may change; la_post_parser is responsible
+ for releasing its previous contents, if necessary. If
+ VOID_CONTEXT_P, then no value is expected from the expression. */
+
+ void (*la_post_parser) (struct expression ** expp, int void_context_p);
+
void (*la_printchar) (int ch, struct ui_file * stream);
void (*la_printstr) (struct ui_file * stream, char *string,
@@ -239,21 +250,8 @@ struct language_defn
/* Return demangled language symbol, or NULL. */
char *(*la_demangle) (const char *mangled, int options);
- /* Base 2 (binary) formats. */
-
- struct language_format_info la_binary_format;
-
- /* Base 8 (octal) formats. */
-
- struct language_format_info la_octal_format;
-
- /* Base 10 (decimal) formats */
-
- struct language_format_info la_decimal_format;
-
- /* Base 16 (hexadecimal) formats */
-
- struct language_format_info la_hex_format;
+ /* Return class name of a mangled method name or NULL. */
+ char *(*la_class_name_from_physname) (const char *physname);
/* Table for printing expressions */
@@ -273,6 +271,10 @@ struct language_defn
/* The list of characters forming word boundaries. */
char *(*la_word_break_characters) (void);
+ /* The per-architecture (OS/ABI) language information. */
+ void (*la_language_arch_info) (struct gdbarch *,
+ struct language_arch_info *);
+
/* Add fields above this point, so the magic number is always last. */
/* Magic number for compat checking */
@@ -353,47 +355,6 @@ extern enum language set_language (enum language);
#define LA_VALUE_PRINT(val,stream,fmt,pretty) \
(current_language->la_value_print(val,stream,fmt,pretty))
-/* Return a format string for printf that will print a number in one of
- the local (language-specific) formats. Result is static and is
- overwritten by the next call. Takes printf options like "08" or "l"
- (to produce e.g. %08x or %lx). */
-
-#define local_binary_format() \
- (current_language->la_binary_format.la_format)
-#define local_binary_format_prefix() \
- (current_language->la_binary_format.la_format_prefix)
-#define local_binary_format_specifier() \
- (current_language->la_binary_format.la_format_specifier)
-#define local_binary_format_suffix() \
- (current_language->la_binary_format.la_format_suffix)
-
-#define local_octal_format() \
- (current_language->la_octal_format.la_format)
-#define local_octal_format_prefix() \
- (current_language->la_octal_format.la_format_prefix)
-#define local_octal_format_specifier() \
- (current_language->la_octal_format.la_format_specifier)
-#define local_octal_format_suffix() \
- (current_language->la_octal_format.la_format_suffix)
-
-#define local_decimal_format() \
- (current_language->la_decimal_format.la_format)
-#define local_decimal_format_prefix() \
- (current_language->la_decimal_format.la_format_prefix)
-#define local_decimal_format_specifier() \
- (current_language->la_decimal_format.la_format_specifier)
-#define local_decimal_format_suffix() \
- (current_language->la_decimal_format.la_format_suffix)
-
-#define local_hex_format() \
- (current_language->la_hex_format.la_format)
-#define local_hex_format_prefix() \
- (current_language->la_hex_format.la_format_prefix)
-#define local_hex_format_specifier() \
- (current_language->la_hex_format.la_format_specifier)
-#define local_hex_format_suffix() \
- (current_language->la_hex_format.la_format_suffix)
-
#define LA_PRINT_CHAR(ch, stream) \
(current_language->la_printchar(ch, stream))
#define LA_PRINT_STRING(stream, string, length, width, force_ellipses) \
@@ -412,17 +373,6 @@ extern enum language set_language (enum language);
&& ((c) < 0x7F || (c) >= 0xA0) \
&& (!sevenbit_strings || (c) < 0x80))
-/* Return a format string for printf that will print a number in one of
- the local (language-specific) formats. Result is static and is
- overwritten by the next call. Takes printf options like "08" or "l"
- (to produce e.g. %08x or %lx). */
-
-extern char *local_decimal_format_custom (char *); /* language.c */
-
-extern char *local_octal_format_custom (char *); /* language.c */
-
-extern char *local_hex_format_custom (char *); /* language.c */
-
#if 0
/* FIXME: cagney/2000-03-04: This function does not appear to be used.
It can be deleted once 5.0 has been released. */
@@ -432,14 +382,6 @@ extern char *local_hex_format_custom (char *); /* language.c */
extern char *longest_raw_hex_string (LONGEST);
#endif
-/* Return a string that contains a number formatted in one of the local
- (language-specific) formats. Result is static and is overwritten by
- the next call. Takes printf options like "08l" or "l". */
-
-extern char *local_hex_string (LONGEST); /* language.c */
-
-extern char *local_hex_string_custom (LONGEST, char *); /* language.c */
-
/* Type predicates */
extern int simple_type (struct type *);
@@ -508,6 +450,10 @@ extern CORE_ADDR skip_language_trampoline (CORE_ADDR pc);
extern char *language_demangle (const struct language_defn *current_language,
const char *mangled, int options);
+/* Return class name from physname, or NULL. */
+extern char *language_class_name_from_physname (const struct language_defn *,
+ const char *physname);
+
/* Splitting strings into words. */
extern char *default_word_break_characters (void);
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
index d7e8dbca3e4..fd953d2bd9c 100644
--- a/gdb/libunwind-frame.c
+++ b/gdb/libunwind-frame.c
@@ -1,6 +1,6 @@
/* Frame unwinder for frames using the libunwind library.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Written by Jeff Johnston, contributed by Red Hat Inc.
@@ -45,10 +45,6 @@
static int libunwind_initialized;
static struct gdbarch_data *libunwind_descr_handle;
-#ifndef LIBUNWIND_SO
-#define LIBUNWIND_SO "libunwind.so"
-#endif
-
/* Required function pointers from libunwind. */
static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
@@ -75,6 +71,10 @@ struct libunwind_frame_cache
#define STRINGIFY2(name) #name
#define STRINGIFY(name) STRINGIFY2(name)
+#ifndef LIBUNWIND_SO
+#define LIBUNWIND_SO "libunwind-" STRINGIFY(UNW_TARGET) ".so"
+#endif
+
static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg));
static char *get_fpreg_name = STRINGIFY(UNW_OBJ(get_fpreg));
static char *get_saveloc_name = STRINGIFY(UNW_OBJ(get_save_loc));
@@ -259,7 +259,8 @@ libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
*lvalp = not_lval;
*realnump = -1;
- memset (valuep, 0, register_size (current_gdbarch, regnum));
+ if (valuep)
+ memset (valuep, 0, register_size (current_gdbarch, regnum));
if (uw_regnum < 0)
return;
@@ -281,7 +282,8 @@ libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
if (ret < 0)
return;
- memcpy (valuep, ptr, register_size (current_gdbarch, regnum));
+ if (valuep)
+ memcpy (valuep, ptr, register_size (current_gdbarch, regnum));
if (unw_get_saveloc_p (&cache->cursor, uw_regnum, &sl) < 0)
return;
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index 23cf2c4a9b4..5971630f9e8 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -1213,6 +1213,7 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
ptrace (PTRACE_DETACH, ourstatus->value.related_pid, 0, 0);
ourstatus->kind = TARGET_WAITKIND_IGNORE;
+ ptrace (PTRACE_CONT, pid, 0, 0);
pid = -1;
save_errno = EINTR;
}
@@ -1758,9 +1759,10 @@ lin_lwp_kill (void)
}
static void
-lin_lwp_create_inferior (char *exec_file, char *allargs, char **env)
+lin_lwp_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- child_ops.to_create_inferior (exec_file, allargs, env);
+ child_ops.to_create_inferior (exec_file, allargs, env, from_tty);
}
static void
@@ -1895,9 +1897,10 @@ _initialize_lin_lwp (void)
sigemptyset (&blocked_mask);
- add_show_from_set (add_set_cmd ("lin-lwp", no_class, var_zinteger,
- (char *) &debug_lin_lwp,
- "Set debugging of GNU/Linux lwp module.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("lin-lwp", no_class, var_zinteger,
+ (char *) &debug_lin_lwp,
+ "Set debugging of GNU/Linux lwp module.\n\
Enables printf debugging output.\n", &setdebuglist), &showdebuglist);
}
diff --git a/gdb/linespec.c b/gdb/linespec.c
index eedc671fd00..1371f028333 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1842,7 +1842,7 @@ minsym_found (int funfirstline, struct minimal_symbol *msymbol)
values.sals[0].section = SYMBOL_BFD_SECTION (msymbol);
if (funfirstline)
{
- values.sals[0].pc += FUNCTION_START_OFFSET;
+ values.sals[0].pc += DEPRECATED_FUNCTION_START_OFFSET;
values.sals[0].pc = SKIP_PROLOGUE (values.sals[0].pc);
}
values.nelts = 1;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index e421c9ca221..15b67042290 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -500,12 +500,12 @@ kill_inferior (void)
if (last.kind == TARGET_WAITKIND_FORKED
|| last.kind == TARGET_WAITKIND_VFORKED)
{
- ptrace (PT_KILL, last.value.related_pid);
+ ptrace (PT_KILL, last.value.related_pid, 0, 0);
ptrace_wait (null_ptid, &status);
}
/* Kill the current process. */
- ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
+ ptrace (PT_KILL, pid, 0, 0);
ret = ptrace_wait (null_ptid, &status);
/* We might get a SIGCHLD instead of an exit status. This is
@@ -513,7 +513,7 @@ kill_inferior (void)
while (ret == pid && WIFSTOPPED (status))
{
- ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
+ ptrace (PT_KILL, pid, 0, 0);
ret = ptrace_wait (null_ptid, &status);
}
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 7bfd40ee56e..1517cb5d2ec 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -313,7 +313,7 @@ fetch_inferior_registers (int regno)
ptrace_fun = regno == SP_REGNUM ? PTRACE_PEEKUSP : PTRACE_PEEKTHREAD;
#endif
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < register_size (current_gdbarch, regno); i += sizeof (int))
{
unsigned int reg;
@@ -325,7 +325,7 @@ fetch_inferior_registers (int regno)
*(int *) &buf[i] = reg;
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
}
@@ -362,7 +362,7 @@ store_inferior_registers (int regno)
ptrace_fun = regno == SP_REGNUM ? PTRACE_POKEUSP : PTRACE_POKEUSER;
#endif
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < register_size (current_gdbarch, regno); i += sizeof (int))
{
unsigned int reg;
@@ -593,8 +593,8 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
for (regno = 0; regno < NUM_REGS; regno++)
if (regmap[regno] != -1)
- supply_register (regno, core_reg_sect + offsetof (st_t, ec)
- + regmap[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ core_reg_sect + offsetof (st_t, ec) + regmap[regno]);
#ifdef SPARC
/* Fetching this register causes all of the I & L regs to be read from the
@@ -620,5 +620,5 @@ static struct core_fns lynx_core_fns =
void
_initialize_core_lynx (void)
{
- add_core_fns (&lynx_core_fns);
+ deprecated_add_core_fns (&lynx_core_fns);
}
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index e5b6b500e7c..fbb1fa30614 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -415,9 +415,11 @@ const struct language_defn m2_language_defn =
range_check_on,
type_check_on,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
m2_parse, /* parser */
m2_error, /* parser error function */
+ null_post_parser,
m2_printchar, /* Print character constant */
m2_printstr, /* function to print string constant */
m2_emit_char, /* Function to print a single character */
@@ -430,15 +432,13 @@ const struct language_defn m2_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"%loB", "", "o", "B"}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0%lXH", "0", "X", "H"}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
m2_op_print_tab, /* expression operators for printing */
0, /* arrays are first-class (not c-style) */
0, /* String lower bound */
&builtin_type_m2_char, /* Type of string elements */
default_word_break_characters,
+ NULL, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index ef8c2716e78..403d7535a44 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -1,7 +1,8 @@
/* Remote debugging interface to m32r and mon2000 ROM monitors for GDB,
the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2004 Free Software
+ Foundation, Inc.
Adapted by Michael Snyder of Cygnus Support.
@@ -319,7 +320,7 @@ init_m32r_cmds (void)
m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- m32r_cmds.supply_register = m32r_supply_register; /* supply_register */
+ m32r_cmds.supply_register = m32r_supply_register;
m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
m32r_cmds.load = NULL; /* download command */
m32r_cmds.loadresp = NULL; /* load response */
@@ -379,7 +380,7 @@ init_mon2000_cmds (void)
mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */
mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
+ mon2000_cmds.supply_register = m32r_supply_register;
mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
mon2000_cmds.load = NULL; /* download command */
mon2000_cmds.loadresp = NULL; /* load response */
@@ -557,22 +558,25 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
mon2000_ops.to_open = mon2000_open;
add_target (&mon2000_ops);
- add_setshow_cmd ("download-path", class_obscure,
- var_string, &download_path,
- "Set the default path for downloadable SREC files.",
- "Show the default path for downloadable SREC files.",
+ add_setshow_string_cmd ("download-path", class_obscure, &download_path, "\
+Set the default path for downloadable SREC files.", "\
+Show the default path for downloadable SREC files.", "\
+Determines the default path for downloadable SREC files.", "\
+The default path for downloadable SREC files is %s.",
NULL, NULL, &setlist, &showlist);
- add_setshow_cmd ("board-address", class_obscure,
- var_string, &board_addr,
- "Set IP address for M32R-EVA target board.",
- "Show IP address for M32R-EVA target board.",
+ add_setshow_string_cmd ("board-address", class_obscure, &board_addr, "\
+Set IP address for M32R-EVA target board.", "\
+Show IP address for M32R-EVA target board.", "\
+Determine the IP address for M32R-EVA target board.", "\
+IP address for M32R-EVA target board is %s",
NULL, NULL, &setlist, &showlist);
- add_setshow_cmd ("server-address", class_obscure,
- var_string, &server_addr,
- "Set IP address for download server (GDB's host computer).",
- "Show IP address for download server (GDB's host computer).",
+ add_setshow_string_cmd ("server-address", class_obscure, &server_addr, "\
+Set IP address for download server (GDB's host computer).", "\
+Show IP address for download server (GDB's host computer).", "\
+Determine the IP address for download server (GDB's host computer).", "\
+IP address for download server (GDB's host computer) is %s.",
NULL, NULL, &setlist, &showlist);
add_com ("upload", class_obscure, m32r_upload_command,
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 1cc522c5a5a..fd5e9dc836a 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -686,7 +686,7 @@ m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR
-m32r_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -844,16 +844,6 @@ m32r_frame_this_id (struct frame_info *next_frame,
return;
id = frame_id_build (base, func);
-
- /* Check that we're not going round in circles with the same frame
- ID (but avoid applying the test to sentinel frames which do go
- round in circles). Can't use frame_id_eq() as that doesn't yet
- compare the frame's PC value. */
- if (frame_relative_level (next_frame) >= 0
- && get_frame_type (next_frame) != DUMMY_FRAME
- && frame_id_eq (get_frame_id (next_frame), id))
- return;
-
(*this_id) = id;
}
@@ -866,8 +856,8 @@ m32r_frame_prev_register (struct frame_info *next_frame,
{
struct m32r_unwind_cache *info
= m32r_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind m32r_frame_unwind = {
@@ -940,7 +930,7 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, m32r_push_dummy_call);
set_gdbarch_store_return_value (gdbarch, m32r_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m32r_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, m32r_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, m32r_use_struct_convention);
set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
@@ -950,8 +940,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_memory_remove_breakpoint (gdbarch,
m32r_memory_remove_breakpoint);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
-
set_gdbarch_frame_align (gdbarch, m32r_frame_align);
frame_unwind_append_sniffer (gdbarch, m32r_frame_sniffer);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index efe050955eb..4aa5c00f872 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -899,16 +899,6 @@ m68hc11_frame_this_id (struct frame_info *next_frame,
return;
id = frame_id_build (base, func);
-#if 0
- /* Check that we're not going round in circles with the same frame
- ID (but avoid applying the test to sentinel frames which do go
- round in circles). Can't use frame_id_eq() as that doesn't yet
- compare the frame's PC value. */
- if (frame_relative_level (next_frame) >= 0
- && get_frame_type (next_frame) != DUMMY_FRAME
- && frame_id_eq (get_frame_id (next_frame), id))
- return;
-#endif
(*this_id) = id;
}
@@ -922,8 +912,8 @@ m68hc11_frame_prev_register (struct frame_info *next_frame,
struct m68hc11_unwind_cache *info
= m68hc11_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
if (regnum == HARD_PC_REGNUM)
{
@@ -936,9 +926,9 @@ m68hc11_frame_prev_register (struct frame_info *next_frame,
CORE_ADDR page;
- trad_frame_prev_register (next_frame, info->saved_regs,
- HARD_PAGE_REGNUM, &page_optimized,
- 0, &page, 0, 0);
+ trad_frame_get_prev_register (next_frame, info->saved_regs,
+ HARD_PAGE_REGNUM, &page_optimized,
+ 0, &page, 0, 0);
*addrp -= 0x08000;
*addrp += ((page & 0x0ff) << 14);
*addrp += 0x1000000;
@@ -1182,7 +1172,7 @@ m68hc11_stack_align (CORE_ADDR addr)
}
static CORE_ADDR
-m68hc11_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1342,31 +1332,24 @@ m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-/* Should call_function allocate stack space for a struct return? */
-static int
-m68hc11_use_struct_convention (int gcc_p, struct type *type)
-{
- return (TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION
- || TYPE_LENGTH (type) > 4);
-}
-
-static int
-m68hc11_return_value_on_stack (struct type *type)
-{
- return TYPE_LENGTH (type) > 4;
-}
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
-static CORE_ADDR
-m68hc11_extract_struct_value_address (struct regcache *regcache)
+enum return_value_convention
+m68hc11_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- char buf[M68HC11_REG_SIZE];
-
- regcache_cooked_read (regcache, HARD_D_REGNUM, buf);
- return extract_unsigned_integer (buf, M68HC11_REG_SIZE);
+ if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION
+ || TYPE_CODE (valtype) == TYPE_CODE_ARRAY
+ || TYPE_LENGTH (valtype) > 4)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else
+ {
+ if (readbuf != NULL)
+ m68hc11_extract_return_value (valtype, regcache, readbuf);
+ if (writebuf != NULL)
+ m68hc11_store_return_value (valtype, regcache, writebuf);
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
}
/* Test whether the ELF symbol corresponds to a function using rtc or
@@ -1549,12 +1532,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_push_dummy_call (gdbarch, m68hc11_push_dummy_call);
- set_gdbarch_extract_return_value (gdbarch, m68hc11_extract_return_value);
- set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
-
- set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, m68hc11_use_struct_convention);
+ set_gdbarch_return_value (gdbarch, m68hc11_return_value);
set_gdbarch_skip_prologue (gdbarch, m68hc11_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, m68hc11_breakpoint_from_pc);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 7fceb8b991d..1ada90a4488 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1,4 +1,4 @@
-/* Target dependent code for the Motorola 68000 series.
+/* Target-dependent code for the Motorola 68000 series.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@@ -25,6 +25,7 @@
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
+#include "floatformat.h"
#include "symtab.h"
#include "gdbcore.h"
#include "value.h"
@@ -64,11 +65,6 @@
#define BPT_VECTOR 0xf
#endif
-#if !defined (REMOTE_BPT_VECTOR)
-#define REMOTE_BPT_VECTOR 1
-#endif
-
-
static const unsigned char *
m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
@@ -134,8 +130,92 @@ m68k_register_name (int regnum)
return register_names[regnum];
}
-/* Extract from an array REGBUF containing the (raw) register state, a
- function return value of TYPE, and copy that, in virtual format,
+/* Return nonzero if a value of type TYPE stored in register REGNUM
+ needs any special handling. */
+
+static int
+m68k_convert_register_p (int regnum, struct type *type)
+{
+ return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FP0_REGNUM + 7);
+}
+
+/* Read a value of type TYPE from register REGNUM in frame FRAME, and
+ return its contents in TO. */
+
+static void
+m68k_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to)
+{
+ char from[M68K_MAX_REGISTER_SIZE];
+
+ /* 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.");
+ return;
+ }
+
+ /* Convert to TYPE. This should be a no-op if TYPE is equivalent to
+ the extended floating-point format used by the FPU. */
+ get_frame_register (frame, regnum, from);
+ convert_typed_floating (from, builtin_type_m68881_ext, to, type);
+}
+
+/* Write the contents FROM of a value of type TYPE into register
+ REGNUM in frame FRAME. */
+
+static void
+m68k_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from)
+{
+ char to[M68K_MAX_REGISTER_SIZE];
+
+ /* We only support floating-point values. */
+ if (TYPE_CODE (type) != TYPE_CODE_FLT)
+ {
+ warning ("Cannot convert non-floating-point type "
+ "to floating-point register value.");
+ return;
+ }
+
+ /* Convert from TYPE. This should be a no-op if TYPE is equivalent
+ to the extended floating-point format used by the FPU. */
+ convert_typed_floating (from, type, to, builtin_type_m68881_ext);
+ put_frame_register (frame, regnum, to);
+}
+
+
+/* There is a fair number of calling conventions that are in somewhat
+ wide use. The 68000/08/10 don't support an FPU, not even as a
+ coprocessor. All function return values are stored in %d0/%d1.
+ Structures are returned in a static buffer, a pointer to which is
+ returned in %d0. This means that functions returning a structure
+ are not re-entrant. To avoid this problem some systems use a
+ convention where the caller passes a pointer to a buffer in %a1
+ where the return values is to be stored. This convention is the
+ default, and is implemented in the function m68k_return_value.
+
+ The 68020/030/040/060 do support an FPU, either as a coprocessor
+ (68881/2) or built-in (68040/68060). That's why System V release 4
+ (SVR4) instroduces a new calling convention specified by the SVR4
+ psABI. Integer values are returned in %d0/%d1, pointer return
+ values in %a0 and floating values in %fp0. When calling functions
+ returning a structure the caller should pass a pointer to a buffer
+ for the return value in %a0. This convention is implemented in the
+ function m68k_svr4_return_value, and by appropriately setting the
+ struct_value_regnum member of `struct gdbarch_tdep'.
+
+ GNU/Linux returns values in the same way as SVR4 does, but uses %a1
+ for passing the structure return value buffer.
+
+ GCC can also generate code where small structures are returned in
+ %d0/%d1 instead of in memory by using -freg-struct-return. This is
+ the default on NetBSD a.out, OpenBSD and GNU/Linux and several
+ embedded systems. This convention is implemented by setting the
+ struct_return member of `struct gdbarch_tdep' to reg_struct_return. */
+
+/* Read a function return value of TYPE from REGCACHE, and copy that
into VALBUF. */
static void
@@ -145,13 +225,6 @@ m68k_extract_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
char buf[M68K_MAX_REGISTER_SIZE];
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
- {
- m68k_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
- return;
- }
-
if (len <= 4)
{
regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
@@ -169,29 +242,39 @@ m68k_extract_return_value (struct type *type, struct regcache *regcache,
"Cannot extract return value of %d bytes long.", len);
}
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
-
static void
-m68k_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
int len = TYPE_LENGTH (type);
+ char buf[M68K_MAX_REGISTER_SIZE];
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
+ if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- m68k_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
- return;
+ regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
+ convert_typed_floating (buf, builtin_type_m68881_ext, valbuf, type);
}
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
+ regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
+ else
+ m68k_extract_return_value (type, regcache, valbuf);
+}
+
+/* Write a function return value of TYPE from VALBUF into REGCACHE. */
+
+static void
+m68k_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
if (len <= 4)
regcache_raw_write_part (regcache, M68K_D0_REGNUM, 4 - len, len, valbuf);
else if (len <= 8)
{
- regcache_raw_write_part (regcache, M68K_D1_REGNUM, 8 - len,
+ regcache_raw_write_part (regcache, M68K_D0_REGNUM, 8 - len,
len - 4, valbuf);
- regcache_raw_write (regcache, M68K_D0_REGNUM,
+ regcache_raw_write (regcache, M68K_D1_REGNUM,
(char *) valbuf + (len - 4));
}
else
@@ -199,105 +282,135 @@ m68k_store_return_value (struct type *type, struct regcache *regcache,
"Cannot store return value of %d bytes long.", len);
}
-/* Extract from REGCACHE, which contains the (raw) register state, the
- address in which a function should return its structure value, as a
- CORE_ADDR. */
-
-static CORE_ADDR
-m68k_extract_struct_value_address (struct regcache *regcache)
+static void
+m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
- char buf[4];
+ int len = TYPE_LENGTH (type);
- regcache_cooked_read (regcache, M68K_D0_REGNUM, buf);
- return extract_unsigned_integer (buf, 4);
+ if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ {
+ char buf[M68K_MAX_REGISTER_SIZE];
+ convert_typed_floating (valbuf, type, buf, builtin_type_m68881_ext);
+ regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
+ }
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
+ {
+ regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
+ regcache_raw_write (regcache, M68K_D0_REGNUM, valbuf);
+ }
+ else
+ m68k_store_return_value (type, regcache, valbuf);
}
+/* Return non-zero if TYPE, which is assumed to be a structure or
+ union type, should be returned in registers for architecture
+ GDBARCH. */
+
static int
-m68k_use_struct_convention (int gcc_p, struct type *type)
+m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
{
- enum struct_return struct_return;
-
- struct_return = gdbarch_tdep (current_gdbarch)->struct_return;
- return generic_use_struct_convention (struct_return == reg_struct_return,
- type);
-}
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ enum type_code code = TYPE_CODE (type);
+ int len = TYPE_LENGTH (type);
-/* A function that tells us whether the function invocation represented
- by fi does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
+ gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION);
-static int
-m68k_frameless_function_invocation (struct frame_info *fi)
-{
- if (get_frame_type (fi) == SIGTRAMP_FRAME)
+ if (tdep->struct_return == pcc_struct_return)
return 0;
- else
- return legacy_frameless_look_for_prologue (fi);
+
+ return (len == 1 || len == 2 || len == 4 || len == 8);
}
-int
-delta68_in_sigtramp (CORE_ADDR pc, char *name)
+/* Determine, for architecture GDBARCH, how a return value of TYPE
+ should be returned. If it is supposed to be returned in registers,
+ and READBUF is non-zero, read the appropriate value from REGCACHE,
+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
+ from WRITEBUF into REGCACHE. */
+
+static enum return_value_convention
+m68k_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- if (name != NULL)
- return strcmp (name, "_sigcode") == 0;
- else
- return 0;
+ enum type_code code = TYPE_CODE (type);
+
+ if ((code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION)
+ && !m68k_reg_struct_return_p (gdbarch, type))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ /* GCC returns a `long double' in memory. */
+ if (code == TYPE_CODE_FLT && TYPE_LENGTH (type) == 12)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ if (readbuf)
+ m68k_extract_return_value (type, regcache, readbuf);
+ if (writebuf)
+ m68k_store_return_value (type, regcache, writebuf);
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
-CORE_ADDR
-delta68_frame_args_address (struct frame_info *frame_info)
+static enum return_value_convention
+m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- /* we assume here that the only frameless functions are the system calls
- or other functions who do not put anything on the stack. */
- if (get_frame_type (frame_info) == SIGTRAMP_FRAME)
- return get_frame_base (frame_info) + 12;
- else if (legacy_frameless_look_for_prologue (frame_info))
+ enum type_code code = TYPE_CODE (type);
+
+ if ((code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION)
+ && !m68k_reg_struct_return_p (gdbarch, type))
{
- /* Check for an interrupted system call */
- if (get_next_frame (frame_info) && (get_frame_type (get_next_frame (frame_info)) == SIGTRAMP_FRAME))
- return get_frame_base (get_next_frame (frame_info)) + 16;
- else
- return get_frame_base (frame_info) + 4;
- }
- else
- return get_frame_base (frame_info);
-}
+ /* The System V ABI says that:
-CORE_ADDR
-delta68_frame_saved_pc (struct frame_info *frame_info)
-{
- return read_memory_unsigned_integer (delta68_frame_args_address (frame_info)
- + 4, 4);
-}
+ "A function returning a structure or union also sets %a0 to
+ the value it finds in %a0. Thus when the caller receives
+ control again, the address of the returned object resides in
+ register %a0."
-int
-delta68_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = DEPRECATED_FRAME_SAVED_PC (fi);
- int insn = read_memory_unsigned_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
+ So the ABI guarantees that we can always find the return
+ value just after the function has returned. */
+
+ if (readbuf)
+ {
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, M68K_A0_REGNUM, &addr);
+ read_memory (addr, readbuf, TYPE_LENGTH (type));
+ }
+
+ return RETURN_VALUE_ABI_RETURNS_ADDRESS;
+ }
+
+ /* This special case is for structures consisting of a single
+ `float' or `double' member. These structures are returned in
+ %fp0. For these structures, we call ourselves recursively,
+ changing TYPE into the type of the first member of the structure.
+ Since that should work for all structures that have only one
+ member, we don't bother to check the member's type here. */
+ if (code == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1)
{
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
+ type = check_typedef (TYPE_FIELD_TYPE (type, 0));
+ return m68k_svr4_return_value (gdbarch, type, regcache,
+ readbuf, writebuf);
}
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
+
+ if (readbuf)
+ m68k_svr4_extract_return_value (type, regcache, readbuf);
+ if (writebuf)
+ m68k_svr4_store_return_value (type, regcache, writebuf);
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
+
static CORE_ADDR
-m68k_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
char buf[4];
int i;
@@ -326,7 +439,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (struct_return)
{
store_unsigned_integer (buf, 4, struct_addr);
- regcache_cooked_write (regcache, M68K_A1_REGNUM, buf);
+ regcache_cooked_write (regcache, tdep->struct_value_regnum, buf);
}
/* Store return address. */
@@ -766,85 +879,6 @@ m68k_frame_sniffer (struct frame_info *next_frame)
return &m68k_frame_unwind;
}
-/* Signal trampolines. */
-
-static struct m68k_frame_cache *
-m68k_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
-{
- struct m68k_frame_cache *cache;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- struct m68k_sigtramp_info info;
- char buf[4];
- int i;
-
- if (*this_cache)
- return *this_cache;
-
- cache = m68k_alloc_frame_cache ();
-
- frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
- cache->base = extract_unsigned_integer (buf, 4) - 4;
-
- info = tdep->get_sigtramp_info (next_frame);
-
- for (i = 0; i < M68K_NUM_REGS; i++)
- if (info.sc_reg_offset[i] != -1)
- cache->saved_regs[i] = info.sigcontext_addr + info.sc_reg_offset[i];
-
- *this_cache = cache;
- return cache;
-}
-
-static void
-m68k_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
- struct frame_id *this_id)
-{
- struct m68k_frame_cache *cache =
- m68k_sigtramp_frame_cache (next_frame, this_cache);
-
- /* See the end of m68k_push_dummy_call. */
- *this_id = frame_id_build (cache->base + 8, frame_pc_unwind (next_frame));
-}
-
-static void
-m68k_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. */
- m68k_sigtramp_frame_cache (next_frame, this_cache);
-
- m68k_frame_prev_register (next_frame, this_cache, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
-}
-
-static const struct frame_unwind m68k_sigtramp_frame_unwind =
-{
- SIGTRAMP_FRAME,
- m68k_sigtramp_frame_this_id,
- m68k_sigtramp_frame_prev_register
-};
-
-static const struct frame_unwind *
-m68k_sigtramp_frame_sniffer (struct frame_info *next_frame)
-{
- CORE_ADDR pc = frame_pc_unwind (next_frame);
- char *name;
-
- /* We shouldn't even bother to try if the OSABI didn't register
- a get_sigtramp_info handler. */
- if (!gdbarch_tdep (current_gdbarch)->get_sigtramp_info)
- return NULL;
-
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (DEPRECATED_PC_IN_SIGTRAMP (pc, name))
- return &m68k_sigtramp_frame_unwind;
-
- return NULL;
-}
-
static CORE_ADDR
m68k_frame_base_address (struct frame_info *next_frame, void **this_cache)
{
@@ -929,10 +963,10 @@ supply_gregset (gregset_t *gregsetp)
for (regi = 0; regi < R_PC; regi++)
{
- supply_register (regi, (char *) (regp + regi));
+ regcache_raw_supply (current_regcache, regi, (char *) (regp + regi));
}
- supply_register (PS_REGNUM, (char *) (regp + R_PS));
- supply_register (PC_REGNUM, (char *) (regp + R_PC));
+ regcache_raw_supply (current_regcache, PS_REGNUM, (char *) (regp + R_PS));
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) (regp + R_PC));
}
void
@@ -944,12 +978,12 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi < R_PC; regi++)
{
if (regno == -1 || regno == regi)
- regcache_collect (regi, regp + regi);
+ regcache_raw_collect (current_regcache, regi, regp + regi);
}
if (regno == -1 || regno == PS_REGNUM)
- regcache_collect (PS_REGNUM, regp + R_PS);
+ regcache_raw_collect (current_regcache, PS_REGNUM, regp + R_PS);
if (regno == -1 || regno == PC_REGNUM)
- regcache_collect (PC_REGNUM, regp + R_PC);
+ regcache_raw_collect (current_regcache, PC_REGNUM, regp + R_PC);
}
#if defined (FP0_REGNUM)
@@ -967,11 +1001,14 @@ supply_fpregset (fpregset_t *fpregsetp)
for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
{
from = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- supply_register (regi, from);
+ regcache_raw_supply (current_regcache, regi, from);
}
- supply_register (M68K_FPC_REGNUM, (char *) &(fpregsetp->f_pcr));
- supply_register (M68K_FPS_REGNUM, (char *) &(fpregsetp->f_psr));
- supply_register (M68K_FPI_REGNUM, (char *) &(fpregsetp->f_fpiaddr));
+ regcache_raw_supply (current_regcache, M68K_FPC_REGNUM,
+ (char *) &(fpregsetp->f_pcr));
+ regcache_raw_supply (current_regcache, M68K_FPS_REGNUM,
+ (char *) &(fpregsetp->f_psr));
+ regcache_raw_supply (current_regcache, M68K_FPI_REGNUM,
+ (char *) &(fpregsetp->f_fpiaddr));
}
/* Given a pointer to a floating point register set in /proc format
@@ -987,14 +1024,18 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
{
if (regno == -1 || regno == regi)
- regcache_collect (regi, &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
+ regcache_raw_collect (current_regcache, regi,
+ &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
}
if (regno == -1 || regno == M68K_FPC_REGNUM)
- regcache_collect (M68K_FPC_REGNUM, &fpregsetp->f_pcr);
+ regcache_raw_collect (current_regcache, M68K_FPC_REGNUM,
+ &fpregsetp->f_pcr);
if (regno == -1 || regno == M68K_FPS_REGNUM)
- regcache_collect (M68K_FPS_REGNUM, &fpregsetp->f_psr);
+ regcache_raw_collect (current_regcache, M68K_FPS_REGNUM,
+ &fpregsetp->f_psr);
if (regno == -1 || regno == M68K_FPI_REGNUM)
- regcache_collect (M68K_FPI_REGNUM, &fpregsetp->f_fpiaddr);
+ regcache_raw_collect (current_regcache, M68K_FPI_REGNUM,
+ &fpregsetp->f_fpiaddr);
}
#endif /* defined (FP0_REGNUM) */
@@ -1006,7 +1047,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
This routine returns true on success. */
-int
+static int
m68k_get_longjmp_target (CORE_ADDR *pc)
{
char *buf;
@@ -1036,6 +1077,22 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
+
+
+/* System V Release 4 (SVR4). */
+
+void
+m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* SVR4 uses a different calling convention. */
+ set_gdbarch_return_value (gdbarch, m68k_svr4_return_value);
+
+ /* SVR4 uses %a0 instead of %a1. */
+ tdep->struct_value_regnum = M68K_A0_REGNUM;
+}
+
/* Function: m68k_gdbarch_init
Initializer function for the m68k gdbarch vector.
@@ -1063,17 +1120,10 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Stack grows down. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_parm_boundary (gdbarch, 32);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 2);
- set_gdbarch_extract_return_value (gdbarch, m68k_extract_return_value);
- set_gdbarch_store_return_value (gdbarch, m68k_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68k_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, m68k_use_struct_convention);
-
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, m68k_frameless_function_invocation);
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_register_type (gdbarch, m68k_register_type);
@@ -1084,8 +1134,12 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM);
set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, M68K_FP0_REGNUM);
+ set_gdbarch_convert_register_p (gdbarch, m68k_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, m68k_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, m68k_value_to_register);
set_gdbarch_push_dummy_call (gdbarch, m68k_push_dummy_call);
+ set_gdbarch_return_value (gdbarch, m68k_return_value);
/* Disassembler. */
set_gdbarch_print_insn (gdbarch, print_insn_m68k);
@@ -1096,8 +1150,8 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
#else
tdep->jb_pc = -1;
#endif
- tdep->get_sigtramp_info = NULL;
- tdep->struct_return = pcc_struct_return;
+ tdep->struct_value_regnum = M68K_A1_REGNUM;
+ tdep->struct_return = reg_struct_return;
/* Frame unwinder. */
set_gdbarch_unwind_dummy_id (gdbarch, m68k_unwind_dummy_id);
@@ -1117,7 +1171,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (tdep->jb_pc >= 0)
set_gdbarch_get_longjmp_target (gdbarch, m68k_get_longjmp_target);
- frame_unwind_append_sniffer (gdbarch, m68k_sigtramp_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, m68k_frame_sniffer);
return gdbarch;
diff --git a/gdb/m68k-tdep.h b/gdb/m68k-tdep.h
index 702e4fc04d5..27a7feb24f8 100644
--- a/gdb/m68k-tdep.h
+++ b/gdb/m68k-tdep.h
@@ -1,6 +1,7 @@
-/* Common target dependent code for the Motorola 68000 series.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2003
- Free Software Foundation, Inc.
+/* Target-dependent code for the Motorola 68000 series.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
+ 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,43 +25,33 @@
struct frame_info;
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
+/* Register numbers of various important registers. */
-enum
+enum m68k_regnum
{
M68K_D0_REGNUM = 0,
M68K_D1_REGNUM = 1,
+ M68K_D2_REGNUM = 2,
+ M68K_D7_REGNUM = 7,
M68K_A0_REGNUM = 8,
M68K_A1_REGNUM = 9,
- M68K_FP_REGNUM = 14, /* Contains address of executing stack frame */
- M68K_SP_REGNUM = 15, /* Contains address of top of stack */
- M68K_PS_REGNUM = 16, /* Contains processor status */
- M68K_PC_REGNUM = 17, /* Contains program counter */
- M68K_FP0_REGNUM = 18, /* Floating point register 0 */
- M68K_FPC_REGNUM = 26, /* 68881 control register */
- M68K_FPS_REGNUM = 27, /* 68881 status register */
+ M68K_A2_REGNUM = 10,
+ M68K_FP_REGNUM = 14, /* Address of executing stack frame. */
+ M68K_SP_REGNUM = 15, /* Address of top of stack. */
+ M68K_PS_REGNUM = 16, /* Processor status. */
+ M68K_PC_REGNUM = 17, /* Program counter. */
+ M68K_FP0_REGNUM = 18, /* Floating point register 0. */
+ M68K_FPC_REGNUM = 26, /* 68881 control register. */
+ M68K_FPS_REGNUM = 27, /* 68881 status register. */
M68K_FPI_REGNUM = 28
};
-#define M68K_NUM_REGS (M68K_FPI_REGNUM + 1)
+/* Number of machine registers. */
+#define M68K_NUM_REGS (M68K_FPI_REGNUM + 1)
/* Size of the largest register. */
#define M68K_MAX_REGISTER_SIZE 12
-struct m68k_sigtramp_info
-{
- /* Address of sigcontext. */
- CORE_ADDR sigcontext_addr;
-
- /* Offset of registers in `struct sigcontext'. */
- int *sc_reg_offset;
-};
-
/* Convention for returning structures. */
enum struct_return
@@ -70,6 +61,7 @@ enum struct_return
};
/* Target-dependent structure in gdbarch. */
+
struct gdbarch_tdep
{
/* Offset to PC value in the jump buffer. If this is negative,
@@ -78,11 +70,20 @@ struct gdbarch_tdep
/* The size of each entry in the jump buffer. */
size_t jb_elt_size;
- /* Get info about sigtramp. */
- struct m68k_sigtramp_info (*get_sigtramp_info) (struct frame_info *);
+ /* Register in which the address to store a structure value is
+ passed to a function. */
+ int struct_value_regnum;
/* Convention for returning structures. */
enum struct_return struct_return;
};
-#endif /* M68K_TDEP_H */
+/* Initialize a SVR4 architecture variant. */
+extern void m68k_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
+
+
+/* Functions exported from m68kbsd-tdep.c. */
+
+extern int m68kbsd_fpreg_offset (int regnum);
+
+#endif /* m68k-tdep.h */
diff --git a/gdb/m68kbsd-nat.c b/gdb/m68kbsd-nat.c
new file mode 100644
index 00000000000..34e94b4e2f9
--- /dev/null
+++ b/gdb/m68kbsd-nat.c
@@ -0,0 +1,228 @@
+/* Native-dependent code for Motorola 68000 BSD's.
+
+ Copyright 2004 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 "gdbcore.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include "gdb_assert.h"
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "m68k-tdep.h"
+
+static int
+m68kbsd_gregset_supplies_p (int regnum)
+{
+ return (regnum >= M68K_D0_REGNUM && regnum <= M68K_PC_REGNUM);
+}
+
+static int
+m68kbsd_fpregset_supplies_p (int regnum)
+{
+ return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FPI_REGNUM);
+}
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
+
+static void
+m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+ const char *regs = gregs;
+ int regnum;
+
+ for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Supply the floating-point registers stored in FPREGS to REGCACHE. */
+
+static void
+m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
+{
+ const char *regs = fpregs;
+ int regnum;
+
+ for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum,
+ regs + m68kbsd_fpreg_offset (regnum));
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+ in GREGS. */
+
+static void
+m68kbsd_collect_gregset (const struct regcache *regcache,
+ void *gregs, int regnum)
+{
+ char *regs = gregs;
+ int i;
+
+ for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (regcache, i, regs + i * 4);
+ }
+}
+
+/* Collect the floating-point registers from REGCACHE and store them
+ in FPREGS. */
+
+static void
+m68kbsd_collect_fpregset (struct regcache *regcache,
+ void *fpregs, int regnum)
+{
+ char *regs = fpregs;
+ int i;
+
+ for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (regcache, i, regs + m68kbsd_fpreg_offset (i));
+ }
+}
+
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers (including the floating-point registers). */
+
+void
+fetch_inferior_registers (int regnum)
+{
+ if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
+ {
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ m68kbsd_supply_gregset (current_regcache, &regs);
+ }
+
+ if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
+ {
+ struct fpreg fpregs;
+
+ if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+ perror_with_name ("Couldn't get floating point status");
+
+ m68kbsd_supply_fpregset (current_regcache, &fpregs);
+ }
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers (including the floating-point registers). */
+
+void
+store_inferior_registers (int regnum)
+{
+ if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
+ {
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ m68kbsd_collect_gregset (current_regcache, &regs, regnum);
+
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't write registers");
+ }
+
+ if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum))
+ {
+ struct fpreg fpregs;
+
+ if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+ perror_with_name ("Couldn't get floating point status");
+
+ m68kbsd_collect_fpregset (current_regcache, &fpregs, regnum);
+
+ if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
+ perror_with_name ("Couldn't write floating point status");
+ }
+}
+
+
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+/* OpenBSD doesn't have these. */
+#ifndef PCB_REGS_FP
+#define PCB_REGS_FP 10
+#endif
+#ifndef PCB_REGS_SP
+#define PCB_REGS_SP 11
+#endif
+
+static int
+m68kbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ int regnum, tmp;
+ int i = 0;
+
+ /* The following is true for NetBSD 1.6.2:
+
+ The pcb contains %d2...%d7, %a2...%a7 and %ps. This accounts for
+ all callee-saved registers. From this information we reconstruct
+ the register state as it would look when we just returned from
+ cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_regs[PCB_REGS_SP] == 0)
+ return 0;
+
+ for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+ for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+
+ tmp = pcb->pcb_ps & 0xffff;
+ regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp);
+
+ read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp);
+ regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp);
+
+ return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_m68kbsd_nat (void);
+
+void
+_initialize_m68kbsd_nat (void)
+{
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (m68kbsd_supply_pcb);
+}
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
new file mode 100644
index 00000000000..40606684537
--- /dev/null
+++ b/gdb/m68kbsd-tdep.c
@@ -0,0 +1,228 @@
+/* Target-dependent code for Motorola 68000 BSD's.
+
+ Copyright 2004 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 "arch-utils.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "m68k-tdep.h"
+#include "solib-svr4.h"
+
+/* Core file support. */
+
+/* Sizeof `struct reg' in <machine/reg.h>. */
+#define M68KBSD_SIZEOF_GREGS (18 * 4)
+
+/* Sizeof `struct fpreg' in <machine/reg.h. */
+#define M68KBSD_SIZEOF_FPREGS (((8 * 3) + 3) * 4)
+
+int
+m68kbsd_fpreg_offset (int regnum)
+{
+ if (regnum >= M68K_FPC_REGNUM)
+ return 8 * 12 + (regnum - M68K_FPC_REGNUM) * 4;
+
+ return (regnum - M68K_FP0_REGNUM) * 12;
+}
+
+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
+ in the floating-point register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+m68kbsd_supply_fpregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len)
+{
+ const char *regs = fpregs;
+ int i;
+
+ gdb_assert (len >= M68KBSD_SIZEOF_FPREGS);
+
+ for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++)
+ {
+ if (regnum == i || regnum == -1)
+ regcache_raw_supply (regcache, i, regs + m68kbsd_fpreg_offset (i));
+ }
+}
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+m68kbsd_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
+{
+ const char *regs = gregs;
+ int i;
+
+ gdb_assert (len >= M68KBSD_SIZEOF_GREGS);
+
+ for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
+ {
+ if (regnum == i || regnum == -1)
+ regcache_raw_supply (regcache, i, regs + i * 4);
+ }
+
+ if (len >= M68KBSD_SIZEOF_GREGS + M68KBSD_SIZEOF_FPREGS)
+ {
+ regs += M68KBSD_SIZEOF_GREGS;
+ len -= M68KBSD_SIZEOF_GREGS;
+ m68kbsd_supply_fpregset (regset, regcache, regnum, regs, len);
+ }
+}
+
+/* Motorola 68000 register sets. */
+
+static struct regset m68kbsd_gregset =
+{
+ NULL,
+ m68kbsd_supply_gregset
+};
+
+static struct regset m68kbsd_fpregset =
+{
+ NULL,
+ m68kbsd_supply_fpregset
+};
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+m68kbsd_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= M68KBSD_SIZEOF_GREGS)
+ return &m68kbsd_gregset;
+
+ if (strcmp (sect_name, ".reg2") == 0 && sect_size >= M68KBSD_SIZEOF_FPREGS)
+ return &m68kbsd_fpregset;
+
+ return NULL;
+}
+
+
+/* Support for shared libraries. */
+
+/* Return non-zero if we are in a shared library trampoline code stub. */
+
+int
+m68kbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return (name && !strcmp (name, "_DYNAMIC"));
+}
+
+
+static void
+m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ tdep->jb_pc = 5;
+ tdep->jb_elt_size = 4;
+
+ set_gdbarch_regset_from_core_section
+ (gdbarch, m68kbsd_regset_from_core_section);
+}
+
+/* OpenBSD and NetBSD a.out. */
+
+static void
+m68kbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ m68kbsd_init_abi (info, gdbarch);
+
+ tdep->struct_return = reg_struct_return;
+
+ /* Assume SunOS-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, m68kbsd_aout_in_solib_call_trampoline);
+}
+
+/* NetBSD ELF. */
+
+static void
+m68kbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ m68kbsd_init_abi (info, gdbarch);
+
+ /* NetBSD ELF uses the SVR4 ABI. */
+ m68k_svr4_init_abi (info, gdbarch);
+ tdep->struct_return = pcc_struct_return;
+
+ /* NetBSD ELF uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, generic_in_solib_call_trampoline);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+static enum gdb_osabi
+m68kbsd_aout_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "a.out-m68k-netbsd") == 0
+ || strcmp (bfd_get_target (abfd), "a.out-m68k4k-netbsd") == 0)
+ return GDB_OSABI_NETBSD_AOUT;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+static enum gdb_osabi
+m68kbsd_core_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
+ return GDB_OSABI_NETBSD_AOUT;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_m68kbsd_tdep (void);
+
+void
+_initialize_m68kbsd_tdep (void)
+{
+ gdbarch_register_osabi_sniffer (bfd_arch_m68k, bfd_target_aout_flavour,
+ m68kbsd_aout_osabi_sniffer);
+
+ /* BFD doesn't set a flavour for NetBSD style a.out core files. */
+ gdbarch_register_osabi_sniffer (bfd_arch_m68k, bfd_target_unknown_flavour,
+ m68kbsd_core_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_NETBSD_AOUT,
+ m68kbsd_aout_init_abi);
+ gdbarch_register_osabi (bfd_arch_m68k, 0, GDB_OSABI_NETBSD_ELF,
+ m68kbsd_elf_init_abi);
+}
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 14070405b1c..30a4c9deae8 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -30,10 +30,6 @@
#include "m68k-tdep.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
@@ -141,7 +137,7 @@ fetch_register (int regno)
if (CANNOT_FETCH_REGISTER (regno))
{
memset (buf, '\0', register_size (current_gdbarch, regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
return;
}
@@ -167,7 +163,7 @@ fetch_register (int regno)
perror_with_name (mess);
}
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
/* Fetch register values from the inferior.
@@ -218,7 +214,7 @@ store_register (int regno)
regaddr = register_addr (regno, offset);
/* Put the contents of regno into a local buffer */
- regcache_collect (regno, buf);
+ regcache_raw_collect (current_regcache, regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < register_size (current_gdbarch, regno);
@@ -282,9 +278,9 @@ supply_gregset (elf_gregset_t *gregsetp)
int regi;
for (regi = M68K_D0_REGNUM; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) &regp[regmap[regi]]);
- supply_register (PS_REGNUM, (char *) &regp[PT_SR]);
- supply_register (PC_REGNUM, (char *) &regp[PT_PC]);
+ regcache_raw_supply (current_regcache, regi, (char *) &regp[regmap[regi]]);
+ regcache_raw_supply (current_regcache, PS_REGNUM, (char *) &regp[PT_SR]);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) &regp[PT_PC]);
}
/* Fill register REGNO (if it is a general-purpose register) in
@@ -298,7 +294,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
for (i = 0; i < NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
}
#ifdef HAVE_PTRACE_GETREGS
@@ -366,10 +362,14 @@ supply_fpregset (elf_fpregset_t *fpregsetp)
int regi;
for (regi = FP0_REGNUM; regi < FP0_REGNUM + 8; regi++)
- supply_register (regi, FPREG_ADDR (fpregsetp, regi - FP0_REGNUM));
- supply_register (M68K_FPC_REGNUM, (char *) &fpregsetp->fpcntl[0]);
- supply_register (M68K_FPS_REGNUM, (char *) &fpregsetp->fpcntl[1]);
- supply_register (M68K_FPI_REGNUM, (char *) &fpregsetp->fpcntl[2]);
+ regcache_raw_supply (current_regcache, regi,
+ FPREG_ADDR (fpregsetp, regi - FP0_REGNUM));
+ regcache_raw_supply (current_regcache, M68K_FPC_REGNUM,
+ (char *) &fpregsetp->fpcntl[0]);
+ regcache_raw_supply (current_regcache, M68K_FPS_REGNUM,
+ (char *) &fpregsetp->fpcntl[1]);
+ regcache_raw_supply (current_regcache, M68K_FPI_REGNUM,
+ (char *) &fpregsetp->fpcntl[2]);
}
/* Fill register REGNO (if it is a floating-point register) in
@@ -384,12 +384,14 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
/* Fill in the floating-point registers. */
for (i = FP0_REGNUM; i < FP0_REGNUM + 8; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, FPREG_ADDR (fpregsetp, i - FP0_REGNUM));
+ regcache_raw_collect (current_regcache, i,
+ FPREG_ADDR (fpregsetp, i - FP0_REGNUM));
/* Fill in the floating-point control registers. */
for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+ regcache_raw_collect (current_regcache, i,
+ (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
@@ -617,5 +619,5 @@ static struct core_fns linux_elf_core_fns =
void
_initialize_m68k_linux_nat (void)
{
- add_core_fns (&linux_elf_core_fns);
+ deprecated_add_core_fns (&linux_elf_core_fns);
}
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index 109195138f4..e385dbad627 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -1,7 +1,7 @@
/* Motorola m68k target-dependent support for GNU/Linux.
- Copyright 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -33,6 +33,8 @@
#include "objfiles.h"
#include "symtab.h"
#include "m68k-tdep.h"
+#include "trad-frame.h"
+#include "frame-unwind.h"
/* Offsets (in target ints) into jmp_buf. */
@@ -64,7 +66,7 @@ m68k_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
char buf[12];
unsigned long insn0, insn1, insn2;
- if (read_memory_nobpt (pc - 4, buf, sizeof (buf)))
+ if (deprecated_read_memory_nobpt (pc - 4, buf, sizeof (buf)))
return 0;
insn1 = extract_unsigned_integer (buf + 4, 4);
insn2 = extract_unsigned_integer (buf + 8, 4);
@@ -160,12 +162,21 @@ static int m68k_linux_ucontext_reg_offset[M68K_NUM_REGS] =
/* Get info about saved registers in sigtramp. */
-static struct m68k_sigtramp_info
+struct m68k_linux_sigtramp_info
+{
+ /* Address of sigcontext. */
+ CORE_ADDR sigcontext_addr;
+
+ /* Offset of registers in `struct sigcontext'. */
+ int *sc_reg_offset;
+};
+
+static struct m68k_linux_sigtramp_info
m68k_linux_get_sigtramp_info (struct frame_info *next_frame)
{
CORE_ADDR sp;
char buf[4];
- struct m68k_sigtramp_info info;
+ struct m68k_linux_sigtramp_info info;
frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4);
@@ -180,106 +191,88 @@ m68k_linux_get_sigtramp_info (struct frame_info *next_frame)
return info;
}
-/* Extract from an array REGBUF containing the (raw) register state, a
- function return value of TYPE, and copy that, in virtual format,
- into VALBUF. */
+/* Signal trampolines. */
-static void
-m68k_linux_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
+static struct trad_frame_cache *
+m68k_linux_sigtramp_frame_cache (struct frame_info *next_frame,
+ void **this_cache)
{
- int len = TYPE_LENGTH (type);
- char buf[M68K_MAX_REGISTER_SIZE];
-
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
- {
- m68k_linux_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache,
- valbuf);
- return;
- }
-
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
- {
- regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
- convert_typed_floating (buf, builtin_type_m68881_ext, valbuf, type);
- }
- else if (TYPE_CODE (type) == TYPE_CODE_PTR)
- regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
- else
- {
- if (len <= 4)
- {
- regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
- memcpy (valbuf, buf + (4 - len), len);
- }
- else if (len <= 8)
- {
- regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
- memcpy (valbuf, buf + (8 - len), len - 4);
- regcache_raw_read (regcache, M68K_D1_REGNUM,
- (char *) valbuf + (len - 4));
- }
- else
- internal_error (__FILE__, __LINE__,
- "Cannot extract return value of %d bytes long.", len);
- }
+ struct frame_id this_id;
+ struct trad_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct m68k_linux_sigtramp_info info;
+ char buf[4];
+ int i;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = trad_frame_cache_zalloc (next_frame);
+
+ /* FIXME: cagney/2004-05-01: This is is long standing broken code.
+ The frame ID's code address should be the start-address of the
+ signal trampoline and not the current PC within that
+ trampoline. */
+ frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
+ /* See the end of m68k_push_dummy_call. */
+ this_id = frame_id_build (extract_unsigned_integer (buf, 4) - 4 + 8,
+ frame_pc_unwind (next_frame));
+ trad_frame_set_id (cache, this_id);
+
+ info = m68k_linux_get_sigtramp_info (next_frame);
+
+ for (i = 0; i < M68K_NUM_REGS; i++)
+ if (info.sc_reg_offset[i] != -1)
+ trad_frame_set_reg_addr (cache, i,
+ info.sigcontext_addr + info.sc_reg_offset[i]);
+
+ *this_cache = cache;
+ return cache;
}
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
+static void
+m68k_linux_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_cache,
+ struct frame_id *this_id)
+{
+ struct trad_frame_cache *cache =
+ m68k_linux_sigtramp_frame_cache (next_frame, this_cache);
+ trad_frame_get_id (cache, this_id);
+}
static void
-m68k_linux_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+m68k_linux_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)
{
- int len = TYPE_LENGTH (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
- {
- m68k_linux_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache,
- valbuf);
- return;
- }
-
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
- {
- char buf[M68K_MAX_REGISTER_SIZE];
- convert_typed_floating (valbuf, type, buf, builtin_type_m68881_ext);
- regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
- }
- else if (TYPE_CODE (type) == TYPE_CODE_PTR)
- regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
- else
- {
- if (len <= 4)
- regcache_raw_write_part (regcache, M68K_D0_REGNUM,
- 4 - len, len, valbuf);
- else if (len <= 8)
- {
- regcache_raw_write_part (regcache, M68K_D1_REGNUM, 8 - len,
- len - 4, valbuf);
- regcache_raw_write (regcache, M68K_D0_REGNUM,
- (char *) valbuf + (len - 4));
- }
- else
- internal_error (__FILE__, __LINE__,
- "Cannot store return value of %d bytes long.", len);
- }
+ /* Make sure we've initialized the cache. */
+ struct trad_frame_cache *cache =
+ m68k_linux_sigtramp_frame_cache (next_frame, this_cache);
+ trad_frame_get_register (cache, next_frame, regnum, optimizedp, lvalp,
+ addrp, realnump, valuep);
}
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR. */
+static const struct frame_unwind m68k_linux_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ m68k_linux_sigtramp_frame_this_id,
+ m68k_linux_sigtramp_frame_prev_register
+};
-static CORE_ADDR
-m68k_linux_extract_struct_value_address (struct regcache *regcache)
+static const struct frame_unwind *
+m68k_linux_sigtramp_frame_sniffer (struct frame_info *next_frame)
{
- char buf[4];
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ char *name;
- regcache_cooked_read (regcache, M68K_A0_REGNUM, buf);
- return extract_unsigned_integer (buf, 4);
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (m68k_linux_pc_in_sigtramp (pc, name))
+ return &m68k_linux_sigtramp_frame_unwind;
+
+ return NULL;
}
static void
@@ -289,14 +282,17 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc = M68K_LINUX_JB_PC;
tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE;
- tdep->get_sigtramp_info = m68k_linux_get_sigtramp_info;
- tdep->struct_return = reg_struct_return;
- set_gdbarch_extract_return_value (gdbarch, m68k_linux_extract_return_value);
- set_gdbarch_store_return_value (gdbarch, m68k_linux_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68k_linux_extract_struct_value_address);
+ /* GNU/Linux uses a calling convention that's similar to SVR4. It
+ returns integer values in %d0/%di, pointer values in %a0 and
+ floating values in %fp0, just like SVR4, but uses %a1 to pass the
+ address to store a structure value. It also returns small
+ structures in registers instead of memory. */
+ m68k_svr4_init_abi (info, gdbarch);
+ tdep->struct_value_regnum = M68K_A1_REGNUM;
+ tdep->struct_return = reg_struct_return;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp);
+ frame_unwind_append_sniffer (gdbarch, m68k_linux_sigtramp_frame_sniffer);
/* Shared library handling. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c
deleted file mode 100644
index 46172439a2f..00000000000
--- a/gdb/m68knbsd-nat.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Native-dependent code for Motorola m68k's running NetBSD, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001
- 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 <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)], &inferior_registers,
- sizeof (inferior_registers));
-
- ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof (inferior_fp_registers));
-
- deprecated_registers_fetched ();
-}
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- memcpy (&inferior_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (0)],
- sizeof (inferior_registers));
- ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-
- memcpy (&inferior_fp_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- sizeof (inferior_fp_registers));
- ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
-}
-
-struct md_core
-{
- struct reg intreg;
- struct fpreg freg;
-};
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR ignore)
-{
- struct md_core *core_reg = (struct md_core *) core_reg_sect;
-
- /* Integer registers */
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)],
- &core_reg->intreg, sizeof (struct reg));
- /* Floating point registers */
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- &core_reg->freg, sizeof (struct fpreg));
-}
-
-/* Register that we are able to handle m68knbsd core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns m68knbsd_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_m68knbsd_nat (void)
-{
- add_core_fns (&m68knbsd_core_fns);
-}
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
new file mode 100644
index 00000000000..70378080208
--- /dev/null
+++ b/gdb/m88k-tdep.c
@@ -0,0 +1,895 @@
+/* Target-dependent code for the Motorola 88000 series.
+
+ Copyright 2004 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 "arch-utils.h"
+#include "dis-asm.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "regcache.h"
+#include "regset.h"
+#include "symtab.h"
+#include "trad-frame.h"
+#include "value.h"
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "m88k-tdep.h"
+
+/* Fetch the instruction at PC. */
+
+static unsigned long
+m88k_fetch_instruction (CORE_ADDR pc)
+{
+ return read_memory_unsigned_integer (pc, 4);
+}
+
+/* Register information. */
+
+/* Return the name of register REGNUM. */
+
+static const char *
+m88k_register_name (int regnum)
+{
+ static char *register_names[] =
+ {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+ "epsr", "fpsr", "fpcr", "sxip", "snip", "sfip"
+ };
+
+ if (regnum >= 0 && regnum < ARRAY_SIZE (register_names))
+ return register_names[regnum];
+
+ return NULL;
+}
+
+/* Return the GDB type object for the "standard" data type of data in
+ register REGNUM. */
+
+static struct type *
+m88k_register_type (struct gdbarch *gdbarch, int regnum)
+{
+ /* SXIP, SNIP, SFIP and R1 contain code addresses. */
+ if ((regnum >= M88K_SXIP_REGNUM && regnum <= M88K_SFIP_REGNUM)
+ || regnum == M88K_R1_REGNUM)
+ return builtin_type_void_func_ptr;
+
+ /* R30 and R31 typically contains data addresses. */
+ if (regnum == M88K_R30_REGNUM || regnum == M88K_R31_REGNUM)
+ return builtin_type_void_data_ptr;
+
+ return builtin_type_int32;
+}
+
+
+static CORE_ADDR
+m88k_addr_bits_remove (CORE_ADDR addr)
+{
+ /* All instructures are 4-byte aligned. The lower 2 bits of SXIP,
+ SNIP and SFIP are used for special purposes: bit 0 is the
+ exception bit and bit 1 is the valid bit. */
+ return addr & ~0x3;
+}
+
+/* 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 const unsigned char *
+m88k_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+{
+ /* tb 0,r0,511 */
+ static unsigned char break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
+
+ *len = sizeof (break_insn);
+ return break_insn;
+}
+
+static CORE_ADDR
+m88k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ CORE_ADDR pc;
+
+ pc = frame_unwind_register_unsigned (next_frame, M88K_SXIP_REGNUM);
+ return m88k_addr_bits_remove (pc);
+}
+
+static void
+m88k_write_pc (CORE_ADDR pc, ptid_t ptid)
+{
+ /* According to the MC88100 RISC Microprocessor User's Manual,
+ section 6.4.3.1.2:
+
+ "... can be made to return to a particular instruction by placing
+ a valid instruction address in the SNIP and the next sequential
+ instruction address in the SFIP (with V bits set and E bits
+ clear). The rte resumes execution at the instruction pointed to
+ by the SNIP, then the SFIP."
+
+ The E bit is the least significant bit (bit 0). The V (valid)
+ bit is bit 1. This is why we logical or 2 into the values we are
+ writing below. It turns out that SXIP plays no role when
+ returning from an exception so nothing special has to be done
+ with it. We could even (presumably) give it a totally bogus
+ value. */
+
+ write_register_pid (M88K_SXIP_REGNUM, pc, ptid);
+ write_register_pid (M88K_SNIP_REGNUM, pc | 2, ptid);
+ write_register_pid (M88K_SFIP_REGNUM, (pc + 4) | 2, ptid);
+}
+
+
+/* The functions on this page are intended to be used to classify
+ function arguments. */
+
+/* Check whether TYPE is "Integral or Pointer". */
+
+static int
+m88k_integral_or_pointer_p (const struct type *type)
+{
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_BOOL:
+ case TYPE_CODE_CHAR:
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_RANGE:
+ {
+ /* We have byte, half-word, word and extended-word/doubleword
+ integral types. */
+ int len = TYPE_LENGTH (type);
+ return (len == 1 || len == 2 || len == 4 || len == 8);
+ }
+ return 1;
+ case TYPE_CODE_PTR:
+ case TYPE_CODE_REF:
+ {
+ /* Allow only 32-bit pointers. */
+ return (TYPE_LENGTH (type) == 4);
+ }
+ return 1;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* Check whether TYPE is "Floating". */
+
+static int
+m88k_floating_p (const struct type *type)
+{
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_FLT:
+ {
+ int len = TYPE_LENGTH (type);
+ return (len == 4 || len == 8);
+ }
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* Check whether TYPE is "Structure or Union". */
+
+static int
+m88k_structure_or_union_p (const struct type *type)
+{
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_STRUCT:
+ case TYPE_CODE_UNION:
+ return 1;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* Check whether TYPE has 8-byte alignment. */
+
+static int
+m88k_8_byte_align_p (struct type *type)
+{
+ if (m88k_structure_or_union_p (type))
+ {
+ int i;
+
+ for (i = 0; i < TYPE_NFIELDS (type); i++)
+ {
+ struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+
+ if (m88k_8_byte_align_p (subtype))
+ return 1;
+ }
+ }
+
+ if (m88k_integral_or_pointer_p (type) || m88k_floating_p (type))
+ return (TYPE_LENGTH (type) == 8);
+
+ return 0;
+}
+
+/* Check whether TYPE can be passed in a register. */
+
+static int
+m88k_in_register_p (struct type *type)
+{
+ if (m88k_integral_or_pointer_p (type) || m88k_floating_p (type))
+ return 1;
+
+ if (m88k_structure_or_union_p (type) && TYPE_LENGTH (type) == 4)
+ return 1;
+
+ return 0;
+}
+
+static CORE_ADDR
+m88k_store_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
+{
+ int num_register_words = 0;
+ int num_stack_words = 0;
+ int i;
+
+ for (i = 0; i < nargs; i++)
+ {
+ struct type *type = VALUE_TYPE (args[i]);
+ int len = TYPE_LENGTH (type);
+
+ if (m88k_integral_or_pointer_p (type) && len < 4)
+ {
+ args[i] = value_cast (builtin_type_int32, args[i]);
+ type = VALUE_TYPE (args[i]);
+ len = TYPE_LENGTH (type);
+ }
+
+ if (m88k_in_register_p (type))
+ {
+ int num_words = 0;
+
+ if (num_register_words % 2 == 1 && m88k_8_byte_align_p (type))
+ num_words++;
+
+ num_words += ((len + 3) / 4);
+ if (num_register_words + num_words <= 8)
+ {
+ num_register_words += num_words;
+ continue;
+ }
+
+ /* We've run out of available registers. Pass the argument
+ on the stack. */
+ }
+
+ if (num_stack_words % 2 == 1 && m88k_8_byte_align_p (type))
+ num_stack_words++;
+
+ num_stack_words += ((len + 3) / 4);
+ }
+
+ /* Allocate stack space. */
+ sp = align_down (sp - 32 - num_stack_words * 4, 16);
+ num_stack_words = num_register_words = 0;
+
+ for (i = 0; i < nargs; i++)
+ {
+ char *valbuf = VALUE_CONTENTS (args[i]);
+ struct type *type = VALUE_TYPE (args[i]);
+ int len = TYPE_LENGTH (type);
+ int stack_word = num_stack_words;
+
+ if (m88k_in_register_p (type))
+ {
+ int register_word = num_register_words;
+
+ if (register_word % 2 == 1 && m88k_8_byte_align_p (type))
+ register_word++;
+
+ gdb_assert (len == 4 || len == 8);
+
+ if (register_word + len / 8 < 8)
+ {
+ int regnum = M88K_R2_REGNUM + register_word;
+
+ regcache_raw_write (regcache, regnum, valbuf);
+ if (len > 4)
+ regcache_raw_write (regcache, regnum + 1, valbuf + 4);
+
+ num_register_words = (register_word + len / 4);
+ continue;
+ }
+ }
+
+ if (stack_word % 2 == -1 && m88k_8_byte_align_p (type))
+ stack_word++;
+
+ write_memory (sp + stack_word * 4, valbuf, len);
+ num_stack_words = (stack_word + (len + 3) / 4);
+ }
+
+ return sp;
+}
+
+static CORE_ADDR
+m88k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
+{
+ /* Set up the function arguments. */
+ sp = m88k_store_arguments (regcache, nargs, args, sp);
+ gdb_assert (sp % 16 == 0);
+
+ /* Store return value address. */
+ if (struct_return)
+ regcache_raw_write_unsigned (regcache, M88K_R12_REGNUM, struct_addr);
+
+ /* Store the stack pointer and return address in the appropriate
+ registers. */
+ regcache_raw_write_unsigned (regcache, M88K_R31_REGNUM, sp);
+ regcache_raw_write_unsigned (regcache, M88K_R1_REGNUM, bp_addr);
+
+ /* Return the stack pointer. */
+ return sp;
+}
+
+static struct frame_id
+m88k_unwind_dummy_id (struct gdbarch *arch, struct frame_info *next_frame)
+{
+ CORE_ADDR sp;
+
+ sp = frame_unwind_register_unsigned (next_frame, M88K_R31_REGNUM);
+ return frame_id_build (sp, frame_pc_unwind (next_frame));
+}
+
+
+/* Determine, for architecture GDBARCH, how a return value of TYPE
+ should be returned. If it is supposed to be returned in registers,
+ and READBUF is non-zero, read the appropriate value from REGCACHE,
+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
+ from WRITEBUF into REGCACHE. */
+
+static enum return_value_convention
+m88k_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
+{
+ int len = TYPE_LENGTH (type);
+ char buf[8];
+
+ if (!m88k_integral_or_pointer_p (type) && !m88k_floating_p (type))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ if (readbuf)
+ {
+ /* Read the contents of R2 and (if necessary) R3. */
+ regcache_cooked_read (regcache, M88K_R2_REGNUM, buf);
+ if (len > 4)
+ {
+ regcache_cooked_read (regcache, M88K_R3_REGNUM, buf + 4);
+ gdb_assert (len == 8);
+ memcpy (readbuf, buf, len);
+ }
+ else
+ {
+ /* Just stripping off any unused bytes should preserve the
+ signed-ness just fine. */
+ memcpy (readbuf, buf + 4 - len, len);
+ }
+ }
+
+ if (writebuf)
+ {
+ /* Read the contents to R2 and (if necessary) R3. */
+ if (len > 4)
+ {
+ gdb_assert (len == 8);
+ memcpy (buf, writebuf, 8);
+ regcache_cooked_write (regcache, M88K_R3_REGNUM, buf + 4);
+ }
+ else
+ {
+ /* ??? Do we need to do any sign-extension here? */
+ memcpy (buf + 4 - len, writebuf, len);
+ }
+ regcache_cooked_write (regcache, M88K_R2_REGNUM, buf);
+ }
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
+}
+
+/* Default frame unwinder. */
+
+struct m88k_frame_cache
+{
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR pc;
+
+ int sp_offset;
+ int fp_offset;
+
+ /* Table of saved registers. */
+ struct trad_frame_saved_reg *saved_regs;
+};
+
+/* Prologue analysis. */
+
+/* Macros for extracting fields from instructions. */
+
+#define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
+#define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
+#define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
+#define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
+#define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
+#define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
+
+/* Possible actions to be taken by the prologue analyzer for the
+ instructions it encounters. */
+
+enum m88k_prologue_insn_action
+{
+ M88K_PIA_SKIP, /* Ignore. */
+ M88K_PIA_NOTE_ST, /* Note register store. */
+ M88K_PIA_NOTE_STD, /* Note register pair store. */
+ M88K_PIA_NOTE_SP_ADJUSTMENT, /* Note stack pointer adjustment. */
+ M88K_PIA_NOTE_FP_ASSIGNMENT, /* Note frame pointer assignment. */
+ M88K_PIA_NOTE_BRANCH, /* Note branch. */
+ M88K_PIA_NOTE_PROLOGUE_END /* Note end of prologue. */
+};
+
+/* Table of instructions that may comprise a function prologue. */
+
+struct m88k_prologue_insn
+{
+ unsigned long insn;
+ unsigned long mask;
+ enum m88k_prologue_insn_action action;
+};
+
+struct m88k_prologue_insn m88k_prologue_insn_table[] =
+{
+ /* Various register move instructions. */
+ { 0x58000000, 0xf800ffff, M88K_PIA_SKIP }, /* or/or.u with immed of 0 */
+ { 0xf4005800, 0xfc1fffe0, M88K_PIA_SKIP }, /* or rd,r0,rs */
+ { 0xf4005800, 0xfc00ffff, M88K_PIA_SKIP }, /* or rd,rs,r0 */
+
+ /* Various other instructions. */
+ { 0x58000000, 0xf8000000, M88K_PIA_SKIP }, /* or/or.u */
+
+ /* Stack pointer setup: "subu sp,sp,n" where n is a multiple of 8. */
+ { 0x67ff0000, 0xffff0007, M88K_PIA_NOTE_SP_ADJUSTMENT },
+
+ /* Frame pointer assignment: "addu r30,r31,n". */
+ { 0x63df0000, 0xffff0000, M88K_PIA_NOTE_FP_ASSIGNMENT },
+
+ /* Store to stack instructions; either "st rx,sp,n" or "st.d rx,sp,n". */
+ { 0x241f0000, 0xfc1f0000, M88K_PIA_NOTE_ST }, /* st rx,sp,n */
+ { 0x201f0000, 0xfc1f0000, M88K_PIA_NOTE_STD }, /* st.d rs,sp,n */
+
+ /* Instructions needed for setting up r25 for pic code. */
+ { 0x5f200000, 0xffff0000, M88K_PIA_SKIP }, /* or.u r25,r0,offset_high */
+ { 0xcc000002, 0xffffffff, M88K_PIA_SKIP }, /* bsr.n Lab */
+ { 0x5b390000, 0xffff0000, M88K_PIA_SKIP }, /* or r25,r25,offset_low */
+ { 0xf7396001, 0xffffffff, M88K_PIA_SKIP }, /* Lab: addu r25,r25,r1 */
+
+ /* Various branch or jump instructions which have a delay slot --
+ these do not form part of the prologue, but the instruction in
+ the delay slot might be a store instruction which should be
+ noted. */
+ { 0xc4000000, 0xe4000000, M88K_PIA_NOTE_BRANCH },
+ /* br.n, bsr.n, bb0.n, or bb1.n */
+ { 0xec000000, 0xfc000000, M88K_PIA_NOTE_BRANCH }, /* bcnd.n */
+ { 0xf400c400, 0xfffff7e0, M88K_PIA_NOTE_BRANCH }, /* jmp.n or jsr.n */
+
+ /* Catch all. Ends prologue analysis. */
+ { 0x00000000, 0x00000000, M88K_PIA_NOTE_PROLOGUE_END }
+};
+
+/* Do a full analysis of the function prologue at PC and update CACHE
+ accordingly. Bail out early if LIMIT is reached. Return the
+ address where the analysis stopped. If LIMIT points beyond the
+ function prologue, the return address should be the end of the
+ prologue. */
+
+static CORE_ADDR
+m88k_analyze_prologue (CORE_ADDR pc, CORE_ADDR limit,
+ struct m88k_frame_cache *cache)
+{
+ CORE_ADDR end = limit;
+
+ /* Provide a dummy cache if necessary. */
+ if (cache == NULL)
+ {
+ size_t sizeof_saved_regs =
+ (M88K_R31_REGNUM + 1) * sizeof (struct trad_frame_saved_reg);
+
+ cache = alloca (sizeof (struct m88k_frame_cache));
+ cache->saved_regs = alloca (sizeof_saved_regs);
+
+ /* We only initialize the members we care about. */
+ cache->saved_regs[M88K_R1_REGNUM].addr = -1;
+ cache->fp_offset = -1;
+ }
+
+ while (pc < limit)
+ {
+ struct m88k_prologue_insn *pi = m88k_prologue_insn_table;
+ unsigned long insn = m88k_fetch_instruction (pc);
+
+ while ((insn & pi->mask) != pi->insn)
+ pi++;
+
+ switch (pi->action)
+ {
+ case M88K_PIA_SKIP:
+ /* If we have a frame pointer, and R1 has been saved,
+ consider this instruction as not being part of the
+ prologue. */
+ if (cache->fp_offset != -1
+ && cache->saved_regs[M88K_R1_REGNUM].addr != -1)
+ return min (pc, end);
+ break;
+
+ case M88K_PIA_NOTE_ST:
+ case M88K_PIA_NOTE_STD:
+ /* If no frame has been allocated, the stores aren't part of
+ the prologue. */
+ if (cache->sp_offset == 0)
+ return min (pc, end);
+
+ /* Record location of saved registers. */
+ {
+ int regnum = ST_SRC (insn) + M88K_R0_REGNUM;
+ ULONGEST offset = ST_OFFSET (insn);
+
+ cache->saved_regs[regnum].addr = offset;
+ if (pi->action == M88K_PIA_NOTE_STD && regnum < M88K_R31_REGNUM)
+ cache->saved_regs[regnum + 1].addr = offset + 4;
+ }
+ break;
+
+ case M88K_PIA_NOTE_SP_ADJUSTMENT:
+ /* A second stack pointer adjustment isn't part of the
+ prologue. */
+ if (cache->sp_offset != 0)
+ return min (pc, end);
+
+ /* Store stack pointer adjustment. */
+ cache->sp_offset = -SUBU_OFFSET (insn);
+ break;
+
+ case M88K_PIA_NOTE_FP_ASSIGNMENT:
+ /* A second frame pointer assignment isn't part of the
+ prologue. */
+ if (cache->fp_offset != -1)
+ return min (pc, end);
+
+ /* Record frame pointer assignment. */
+ cache->fp_offset = ADDU_OFFSET (insn);
+ break;
+
+ case M88K_PIA_NOTE_BRANCH:
+ /* The branch instruction isn't part of the prologue, but
+ the instruction in the delay slot might be. Limit the
+ prologue analysis to the delay slot and record the branch
+ instruction as the end of the prologue. */
+ limit = min (limit, pc + 2 * M88K_INSN_SIZE);
+ end = pc;
+ break;
+
+ case M88K_PIA_NOTE_PROLOGUE_END:
+ return min (pc, end);
+ }
+
+ pc += M88K_INSN_SIZE;
+ }
+
+ return end;
+}
+
+/* An upper limit to the size of the prologue. */
+const int m88k_max_prologue_size = 128 * M88K_INSN_SIZE;
+
+/* Return the address of first real instruction of the function
+ starting at PC. */
+
+static CORE_ADDR
+m88k_skip_prologue (CORE_ADDR pc)
+{
+ struct symtab_and_line sal;
+ CORE_ADDR func_start, func_end;
+
+ /* This is the preferred method, find the end of the prologue by
+ using the debugging information. */
+ if (find_pc_partial_function (pc, NULL, &func_start, &func_end))
+ {
+ sal = find_pc_line (func_start, 0);
+
+ if (sal.end < func_end && pc <= sal.end)
+ return sal.end;
+ }
+
+ return m88k_analyze_prologue (pc, pc + m88k_max_prologue_size, NULL);
+}
+
+struct m88k_frame_cache *
+m88k_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct m88k_frame_cache *cache;
+ CORE_ADDR frame_sp;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct m88k_frame_cache);
+ cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+ cache->fp_offset = -1;
+
+ cache->pc = frame_func_unwind (next_frame);
+ if (cache->pc != 0)
+ {
+ CORE_ADDR addr_in_block = frame_unwind_address_in_block (next_frame);
+ m88k_analyze_prologue (cache->pc, addr_in_block, cache);
+ }
+
+ /* Calculate the stack pointer used in the prologue. */
+ if (cache->fp_offset != -1)
+ {
+ CORE_ADDR fp;
+
+ fp = frame_unwind_register_unsigned (next_frame, M88K_R30_REGNUM);
+ frame_sp = fp - cache->fp_offset;
+ }
+ else
+ {
+ /* If we know where the return address is saved, we can take a
+ solid guess at what the frame pointer should be. */
+ if (cache->saved_regs[M88K_R1_REGNUM].addr != -1)
+ cache->fp_offset = cache->saved_regs[M88K_R1_REGNUM].addr - 4;
+ frame_sp = frame_unwind_register_unsigned (next_frame, M88K_R31_REGNUM);
+ }
+
+ /* Now that we know the stack pointer, adjust the location of the
+ saved registers. */
+ {
+ int regnum;
+
+ for (regnum = M88K_R0_REGNUM; regnum < M88K_R31_REGNUM; regnum ++)
+ if (cache->saved_regs[regnum].addr != -1)
+ cache->saved_regs[regnum].addr += frame_sp;
+ }
+
+ /* Calculate the frame's base. */
+ cache->base = frame_sp - cache->sp_offset;
+ trad_frame_set_value (cache->saved_regs, M88K_R31_REGNUM, cache->base);
+
+ /* Identify SXIP with the return address in R1. */
+ cache->saved_regs[M88K_SXIP_REGNUM] = cache->saved_regs[M88K_R1_REGNUM];
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+m88k_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct m88k_frame_cache *cache = m88k_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
+
+ (*this_id) = frame_id_build (cache->base, cache->pc);
+}
+
+static void
+m88k_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 m88k_frame_cache *cache = m88k_frame_cache (next_frame, this_cache);
+
+ if (regnum == M88K_SNIP_REGNUM || regnum == M88K_SFIP_REGNUM)
+ {
+ if (valuep)
+ {
+ CORE_ADDR pc;
+
+ trad_frame_get_prev_register (next_frame, cache->saved_regs,
+ M88K_SXIP_REGNUM, optimizedp,
+ lvalp, addrp, realnump, valuep);
+
+ pc = extract_unsigned_integer (valuep, 4);
+ if (regnum == M88K_SFIP_REGNUM)
+ pc += 4;
+ store_unsigned_integer (valuep, 4, pc + 4);
+ }
+
+ /* It's a computed value. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ return;
+ }
+
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind m88k_frame_unwind =
+{
+ NORMAL_FRAME,
+ m88k_frame_this_id,
+ m88k_frame_prev_register
+};
+
+static const struct frame_unwind *
+m88k_frame_sniffer (struct frame_info *next_frame)
+{
+ return &m88k_frame_unwind;
+}
+
+
+static CORE_ADDR
+m88k_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct m88k_frame_cache *cache = m88k_frame_cache (next_frame, this_cache);
+
+ if (cache->fp_offset != -1)
+ return cache->base + cache->sp_offset + cache->fp_offset;
+
+ return 0;
+}
+
+static const struct frame_base m88k_frame_base =
+{
+ &m88k_frame_unwind,
+ m88k_frame_base_address,
+ m88k_frame_base_address,
+ m88k_frame_base_address
+};
+
+
+/* Core file support. */
+
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+m88k_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
+{
+ const char *regs = gregs;
+ int i;
+
+ for (i = 0; i < M88K_NUM_REGS; i++)
+ {
+ if (regnum == i || regnum == -1)
+ regcache_raw_supply (regcache, i, regs + i * 4);
+ }
+}
+
+/* Motorola 88000 register set. */
+
+static struct regset m88k_gregset =
+{
+ NULL,
+ m88k_supply_gregset
+};
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+m88k_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= M88K_NUM_REGS * 4)
+ return &m88k_gregset;
+
+ return NULL;
+}
+
+
+static struct gdbarch *
+m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch *gdbarch;
+
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
+
+ /* Allocate space for the new architecture. */
+ gdbarch = gdbarch_alloc (&info, NULL);
+
+ /* There is no real `long double'. */
+ set_gdbarch_long_double_bit (gdbarch, 64);
+ set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
+
+ set_gdbarch_num_regs (gdbarch, M88K_NUM_REGS);
+ set_gdbarch_register_name (gdbarch, m88k_register_name);
+ set_gdbarch_register_type (gdbarch, m88k_register_type);
+
+ /* Register numbers of various important registers. */
+ set_gdbarch_sp_regnum (gdbarch, M88K_R31_REGNUM);
+ set_gdbarch_pc_regnum (gdbarch, M88K_SXIP_REGNUM);
+
+ /* Core file support. */
+ set_gdbarch_regset_from_core_section
+ (gdbarch, m88k_regset_from_core_section);
+
+ set_gdbarch_print_insn (gdbarch, print_insn_m88k);
+
+ set_gdbarch_skip_prologue (gdbarch, m88k_skip_prologue);
+
+ /* Stack grows downward. */
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+ /* Call dummy code. */
+ set_gdbarch_push_dummy_call (gdbarch, m88k_push_dummy_call);
+ set_gdbarch_unwind_dummy_id (gdbarch, m88k_unwind_dummy_id);
+
+ /* Return value info */
+ set_gdbarch_return_value (gdbarch, m88k_return_value);
+
+ set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
+ set_gdbarch_breakpoint_from_pc (gdbarch, m88k_breakpoint_from_pc);
+ set_gdbarch_unwind_pc (gdbarch, m88k_unwind_pc);
+ set_gdbarch_write_pc (gdbarch, m88k_write_pc);
+
+ frame_base_set_default (gdbarch, &m88k_frame_base);
+ frame_unwind_append_sniffer (gdbarch, m88k_frame_sniffer);
+
+ return gdbarch;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_m88k_tdep (void);
+
+void
+_initialize_m88k_tdep (void)
+{
+ gdbarch_register (bfd_arch_m88k, m88k_gdbarch_init, NULL);
+}
diff --git a/gdb/config/i386/tm-linux64.h b/gdb/m88k-tdep.h
index c3ff3521ea8..1389bfc6e48 100644
--- a/gdb/config/i386/tm-linux64.h
+++ b/gdb/m88k-tdep.h
@@ -1,8 +1,6 @@
-/* Target-dependent definitions for GNU/Linux x86-64.
+/* Target-dependent code for the Motorola 88000 series.
- Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
-
- Contributed by Michal Ludvig, SuSE Labs.
+ Copyright 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,16 +19,31 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_LINUX64_H
-#define TM_LINUX64_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. */
-
-#define SVR4_SHARED_LIBS
-#include "solib.h" /* Support for shared libraries. */
-
-#endif /* tm-linux64.h */
+#ifndef M88K_TDEP_H
+#define M88K_TDEP_H
+
+/* Register numbers of various important registers. */
+
+enum m88k_regnum
+{
+ M88K_R0_REGNUM,
+ M88K_R1_REGNUM, /* Return address (hardware). */
+ M88K_R2_REGNUM,
+ M88K_R3_REGNUM,
+ M88K_R12_REGNUM = 12,
+ M88K_R30_REGNUM = 30, /* Frame pointer. */
+ M88K_R31_REGNUM, /* Stack pointer. */
+ M88K_EPSR_REGNUM,
+ M88K_FPSR_REGNUM,
+ M88K_FPCR_REGNUM,
+ M88K_SXIP_REGNUM,
+ M88K_SNIP_REGNUM,
+ M88K_SFIP_REGNUM,
+ M88K_NUM_REGS /* Number of machine registers. */
+
+};
+
+/* Instruction size. */
+#define M88K_INSN_SIZE 4
+
+#endif /* m88k-tdep.h */
diff --git a/gdb/m88kbsd-nat.c b/gdb/m88kbsd-nat.c
new file mode 100644
index 00000000000..7553c19b1ee
--- /dev/null
+++ b/gdb/m88kbsd-nat.c
@@ -0,0 +1,94 @@
+/* Native-dependent code for Motorola 88000 BSD's.
+
+ Copyright 2004 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 "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "m88k-tdep.h"
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
+
+static void
+m88kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+ const char *regs = gregs;
+ int regnum;
+
+ for (regnum = 0; regnum < M88K_NUM_REGS; regnum++)
+ regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+ in GREGS. */
+
+static void
+m88kbsd_collect_gregset (const struct regcache *regcache,
+ void *gregs, int regnum)
+{
+ char *regs = gregs;
+ int i;
+
+ for (i = 0; i < M88K_NUM_REGS; i++)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (regcache, i, regs + i * 4);
+ }
+}
+
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
+
+void
+fetch_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ m88kbsd_supply_gregset (current_regcache, &regs);
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers. */
+
+void
+store_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ m88kbsd_collect_gregset (current_regcache, &regs, regnum);
+
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't write registers");
+}
diff --git a/gdb/main.c b/gdb/main.c
index 7385cfdf20c..d331bc546ca 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -49,12 +49,6 @@ int display_time;
int display_space;
-/* Whether this is the async version or not. The async version is
- invoked on the command line with the -nw --async options. In this
- version, the usual command_loop is substituted by and event loop which
- processes UI events asynchronously. */
-int event_loop_p = 1;
-
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
do_setshow_command will free it. */
@@ -163,9 +157,6 @@ captured_main (void *data)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- /* This needs to happen before the first use of malloc. */
- init_malloc (NULL);
-
#ifdef HAVE_SBRK
lim_at_start = (char *) sbrk (0);
#endif
@@ -253,8 +244,6 @@ captured_main (void *data)
};
static struct option long_options[] =
{
- {"async", no_argument, &event_loop_p, 1},
- {"noasync", no_argument, &event_loop_p, 0},
#if defined(TUI)
{"tui", no_argument, 0, OPT_TUI},
#endif
@@ -527,7 +516,7 @@ extern int gdbtk_test (char *);
}
/* Initialize all files. Give the interpreter a chance to take
- control of the console via the init_ui_hook()) */
+ control of the console via the deprecated_init_ui_hook(). */
gdb_init (argv[0]);
/* Do these (and anything which might call wrap_here or *_filtered)
@@ -737,6 +726,13 @@ extern int gdbtk_test (char *);
if (batch)
{
+ if (attach_flag)
+ /* Either there was a problem executing the command in the
+ batch file aborted early, or the batch file forgot to do an
+ explicit detach. Explicitly detach the inferior ensuring
+ that there are no zombies. */
+ target_detach (NULL, 0);
+
/* We have hit the end of the batch file. */
exit (0);
}
@@ -779,10 +775,10 @@ extern int gdbtk_test (char *);
/* GUIs generally have their own command loop, mainloop, or whatever.
This is a good place to gain control because many error
conditions will end up here via longjmp(). */
- if (command_loop_hook)
- command_loop_hook ();
+ if (deprecated_command_loop_hook)
+ deprecated_command_loop_hook ();
else
- command_loop ();
+ deprecated_command_loop ();
quit_command ((char *) 0, instream == stdin);
}
}
diff --git a/gdb/maint.c b/gdb/maint.c
index e43b39150c4..6b4b067851e 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -308,7 +308,7 @@ maint_print_section_info (const char *name, flagword flags,
printf_filtered (" 0x%s", paddr (addr));
printf_filtered ("->0x%s", paddr (endaddr));
printf_filtered (" at %s",
- local_hex_string_custom ((unsigned long) filepos, "08l"));
+ hex_string_custom ((unsigned long) filepos, 8));
printf_filtered (": %s", name);
print_bfd_flags (flags);
printf_filtered ("\n");
@@ -848,20 +848,23 @@ testsuite can check the comamnd deprecator. You probably shouldn't use this,\n\
If you decide you want to use it: maintenance undeprecate 'commandname'",
&maintenancelist);
- add_show_from_set (
- add_set_cmd ("watchdog", class_maintenance, var_zinteger, (char *) &watchdog,
- "Set watchdog timer.\n\
-When non-zero, this timeout is used instead of waiting forever for a target to\n\
-finish a low-level step or continue operation. If the specified amount of time\n\
-passes without a response from the target, an error occurs.", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("watchdog", class_maintenance, var_zinteger,
+ (char *) &watchdog,
+ "Set watchdog timer.\n\
+When non-zero, this timeout is used instead of waiting forever for a target\n\
+to finish a low-level step or continue operation. If the specified amount\n\
+of time passes without a response from the target, an error occurs.",
+ &setlist),
+ &showlist);
add_setshow_boolean_cmd ("profile", class_maintenance,
- &maintenance_profile_p,
- "Set internal profiling.\n"
- "When enabled GDB is profiled.",
- "Show internal profiling.\n",
+ &maintenance_profile_p, "\
+Set internal profiling.", "\
+Show internal profiling.", "\
+When enabled GDB is profiled.", "\
+Internal profiling is %s.",
maintenance_set_profile_cmd, NULL,
&maintenance_set_cmdlist,
&maintenance_show_cmdlist);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 321ba696094..f2a283a20f0 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -713,8 +713,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi != NULL; fi = get_next_frame (fi))
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), regnum);
else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
@@ -731,8 +730,7 @@ static CORE_ADDR
mcore_frame_saved_pc (struct frame_info * fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), PC_REGNUM);
else
@@ -750,8 +748,7 @@ mcore_pop_frame (void)
int rn;
struct frame_info *fi = get_current_frame ();
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
deprecated_pop_dummy_frame ();
else
{
@@ -919,11 +916,11 @@ mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
argument.
For gdb, this leaves us two routes, based on what
- USE_STRUCT_CONVENTION (mcore_use_struct_convention) returns. If
- this macro returns 1, gdb will call STORE_STRUCT_RETURN to store
- the return value.
+ DEPRECATED_USE_STRUCT_CONVENTION (mcore_use_struct_convention)
+ returns. If this macro returns 1, gdb will call
+ STORE_STRUCT_RETURN to store the return value.
- If USE_STRUCT_CONVENTION returns 0, then gdb uses
+ If DEPRECATED_USE_STRUCT_CONVENTION returns 0, then gdb uses
STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE to store/fetch the
functions return value. */
@@ -995,8 +992,7 @@ mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
get_frame_extra_info (fi)->status = 0;
get_frame_extra_info (fi)->framesize = 0;
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
{
/* We need to setup fi->frame here because call_function_by_hand
gets it wrong by assuming it's always FP. */
@@ -1012,7 +1008,7 @@ static int
get_insn (CORE_ADDR pc)
{
char buf[4];
- int status = read_memory_nobpt (pc, buf, 2);
+ int status = deprecated_read_memory_nobpt (pc, buf, 2);
if (status != 0)
return 0;
@@ -1022,7 +1018,6 @@ get_insn (CORE_ADDR pc)
static struct gdbarch *
mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- static LONGEST call_dummy_words[7] = { };
struct gdbarch_tdep *tdep = NULL;
struct gdbarch *gdbarch;
@@ -1041,14 +1036,11 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* All registers are 32 bits */
set_gdbarch_deprecated_register_size (gdbarch, MCORE_REG_SIZE);
- 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_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);
set_gdbarch_sp_regnum (gdbarch, 0);
@@ -1056,9 +1048,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Call Dummies: */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
set_gdbarch_breakpoint_from_pc (gdbarch, mcore_breakpoint_from_pc);
set_gdbarch_deprecated_push_return_address (gdbarch, mcore_push_return_address);
@@ -1084,7 +1073,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Stack grows down. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_use_struct_convention (gdbarch, mcore_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, mcore_use_struct_convention);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* MCore will never pass a sturcture by reference. It will always be split
between registers and stack. */
@@ -1113,9 +1102,10 @@ _initialize_mcore_tdep (void)
gdbarch_register (bfd_arch_mcore, mcore_gdbarch_init, mcore_dump_tdep);
#ifdef MCORE_DEBUG
- add_show_from_set (add_set_cmd ("mcoredebug", no_class,
- var_boolean, (char *) &mcore_debug,
- "Set mcore debugging.\n", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("mcoredebug", no_class,
+ var_boolean, (char *) &mcore_debug,
+ "Set mcore debugging.\n", &setlist),
+ &showlist);
#endif
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 89d0282ecfd..e4a51c20055 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -76,10 +76,6 @@ typedef struct mips_extra_func_info
#endif
#endif
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include "gdb_stat.h"
#include "gdb_string.h"
@@ -92,7 +88,6 @@ typedef struct mips_extra_func_info
#include "aout/stab_gnu.h" /* STABS information */
#include "expression.h"
-#include "language.h" /* For local_hex_string() */
extern void _initialize_mdebugread (void);
@@ -321,10 +316,6 @@ static void handle_psymbol_enumerators (struct objfile *, FDR *, int,
static char *mdebug_next_symbol_text (struct objfile *);
-/* Address bounds for the signal trampoline in inferior, if any */
-
-CORE_ADDR sigtramp_address, sigtramp_end;
-
/* Allocate zeroed memory */
static void *
@@ -3274,7 +3265,7 @@ parse_partial_symbols (struct objfile *objfile)
/* If we haven't found it yet, ignore it. It's probably some
new type we don't know about yet. */
complaint (&symfile_complaints, "unknown symbol type %s",
- local_hex_string (type_code)); /*CUR_SYMBOL_TYPE*/
+ hex_string (type_code)); /*CUR_SYMBOL_TYPE*/
continue;
}
if (stabstring
@@ -3605,13 +3596,6 @@ parse_partial_symbols (struct objfile *objfile)
includes_used = 0;
dependencies_used = 0;
- if (objfile->ei.entry_point >= save_pst->textlow &&
- objfile->ei.entry_point < save_pst->texthigh)
- {
- objfile->ei.deprecated_entry_file_lowpc = save_pst->textlow;
- objfile->ei.deprecated_entry_file_highpc = save_pst->texthigh;
- }
-
/* The objfile has its functions reordered if this partial symbol
table overlaps any other partial symbol table.
We cannot assume a reordered objfile if a partial symbol table
@@ -4751,126 +4735,6 @@ elfmdebug_build_psymtabs (struct objfile *objfile,
install_minimal_symbols (objfile);
do_cleanups (back_to);
}
-
-
-/* Things used for calling functions in the inferior.
- These functions are exported to our companion
- mips-tdep.c file and are here because they play
- with the symbol-table explicitly. */
-
-/* Sigtramp: make sure we have all the necessary information
- about the signal trampoline code. Since the official code
- from MIPS does not do so, we make up that information ourselves.
- If they fix the library (unlikely) this code will neutralize itself. */
-
-/* FIXME: This function is called only by mips-tdep.c. It needs to be
- here because it calls functions defined in this file, but perhaps
- this could be handled in a better way. Only compile it in when
- tm-mips.h is included. */
-
-#ifdef TM_MIPS_H
-
-void
-fixup_sigtramp (void)
-{
- struct symbol *s;
- struct symtab *st;
- struct block *b, *b0 = NULL;
-
- sigtramp_address = -1;
-
- /* We have to handle the following cases here:
- a) The Mips library has a sigtramp label within sigvec.
- b) Irix has a _sigtramp which we want to use, but it also has sigvec. */
- s = lookup_symbol ("sigvec", 0, VAR_DOMAIN, 0, NULL);
- if (s != 0)
- {
- b0 = SYMBOL_BLOCK_VALUE (s);
- s = lookup_symbol ("sigtramp", b0, VAR_DOMAIN, 0, NULL);
- }
- if (s == 0)
- {
- /* No sigvec or no sigtramp inside sigvec, try _sigtramp. */
- s = lookup_symbol ("_sigtramp", 0, VAR_DOMAIN, 0, NULL);
- }
-
- /* But maybe this program uses its own version of sigvec */
- if (s == 0)
- return;
-
- /* Did we or MIPSco fix the library ? */
- if (SYMBOL_CLASS (s) == LOC_BLOCK)
- {
- sigtramp_address = BLOCK_START (SYMBOL_BLOCK_VALUE (s));
- sigtramp_end = BLOCK_END (SYMBOL_BLOCK_VALUE (s));
- return;
- }
-
- sigtramp_address = SYMBOL_VALUE (s);
- sigtramp_end = sigtramp_address + 0x88; /* black magic */
-
- /* But what symtab does it live in ? */
- st = find_pc_symtab (SYMBOL_VALUE (s));
-
- /*
- * Ok, there goes the fix: turn it into a procedure, with all the
- * needed info. Note we make it a nested procedure of sigvec,
- * which is the way the (assembly) code is actually written.
- */
- SYMBOL_DOMAIN (s) = VAR_DOMAIN;
- SYMBOL_CLASS (s) = LOC_BLOCK;
- SYMBOL_TYPE (s) = init_type (TYPE_CODE_FUNC, 4, 0, (char *) NULL,
- st->objfile);
- TYPE_TARGET_TYPE (SYMBOL_TYPE (s)) = mdebug_type_void;
-
- /* Need a block to allocate MIPS_EFI_SYMBOL_NAME in */
- b = new_block (NON_FUNCTION_BLOCK);
- SYMBOL_BLOCK_VALUE (s) = b;
- BLOCK_START (b) = sigtramp_address;
- BLOCK_END (b) = sigtramp_end;
- BLOCK_FUNCTION (b) = s;
- BLOCK_SUPERBLOCK (b) = BLOCK_SUPERBLOCK (b0);
- add_block (b, st);
- sort_blocks (st);
-
- /* Make a MIPS_EFI_SYMBOL_NAME entry for it */
- {
- struct mips_extra_func_info *e =
- ((struct mips_extra_func_info *)
- xzalloc (sizeof (struct mips_extra_func_info)));
-
- e->numargs = 0; /* the kernel thinks otherwise */
- e->pdr.frameoffset = 32;
- e->pdr.framereg = SP_REGNUM;
- /* Note that setting pcreg is no longer strictly necessary as
- mips_frame_saved_pc is now aware of signal handler frames. */
- e->pdr.pcreg = PC_REGNUM;
- e->pdr.regmask = -2;
- /* Offset to saved r31, in the sigtramp case the saved registers
- are above the frame in the sigcontext.
- We have 4 alignment bytes, 12 bytes for onstack, mask and pc,
- 32 * 4 bytes for the general registers, 12 bytes for mdhi, mdlo, ownedfp
- and 32 * 4 bytes for the floating point registers. */
- e->pdr.regoffset = 4 + 12 + 31 * 4;
- e->pdr.fregmask = -1;
- /* Offset to saved f30 (first saved *double* register). */
- e->pdr.fregoffset = 4 + 12 + 32 * 4 + 12 + 30 * 4;
- e->pdr.isym = (long) s;
- e->pdr.adr = sigtramp_address;
-
- current_objfile = st->objfile; /* Keep new_symbol happy */
- s = new_symbol (MIPS_EFI_SYMBOL_NAME);
- SYMBOL_VALUE (s) = (long) e;
- SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
- SYMBOL_CLASS (s) = LOC_CONST;
- SYMBOL_TYPE (s) = mdebug_type_void;
- current_objfile = NULL;
- }
-
- dict_add_symbol (BLOCK_DICT (b), s);
-}
-
-#endif /* TM_MIPS_H */
void
_initialize_mdebugread (void)
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 4ab5dbf1009..6f95e5ccbb1 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -240,9 +240,9 @@ mem_info_command (char *args, int from_tty)
m->number,
m->enabled_p ? 'y' : 'n');
if (TARGET_ADDR_BIT <= 32)
- tmp = local_hex_string_custom ((unsigned long) m->lo, "08l");
+ tmp = hex_string_custom ((unsigned long) m->lo, 8);
else
- tmp = local_hex_string_custom ((unsigned long) m->lo, "016l");
+ tmp = hex_string_custom ((unsigned long) m->lo, 16);
printf_filtered ("%s ", tmp);
@@ -251,14 +251,14 @@ mem_info_command (char *args, int from_tty)
if (m->hi == 0)
tmp = "0x100000000";
else
- tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+ tmp = hex_string_custom ((unsigned long) m->hi, 8);
}
else
{
if (m->hi == 0)
tmp = "0x10000000000000000";
else
- tmp = local_hex_string_custom ((unsigned long) m->hi, "016l");
+ tmp = hex_string_custom ((unsigned long) m->hi, 16);
}
printf_filtered ("%s ", tmp);
diff --git a/gdb/mi/gdb-mi.el b/gdb/mi/gdb-mi.el
new file mode 100644
index 00000000000..8780e8aa4ae
--- /dev/null
+++ b/gdb/mi/gdb-mi.el
@@ -0,0 +1,568 @@
+;;; gdb-mi.el (internally gdbmi6.el) - (24th May 2004)
+
+;; Run gdb with GDB/MI (-interp=mi) and access CLI using "cli-command"
+;; (could use "-interpreter-exec console cli-command")
+
+;; Author: Nick Roberts <nickrob@gnu.org>
+;; Maintainer: Nick Roberts <nickrob@gnu.org>
+;; Keywords: unix, tools
+
+;; Copyright (C) 2004 Free Software Foundation, Inc.
+
+;; This file is part of GNU GDB.
+
+;; GNU GDB 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, 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.
+
+;;; Commentary:
+
+;; This mode acts as a graphical user interface to GDB and requires GDB 6.1
+;; onwards. You can interact with GDB through the GUD buffer in the usual way,
+;; but there are also buffers which control the execution and describe the
+;; state of your program. It separates the input/output of your program from
+;; that of GDB and displays expressions and their current values in their own
+;; buffers. It also uses features of Emacs 21 such as the fringe/display
+;; margin for breakpoints, and the toolbar (see the GDB Graphical Interface
+;; section in the Emacs info manual).
+
+;; Start the debugger with M-x gdbmi.
+
+;; This file uses GDB/MI as the primary interface to GDB. It is still under
+;; development and is part of a process to migrate Emacs from annotations
+;; (as used in gdb-ui.el) to GDB/MI.
+
+;; Known Bugs:
+;;
+
+;;; Code:
+
+(require 'gud)
+(require 'gdb-ui)
+
+
+;;;###autoload
+(defun gdbmi (command-line)
+ "Run gdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger.
+
+If `gdb-many-windows' is nil (the default value) then gdb just
+pops up the GUD buffer unless `gdb-show-main' is t. In this case
+it starts with two windows: one displaying the GUD buffer and the
+other with the source file with the main routine of the inferior.
+
+If `gdb-many-windows' is t, regardless of the value of
+`gdb-show-main', the layout below will appear. Keybindings are
+given in relevant buffer.
+
+Watch expressions appear in the speedbar/slowbar.
+
+The following interactive lisp functions help control operation :
+
+`gdb-many-windows' - Toggle the number of windows gdb uses.
+`gdb-restore-windows' - To restore the window layout.
+
+See Info node `(emacs)GDB Graphical Interface' for a more
+detailed description of this mode.
+
+
+---------------------------------------------------------------------
+ GDB Toolbar
+---------------------------------------------------------------------
+GUD buffer (I/O of GDB) | Locals buffer
+ |
+ |
+ |
+---------------------------------------------------------------------
+ Source buffer | Input/Output (of inferior) buffer
+ | (comint-mode)
+ |
+ |
+ |
+ |
+ |
+ |
+---------------------------------------------------------------------
+ Stack buffer | Breakpoints buffer
+ RET gdb-frames-select | SPC gdb-toggle-breakpoint
+ | RET gdb-goto-breakpoint
+ | d gdb-delete-breakpoint
+---------------------------------------------------------------------
+"
+ ;;
+ (interactive (list (gud-query-cmdline 'gdbmi)))
+ ;;
+ ;; Let's start with a basic gud-gdb buffer and then modify it a bit.
+ (gdb command-line)
+ ;;
+ (setq gdb-debug-log nil)
+ (set (make-local-variable 'gud-minor-mode) 'gdbmi)
+ (set (make-local-variable 'gud-marker-filter) 'gud-gdbmi-marker-filter)
+ ;;
+ (gud-def gud-break (if (not (string-equal mode-name "Machine"))
+ (gud-call "-break-insert %f:%l" arg)
+ (save-excursion
+ (beginning-of-line)
+ (forward-char 2)
+ (gud-call "-break-insert *%a" arg)))
+ "\C-b" "Set breakpoint at current line or address.")
+ ;;
+ (gud-def gud-remove (if (not (string-equal mode-name "Machine"))
+ (gud-call "clear %f:%l" arg)
+ (save-excursion
+ (beginning-of-line)
+ (forward-char 2)
+ (gud-call "clear *%a" arg)))
+ "\C-d" "Remove breakpoint at current line or address.")
+ ;;
+ (gud-def gud-until (if (not (string-equal mode-name "Machine"))
+ (gud-call "until %f:%l" arg)
+ (save-excursion
+ (beginning-of-line)
+ (forward-char 2)
+ (gud-call "until *%a" arg)))
+ "\C-u" "Continue to current line or address.")
+
+ (define-key gud-minor-mode-map [left-margin mouse-1]
+ 'gdb-mouse-toggle-breakpoint)
+ (define-key gud-minor-mode-map [left-fringe mouse-1]
+ 'gdb-mouse-toggle-breakpoint)
+
+ (setq comint-input-sender 'gdbmi-send)
+ ;;
+ ;; (re-)initialise
+ (setq gdb-main-file nil)
+ (setq gdb-current-address "main")
+ (setq gdb-previous-address nil)
+ (setq gdb-previous-frame nil)
+ (setq gdb-current-frame "main")
+ (setq gdb-view-source t)
+ (setq gdb-selected-view 'source)
+ (setq gdb-var-list nil)
+ (setq gdb-var-changed nil)
+ (setq gdb-prompting nil)
+ (setq gdb-current-item nil)
+ (setq gdb-pending-triggers nil)
+ (setq gdb-output-sink 'user)
+ (setq gdb-server-prefix nil)
+ ;;
+ (setq gdb-buffer-type 'gdbmi)
+ ;;
+ ;; FIXME: use tty command to separate io.
+ ;;(gdb-clear-inferior-io)
+ ;;
+ (if (eq window-system 'w32)
+ (gdb-enqueue-input (list "-gdb-set new-console off\n" 'ignore)))
+ ;; find source file and compilation directory here
+ (gdb-enqueue-input (list "list main\n" 'ignore)) ; C program
+ (gdb-enqueue-input (list "list MAIN__\n" 'ignore)) ; Fortran program
+ (gdb-enqueue-input (list "info source\n" 'gdbmi-source-info))
+ ;;
+ (run-hooks 'gdbmi-mode-hook))
+
+; Force nil till fixed.
+(defconst gdbmi-use-inferior-io-buffer nil)
+
+; uses --all-values Needs GDB 6.1 onwards.
+(defun gdbmi-var-list-children (varnum)
+ (gdb-enqueue-input
+ (list (concat "-var-update " varnum "\n") 'ignore))
+ (gdb-enqueue-input
+ (list (concat "-var-list-children --all-values "
+ varnum "\n")
+ `(lambda () (gdbmi-var-list-children-handler ,varnum)))))
+
+(defconst gdbmi-var-list-children-regexp
+"name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",value=\"\\(.*?\\)\""
+)
+
+(defun gdbmi-var-list-children-handler (varnum)
+ (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
+ (goto-char (point-min))
+ (let ((var-list nil))
+ (catch 'child-already-watched
+ (dolist (var gdb-var-list)
+ (if (string-equal varnum (cadr var))
+ (progn
+ (push var var-list)
+ (while (re-search-forward gdbmi-var-list-children-regexp nil t)
+ (let ((varchild (list (match-string 2)
+ (match-string 1)
+ (match-string 3)
+ nil
+ (match-string 4)
+ nil)))
+ (if (looking-at ",type=\"\\(.*?\\)\"")
+ (setcar (nthcdr 3 varchild) (match-string 1)))
+ (dolist (var1 gdb-var-list)
+ (if (string-equal (cadr var1) (cadr varchild))
+ (throw 'child-already-watched nil)))
+ (push varchild var-list))))
+ (push var var-list)))
+ (setq gdb-var-changed t)
+ (setq gdb-var-list (nreverse var-list))))))
+
+;(defun gdbmi-send (proc string)
+; "A comint send filter for gdb."
+; (setq gdb-output-sink 'user)
+; (setq gdb-prompting nil)
+; (process-send-string proc (concat "-interpreter-exec console \"" string "\"")))
+
+(defun gdbmi-send (proc string)
+ "A comint send filter for gdb."
+ (setq gdb-output-sink 'user)
+ (setq gdb-prompting nil)
+ (process-send-string proc (concat string "\n")))
+
+(defcustom gud-gdbmi-command-name "~/gdb/gdb/gdb -interp=mi"
+ "Default command to execute an executable under the GDB-UI debugger."
+ :type 'string
+ :group 'gud)
+
+(defconst gdb-stopped-regexp
+ "\\((gdb) \n\\*stopped\\|^\\^done\\),reason=.*,file=\"\\(.*\\)\",line=\"\\(.*\\)\".*")
+
+(defconst gdb-console-regexp "~\"\\(.*\\)\\\\n\"")
+
+(defconst gdb-internals-regexp "&\".*\\n\"\n")
+
+(defconst gdb-gdb-regexp "(gdb) \n")
+
+(defconst gdb-running-regexp "^\\^running")
+
+(defun gdbmi-prompt ()
+ "This handler terminates the any collection of output. It also
+ sends the next command (if any) to gdb."
+ (unless gdb-pending-triggers
+ (gdb-get-current-frame)
+ (gdbmi-invalidate-frames)
+ (gdbmi-invalidate-breakpoints)
+ (gdbmi-invalidate-locals)
+ (dolist (frame (frame-list))
+ (when (string-equal (frame-parameter frame 'name) "Speedbar")
+ (setq gdb-var-changed t) ; force update
+ (dolist (var gdb-var-list)
+ (setcar (nthcdr 5 var) nil))))
+ (gdb-var-update))
+ (let ((sink gdb-output-sink))
+ (when (eq sink 'emacs)
+ (let ((handler
+ (car (cdr gdb-current-item))))
+ (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
+ (funcall handler)))))
+ (let ((input (gdb-dequeue-input)))
+ (if input
+ (gdb-send-item input)
+ (progn
+ (setq gud-running nil)
+ (setq gdb-prompting t)
+ (gud-display-frame)))))
+
+(defun gud-gdbmi-marker-filter (string)
+ "Filter GDB/MI output."
+ (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log))
+ ;; Recall the left over gud-marker-acc from last time
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ ;; Start accumulating output for the GUD buffer
+ (let ((output ""))
+
+ (if (string-match gdb-running-regexp gud-marker-acc)
+ (setq gud-marker-acc (substring gud-marker-acc (match-end 0))
+ gud-running t))
+
+ ;; Remove the trimmings from the console stream.
+ (while (string-match gdb-console-regexp gud-marker-acc)
+ (setq
+ gud-marker-acc (concat (substring gud-marker-acc 0 (match-beginning 0))
+ (match-string 1 gud-marker-acc)
+ (substring gud-marker-acc (match-end 0)))))
+
+ ;; Remove log stream containing debugging messages being produced by GDB's
+ ;; internals.
+ (while (string-match gdb-internals-regexp gud-marker-acc)
+ (setq
+ gud-marker-acc (concat (substring gud-marker-acc 0 (match-beginning 0))
+ (substring gud-marker-acc (match-end 0)))))
+
+ (if (string-match gdb-stopped-regexp gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame (cons (match-string 2 gud-marker-acc)
+ (string-to-int (match-string 3 gud-marker-acc)))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (gdbmi-concat-output output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ (while (string-match gdb-gdb-regexp gud-marker-acc)
+ (setq
+
+ ;; Append any text up to and including prompt less \n to the output.
+ output (gdbmi-concat-output output
+ (substring gud-marker-acc 0 (- (match-end 0) 1)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0)))
+ (gdbmi-prompt))
+
+ (setq output (gdbmi-concat-output output gud-marker-acc))
+ (setq gud-marker-acc "")
+ output))
+
+(defun gdbmi-concat-output (so-far new)
+ (let ((sink gdb-output-sink))
+ (cond
+ ((eq sink 'user) (concat so-far new))
+ ((eq sink 'emacs)
+ (gdb-append-to-partial-output new)
+ so-far)
+ ((eq sink 'inferior)
+ (gdb-append-to-inferior-io new)
+ so-far))))
+
+
+;; Breakpoint buffer : This displays the output of `-break-list'.
+;;
+(def-gdb-auto-updated-buffer gdb-breakpoints-buffer
+ ;; This defines the auto update rule for buffers of type
+ ;; `gdb-breakpoints-buffer'.
+ ;;
+ ;; It defines a function that queues the command below. That function is
+ ;; called:
+ gdbmi-invalidate-breakpoints
+ ;;
+ ;; To update the buffer, this command is sent to gdb.
+ "-break-list\n"
+ ;;
+ ;; This also defines a function to be the handler for the output
+ ;; from the command above. That function will copy the output into
+ ;; the appropriately typed buffer. That function will be called:
+ gdb-break-list-handler
+ ;; buffer specific functions
+ gdb-break-list-custom)
+
+(defconst gdb-break-list-regexp
+"number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",file=\"\\(.*?\\)\",line=\"\\(.*?\\)\"")
+
+(defun gdb-break-list-handler ()
+ (setq gdb-pending-triggers (delq 'gdbmi-invalidate-breakpoints
+ gdb-pending-triggers))
+ (let ((breakpoint nil)
+ (breakpoints-list nil))
+ (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward gdb-break-list-regexp nil t)
+ (let ((breakpoint (list (match-string 1)
+ (match-string 2)
+ (match-string 3)
+ (match-string 4)
+ (match-string 5)
+ (match-string 6)
+ (match-string 7)
+ (match-string 8))))
+ (push breakpoint breakpoints-list))))
+ (let ((buf (gdb-get-buffer 'gdb-breakpoints-buffer)))
+ (and buf (with-current-buffer buf
+ (let ((p (point))
+ (buffer-read-only nil))
+ (erase-buffer)
+ (insert "Num Type Disp Enb Func\tFile:Line\tAddr\n")
+ (dolist (breakpoint breakpoints-list)
+ (insert (concat
+ (nth 0 breakpoint) " "
+ (nth 1 breakpoint) " "
+ (nth 2 breakpoint) " "
+ (nth 3 breakpoint) " "
+ (nth 5 breakpoint) "\t"
+ (nth 6 breakpoint) ":" (nth 7 breakpoint) "\t"
+ (nth 4 breakpoint) "\n")))
+ (goto-char p))))))
+ (gdb-break-list-custom))
+
+;;-put breakpoint icons in relevant margins (even those set in the GUD buffer)
+(defun gdb-break-list-custom ()
+ (let ((flag)(address))
+ ;;
+ ;; remove all breakpoint-icons in source buffers but not assembler buffer
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (if (and (eq gud-minor-mode 'gdbmi)
+ (not (string-match "\\`\\*.+\\*\\'" (buffer-name))))
+ (gdb-remove-breakpoint-icons (point-min) (point-max)))))
+ (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
+ (save-excursion
+ (goto-char (point-min))
+ (while (< (point) (- (point-max) 1))
+ (forward-line 1)
+ (if (looking-at "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)")
+ (progn
+ (setq flag (char-after (match-beginning 1)))
+ (let ((line (match-string 3)) (buffer-read-only nil)
+ (file (match-string 2)))
+ (add-text-properties (point-at-bol) (point-at-eol)
+ '(mouse-face highlight
+ help-echo "mouse-2, RET: visit breakpoint"))
+ (with-current-buffer
+ (find-file-noselect
+ (if (file-exists-p file) file
+ (expand-file-name file gdb-cdir)))
+ (save-current-buffer
+ (set (make-local-variable 'gud-minor-mode) 'gdbmi)
+ (set (make-local-variable 'tool-bar-map)
+ gud-tool-bar-map))
+ ;; only want one breakpoint icon at each location
+ (save-excursion
+ (goto-line (string-to-number line))
+ (gdb-put-breakpoint-icon (eq flag ?y)))))))))
+ (end-of-line)))
+ (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
+
+;; Frames buffer. This displays a perpetually correct bactrack trace.
+;;
+(def-gdb-auto-updated-buffer gdb-stack-buffer
+ gdbmi-invalidate-frames
+ "-stack-list-frames\n"
+ gdb-stack-list-frames-handler
+ gdb-stack-list-frames-custom)
+
+(defconst gdb-stack-list-frames-regexp
+"level=\"\\(.*?\\)\",addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",file=\"\\(.*?\\)\",line=\"\\(.*?\\)\"")
+
+(defun gdb-stack-list-frames-handler ()
+ (setq gdb-pending-triggers (delq 'gdbmi-invalidate-frames
+ gdb-pending-triggers))
+ (let ((frame nil)
+ (call-stack nil))
+ (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward gdb-stack-list-frames-regexp nil t)
+ (let ((frame (list (match-string 1)
+ (match-string 2)
+ (match-string 3)
+ (match-string 4)
+ (match-string 5))))
+ (push frame call-stack))))
+ (let ((buf (gdb-get-buffer 'gdb-stack-buffer)))
+ (and buf (with-current-buffer buf
+ (let ((p (point))
+ (buffer-read-only nil))
+ (erase-buffer)
+ (insert "Level\tFunc\tFile:Line\tAddr\n")
+ (dolist (frame (nreverse call-stack))
+ (insert (concat
+ (nth 0 frame) "\t"
+ (nth 2 frame) "\t"
+ (nth 3 frame) ":" (nth 4 frame) "\t"
+ (nth 1 frame) "\n")))
+ (goto-char p))))))
+ (gdb-stack-list-frames-custom))
+
+(defun gdb-stack-list-frames-custom ()
+ (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
+ (save-excursion
+ (let ((buffer-read-only nil))
+ (goto-char (point-min))
+ (forward-line 1)
+ (while (< (point) (point-max))
+ (add-text-properties (point-at-bol) (point-at-eol)
+ '(mouse-face highlight
+ help-echo "mouse-2, RET: Select frame"))
+ (beginning-of-line)
+ (when (and (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)")
+ (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)"))
+ (equal (match-string 1) gdb-current-frame))
+ (put-text-property (point-at-bol) (point-at-eol)
+ 'face '(:inverse-video t)))
+ (forward-line 1))))))
+
+;; Locals buffer.
+;; uses "-stack-list-locals 2". Needs GDB 6.1 onwards.
+(def-gdb-auto-updated-buffer gdb-locals-buffer
+ gdbmi-invalidate-locals
+ "-stack-list-locals 2\n"
+ gdb-stack-list-locals-handler
+ gdb-stack-list-locals-custom)
+
+(defconst gdb-stack-list-locals-regexp
+ (concat "name=\"\\(.*?\\)\",type=\"\\(.*?\\)\""))
+
+;; Dont display values of arrays or structures.
+;; These can be expanded using gud-watch.
+(defun gdb-stack-list-locals-handler nil
+ (setq gdb-pending-triggers (delq 'gdbmi-invalidate-locals
+ gdb-pending-triggers))
+ (let ((local nil)
+ (locals-list nil))
+ (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward gdb-stack-list-locals-regexp nil t)
+ (let ((local (list (match-string 1)
+ (match-string 2)
+ nil)))
+ (if (looking-at ",value=\"\\(.*?\\)\"")
+ (setcar (nthcdr 2 local) (match-string 1)))
+ (push local locals-list))))
+ (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
+ (and buf (with-current-buffer buf
+ (let ((p (point))
+ (buffer-read-only nil))
+ (erase-buffer)
+ (dolist (local locals-list)
+ (insert
+ (concat (car local) "\t" (nth 1 local) "\t"
+ (or (nth 2 local)
+ (if (string-match "struct" (nth 1 local))
+ "(structure)"
+ "(array)"))
+ "\n")))
+ (goto-char p)))))))
+
+(defun gdb-stack-list-locals-custom ()
+ nil)
+
+(defun gdbmi-source-info ()
+ "Find the source file where the program starts and displays it with related
+buffers."
+ (goto-char (point-min))
+ (if (search-forward "source file is " nil t)
+ (if (looking-at "\\S-*")
+ (setq gdb-main-file (match-string 0)))
+ (setq gdb-view-source nil))
+ (if (search-forward "directory is " nil t)
+ (if (looking-at "\\S-*:\\(\\S-*\\)")
+ (setq gdb-cdir (match-string 1))
+ (looking-at "\\S-*")
+ (setq gdb-cdir (match-string 0))))
+
+;temporary heuristic
+ (if gdb-main-file
+ (setq gdb-main-file (expand-file-name gdb-main-file gdb-cdir)))
+
+ (if gdb-many-windows
+ (gdb-setup-windows)
+ (gdb-get-create-buffer 'gdb-breakpoints-buffer)
+ (when gdb-show-main
+ (switch-to-buffer gud-comint-buffer)
+ (delete-other-windows)
+ (split-window)
+ (other-window 1)
+ (switch-to-buffer
+ (if gdb-view-source
+ (gud-find-file gdb-main-file)
+ (gdb-get-create-buffer 'gdb-assembler-buffer)))
+ (other-window 1))))
+
+(provide 'gdb-mi)
+;;; gdbmi.el ends here
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 5d15aa98b8a..528cd3c9d3e 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -134,7 +134,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
address = argv[optind];
/* Now we have what we need, let's insert the breakpoint! */
- old_hooks = set_gdb_event_hooks (&breakpoint_hooks);
+ old_hooks = deprecated_set_gdb_event_hooks (&breakpoint_hooks);
switch (type)
{
case REG_BP:
@@ -160,7 +160,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
internal_error (__FILE__, __LINE__,
"mi_cmd_break_insert: Bad switch.");
}
- set_gdb_event_hooks (old_hooks);
+ deprecated_set_gdb_event_hooks (old_hooks);
if (rc == GDB_RC_FAIL)
return MI_CMD_CAUGHT_ERROR;
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index 439c71912bd..65f7f90a355 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -54,7 +54,7 @@ env_execute_cli_command (const char *cmd, const char *args)
struct cleanup *old_cleanups;
char *run;
if (args != NULL)
- xasprintf (&run, "%s %s", cmd, args);
+ run = xstrprintf ("%s %s", cmd, args);
else
run = xstrdup (cmd);
old_cleanups = make_cleanup (xfree, run);
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
index eb1d67a6a8d..aa20a793f3a 100644
--- a/gdb/mi/mi-cmd-file.c
+++ b/gdb/mi/mi-cmd-file.c
@@ -25,6 +25,7 @@
#include "ui-out.h"
#include "symtab.h"
#include "source.h"
+#include "objfiles.h"
/* Return to the client the absolute path and line number of the
current file being executed. */
@@ -39,7 +40,6 @@ mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc)
if ( !mi_valid_noargs("mi_cmd_file_list_exec_source_file", argc, argv) )
error ("mi_cmd_file_list_exec_source_file: Usage: No args");
-
/* Set the default file and line, also get them */
set_default_source_symtab_and_line();
st = get_current_source_symtab_and_line();
@@ -51,17 +51,68 @@ mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc)
error ("mi_cmd_file_list_exec_source_file: No symtab");
/* Extract the fullname if it is not known yet */
- if (st.symtab->fullname == NULL)
- symtab_to_filename (st.symtab);
-
- /* We may not be able to open the file (not available). */
- if (st.symtab->fullname == NULL)
- error ("mi_cmd_file_list_exec_source_file: File not found");
+ symtab_to_fullname (st.symtab);
/* Print to the user the line, filename and fullname */
ui_out_field_int (uiout, "line", st.line);
ui_out_field_string (uiout, "file", st.symtab->filename);
+
+ /* We may not be able to open the file (not available). */
+ if (st.symtab->fullname)
ui_out_field_string (uiout, "fullname", st.symtab->fullname);
return MI_CMD_DONE;
}
+
+enum mi_cmd_result
+mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc)
+{
+ struct symtab *s;
+ struct partial_symtab *ps;
+ struct objfile *objfile;
+
+ if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_files", argc, argv))
+ error ("mi_cmd_file_list_exec_source_files: Usage: No args");
+
+ /* Print the table header */
+ ui_out_begin (uiout, ui_out_type_list, "files");
+
+ /* Look at all of the symtabs */
+ ALL_SYMTABS (objfile, s)
+ {
+ ui_out_begin (uiout, ui_out_type_tuple, NULL);
+
+ ui_out_field_string (uiout, "file", s->filename);
+
+ /* Extract the fullname if it is not known yet */
+ symtab_to_fullname (s);
+
+ if (s->fullname)
+ ui_out_field_string (uiout, "fullname", s->fullname);
+
+ ui_out_end (uiout, ui_out_type_tuple);
+ }
+
+ /* Look at all of the psymtabs */
+ ALL_PSYMTABS (objfile, ps)
+ {
+ if (!ps->readin)
+ {
+ ui_out_begin (uiout, ui_out_type_tuple, NULL);
+
+ ui_out_field_string (uiout, "file", ps->filename);
+
+ /* Extract the fullname if it is not known yet */
+ psymtab_to_fullname (ps);
+
+ if (ps->fullname)
+ ui_out_field_string (uiout, "fullname", ps->fullname);
+
+ ui_out_end (uiout, ui_out_type_tuple);
+ }
+ }
+
+ ui_out_end (uiout, ui_out_type_list);
+
+ return MI_CMD_DONE;
+}
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 7db9ffbea63..37d0846c82e 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -85,14 +85,9 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
i++, fi = get_prev_frame (fi))
{
QUIT;
- /* level == i: always print the level 'i'
- source == LOC_AND_ADDRESS: print the location and the address
- always, even for level 0.
+ /* Print the location and the address always, even for level 0.
args == 0: don't print the arguments. */
- print_frame_info (fi /* frame info */ ,
- i /* level */ ,
- LOC_AND_ADDRESS /* source */ ,
- 0 /* args */ );
+ print_frame_info (fi, 1, LOC_AND_ADDRESS, 0 /* args */ );
}
do_cleanups (cleanup_stack);
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 709ed301052..6f3a2b7dfe4 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -50,9 +50,8 @@ mi_cmd_var_create (char *command, char **argv, int argc)
if (argc != 3)
{
- /* xasprintf (&mi_error_message,
- "mi_cmd_var_create: Usage: .");
- return MI_CMD_ERROR; */
+ /* mi_error_message = xstrprintf ("mi_cmd_var_create: Usage:
+ ...."); return MI_CMD_ERROR; */
error ("mi_cmd_var_create: Usage: NAME FRAME EXPRESSION.");
}
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 0dfc2170ec9..918676df26d 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -81,7 +81,7 @@ struct mi_cmd mi_cmds[] =
{ "file-exec-file", { "exec-file", 1 }, NULL, NULL },
{ "file-list-exec-sections", { NULL, 0 }, NULL, NULL },
{ "file-list-exec-source-file", { NULL, 0 }, 0, mi_cmd_file_list_exec_source_file},
- { "file-list-exec-source-files", { NULL, 0 }, NULL, NULL },
+ { "file-list-exec-source-files", { NULL, 0 }, NULL, mi_cmd_file_list_exec_source_files },
{ "file-list-shared-libraries", { NULL, 0 }, NULL, NULL },
{ "file-list-symbol-files", { NULL, 0 }, NULL, NULL },
{ "file-symbol-file", { "symbol-file", 1 }, NULL, NULL },
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 545305986c6..f9a08d9d30d 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -87,6 +87,7 @@ extern mi_cmd_args_ftype mi_cmd_exec_step_instruction;
extern mi_cmd_args_ftype mi_cmd_exec_until;
extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_file;
+extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_files;
extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
extern mi_cmd_argv_ftype mi_cmd_interpreter_exec;
extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
@@ -146,7 +147,6 @@ extern int mi_debug_p;
extern struct ui_file *raw_stdout;
extern char *mi_error_message;
-extern void mi_error_last_message (void);
extern void mi_execute_command (char *cmd, int from_tty);
#endif
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 08201ca5bb2..71abb75565c 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -51,7 +51,6 @@ struct mi_interp
/* These are the interpreter setup, etc. functions for the MI interpreter */
static void mi_execute_command_wrapper (char *cmd);
static void mi_command_loop (int mi_version);
-static char *mi_input (char *);
/* These are hooks that we put in place while doing interpreter_exec
so we can report interesting things that happened "behind the mi's
@@ -99,22 +98,19 @@ mi_interpreter_resume (void *data)
gdb_setup_readline ();
- if (event_loop_p)
- {
- /* These overwrite some of the initialization done in
- _intialize_event_loop. */
- call_readline = gdb_readline2;
- input_handler = mi_execute_command_wrapper;
- add_file_handler (input_fd, stdin_event_handler, 0);
- async_command_editing_p = 0;
- /* FIXME: This is a total hack for now. PB's use of the MI implicitly
- relies on a bug in the async support which allows asynchronous
- commands to leak through the commmand loop. The bug involves
- (but is not limited to) the fact that sync_execution was
- erroneously initialized to 0. Duplicate by initializing it
- thus here... */
- sync_execution = 0;
- }
+ /* These overwrite some of the initialization done in
+ _intialize_event_loop. */
+ call_readline = gdb_readline2;
+ input_handler = mi_execute_command_wrapper;
+ add_file_handler (input_fd, stdin_event_handler, 0);
+ async_command_editing_p = 0;
+ /* FIXME: This is a total hack for now. PB's use of the MI
+ implicitly relies on a bug in the async support which allows
+ asynchronous commands to leak through the commmand loop. The bug
+ involves (but is not limited to) the fact that sync_execution was
+ erroneously initialized to 0. Duplicate by initializing it thus
+ here... */
+ sync_execution = 0;
gdb_stdout = mi->out;
/* Route error and log output through the MI */
@@ -127,17 +123,17 @@ mi_interpreter_resume (void *data)
be a better way of doing this... */
clear_interpreter_hooks ();
- show_load_progress = mi_load_progress;
+ deprecated_show_load_progress = mi_load_progress;
/* If we're _the_ interpreter, take control. */
if (current_interp_named_p (INTERP_MI1))
- command_loop_hook = mi1_command_loop;
+ deprecated_command_loop_hook = mi1_command_loop;
else if (current_interp_named_p (INTERP_MI2))
- command_loop_hook = mi2_command_loop;
+ deprecated_command_loop_hook = mi2_command_loop;
else if (current_interp_named_p (INTERP_MI3))
- command_loop_hook = mi3_command_loop;
+ deprecated_command_loop_hook = mi3_command_loop;
else
- command_loop_hook = mi2_command_loop;
+ deprecated_command_loop_hook = mi2_command_loop;
return 1;
}
@@ -194,25 +190,21 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
if (argc < 2)
{
- xasprintf (&mi_error_message,
- "mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command");
+ mi_error_message = xstrprintf ("mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command");
return MI_CMD_ERROR;
}
interp_to_use = interp_lookup (argv[0]);
if (interp_to_use == NULL)
{
- xasprintf (&mi_error_message,
- "mi_cmd_interpreter_exec: could not find interpreter \"%s\"",
- argv[0]);
+ mi_error_message = xstrprintf ("mi_cmd_interpreter_exec: could not find interpreter \"%s\"", argv[0]);
return MI_CMD_ERROR;
}
if (!interp_exec_p (interp_to_use))
{
- xasprintf (&mi_error_message,
- "mi_cmd_interpreter_exec: interpreter \"%s\" does not support command execution",
- argv[0]);
+ mi_error_message = xstrprintf ("mi_cmd_interpreter_exec: interpreter \"%s\" does not support command execution",
+ argv[0]);
return MI_CMD_ERROR;
}
@@ -246,7 +238,7 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
sync_execution = 1;
if (interp_exec (interp_to_use, argv[i]) < 0)
{
- mi_error_last_message ();
+ mi_error_message = error_last_message ();
result = MI_CMD_ERROR;
break;
}
@@ -282,13 +274,13 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
static void
mi_insert_notify_hooks (void)
{
- query_hook = mi_interp_query_hook;
+ deprecated_query_hook = mi_interp_query_hook;
}
static void
mi_remove_notify_hooks (void)
{
- query_hook = NULL;
+ deprecated_query_hook = NULL;
}
static int
@@ -341,27 +333,27 @@ mi_command_loop (int mi_version)
uiout = mi_out_new (mi_version);
/* HACK: Override any other interpreter hooks. We need to create a
real event table and pass in that. */
- init_ui_hook = 0;
- /* command_loop_hook = 0; */
- print_frame_info_listing_hook = 0;
- query_hook = 0;
- warning_hook = 0;
- create_breakpoint_hook = 0;
- delete_breakpoint_hook = 0;
- modify_breakpoint_hook = 0;
- interactive_hook = 0;
- registers_changed_hook = 0;
- readline_begin_hook = 0;
- readline_hook = 0;
- readline_end_hook = 0;
- register_changed_hook = 0;
- memory_changed_hook = 0;
- context_hook = 0;
- target_wait_hook = 0;
- call_command_hook = 0;
- error_hook = 0;
- error_begin_hook = 0;
- show_load_progress = mi_load_progress;
+ deprecated_init_ui_hook = 0;
+ /* deprecated_command_loop_hook = 0; */
+ deprecated_print_frame_info_listing_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_warning_hook = 0;
+ deprecated_create_breakpoint_hook = 0;
+ deprecated_delete_breakpoint_hook = 0;
+ deprecated_modify_breakpoint_hook = 0;
+ deprecated_interactive_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_readline_begin_hook = 0;
+ deprecated_readline_hook = 0;
+ deprecated_readline_end_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_memory_changed_hook = 0;
+ deprecated_context_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_call_command_hook = 0;
+ deprecated_error_hook = 0;
+ deprecated_error_begin_hook = 0;
+ deprecated_show_load_progress = mi_load_progress;
#endif
/* Turn off 8 bit strings in quoted output. Any character with the
high bit set is printed using C's octal format. */
@@ -369,16 +361,7 @@ mi_command_loop (int mi_version)
/* Tell the world that we're alive */
fputs_unfiltered ("(gdb) \n", raw_stdout);
gdb_flush (raw_stdout);
- if (!event_loop_p)
- simplified_command_loop (mi_input, mi_execute_command);
- else
- start_event_loop ();
-}
-
-static char *
-mi_input (char *buf)
-{
- return gdb_readline (NULL);
+ start_event_loop ();
}
extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index c46bf636597..6961992d548 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -99,16 +99,6 @@ static void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg);
static int register_changed_p (int regnum);
static int get_register (int regnum, int format);
-/* A helper function which will set mi_error_message to
- error_last_message. */
-void
-mi_error_last_message (void)
-{
- char *s = error_last_message ();
- xasprintf (&mi_error_message, "%s", s);
- xfree (s);
-}
-
/* Command implementations. FIXME: Is this libgdb? No. This is the MI
layer that calls libgdb. Any operation used in the below should be
formalized. */
@@ -191,9 +181,7 @@ mi_cmd_exec_return (char *args, int from_tty)
/* Because we have called return_command with from_tty = 0, we need
to print the frame here. */
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame),
- LOC_AND_ADDRESS);
+ print_stack_frame (get_selected_frame (), 1, LOC_AND_ADDRESS);
return MI_CMD_DONE;
}
@@ -215,8 +203,7 @@ mi_cmd_exec_interrupt (char *args, int from_tty)
{
if (!target_executing)
{
- xasprintf (&mi_error_message,
- "mi_cmd_exec_interrupt: Inferior not executing.");
+ mi_error_message = xstrprintf ("mi_cmd_exec_interrupt: Inferior not executing.");
return MI_CMD_ERROR;
}
interrupt_target_command (args, from_tty);
@@ -241,8 +228,7 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
if (argc != 1)
{
- xasprintf (&mi_error_message,
- "mi_cmd_thread_select: USAGE: threadnum.");
+ mi_error_message = xstrprintf ("mi_cmd_thread_select: USAGE: threadnum.");
return MI_CMD_ERROR;
}
else
@@ -265,8 +251,7 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc)
if (argc != 0)
{
- xasprintf (&mi_error_message,
- "mi_cmd_thread_list_ids: No arguments required.");
+ mi_error_message = xstrprintf ("mi_cmd_thread_list_ids: No arguments required.");
return MI_CMD_ERROR;
}
else
@@ -316,7 +301,7 @@ mi_cmd_data_list_register_names (char *command, char **argv, int argc)
if (regnum < 0 || regnum >= numregs)
{
do_cleanups (cleanup);
- xasprintf (&mi_error_message, "bad register number");
+ mi_error_message = xstrprintf ("bad register number");
return MI_CMD_ERROR;
}
if (REGISTER_NAME (regnum) == NULL
@@ -342,7 +327,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
case, some entries of REGISTER_NAME will change depending upon
the particular processor being debugged. */
- numregs = NUM_REGS;
+ numregs = NUM_REGS + NUM_PSEUDO_REGS;
cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changed-registers");
@@ -359,8 +344,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
if (changed < 0)
{
do_cleanups (cleanup);
- xasprintf (&mi_error_message,
- "mi_cmd_data_list_changed_registers: Unable to read register contents.");
+ mi_error_message = xstrprintf ("mi_cmd_data_list_changed_registers: Unable to read register contents.");
return MI_CMD_ERROR;
}
else if (changed)
@@ -382,8 +366,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
if (changed < 0)
{
do_cleanups (cleanup);
- xasprintf (&mi_error_message,
- "mi_cmd_data_list_register_change: Unable to read register contents.");
+ mi_error_message = xstrprintf ("mi_cmd_data_list_register_change: Unable to read register contents.");
return MI_CMD_ERROR;
}
else if (changed)
@@ -392,7 +375,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
else
{
do_cleanups (cleanup);
- xasprintf (&mi_error_message, "bad register number");
+ mi_error_message = xstrprintf ("bad register number");
return MI_CMD_ERROR;
}
}
@@ -409,13 +392,13 @@ register_changed_p (int regnum)
return -1;
if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (regnum)) == 0)
+ register_size (current_gdbarch, regnum)) == 0)
return 0;
/* Found a changed register. Return 1. */
memcpy (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ register_size (current_gdbarch, regnum));
return 1;
}
@@ -440,12 +423,11 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
case, some entries of REGISTER_NAME will change depending upon
the particular processor being debugged. */
- numregs = NUM_REGS;
+ numregs = NUM_REGS + NUM_PSEUDO_REGS;
if (argc == 0)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> [<regnum1>...<regnumN>]");
+ mi_error_message = xstrprintf ("mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> [<regnum1>...<regnumN>]");
return MI_CMD_ERROR;
}
@@ -453,8 +435,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
if (!target_has_registers)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_list_register_values: No registers.");
+ mi_error_message = xstrprintf ("mi_cmd_data_list_register_values: No registers.");
return MI_CMD_ERROR;
}
@@ -504,7 +485,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
else
{
do_cleanups (list_cleanup);
- xasprintf (&mi_error_message, "bad register number");
+ mi_error_message = xstrprintf ("bad register number");
return MI_CMD_ERROR;
}
}
@@ -516,8 +497,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
static int
get_register (int regnum, int format)
{
- char raw_buffer[MAX_REGISTER_SIZE];
- char virtual_buffer[MAX_REGISTER_SIZE];
+ char buffer[MAX_REGISTER_SIZE];
int optim;
int realnum;
CORE_ADDR addr;
@@ -530,26 +510,14 @@ get_register (int regnum, int format)
format = 0;
frame_register (deprecated_selected_frame, regnum, &optim, &lval, &addr,
- &realnum, raw_buffer);
+ &realnum, buffer);
if (optim)
{
- xasprintf (&mi_error_message, "Optimized out");
+ mi_error_message = xstrprintf ("Optimized out");
return -1;
}
- /* Convert raw data to virtual format if necessary. */
-
- if (DEPRECATED_REGISTER_CONVERTIBLE_P ()
- && DEPRECATED_REGISTER_CONVERTIBLE (regnum))
- {
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
- register_type (current_gdbarch, regnum),
- raw_buffer, virtual_buffer);
- }
- else
- memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
-
if (format == 'r')
{
int j;
@@ -557,11 +525,11 @@ get_register (int regnum, int format)
strcpy (buf, "0x");
ptr = buf + 2;
- for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (regnum); j++)
+ for (j = 0; j < register_size (current_gdbarch, regnum); j++)
{
int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
- : DEPRECATED_REGISTER_RAW_SIZE (regnum) - 1 - j;
- sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]);
+ : register_size (current_gdbarch, regnum) - 1 - j;
+ sprintf (ptr, "%02x", (unsigned char) buffer[idx]);
ptr += 2;
}
ui_out_field_string (uiout, "value", buf);
@@ -569,7 +537,7 @@ get_register (int regnum, int format)
}
else
{
- val_print (register_type (current_gdbarch, regnum), virtual_buffer, 0, 0,
+ val_print (register_type (current_gdbarch, regnum), buffer, 0, 0,
stb->stream, format, 1, 0, Val_pretty_default);
ui_out_field_stream (uiout, "value", stb);
ui_out_stream_delete (stb);
@@ -595,12 +563,11 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
case, some entries of REGISTER_NAME will change depending upon
the particular processor being debugged. */
- numregs = NUM_REGS;
+ numregs = NUM_REGS + NUM_PSEUDO_REGS;
if (argc == 0)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_write_register_values: Usage: -data-write-register-values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
+ mi_error_message = xstrprintf ("mi_cmd_data_write_register_values: Usage: -data-write-register-values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
return MI_CMD_ERROR;
}
@@ -608,22 +575,19 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
if (!target_has_registers)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_write_register_values: No registers.");
+ mi_error_message = xstrprintf ("mi_cmd_data_write_register_values: No registers.");
return MI_CMD_ERROR;
}
if (!(argc - 1))
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_write_register_values: No regs and values specified.");
+ mi_error_message = xstrprintf ("mi_cmd_data_write_register_values: No regs and values specified.");
return MI_CMD_ERROR;
}
if ((argc - 1) % 2)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_write_register_values: Regs and vals are not in pairs.");
+ mi_error_message = xstrprintf ("mi_cmd_data_write_register_values: Regs and vals are not in pairs.");
return MI_CMD_ERROR;
}
@@ -646,13 +610,13 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
old_chain = make_cleanup (xfree, buffer);
store_signed_integer (buffer, DEPRECATED_REGISTER_SIZE, value);
/* Write it down */
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum), buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum), buffer, register_size (current_gdbarch, regnum));
/* Free the buffer. */
do_cleanups (old_chain);
}
else
{
- xasprintf (&mi_error_message, "bad register number");
+ mi_error_message = xstrprintf ("bad register number");
return MI_CMD_ERROR;
}
}
@@ -674,8 +638,7 @@ mi_cmd_data_assign (char *command, char **argv, int argc)
if (argc != 1)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_assign: Usage: -data-assign expression");
+ mi_error_message = xstrprintf ("mi_cmd_data_assign: Usage: -data-assign expression");
return MI_CMD_ERROR;
}
@@ -705,8 +668,7 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc)
if (argc != 1)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_evaluate_expression: Usage: -data-evaluate-expression expression");
+ mi_error_message = xstrprintf ("mi_cmd_data_evaluate_expression: Usage: -data-evaluate-expression expression");
return MI_CMD_ERROR;
}
@@ -735,7 +697,7 @@ mi_cmd_target_download (char *args, int from_tty)
char *run;
struct cleanup *old_cleanups = NULL;
- xasprintf (&run, "load %s", args);
+ run = xstrprintf ("load %s", args);
old_cleanups = make_cleanup (xfree, run);
execute_command (run, from_tty);
@@ -750,7 +712,7 @@ mi_cmd_target_select (char *args, int from_tty)
char *run;
struct cleanup *old_cleanups = NULL;
- xasprintf (&run, "target %s", args);
+ run = xstrprintf ("target %s", args);
old_cleanups = make_cleanup (xfree, run);
/* target-select is always synchronous. once the call has returned
@@ -838,8 +800,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
if (argc < 5 || argc > 6)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_read_memory: Usage: ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
+ mi_error_message = xstrprintf ("mi_cmd_data_read_memory: Usage: ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
return MI_CMD_ERROR;
}
@@ -878,16 +839,15 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
nr_rows = atol (argv[3]);
if (nr_rows <= 0)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_read_memory: invalid number of rows.");
+ mi_error_message = xstrprintf ("mi_cmd_data_read_memory: invalid number of rows.");
return MI_CMD_ERROR;
}
/* number of bytes per row. */
nr_cols = atol (argv[4]);
if (nr_cols <= 0)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_read_memory: invalid number of columns.");
+ mi_error_message = xstrprintf ("mi_cmd_data_read_memory: invalid number of columns.");
+ return MI_CMD_ERROR;
}
/* The un-printable character when printing ascii. */
if (argc == 6)
@@ -899,12 +859,6 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
total_bytes = word_size * nr_rows * nr_cols;
mbuf = xcalloc (total_bytes, 1);
make_cleanup (xfree, mbuf);
- if (mbuf == NULL)
- {
- xasprintf (&mi_error_message,
- "mi_cmd_data_read_memory: out of memory.");
- return MI_CMD_ERROR;
- }
nr_bytes = 0;
while (nr_bytes < total_bytes)
{
@@ -1048,8 +1002,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
if (argc != 4)
{
- xasprintf (&mi_error_message,
- "mi_cmd_data_write_memory: Usage: [-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
+ mi_error_message = xstrprintf ("mi_cmd_data_write_memory: Usage: [-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
return MI_CMD_ERROR;
}
@@ -1314,7 +1267,7 @@ mi_execute_cli_command (const char *cmd, int args_p, const char *args)
struct cleanup *old_cleanups;
char *run;
if (args_p)
- xasprintf (&run, "%s %s", cmd, args);
+ run = xstrprintf ("%s %s", cmd, args);
else
run = xstrdup (cmd);
if (mi_debug_p)
@@ -1341,14 +1294,14 @@ mi_execute_async_cli_command (char *mi, char *args, int from_tty)
make_exec_cleanup (free, async_args);
strcpy (async_args, args);
strcat (async_args, "&");
- xasprintf (&run, "%s %s", mi, async_args);
+ run = xstrprintf ("%s %s", mi, async_args);
make_exec_cleanup (free, run);
add_continuation (mi_exec_async_cli_cmd_continuation, NULL);
old_cleanups = NULL;
}
else
{
- xasprintf (&run, "%s %s", mi, args);
+ run = xstrprintf ("%s %s", mi, args);
old_cleanups = make_cleanup (xfree, run);
}
diff --git a/gdb/minimon.h b/gdb/minimon.h
deleted file mode 100644
index 94fd774a375..00000000000
--- a/gdb/minimon.h
+++ /dev/null
@@ -1,601 +0,0 @@
-/* Definitions and macros for support of AMD's remote debugger, MiniMON.
- Copyright 1990, 1991 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * Some basic types. FIXME, this should be done by declaring bitfield
- * sizes in the structs. We can't portably depend on a "long int" being
- * 32 bits, etc.
- */
-typedef long int INT32; /* 32 bit integer */
-typedef unsigned long int UINT32; /* 32 bit integer (unsigned) */
-typedef unsigned long int ADDR32; /* 32 bit address */
-typedef unsigned long int INST32; /* 32 bit instruction */
-typedef long int BOOLEAN; /* Boolean value (32 bit) */
-typedef unsigned char BYTE; /* byte (8 bit) */
-typedef short int INT16; /* 16 bit integer */
-typedef unsigned short int UINT16; /* 16 bit integer (unsigned) */
-
-/****************************************************************************/
-/************************* Message Information ******************************/
-/****************************************************************************/
-
-/*
- * Error codes
- */
-
-/* General errors */
-#define EMUSAGE 1 /* Bad args / flags */
-#define EMFAIL 2 /* Unrecoverable error */
-#define EMBADADDR 3 /* Illegal address */
-#define EMBADREG 4 /* Illegal register */
-#define EMSYNTAX 5 /* Illegal command syntax */
-#define EMACCESS 6 /* Could not access memory */
-#define EMALLOC 7 /* Could not allocate memory */
-#define EMTARGET 8 /* Unknown target type */
-#define EMHINIT 9 /* Could not initialize host */
-#define EMCOMM 10 /* Could not open communication channel */
-
-/* Message errors */
-#define EMBADMSG 11 /* Unknown message type */
-#define EMMSG2BIG 12 /* Message to large for buffer */
-#define EMNOSEND 13 /* Could not send message */
-#define EMNORECV 14 /* Could not receive message */
-
-#define EMRESET 15 /* Could not RESET target */
-#define EMCONFIG 16 /* Could not get target CONFIG */
-#define EMSTATUS 17 /* Could not get target STATUS */
-#define EMREAD 18 /* Could not READ target memory */
-#define EMWRITE 19 /* Could not WRITE target memory */
-#define EMBKPTSET 20 /* Could not set breakpoint */
-#define EMBKPTRM 21 /* Could not remove breakpoint */
-#define EMBKPTSTAT 22 /* Could not get breakpoint status */
-#define EMBKPTNONE 23 /* All breakpoints in use */
-#define EMBKPTUSED 24 /* Breakpoints already in use */
-#define EMCOPY 25 /* Could not COPY target memory */
-#define EMFILL 26 /* Could not FILL target memory */
-#define EMINIT 27 /* Could not initialize target memory */
-#define EMGO 28 /* Could not start execution */
-#define EMSTEP 29 /* Could not single step */
-#define EMBREAK 30 /* Could not BREAK */
-#define EMHIF 31 /* Could not perform HIF service */
-#define EMCHANNEL0 32 /* Could not read CHANNEL0 */
-#define EMCHANNEL1 33 /* Could not write CHANNEL1 */
-
-/* COFF file loader errors */
-#define EMOPEN 34 /* Could not open COFF file */
-#define EMHDR 35 /* Could not read COFF header */
-#define EMMAGIC 36 /* Bad magic number */
-#define EMAOUT 37 /* Could not read COFF a.out header */
-#define EMSCNHDR 38 /* Could not read COFF section header */
-#define EMSCN 39 /* Could not read COFF section */
-#define EMCLOSE 40 /* Could not close COFF file */
-
-/* Log file errors */
-#define EMLOGOPEN 41 /* Could not open log file */
-#define EMLOGREAD 42 /* Could not read log file */
-#define EMLOGWRITE 43 /* Could not write to log file */
-#define EMLOGCLOSE 44 /* Could not close log file */
-
-/* Command file errors */
-#define EMCMDOPEN 45 /* Could not open command file */
-#define EMCMDREAD 46 /* Could not read command file */
-#define EMCMDWRITE 47 /* Could not write to command file */
-#define EMCMDCLOSE 48 /* Could not close comand file */
-
-#define EMTIMEOUT 49 /* Host timed out waiting for a message */
-#define EMCOMMTYPE 50 /* A '-t' flag must be specified */
-#define EMCOMMERR 51 /* Communication error */
-#define EMBAUD 52 /* Invalid baud rate specified */
-/*
- * Memory Spaces
- */
-#define LOCAL_REG 0 /* Local processor register */
-#define GLOBAL_REG 1 /* Global processor register */
-#define SPECIAL_REG 2 /* Special processor register */
-#define TLB_REG 3 /* Translation Lookaside Buffer */
-#define COPROC_REG 4 /* Coprocessor register */
-#define I_MEM 5 /* Instruction Memory */
-#define D_MEM 6 /* Data Memory */
-#define I_ROM 7 /* Instruction ROM */
-#define D_ROM 8 /* Data ROM */
-#define I_O 9 /* Input/Output */
-#define I_CACHE 10 /* Instruction Cache */
-#define D_CACHE 11 /* Data Cache */
-
-/* To supress warnings for zero length array definitions */
-#define DUMMY 1
-
-/*
- ** Host to target definitions
- */
-
-#define RESET 0
-#define CONFIG_REQ 1
-#define STATUS_REQ 2
-#define READ_REQ 3
-#define WRITE_REQ 4
-#define BKPT_SET 5
-#define BKPT_RM 6
-#define BKPT_STAT 7
-#define COPY 8
-#define FILL 9
-#define INIT 10
-#define GO 11
-#define STEP 12
-#define BREAK 13
-
-#define HIF_CALL_RTN 64
-#define CHANNEL0 65
-#define CHANNEL1_ACK 66
-
-
-/*
- ** Target to host definitions
- */
-
-#define RESET_ACK 32
-#define CONFIG 33
-#define STATUS 34
-#define READ_ACK 35
-#define WRITE_ACK 36
-#define BKPT_SET_ACK 37
-#define BKPT_RM_ACK 38
-#define BKPT_STAT_ACK 39
-#define COPY_ACK 40
-#define FILL_ACK 41
-#define INIT_ACK 42
-#define HALT 43
-
-#define ERROR 63
-
-#define HIF_CALL 96
-#define CHANNEL0_ACK 97
-#define CHANNEL1 98
-
-
-/* A "generic" message */
-struct generic_msg_t
- {
- INT32 code; /* generic */
- INT32 length;
- BYTE byte[DUMMY];
- };
-
-
-/* A "generic" message (with an INT32 array) */
-struct generic_int32_msg_t
- {
- INT32 code; /* generic */
- INT32 length;
- INT32 int32[DUMMY];
- };
-
-
-/*
- ** Host to target messages
- */
-
-struct reset_msg_t
- {
- INT32 code; /* 0 */
- INT32 length;
- };
-
-
-struct config_req_msg_t
- {
- INT32 code; /* 1 */
- INT32 length;
- };
-
-
-struct status_req_msg_t
- {
- INT32 code; /* 2 */
- INT32 length;
- };
-
-
-struct read_req_msg_t
- {
- INT32 code; /* 3 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- };
-
-
-struct write_req_msg_t
- {
- INT32 code; /* 4 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- BYTE data[DUMMY];
- };
-
-
-struct write_r_msg_t
- {
- INT32 code; /* 4 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- INT32 data[DUMMY];
- };
-
-
-struct bkpt_set_msg_t
- {
- INT32 code; /* 5 */
- INT32 length;
- INT32 memory_space;
- ADDR32 bkpt_addr;
- INT32 pass_count;
- INT32 bkpt_type;
- };
-
-
-struct bkpt_rm_msg_t
- {
- INT32 code; /* 6 */
- INT32 length;
- INT32 memory_space;
- ADDR32 bkpt_addr;
- };
-
-
-struct bkpt_stat_msg_t
- {
- INT32 code; /* 7 */
- INT32 length;
- INT32 memory_space;
- ADDR32 bkpt_addr;
- };
-
-
-struct copy_msg_t
- {
- INT32 code; /* 8 */
- INT32 length;
- INT32 source_space;
- ADDR32 source_addr;
- INT32 dest_space;
- ADDR32 dest_addr;
- INT32 byte_count;
- };
-
-
-struct fill_msg_t
- {
- INT32 code; /* 9 */
- INT32 length;
- INT32 memory_space;
- ADDR32 start_addr;
- INT32 fill_count;
- INT32 byte_count;
- BYTE fill_data[DUMMY];
- };
-
-
-struct init_msg_t
- {
- INT32 code; /* 10 */
- INT32 length;
- ADDR32 text_start;
- ADDR32 text_end;
- ADDR32 data_start;
- ADDR32 data_end;
- ADDR32 entry_point;
- INT32 mem_stack_size;
- INT32 reg_stack_size;
- ADDR32 arg_start;
- INT32 os_control;
- };
-
-
-struct go_msg_t
- {
- INT32 code; /* 11 */
- INT32 length;
- };
-
-
-struct step_msg_t
- {
- INT32 code; /* 12 */
- INT32 length;
- INT32 count;
- };
-
-
-struct break_msg_t
- {
- INT32 code; /* 13 */
- INT32 length;
- };
-
-
-struct hif_call_rtn_msg_t
- {
- INT32 code; /* 64 */
- INT32 length;
- INT32 service_number;
- INT32 gr121;
- INT32 gr96;
- INT32 gr97;
- };
-
-
-struct channel0_msg_t
- {
- INT32 code; /* 65 */
- INT32 length;
- BYTE data;
- };
-
-
-struct channel1_ack_msg_t
- {
- INT32 code; /* 66 */
- INT32 length;
- };
-
-
-/*
- ** Target to host messages
- */
-
-
-struct reset_ack_msg_t
- {
- INT32 code; /* 32 */
- INT32 length;
- };
-
-
-struct config_msg_t
- {
- INT32 code; /* 33 */
- INT32 length;
- INT32 processor_id;
- INT32 version;
- ADDR32 I_mem_start;
- INT32 I_mem_size;
- ADDR32 D_mem_start;
- INT32 D_mem_size;
- ADDR32 ROM_start;
- INT32 ROM_size;
- INT32 max_msg_size;
- INT32 max_bkpts;
- INT32 coprocessor;
- INT32 reserved;
- };
-
-
-struct status_msg_t
- {
- INT32 code; /* 34 */
- INT32 length;
- INT32 msgs_sent;
- INT32 msgs_received;
- INT32 errors;
- INT32 bkpts_hit;
- INT32 bkpts_free;
- INT32 traps;
- INT32 fills;
- INT32 spills;
- INT32 cycles;
- INT32 reserved;
- };
-
-
-struct read_ack_msg_t
- {
- INT32 code; /* 35 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- BYTE data[DUMMY];
- };
-
-struct read_r_ack_msg_t
- {
- INT32 code; /* 35 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- INT32 data[DUMMY];
- };
-
-
-struct write_ack_msg_t
- {
- INT32 code; /* 36 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 byte_count;
- };
-
-
-struct bkpt_set_ack_msg_t
- {
- INT32 code; /* 37 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 pass_count;
- INT32 bkpt_type;
- };
-
-
-struct bkpt_rm_ack_msg_t
- {
- INT32 code; /* 38 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- };
-
-
-struct bkpt_stat_ack_msg_t
- {
- INT32 code; /* 39 */
- INT32 length;
- INT32 memory_space;
- ADDR32 address;
- INT32 pass_count;
- INT32 bkpt_type;
- };
-
-
-struct copy_ack_msg_t
- {
- INT32 code; /* 40 */
- INT32 length;
- INT32 source_space;
- ADDR32 source_addr;
- INT32 dest_space;
- ADDR32 dest_addr;
- INT32 byte_count;
- };
-
-
-struct fill_ack_msg_t
- {
- INT32 code; /* 41 */
- INT32 length;
- INT32 memory_space;
- ADDR32 start_addr;
- INT32 fill_count;
- INT32 byte_count;
- };
-
-
-struct init_ack_msg_t
- {
- INT32 code; /* 42 */
- INT32 length;
- };
-
-
-struct halt_msg_t
- {
- INT32 code; /* 43 */
- INT32 length;
- INT32 memory_space;
- ADDR32 pc0;
- ADDR32 pc1;
- INT32 trap_number;
- };
-
-
-struct error_msg_t
- {
- INT32 code; /* 63 */
- INT32 length;
- INT32 error_code;
- INT32 memory_space;
- ADDR32 address;
- };
-
-
-struct hif_call_msg_t
- {
- INT32 code; /* 96 */
- INT32 length;
- INT32 service_number;
- INT32 lr2;
- INT32 lr3;
- INT32 lr4;
- };
-
-
-struct channel0_ack_msg_t
- {
- INT32 code; /* 97 */
- INT32 length;
- };
-
-
-struct channel1_msg_t
- {
- INT32 code; /* 98 */
- INT32 length;
- BYTE data[DUMMY];
- };
-
-
-
-/*
- ** Union all of the message types together
- */
-
-union msg_t
- {
- struct generic_msg_t generic_msg;
- struct generic_int32_msg_t generic_int32_msg;
-
- struct reset_msg_t reset_msg;
- struct config_req_msg_t config_req_msg;
- struct status_req_msg_t status_req_msg;
- struct read_req_msg_t read_req_msg;
- struct write_req_msg_t write_req_msg;
- struct write_r_msg_t write_r_msg;
- struct bkpt_set_msg_t bkpt_set_msg;
- struct bkpt_rm_msg_t bkpt_rm_msg;
- struct bkpt_stat_msg_t bkpt_stat_msg;
- struct copy_msg_t copy_msg;
- struct fill_msg_t fill_msg;
- struct init_msg_t init_msg;
- struct go_msg_t go_msg;
- struct step_msg_t step_msg;
- struct break_msg_t break_msg;
-
- struct hif_call_rtn_msg_t hif_call_rtn_msg;
- struct channel0_msg_t channel0_msg;
- struct channel1_ack_msg_t channel1_ack_msg;
-
- struct reset_ack_msg_t reset_ack_msg;
- struct config_msg_t config_msg;
- struct status_msg_t status_msg;
- struct read_ack_msg_t read_ack_msg;
- struct read_r_ack_msg_t read_r_ack_msg;
- struct write_ack_msg_t write_ack_msg;
- struct bkpt_set_ack_msg_t bkpt_set_ack_msg;
- struct bkpt_rm_ack_msg_t bkpt_rm_ack_msg;
- struct bkpt_stat_ack_msg_t bkpt_stat_ack_msg;
- struct copy_ack_msg_t copy_ack_msg;
- struct fill_ack_msg_t fill_ack_msg;
- struct init_ack_msg_t init_ack_msg;
- struct halt_msg_t halt_msg;
-
- struct error_msg_t error_msg;
-
- struct hif_call_msg_t hif_call_msg;
- struct channel0_ack_msg_t channel0_ack_msg;
- struct channel1_msg_t channel1_msg;
- };
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index b06c3f09d63..3aeda7d0815 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -791,7 +791,7 @@ build_minimal_symbol_hash_tables (struct objfile *objfile)
add_minsym_to_hash_table (msym, objfile->msymbol_hash);
msym->demangled_hash_next = 0;
- if (SYMBOL_DEMANGLED_NAME (msym) != NULL)
+ if (SYMBOL_SEARCH_NAME (msym) != SYMBOL_LINKAGE_NAME (msym))
add_minsym_to_demangled_hash_table (msym,
objfile->msymbol_demangled_hash);
}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 48a82f7cf36..dce507f410e 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -89,15 +89,16 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
}
/* Transform the bits comprising a 32-bit register to the right size
- for supply_register(). This is needed when mips_regsize() is 8. */
+ for regcache_raw_supply(). This is needed when mips_isa_regsize()
+ is 8. */
static void
supply_32bit_reg (int regnum, const void *addr)
{
char buf[MAX_REGISTER_SIZE];
- store_signed_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ store_signed_integer (buf, register_size (current_gdbarch, regnum),
extract_signed_integer (addr, 4));
- supply_register (regnum, buf);
+ regcache_raw_supply (current_regcache, regnum, buf);
}
/* Unpack an elf_gregset_t into GDB's register cache. */
@@ -128,9 +129,9 @@ supply_gregset (elf_gregset_t *gregsetp)
(char *)(regp + EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
/* Pack our registers (or one register) into an elf_gregset_t. */
@@ -160,7 +161,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regno < 32)
{
dst = regp + regno + EF_REG0;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
return;
}
@@ -182,7 +183,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
}
}
@@ -197,15 +198,17 @@ supply_fpregset (elf_fpregset_t *fpregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *)(*fpregsetp + regi));
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *)(*fpregsetp + regi));
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *)(*fpregsetp + 32));
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
@@ -220,13 +223,13 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
+ memcpy (to, from, register_size (current_gdbarch, regno - FP0_REGNUM));
}
else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ memcpy (to, from, register_size (current_gdbarch, regno));
}
else if (regno == -1)
{
@@ -387,25 +390,27 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
- supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
-
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *)(regp + MIPS64_EF_LO));
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *)(regp + MIPS64_EF_HI));
-
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *)(regp + MIPS64_EF_CP0_EPC));
- supply_register (mips_regnum (current_gdbarch)->badvaddr,
- (char *)(regp + MIPS64_EF_CP0_BADVADDR));
- supply_register (PS_REGNUM, (char *)(regp + MIPS64_EF_CP0_STATUS));
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *)(regp + MIPS64_EF_CP0_CAUSE));
+ regcache_raw_supply (current_regcache, (regi - MIPS64_EF_REG0),
+ (char *)(regp + regi));
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *)(regp + MIPS64_EF_LO));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *)(regp + MIPS64_EF_HI));
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *)(regp + MIPS64_EF_CP0_EPC));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr,
+ (char *)(regp + MIPS64_EF_CP0_BADVADDR));
+ regcache_raw_supply (current_regcache, PS_REGNUM,
+ (char *)(regp + MIPS64_EF_CP0_STATUS));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *)(regp + MIPS64_EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
/* Pack our registers (or one register) into an elf_gregset_t. */
@@ -435,7 +440,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
if (regno < 32)
{
dst = regp + regno + MIPS64_EF_REG0;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
return;
}
@@ -457,7 +462,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
}
}
@@ -472,15 +477,17 @@ mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *)(*fpregsetp + regi));
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *)(*fpregsetp + regi));
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *)(*fpregsetp + 32));
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
@@ -495,13 +502,13 @@ mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
+ memcpy (to, from, register_size (current_gdbarch, regno - FP0_REGNUM));
}
else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ memcpy (to, from, register_size (current_gdbarch, regno));
}
else if (regno == -1)
{
@@ -829,25 +836,40 @@ static void mips_linux_n32n64_sigframe_init (const struct tramp_frame *self,
#define MIPS_INST_LI_V0_N32_RT_SIGRETURN 0x24020000 + MIPS_NR_N32_rt_sigreturn
#define MIPS_INST_SYSCALL 0x0000000c
-struct tramp_frame mips_linux_o32_sigframe = {
+static const struct tramp_frame mips_linux_o32_sigframe = {
+ SIGTRAMP_FRAME,
4,
- { MIPS_INST_LI_V0_SIGRETURN, MIPS_INST_SYSCALL, TRAMP_SENTINEL_INSN },
+ {
+ { MIPS_INST_LI_V0_SIGRETURN, -1 },
+ { MIPS_INST_SYSCALL, -1 },
+ { TRAMP_SENTINEL_INSN, -1 }
+ },
mips_linux_o32_sigframe_init
};
-struct tramp_frame mips_linux_o32_rt_sigframe = {
+static const struct tramp_frame mips_linux_o32_rt_sigframe = {
+ SIGTRAMP_FRAME,
4,
- { MIPS_INST_LI_V0_RT_SIGRETURN, MIPS_INST_SYSCALL, TRAMP_SENTINEL_INSN },
+ {
+ { MIPS_INST_LI_V0_RT_SIGRETURN, -1 },
+ { MIPS_INST_SYSCALL, -1 },
+ { TRAMP_SENTINEL_INSN, -1 } },
mips_linux_o32_sigframe_init
};
-struct tramp_frame mips_linux_n32_rt_sigframe = {
+static const struct tramp_frame mips_linux_n32_rt_sigframe = {
+ SIGTRAMP_FRAME,
4,
- { MIPS_INST_LI_V0_N32_RT_SIGRETURN, MIPS_INST_SYSCALL, TRAMP_SENTINEL_INSN },
+ {
+ { MIPS_INST_LI_V0_N32_RT_SIGRETURN, -1 },
+ { MIPS_INST_SYSCALL, -1 },
+ { TRAMP_SENTINEL_INSN, -1 }
+ },
mips_linux_n32n64_sigframe_init
};
-struct tramp_frame mips_linux_n64_rt_sigframe = {
+static const struct tramp_frame mips_linux_n64_rt_sigframe = {
+ SIGTRAMP_FRAME,
4,
{ MIPS_INST_LI_V0_N64_RT_SIGRETURN, MIPS_INST_SYSCALL, TRAMP_SENTINEL_INSN },
mips_linux_n32n64_sigframe_init
@@ -1119,8 +1141,8 @@ mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, mips_linux_svr4_fetch_link_map_offsets);
set_mips_linux_register_addr (gdbarch, mips_linux_register_addr);
- tramp_frame_append (gdbarch, &mips_linux_o32_sigframe);
- tramp_frame_append (gdbarch, &mips_linux_o32_rt_sigframe);
+ tramp_frame_prepend_unwinder (gdbarch, &mips_linux_o32_sigframe);
+ tramp_frame_prepend_unwinder (gdbarch, &mips_linux_o32_rt_sigframe);
break;
case MIPS_ABI_N32:
set_gdbarch_get_longjmp_target (gdbarch,
@@ -1128,7 +1150,7 @@ mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, mips_linux_svr4_fetch_link_map_offsets);
set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
- tramp_frame_append (gdbarch, &mips_linux_n32_rt_sigframe);
+ tramp_frame_prepend_unwinder (gdbarch, &mips_linux_n32_rt_sigframe);
break;
case MIPS_ABI_N64:
set_gdbarch_get_longjmp_target (gdbarch,
@@ -1136,7 +1158,7 @@ mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, mips64_linux_svr4_fetch_link_map_offsets);
set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
- tramp_frame_append (gdbarch, &mips_linux_n64_rt_sigframe);
+ tramp_frame_prepend_unwinder (gdbarch, &mips_linux_n64_rt_sigframe);
break;
default:
internal_error (__FILE__, __LINE__, "can't handle ABI");
@@ -1166,5 +1188,5 @@ _initialize_mips_linux_tdep (void)
mips_linux_init_abi);
}
- add_core_fns (&regset_core_fns);
+ deprecated_add_core_fns (&regset_core_fns);
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
deleted file mode 100644
index 626f770f18d..00000000000
--- a/gdb/mips-nat.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* Low level DECstation interface to ptrace, for GDB when running native.
- Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000, 2001
- Free Software Foundation, Inc.
- Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
- and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include <sys/ptrace.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/user.h>
-#undef JB_S0
-#undef JB_S1
-#undef JB_S2
-#undef JB_S3
-#undef JB_S4
-#undef JB_S5
-#undef JB_S6
-#undef JB_S7
-#undef JB_SP
-#undef JB_S8
-#undef JB_PC
-#undef JB_SR
-#undef NJBREGS
-#include <setjmp.h> /* For JB_XXX. */
-
-/* Size of elements in jmpbuf */
-
-#define JB_ELEMENT_SIZE 4
-
-/* Map gdb internal register number to ptrace ``address''.
- These ``addresses'' are defined in DECstation <sys/ptrace.h> */
-
-static int
-register_ptrace_addr (int regno)
-{
- return (regno < 32 ? GPR_BASE + regno
- : regno == mips_regnum (current_gdbarch)->pc ? PC
- : regno == mips_regnum (current_gdbarch)->cause ? CAUSE
- : regno == mips_regnum (current_gdbarch)->hi ? MMHI
- : regno == mips_regnum (current_gdbarch)->lo ? MMLO
- : regno == mips_regnum (current_gdbarch)->fp_control_status ? FPC_CSR
- : regno == mips_regnum (current_gdbarch)->fp_implementation_revision ? FPC_EIR
- : regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM)
- : 0);
-}
-
-static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
-
-/* Get all registers from the inferior */
-
-void
-fetch_inferior_registers (int regno)
-{
- unsigned int regaddr;
- char buf[MAX_REGISTER_SIZE];
- int i;
- char zerobuf[MAX_REGISTER_SIZE];
- memset (zerobuf, 0, MAX_REGISTER_SIZE);
-
- deprecated_registers_fetched ();
-
- for (regno = 1; regno < NUM_REGS; regno++)
- {
- regaddr = register_ptrace_addr (regno);
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (PT_READ_U, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
-
- supply_register (ZERO_REGNUM, zerobuf);
- /* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- unsigned int regaddr;
- char buf[80];
-
- if (regno > 0)
- {
- if (regno == ZERO_REGNUM || regno == PS_REGNUM
- || regno == mips_regnum (current_gdbarch)->badvaddr
- || regno == mips_regnum (current_gdbarch)->cause
- || regno == mips_regnum (current_gdbarch)->fp_implementation_revision
- || regno == DEPRECATED_FP_REGNUM
- || (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM))
- return;
- regaddr = register_ptrace_addr (regno);
- errno = 0;
- ptrace (PT_WRITE_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- store_inferior_registers (regno);
- }
-}
-
-
-/* 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 PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
- CORE_ADDR jb_addr;
- char *buf;
-
- buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
- jb_addr = read_register (A0_REGNUM);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-}
-
-/* Extract the register values out of the core file and store
- them where `read_register' will find them.
-
- CORE_REG_SECT points to the register values themselves, read into memory.
- CORE_REG_SIZE is the size of that area.
- WHICH says which set of registers we are handling (0 = int, 2 = float
- on machines where they are discontiguous).
- REG_ADDR is the offset from u.u_ar0 to the register values relative to
- core_reg_sect. This is used with old-fashioned core files to
- locate the registers in a large upage-plus-stack ".reg" section.
- Original upage address X is at location core_reg_sect+x+reg_addr.
- */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR reg_addr)
-{
- int regno;
- unsigned int addr;
- int bad_reg = -1;
- reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
-
- char zerobuf[MAX_REGISTER_SIZE];
- memset (zerobuf, 0, MAX_REGISTER_SIZE);
-
-
- /* If u.u_ar0 was an absolute address in the core file, relativize it now,
- so we can use it as an offset into core_reg_sect. When we're done,
- "register 0" will be at core_reg_sect+reg_ptr, and we can use
- register_addr to offset to the other registers. If this is a modern
- core file without a upage, reg_ptr will be zero and this is all a big
- NOP. */
- if (reg_ptr > core_reg_size)
-#ifdef KERNEL_U_ADDR
- reg_ptr -= KERNEL_U_ADDR;
-#else
- error ("Old mips core file can't be processed on this machine.");
-#endif
-
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- addr = register_addr (regno, reg_ptr);
- if (addr >= core_reg_size)
- {
- if (bad_reg < 0)
- bad_reg = regno;
- }
- else
- {
- supply_register (regno, core_reg_sect + addr);
- }
- }
- if (bad_reg >= 0)
- {
- error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
- }
- supply_register (ZERO_REGNUM, zerobuf);
- /* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
-}
-
-/* Return the address in the core dump or inferior of register REGNO.
- BLOCKEND is the address of the end of the user structure. */
-
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
-{
- CORE_ADDR addr;
-
- if (regno < 0 || regno >= NUM_REGS)
- error ("Invalid register number %d.", regno);
-
- REGISTER_U_ADDR (addr, blockend, regno);
-
- return addr;
-}
-
-
-/* Register that we are able to handle mips core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns mips_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_mips (void)
-{
- add_core_fns (&mips_core_fns);
-}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 95a0063611a..2b40fddf8f9 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -53,10 +53,11 @@
#include "frame-unwind.h"
#include "frame-base.h"
#include "trad-frame.h"
+#include "infcall.h"
+#include "floatformat.h"
static const struct objfile_data *mips_pdr_data;
-static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off);
static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum);
/* A useful bit in the CP0 status register (PS_REGNUM). */
@@ -107,8 +108,7 @@ static const char *size_enums[] = {
};
/* Some MIPS boards don't support floating point while others only
- support single-precision floating-point operations. See also
- FP_REGISTER_DOUBLE. */
+ support single-precision floating-point operations. */
enum mips_fpu_type
{
@@ -137,9 +137,6 @@ struct gdbarch_tdep
enum mips_fpu_type mips_fpu_type;
int mips_last_arg_regnum;
int mips_last_fp_arg_regnum;
- int mips_default_saved_regsize;
- int mips_fp_register_double;
- int mips_default_stack_argsize;
int default_mask_address_p;
/* Is the target using 64-bit raw integer registers but only
storing a left-aligned 32-bit value in each? */
@@ -152,6 +149,32 @@ struct gdbarch_tdep
const char **mips_processor_reg_names;
};
+static int
+n32n64_floatformat_always_valid (const struct floatformat *fmt,
+ const char *from)
+{
+ return 1;
+}
+
+/* FIXME: brobecker/2004-08-08: Long Double values are 128 bit long.
+ They are implemented as a pair of 64bit doubles where the high
+ part holds the result of the operation rounded to double, and
+ the low double holds the difference between the exact result and
+ the rounded result. So "high" + "low" contains the result with
+ added precision. Unfortunately, the floatformat structure used
+ by GDB is not powerful enough to describe this format. As a temporary
+ measure, we define a 128bit floatformat that only uses the high part.
+ We lose a bit of precision but that's probably the best we can do
+ for now with the current infrastructure. */
+
+static const struct floatformat floatformat_n32n64_long_double_big =
+{
+ floatformat_big, 128, 0, 1, 11, 1023, 2047, 12, 52,
+ floatformat_intbit_no,
+ "floatformat_ieee_double_big",
+ n32n64_floatformat_always_valid
+};
+
const struct mips_regnum *
mips_regnum (struct gdbarch *gdbarch)
{
@@ -233,7 +256,7 @@ mips_abi (struct gdbarch *gdbarch)
}
int
-mips_regsize (struct gdbarch *gdbarch)
+mips_isa_regsize (struct gdbarch *gdbarch)
{
return (gdbarch_bfd_arch_info (gdbarch)->bits_per_word
/ gdbarch_bfd_arch_info (gdbarch)->bits_per_byte);
@@ -241,16 +264,30 @@ mips_regsize (struct gdbarch *gdbarch)
/* Return the currently configured (or set) saved register size. */
-static const char *mips_saved_regsize_string = size_auto;
+static const char *mips_abi_regsize_string = size_auto;
static unsigned int
-mips_saved_regsize (struct gdbarch_tdep *tdep)
+mips_abi_regsize (struct gdbarch *gdbarch)
{
- if (mips_saved_regsize_string == size_auto)
- return tdep->mips_default_saved_regsize;
- else if (mips_saved_regsize_string == size_64)
+ if (mips_abi_regsize_string == size_auto)
+ switch (mips_abi (gdbarch))
+ {
+ case MIPS_ABI_EABI32:
+ case MIPS_ABI_O32:
+ return 4;
+ case MIPS_ABI_N32:
+ case MIPS_ABI_N64:
+ case MIPS_ABI_O64:
+ case MIPS_ABI_EABI64:
+ return 8;
+ case MIPS_ABI_UNKNOWN:
+ case MIPS_ABI_LAST:
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
+ }
+ else if (mips_abi_regsize_string == size_64)
return 8;
- else /* if (mips_saved_regsize_string == size_32) */
+ else /* if (mips_abi_regsize_string == size_32) */
return 4;
}
@@ -363,22 +400,17 @@ mips2_fp_compat (void)
return 0;
}
-/* Indicate that the ABI makes use of double-precision registers
- provided by the FPU (rather than combining pairs of registers to
- form double-precision values). See also MIPS_FPU_TYPE. */
-#define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
-
/* The amount of space reserved on the stack for registers. This is
- different to MIPS_SAVED_REGSIZE as it determines the alignment of
+ different to MIPS_ABI_REGSIZE as it determines the alignment of
data allocated after the registers have run out. */
static const char *mips_stack_argsize_string = size_auto;
static unsigned int
-mips_stack_argsize (struct gdbarch_tdep *tdep)
+mips_stack_argsize (struct gdbarch *gdbarch)
{
if (mips_stack_argsize_string == size_auto)
- return tdep->mips_default_stack_argsize;
+ return mips_abi_regsize (gdbarch);
else if (mips_stack_argsize_string == size_64)
return 8;
else /* if (mips_stack_argsize_string == size_32) */
@@ -387,8 +419,12 @@ mips_stack_argsize (struct gdbarch_tdep *tdep)
#define VM_MIN_ADDRESS (CORE_ADDR)0x400000
+struct mips_frame_cache;
static mips_extra_func_info_t heuristic_proc_desc (CORE_ADDR, CORE_ADDR,
- struct frame_info *, int);
+ struct frame_info *,
+ struct mips_frame_cache *);
+static mips_extra_func_info_t non_heuristic_proc_desc (CORE_ADDR pc,
+ CORE_ADDR *addrptr);
static CORE_ADDR heuristic_proc_start (CORE_ADDR);
@@ -396,12 +432,7 @@ static CORE_ADDR read_next_frame_reg (struct frame_info *, int);
static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
-static mips_extra_func_info_t find_proc_desc (CORE_ADDR pc,
- struct frame_info *next_frame,
- int cur_frame);
-
-static CORE_ADDR after_prologue (CORE_ADDR pc,
- mips_extra_func_info_t proc_desc);
+static CORE_ADDR after_prologue (CORE_ADDR pc);
static struct type *mips_float_register_type (void);
static struct type *mips_double_register_type (void);
@@ -623,15 +654,6 @@ static unsigned int heuristic_fence_post = 0;
this will corrupt pdr.iline. Fortunately we don't use it. */
#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 mips_extra_func_info info;
- struct linked_proc_info *next;
-}
- *linked_proc_desc_table = NULL;
/* Number of bytes of storage in the actual machine representation for
register N. NOTE: This defines the pseudo register type so need to
@@ -694,16 +716,16 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
&& (regnum % NUM_REGS) < mips_regnum (current_gdbarch)->fp0 + 32)
{
/* The floating-point registers raw, or cooked, always match
- mips_regsize(), and also map 1:1, byte for byte. */
+ mips_isa_regsize(), and also map 1:1, byte for byte. */
switch (gdbarch_byte_order (gdbarch))
{
case BFD_ENDIAN_BIG:
- if (mips_regsize (gdbarch) == 4)
+ if (mips_isa_regsize (gdbarch) == 4)
return builtin_type_ieee_single_big;
else
return builtin_type_ieee_double_big;
case BFD_ENDIAN_LITTLE:
- if (mips_regsize (gdbarch) == 4)
+ if (mips_isa_regsize (gdbarch) == 4)
return builtin_type_ieee_single_little;
else
return builtin_type_ieee_double_little;
@@ -712,24 +734,38 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
internal_error (__FILE__, __LINE__, "bad switch");
}
}
- else if (regnum >=
- (NUM_REGS + mips_regnum (current_gdbarch)->fp_control_status)
- && regnum <= NUM_REGS + LAST_EMBED_REGNUM)
- /* The pseudo/cooked view of the embedded registers is always
- 32-bit. The raw view is handled below. */
- return builtin_type_int32;
- else if (regnum >= NUM_REGS && mips_regsize (gdbarch)
- && gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p)
- /* The target, while using a 64-bit register buffer, is only
- transfering 32-bits of each integer register. Reflect this in
- the cooked/pseudo register value. */
- return builtin_type_int32;
- else if (mips_regsize (gdbarch) == 8)
- /* 64-bit ISA. */
- return builtin_type_int64;
+ else if (regnum < NUM_REGS)
+ {
+ /* The raw or ISA registers. These are all sized according to
+ the ISA regsize. */
+ if (mips_isa_regsize (gdbarch) == 4)
+ return builtin_type_int32;
+ else
+ return builtin_type_int64;
+ }
else
- /* 32-bit ISA. */
- return builtin_type_int32;
+ {
+ /* The cooked or ABI registers. These are sized according to
+ the ABI (with a few complications). */
+ if (regnum >= (NUM_REGS
+ + mips_regnum (current_gdbarch)->fp_control_status)
+ && regnum <= NUM_REGS + LAST_EMBED_REGNUM)
+ /* The pseudo/cooked view of the embedded registers is always
+ 32-bit. The raw view is handled below. */
+ return builtin_type_int32;
+ else if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p)
+ /* The target, while possibly using a 64-bit register buffer,
+ is only transfering 32-bits of each integer register.
+ Reflect this in the cooked/pseudo (ABI) register value. */
+ return builtin_type_int32;
+ else if (mips_abi_regsize (gdbarch) == 4)
+ /* The ABI is restricted to 32-bit registers (the ISA could be
+ 32- or 64-bit). */
+ return builtin_type_int32;
+ else
+ /* 64-bit ABI. */
+ return builtin_type_int64;
+ }
}
/* TARGET_READ_SP -- Remove useless bits from the stack pointer. */
@@ -737,7 +773,7 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
static CORE_ADDR
mips_read_sp (void)
{
- return read_signed_register (SP_REGNUM);
+ return read_signed_register (MIPS_SP_REGNUM);
}
/* Should the upper word of 64-bit addresses be zeroed? */
@@ -805,7 +841,7 @@ pc_is_mips16 (bfd_vma memaddr)
return 0;
}
-/* MIPS believes that the PC has a sign extended value. Perhaphs the
+/* MIPS believes that the PC has a sign extended value. Perhaps the
all registers should be sign extended for simplicity? */
static CORE_ADDR
@@ -829,7 +865,7 @@ mips_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct frame_id
mips_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return frame_id_build (frame_unwind_register_signed (next_frame, NUM_REGS + SP_REGNUM),
+ return frame_id_build (frame_unwind_register_signed (next_frame, NUM_REGS + MIPS_SP_REGNUM),
frame_pc_unwind (next_frame));
}
@@ -843,24 +879,54 @@ mips_write_pc (CORE_ADDR pc, ptid_t ptid)
find the prologue, then return 0. */
static CORE_ADDR
-after_prologue (CORE_ADDR pc, mips_extra_func_info_t proc_desc)
+after_prologue (CORE_ADDR pc)
{
+ mips_extra_func_info_t proc_desc;
struct symtab_and_line sal;
CORE_ADDR func_addr, func_end;
+ CORE_ADDR startaddr = 0;
+
+ /* Pass a NULL next_frame to heuristic_proc_desc. We should not
+ attempt to read the stack pointer from the current machine state,
+ because the current machine state has nothing to do with the
+ information we need from the proc_desc; and the process may or
+ may not exist right now. */
+ proc_desc = non_heuristic_proc_desc (pc, &startaddr);
+ if (proc_desc)
+ {
+ /* 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. */
+ struct symtab_and_line val;
+ if (PROC_SYMBOL (proc_desc))
+ {
+ val = find_pc_line (BLOCK_START
+ (SYMBOL_BLOCK_VALUE (PROC_SYMBOL (proc_desc))),
+ 0);
+ val.pc = val.end ? val.end : pc;
+ }
+ if (!PROC_SYMBOL (proc_desc) || pc < val.pc)
+ {
+ mips_extra_func_info_t found_heuristic =
+ heuristic_proc_desc (PROC_LOW_ADDR (proc_desc), pc, NULL, NULL);
+ if (found_heuristic)
+ proc_desc = found_heuristic;
+ }
+ }
+ else
+ {
+ if (startaddr == 0)
+ startaddr = heuristic_proc_start (pc);
- /* Pass cur_frame == 0 to find_proc_desc. We should not attempt
- to read the stack pointer from the current machine state, because
- the current machine state has nothing to do with the information
- we need from the proc_desc; and the process may or may not exist
- right now. */
- if (!proc_desc)
- proc_desc = find_proc_desc (pc, NULL, 0);
+ proc_desc = heuristic_proc_desc (startaddr, pc, NULL, NULL);
+ }
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) == SP_REGNUM
+ if (PROC_FRAME_REG (proc_desc) == MIPS_SP_REGNUM
&& PROC_FRAME_OFFSET (proc_desc) == 0)
return 0;
}
@@ -953,7 +1019,7 @@ mips_fetch_instruction (CORE_ADDR addr)
}
else
instlen = MIPS_INSTLEN;
- status = read_memory_nobpt (addr, buf, instlen);
+ status = deprecated_read_memory_nobpt (addr, buf, instlen);
if (status)
memory_error (status, addr);
return extract_unsigned_integer (buf, instlen);
@@ -968,7 +1034,7 @@ mips16_fetch_instruction (CORE_ADDR addr)
instlen = MIPS16_INSTLEN;
addr = unmake_mips16_addr (addr);
- status = read_memory_nobpt (addr, buf, instlen);
+ status = deprecated_read_memory_nobpt (addr, buf, instlen);
if (status)
memory_error (status, addr);
return extract_unsigned_integer (buf, instlen);
@@ -981,7 +1047,7 @@ mips32_fetch_instruction (CORE_ADDR addr)
int instlen;
int status;
instlen = MIPS_INSTLEN;
- status = read_memory_nobpt (addr, buf, instlen);
+ status = deprecated_read_memory_nobpt (addr, buf, instlen);
if (status)
memory_error (status, addr);
return extract_unsigned_integer (buf, instlen);
@@ -1487,6 +1553,7 @@ struct mips_frame_cache
static struct mips_frame_cache *
mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
{
+ CORE_ADDR startaddr = 0;
mips_extra_func_info_t proc_desc;
struct mips_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (next_frame);
@@ -1503,13 +1570,255 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
/* Get the mdebug proc descriptor. */
- proc_desc = find_proc_desc (frame_pc_unwind (next_frame), next_frame, 1);
+ proc_desc = non_heuristic_proc_desc (frame_pc_unwind (next_frame),
+ &startaddr);
+ /* Must be true. This is only called when the sniffer detected a
+ proc descriptor. */
+ gdb_assert (proc_desc != NULL);
+
+ /* Extract the frame's base. */
+ cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
+ + PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
+
+ 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);
+
+ /* Must be true. The in_prologue case is left for the heuristic
+ unwinder. This is always used on kernel traps. */
+ gdb_assert (!in_prologue (frame_pc_unwind (next_frame), PROC_LOW_ADDR (proc_desc))
+ || kernel_trap);
+
+ /* Fill in the offsets for the registers which gen_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (cache->base + PROC_REG_OFFSET (proc_desc));
+ int ireg;
+
+ for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
+ if (gen_mask & 0x80000000)
+ {
+ cache->saved_regs[NUM_REGS + ireg].addr = reg_position;
+ reg_position -= mips_abi_regsize (gdbarch);
+ }
+ }
+
+ /* 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)))
+ {
+ ULONGEST inst = mips16_fetch_instruction (PROC_LOW_ADDR (proc_desc));
+ 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. */
+ CORE_ADDR reg_position = (cache->base
+ + PROC_REG_OFFSET (proc_desc));
+ if (inst & 0x20)
+ reg_position -= mips_abi_regsize (gdbarch);
+
+ /* Check if the s0 and s1 registers were pushed on the
+ stack. */
+ /* NOTE: cagney/2004-02-08: Huh? This is doing no such
+ check. */
+ for (reg = 16; reg < sreg_count + 16; reg++)
+ {
+ cache->saved_regs[NUM_REGS + reg].addr = reg_position;
+ reg_position -= mips_abi_regsize (gdbarch);
+ }
+ }
+ }
+
+ /* Fill in the offsets for the registers which float_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (cache->base
+ + PROC_FREG_OFFSET (proc_desc));
+ int ireg;
+ /* 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)
+ {
+ if (mips_abi_regsize (gdbarch) == 4
+ && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ /* On a big endian 32 bit ABI, floating point registers
+ are paired to form doubles such that the most
+ significant part is in $f[N+1] and the least
+ significant in $f[N] vis: $f[N+1] ||| $f[N]. The
+ registers are also spilled as a pair and stored as a
+ double.
+
+ When little-endian the least significant part is
+ stored first leading to the memory order $f[N] and
+ then $f[N+1].
+
+ Unfortunately, when big-endian the most significant
+ part of the double is stored first, and the least
+ significant is stored second. This leads to the
+ registers being ordered in memory as firt $f[N+1] and
+ then $f[N].
+
+ For the big-endian case make certain that the
+ addresses point at the correct (swapped) locations
+ $f[N] and $f[N+1] pair (keep in mind that
+ reg_position is decremented each time through the
+ loop). */
+ if ((ireg & 1))
+ cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
+ .addr = reg_position - mips_abi_regsize (gdbarch);
+ else
+ cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
+ .addr = reg_position + mips_abi_regsize (gdbarch);
+ }
+ else
+ cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
+ .addr = reg_position;
+ reg_position -= mips_abi_regsize (gdbarch);
+ }
+
+ cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->pc]
+ = cache->saved_regs[NUM_REGS + RA_REGNUM];
+ }
+
+ /* SP_REGNUM, contains the value and not the address. */
+ trad_frame_set_value (cache->saved_regs, NUM_REGS + MIPS_SP_REGNUM, cache->base);
+
+ return (*this_cache);
+}
+
+static void
+mips_mdebug_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ this_cache);
+ (*this_id) = frame_id_build (info->base, frame_func_unwind (next_frame));
+}
+
+static void
+mips_mdebug_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 mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ this_cache);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind mips_mdebug_frame_unwind =
+{
+ NORMAL_FRAME,
+ mips_mdebug_frame_this_id,
+ mips_mdebug_frame_prev_register
+};
+
+static const struct frame_unwind *
+mips_mdebug_frame_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ CORE_ADDR startaddr = 0;
+ mips_extra_func_info_t proc_desc;
+ int kernel_trap;
+
+ /* Only use the mdebug frame unwinder on mdebug frames where all the
+ registers have been saved. Leave hard cases such as no mdebug or
+ in prologue for the heuristic unwinders. */
+
+ proc_desc = non_heuristic_proc_desc (pc, &startaddr);
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 cache;
+ return NULL;
+
+ /* 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 = PROC_REG_MASK (proc_desc) & 1;
+ if (kernel_trap)
+ return &mips_mdebug_frame_unwind;
+
+ /* 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_prologue (pc, PROC_LOW_ADDR (proc_desc)))
+ return &mips_mdebug_frame_unwind;
+
+ return NULL;
+}
+static CORE_ADDR
+mips_mdebug_frame_base_address (struct frame_info *next_frame,
+ void **this_cache)
+{
+ struct mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ this_cache);
+ return info->base;
+}
+
+static const struct frame_base mips_mdebug_frame_base = {
+ &mips_mdebug_frame_unwind,
+ mips_mdebug_frame_base_address,
+ mips_mdebug_frame_base_address,
+ mips_mdebug_frame_base_address
+};
+
+static const struct frame_base *
+mips_mdebug_frame_base_sniffer (struct frame_info *next_frame)
+{
+ if (mips_mdebug_frame_sniffer (next_frame) != NULL)
+ return &mips_mdebug_frame_base;
+ else
+ return NULL;
+}
+
+/* Heuristic unwinder for 16-bit MIPS instruction set (aka MIPS16).
+ Procedures that use the 32-bit instruction set are handled by the
+ mips_insn32 unwinder. */
+
+static struct mips_frame_cache *
+mips_insn16_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ mips_extra_func_info_t proc_desc;
+ struct mips_frame_cache *cache;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* r0 bit means kernel trap */
+ int kernel_trap;
+ /* What registers have been saved? Bitmasks. */
+ unsigned long gen_mask, float_mask;
+
+ if ((*this_cache) != NULL)
+ return (*this_cache);
+ cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
+ (*this_cache) = cache;
+ cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+ /* Synthesize a proc descriptor. */
+ {
+ const CORE_ADDR pc = frame_pc_unwind (next_frame);
+ CORE_ADDR start_addr;
+
+ find_pc_partial_function (pc, NULL, &start_addr, NULL);
+ if (start_addr == 0)
+ start_addr = heuristic_proc_start (pc);
+
+#ifdef NOT_YET
+ proc_desc = heuristic_proc_desc (start_addr, pc, next_frame, *this_cache);
+#else
+ proc_desc = heuristic_proc_desc (start_addr, pc, next_frame, NULL);
+#endif
+ }
+
/* Extract the frame's base. */
cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
+ PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
@@ -1574,7 +1883,7 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
if (gen_mask & 0x80000000)
{
cache->saved_regs[NUM_REGS + ireg].addr = reg_position;
- reg_position -= mips_saved_regsize (tdep);
+ reg_position -= mips_abi_regsize (gdbarch);
}
}
@@ -1595,7 +1904,7 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
CORE_ADDR reg_position = (cache->base
+ PROC_REG_OFFSET (proc_desc));
if (inst & 0x20)
- reg_position -= mips_saved_regsize (tdep);
+ reg_position -= mips_abi_regsize (gdbarch);
/* Check if the s0 and s1 registers were pushed on the
stack. */
@@ -1604,7 +1913,7 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
for (reg = 16; reg < sreg_count + 16; reg++)
{
cache->saved_regs[NUM_REGS + reg].addr = reg_position;
- reg_position -= mips_saved_regsize (tdep);
+ reg_position -= mips_abi_regsize (gdbarch);
}
}
}
@@ -1620,7 +1929,7 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
if (float_mask & 0x80000000)
{
- if (mips_saved_regsize (tdep) == 4
+ if (mips_abi_regsize (gdbarch) == 4
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
/* On a big endian 32 bit ABI, floating point registers
@@ -1647,15 +1956,15 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
loop). */
if ((ireg & 1))
cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
- .addr = reg_position - mips_saved_regsize (tdep);
+ .addr = reg_position - mips_abi_regsize (gdbarch);
else
cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
- .addr = reg_position + mips_saved_regsize (tdep);
+ .addr = reg_position + mips_abi_regsize (gdbarch);
}
else
cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg]
.addr = reg_position;
- reg_position -= mips_saved_regsize (tdep);
+ reg_position -= mips_abi_regsize (gdbarch);
}
cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->pc]
@@ -1663,66 +1972,394 @@ mips_mdebug_frame_cache (struct frame_info *next_frame, void **this_cache)
}
/* SP_REGNUM, contains the value and not the address. */
- trad_frame_set_value (cache->saved_regs, NUM_REGS + SP_REGNUM, cache->base);
+ trad_frame_set_value (cache->saved_regs, NUM_REGS + MIPS_SP_REGNUM, cache->base);
return (*this_cache);
}
static void
-mips_mdebug_frame_this_id (struct frame_info *next_frame, void **this_cache,
+mips_insn16_frame_this_id (struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
- struct mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ struct mips_frame_cache *info = mips_insn16_frame_cache (next_frame,
this_cache);
(*this_id) = frame_id_build (info->base, frame_func_unwind (next_frame));
}
static void
-mips_mdebug_frame_prev_register (struct frame_info *next_frame,
+mips_insn16_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 mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ struct mips_frame_cache *info = mips_insn16_frame_cache (next_frame,
this_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
-static const struct frame_unwind mips_mdebug_frame_unwind =
+static const struct frame_unwind mips_insn16_frame_unwind =
{
NORMAL_FRAME,
- mips_mdebug_frame_this_id,
- mips_mdebug_frame_prev_register
+ mips_insn16_frame_this_id,
+ mips_insn16_frame_prev_register
};
static const struct frame_unwind *
-mips_mdebug_frame_sniffer (struct frame_info *next_frame)
+mips_insn16_frame_sniffer (struct frame_info *next_frame)
{
- return &mips_mdebug_frame_unwind;
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ if (pc_is_mips16 (pc))
+ return &mips_insn16_frame_unwind;
+ return NULL;
}
static CORE_ADDR
-mips_mdebug_frame_base_address (struct frame_info *next_frame,
+mips_insn16_frame_base_address (struct frame_info *next_frame,
void **this_cache)
{
- struct mips_frame_cache *info = mips_mdebug_frame_cache (next_frame,
+ struct mips_frame_cache *info = mips_insn16_frame_cache (next_frame,
this_cache);
return info->base;
}
-static const struct frame_base mips_mdebug_frame_base = {
- &mips_mdebug_frame_unwind,
- mips_mdebug_frame_base_address,
- mips_mdebug_frame_base_address,
- mips_mdebug_frame_base_address
+static const struct frame_base mips_insn16_frame_base =
+{
+ &mips_insn16_frame_unwind,
+ mips_insn16_frame_base_address,
+ mips_insn16_frame_base_address,
+ mips_insn16_frame_base_address
};
static const struct frame_base *
-mips_mdebug_frame_base_sniffer (struct frame_info *next_frame)
+mips_insn16_frame_base_sniffer (struct frame_info *next_frame)
{
- return &mips_mdebug_frame_base;
+ if (mips_insn16_frame_sniffer (next_frame) != NULL)
+ return &mips_insn16_frame_base;
+ else
+ return NULL;
+}
+
+/* Heuristic unwinder for procedures using 32-bit instructions (covers
+ both 32-bit and 64-bit MIPS ISAs). Procedures using 16-bit
+ instructions (a.k.a. MIPS16) are handled by the mips_insn16
+ unwinder. */
+
+static struct mips_frame_cache *
+mips_insn32_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ mips_extra_func_info_t proc_desc;
+ struct mips_frame_cache *cache;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* r0 bit means kernel trap */
+ int kernel_trap;
+ /* What registers have been saved? Bitmasks. */
+ unsigned long gen_mask, float_mask;
+
+ if ((*this_cache) != NULL)
+ return (*this_cache);
+ cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
+ (*this_cache) = cache;
+ cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+ /* Synthesize a proc descriptor. */
+ {
+ const CORE_ADDR pc = frame_pc_unwind (next_frame);
+ CORE_ADDR start_addr;
+
+ find_pc_partial_function (pc, NULL, &start_addr, NULL);
+ if (start_addr == 0)
+ start_addr = heuristic_proc_start (pc);
+
+#ifdef NOT_YET
+ proc_desc = heuristic_proc_desc (start_addr, pc, next_frame, *this_cache);
+#else
+ proc_desc = heuristic_proc_desc (start_addr, pc, next_frame, NULL);
+#endif
+ }
+
+ 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 cache;
+
+ /* Extract the frame's base. */
+ cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
+ + PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
+
+ 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);
+
+ /* 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_prologue (frame_pc_unwind (next_frame), 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. */
+ && !kernel_trap)
+ {
+ /* We need to figure out whether the registers that the
+ proc_desc claims are saved have been saved yet. */
+
+ CORE_ADDR addr;
+
+ /* Bitmasks; set if we have found a save for the register. */
+ unsigned long gen_save_found = 0;
+ unsigned long float_save_found = 0;
+
+ addr = PROC_LOW_ADDR (proc_desc);
+
+ /* Scan through this function's instructions preceding the
+ current PC, and look for those that save registers. */
+ while (addr < frame_pc_unwind (next_frame))
+ {
+ mips32_decode_reg_save (mips32_fetch_instruction (addr),
+ &gen_save_found, &float_save_found);
+ addr += MIPS_INSTLEN;
+ }
+ gen_mask = gen_save_found;
+ float_mask = float_save_found;
+ }
+
+ /* Fill in the offsets for the registers which gen_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (cache->base
+ + PROC_REG_OFFSET (proc_desc));
+ int ireg;
+ for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
+ if (gen_mask & 0x80000000)
+ {
+ cache->saved_regs[NUM_REGS + ireg].addr = reg_position;
+ reg_position -= mips_abi_regsize (gdbarch);
+ }
+ }
+
+ /* Fill in the offsets for the registers which float_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (cache->base + PROC_FREG_OFFSET (proc_desc));
+ int ireg;
+
+ /* 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)
+ {
+ const int regno =
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0 + ireg;
+
+ if (mips_abi_regsize (gdbarch) == 4
+ && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ /* On a big endian 32 bit ABI, floating point registers
+ are paired to form doubles such that the most
+ significant part is in $f[N+1] and the least
+ significant in $f[N] vis: $f[N+1] ||| $f[N]. The
+ registers are also spilled as a pair and stored as a
+ double.
+
+ When little-endian the least significant part is
+ stored first leading to the memory order $f[N] and
+ then $f[N+1].
+
+ Unfortunately, when big-endian the most significant
+ part of the double is stored first, and the least
+ significant is stored second. This leads to the
+ registers being ordered in memory as firt $f[N+1] and
+ then $f[N].
+
+ For the big-endian case make certain that the
+ addresses point at the correct (swapped) locations
+ $f[N] and $f[N+1] pair (keep in mind that
+ reg_position is decremented each time through the
+ loop). */
+ if ((ireg & 1))
+ cache->saved_regs[regno].addr =
+ reg_position - mips_abi_regsize (gdbarch);
+ else
+ cache->saved_regs[regno].addr =
+ reg_position + mips_abi_regsize (gdbarch);
+ }
+ else
+ cache->saved_regs[regno].addr = reg_position;
+ reg_position -= mips_abi_regsize (gdbarch);
+ }
+
+ cache->saved_regs[NUM_REGS + mips_regnum (current_gdbarch)->pc]
+ = cache->saved_regs[NUM_REGS + RA_REGNUM];
+ }
+
+ /* SP_REGNUM, contains the value and not the address. */
+ trad_frame_set_value (cache->saved_regs, NUM_REGS + MIPS_SP_REGNUM, cache->base);
+
+ return (*this_cache);
+}
+
+static void
+mips_insn32_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct mips_frame_cache *info = mips_insn32_frame_cache (next_frame,
+ this_cache);
+ (*this_id) = frame_id_build (info->base, frame_func_unwind (next_frame));
+}
+
+static void
+mips_insn32_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 mips_frame_cache *info = mips_insn32_frame_cache (next_frame,
+ this_cache);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind mips_insn32_frame_unwind =
+{
+ NORMAL_FRAME,
+ mips_insn32_frame_this_id,
+ mips_insn32_frame_prev_register
+};
+
+static const struct frame_unwind *
+mips_insn32_frame_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ if (! pc_is_mips16 (pc))
+ return &mips_insn32_frame_unwind;
+ return NULL;
+}
+
+static CORE_ADDR
+mips_insn32_frame_base_address (struct frame_info *next_frame,
+ void **this_cache)
+{
+ struct mips_frame_cache *info = mips_insn32_frame_cache (next_frame,
+ this_cache);
+ return info->base;
+}
+
+static const struct frame_base mips_insn32_frame_base =
+{
+ &mips_insn32_frame_unwind,
+ mips_insn32_frame_base_address,
+ mips_insn32_frame_base_address,
+ mips_insn32_frame_base_address
+};
+
+static const struct frame_base *
+mips_insn32_frame_base_sniffer (struct frame_info *next_frame)
+{
+ if (mips_insn32_frame_sniffer (next_frame) != NULL)
+ return &mips_insn32_frame_base;
+ else
+ return NULL;
+}
+
+static struct trad_frame_cache *
+mips_stub_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ CORE_ADDR pc;
+ CORE_ADDR start_addr;
+ CORE_ADDR stack_addr;
+ struct trad_frame_cache *this_trad_cache;
+
+ if ((*this_cache) != NULL)
+ return (*this_cache);
+ this_trad_cache = trad_frame_cache_zalloc (next_frame);
+ (*this_cache) = this_trad_cache;
+
+ /* The return address is in the link register. */
+ trad_frame_set_reg_realreg (this_trad_cache, PC_REGNUM, RA_REGNUM);
+
+ /* Frame ID, since it's a frameless / stackless function, no stack
+ space is allocated and SP on entry is the current SP. */
+ pc = frame_pc_unwind (next_frame);
+ find_pc_partial_function (pc, NULL, &start_addr, NULL);
+ stack_addr = frame_unwind_register_signed (next_frame, SP_REGNUM);
+ trad_frame_set_id (this_trad_cache, frame_id_build (start_addr, stack_addr));
+
+ /* Assume that the frame's base is the same as the
+ stack-pointer. */
+ trad_frame_set_this_base (this_trad_cache, stack_addr);
+
+ return this_trad_cache;
+}
+
+static void
+mips_stub_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct trad_frame_cache *this_trad_cache
+ = mips_stub_frame_cache (next_frame, this_cache);
+ trad_frame_get_id (this_trad_cache, this_id);
+}
+
+static void
+mips_stub_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 trad_frame_cache *this_trad_cache
+ = mips_stub_frame_cache (next_frame, this_cache);
+ trad_frame_get_register (this_trad_cache, next_frame, regnum, optimizedp,
+ lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind mips_stub_frame_unwind =
+{
+ NORMAL_FRAME,
+ mips_stub_frame_this_id,
+ mips_stub_frame_prev_register
+};
+
+static const struct frame_unwind *
+mips_stub_frame_sniffer (struct frame_info *next_frame)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ if (in_plt_section (pc, NULL))
+ return &mips_stub_frame_unwind;
+ else
+ return NULL;
+}
+
+static CORE_ADDR
+mips_stub_frame_base_address (struct frame_info *next_frame,
+ void **this_cache)
+{
+ struct trad_frame_cache *this_trad_cache
+ = mips_stub_frame_cache (next_frame, this_cache);
+ return trad_frame_get_this_base (this_trad_cache);
+}
+
+static const struct frame_base mips_stub_frame_base =
+{
+ &mips_stub_frame_unwind,
+ mips_stub_frame_base_address,
+ mips_stub_frame_base_address,
+ mips_stub_frame_base_address
+};
+
+static const struct frame_base *
+mips_stub_frame_base_sniffer (struct frame_info *next_frame)
+{
+ if (mips_stub_frame_sniffer (next_frame) != NULL)
+ return &mips_stub_frame_base;
+ else
+ return NULL;
}
static CORE_ADDR
@@ -1736,8 +2373,8 @@ read_next_frame_reg (struct frame_info *fi, int regno)
regcache_cooked_read_signed (current_regcache, regno, &val);
return val;
}
- else if ((regno % NUM_REGS) == SP_REGNUM)
- /* The SP_REGNUM is special, its value is stored in saved_regs.
+ else if ((regno % NUM_REGS) == MIPS_SP_REGNUM)
+ /* MIPS_SP_REGNUM is special, its value is stored in saved_regs.
In fact, it is so special that it can even only be fetched
using a raw register number! Once this code as been converted
to frame-unwind the problem goes away. */
@@ -1803,13 +2440,6 @@ mips_software_single_step (enum target_signal sig, int insert_breakpoints_p)
static struct mips_extra_func_info temp_proc_desc;
-/* This hack will go away once the get_prev_frame() code has been
- modified to set the frame's type first. That is BEFORE init extra
- frame info et.al. is called. This is because it will become
- possible to skip the init extra info call for sigtramp and dummy
- 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
@@ -1822,12 +2452,14 @@ static CORE_ADDR *temp_saved_regs;
frame. */
static void
-set_reg_offset (CORE_ADDR *saved_regs, int regno, CORE_ADDR offset)
+set_reg_offset (struct mips_frame_cache *this_cache, int regnum,
+ CORE_ADDR offset)
{
- if (saved_regs[regno] == 0)
+ if (this_cache != NULL
+ && this_cache->saved_regs[regnum].addr == 0)
{
- saved_regs[regno + 0 * NUM_REGS] = offset;
- saved_regs[regno + 1 * NUM_REGS] = offset;
+ this_cache->saved_regs[regnum + 0 * NUM_REGS].addr = offset;
+ this_cache->saved_regs[regnum + 1 * NUM_REGS].addr = offset;
}
}
@@ -1886,9 +2518,8 @@ heuristic_proc_start (CORE_ADDR pc)
{
static int blurb_printed = 0;
- warning
- ("Warning: GDB can't find the start of the function at 0x%s.",
- paddr_nz (pc));
+ warning ("GDB can't find the start of the function at 0x%s.",
+ paddr_nz (pc));
if (!blurb_printed)
{
@@ -1986,7 +2617,9 @@ mips16_get_imm (unsigned short prev_inst, /* previous instruction */
static void
mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
- struct frame_info *next_frame, CORE_ADDR sp)
+ CORE_ADDR sp,
+ struct frame_info *next_frame,
+ struct mips_frame_cache *this_cache)
{
CORE_ADDR cur_pc;
CORE_ADDR frame_addr = 0; /* Value of $r17, used as frame pointer */
@@ -2024,26 +2657,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 (temp_saved_regs, reg, sp + offset);
+ set_reg_offset (this_cache, 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 (temp_saved_regs, reg, sp + offset);
+ set_reg_offset (this_cache, 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 (temp_saved_regs, RA_REGNUM, sp + offset);
+ set_reg_offset (this_cache, 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 (temp_saved_regs, RA_REGNUM, sp + offset);
+ set_reg_offset (this_cache, RA_REGNUM, sp + offset);
}
else if (inst == 0x673d) /* move $s1, $sp */
{
@@ -2062,14 +2695,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 (temp_saved_regs, reg, frame_addr + offset);
+ set_reg_offset (this_cache, 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 (temp_saved_regs, reg, frame_addr + offset);
+ set_reg_offset (this_cache, reg, frame_addr + offset);
}
else if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
entry_inst = inst; /* save for later processing */
@@ -2099,8 +2732,8 @@ 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 (temp_saved_regs, reg, sp + offset);
- offset += mips_saved_regsize (tdep);
+ set_reg_offset (this_cache, reg, sp + offset);
+ offset += mips_abi_regsize (current_gdbarch);
}
/* Check if the ra register was pushed on the stack. */
@@ -2108,29 +2741,28 @@ 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 (temp_saved_regs, RA_REGNUM, sp + offset);
- offset -= mips_saved_regsize (tdep);
+ set_reg_offset (this_cache, RA_REGNUM, sp + offset);
+ offset -= mips_abi_regsize (current_gdbarch);
}
/* Check if the s0 and s1 registers were pushed on the stack. */
for (reg = 16; reg < sreg_count + 16; reg++)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (temp_saved_regs, reg, sp + offset);
- offset -= mips_saved_regsize (tdep);
+ set_reg_offset (this_cache, reg, sp + offset);
+ offset -= mips_abi_regsize (current_gdbarch);
}
}
}
static void
mips32_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
- struct frame_info *next_frame, CORE_ADDR sp)
+ CORE_ADDR sp, struct frame_info *next_frame,
+ struct mips_frame_cache *this_cache)
{
CORE_ADDR cur_pc;
CORE_ADDR frame_addr = 0; /* Value of $r30. Used by gcc for frame-pointer */
restart:
- temp_saved_regs = xrealloc (temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
- memset (temp_saved_regs, '\0', SIZEOF_FRAME_SAVED_REGS);
PROC_FRAME_OFFSET (&temp_proc_desc) = 0;
PROC_FRAME_ADJUST (&temp_proc_desc) = 0; /* offset of FP from SP */
for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += MIPS_INSTLEN)
@@ -2161,23 +2793,21 @@ restart:
else if ((high_word & 0xFFE0) == 0xafa0) /* sw reg,offset($sp) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (temp_saved_regs, reg, sp + low_word);
+ set_reg_offset (this_cache, reg, sp + low_word);
}
else if ((high_word & 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */
{
- /* Irix 6.2 N32 ABI uses sd instructions for saving $gp and $ra,
- but the register size used is only 32 bits. Make the address
- for the saved register point to the lower 32 bits. */
+ /* Irix 6.2 N32 ABI uses sd instructions for saving $gp and
+ $ra. */
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (temp_saved_regs, reg,
- sp + low_word + 8 - mips_regsize (current_gdbarch));
+ set_reg_offset (this_cache, reg, sp + low_word);
}
else if (high_word == 0x27be) /* addiu $30,$sp,size */
{
/* Old gcc frame, r30 is virtual frame pointer. */
if ((long) low_word != PROC_FRAME_OFFSET (&temp_proc_desc))
frame_addr = sp + low_word;
- else if (PROC_FRAME_REG (&temp_proc_desc) == SP_REGNUM)
+ else if (PROC_FRAME_REG (&temp_proc_desc) == MIPS_SP_REGNUM)
{
unsigned alloca_adjust;
PROC_FRAME_REG (&temp_proc_desc) = 30;
@@ -2200,7 +2830,7 @@ restart:
else if (inst == 0x03A0F021 || inst == 0x03a0f025 || inst == 0x03a0f02d)
{
/* New gcc frame, virtual frame pointer is at r30 + frame_size. */
- if (PROC_FRAME_REG (&temp_proc_desc) == SP_REGNUM)
+ if (PROC_FRAME_REG (&temp_proc_desc) == MIPS_SP_REGNUM)
{
unsigned alloca_adjust;
PROC_FRAME_REG (&temp_proc_desc) = 30;
@@ -2220,37 +2850,40 @@ restart:
else if ((high_word & 0xFFE0) == 0xafc0) /* sw reg,offset($30) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (temp_saved_regs, reg, frame_addr + low_word);
+ set_reg_offset (this_cache, reg, frame_addr + low_word);
}
}
}
static mips_extra_func_info_t
heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
- struct frame_info *next_frame, int cur_frame)
+ struct frame_info *next_frame,
+ struct mips_frame_cache *this_cache)
{
CORE_ADDR sp;
- if (cur_frame)
- sp = read_next_frame_reg (next_frame, NUM_REGS + SP_REGNUM);
+ /* Can be called when there's no process, and hence when there's no
+ NEXT_FRAME. */
+ if (next_frame != NULL)
+ sp = read_next_frame_reg (next_frame, NUM_REGS + MIPS_SP_REGNUM);
else
sp = 0;
if (start_pc == 0)
return NULL;
memset (&temp_proc_desc, '\0', sizeof (temp_proc_desc));
- temp_saved_regs = xrealloc (temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
- memset (temp_saved_regs, '\0', SIZEOF_FRAME_SAVED_REGS);
PROC_LOW_ADDR (&temp_proc_desc) = start_pc;
- PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
+ PROC_FRAME_REG (&temp_proc_desc) = MIPS_SP_REGNUM;
PROC_PC_REG (&temp_proc_desc) = RA_REGNUM;
if (start_pc + 200 < limit_pc)
limit_pc = start_pc + 200;
if (pc_is_mips16 (start_pc))
- mips16_heuristic_proc_desc (start_pc, limit_pc, next_frame, sp);
+ mips16_heuristic_proc_desc (start_pc, limit_pc, sp,
+ next_frame, this_cache);
else
- mips32_heuristic_proc_desc (start_pc, limit_pc, next_frame, sp);
+ mips32_heuristic_proc_desc (start_pc, limit_pc, sp,
+ next_frame, this_cache);
return &temp_proc_desc;
}
@@ -2288,9 +2921,6 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
struct obj_section *sec;
struct mips_objfile_private *priv;
- if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
- return NULL;
-
find_pc_partial_function (pc, NULL, &startaddr, NULL);
if (addrptr)
*addrptr = startaddr;
@@ -2471,67 +3101,6 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
return NULL;
}
-
-static mips_extra_func_info_t
-find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame, int cur_frame)
-{
- mips_extra_func_info_t proc_desc;
- CORE_ADDR startaddr = 0;
-
- proc_desc = non_heuristic_proc_desc (pc, &startaddr);
-
- if (proc_desc)
- {
- /* 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.
- */
- if (next_frame == NULL)
- {
- struct symtab_and_line val;
- struct symbol *proc_symbol =
- PROC_DESC_IS_DUMMY (proc_desc) ? 0 : PROC_SYMBOL (proc_desc);
-
- if (proc_symbol)
- {
- val = find_pc_line (BLOCK_START
- (SYMBOL_BLOCK_VALUE (proc_symbol)), 0);
- val.pc = val.end ? val.end : pc;
- }
- if (!proc_symbol || pc < val.pc)
- {
- mips_extra_func_info_t found_heuristic =
- heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
- pc, next_frame, cur_frame);
- if (found_heuristic)
- proc_desc = found_heuristic;
- }
- }
- }
- else
- {
- /* 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! */
-
- 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 (startaddr == 0)
- startaddr = heuristic_proc_start (pc);
-
- proc_desc = heuristic_proc_desc (startaddr, pc, next_frame, cur_frame);
- }
- return proc_desc;
-}
-
/* MIPS 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
@@ -2634,10 +3203,10 @@ return_value_location (struct type *valtype,
&& ((MIPS_FPU_TYPE == MIPS_FPU_DOUBLE && (len == 4 || len == 8))
|| (MIPS_FPU_TYPE == MIPS_FPU_SINGLE && len == 4)))
{
- if (!FP_REGISTER_DOUBLE && len == 8)
+ if (mips_abi_regsize (current_gdbarch) < 8 && len == 8)
{
/* We need to break a 64bit float in two 32 bit halves and
- spread them across a floating-point register pair. */
+ spread them across a floating-point register pair. */
lo->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
hi->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 0 : 4;
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
@@ -2675,22 +3244,22 @@ return_value_location (struct type *valtype,
lo->reg = regnum + 0;
hi->reg = regnum + 1;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && len < mips_saved_regsize (tdep))
+ && len < mips_abi_regsize (current_gdbarch))
{
/* "un-left-justify" the value in the low register */
- lo->reg_offset = mips_saved_regsize (tdep) - len;
+ lo->reg_offset = mips_abi_regsize (current_gdbarch) - len;
lo->len = len;
hi->reg_offset = 0;
hi->len = 0;
}
- else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len > mips_saved_regsize (tdep) /* odd-size structs */
- && len < mips_saved_regsize (tdep) * 2
+ else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len > mips_abi_regsize (current_gdbarch) /* odd-size structs */
+ && len < mips_abi_regsize (current_gdbarch) * 2
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT ||
TYPE_CODE (valtype) == TYPE_CODE_UNION))
{
/* "un-left-justify" the value spread across two registers. */
- lo->reg_offset = 2 * mips_saved_regsize (tdep) - len;
- lo->len = mips_saved_regsize (tdep) - lo->reg_offset;
+ lo->reg_offset = 2 * mips_abi_regsize (current_gdbarch) - len;
+ lo->len = mips_abi_regsize (current_gdbarch) - lo->reg_offset;
hi->reg_offset = 0;
hi->len = len - lo->len;
}
@@ -2699,10 +3268,10 @@ return_value_location (struct type *valtype,
/* Only perform a partial copy of the second register. */
lo->reg_offset = 0;
hi->reg_offset = 0;
- if (len > mips_saved_regsize (tdep))
+ if (len > mips_abi_regsize (current_gdbarch))
{
- lo->len = mips_saved_regsize (tdep);
- hi->len = len - mips_saved_regsize (tdep);
+ lo->len = mips_abi_regsize (current_gdbarch);
+ hi->len = len - mips_abi_regsize (current_gdbarch);
}
else
{
@@ -2712,7 +3281,7 @@ return_value_location (struct type *valtype,
}
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& register_size (current_gdbarch, regnum) == 8
- && mips_saved_regsize (tdep) == 4)
+ && mips_abi_regsize (current_gdbarch) == 4)
{
/* Account for the fact that only the least-signficant part
of the register is being used */
@@ -2730,7 +3299,7 @@ static int
mips_eabi_use_struct_convention (int gcc_p, struct type *type)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- return (TYPE_LENGTH (type) > 2 * mips_saved_regsize (tdep));
+ return (TYPE_LENGTH (type) > 2 * mips_abi_regsize (current_gdbarch));
}
/* Should call_function pass struct by reference?
@@ -2745,13 +3314,13 @@ mips_eabi_reg_struct_has_addr (int gcc_p, struct type *type)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
- return (len > mips_saved_regsize (tdep));
+ return (len > mips_abi_regsize (current_gdbarch));
return 0;
}
static CORE_ADDR
-mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -2762,6 +3331,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -2785,7 +3355,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
passed in registers, but that's OK. */
for (argnum = 0; argnum < nargs; argnum++)
len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
if (mips_debug)
@@ -2826,13 +3396,13 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* The EABI passes structures that do not fit in a register by
reference. */
- if (len > mips_saved_regsize (tdep)
+ if (len > mips_abi_regsize (gdbarch)
&& (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
{
- store_unsigned_integer (valbuf, mips_saved_regsize (tdep),
+ store_unsigned_integer (valbuf, mips_abi_regsize (gdbarch),
VALUE_ADDRESS (arg));
typecode = TYPE_CODE_PTR;
- len = mips_saved_regsize (tdep);
+ len = mips_abi_regsize (gdbarch);
val = valbuf;
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, " push");
@@ -2845,7 +3415,8 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
up before the check to see if there are any FP registers
left. Non MIPS_EABI targets also pass the FP in the integer
registers so also round up normal registers. */
- if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type))
+ if (mips_abi_regsize (gdbarch) < 8
+ && fp_register_arg_p (typecode, arg_type))
{
if ((float_argreg & 1))
float_argreg++;
@@ -2866,7 +3437,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
- if (!FP_REGISTER_DOUBLE && len == 8)
+ if (mips_abi_regsize (gdbarch) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
@@ -2904,12 +3475,12 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
register-sized pieces. Large arguments are split between
registers and stack. */
/* Note: structs whose size is not a multiple of
- mips_regsize() are treated specially: Irix cc passes them
- in registers where gcc sometimes puts them on the stack.
- For maximum compatibility, we will put them in both
- places. */
- int odd_sized_struct = ((len > mips_saved_regsize (tdep))
- && (len % mips_saved_regsize (tdep) != 0));
+ mips_abi_regsize() are treated specially: Irix cc passes
+ them in registers where gcc sometimes puts them on the
+ stack. For maximum compatibility, we will put them in
+ both places. */
+ int odd_sized_struct = ((len > mips_abi_regsize (gdbarch))
+ && (len % mips_abi_regsize (gdbarch) != 0));
/* Note: Floating-point values that didn't fit into an FP
register are only written to memory. */
@@ -2917,8 +3488,8 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
/* Remember if the argument was written to the stack. */
int stack_used_p = 0;
- int partial_len = (len < mips_saved_regsize (tdep)
- ? len : mips_saved_regsize (tdep));
+ int partial_len = (len < mips_abi_regsize (gdbarch)
+ ? len : mips_abi_regsize (gdbarch));
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
@@ -2936,16 +3507,16 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
stack_used_p = 1;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (mips_stack_argsize (tdep) == 8
+ if (mips_stack_argsize (gdbarch) == 8
&& (typecode == TYPE_CODE_INT
|| typecode == TYPE_CODE_PTR
|| typecode == TYPE_CODE_FLT) && len <= 4)
- longword_offset = mips_stack_argsize (tdep) - len;
+ longword_offset = mips_stack_argsize (gdbarch) - len;
else if ((typecode == TYPE_CODE_STRUCT
|| typecode == TYPE_CODE_UNION)
&& (TYPE_LENGTH (arg_type)
- < mips_stack_argsize (tdep)))
- longword_offset = mips_stack_argsize (tdep) - len;
+ < mips_stack_argsize (gdbarch)))
+ longword_offset = mips_stack_argsize (gdbarch) - len;
}
if (mips_debug)
@@ -2987,7 +3558,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
argreg,
phex (regval,
- mips_saved_regsize (tdep)));
+ mips_abi_regsize (gdbarch)));
write_register (argreg, regval);
argreg++;
}
@@ -3003,14 +3574,14 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (stack_used_p)
stack_offset += align_up (partial_len,
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
}
}
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, "\n");
}
- regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+ regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
/* Return adjusted stack pointer. */
return sp;
@@ -3068,7 +3639,7 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
/* N32/N64 ABI stuff. */
static CORE_ADDR
-mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -3079,6 +3650,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3100,7 +3672,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
if (mips_debug)
@@ -3165,20 +3737,20 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
register-sized pieces. Large arguments are split between
registers and stack. */
/* Note: structs whose size is not a multiple of
- mips_regsize() are treated specially: Irix cc passes them
- in registers where gcc sometimes puts them on the stack.
- For maximum compatibility, we will put them in both
- places. */
- int odd_sized_struct = ((len > mips_saved_regsize (tdep))
- && (len % mips_saved_regsize (tdep) != 0));
+ mips_abi_regsize() are treated specially: Irix cc passes
+ them in registers where gcc sometimes puts them on the
+ stack. For maximum compatibility, we will put them in
+ both places. */
+ int odd_sized_struct = ((len > mips_abi_regsize (gdbarch))
+ && (len % mips_abi_regsize (gdbarch) != 0));
/* Note: Floating-point values that didn't fit into an FP
register are only written to memory. */
while (len > 0)
{
/* Rememer if the argument was written to the stack. */
int stack_used_p = 0;
- int partial_len = (len < mips_saved_regsize (tdep)
- ? len : mips_saved_regsize (tdep));
+ int partial_len = (len < mips_abi_regsize (gdbarch)
+ ? len : mips_abi_regsize (gdbarch));
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
@@ -3196,11 +3768,11 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
stack_used_p = 1;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (mips_stack_argsize (tdep) == 8
+ if (mips_stack_argsize (gdbarch) == 8
&& (typecode == TYPE_CODE_INT
|| typecode == TYPE_CODE_PTR
|| typecode == TYPE_CODE_FLT) && len <= 4)
- longword_offset = mips_stack_argsize (tdep) - len;
+ longword_offset = mips_stack_argsize (gdbarch) - len;
}
if (mips_debug)
@@ -3249,10 +3821,10 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
cagney/2001-07-23: gdb/179: Also, GCC, when
outputting LE O32 with sizeof (struct) <
- mips_saved_regsize(), generates a left shift as
+ mips_abi_regsize(), generates a left shift as
part of storing the argument in a register a
register (the left shift isn't generated when
- sizeof (struct) >= mips_saved_regsize()). Since
+ sizeof (struct) >= mips_abi_regsize()). Since
it is quite possible that this is GCC
contradicting the LE/O32 ABI, GDB has not been
adjusted to accommodate this. Either someone
@@ -3262,17 +3834,17 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
accordingly. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && partial_len < mips_saved_regsize (tdep)
+ && partial_len < mips_abi_regsize (gdbarch)
&& (typecode == TYPE_CODE_STRUCT ||
typecode == TYPE_CODE_UNION))
- regval <<= ((mips_saved_regsize (tdep) - partial_len) *
+ regval <<= ((mips_abi_regsize (gdbarch) - partial_len) *
TARGET_CHAR_BIT);
if (mips_debug)
fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
argreg,
phex (regval,
- mips_saved_regsize (tdep)));
+ mips_abi_regsize (gdbarch)));
write_register (argreg, regval);
argreg++;
}
@@ -3288,14 +3860,14 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (stack_used_p)
stack_offset += align_up (partial_len,
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
}
}
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, "\n");
}
- regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+ regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
/* Return adjusted stack pointer. */
return sp;
@@ -3310,7 +3882,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch,
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION
|| TYPE_CODE (type) == TYPE_CODE_ARRAY
- || TYPE_LENGTH (type) > 2 * mips_saved_regsize (tdep))
+ || TYPE_LENGTH (type) > 2 * mips_abi_regsize (gdbarch))
return RETURN_VALUE_STRUCT_CONVENTION;
else if (TYPE_CODE (type) == TYPE_CODE_FLT
&& tdep->mips_fpu_type != MIPS_FPU_NONE)
@@ -3406,7 +3978,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch,
/* O32 ABI stuff. */
static CORE_ADDR
-mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -3417,6 +3989,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3438,7 +4011,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
if (mips_debug)
@@ -3458,7 +4031,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
"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 (tdep);
+ stack_offset += mips_stack_argsize (gdbarch);
}
/* Now load as many as possible of the first arguments into
@@ -3484,7 +4057,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
up before the check to see if there are any FP registers
left. O32/O64 targets also pass the FP in the integer
registers so also round up normal registers. */
- if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type))
+ if (mips_abi_regsize (gdbarch) < 8
+ && fp_register_arg_p (typecode, arg_type))
{
if ((float_argreg & 1))
float_argreg++;
@@ -3503,7 +4077,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
- if (!FP_REGISTER_DOUBLE && len == 8)
+ if (mips_abi_regsize (gdbarch) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
@@ -3550,10 +4124,10 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
argreg, phex (regval, len));
write_register (argreg, regval);
- argreg += FP_REGISTER_DOUBLE ? 1 : 2;
+ argreg += (mips_abi_regsize (gdbarch) == 8) ? 1 : 2;
}
/* Reserve space for the FP register. */
- stack_offset += align_up (len, mips_stack_argsize (tdep));
+ stack_offset += align_up (len, mips_stack_argsize (gdbarch));
}
else
{
@@ -3561,15 +4135,15 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
register-sized pieces. Large arguments are split between
registers and stack. */
/* Note: structs whose size is not a multiple of
- mips_regsize() are treated specially: Irix cc passes them
- in registers where gcc sometimes puts them on the stack.
- For maximum compatibility, we will put them in both
- places. */
- int odd_sized_struct = ((len > mips_saved_regsize (tdep))
- && (len % mips_saved_regsize (tdep) != 0));
+ mips_abi_regsize() are treated specially: Irix cc passes
+ them in registers where gcc sometimes puts them on the
+ stack. For maximum compatibility, we will put them in
+ both places. */
+ int odd_sized_struct = ((len > mips_abi_regsize (gdbarch))
+ && (len % mips_abi_regsize (gdbarch) != 0));
/* Structures should be aligned to eight bytes (even arg registers)
on MIPS_ABI_O32, if their first member has double precision. */
- if (mips_saved_regsize (tdep) < 8
+ if (mips_abi_regsize (gdbarch) < 8
&& mips_type_needs_double_align (arg_type))
{
if ((argreg & 1))
@@ -3581,8 +4155,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
/* Remember if the argument was written to the stack. */
int stack_used_p = 0;
- int partial_len = (len < mips_saved_regsize (tdep)
- ? len : mips_saved_regsize (tdep));
+ int partial_len = (len < mips_abi_regsize (gdbarch)
+ ? len : mips_abi_regsize (gdbarch));
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
@@ -3600,11 +4174,11 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
stack_used_p = 1;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (mips_stack_argsize (tdep) == 8
+ if (mips_stack_argsize (gdbarch) == 8
&& (typecode == TYPE_CODE_INT
|| typecode == TYPE_CODE_PTR
|| typecode == TYPE_CODE_FLT) && len <= 4)
- longword_offset = mips_stack_argsize (tdep) - len;
+ longword_offset = mips_stack_argsize (gdbarch) - len;
}
if (mips_debug)
@@ -3641,7 +4215,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
LONGEST regval = extract_signed_integer (val, partial_len);
/* Value may need to be sign extended, because
- mips_regsize() != mips_saved_regsize(). */
+ mips_isa_regsize() != mips_abi_regsize(). */
/* A non-floating-point argument being passed in a
general register. If a struct or union, and if
@@ -3656,10 +4230,10 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
cagney/2001-07-23: gdb/179: Also, GCC, when
outputting LE O32 with sizeof (struct) <
- mips_saved_regsize(), generates a left shift as
+ mips_abi_regsize(), generates a left shift as
part of storing the argument in a register a
register (the left shift isn't generated when
- sizeof (struct) >= mips_saved_regsize()). Since
+ sizeof (struct) >= mips_abi_regsize()). Since
it is quite possible that this is GCC
contradicting the LE/O32 ABI, GDB has not been
adjusted to accommodate this. Either someone
@@ -3668,19 +4242,19 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
identified as such and GDB gets tweaked
accordingly. */
- if (mips_saved_regsize (tdep) < 8
+ if (mips_abi_regsize (gdbarch) < 8
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && partial_len < mips_saved_regsize (tdep)
+ && partial_len < mips_abi_regsize (gdbarch)
&& (typecode == TYPE_CODE_STRUCT ||
typecode == TYPE_CODE_UNION))
- regval <<= ((mips_saved_regsize (tdep) - partial_len) *
+ regval <<= ((mips_abi_regsize (gdbarch) - partial_len) *
TARGET_CHAR_BIT);
if (mips_debug)
fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
argreg,
phex (regval,
- mips_saved_regsize (tdep)));
+ mips_abi_regsize (gdbarch)));
write_register (argreg, regval);
argreg++;
@@ -3701,14 +4275,14 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
always allocated. */
stack_offset += align_up (partial_len,
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
}
}
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, "\n");
}
- regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+ regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
/* Return adjusted stack pointer. */
return sp;
@@ -3838,9 +4412,9 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += mips_stack_argsize (tdep), regnum++)
+ offset += mips_stack_argsize (gdbarch), regnum++)
{
- int xfer = mips_stack_argsize (tdep);
+ int xfer = mips_stack_argsize (gdbarch);
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
@@ -3857,7 +4431,7 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
ABI. */
static CORE_ADDR
-mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs,
struct value **args, CORE_ADDR sp,
@@ -3869,6 +4443,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3890,7 +4465,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
sp -= align_up (len, 16);
if (mips_debug)
@@ -3910,7 +4485,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
"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 (tdep);
+ stack_offset += mips_stack_argsize (gdbarch);
}
/* Now load as many as possible of the first arguments into
@@ -3936,7 +4511,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
up before the check to see if there are any FP registers
left. O32/O64 targets also pass the FP in the integer
registers so also round up normal registers. */
- if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type))
+ if (mips_abi_regsize (gdbarch) < 8
+ && fp_register_arg_p (typecode, arg_type))
{
if ((float_argreg & 1))
float_argreg++;
@@ -3955,7 +4531,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
- if (!FP_REGISTER_DOUBLE && len == 8)
+ if (mips_abi_regsize (gdbarch) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
@@ -4002,10 +4578,10 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
argreg, phex (regval, len));
write_register (argreg, regval);
- argreg += FP_REGISTER_DOUBLE ? 1 : 2;
+ argreg += (mips_abi_regsize (gdbarch) == 8) ? 1 : 2;
}
/* Reserve space for the FP register. */
- stack_offset += align_up (len, mips_stack_argsize (tdep));
+ stack_offset += align_up (len, mips_stack_argsize (gdbarch));
}
else
{
@@ -4013,15 +4589,15 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
register-sized pieces. Large arguments are split between
registers and stack. */
/* Note: structs whose size is not a multiple of
- mips_regsize() are treated specially: Irix cc passes them
- in registers where gcc sometimes puts them on the stack.
- For maximum compatibility, we will put them in both
- places. */
- int odd_sized_struct = ((len > mips_saved_regsize (tdep))
- && (len % mips_saved_regsize (tdep) != 0));
+ mips_abi_regsize() are treated specially: Irix cc passes
+ them in registers where gcc sometimes puts them on the
+ stack. For maximum compatibility, we will put them in
+ both places. */
+ int odd_sized_struct = ((len > mips_abi_regsize (gdbarch))
+ && (len % mips_abi_regsize (gdbarch) != 0));
/* Structures should be aligned to eight bytes (even arg registers)
on MIPS_ABI_O32, if their first member has double precision. */
- if (mips_saved_regsize (tdep) < 8
+ if (mips_abi_regsize (gdbarch) < 8
&& mips_type_needs_double_align (arg_type))
{
if ((argreg & 1))
@@ -4033,8 +4609,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
/* Remember if the argument was written to the stack. */
int stack_used_p = 0;
- int partial_len = (len < mips_saved_regsize (tdep)
- ? len : mips_saved_regsize (tdep));
+ int partial_len = (len < mips_abi_regsize (gdbarch)
+ ? len : mips_abi_regsize (gdbarch));
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
@@ -4052,11 +4628,11 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
stack_used_p = 1;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (mips_stack_argsize (tdep) == 8
+ if (mips_stack_argsize (gdbarch) == 8
&& (typecode == TYPE_CODE_INT
|| typecode == TYPE_CODE_PTR
|| typecode == TYPE_CODE_FLT) && len <= 4)
- longword_offset = mips_stack_argsize (tdep) - len;
+ longword_offset = mips_stack_argsize (gdbarch) - len;
}
if (mips_debug)
@@ -4093,7 +4669,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
LONGEST regval = extract_signed_integer (val, partial_len);
/* Value may need to be sign extended, because
- mips_regsize() != mips_saved_regsize(). */
+ mips_isa_regsize() != mips_abi_regsize(). */
/* A non-floating-point argument being passed in a
general register. If a struct or union, and if
@@ -4108,10 +4684,10 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
cagney/2001-07-23: gdb/179: Also, GCC, when
outputting LE O32 with sizeof (struct) <
- mips_saved_regsize(), generates a left shift as
+ mips_abi_regsize(), generates a left shift as
part of storing the argument in a register a
register (the left shift isn't generated when
- sizeof (struct) >= mips_saved_regsize()). Since
+ sizeof (struct) >= mips_abi_regsize()). Since
it is quite possible that this is GCC
contradicting the LE/O32 ABI, GDB has not been
adjusted to accommodate this. Either someone
@@ -4120,19 +4696,19 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
identified as such and GDB gets tweaked
accordingly. */
- if (mips_saved_regsize (tdep) < 8
+ if (mips_abi_regsize (gdbarch) < 8
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && partial_len < mips_saved_regsize (tdep)
+ && partial_len < mips_abi_regsize (gdbarch)
&& (typecode == TYPE_CODE_STRUCT ||
typecode == TYPE_CODE_UNION))
- regval <<= ((mips_saved_regsize (tdep) - partial_len) *
+ regval <<= ((mips_abi_regsize (gdbarch) - partial_len) *
TARGET_CHAR_BIT);
if (mips_debug)
fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
argreg,
phex (regval,
- mips_saved_regsize (tdep)));
+ mips_abi_regsize (gdbarch)));
write_register (argreg, regval);
argreg++;
@@ -4153,14 +4729,14 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
always allocated. */
stack_offset += align_up (partial_len,
- mips_stack_argsize (tdep));
+ mips_stack_argsize (gdbarch));
}
}
if (mips_debug)
fprintf_unfiltered (gdb_stdlog, "\n");
}
- regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+ regcache_cooked_write_signed (regcache, MIPS_SP_REGNUM, sp);
/* Return adjusted stack pointer. */
return sp;
@@ -4467,7 +5043,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
struct gdbarch *gdbarch = get_frame_arch (frame);
/* do values for GP (int) regs */
char raw_buffer[MAX_REGISTER_SIZE];
- int ncols = (mips_regsize (gdbarch) == 8 ? 4 : 8); /* display cols per row */
+ int ncols = (mips_abi_regsize (gdbarch) == 8 ? 4 : 8); /* display cols per row */
int col, byte;
int regnum;
@@ -4482,7 +5058,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
TYPE_CODE_FLT)
break; /* end the row: reached FP register */
fprintf_filtered (file,
- mips_regsize (current_gdbarch) == 8 ? "%17s" : "%9s",
+ mips_abi_regsize (current_gdbarch) == 8 ? "%17s" : "%9s",
REGISTER_NAME (regnum));
col++;
}
@@ -4506,7 +5082,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
for (byte = 0;
- byte < (mips_regsize (current_gdbarch)
+ byte < (mips_abi_regsize (current_gdbarch)
- register_size (current_gdbarch, regnum)); byte++)
printf_filtered (" ");
/* Now print the register value in hex, endian order. */
@@ -4807,7 +5383,7 @@ mips_skip_prologue (CORE_ADDR pc)
If so, then return either PC, or the PC after the prologue, whichever
is greater. */
- CORE_ADDR post_prologue_pc = after_prologue (pc, NULL);
+ CORE_ADDR post_prologue_pc = after_prologue (pc);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
@@ -4821,16 +5397,6 @@ mips_skip_prologue (CORE_ADDR pc)
return mips32_skip_prologue (pc);
}
-/* Exported procedure: Is PC in the signal trampoline code */
-
-static int
-mips_pc_in_sigtramp (CORE_ADDR pc, char *ignore)
-{
- if (sigtramp_address == 0)
- fixup_sigtramp ();
- return (pc >= sigtramp_address && pc < sigtramp_end);
-}
-
/* Root of all "set mips "/"show mips " commands. This will eventually be
used for all MIPS-specific commands. */
@@ -5249,8 +5815,9 @@ mips_in_return_stub (CORE_ADDR pc, char *name)
}
-/* Return non-zero if the PC is in a library helper function that should
- be ignored. This implements the IGNORE_HELPER_CALL macro. */
+/* Return non-zero if the PC is in a library helper function that
+ should be ignored. This implements the
+ DEPRECATED_IGNORE_HELPER_CALL macro. */
int
mips_ignore_helper (CORE_ADDR pc)
@@ -5431,7 +5998,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (found_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
bfd_map_over_sections (info.abfd, mips_find_abi_section, &found_abi);
- /* If we have no usefu BFD information, use the ABI from the last
+ /* If we have no useful BFD information, use the ABI from the last
MIPS architecture (if there is one). */
if (found_abi == MIPS_ABI_UNKNOWN && info.abfd == NULL && arches != NULL)
found_abi = gdbarch_tdep (arches->gdbarch)->found_abi;
@@ -5502,6 +6069,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
case bfd_mach_mips3900:
case bfd_mach_mips4100:
case bfd_mach_mips4111:
+ case bfd_mach_mips4120:
fpu_type = MIPS_FPU_NONE;
break;
case bfd_mach_mips4650:
@@ -5600,7 +6168,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
/* FIXME: cagney/2003-11-15: For MIPS, hasn't PC_REGNUM been
replaced by read_pc? */
- set_gdbarch_pc_regnum (gdbarch, regnum->pc);
+ set_gdbarch_pc_regnum (gdbarch, regnum->pc + num_regs);
+ set_gdbarch_sp_regnum (gdbarch, MIPS_SP_REGNUM + num_regs);
set_gdbarch_fp0_regnum (gdbarch, regnum->fp0);
set_gdbarch_num_regs (gdbarch, num_regs);
set_gdbarch_num_pseudo_regs (gdbarch, num_regs);
@@ -5614,9 +6183,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
case MIPS_ABI_O32:
set_gdbarch_push_dummy_call (gdbarch, mips_o32_push_dummy_call);
set_gdbarch_return_value (gdbarch, mips_o32_return_value);
- tdep->mips_default_saved_regsize = 4;
- tdep->mips_default_stack_argsize = 4;
- tdep->mips_fp_register_double = 0;
tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1;
tdep->default_mask_address_p = 0;
@@ -5630,17 +6196,13 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_o64_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
mips_o64_extract_return_value);
- tdep->mips_default_saved_regsize = 8;
- tdep->mips_default_stack_argsize = 8;
- tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
- set_gdbarch_use_struct_convention (gdbarch,
- always_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
break;
case MIPS_ABI_EABI32:
set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
@@ -5648,9 +6210,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
mips_eabi_extract_return_value);
- tdep->mips_default_saved_regsize = 4;
- tdep->mips_default_stack_argsize = 4;
- tdep->mips_fp_register_double = 0;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
@@ -5659,8 +6218,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mips_eabi_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_eabi_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, mips_eabi_use_struct_convention);
break;
case MIPS_ABI_EABI64:
set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
@@ -5668,9 +6226,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
mips_eabi_extract_return_value);
- tdep->mips_default_saved_regsize = 8;
- tdep->mips_default_stack_argsize = 8;
- tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
@@ -5679,34 +6234,33 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mips_eabi_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_eabi_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, mips_eabi_use_struct_convention);
break;
case MIPS_ABI_N32:
set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_return_value (gdbarch, mips_n32n64_return_value);
- tdep->mips_default_saved_regsize = 8;
- tdep->mips_default_stack_argsize = 8;
- tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_long_double_bit (gdbarch, 128);
+ set_gdbarch_long_double_format (gdbarch,
+ &floatformat_n32n64_long_double_big);
break;
case MIPS_ABI_N64:
set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_return_value (gdbarch, mips_n32n64_return_value);
- tdep->mips_default_saved_regsize = 8;
- tdep->mips_default_stack_argsize = 8;
- tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_long_double_bit (gdbarch, 128);
+ set_gdbarch_long_double_format (gdbarch,
+ &floatformat_n32n64_long_double_big);
break;
default:
internal_error (__FILE__, __LINE__, "unknown ABI in switch");
@@ -5779,7 +6333,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_type (gdbarch, mips_register_type);
set_gdbarch_print_registers_info (gdbarch, mips_print_registers_info);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_mips);
@@ -5809,8 +6362,14 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch_init_osabi (info, gdbarch);
/* Unwind the frame. */
+ frame_unwind_append_sniffer (gdbarch, mips_stub_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, mips_mdebug_frame_sniffer);
+ frame_unwind_append_sniffer (gdbarch, mips_insn16_frame_sniffer);
+ frame_unwind_append_sniffer (gdbarch, mips_insn32_frame_sniffer);
+ frame_base_append_sniffer (gdbarch, mips_stub_frame_base_sniffer);
frame_base_append_sniffer (gdbarch, mips_mdebug_frame_base_sniffer);
+ frame_base_append_sniffer (gdbarch, mips_insn16_frame_base_sniffer);
+ frame_base_append_sniffer (gdbarch, mips_insn32_frame_base_sniffer);
return gdbarch;
}
@@ -5905,9 +6464,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
tdep->default_mask_address_p);
}
fprintf_unfiltered (file,
- "mips_dump_tdep: FP_REGISTER_DOUBLE = %d\n",
- FP_REGISTER_DOUBLE);
- fprintf_unfiltered (file,
"mips_dump_tdep: MIPS_DEFAULT_FPU_TYPE = %d (%s)\n",
MIPS_DEFAULT_FPU_TYPE,
(MIPS_DEFAULT_FPU_TYPE == MIPS_FPU_NONE ? "none"
@@ -5923,11 +6479,8 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
: MIPS_FPU_TYPE == MIPS_FPU_DOUBLE ? "double"
: "???"));
fprintf_unfiltered (file,
- "mips_dump_tdep: FP_REGISTER_DOUBLE = %d\n",
- FP_REGISTER_DOUBLE);
- fprintf_unfiltered (file,
"mips_dump_tdep: mips_stack_argsize() = %d\n",
- mips_stack_argsize (tdep));
+ mips_stack_argsize (current_gdbarch));
fprintf_unfiltered (file, "mips_dump_tdep: A0_REGNUM = %d\n", A0_REGNUM);
fprintf_unfiltered (file,
"mips_dump_tdep: ADDR_BITS_REMOVE # %s\n",
@@ -5945,8 +6498,8 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: FIRST_EMBED_REGNUM = %d\n",
FIRST_EMBED_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: IGNORE_HELPER_CALL # %s\n",
- XSTRING (IGNORE_HELPER_CALL (PC)));
+ "mips_dump_tdep: DEPRECATED_IGNORE_HELPER_CALL # %s\n",
+ XSTRING (DEPRECATED_IGNORE_HELPER_CALL (PC)));
fprintf_unfiltered (file,
"mips_dump_tdep: IN_SOLIB_CALL_TRAMPOLINE # %s\n",
XSTRING (IN_SOLIB_CALL_TRAMPOLINE (PC, NAME)));
@@ -5986,13 +6539,11 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: MIPS_NUMREGS = %d\n", MIPS_NUMREGS);
fprintf_unfiltered (file,
- "mips_dump_tdep: mips_saved_regsize() = %d\n",
- mips_saved_regsize (tdep));
+ "mips_dump_tdep: mips_abi_regsize() = %d\n",
+ mips_abi_regsize (current_gdbarch));
fprintf_unfiltered (file,
"mips_dump_tdep: PRID_REGNUM = %d\n", PRID_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: PROC_DESC_IS_DUMMY = function?\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: PROC_FRAME_ADJUST = function?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: PROC_FRAME_OFFSET = function?\n");
@@ -6021,8 +6572,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: SETUP_ARBITRARY_FRAME # %s\n",
XSTRING (SETUP_ARBITRARY_FRAME (NUMARGS, ARGS)));
fprintf_unfiltered (file,
- "mips_dump_tdep: SET_PROC_DESC_IS_DUMMY = function?\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: SKIP_TRAMPOLINE_CODE # %s\n",
XSTRING (SKIP_TRAMPOLINE_CODE (PC)));
fprintf_unfiltered (file,
@@ -6055,9 +6604,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: TARGET_CAN_USE_HARDWARE_WATCHPOINT # %s\n",
XSTRING (TARGET_CAN_USE_HARDWARE_WATCHPOINT
(TYPE, CNT, OTHERTYPE)));
- fprintf_unfiltered (file,
- "mips_dump_tdep: TARGET_HAS_HARDWARE_WATCHPOINTS # %s\n",
- XSTRING (TARGET_HAS_HARDWARE_WATCHPOINTS));
#ifdef TRACE_CLEAR
fprintf_unfiltered (file,
"mips_dump_tdep: TRACE_CLEAR # %s\n",
@@ -6087,8 +6633,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
(long) VM_MIN_ADDRESS);
fprintf_unfiltered (file,
"mips_dump_tdep: ZERO_REGNUM = %d\n", ZERO_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: _PROC_MAGIC_ = %d\n", _PROC_MAGIC_);
}
extern initialize_file_ftype _initialize_mips_tdep; /* -Wmissing-prototypes */
@@ -6118,10 +6662,10 @@ _initialize_mips_tdep (void)
&showmipscmdlist, "show mips ", 0, &showlist);
/* Allow the user to override the saved register size. */
- add_show_from_set (add_set_enum_cmd ("saved-gpreg-size",
- class_obscure,
- size_enums,
- &mips_saved_regsize_string, "\
+ deprecated_add_show_from_set (add_set_enum_cmd ("saved-gpreg-size",
+ class_obscure,
+ size_enums,
+ &mips_abi_regsize_string, "\
Set size of general purpose registers saved on the stack.\n\
This option can be set to one of:\n\
32 - Force GDB to treat saved GP registers as 32-bit\n\
@@ -6131,16 +6675,18 @@ This option can be set to one of:\n\
(default: auto)", &setmipscmdlist), &showmipscmdlist);
/* Allow the user to override the argument stack size. */
- add_show_from_set (add_set_enum_cmd ("stack-arg-size",
- class_obscure,
- size_enums,
- &mips_stack_argsize_string, "\
+ deprecated_add_show_from_set
+ (add_set_enum_cmd ("stack-arg-size",
+ class_obscure,
+ size_enums,
+ &mips_stack_argsize_string, "\
Set the amount of stack space reserved for each argument.\n\
This option can be set to one of:\n\
32 - Force GDB to allocate 32-bit chunks per argument\n\
64 - Force GDB to allocate 64-bit chunks per argument\n\
auto - Allow GDB to determine the correct setting from the current\n\
- target and executable (default)", &setmipscmdlist), &showmipscmdlist);
+ target and executable (default)", &setmipscmdlist),
+ &showmipscmdlist);
/* Allow the user to override the ABI. */
c = add_set_enum_cmd
@@ -6193,32 +6739,34 @@ search. The only need to set it is when debugging a stripped executable.", &set
/* We need to throw away the frame cache when we set this, since it
might change our ability to get backtraces. */
set_cmd_sfunc (c, reinit_frame_cache_sfunc);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
/* Allow the user to control whether the upper bits of 64-bit
addresses should be zeroed. */
add_setshow_auto_boolean_cmd ("mask-address", no_class, &mask_address_var, "\
-Set zeroing of upper 32 bits of 64-bit addresses.\n\
+Set zeroing of upper 32 bits of 64-bit addresses.", "\
+Show zeroing of upper 32 bits of 64-bit addresses.", "\
Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to \n\
allow GDB to determine the correct value.\n", "\
-Show zeroing of upper 32 bits of 64-bit addresses.",
+Zerroing of upper 32 bits of 64-bit address is %s.",
NULL, show_mask_address, &setmipscmdlist, &showmipscmdlist);
/* Allow the user to control the size of 32 bit registers within the
raw remote packet. */
- add_setshow_cmd ("remote-mips64-transfers-32bit-regs", class_obscure,
- var_boolean, &mips64_transfers_32bit_regs_p, "\
-Set compatibility with 64-bit MIPS targets that transfer 32-bit quantities.\n\
+ add_setshow_boolean_cmd ("remote-mips64-transfers-32bit-regs", class_obscure,
+ &mips64_transfers_32bit_regs_p, "\
+Set compatibility with 64-bit MIPS target that transfers 32-bit quantities.", "\
+Show compatibility with 64-bit MIPS target that transfers 32-bit quantities.", "\
Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n\
that would transfer 32 bits for some registers (e.g. SR, FSR) and\n\
64 bits for others. Use \"off\" to disable compatibility mode", "\
-Show compatibility with 64-bit MIPS targets that transfer 32-bit quantities.\n\
-Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n\
-that would transfer 32 bits for some registers (e.g. SR, FSR) and\n\
-64 bits for others. Use \"off\" to disable compatibility mode", set_mips64_transfers_32bit_regs, NULL, &setlist, &showlist);
+Compatibility with 64-bit MIPS target that transfers 32-bit quantities is %s.",
+ set_mips64_transfers_32bit_regs, NULL, &setlist, &showlist);
/* Debug this files internals. */
- add_show_from_set (add_set_cmd ("mips", class_maintenance, var_zinteger,
- &mips_debug, "Set mips debugging.\n\
-When non-zero, mips specific debugging is enabled.", &setdebuglist), &showdebuglist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("mips", class_maintenance, var_zinteger,
+ &mips_debug, "Set mips debugging.\n\
+When non-zero, mips specific debugging is enabled.", &setdebuglist),
+ &showdebuglist);
}
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index 7a00ffaf5e9..a28f7297eb0 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -43,9 +43,9 @@ enum mips_abi mips_abi (struct gdbarch *gdbarch);
/* For wince :-(. */
extern CORE_ADDR mips_next_pc (CORE_ADDR pc);
-/* Return the "MIPS" register size. Just a short cut to the BFD
+/* Return the MIPS ISA's register size. Just a short cut to the BFD
architecture's word size. */
-extern int mips_regsize (struct gdbarch *gdbarch);
+extern int mips_isa_regsize (struct gdbarch *gdbarch);
/* Return the current index for various MIPS registers. */
struct mips_regnum
@@ -62,6 +62,7 @@ struct mips_regnum
extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
enum {
+ MIPS_SP_REGNUM = 29,
MIPS_EMBED_LO_REGNUM = 33,
MIPS_EMBED_HI_REGNUM = 34,
MIPS_EMBED_BADVADDR_REGNUM = 35,
diff --git a/gdb/mipsnbsd-nat.c b/gdb/mipsnbsd-nat.c
index 16521f67617..45fe2bcda65 100644
--- a/gdb/mipsnbsd-nat.c
+++ b/gdb/mipsnbsd-nat.c
@@ -1,5 +1,6 @@
/* Native-dependent code for MIPS systems running NetBSD.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -43,7 +44,7 @@ fetch_inferior_registers (int regno)
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
mipsnbsd_supply_reg ((char *) &regs, regno);
@@ -56,7 +57,7 @@ fetch_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
mipsnbsd_supply_fpreg ((char *) &fpregs, regno);
@@ -71,13 +72,13 @@ store_inferior_registers (int regno)
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
mipsnbsd_fill_reg ((char *) &regs, regno);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
if (regno != -1)
@@ -89,13 +90,13 @@ store_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
mipsnbsd_fill_fpreg ((char *) &fpregs, regno);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't write floating point status");
}
}
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 114a3745d7f..a8b3be868aa 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -45,9 +45,10 @@ mipsnbsd_supply_reg (char *regs, int regno)
if (regno == i || regno == -1)
{
if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
else
- supply_register (i, regs + (i * mips_regsize (current_gdbarch)));
+ regcache_raw_supply (current_regcache, i,
+ regs + (i * mips_isa_regsize (current_gdbarch)));
}
}
}
@@ -59,7 +60,8 @@ mipsnbsd_fill_reg (char *regs, int regno)
for (i = 0; i <= PC_REGNUM; i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, regs + (i * mips_regsize (current_gdbarch)));
+ regcache_raw_collect (current_regcache, i,
+ regs + (i * mips_isa_regsize (current_gdbarch)));
}
void
@@ -74,9 +76,10 @@ mipsnbsd_supply_fpreg (char *fpregs, int regno)
if (regno == i || regno == -1)
{
if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
else
- supply_register (i, fpregs + ((i - FP0_REGNUM) * mips_regsize (current_gdbarch)));
+ regcache_raw_supply (current_regcache, i,
+ fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
}
}
}
@@ -89,7 +92,8 @@ mipsnbsd_fill_fpreg (char *fpregs, int regno)
for (i = FP0_REGNUM; i <= mips_regnum (current_gdbarch)->fp_control_status;
i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, fpregs + ((i - FP0_REGNUM) * mips_regsize (current_gdbarch)));
+ regcache_raw_collect (current_regcache, i,
+ fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
}
static void
@@ -198,7 +202,7 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
LONGEST off;
int i;
- if (read_memory_nobpt (pc, (char *) w, sizeof (w)) != 0)
+ if (deprecated_read_memory_nobpt (pc, (char *) w, sizeof (w)) != 0)
return -1;
for (i = 0; i < RETCODE_NWORDS; i++)
@@ -212,7 +216,7 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
off = i * 4;
pc -= off;
- if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (deprecated_read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
return -1;
if (memcmp (ret, retcode, RETCODE_SIZE) == 0)
@@ -221,13 +225,6 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
return -1;
}
-static int
-mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
-{
- return (nbsd_pc_in_sigtramp (pc, func_name)
- || mipsnbsd_sigtramp_offset (pc) >= 0);
-}
-
/* Figure out where the longjmp will land. We expect that we have
just entered longjmp and haven't yet setup the stack frame, so
the args are still in the argument regs. A0_REGNUM points at the
@@ -236,7 +233,7 @@ mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
success. */
#define NBSD_MIPS_JB_PC (2 * 4)
-#define NBSD_MIPS_JB_ELEMENT_SIZE mips_regsize (current_gdbarch)
+#define NBSD_MIPS_JB_ELEMENT_SIZE mips_isa_regsize (current_gdbarch)
#define NBSD_MIPS_JB_OFFSET (NBSD_MIPS_JB_PC * \
NBSD_MIPS_JB_ELEMENT_SIZE)
@@ -345,8 +342,6 @@ static void
mipsnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, mipsnbsd_pc_in_sigtramp);
-
set_gdbarch_get_longjmp_target (gdbarch, mipsnbsd_get_longjmp_target);
set_gdbarch_cannot_fetch_register (gdbarch, mipsnbsd_cannot_fetch_register);
@@ -366,6 +361,6 @@ _initialize_mipsnbsd_tdep (void)
gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_NETBSD_ELF,
mipsnbsd_init_abi);
- add_core_fns (&mipsnbsd_core_fns);
- add_core_fns (&mipsnbsd_elfcore_fns);
+ deprecated_add_core_fns (&mipsnbsd_core_fns);
+ deprecated_add_core_fns (&mipsnbsd_elfcore_fns);
}
diff --git a/gdb/mipsnbsd-tdep.h b/gdb/mipsnbsd-tdep.h
index 0feca8784c6..2ca0cc246c2 100644
--- a/gdb/mipsnbsd-tdep.h
+++ b/gdb/mipsnbsd-tdep.h
@@ -1,5 +1,6 @@
/* Common target dependent code for GDB on MIPS systems running NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+
+ Copyright 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,7 +28,7 @@ void mipsnbsd_fill_reg (char *, int);
void mipsnbsd_supply_fpreg (char *, int);
void mipsnbsd_fill_fpreg (char *, int);
-#define SIZEOF_STRUCT_REG (38 * mips_regsize (current_gdbarch))
-#define SIZEOF_STRUCT_FPREG (33 * mips_regsize (current_gdbarch))
+#define SIZEOF_STRUCT_REG (38 * mips_isa_regsize (current_gdbarch))
+#define SIZEOF_STRUCT_FPREG (33 * mips_isa_regsize (current_gdbarch))
#endif /* MIPSNBSD_TDEP_H */
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index f67eeea9819..d34755e9d68 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -59,12 +59,9 @@ read_alphacoff_dynamic_symtab (struct section_offsets *,
symbol file is specified (not just adding some symbols from another
file, e.g. a shared library). */
-extern CORE_ADDR sigtramp_address;
-
static void
mipscoff_new_init (struct objfile *ignore)
{
- sigtramp_address = 0;
stabsread_new_init ();
buildsym_new_init ();
}
@@ -105,25 +102,6 @@ mipscoff_symfile_read (struct objfile *objfile, int mainline)
minimal symbols for this objfile. */
install_minimal_symbols (objfile);
-
- /* If the entry_file bounds are still unknown after processing the
- partial symbols, then try to set them from the minimal symbols
- surrounding the entry_point. */
-
- if (mainline
- && objfile->ei.entry_point != INVALID_ENTRY_POINT
- && objfile->ei.deprecated_entry_file_lowpc == INVALID_ENTRY_LOWPC)
- {
- struct minimal_symbol *m;
-
- m = lookup_minimal_symbol_by_pc (objfile->ei.entry_point);
- if (m && DEPRECATED_SYMBOL_NAME (m + 1))
- {
- objfile->ei.deprecated_entry_file_lowpc = SYMBOL_VALUE_ADDRESS (m);
- objfile->ei.deprecated_entry_file_highpc = SYMBOL_VALUE_ADDRESS (m + 1);
- }
- }
-
do_cleanups (back_to);
}
@@ -256,10 +234,10 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
|| si.got_sect == NULL)
return;
- sym_secsize = bfd_get_section_size_before_reloc (si.sym_sect);
- str_secsize = bfd_get_section_size_before_reloc (si.str_sect);
- dyninfo_secsize = bfd_get_section_size_before_reloc (si.dyninfo_sect);
- got_secsize = bfd_get_section_size_before_reloc (si.got_sect);
+ sym_secsize = bfd_get_section_size (si.sym_sect);
+ str_secsize = bfd_get_section_size (si.str_sect);
+ dyninfo_secsize = bfd_get_section_size (si.dyninfo_sect);
+ got_secsize = bfd_get_section_size (si.got_sect);
sym_secptr = xmalloc (sym_secsize);
cleanups = make_cleanup (free, sym_secptr);
str_secptr = xmalloc (str_secsize);
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 3a3e7327ef5..53e286a9d78 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -51,24 +51,26 @@ supply_gregset (gregset_t *gregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi <= CXT_RA; regi++)
- supply_register (regi, (char *) (regp + regi));
+ regcache_raw_supply (current_regcache, regi, (char *) (regp + regi));
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *) (regp + CXT_EPC));
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *) (regp + CXT_MDHI));
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *) (regp + CXT_MDLO));
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *) (regp + CXT_CAUSE));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CXT_EPC));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CXT_MDHI));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CXT_MDLO));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CXT_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (PS_REGNUM, zerobuf);
- supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, PS_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->badvaddr,
+ zerobuf);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi <= LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
void
@@ -110,15 +112,18 @@ supply_fpregset (fpregset_t *fpregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (mips_regnum (current_gdbarch)->fp0 + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp0 + regi,
+ (char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *) &fpregsetp->fp_csr);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
@@ -134,7 +139,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - mips_regnum (current_gdbarch)->fp0]);
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, register_size (current_gdbarch, regi));
}
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 5e3a5f82bd3..e9b72005557 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -122,23 +122,63 @@ mn10300_saved_pc_after_call (struct frame_info *fi)
}
static void
-mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *valbuf)
{
+ char buf[MAX_REGISTER_SIZE];
+ int len = TYPE_LENGTH (type);
+ int reg, regsz;
+
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (4), TYPE_LENGTH (type));
+ reg = 4;
+ else
+ reg = 0;
+
+ regsz = register_size (gdbarch, reg);
+ if (len <= regsz)
+ {
+ regcache_raw_read (regcache, reg, buf);
+ memcpy (valbuf, buf, len);
+ }
+ else if (len <= 2 * regsz)
+ {
+ regcache_raw_read (regcache, reg, buf);
+ memcpy (valbuf, buf, regsz);
+ gdb_assert (regsz == register_size (gdbarch, reg + 1));
+ regcache_raw_read (regcache, reg + 1, buf);
+ memcpy ((char *) valbuf + regsz, buf, len - regsz);
+ }
else
- memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (0), TYPE_LENGTH (type));
+ internal_error (__FILE__, __LINE__,
+ "Cannot extract return value %d bytes long.", len);
}
static void
-mn10300_store_return_value (struct type *type, char *valbuf)
+mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, const void *valbuf)
{
+ int len = TYPE_LENGTH (type);
+ int reg, regsz;
+
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (4), valbuf,
- TYPE_LENGTH (type));
+ reg = 4;
else
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (0), valbuf,
- TYPE_LENGTH (type));
+ reg = 0;
+
+ regsz = register_size (gdbarch, reg);
+
+ if (len <= regsz)
+ regcache_raw_write_part (regcache, reg, 0, len, valbuf);
+ else if (len <= 2 * regsz)
+ {
+ regcache_raw_write (regcache, reg, valbuf);
+ gdb_assert (regsz == register_size (gdbarch, reg + 1));
+ regcache_raw_write_part (regcache, reg+1, 0,
+ len - regsz, (char *) valbuf + regsz);
+ }
+ else
+ internal_error (__FILE__, __LINE__,
+ "Cannot store return value %d bytes long.", len);
}
static struct frame_info *analyze_dummy_frame (CORE_ADDR, CORE_ADDR);
@@ -164,12 +204,111 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
#define MY_FRAME_IN_FP 0x2
#define NO_MORE_FRAMES 0x4
+/* Compute the alignment required by a type. */
+
+static int
+mn10300_type_align (struct type *type)
+{
+ int i, align = 1;
+
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_SET:
+ case TYPE_CODE_RANGE:
+ case TYPE_CODE_CHAR:
+ case TYPE_CODE_BOOL:
+ case TYPE_CODE_FLT:
+ case TYPE_CODE_PTR:
+ case TYPE_CODE_REF:
+ return TYPE_LENGTH (type);
+
+ case TYPE_CODE_COMPLEX:
+ return TYPE_LENGTH (type) / 2;
+
+ case TYPE_CODE_STRUCT:
+ case TYPE_CODE_UNION:
+ for (i = 0; i < TYPE_NFIELDS (type); i++)
+ {
+ int falign = mn10300_type_align (TYPE_FIELD_TYPE (type, i));
+ while (align < falign)
+ align <<= 1;
+ }
+ return align;
+
+ case TYPE_CODE_ARRAY:
+ /* HACK! Structures containing arrays, even small ones, are not
+ elligible for returning in registers. */
+ return 256;
+
+ case TYPE_CODE_TYPEDEF:
+ return mn10300_type_align (check_typedef (type));
+
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
+ }
+}
/* Should call_function allocate stack space for a struct return? */
static int
-mn10300_use_struct_convention (int gcc_p, struct type *type)
+mn10300_use_struct_convention (struct type *type)
+{
+ /* Structures bigger than a pair of words can't be returned in
+ registers. */
+ if (TYPE_LENGTH (type) > 8)
+ return 1;
+
+ switch (TYPE_CODE (type))
+ {
+ case TYPE_CODE_STRUCT:
+ case TYPE_CODE_UNION:
+ /* Structures with a single field are handled as the field
+ itself. */
+ if (TYPE_NFIELDS (type) == 1)
+ return mn10300_use_struct_convention (TYPE_FIELD_TYPE (type, 0));
+
+ /* Structures with word or double-word size are passed in memory, as
+ long as they require at least word alignment. */
+ if (mn10300_type_align (type) >= 4)
+ return 0;
+
+ return 1;
+
+ /* Arrays are addressable, so they're never returned in
+ registers. This condition can only hold when the array is
+ the only field of a struct or union. */
+ case TYPE_CODE_ARRAY:
+ return 1;
+
+ case TYPE_CODE_TYPEDEF:
+ return mn10300_use_struct_convention (check_typedef (type));
+
+ default:
+ return 0;
+ }
+}
+
+/* Determine, for architecture GDBARCH, how a return value of TYPE
+ should be returned. If it is supposed to be returned in registers,
+ and READBUF is non-zero, read the appropriate value from REGCACHE,
+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
+ from WRITEBUF into REGCACHE. */
+
+static enum return_value_convention
+mn10300_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
+ if (mn10300_use_struct_convention (type))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ if (readbuf)
+ mn10300_extract_return_value (gdbarch, type, regcache, readbuf);
+ if (writebuf)
+ mn10300_store_return_value (gdbarch, type, regcache, writebuf);
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
/* The breakpoint instruction must be the same size as the smallest
@@ -418,7 +557,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* Get the next two bytes into buf, we need two because rets is a two
byte insn and the first isn't enough to uniquely identify it. */
- status = read_memory_nobpt (pc, buf, 2);
+ status = deprecated_read_memory_nobpt (pc, buf, 2);
if (status != 0)
return pc;
@@ -457,8 +596,8 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
addr = func_addr;
/* Suck in two bytes. */
- status = read_memory_nobpt (addr, buf, 2);
- if (status != 0)
+ if (addr + 2 >= stop
+ || (status = deprecated_read_memory_nobpt (addr, buf, 2)) != 0)
{
fix_frame_pointer (fi, 0);
return addr;
@@ -482,7 +621,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
if (buf[0] == 0xcf)
{
/* Extract the register list for the movm instruction. */
- status = read_memory_nobpt (addr + 1, buf, 1);
+ status = deprecated_read_memory_nobpt (addr + 1, buf, 1);
movm_args = *buf;
addr += 2;
@@ -500,7 +639,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
}
/* Get the next two bytes so the prologue scan can continue. */
- status = read_memory_nobpt (addr, buf, 2);
+ status = deprecated_read_memory_nobpt (addr, buf, 2);
if (status != 0)
{
/* Fix fi->frame since it's bogus at this point. */
@@ -537,7 +676,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
}
/* Get two more bytes so scanning can continue. */
- status = read_memory_nobpt (addr, buf, 2);
+ status = deprecated_read_memory_nobpt (addr, buf, 2);
if (status != 0)
{
/* Fix fi->frame if it's bogus at this point. */
@@ -559,7 +698,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
If none of the above was found, then this prologue has no
additional stack. */
- status = read_memory_nobpt (addr, buf, 2);
+ status = deprecated_read_memory_nobpt (addr, buf, 2);
if (status != 0)
{
/* Fix fi->frame if it's bogus at this point. */
@@ -582,7 +721,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
{
/* Suck in imm_size more bytes, they'll hold the size of the
current frame. */
- status = read_memory_nobpt (addr + 2, buf, imm_size);
+ status = deprecated_read_memory_nobpt (addr + 2, buf, imm_size);
if (status != 0)
{
/* Fix fi->frame if it's bogus at this point. */
@@ -733,14 +872,13 @@ mn10300_pop_frame_regular (struct frame_info *frame)
ULONGEST value;
value = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ register_size (current_gdbarch, regnum));
write_register (regnum, value);
}
- /* Actually cut back the stack. */
- write_register (SP_REGNUM, get_frame_base (frame));
-
- /* Don't we need to set the PC?!? XXX FIXME. */
+ /* Actually cut back the stack, adjusted by the saved registers like
+ ret would. */
+ write_register (SP_REGNUM, get_frame_base (frame) + saved_regs_size (frame));
}
/* Function: pop_frame
@@ -1026,8 +1164,8 @@ mn10300_print_register (const char *name, int regnum, int reg_width)
int byte;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- for (byte = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
- byte < DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ for (byte = register_size (current_gdbarch, regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
+ byte < register_size (current_gdbarch, regnum);
byte++)
printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
}
@@ -1111,7 +1249,6 @@ static struct gdbarch *
mn10300_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches)
{
- static LONGEST mn10300_call_dummy_words[] = { 0 };
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep = NULL;
int am33_mode;
@@ -1153,11 +1290,8 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_num_regs (gdbarch, num_regs);
set_gdbarch_register_name (gdbarch, register_name);
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_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_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);
@@ -1177,8 +1311,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs);
set_gdbarch_deprecated_frame_chain (gdbarch, mn10300_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, mn10300_frame_saved_pc);
- set_gdbarch_deprecated_extract_return_value (gdbarch, mn10300_extract_return_value);
- set_gdbarch_deprecated_store_return_value (gdbarch, mn10300_store_return_value);
+ set_gdbarch_return_value (gdbarch, mn10300_return_value);
set_gdbarch_deprecated_store_struct_return (gdbarch, mn10300_store_struct_return);
set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame);
set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
@@ -1186,14 +1319,10 @@ mn10300_gdbarch_init (struct gdbarch_info info,
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);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mn10300_call_dummy_words));
set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mn10300_reg_struct_has_addr);
set_gdbarch_deprecated_push_return_address (gdbarch, mn10300_push_return_address);
- set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention);
tdep->am33_mode = am33_mode;
diff --git a/gdb/monitor.c b/gdb/monitor.c
index cd4f045375e..0fb44a1100e 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -153,7 +153,7 @@ static void monitor_debug (const char *fmt, ...) ATTR_FORMAT(printf, 1, 2);
static int monitor_debug_p = 0;
/* NOTE: This file alternates between monitor_debug_p and remote_debug
- when determining if debug information is printed. Perhaphs this
+ when determining if debug information is printed. Perhaps this
could be simplified. */
static void
@@ -921,9 +921,9 @@ monitor_supply_register (int regno, char *valstr)
/* supply register stores in target byte order, so swap here */
- store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
+ store_unsigned_integer (regbuf, register_size (current_gdbarch, regno), val);
- supply_register (regno, regbuf);
+ regcache_raw_supply (current_regcache, regno, regbuf);
return p;
}
@@ -1184,7 +1184,7 @@ monitor_fetch_register (int regno)
if (!name || (*name == '\0'))
{
monitor_debug ("No register known for %d\n", regno);
- supply_register (regno, zerobuf);
+ regcache_raw_supply (current_regcache, regno, zerobuf);
return;
}
@@ -1227,7 +1227,7 @@ monitor_fetch_register (int regno)
spaces, but stop reading if something else is seen. Some monitors
like to drop leading zeros. */
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno) * 2; i++)
+ for (i = 0; i < register_size (current_gdbarch, regno) * 2; i++)
{
int c;
c = readchar (timeout);
@@ -1344,7 +1344,7 @@ monitor_store_register (int regno)
val = read_register (regno);
monitor_debug ("MON storeg %d %s\n", regno,
- phex (val, DEPRECATED_REGISTER_RAW_SIZE (regno)));
+ phex (val, register_size (current_gdbarch, regno)));
/* send the register deposit command */
@@ -2011,7 +2011,8 @@ monitor_kill (void)
the program at that point. */
static void
-monitor_create_inferior (char *exec_file, char *args, char **env)
+monitor_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
if (args && (*args != '\000'))
error ("Args are not supported by the monitor.");
@@ -2293,14 +2294,15 @@ void
_initialize_remote_monitors (void)
{
init_base_monitor_ops ();
- add_show_from_set (add_set_cmd ("hash", no_class, var_boolean,
- (char *) &hashmark,
- "Set display of activity while downloading a file.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("hash", no_class, var_boolean,
+ (char *) &hashmark,
+ "Set display of activity while downloading a file.\n\
When enabled, a hashmark \'#\' is displayed.",
- &setlist),
- &showlist);
+ &setlist),
+ &showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("monitor", no_class, var_zinteger,
(char *) &monitor_debug_p,
"Set debugging of remote monitor communication.\n\
diff --git a/gdb/nlm/Makefile.in b/gdb/nlm/Makefile.in
index 6b3cf8c9ddf..a3fd1513d0d 100644
--- a/gdb/nlm/Makefile.in
+++ b/gdb/nlm/Makefile.in
@@ -130,7 +130,7 @@ gdbserve.O: prelude.o gdbserve.o $(TDEPFILES)
# specific routine gets the one for the correct machine.
# The xyzzy stuff below deals with empty DEPFILES
TAGS: ${TAGFILES}
- etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
+ etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
`find ${srcdir}/../config -name ${XM_FILE} -print` \
`find ${srcdir}/../config -name ${NAT_FILE} -print` \
`for i in yzzy ${DEPFILES}; do \
diff --git a/gdb/nlmread.c b/gdb/nlmread.c
index 4e9c87d3ff0..b2a6a35a2f6 100644
--- a/gdb/nlmread.c
+++ b/gdb/nlmread.c
@@ -177,7 +177,6 @@ nlm_symfile_read (struct objfile *objfile, int mainline)
bfd *abfd = objfile->obfd;
struct cleanup *back_to;
CORE_ADDR offset;
- struct symbol *mainsym;
init_minimal_symbol_collection ();
back_to = make_cleanup_discard_minimal_symbols ();
@@ -199,16 +198,6 @@ nlm_symfile_read (struct objfile *objfile, int mainline)
stabsect_build_psymtabs (objfile, mainline, ".stab",
".stabstr", ".text");
-
- mainsym = lookup_symbol (main_name (), NULL, VAR_DOMAIN, NULL, NULL);
-
- if (mainsym
- && SYMBOL_CLASS (mainsym) == LOC_BLOCK)
- {
- objfile->ei.main_func_lowpc = BLOCK_START (SYMBOL_BLOCK_VALUE (mainsym));
- objfile->ei.main_func_highpc = BLOCK_END (SYMBOL_BLOCK_VALUE (mainsym));
- }
-
/* FIXME: We could locate and read the optional native debugging format
here and add the symbols to the minimal symbol table. */
}
@@ -224,7 +213,7 @@ nlm_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- xmfree (objfile->md, objfile->sym_private);
+ xfree (objfile->sym_private);
}
}
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 95475a894ca..8813cb2f58c 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -399,22 +399,6 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
}
static void
-ns32k_push_dummy_frame (void)
-{
- CORE_ADDR sp = read_register (SP_REGNUM);
- int regnum;
-
- sp = push_word (sp, read_register (PC_REGNUM));
- sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM));
- write_register (DEPRECATED_FP_REGNUM, sp);
-
- for (regnum = 0; regnum < 8; regnum++)
- sp = push_word (sp, read_register (regnum));
-
- write_register (SP_REGNUM, sp);
-}
-
-static void
ns32k_pop_frame (void)
{
struct frame_info *frame = get_current_frame ();
@@ -434,42 +418,34 @@ ns32k_pop_frame (void)
write_register (SP_REGNUM, fp + 8);
flush_cached_frames ();
}
-
-/* The NS32000 call dummy sequence:
-
- enter 0xff,0 82 ff 00
- jsr @0x00010203 7f ae c0 01 02 03
- adjspd 0x69696969 7f a5 01 02 03 04
- bpt f2
- It is 16 bytes long. */
-
-static LONGEST ns32k_call_dummy_words[] =
-{
- 0x7f00ff82,
- 0x0201c0ae,
- 0x01a57f03,
- 0xf2040302
-};
-static int sizeof_ns32k_call_dummy_words = sizeof (ns32k_call_dummy_words);
-
-#define NS32K_CALL_DUMMY_ADDR 5
-#define NS32K_CALL_DUMMY_NARGS 11
-
-static void
-ns32k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
+static CORE_ADDR
+ns32k_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
- int flipped;
-
- flipped = fun | 0xc0000000;
- flip_bytes (&flipped, 4);
- store_unsigned_integer (dummy + NS32K_CALL_DUMMY_ADDR, 4, flipped);
+ /* ASSERT ( !struct_return); */
+ int i;
+ for (i = nargs - 1; i >= 0; i--)
+ {
+ struct value *arg = args[i];
+ int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
+ int container_len = len;
+ int offset;
+
+ /* Are we going to put it at the high or low end of the
+ container? */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ offset = container_len - len;
+ else
+ offset = 0;
- flipped = - nargs * 4;
- flip_bytes (&flipped, 4);
- store_unsigned_integer (dummy + NS32K_CALL_DUMMY_NARGS, 4, flipped);
+ /* Stack grows downward. */
+ sp -= container_len;
+ write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len);
+ }
+ return sp;
}
+
static void
ns32k_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
@@ -499,7 +475,6 @@ ns32k_gdbarch_init_32082 (struct gdbarch *gdbarch)
set_gdbarch_num_regs (gdbarch, NS32K_NUM_REGS_32082);
set_gdbarch_register_name (gdbarch, ns32k_register_name_32082);
- set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32082);
set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32082);
}
@@ -509,7 +484,6 @@ ns32k_gdbarch_init_32382 (struct gdbarch *gdbarch)
set_gdbarch_num_regs (gdbarch, NS32K_NUM_REGS_32382);
set_gdbarch_register_name (gdbarch, ns32k_register_name_32382);
- set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32382);
set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32382);
}
@@ -545,10 +519,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_register_size (gdbarch, NS32K_REGISTER_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_deprecated_register_virtual_size (gdbarch, ns32k_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
- NS32K_MAX_REGISTER_VIRTUAL_SIZE);
set_gdbarch_deprecated_register_virtual_type (gdbarch, ns32k_register_virtual_type);
/* Frame and stack info */
@@ -574,16 +545,9 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
/* Call dummy info */
- set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, ns32k_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, ns32k_fix_call_dummy);
- set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 3);
- set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 15);
- set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_deprecated_push_arguments (gdbarch, ns32k_push_arguments);
/* Breakpoint info */
set_gdbarch_breakpoint_from_pc (gdbarch, ns32k_breakpoint_from_pc);
diff --git a/gdb/ns32k-tdep.h b/gdb/ns32k-tdep.h
index c2dc71aab2e..0b6551f4fc5 100644
--- a/gdb/ns32k-tdep.h
+++ b/gdb/ns32k-tdep.h
@@ -50,8 +50,6 @@
+ 8 * 8 /* size of floating point regs */)
#define NS32K_REGISTER_SIZE 4
-#define NS32K_MAX_REGISTER_RAW_SIZE 8
-#define NS32K_MAX_REGISTER_VIRTUAL_SIZE 8
void ns32k_gdbarch_init_32082 (struct gdbarch *);
void ns32k_gdbarch_init_32382 (struct gdbarch *);
diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c
index 2dc7771f345..520dfe4fb79 100644
--- a/gdb/ns32knbsd-nat.c
+++ b/gdb/ns32knbsd-nat.c
@@ -1,6 +1,7 @@
/* Functions specific to running gdb native on an ns32k running NetBSD
- Copyright 1989, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1989, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -44,9 +45,9 @@ fetch_inferior_registers (int regno)
struct fpreg inferior_fpregisters;
ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) & inferior_registers, 0);
ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
+ (PTRACE_TYPE_ARG3) & inferior_fpregisters, 0);
RF (R0_REGNUM + 0, inferior_registers.r_r0);
RF (R0_REGNUM + 1, inferior_registers.r_r1);
@@ -105,9 +106,9 @@ store_inferior_registers (int regno)
RS (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
+ (PTRACE_TYPE_ARG3) & inferior_registers, 0);
ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
+ (PTRACE_TYPE_ARG3) & inferior_fpregisters, 0);
}
@@ -182,7 +183,7 @@ static struct core_fns nat_core_fns =
void
_initialize_ns32knbsd_nat (void)
{
- add_core_fns (&nat_core_fns);
+ deprecated_add_core_fns (&nat_core_fns);
}
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 00b409661e6..910156601a6 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -963,7 +963,8 @@ breakup_args (char *scratch, char **argv)
}
static void
-procfs_create_inferior (char *exec_file, char *allargs, char **env)
+procfs_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct inheritance inherit;
pid_t pid;
@@ -1188,7 +1189,7 @@ procfs_store_registers (int regno)
if (len < 1)
return;
- regcache_collect (regno, (char *) &reg + off);
+ regcache_raw_collect (current_regcache, regno, (char *) &reg + off);
err = devctl (ctl_fd, dev_set, &reg, regsize, 0);
if (err != EOK)
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 056b93f5b1a..50b4fc57629 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -1,6 +1,6 @@
/* nto-tdep.c - general QNX Neutrino target functionality.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
@@ -115,7 +115,7 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
sprintf (buf, path_fmt, arch_path, arch_path, arch_path, arch_path,
arch_path);
- return openp (buf, 1, solib, o_flags, 0, temp_pathname);
+ return openp (buf, OPF_TRY_CWD_FIRST, solib, o_flags, 0, temp_pathname);
}
void
@@ -306,12 +306,15 @@ static struct core_fns regset_core_fns = {
void
_initialize_nto_tdep (void)
{
- add_setshow_cmd ("nto-debug", class_maintenance, var_zinteger,
- &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
+ add_setshow_zinteger_cmd ("nto-debug", class_maintenance,
+ &nto_internal_debugging, "\
+Set QNX NTO internal debugging.", "\
+Show QNX NTO internal debugging.", "\
When non-zero, nto specific debug info is\n\
displayed. Different information is displayed\n\
-for different positive values.", "Show QNX NTO internal debugging.\n",
- NULL, NULL, &setdebuglist, &showdebuglist);
+for different positive values.", "\
+QNX NTO internal debugging is %s.",
+ NULL, NULL, &setdebuglist, &showdebuglist);
/* We use SIG45 for pulses, or something, so nostop, noprint
and pass them. */
@@ -333,5 +336,5 @@ for different positive values.", "Show QNX NTO internal debugging.\n",
#endif
/* Register core file support. */
- add_core_fns (&regset_core_fns);
+ deprecated_add_core_fns (&regset_core_fns);
}
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index f56f68d7a07..34896c5cd05 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -1766,8 +1766,11 @@ yylex ()
#endif /* not 0 */
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
+ return TYPENAME;
/* See if it's an ObjC classname. */
if (!sym)
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 5c184f35d7a..14c71bc1819 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -659,9 +659,11 @@ const struct language_defn objc_language_defn = {
range_check_off,
type_check_off,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
objc_parse,
objc_error,
+ null_post_parser,
objc_printchar, /* Print a character constant */
objc_printstr, /* Function to print string constant */
objc_emit_char,
@@ -674,15 +676,13 @@ const struct language_defn objc_language_defn = {
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
objc_demangle, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
objc_op_print_tab, /* Expression operators for printing */
1, /* C-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
default_word_break_characters,
+ NULL, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 61790778d18..69f61d48688 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -180,7 +180,7 @@ allocate_objfile (bfd *abfd, int flags)
objfile->obfd = abfd;
if (objfile->name != NULL)
{
- xmfree (objfile->md, objfile->name);
+ xfree (objfile->name);
}
if (abfd != NULL)
{
@@ -250,12 +250,6 @@ init_entry_point_info (struct objfile *objfile)
/* Examination of non-executable.o files. Short-circuit this stuff. */
objfile->ei.entry_point = INVALID_ENTRY_POINT;
}
- objfile->ei.deprecated_entry_file_lowpc = INVALID_ENTRY_LOWPC;
- objfile->ei.deprecated_entry_file_highpc = INVALID_ENTRY_HIGHPC;
- objfile->ei.entry_func_lowpc = INVALID_ENTRY_LOWPC;
- objfile->ei.entry_func_highpc = INVALID_ENTRY_HIGHPC;
- objfile->ei.main_func_lowpc = INVALID_ENTRY_LOWPC;
- objfile->ei.main_func_highpc = INVALID_ENTRY_HIGHPC;
}
/* Get current entry point address. */
@@ -447,19 +441,19 @@ free_objfile (struct objfile *objfile)
objfile_free_data (objfile);
if (objfile->name != NULL)
{
- xmfree (objfile->md, objfile->name);
+ xfree (objfile->name);
}
if (objfile->global_psymbols.list)
- xmfree (objfile->md, objfile->global_psymbols.list);
+ xfree (objfile->global_psymbols.list);
if (objfile->static_psymbols.list)
- xmfree (objfile->md, objfile->static_psymbols.list);
+ xfree (objfile->static_psymbols.list);
/* Free the obstacks for non-reusable objfiles */
bcache_xfree (objfile->psymbol_cache);
bcache_xfree (objfile->macro_cache);
if (objfile->demangled_names_hash)
htab_delete (objfile->demangled_names_hash);
obstack_free (&objfile->objfile_obstack, 0);
- xmfree (objfile->md, objfile);
+ xfree (objfile);
objfile = NULL;
}
@@ -651,24 +645,6 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
}
}
- if (objfile->ei.entry_func_lowpc != INVALID_ENTRY_LOWPC)
- {
- objfile->ei.entry_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- objfile->ei.entry_func_highpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- }
-
- if (objfile->ei.deprecated_entry_file_lowpc != INVALID_ENTRY_LOWPC)
- {
- objfile->ei.deprecated_entry_file_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- objfile->ei.deprecated_entry_file_highpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- }
-
- if (objfile->ei.main_func_lowpc != INVALID_ENTRY_LOWPC)
- {
- objfile->ei.main_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- objfile->ei.main_func_highpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- }
-
/* Relocate breakpoints as necessary, after things are relocated. */
breakpoint_re_set ();
}
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 2b8ca7d350f..afbe8d26d38 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -44,9 +44,8 @@ struct objfile_data;
to the user executable's recorded entry point, as if the call had been made
directly by the kernel.
- The traditional gdb method of using this info is to use the
- recorded entry point to set the variables
- deprecated_entry_file_lowpc and deprecated_entry_file_highpc from
+ The traditional gdb method of using this info was to use the
+ recorded entry point to set the entry-file's lowpc and highpc from
the debugging information, where these values are the starting
address (inclusive) and ending address (exclusive) of the
instruction space in the executable which correspond to the
@@ -57,7 +56,7 @@ struct objfile_data;
NOTE: cagney/2003-09-09: It turns out that this "traditional"
method doesn't work. Corinna writes: ``It turns out that the call
- to deprecated_inside_entry_file destroys a meaningful backtrace
+ to test for "inside entry file" destroys a meaningful backtrace
under some conditions. E. g. the backtrace tests in the asm-source
testcase are broken for some targets. In this test the functions
are all implemented as part of one file and the testcase is not
@@ -111,32 +110,6 @@ struct entry_info
#define INVALID_ENTRY_POINT (~0) /* ~0 will not be in any file, we hope. */
- /* Start (inclusive) and end (exclusive) of function containing the
- entry point. */
-
- CORE_ADDR entry_func_lowpc;
- CORE_ADDR entry_func_highpc;
-
- /* Start (inclusive) and end (exclusive) of object file containing the
- entry point. */
-
- CORE_ADDR deprecated_entry_file_lowpc;
- CORE_ADDR deprecated_entry_file_highpc;
-
- /* Start (inclusive) and end (exclusive) of the user code main() function. */
-
- CORE_ADDR main_func_lowpc;
- CORE_ADDR main_func_highpc;
-
-/* Use these values when any of the above ranges is invalid. */
-
-/* We use these values because it guarantees that there is no number that is
- both >= LOWPC && < HIGHPC. It is also highly unlikely that 3 is a valid
- module or function start address (as opposed to 0). */
-
-#define INVALID_ENTRY_LOWPC (3)
-#define INVALID_ENTRY_HIGHPC (1)
-
};
/* Sections in an objfile.
diff --git a/gdb/observer.c b/gdb/observer.c
index fce5f9287d8..48514b80aaf 100644
--- a/gdb/observer.c
+++ b/gdb/observer.c
@@ -1,5 +1,6 @@
/* GDB Notifications to Observers.
- Copyright 2003 Free Software Foundation, Inc.
+
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -52,6 +53,10 @@
#include "defs.h"
#include "observer.h"
+#include "command.h"
+#include "gdbcmd.h"
+
+static int observer_debug;
/* The internal generic observer. */
@@ -159,37 +164,6 @@ generic_observer_notify (struct observer_list *subject, const void *args)
}
}
-/* normal_stop notifications. */
-
-static struct observer_list *normal_stop_subject = NULL;
-
-static void
-observer_normal_stop_notification_stub (const void *data,
- const void *unused_args)
-{
- observer_normal_stop_ftype *notify = (observer_normal_stop_ftype *) data;
- (*notify) ();
-}
-
-struct observer *
-observer_attach_normal_stop (observer_normal_stop_ftype *f)
-{
- return generic_observer_attach (&normal_stop_subject,
- &observer_normal_stop_notification_stub,
- (void *) f);
-}
-
-void
-observer_detach_normal_stop (struct observer *observer)
-{
- generic_observer_detach (&normal_stop_subject, observer);
-}
-
-void
-observer_notify_normal_stop (void)
-{
- generic_observer_notify (normal_stop_subject, NULL);
-}
/* The following code is only used to unit-test the observers from our
testsuite. DO NOT USE IT within observer.c (or anywhere else for
@@ -203,20 +177,35 @@ int observer_test_second_observer = 0;
int observer_test_third_observer = 0;
void
-observer_test_first_notification_function (void)
+observer_test_first_notification_function (struct bpstats *bs)
{
observer_test_first_observer++;
}
void
-observer_test_second_notification_function (void)
+observer_test_second_notification_function (struct bpstats *bs)
{
observer_test_second_observer++;
}
void
-observer_test_third_notification_function (void)
+observer_test_third_notification_function (struct bpstats *bs)
{
observer_test_third_observer++;
}
+extern initialize_file_ftype _initialize_observer; /* -Wmissing-prototypes */
+
+void
+_initialize_observer (void)
+{
+ add_setshow_zinteger_cmd ("observer", class_maintenance, &observer_debug, "\
+Set observer debugging.", "\
+Show observer debugging.", "\
+When non-zero, observer debugging is enabled.", "\
+Observer debugging is %s.",
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
+}
+
+#include "observer.inc"
diff --git a/gdb/observer.h b/gdb/observer.h
deleted file mode 100644
index 8b9a6db5607..00000000000
--- a/gdb/observer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* GDB Notifications to Observers.
- 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 OBSERVER_H
-#define OBSERVER_H
-
-struct observer;
-
-/* normal_stop notifications. */
-
-typedef void (observer_normal_stop_ftype) (void);
-
-extern struct observer *
- observer_attach_normal_stop (observer_normal_stop_ftype *f);
-extern void observer_detach_normal_stop (struct observer *observer);
-extern void observer_notify_normal_stop (void);
-
-#endif /* OBSERVER_H */
diff --git a/gdb/observer.sh b/gdb/observer.sh
new file mode 100755
index 00000000000..b23f15e044a
--- /dev/null
+++ b/gdb/observer.sh
@@ -0,0 +1,157 @@
+#!/bin/sh -e
+
+if test $# -ne 3
+then
+ echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2
+ exit 0
+fi
+
+lang=$1 ; shift
+texi=$1 ; shift
+o=$1 ; shift
+echo "Creating ${o}-tmp" 1>&2
+rm -f ${o}-tmp
+
+# Can use any of the following: cat cmp cp diff echo egrep expr false
+# grep install-info ln ls mkdir mv pwd rm rmdir sed sleep sort tar
+# test touch true
+
+cat <<EOF >>${o}-tmp
+/* GDB Notifications to Observers.
+
+ Copyright 2004 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.
+
+ --
+
+ This file was generated using observer.sh and observer.texi. */
+
+EOF
+
+
+case $lang in
+ h) cat <<EOF >>${o}-tmp
+#ifndef OBSERVER_H
+#define OBSERVER_H
+
+struct observer;
+struct bpstats;
+struct so_list;
+EOF
+ ;;
+esac
+
+
+# generate a list of events that can be observed
+
+IFS=:
+sed -n '
+/@deftypefun void/{
+# Save original line for later processing into the actual parameter
+ h
+# Convert from: @deftypefun void EVENT (TYPE @var{PARAM},...)
+# to event and formals: EVENT:TYPE PARAM, ...:
+ s/^.* void \([a-z_][a-z_]*\) (\(.*\))$/\1:\2/
+ s/@var{//g
+ s/}//g
+# Switch to held
+ x
+# Convert from: @deftypefun void FUNC (TYPE @var{PARAM},...)
+# to actuals: PARAM, ...
+ s/^[^{]*[{]*//
+ s/[}]*[^}]*$//
+ s/}[^{]*{/, /g
+# Combine held (EVENT:TYPE PARAM, ...:) and pattern (PARAM, ...) into
+# FUNC:TYPE PARAM, ...:PARAM, ...
+ H
+ x
+ s/\n/:/g
+ p
+}
+' $texi | while read event formal actual
+do
+ case $lang in
+ h) cat <<EOF >>${o}-tmp
+
+/* ${event} notifications. */
+
+typedef void (observer_${event}_ftype) (${formal});
+
+extern struct observer *observer_attach_${event} (observer_${event}_ftype *f);
+extern void observer_detach_${event} (struct observer *observer);
+extern void observer_notify_${event} (${formal});
+EOF
+ ;;
+
+ inc)
+ cat <<EOF >>${o}-tmp
+
+/* ${event} notifications. */
+
+static struct observer_list *${event}_subject = NULL;
+
+struct ${event}_args { `echo "${formal}" | sed -e 's/,/;/g'`; };
+
+static void
+observer_${event}_notification_stub (const void *data, const void *args_data)
+{
+ observer_${event}_ftype *notify = (observer_${event}_ftype *) data;
+ const struct ${event}_args *args = args_data;
+ notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`);
+}
+
+struct observer *
+observer_attach_${event} (observer_${event}_ftype *f)
+{
+ return generic_observer_attach (&${event}_subject,
+ &observer_${event}_notification_stub,
+ (void *) f);
+}
+
+void
+observer_detach_${event} (struct observer *observer)
+{
+ generic_observer_detach (&${event}_subject, observer);
+}
+
+void
+observer_notify_${event} (${formal})
+{
+ struct ${event}_args args;
+ `echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args.\1 = \1/g'`;
+ if (observer_debug)
+ fprintf_unfiltered (gdb_stdlog, "observer_notify_${event}() called\n");
+ generic_observer_notify (${event}_subject, &args);
+}
+EOF
+ ;;
+ esac
+done
+
+
+case $lang in
+ h) cat <<EOF >>${o}-tmp
+
+#endif /* OBSERVER_H */
+EOF
+esac
+
+
+echo Moving ${o}-tmp to ${o}
+mv ${o}-tmp ${o}
diff --git a/gdb/ocd.c b/gdb/ocd.c
index c53db89f530..dffc176688a 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -225,7 +225,7 @@ ocd_start_remote (void *dummy)
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- print_stack_frame (get_selected_frame (), -1, 1);
+ print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
buf[0] = OCD_LOG_FILE;
buf[1] = 3; /* close existing WIGGLERS.LOG */
@@ -1014,7 +1014,7 @@ ocd_mourn (void)
the program at that point. */
void
-ocd_create_inferior (char *exec_file, char *args, char **env)
+ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
if (args && (*args != '\000'))
error ("Args are not supported by BDM.");
@@ -1155,10 +1155,11 @@ _initialize_remote_ocd (void)
extern struct cmd_list_element *cmdlist;
static struct cmd_list_element *ocd_cmd_list = NULL;
- add_show_from_set (add_set_cmd ("remotetimeout", no_class,
- var_integer, (char *) &remote_timeout,
- "Set timeout value for remote read.\n", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotetimeout", no_class,
+ var_integer, (char *) &remote_timeout,
+ "Set timeout value for remote read.\n", &setlist),
+ &showlist);
add_prefix_cmd ("ocd", class_obscure, bdm_command, "", &ocd_cmd_list, "ocd ",
0, &cmdlist);
diff --git a/gdb/ocd.h b/gdb/ocd.h
index 64d695a00c5..cf93762752b 100644
--- a/gdb/ocd.h
+++ b/gdb/ocd.h
@@ -112,7 +112,8 @@ int ocd_xfer_memory (CORE_ADDR memaddr, char *myaddr,
void ocd_mourn (void);
-void ocd_create_inferior (char *exec_file, char *args, char **env);
+void ocd_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty);
int ocd_thread_alive (ptid_t th);
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 3acfc703648..ea84456cc7b 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -1,5 +1,6 @@
/* OS ABI variant handling for GDB.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -501,10 +502,11 @@ generic_elf_osabi_sniffer (bfd *abfd)
switch (elfosabi)
{
case ELFOSABI_NONE:
- /* When elfosabi is ELFOSABI_NONE (0), then the ELF structures in the
- file are conforming to the base specification for that machine
- (there are no OS-specific extensions). In order to determine the
- real OS in use we must look for OS notes that have been added. */
+ /* When the EI_OSABI field in the ELF header is ELFOSABI_NONE
+ (0), then the ELF structures in the file are conforming to
+ the base specification for that machine (there are no
+ OS-specific extensions). In order to determine the real OS
+ in use we must look for OS-specific notes. */
bfd_map_over_sections (abfd,
generic_elf_osabi_sniff_abi_tag_sections,
&osabi);
@@ -531,7 +533,14 @@ generic_elf_osabi_sniffer (bfd *abfd)
break;
case ELFOSABI_HPUX:
+ /* For some reason the default value for the EI_OSABI field is
+ ELFOSABI_HPUX for all PA-RISC targets (with the exception of
+ GNU/Linux). We use HP-UX ELF as the default, but let any
+ OS-specific notes override this. */
osabi = GDB_OSABI_HPUX_ELF;
+ bfd_map_over_sections (abfd,
+ generic_elf_osabi_sniff_abi_tag_sections,
+ &osabi);
break;
}
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 779424e90d5..a80f8e9275b 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1611,8 +1611,11 @@ yylex ()
#endif /* not 0 */
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
+ return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
when the input radix permits them, can be names or numbers
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index a4025322ca7..f7c49df7d77 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -451,9 +451,11 @@ const struct language_defn pascal_language_defn =
range_check_on,
type_check_on,
case_sensitive_on,
+ array_row_major,
&exp_descriptor_standard,
pascal_parse,
pascal_error,
+ null_post_parser,
pascal_printchar, /* Print a character constant */
pascal_printstr, /* Function to print string constant */
pascal_emit_char, /* Print a single char */
@@ -466,15 +468,13 @@ const struct language_defn pascal_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "%", "b", ""}, /* Binary format info */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"$%lx", "$", "x", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
pascal_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
default_word_break_characters,
+ NULL, /* FIXME: la_language_arch_info. */
LANG_MAGIC
};
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index eb92f77591c..e24d6566619 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -1102,7 +1102,7 @@ extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototype
void
_initialize_pascal_valprint (void)
{
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("pascal_static-members", class_support, var_boolean,
(char *) &pascal_static_field_print,
"Set printing of pascal static members.",
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 4e29455606f..076d6cbc346 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -52,6 +52,7 @@
#include "language.h"
#include "regcache.h"
#include "exec.h"
+#include "hppa-tdep.h"
#include <fcntl.h>
@@ -156,8 +157,8 @@ pa64_solib_sizeof_symbol_table (char *filename)
/* We believe that filename was handed to us by the dynamic linker, and
is therefore always an absolute path. */
- desc = openp (getenv ("PATH"), 1, filename, O_RDONLY | O_BINARY,
- 0, &absolute_name);
+ desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename,
+ O_RDONLY | O_BINARY, 0, &absolute_name);
if (desc < 0)
{
perror_with_name (filename);
@@ -220,7 +221,7 @@ 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 hppa_objfile_private *obj_private;
struct section_addr_info *section_addrs;
struct cleanup *my_cleanups;
@@ -278,17 +279,18 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
/* Mark this as a shared library and save private data. */
so->objfile->flags |= OBJF_SHARED;
- if (so->objfile->obj_private == NULL)
+ obj_private = (struct hppa_objfile_private *)
+ objfile_data (so->objfile, hppa_objfile_priv_data);
+ if (obj_private == NULL)
{
- obj_private = (obj_private_data_t *)
+ obj_private = (struct hppa_objfile_private *)
obstack_alloc (&so->objfile->objfile_obstack,
- sizeof (obj_private_data_t));
+ sizeof (struct hppa_objfile_private));
+ set_objfile_data (so->objfile, hppa_objfile_priv_data, obj_private);
obj_private->unwind_info = NULL;
obj_private->so_info = NULL;
- so->objfile->obj_private = obj_private;
}
- 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);
@@ -647,7 +649,7 @@ pa64_solib_have_load_event (int pid)
{
CORE_ADDR event_kind;
- event_kind = read_register (ARG0_REGNUM);
+ event_kind = read_register (HPPA_ARG0_REGNUM);
return (event_kind == DLD_CB_LOAD);
}
@@ -658,7 +660,7 @@ pa64_solib_have_unload_event (int pid)
{
CORE_ADDR event_kind;
- event_kind = read_register (ARG0_REGNUM);
+ event_kind = read_register (HPPA_ARG0_REGNUM);
return (event_kind == DLD_CB_UNLOAD);
}
@@ -672,7 +674,7 @@ char *
pa64_solib_loaded_library_pathname (int pid)
{
static char dll_path[MAXPATHLEN];
- CORE_ADDR dll_path_addr = read_register (ARG3_REGNUM);
+ CORE_ADDR dll_path_addr = read_register (HPPA_ARG3_REGNUM);
read_memory_string (dll_path_addr, dll_path, MAXPATHLEN);
return dll_path;
}
@@ -687,7 +689,7 @@ char *
pa64_solib_unloaded_library_pathname (int pid)
{
static char dll_path[MAXPATHLEN];
- CORE_ADDR dll_path_addr = read_register (ARG3_REGNUM);
+ CORE_ADDR dll_path_addr = read_register (HPPA_ARG3_REGNUM);
read_memory_string (dll_path_addr, dll_path, MAXPATHLEN);
return dll_path;
}
@@ -794,23 +796,18 @@ pa64_sharedlibrary_info_command (char *ignore, int from_tty)
if (so_list->loaded == 0)
printf_unfiltered (" (shared library unloaded)");
printf_unfiltered (" %-18s",
- local_hex_string_custom (so_list->pa64_solib_desc.linkage_ptr,
- "016l"));
+ hex_string_custom (so_list->pa64_solib_desc.linkage_ptr, 16));
printf_unfiltered ("\n");
printf_unfiltered ("%-18s",
- local_hex_string_custom (so_list->pa64_solib_desc.text_base,
- "016l"));
+ hex_string_custom (so_list->pa64_solib_desc.text_base, 16));
printf_unfiltered (" %-18s",
- local_hex_string_custom ((so_list->pa64_solib_desc.text_base
- + so_list->pa64_solib_desc.text_size),
- "016l"));
+ hex_string_custom ((so_list->pa64_solib_desc.text_base
+ + so_list->pa64_solib_desc.text_size), 16));
printf_unfiltered (" %-18s",
- local_hex_string_custom (so_list->pa64_solib_desc.data_base,
- "016l"));
+ hex_string_custom (so_list->pa64_solib_desc.data_base, 16));
printf_unfiltered (" %-18s\n",
- local_hex_string_custom ((so_list->pa64_solib_desc.data_base
- + so_list->pa64_solib_desc.data_size),
- "016l"));
+ hex_string_custom ((so_list->pa64_solib_desc.data_base
+ + so_list->pa64_solib_desc.data_size), 16));
so_list = so_list->next;
}
}
@@ -890,7 +887,7 @@ _initialize_pa64_solib (void)
add_info ("sharedlibrary", pa64_sharedlibrary_info_command,
"Status of loaded shared object libraries.");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-add", class_support, var_boolean,
(char *) &auto_solib_add,
"Set autoloading of shared library symbols.\n\
@@ -901,7 +898,7 @@ inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-limit", class_support, var_zinteger,
(char *) &auto_solib_limit,
"Set threshold (in Mb) for autoloading shared library symbols.\n\
diff --git a/gdb/parse.c b/gdb/parse.c
index 374e88ed85d..61d28f70663 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1,6 +1,8 @@
/* Parse expressions for GDB.
- Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+
Modified from expread.y by the Department of Computer Science at the
State University of New York at Buffalo, 1991.
@@ -95,8 +97,6 @@ int comma_terminates;
static int expressiondebug = 0;
-extern int hp_som_som_object_present;
-
static void free_funcalls (void *ignore);
static void prefixify_expression (struct expression *);
@@ -104,6 +104,9 @@ static void prefixify_expression (struct expression *);
static void prefixify_subexp (struct expression *, struct expression *, int,
int);
+static struct expression *parse_exp_in_context (char **, struct block *, int,
+ int);
+
void _initialize_parse (void);
/* Data structure for saving values of arglist_len for function calls whose
@@ -590,7 +593,7 @@ parse_nested_classes_for_hpacc (char *name, int len, char **token,
return NULL, and caller must default to standard GDB
behaviour. */
- if (!hp_som_som_object_present)
+ if (!deprecated_hp_som_som_object_present)
return (struct symbol *) NULL;
p = name;
@@ -1023,6 +1026,16 @@ prefixify_subexp (struct expression *inexpr,
struct expression *
parse_exp_1 (char **stringptr, struct block *block, int comma)
{
+ return parse_exp_in_context (stringptr, block, comma, 0);
+}
+
+/* As for parse_exp_1, except that if VOID_CONTEXT_P, then
+ no value is expected from the expression. */
+
+static struct expression *
+parse_exp_in_context (char **stringptr, struct block *block, int comma,
+ int void_context_p)
+{
struct cleanup *old_chain;
lexptr = *stringptr;
@@ -1078,6 +1091,8 @@ parse_exp_1 (char **stringptr, struct block *block, int comma)
prefixify_expression (expout);
+ current_language->la_post_parser (&expout, void_context_p);
+
if (expressiondebug)
dump_prefix_expression (expout, gdb_stdlog);
@@ -1097,6 +1112,27 @@ parse_expression (char *string)
error ("Junk after end of expression.");
return exp;
}
+
+
+/* As for parse_expression, except that if VOID_CONTEXT_P, then
+ no value is expected from the expression. */
+
+struct expression *
+parse_expression_in_context (char *string, int void_context_p)
+{
+ struct expression *exp;
+ exp = parse_exp_in_context (&string, 0, 0, void_context_p);
+ if (*string != '\000')
+ error ("Junk after end of expression.");
+ return exp;
+}
+
+/* A post-parser that does nothing */
+
+void
+null_post_parser (struct expression **exp, int void_context_p)
+{
+}
/* Stuff for maintaining a stack of types. Currently just used by C, but
probably useful for any language which declares its types "backwards". */
@@ -1298,11 +1334,11 @@ _initialize_parse (void)
DEPRECATED_REGISTER_GDBARCH_SWAP (msym_unknown_symbol_type);
deprecated_register_gdbarch_swap (NULL, 0, build_parse);
- add_show_from_set (
- add_set_cmd ("expression", class_maintenance, var_zinteger,
- (char *) &expressiondebug,
- "Set expression debugging.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("expression", class_maintenance, var_zinteger,
+ (char *) &expressiondebug,
+ "Set expression debugging.\n\
When non-zero, the internal representation of expressions will be printed.",
- &setdebuglist),
- &showdebuglist);
+ &setdebuglist),
+ &showdebuglist);
}
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index c84fcad2c1f..43a07c37466 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -172,6 +172,8 @@ extern char *op_name_standard (enum exp_opcode);
extern struct type *follow_types (struct type *);
+extern void null_post_parser (struct expression **, int);
+
/* During parsing of a C expression, the pointer to the next character
is in this variable. */
diff --git a/gdb/po/gdbtext b/gdb/po/gdbtext
new file mode 100755
index 00000000000..1f80cf9eadb
--- /dev/null
+++ b/gdb/po/gdbtext
@@ -0,0 +1,38 @@
+#!/bin/sh -e
+
+if test $# -lt 3
+then
+ echo "Usage: $0 <xgettext> <package> <directory> ..." 1>&2
+ exit 0
+fi
+
+xgettext=$1 ; shift
+package=$1 ; shift
+
+for d in "$@"
+do
+ __directories="$__directories --directory=$d"
+done
+
+for d in "$@"
+do
+ (
+ cd $d
+ find * \
+ -name '*-stub.c' -prune -o \
+ -name 'testsuite' -prune -o \
+ -name 'init.c' -prune -o \
+ -name '*.[hc]' -print
+ )
+done | ${xgettext} \
+ --default-domain=${package} \
+ --copyright-holder="Free Software Foundation, Inc." \
+ --add-comments \
+ --files-from=- \
+ --force-po \
+ --debug \
+ --language=c \
+ --keyword=_ \
+ --keyword=N_ \
+ ${__directories} \
+ -o po/${package}.pot
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 2355b2c74eb..e7eefca9551 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -37,6 +37,7 @@
#include "ocd.h"
#include "ppc-tdep.h"
#include "regcache.h"
+#include "gdb_assert.h"
static void bdm_ppc_open (char *name, int from_tty);
@@ -153,21 +154,12 @@ static int bdm_regmap[] =
static void
bdm_ppc_fetch_registers (int regno)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- unsigned char *regs, *beginregs, *endregs, *almostregs;
- unsigned char midregs[32];
- unsigned char mqreg[1];
+ unsigned char *regs;
int first_regno, last_regno;
int first_bdm_regno, last_bdm_regno;
- int reglen, beginreglen, endreglen;
-
-#if 1
- for (i = 0; i < (FPLAST_REGNUM - FP0_REGNUM + 1); i++)
- {
- midregs[i] = -1;
- }
- mqreg[0] = -1;
-#endif
+ int reglen;
if (regno == -1)
{
@@ -188,10 +180,16 @@ bdm_ppc_fetch_registers (int regno)
if (first_bdm_regno == -1)
{
- supply_register (first_regno, NULL);
+ regcache_raw_supply (current_regcache, first_regno, NULL);
return; /* Unsupported register */
}
+ /* FIXME: jimb/2004-05-04: I'm not sure how to adapt this code to
+ processors that lack floating point registers, and I don't have
+ have the equipment to test it. So we'll leave that case for the
+ next person who encounters it. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
#if 1
/* Can't ask for floating point regs on ppc 8xx, also need to
avoid asking for the mq register. */
@@ -202,10 +200,11 @@ bdm_ppc_fetch_registers (int regno)
/* if asking for an invalid register */
if ((first_regno == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)
|| (first_regno == gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum)
- || ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM)))
+ || ((first_regno >= tdep->ppc_fp0_regnum)
+ && (first_regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
{
/* printf("invalid reg request!\n"); */
- supply_register (first_regno, NULL);
+ regcache_raw_supply (current_regcache, first_regno, NULL);
return; /* Unsupported register */
}
else
@@ -215,18 +214,9 @@ bdm_ppc_fetch_registers (int regno)
}
}
else
- /* want all regs */
- {
-/* printf("Asking for registers %d to %d\n", first_regno, last_regno); */
- beginregs = ocd_read_bdm_registers (first_bdm_regno,
- FP0_REGNUM - 1, &beginreglen);
- endregs = (strcat (midregs,
- ocd_read_bdm_registers (FPLAST_REGNUM + 1,
- last_bdm_regno - 1, &endreglen)));
- almostregs = (strcat (beginregs, endregs));
- regs = (strcat (almostregs, mqreg));
- reglen = beginreglen + 32 + endreglen + 1;
- }
+ internal_error (__FILE__, __LINE__,
+ "ppc_bdm_fetch_registers: "
+ "'all registers' case not implemented");
#endif
#if 0
@@ -245,10 +235,10 @@ bdm_ppc_fetch_registers (int regno)
if (regoffset >= reglen / 4)
continue;
- supply_register (i, regs + 4 * regoffset);
+ regcache_raw_supply (current_regcache, i, regs + 4 * regoffset);
}
else
- supply_register (i, NULL); /* Unsupported register */
+ regcache_raw_supply (current_regcache, i, NULL); /* Unsupported register */
}
}
@@ -258,6 +248,7 @@ bdm_ppc_fetch_registers (int regno)
static void
bdm_ppc_store_registers (int regno)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
int first_regno, last_regno;
int first_bdm_regno, last_bdm_regno;
@@ -282,6 +273,12 @@ bdm_ppc_store_registers (int regno)
if (first_bdm_regno == -1)
return; /* Unsupported register */
+ /* FIXME: jimb/2004-05-04: I'm not sure how to adapt this code to
+ processors that lack floating point registers, and I don't have
+ have the equipment to test it. So we'll leave that case for the
+ next person who encounters it. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
for (i = first_regno; i <= last_regno; i++)
{
int bdm_regno;
@@ -292,7 +289,8 @@ bdm_ppc_store_registers (int regno)
/* (need to avoid FP regs and MQ reg) */
if ((i != gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)
&& (i != gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum)
- && ((i < FP0_REGNUM) || (i > FPLAST_REGNUM)))
+ && ((i < tdep->ppc_fp0_regnum)
+ || (i >= tdep->ppc_fp0_regnum + ppc_num_fprs)))
{
/* printf("write valid reg %d\n", bdm_regno); */
ocd_write_bdm_registers (bdm_regno, deprecated_registers + DEPRECATED_REGISTER_BYTE (i), 4);
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index a8eb7b6e002..c98bb93f879 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -26,6 +26,7 @@
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
+#include "gdb_assert.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -69,6 +70,16 @@
#define PTRACE_SETVRREGS 19
#endif
+
+/* Similarly for the ptrace requests for getting / setting the SPE
+ registers (ev0 -- ev31, acc, and spefscr). See the description of
+ gdb_evrregset_t for details. */
+#ifndef PTRACE_GETEVRREGS
+#define PTRACE_GETEVRREGS 20
+#define PTRACE_SETEVRREGS 21
+#endif
+
+
/* This oddity is because the Linux kernel defines elf_vrregset_t as
an array of 33 16 bytes long elements. I.e. it leaves out vrsave.
However the PTRACE_GETVRREGS and PTRACE_SETVRREGS requests return
@@ -100,9 +111,47 @@
typedef char gdb_vrregset_t[SIZEOF_VRREGS];
-/* For runtime check of ptrace support for VRREGS. */
+
+/* On PPC processors that support the the Signal Processing Extension
+ (SPE) APU, the general-purpose registers are 64 bits long.
+ However, the ordinary Linux kernel PTRACE_PEEKUSR / PTRACE_POKEUSR
+ / PT_READ_U / PT_WRITE_U ptrace calls only access the lower half of
+ each register, to allow them to behave the same way they do on
+ non-SPE systems. There's a separate pair of calls,
+ PTRACE_GETEVRREGS / PTRACE_SETEVRREGS, that read and write the top
+ halves of all the general-purpose registers at once, along with
+ some SPE-specific registers.
+
+ GDB itself continues to claim the general-purpose registers are 32
+ bits long. It has unnamed raw registers that hold the upper halves
+ of the gprs, and the the full 64-bit SIMD views of the registers,
+ 'ev0' -- 'ev31', are pseudo-registers that splice the top and
+ bottom halves together.
+
+ This is the structure filled in by PTRACE_GETEVRREGS and written to
+ the inferior's registers by PTRACE_SETEVRREGS. */
+struct gdb_evrregset_t
+{
+ unsigned long evr[32];
+ unsigned long long acc;
+ unsigned long spefscr;
+};
+
+
+/* Non-zero if our kernel may support the PTRACE_GETVRREGS and
+ PTRACE_SETVRREGS requests, for reading and writing the Altivec
+ registers. Zero if we've tried one of them and gotten an
+ error. */
int have_ptrace_getvrregs = 1;
+
+/* Non-zero if our kernel may support the PTRACE_GETEVRREGS and
+ PTRACE_SETEVRREGS requests, for reading and writing the SPE
+ registers. Zero if we've tried one of them and gotten an
+ error. */
+int have_ptrace_getsetevrregs = 1;
+
+
int
kernel_u_size (void)
{
@@ -132,14 +181,17 @@ ppc_register_u_addr (int regno)
int wordsize = sizeof (PTRACE_XFER_TYPE);
/* General purpose registers occupy 1 slot each in the buffer */
- if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
- u_addr = ((PT_R0 + regno) * wordsize);
+ if (regno >= tdep->ppc_gp0_regnum
+ && regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
+ u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize);
/* Floating point regs: eight bytes each in both 32- and 64-bit
ptrace interfaces. Thus, two slots each in 32-bit interface, one
slot each in 64-bit interface. */
- if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
- u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8);
+ if (tdep->ppc_fp0_regnum >= 0
+ && regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
+ u_addr = (PT_FPR0 * wordsize) + ((regno - tdep->ppc_fp0_regnum) * 8);
/* UISA special purpose registers: 1 slot each */
if (regno == PC_REGNUM)
@@ -158,7 +210,8 @@ ppc_register_u_addr (int regno)
#endif
if (regno == tdep->ppc_ps_regnum)
u_addr = PT_MSR * wordsize;
- if (regno == tdep->ppc_fpscr_regnum)
+ if (tdep->ppc_fpscr_regnum >= 0
+ && regno == tdep->ppc_fpscr_regnum)
u_addr = PT_FPSCR * wordsize;
return u_addr;
@@ -174,7 +227,7 @@ fetch_altivec_register (int tid, int regno)
int offset = 0;
gdb_vrregset_t regs;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int vrregsize = register_size (current_gdbarch, tdep->ppc_vr0_regnum);
ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
if (ret < 0)
@@ -192,21 +245,93 @@ fetch_altivec_register (int tid, int regno)
vector. VRSAVE is at the end of the array in a 4 bytes slot, so
there is no need to define an offset for it. */
if (regno == (tdep->ppc_vrsave_regnum - 1))
- offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ offset = vrregsize - register_size (current_gdbarch, tdep->ppc_vrsave_regnum);
- supply_register (regno,
- regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
+ regcache_raw_supply (current_regcache, regno,
+ regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
+}
+
+/* Fetch the top 32 bits of TID's general-purpose registers and the
+ SPE-specific registers, and place the results in EVRREGSET. If we
+ don't support PTRACE_GETEVRREGS, then just fill EVRREGSET with
+ zeros.
+
+ All the logic to deal with whether or not the PTRACE_GETEVRREGS and
+ PTRACE_SETEVRREGS requests are supported is isolated here, and in
+ set_spe_registers. */
+static void
+get_spe_registers (int tid, struct gdb_evrregset_t *evrregset)
+{
+ if (have_ptrace_getsetevrregs)
+ {
+ if (ptrace (PTRACE_GETEVRREGS, tid, 0, evrregset) >= 0)
+ return;
+ else
+ {
+ /* EIO means that the PTRACE_GETEVRREGS request isn't supported;
+ we just return zeros. */
+ if (errno == EIO)
+ have_ptrace_getsetevrregs = 0;
+ else
+ /* Anything else needs to be reported. */
+ perror_with_name ("Unable to fetch SPE registers");
+ }
+ }
+
+ memset (evrregset, 0, sizeof (*evrregset));
+}
+
+/* Supply values from TID for SPE-specific raw registers: the upper
+ halves of the GPRs, the accumulator, and the spefscr. REGNO must
+ be the number of an upper half register, acc, spefscr, or -1 to
+ supply the values of all registers. */
+static void
+fetch_spe_register (int tid, int regno)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdb_evrregset_t evrregs;
+
+ gdb_assert (sizeof (evrregs.evr[0])
+ == register_size (current_gdbarch, tdep->ppc_ev0_upper_regnum));
+ gdb_assert (sizeof (evrregs.acc)
+ == register_size (current_gdbarch, tdep->ppc_acc_regnum));
+ gdb_assert (sizeof (evrregs.spefscr)
+ == register_size (current_gdbarch, tdep->ppc_spefscr_regnum));
+
+ get_spe_registers (tid, &evrregs);
+
+ if (regno == -1)
+ {
+ int i;
+
+ for (i = 0; i < ppc_num_gprs; i++)
+ regcache_raw_supply (current_regcache, tdep->ppc_ev0_upper_regnum + i,
+ &evrregs.evr[i]);
+ }
+ else if (tdep->ppc_ev0_upper_regnum <= regno
+ && regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs)
+ regcache_raw_supply (current_regcache, regno,
+ &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
+
+ if (regno == -1
+ || regno == tdep->ppc_acc_regnum)
+ regcache_raw_supply (current_regcache, tdep->ppc_acc_regnum, &evrregs.acc);
+
+ if (regno == -1
+ || regno == tdep->ppc_spefscr_regnum)
+ regcache_raw_supply (current_regcache, tdep->ppc_spefscr_regnum,
+ &evrregs.spefscr);
}
static void
fetch_register (int tid, int regno)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
- char mess[128]; /* For messages */
- int i;
+ CORE_ADDR regaddr = ppc_register_u_addr (regno);
+ int bytes_transferred;
unsigned int offset; /* Offset of registers within the u area. */
char buf[MAX_REGISTER_SIZE];
- CORE_ADDR regaddr = ppc_register_u_addr (regno);
if (altivec_register_p (regno))
{
@@ -223,43 +348,60 @@ fetch_register (int tid, int regno)
AltiVec registers, fall through and return zeroes, because
regaddr will be -1 in this case. */
}
+ else if (spe_register_p (regno))
+ {
+ fetch_spe_register (tid, regno);
+ return;
+ }
if (regaddr == -1)
{
- memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ memset (buf, '\0', register_size (current_gdbarch, regno)); /* Supply zeroes */
+ regcache_raw_supply (current_regcache, regno, buf);
return;
}
/* Read the raw register using PTRACE_XFER_TYPE sized chunks. On a
32-bit platform, 64-bit floating-point registers will require two
transfers. */
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (bytes_transferred = 0;
+ bytes_transferred < register_size (current_gdbarch, regno);
+ bytes_transferred += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
- *(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
+ *(PTRACE_XFER_TYPE *) & buf[bytes_transferred]
+ = ptrace (PT_READ_U, tid, (PTRACE_ARG3_TYPE) regaddr, 0);
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
- sprintf (mess, "reading register %s (#%d)",
+ char message[128];
+ sprintf (message, "reading register %s (#%d)",
REGISTER_NAME (regno), regno);
- perror_with_name (mess);
+ perror_with_name (message);
}
}
- /* Now supply the register. Be careful to map between ptrace's and
- the current_regcache's idea of the current wordsize. */
- if ((regno >= FP0_REGNUM && regno < FP0_REGNUM +32)
- || gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_LITTLE)
- /* FPs are always 64 bits. Little endian values are always found
- at the left-hand end of the register. */
- regcache_raw_supply (current_regcache, regno, buf);
- else
- /* Big endian register, need to fetch the right-hand end. */
- regcache_raw_supply (current_regcache, regno,
- (buf + sizeof (PTRACE_XFER_TYPE)
- - register_size (current_gdbarch, regno)));
+ /* Now supply the register. Keep in mind that the regcache's idea
+ of the register's size may not be a multiple of sizeof
+ (PTRACE_XFER_TYPE). */
+ if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_LITTLE)
+ {
+ /* Little-endian values are always found at the left end of the
+ bytes transferred. */
+ regcache_raw_supply (current_regcache, regno, buf);
+ }
+ else if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ {
+ /* Big-endian values are found at the right end of the bytes
+ transferred. */
+ size_t padding = (bytes_transferred
+ - register_size (current_gdbarch, regno));
+ regcache_raw_supply (current_regcache, regno, buf + padding);
+ }
+ else
+ internal_error (__FILE__, __LINE__,
+ "fetch_register: unexpected byte order: %d",
+ gdbarch_byte_order (current_gdbarch));
}
static void
@@ -268,8 +410,8 @@ supply_vrregset (gdb_vrregset_t *vrregsetp)
int i;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int num_of_vrregs = tdep->ppc_vrsave_regnum - tdep->ppc_vr0_regnum + 1;
- int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
- int offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ int vrregsize = register_size (current_gdbarch, tdep->ppc_vr0_regnum);
+ int offset = vrregsize - register_size (current_gdbarch, tdep->ppc_vrsave_regnum);
for (i = 0; i < num_of_vrregs; i++)
{
@@ -278,10 +420,11 @@ supply_vrregset (gdb_vrregset_t *vrregsetp)
occupies a whole vector, while VRSAVE occupies a full 4 bytes
slot. */
if (i == (num_of_vrregs - 2))
- supply_register (tdep->ppc_vr0_regnum + i,
- *vrregsetp + i * vrregsize + offset);
+ regcache_raw_supply (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize + offset);
else
- supply_register (tdep->ppc_vr0_regnum + i, *vrregsetp + i * vrregsize);
+ regcache_raw_supply (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize);
}
}
@@ -310,13 +453,31 @@ fetch_ppc_registers (int tid)
int i;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- for (i = 0; i <= tdep->ppc_fpscr_regnum; i++)
- fetch_register (tid, i);
+ for (i = 0; i < ppc_num_gprs; i++)
+ fetch_register (tid, tdep->ppc_gp0_regnum + i);
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (i = 0; i < ppc_num_fprs; i++)
+ fetch_register (tid, tdep->ppc_fp0_regnum + i);
+ fetch_register (tid, PC_REGNUM);
+ if (tdep->ppc_ps_regnum != -1)
+ fetch_register (tid, tdep->ppc_ps_regnum);
+ if (tdep->ppc_cr_regnum != -1)
+ fetch_register (tid, tdep->ppc_cr_regnum);
+ if (tdep->ppc_lr_regnum != -1)
+ fetch_register (tid, tdep->ppc_lr_regnum);
+ if (tdep->ppc_ctr_regnum != -1)
+ fetch_register (tid, tdep->ppc_ctr_regnum);
+ if (tdep->ppc_xer_regnum != -1)
+ fetch_register (tid, tdep->ppc_xer_regnum);
if (tdep->ppc_mq_regnum != -1)
fetch_register (tid, tdep->ppc_mq_regnum);
+ if (tdep->ppc_fpscr_regnum != -1)
+ fetch_register (tid, tdep->ppc_fpscr_regnum);
if (have_ptrace_getvrregs)
if (tdep->ppc_vr0_regnum != -1 && tdep->ppc_vrsave_regnum != -1)
fetch_altivec_registers (tid);
+ if (tdep->ppc_ev0_upper_regnum >= 0)
+ fetch_spe_register (tid, -1);
}
/* Fetch registers from the child process. Fetch all registers if
@@ -346,7 +507,7 @@ store_altivec_register (int tid, int regno)
int offset = 0;
gdb_vrregset_t regs;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int vrregsize = register_size (current_gdbarch, tdep->ppc_vr0_regnum);
ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
if (ret < 0)
@@ -362,24 +523,110 @@ store_altivec_register (int tid, int regno)
/* VSCR is fetched as a 16 bytes quantity, but it is really 4 bytes
long on the hardware. */
if (regno == (tdep->ppc_vrsave_regnum - 1))
- offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ offset = vrregsize - register_size (current_gdbarch, tdep->ppc_vrsave_regnum);
- regcache_collect (regno,
- regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
+ regcache_raw_collect (current_regcache, regno,
+ regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
ret = ptrace (PTRACE_SETVRREGS, tid, 0, &regs);
if (ret < 0)
perror_with_name ("Unable to store AltiVec register");
}
+/* Assuming TID referrs to an SPE process, set the top halves of TID's
+ general-purpose registers and its SPE-specific registers to the
+ values in EVRREGSET. If we don't support PTRACE_SETEVRREGS, do
+ nothing.
+
+ All the logic to deal with whether or not the PTRACE_GETEVRREGS and
+ PTRACE_SETEVRREGS requests are supported is isolated here, and in
+ get_spe_registers. */
+static void
+set_spe_registers (int tid, struct gdb_evrregset_t *evrregset)
+{
+ if (have_ptrace_getsetevrregs)
+ {
+ if (ptrace (PTRACE_SETEVRREGS, tid, 0, evrregset) >= 0)
+ return;
+ else
+ {
+ /* EIO means that the PTRACE_SETEVRREGS request isn't
+ supported; we fail silently, and don't try the call
+ again. */
+ if (errno == EIO)
+ have_ptrace_getsetevrregs = 0;
+ else
+ /* Anything else needs to be reported. */
+ perror_with_name ("Unable to set SPE registers");
+ }
+ }
+}
+
+/* Write GDB's value for the SPE-specific raw register REGNO to TID.
+ If REGNO is -1, write the values of all the SPE-specific
+ registers. */
+static void
+store_spe_register (int tid, int regno)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdb_evrregset_t evrregs;
+
+ gdb_assert (sizeof (evrregs.evr[0])
+ == register_size (current_gdbarch, tdep->ppc_ev0_upper_regnum));
+ gdb_assert (sizeof (evrregs.acc)
+ == register_size (current_gdbarch, tdep->ppc_acc_regnum));
+ gdb_assert (sizeof (evrregs.spefscr)
+ == register_size (current_gdbarch, tdep->ppc_spefscr_regnum));
+
+ if (regno == -1)
+ /* Since we're going to write out every register, the code below
+ should store to every field of evrregs; if that doesn't happen,
+ make it obvious by initializing it with suspicious values. */
+ memset (&evrregs, 42, sizeof (evrregs));
+ else
+ /* We can only read and write the entire EVR register set at a
+ time, so to write just a single register, we do a
+ read-modify-write maneuver. */
+ get_spe_registers (tid, &evrregs);
+
+ if (regno == -1)
+ {
+ int i;
+
+ for (i = 0; i < ppc_num_gprs; i++)
+ regcache_raw_collect (current_regcache,
+ tdep->ppc_ev0_upper_regnum + i,
+ &evrregs.evr[i]);
+ }
+ else if (tdep->ppc_ev0_upper_regnum <= regno
+ && regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs)
+ regcache_raw_collect (current_regcache, regno,
+ &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
+
+ if (regno == -1
+ || regno == tdep->ppc_acc_regnum)
+ regcache_raw_collect (current_regcache,
+ tdep->ppc_acc_regnum,
+ &evrregs.acc);
+
+ if (regno == -1
+ || regno == tdep->ppc_spefscr_regnum)
+ regcache_raw_collect (current_regcache,
+ tdep->ppc_spefscr_regnum,
+ &evrregs.spefscr);
+
+ /* Write back the modified register set. */
+ set_spe_registers (tid, &evrregs);
+}
+
static void
store_register (int tid, int regno)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (regno);
- char mess[128]; /* For messages */
int i;
- unsigned int offset; /* Offset of registers within the u area. */
+ size_t bytes_to_transfer;
char buf[MAX_REGISTER_SIZE];
if (altivec_register_p (regno))
@@ -387,26 +634,35 @@ store_register (int tid, int regno)
store_altivec_register (tid, regno);
return;
}
+ else if (spe_register_p (regno))
+ {
+ store_spe_register (tid, regno);
+ return;
+ }
if (regaddr == -1)
return;
- /* First collect the register value from the regcache. Be careful
- to to convert the regcache's wordsize into ptrace's wordsize. */
+ /* First collect the register. Keep in mind that the regcache's
+ idea of the register's size may not be a multiple of sizeof
+ (PTRACE_XFER_TYPE). */
memset (buf, 0, sizeof buf);
- if ((regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- /* Floats are always 64-bit. Little endian registers are always
- at the left-hand end of the register cache. */
- regcache_raw_collect (current_regcache, regno, buf);
- else
- /* Big-endian registers belong at the right-hand end of the
- buffer. */
- regcache_raw_collect (current_regcache, regno,
- (buf + sizeof (PTRACE_XFER_TYPE)
- - register_size (current_gdbarch, regno)));
+ bytes_to_transfer = align_up (register_size (current_gdbarch, regno),
+ sizeof (PTRACE_XFER_TYPE));
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ {
+ /* Little-endian values always sit at the left end of the buffer. */
+ regcache_raw_collect (current_regcache, regno, buf);
+ }
+ else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ /* Big-endian values sit at the right end of the buffer. */
+ size_t padding = (bytes_to_transfer
+ - register_size (current_gdbarch, regno));
+ regcache_raw_collect (current_regcache, regno, buf + padding);
+ }
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < bytes_to_transfer; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
@@ -414,7 +670,7 @@ store_register (int tid, int regno)
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno == EIO
- && regno == gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum)
+ && regno == tdep->ppc_fpscr_regnum)
{
/* Some older kernel versions don't allow fpscr to be written. */
continue;
@@ -422,9 +678,10 @@ store_register (int tid, int regno)
if (errno != 0)
{
- sprintf (mess, "writing register %s (#%d)",
+ char message[128];
+ sprintf (message, "writing register %s (#%d)",
REGISTER_NAME (regno), regno);
- perror_with_name (mess);
+ perror_with_name (message);
}
}
}
@@ -435,18 +692,19 @@ fill_vrregset (gdb_vrregset_t *vrregsetp)
int i;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int num_of_vrregs = tdep->ppc_vrsave_regnum - tdep->ppc_vr0_regnum + 1;
- int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
- int offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ int vrregsize = register_size (current_gdbarch, tdep->ppc_vr0_regnum);
+ int offset = vrregsize - register_size (current_gdbarch, tdep->ppc_vrsave_regnum);
for (i = 0; i < num_of_vrregs; i++)
{
/* The last 2 registers of this set are only 32 bit long, not
128, but only VSCR is fetched as a 16 bytes quantity. */
if (i == (num_of_vrregs - 2))
- regcache_collect (tdep->ppc_vr0_regnum + i,
- *vrregsetp + i * vrregsize + offset);
+ regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize + offset);
else
- regcache_collect (tdep->ppc_vr0_regnum + i, *vrregsetp + i * vrregsize);
+ regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize);
}
}
@@ -479,13 +737,31 @@ store_ppc_registers (int tid)
int i;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- for (i = 0; i <= tdep->ppc_fpscr_regnum; i++)
- store_register (tid, i);
+ for (i = 0; i < ppc_num_gprs; i++)
+ store_register (tid, tdep->ppc_gp0_regnum + i);
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (i = 0; i < ppc_num_fprs; i++)
+ store_register (tid, tdep->ppc_fp0_regnum + i);
+ store_register (tid, PC_REGNUM);
+ if (tdep->ppc_ps_regnum != -1)
+ store_register (tid, tdep->ppc_ps_regnum);
+ if (tdep->ppc_cr_regnum != -1)
+ store_register (tid, tdep->ppc_cr_regnum);
+ if (tdep->ppc_lr_regnum != -1)
+ store_register (tid, tdep->ppc_lr_regnum);
+ if (tdep->ppc_ctr_regnum != -1)
+ store_register (tid, tdep->ppc_ctr_regnum);
+ if (tdep->ppc_xer_regnum != -1)
+ store_register (tid, tdep->ppc_xer_regnum);
if (tdep->ppc_mq_regnum != -1)
store_register (tid, tdep->ppc_mq_regnum);
+ if (tdep->ppc_fpscr_regnum != -1)
+ store_register (tid, tdep->ppc_fpscr_regnum);
if (have_ptrace_getvrregs)
if (tdep->ppc_vr0_regnum != -1 && tdep->ppc_vrsave_regnum != -1)
store_altivec_registers (tid);
+ if (tdep->ppc_ev0_upper_regnum >= 0)
+ store_spe_register (tid, -1);
}
void
@@ -539,10 +815,10 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
/* Start with zeros. */
memset (regp, 0, elf_ngreg * sizeof (*regp));
- for (regi = 0; regi < 32; regi++)
+ for (regi = 0; regi < ppc_num_gprs; regi++)
{
- if ((regno == -1) || regno == regi)
- right_fill_reg (regi, (regp + PT_R0 + regi));
+ if ((regno == -1) || regno == tdep->ppc_gp0_regnum + regi)
+ right_fill_reg (tdep->ppc_gp0_regnum + regi, (regp + PT_R0 + regi));
}
if ((regno == -1) || regno == PC_REGNUM)
@@ -550,9 +826,11 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
if ((regno == -1) || regno == tdep->ppc_lr_regnum)
right_fill_reg (tdep->ppc_lr_regnum, regp + PT_LNK);
if ((regno == -1) || regno == tdep->ppc_cr_regnum)
- regcache_collect (tdep->ppc_cr_regnum, regp + PT_CCR);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum,
+ regp + PT_CCR);
if ((regno == -1) || regno == tdep->ppc_xer_regnum)
- regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum,
+ regp + PT_XER);
if ((regno == -1) || regno == tdep->ppc_ctr_regnum)
right_fill_reg (tdep->ppc_ctr_regnum, regp + PT_CTR);
#ifdef PT_MQ
@@ -582,11 +860,15 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
bfd_byte *fpp = (void *) fpregsetp;
- for (regi = 0; regi < 32; regi++)
+ if (ppc_floating_point_unit_p (current_gdbarch))
{
- if ((regno == -1) || (regno == FP0_REGNUM + regi))
- regcache_collect (FP0_REGNUM + regi, fpp + 8 * regi);
+ for (regi = 0; regi < ppc_num_fprs; regi++)
+ {
+ if ((regno == -1) || (regno == tdep->ppc_fp0_regnum + regi))
+ regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + regi,
+ fpp + 8 * regi);
+ }
+ if (regno == -1 || regno == tdep->ppc_fpscr_regnum)
+ right_fill_reg (tdep->ppc_fpscr_regnum, (fpp + 8 * 32));
}
- if ((regno == -1) || regno == tdep->ppc_fpscr_regnum)
- right_fill_reg (tdep->ppc_fpscr_regnum, (fpp + 8 * 32));
}
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c2223d29fc3..206b78aca02 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1997, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -114,8 +114,8 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
/* Determine if pc is in a signal trampoline...
Ha! That's not what this does at all. wait_for_inferior in
- infrun.c calls DEPRECATED_PC_IN_SIGTRAMP in order to detect entry
- into a signal trampoline just after delivery of a signal. But on
+ infrun.c calls get_frame_type() in order to detect entry into a
+ signal trampoline just after delivery of a signal. But on
GNU/Linux, signal trampolines are used for the return path only.
The kernel sets things up so that the signal handler is called
directly.
@@ -146,20 +146,9 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
signal is delivered while stepping, the next instruction that
would've been stepped over isn't, instead a signal is delivered and
the first instruction of the handler is stepped over instead. That
- puts us on the second instruction. (I added the test for the
- first instruction long after the fact, just in case the observed
- behavior is ever fixed.)
-
- DEPRECATED_PC_IN_SIGTRAMP is called from blockframe.c as well in
- order to set the frame's type (if a SIGTRAMP_FRAME). Because of
- our strange definition of in_sigtramp below, we can't rely on the
- frame's type getting set correctly from within blockframe.c. This
- is why we take pains to set it in init_extra_frame_info().
-
- NOTE: cagney/2002-11-10: I suspect the real problem here is that
- the get_prev_frame() only initializes the frame's type after the
- call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this
- code shouldn't be working its way around a bug :-(. */
+ puts us on the second instruction. (I added the test for the first
+ instruction long after the fact, just in case the observed behavior
+ is ever fixed.) */
int
ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
@@ -848,24 +837,12 @@ ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
return addr;
}
-
-enum {
- ELF_NGREG = 48,
- ELF_NFPREG = 33,
- ELF_NVRREG = 33
-};
-
-enum {
- ELF_FPREGSET_SIZE = (ELF_NFPREG * 8)
-};
-
static void
right_supply_register (struct regcache *regcache, int wordsize, int regnum,
const bfd_byte *buf)
{
regcache_raw_supply (regcache, regnum,
- (buf + wordsize
- - register_size (current_gdbarch, regnum)));
+ (buf + wordsize - register_size (current_gdbarch, regnum)));
}
/* Extract the register values found in the WORDSIZED ABI GREGSET,
@@ -882,8 +859,10 @@ ppc_linux_supply_gregset (struct regcache *regcache,
struct gdbarch_tdep *regcache_tdep = gdbarch_tdep (regcache_arch);
const bfd_byte *buf = gregs;
- for (regi = 0; regi < 32; regi++)
- right_supply_register (regcache, wordsize, regi, buf + wordsize * regi);
+ for (regi = 0; regi < ppc_num_gprs; regi++)
+ right_supply_register (regcache, wordsize,
+ regcache_tdep->ppc_gp0_regnum + regi,
+ buf + wordsize * regi);
right_supply_register (regcache, wordsize, gdbarch_pc_regnum (regcache_arch),
buf + wordsize * PPC_LINUX_PT_NIP);
@@ -954,7 +933,7 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, void **this_cache)
fpregs = gpregs + 48 * tdep->wordsize;
/* General purpose. */
- for (i = 0; i < 32; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
{
int regnum = i + tdep->ppc_gp0_regnum;
cache->saved_regs[regnum].addr = gpregs + i * tdep->wordsize;
@@ -966,12 +945,16 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, void **this_cache)
cache->saved_regs[tdep->ppc_cr_regnum].addr = gpregs + 38 * tdep->wordsize;
/* Floating point registers. */
- for (i = 0; i < 32; i++)
+ if (ppc_floating_point_unit_p (gdbarch))
{
- int regnum = i + FP0_REGNUM;
- cache->saved_regs[regnum].addr = fpregs + i * tdep->wordsize;
+ for (i = 0; i < ppc_num_fprs; i++)
+ {
+ int regnum = i + tdep->ppc_fp0_regnum;
+ cache->saved_regs[regnum].addr = fpregs + i * tdep->wordsize;
+ }
+ cache->saved_regs[tdep->ppc_fpscr_regnum].addr
+ = fpregs + 32 * tdep->wordsize;
}
- cache->saved_regs[tdep->ppc_fpscr_regnum].addr = fpregs + 32 * tdep->wordsize;
return cache;
}
@@ -994,8 +977,8 @@ ppc_linux_sigtramp_prev_register (struct frame_info *next_frame,
{
struct ppc_linux_sigtramp_cache *info
= ppc_linux_sigtramp_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind ppc_linux_sigtramp_unwind =
@@ -1040,13 +1023,18 @@ ppc_linux_supply_fpregset (const struct regset *regset,
struct gdbarch_tdep *regcache_tdep = gdbarch_tdep (regcache_arch);
const bfd_byte *buf = fpset;
- for (regi = 0; regi < 32; regi++)
- regcache_raw_supply (regcache, FP0_REGNUM + regi, buf + 8 * regi);
+ if (! ppc_floating_point_unit_p (regcache_arch))
+ return;
+
+ for (regi = 0; regi < ppc_num_fprs; regi++)
+ regcache_raw_supply (regcache,
+ regcache_tdep->ppc_fp0_regnum + regi,
+ buf + 8 * regi);
- /* The FPSCR is stored in the low order word of the last doubleword in the
- fpregset. */
+ /* The FPSCR is stored in the low order word of the last
+ doubleword in the fpregset. */
regcache_raw_supply (regcache, regcache_tdep->ppc_fpscr_regnum,
- buf + 8 * 32 + 4);
+ buf + 8 * 32 + 4);
}
static struct regset ppc_linux_fpregset = { NULL, ppc_linux_supply_fpregset };
@@ -1081,7 +1069,7 @@ ppc_linux_init_abi (struct gdbarch_info info,
However, as one of the known warts of its ABI, PPC GNU/Linux
uses eight-byte long doubles. GCC only recently got 128-bit
long double support on PPC, so it may be changing soon. The
- Linux Standards Base says that programs that use 'long
+ Linux[sic] Standards Base says that programs that use 'long
double' on PPC GNU/Linux are non-conformant. */
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 60cf986bd72..cdf285525d1 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -30,6 +30,7 @@
#include "ppc-tdep.h"
#include "target.h"
#include "objfiles.h"
+#include "infcall.h"
/* Pass the arguments in either registers, or in the stack. Using the
ppc sysv ABI, the first eight words of the argument list (that might
@@ -43,7 +44,7 @@
starting from r4. */
CORE_ADDR
-ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -114,9 +115,10 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
the register's floating-point format. */
char regval[MAX_REGISTER_SIZE];
struct type *regtype
- = register_type (gdbarch, FP0_REGNUM + freg);
+ = register_type (gdbarch, tdep->ppc_fp0_regnum + freg);
convert_typed_floating (val, type, regval, regtype);
- regcache_cooked_write (regcache, FP0_REGNUM + freg,
+ regcache_cooked_write (regcache,
+ tdep->ppc_fp0_regnum + freg,
regval);
}
freg++;
@@ -338,8 +340,9 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
/* Floats and doubles stored in "f1". Convert the value to
the required type. */
char regval[MAX_REGISTER_SIZE];
- struct type *regtype = register_type (gdbarch, FP0_REGNUM + 1);
- regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
+ struct type *regtype = register_type (gdbarch,
+ tdep->ppc_fp0_regnum + 1);
+ regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
convert_typed_floating (regval, regtype, readbuf, type);
}
if (writebuf)
@@ -347,9 +350,9 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
/* Floats and doubles stored in "f1". Convert the value to
the register's "double" type. */
char regval[MAX_REGISTER_SIZE];
- struct type *regtype = register_type (gdbarch, FP0_REGNUM);
+ struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum);
convert_typed_floating (writebuf, type, regval, regtype);
- regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
+ regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval);
}
return RETURN_VALUE_REGISTER_CONVENTION;
}
@@ -538,11 +541,12 @@ ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
greatly simplifies the logic. */
CORE_ADDR
-ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* By this stage in the proceedings, SP has been decremented by "red
zone size" + "struct return size". Fetch the stack-pointer from
@@ -643,10 +647,11 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
&& freg <= 13)
{
char regval[MAX_REGISTER_SIZE];
- struct type *regtype = register_type (gdbarch,
- FP0_REGNUM);
+ struct type *regtype
+ = register_type (gdbarch, tdep->ppc_fp0_regnum);
convert_typed_floating (val, type, regval, regtype);
- regcache_cooked_write (regcache, FP0_REGNUM + freg,
+ regcache_cooked_write (regcache,
+ tdep->ppc_fp0_regnum + freg,
regval);
}
if (greg <= 10)
@@ -847,19 +852,25 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
const void *writebuf)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* This function exists to support a calling convention that
+ requires floating-point registers. It shouldn't be used on
+ processors that lack them. */
+ gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
/* Floats and doubles in F1. */
if (TYPE_CODE (valtype) == TYPE_CODE_FLT && TYPE_LENGTH (valtype) <= 8)
{
char regval[MAX_REGISTER_SIZE];
- struct type *regtype = register_type (gdbarch, FP0_REGNUM);
+ struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum);
if (writebuf != NULL)
{
convert_typed_floating (writebuf, valtype, regval, regtype);
- regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
+ regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval);
}
if (readbuf != NULL)
{
- regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
+ regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
convert_typed_floating (regval, regtype, readbuf, valtype);
}
return RETURN_VALUE_REGISTER_CONVENTION;
@@ -921,10 +932,10 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
for (i = 0; i < TYPE_LENGTH (valtype) / 8; i++)
{
if (writebuf != NULL)
- regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
+ regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1 + i,
(const bfd_byte *) writebuf + i * 8);
if (readbuf != NULL)
- regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
+ regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1 + i,
(bfd_byte *) readbuf + i * 8);
}
}
@@ -941,18 +952,21 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
{
char regval[MAX_REGISTER_SIZE];
struct type *regtype =
- register_type (current_gdbarch, FP0_REGNUM);
+ register_type (current_gdbarch, tdep->ppc_fp0_regnum);
if (writebuf != NULL)
{
convert_typed_floating ((const bfd_byte *) writebuf +
i * (TYPE_LENGTH (valtype) / 2),
valtype, regval, regtype);
- regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
+ regcache_cooked_write (regcache,
+ tdep->ppc_fp0_regnum + 1 + i,
regval);
}
if (readbuf != NULL)
{
- regcache_cooked_read (regcache, FP0_REGNUM + 1 + i, regval);
+ regcache_cooked_read (regcache,
+ tdep->ppc_fp0_regnum + 1 + i,
+ regval);
convert_typed_floating (regval, regtype,
(bfd_byte *) readbuf +
i * (TYPE_LENGTH (valtype) / 2),
@@ -971,10 +985,10 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
for (i = 0; i < 4; i++)
{
if (writebuf != NULL)
- regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
+ regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1 + i,
(const bfd_byte *) writebuf + i * 8);
if (readbuf != NULL)
- regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
+ regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1 + i,
(bfd_byte *) readbuf + i * 8);
}
}
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index d570f798522..1a5bc6fbf05 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -41,14 +41,14 @@ enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *g
void *readbuf,
const void *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr);
CORE_ADDR ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp,
@@ -73,36 +73,304 @@ enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarc
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
+int spe_register_p (int regno);
-
-/* Return non-zero when the architecture has an FPU (or at least when
- the ABI is using the FPU). */
+/* Return non-zero if the architecture described by GDBARCH has
+ floating-point registers (f0 --- f31 and fpscr). */
int ppc_floating_point_unit_p (struct gdbarch *gdbarch);
+/* Register set description. */
+
+struct ppc_reg_offsets
+{
+ /* General-purpose registers. */
+ int r0_offset;
+ int pc_offset;
+ int ps_offset;
+ int cr_offset;
+ int lr_offset;
+ int ctr_offset;
+ int xer_offset;
+ int mq_offset;
+
+ /* Floating-point registers. */
+ int f0_offset;
+ int fpscr_offset;
+
+ /* AltiVec registers. */
+ int vr0_offset;
+ int vscr_offset;
+ int vrsave_offset;
+};
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+ from the buffer specified by GREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+extern void ppc_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len);
+
+/* Supply register REGNUM in the floating-point register set REGSET
+ from the buffer specified by FPREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+extern void ppc_supply_fpregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len);
+
+/* Collect register REGNUM in the general-purpose register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ GREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+extern void ppc_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len);
+
+/* Collect register REGNUM in the floating-point register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ FPREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+extern void ppc_collect_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len);
+
/* Private data that this module attaches to struct gdbarch. */
struct gdbarch_tdep
{
int wordsize; /* size in bytes of fixed-point word */
- int *regoff; /* byte offsets in register arrays */
const struct reg *regs; /* from current variant */
int ppc_gp0_regnum; /* GPR register 0 */
- int ppc_gplast_regnum; /* GPR register 31 */
int ppc_toc_regnum; /* TOC register */
int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
int ppc_cr_regnum; /* Condition register */
int ppc_lr_regnum; /* Link register */
int ppc_ctr_regnum; /* Count register */
int ppc_xer_regnum; /* Integer exception register */
+
+ /* On PPC and RS6000 variants that have no floating-point
+ registers, the next two members will be -1. */
+ int ppc_fp0_regnum; /* floating-point register 0 */
int ppc_fpscr_regnum; /* Floating point status and condition
register */
+
+ int ppc_sr0_regnum; /* segment register 0, or -1 on
+ variants that have no segment
+ registers. */
+
int ppc_mq_regnum; /* Multiply/Divide extension register */
int ppc_vr0_regnum; /* First AltiVec register */
int ppc_vrsave_regnum; /* Last AltiVec register */
+ int ppc_ev0_upper_regnum; /* First GPR upper half register */
int ppc_ev0_regnum; /* First ev register */
int ppc_ev31_regnum; /* Last ev register */
+ int ppc_acc_regnum; /* SPE 'acc' register */
+ int ppc_spefscr_regnum; /* SPE 'spefscr' register */
int lr_frame_offset; /* Offset to ABI specific location where
link register is saved. */
+
+ /* An array of integers, such that sim_regno[I] is the simulator
+ register number for GDB register number I, or -1 if the
+ simulator does not implement that register. */
+ int *sim_regno;
};
+
+/* Constants for register set sizes. */
+enum
+ {
+ ppc_num_gprs = 32, /* 32 general-purpose registers */
+ ppc_num_fprs = 32, /* 32 floating-point registers */
+ ppc_num_srs = 16, /* 16 segment registers */
+ ppc_num_vrs = 32 /* 32 Altivec vector registers */
+ };
+
+
+/* Constants for SPR register numbers. These are *not* GDB register
+ numbers: they are the numbers used in the PowerPC ISA itself to
+ refer to these registers.
+
+ This table includes all the SPRs from all the variants I could find
+ documentation for.
+
+ There may be registers from different PowerPC variants assigned the
+ same number, but that's fine: GDB and the SIM always use the
+ numbers in the context of a particular variant, so it's not
+ ambiguous.
+
+ We need to deviate from the naming pattern when variants have
+ special-purpose registers of the same name, but with different
+ numbers. Fortunately, this is rare: look below to see how we
+ handle the 'tcr' registers on the 403/403GX and 602. */
+
+enum
+ {
+ ppc_spr_mq = 0,
+ ppc_spr_xer = 1,
+ ppc_spr_rtcu = 4,
+ ppc_spr_rtcl = 5,
+ ppc_spr_lr = 8,
+ ppc_spr_ctr = 9,
+ ppc_spr_cnt = 9,
+ ppc_spr_dsisr = 18,
+ ppc_spr_dar = 19,
+ ppc_spr_dec = 22,
+ ppc_spr_sdr1 = 25,
+ ppc_spr_srr0 = 26,
+ ppc_spr_srr1 = 27,
+ ppc_spr_eie = 80,
+ ppc_spr_eid = 81,
+ ppc_spr_nri = 82,
+ ppc_spr_sp = 102,
+ ppc_spr_cmpa = 144,
+ ppc_spr_cmpb = 145,
+ ppc_spr_cmpc = 146,
+ ppc_spr_cmpd = 147,
+ ppc_spr_icr = 148,
+ ppc_spr_der = 149,
+ ppc_spr_counta = 150,
+ ppc_spr_countb = 151,
+ ppc_spr_cmpe = 152,
+ ppc_spr_cmpf = 153,
+ ppc_spr_cmpg = 154,
+ ppc_spr_cmph = 155,
+ ppc_spr_lctrl1 = 156,
+ ppc_spr_lctrl2 = 157,
+ ppc_spr_ictrl = 158,
+ ppc_spr_bar = 159,
+ ppc_spr_vrsave = 256,
+ ppc_spr_sprg0 = 272,
+ ppc_spr_sprg1 = 273,
+ ppc_spr_sprg2 = 274,
+ ppc_spr_sprg3 = 275,
+ ppc_spr_asr = 280,
+ ppc_spr_ear = 282,
+ ppc_spr_tbl = 284,
+ ppc_spr_tbu = 285,
+ ppc_spr_pvr = 287,
+ ppc_spr_spefscr = 512,
+ ppc_spr_ibat0u = 528,
+ ppc_spr_ibat0l = 529,
+ ppc_spr_ibat1u = 530,
+ ppc_spr_ibat1l = 531,
+ ppc_spr_ibat2u = 532,
+ ppc_spr_ibat2l = 533,
+ ppc_spr_ibat3u = 534,
+ ppc_spr_ibat3l = 535,
+ ppc_spr_dbat0u = 536,
+ ppc_spr_dbat0l = 537,
+ ppc_spr_dbat1u = 538,
+ ppc_spr_dbat1l = 539,
+ ppc_spr_dbat2u = 540,
+ ppc_spr_dbat2l = 541,
+ ppc_spr_dbat3u = 542,
+ ppc_spr_dbat3l = 543,
+ ppc_spr_ic_cst = 560,
+ ppc_spr_ic_adr = 561,
+ ppc_spr_ic_dat = 562,
+ ppc_spr_dc_cst = 568,
+ ppc_spr_dc_adr = 569,
+ ppc_spr_dc_dat = 570,
+ ppc_spr_dpdr = 630,
+ ppc_spr_dpir = 631,
+ ppc_spr_immr = 638,
+ ppc_spr_mi_ctr = 784,
+ ppc_spr_mi_ap = 786,
+ ppc_spr_mi_epn = 787,
+ ppc_spr_mi_twc = 789,
+ ppc_spr_mi_rpn = 790,
+ ppc_spr_mi_cam = 816,
+ ppc_spr_mi_ram0 = 817,
+ ppc_spr_mi_ram1 = 818,
+ ppc_spr_md_ctr = 792,
+ ppc_spr_m_casid = 793,
+ ppc_spr_md_ap = 794,
+ ppc_spr_md_epn = 795,
+ ppc_spr_m_twb = 796,
+ ppc_spr_md_twc = 797,
+ ppc_spr_md_rpn = 798,
+ ppc_spr_m_tw = 799,
+ ppc_spr_mi_dbcam = 816,
+ ppc_spr_mi_dbram0 = 817,
+ ppc_spr_mi_dbram1 = 818,
+ ppc_spr_md_dbcam = 824,
+ ppc_spr_md_cam = 824,
+ ppc_spr_md_dbram0 = 825,
+ ppc_spr_md_ram0 = 825,
+ ppc_spr_md_dbram1 = 826,
+ ppc_spr_md_ram1 = 826,
+ ppc_spr_ummcr0 = 936,
+ ppc_spr_upmc1 = 937,
+ ppc_spr_upmc2 = 938,
+ ppc_spr_usia = 939,
+ ppc_spr_ummcr1 = 940,
+ ppc_spr_upmc3 = 941,
+ ppc_spr_upmc4 = 942,
+ ppc_spr_zpr = 944,
+ ppc_spr_pid = 945,
+ ppc_spr_mmcr0 = 952,
+ ppc_spr_pmc1 = 953,
+ ppc_spr_sgr = 953,
+ ppc_spr_pmc2 = 954,
+ ppc_spr_dcwr = 954,
+ ppc_spr_sia = 955,
+ ppc_spr_mmcr1 = 956,
+ ppc_spr_pmc3 = 957,
+ ppc_spr_pmc4 = 958,
+ ppc_spr_sda = 959,
+ ppc_spr_tbhu = 972,
+ ppc_spr_tblu = 973,
+ ppc_spr_dmiss = 976,
+ ppc_spr_dcmp = 977,
+ ppc_spr_hash1 = 978,
+ ppc_spr_hash2 = 979,
+ ppc_spr_icdbdr = 979,
+ ppc_spr_imiss = 980,
+ ppc_spr_esr = 980,
+ ppc_spr_icmp = 981,
+ ppc_spr_dear = 981,
+ ppc_spr_rpa = 982,
+ ppc_spr_evpr = 982,
+ ppc_spr_cdbcr = 983,
+ ppc_spr_tsr = 984,
+ ppc_spr_602_tcr = 984,
+ ppc_spr_403_tcr = 986,
+ ppc_spr_ibr = 986,
+ ppc_spr_pit = 987,
+ ppc_spr_esasrr = 988,
+ ppc_spr_tbhi = 988,
+ ppc_spr_tblo = 989,
+ ppc_spr_srr2 = 990,
+ ppc_spr_sebr = 990,
+ ppc_spr_srr3 = 991,
+ ppc_spr_ser = 991,
+ ppc_spr_hid0 = 1008,
+ ppc_spr_dbsr = 1008,
+ ppc_spr_hid1 = 1009,
+ ppc_spr_iabr = 1010,
+ ppc_spr_dbcr = 1010,
+ ppc_spr_iac1 = 1012,
+ ppc_spr_dabr = 1013,
+ ppc_spr_iac2 = 1013,
+ ppc_spr_dac1 = 1014,
+ ppc_spr_dac2 = 1015,
+ ppc_spr_l2cr = 1017,
+ ppc_spr_dccr = 1018,
+ ppc_spr_ictc = 1019,
+ ppc_spr_iccr = 1019,
+ ppc_spr_thrm1 = 1020,
+ ppc_spr_pbl1 = 1020,
+ ppc_spr_thrm2 = 1021,
+ ppc_spr_pbu1 = 1021,
+ ppc_spr_thrm3 = 1022,
+ ppc_spr_pbl2 = 1022,
+ ppc_spr_fpecr = 1022,
+ ppc_spr_lt = 1022,
+ ppc_spr_pir = 1023,
+ ppc_spr_pbu2 = 1023
+ };
+
#endif
diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c
index 0619964eef3..ee0465660f7 100644
--- a/gdb/ppcbug-rom.c
+++ b/gdb/ppcbug-rom.c
@@ -166,7 +166,7 @@ init_ppc_cmds (char *LOAD_CMD,
OPS->getreg.term = NULL; /* getreg.term */
OPS->getreg.term_cmd = NULL; /* getreg.term_cmd */
OPS->register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- OPS->supply_register = ppcbug_supply_register; /* supply_register */
+ OPS->supply_register = ppcbug_supply_register;
OPS->dump_registers = "rd\r"; /* dump all registers */
OPS->load_routine = NULL; /* load_routine (defaults to SRECs) */
OPS->load = LOAD_CMD; /* download command */
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c
index ce097d7a59d..6fa55d6bc01 100644
--- a/gdb/ppcnbsd-nat.c
+++ b/gdb/ppcnbsd-nat.c
@@ -1,5 +1,5 @@
/* Native-dependent code for PowerPC's running NetBSD, for GDB.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -22,20 +22,29 @@
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
+#include <machine/frame.h>
+#include <machine/pcb.h>
#include "defs.h"
#include "inferior.h"
+#include "gdb_assert.h"
+#include "gdbcore.h"
+#include "regcache.h"
+#include "bsd-kvm.h"
#include "ppc-tdep.h"
#include "ppcnbsd-tdep.h"
+#include "inf-ptrace.h"
+
/* Returns true if PT_GETREGS fetches this register. */
static int
getregs_supplies (int regno)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- return ((regno >= 0 && regno <= 31)
+ return ((regno >= tdep->ppc_gp0_regnum
+ && regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
|| regno == tdep->ppc_lr_regnum
|| regno == tdep->ppc_cr_regnum
|| regno == tdep->ppc_xer_regnum
@@ -49,19 +58,32 @@ getfpregs_supplies (int regno)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- return ((regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31)
+ /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+ point registers. Traditionally, GDB's register set has still
+ listed the floating point registers for such machines, so this
+ code is harmless. However, the new E500 port actually omits the
+ floating point registers entirely from the register set --- they
+ don't even have register numbers assigned to them.
+
+ It's not clear to me how best to update this code, so this assert
+ will alert the first person to encounter the NetBSD/E500
+ combination to the problem. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ return ((regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
|| regno == tdep->ppc_fpscr_regnum);
}
-void
-fetch_inferior_registers (int regno)
+static void
+ppcnbsd_fetch_inferior_registers (int regno)
{
if (regno == -1 || getregs_supplies (regno))
{
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
ppcnbsd_supply_reg ((char *) &regs, regno);
@@ -74,7 +96,7 @@ fetch_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get FP registers");
ppcnbsd_supply_fpreg ((char *) &fpregs, regno);
@@ -83,21 +105,21 @@ fetch_inferior_registers (int regno)
}
}
-void
-store_inferior_registers (int regno)
+static void
+ppcnbsd_store_inferior_registers (int regno)
{
if (regno == -1 || getregs_supplies (regno))
{
struct reg regs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
ppcnbsd_fill_reg ((char *) &regs, regno);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
if (regno != -1)
@@ -109,13 +131,60 @@ store_inferior_registers (int regno)
struct fpreg fpregs;
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get FP registers");
ppcnbsd_fill_fpreg ((char *) &fpregs, regno);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't set FP registers");
}
}
+
+static int
+ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ struct switchframe sf;
+ struct callframe cf;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ int i;
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_sp == 0)
+ return 0;
+
+ read_memory (pcb->pcb_sp, (char *) &sf, sizeof sf);
+ regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
+ regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+ for (i = 0 ; i < 19 ; i++)
+ regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 13 + i,
+ &sf.fixreg[i]);
+
+ read_memory(sf.sp, (char *)&cf, sizeof(cf));
+ regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
+ regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
+ regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 1, &cf.sp);
+
+ read_memory(cf.sp, (char *)&cf, sizeof(cf));
+ regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr);
+ regcache_raw_supply (regcache, PC_REGNUM, &cf.lr);
+
+ return 1;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_ppcnbsd_nat (void);
+
+void
+_initialize_ppcnbsd_nat (void)
+{
+ struct target_ops *t;
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (ppcnbsd_supply_pcb);
+ /* Add in local overrides. */
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = ppcnbsd_fetch_inferior_registers;
+ t->to_store_registers = ppcnbsd_store_inferior_registers;
+ add_target (t);
+}
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 7d27e8327d0..44b30772109 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -1,5 +1,7 @@
/* Target-dependent code for PowerPC systems running NetBSD.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -30,7 +32,9 @@
#include "ppc-tdep.h"
#include "ppcnbsd-tdep.h"
#include "nbsd-tdep.h"
-
+#include "tramp-frame.h"
+#include "trad-frame.h"
+#include "gdb_assert.h"
#include "solib-svr4.h"
#define REG_FIXREG_OFFSET(x) ((x) * 4)
@@ -51,26 +55,32 @@ ppcnbsd_supply_reg (char *regs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = 0; i <= 31; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
{
- if (regno == i || regno == -1)
- supply_register (i, regs + REG_FIXREG_OFFSET (i));
+ if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)
- supply_register (tdep->ppc_lr_regnum, regs + REG_LR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ regs + REG_LR_OFFSET);
if (regno == tdep->ppc_cr_regnum || regno == -1)
- supply_register (tdep->ppc_cr_regnum, regs + REG_CR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ regs + REG_CR_OFFSET);
if (regno == tdep->ppc_xer_regnum || regno == -1)
- supply_register (tdep->ppc_xer_regnum, regs + REG_XER_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ regs + REG_XER_OFFSET);
if (regno == tdep->ppc_ctr_regnum || regno == -1)
- supply_register (tdep->ppc_ctr_regnum, regs + REG_CTR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ regs + REG_CTR_OFFSET);
if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + REG_PC_OFFSET);
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ regs + REG_PC_OFFSET);
}
void
@@ -79,26 +89,31 @@ ppcnbsd_fill_reg (char *regs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = 0; i <= 31; i++)
+ for (i = 0; i < ppc_num_gprs; i++)
{
- if (regno == i || regno == -1)
- regcache_collect (i, regs + REG_FIXREG_OFFSET (i));
+ if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)
- regcache_collect (tdep->ppc_lr_regnum, regs + REG_LR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum,
+ regs + REG_LR_OFFSET);
if (regno == tdep->ppc_cr_regnum || regno == -1)
- regcache_collect (tdep->ppc_cr_regnum, regs + REG_CR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum,
+ regs + REG_CR_OFFSET);
if (regno == tdep->ppc_xer_regnum || regno == -1)
- regcache_collect (tdep->ppc_xer_regnum, regs + REG_XER_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum,
+ regs + REG_XER_OFFSET);
if (regno == tdep->ppc_ctr_regnum || regno == -1)
- regcache_collect (tdep->ppc_ctr_regnum, regs + REG_CTR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum,
+ regs + REG_CTR_OFFSET);
if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + REG_PC_OFFSET);
+ regcache_raw_collect (current_regcache, PC_REGNUM, regs + REG_PC_OFFSET);
}
void
@@ -107,14 +122,28 @@ ppcnbsd_supply_fpreg (char *fpregs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
+ /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+ point registers. Traditionally, GDB's register set has still
+ listed the floating point registers for such machines, so this
+ code is harmless. However, the new E500 port actually omits the
+ floating point registers entirely from the register set --- they
+ don't even have register numbers assigned to them.
+
+ It's not clear to me how best to update this code, so this assert
+ will alert the first person to encounter the NetBSD/E500
+ combination to the problem. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ for (i = 0; i < ppc_num_fprs; i++)
{
- if (regno == i || regno == -1)
- supply_register (i, fpregs + FPREG_FPR_OFFSET (i - FP0_REGNUM));
+ if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)
- supply_register (tdep->ppc_fpscr_regnum, fpregs + FPREG_FPSCR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ fpregs + FPREG_FPSCR_OFFSET);
}
void
@@ -123,14 +152,28 @@ ppcnbsd_fill_fpreg (char *fpregs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
+ /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+ point registers. Traditionally, GDB's register set has still
+ listed the floating point registers for such machines, so this
+ code is harmless. However, the new E500 port actually omits the
+ floating point registers entirely from the register set --- they
+ don't even have register numbers assigned to them.
+
+ It's not clear to me how best to update this code, so this assert
+ will alert the first person to encounter the NetBSD/E500
+ combination to the problem. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ for (i = 0; i < ppc_num_fprs; i++)
{
- if (regno == i || regno == -1)
- regcache_collect (i, fpregs + FPREG_FPR_OFFSET (i - FP0_REGNUM));
+ if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
+ regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)
- regcache_collect (tdep->ppc_fpscr_regnum, fpregs + FPREG_FPSCR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum,
+ fpregs + FPREG_FPSCR_OFFSET);
}
static void
@@ -197,13 +240,6 @@ static struct core_fns ppcnbsd_elfcore_fns =
NULL /* next */
};
-static int
-ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
-{
- /* FIXME: Need to add support for kernel-provided signal trampolines. */
- return (nbsd_pc_in_sigtramp (pc, func_name));
-}
-
/* NetBSD is confused. It appears that 1.5 was using the correct SVr4
convention but, 1.6 switched to the below broken convention. For
the moment use the broken convention. Ulgh!. */
@@ -228,15 +264,69 @@ ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype,
}
static void
+ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
+ struct frame_info *next_frame,
+ struct trad_frame_cache *this_cache,
+ CORE_ADDR func)
+{
+ CORE_ADDR base;
+ CORE_ADDR offset;
+ int i;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ base = frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+ offset = base + 0x18 + 2 * tdep->wordsize;
+ for (i = 0; i < ppc_num_gprs; i++)
+ {
+ int regnum = i + tdep->ppc_gp0_regnum;
+ trad_frame_set_reg_addr (this_cache, regnum, offset);
+ offset += tdep->wordsize;
+ }
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_lr_regnum, offset);
+ offset += tdep->wordsize;
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum, offset);
+ offset += tdep->wordsize;
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_xer_regnum, offset);
+ offset += tdep->wordsize;
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, offset);
+ offset += tdep->wordsize;
+ trad_frame_set_reg_addr (this_cache, PC_REGNUM, offset); /* SRR0? */
+ offset += tdep->wordsize;
+
+ /* Construct the frame ID using the function start. */
+ trad_frame_set_id (this_cache, frame_id_build (base, func));
+}
+
+/* Given the NEXT frame, examine the instructions at and around this
+ frame's resume address (aka PC) to see of they look like a signal
+ trampoline. Return the address of the trampolines first
+ instruction, or zero if it isn't a signal trampoline. */
+
+static const struct tramp_frame ppcnbsd_sigtramp = {
+ SIGTRAMP_FRAME,
+ 4, /* insn size */
+ { /* insn */
+ { 0x38610018, -1 }, /* addi r3,r1,24 */
+ { 0x38000127, -1 }, /* li r0,295 */
+ { 0x44000002, -1 }, /* sc */
+ { 0x38000001, -1 }, /* li r0,1 */
+ { 0x44000002, -1 }, /* sc */
+ { TRAMP_SENTINEL_INSN, -1 }
+ },
+ ppcnbsd_sigtramp_cache_init
+};
+
+static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
/* For NetBSD, this is an on again, off again thing. Some systems
do use the broken struct convention, and some don't. */
set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
+ tramp_frame_prepend_unwinder (gdbarch, &ppcnbsd_sigtramp);
}
void
@@ -245,6 +335,6 @@ _initialize_ppcnbsd_tdep (void)
gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD_ELF,
ppcnbsd_init_abi);
- add_core_fns (&ppcnbsd_core_fns);
- add_core_fns (&ppcnbsd_elfcore_fns);
+ deprecated_add_core_fns (&ppcnbsd_core_fns);
+ deprecated_add_core_fns (&ppcnbsd_elfcore_fns);
}
diff --git a/gdb/ppcobsd-nat.c b/gdb/ppcobsd-nat.c
new file mode 100644
index 00000000000..c36c63f11d8
--- /dev/null
+++ b/gdb/ppcobsd-nat.c
@@ -0,0 +1,98 @@
+/* Native-dependent code for OpenBSD/powerpc.
+
+ Copyright 2004 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 "inferior.h"
+#include "regcache.h"
+
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "ppc-tdep.h"
+#include "ppcobsd-tdep.h"
+
+/* OpenBSD/powerpc doesn't have PT_GETFPREGS/PT_SETFPREGS like
+ NetBSD/powerpc and FreeBSD/powerpc. */
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
+
+void
+fetch_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ ppcobsd_supply_gregset (&ppcobsd_gregset, current_regcache, -1,
+ &regs, sizeof regs);
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers. */
+
+void
+store_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ ppcobsd_collect_gregset (&ppcobsd_gregset, current_regcache,
+ regnum, &regs, sizeof regs);
+
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't write registers");
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_ppcobsd_nat (void);
+
+void
+_initialize_ppcobsd_nat (void)
+{
+ /* General-purpose registers. */
+ ppcobsd_reg_offsets.r0_offset = offsetof (struct reg, gpr);
+ ppcobsd_reg_offsets.pc_offset = offsetof (struct reg, pc);
+ ppcobsd_reg_offsets.ps_offset = offsetof (struct reg, ps);
+ ppcobsd_reg_offsets.cr_offset = offsetof (struct reg, cnd);
+ ppcobsd_reg_offsets.lr_offset = offsetof (struct reg, lr);
+ ppcobsd_reg_offsets.ctr_offset = offsetof (struct reg, cnt);
+ ppcobsd_reg_offsets.xer_offset = offsetof (struct reg, xer);
+ ppcobsd_reg_offsets.mq_offset = offsetof (struct reg, mq);
+
+ /* Floating-point registers. */
+ ppcobsd_reg_offsets.f0_offset = offsetof (struct reg, fpr);
+ ppcobsd_reg_offsets.fpscr_offset = -1;
+
+ /* AltiVec registers. */
+ ppcobsd_reg_offsets.vr0_offset = offsetof (struct vreg, vreg);
+ ppcobsd_reg_offsets.vscr_offset = offsetof (struct vreg, vscr);
+ ppcobsd_reg_offsets.vrsave_offset = offsetof (struct vreg, vrsave);
+}
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
new file mode 100644
index 00000000000..49a8601409e
--- /dev/null
+++ b/gdb/ppcobsd-tdep.c
@@ -0,0 +1,178 @@
+/* Target-dependent code for OpenBSD/powerpc.
+
+ Copyright 2004 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 "arch-utils.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "regset.h"
+#include "gdb_assert.h"
+
+#include "gdb_string.h"
+
+#include "ppc-tdep.h"
+#include "ppcobsd-tdep.h"
+#include "solib-svr4.h"
+
+/* Register offsets from <machine/reg.h>. */
+struct ppc_reg_offsets ppcobsd_reg_offsets;
+
+
+/* Core file support. */
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+ from the buffer specified by GREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+void
+ppcobsd_supply_gregset (const struct regset *regset,
+ struct regcache *regcache, int regnum,
+ const void *gregs, size_t len)
+{
+ /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+ point registers. Traditionally, GDB's register set has still
+ listed the floating point registers for such machines, so this
+ code is harmless. However, the new E500 port actually omits the
+ floating point registers entirely from the register set --- they
+ don't even have register numbers assigned to them.
+
+ It's not clear to me how best to update this code, so this assert
+ will alert the first person to encounter the OpenBSD/E500
+ combination to the problem. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ ppc_supply_gregset (regset, regcache, regnum, gregs, len);
+ ppc_supply_fpregset (regset, regcache, regnum, gregs, len);
+}
+
+/* Collect register REGNUM in the general-purpose register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ GREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+void
+ppcobsd_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache, int regnum,
+ void *gregs, size_t len)
+{
+ /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
+ point registers. Traditionally, GDB's register set has still
+ listed the floating point registers for such machines, so this
+ code is harmless. However, the new E500 port actually omits the
+ floating point registers entirely from the register set --- they
+ don't even have register numbers assigned to them.
+
+ It's not clear to me how best to update this code, so this assert
+ will alert the first person to encounter the OpenBSD/E500
+ combination to the problem. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
+ ppc_collect_gregset (regset, regcache, regnum, gregs, len);
+ ppc_collect_fpregset (regset, regcache, regnum, gregs, len);
+}
+
+/* OpenBS/powerpc register set. */
+
+struct regset ppcobsd_gregset =
+{
+ &ppcobsd_reg_offsets,
+ ppcobsd_supply_gregset
+};
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+ppcobsd_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= 412)
+ return &ppcobsd_gregset;
+
+ return NULL;
+}
+
+
+static void
+ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* OpenBSD uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, generic_in_solib_call_trampoline);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+ set_gdbarch_regset_from_core_section
+ (gdbarch, ppcobsd_regset_from_core_section);
+}
+
+
+/* OpenBSD uses uses the traditional NetBSD core file format, even for
+ ports that use ELF. */
+#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF
+
+static enum gdb_osabi
+ppcobsd_core_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
+ return GDB_OSABI_NETBSD_CORE;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_ppcobsd_tdep (void);
+
+void
+_initialize_ppcobsd_tdep (void)
+{
+ /* BFD doesn't set a flavour for NetBSD style a.out core files. */
+ gdbarch_register_osabi_sniffer (bfd_arch_powerpc, bfd_target_unknown_flavour,
+ ppcobsd_core_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_OPENBSD_ELF,
+ ppcobsd_init_abi);
+
+ /* Avoid initializing the register offsets again if they were
+ already initailized by ppcobsd-nat.c. */
+ if (ppcobsd_reg_offsets.pc_offset == 0)
+ {
+ /* General-purpose registers. */
+ ppcobsd_reg_offsets.r0_offset = 0;
+ ppcobsd_reg_offsets.pc_offset = 384;
+ ppcobsd_reg_offsets.ps_offset = 388;
+ ppcobsd_reg_offsets.cr_offset = 392;
+ ppcobsd_reg_offsets.lr_offset = 396;
+ ppcobsd_reg_offsets.ctr_offset = 400;
+ ppcobsd_reg_offsets.xer_offset = 404;
+ ppcobsd_reg_offsets.mq_offset = 408;
+
+ /* Floating-point registers. */
+ ppcobsd_reg_offsets.f0_offset = 128;
+ ppcobsd_reg_offsets.fpscr_offset = -1;
+
+ /* AltiVec registers. */
+ ppcobsd_reg_offsets.vr0_offset = 0;
+ ppcobsd_reg_offsets.vscr_offset = 512;
+ ppcobsd_reg_offsets.vrsave_offset = 520;
+ }
+}
diff --git a/gdb/ppcobsd-tdep.h b/gdb/ppcobsd-tdep.h
new file mode 100644
index 00000000000..8f29aaa32ea
--- /dev/null
+++ b/gdb/ppcobsd-tdep.h
@@ -0,0 +1,54 @@
+/* Target-dependent code for OpenBSD/powerpc.
+
+ Copyright 2004 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 PPCOBSD_TDEP_H
+#define PPCOBSD_TDEP_H
+
+#include <stddef.h>
+
+struct regset;
+struct regcache;
+
+/* Register offsets for OpenBSD/powerpc. */
+extern struct ppc_reg_offsets ppcobsd_reg_offsets;
+
+/* Register sets for OpenBSD/powerpc. */
+extern struct regset ppcobsd_gregset;
+
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+ from the buffer specified by GREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+extern void ppcobsd_supply_gregset (const struct regset *regset,
+ struct regcache *regcache, int regnum,
+ const void *gregs, size_t len);
+
+/* Collect register REGNUM in the general-purpose register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ GREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+extern void ppcobsd_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len);
+
+#endif /* ppcobsd-tdep.h */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9734ec12ed6..8b7d31d5101 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -499,9 +499,7 @@ print_scalar_formatted (void *valaddr, struct type *type, int format, int size,
if (*cp == '\0')
cp--;
}
- strcpy (buf, local_binary_format_prefix ());
- strcat (buf, cp);
- strcat (buf, local_binary_format_suffix ());
+ strcpy (buf, cp);
fputs_filtered (buf, stream);
}
break;
@@ -2146,18 +2144,18 @@ but no count or size letter (see \"x\" command).", NULL));
environment, the value is printed in its own window.");
set_cmd_completer (c, location_completer);
- add_show_from_set (
- add_set_cmd ("max-symbolic-offset", no_class, var_uinteger,
- (char *) &max_symbolic_offset,
+ deprecated_add_show_from_set
+ (add_set_cmd ("max-symbolic-offset", no_class, var_uinteger,
+ (char *) &max_symbolic_offset,
"Set the largest offset that will be printed in <symbol+1234> form.",
- &setprintlist),
- &showprintlist);
- add_show_from_set (
- add_set_cmd ("symbol-filename", no_class, var_boolean,
- (char *) &print_symbol_filename,
- "Set printing of source filename and line number with <symbol>.",
- &setprintlist),
- &showprintlist);
+ &setprintlist),
+ &showprintlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("symbol-filename", no_class, var_boolean,
+ (char *) &print_symbol_filename, "\
+Set printing of source filename and line number with <symbol>.",
+ &setprintlist),
+ &showprintlist);
/* For examine/instruction a single byte quantity is specified as
the data. This avoids problems with value_at_lazy() requiring a
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index e6d30ea01fe..ec8060ce2bb 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -784,7 +784,7 @@ _initialize_proc_api (void)
var_boolean, (char *) &procfs_trace,
"Set tracing for /proc api calls.\n", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_procfs_trace_cmd);
set_cmd_completer (c, filename_completer);
@@ -792,6 +792,6 @@ _initialize_proc_api (void)
(char *) &procfs_filename,
"Set filename for /proc tracefile.\n", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_procfs_file_cmd);
}
diff --git a/gdb/proc-why.c b/gdb/proc-why.c
index 15af16cb171..babaff5ae99 100644
--- a/gdb/proc-why.c
+++ b/gdb/proc-why.c
@@ -154,7 +154,7 @@ proc_prettyfprint_why (FILE *file, unsigned long why, unsigned long what,
#endif
#ifdef PR_DEAD
case PR_DEAD:
- fprintf (file, "Exit status: %d\n", what);
+ fprintf (file, "Exit status: %ld\n", what);
break;
#endif
default:
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 352b735c868..0a1f1528b3a 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -124,7 +124,7 @@ static void procfs_notice_signals (ptid_t);
static void procfs_prepare_to_store (void);
static void procfs_kill_inferior (void);
static void procfs_mourn_inferior (void);
-static void procfs_create_inferior (char *, char *, char **);
+static void procfs_create_inferior (char *, char *, char **, int);
static ptid_t procfs_wait (ptid_t, struct target_waitstatus *);
static int procfs_xfer_memory (CORE_ADDR, char *, int, int,
struct mem_attrib *attrib,
@@ -3382,6 +3382,17 @@ proc_iterate_over_threads (procinfo *pi,
static ptid_t do_attach (ptid_t ptid);
static void do_detach (int signo);
static int register_gdb_signals (procinfo *, gdb_sigset_t *);
+static void proc_trace_syscalls_1 (procinfo *pi, int syscallnum,
+ int entry_or_exit, int mode, int from_tty);
+static int insert_dbx_link_breakpoint (procinfo *pi);
+static void remove_dbx_link_breakpoint (void);
+
+/* On mips-irix, we need to insert a breakpoint at __dbx_link during
+ the startup phase. The following two variables are used to record
+ the address of the breakpoint, and the code that was replaced by
+ a breakpoint. */
+static int dbx_link_bpt_addr = 0;
+static char dbx_link_shadow_contents[BREAKPOINT_MAX];
/*
* Function: procfs_debug_inferior
@@ -3545,24 +3556,29 @@ procfs_attach (char *args, int from_tty)
static void
procfs_detach (char *args, int from_tty)
{
- char *exec_file;
- int signo = 0;
+ int sig = 0;
+
+ if (args)
+ sig = atoi (args);
if (from_tty)
{
+ int pid = PIDGET (inferior_ptid);
+ char *exec_file;
+
exec_file = get_exec_file (0);
- if (exec_file == 0)
+ if (exec_file == NULL)
exec_file = "";
- printf_filtered ("Detaching from program: %s %s\n",
- exec_file, target_pid_to_str (inferior_ptid));
- fflush (stdout);
+
+ printf_filtered ("Detaching from program: %s, %s\n", exec_file,
+ target_pid_to_str (pid_to_ptid (pid)));
+ gdb_flush (gdb_stdout);
}
- if (args)
- signo = atoi (args);
- do_detach (signo);
+ do_detach (sig);
+
inferior_ptid = null_ptid;
- unpush_target (&procfs_ops); /* Pop out of handling an inferior */
+ unpush_target (&procfs_ops);
}
static ptid_t
@@ -4065,6 +4081,22 @@ wait_again:
address. */
wstat = (SIGTRAP << 8) | 0177;
}
+#ifdef SYS_syssgi
+ else if (what == SYS_syssgi)
+ {
+ /* see if we can break on dbx_link(). If yes, then
+ we no longer need the SYS_syssgi notifications. */
+ if (insert_dbx_link_breakpoint (pi))
+ proc_trace_syscalls_1 (pi, SYS_syssgi, PR_SYSEXIT,
+ FLAG_RESET, 0);
+
+ /* This is an internal event and should be transparent
+ to wfi, so resume the execution and wait again. See
+ comment in procfs_init_inferior() for more details. */
+ target_resume (ptid, 0, TARGET_SIGNAL_0);
+ goto wait_again;
+ }
+#endif
else if (syscall_is_lwp_create (pi, what))
{
/*
@@ -4191,6 +4223,13 @@ wait_again:
#if (FLTTRACE != FLTBPT) /* avoid "duplicate case" error */
case FLTTRACE:
#endif
+ /* If we hit our __dbx_link() internal breakpoint,
+ then remove it. See comments in procfs_init_inferior()
+ for more details. */
+ if (dbx_link_bpt_addr != 0
+ && dbx_link_bpt_addr == read_pc ())
+ remove_dbx_link_breakpoint ();
+
wstat = (SIGTRAP << 8) | 0177;
break;
case FLTSTACK:
@@ -4842,6 +4881,32 @@ procfs_init_inferior (int pid)
/* Typically two, one trap to exec the shell, one to exec the
program being debugged. Defined by "inferior.h". */
startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
+
+#ifdef SYS_syssgi
+ /* On mips-irix, we need to stop the inferior early enough during
+ the startup phase in order to be able to load the shared library
+ symbols and insert the breakpoints that are located in these shared
+ libraries. Stopping at the program entry point is not good enough
+ because the -init code is executed before the execution reaches
+ that point.
+
+ So what we need to do is to insert a breakpoint in the runtime
+ loader (rld), more precisely in __dbx_link(). This procedure is
+ called by rld once all shared libraries have been mapped, but before
+ the -init code is executed. Unfortuantely, this is not straightforward,
+ as rld is not part of the executable we are running, and thus we need
+ the inferior to run until rld itself has been mapped in memory.
+
+ For this, we trace all syssgi() syscall exit events. Each time
+ we detect such an event, we iterate over each text memory maps,
+ get its associated fd, and scan the symbol table for __dbx_link().
+ When found, we know that rld has been mapped, and that we can insert
+ the breakpoint at the symbol address. Once the dbx_link() breakpoint
+ has been inserted, the syssgi() notifications are no longer necessary,
+ so they should be canceled. */
+ proc_trace_syscalls_1 (pi, SYS_syssgi, PR_SYSEXIT, FLAG_SET, 0);
+ dbx_link_bpt_addr = 0;
+#endif
}
/*
@@ -4972,7 +5037,8 @@ procfs_set_exec_trap (void)
*/
static void
-procfs_create_inferior (char *exec_file, char *allargs, char **env)
+procfs_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
char *shell_file = getenv ("SHELL");
char *tryname;
@@ -5047,6 +5113,16 @@ procfs_create_inferior (char *exec_file, char *allargs, char **env)
fork_inferior (exec_file, allargs, env, procfs_set_exec_trap,
procfs_init_inferior, NULL, shell_file);
+#ifdef SYS_syssgi
+ /* Make sure to cancel the syssgi() syscall-exit notifications.
+ They should normally have been removed by now, but they may still
+ be activated if the inferior doesn't use shared libraries, or if
+ we didn't locate __dbx_link, or if we never stopped in __dbx_link.
+ See procfs_init_inferior() for more details. */
+ proc_trace_syscalls_1 (find_procinfo_or_die (PIDGET (inferior_ptid), 0),
+ SYS_syssgi, PR_SYSEXIT, FLAG_RESET, 0);
+#endif
+
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
@@ -5121,29 +5197,19 @@ procfs_thread_alive (ptid_t ptid)
return 1;
}
-/*
- * Function: target_pid_to_str
- *
- * Return a string to be used to identify the thread in
- * the "info threads" display.
- */
+/* Convert PTID to a string. Returns the string in a static buffer. */
char *
procfs_pid_to_str (ptid_t ptid)
{
static char buf[80];
- int proc, thread;
- procinfo *pi;
- proc = PIDGET (ptid);
- thread = TIDGET (ptid);
- pi = find_procinfo (proc, thread);
-
- if (thread == 0)
- sprintf (buf, "Process %d", proc);
+ if (TIDGET (ptid) == 0)
+ sprintf (buf, "process %d", PIDGET (ptid));
else
- sprintf (buf, "LWP %d", thread);
- return &buf[0];
+ sprintf (buf, "LWP %ld", TIDGET (ptid));
+
+ return buf;
}
/*
@@ -5519,6 +5585,131 @@ proc_find_memory_regions (int (*func) (CORE_ADDR,
find_memory_regions_callback);
}
+/* Remove the breakpoint that we inserted in __dbx_link().
+ Does nothing if the breakpoint hasn't been inserted or has already
+ been removed. */
+
+static void
+remove_dbx_link_breakpoint (void)
+{
+ if (dbx_link_bpt_addr == 0)
+ return;
+
+ if (memory_remove_breakpoint (dbx_link_bpt_addr,
+ dbx_link_shadow_contents) != 0)
+ warning ("Unable to remove __dbx_link breakpoint.");
+
+ dbx_link_bpt_addr = 0;
+}
+
+/* Return the address of the __dbx_link() function in the file
+ refernced by ABFD by scanning its symbol table. Return 0 if
+ the symbol was not found. */
+
+static CORE_ADDR
+dbx_link_addr (bfd *abfd)
+{
+ long storage_needed;
+ asymbol **symbol_table;
+ long number_of_symbols;
+ long i;
+
+ storage_needed = bfd_get_symtab_upper_bound (abfd);
+ if (storage_needed <= 0)
+ return 0;
+
+ symbol_table = (asymbol **) xmalloc (storage_needed);
+ make_cleanup (xfree, symbol_table);
+
+ number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
+
+ for (i = 0; i < number_of_symbols; i++)
+ {
+ asymbol *sym = symbol_table[i];
+
+ if ((sym->flags & BSF_GLOBAL)
+ && sym->name != NULL && strcmp (sym->name, "__dbx_link") == 0)
+ return (sym->value + sym->section->vma);
+ }
+
+ /* Symbol not found, return NULL. */
+ return 0;
+}
+
+/* Search the symbol table of the file referenced by FD for a symbol
+ named __dbx_link(). If found, then insert a breakpoint at this location,
+ and return nonzero. Return zero otherwise. */
+
+static int
+insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored)
+{
+ bfd *abfd;
+ long storage_needed;
+ CORE_ADDR sym_addr;
+
+ abfd = bfd_fdopenr ("unamed", 0, fd);
+ if (abfd == NULL)
+ {
+ warning ("Failed to create a bfd: %s.\n", bfd_errmsg (bfd_get_error ()));
+ return 0;
+ }
+
+ if (!bfd_check_format (abfd, bfd_object))
+ {
+ /* Not the correct format, so we can not possibly find the dbx_link
+ symbol in it. */
+ bfd_close (abfd);
+ return 0;
+ }
+
+ sym_addr = dbx_link_addr (abfd);
+ if (sym_addr != 0)
+ {
+ /* Insert the breakpoint. */
+ dbx_link_bpt_addr = sym_addr;
+ if (target_insert_breakpoint (sym_addr, dbx_link_shadow_contents) != 0)
+ {
+ warning ("Failed to insert dbx_link breakpoint.");
+ bfd_close (abfd);
+ return 0;
+ }
+ bfd_close (abfd);
+ return 1;
+ }
+
+ bfd_close (abfd);
+ return 0;
+}
+
+/* If the given memory region MAP contains a symbol named __dbx_link,
+ insert a breakpoint at this location and return nonzero. Return
+ zero otherwise. */
+
+static int
+insert_dbx_link_bpt_in_region (struct prmap *map,
+ int (*child_func) (),
+ void *data)
+{
+ procinfo *pi = (procinfo *) data;
+
+ /* We know the symbol we're looking for is in a text region, so
+ only look for it if the region is a text one. */
+ if (map->pr_mflags & MA_EXEC)
+ return solib_mappings_callback (map, insert_dbx_link_bpt_in_file, pi);
+
+ return 0;
+}
+
+/* Search all memory regions for a symbol named __dbx_link. If found,
+ insert a breakpoint at its location, and return nonzero. Return zero
+ otherwise. */
+
+static int
+insert_dbx_link_breakpoint (procinfo *pi)
+{
+ return iterate_over_mappings (pi, NULL, pi, insert_dbx_link_bpt_in_region);
+}
+
/*
* Function: mappingflags
*
@@ -5707,12 +5898,50 @@ info_proc_cmd (char *args, int from_tty)
do_cleanups (old_chain);
}
+/* Modify the status of the system call identified by SYSCALLNUM in
+ the set of syscalls that are currently traced/debugged.
+
+ If ENTRY_OR_EXIT is set to PR_SYSENTRY, then the entry syscalls set
+ will be updated. Otherwise, the exit syscalls set will be updated.
+
+ If MODE is FLAG_SET, then traces will be enabled. Otherwise, they
+ will be disabled. */
+
+static void
+proc_trace_syscalls_1 (procinfo *pi, int syscallnum, int entry_or_exit,
+ int mode, int from_tty)
+{
+ sysset_t *sysset;
+
+ if (entry_or_exit == PR_SYSENTRY)
+ sysset = proc_get_traced_sysentry (pi, NULL);
+ else
+ sysset = proc_get_traced_sysexit (pi, NULL);
+
+ if (sysset == NULL)
+ proc_error (pi, "proc-trace, get_traced_sysset", __LINE__);
+
+ if (mode == FLAG_SET)
+ gdb_praddsysset (sysset, syscallnum);
+ else
+ gdb_prdelsysset (sysset, syscallnum);
+
+ if (entry_or_exit == PR_SYSENTRY)
+ {
+ if (!proc_set_traced_sysentry (pi, sysset))
+ proc_error (pi, "proc-trace, set_traced_sysentry", __LINE__);
+ }
+ else
+ {
+ if (!proc_set_traced_sysexit (pi, sysset))
+ proc_error (pi, "proc-trace, set_traced_sysexit", __LINE__);
+ }
+}
+
static void
proc_trace_syscalls (char *args, int from_tty, int entry_or_exit, int mode)
{
procinfo *pi;
- sysset_t *sysset;
- int syscallnum = 0;
if (PIDGET (inferior_ptid) <= 0)
error ("you must be debugging a process to use this command.");
@@ -5723,30 +5952,9 @@ proc_trace_syscalls (char *args, int from_tty, int entry_or_exit, int mode)
pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
if (isdigit (args[0]))
{
- syscallnum = atoi (args);
- if (entry_or_exit == PR_SYSENTRY)
- sysset = proc_get_traced_sysentry (pi, NULL);
- else
- sysset = proc_get_traced_sysexit (pi, NULL);
-
- if (sysset == NULL)
- proc_error (pi, "proc-trace, get_traced_sysset", __LINE__);
-
- if (mode == FLAG_SET)
- gdb_praddsysset (sysset, syscallnum);
- else
- gdb_prdelsysset (sysset, syscallnum);
+ const int syscallnum = atoi (args);
- if (entry_or_exit == PR_SYSENTRY)
- {
- if (!proc_set_traced_sysentry (pi, sysset))
- proc_error (pi, "proc-trace, set_traced_sysentry", __LINE__);
- }
- else
- {
- if (!proc_set_traced_sysexit (pi, sysset))
- proc_error (pi, "proc-trace, set_traced_sysexit", __LINE__);
- }
+ proc_trace_syscalls_1 (pi, syscallnum, entry_or_exit, mode, from_tty);
}
}
diff --git a/gdb/rdi-share/ardi.c b/gdb/rdi-share/ardi.c
index bb10ca6732e..d4b2cb38401 100644
--- a/gdb/rdi-share/ardi.c
+++ b/gdb/rdi-share/ardi.c
@@ -1353,7 +1353,7 @@ void angel_RDI_stop_request(void)
static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
unsigned ninstr)
{
- extern int (*ui_loop_hook) (int);
+ extern int (*deprecated_ui_loop_hook) (int);
int err;
adp_stopped_struct stopped_info;
void* stateptr = (void *)&stopped_info;
@@ -1414,8 +1414,8 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
signal(SIGINT, ardi_sigint_handler);
while( executing )
{
- if (ui_loop_hook)
- ui_loop_hook(0);
+ if (deprecated_ui_loop_hook)
+ deprecated_ui_loop_hook(0);
if (interrupt_request || stop_request)
{
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c455e46690e..12721c330e3 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -30,6 +30,7 @@
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdbcmd.h" /* For maintenanceprintlist. */
+#include "observer.h"
/*
* DATA STRUCTURE
@@ -47,10 +48,6 @@ struct regcache_descr
/* The architecture this descriptor belongs to. */
struct gdbarch *gdbarch;
- /* Is this a ``legacy'' register cache? Such caches reserve space
- for raw and pseudo registers and allow access to both. */
- int legacy_p;
-
/* The raw register cache. Each raw (or hard) register is supplied
by the target interface. The raw cache should not contain
redundant information - if the PC is constructed from two
@@ -63,9 +60,9 @@ struct regcache_descr
/* The cooked register space. Each cooked register in the range
[0..NR_RAW_REGISTERS) is direct-mapped onto the corresponding raw
register. The remaining [NR_RAW_REGISTERS
- .. NR_COOKED_REGISTERS) (a.k.a. pseudo regiters) are mapped onto
+ .. NR_COOKED_REGISTERS) (a.k.a. pseudo registers) are mapped onto
both raw registers and memory by the architecture methods
- gdbarch_register_read and gdbarch_register_write. */
+ gdbarch_pseudo_register_read and gdbarch_pseudo_register_write. */
int nr_cooked_registers;
long sizeof_cooked_registers;
long sizeof_cooked_register_valid_p;
@@ -83,66 +80,6 @@ struct regcache_descr
struct type **register_type;
};
-static void
-init_legacy_regcache_descr (struct gdbarch *gdbarch,
- struct regcache_descr *descr)
-{
- int i;
- /* FIXME: cagney/2002-05-11: gdbarch_data() should take that
- ``gdbarch'' as a parameter. */
- gdb_assert (gdbarch != NULL);
-
- /* Compute the offset of each register. Legacy architectures define
- DEPRECATED_REGISTER_BYTE() so use that. */
- /* FIXME: cagney/2002-11-07: Instead of using
- DEPRECATED_REGISTER_BYTE() this code should, as is done in
- init_regcache_descr(), compute the offets at runtime. This
- currently isn't possible as some ISAs define overlapping register
- regions - see the mess in read_register_bytes() and
- write_register_bytes() registers. */
- descr->sizeof_register
- = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
- descr->register_offset
- = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
- for (i = 0; i < descr->nr_cooked_registers; i++)
- {
- /* FIXME: cagney/2001-12-04: This code shouldn't need to use
- DEPRECATED_REGISTER_BYTE(). Unfortunately, legacy code likes
- to lay the buffer out so that certain registers just happen
- to overlap. Ulgh! New targets use gdbarch's register
- read/write and entirely avoid this uglyness. */
- descr->register_offset[i] = DEPRECATED_REGISTER_BYTE (i);
- descr->sizeof_register[i] = DEPRECATED_REGISTER_RAW_SIZE (i);
- gdb_assert (MAX_REGISTER_SIZE >= DEPRECATED_REGISTER_RAW_SIZE (i));
- gdb_assert (MAX_REGISTER_SIZE >= DEPRECATED_REGISTER_VIRTUAL_SIZE (i));
- }
-
- /* Compute the real size of the register buffer. Start out by
- trusting DEPRECATED_REGISTER_BYTES, but then adjust it upwards
- should that be found to not be sufficient. */
- /* FIXME: cagney/2002-11-05: Instead of using the macro
- DEPRECATED_REGISTER_BYTES, this code should, as is done in
- init_regcache_descr(), compute the total number of register bytes
- using the accumulated offsets. */
- descr->sizeof_cooked_registers = DEPRECATED_REGISTER_BYTES; /* OK */
- for (i = 0; i < descr->nr_cooked_registers; i++)
- {
- long regend;
- /* Keep extending the buffer so that there is always enough
- space for all registers. The comparison is necessary since
- legacy code is free to put registers in random places in the
- buffer separated by holes. Once DEPRECATED_REGISTER_BYTE()
- is killed this can be greatly simplified. */
- regend = descr->register_offset[i] + descr->sizeof_register[i];
- if (descr->sizeof_cooked_registers < regend)
- descr->sizeof_cooked_registers = regend;
- }
- /* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
- in the register cache. Unfortunately some architectures still
- rely on this and the pseudo_register_write() method. */
- descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
-}
-
static void *
init_regcache_descr (struct gdbarch *gdbarch)
{
@@ -164,15 +101,7 @@ init_regcache_descr (struct gdbarch *gdbarch)
descr->register_type
= GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, struct type *);
for (i = 0; i < descr->nr_cooked_registers; i++)
- {
- if (gdbarch_register_type_p (gdbarch))
- {
- gdb_assert (!DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()); /* OK */
- descr->register_type[i] = gdbarch_register_type (gdbarch, i);
- }
- else
- descr->register_type[i] = DEPRECATED_REGISTER_VIRTUAL_TYPE (i); /* OK */
- }
+ descr->register_type[i] = gdbarch_register_type (gdbarch, i);
/* Construct a strictly RAW register cache. Don't allow pseudo's
into the register cache. */
@@ -184,26 +113,6 @@ init_regcache_descr (struct gdbarch *gdbarch)
.. NUM_REGS + NUM_PSEUDO_REGS). */
descr->sizeof_raw_register_valid_p = descr->sizeof_cooked_register_valid_p;
- /* If an old style architecture, fill in the remainder of the
- register cache descriptor using the register macros. */
- /* NOTE: cagney/2003-06-29: If either of DEPRECATED_REGISTER_BYTE or
- DEPRECATED_REGISTER_RAW_SIZE are still present, things are most likely
- totally screwed. Ex: an architecture with raw register sizes
- smaller than what DEPRECATED_REGISTER_BYTE indicates; non
- monotonic DEPRECATED_REGISTER_BYTE values. For GDB 6 check for
- these nasty methods and fall back to legacy code when present.
- Sigh! */
- if ((!gdbarch_pseudo_register_read_p (gdbarch)
- && !gdbarch_pseudo_register_write_p (gdbarch)
- && !gdbarch_register_type_p (gdbarch))
- || DEPRECATED_REGISTER_BYTE_P ()
- || DEPRECATED_REGISTER_RAW_SIZE_P ())
- {
- descr->legacy_p = 1;
- init_legacy_regcache_descr (gdbarch, descr);
- return descr;
- }
-
/* Lay out the register cache.
NOTE: cagney/2002-05-22: Only register_type() is used when
@@ -235,20 +144,6 @@ init_regcache_descr (struct gdbarch *gdbarch)
buffer. Ulgh! */
descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
- /* Sanity check. Confirm that there is agreement between the
- regcache and the target's redundant DEPRECATED_REGISTER_BYTE (new
- targets should not even be defining it). */
- for (i = 0; i < descr->nr_cooked_registers; i++)
- {
- if (DEPRECATED_REGISTER_BYTE_P ())
- gdb_assert (descr->register_offset[i] == DEPRECATED_REGISTER_BYTE (i));
-#if 0
- gdb_assert (descr->sizeof_register[i] == DEPRECATED_REGISTER_RAW_SIZE (i));
- gdb_assert (descr->sizeof_register[i] == DEPRECATED_REGISTER_VIRTUAL_SIZE (i));
-#endif
- }
- /* gdb_assert (descr->sizeof_raw_registers == DEPRECATED_REGISTER_BYTES (i)); */
-
return descr;
}
@@ -279,11 +174,6 @@ register_size (struct gdbarch *gdbarch, int regnum)
int size;
gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
size = descr->sizeof_register[regnum];
- /* NB: The deprecated DEPRECATED_REGISTER_RAW_SIZE, if not provided, defaults
- to the size of the register's type. */
- gdb_assert (size == DEPRECATED_REGISTER_RAW_SIZE (regnum)); /* OK */
- /* NB: Don't check the register's virtual size. It, in say the case
- of the MIPS, may not match the raw size! */
return size;
}
@@ -558,12 +448,12 @@ set_register_cached (int regnum, int state)
current_regcache->register_valid_p[regnum] = state;
}
-/* Return whether register REGNUM is a real register. */
+/* Observer for the target_changed event. */
-static int
-real_register (int regnum)
+void
+regcache_observer_target_changed (struct target_ops *target)
{
- return regnum >= 0 && regnum < NUM_REGS;
+ registers_changed ();
}
/* Low level examining and depositing of registers.
@@ -594,20 +484,17 @@ registers_changed (void)
for (i = 0; i < current_regcache->descr->nr_raw_registers; i++)
set_register_cached (i, 0);
- if (registers_changed_hook)
- registers_changed_hook ();
+ if (deprecated_registers_changed_hook)
+ deprecated_registers_changed_hook ();
}
/* DEPRECATED_REGISTERS_FETCHED ()
Indicate that all registers have been fetched, so mark them all valid. */
-/* NOTE: cagney/2001-12-04: This function does not set valid on the
- pseudo-register range since pseudo registers are always supplied
- using supply_register(). */
/* FIXME: cagney/2001-12-04: This function is DEPRECATED. The target
code was blatting the registers[] array and then calling this.
- Since targets should only be using supply_register() the need for
+ Since targets should only be using regcache_raw_supply() the need for
this function/hack is eliminated. */
void
@@ -662,7 +549,7 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
int byte;
reg_start = DEPRECATED_REGISTER_BYTE (regnum);
- reg_len = DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ reg_len = register_size (current_gdbarch, regnum);
reg_end = reg_start + reg_len;
if (reg_end <= in_start || in_end <= reg_start)
@@ -708,43 +595,11 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
}
}
-/* Read register REGNUM into memory at MYADDR, which must be large
- enough for REGISTER_RAW_BYTES (REGNUM). Target byte-order. If the
- register is known to be the size of a CORE_ADDR or smaller,
- read_register can be used instead. */
-
-static void
-legacy_read_register_gen (int regnum, char *myaddr)
-{
- gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
- if (! ptid_equal (registers_ptid, inferior_ptid))
- {
- registers_changed ();
- registers_ptid = inferior_ptid;
- }
-
- if (!register_cached (regnum))
- target_fetch_registers (regnum);
-
- memcpy (myaddr, register_buffer (current_regcache, regnum),
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
-}
-
void
regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
{
gdb_assert (regcache != NULL && buf != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
- if (regcache->descr->legacy_p
- && !regcache->readonly_p)
- {
- gdb_assert (regcache == current_regcache);
- /* For moment, just use underlying legacy code. Ulgh!!! This
- silently and very indirectly updates the regcache's regcache
- via the global deprecated_register_valid[]. */
- legacy_read_register_gen (regnum, buf);
- return;
- }
/* Make certain that the register cache is up-to-date with respect
to the current thread. This switching shouldn't be necessary
only there is still only one target side register cache. Sigh!
@@ -759,6 +614,15 @@ regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
}
if (!register_cached (regnum))
target_fetch_registers (regnum);
+#if 0
+ /* FIXME: cagney/2004-08-07: At present a number of targets
+ forget (or didn't know that they needed) set this leading to
+ panics. Also is the problem that target's need to indicate
+ that a register is in one of the possible states: valid,
+ undefined, unknown. The last of which isn't yet
+ possible. */
+ gdb_assert (register_cached (regnum));
+#endif
}
/* Copy the value directly into the register cache. */
memcpy (buf, register_buffer (regcache, regnum),
@@ -818,11 +682,6 @@ deprecated_read_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
- if (current_regcache->descr->legacy_p)
- {
- legacy_read_register_gen (regnum, buf);
- return;
- }
regcache_cooked_read (current_regcache, regnum, buf);
}
@@ -836,7 +695,7 @@ regcache_cooked_read (struct regcache *regcache, int regnum, void *buf)
else if (regcache->readonly_p
&& regnum < regcache->descr->nr_cooked_registers
&& regcache->register_valid_p[regnum])
- /* Read-only register cache, perhaphs the cooked value was cached? */
+ /* Read-only register cache, perhaps the cooked value was cached? */
memcpy (buf, register_buffer (regcache, regnum),
regcache->descr->sizeof_register[regnum]);
else
@@ -894,46 +753,6 @@ regcache_cooked_write_unsigned (struct regcache *regcache, int regnum,
regcache_cooked_write (regcache, regnum, buf);
}
-/* Write register REGNUM at MYADDR to the target. MYADDR points at
- REGISTER_RAW_BYTES(REGNUM), which must be in target byte-order. */
-
-static void
-legacy_write_register_gen (int regnum, const void *myaddr)
-{
- int size;
- gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
-
- /* On the sparc, writing %g0 is a no-op, so we don't even want to
- change the registers array if something writes to this register. */
- if (CANNOT_STORE_REGISTER (regnum))
- return;
-
- if (! ptid_equal (registers_ptid, inferior_ptid))
- {
- registers_changed ();
- registers_ptid = inferior_ptid;
- }
-
- size = DEPRECATED_REGISTER_RAW_SIZE (regnum);
-
- if (real_register (regnum))
- {
- /* If we have a valid copy of the register, and new value == old
- value, then don't bother doing the actual store. */
- if (register_cached (regnum)
- && (memcmp (register_buffer (current_regcache, regnum), myaddr, size)
- == 0))
- return;
- else
- target_prepare_to_store ();
- }
-
- memcpy (register_buffer (current_regcache, regnum), myaddr, size);
-
- set_register_cached (regnum, 1);
- target_store_registers (regnum);
-}
-
void
regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
{
@@ -941,16 +760,6 @@ regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
gdb_assert (!regcache->readonly_p);
- if (regcache->descr->legacy_p)
- {
- /* For moment, just use underlying legacy code. Ulgh!!! This
- silently and very indirectly updates the regcache's buffers
- via the globals deprecated_register_valid[] and registers[]. */
- gdb_assert (regcache == current_regcache);
- legacy_write_register_gen (regnum, buf);
- return;
- }
-
/* On the sparc, writing %g0 is a no-op, so we don't even want to
change the registers array if something writes to this register. */
if (CANNOT_STORE_REGISTER (regnum))
@@ -983,11 +792,6 @@ deprecated_write_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
- if (current_regcache->descr->legacy_p)
- {
- legacy_write_register_gen (regnum, buf);
- return;
- }
regcache_cooked_write (current_regcache, regnum, buf);
}
@@ -1024,7 +828,7 @@ deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
int regstart, regend;
regstart = DEPRECATED_REGISTER_BYTE (regnum);
- regend = regstart + DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ regend = regstart + register_size (current_gdbarch, regnum);
/* Is this register completely outside the range the user is writing? */
if (myregend <= regstart || regend <= myregstart)
@@ -1148,14 +952,22 @@ register_offset_hack (struct gdbarch *gdbarch, int regnum)
return descr->register_offset[regnum];
}
+/* Hack to keep code using register_bytes working. */
+
+int
+deprecated_register_bytes (void)
+{
+ return current_regcache->descr->sizeof_raw_registers;
+}
+
/* Return the contents of register REGNUM as an unsigned integer. */
ULONGEST
read_register (int regnum)
{
- char *buf = alloca (DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ char *buf = alloca (register_size (current_gdbarch, regnum));
deprecated_read_register_gen (regnum, buf);
- return (extract_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum)));
+ return (extract_unsigned_integer (buf, register_size (current_gdbarch, regnum)));
}
ULONGEST
@@ -1186,7 +998,7 @@ write_register (int regnum, LONGEST val)
{
void *buf;
int size;
- size = DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ size = register_size (current_gdbarch, regnum);
buf = alloca (size);
store_signed_integer (buf, size, (LONGEST) val);
deprecated_write_register_gen (regnum, buf);
@@ -1212,46 +1024,6 @@ write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid)
inferior_ptid = save_ptid;
}
-/* FIXME: kettenis/20030828: We should get rid of supply_register and
- regcache_collect in favour of regcache_raw_supply and
- regcache_raw_collect. */
-
-/* SUPPLY_REGISTER()
-
- Record that register REGNUM contains VAL. This is used when the
- value is obtained from the inferior or core dump, so there is no
- need to store the value there.
-
- If VAL is a NULL pointer, then it's probably an unsupported register.
- We just set its value to all zeros. We might want to record this
- fact, and report it to the users of read_register and friends. */
-
-void
-supply_register (int regnum, const void *val)
-{
- regcache_raw_supply (current_regcache, regnum, val);
-
- /* On some architectures, e.g. HPPA, there are a few stray bits in
- some registers, that the rest of the code would like to ignore. */
-
- /* NOTE: cagney/2001-03-16: The macro CLEAN_UP_REGISTER_VALUE is
- going to be deprecated. Instead architectures will leave the raw
- register value as is and instead clean things up as they pass
- through the method gdbarch_pseudo_register_read() clean up the
- values. */
-
-#ifdef DEPRECATED_CLEAN_UP_REGISTER_VALUE
- DEPRECATED_CLEAN_UP_REGISTER_VALUE \
- (regnum, register_buffer (current_regcache, regnum));
-#endif
-}
-
-void
-regcache_collect (int regnum, void *buf)
-{
- regcache_raw_collect (current_regcache, regnum, buf);
-}
-
/* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */
void
@@ -1302,19 +1074,18 @@ regcache_raw_collect (const struct regcache *regcache, int regnum, void *buf)
}
-/* read_pc, write_pc, read_sp, deprecated_read_fp, etc. Special
- handling for registers PC, SP, and FP. */
+/* read_pc, write_pc, read_sp, etc. Special handling for registers
+ PC, SP, and FP. */
-/* 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. */
+/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc() and
+ read_sp(), 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. */
/* 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? */
+ write_pc_pid() and write_pc(), all need to be replaced by something
+ that does not rely on global state. But what? */
CORE_ADDR
read_pc_pid (ptid_t ptid)
@@ -1393,24 +1164,6 @@ read_sp (void)
internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP");
}
-void
-deprecated_write_sp (CORE_ADDR val)
-{
- gdb_assert (SP_REGNUM >= 0);
- write_register (SP_REGNUM, val);
-}
-
-CORE_ADDR
-deprecated_read_fp (void)
-{
- if (DEPRECATED_TARGET_READ_FP_P ())
- return DEPRECATED_TARGET_READ_FP ();
- else if (DEPRECATED_FP_REGNUM >= 0)
- return read_register (DEPRECATED_FP_REGNUM);
- else
- internal_error (__FILE__, __LINE__, "deprecated_read_fp");
-}
-
static void
reg_flush_command (char *command, int from_tty)
{
@@ -1469,7 +1222,6 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
unsigned char buf[MAX_REGISTER_SIZE];
#if 0
- fprintf_unfiltered (file, "legacy_p %d\n", regcache->descr->legacy_p);
fprintf_unfiltered (file, "nr_raw_registers %d\n",
regcache->descr->nr_raw_registers);
fprintf_unfiltered (file, "nr_cooked_registers %d\n",
@@ -1543,25 +1295,8 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
if (regnum < 0)
fprintf_unfiltered (file, " %5s ", "Size");
else
- {
- fprintf_unfiltered (file, " %5ld",
- regcache->descr->sizeof_register[regnum]);
- if ((regcache->descr->sizeof_register[regnum]
- != DEPRECATED_REGISTER_RAW_SIZE (regnum))
- || (regcache->descr->sizeof_register[regnum]
- != DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))
- || (regcache->descr->sizeof_register[regnum]
- != TYPE_LENGTH (register_type (regcache->descr->gdbarch,
- regnum)))
- )
- {
- if (!footnote_register_size)
- footnote_register_size = ++footnote_nr;
- fprintf_unfiltered (file, "*%d", footnote_register_size);
- }
- else
- fprintf_unfiltered (file, " ");
- }
+ fprintf_unfiltered (file, " %5ld",
+ regcache->descr->sizeof_register[regnum]);
/* Type. */
{
@@ -1577,7 +1312,7 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
char *n;
if (!footnote_register_type_name_null)
footnote_register_type_name_null = ++footnote_nr;
- xasprintf (&n, "*%d", footnote_register_type_name_null);
+ n = xstrprintf ("*%d", footnote_register_type_name_null);
make_cleanup (xfree, n);
t = n;
}
@@ -1605,7 +1340,7 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
regcache_raw_read (regcache, regnum, buf);
fprintf_unfiltered (file, "0x");
dump_endian_bytes (file, TARGET_BYTE_ORDER, buf,
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ regcache->descr->sizeof_register[regnum]);
}
}
@@ -1619,7 +1354,7 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
regcache_cooked_read (regcache, regnum, buf);
fprintf_unfiltered (file, "0x");
dump_endian_bytes (file, TARGET_BYTE_ORDER, buf,
- DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
+ regcache->descr->sizeof_register[regnum]);
}
}
@@ -1711,6 +1446,8 @@ _initialize_regcache (void)
DEPRECATED_REGISTER_GDBARCH_SWAP (deprecated_register_valid);
deprecated_register_gdbarch_swap (NULL, 0, build_regcache);
+ observer_attach_target_changed (regcache_observer_target_changed);
+
add_com ("flushregs", class_maintenance, reg_flush_command,
"Force gdb to flush its register cache (maintainer command)");
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 26a1b8a38e3..ed9c9907fde 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -96,8 +96,6 @@ void regcache_cooked_write_part (struct regcache *regcache, int regnum,
target. These functions are called by the target in response to a
target_fetch_registers() or target_store_registers(). */
-extern void supply_register (int regnum, const void *val);
-extern void regcache_collect (int regnum, void *buf);
extern void regcache_raw_supply (struct regcache *regcache,
int regnum, const void *buf);
extern void regcache_raw_collect (const struct regcache *regcache,
@@ -115,48 +113,20 @@ extern void regcache_raw_collect (const struct regcache *regcache,
extern int register_offset_hack (struct gdbarch *gdbarch, int regnum);
+/* Similar. The total number of bytes occupied by a regcache. */
-/* The type of a register. This function is slightly more efficient
- then its gdbarch vector counterpart since it returns a precomputed
- value stored in a table.
+extern int deprecated_register_bytes (void );
- NOTE: cagney/2002-08-17: The original macro was called
- DEPRECATED_REGISTER_VIRTUAL_TYPE. This was because the register
- could have different raw and cooked (nee virtual) representations.
- The CONVERTABLE methods being used to convert between the two
- representations. Current code does not do this. Instead, the
- first [0..NUM_REGS) registers are 1:1 raw:cooked, and the type
- exactly describes the register's representation. Consequently, the
- ``virtual'' has been dropped.
- FIXME: cagney/2002-08-17: A number of architectures, including the
- MIPS, are currently broken in this regard. */
+/* The type of a register. This function is slightly more efficient
+ then its gdbarch vector counterpart since it returns a precomputed
+ value stored in a table. */
extern struct type *register_type (struct gdbarch *gdbarch, int regnum);
/* Return the size of register REGNUM. All registers should have only
- one size.
-
- FIXME: cagney/2003-02-28:
-
- Unfortunately, thanks to some legacy architectures, this doesn't
- hold. A register's cooked (nee virtual) and raw size can differ
- (see MIPS). Such architectures should be using different register
- numbers for the different sized views of identical registers.
-
- Anyway, the up-shot is that, until that mess is fixed, core code
- can end up being very confused - should the RAW or VIRTUAL size be
- used? As a rule of thumb, use DEPRECATED_REGISTER_VIRTUAL_SIZE in
- cooked code, but with the comment:
-
- OK: REGISTER_VIRTUAL_SIZE
-
- or just
-
- OK
-
- appended to the end of the line. */
+ one size. */
extern int register_size (struct gdbarch *gdbarch, int regnum);
@@ -216,7 +186,7 @@ extern void deprecated_write_register_bytes (int regbyte, char *myaddr,
referenced thread. This global is often found in close proximity
to code that is directly manipulating the deprecated_registers[]
array. In such cases, it should be possible to replace the lot
- with a call to supply_register(). If you find yourself in dire
+ with a call to regcache_raw_supply(). If you find yourself in dire
straits, still needing access to the cache status bit, the
regcache_valid_p() and set_register_cached() functions are
available. */
@@ -226,13 +196,14 @@ extern signed char *deprecated_register_valid;
registers for the most recently referenced thread.
NOTE: cagney/2002-11-14: Target side code should be using
- supply_register() and/or regcache_collect() while architecture side
- code should use the more generic regcache methods. */
+ regcache_raw_supply() and/or regcache_collect() while architecture
+ side code should use the more generic regcache methods. */
extern char *deprecated_registers;
/* NOTE: cagney/2002-11-05: This function, and its co-conspirator
- deprecated_registers[], have been superseeded by supply_register(). */
+ deprecated_registers[], have been superseeded by
+ regcache_raw_supply(). */
extern void deprecated_registers_fetched (void);
extern int register_cached (int regnum);
diff --git a/gdb/regset.c b/gdb/regset.c
new file mode 100644
index 00000000000..d588b7d64bc
--- /dev/null
+++ b/gdb/regset.c
@@ -0,0 +1,46 @@
+/* Manage register sets.
+
+ Copyright 2004 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 "regset.h"
+
+#include "gdb_assert.h"
+
+/* Allocate a fresh 'struct regset' whose supply_regset function is
+ SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET.
+ If the regset has no collect_regset function, pass NULL for
+ COLLECT_REGSET.
+
+ The object returned is allocated on ARCH's obstack. */
+
+struct regset *
+regset_alloc (struct gdbarch *arch,
+ supply_regset_ftype *supply_regset,
+ collect_regset_ftype *collect_regset)
+{
+ struct regset *regset = GDBARCH_OBSTACK_ZALLOC (arch, struct regset);
+
+ regset->arch = arch;
+ regset->supply_regset = supply_regset;
+ regset->collect_regset = collect_regset;
+
+ return regset;
+}
diff --git a/gdb/regset.h b/gdb/regset.h
index 6172f0fecfd..7bc5d2458b9 100644
--- a/gdb/regset.h
+++ b/gdb/regset.h
@@ -1,6 +1,6 @@
/* Manage register sets.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,15 +27,37 @@ struct regcache;
/* Data structure describing a register set. */
+typedef void (supply_regset_ftype) (const struct regset *, struct regcache *,
+ int, const void *, size_t);
+typedef void (collect_regset_ftype) (const struct regset *,
+ const struct regcache *,
+ int, void *, size_t);
+
struct regset
{
/* Data pointer for private use by the methods below, presumably
providing some sort of description of the register set. */
const void *descr;
- /* Function supplying a register set to a register cache. */
- void (*supply_regset) (const struct regset *, struct regcache *,
- int, const void *, size_t);
+ /* Function supplying values in a register set to a register cache. */
+ supply_regset_ftype *supply_regset;
+
+ /* Function collecting values in a register set from a register cache. */
+ collect_regset_ftype *collect_regset;
+
+ /* Architecture associated with the register set. */
+ struct gdbarch *arch;
};
+/* Allocate a fresh 'struct regset' whose supply_regset function is
+ SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET.
+ If the regset has no collect_regset function, pass NULL for
+ COLLECT_REGSET.
+
+ The object returned is allocated on ARCH's obstack. */
+
+extern struct regset *regset_alloc (struct gdbarch *arch,
+ supply_regset_ftype *supply_regset,
+ collect_regset_ftype *collect_regset);
+
#endif /* regset.h */
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index c422c947612..965ea9718cf 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -1,7 +1,7 @@
/* Remote debugging interface for Renesas E7000 ICE, for GDB
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -362,7 +362,7 @@ get_hex_regs (int n, int regno)
val = 0;
for (j = 0; j < 8; j++)
val = (val << 4) + get_hex_digit (j == 0);
- supply_register (regno++, (char *) &val);
+ regcache_raw_supply (current_regcache, regno++, (char *) &val);
}
}
#endif
@@ -371,7 +371,8 @@ get_hex_regs (int n, int regno)
user types "run" after having attached. */
static void
-e7000_create_inferior (char *execfile, char *args, char **env)
+e7000_create_inferior (char *execfile, char *args, char **env,
+ int from_tty)
{
int entry_pt;
@@ -629,7 +630,7 @@ e7000_start_remote (void *dummy)
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- print_stack_frame (get_selected_frame (), -1, 1);
+ print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
return 1;
}
@@ -878,9 +879,9 @@ fetch_regs_from_dump (int (*nextchar) (), char *want)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
store_signed_integer (buf,
- DEPRECATED_REGISTER_RAW_SIZE (regno),
+ register_size (current_gdbarch, regno),
(LONGEST) get_hex (&thischar));
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
break;
}
}
@@ -925,7 +926,7 @@ e7000_fetch_registers (void)
{
int buf = 0;
- supply_register (regno, (char *) (&buf));
+ regcache_raw_supply (current_regcache, regno, (char *) (&buf));
}
}
@@ -1568,7 +1569,7 @@ e7000_load (char *args, int from_tty)
file_ptr fptr;
section_address = bfd_get_section_vma (pbfd, section);
- section_size = bfd_get_section_size_before_reloc (section);
+ section_size = bfd_get_section_size (section);
if (!quiet)
printf_filtered ("[Loading section %s at 0x%s (%s bytes)]\n",
@@ -1963,9 +1964,9 @@ sub2_from_pc (void)
char buf2[200];
store_signed_integer (buf,
- DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM),
+ register_size (current_gdbarch, PC_REGNUM),
read_register (PC_REGNUM) - 2);
- supply_register (PC_REGNUM, buf);
+ regcache_raw_supply (current_regcache, PC_REGNUM, buf);
sprintf (buf2, ".PC %s\r", phex_nz (read_register (PC_REGNUM), 0));
puts_e7000debug (buf2);
}
@@ -2063,7 +2064,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
{
int buf = 0;
- supply_register (regno, (char *) &buf);
+ regcache_raw_supply (current_regcache, regno, (char *) &buf);
}
stop_reason = why_stop ();
@@ -2187,8 +2188,9 @@ _initialize_remote_e7000 (void)
add_com ("drain", class_obscure, e7000_drain_command,
"Drain pending e7000 text buffers.");
- add_show_from_set (add_set_cmd ("usehardbreakpoints", no_class,
- var_integer, (char *) &use_hard_breakpoints,
- "Set use of hardware breakpoints for all breakpoints.\n", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("usehardbreakpoints", no_class,
+ var_integer, (char *) &use_hard_breakpoints, "\
+Set use of hardware breakpoints for all breakpoints.\n", &setlist),
+ &showlist);
}
diff --git a/gdb/remote-est.c b/gdb/remote-est.c
index a2c0f7ce2af..884429ac28c 100644
--- a/gdb/remote-est.c
+++ b/gdb/remote-est.c
@@ -148,7 +148,7 @@ init_est_cmds (void)
est_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
est_cmds.dump_registers = "dr\r"; /* dump_registers */
est_cmds.register_pattern = "\\(\\w+\\) = \\([0-9a-fA-F]+\\)"; /* register_pattern */
- est_cmds.supply_register = est_supply_register; /* supply_register */
+ est_cmds.supply_register = est_supply_register;
est_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
est_cmds.load = "dl\r"; /* download command */
est_cmds.loadresp = "+"; /* load response */
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index ee40051fb3c..75674861023 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -119,7 +119,7 @@ init_hms_cmds (void)
hms_cmds.getreg.term_cmd = "\003"; /* getreg.term_cmd */
hms_cmds.dump_registers = "r\r"; /* dump_registers */
hms_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
- hms_cmds.supply_register = hms_supply_register; /* supply_register */
+ hms_cmds.supply_register = hms_supply_register;
hms_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
hms_cmds.load = "tl\r"; /* download command */
hms_cmds.loadresp = NULL; /* load response */
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index e2118587ea5..a2fc04682fe 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -1,6 +1,6 @@
/* Remote debugging interface for M32R/SDI.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by Renesas Technology Co.
Written by Kei Sakamoto <sakamoto.kei@renesas.com>.
@@ -63,12 +63,6 @@ static int use_ib_breakpoints = 1;
static int max_ib_breakpoints;
static unsigned long bp_address[MAX_BREAKPOINTS];
static unsigned char bp_data[MAX_BREAKPOINTS][4];
-static const unsigned char ib_bp_entry_enable[] = {
- 0x00, 0x00, 0x00, 0x06
-};
-static const unsigned char ib_bp_entry_disable[] = {
- 0x00, 0x00, 0x00, 0x00
-};
/* dbt -> nop */
static const unsigned char dbt_bp_entry[] = {
@@ -161,7 +155,7 @@ get_ack (void)
{
int c;
- if (!sdi_desc)
+ if (!sdi_desc)
return -1;
c = serial_readchar (sdi_desc, SDI_TIMEOUT);
@@ -169,7 +163,7 @@ get_ack (void)
if (c < 0)
return -1;
- if (c != '+') /* error */
+ if (c != '+') /* error */
return -1;
return 0;
@@ -181,7 +175,7 @@ send_data (void *buf, int len)
{
int ret;
- if (!sdi_desc)
+ if (!sdi_desc)
return -1;
if (serial_write (sdi_desc, buf, len) != 0)
@@ -200,7 +194,7 @@ recv_data (void *buf, int len)
int total = 0;
int c;
- if (!sdi_desc)
+ if (!sdi_desc)
return -1;
while (total < len)
@@ -224,20 +218,72 @@ store_long_parameter (void *buf, long val)
memcpy (buf, &val, 4);
}
+static int
+send_cmd (unsigned char cmd)
+{
+ unsigned char buf[1];
+ buf[0] = cmd;
+ return send_data (buf, 1);
+}
+
+static int
+send_one_arg_cmd (unsigned char cmd, unsigned char arg1)
+{
+ unsigned char buf[2];
+ buf[0] = cmd;
+ buf[1] = arg1;
+ return send_data (buf, 2);
+}
+
+static int
+send_two_arg_cmd (unsigned char cmd, unsigned char arg1, unsigned long arg2)
+{
+ unsigned char buf[6];
+ buf[0] = cmd;
+ buf[1] = arg1;
+ store_long_parameter (buf + 2, arg2);
+ return send_data (buf, 6);
+}
+
+static int
+send_three_arg_cmd (unsigned char cmd, unsigned long arg1, unsigned long arg2,
+ unsigned long arg3)
+{
+ unsigned char buf[13];
+ buf[0] = cmd;
+ store_long_parameter (buf + 1, arg1);
+ store_long_parameter (buf + 5, arg2);
+ store_long_parameter (buf + 9, arg3);
+ return send_data (buf, 13);
+}
+
+static unsigned char
+recv_char_data (void)
+{
+ unsigned char val;
+ recv_data (&val, 1);
+ return val;
+}
+
+static unsigned long
+recv_long_data (void)
+{
+ unsigned long val;
+ recv_data (&val, 4);
+ return ntohl (val);
+}
+
+
/* Check if MMU is on */
static void
check_mmu_status (void)
{
unsigned long val;
- unsigned char buf[2];
/* Read PC address */
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_BPC;
- if (send_data (buf, 2) == -1)
+ if (send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BPC) == -1)
return;
- recv_data (&val, 4);
- val = ntohl (val);
+ val = recv_long_data ();
if ((val & 0xc0000000) == 0x80000000)
{
mmu_on = 1;
@@ -245,12 +291,9 @@ check_mmu_status (void)
}
/* Read EVB address */
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_EVB;
- if (send_data (buf, 2) == -1)
+ if (send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_EVB) == -1)
return;
- recv_data (&val, 4);
- val = ntohl (val);
+ val = recv_long_data ();
if ((val & 0xc0000000) == 0x80000000)
{
mmu_on = 1;
@@ -264,7 +307,7 @@ check_mmu_status (void)
/* This is called not only when we first attach, but also when the
user types "run" after having attached. */
static void
-m32r_create_inferior (char *execfile, char *args, char **env)
+m32r_create_inferior (char *execfile, char *args, char **env, int from_tty)
{
CORE_ADDR entry_pt;
@@ -308,7 +351,6 @@ m32r_open (char *args, int from_tty)
struct sockaddr_in server_addr;
char *port_str, hostname[256];
int port;
- unsigned char buf[2];
int i, n;
int yes = 1;
@@ -325,7 +367,7 @@ m32r_open (char *args, int from_tty)
{
port_str = strchr (args, ':');
if (port_str == NULL)
- sprintf (hostname, "%s:%d", args, SDIPORT);
+ sprintf (hostname, "%s:%d", args, SDIPORT);
else
strcpy (hostname, args);
}
@@ -337,16 +379,12 @@ m32r_open (char *args, int from_tty)
if (get_ack () == -1)
error ("Cannot connect to SDI target\n");
- buf[0] = SDI_OPEN;
- if (send_data (buf, 1) == -1)
+ if (send_cmd (SDI_OPEN) == -1)
error ("Cannot connect to SDI target\n");
/* Get maximum number of ib breakpoints */
- buf[0] = SDI_GET_ATTR;
- buf[1] = SDI_ATTR_BRK;
- send_data (buf, 2);
- recv_data (buf, 1);
- max_ib_breakpoints = buf[0];
+ send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_BRK);
+ max_ib_breakpoints = recv_char_data ();
if (remote_debug)
printf_filtered ("Max IB Breakpoints = %d\n", max_ib_breakpoints);
@@ -355,11 +393,8 @@ m32r_open (char *args, int from_tty)
bp_address[i] = 0xffffffff;
/* Get maximum number of access breaks. */
- buf[0] = SDI_GET_ATTR;
- buf[1] = SDI_ATTR_ABRK;
- send_data (buf, 2);
- recv_data (buf, 1);
- max_access_breaks = buf[0];
+ send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_ABRK);
+ max_access_breaks = recv_char_data ();
if (remote_debug)
printf_filtered ("Max Access Breaks = %d\n", max_access_breaks);
@@ -370,9 +405,7 @@ m32r_open (char *args, int from_tty)
check_mmu_status ();
/* Get the name of chip on target board. */
- buf[0] = SDI_GET_ATTR;
- buf[1] = SDI_ATTR_NAME;
- send_data (buf, 2);
+ send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_NAME);
recv_data (chip_name, 64);
if (from_tty)
@@ -385,15 +418,12 @@ m32r_open (char *args, int from_tty)
static void
m32r_close (int quitting)
{
- unsigned char buf[1];
-
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_close(%d)\n", quitting);
if (sdi_desc)
{
- buf[0] = SDI_CLOSE;
- send_data (buf, 1);
+ send_cmd (SDI_CLOSE);
serial_close (sdi_desc);
sdi_desc = NULL;
}
@@ -408,6 +438,7 @@ static void
m32r_resume (ptid_t ptid, int step, enum target_signal sig)
{
unsigned long pc_addr, bp_addr, ab_addr;
+ int ib_breakpoints;
unsigned char buf[13];
int i;
@@ -451,206 +482,181 @@ m32r_resume (ptid_t ptid, int step, enum target_signal sig)
}
/* Set PC. */
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_BPC;
- store_long_parameter (buf + 2, pc_addr);
- send_data (buf, 6);
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BPC, pc_addr);
/* step mode. */
step_mode = step;
if (step)
{
/* Set PBP. */
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_PBP;
- store_long_parameter (buf + 2, pc_addr | 1);
- send_data (buf, 6);
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PBP, pc_addr | 1);
+ }
+ else
+ {
+ /* Unset PBP. */
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PBP, 0x00000000);
}
+
+ if (use_ib_breakpoints)
+ ib_breakpoints = max_ib_breakpoints;
else
+ ib_breakpoints = 0;
+
+ /* Set ib breakpoints. */
+ for (i = 0; i < ib_breakpoints; i++)
{
- int ib_breakpoints;
+ bp_addr = bp_address[i];
+
+ if (bp_addr == 0xffffffff)
+ continue;
- if (use_ib_breakpoints)
- ib_breakpoints = max_ib_breakpoints;
+ /* Set PBP. */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
+ 0x00000006);
else
- ib_breakpoints = 0;
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
+ 0x06000000);
+
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8080 + 4 * i, 4, bp_addr);
+ }
+
+ /* Set dbt breakpoints. */
+ for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ {
+ bp_addr = bp_address[i];
- /* Set ib breakpoints. */
- for (i = 0; i < ib_breakpoints; i++)
+ if (bp_addr == 0xffffffff)
+ continue;
+
+ if (!mmu_on)
+ bp_addr &= 0x7fffffff;
+
+ /* Write DBT instruction. */
+ buf[0] = SDI_WRITE_MEMORY;
+ store_long_parameter (buf + 1, bp_addr);
+ store_long_parameter (buf + 5, 4);
+ if ((bp_addr & 2) == 0 && bp_addr != (pc_addr & 0xfffffffc))
{
- bp_addr = bp_address[i];
- if (bp_addr != 0xffffffff && bp_addr != pc_addr)
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- /* Set PBP. */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8000 + 4 * i);
- store_long_parameter (buf + 5, 4);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- buf[9] = ib_bp_entry_enable[0];
- buf[10] = ib_bp_entry_enable[1];
- buf[11] = ib_bp_entry_enable[2];
- buf[12] = ib_bp_entry_enable[3];
- }
- else
- {
- buf[9] = ib_bp_entry_enable[3];
- buf[10] = ib_bp_entry_enable[2];
- buf[11] = ib_bp_entry_enable[1];
- buf[12] = ib_bp_entry_enable[0];
- }
- send_data (buf, 13);
-
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8080 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_unsigned_integer (buf + 9, 4, bp_addr);
- send_data (buf, 13);
+ buf[9] = dbt_bp_entry[0];
+ buf[10] = dbt_bp_entry[1];
+ buf[11] = dbt_bp_entry[2];
+ buf[12] = dbt_bp_entry[3];
+ }
+ else
+ {
+ buf[9] = dbt_bp_entry[3];
+ buf[10] = dbt_bp_entry[2];
+ buf[11] = dbt_bp_entry[1];
+ buf[12] = dbt_bp_entry[0];
}
}
-
- /* Set dbt breakpoints. */
- for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ else
{
- bp_addr = bp_address[i];
- if (bp_addr != 0xffffffff && bp_addr != pc_addr)
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (!mmu_on)
- bp_addr &= 0x7fffffff;
-
- /* Write DBT instruction. */
- buf[0] = SDI_WRITE_MEMORY;
- if ((bp_addr & 2) == 0 && bp_addr != (pc_addr & 0xfffffffc))
+ if ((bp_addr & 2) == 0)
{
- store_long_parameter (buf + 1, bp_addr);
- store_long_parameter (buf + 5, 4);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- buf[9] = dbt_bp_entry[0];
- buf[10] = dbt_bp_entry[1];
- buf[11] = dbt_bp_entry[2];
- buf[12] = dbt_bp_entry[3];
- }
- else
- {
- buf[9] = dbt_bp_entry[3];
- buf[10] = dbt_bp_entry[2];
- buf[11] = dbt_bp_entry[1];
- buf[12] = dbt_bp_entry[0];
- }
- send_data (buf, 13);
+ buf[9] = dbt_bp_entry[0];
+ buf[10] = dbt_bp_entry[1];
+ buf[11] = bp_data[i][2] & 0x7f;
+ buf[12] = bp_data[i][3];
}
else
{
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- store_long_parameter (buf + 1, bp_addr);
- else if ((bp_addr & 2) == 0)
- store_long_parameter (buf + 1, bp_addr + 2);
- else
- store_long_parameter (buf + 1, bp_addr - 2);
- store_long_parameter (buf + 5, 2);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- buf[9] = dbt_bp_entry[0];
- buf[10] = dbt_bp_entry[1];
- }
- else
- {
- buf[9] = dbt_bp_entry[1];
- buf[10] = dbt_bp_entry[0];
- }
- send_data (buf, 11);
+ buf[9] = bp_data[i][0];
+ buf[10] = bp_data[i][1];
+ buf[11] = dbt_bp_entry[0];
+ buf[12] = dbt_bp_entry[1];
}
}
- }
-
- /* Set access breaks. */
- for (i = 0; i < max_access_breaks; i++)
- {
- ab_addr = ab_address[i];
- if (ab_addr != 0x00000000)
+ else
{
- /* DBC register */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8100 + 4 * i);
- store_long_parameter (buf + 5, 4);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ if ((bp_addr & 2) == 0)
{
- buf[9] = 0x00;
- buf[10] = 0x00;
- buf[11] = 0x00;
- switch (ab_type[i])
- {
- case 0: /* write watch */
- buf[12] = 0x86;
- break;
- case 1: /* read watch */
- buf[12] = 0x46;
- break;
- case 2: /* access watch */
- buf[12] = 0x06;
- break;
- }
+ buf[9] = bp_data[i][0];
+ buf[10] = bp_data[i][1] & 0x7f;
+ buf[11] = dbt_bp_entry[1];
+ buf[12] = dbt_bp_entry[0];
}
else
{
- switch (ab_type[i])
- {
- case 0: /* write watch */
- buf[9] = 0x86;
- break;
- case 1: /* read watch */
- buf[9] = 0x46;
- break;
- case 2: /* access watch */
- buf[9] = 0x06;
- break;
- }
- buf[10] = 0x00;
- buf[11] = 0x00;
- buf[12] = 0x00;
+ buf[9] = dbt_bp_entry[1];
+ buf[10] = dbt_bp_entry[0];
+ buf[11] = bp_data[i][2];
+ buf[12] = bp_data[i][3];
}
- send_data (buf, 13);
-
- /* DBAH register */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8180 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_unsigned_integer (buf + 9, 4, ab_addr);
- send_data (buf, 13);
+ }
+ }
+ send_data (buf, 13);
+ }
- /* DBAL register */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8200 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_long_parameter (buf + 9, 0xffffffff);
- send_data (buf, 13);
+ /* Set access breaks. */
+ for (i = 0; i < max_access_breaks; i++)
+ {
+ ab_addr = ab_address[i];
- /* DBD register */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8280 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_long_parameter (buf + 9, 0x00000000);
- send_data (buf, 13);
+ if (ab_addr == 0x00000000)
+ continue;
- /* DBDM register */
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8300 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_long_parameter (buf + 9, 0x00000000);
- send_data (buf, 13);
+ /* DBC register */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ switch (ab_type[i])
+ {
+ case 0: /* write watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x00000086);
+ break;
+ case 1: /* read watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x00000046);
+ break;
+ case 2: /* access watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x00000006);
+ break;
+ }
+ }
+ else
+ {
+ switch (ab_type[i])
+ {
+ case 0: /* write watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x86000000);
+ break;
+ case 1: /* read watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x46000000);
+ break;
+ case 2: /* access watch */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x06000000);
+ break;
}
}
- /* Unset PBP. */
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_PBP;
- store_long_parameter (buf + 2, 0x00000000);
- send_data (buf, 6);
+ /* DBAH register */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8180 + 4 * i, 4, ab_addr);
+
+ /* DBAL register */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8200 + 4 * i, 4,
+ 0xffffffff);
+
+ /* DBD register */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8280 + 4 * i, 4,
+ 0x00000000);
+
+ /* DBDM register */
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8300 + 4 * i, 4,
+ 0x00000000);
}
- buf[0] = SDI_EXEC_CPU;
- send_data (buf, 1);
+ /* Resume program. */
+ send_cmd (SDI_EXEC_CPU);
/* Without this, some commands which require an active target (such as kill)
won't work. This variable serves (at least) double duty as both the pid
@@ -679,6 +685,7 @@ m32r_wait (ptid_t ptid, struct target_waitstatus *status)
{
static RETSIGTYPE (*prev_sigint) ();
unsigned long bp_addr, pc_addr;
+ int ib_breakpoints;
long i;
unsigned char buf[13];
unsigned long val;
@@ -704,7 +711,7 @@ m32r_wait (ptid_t ptid, struct target_waitstatus *status)
if (c < 0)
error ("Remote connection closed");
- if (c == '-') /* error */
+ if (c == '-') /* error */
{
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = TARGET_SIGNAL_HUP;
@@ -746,130 +753,106 @@ m32r_wait (ptid_t ptid, struct target_waitstatus *status)
last_pc_addr = 0xffffffff;
}
- /* Breakpoints are inserted only for "next" command */
- if (!step_mode)
- {
- int ib_breakpoints;
+ if (use_ib_breakpoints)
+ ib_breakpoints = max_ib_breakpoints;
+ else
+ ib_breakpoints = 0;
- if (use_ib_breakpoints)
- ib_breakpoints = max_ib_breakpoints;
- else
- ib_breakpoints = 0;
-
- /* Set back pc by 2 if m32r is stopped with dbt. */
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_BPC;
- send_data (buf, 2);
- recv_data (&val, 4);
- pc_addr = ntohl (val) - 2;
- for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ /* Set back pc by 2 if m32r is stopped with dbt. */
+ last_pc_addr = 0xffffffff;
+ send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BPC);
+ pc_addr = recv_long_data () - 2;
+ for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ {
+ if (pc_addr == bp_address[i])
{
- if (pc_addr == bp_address[i])
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BPC, pc_addr);
+
+ /* If there is a parallel instruction with +2 offset at pc
+ address, we have to take care of it later. */
+ if ((pc_addr & 0x2) != 0)
{
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_BPC;
- store_long_parameter (buf + 2, pc_addr);
- send_data (buf, 6);
-
- /* If there is a parallel instruction with +2 offset at pc
- address, we have to take care of it later. */
- if ((pc_addr & 0x2) != 0)
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ if ((bp_data[i][2] & 0x80) != 0)
{
- if ((bp_data[i][2] & 0x80) != 0)
- {
- last_pc_addr = pc_addr;
- last_pc_addr_data[0] = bp_data[i][2];
- last_pc_addr_data[1] = bp_data[i][3];
- }
+ last_pc_addr = pc_addr;
+ last_pc_addr_data[0] = bp_data[i][2];
+ last_pc_addr_data[1] = bp_data[i][3];
}
- else
+ }
+ else
+ {
+ if ((bp_data[i][1] & 0x80) != 0)
{
- if ((bp_data[i][1] & 0x80) != 0)
- {
- last_pc_addr = pc_addr;
- last_pc_addr_data[0] = bp_data[i][1];
- last_pc_addr_data[1] = bp_data[i][0];
- }
+ last_pc_addr = pc_addr;
+ last_pc_addr_data[0] = bp_data[i][1];
+ last_pc_addr_data[1] = bp_data[i][0];
}
}
- break;
}
+ break;
}
+ }
- /* Remove ib breakpoints. */
- for (i = 0; i < ib_breakpoints; i++)
- {
- if (bp_address[i] != 0xffffffff)
- {
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8000 + 4 * i);
- store_long_parameter (buf + 5, 4);
- buf[9] = ib_bp_entry_disable[0];
- buf[10] = ib_bp_entry_disable[1];
- buf[11] = ib_bp_entry_disable[2];
- buf[12] = ib_bp_entry_disable[3];
- send_data (buf, 13);
- }
- }
- /* Remove dbt breakpoints. */
- for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ /* Remove ib breakpoints. */
+ for (i = 0; i < ib_breakpoints; i++)
+ {
+ if (bp_address[i] != 0xffffffff)
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8000 + 4 * i, 4,
+ 0x00000000);
+ }
+ /* Remove dbt breakpoints. */
+ for (i = ib_breakpoints; i < MAX_BREAKPOINTS; i++)
+ {
+ bp_addr = bp_address[i];
+ if (bp_addr != 0xffffffff)
{
- bp_addr = bp_address[i];
- if (bp_addr != 0xffffffff)
- {
- if (!mmu_on)
- bp_addr &= 0x7fffffff;
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, bp_addr & 0xfffffffc);
- store_long_parameter (buf + 5, 4);
- buf[9] = bp_data[i][0];
- buf[10] = bp_data[i][1];
- buf[11] = bp_data[i][2];
- buf[12] = bp_data[i][3];
- send_data (buf, 13);
- }
+ if (!mmu_on)
+ bp_addr &= 0x7fffffff;
+ buf[0] = SDI_READ_MEMORY;
+ store_long_parameter (buf + 1, bp_addr & 0xfffffffc);
+ store_long_parameter (buf + 5, 4);
+ buf[9] = bp_data[i][0];
+ buf[10] = bp_data[i][1];
+ buf[11] = bp_data[i][2];
+ buf[12] = bp_data[i][3];
+ send_data (buf, 13);
}
+ }
- /* Remove access breaks. */
- hit_watchpoint_addr = 0;
- for (i = 0; i < max_access_breaks; i++)
+ /* Remove access breaks. */
+ hit_watchpoint_addr = 0;
+ for (i = 0; i < max_access_breaks; i++)
+ {
+ if (ab_address[i] != 0x00000000)
{
- if (ab_address[i] != 0x00000000)
+ buf[0] = SDI_READ_MEMORY;
+ store_long_parameter (buf + 1, 0xffff8100 + 4 * i);
+ store_long_parameter (buf + 5, 4);
+ serial_write (sdi_desc, buf, 9);
+ c = serial_readchar (sdi_desc, SDI_TIMEOUT);
+ if (c != '-' && recv_data (buf, 4) != -1)
{
- buf[0] = SDI_READ_MEMORY;
- store_long_parameter (buf + 1, 0xffff8100 + 4 * i);
- store_long_parameter (buf + 5, 4);
- serial_write (sdi_desc, buf, 9);
- c = serial_readchar (sdi_desc, SDI_TIMEOUT);
- if (c != '-' && recv_data (buf, 4) != -1)
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- if ((buf[3] & 0x1) == 0x1)
- hit_watchpoint_addr = ab_address[i];
- }
- else
- {
- if ((buf[0] & 0x1) == 0x1)
- hit_watchpoint_addr = ab_address[i];
- }
+ if ((buf[3] & 0x1) == 0x1)
+ hit_watchpoint_addr = ab_address[i];
+ }
+ else
+ {
+ if ((buf[0] & 0x1) == 0x1)
+ hit_watchpoint_addr = ab_address[i];
}
-
- buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, 0xffff8100 + 4 * i);
- store_long_parameter (buf + 5, 4);
- store_long_parameter (buf + 9, 0x00000000);
- send_data (buf, 13);
}
- }
- if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "pc => 0x%lx\n", pc_addr);
+ send_three_arg_cmd (SDI_WRITE_MEMORY, 0xffff8100 + 4 * i, 4,
+ 0x00000000);
+ }
}
- else
- last_pc_addr = 0xffffffff;
+
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog, "pc => 0x%lx\n", pc_addr);
return inferior_ptid;
}
@@ -933,7 +916,6 @@ static void
m32r_fetch_register (int regno)
{
unsigned long val, val2, regid;
- unsigned char buf[2];
if (regno == -1)
m32r_fetch_registers ();
@@ -942,19 +924,13 @@ m32r_fetch_register (int regno)
char buffer[MAX_REGISTER_SIZE];
regid = get_reg_id (regno);
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = regid;
- send_data (buf, 2);
- recv_data (&val, 4);
- val = ntohl (val);
+ send_one_arg_cmd (SDI_READ_CPU_REG, regid);
+ val = recv_long_data ();
if (regid == SDI_REG_PSW)
{
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_BBPSW;
- send_data (buf, 2);
- recv_data (&val2, 4);
- val2 = ntohl (val2);
+ send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BBPSW);
+ val2 = recv_long_data ();
val = ((0x00c1 & val2) << 8) | ((0xc100 & val) >> 8);
}
@@ -965,7 +941,7 @@ m32r_fetch_register (int regno)
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buffer, 4, val);
- supply_register (regno, buffer);
+ regcache_raw_supply (current_regcache, regno, buffer);
}
return;
}
@@ -992,7 +968,6 @@ m32r_store_register (int regno)
{
int regid;
ULONGEST regval, tmp;
- unsigned char buf[6];
if (regno == -1)
m32r_store_registers ();
@@ -1005,36 +980,21 @@ m32r_store_register (int regno)
{
unsigned long psw, bbpsw;
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_PSW;
- send_data (buf, 2);
- recv_data (&psw, 4);
- psw = ntohl (psw);
+ send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_PSW);
+ psw = recv_long_data ();
- buf[0] = SDI_READ_CPU_REG;
- buf[1] = SDI_REG_BBPSW;
- send_data (buf, 2);
- recv_data (&bbpsw, 4);
- bbpsw = ntohl (bbpsw);
+ send_one_arg_cmd (SDI_READ_CPU_REG, SDI_REG_BBPSW);
+ bbpsw = recv_long_data ();
tmp = (0x00c1 & psw) | ((0x00c1 & regval) << 8);
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_PSW;
- store_long_parameter (buf + 2, tmp);
- send_data (buf, 6);
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_PSW, tmp);
tmp = (0x0030 & bbpsw) | ((0xc100 & regval) >> 8);
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = SDI_REG_BBPSW;
- store_long_parameter (buf + 2, tmp);
- send_data (buf, 6);
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, SDI_REG_BBPSW, tmp);
}
else
{
- buf[0] = SDI_WRITE_CPU_REG;
- buf[1] = regid;
- store_long_parameter (buf + 2, regval);
- send_data (buf, 6);
+ send_two_arg_cmd (SDI_WRITE_CPU_REG, regid, regval);
}
if (remote_debug)
@@ -1319,7 +1279,7 @@ m32r_load (char *args, int from_tty)
int n;
section_address = bfd_section_lma (pbfd, section);
- section_size = bfd_get_section_size_before_reloc (section);
+ section_size = bfd_get_section_size (section);
if (!mmu_on)
{
@@ -1422,13 +1382,10 @@ m32r_load (char *args, int from_tty)
static void
m32r_stop (void)
{
- unsigned char buf[1];
-
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_stop()\n");
- buf[0] = SDI_STOP_CPU;
- send_data (buf, 1);
+ send_cmd (SDI_STOP_CPU);
return;
}
@@ -1509,13 +1466,10 @@ m32r_stopped_by_watchpoint (void)
static void
sdireset_command (char *args, int from_tty)
{
- unsigned char buf[1];
-
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_sdireset()\n");
- buf[0] = SDI_OPEN;
- send_data (buf, 1);
+ send_cmd (SDI_OPEN);
inferior_ptid = null_ptid;
}
@@ -1533,17 +1487,16 @@ sdistatus_command (char *args, int from_tty)
if (!sdi_desc)
return;
- buf[0] = SDI_STATUS;
- send_data (buf, 1);
+ send_cmd (SDI_STATUS);
for (i = 0; i < 4096; i++)
{
c = serial_readchar (sdi_desc, SDI_TIMEOUT);
if (c < 0)
- return;
+ return;
buf[i] = c;
if (c == 0)
- break;
- }
+ break;
+ }
printf_filtered ("%s", buf);
}
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index c75768406b9..b7dc35e0ffc 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1,7 +1,7 @@
/* Remote debugging interface for MIPS remote debugging protocol.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Ian Lance Taylor
<ian@cygnus.com>.
@@ -114,8 +114,6 @@ static int mips_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
static void mips_files_info (struct target_ops *ignore);
-static void mips_create_inferior (char *execfile, char *args, char **env);
-
static void mips_mourn_inferior (void);
static int pmon_makeb64 (unsigned long v, char *p, int n, int *chksum);
@@ -1588,7 +1586,7 @@ device is attached to the target board (e.g., /dev/ttya).\n"
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- print_stack_frame (get_selected_frame (), -1, 1);
+ print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
xfree (serial_port_name);
}
@@ -1759,17 +1757,17 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
{
char buf[MAX_REGISTER_SIZE];
- store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rpc);
- supply_register (PC_REGNUM, buf);
+ store_unsigned_integer (buf, register_size (current_gdbarch, PC_REGNUM), rpc);
+ regcache_raw_supply (current_regcache, PC_REGNUM, buf);
- store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rfp);
- supply_register (30, buf); /* This register they are avoiding and so it is unnamed */
+ store_unsigned_integer (buf, register_size (current_gdbarch, PC_REGNUM), rfp);
+ regcache_raw_supply (current_regcache, 30, buf); /* This register they are avoiding and so it is unnamed */
- store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM), rsp);
- supply_register (SP_REGNUM, buf);
+ store_unsigned_integer (buf, register_size (current_gdbarch, SP_REGNUM), rsp);
+ regcache_raw_supply (current_regcache, SP_REGNUM, buf);
- store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0);
- supply_register (DEPRECATED_FP_REGNUM, buf);
+ store_unsigned_integer (buf, register_size (current_gdbarch, DEPRECATED_FP_REGNUM), 0);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, buf);
if (nfields == 9)
{
@@ -1940,8 +1938,8 @@ mips_fetch_registers (int regno)
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
- store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
- supply_register (regno, buf);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regno), val);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
@@ -2178,7 +2176,7 @@ Give up (and stop debugging it)? "))
/* Start running on the target board. */
static void
-mips_create_inferior (char *execfile, char *args, char **env)
+mips_create_inferior (char *execfile, char *args, char **env, int from_tty)
{
CORE_ADDR entry_pt;
@@ -2650,20 +2648,20 @@ mips_load_srec (char *args)
/* FIXME! vma too small????? */
printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name,
(long) s->vma,
- (long) (s->vma + s->_raw_size));
+ (long) (s->vma + bfd_get_section_size (s)));
gdb_flush (gdb_stdout);
- for (i = 0; i < s->_raw_size; i += numbytes)
+ for (i = 0; i < bfd_get_section_size (s); i += numbytes)
{
- numbytes = min (srec_frame, s->_raw_size - i);
+ numbytes = min (srec_frame, bfd_get_section_size (s) - i);
bfd_get_section_contents (abfd, s, buffer, i, numbytes);
reclen = mips_make_srec (srec, '3', s->vma + i, buffer, numbytes);
send_srec (srec, reclen, s->vma + i);
- if (ui_load_progress_hook)
- ui_load_progress_hook (s->name, i);
+ if (deprecated_ui_load_progress_hook)
+ deprecated_ui_load_progress_hook (s->name, i);
if (hashmark)
{
@@ -3137,11 +3135,11 @@ pmon_load_fast (char *file)
for (s = abfd->sections; s && !finished; s = s->next)
if (s->flags & SEC_LOAD) /* only deal with loadable sections */
{
- bintotal += s->_raw_size;
- final = (s->vma + s->_raw_size);
+ bintotal += bfd_get_section_size (s);
+ final = (s->vma + bfd_get_section_size (s));
printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, (unsigned int) s->vma,
- (unsigned int) (s->vma + s->_raw_size));
+ (unsigned int) (s->vma + bfd_get_section_size (s)));
gdb_flush (gdb_stdout);
/* Output the starting address */
@@ -3162,11 +3160,13 @@ pmon_load_fast (char *file)
reclen = 0;
- for (i = 0; ((i < s->_raw_size) && !finished); i += binamount)
+ for (i = 0;
+ i < bfd_get_section_size (s) && !finished;
+ i += binamount)
{
int binptr = 0;
- binamount = min (BINCHUNK, s->_raw_size - i);
+ binamount = min (BINCHUNK, bfd_get_section_size (s) - i);
bfd_get_section_contents (abfd, s, binbuf, i, binamount);
@@ -3186,8 +3186,8 @@ pmon_load_fast (char *file)
break;
}
- if (ui_load_progress_hook)
- ui_load_progress_hook (s->name, i);
+ if (deprecated_ui_load_progress_hook)
+ deprecated_ui_load_progress_hook (s->name, i);
if (hashmark)
{
@@ -3368,54 +3368,56 @@ of the TFTP temporary file, if it differs from the filename seen by the board.";
add_target (&ddb_ops);
add_target (&lsi_ops);
- add_show_from_set (
- add_set_cmd ("timeout", no_class, var_zinteger,
- (char *) &mips_receive_wait,
- "Set timeout in seconds for remote MIPS serial I/O.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("retransmit-timeout", no_class, var_zinteger,
- (char *) &mips_retransmit_wait,
- "Set retransmit timeout in seconds for remote MIPS serial I/O.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("timeout", no_class, var_zinteger,
+ (char *) &mips_receive_wait,
+ "Set timeout in seconds for remote MIPS serial I/O.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("retransmit-timeout", no_class, var_zinteger,
+ (char *) &mips_retransmit_wait, "\
+Set retransmit timeout in seconds for remote MIPS serial I/O.\n\
This is the number of seconds to wait for an acknowledgement to a packet\n\
before resending the packet.", &setlist),
- &showlist);
+ &showlist);
- add_show_from_set (
- add_set_cmd ("syn-garbage-limit", no_class, var_zinteger,
- (char *) &mips_syn_garbage,
- "Set the maximum number of characters to ignore when scanning for a SYN.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("syn-garbage-limit", no_class, var_zinteger,
+ (char *) &mips_syn_garbage, "\
+Set the maximum number of characters to ignore when scanning for a SYN.\n\
This is the maximum number of characters GDB will ignore when trying to\n\
-synchronize with the remote system. A value of -1 means that there is no limit\n\
-(Note that these characters are printed out even though they are ignored.)",
- &setlist),
- &showlist);
+synchronize with the remote system. A value of -1 means that there is no\n\
+limit. (Note that these characters are printed out even though they are\n\
+ignored.)",
+ &setlist),
+ &showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("monitor-prompt", class_obscure, var_string,
(char *) &mips_monitor_prompt,
"Set the prompt that GDB expects from the monitor.",
&setlist),
&showlist);
- add_show_from_set (
- add_set_cmd ("monitor-warnings", class_obscure, var_zinteger,
- (char *) &monitor_warnings,
- "Set printing of monitor warnings.\n"
- "When enabled, monitor warnings about hardware breakpoints "
- "will be displayed.",
- &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("monitor-warnings", class_obscure, var_zinteger,
+ (char *) &monitor_warnings,
+ "Set printing of monitor warnings.\n"
+ "When enabled, monitor warnings about hardware breakpoints "
+ "will be displayed.",
+ &setlist),
+ &showlist);
add_com ("pmon <command>", class_obscure, pmon_command,
"Send a packet to PMON (must be in debug mode).");
- add_show_from_set (add_set_cmd ("mask-address", no_class,
- var_boolean, &mask_address_p,
- "Set zeroing of upper 32 bits of 64-bit addresses when talking to PMON targets.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("mask-address", no_class,
+ var_boolean, &mask_address_p, "\
+Set zeroing of upper 32 bits of 64-bit addresses when talking to PMON targets.\n\
Use \"on\" to enable the masking and \"off\" to disable it.\n",
- &setlist),
- &showlist);
+ &setlist),
+ &showlist);
}
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 268ed328f6c..1c14a03b43f 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -1,6 +1,6 @@
/* GDB interface to ARM RDI library.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -38,10 +38,6 @@
#include "regcache.h"
#include "arm-tdep.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <signal.h>
#include "rdi-share/ardi.h"
@@ -68,8 +64,6 @@ static void arm_rdi_resume (ptid_t pid, int step,
static void arm_rdi_open (char *name, int from_tty);
-static void arm_rdi_create_inferior (char *exec_file, char *args, char **env);
-
static void arm_rdi_close (int quitting);
static void arm_rdi_store_registers (int regno);
@@ -334,7 +328,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
user types "run" after having attached. */
static void
-arm_rdi_create_inferior (char *exec_file, char *args, char **env)
+arm_rdi_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
int len, rslt;
unsigned long arg1, arg2;
@@ -498,10 +492,10 @@ arm_rdi_fetch_registers (int regno)
for (regno = 0; regno < 15; regno++)
{
store_unsigned_integer (cookedreg, 4, rawregs[regno]);
- supply_register (regno, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, regno, (char *) cookedreg);
}
store_unsigned_integer (cookedreg, 4, rawregs[15]);
- supply_register (ARM_PS_REGNUM, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM, (char *) cookedreg);
arm_rdi_fetch_registers (ARM_PC_REGNUM);
}
else
@@ -513,7 +507,7 @@ arm_rdi_fetch_registers (int regno)
else if (regno < 0 || regno > 15)
{
rawreg = 0;
- supply_register (regno, (char *) &rawreg);
+ regcache_raw_supply (current_regcache, regno, (char *) &rawreg);
return;
}
else
@@ -525,7 +519,7 @@ arm_rdi_fetch_registers (int regno)
printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
}
store_unsigned_integer (cookedreg, 4, rawreg);
- supply_register (regno, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, regno, (char *) cookedreg);
}
}
@@ -997,24 +991,24 @@ _initialize_remote_rdi (void)
"Withough an argument, it will display current state.\n",
&maintenancelist);
- add_setshow_boolean_cmd
- ("rdiromatzero", no_class, &rom_at_zero,
- "Set target has ROM at addr 0.\n"
- "A true value disables vector catching, false enables vector catching.\n"
- "This is evaluated at the time the 'target rdi' command is executed\n",
- "Show if target has ROM at addr 0.\n",
- NULL, NULL,
- &setlist, &showlist);
-
- add_setshow_boolean_cmd
- ("rdiheartbeat", no_class, &rdi_heartbeat,
- "Set enable for ADP heartbeat packets.\n"
- "I don't know why you would want this. If you enable them,\n"
- "it will confuse ARM and EPI JTAG interface boxes as well\n"
- "as the Angel Monitor.\n",
- "Show enable for ADP heartbeat packets.\n",
- NULL, NULL,
- &setlist, &showlist);
+ add_setshow_boolean_cmd ("rdiromatzero", no_class, &rom_at_zero, "\
+Set target has ROM at addr 0.", "\
+Show if target has ROM at addr 0.", "\
+A true value disables vector catching, false enables vector catching.\n\
+This is evaluated at the time the 'target rdi' command is executed.", "\
+Target has ROM at addr 0 is %s.",
+ NULL, NULL,
+ &setlist, &showlist);
+
+ add_setshow_boolean_cmd ("rdiheartbeat", no_class, &rdi_heartbeat, "\
+Set enable for ADP heartbeat packets.", "\
+Show enable for ADP heartbeat packets.", "\
+I don't know why you would want this. If you enable them,\n\
+it will confuse ARM and EPI JTAG interface boxes as well\n\
+as the Angel Monitor.", "\
+Enable for ADP heartbeat packets is %s.",
+ NULL, NULL,
+ &setlist, &showlist);
}
/* A little dummy to make linking with the library succeed. */
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index eab68eaf9e4..20683110232 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -645,7 +645,7 @@ remote_rdp_fetch_register (int regno)
{
printf ("Help me with fetch reg %d\n", regno);
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
@@ -721,7 +721,7 @@ rdp_set_command_line (char *command, char *args)
if (commandline != NULL)
xfree (commandline);
- xasprintf (&commandline, "%s %s", command, args);
+ commandline = xstrprintf ("%s %s", command, args);
}
static void
@@ -1181,7 +1181,7 @@ remote_rdp_open (char *args, int from_tty)
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- print_stack_frame (get_selected_frame (), -1, 1);
+ print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
}
@@ -1351,7 +1351,8 @@ remote_rdp_files_info (struct target_ops *target)
static void
-remote_rdp_create_inferior (char *exec_file, char *allargs, char **env)
+remote_rdp_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
CORE_ADDR entry_point;
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index d74fd7db242..5b4b3898adb 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -40,10 +40,6 @@
#include "gdbcore.h"
#include "regcache.h"
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <signal.h>
#include "serial.h"
@@ -76,8 +72,6 @@ static void sds_store_registers (int);
static void sds_mourn (void);
-static void sds_create_inferior (char *, char *, char **);
-
static void sds_load (char *, int);
static int getmessage (unsigned char *, int);
@@ -458,10 +452,10 @@ sds_fetch_registers (int regno)
{
unsigned char buf[PBUFSIZ];
int i, retlen;
- char *regs = alloca (DEPRECATED_REGISTER_BYTES);
+ char *regs = alloca (deprecated_register_bytes ());
/* Unimplemented registers read as all bits zero. */
- memset (regs, 0, DEPRECATED_REGISTER_BYTES);
+ memset (regs, 0, deprecated_register_bytes ());
buf[0] = 18;
buf[1] = 1;
@@ -484,7 +478,8 @@ sds_fetch_registers (int regno)
/* (should warn about reply too short) */
for (i = 0; i < NUM_REGS; i++)
- supply_register (i, &regs[DEPRECATED_REGISTER_BYTE (i)]);
+ regcache_raw_supply (current_regcache, i,
+ &regs[DEPRECATED_REGISTER_BYTE (i)]);
}
/* Prepare to store registers. Since we may send them all, we have to
@@ -494,7 +489,7 @@ static void
sds_prepare_to_store (void)
{
/* Make sure the entire registers array is valid. */
- deprecated_read_register_bytes (0, (char *) NULL, DEPRECATED_REGISTER_BYTES);
+ deprecated_read_register_bytes (0, (char *) NULL, deprecated_register_bytes ());
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
@@ -985,7 +980,7 @@ sds_mourn (void)
}
static void
-sds_create_inferior (char *exec_file, char *args, char **env)
+sds_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
inferior_ptid = pid_to_ptid (42000);
@@ -1120,10 +1115,11 @@ _initialize_remote_sds (void)
init_sds_ops ();
add_target (&sds_ops);
- add_show_from_set (add_set_cmd ("sdstimeout", no_class,
- var_integer, (char *) &sds_timeout,
- "Set timeout value for sds read.\n", &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("sdstimeout", no_class,
+ var_integer, (char *) &sds_timeout,
+ "Set timeout value for sds read.\n", &setlist),
+ &showlist);
add_com ("sds", class_obscure, sds_command,
"Send a command to the SDS monitor.");
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 9b0b3fd99fe..7a5c7b0aba9 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -48,8 +48,6 @@
extern void _initialize_remote_sim (void);
-extern int (*ui_loop_hook) (int signo);
-
static void dump_mem (char *buf, int len);
static void init_callbacks (void);
@@ -83,8 +81,6 @@ static void gdbsim_kill (void);
static void gdbsim_load (char *prog, int fromtty);
-static void gdbsim_create_inferior (char *exec_file, char *args, char **env);
-
static void gdbsim_open (char *args, int from_tty);
static void gdbsim_close (int quitting);
@@ -268,8 +264,8 @@ gdb_os_evprintf_filtered (host_callback * p, const char *format, va_list ap)
static void
gdb_os_error (host_callback * p, const char *format,...)
{
- if (error_hook)
- (*error_hook) ();
+ if (deprecated_error_hook)
+ (*deprecated_error_hook) ();
else
{
va_list args;
@@ -308,7 +304,7 @@ gdbsim_fetch_register (int regno)
char buf[MAX_REGISTER_SIZE];
int nr_bytes;
memset (buf, 0, MAX_REGISTER_SIZE);
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
set_register_cached (regno, -1);
break;
}
@@ -321,14 +317,14 @@ gdbsim_fetch_register (int regno)
memset (buf, 0, MAX_REGISTER_SIZE);
nr_bytes = sim_fetch_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
- buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
- if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno) && warn_user)
+ buf, register_size (current_gdbarch, regno));
+ if (nr_bytes > 0 && nr_bytes != register_size (current_gdbarch, regno) && warn_user)
{
fprintf_unfiltered (gdb_stderr,
"Size of register %s (%d/%d) incorrect (%d instead of %d))",
REGISTER_NAME (regno),
regno, REGISTER_SIM_REGNO (regno),
- nr_bytes, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ nr_bytes, register_size (current_gdbarch, regno));
warn_user = 0;
}
/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
@@ -336,12 +332,12 @@ gdbsim_fetch_register (int regno)
which registers are fetchable. */
/* Else if (nr_bytes < 0): an old simulator, that doesn't
think to return the register size. Just assume all is ok. */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
if (sr_get_debug ())
{
printf_filtered ("gdbsim_fetch_register: %d", regno);
/* FIXME: We could print something more intelligible. */
- dump_mem (buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ dump_mem (buf, register_size (current_gdbarch, regno));
}
break;
}
@@ -365,8 +361,8 @@ gdbsim_store_register (int regno)
deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
- tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
- if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno))
+ tmp, register_size (current_gdbarch, regno));
+ if (nr_bytes > 0 && nr_bytes != register_size (current_gdbarch, regno))
internal_error (__FILE__, __LINE__,
"Register size different to expected");
/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
@@ -376,7 +372,7 @@ gdbsim_store_register (int regno)
{
printf_filtered ("gdbsim_store_register: %d", regno);
/* FIXME: We could print something more intelligible. */
- dump_mem (tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ dump_mem (tmp, register_size (current_gdbarch, regno));
}
}
}
@@ -429,7 +425,7 @@ gdbsim_load (char *prog, int fromtty)
user types "run" after having attached. */
static void
-gdbsim_create_inferior (char *exec_file, char *args, char **env)
+gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
int len;
char *arg_buf, **argv;
@@ -636,8 +632,8 @@ gdbsim_stop (void)
static int
gdb_os_poll_quit (host_callback *p)
{
- if (ui_loop_hook != NULL)
- ui_loop_hook (0);
+ if (deprecated_ui_loop_hook != NULL)
+ deprecated_ui_loop_hook (0);
if (quit_flag) /* gdb's idea of quit */
{
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index ce4c7ab13e5..eba847fde74 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -222,14 +222,15 @@ get_hex_regs (int n, int regno)
val = 0;
for (j = 0; j < 8; j++)
val = (val << 4) + get_hex_digit (j == 0);
- supply_register (regno++, (char *) &val);
+ regcache_raw_supply (current_regcache, regno++, (char *) &val);
}
}
/* This is called not only when we first attach, but also when the
user types "run" after having attached. */
static void
-st2000_create_inferior (char *execfile, char *args, char **env)
+st2000_create_inferior (char *execfile, char *args, char **env,
+ int from_tty)
{
int entry_pt;
diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c
index ba150e34d5d..2f3032c7e0d 100644
--- a/gdb/remote-utils.c
+++ b/gdb/remote-utils.c
@@ -596,12 +596,13 @@ void
_initialize_sr_support (void)
{
/* FIXME-now: if target is open... */
- add_show_from_set (add_set_cmd ("remotedevice", no_class,
- var_filename, (char *) &sr_settings.device,
- "Set device for remote serial I/O.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotedevice", no_class,
+ var_filename, (char *) &sr_settings.device,
+ "Set device for remote serial I/O.\n\
This device is used as the serial port when debugging using remote\n\
targets.", &setlist),
- &showlist);
+ &showlist);
add_com ("remote <command>", class_obscure, sr_com,
"Send a command to the remote monitor.");
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index fd51781b196..de5cc03fb41 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -202,7 +202,7 @@ vx_remove_breakpoint (int addr)
On VxWorks, we ignore exec_file. */
static void
-vx_create_inferior (char *exec_file, char *args, char **env)
+vx_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
enum clnt_stat status;
arg_array passArgs;
@@ -466,7 +466,7 @@ static void
vx_prepare_to_store (void)
{
/* Fetch all registers, if any of them are not yet fetched. */
- deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, deprecated_register_bytes ());
}
/* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
@@ -566,7 +566,7 @@ vx_run_files_info (void)
{
printf_unfiltered ("\tRunning %s VxWorks process %s",
vx_running ? "child" : "attached",
- local_hex_string (PIDGET (inferior_ptid)));
+ hex_string (PIDGET (inferior_ptid)));
if (vx_running)
printf_unfiltered (", function `%s'", vx_running);
printf_unfiltered (".\n");
@@ -747,17 +747,8 @@ net_step (void)
SOURCE_STEP source_step;
source_step.taskId = PIDGET (inferior_ptid);
-
- if (step_range_end)
- {
- source_step.startAddr = step_range_start;
- source_step.endAddr = step_range_end;
- }
- else
- {
- source_step.startAddr = 0;
- source_step.endAddr = 0;
- }
+ source_step.startAddr = 0;
+ source_step.endAddr = 0;
status = net_clnt_call (VX_SOURCE_STEP, xdr_SOURCE_STEP, &source_step,
xdr_int, &step_status);
@@ -981,7 +972,7 @@ vx_wait (ptid_t ptid_to_wait_for, struct target_waitstatus *status)
else if (pid != PIDGET (inferior_ptid))
internal_error (__FILE__, __LINE__,
"Bad pid for debugged task: %s\n",
- local_hex_string ((unsigned long) pid));
+ hex_string ((unsigned long) pid));
}
while (pid == 0);
@@ -1192,7 +1183,7 @@ vx_attach (char *args, int from_tty)
if (from_tty)
printf_unfiltered ("Attaching pid %s.\n",
- local_hex_string ((unsigned long) pid));
+ hex_string ((unsigned long) pid));
memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
@@ -1239,7 +1230,7 @@ vx_detach (char *args, int from_tty)
if (from_tty)
printf_unfiltered ("Detaching pid %s.\n",
- local_hex_string (
+ hex_string (
(unsigned long) PIDGET (inferior_ptid)));
if (args) /* FIXME, should be possible to leave suspended */
@@ -1271,7 +1262,8 @@ vx_kill (void)
Ptrace_return ptrace_out;
int status;
- printf_unfiltered ("Killing pid %s.\n", local_hex_string ((unsigned long) PIDGET (inferior_ptid)));
+ printf_unfiltered ("Killing pid %s.\n",
+ hex_string ((unsigned long) PIDGET (inferior_ptid)));
memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
@@ -1400,7 +1392,7 @@ _initialize_vx (void)
init_vx_run_ops ();
add_target (&vx_run_ops);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("vxworks-timeout", class_support, var_uinteger,
(char *) &rpcTimeout.tv_sec,
"Set seconds to wait for rpc calls to return.\n\
diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c
index 8cdac6f0278..8b008247e72 100644
--- a/gdb/remote-vx68.c
+++ b/gdb/remote-vx68.c
@@ -85,14 +85,15 @@ vx_read_register (int regno)
net_read_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_GETREGS);
- bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
- 16 * MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_SR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
- MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_PC],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
- MC68K_GREG_SIZE);
+ memcpy (deprecated_registers,
+ &mc68k_greg_packet[MC68K_R_D0]
+ 16 * MC68K_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ &mc68k_greg_packet[MC68K_R_SR],
+ MC68K_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
+ &mc68k_greg_packet[MC68K_R_PC],
+ MC68K_GREG_SIZE);
/* Get floating-point registers, if the target system has them.
Otherwise, zero them. */
@@ -102,12 +103,12 @@ vx_read_register (int regno)
net_read_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
PTRACE_GETFPREGS);
- bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- MC68K_FPREG_SIZE * 8);
- bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ &mc68k_fpreg_packet[MC68K_R_FP0],
+ MC68K_FPREG_SIZE * 8);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
+ &mc68k_fpreg_packet[MC68K_R_FPCR],
+ MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
else
{
@@ -134,12 +135,14 @@ vx_write_register (int regno)
/* Store general-purpose registers. */
- bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0],
- 16 * MC68K_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
- &mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
- &mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
+ memcpy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
+ 16 * MC68K_GREG_SIZE);
+ memcpy (&mc68k_greg_packet[MC68K_R_SR],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ MC68K_GREG_SIZE);
+ memcpy (&mc68k_greg_packet[MC68K_R_PC],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
+ MC68K_GREG_SIZE);
net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
@@ -147,12 +150,12 @@ vx_write_register (int regno)
if (target_has_fp)
{
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- &mc68k_fpreg_packet[MC68K_R_FP0],
- MC68K_FPREG_SIZE * 8);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- &mc68k_fpreg_packet[MC68K_R_FPCR],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
+ memcpy (&mc68k_fpreg_packet[MC68K_R_FP0],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ MC68K_FPREG_SIZE * 8);
+ memcpy (&mc68k_fpreg_packet[MC68K_R_FPCR],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
+ MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
net_write_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
PTRACE_SETFPREGS);
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 55ba49b98ca..84e6c7dbb75 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -103,19 +103,23 @@ vx_read_register (int regno)
/* Copy the general registers. */
- bcopy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
- 32 * MIPS_GREG_SIZE);
+ memcpy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
- bcopy (&mips_greg_packet[MIPS_R_SR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_LO],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_HI],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_PC],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)], MIPS_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ &mips_greg_packet[MIPS_R_SR],
+ MIPS_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+ &mips_greg_packet[MIPS_R_LO],
+ MIPS_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+ &mips_greg_packet[MIPS_R_HI],
+ MIPS_GREG_SIZE);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+ &mips_greg_packet[MIPS_R_PC],
+ MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
@@ -129,22 +133,22 @@ vx_read_register (int regno)
/* Copy the floating point registers. */
- bcopy (&mips_fpreg_packet[MIPS_R_FP0],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ &mips_fpreg_packet[MIPS_R_FP0],
+ register_size (current_gdbarch, FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
- bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+ &mips_fpreg_packet[MIPS_R_FPCSR],
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp_control_status));
}
else
{
memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- 0, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ 0, register_size (current_gdbarch, FP0_REGNUM) * 32);
memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
- 0, DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
+ 0, register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp_control_status));
}
/* Mark the register cache valid. */
@@ -163,19 +167,23 @@ vx_write_register (int regno)
/* Store general registers. */
- bcopy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
- 32 * MIPS_GREG_SIZE);
+ memcpy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
- &mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
- &mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
- &mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
- &mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
+ memcpy (&mips_greg_packet[MIPS_R_SR],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ MIPS_GREG_SIZE);
+ memcpy (&mips_greg_packet[MIPS_R_LO],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+ MIPS_GREG_SIZE);
+ memcpy (&mips_greg_packet[MIPS_R_HI],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+ MIPS_GREG_SIZE);
+ memcpy (&mips_greg_packet[MIPS_R_PC],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+ MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
@@ -185,15 +193,15 @@ vx_write_register (int regno)
{
/* Copy the floating point data registers. */
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- &mips_fpreg_packet[MIPS_R_FP0],
- DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ memcpy (&mips_fpreg_packet[MIPS_R_FP0],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ register_size (current_gdbarch, FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
- &mips_fpreg_packet[MIPS_R_FPCSR],
- DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
+ memcpy (&mips_fpreg_packet[MIPS_R_FPCSR],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+ register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp_control_status));
net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
PTRACE_SETFPREGS);
diff --git a/gdb/remote.c b/gdb/remote.c
index e23a30f4127..497f97242cc 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -43,9 +43,6 @@
#include <ctype.h>
#include <sys/time.h>
-#ifdef USG
-#include <sys/types.h>
-#endif
#include "event-loop.h"
#include "event-top.h"
@@ -107,9 +104,6 @@ static void extended_remote_restart (void);
static void extended_remote_mourn (void);
-static void extended_remote_create_inferior (char *, char *, char **);
-static void extended_remote_async_create_inferior (char *, char *, char **);
-
static void remote_mourn_1 (struct target_ops *);
static void remote_send (char *buf, long sizeof_buf);
@@ -211,7 +205,7 @@ struct packet_reg
long regnum; /* GDB's internal register number. */
LONGEST pnum; /* Remote protocol register number. */
int in_g_packet; /* Always part of G packet. */
- /* long size in bytes; == DEPRECATED_REGISTER_RAW_SIZE (regnum); at present. */
+ /* long size in bytes; == register_size (current_gdbarch, regnum); at present. */
/* char *name; == REGISTER_NAME (regnum); at present. */
};
@@ -253,8 +247,8 @@ init_remote_state (struct gdbarch *gdbarch)
int regnum;
struct remote_state *rs = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct remote_state);
- if (DEPRECATED_REGISTER_BYTES != 0)
- rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES;
+ if (deprecated_register_bytes () != 0)
+ rs->sizeof_g_packet = deprecated_register_bytes ();
else
rs->sizeof_g_packet = 0;
@@ -271,7 +265,7 @@ init_remote_state (struct gdbarch *gdbarch)
/* ...name = REGISTER_NAME (regnum); */
/* Compute packet size by accumulating the size of all registers. */
- if (DEPRECATED_REGISTER_BYTES == 0)
+ if (deprecated_register_bytes () == 0)
rs->sizeof_g_packet += register_size (current_gdbarch, regnum);
}
@@ -649,26 +643,31 @@ add_packet_config_cmd (struct packet_config *config,
struct cmd_list_element *show_cmd;
char *set_doc;
char *show_doc;
+ char *help_doc;
+ char *print;
char *cmd_name;
config->name = name;
config->title = title;
config->detect = AUTO_BOOLEAN_AUTO;
config->support = PACKET_SUPPORT_UNKNOWN;
- xasprintf (&set_doc, "Set use of remote protocol `%s' (%s) packet",
- name, title);
- xasprintf (&show_doc, "Show current use of remote protocol `%s' (%s) packet",
- name, title);
+ set_doc = xstrprintf ("Set use of remote protocol `%s' (%s) packet",
+ name, title);
+ show_doc = xstrprintf ("Show current use of remote protocol `%s' (%s) packet",
+ name, title);
+ print = xstrprintf ("Current use of remote protocol `%s' (%s) is %%s",
+ name, title);
/* set/show TITLE-packet {auto,on,off} */
- xasprintf (&cmd_name, "%s-packet", title);
+ cmd_name = xstrprintf ("%s-packet", title);
add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
&config->detect, set_doc, show_doc,
+ "", print,
set_func, show_func,
set_remote_list, show_remote_list);
/* set/show remote NAME-packet {auto,on,off} -- legacy */
if (legacy)
{
char *legacy_name;
- xasprintf (&legacy_name, "%s-packet", name);
+ legacy_name = xstrprintf ("%s-packet", name);
add_alias_cmd (legacy_name, cmd_name, class_obscure, 0,
set_remote_list);
add_alias_cmd (legacy_name, cmd_name, class_obscure, 0,
@@ -774,42 +773,6 @@ show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
show_packet_config_cmd (&remote_protocol_qSymbol);
}
-/* Should we try the 'e' (step over range) request? */
-static struct packet_config remote_protocol_e;
-
-static void
-set_remote_protocol_e_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
-{
- update_packet_config (&remote_protocol_e);
-}
-
-static void
-show_remote_protocol_e_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
-{
- show_packet_config_cmd (&remote_protocol_e);
-}
-
-
-/* Should we try the 'E' (step over range / w signal #) request? */
-static struct packet_config remote_protocol_E;
-
-static void
-set_remote_protocol_E_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
-{
- update_packet_config (&remote_protocol_E);
-}
-
-static void
-show_remote_protocol_E_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
-{
- show_packet_config_cmd (&remote_protocol_E);
-}
-
-
/* Should we try the 'P' (set register) request? */
static struct packet_config remote_protocol_P;
@@ -1006,8 +969,8 @@ static void *sigint_remote_token;
/* These are pointers to hook functions that may be set in order to
modify resume/wait behavior for a particular architecture. */
-void (*target_resume_hook) (void);
-void (*target_wait_loop_hook) (void);
+void (*deprecated_target_resume_hook) (void);
+void (*deprecated_target_wait_loop_hook) (void);
@@ -2077,8 +2040,6 @@ static void
init_all_packet_configs (void)
{
int i;
- update_packet_config (&remote_protocol_e);
- update_packet_config (&remote_protocol_E);
update_packet_config (&remote_protocol_P);
update_packet_config (&remote_protocol_qSymbol);
update_packet_config (&remote_protocol_vcont);
@@ -2552,8 +2513,8 @@ remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
/* A hook for when we need to do something at the last moment before
resumption. */
- if (target_resume_hook)
- (*target_resume_hook) ();
+ if (deprecated_target_resume_hook)
+ (*deprecated_target_resume_hook) ();
/* The vCont packet doesn't need to specify threads via Hc. */
if (remote_vcont_resume (ptid, step, siggnal))
@@ -2565,60 +2526,6 @@ remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
else
set_thread (pid, 0); /* run this thread */
- /* The s/S/c/C packets do not return status. So if the target does
- not support the S or C packets, the debug agent returns an empty
- string which is detected in remote_wait(). This protocol defect
- is fixed in the e/E packets. */
-
- if (step && step_range_end)
- {
- /* If the target does not support the 'E' packet, we try the 'S'
- packet. Ideally we would fall back to the 'e' packet if that
- too is not supported. But that would require another copy of
- the code to issue the 'e' packet (and fall back to 's' if not
- supported) in remote_wait(). */
-
- if (siggnal != TARGET_SIGNAL_0)
- {
- if (remote_protocol_E.support != PACKET_DISABLE)
- {
- p = buf;
- *p++ = 'E';
- *p++ = tohex (((int) siggnal >> 4) & 0xf);
- *p++ = tohex (((int) siggnal) & 0xf);
- *p++ = ',';
- p += hexnumstr (p, (ULONGEST) step_range_start);
- *p++ = ',';
- p += hexnumstr (p, (ULONGEST) step_range_end);
- *p++ = 0;
-
- putpkt (buf);
- getpkt (buf, (rs->remote_packet_size), 0);
-
- if (packet_ok (buf, &remote_protocol_E) == PACKET_OK)
- return;
- }
- }
- else
- {
- if (remote_protocol_e.support != PACKET_DISABLE)
- {
- p = buf;
- *p++ = 'e';
- p += hexnumstr (p, (ULONGEST) step_range_start);
- *p++ = ',';
- p += hexnumstr (p, (ULONGEST) step_range_end);
- *p++ = 0;
-
- putpkt (buf);
- getpkt (buf, (rs->remote_packet_size), 0);
-
- if (packet_ok (buf, &remote_protocol_e) == PACKET_OK)
- return;
- }
- }
- }
-
if (siggnal != TARGET_SIGNAL_0)
{
buf[0] = step ? 'S' : 'C';
@@ -2645,7 +2552,7 @@ remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
/* FIXME: ezannoni 1999-09-28: We may need to move this out of here
into infcmd.c in order to allow inferior function calls to work
NOT asynchronously. */
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
target_async (inferior_event_handler, 0);
/* Tell the world that the target is now executing. */
/* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
@@ -2883,8 +2790,8 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
- if (target_wait_loop_hook)
- (*target_wait_loop_hook) ();
+ if (deprecated_target_wait_loop_hook)
+ (*deprecated_target_wait_loop_hook) ();
remote_stopped_by_watchpoint_p = 0;
@@ -2974,11 +2881,11 @@ Packet: '%s'\n",
error ("Remote sent bad register number %s: %s\nPacket: '%s'\n",
phex_nz (pnum, 0), p, buf);
- fieldsize = hex2bin (p, regs, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
+ fieldsize = hex2bin (p, regs, register_size (current_gdbarch, reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
+ if (fieldsize < register_size (current_gdbarch, reg->regnum))
warning ("Remote reply is too short: %s", buf);
- supply_register (reg->regnum, regs);
+ regcache_raw_supply (current_regcache, reg->regnum, regs);
}
if (*p++ != ';')
@@ -3074,8 +2981,8 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
- if (target_wait_loop_hook)
- (*target_wait_loop_hook) ();
+ if (deprecated_target_wait_loop_hook)
+ (*deprecated_target_wait_loop_hook) ();
switch (buf[0])
{
@@ -3162,11 +3069,11 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
error ("Remote sent bad register number %ld: %s\nPacket: '%s'\n",
pnum, p, buf);
- fieldsize = hex2bin (p, regs, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
+ fieldsize = hex2bin (p, regs, register_size (current_gdbarch, reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
+ if (fieldsize < register_size (current_gdbarch, reg->regnum))
warning ("Remote reply is too short: %s", buf);
- supply_register (reg->regnum, regs);
+ regcache_raw_supply (current_regcache, reg->regnum, regs);
}
if (*p++ != ';')
@@ -3392,8 +3299,8 @@ store_register_using_P (int regnum)
sprintf (buf, "P%s=", phex_nz (reg->pnum, 0));
p = buf + strlen (buf);
- regcache_collect (reg->regnum, regp);
- bin2hex (regp, p, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
+ regcache_raw_collect (current_regcache, reg->regnum, regp);
+ bin2hex (regp, p, register_size (current_gdbarch, reg->regnum));
remote_send (buf, rs->remote_packet_size);
return buf[0] != '\0';
@@ -3453,7 +3360,7 @@ remote_store_registers (int regnum)
{
struct packet_reg *r = &rs->regs[i];
if (r->in_g_packet)
- regcache_collect (r->regnum, regs + r->offset);
+ regcache_raw_collect (current_regcache, r->regnum, regs + r->offset);
}
}
@@ -4338,7 +4245,8 @@ remote_mourn_1 (struct target_ops *target)
we're debugging, arguments and an environment. */
static void
-extended_remote_create_inferior (char *exec_file, char *args, char **env)
+extended_remote_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
/* Rip out the breakpoints; we'll reinsert them after restarting
the remote server. */
@@ -4360,7 +4268,8 @@ extended_remote_create_inferior (char *exec_file, char *args, char **env)
/* Async version of extended_remote_create_inferior. */
static void
-extended_remote_async_create_inferior (char *exec_file, char *args, char **env)
+extended_remote_async_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
/* Rip out the breakpoints; we'll reinsert them after restarting
the remote server. */
@@ -4368,7 +4277,7 @@ extended_remote_async_create_inferior (char *exec_file, char *args, char **env)
/* If running asynchronously, register the target file descriptor
with the event loop. */
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
target_async (inferior_event_handler, 0);
/* Now restart the remote server. */
@@ -4640,10 +4549,13 @@ remote_stopped_by_watchpoint (void)
return remote_stopped_by_watchpoint_p;
}
+extern int stepped_after_stopped_by_watchpoint;
+
static CORE_ADDR
remote_stopped_data_address (void)
{
- if (remote_stopped_by_watchpoint ())
+ if (remote_stopped_by_watchpoint ()
+ || stepped_after_stopped_by_watchpoint)
return remote_watch_data_address;
return (CORE_ADDR)0;
}
@@ -4819,7 +4731,7 @@ compare_sections_command (char *args, int from_tty)
if (!(s->flags & SEC_LOAD))
continue; /* skip non-loadable section */
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
if (size == 0)
continue; /* skip zero-length section */
@@ -5419,8 +5331,6 @@ show_remote_cmd (char *args, int from_tty)
/* FIXME: cagney/2002-06-15: This function should iterate over
remote_show_cmdlist for a list of sub commands to show. */
show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
- show_remote_protocol_e_packet_cmd (args, from_tty, NULL);
- show_remote_protocol_E_packet_cmd (args, from_tty, NULL);
show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
show_remote_protocol_vcont_packet_cmd (args, from_tty, NULL);
@@ -5479,8 +5389,8 @@ _initialize_remote (void)
add_target (&extended_async_remote_ops);
/* Hook into new objfile notification. */
- remote_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = remote_new_objfile;
+ remote_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = remote_new_objfile;
#if 0
init_remote_threadtests ();
@@ -5515,9 +5425,11 @@ response packet. GDB supplies the initial `$' character, and the\n\
terminating `#' character and checksum.",
&maintenancelist);
- add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break,
- "Set whether to send break if interrupted.\n",
- "Show whether to send break if interrupted.\n",
+ add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break, "\
+Set whether to send break if interrupted.", "\
+Show whether to send break if interrupted.", "\
+If set, a break, instead of a cntrl-c, is sent to the remote target.", "\
+Whether to send break if interrupted is %s.",
NULL, NULL,
&setlist, &showlist);
@@ -5554,20 +5466,24 @@ terminating `#' character and checksum.",
"Show the maximum number of bytes per memory-read packet.\n",
&remote_show_cmdlist);
- add_setshow_cmd ("hardware-watchpoint-limit", no_class,
- var_zinteger, &remote_hw_watchpoint_limit, "\
-Set the maximum number of target hardware watchpoints.\n\
+ add_setshow_zinteger_cmd ("hardware-watchpoint-limit", no_class,
+ &remote_hw_watchpoint_limit, "\
+Set the maximum number of target hardware watchpoints.", "\
+Show the maximum number of target hardware watchpoints.", "\
Specify a negative limit for unlimited.", "\
-Show the maximum number of target hardware watchpoints.\n",
- NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
- add_setshow_cmd ("hardware-breakpoint-limit", no_class,
- var_zinteger, &remote_hw_breakpoint_limit, "\
-Set the maximum number of target hardware breakpoints.\n\
+The maximum number of target hardware watchpoints is %s.",
+ NULL, NULL,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+ add_setshow_zinteger_cmd ("hardware-breakpoint-limit", no_class,
+ &remote_hw_breakpoint_limit, "\
+Set the maximum number of target hardware breakpoints.", "\
+Show the maximum number of target hardware breakpoints.", "\
Specify a negative limit for unlimited.", "\
-Show the maximum number of target hardware breakpoints.\n",
- NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
+The maximum number of target hardware breakpoints is %s.",
+ NULL, NULL,
+ &remote_set_cmdlist, &remote_show_cmdlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("remoteaddresssize", class_obscure,
var_integer, (char *) &remote_address_size,
"Set the maximum size of the address (in bits) \
@@ -5584,7 +5500,7 @@ in a memory packet.\n",
#if 0
/* XXXX - should ``set remotebinarydownload'' be retained for
compatibility. */
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("remotebinarydownload", no_class,
var_boolean, (char *) &remote_binary_download,
"Set binary downloads.\n", &setlist),
@@ -5605,28 +5521,6 @@ in a memory packet.\n",
&remote_set_cmdlist, &remote_show_cmdlist,
0);
- add_packet_config_cmd (&remote_protocol_e,
- "e", "step-over-range",
- set_remote_protocol_e_packet_cmd,
- show_remote_protocol_e_packet_cmd,
- &remote_set_cmdlist, &remote_show_cmdlist,
- 0);
- /* Disable by default. The ``e'' packet has nasty interactions with
- the threading code - it relies on global state. */
- remote_protocol_e.detect = AUTO_BOOLEAN_FALSE;
- update_packet_config (&remote_protocol_e);
-
- add_packet_config_cmd (&remote_protocol_E,
- "E", "step-over-range-w-signal",
- set_remote_protocol_E_packet_cmd,
- show_remote_protocol_E_packet_cmd,
- &remote_set_cmdlist, &remote_show_cmdlist,
- 0);
- /* Disable by default. The ``e'' packet has nasty interactions with
- the threading code - it relies on global state. */
- remote_protocol_E.detect = AUTO_BOOLEAN_FALSE;
- update_packet_config (&remote_protocol_E);
-
add_packet_config_cmd (&remote_protocol_P,
"P", "set-register",
set_remote_protocol_P_packet_cmd,
@@ -5679,8 +5573,11 @@ in a memory packet.\n",
/* Keep the old ``set remote Z-packet ...'' working. */
add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
&remote_Z_packet_detect, "\
-Set use of remote protocol `Z' packets",
- "Show use of remote protocol `Z' packets ",
+Set use of remote protocol `Z' packets", "\
+Show use of remote protocol `Z' packets ", "\
+When set, GDB will attempt to use the remote breakpoint and watchpoint\n\
+packets.", "\
+Use of remote protocol `Z' packets is %s",
set_remote_protocol_Z_packet_cmd,
show_remote_protocol_Z_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
diff --git a/gdb/remote.h b/gdb/remote.h
index 7c0df32ad6f..40c55f17a84 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -58,7 +58,7 @@ 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);
+extern void (*deprecated_target_resume_hook) (void);
+extern void (*deprecated_target_wait_loop_hook) (void);
#endif
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index 2ddba0acf5b..01422a6d3fa 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -101,8 +101,8 @@ rom68k_supply_one_register (int regno, unsigned char *hex)
while (is_whitespace (*hex))
hex++;
- store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), value);
- supply_register (regno, regbuf);
+ store_unsigned_integer (regbuf, register_size (current_gdbarch, regno), value);
+ regcache_raw_supply (current_regcache, regno, regbuf);
return hex;
}
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 3d6c07c3dda..59067c64d29 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -28,12 +28,11 @@
#include "xcoffsolib.h"
#include "symfile.h"
#include "objfiles.h"
-#include "libbfd.h" /* For bfd_cache_lookup (FIXME) */
+#include "libbfd.h" /* For bfd_default_set_arch_mach (FIXME) */
#include "bfd.h"
#include "gdb-stabs.h"
#include "regcache.h"
#include "arch-utils.h"
-#include "language.h" /* for local_hex_string(). */
#include "ppc-tdep.h"
#include "exec.h"
@@ -73,7 +72,7 @@
#ifndef ARCH3264
# define ARCH64() 0
#else
-# define ARCH64() (DEPRECATED_REGISTER_RAW_SIZE (0) == 8)
+# define ARCH64() (register_size (current_gdbarch, 0) == 8)
#endif
/* Union of 32-bit and 64-bit ".reg" core file sections. */
@@ -156,12 +155,15 @@ regmap (int regno, int *isfloat)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
*isfloat = 0;
- if (tdep->ppc_gp0_regnum <= regno && regno <= tdep->ppc_gplast_regnum)
+ if (tdep->ppc_gp0_regnum <= regno
+ && regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
return regno;
- else if (FP0_REGNUM <= regno && regno <= FPLAST_REGNUM)
+ else if (tdep->ppc_fp0_regnum >= 0
+ && tdep->ppc_fp0_regnum <= regno
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
{
*isfloat = 1;
- return regno - FP0_REGNUM + FPR0;
+ return regno - tdep->ppc_fp0_regnum + FPR0;
}
else if (regno == PC_REGNUM)
return IAR;
@@ -175,7 +177,8 @@ regmap (int regno, int *isfloat)
return CTR;
else if (regno == tdep->ppc_xer_regnum)
return XER;
- else if (regno == tdep->ppc_fpscr_regnum)
+ else if (tdep->ppc_fpscr_regnum >= 0
+ && regno == tdep->ppc_fpscr_regnum)
return FPSCR;
else if (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum)
return MQ;
@@ -251,7 +254,7 @@ fetch_register (int regno)
even if the register is really only 32 bits. */
long long buf;
rs6000_ptrace64 (PT_READ_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
+ if (register_size (current_gdbarch, regno) == 8)
memcpy (addr, &buf, 8);
else
*addr = buf;
@@ -259,7 +262,7 @@ fetch_register (int regno)
}
if (!errno)
- supply_register (regno, (char *) addr);
+ regcache_raw_supply (current_regcache, regno, (char *) addr);
else
{
#if 0
@@ -279,7 +282,7 @@ store_register (int regno)
int nr, isfloat;
/* Fetch the register's value from the register cache. */
- regcache_collect (regno, addr);
+ regcache_raw_collect (current_regcache, regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
@@ -320,7 +323,7 @@ store_register (int regno)
/* PT_WRITE_GPR requires the buffer parameter to point to an 8-byte
area, even if the register is really only 32 bits. */
long long buf;
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
+ if (register_size (current_gdbarch, regno) == 8)
memcpy (&buf, addr, 8);
else
buf = *addr;
@@ -350,15 +353,16 @@ fetch_inferior_registers (int regno)
/* Read 32 general purpose registers. */
for (regno = tdep->ppc_gp0_regnum;
- regno <= tdep->ppc_gplast_regnum;
+ regno < tdep->ppc_gp0_regnum + ppc_num_gprs;
regno++)
{
fetch_register (regno);
}
/* Read general purpose floating point registers. */
- for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
- fetch_register (regno);
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (regno = 0; regno < ppc_num_fprs; regno++)
+ fetch_register (tdep->ppc_fp0_regnum + regno);
/* Read special registers. */
fetch_register (PC_REGNUM);
@@ -367,7 +371,8 @@ fetch_inferior_registers (int regno)
fetch_register (tdep->ppc_lr_regnum);
fetch_register (tdep->ppc_ctr_regnum);
fetch_register (tdep->ppc_xer_regnum);
- fetch_register (tdep->ppc_fpscr_regnum);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ fetch_register (tdep->ppc_fpscr_regnum);
if (tdep->ppc_mq_regnum >= 0)
fetch_register (tdep->ppc_mq_regnum);
}
@@ -389,15 +394,16 @@ store_inferior_registers (int regno)
/* Write general purpose registers first. */
for (regno = tdep->ppc_gp0_regnum;
- regno <= tdep->ppc_gplast_regnum;
+ regno < tdep->ppc_gp0_regnum + ppc_num_gprs;
regno++)
{
store_register (regno);
}
/* Write floating point registers. */
- for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
- store_register (regno);
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (regno = 0; regno < ppc_num_fprs; regno++)
+ store_register (tdep->ppc_fp0_regnum + regno);
/* Write special registers. */
store_register (PC_REGNUM);
@@ -406,7 +412,8 @@ store_inferior_registers (int regno)
store_register (tdep->ppc_lr_regnum);
store_register (tdep->ppc_ctr_regnum);
store_register (tdep->ppc_xer_regnum);
- store_register (tdep->ppc_fpscr_regnum);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ store_register (tdep->ppc_fpscr_regnum);
if (tdep->ppc_mq_regnum >= 0)
store_register (tdep->ppc_mq_regnum);
}
@@ -578,37 +585,60 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (ARCH64 ())
{
- for (regi = 0; regi < 32; regi++)
- supply_register (regi, (char *) &regs->r64.gpr[regi]);
-
- for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi, (char *) &regs->r64.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) &regs->r64.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &regs->r64.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &regs->r64.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &regs->r64.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &regs->r64.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &regs->r64.xer);
- supply_register (tdep->ppc_fpscr_regnum, (char *) &regs->r64.fpscr);
+ for (regi = 0; regi < ppc_num_gprs; regi++)
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
+ (char *) &regs->r64.gpr[regi]);
+
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (regi = 0; regi < ppc_num_fprs; regi++)
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
+ (char *) &regs->r64.fpr[regi]);
+
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ (char *) &regs->r64.iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
+ (char *) &regs->r64.msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ (char *) &regs->r64.cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ (char *) &regs->r64.lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ (char *) &regs->r64.ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ (char *) &regs->r64.xer);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) &regs->r64.fpscr);
}
else
{
- for (regi = 0; regi < 32; regi++)
- supply_register (regi, (char *) &regs->r32.gpr[regi]);
-
- for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi, (char *) &regs->r32.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) &regs->r32.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &regs->r32.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &regs->r32.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &regs->r32.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &regs->r32.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &regs->r32.xer);
- supply_register (tdep->ppc_fpscr_regnum, (char *) &regs->r32.fpscr);
+ for (regi = 0; regi < ppc_num_gprs; regi++)
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
+ (char *) &regs->r32.gpr[regi]);
+
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (regi = 0; regi < ppc_num_fprs; regi++)
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
+ (char *) &regs->r32.fpr[regi]);
+
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ (char *) &regs->r32.iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
+ (char *) &regs->r32.msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ (char *) &regs->r32.cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ (char *) &regs->r32.lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ (char *) &regs->r32.ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ (char *) &regs->r32.xer);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) &regs->r32.fpscr);
if (tdep->ppc_mq_regnum >= 0)
- supply_register (tdep->ppc_mq_regnum, (char *) &regs->r32.mq);
+ regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
+ (char *) &regs->r32.mq);
}
}
@@ -880,8 +910,8 @@ vmap_ldinfo (LdInfo *ldi)
/* Announce new object files. Doing this after symbol relocation
makes aix-thread.c's job easier. */
- if (target_new_objfile_hook && vp->objfile)
- target_new_objfile_hook (vp->objfile);
+ if (deprecated_target_new_objfile_hook && vp->objfile)
+ deprecated_target_new_objfile_hook (vp->objfile);
/* There may be more, so we don't break out of the loop. */
}
@@ -1162,8 +1192,8 @@ xcoff_relocate_core (struct target_ops *target)
vmap_symtab (vp);
- if (target_new_objfile_hook && vp != vmap && vp->objfile)
- target_new_objfile_hook (vp->objfile);
+ if (deprecated_target_new_objfile_hook && vp != vmap && vp->objfile)
+ deprecated_target_new_objfile_hook (vp->objfile);
}
while (LDI_NEXT (ldi, arch64) != 0);
vmap_exec ();
@@ -1198,7 +1228,7 @@ find_toc_address (CORE_ADDR pc)
: vp->objfile);
}
}
- error ("Unable to find TOC entry for pc %s\n", local_hex_string (pc));
+ error ("Unable to find TOC entry for pc %s\n", hex_string (pc));
}
/* Register that we are able to handle rs6000 core file formats. */
@@ -1223,5 +1253,5 @@ _initialize_core_rs6000 (void)
starting a child process. */
rs6000_set_host_arch_hook = set_host_arch;
- add_core_fns (&rs6000_core_fns);
+ deprecated_add_core_fns (&rs6000_core_fns);
}
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index b4d624838e1..36741c5e5e2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -31,10 +31,15 @@
#include "objfiles.h"
#include "arch-utils.h"
#include "regcache.h"
+#include "regset.h"
#include "doublest.h"
#include "value.h"
#include "parser-defs.h"
#include "osabi.h"
+#include "infcall.h"
+#include "sim-regno.h"
+#include "gdb/sim-ppc.h"
+#include "reggroups.h"
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
@@ -97,6 +102,9 @@ struct reg
unsigned char sz64; /* size on 64-bit arch, 0 if nonextant */
unsigned char fpr; /* whether register is floating-point */
unsigned char pseudo; /* whether register is pseudo */
+ int spr_num; /* PowerPC SPR number, or -1 if not an SPR.
+ This is an ISA SPR number, not a GDB
+ register number. */
};
/* Breakpoint shadows for the single step instructions will be kept here. */
@@ -139,18 +147,343 @@ altivec_register_p (int regno)
return (regno >= tdep->ppc_vr0_regnum && regno <= tdep->ppc_vrsave_regnum);
}
-/* Use the architectures FP registers? */
+
+/* Return true if REGNO is an SPE register, false otherwise. */
int
-ppc_floating_point_unit_p (struct gdbarch *gdbarch)
+spe_register_p (int regno)
{
- const struct bfd_arch_info *info = gdbarch_bfd_arch_info (gdbarch);
- if (info->arch == bfd_arch_powerpc)
- return (info->mach != bfd_mach_ppc_e500);
- if (info->arch == bfd_arch_rs6000)
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* Is it a reference to EV0 -- EV31, and do we have those? */
+ if (tdep->ppc_ev0_regnum >= 0
+ && tdep->ppc_ev31_regnum >= 0
+ && tdep->ppc_ev0_regnum <= regno && regno <= tdep->ppc_ev31_regnum)
+ return 1;
+
+ /* Is it a reference to one of the raw upper GPR halves? */
+ if (tdep->ppc_ev0_upper_regnum >= 0
+ && tdep->ppc_ev0_upper_regnum <= regno
+ && regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs)
+ return 1;
+
+ /* Is it a reference to the 64-bit accumulator, and do we have that? */
+ if (tdep->ppc_acc_regnum >= 0
+ && tdep->ppc_acc_regnum == regno)
+ return 1;
+
+ /* Is it a reference to the SPE floating-point status and control register,
+ and do we have that? */
+ if (tdep->ppc_spefscr_regnum >= 0
+ && tdep->ppc_spefscr_regnum == regno)
return 1;
+
return 0;
}
+
+/* Return non-zero if the architecture described by GDBARCH has
+ floating-point registers (f0 --- f31 and fpscr). */
+int
+ppc_floating_point_unit_p (struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ return (tdep->ppc_fp0_regnum >= 0
+ && tdep->ppc_fpscr_regnum >= 0);
+}
+
+
+/* Check that TABLE[GDB_REGNO] is not already initialized, and then
+ set it to SIM_REGNO.
+
+ This is a helper function for init_sim_regno_table, constructing
+ the table mapping GDB register numbers to sim register numbers; we
+ initialize every element in that table to -1 before we start
+ filling it in. */
+static void
+set_sim_regno (int *table, int gdb_regno, int sim_regno)
+{
+ /* Make sure we don't try to assign any given GDB register a sim
+ register number more than once. */
+ gdb_assert (table[gdb_regno] == -1);
+ table[gdb_regno] = sim_regno;
+}
+
+
+/* Initialize ARCH->tdep->sim_regno, the table mapping GDB register
+ numbers to simulator register numbers, based on the values placed
+ in the ARCH->tdep->ppc_foo_regnum members. */
+static void
+init_sim_regno_table (struct gdbarch *arch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
+ int total_regs = gdbarch_num_regs (arch) + gdbarch_num_pseudo_regs (arch);
+ const struct reg *regs = tdep->regs;
+ int *sim_regno = GDBARCH_OBSTACK_CALLOC (arch, total_regs, int);
+ int i;
+
+ /* Presume that all registers not explicitly mentioned below are
+ unavailable from the sim. */
+ for (i = 0; i < total_regs; i++)
+ sim_regno[i] = -1;
+
+ /* General-purpose registers. */
+ for (i = 0; i < ppc_num_gprs; i++)
+ set_sim_regno (sim_regno, tdep->ppc_gp0_regnum + i, sim_ppc_r0_regnum + i);
+
+ /* Floating-point registers. */
+ if (tdep->ppc_fp0_regnum >= 0)
+ for (i = 0; i < ppc_num_fprs; i++)
+ set_sim_regno (sim_regno,
+ tdep->ppc_fp0_regnum + i,
+ sim_ppc_f0_regnum + i);
+ if (tdep->ppc_fpscr_regnum >= 0)
+ set_sim_regno (sim_regno, tdep->ppc_fpscr_regnum, sim_ppc_fpscr_regnum);
+
+ set_sim_regno (sim_regno, gdbarch_pc_regnum (arch), sim_ppc_pc_regnum);
+ set_sim_regno (sim_regno, tdep->ppc_ps_regnum, sim_ppc_ps_regnum);
+ set_sim_regno (sim_regno, tdep->ppc_cr_regnum, sim_ppc_cr_regnum);
+
+ /* Segment registers. */
+ if (tdep->ppc_sr0_regnum >= 0)
+ for (i = 0; i < ppc_num_srs; i++)
+ set_sim_regno (sim_regno,
+ tdep->ppc_sr0_regnum + i,
+ sim_ppc_sr0_regnum + i);
+
+ /* Altivec registers. */
+ if (tdep->ppc_vr0_regnum >= 0)
+ {
+ for (i = 0; i < ppc_num_vrs; i++)
+ set_sim_regno (sim_regno,
+ tdep->ppc_vr0_regnum + i,
+ sim_ppc_vr0_regnum + i);
+
+ /* FIXME: jimb/2004-07-15: when we have tdep->ppc_vscr_regnum,
+ we can treat this more like the other cases. */
+ set_sim_regno (sim_regno,
+ tdep->ppc_vr0_regnum + ppc_num_vrs,
+ sim_ppc_vscr_regnum);
+ }
+ /* vsave is a special-purpose register, so the code below handles it. */
+
+ /* SPE APU (E500) registers. */
+ if (tdep->ppc_ev0_regnum >= 0)
+ for (i = 0; i < ppc_num_gprs; i++)
+ set_sim_regno (sim_regno,
+ tdep->ppc_ev0_regnum + i,
+ sim_ppc_ev0_regnum + i);
+ if (tdep->ppc_ev0_upper_regnum >= 0)
+ for (i = 0; i < ppc_num_gprs; i++)
+ set_sim_regno (sim_regno,
+ tdep->ppc_ev0_upper_regnum + i,
+ sim_ppc_rh0_regnum + i);
+ if (tdep->ppc_acc_regnum >= 0)
+ set_sim_regno (sim_regno, tdep->ppc_acc_regnum, sim_ppc_acc_regnum);
+ /* spefscr is a special-purpose register, so the code below handles it. */
+
+ /* Now handle all special-purpose registers. Verify that they
+ haven't mistakenly been assigned numbers by any of the above
+ code). */
+ for (i = 0; i < total_regs; i++)
+ if (regs[i].spr_num >= 0)
+ set_sim_regno (sim_regno, i, regs[i].spr_num + sim_ppc_spr0_regnum);
+
+ /* Drop the initialized array into place. */
+ tdep->sim_regno = sim_regno;
+}
+
+
+/* Given a GDB register number REG, return the corresponding SIM
+ register number. */
+static int
+rs6000_register_sim_regno (int reg)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ int sim_regno;
+
+ gdb_assert (0 <= reg && reg <= NUM_REGS + NUM_PSEUDO_REGS);
+ sim_regno = tdep->sim_regno[reg];
+
+ if (sim_regno >= 0)
+ return sim_regno;
+ else
+ return LEGACY_SIM_REGNO_IGNORE;
+}
+
+
+
+/* Register set support functions. */
+
+static void
+ppc_supply_reg (struct regcache *regcache, int regnum,
+ const char *regs, size_t offset)
+{
+ if (regnum != -1 && offset != -1)
+ regcache_raw_supply (regcache, regnum, regs + offset);
+}
+
+static void
+ppc_collect_reg (const struct regcache *regcache, int regnum,
+ char *regs, size_t offset)
+{
+ if (regnum != -1 && offset != -1)
+ regcache_raw_collect (regcache, regnum, regs + offset);
+}
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+ from the buffer specified by GREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+void
+ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ const struct ppc_reg_offsets *offsets = regset->descr;
+ size_t offset;
+ int i;
+
+ for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
+ i < tdep->ppc_gp0_regnum + ppc_num_gprs;
+ i++, offset += 4)
+ {
+ if (regnum == -1 || regnum == i)
+ ppc_supply_reg (regcache, i, gregs, offset);
+ }
+
+ if (regnum == -1 || regnum == PC_REGNUM)
+ ppc_supply_reg (regcache, PC_REGNUM, gregs, offsets->pc_offset);
+ if (regnum == -1 || regnum == tdep->ppc_ps_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_ps_regnum,
+ gregs, offsets->ps_offset);
+ if (regnum == -1 || regnum == tdep->ppc_cr_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_cr_regnum,
+ gregs, offsets->cr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_lr_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_lr_regnum,
+ gregs, offsets->lr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_ctr_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_ctr_regnum,
+ gregs, offsets->ctr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_xer_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_xer_regnum,
+ gregs, offsets->cr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_mq_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_mq_regnum, gregs, offsets->mq_offset);
+}
+
+/* Supply register REGNUM in the floating-point register set REGSET
+ from the buffer specified by FPREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+void
+ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ const struct ppc_reg_offsets *offsets = regset->descr;
+ size_t offset;
+ int i;
+
+ gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
+ offset = offsets->f0_offset;
+ for (i = tdep->ppc_fp0_regnum;
+ i < tdep->ppc_fp0_regnum + ppc_num_fprs;
+ i++, offset += 4)
+ {
+ if (regnum == -1 || regnum == i)
+ ppc_supply_reg (regcache, i, fpregs, offset);
+ }
+
+ if (regnum == -1 || regnum == tdep->ppc_fpscr_regnum)
+ ppc_supply_reg (regcache, tdep->ppc_fpscr_regnum,
+ fpregs, offsets->fpscr_offset);
+}
+
+/* Collect register REGNUM in the general-purpose register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ GREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+void
+ppc_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ const struct ppc_reg_offsets *offsets = regset->descr;
+ size_t offset;
+ int i;
+
+ offset = offsets->r0_offset;
+ for (i = tdep->ppc_gp0_regnum;
+ i < tdep->ppc_gp0_regnum + ppc_num_gprs;
+ i++, offset += 4)
+ {
+ if (regnum == -1 || regnum == i)
+ ppc_collect_reg (regcache, i, gregs, offset);
+ }
+
+ if (regnum == -1 || regnum == PC_REGNUM)
+ ppc_collect_reg (regcache, PC_REGNUM, gregs, offsets->pc_offset);
+ if (regnum == -1 || regnum == tdep->ppc_ps_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_ps_regnum,
+ gregs, offsets->ps_offset);
+ if (regnum == -1 || regnum == tdep->ppc_cr_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_cr_regnum,
+ gregs, offsets->cr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_lr_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_lr_regnum,
+ gregs, offsets->lr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_ctr_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_ctr_regnum,
+ gregs, offsets->ctr_offset);
+ if (regnum == -1 || regnum == tdep->ppc_xer_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_xer_regnum,
+ gregs, offsets->xer_offset);
+ if (regnum == -1 || regnum == tdep->ppc_mq_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_mq_regnum,
+ gregs, offsets->mq_offset);
+}
+
+/* Collect register REGNUM in the floating-point register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ FPREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+void
+ppc_collect_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ const struct ppc_reg_offsets *offsets = regset->descr;
+ size_t offset;
+ int i;
+
+ gdb_assert (ppc_floating_point_unit_p (gdbarch));
+
+ offset = offsets->f0_offset;
+ for (i = tdep->ppc_fp0_regnum;
+ i <= tdep->ppc_fp0_regnum + ppc_num_fprs;
+ i++, offset += 4)
+ {
+ if (regnum == -1 || regnum == i)
+ ppc_collect_reg (regcache, regnum, fpregs, offset);
+ }
+
+ if (regnum == -1 || regnum == tdep->ppc_fpscr_regnum)
+ ppc_collect_reg (regcache, tdep->ppc_fpscr_regnum,
+ fpregs, offsets->fpscr_offset);
+}
+
+
/* Read a LEN-byte address from debugged memory address MEMADDR. */
static CORE_ADDR
@@ -419,6 +752,76 @@ refine_prologue_limit (CORE_ADDR pc, CORE_ADDR lim_pc)
return lim_pc;
}
+/* Return nonzero if the given instruction OP can be part of the prologue
+ of a function and saves a parameter on the stack. FRAMEP should be
+ set if one of the previous instructions in the function has set the
+ Frame Pointer. */
+
+static int
+store_param_on_stack_p (unsigned long op, int framep, int *r0_contains_arg)
+{
+ /* Move parameters from argument registers to temporary register. */
+ if ((op & 0xfc0007fe) == 0x7c000378) /* mr(.) Rx,Ry */
+ {
+ /* Rx must be scratch register r0. */
+ const int rx_regno = (op >> 16) & 31;
+ /* Ry: Only r3 - r10 are used for parameter passing. */
+ const int ry_regno = GET_SRC_REG (op);
+
+ if (rx_regno == 0 && ry_regno >= 3 && ry_regno <= 10)
+ {
+ *r0_contains_arg = 1;
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ /* Save a General Purpose Register on stack. */
+
+ if ((op & 0xfc1f0003) == 0xf8010000 || /* std Rx,NUM(r1) */
+ (op & 0xfc1f0000) == 0xd8010000) /* stfd Rx,NUM(r1) */
+ {
+ /* Rx: Only r3 - r10 are used for parameter passing. */
+ const int rx_regno = GET_SRC_REG (op);
+
+ return (rx_regno >= 3 && rx_regno <= 10);
+ }
+
+ /* Save a General Purpose Register on stack via the Frame Pointer. */
+
+ if (framep &&
+ ((op & 0xfc1f0000) == 0x901f0000 || /* st rx,NUM(r31) */
+ (op & 0xfc1f0000) == 0x981f0000 || /* stb Rx,NUM(r31) */
+ (op & 0xfc1f0000) == 0xd81f0000)) /* stfd Rx,NUM(r31) */
+ {
+ /* Rx: Usually, only r3 - r10 are used for parameter passing.
+ However, the compiler sometimes uses r0 to hold an argument. */
+ const int rx_regno = GET_SRC_REG (op);
+
+ return ((rx_regno >= 3 && rx_regno <= 10)
+ || (rx_regno == 0 && *r0_contains_arg));
+ }
+
+ if ((op & 0xfc1f0000) == 0xfc010000) /* frsp, fp?,NUM(r1) */
+ {
+ /* Only f2 - f8 are used for parameter passing. */
+ const int src_regno = GET_SRC_REG (op);
+
+ return (src_regno >= 2 && src_regno <= 8);
+ }
+
+ if (framep && ((op & 0xfc1f0000) == 0xfc1f0000)) /* frsp, fp?,NUM(r31) */
+ {
+ /* Only f2 - f8 are used for parameter passing. */
+ const int src_regno = GET_SRC_REG (op);
+
+ return (src_regno >= 2 && src_regno <= 8);
+ }
+
+ /* Not an insn that saves a parameter on stack. */
+ return 0;
+}
static CORE_ADDR
skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
@@ -441,6 +844,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
int minimal_toc_loaded = 0;
int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0;
+ int r0_contains_arg = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -509,11 +913,15 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
ones. */
if (lr_reg < 0)
lr_reg = (op & 0x03e00000);
+ if (lr_reg == 0)
+ r0_contains_arg = 0;
continue;
}
else if ((op & 0xfc1fffff) == 0x7c000026)
{ /* mfcr Rx */
cr_reg = (op & 0x03e00000);
+ if (cr_reg == 0)
+ r0_contains_arg = 0;
continue;
}
@@ -560,6 +968,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
for >= 32k frames */
fdata->offset = (op & 0x0000ffff) << 16;
fdata->frameless = 0;
+ r0_contains_arg = 0;
continue;
}
@@ -568,6 +977,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
lf of >= 32k frames */
fdata->offset |= (op & 0x0000ffff);
fdata->frameless = 0;
+ r0_contains_arg = 0;
continue;
}
@@ -701,26 +1111,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
/* store parameters in stack */
}
/* Move parameters from argument registers to temporary register. */
- else if ((op & 0xfc0007fe) == 0x7c000378 && /* mr(.) Rx,Ry */
- (((op >> 21) & 31) >= 3) && /* R3 >= Ry >= R10 */
- (((op >> 21) & 31) <= 10) &&
- (((op >> 16) & 31) == 0)) /* Rx: scratch register r0 */
- {
- continue;
- }
- else if ((op & 0xfc1f0003) == 0xf8010000 || /* std rx,NUM(r1) */
- (op & 0xfc1f0000) == 0xd8010000 || /* stfd Rx,NUM(r1) */
- (op & 0xfc1f0000) == 0xfc010000) /* frsp, fp?,NUM(r1) */
- {
- continue;
-
- /* store parameters in stack via frame pointer */
- }
- else if (framep &&
- ((op & 0xfc1f0000) == 0x901f0000 || /* st rx,NUM(r31) */
- (op & 0xfc1f0000) == 0x981f0000 || /* stb Rx,NUM(r31) */
- (op & 0xfc1f0000) == 0xd81f0000 || /* stfd Rx,NUM(r31) */
- (op & 0xfc1f0000) == 0xfc1f0000)) /* frsp, fp?,NUM(r31) */
+ else if (store_param_on_stack_p (op, framep, &r0_contains_arg))
{
continue;
@@ -789,8 +1180,15 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
else if ((op & 0xffff0000) == 0x38000000 /* li r0, SIMM */
|| (op & 0xffff0000) == 0x39c00000) /* li r14, SIMM */
{
+ if ((op & 0xffff0000) == 0x38000000)
+ r0_contains_arg = 0;
li_found_pc = pc;
vr_saved_offset = SIGNED_SHORT (op);
+
+ /* This insn by itself is not part of the prologue, unless
+ if part of the pair of insns mentioned above. So do not
+ record this insn as part of the prologue yet. */
+ prev_insn_was_prologue_insn = 0;
}
/* Store vector register S at (r31+r0) aligned to 16 bytes. */
/* 011111 sssss 11111 00000 00111001110 */
@@ -1006,7 +1404,7 @@ rs6000_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
starting from r4. */
static CORE_ADDR
-rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -1019,12 +1417,18 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
char tmp_buffer[50];
int f_argno = 0; /* current floating point argno */
int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
struct value *arg = 0;
struct type *type;
CORE_ADDR saved_sp;
+ /* The calling convention this function implements assumes the
+ processor has floating-point registers. We shouldn't be using it
+ on PPC variants that lack them. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
/* The first eight words of ther arguments are passed in registers.
Copy them appropriately. */
ii = 0;
@@ -1061,7 +1465,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
for (argno = 0, argbytes = 0; argno < nargs && ii < 8; ++ii)
{
- int reg_size = DEPRECATED_REGISTER_RAW_SIZE (ii + 3);
+ int reg_size = register_size (current_gdbarch, ii + 3);
arg = args[argno];
type = check_typedef (VALUE_TYPE (arg));
@@ -1075,10 +1479,11 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
there is no way we would run out of them. */
if (len > 8)
- printf_unfiltered (
- "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
+ printf_unfiltered ("Fatal Error: a floating point parameter "
+ "#%d with a size > 8 is found!\n", argno);
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE
+ (tdep->ppc_fp0_regnum + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
@@ -1188,16 +1593,20 @@ ran_out_of_registers_for_arguments:
{
if (len > 8)
- printf_unfiltered (
- "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
+ printf_unfiltered ("Fatal Error: a floating point parameter"
+ " #%d with a size > 8 is found!\n", argno);
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&(deprecated_registers
+ [DEPRECATED_REGISTER_BYTE
+ (tdep->ppc_fp0_regnum + 1 + f_argno)]),
VALUE_CONTENTS (arg),
len);
++f_argno;
}
- write_memory (sp + 24 + (ii * 4), (char *) VALUE_CONTENTS (arg), len);
+ write_memory (sp + 24 + (ii * 4),
+ (char *) VALUE_CONTENTS (arg),
+ len);
ii += ((len + 3) & -4) / 4;
}
}
@@ -1248,25 +1657,23 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
int offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ /* The calling convention this function implements assumes the
+ processor has floating-point registers. We shouldn't be using it
+ on PPC variants that lack them. */
+ gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
{
- double dd;
- float ff;
/* floats and doubles are returned in fpr1. fpr's have a size of 8 bytes.
We need to truncate the return value into float size (4 byte) if
necessary. */
- if (TYPE_LENGTH (valtype) > 4) /* this is a double */
- memcpy (valbuf,
- &regbuf[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1)],
- TYPE_LENGTH (valtype));
- else
- { /* float */
- memcpy (&dd, &regbuf[DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1)], 8);
- ff = (float) dd;
- memcpy (valbuf, &ff, sizeof (float));
- }
+ convert_typed_floating (&regbuf[DEPRECATED_REGISTER_BYTE
+ (tdep->ppc_fp0_regnum + 1)],
+ builtin_type_double,
+ valbuf,
+ valtype);
}
else if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
&& TYPE_LENGTH (valtype) == 16
@@ -1279,8 +1686,8 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
{
/* return value is copied starting from r3. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && TYPE_LENGTH (valtype) < DEPRECATED_REGISTER_RAW_SIZE (3))
- offset = DEPRECATED_REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype);
+ && TYPE_LENGTH (valtype) < register_size (current_gdbarch, 3))
+ offset = register_size (current_gdbarch, 3) - TYPE_LENGTH (valtype);
memcpy (valbuf,
regbuf + DEPRECATED_REGISTER_BYTE (3) + offset,
@@ -1404,33 +1811,13 @@ rs6000_register_name (int n)
return reg->name;
}
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-static int
-rs6000_register_byte (int n)
-{
- return gdbarch_tdep (current_gdbarch)->regoff[n];
-}
-
-/* Return the number of bytes of storage in the actual machine representation
- for register N if that register is available, else return 0. */
-
-static int
-rs6000_register_raw_size (int n)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- const struct reg *reg = tdep->regs + n;
- return regsize (reg, tdep->wordsize);
-}
-
/* Return the GDB type object for the "standard" data type
of data in register N. */
static struct type *
-rs6000_register_virtual_type (int n)
+rs6000_register_type (struct gdbarch *gdbarch, int n)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct reg *reg = tdep->regs + n;
if (reg->fpr)
@@ -1460,113 +1847,179 @@ rs6000_register_virtual_type (int n)
}
}
-/* Return whether register N requires conversion when moving from raw format
- to virtual format.
-
- The register format for RS/6000 floating point registers is always
+/* The register format for RS/6000 floating point registers is always
double, we need a conversion if the memory format is float. */
static int
-rs6000_register_convertible (int n)
+rs6000_convert_register_p (int regnum, struct type *type)
{
- const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + n;
- return reg->fpr;
+ const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + regnum;
+
+ return (reg->fpr
+ && TYPE_CODE (type) == TYPE_CODE_FLT
+ && TYPE_LENGTH (type) != TYPE_LENGTH (builtin_type_double));
}
-/* Convert data from raw format for register N in buffer FROM
- to virtual format with type TYPE in buffer TO. */
-
static void
-rs6000_register_convert_to_virtual (int n, struct type *type,
- char *from, char *to)
+rs6000_register_to_value (struct frame_info *frame,
+ int regnum,
+ struct type *type,
+ void *to)
{
- if (TYPE_LENGTH (type) != DEPRECATED_REGISTER_RAW_SIZE (n))
- {
- double val = deprecated_extract_floating (from, DEPRECATED_REGISTER_RAW_SIZE (n));
- deprecated_store_floating (to, TYPE_LENGTH (type), val);
- }
- else
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (n));
+ const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + regnum;
+ char from[MAX_REGISTER_SIZE];
+
+ gdb_assert (reg->fpr);
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
+
+ get_frame_register (frame, regnum, from);
+ convert_typed_floating (from, builtin_type_double, to, type);
}
-/* Convert data from virtual format with type TYPE in buffer FROM
- to raw format for register N in buffer TO. */
+static void
+rs6000_value_to_register (struct frame_info *frame,
+ int regnum,
+ struct type *type,
+ const void *from)
+{
+ const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + regnum;
+ char to[MAX_REGISTER_SIZE];
+
+ gdb_assert (reg->fpr);
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
+
+ convert_typed_floating (from, type, to, builtin_type_double);
+ put_frame_register (frame, regnum, to);
+}
+/* Move SPE vector register values between a 64-bit buffer and the two
+ 32-bit raw register halves in a regcache. This function handles
+ both splitting a 64-bit value into two 32-bit halves, and joining
+ two halves into a whole 64-bit value, depending on the function
+ passed as the MOVE argument.
+
+ EV_REG must be the number of an SPE evN vector register --- a
+ pseudoregister. REGCACHE must be a regcache, and BUFFER must be a
+ 64-bit buffer.
+
+ Call MOVE once for each 32-bit half of that register, passing
+ REGCACHE, the number of the raw register corresponding to that
+ half, and the address of the appropriate half of BUFFER.
+
+ For example, passing 'regcache_raw_read' as the MOVE function will
+ fill BUFFER with the full 64-bit contents of EV_REG. Or, passing
+ 'regcache_raw_supply' will supply the contents of BUFFER to the
+ appropriate pair of raw registers in REGCACHE.
+
+ You may need to cast away some 'const' qualifiers when passing
+ MOVE, since this function can't tell at compile-time which of
+ REGCACHE or BUFFER is acting as the source of the data. If C had
+ co-variant type qualifiers, ... */
static void
-rs6000_register_convert_to_raw (struct type *type, int n,
- const char *from, char *to)
+e500_move_ev_register (void (*move) (struct regcache *regcache,
+ int regnum, void *buf),
+ struct regcache *regcache, int ev_reg,
+ void *buffer)
{
- if (TYPE_LENGTH (type) != DEPRECATED_REGISTER_RAW_SIZE (n))
+ struct gdbarch *arch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
+ int reg_index;
+ char *byte_buffer = buffer;
+
+ gdb_assert (tdep->ppc_ev0_regnum <= ev_reg
+ && ev_reg < tdep->ppc_ev0_regnum + ppc_num_gprs);
+
+ reg_index = ev_reg - tdep->ppc_ev0_regnum;
+
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- double val = deprecated_extract_floating (from, TYPE_LENGTH (type));
- deprecated_store_floating (to, DEPRECATED_REGISTER_RAW_SIZE (n), val);
+ move (regcache, tdep->ppc_ev0_upper_regnum + reg_index, byte_buffer);
+ move (regcache, tdep->ppc_gp0_regnum + reg_index, byte_buffer + 4);
}
else
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (n));
+ {
+ move (regcache, tdep->ppc_gp0_regnum + reg_index, byte_buffer);
+ move (regcache, tdep->ppc_ev0_upper_regnum + reg_index, byte_buffer + 4);
+ }
}
static void
e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, void *buffer)
{
- int base_regnum;
- int offset = 0;
- char temp_buffer[MAX_REGISTER_SIZE];
+ struct gdbarch *regcache_arch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- if (reg_nr >= tdep->ppc_gp0_regnum
- && reg_nr <= tdep->ppc_gplast_regnum)
- {
- base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
-
- /* Build the value in the provided buffer. */
- /* Read the raw register of which this one is the lower portion. */
- regcache_raw_read (regcache, base_regnum, temp_buffer);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = 4;
- memcpy ((char *) buffer, temp_buffer + offset, 4);
- }
+ gdb_assert (regcache_arch == gdbarch);
+
+ if (tdep->ppc_ev0_regnum <= reg_nr
+ && reg_nr < tdep->ppc_ev0_regnum + ppc_num_gprs)
+ e500_move_ev_register (regcache_raw_read, regcache, reg_nr, buffer);
+ else
+ internal_error (__FILE__, __LINE__,
+ "e500_pseudo_register_read: "
+ "called on unexpected register '%s' (%d)",
+ gdbarch_register_name (gdbarch, reg_nr), reg_nr);
}
static void
e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
- int base_regnum;
- int offset = 0;
- char temp_buffer[MAX_REGISTER_SIZE];
+ struct gdbarch *regcache_arch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- if (reg_nr >= tdep->ppc_gp0_regnum
- && reg_nr <= tdep->ppc_gplast_regnum)
- {
- base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
- /* reg_nr is 32 bit here, and base_regnum is 64 bits. */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = 4;
-
- /* Let's read the value of the base register into a temporary
- buffer, so that overwriting the last four bytes with the new
- value of the pseudo will leave the upper 4 bytes unchanged. */
- regcache_raw_read (regcache, base_regnum, temp_buffer);
-
- /* Write as an 8 byte quantity. */
- memcpy (temp_buffer + offset, (char *) buffer, 4);
- regcache_raw_write (regcache, base_regnum, temp_buffer);
- }
+ gdb_assert (regcache_arch == gdbarch);
+
+ if (tdep->ppc_ev0_regnum <= reg_nr
+ && reg_nr < tdep->ppc_ev0_regnum + ppc_num_gprs)
+ e500_move_ev_register ((void (*) (struct regcache *, int, void *))
+ regcache_raw_write,
+ regcache, reg_nr, (void *) buffer);
+ else
+ internal_error (__FILE__, __LINE__,
+ "e500_pseudo_register_read: "
+ "called on unexpected register '%s' (%d)",
+ gdbarch_register_name (gdbarch, reg_nr), reg_nr);
}
-/* Convert a dbx stab or Dwarf 2 register number (from `r'
- declaration) to a gdb REGNUM. */
+/* The E500 needs a custom reggroup function: it has anonymous raw
+ registers, and default_register_reggroup_p assumes that anonymous
+ registers are not members of any reggroup. */
static int
-rs6000_dwarf2_stab_reg_to_regnum (int num)
+e500_register_reggroup_p (struct gdbarch *gdbarch,
+ int regnum,
+ struct reggroup *group)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* The save and restore register groups need to include the
+ upper-half registers, even though they're anonymous. */
+ if ((group == save_reggroup
+ || group == restore_reggroup)
+ && (tdep->ppc_ev0_upper_regnum <= regnum
+ && regnum < tdep->ppc_ev0_upper_regnum + ppc_num_gprs))
+ return 1;
+
+ /* In all other regards, the default reggroup definition is fine. */
+ return default_register_reggroup_p (gdbarch, regnum, group);
+}
+
+/* Convert a DBX STABS register number to a GDB register number. */
+static int
+rs6000_stab_reg_to_regnum (int num)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (0 <= num && num <= 31)
return tdep->ppc_gp0_regnum + num;
else if (32 <= num && num <= 63)
- return FP0_REGNUM + (num - 32);
+ /* FIXME: jimb/2004-05-05: What should we do when the debug info
+ specifies registers the architecture doesn't have? Our
+ callers don't check the value we return. */
+ return tdep->ppc_fp0_regnum + (num - 32);
+ else if (77 <= num && num <= 108)
+ return tdep->ppc_vr0_regnum + (num - 77);
else if (1200 <= num && num < 1200 + 32)
return tdep->ppc_ev0_regnum + (num - 1200);
else
@@ -1582,49 +2035,111 @@ rs6000_dwarf2_stab_reg_to_regnum (int num)
return tdep->ppc_xer_regnum;
case 109:
return tdep->ppc_vrsave_regnum;
+ case 110:
+ return tdep->ppc_vrsave_regnum - 1; /* vscr */
+ case 111:
+ return tdep->ppc_acc_regnum;
+ case 112:
+ return tdep->ppc_spefscr_regnum;
default:
return num;
}
+}
- /* FIXME: jimb/2004-03-28: Doesn't something need to be done here
- for the Altivec registers, too?
- Looking at GCC, the headers in config/rs6000 never define a
- DBX_REGISTER_NUMBER macro, so the debug info uses the same
- numbers GCC does internally. Then, looking at the REGISTER_NAMES
- macro defined in config/rs6000/rs6000.h, it seems that GCC gives
- v0 -- v31 the numbers 77 -- 108. But we number them 119 -- 150.
+/* Convert a Dwarf 2 register number to a GDB register number. */
+static int
+rs6000_dwarf2_reg_to_regnum (int num)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- I don't have a way to test this ready to hand, but I noticed it
- and thought I should include a note. */
+ if (0 <= num && num <= 31)
+ return tdep->ppc_gp0_regnum + num;
+ else if (32 <= num && num <= 63)
+ /* FIXME: jimb/2004-05-05: What should we do when the debug info
+ specifies registers the architecture doesn't have? Our
+ callers don't check the value we return. */
+ return tdep->ppc_fp0_regnum + (num - 32);
+ else if (1124 <= num && num < 1124 + 32)
+ return tdep->ppc_vr0_regnum + (num - 1124);
+ else if (1200 <= num && num < 1200 + 32)
+ return tdep->ppc_ev0_regnum + (num - 1200);
+ else
+ switch (num)
+ {
+ case 67:
+ return tdep->ppc_vrsave_regnum - 1; /* vscr */
+ case 99:
+ return tdep->ppc_acc_regnum;
+ case 100:
+ return tdep->ppc_mq_regnum;
+ case 101:
+ return tdep->ppc_xer_regnum;
+ case 108:
+ return tdep->ppc_lr_regnum;
+ case 109:
+ return tdep->ppc_ctr_regnum;
+ case 356:
+ return tdep->ppc_vrsave_regnum;
+ case 612:
+ return tdep->ppc_spefscr_regnum;
+ default:
+ return num;
+ }
}
+
static void
-rs6000_store_return_value (struct type *type, char *valbuf)
+rs6000_store_return_value (struct type *type,
+ struct regcache *regcache,
+ const void *valbuf)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ int regnum = -1;
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ /* The calling convention this function implements assumes the
+ processor has floating-point registers. We shouldn't be using it
+ on PPC variants that lack them. */
+ gdb_assert (ppc_floating_point_unit_p (gdbarch));
+ if (TYPE_CODE (type) == TYPE_CODE_FLT)
/* Floating point values are returned starting from FPR1 and up.
Say a double_double_double type could be returned in
FPR1/FPR2/FPR3 triple. */
-
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
- TYPE_LENGTH (type));
+ regnum = tdep->ppc_fp0_regnum + 1;
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
if (TYPE_LENGTH (type) == 16
&& TYPE_VECTOR (type))
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
- valbuf, TYPE_LENGTH (type));
+ regnum = tdep->ppc_vr0_regnum + 2;
+ else
+ internal_error (__FILE__, __LINE__,
+ "rs6000_store_return_value: "
+ "unexpected array return type");
}
else
/* Everything else is returned in GPR3 and up. */
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
- valbuf, TYPE_LENGTH (type));
+ regnum = tdep->ppc_gp0_regnum + 3;
+
+ {
+ size_t bytes_written = 0;
+
+ while (bytes_written < TYPE_LENGTH (type))
+ {
+ /* How much of this value can we write to this register? */
+ size_t bytes_to_write = min (TYPE_LENGTH (type) - bytes_written,
+ register_size (gdbarch, regnum));
+ regcache_cooked_write_part (regcache, regnum,
+ 0, bytes_to_write,
+ (char *) valbuf + bytes_written);
+ regnum++;
+ bytes_written += bytes_to_write;
+ }
+ }
}
+
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
@@ -1735,37 +2250,58 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
/* Return a struct reg defining register NAME that's 32 bits on 32-bit systems
and 64 bits on 64-bit systems. */
-#define R(name) { STR(name), 4, 8, 0, 0 }
+#define R(name) { STR(name), 4, 8, 0, 0, -1 }
/* Return a struct reg defining register NAME that's 32 bits on all
systems. */
-#define R4(name) { STR(name), 4, 4, 0, 0 }
+#define R4(name) { STR(name), 4, 4, 0, 0, -1 }
/* Return a struct reg defining register NAME that's 64 bits on all
systems. */
-#define R8(name) { STR(name), 8, 8, 0, 0 }
+#define R8(name) { STR(name), 8, 8, 0, 0, -1 }
/* Return a struct reg defining register NAME that's 128 bits on all
systems. */
-#define R16(name) { STR(name), 16, 16, 0, 0 }
+#define R16(name) { STR(name), 16, 16, 0, 0, -1 }
/* Return a struct reg defining floating-point register NAME. */
-#define F(name) { STR(name), 8, 8, 1, 0 }
+#define F(name) { STR(name), 8, 8, 1, 0, -1 }
-/* Return a struct reg defining a pseudo register NAME. */
-#define P(name) { STR(name), 4, 8, 0, 1}
+/* Return a struct reg defining a pseudo register NAME that is 64 bits
+ long on all systems. */
+#define P8(name) { STR(name), 8, 8, 0, 1, -1 }
/* Return a struct reg defining register NAME that's 32 bits on 32-bit
systems and that doesn't exist on 64-bit systems. */
-#define R32(name) { STR(name), 4, 0, 0, 0 }
+#define R32(name) { STR(name), 4, 0, 0, 0, -1 }
/* Return a struct reg defining register NAME that's 64 bits on 64-bit
systems and that doesn't exist on 32-bit systems. */
-#define R64(name) { STR(name), 0, 8, 0, 0 }
+#define R64(name) { STR(name), 0, 8, 0, 0, -1 }
/* Return a struct reg placeholder for a register that doesn't exist. */
-#define R0 { 0, 0, 0, 0, 0 }
+#define R0 { 0, 0, 0, 0, 0, -1 }
+/* Return a struct reg defining an anonymous raw register that's 32
+ bits on all systems. */
+#define A4 { 0, 4, 4, 0, 0, -1 }
+
+/* Return a struct reg defining an SPR named NAME that is 32 bits on
+ 32-bit systems and 64 bits on 64-bit systems. */
+#define S(name) { STR(name), 4, 8, 0, 0, ppc_spr_ ## name }
+
+/* Return a struct reg defining an SPR named NAME that is 32 bits on
+ all systems. */
+#define S4(name) { STR(name), 4, 4, 0, 0, ppc_spr_ ## name }
+
+/* Return a struct reg defining an SPR named NAME that is 32 bits on
+ all systems, and whose SPR number is NUMBER. */
+#define SN4(name, number) { STR(name), 4, 4, 0, 0, (number) }
+
+/* Return a struct reg defining an SPR named NAME that's 64 bits on
+ 64-bit systems and that doesn't exist on 32-bit systems. */
+#define S64(name) { STR(name), 0, 8, 0, 0, ppc_spr_ ## name }
+
/* UISA registers common across all architectures, including POWER. */
#define COMMON_UISA_REGS \
@@ -1779,24 +2315,13 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
/* 56 */ F(f24),F(f25),F(f26),F(f27),F(f28),F(f29),F(f30),F(f31), \
/* 64 */ R(pc), R(ps)
-#define COMMON_UISA_NOFP_REGS \
- /* 0 */ R(r0), R(r1), R(r2), R(r3), R(r4), R(r5), R(r6), R(r7), \
- /* 8 */ R(r8), R(r9), R(r10),R(r11),R(r12),R(r13),R(r14),R(r15), \
- /* 16 */ R(r16),R(r17),R(r18),R(r19),R(r20),R(r21),R(r22),R(r23), \
- /* 24 */ R(r24),R(r25),R(r26),R(r27),R(r28),R(r29),R(r30),R(r31), \
- /* 32 */ R0, R0, R0, R0, R0, R0, R0, R0, \
- /* 40 */ R0, R0, R0, R0, R0, R0, R0, R0, \
- /* 48 */ R0, R0, R0, R0, R0, R0, R0, R0, \
- /* 56 */ R0, R0, R0, R0, R0, R0, R0, R0, \
- /* 64 */ R(pc), R(ps)
-
/* UISA-level SPRs for PowerPC. */
#define PPC_UISA_SPRS \
- /* 66 */ R4(cr), R(lr), R(ctr), R4(xer), R4(fpscr)
+ /* 66 */ R4(cr), S(lr), S(ctr), S4(xer), R4(fpscr)
/* UISA-level SPRs for PowerPC without floating point support. */
#define PPC_UISA_NOFP_SPRS \
- /* 66 */ R4(cr), R(lr), R(ctr), R4(xer), R0
+ /* 66 */ R4(cr), S(lr), S(ctr), S4(xer), R0
/* Segment registers, for PowerPC. */
#define PPC_SEGMENT_REGS \
@@ -1807,15 +2332,15 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
/* OEA SPRs for PowerPC. */
#define PPC_OEA_SPRS \
- /* 87 */ R4(pvr), \
- /* 88 */ R(ibat0u), R(ibat0l), R(ibat1u), R(ibat1l), \
- /* 92 */ R(ibat2u), R(ibat2l), R(ibat3u), R(ibat3l), \
- /* 96 */ R(dbat0u), R(dbat0l), R(dbat1u), R(dbat1l), \
- /* 100 */ R(dbat2u), R(dbat2l), R(dbat3u), R(dbat3l), \
- /* 104 */ R(sdr1), R64(asr), R(dar), R4(dsisr), \
- /* 108 */ R(sprg0), R(sprg1), R(sprg2), R(sprg3), \
- /* 112 */ R(srr0), R(srr1), R(tbl), R(tbu), \
- /* 116 */ R4(dec), R(dabr), R4(ear)
+ /* 87 */ S4(pvr), \
+ /* 88 */ S(ibat0u), S(ibat0l), S(ibat1u), S(ibat1l), \
+ /* 92 */ S(ibat2u), S(ibat2l), S(ibat3u), S(ibat3l), \
+ /* 96 */ S(dbat0u), S(dbat0l), S(dbat1u), S(dbat1l), \
+ /* 100 */ S(dbat2u), S(dbat2l), S(dbat3u), S(dbat3l), \
+ /* 104 */ S(sdr1), S64(asr), S(dar), S4(dsisr), \
+ /* 108 */ S(sprg0), S(sprg1), S(sprg2), S(sprg3), \
+ /* 112 */ S(srr0), S(srr1), S(tbl), S(tbu), \
+ /* 116 */ S4(dec), S(dabr), S4(ear)
/* AltiVec registers. */
#define PPC_ALTIVEC_REGS \
@@ -1825,26 +2350,45 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
/*143*/R16(vr24),R16(vr25),R16(vr26),R16(vr27),R16(vr28),R16(vr29),R16(vr30),R16(vr31), \
/*151*/R4(vscr), R4(vrsave)
-/* Vectors of hi-lo general purpose registers. */
-#define PPC_EV_REGS \
- /* 0*/R8(ev0), R8(ev1), R8(ev2), R8(ev3), R8(ev4), R8(ev5), R8(ev6), R8(ev7), \
- /* 8*/R8(ev8), R8(ev9), R8(ev10),R8(ev11),R8(ev12),R8(ev13),R8(ev14),R8(ev15), \
- /*16*/R8(ev16),R8(ev17),R8(ev18),R8(ev19),R8(ev20),R8(ev21),R8(ev22),R8(ev23), \
- /*24*/R8(ev24),R8(ev25),R8(ev26),R8(ev27),R8(ev28),R8(ev29),R8(ev30),R8(ev31)
-/* Lower half of the EV registers. */
-#define PPC_GPRS_PSEUDO_REGS \
- /* 0 */ P(r0), P(r1), P(r2), P(r3), P(r4), P(r5), P(r6), P(r7), \
- /* 8 */ P(r8), P(r9), P(r10),P(r11),P(r12),P(r13),P(r14),P(r15), \
- /* 16 */ P(r16),P(r17),P(r18),P(r19),P(r20),P(r21),P(r22),P(r23), \
- /* 24 */ P(r24),P(r25),P(r26),P(r27),P(r28),P(r29),P(r30),P(r31)
+/* On machines supporting the SPE APU, the general-purpose registers
+ are 64 bits long. There are SIMD vector instructions to treat them
+ as pairs of floats, but the rest of the instruction set treats them
+ as 32-bit registers, and only operates on their lower halves.
+
+ In the GDB regcache, we treat their high and low halves as separate
+ registers. The low halves we present as the general-purpose
+ registers, and then we have pseudo-registers that stitch together
+ the upper and lower halves and present them as pseudo-registers. */
+
+/* SPE GPR lower halves --- raw registers. */
+#define PPC_SPE_GP_REGS \
+ /* 0 */ R4(r0), R4(r1), R4(r2), R4(r3), R4(r4), R4(r5), R4(r6), R4(r7), \
+ /* 8 */ R4(r8), R4(r9), R4(r10),R4(r11),R4(r12),R4(r13),R4(r14),R4(r15), \
+ /* 16 */ R4(r16),R4(r17),R4(r18),R4(r19),R4(r20),R4(r21),R4(r22),R4(r23), \
+ /* 24 */ R4(r24),R4(r25),R4(r26),R4(r27),R4(r28),R4(r29),R4(r30),R4(r31)
+
+/* SPE GPR upper halves --- anonymous raw registers. */
+#define PPC_SPE_UPPER_GP_REGS \
+ /* 0 */ A4, A4, A4, A4, A4, A4, A4, A4, \
+ /* 8 */ A4, A4, A4, A4, A4, A4, A4, A4, \
+ /* 16 */ A4, A4, A4, A4, A4, A4, A4, A4, \
+ /* 24 */ A4, A4, A4, A4, A4, A4, A4, A4
+
+/* SPE GPR vector registers --- pseudo registers based on underlying
+ gprs and the anonymous upper half raw registers. */
+#define PPC_EV_PSEUDO_REGS \
+/* 0*/P8(ev0), P8(ev1), P8(ev2), P8(ev3), P8(ev4), P8(ev5), P8(ev6), P8(ev7), \
+/* 8*/P8(ev8), P8(ev9), P8(ev10),P8(ev11),P8(ev12),P8(ev13),P8(ev14),P8(ev15),\
+/*16*/P8(ev16),P8(ev17),P8(ev18),P8(ev19),P8(ev20),P8(ev21),P8(ev22),P8(ev23),\
+/*24*/P8(ev24),P8(ev25),P8(ev26),P8(ev27),P8(ev28),P8(ev29),P8(ev30),P8(ev31)
/* IBM POWER (pre-PowerPC) architecture, user-level view. We only cover
user-level SPR's. */
static const struct reg registers_power[] =
{
COMMON_UISA_REGS,
- /* 66 */ R4(cnd), R(lr), R(cnt), R4(xer), R4(mq),
+ /* 66 */ R4(cnd), S(lr), S(cnt), S4(xer), S4(mq),
/* 71 */ R4(fpscr)
};
@@ -1857,44 +2401,49 @@ static const struct reg registers_powerpc[] =
PPC_ALTIVEC_REGS
};
-/* PowerPC UISA - a PPC processor as viewed by user-level
- code, but without floating point registers. */
-static const struct reg registers_powerpc_nofp[] =
-{
- COMMON_UISA_NOFP_REGS,
- PPC_UISA_SPRS
-};
+/* IBM PowerPC 403.
-/* IBM PowerPC 403. */
+ Some notes about the "tcr" special-purpose register:
+ - On the 403 and 403GC, SPR 986 is named "tcr", and it controls the
+ 403's programmable interval timer, fixed interval timer, and
+ watchdog timer.
+ - On the 602, SPR 984 is named "tcr", and it controls the 602's
+ watchdog timer, and nothing else.
+
+ Some of the fields are similar between the two, but they're not
+ compatible with each other. Since the two variants have different
+ registers, with different numbers, but the same name, we can't
+ splice the register name to get the SPR number. */
static const struct reg registers_403[] =
{
COMMON_UISA_REGS,
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(icdbdr), R(esr), R(dear), R(evpr),
- /* 123 */ R(cdbcr), R(tsr), R(tcr), R(pit),
- /* 127 */ R(tbhi), R(tblo), R(srr2), R(srr3),
- /* 131 */ R(dbsr), R(dbcr), R(iac1), R(iac2),
- /* 135 */ R(dac1), R(dac2), R(dccr), R(iccr),
- /* 139 */ R(pbl1), R(pbu1), R(pbl2), R(pbu2)
+ /* 119 */ S(icdbdr), S(esr), S(dear), S(evpr),
+ /* 123 */ S(cdbcr), S(tsr), SN4(tcr, ppc_spr_403_tcr), S(pit),
+ /* 127 */ S(tbhi), S(tblo), S(srr2), S(srr3),
+ /* 131 */ S(dbsr), S(dbcr), S(iac1), S(iac2),
+ /* 135 */ S(dac1), S(dac2), S(dccr), S(iccr),
+ /* 139 */ S(pbl1), S(pbu1), S(pbl2), S(pbu2)
};
-/* IBM PowerPC 403GC. */
+/* IBM PowerPC 403GC.
+ See the comments about 'tcr' for the 403, above. */
static const struct reg registers_403GC[] =
{
COMMON_UISA_REGS,
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(icdbdr), R(esr), R(dear), R(evpr),
- /* 123 */ R(cdbcr), R(tsr), R(tcr), R(pit),
- /* 127 */ R(tbhi), R(tblo), R(srr2), R(srr3),
- /* 131 */ R(dbsr), R(dbcr), R(iac1), R(iac2),
- /* 135 */ R(dac1), R(dac2), R(dccr), R(iccr),
- /* 139 */ R(pbl1), R(pbu1), R(pbl2), R(pbu2),
- /* 143 */ R(zpr), R(pid), R(sgr), R(dcwr),
- /* 147 */ R(tbhu), R(tblu)
+ /* 119 */ S(icdbdr), S(esr), S(dear), S(evpr),
+ /* 123 */ S(cdbcr), S(tsr), SN4(tcr, ppc_spr_403_tcr), S(pit),
+ /* 127 */ S(tbhi), S(tblo), S(srr2), S(srr3),
+ /* 131 */ S(dbsr), S(dbcr), S(iac1), S(iac2),
+ /* 135 */ S(dac1), S(dac2), S(dccr), S(iccr),
+ /* 139 */ S(pbl1), S(pbu1), S(pbl2), S(pbu2),
+ /* 143 */ S(zpr), S(pid), S(sgr), S(dcwr),
+ /* 147 */ S(tbhu), S(tblu)
};
/* Motorola PowerPC 505. */
@@ -1904,7 +2453,7 @@ static const struct reg registers_505[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(eie), R(eid), R(nri)
+ /* 119 */ S(eie), S(eid), S(nri)
};
/* Motorola PowerPC 860 or 850. */
@@ -1914,18 +2463,18 @@ static const struct reg registers_860[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(eie), R(eid), R(nri), R(cmpa),
- /* 123 */ R(cmpb), R(cmpc), R(cmpd), R(icr),
- /* 127 */ R(der), R(counta), R(countb), R(cmpe),
- /* 131 */ R(cmpf), R(cmpg), R(cmph), R(lctrl1),
- /* 135 */ R(lctrl2), R(ictrl), R(bar), R(ic_cst),
- /* 139 */ R(ic_adr), R(ic_dat), R(dc_cst), R(dc_adr),
- /* 143 */ R(dc_dat), R(dpdr), R(dpir), R(immr),
- /* 147 */ R(mi_ctr), R(mi_ap), R(mi_epn), R(mi_twc),
- /* 151 */ R(mi_rpn), R(md_ctr), R(m_casid), R(md_ap),
- /* 155 */ R(md_epn), R(md_twb), R(md_twc), R(md_rpn),
- /* 159 */ R(m_tw), R(mi_dbcam), R(mi_dbram0), R(mi_dbram1),
- /* 163 */ R(md_dbcam), R(md_dbram0), R(md_dbram1)
+ /* 119 */ S(eie), S(eid), S(nri), S(cmpa),
+ /* 123 */ S(cmpb), S(cmpc), S(cmpd), S(icr),
+ /* 127 */ S(der), S(counta), S(countb), S(cmpe),
+ /* 131 */ S(cmpf), S(cmpg), S(cmph), S(lctrl1),
+ /* 135 */ S(lctrl2), S(ictrl), S(bar), S(ic_cst),
+ /* 139 */ S(ic_adr), S(ic_dat), S(dc_cst), S(dc_adr),
+ /* 143 */ S(dc_dat), S(dpdr), S(dpir), S(immr),
+ /* 147 */ S(mi_ctr), S(mi_ap), S(mi_epn), S(mi_twc),
+ /* 151 */ S(mi_rpn), S(md_ctr), S(m_casid), S(md_ap),
+ /* 155 */ S(md_epn), S(m_twb), S(md_twc), S(md_rpn),
+ /* 159 */ S(m_tw), S(mi_dbcam), S(mi_dbram0), S(mi_dbram1),
+ /* 163 */ S(md_dbcam), S(md_dbram0), S(md_dbram1)
};
/* Motorola PowerPC 601. Note that the 601 has different register numbers
@@ -1937,20 +2486,21 @@ static const struct reg registers_601[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(hid0), R(hid1), R(iabr), R(dabr),
- /* 123 */ R(pir), R(mq), R(rtcu), R(rtcl)
+ /* 119 */ S(hid0), S(hid1), S(iabr), S(dabr),
+ /* 123 */ S(pir), S(mq), S(rtcu), S(rtcl)
};
-/* Motorola PowerPC 602. */
+/* Motorola PowerPC 602.
+ See the notes under the 403 about 'tcr'. */
static const struct reg registers_602[] =
{
COMMON_UISA_REGS,
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(hid0), R(hid1), R(iabr), R0,
- /* 123 */ R0, R(tcr), R(ibr), R(esassr),
- /* 127 */ R(sebr), R(ser), R(sp), R(lt)
+ /* 119 */ S(hid0), S(hid1), S(iabr), R0,
+ /* 123 */ R0, SN4(tcr, ppc_spr_602_tcr), S(ibr), S(esasrr),
+ /* 127 */ S(sebr), S(ser), S(sp), S(lt)
};
/* Motorola/IBM PowerPC 603 or 603e. */
@@ -1960,9 +2510,9 @@ static const struct reg registers_603[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(hid0), R(hid1), R(iabr), R0,
- /* 123 */ R0, R(dmiss), R(dcmp), R(hash1),
- /* 127 */ R(hash2), R(imiss), R(icmp), R(rpa)
+ /* 119 */ S(hid0), S(hid1), S(iabr), R0,
+ /* 123 */ R0, S(dmiss), S(dcmp), S(hash1),
+ /* 127 */ S(hash2), S(imiss), S(icmp), S(rpa)
};
/* Motorola PowerPC 604 or 604e. */
@@ -1972,9 +2522,9 @@ static const struct reg registers_604[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(hid0), R(hid1), R(iabr), R(dabr),
- /* 123 */ R(pir), R(mmcr0), R(pmc1), R(pmc2),
- /* 127 */ R(sia), R(sda)
+ /* 119 */ S(hid0), S(hid1), S(iabr), S(dabr),
+ /* 123 */ S(pir), S(mmcr0), S(pmc1), S(pmc2),
+ /* 127 */ S(sia), S(sda)
};
/* Motorola/IBM PowerPC 750 or 740. */
@@ -1984,12 +2534,12 @@ static const struct reg registers_750[] =
PPC_UISA_SPRS,
PPC_SEGMENT_REGS,
PPC_OEA_SPRS,
- /* 119 */ R(hid0), R(hid1), R(iabr), R(dabr),
- /* 123 */ R0, R(ummcr0), R(upmc1), R(upmc2),
- /* 127 */ R(usia), R(ummcr1), R(upmc3), R(upmc4),
- /* 131 */ R(mmcr0), R(pmc1), R(pmc2), R(sia),
- /* 135 */ R(mmcr1), R(pmc3), R(pmc4), R(l2cr),
- /* 139 */ R(ictc), R(thrm1), R(thrm2), R(thrm3)
+ /* 119 */ S(hid0), S(hid1), S(iabr), S(dabr),
+ /* 123 */ R0, S(ummcr0), S(upmc1), S(upmc2),
+ /* 127 */ S(usia), S(ummcr1), S(upmc3), S(upmc4),
+ /* 131 */ S(mmcr0), S(pmc1), S(pmc2), S(sia),
+ /* 135 */ S(mmcr1), S(pmc3), S(pmc4), S(l2cr),
+ /* 139 */ S(ictc), S(thrm1), S(thrm2), S(thrm3)
};
@@ -1998,7 +2548,7 @@ static const struct reg registers_7400[] =
{
/* gpr0-gpr31, fpr0-fpr31 */
COMMON_UISA_REGS,
- /* ctr, xre, lr, cr */
+ /* cr, lr, ctr, xer, fpscr */
PPC_UISA_SPRS,
/* sr0-sr15 */
PPC_SEGMENT_REGS,
@@ -2011,16 +2561,14 @@ static const struct reg registers_7400[] =
/* Motorola e500. */
static const struct reg registers_e500[] =
{
- R(pc), R(ps),
- /* cr, lr, ctr, xer, "" */
- PPC_UISA_NOFP_SPRS,
- /* 7...38 */
- PPC_EV_REGS,
- R8(acc), R(spefscr),
+ /* 0 .. 31 */ PPC_SPE_GP_REGS,
+ /* 32 .. 63 */ PPC_SPE_UPPER_GP_REGS,
+ /* 64 .. 65 */ R(pc), R(ps),
+ /* 66 .. 70 */ PPC_UISA_NOFP_SPRS,
+ /* 71 .. 72 */ R8(acc), S4(spefscr),
/* NOTE: Add new registers here the end of the raw register
list and just before the first pseudo register. */
- /* 39...70 */
- PPC_GPRS_PSEUDO_REGS
+ /* 73 .. 104 */ PPC_EV_PSEUDO_REGS
};
/* Information about a particular processor variant. */
@@ -2282,11 +2830,17 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache)
{
int i;
CORE_ADDR fpr_addr = cache->base + fdata.fpr_offset;
- for (i = fdata.saved_fpr; i < 32; i++)
- {
- cache->saved_regs[FP0_REGNUM + i].addr = fpr_addr;
- fpr_addr += 8;
- }
+
+ /* If skip_prologue says floating-point registers were saved,
+ but the current architecture has no floating-point registers,
+ then that's strange. But we have no indices to even record
+ the addresses under, so we just ignore it. */
+ if (ppc_floating_point_unit_p (gdbarch))
+ for (i = fdata.saved_fpr; i < ppc_num_fprs; i++)
+ {
+ cache->saved_regs[tdep->ppc_fp0_regnum + i].addr = fpr_addr;
+ fpr_addr += 8;
+ }
}
/* if != -1, fdata.saved_gpr is the smallest number of saved_gpr.
@@ -2296,7 +2850,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache)
{
int i;
CORE_ADDR gpr_addr = cache->base + fdata.gpr_offset;
- for (i = fdata.saved_gpr; i < 32; i++)
+ for (i = fdata.saved_gpr; i < ppc_num_gprs; i++)
{
cache->saved_regs[tdep->ppc_gp0_regnum + i].addr = gpr_addr;
gpr_addr += wordsize;
@@ -2327,7 +2881,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache)
{
int i;
CORE_ADDR ev_addr = cache->base + fdata.ev_offset;
- for (i = fdata.saved_ev; i < 32; i++)
+ for (i = fdata.saved_ev; i < ppc_num_gprs; i++)
{
cache->saved_regs[tdep->ppc_ev0_regnum + i].addr = ev_addr;
cache->saved_regs[tdep->ppc_gp0_regnum + i].addr = ev_addr + 4;
@@ -2382,8 +2936,8 @@ rs6000_frame_prev_register (struct frame_info *next_frame,
{
struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame,
this_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind rs6000_frame_unwind =
@@ -2435,7 +2989,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
- int wordsize, from_xcoff_exec, from_elf_exec, power, i, off;
+ int wordsize, from_xcoff_exec, from_elf_exec, i, off;
struct reg *regs;
const struct variant *v;
enum bfd_architecture arch;
@@ -2534,7 +3088,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
gdbarch = gdbarch_alloc (&info, tdep);
- power = arch == bfd_arch_rs6000;
/* Initialize the number of real and pseudo registers in each variant. */
init_variants ();
@@ -2547,7 +3100,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->regs = v->regs;
tdep->ppc_gp0_regnum = 0;
- tdep->ppc_gplast_regnum = 31;
tdep->ppc_toc_regnum = 2;
tdep->ppc_ps_regnum = 65;
tdep->ppc_cr_regnum = 66;
@@ -2556,15 +3108,25 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->ppc_xer_regnum = 69;
if (v->mach == bfd_mach_ppc_601)
tdep->ppc_mq_regnum = 124;
- else if (power)
+ else if (arch == bfd_arch_rs6000)
tdep->ppc_mq_regnum = 70;
else
tdep->ppc_mq_regnum = -1;
- tdep->ppc_fpscr_regnum = power ? 71 : 70;
+ tdep->ppc_fp0_regnum = 32;
+ tdep->ppc_fpscr_regnum = (arch == bfd_arch_rs6000) ? 71 : 70;
+ tdep->ppc_sr0_regnum = 71;
+ tdep->ppc_vr0_regnum = -1;
+ tdep->ppc_vrsave_regnum = -1;
+ tdep->ppc_ev0_upper_regnum = -1;
+ tdep->ppc_ev0_regnum = -1;
+ tdep->ppc_ev31_regnum = -1;
+ tdep->ppc_acc_regnum = -1;
+ tdep->ppc_spefscr_regnum = -1;
set_gdbarch_pc_regnum (gdbarch, 64);
set_gdbarch_sp_regnum (gdbarch, 1);
set_gdbarch_deprecated_fp_regnum (gdbarch, 1);
+ set_gdbarch_register_sim_regno (gdbarch, rs6000_register_sim_regno);
if (sysv_abi && wordsize == 8)
set_gdbarch_return_value (gdbarch, ppc64_sysv_abi_return_value);
else if (sysv_abi && wordsize == 4)
@@ -2572,70 +3134,66 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
{
set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value);
- set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value);
+ set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
}
- if (v->arch == bfd_arch_powerpc)
+ /* Set lr_frame_offset. */
+ if (wordsize == 8)
+ tdep->lr_frame_offset = 16;
+ else if (sysv_abi)
+ tdep->lr_frame_offset = 4;
+ else
+ tdep->lr_frame_offset = 8;
+
+ if (v->arch == bfd_arch_rs6000)
+ tdep->ppc_sr0_regnum = -1;
+ else if (v->arch == bfd_arch_powerpc)
switch (v->mach)
{
case bfd_mach_ppc:
+ tdep->ppc_sr0_regnum = -1;
tdep->ppc_vr0_regnum = 71;
tdep->ppc_vrsave_regnum = 104;
- tdep->ppc_ev0_regnum = -1;
- tdep->ppc_ev31_regnum = -1;
break;
case bfd_mach_ppc_7400:
tdep->ppc_vr0_regnum = 119;
tdep->ppc_vrsave_regnum = 152;
- tdep->ppc_ev0_regnum = -1;
- tdep->ppc_ev31_regnum = -1;
break;
case bfd_mach_ppc_e500:
- tdep->ppc_gp0_regnum = 41;
- tdep->ppc_gplast_regnum = tdep->ppc_gp0_regnum + 32 - 1;
tdep->ppc_toc_regnum = -1;
- tdep->ppc_ps_regnum = 1;
- tdep->ppc_cr_regnum = 2;
- tdep->ppc_lr_regnum = 3;
- tdep->ppc_ctr_regnum = 4;
- tdep->ppc_xer_regnum = 5;
- tdep->ppc_ev0_regnum = 7;
- tdep->ppc_ev31_regnum = 38;
- set_gdbarch_pc_regnum (gdbarch, 0);
- set_gdbarch_sp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1);
- set_gdbarch_deprecated_fp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1);
+ tdep->ppc_ev0_upper_regnum = 32;
+ tdep->ppc_ev0_regnum = 73;
+ tdep->ppc_ev31_regnum = 104;
+ tdep->ppc_acc_regnum = 71;
+ tdep->ppc_spefscr_regnum = 72;
+ tdep->ppc_fp0_regnum = -1;
+ tdep->ppc_fpscr_regnum = -1;
+ tdep->ppc_sr0_regnum = -1;
set_gdbarch_pseudo_register_read (gdbarch, e500_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, e500_pseudo_register_write);
+ set_gdbarch_register_reggroup_p (gdbarch, e500_register_reggroup_p);
break;
- default:
- tdep->ppc_vr0_regnum = -1;
- tdep->ppc_vrsave_regnum = -1;
- tdep->ppc_ev0_regnum = -1;
- tdep->ppc_ev31_regnum = -1;
- break;
+
+ case bfd_mach_ppc64:
+ case bfd_mach_ppc_620:
+ case bfd_mach_ppc_630:
+ case bfd_mach_ppc_a35:
+ case bfd_mach_ppc_rs64ii:
+ case bfd_mach_ppc_rs64iii:
+ /* These processor's register sets don't have segment registers. */
+ tdep->ppc_sr0_regnum = -1;
+ break;
}
+ else
+ internal_error (__FILE__, __LINE__,
+ "rs6000_gdbarch_init: "
+ "received unexpected BFD 'arch' value");
/* Sanity check on registers. */
gdb_assert (strcmp (tdep->regs[tdep->ppc_gp0_regnum].name, "r0") == 0);
- /* Set lr_frame_offset. */
- if (wordsize == 8)
- tdep->lr_frame_offset = 16;
- else if (sysv_abi)
- tdep->lr_frame_offset = 4;
- else
- tdep->lr_frame_offset = 8;
-
- /* Calculate byte offsets in raw register array. */
- tdep->regoff = xmalloc (v->num_tot_regs * sizeof (int));
- for (i = off = 0; i < v->num_tot_regs; i++)
- {
- tdep->regoff[i] = off;
- off += regsize (v->regs + i, wordsize);
- }
-
/* Select instruction printer. */
- if (arch == power)
+ if (arch == bfd_arch_rs6000)
set_gdbarch_print_insn (gdbarch, print_insn_rs6000);
else
set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc);
@@ -2645,11 +3203,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
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_deprecated_register_byte (gdbarch, rs6000_register_byte);
- set_gdbarch_deprecated_register_raw_size (gdbarch, rs6000_register_raw_size);
- set_gdbarch_deprecated_register_virtual_type (gdbarch, rs6000_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, rs6000_register_type);
set_gdbarch_ptr_bit (gdbarch, wordsize * TARGET_CHAR_BIT);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -2675,11 +3229,12 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
224. */
set_gdbarch_frame_red_zone_size (gdbarch, 224);
- 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_dwarf2_stab_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, rs6000_dwarf2_stab_reg_to_regnum);
+ set_gdbarch_convert_register_p (gdbarch, rs6000_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, rs6000_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, rs6000_value_to_register);
+
+ set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, rs6000_dwarf2_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
fairly certain that ppc_sysv_abi_push_arguments() will give even
@@ -2713,8 +3268,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 8);
if (!sysv_abi)
- set_gdbarch_use_struct_convention (gdbarch,
- rs6000_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, rs6000_use_struct_convention);
if (!sysv_abi)
{
@@ -2742,7 +3296,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_base_append_sniffer (gdbarch, rs6000_frame_base_sniffer);
break;
default:
- set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc);
@@ -2761,6 +3314,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
}
+ init_sim_regno_table (gdbarch);
+
return gdbarch;
}
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 0f8f65d2f76..055ba6cf684 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -922,12 +922,12 @@ s390_readinstruction (bfd_byte instr[], CORE_ADDR at)
static int s390_instrlen[] = { 2, 4, 4, 6 };
int instrlen;
- if (read_memory_nobpt (at, &instr[0], 2))
+ if (deprecated_read_memory_nobpt (at, &instr[0], 2))
return -1;
instrlen = s390_instrlen[instr[0] >> 6];
if (instrlen > 2)
{
- if (read_memory_nobpt (at + 2, &instr[2], instrlen - 2))
+ if (deprecated_read_memory_nobpt (at + 2, &instr[2], instrlen - 2))
return -1;
}
return instrlen;
@@ -1724,19 +1724,19 @@ s390_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
int d2;
if (word_size == 4
- && !read_memory_nobpt (pc - 4, insn, 4)
+ && !deprecated_read_memory_nobpt (pc - 4, insn, 4)
&& is_rs (insn, op_lm, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
if (word_size == 4
- && !read_memory_nobpt (pc - 6, insn, 6)
+ && !deprecated_read_memory_nobpt (pc - 6, insn, 6)
&& is_rsy (insn, op1_lmy, op2_lmy, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
if (word_size == 8
- && !read_memory_nobpt (pc - 6, insn, 6)
+ && !deprecated_read_memory_nobpt (pc - 6, insn, 6)
&& is_rsy (insn, op1_lmg, op2_lmg, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
@@ -1803,10 +1803,10 @@ s390_prologue_frame_unwind_cache (struct frame_info *next_frame,
/* If the next frame is a NORMAL_FRAME, this frame *cannot* have frame
size zero. This is only possible if the next frame is a sentinel
frame, a dummy frame, or a signal trampoline frame. */
- if (get_frame_type (next_frame) == NORMAL_FRAME
- /* For some reason, sentinel frames are NORMAL_FRAMEs
- -- but they have negative frame level. */
- && frame_relative_level (next_frame) >= 0)
+ /* FIXME: cagney/2004-05-01: This sanity check shouldn't be
+ needed, instead the code should simpliy rely on its
+ analysis. */
+ if (get_frame_type (next_frame) == NORMAL_FRAME)
return 0;
/* If we really have a frameless function, %r14 must be valid
@@ -1850,9 +1850,9 @@ s390_prologue_frame_unwind_cache (struct frame_info *next_frame,
treat it as frameless if we're currently within the function epilog
code at a point where the frame pointer has already been restored.
This can only happen in an innermost frame. */
- if (size > 0
- && (get_frame_type (next_frame) != NORMAL_FRAME
- || frame_relative_level (next_frame) < 0))
+ /* FIXME: cagney/2004-05-01: This sanity check shouldn't be needed,
+ instead the code should simpliy rely on its analysis. */
+ if (size > 0 && get_frame_type (next_frame) != NORMAL_FRAME)
{
/* See the comment in s390_in_function_epilogue_p on why this is
not completely reliable ... */
@@ -2020,8 +2020,8 @@ s390_frame_prev_register (struct frame_info *next_frame,
{
struct s390_unwind_cache *info
= s390_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind s390_frame_unwind = {
@@ -2092,8 +2092,8 @@ s390_stub_frame_prev_register (struct frame_info *next_frame,
{
struct s390_stub_unwind_cache *info
= s390_stub_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind s390_stub_frame_unwind = {
@@ -2153,7 +2153,7 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
ucontext (contains sigregs at offset 5 words) */
if (next_ra == next_cfa)
{
- sigreg_ptr = next_cfa + 8 + 128 + 5*word_size;
+ sigreg_ptr = next_cfa + 8 + 128 + align_up (5*word_size, 8);
}
/* Old-style RT frame and all non-RT frames:
@@ -2235,8 +2235,8 @@ s390_sigtramp_frame_prev_register (struct frame_info *next_frame,
{
struct s390_sigtramp_unwind_cache *info
= s390_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
- trad_frame_prev_register (next_frame, info->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ trad_frame_get_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind s390_sigtramp_frame_unwind = {
@@ -2251,7 +2251,7 @@ s390_sigtramp_frame_sniffer (struct frame_info *next_frame)
CORE_ADDR pc = frame_pc_unwind (next_frame);
bfd_byte sigreturn[2];
- if (read_memory_nobpt (pc, sigreturn, 2))
+ if (deprecated_read_memory_nobpt (pc, sigreturn, 2))
return NULL;
if (sigreturn[0] != 0x0a /* svc */)
@@ -2565,7 +2565,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. */
static CORE_ADDR
-s390_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 872dcaf89fc..21f39ec9c89 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -44,8 +44,6 @@ static void scm_printstr (struct ui_file * stream, char *string,
unsigned int length, int width,
int force_ellipses);
-extern struct type **const (c_builtin_types[]);
-
struct type *builtin_type_scm;
void
@@ -246,13 +244,15 @@ const struct language_defn scm_language_defn =
{
"scheme", /* Language name */
language_scm,
- c_builtin_types,
+ NULL,
range_check_off,
type_check_off,
case_sensitive_off,
+ array_row_major,
&exp_descriptor_scm,
scm_parse,
c_error,
+ null_post_parser,
scm_printchar, /* Print a character constant */
scm_printstr, /* Function to print string constant */
NULL, /* Function to print a single character */
@@ -265,15 +265,13 @@ const struct language_defn scm_language_defn =
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
NULL, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
- {"#o%lo", "#o", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"#x%lX", "#X", "X", ""}, /* Hex format info */
+ NULL, /* Language specific class_name_from_physname */
NULL, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- &builtin_type_char, /* Type of string elements */
+ NULL,
default_word_break_characters,
+ c_language_arch_info,
LANG_MAGIC
};
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index 94c1ee31311..f1e5c7fcc2c 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -83,8 +83,7 @@ sentinel_frame_this_id (struct frame_info *next_frame,
const struct frame_unwind sentinel_frame_unwinder =
{
- /* Should the sentinel frame be given a special type? */
- NORMAL_FRAME,
+ SENTINEL_FRAME,
sentinel_frame_this_id,
sentinel_frame_prev_register
};
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index cea01cdf221..f9299941976 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -903,61 +903,61 @@ _initialize_ser_dos (void)
intrupts[1].inuse = /* keyboard */
intrupts[2].inuse = 1; /* slave icu */
- add_show_from_set (
- add_set_cmd ("com1base", class_obscure, var_zinteger,
- (char *) &ports[0].base,
- "Set COM1 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com1irq", class_obscure, var_zinteger,
- (char *) &ports[0].irq,
- "Set COM1 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com2base", class_obscure, var_zinteger,
- (char *) &ports[1].base,
- "Set COM2 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com2irq", class_obscure, var_zinteger,
- (char *) &ports[1].irq,
- "Set COM2 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com3base", class_obscure, var_zinteger,
- (char *) &ports[2].base,
- "Set COM3 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com3irq", class_obscure, var_zinteger,
- (char *) &ports[2].irq,
- "Set COM3 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com4base", class_obscure, var_zinteger,
- (char *) &ports[3].base,
- "Set COM4 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com4irq", class_obscure, var_zinteger,
- (char *) &ports[3].irq,
- "Set COM4 interrupt request.",
- &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("com1base", class_obscure, var_zinteger,
+ (char *) &ports[0].base,
+ "Set COM1 base i/o port address.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com1irq", class_obscure, var_zinteger,
+ (char *) &ports[0].irq,
+ "Set COM1 interrupt request.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com2base", class_obscure, var_zinteger,
+ (char *) &ports[1].base,
+ "Set COM2 base i/o port address.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com2irq", class_obscure, var_zinteger,
+ (char *) &ports[1].irq,
+ "Set COM2 interrupt request.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com3base", class_obscure, var_zinteger,
+ (char *) &ports[2].base,
+ "Set COM3 base i/o port address.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com3irq", class_obscure, var_zinteger,
+ (char *) &ports[2].irq,
+ "Set COM3 interrupt request.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com4base", class_obscure, var_zinteger,
+ (char *) &ports[3].base,
+ "Set COM4 base i/o port address.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("com4irq", class_obscure, var_zinteger,
+ (char *) &ports[3].irq,
+ "Set COM4 interrupt request.",
+ &setlist),
+ &showlist);
add_info ("serial", dos_info,
"Print DOS serial port status.");
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index a9a87143cb3..de8c4283744 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -44,12 +44,11 @@
static int net_open (struct serial *scb, const char *name);
static void net_close (struct serial *scb);
-extern int (*ui_loop_hook) (int);
void _initialize_ser_tcp (void);
/* seconds to wait for connect */
#define TIMEOUT 15
-/* how many times per second to poll ui_loop_hook */
+/* how many times per second to poll deprecated_ui_loop_hook */
#define POLL_INTERVAL 2
/* Open a tcp socket */
@@ -133,9 +132,9 @@ net_open (struct serial *scb, const char *name)
/* While we wait for the connect to complete
poll the UI so it can update or the user can
interrupt. */
- if (ui_loop_hook)
+ if (deprecated_ui_loop_hook)
{
- if (ui_loop_hook (0))
+ if (deprecated_ui_loop_hook (0))
{
errno = EINTR;
net_close (scb);
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 38b6716d2ee..6f64f419b33 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -99,8 +99,6 @@ static void reschedule (struct serial *scb);
void _initialize_ser_hardwire (void);
-extern int (*ui_loop_hook) (int);
-
/* Open up a real live device for serial I/O */
static int
@@ -580,11 +578,12 @@ do_hardwire_readchar (struct serial *scb, int timeout)
/* N.B. The UI may destroy our world (for instance by calling
remote_stop,) in which case we want to get out of here as
quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The ui_loop_hook signals that
- we should exit by returning 1. */
+ someone else might have freed it. The
+ deprecated_ui_loop_hook signals that we should exit by
+ returning 1. */
- if (ui_loop_hook)
- detach = ui_loop_hook (0);
+ if (deprecated_ui_loop_hook)
+ detach = deprecated_ui_loop_hook (0);
if (detach)
return SERIAL_TIMEOUT;
@@ -959,12 +958,13 @@ do_unix_readchar (struct serial *scb, int timeout)
/* N.B. The UI may destroy our world (for instance by calling
remote_stop,) in which case we want to get out of here as
quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The ui_loop_hook signals that
- we should exit by returning 1. */
+ someone else might have freed it. The
+ deprecated_ui_loop_hook signals that we should exit by
+ returning 1. */
- if (ui_loop_hook)
+ if (deprecated_ui_loop_hook)
{
- if (ui_loop_hook (0))
+ if (deprecated_ui_loop_hook (0))
return SERIAL_TIMEOUT;
}
diff --git a/gdb/serial.c b/gdb/serial.c
index ada5631dce9..7311dd8d60d 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -394,7 +394,7 @@ serial_printf (struct serial *desc, const char *format,...)
char *buf;
va_start (args, format);
- xvasprintf (&buf, format, args);
+ buf = xstrvprintf (format, args);
serial_write (desc, buf, strlen (buf));
xfree (buf);
@@ -686,7 +686,7 @@ Show default serial/parallel port configuration.",
0/*allow-unknown*/,
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("remotelogfile", no_class,
var_filename, (char *) &serial_logfile,
"Set filename for remote session recording.\n\
@@ -695,18 +695,19 @@ by gdbserver.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_enum_cmd ("remotelogbase", no_class,
logbase_enums, &serial_logbase,
"Set numerical base for remote session logging",
&setlist),
&showlist);
- add_show_from_set (add_set_cmd ("serial",
- class_maintenance,
- var_zinteger,
- (char *)&global_serial_debug_p,
- "Set serial debugging.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("serial",
+ class_maintenance,
+ var_zinteger,
+ (char *)&global_serial_debug_p,
+ "Set serial debugging.\n\
When non-zero, serial port debugging is enabled.", &setdebuglist),
- &showdebuglist);
+ &showdebuglist);
}
diff --git a/gdb/serial.h b/gdb/serial.h
index 7495b709d57..abe76b00679 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -62,8 +62,9 @@ extern void serial_un_fdopen (struct serial *scb);
enum serial_rc {
SERIAL_ERROR = -1, /* General error. */
SERIAL_TIMEOUT = -2, /* Timeout or data-not-ready during read.
- Unfortunately, through ui_loop_hook(), this
- can also be a QUIT indication. */
+ Unfortunately, through
+ deprecated_ui_loop_hook(), this can also be
+ a QUIT indication. */
SERIAL_EOF = -3 /* General end-of-file or remote target
connection closed, indication. Includes
things like the line dropping dead. */
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 45833fcfdab..03ef25cd09b 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -885,7 +885,7 @@ sh_treat_as_flt_p (struct type *type)
static CORE_ADDR
sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args,
@@ -997,7 +997,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
static CORE_ADDR
sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr,
int nargs, struct value **args,
@@ -1147,7 +1147,11 @@ sh3e_sh4_store_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
int i, regnum = FP0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ regcache_raw_write (regcache, regnum++,
+ (char *) valbuf + len - 4 - i);
+ else
+ regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
}
else
sh_default_store_return_value (type, regcache, valbuf);
@@ -1820,8 +1824,6 @@ sh_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
}
}
-#ifdef SVR4_SHARED_LIBS
-
/* Fetch (and possibly build) an appropriate link_map_offsets structure
for native i386 linux targets using the struct offsets defined in
link.h (but without actual reference to that file).
@@ -1862,7 +1864,6 @@ sh_linux_svr4_fetch_link_map_offsets (void)
return lmp;
}
-#endif /* SVR4_SHARED_LIBS */
static int
sh_dsp_register_sim_regno (int nr)
@@ -2176,10 +2177,12 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_show_regs = sh4_nofpu_show_regs;
break;
+#if 0
case bfd_mach_sh5:
sh_show_regs = sh64_show_regs;
/* SH5 is handled entirely in sh64-tdep.c */
return sh64_gdbarch_init (info, arches);
+#endif
}
/* If there is already a candidate, use it. */
@@ -2211,7 +2214,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
- set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, sh_use_struct_convention);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh);
set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
@@ -2227,7 +2230,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_frame_align (gdbarch, sh_frame_align);
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index cec9fbae85b..327e76a85a5 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -228,7 +228,7 @@ init_sh3_cmds (void)
sh3_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
sh3_cmds.dump_registers = "r\r"; /* dump_registers */
sh3_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)";
- sh3_cmds.supply_register = sh3_supply_register; /* supply_register */
+ sh3_cmds.supply_register = sh3_supply_register;
sh3_cmds.load_routine = sh3_load; /* load_routine */
sh3_cmds.load = NULL; /* download command */
sh3_cmds.loadresp = NULL; /* Load response */
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index 1d7b313ab1c..fac6617a3ff 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -736,12 +736,9 @@ translate_insn_rn (int rn, int media_mode)
static CORE_ADDR
sh64_frame_chain (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
return get_frame_base (frame); /* dummy frame same as caller's frame */
- if (get_frame_pc (frame)
- && !deprecated_inside_entry_file (get_frame_pc (frame)))
+ if (get_frame_pc (frame))
{
int media_mode = pc_is_isa32 (get_frame_pc (frame));
int size;
@@ -765,8 +762,7 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
int media_mode = 0;
for (; fi; fi = get_next_frame (fi))
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
/* When the caller requests PR from the dummy frame, we return
PC because that's where the previous routine appears to have
done a call from. */
@@ -1215,8 +1211,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
if (get_next_frame (fi))
deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
{
/* We need to setup fi->frame here because call_function_by_hand
gets it wrong by assuming it's always FP. */
@@ -1224,7 +1219,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
get_frame_extra_info (fi)->return_pc =
deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), PC_REGNUM);
- get_frame_extra_info (fi)->f_offset = -(DEPRECATED_CALL_DUMMY_LENGTH + 4);
+ get_frame_extra_info (fi)->f_offset = -4;
get_frame_extra_info (fi)->leaf_function = 0;
return;
}
@@ -1273,9 +1268,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
while (frame && ((frame = get_next_frame (frame)) != NULL))
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
{
if (lval) /* found it in a CALL_DUMMY frame */
*lval = not_lval;
@@ -1370,9 +1363,7 @@ sh64_pop_frame (void)
int media_mode = pc_is_isa32 (get_frame_pc (frame));
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
deprecated_pop_dummy_frame ();
else
{
@@ -2745,8 +2736,6 @@ sh64_do_registers_info (int regnum, int fpregs)
sh_compact_do_registers_info (regnum, fpregs);
}
-#ifdef SVR4_SHARED_LIBS
-
/* Fetch (and possibly build) an appropriate link_map_offsets structure
for native i386 linux targets using the struct offsets defined in
link.h (but without actual reference to that file).
@@ -2787,14 +2776,12 @@ sh_linux_svr4_fetch_link_map_offsets (void)
return lmp;
}
-#endif /* SVR4_SHARED_LIBS */
gdbarch_init_ftype sh64_gdbarch_init;
struct gdbarch *
sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- static LONGEST sh64_call_dummy_words[] = {0};
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
@@ -2847,7 +2834,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
@@ -2861,9 +2847,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* The number of real registers is the same whether we are in
ISA16(compact) or ISA32(media). */
set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS);
- set_gdbarch_deprecated_register_bytes (gdbarch,
- ((SIM_SH64_NR_FP_REGS + 1) * 4)
- + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
set_gdbarch_register_name (gdbarch, sh64_register_name);
set_gdbarch_register_type (gdbarch, sh64_register_type);
@@ -2875,8 +2858,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
set_gdbarch_breakpoint_from_pc (gdbarch, sh64_breakpoint_from_pc);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
set_gdbarch_deprecated_frame_chain (gdbarch, sh64_frame_chain);
@@ -2887,7 +2868,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, sh64_use_struct_convention);
set_gdbarch_deprecated_pop_frame (gdbarch, sh64_pop_frame);
set_gdbarch_elf_make_msymbol_special (gdbarch,
sh64_elf_make_msymbol_special);
diff --git a/gdb/shnbsd-nat.c b/gdb/shnbsd-nat.c
index ec400698553..db6dae58891 100644
--- a/gdb/shnbsd-nat.c
+++ b/gdb/shnbsd-nat.c
@@ -1,5 +1,6 @@
/* Native-dependent code for SuperH running NetBSD, for GDB.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -44,7 +45,7 @@ fetch_inferior_registers (int regno)
struct reg inferior_registers;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0) == -1)
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
perror_with_name ("Couldn't get registers");
shnbsd_supply_reg ((char *) &inferior_registers, regno);
@@ -62,13 +63,13 @@ store_inferior_registers (int regno)
struct reg inferior_registers;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0) == -1)
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
perror_with_name ("Couldn't get registers");
shnbsd_fill_reg ((char *) &inferior_registers, regno);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &inferior_registers, 0) == -1)
+ (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
perror_with_name ("Couldn't set registers");
if (regno != -1)
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index 2b731ced1a7..9c949103fba 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -61,25 +61,26 @@ shnbsd_supply_reg (char *regs, int regno)
int i;
if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + (0 * 4));
+ regcache_raw_supply (current_regcache, PC_REGNUM, regs + (0 * 4));
if (regno == SR_REGNUM || regno == -1)
- supply_register (SR_REGNUM, regs + (1 * 4));
+ regcache_raw_supply (current_regcache, SR_REGNUM, regs + (1 * 4));
if (regno == PR_REGNUM || regno == -1)
- supply_register (PR_REGNUM, regs + (2 * 4));
+ regcache_raw_supply (current_regcache, PR_REGNUM, regs + (2 * 4));
if (regno == MACH_REGNUM || regno == -1)
- supply_register (MACH_REGNUM, regs + (3 * 4));
+ regcache_raw_supply (current_regcache, MACH_REGNUM, regs + (3 * 4));
if (regno == MACL_REGNUM || regno == -1)
- supply_register (MACL_REGNUM, regs + (4 * 4));
+ regcache_raw_supply (current_regcache, MACL_REGNUM, regs + (4 * 4));
if ((regno >= R0_REGNUM && regno <= (R0_REGNUM + 15)) || regno == -1)
{
for (i = R0_REGNUM; i <= (R0_REGNUM + 15); i++)
if (regno == i || regno == -1)
- supply_register (i, regs + regmap[i - R0_REGNUM]);
+ regcache_raw_supply (current_regcache, i,
+ regs + regmap[i - R0_REGNUM]);
}
}
@@ -89,25 +90,26 @@ shnbsd_fill_reg (char *regs, int regno)
int i;
if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + (0 * 4));
+ regcache_raw_collect (current_regcache, PC_REGNUM, regs + (0 * 4));
if (regno == SR_REGNUM || regno == -1)
- regcache_collect (SR_REGNUM, regs + (1 * 4));
+ regcache_raw_collect (current_regcache, SR_REGNUM, regs + (1 * 4));
if (regno == PR_REGNUM || regno == -1)
- regcache_collect (PR_REGNUM, regs + (2 * 4));
+ regcache_raw_collect (current_regcache, PR_REGNUM, regs + (2 * 4));
if (regno == MACH_REGNUM || regno == -1)
- regcache_collect (MACH_REGNUM, regs + (3 * 4));
+ regcache_raw_collect (current_regcache, MACH_REGNUM, regs + (3 * 4));
if (regno == MACL_REGNUM || regno == -1)
- regcache_collect (MACL_REGNUM, regs + (4 * 4));
+ regcache_raw_collect (current_regcache, MACL_REGNUM, regs + (4 * 4));
if ((regno >= R0_REGNUM && regno <= (R0_REGNUM + 15)) || regno == -1)
{
for (i = R0_REGNUM; i <= (R0_REGNUM + 15); i++)
if (regno == i || regno == -1)
- regcache_collect (i, regs + regmap[i - R0_REGNUM]);
+ regcache_raw_collect (current_regcache, i,
+ regs + regmap[i - R0_REGNUM]);
}
}
@@ -166,19 +168,10 @@ static struct core_fns shnbsd_elfcore_fns =
NULL /* next */
};
-static int
-shnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
-{
- /* FIXME: Need to add support for kernel-provided signal trampolines. */
- return (nbsd_pc_in_sigtramp (pc, func_name));
-}
-
static void
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
-
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}
@@ -186,8 +179,8 @@ shnbsd_init_abi (struct gdbarch_info info,
void
_initialize_shnbsd_tdep (void)
{
- add_core_fns (&shnbsd_core_fns);
- add_core_fns (&shnbsd_elfcore_fns);
+ deprecated_add_core_fns (&shnbsd_core_fns);
+ deprecated_add_core_fns (&shnbsd_elfcore_fns);
gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_NETBSD_ELF,
shnbsd_init_abi);
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 3ac2a34d62b..393f976f9ee 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1,5 +1,6 @@
-/* Low level interface for debugging Solaris threads for GDB, the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+/* Solaris threads debugging interface.
+
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,32 +21,35 @@
Boston, MA 02111-1307, USA. */
/* This module implements a sort of half target that sits between the
- machine-independent parts of GDB and the /proc interface (procfs.c) to
- provide access to the Solaris user-mode thread implementation.
-
- Solaris threads are true user-mode threads, which are invoked via the thr_*
- and pthread_* (native and Posix respectivly) interfaces. These are mostly
- implemented in user-space, with all thread context kept in various
- structures that live in the user's heap. These should not be confused with
- lightweight processes (LWPs), which are implemented by the kernel, and
- scheduled without explicit intervention by the process.
-
- Just to confuse things a little, Solaris threads (both native and Posix) are
- actually implemented using LWPs. In general, there are going to be more
- threads than LWPs. There is no fixed correspondence between a thread and an
- LWP. When a thread wants to run, it gets scheduled onto the first available
- LWP and can therefore migrate from one LWP to another as time goes on. A
+ machine-independent parts of GDB and the /proc interface (procfs.c)
+ to provide access to the Solaris user-mode thread implementation.
+
+ Solaris threads are true user-mode threads, which are invoked via
+ the thr_* and pthread_* (native and POSIX respectivly) interfaces.
+ These are mostly implemented in user-space, with all thread context
+ kept in various structures that live in the user's heap. These
+ should not be confused with lightweight processes (LWPs), which are
+ implemented by the kernel, and scheduled without explicit
+ intervention by the process.
+
+ Just to confuse things a little, Solaris threads (both native and
+ POSIX) are actually implemented using LWPs. In general, there are
+ going to be more threads than LWPs. There is no fixed
+ correspondence between a thread and an LWP. When a thread wants to
+ run, it gets scheduled onto the first available LWP and can
+ therefore migrate from one LWP to another as time goes on. A
sleeping thread may not be associated with an LWP at all!
- To make it possible to mess with threads, Sun provides a library called
- libthread_db.so.1 (not to be confused with libthread_db.so.0, which doesn't
- have a published interface). This interface has an upper part, which it
- provides, and a lower part which I provide. The upper part consists of the
- td_* routines, which allow me to find all the threads, query their state,
- etc... The lower part consists of all of the ps_*, which are used by the
- td_* routines to read/write memory, manipulate LWPs, lookup symbols, etc...
- The ps_* routines actually do most of their work by calling functions in
- procfs.c. */
+ To make it possible to mess with threads, Sun provides a library
+ called libthread_db.so.1 (not to be confused with
+ libthread_db.so.0, which doesn't have a published interface). This
+ interface has an upper part, which it provides, and a lower part
+ which we provide. The upper part consists of the td_* routines,
+ which allow us to find all the threads, query their state, etc...
+ The lower part consists of all of the ps_*, which are used by the
+ td_* routines to read/write memory, manipulate LWPs, lookup
+ symbols, etc... The ps_* routines actually do most of their work
+ by calling functions in procfs.c. */
#include "defs.h"
#include <thread.h>
@@ -81,38 +85,34 @@ extern char *procfs_pid_to_str (ptid_t ptid);
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
-/* This struct is defined by us, but mainly used for the proc_service interface.
- We don't have much use for it, except as a handy place to get a real pid
- for memory accesses. */
+/* This struct is defined by us, but mainly used for the proc_service
+ interface. We don't have much use for it, except as a handy place
+ to get a real PID for memory accesses. */
struct ps_prochandle
- {
- ptid_t ptid;
- };
+{
+ ptid_t ptid;
+};
struct string_map
- {
- int num;
- char *str;
- };
+{
+ int num;
+ char *str;
+};
static struct ps_prochandle main_ph;
static td_thragent_t *main_ta;
static int sol_thread_active = 0;
-static char *td_err_string (td_err_e errcode);
-static char *td_state_string (td_thr_state_e statecode);
-static ptid_t thread_to_lwp (ptid_t thread_id, int default_lwp);
static void sol_thread_resume (ptid_t ptid, int step, enum target_signal signo);
-static ptid_t lwp_to_thread (ptid_t lwp);
static int sol_thread_alive (ptid_t ptid);
static void sol_core_close (int quitting);
static void init_sol_thread_ops (void);
static void init_sol_core_ops (void);
-/* Default definitions: These must be defined in tm.h
- if they are to be shared with a process module such as procfs. */
+/* Default definitions: These must be defined in tm.h if they are to
+ be shared with a process module such as procfs. */
#define GET_PID(ptid) ptid_get_pid (ptid)
#define GET_LWP(ptid) ptid_get_lwp (ptid)
@@ -124,105 +124,87 @@ static void init_sol_core_ops (void);
#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0)
#define BUILD_THREAD(tid, pid) ptid_build (pid, 0, tid)
-/* Pointers to routines from lithread_db resolved by dlopen() */
-
-static void (*p_td_log) (const int on_off);
-static td_err_e (*p_td_ta_new) (const struct ps_prochandle * ph_p,
- td_thragent_t ** ta_pp);
-static td_err_e (*p_td_ta_delete) (td_thragent_t * ta_p);
-static td_err_e (*p_td_init) (void);
-static td_err_e (*p_td_ta_get_ph) (const td_thragent_t * ta_p,
- struct ps_prochandle ** ph_pp);
-static td_err_e (*p_td_ta_get_nthreads) (const td_thragent_t * ta_p,
- int *nthread_p);
-static td_err_e (*p_td_ta_tsd_iter) (const td_thragent_t * ta_p,
- td_key_iter_f * cb,
- void *cbdata_p);
-static td_err_e (*p_td_ta_thr_iter) (const td_thragent_t * ta_p,
- td_thr_iter_f * cb,
- void *cbdata_p,
- td_thr_state_e state,
- int ti_pri,
- sigset_t * ti_sigmask_p,
- unsigned ti_user_flags);
-static td_err_e (*p_td_thr_validate) (const td_thrhandle_t * th_p);
-static td_err_e (*p_td_thr_tsd) (const td_thrhandle_t * th_p,
- const thread_key_t key,
- void **data_pp);
-static td_err_e (*p_td_thr_get_info) (const td_thrhandle_t * th_p,
- td_thrinfo_t * ti_p);
-static td_err_e (*p_td_thr_getfpregs) (const td_thrhandle_t * th_p,
- prfpregset_t * fpregset);
-static td_err_e (*p_td_thr_getxregsize) (const td_thrhandle_t * th_p,
- int *xregsize);
-static td_err_e (*p_td_thr_getxregs) (const td_thrhandle_t * th_p,
- const caddr_t xregset);
-static td_err_e (*p_td_thr_sigsetmask) (const td_thrhandle_t * th_p,
- const sigset_t ti_sigmask);
-static td_err_e (*p_td_thr_setprio) (const td_thrhandle_t * th_p,
- const int ti_pri);
-static td_err_e (*p_td_thr_setsigpending) (const td_thrhandle_t * th_p,
- const uchar_t ti_pending_flag,
- const sigset_t ti_pending);
-static td_err_e (*p_td_thr_setfpregs) (const td_thrhandle_t * th_p,
- const prfpregset_t * fpregset);
-static td_err_e (*p_td_thr_setxregs) (const td_thrhandle_t * th_p,
- const caddr_t xregset);
-static td_err_e (*p_td_ta_map_id2thr) (const td_thragent_t * ta_p,
- thread_t tid,
- td_thrhandle_t * th_p);
-static td_err_e (*p_td_ta_map_lwp2thr) (const td_thragent_t * ta_p,
- lwpid_t lwpid,
- td_thrhandle_t * th_p);
-static td_err_e (*p_td_thr_getgregs) (const td_thrhandle_t * th_p,
- prgregset_t regset);
-static td_err_e (*p_td_thr_setgregs) (const td_thrhandle_t * th_p,
- const prgregset_t regset);
-
-/*
-
- LOCAL FUNCTION
-
- td_err_string - Convert a thread_db error code to a string
-
- SYNOPSIS
-
- char * td_err_string (errcode)
-
- DESCRIPTION
-
- Return the thread_db error string associated with errcode. If errcode
- is unknown, then return a message.
+/* Pointers to routines from libthread_db resolved by dlopen(). */
+
+static void (*p_td_log)(const int on_off);
+static td_err_e (*p_td_ta_new)(const struct ps_prochandle *ph_p,
+ td_thragent_t **ta_pp);
+static td_err_e (*p_td_ta_delete)(td_thragent_t *ta_p);
+static td_err_e (*p_td_init)(void);
+static td_err_e (*p_td_ta_get_ph)(const td_thragent_t *ta_p,
+ struct ps_prochandle **ph_pp);
+static td_err_e (*p_td_ta_get_nthreads)(const td_thragent_t *ta_p,
+ int *nthread_p);
+static td_err_e (*p_td_ta_tsd_iter)(const td_thragent_t *ta_p,
+ td_key_iter_f *cb, void *cbdata_p);
+static td_err_e (*p_td_ta_thr_iter)(const td_thragent_t *ta_p,
+ td_thr_iter_f *cb, void *cbdata_p,
+ td_thr_state_e state, int ti_pri,
+ sigset_t *ti_sigmask_p,
+ unsigned ti_user_flags);
+static td_err_e (*p_td_thr_validate)(const td_thrhandle_t *th_p);
+static td_err_e (*p_td_thr_tsd)(const td_thrhandle_t * th_p,
+ const thread_key_t key, void **data_pp);
+static td_err_e (*p_td_thr_get_info)(const td_thrhandle_t *th_p,
+ td_thrinfo_t *ti_p);
+static td_err_e (*p_td_thr_getfpregs)(const td_thrhandle_t *th_p,
+ prfpregset_t *fpregset);
+static td_err_e (*p_td_thr_getxregsize)(const td_thrhandle_t *th_p,
+ int *xregsize);
+static td_err_e (*p_td_thr_getxregs)(const td_thrhandle_t *th_p,
+ const caddr_t xregset);
+static td_err_e (*p_td_thr_sigsetmask)(const td_thrhandle_t *th_p,
+ const sigset_t ti_sigmask);
+static td_err_e (*p_td_thr_setprio)(const td_thrhandle_t *th_p,
+ const int ti_pri);
+static td_err_e (*p_td_thr_setsigpending)(const td_thrhandle_t *th_p,
+ const uchar_t ti_pending_flag,
+ const sigset_t ti_pending);
+static td_err_e (*p_td_thr_setfpregs)(const td_thrhandle_t *th_p,
+ const prfpregset_t *fpregset);
+static td_err_e (*p_td_thr_setxregs)(const td_thrhandle_t *th_p,
+ const caddr_t xregset);
+static td_err_e (*p_td_ta_map_id2thr)(const td_thragent_t *ta_p,
+ thread_t tid,
+ td_thrhandle_t *th_p);
+static td_err_e (*p_td_ta_map_lwp2thr)(const td_thragent_t *ta_p,
+ lwpid_t lwpid,
+ td_thrhandle_t *th_p);
+static td_err_e (*p_td_thr_getgregs)(const td_thrhandle_t *th_p,
+ prgregset_t regset);
+static td_err_e (*p_td_thr_setgregs)(const td_thrhandle_t *th_p,
+ const prgregset_t regset);
+
- */
+/* Return the libthread_db error string associated with ERRCODE. If
+ ERRCODE is unknown, return an appropriate message. */
static char *
td_err_string (td_err_e errcode)
{
- static struct string_map
- td_err_table[] =
+ static struct string_map td_err_table[] =
{
- {TD_OK, "generic \"call succeeded\""},
- {TD_ERR, "generic error."},
- {TD_NOTHR, "no thread can be found to satisfy query"},
- {TD_NOSV, "no synch. variable can be found to satisfy query"},
- {TD_NOLWP, "no lwp can be found to satisfy query"},
- {TD_BADPH, "invalid process handle"},
- {TD_BADTH, "invalid thread handle"},
- {TD_BADSH, "invalid synchronization handle"},
- {TD_BADTA, "invalid thread agent"},
- {TD_BADKEY, "invalid key"},
- {TD_NOMSG, "td_thr_event_getmsg() called when there was no message"},
- {TD_NOFPREGS, "FPU register set not available for given thread"},
- {TD_NOLIBTHREAD, "application not linked with libthread"},
- {TD_NOEVENT, "requested event is not supported"},
- {TD_NOCAPAB, "capability not available"},
- {TD_DBERR, "Debugger service failed"},
- {TD_NOAPLIC, "Operation not applicable to"},
- {TD_NOTSD, "No thread specific data for this thread"},
- {TD_MALLOC, "Malloc failed"},
- {TD_PARTIALREG, "Only part of register set was written/read"},
- {TD_NOXREGS, "X register set not available for given thread"}
+ { TD_OK, "generic \"call succeeded\"" },
+ { TD_ERR, "generic error." },
+ { TD_NOTHR, "no thread can be found to satisfy query" },
+ { TD_NOSV, "no synch. variable can be found to satisfy query" },
+ { TD_NOLWP, "no lwp can be found to satisfy query" },
+ { TD_BADPH, "invalid process handle" },
+ { TD_BADTH, "invalid thread handle" },
+ { TD_BADSH, "invalid synchronization handle" },
+ { TD_BADTA, "invalid thread agent" },
+ { TD_BADKEY, "invalid key" },
+ { TD_NOMSG, "td_thr_event_getmsg() called when there was no message" },
+ { TD_NOFPREGS, "FPU register set not available for given thread" },
+ { TD_NOLIBTHREAD, "application not linked with libthread" },
+ { TD_NOEVENT, "requested event is not supported" },
+ { TD_NOCAPAB, "capability not available" },
+ { TD_DBERR, "Debugger service failed" },
+ { TD_NOAPLIC, "Operation not applicable to" },
+ { TD_NOTSD, "No thread specific data for this thread" },
+ { TD_MALLOC, "Malloc failed" },
+ { TD_PARTIALREG, "Only part of register set was written/read" },
+ { TD_NOXREGS, "X register set not available for given thread" }
};
const int td_err_size = sizeof td_err_table / sizeof (struct string_map);
int i;
@@ -232,44 +214,30 @@ td_err_string (td_err_e errcode)
if (td_err_table[i].num == errcode)
return td_err_table[i].str;
- sprintf (buf, "Unknown thread_db error code: %d", errcode);
+ sprintf (buf, "Unknown libthread_db error code: %d", errcode);
return buf;
}
-
-/*
- LOCAL FUNCTION
-
- td_state_string - Convert a thread_db state code to a string
-
- SYNOPSIS
-
- char * td_state_string (statecode)
-
- DESCRIPTION
-
- Return the thread_db state string associated with statecode. If
- statecode is unknown, then return a message.
-
- */
+/* Return the the libthread_db state string assicoated with STATECODE.
+ If STATECODE is unknown, return an appropriate message. */
static char *
td_state_string (td_thr_state_e statecode)
{
- static struct string_map
- td_thr_state_table[] =
+ static struct string_map td_thr_state_table[] =
{
- {TD_THR_ANY_STATE, "any state"},
- {TD_THR_UNKNOWN, "unknown"},
- {TD_THR_STOPPED, "stopped"},
- {TD_THR_RUN, "run"},
- {TD_THR_ACTIVE, "active"},
- {TD_THR_ZOMBIE, "zombie"},
- {TD_THR_SLEEP, "sleep"},
- {TD_THR_STOPPED_ASLEEP, "stopped asleep"}
+ { TD_THR_ANY_STATE, "any state" },
+ { TD_THR_UNKNOWN, "unknown" },
+ { TD_THR_STOPPED, "stopped" },
+ { TD_THR_RUN, "run" },
+ { TD_THR_ACTIVE, "active" },
+ { TD_THR_ZOMBIE, "zombie" },
+ { TD_THR_SLEEP, "sleep" },
+ { TD_THR_STOPPED_ASLEEP, "stopped asleep" }
};
- const int td_thr_state_table_size = sizeof td_thr_state_table / sizeof (struct string_map);
+ const int td_thr_state_table_size =
+ sizeof td_thr_state_table / sizeof (struct string_map);
int i;
static char buf[50];
@@ -277,32 +245,17 @@ td_state_string (td_thr_state_e statecode)
if (td_thr_state_table[i].num == statecode)
return td_thr_state_table[i].str;
- sprintf (buf, "Unknown thread_db state code: %d", statecode);
+ sprintf (buf, "Unknown libthread_db state code: %d", statecode);
return buf;
}
-/*
- LOCAL FUNCTION
+/* Convert a POSIX or Solaris thread ID into a LWP ID. If THREAD_ID
+ doesn't exist, that's an error. If it's an inactive thread, return
+ DEFAULT_LPW.
- thread_to_lwp - Convert a Posix or Solaris thread id to a LWP id.
-
- SYNOPSIS
-
- tpid_t thread_to_lwp (thread_id, default_lwp)
-
- DESCRIPTION
-
- This function converts a Posix or Solaris thread id to a lightweight
- process id. If thread_id is non-existent, that's an error. If it's
- an inactive thread, then we return default_lwp.
-
- NOTES
-
- This function probably shouldn't call error()...
-
- */
+ NOTE: This function probably shouldn't call error(). */
static ptid_t
thread_to_lwp (ptid_t thread_id, int default_lwp)
@@ -312,19 +265,19 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
td_err_e val;
if (is_lwp (thread_id))
- return thread_id; /* It's already an LWP id */
+ return thread_id; /* It's already an LWP ID. */
- /* It's a thread. Convert to lwp */
+ /* It's a thread. Convert to LWP. */
val = p_td_ta_map_id2thr (main_ta, GET_THREAD (thread_id), &th);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* thread must have terminated */
+ return pid_to_ptid (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error ("thread_to_lwp: td_ta_map_id2thr %s", td_err_string (val));
val = p_td_thr_get_info (&th, &ti);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* thread must have terminated */
+ return pid_to_ptid (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error ("thread_to_lwp: td_thr_get_info: %s", td_err_string (val));
@@ -338,27 +291,11 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
return BUILD_LWP (ti.ti_lid, PIDGET (thread_id));
}
-
-/*
- LOCAL FUNCTION
-
- lwp_to_thread - Convert a LWP id to a Posix or Solaris thread id.
-
- SYNOPSIS
-
- int lwp_to_thread (lwp_id)
-
- DESCRIPTION
-
- This function converts a lightweight process id to a Posix or Solaris
- thread id. If thread_id is non-existent, that's an error.
-
- NOTES
+/* Convert an LWP ID into a POSIX or Solaris thread ID. If LWP_ID
+ doesn't exists, that's an error.
- This function probably shouldn't call error()...
-
- */
+ NOTE: This function probably shouldn't call error(). */
static ptid_t
lwp_to_thread (ptid_t lwp)
@@ -368,29 +305,28 @@ lwp_to_thread (ptid_t lwp)
td_err_e val;
if (is_thread (lwp))
- return lwp; /* It's already a thread id */
+ return lwp; /* It's already a thread ID. */
- /* It's an lwp. Convert it to a thread id. */
+ /* It's an LWP. Convert it to a thread ID. */
if (!sol_thread_alive (lwp))
- return pid_to_ptid (-1); /* defunct lwp */
+ return pid_to_ptid (-1); /* Must be a defunct LPW. */
val = p_td_ta_map_lwp2thr (main_ta, GET_LWP (lwp), &th);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* thread must have terminated */
+ return pid_to_ptid (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error ("lwp_to_thread: td_ta_map_lwp2thr: %s.", td_err_string (val));
val = p_td_thr_validate (&th);
if (val == TD_NOTHR)
- return lwp; /* libthread doesn't know about it;
- just return lwp */
+ return lwp; /* Unknown to libthread; just return LPW, */
else if (val != TD_OK)
error ("lwp_to_thread: td_thr_validate: %s.", td_err_string (val));
val = p_td_thr_get_info (&th, &ti);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* thread must have terminated */
+ return pid_to_ptid (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error ("lwp_to_thread: td_thr_get_info: %s.", td_err_string (val));
@@ -398,8 +334,9 @@ lwp_to_thread (ptid_t lwp)
}
-/* Most target vector functions from here on actually just pass through to
- procfs.c, as they don't need to do anything specific for threads. */
+/* Most target vector functions from here on actually just pass
+ through to procfs.c, as they don't need to do anything specific for
+ threads. */
static void
sol_thread_open (char *arg, int from_tty)
@@ -407,21 +344,21 @@ sol_thread_open (char *arg, int from_tty)
procfs_ops.to_open (arg, from_tty);
}
-/* Attach to process PID, then initialize for debugging it
- and wait for the trace-trap that results from attaching. */
+/* Attach to process PID, then initialize for debugging it and wait
+ for the trace-trap that results from attaching. */
static void
sol_thread_attach (char *args, int from_tty)
{
procfs_ops.to_attach (args, from_tty);
- /* Must get symbols from solibs before libthread_db can run! */
+ /* Must get symbols from shared libraries before libthread_db can run! */
SOLIB_ADD ((char *) 0, from_tty, (struct target_ops *) 0, auto_solib_add);
if (sol_thread_active)
{
printf_filtered ("sol-thread active.\n");
- main_ph.ptid = inferior_ptid; /* Save for xfer_memory */
+ main_ph.ptid = inferior_ptid; /* Save for xfer_memory. */
push_target (&sol_thread_ops);
inferior_ptid = lwp_to_thread (inferior_ptid);
if (PIDGET (inferior_ptid) == -1)
@@ -429,16 +366,17 @@ sol_thread_attach (char *args, int from_tty)
else
add_thread (inferior_ptid);
}
- /* XXX - might want to iterate over all the threads and register them. */
+
+ /* FIXME: Might want to iterate over all the threads and register
+ them. */
}
-/* Take a program previously attached to and detaches it.
- The program resumes execution and will no longer stop
- on signals, etc. We'd better not have left any breakpoints
- in the program or it'll die when it hits one. For this
- to work, it may be necessary for the process to have been
- previously attached. It *might* work if the program was
- started via the normal ptrace (PTRACE_TRACEME). */
+/* Take a program previously attached to and detaches it. The program
+ resumes execution and will no longer stop on signals, etc. We'd
+ better not have left any breakpoints in the program or it'll die
+ when it hits one. For this to work, it may be necessary for the
+ process to have been previously attached. It *might* work if the
+ program was started via the normal ptrace (PTRACE_TRACEME). */
static void
sol_thread_detach (char *args, int from_tty)
@@ -448,10 +386,10 @@ sol_thread_detach (char *args, int from_tty)
procfs_ops.to_detach (args, from_tty);
}
-/* Resume execution of process PID. If STEP is nozero, then
- just single step it. If SIGNAL is nonzero, restart it with that
- signal activated. We may have to convert pid from a thread-id to an LWP id
- for procfs. */
+/* Resume execution of process PTID. If STEP is nozero, then just
+ single step it. If SIGNAL is nonzero, restart it with that signal
+ activated. We may have to convert PTID from a thread ID to an LWP
+ ID for procfs. */
static void
sol_thread_resume (ptid_t ptid, int step, enum target_signal signo)
@@ -469,7 +407,7 @@ sol_thread_resume (ptid_t ptid, int step, enum target_signal signo)
ptid_t save_ptid = ptid;
ptid = thread_to_lwp (ptid, -2);
- if (PIDGET (ptid) == -2) /* Inactive thread */
+ if (PIDGET (ptid) == -2) /* Inactive thread. */
error ("This version of Solaris can't start inactive threads.");
if (info_verbose && PIDGET (ptid) == -1)
warning ("Specified thread %ld seems to have terminated",
@@ -481,8 +419,8 @@ sol_thread_resume (ptid_t ptid, int step, enum target_signal signo)
do_cleanups (old_chain);
}
-/* Wait for any threads to stop. We may have to convert PID from a thread id
- to a LWP id, and vice versa on the way out. */
+/* Wait for any threads to stop. We may have to convert PIID from a
+ thread ID to an LWP ID, and vice versa on the way out. */
static ptid_t
sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
@@ -503,7 +441,7 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
ptid_t save_ptid = ptid;
ptid = thread_to_lwp (ptid, -2);
- if (PIDGET (ptid) == -2) /* Inactive thread */
+ if (PIDGET (ptid) == -2) /* Inactive thread. */
error ("This version of Solaris can't start inactive threads.");
if (info_verbose && PIDGET (ptid) == -1)
warning ("Specified thread %ld seems to have terminated",
@@ -514,12 +452,12 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (ourstatus->kind != TARGET_WAITKIND_EXITED)
{
- /* Map the LWP of interest back to the appropriate thread ID */
+ /* Map the LWP of interest back to the appropriate thread ID. */
rtnval = lwp_to_thread (rtnval);
if (PIDGET (rtnval) == -1)
rtnval = save_ptid;
- /* See if we have a new thread */
+ /* See if we have a new thread. */
if (is_thread (rtnval)
&& !ptid_equal (rtnval, save_ptid)
&& !in_thread_list (rtnval))
@@ -529,9 +467,9 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
}
- /* During process initialization, we may get here without the thread package
- being initialized, since that can only happen after we've found the shared
- libs. */
+ /* During process initialization, we may get here without the thread
+ package being initialized, since that can only happen after we've
+ found the shared libs. */
do_cleanups (old_chain);
@@ -539,7 +477,7 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
static void
-sol_thread_fetch_registers (int regno)
+sol_thread_fetch_registers (int regnum)
{
thread_t thread;
td_thrhandle_t thandle;
@@ -552,54 +490,51 @@ sol_thread_fetch_registers (int regno)
#endif
if (!is_thread (inferior_ptid))
- { /* LWP: pass the request on to procfs.c */
+ {
+ /* It's an LWP; pass the request on to procfs. */
if (target_has_execution)
- procfs_ops.to_fetch_registers (regno);
+ procfs_ops.to_fetch_registers (regnum);
else
- orig_core_ops.to_fetch_registers (regno);
+ orig_core_ops.to_fetch_registers (regnum);
return;
}
- /* Solaris thread: convert inferior_ptid into a td_thrhandle_t */
-
+ /* Solaris thread: convert INFERIOR_PTID into a td_thrhandle_t. */
thread = GET_THREAD (inferior_ptid);
-
if (thread == 0)
- error ("sol_thread_fetch_registers: thread == 0");
+ error ("sol_thread_fetch_registers: thread == 0");
val = p_td_ta_map_id2thr (main_ta, thread, &thandle);
if (val != TD_OK)
error ("sol_thread_fetch_registers: td_ta_map_id2thr: %s",
td_err_string (val));
- /* Get the integer regs */
+ /* Get the general-purpose registers. */
val = p_td_thr_getgregs (&thandle, gregset);
- if (val != TD_OK
- && val != TD_PARTIALREG)
+ if (val != TD_OK && val != TD_PARTIALREG)
error ("sol_thread_fetch_registers: td_thr_getgregs %s",
td_err_string (val));
- /* For the sparc, TD_PARTIALREG means that only i0->i7, l0->l7, pc and sp
- are saved (by a thread context switch). */
+ /* For SPARC, TD_PARTIALREG means that only %i0...%i7, %l0..%l7, %pc
+ and %sp are saved (by a thread context switch). */
- /* And, now the fp regs */
+ /* And, now the floating-point registers. */
val = p_td_thr_getfpregs (&thandle, &fpregset);
- if (val != TD_OK
- && val != TD_NOFPREGS)
+ if (val != TD_OK && val != TD_NOFPREGS)
error ("sol_thread_fetch_registers: td_thr_getfpregs %s",
td_err_string (val));
-/* Note that we must call supply_{g fp}regset *after* calling the td routines
- because the td routines call ps_lget* which affect the values stored in the
- registers array. */
+ /* Note that we must call supply_gregset and supply_fpregset *after*
+ calling the td routines because the td routines call ps_lget*
+ which affect the values stored in the registers array. */
- supply_gregset ((gdb_gregset_t *) &gregset);
+ supply_gregset ((gdb_gregset_t *) &gregset);
supply_fpregset ((gdb_fpregset_t *) &fpregset);
#if 0
-/* thread_db doesn't seem to handle this right */
+ /* FIXME: libthread_db doesn't seem to handle this right. */
val = td_thr_getxregsize (&thandle, &xregsize);
if (val != TD_OK && val != TD_NOXREGS)
error ("sol_thread_fetch_registers: td_thr_getxregsize %s",
@@ -617,12 +552,12 @@ sol_thread_fetch_registers (int regno)
}
static void
-sol_thread_store_registers (int regno)
+sol_thread_store_registers (int regnum)
{
thread_t thread;
td_thrhandle_t thandle;
td_err_e val;
- prgregset_t gregset;
+ prgregset_t gregset;
prfpregset_t fpregset;
#if 0
int xregsize;
@@ -630,13 +565,13 @@ sol_thread_store_registers (int regno)
#endif
if (!is_thread (inferior_ptid))
- { /* LWP: pass the request on to procfs.c */
- procfs_ops.to_store_registers (regno);
+ {
+ /* It's an LWP; pass the request on to procfs.c. */
+ procfs_ops.to_store_registers (regnum);
return;
}
- /* Solaris thread: convert inferior_ptid into a td_thrhandle_t */
-
+ /* Solaris thread: convert INFERIOR_PTID into a td_thrhandle_t. */
thread = GET_THREAD (inferior_ptid);
val = p_td_ta_map_id2thr (main_ta, thread, &thandle);
@@ -644,12 +579,13 @@ sol_thread_store_registers (int regno)
error ("sol_thread_store_registers: td_ta_map_id2thr %s",
td_err_string (val));
- if (regno != -1)
- { /* Not writing all the regs */
+ if (regnum != -1)
+ {
+ /* Not writing all the registers. */
char old_value[MAX_REGISTER_SIZE];
/* Save new register value. */
- regcache_collect (regno, old_value);
+ regcache_raw_collect (current_regcache, regnum, old_value);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
@@ -661,10 +597,10 @@ sol_thread_store_registers (int regno)
td_err_string (val));
/* Restore new register value. */
- supply_register (regno, old_value);
+ regcache_raw_supply (current_regcache, regnum, old_value);
#if 0
-/* thread_db doesn't seem to handle this right */
+ /* FIXME: libthread_db doesn't seem to handle this right. */
val = td_thr_getxregsize (&thandle, &xregsize);
if (val != TD_OK && val != TD_NOXREGS)
error ("sol_thread_store_registers: td_thr_getxregsize %s",
@@ -681,8 +617,8 @@ sol_thread_store_registers (int regno)
#endif
}
- fill_gregset ((gdb_gregset_t *) &gregset, regno);
- fill_fpregset ((gdb_fpregset_t *) &fpregset, regno);
+ fill_gregset ((gdb_gregset_t *) &gregset, regnum);
+ fill_fpregset ((gdb_fpregset_t *) &fpregset, regnum);
val = p_td_thr_setgregs (&thandle, gregset);
if (val != TD_OK)
@@ -694,22 +630,22 @@ sol_thread_store_registers (int regno)
td_err_string (val));
#if 0
-/* thread_db doesn't seem to handle this right */
+ /* FIXME: libthread_db doesn't seem to handle this right. */
val = td_thr_getxregsize (&thandle, &xregsize);
if (val != TD_OK && val != TD_NOXREGS)
error ("sol_thread_store_registers: td_thr_getxregsize %s",
td_err_string (val));
- /* Should probably do something about writing the xregs here, but what are
- they? */
+ /* ??? Should probably do something about writing the xregs here,
+ but what are they? */
#endif
}
/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
+ individual registers, this doesn't need to do anything. On
+ machines which store all the registers in one fell swoop, this
+ makes sure that registers contains all the registers from the
+ program being debugged. */
static void
sol_thread_prepare_to_store (void)
@@ -721,7 +657,7 @@ sol_thread_prepare_to_store (void)
MEMADDR. If DOWRITE is non-zero, transfer them to the target,
otherwise transfer them from the target. TARGET is unused.
- Returns the number of bytes transferred. */
+ Returns the number of bytes transferred. */
static int
sol_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite,
@@ -733,10 +669,15 @@ sol_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite,
old_chain = save_inferior_ptid ();
- if (is_thread (inferior_ptid) || /* A thread */
- !target_thread_alive (inferior_ptid)) /* An lwp, but not alive */
- inferior_ptid = procfs_first_available (); /* Find any live lwp. */
- /* Note: don't need to call switch_to_thread; we're just reading memory. */
+ if (is_thread (inferior_ptid) || !target_thread_alive (inferior_ptid))
+ {
+ /* It's either a thread or an LWP that isn't alive. Any live
+ LWP will do so use the first available.
+
+ NOTE: We don't need to call switch_to_thread; we're just
+ reading memory. */
+ inferior_ptid = procfs_first_available ();
+ }
if (target_has_execution)
retval = procfs_ops.to_xfer_memory (memaddr, myaddr, len,
@@ -750,9 +691,9 @@ sol_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite,
return retval;
}
-/* Perform partial transfers on OBJECT. See target_read_partial
- and target_write_partial for details of each variant. One, and
- only one, of readbuf or writebuf must be non-NULL. */
+/* Perform partial transfers on OBJECT. See target_read_partial and
+ target_write_partial for details of each variant. One, and only
+ one, of readbuf or writebuf must be non-NULL. */
static LONGEST
sol_thread_xfer_partial (struct target_ops *ops, enum target_object object,
@@ -764,10 +705,15 @@ sol_thread_xfer_partial (struct target_ops *ops, enum target_object object,
old_chain = save_inferior_ptid ();
- if (is_thread (inferior_ptid) || /* A thread */
- !target_thread_alive (inferior_ptid)) /* An lwp, but not alive */
- inferior_ptid = procfs_first_available (); /* Find any live lwp. */
- /* Note: don't need to call switch_to_thread; we're just reading memory. */
+ if (is_thread (inferior_ptid) || !target_thread_alive (inferior_ptid))
+ {
+ /* It's either a thread or an LWP that isn't alive. Any live
+ LWP will do so use the first available.
+
+ NOTE: We don't need to call switch_to_thread; we're just
+ reading memory. */
+ inferior_ptid = procfs_first_available ();
+ }
if (target_has_execution)
retval = procfs_ops.to_xfer_partial (ops, object, annex,
@@ -804,13 +750,15 @@ sol_thread_notice_signals (ptid_t ptid)
/* Fork an inferior process, and start debugging it with /proc. */
static void
-sol_thread_create_inferior (char *exec_file, char *allargs, char **env)
+sol_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- procfs_ops.to_create_inferior (exec_file, allargs, env);
+ procfs_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (sol_thread_active && !ptid_equal (inferior_ptid, null_ptid))
{
- main_ph.ptid = inferior_ptid; /* Save for xfer_memory */
+ /* Save for xfer_memory. */
+ main_ph.ptid = inferior_ptid;
push_target (&sol_thread_ops);
@@ -823,15 +771,15 @@ sol_thread_create_inferior (char *exec_file, char *allargs, char **env)
}
}
-/* This routine is called whenever a new symbol table is read in, or when all
- symbol tables are removed. libthread_db can only be initialized when it
- finds the right variables in libthread.so. Since it's a shared library,
- those variables don't show up until the library gets mapped and the symbol
- table is read in. */
+/* This routine is called whenever a new symbol table is read in, or
+ when all symbol tables are removed. libthread_db can only be
+ initialized when it finds the right variables in libthread.so.
+ Since it's a shared library, those variables don't show up until
+ the library gets mapped and the symbol table is read in.
-/* This new_objfile event is now managed by a chained function pointer.
- * It is the callee's responsability to call the next client on the chain.
- */
+ This new_objfile event is managed by a chained function pointer.
+ It is the callee's responsability to call the next client on the
+ chain. */
/* Saved pointer to previous owner of the new_objfile event. */
static void (*target_new_objfile_chain) (struct objfile *);
@@ -847,13 +795,14 @@ sol_thread_new_objfile (struct objfile *objfile)
goto quit;
}
- /* don't do anything if init failed to resolve the libthread_db library */
+ /* Don't do anything if init failed to resolve the libthread_db
+ library. */
if (!procfs_suppress_run)
goto quit;
- /* Now, initialize the thread debugging library. This needs to be done after
- the shared libraries are located because it needs information from the
- user's thread library. */
+ /* Now, initialize libthread_db. This needs to be done after the
+ shared libraries are located because it needs information from
+ the user's thread library. */
val = p_td_init ();
if (val != TD_OK)
@@ -872,8 +821,9 @@ sol_thread_new_objfile (struct objfile *objfile)
}
sol_thread_active = 1;
+
quit:
- /* Call predecessor on chain, if any. */
+ /* Call predecessor on chain, if any. */
if (target_new_objfile_chain)
target_new_objfile_chain (objfile);
}
@@ -887,7 +837,8 @@ sol_thread_mourn_inferior (void)
procfs_ops.to_mourn_inferior ();
}
-/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
+/* Mark our target-struct as eligible for stray "run" and "attach"
+ commands. */
static int
sol_thread_can_run (void)
@@ -911,25 +862,28 @@ sol_thread_can_run (void)
*/
+/* Return true if PTID is still active in the inferior. */
+
static int
sol_thread_alive (ptid_t ptid)
{
- if (is_thread (ptid)) /* non-kernel thread */
+ if (is_thread (ptid))
{
+ /* It's a (user-level) thread. */
td_err_e val;
td_thrhandle_t th;
int pid;
pid = GET_THREAD (ptid);
if ((val = p_td_ta_map_id2thr (main_ta, pid, &th)) != TD_OK)
- return 0; /* thread not found */
+ return 0; /* Thread not found. */
if ((val = p_td_thr_validate (&th)) != TD_OK)
- return 0; /* thread not valid */
- return 1; /* known thread: return true */
+ return 0; /* Thread not valid. */
+ return 1; /* Known thread. */
}
else
- /* kernel thread (LWP): let procfs test it */
{
+ /* It's an LPW; pass the request on to procfs. */
if (target_has_execution)
return procfs_ops.to_thread_alive (ptid);
else
@@ -943,23 +897,22 @@ sol_thread_stop (void)
procfs_ops.to_stop ();
}
-/* These routines implement the lower half of the thread_db interface. Ie: the
- ps_* routines. */
+/* These routines implement the lower half of the thread_db interface,
+ i.e. the ps_* routines. */
-/* Various versions of <proc_service.h> have slightly
- different function prototypes. In particular, we have
+/* Various versions of <proc_service.h> have slightly different
+ function prototypes. In particular, we have
NEWER OLDER
struct ps_prochandle * const struct ps_prochandle *
void* char*
- const void* char*
- int size_t
+ const void* char*
+ int size_t
- Which one you have depends on solaris version and what
- patches you've applied. On the theory that there are
- only two major variants, we have configure check the
- prototype of ps_pdwrite (), and use that info to make
- appropriate typedefs here. */
+ Which one you have depends on the Solaris version and what patches
+ you've applied. On the theory that there are only two major
+ variants, we have configure check the prototype of ps_pdwrite (),
+ and use that info to make appropriate typedefs here. */
#ifdef PROC_SERVICE_IS_OLD
typedef const struct ps_prochandle *gdb_ps_prochandle_t;
@@ -975,13 +928,12 @@ typedef size_t gdb_ps_size_t;
typedef psaddr_t gdb_ps_addr_t;
#endif
+/* The next four routines are called by libthread_db to tell us to
+ stop and stop a particular process or lwp. Since GDB ensures that
+ these are all stopped by the time we call anything in thread_db,
+ these routines need to do nothing. */
-/* The next four routines are called by thread_db to tell us to stop and stop
- a particular process or lwp. Since GDB ensures that these are all stopped
- by the time we call anything in thread_db, these routines need to do
- nothing. */
-
-/* Process stop */
+/* Process stop. */
ps_err_e
ps_pstop (gdb_ps_prochandle_t ph)
@@ -989,7 +941,7 @@ ps_pstop (gdb_ps_prochandle_t ph)
return PS_OK;
}
-/* Process continue */
+/* Process continue. */
ps_err_e
ps_pcontinue (gdb_ps_prochandle_t ph)
@@ -997,7 +949,7 @@ ps_pcontinue (gdb_ps_prochandle_t ph)
return PS_OK;
}
-/* LWP stop */
+/* LWP stop. */
ps_err_e
ps_lstop (gdb_ps_prochandle_t ph, lwpid_t lwpid)
@@ -1005,7 +957,7 @@ ps_lstop (gdb_ps_prochandle_t ph, lwpid_t lwpid)
return PS_OK;
}
-/* LWP continue */
+/* LWP continue. */
ps_err_e
ps_lcontinue (gdb_ps_prochandle_t ph, lwpid_t lwpid)
@@ -1017,17 +969,15 @@ ps_lcontinue (gdb_ps_prochandle_t ph, lwpid_t lwpid)
ps_err_e
ps_pglobal_lookup (gdb_ps_prochandle_t ph, const char *ld_object_name,
- const char *ld_symbol_name, gdb_ps_addr_t * ld_symbol_addr)
+ const char *ld_symbol_name, gdb_ps_addr_t *ld_symbol_addr)
{
struct minimal_symbol *ms;
ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
-
if (!ms)
return PS_NOSYM;
*ld_symbol_addr = SYMBOL_VALUE_ADDRESS (ms);
-
return PS_OK;
}
@@ -1041,10 +991,15 @@ rw_common (int dowrite, const struct ps_prochandle *ph, gdb_ps_addr_t addr,
old_chain = save_inferior_ptid ();
- if (is_thread (inferior_ptid) || /* A thread */
- !target_thread_alive (inferior_ptid)) /* An lwp, but not alive */
- inferior_ptid = procfs_first_available (); /* Find any live lwp. */
- /* Note: don't need to call switch_to_thread; we're just reading memory. */
+ if (is_thread (inferior_ptid) || !target_thread_alive (inferior_ptid))
+ {
+ /* It's either a thread or an LWP that isn't alive. Any live
+ LWP will do so use the first available.
+
+ NOTE: We don't need to call switch_to_thread; we're just
+ reading memory. */
+ inferior_ptid = procfs_first_available ();
+ }
#if defined (__sparcv9)
/* For Sparc64 cross Sparc32, make sure the address has not been
@@ -1135,11 +1090,10 @@ ps_ptwrite (gdb_ps_prochandle_t ph, gdb_ps_addr_t addr,
return rw_common (1, ph, addr, (char *) buf, size);
}
-/* Get integer regs for LWP */
+/* Get general-purpose registers for LWP. */
ps_err_e
-ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
- prgregset_t gregset)
+ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
{
struct cleanup *old_chain;
@@ -1158,7 +1112,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
return PS_OK;
}
-/* Set integer regs for LWP */
+/* Set general-purpose registers for LWP. */
ps_err_e
ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
@@ -1184,7 +1138,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
/* Log a message (sends to gdb_stderr). */
void
-ps_plog (const char *fmt,...)
+ps_plog (const char *fmt, ...)
{
va_list args;
@@ -1267,11 +1221,11 @@ ps_lsetxregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, caddr_t xregset)
return PS_OK;
}
-/* Get floating-point regs for LWP */
+/* Get floating-point registers for LWP. */
ps_err_e
ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
- prfpregset_t * fpregset)
+ prfpregset_t *fpregset)
{
struct cleanup *old_chain;
@@ -1314,10 +1268,9 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
}
#ifdef PR_MODEL_LP64
-/* Identify process as 32-bit or 64-bit.
- At the moment I'm using bfd to do this.
- There might be a more solaris-specific (eg. procfs) method,
- but this ought to work. */
+/* Identify process as 32-bit or 64-bit. At the moment we're using
+ BFD to do this. There might be a more Solaris-specific
+ (e.g. procfs) method, but this ought to work. */
ps_err_e
ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
@@ -1341,12 +1294,12 @@ ps_err_e
ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
struct ssd *pldt)
{
- /* NOTE: only used on Solaris, therefore OK to refer to procfs.c */
+ /* NOTE: only used on Solaris, therefore OK to refer to procfs.c. */
extern struct ssd *procfs_find_LDT_entry (ptid_t);
struct ssd *ret;
- /* FIXME: can't I get the process ID from the prochandle or something?
- */
+ /* FIXME: can't I get the process ID from the prochandle or
+ something? */
if (PIDGET (inferior_ptid) <= 0 || lwpid <= 0)
return PS_BADLID;
@@ -1357,19 +1310,21 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
memcpy (pldt, ret, sizeof (struct ssd));
return PS_OK;
}
- else /* LDT not found. */
+ else
+ /* LDT not found. */
return PS_ERR;
}
#endif /* TM_I386SOL2_H */
-/* Convert a pid to printable form. */
+
+/* Convert PTID to printable form. */
char *
solaris_pid_to_str (ptid_t ptid)
{
static char buf[100];
- /* in case init failed to resolve the libthread_db library */
+ /* In case init failed to resolve the libthread_db library. */
if (!procfs_suppress_run)
return procfs_pid_to_str (ptid);
@@ -1382,7 +1337,8 @@ solaris_pid_to_str (ptid_t ptid)
if (PIDGET (lwp) == -1)
sprintf (buf, "Thread %ld (defunct)", GET_THREAD (ptid));
else if (PIDGET (lwp) != -2)
- sprintf (buf, "Thread %ld (LWP %ld)", GET_THREAD (ptid), GET_LWP (lwp));
+ sprintf (buf, "Thread %ld (LWP %ld)",
+ GET_THREAD (ptid), GET_LWP (lwp));
else
sprintf (buf, "Thread %ld ", GET_THREAD (ptid));
}
@@ -1395,9 +1351,8 @@ solaris_pid_to_str (ptid_t ptid)
}
-/* Worker bee for find_new_threads
- Callback function that gets called once per USER thread (i.e., not
- kernel) thread. */
+/* Worker bee for find_new_threads. Callback function that gets
+ called once per user-level thread (i.e. not for LWP's). */
static int
sol_find_new_threads_callback (const td_thrhandle_t *th, void *ignored)
@@ -1406,10 +1361,10 @@ sol_find_new_threads_callback (const td_thrhandle_t *th, void *ignored)
td_thrinfo_t ti;
ptid_t ptid;
- if ((retval = p_td_thr_get_info (th, &ti)) != TD_OK)
- {
- return -1;
- }
+ retval = p_td_thr_get_info (th, &ti);
+ if (retval != TD_OK)
+ return -1;
+
ptid = BUILD_THREAD (ti.ti_tid, PIDGET (inferior_ptid));
if (!in_thread_list (ptid))
add_thread (ptid);
@@ -1420,7 +1375,8 @@ sol_find_new_threads_callback (const td_thrhandle_t *th, void *ignored)
static void
sol_find_new_threads (void)
{
- /* don't do anything if init failed to resolve the libthread_db library */
+ /* Don't do anything if init failed to resolve the libthread_db
+ library. */
if (!procfs_suppress_run)
return;
@@ -1429,7 +1385,11 @@ sol_find_new_threads (void)
printf_filtered ("No process.\n");
return;
}
- procfs_ops.to_find_new_threads (); /* first find new kernel threads */
+
+ /* First Find any new LWP's. */
+ procfs_ops.to_find_new_threads ();
+
+ /* Then find any new user-level threads. */
p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *) 0,
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
@@ -1460,9 +1420,10 @@ sol_core_files_info (struct target_ops *t)
orig_core_ops.to_files_info (t);
}
-/* Worker bee for info sol-thread command. This is a callback function that
- gets called once for each Solaris thread (ie. not kernel thread) in the
- inferior. Print anything interesting that we can think of. */
+/* Worker bee for the "info sol-thread" command. This is a callback
+ function that gets called once for each Solaris user-level thread
+ (i.e. not for LWPs) in the inferior. Print anything interesting
+ that we can think of. */
static int
info_cb (const td_thrhandle_t *th, void *s)
@@ -1470,7 +1431,8 @@ info_cb (const td_thrhandle_t *th, void *s)
td_err_e ret;
td_thrinfo_t ti;
- if ((ret = p_td_thr_get_info (th, &ti)) == TD_OK)
+ ret = p_td_thr_get_info (th, &ti);
+ if (ret == TD_OK)
{
printf_filtered ("%s thread #%d, lwp %d, ",
ti.ti_type == TD_THR_SYSTEM ? "system" : "user ",
@@ -1500,29 +1462,31 @@ info_cb (const td_thrhandle_t *th, void *s)
printf_filtered ("(stopped asleep)");
break;
}
- /* Print thr_create start function: */
+ /* Print thr_create start function. */
if (ti.ti_startfunc != 0)
{
struct minimal_symbol *msym;
msym = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
if (msym)
- printf_filtered (" startfunc: %s\n", DEPRECATED_SYMBOL_NAME (msym));
+ printf_filtered (" startfunc: %s\n",
+ DEPRECATED_SYMBOL_NAME (msym));
else
printf_filtered (" startfunc: 0x%s\n", paddr (ti.ti_startfunc));
}
- /* If thread is asleep, print function that went to sleep: */
+ /* If thread is asleep, print function that went to sleep. */
if (ti.ti_state == TD_THR_SLEEP)
{
struct minimal_symbol *msym;
msym = lookup_minimal_symbol_by_pc (ti.ti_pc);
if (msym)
- printf_filtered (" - Sleep func: %s\n", DEPRECATED_SYMBOL_NAME (msym));
+ printf_filtered (" - Sleep func: %s\n",
+ DEPRECATED_SYMBOL_NAME (msym));
else
printf_filtered (" - Sleep func: 0x%s\n", paddr (ti.ti_startfunc));
}
- /* Wrap up line, if necessary */
+ /* Wrap up line, if necessary. */
if (ti.ti_state != TD_THR_SLEEP && ti.ti_startfunc == 0)
printf_filtered ("\n"); /* don't you hate counting newlines? */
}
@@ -1532,7 +1496,8 @@ info_cb (const td_thrhandle_t *th, void *s)
return 0;
}
-/* List some state about each Solaris user thread in the inferior. */
+/* List some state about each Solaris user-level thread in the
+ inferior. */
static void
info_solthreads (char *args, int from_tty)
@@ -1543,10 +1508,8 @@ info_solthreads (char *args, int from_tty)
}
static int
-sol_find_memory_regions (int (*func) (CORE_ADDR,
- unsigned long,
- int, int, int,
- void *),
+sol_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
+ int, int, int, void *),
void *data)
{
return procfs_ops.to_find_memory_regions (func, data);
@@ -1564,7 +1527,6 @@ ignore (CORE_ADDR addr, char *contents)
return 0;
}
-
static void
init_sol_thread_ops (void)
{
@@ -1611,7 +1573,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_magic = OPS_MAGIC;
}
-
static void
init_sol_core_ops (void)
{
@@ -1636,18 +1597,20 @@ init_sol_core_ops (void)
sol_core_ops.to_has_thread_control = tc_none;
sol_core_ops.to_thread_alive = sol_thread_alive;
sol_core_ops.to_pid_to_str = solaris_pid_to_str;
- /* On Solaris/x86, when debugging a threaded core file from process <n>,
- the following causes "info threads" to produce "procfs: couldn't find pid
- <n> in procinfo list" where <n> is the pid of the process that produced
- the core file. Disable it for now. */
- /* sol_core_ops.to_find_new_threads = sol_find_new_threads; */
+ /* On Solaris/x86, when debugging a threaded core file from process
+ <n>, the following causes "info threads" to produce "procfs:
+ couldn't find pid <n> in procinfo list" where <n> is the pid of
+ the process that produced the core file. Disable it for now. */
+#if 0
+ sol_core_ops.to_find_new_threads = sol_find_new_threads;
+#endif
sol_core_ops.to_magic = OPS_MAGIC;
}
-/* we suppress the call to add_target of core_ops in corelow because
- if there are two targets in the stratum core_stratum, find_core_target
- won't know which one to return. see corelow.c for an additonal
- comment on coreops_suppress_target. */
+/* We suppress the call to add_target of core_ops in corelow because
+ if there are two targets in the stratum core_stratum,
+ find_core_target won't know which one to return. See corelow.c for
+ an additonal comment on coreops_suppress_target. */
int coreops_suppress_target = 1;
void
@@ -1701,19 +1664,19 @@ _initialize_sol_thread (void)
memcpy (&core_ops, &sol_core_ops, sizeof (struct target_ops));
add_target (&core_ops);
- /* Hook into new_objfile notification. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = sol_thread_new_objfile;
+ /* Hook into new_objfile notification. */
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = sol_thread_new_objfile;
return;
-die:
-
- fprintf_unfiltered (gdb_stderr, "[GDB will not be able to debug user-mode threads: %s]\n", dlerror ());
+ die:
+ fprintf_unfiltered (gdb_stderr, "\
+[GDB will not be able to debug user-mode threads: %s]\n", dlerror ());
if (dlhandle)
dlclose (dlhandle);
- /* allow the user to debug non-threaded core files */
+ /* Allow the user to debug non-threaded core files. */
add_target (&core_ops);
return;
diff --git a/gdb/solib-aix5.c b/gdb/solib-aix5.c
index 1a8c9dfeea9..54b1199b92a 100644
--- a/gdb/solib-aix5.c
+++ b/gdb/solib-aix5.c
@@ -193,7 +193,7 @@ build_so_list_from_mapfile (int pid, long match_mask, long match_val)
/* Open the map file */
- xasprintf (&map_pathname, "/proc/%d/map", pid);
+ map_pathname = xstrprintf ("/proc/%d/map", pid);
map_fd = open (map_pathname, O_RDONLY);
xfree (map_pathname);
if (map_fd < 0)
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 5995b80fd8a..cd3fc8d4dcb 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -165,7 +165,7 @@ fetch_loadmap (CORE_ADDR ldmaddr)
sizeof (ext_ldmbuf->segs[seg].p_memsz));
}
- free (ext_ldmbuf);
+ xfree (ext_ldmbuf);
return int_ldmbuf;
}
@@ -375,7 +375,7 @@ lm_base (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"lm_base: _GLOBAL_OFFSET_TABLE_ + 8 = %s\n",
- local_hex_string_custom (addr, "08l"));
+ hex_string_custom (addr, 8));
if (target_read_memory (addr, buf, sizeof buf) != 0)
return 0;
@@ -384,7 +384,7 @@ lm_base (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"lm_base: lm_base_cache = %s\n",
- local_hex_string_custom (lm_base_cache, "08l"));
+ hex_string_custom (lm_base_cache, 8));
return lm_base_cache;
}
@@ -431,7 +431,7 @@ frv_current_sos (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"current_sos: reading link_map entry at %s\n",
- local_hex_string_custom (lm_addr, "08l"));
+ hex_string_custom (lm_addr, 8));
if (target_read_memory (lm_addr, (char *) &lm_buf, sizeof (lm_buf)) != 0)
{
@@ -670,14 +670,13 @@ enable_break2 (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"enable_break: interp_loadmap_addr = %s\n",
- local_hex_string_custom (interp_loadmap_addr,
- "08l"));
+ hex_string_custom (interp_loadmap_addr, 8));
ldm = fetch_loadmap (interp_loadmap_addr);
if (ldm == NULL)
{
warning ("Unable to load dynamic linker loadmap at address %s\n",
- local_hex_string_custom (interp_loadmap_addr, "08l"));
+ hex_string_custom (interp_loadmap_addr, 8));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
return 0;
@@ -718,20 +717,20 @@ enable_break2 (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"enable_break: _dl_debug_addr (prior to relocation) = %s\n",
- local_hex_string_custom (addr, "08l"));
+ hex_string_custom (addr, 8));
addr += displacement_from_map (ldm, addr);
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"enable_break: _dl_debug_addr (after relocation) = %s\n",
- local_hex_string_custom (addr, "08l"));
+ hex_string_custom (addr, 8));
/* Fetch the address of the r_debug struct. */
if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
{
warning ("Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic linker",
- local_hex_string_custom (addr, "08l"));
+ hex_string_custom (addr, 8));
}
addr = extract_unsigned_integer (addr_buf, sizeof addr_buf);
@@ -740,7 +739,7 @@ enable_break2 (void)
if (target_read_memory (addr + 8, addr_buf, sizeof addr_buf) != 0)
{
warning ("Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker",
- local_hex_string_custom (addr + 8, "08l"));
+ hex_string_custom (addr + 8, 8));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
return 0;
@@ -751,7 +750,7 @@ enable_break2 (void)
if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
{
warning ("Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from dynamic linker",
- local_hex_string_custom (addr, "08l"));
+ hex_string_custom (addr, 8));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
return 0;
@@ -799,8 +798,8 @@ enable_break (void)
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
"enable_break: solib event breakpoint placed at entry point: %s\n",
- local_hex_string_custom
- (symfile_objfile->ei.entry_point, "08l"));
+ hex_string_custom
+ (symfile_objfile->ei.entry_point, 8));
}
else
{
@@ -1221,10 +1220,11 @@ _initialize_frv_solib (void)
current_target_so_ops = &frv_so_ops;
/* Debug this file's internals. */
- add_show_from_set (add_set_cmd ("solib-frv", class_maintenance, var_zinteger,
- &solib_frv_debug,
+ deprecated_add_show_from_set
+ (add_set_cmd ("solib-frv", class_maintenance, var_zinteger,
+ &solib_frv_debug,
"Set internal debugging of shared library code for FR-V.\n"
"When non-zero, FR-V solib specific internal debugging is enabled.",
- &setdebuglist),
- &showdebuglist);
+ &setdebuglist),
+ &showdebuglist);
}
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
index aaf8338bb25..5795ecaf0c1 100644
--- a/gdb/solib-irix.c
+++ b/gdb/solib-irix.c
@@ -324,15 +324,11 @@ disable_break (void)
status = 0;
}
- /* For the SVR4 version, we always know the breakpoint address. For the
- SunOS version we don't know it until the above code is executed.
- Grumble if we are stopped anywhere besides the breakpoint address. */
-
- if (stop_pc != breakpoint_addr)
- {
- warning
- ("stopped at unknown breakpoint while handling shared libraries");
- }
+ /* Note that it is possible that we have stopped at a location that
+ is different from the location where we inserted our breakpoint.
+ On mips-irix, we can actually land in __dbx_init(), so we should
+ not check the PC against our breakpoint address here. See procfs.c
+ for more details. */
return (status);
}
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index b5dca60750d..a4c1406a255 100644
--- a/gdb/solib-osf.c
+++ b/gdb/solib-osf.c
@@ -554,7 +554,6 @@ osf_current_sos (void)
tail->next = NULL;
}
- done:
close_map (&ctxt);
return head;
}
diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c
index a88e7b735e8..872c8acd1e4 100644
--- a/gdb/solib-sunos.c
+++ b/gdb/solib-sunos.c
@@ -643,112 +643,6 @@ sunos_special_symbol_handling (void)
}
}
-/* Relocate the main executable. This function should be called upon
- stopping the inferior process at the entry point to the program.
- The entry point from BFD is compared to the PC and if they are
- different, the main executable is relocated by the proper amount.
-
- As written it will only attempt to relocate executables which
- lack interpreter sections. It seems likely that only dynamic
- linker executables will get relocated, though it should work
- properly for a position-independent static executable as well. */
-
-static void
-sunos_relocate_main_executable (void)
-{
- asection *interp_sect;
- CORE_ADDR pc = read_pc ();
-
- /* Decide if the objfile needs to be relocated. As indicated above,
- we will only be here when execution is stopped at the beginning
- of the program. Relocation is necessary if the address at which
- we are presently stopped differs from the start address stored in
- the executable AND there's no interpreter section. The condition
- regarding the interpreter section is very important because if
- there *is* an interpreter section, execution will begin there
- instead. When there is an interpreter section, the start address
- is (presumably) used by the interpreter at some point to start
- execution of the program.
-
- If there is an interpreter, it is normal for it to be set to an
- arbitrary address at the outset. The job of finding it is
- handled in enable_break().
-
- So, to summarize, relocations are necessary when there is no
- interpreter section and the start address obtained from the
- executable is different from the address at which GDB is
- currently stopped.
-
- [ The astute reader will note that we also test to make sure that
- the executable in question has the DYNAMIC flag set. It is my
- opinion that this test is unnecessary (undesirable even). It
- was added to avoid inadvertent relocation of an executable
- whose e_type member in the ELF header is not ET_DYN. There may
- be a time in the future when it is desirable to do relocations
- on other types of files as well in which case this condition
- should either be removed or modified to accomodate the new file
- type. (E.g, an ET_EXEC executable which has been built to be
- position-independent could safely be relocated by the OS if
- desired. It is true that this violates the ABI, but the ABI
- has been known to be bent from time to time.) - Kevin, Nov 2000. ]
- */
-
- interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
- if (interp_sect == NULL
- && (bfd_get_file_flags (exec_bfd) & DYNAMIC) != 0
- && bfd_get_start_address (exec_bfd) != pc)
- {
- struct cleanup *old_chain;
- struct section_offsets *new_offsets;
- int i, changed;
- CORE_ADDR displacement;
-
- /* It is necessary to relocate the objfile. The amount to
- relocate by is simply the address at which we are stopped
- minus the starting address from the executable.
-
- We relocate all of the sections by the same amount. This
- behavior is mandated by recent editions of the System V ABI.
- According to the System V Application Binary Interface,
- Edition 4.1, page 5-5:
-
- ... Though the system chooses virtual addresses for
- individual processes, it maintains the segments' relative
- positions. Because position-independent code uses relative
- addressesing between segments, the difference between
- virtual addresses in memory must match the difference
- between virtual addresses in the file. The difference
- between the virtual address of any segment in memory and
- the corresponding virtual address in the file is thus a
- single constant value for any one executable or shared
- object in a given process. This difference is the base
- address. One use of the base address is to relocate the
- memory image of the program during dynamic linking.
-
- The same language also appears in Edition 4.0 of the System V
- ABI and is left unspecified in some of the earlier editions. */
-
- displacement = pc - bfd_get_start_address (exec_bfd);
- changed = 0;
-
- new_offsets = xcalloc (symfile_objfile->num_sections,
- sizeof (struct section_offsets));
- old_chain = make_cleanup (xfree, new_offsets);
-
- for (i = 0; i < symfile_objfile->num_sections; i++)
- {
- if (displacement != ANOFFSET (symfile_objfile->section_offsets, i))
- changed = 1;
- new_offsets->offsets[i] = displacement;
- }
-
- if (changed)
- objfile_relocate (symfile_objfile, new_offsets);
-
- do_cleanups (old_chain);
- }
-}
-
/*
GLOBAL FUNCTION
@@ -804,9 +698,6 @@ sunos_relocate_main_executable (void)
static void
sunos_solib_create_inferior_hook (void)
{
- /* Relocate the main executable if necessary. */
- sunos_relocate_main_executable ();
-
if ((debug_base = locate_base ()) == 0)
{
/* Can't find the symbol or the executable is statically linked. */
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index abf2948a1f7..7976e6707f2 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -272,133 +272,6 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
return symaddr;
}
-#ifdef HANDLE_SVR4_EXEC_EMULATORS
-
-/*
- Solaris BCP (the part of Solaris which allows it to run SunOS4
- a.out files) throws in another wrinkle. Solaris does not fill
- in the usual a.out link map structures when running BCP programs,
- the only way to get at them is via groping around in the dynamic
- linker.
- The dynamic linker and it's structures are located in the shared
- C library, which gets run as the executable's "interpreter" by
- the kernel.
-
- Note that we can assume nothing about the process state at the time
- we need to find these structures. We may be stopped on the first
- instruction of the interpreter (C shared library), the first
- instruction of the executable itself, or somewhere else entirely
- (if we attached to the process for example).
- */
-
-static char *debug_base_symbols[] =
-{
- "r_debug", /* Solaris 2.3 */
- "_r_debug", /* Solaris 2.1, 2.2 */
- NULL
-};
-
-static int look_for_base (int, CORE_ADDR);
-
-/*
-
- LOCAL FUNCTION
-
- look_for_base -- examine file for each mapped address segment
-
- SYNOPSYS
-
- static int look_for_base (int fd, CORE_ADDR baseaddr)
-
- DESCRIPTION
-
- This function is passed to proc_iterate_over_mappings, which
- causes it to get called once for each mapped address space, with
- an open file descriptor for the file mapped to that space, and the
- base address of that mapped space.
-
- Our job is to find the debug base symbol in the file that this
- fd is open on, if it exists, and if so, initialize the dynamic
- linker structure base address debug_base.
-
- Note that this is a computationally expensive proposition, since
- we basically have to open a bfd on every call, so we specifically
- avoid opening the exec file.
- */
-
-static int
-look_for_base (int fd, CORE_ADDR baseaddr)
-{
- bfd *interp_bfd;
- CORE_ADDR address = 0;
- char **symbolp;
-
- /* If the fd is -1, then there is no file that corresponds to this
- mapped memory segment, so skip it. Also, if the fd corresponds
- to the exec file, skip it as well. */
-
- if (fd == -1
- || (exec_bfd != NULL
- && fdmatch (fileno ((FILE *) (exec_bfd->iostream)), fd)))
- {
- return (0);
- }
-
- /* Try to open whatever random file this fd corresponds to. Note that
- we have no way currently to find the filename. Don't gripe about
- any problems we might have, just fail. */
-
- if ((interp_bfd = bfd_fdopenr ("unnamed", gnutarget, fd)) == NULL)
- {
- return (0);
- }
- if (!bfd_check_format (interp_bfd, bfd_object))
- {
- /* FIXME-leak: on failure, might not free all memory associated with
- interp_bfd. */
- bfd_close (interp_bfd);
- return (0);
- }
-
- /* Now try to find our debug base symbol in this file, which we at
- least know to be a valid ELF executable or shared library. */
-
- for (symbolp = debug_base_symbols; *symbolp != NULL; symbolp++)
- {
- address = bfd_lookup_symbol (interp_bfd, *symbolp, 0);
- if (address != 0)
- {
- break;
- }
- }
- if (address == 0)
- {
- /* FIXME-leak: on failure, might not free all memory associated with
- interp_bfd. */
- bfd_close (interp_bfd);
- return (0);
- }
-
- /* Eureka! We found the symbol. But now we may need to relocate it
- by the base address. If the symbol's value is less than the base
- address of the shared library, then it hasn't yet been relocated
- by the dynamic linker, and we have to do it ourself. FIXME: Note
- that we make the assumption that the first segment that corresponds
- to the shared library has the base address to which the library
- was relocated. */
-
- if (address < baseaddr)
- {
- address += baseaddr;
- }
- debug_base = address;
- /* FIXME-leak: on failure, might not free all memory associated with
- interp_bfd. */
- bfd_close (interp_bfd);
- return (1);
-}
-#endif /* HANDLE_SVR4_EXEC_EMULATORS */
-
/*
LOCAL FUNCTION
@@ -579,11 +452,6 @@ locate_base (void)
if (exec_bfd != NULL
&& bfd_get_flavour (exec_bfd) == bfd_target_elf_flavour)
debug_base = elf_locate_base ();
-#ifdef HANDLE_SVR4_EXEC_EMULATORS
- /* Try it the hard way for emulated executables. */
- else if (!ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
- proc_iterate_over_mappings (look_for_base);
-#endif
}
return (debug_base);
}
diff --git a/gdb/solib.c b/gdb/solib.c
index 137fc709fd4..35480bfbbb9 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -42,6 +42,7 @@
#include "filenames.h" /* for DOSish file names */
#include "exec.h"
#include "solist.h"
+#include "observer.h"
#include "readline/readline.h"
/* external data declarations */
@@ -156,15 +157,15 @@ solib_open (char *in_pathname, char **found_pathname)
/* If not found, search the solib_search_path (if any). */
if (found_file < 0 && solib_search_path != NULL)
- found_file = openp (solib_search_path,
- 1, in_pathname, O_RDONLY, 0, &temp_pathname);
+ found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST,
+ in_pathname, O_RDONLY, 0, &temp_pathname);
/* If not found, next search the solib_search_path (if any) for the basename
only (ignoring the path). This is to allow reading solibs from a path
that differs from the opened path. */
if (found_file < 0 && solib_search_path != NULL)
- found_file = openp (solib_search_path,
- 1, lbasename (in_pathname), O_RDONLY, 0,
+ found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST,
+ lbasename (in_pathname), O_RDONLY, 0,
&temp_pathname);
/* If not found, try to use target supplied solib search method */
@@ -175,13 +176,15 @@ solib_open (char *in_pathname, char **found_pathname)
/* If not found, next search the inferior's $PATH environment variable. */
if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "PATH"),
- 1, in_pathname, O_RDONLY, 0, &temp_pathname);
+ OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY, 0,
+ &temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"),
- 1, in_pathname, O_RDONLY, 0, &temp_pathname);
+ OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY, 0,
+ &temp_pathname);
/* Done. If not found, tough luck. Return found_file and
(optionally) found_pathname. */
@@ -476,6 +479,10 @@ update_solib_list (int from_tty, struct target_ops *target)
/* If it's not on the inferior's list, remove it from GDB's tables. */
else
{
+ /* Notify any observer that the SO has been unloaded
+ before we remove it from the gdb tables. */
+ observer_notify_solib_unloaded (gdb);
+
*gdb_link = gdb->next;
/* Unless the user loaded it explicitly, free SO's objfile. */
@@ -638,18 +645,11 @@ info_sharedlibrary_command (char *ignore, int from_tty)
struct so_list *so = NULL; /* link map state variable */
int header_done = 0;
int addr_width;
- char *addr_fmt;
if (TARGET_PTR_BIT == 32)
- {
- addr_width = 8 + 4;
- addr_fmt = "08l";
- }
+ addr_width = 8 + 4;
else if (TARGET_PTR_BIT == 64)
- {
- addr_width = 16 + 4;
- addr_fmt = "016l";
- }
+ addr_width = 16 + 4;
else
{
internal_error (__FILE__, __LINE__,
@@ -673,15 +673,15 @@ info_sharedlibrary_command (char *ignore, int from_tty)
printf_unfiltered ("%-*s", addr_width,
so->textsection != NULL
- ? local_hex_string_custom (
+ ? hex_string_custom (
(LONGEST) so->textsection->addr,
- addr_fmt)
+ addr_width - 4)
: "");
printf_unfiltered ("%-*s", addr_width,
so->textsection != NULL
- ? local_hex_string_custom (
+ ? hex_string_custom (
(LONGEST) so->textsection->endaddr,
- addr_fmt)
+ addr_width - 4)
: "");
printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");
printf_unfiltered ("%s\n", so->so_name);
@@ -885,7 +885,7 @@ _initialize_solib (void)
add_com ("nosharedlibrary", class_files, no_shared_libraries,
"Unload all shared object library symbols.");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-add", class_support, var_boolean,
(char *) &auto_solib_add,
"Set autoloading of shared library symbols.\n\
@@ -901,7 +901,7 @@ inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
"Set prefix for loading absolute shared library symbol files.\n\
For other (relative) files, you can add values using `set solib-search-path'.",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_cfunc (c, reload_shared_libraries);
set_cmd_completer (c, filename_completer);
@@ -914,7 +914,7 @@ For other (relative) files, you can add values using `set solib-search-path'.",
"Set the search path for loading non-absolute shared library symbol files.\n\
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_cfunc (c, reload_shared_libraries);
set_cmd_completer (c, filename_completer);
}
diff --git a/gdb/somread.c b/gdb/somread.c
index 4ffa4c1c9e4..560eb887c84 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -219,6 +219,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
if ((symname[0] == 'L' && symname[1] == '$')
|| (symname[0] == '$' && symname[strlen (symname) - 1] == '$')
|| (symname[0] == 'D' && symname[1] == '$')
+ || (strncmp (symname, "L0\001", 3) == 0)
|| (strncmp (symname, "$PIC", 4) == 0))
continue;
break;
@@ -403,7 +404,7 @@ som_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_stab_info != NULL)
{
- xmfree (objfile->md, objfile->sym_stab_info);
+ xfree (objfile->sym_stab_info);
}
hpread_symfile_finish (objfile);
}
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 7ecc97e64d1..e70d6bdfef3 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -43,6 +43,7 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "exec.h"
+#include "hppa-tdep.h"
#include <fcntl.h>
@@ -215,7 +216,8 @@ som_solib_sizeof_symbol_table (char *filename)
/* We believe that filename was handed to us by the dynamic linker, and
is therefore always an absolute path.
*/
- desc = openp (getenv ("PATH"), 1, filename, O_RDONLY | O_BINARY, 0, &absolute_name);
+ desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename,
+ O_RDONLY | O_BINARY, 0, &absolute_name);
if (desc < 0)
{
perror_with_name (filename);
@@ -278,7 +280,7 @@ static void
som_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
CORE_ADDR text_addr)
{
- obj_private_data_t *obj_private;
+ struct hppa_objfile_private *obj_private;
struct obj_section *s;
so->objfile = symbol_file_add (name, from_tty, NULL, 0, OBJF_SHARED);
@@ -307,17 +309,18 @@ som_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
*/
so->objfile->flags |= OBJF_SHARED;
- if (so->objfile->obj_private == NULL)
+ obj_private = (struct hppa_objfile_private *)
+ objfile_data (so->objfile, hppa_objfile_priv_data);
+ if (obj_private == NULL)
{
- obj_private = (obj_private_data_t *)
+ obj_private = (struct hppa_objfile_private *)
obstack_alloc (&so->objfile->objfile_obstack,
- sizeof (obj_private_data_t));
+ sizeof (struct hppa_objfile_private));
+ set_objfile_data (so->objfile, hppa_objfile_priv_data, obj_private);
obj_private->unwind_info = NULL;
obj_private->so_info = NULL;
- so->objfile->obj_private = obj_private;
}
- obj_private = (obj_private_data_t *) so->objfile->obj_private;
obj_private->so_info = so;
if (!bfd_check_format (so->abfd, bfd_object))
@@ -1062,7 +1065,7 @@ som_solib_remove_inferior_hook (int pid)
CORE_ADDR addr;
struct minimal_symbol *msymbol;
int status;
- char dld_flags_buffer[TARGET_INT_BIT / TARGET_CHAR_BIT];
+ char dld_flags_buffer[4];
unsigned int dld_flags_value;
struct cleanup *old_cleanups = save_inferior_ptid ();
@@ -1079,16 +1082,13 @@ som_solib_remove_inferior_hook (int pid)
msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
addr = SYMBOL_VALUE_ADDRESS (msymbol);
- status = target_read_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
+ status = target_read_memory (addr, dld_flags_buffer, 4);
- dld_flags_value = extract_unsigned_integer (dld_flags_buffer,
- sizeof (dld_flags_value));
+ dld_flags_value = extract_unsigned_integer (dld_flags_buffer, 4);
dld_flags_value &= ~DLD_FLAGS_HOOKVALID;
- store_unsigned_integer (dld_flags_buffer,
- sizeof (dld_flags_value),
- dld_flags_value);
- status = target_write_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
+ store_unsigned_integer (dld_flags_buffer, 4, dld_flags_value);
+ status = target_write_memory (addr, dld_flags_buffer, 4);
do_cleanups (old_cleanups);
}
@@ -1135,7 +1135,7 @@ som_solib_have_load_event (int pid)
{
CORE_ADDR event_kind;
- event_kind = read_register (ARG0_REGNUM);
+ event_kind = read_register (HPPA_ARG0_REGNUM);
return (event_kind == SHL_LOAD);
}
@@ -1144,7 +1144,7 @@ som_solib_have_unload_event (int pid)
{
CORE_ADDR event_kind;
- event_kind = read_register (ARG0_REGNUM);
+ event_kind = read_register (HPPA_ARG0_REGNUM);
return (event_kind == SHL_UNLOAD);
}
@@ -1158,7 +1158,7 @@ som_solib_library_pathname (int pid)
static char dll_pathname[1024];
/* Read the descriptor of this newly-loaded library. */
- dll_handle_address = read_register (ARG1_REGNUM);
+ dll_handle_address = read_register (HPPA_ARG1_REGNUM);
read_memory (dll_handle_address, (char *) &dll_descriptor, sizeof (dll_descriptor));
/* We can find a pointer to the dll's pathname within the descriptor. */
@@ -1463,17 +1463,17 @@ som_sharedlibrary_info_command (char *ignore, int from_tty)
if (so_list->objfile == NULL)
printf_unfiltered (" (symbols not loaded)");
printf_unfiltered ("\n");
- printf_unfiltered (" %-12s", local_hex_string_custom (flags, "08l"));
+ printf_unfiltered (" %-12s", hex_string_custom (flags, 8));
printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.text_addr, "08l"));
+ hex_string_custom (so_list->som_solib.text_addr, 8));
printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.text_end, "08l"));
+ hex_string_custom (so_list->som_solib.text_end, 8));
printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.data_start, "08l"));
+ hex_string_custom (so_list->som_solib.data_start, 8));
printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.data_end, "08l"));
+ hex_string_custom (so_list->som_solib.data_end, 8));
printf_unfiltered ("%-12s\n",
- local_hex_string_custom (so_list->som_solib.got_value, "08l"));
+ hex_string_custom (so_list->som_solib.got_value, 8));
so_list = so_list->next;
}
}
@@ -1584,7 +1584,7 @@ _initialize_som_solib (void)
add_info ("sharedlibrary", som_sharedlibrary_info_command,
"Status of loaded shared object libraries.");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-add", class_support, var_boolean,
(char *) &auto_solib_add,
"Set autoloading of shared library symbols.\n\
@@ -1595,7 +1595,7 @@ inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-limit", class_support, var_zinteger,
(char *) &auto_solib_limit,
"Set threshold (in Mb) for autoloading shared library symbols.\n\
diff --git a/gdb/source.c b/gdb/source.c
index 92cdce426e6..b1e9c387473 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1,6 +1,6 @@
/* List lines of source files for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -325,12 +325,12 @@ forget_cached_source_info (void)
{
if (s->line_charpos != NULL)
{
- xmfree (objfile->md, s->line_charpos);
+ xfree (s->line_charpos);
s->line_charpos = NULL;
}
if (s->fullname != NULL)
{
- xmfree (objfile->md, s->fullname);
+ xfree (s->fullname);
s->fullname = NULL;
}
}
@@ -636,12 +636,18 @@ is_regular_file (const char *name)
/* Open a file named STRING, searching path PATH (dir names sep by some char)
using mode MODE and protection bits PROT in the calls to open.
- If TRY_CWD_FIRST, try to open ./STRING before searching PATH.
+ OPTS specifies the function behaviour in specific cases.
+
+ If OPF_TRY_CWD_FIRST, try to open ./STRING before searching PATH.
(ie pretend the first element of PATH is "."). This also indicates
that a slash in STRING disables searching of the path (this is
so that "exec-file ./foo" or "symbol-file ./foo" insures that you
get that particular version of foo or an error message).
+ If OPTS has OPF_SEARCH_IN_PATH set, absolute names will also be
+ searched in path (we usually want this for source files but not for
+ executables).
+
If FILENAME_OPENED is non-null, set it to a newly allocated string naming
the actual file opened (this string will always start with a "/"). We
have to take special pains to avoid doubling the "/" between the directory
@@ -654,7 +660,7 @@ is_regular_file (const char *name)
/* >>>> This should only allow files of certain types,
>>>> eg executable, non-directory */
int
-openp (const char *path, int try_cwd_first, const char *string,
+openp (const char *path, int opts, const char *string,
int mode, int prot,
char **filename_opened)
{
@@ -672,7 +678,7 @@ openp (const char *path, int try_cwd_first, const char *string,
mode |= O_BINARY;
#endif
- if (try_cwd_first || IS_ABSOLUTE_PATH (string))
+ if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string))
{
int i;
@@ -690,11 +696,16 @@ openp (const char *path, int try_cwd_first, const char *string,
fd = -1;
}
- for (i = 0; string[i]; i++)
- if (IS_DIR_SEPARATOR (string[i]))
- goto done;
+ if (!(opts & OPF_SEARCH_IN_PATH))
+ for (i = 0; string[i]; i++)
+ if (IS_DIR_SEPARATOR (string[i]))
+ goto done;
}
+ /* /foo => foo, to avoid multiple slashes that Emacs doesn't like. */
+ while (IS_DIR_SEPARATOR(string[0]))
+ string++;
+
/* ./foo => foo */
while (string[0] == '.' && IS_DIR_SEPARATOR (string[1]))
string += 2;
@@ -741,11 +752,11 @@ openp (const char *path, int try_cwd_first, const char *string,
strcat (filename, string);
if (is_regular_file (filename))
- {
- fd = open (filename, mode);
- if (fd >= 0)
- break;
- }
+ {
+ fd = open (filename, mode);
+ if (fd >= 0)
+ break;
+ }
}
done:
@@ -765,9 +776,9 @@ done:
/* Beware the // my son, the Emacs barfs, the botch that catch... */
char *f = concat (current_directory,
- IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1])
- ? "" : SLASH_STRING,
- filename, NULL);
+ IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1])
+ ? "" : SLASH_STRING,
+ filename, NULL);
*filename_opened = xfullpath (f);
xfree (f);
}
@@ -787,14 +798,14 @@ done:
If the file was found, this function returns 1, and FULL_PATHNAME is
set to the fully-qualified pathname.
- Else, this functions returns 0, and FULL_PATHNAME is set to NULL.
- */
+ Else, this functions returns 0, and FULL_PATHNAME is set to NULL. */
int
source_full_path_of (char *filename, char **full_pathname)
{
int fd;
- fd = openp (source_path, 1, filename, O_RDONLY, 0, full_pathname);
+ fd = openp (source_path, OPF_TRY_CWD_FIRST | OPF_SEARCH_IN_PATH, filename,
+ O_RDONLY, 0, full_pathname);
if (fd < 0)
{
*full_pathname = NULL;
@@ -805,30 +816,46 @@ source_full_path_of (char *filename, char **full_pathname)
return 1;
}
+/* This function is capable of finding the absolute path to a
+ source file, and opening it, provided you give it an
+ OBJFILE and FILENAME. Both the DIRNAME and FULLNAME are only
+ added suggestions on where to find the file.
-/* Open a source file given a symtab S. Returns a file descriptor or
- negative number for error. */
+ OBJFILE should be the objfile associated with a psymtab or symtab.
+ FILENAME should be the filename to open.
+ DIRNAME is the compilation directory of a particular source file.
+ Only some debug formats provide this info.
+ FULLNAME can be the last known absolute path to the file in question.
+ On Success
+ A valid file descriptor is returned. ( the return value is positive )
+ FULLNAME is set to the absolute path to the file just opened.
+
+ On Failure
+ A non valid file descriptor is returned. ( the return value is negitive )
+ FULLNAME is set to NULL. */
int
-open_source_file (struct symtab *s)
+find_and_open_source (struct objfile *objfile,
+ const char *filename,
+ const char *dirname,
+ char **fullname)
{
char *path = source_path;
const char *p;
int result;
- char *fullname;
/* Quick way out if we already know its full name */
- if (s->fullname)
+ if (*fullname)
{
- result = open (s->fullname, OPEN_MODE);
+ result = open (*fullname, OPEN_MODE);
if (result >= 0)
return result;
/* Didn't work -- free old one, try again. */
- xmfree (s->objfile->md, s->fullname);
- s->fullname = NULL;
+ xfree (*fullname);
+ *fullname = NULL;
}
- if (s->dirname != NULL)
+ if (dirname != NULL)
{
/* Replace a path entry of $cdir with the compilation directory name */
#define cdir_len 5
@@ -841,61 +868,106 @@ open_source_file (struct symtab *s)
int len;
path = (char *)
- alloca (strlen (source_path) + 1 + strlen (s->dirname) + 1);
+ alloca (strlen (source_path) + 1 + strlen (dirname) + 1);
len = p - source_path;
strncpy (path, source_path, len); /* Before $cdir */
- strcpy (path + len, s->dirname); /* new stuff */
+ strcpy (path + len, dirname); /* new stuff */
strcat (path + len, source_path + len + cdir_len); /* After $cdir */
}
}
- result = openp (path, 0, s->filename, OPEN_MODE, 0, &s->fullname);
+ result = openp (path, OPF_SEARCH_IN_PATH, filename, OPEN_MODE, 0, fullname);
if (result < 0)
{
/* Didn't work. Try using just the basename. */
- p = lbasename (s->filename);
- if (p != s->filename)
- result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
+ p = lbasename (filename);
+ if (p != filename)
+ result = openp (path, OPF_SEARCH_IN_PATH, p, OPEN_MODE, 0, fullname);
}
if (result >= 0)
{
- fullname = s->fullname;
- s->fullname = mstrsave (s->objfile->md, s->fullname);
- xfree (fullname);
+ char *tmp_fullname;
+ tmp_fullname = *fullname;
+ *fullname = mstrsave (objfile->md, *fullname);
+ xfree (tmp_fullname);
}
return result;
}
-/* Return the path to the source file associated with symtab. Returns NULL
- if no symtab. */
+/* Open a source file given a symtab S. Returns a file descriptor or
+ negative number for error.
+
+ This function is a convience function to find_and_open_source. */
+
+int
+open_source_file (struct symtab *s)
+{
+ if (!s)
+ return -1;
+
+ return find_and_open_source (s->objfile, s->filename, s->dirname,
+ &s->fullname);
+}
+
+/* Finds the fullname that a symtab represents.
+ If this functions finds the fullname, it will save it in ps->fullname
+ and it will also return the value.
+
+ If this function fails to find the file that this symtab represents,
+ NULL will be returned and ps->fullname will be set to NULL. */
char *
-symtab_to_filename (struct symtab *s)
+symtab_to_fullname (struct symtab *s)
{
- int fd;
+ int r;
if (!s)
return NULL;
- /* If we've seen the file before, just return fullname. */
+ /* Don't check s->fullname here, the file could have been
+ deleted/moved/..., look for it again */
+ r = find_and_open_source (s->objfile, s->filename, s->dirname,
+ &s->fullname);
- if (s->fullname)
- return s->fullname;
+ if (r)
+ {
+ close (r);
+ return s->fullname;
+ }
- /* Try opening the file to setup fullname */
+ return NULL;
+}
- fd = open_source_file (s);
- if (fd < 0)
- return s->filename; /* File not found. Just use short name */
+/* Finds the fullname that a partial_symtab represents.
- /* Found the file. Cleanup and return the full name */
+ If this functions finds the fullname, it will save it in ps->fullname
+ and it will also return the value.
- close (fd);
- return s->fullname;
+ If this function fails to find the file that this partial_symtab represents,
+ NULL will be returned and ps->fullname will be set to NULL. */
+char *
+psymtab_to_fullname (struct partial_symtab *ps)
+{
+ int r;
+
+ if (!ps)
+ return NULL;
+
+ /* Don't check ps->fullname here, the file could have been
+ deleted/moved/..., look for it again */
+ r = find_and_open_source (ps->objfile, ps->filename, ps->dirname,
+ &ps->fullname);
+
+ if (r)
+ {
+ close (r);
+ return ps->fullname;
+ }
+
+ return NULL;
}
-
/* Create and initialize the table S->line_charpos that records
the positions of the lines in the source file, which is assumed
to be open on descriptor DESC.
@@ -912,8 +984,7 @@ find_source_lines (struct symtab *s, int desc)
long mtime = 0;
int size;
- line_charpos = (int *) xmmalloc (s->objfile->md,
- lines_allocated * sizeof (int));
+ line_charpos = (int *) xmalloc (lines_allocated * sizeof (int));
if (fstat (desc, &st) < 0)
perror_with_name (s->filename);
@@ -943,8 +1014,8 @@ find_source_lines (struct symtab *s, int desc)
{
lines_allocated *= 2;
line_charpos =
- (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
- sizeof (int) * lines_allocated);
+ (int *) xrealloc ((char *) line_charpos,
+ sizeof (int) * lines_allocated);
}
line_charpos[nlines++] = lseek (desc, 0, SEEK_CUR);
}
@@ -981,8 +1052,8 @@ find_source_lines (struct symtab *s, int desc)
{
lines_allocated *= 2;
line_charpos =
- (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
- sizeof (int) * lines_allocated);
+ (int *) xrealloc ((char *) line_charpos,
+ sizeof (int) * lines_allocated);
}
line_charpos[nlines++] = p - data;
}
@@ -992,8 +1063,7 @@ find_source_lines (struct symtab *s, int desc)
#endif /* lseek linear. */
s->nlines = nlines;
s->line_charpos =
- (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
- nlines * sizeof (int));
+ (int *) xrealloc ((char *) line_charpos, nlines * sizeof (int));
}
@@ -1587,7 +1657,7 @@ The matching line number is also stored as the value of \"$_\".");
add_com_alias ("?", "reverse-search", class_files, 0);
}
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("listsize", class_support, var_uinteger,
(char *) &lines_to_list,
"Set number of source lines gdb will list by default.",
diff --git a/gdb/source.h b/gdb/source.h
index 7cfed1ae0e8..ecfe1f0f696 100644
--- a/gdb/source.h
+++ b/gdb/source.h
@@ -27,6 +27,9 @@ struct symtab;
negative number for error. */
extern int open_source_file (struct symtab *s);
+extern char* psymtab_to_fullname (struct partial_symtab *ps);
+extern char* symtab_to_fullname (struct symtab *s);
+
/* Create and initialize the table S->line_charpos that records the
positions of the lines in the source file, which is assumed to be
open on descriptor DESC. All set S->nlines to the number of such
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index 8f77dcc6a99..95f923739ab 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -96,7 +96,7 @@ sparc_linux_sigtramp_start (CORE_ADDR pc, ULONGEST insn0, ULONGEST insn1)
sequence, there will be a few trailing readable bytes on the
stack. */
- if (read_memory_nobpt (pc, buf, sizeof buf) != 0)
+ if (deprecated_read_memory_nobpt (pc, buf, sizeof buf) != 0)
return 0;
word0 = extract_unsigned_integer (buf, 4);
@@ -106,7 +106,7 @@ sparc_linux_sigtramp_start (CORE_ADDR pc, ULONGEST insn0, ULONGEST insn1)
return 0;
pc -= 4;
- if (read_memory_nobpt (pc, buf, sizeof buf) != 0)
+ if (deprecated_read_memory_nobpt (pc, buf, sizeof buf) != 0)
return 0;
word0 = extract_unsigned_integer (buf, 4);
@@ -225,8 +225,8 @@ sparc32_linux_sigtramp_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc32_linux_sigtramp_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc32_linux_sigtramp_frame_unwind =
@@ -293,7 +293,6 @@ sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32_linux_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32_linux_sigtramp_frame_sniffer);
set_solib_svr4_fetch_link_map_offsets
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 955e65e3140..858e2787dff 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -166,7 +166,7 @@ fetch_inferior_registers (int regnum)
{
gregset_t regs;
- if (ptrace (PTRACE_GETREGS, pid, (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
sparc_supply_gregset (sparc_gregset, regcache, -1, &regs);
@@ -178,7 +178,7 @@ fetch_inferior_registers (int regnum)
{
fpregset_t fpregs;
- if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
sparc_supply_fpregset (regcache, -1, &fpregs);
@@ -201,12 +201,12 @@ store_inferior_registers (int regnum)
{
gregset_t regs;
- if (ptrace (PTRACE_GETREGS, pid, (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't get registers");
sparc_collect_gregset (sparc_gregset, regcache, regnum, &regs);
- if (ptrace (PTRACE_SETREGS, pid, (PTRACE_ARG3_TYPE) &regs, 0) == -1)
+ if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
/* Deal with the stack regs. */
@@ -227,7 +227,7 @@ store_inferior_registers (int regnum)
{
fpregset_t fpregs, saved_fpregs;
- if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating-point registers");
memcpy (&saved_fpregs, &fpregs, sizeof (fpregs));
@@ -240,7 +240,7 @@ store_inferior_registers (int regnum)
if (memcmp (&saved_fpregs, &fpregs, sizeof (fpregs)) != 0)
{
if (ptrace (PTRACE_SETFPREGS, pid,
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
+ (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name ("Couldn't write floating-point registers");
}
@@ -284,7 +284,7 @@ sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
gdb_assert (sizeof (wcookie) == sizeof (register_t));
/* Fetch the cookie. */
- if (ptrace (PT_WCOOKIE, pid, (PTRACE_ARG3_TYPE) &wcookie, 0) == -1)
+ if (ptrace (PT_WCOOKIE, pid, (PTRACE_TYPE_ARG3) &wcookie, 0) == -1)
{
if (errno != EINVAL)
perror_with_name ("Couldn't get StackGhost cookie");
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index 0885d470400..84a23e2c554 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for Solaris SPARC.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,6 +34,7 @@
#include "gdb_string.h"
#include "sparc-tdep.h"
+#include "solib-svr4.h"
/* From <sys/regset.h>. */
const struct sparc_gregset sparc32_sol2_gregset =
@@ -144,8 +145,8 @@ sparc32_sol2_sigtramp_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc32_sol2_sigtramp_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
@@ -177,6 +178,8 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris has SVR4-style shared libraries... */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
/* ...which means that we need some special handling when doing
prologue analysis. */
@@ -185,7 +188,6 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris has kernel-assisted single-stepping support. */
set_gdbarch_software_single_step (gdbarch, NULL);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32_sol2_sigtramp_frame_sniffer);
}
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 893648c8b36..7fbd9de62b0 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -450,7 +450,7 @@ sparc32_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-sparc32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+sparc32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index 43057fe76e5..d22232a0cdd 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -31,6 +31,7 @@
#include "gdb_assert.h"
#include "sparc64-tdep.h"
+#include "solib-svr4.h"
/* From <sys/regset.h>. */
const struct sparc_gregset sparc64_sol2_gregset =
@@ -123,8 +124,8 @@ sparc64_sol2_sigtramp_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc64_sol2_sigtramp_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc64_sol2_sigtramp_frame_unwind =
@@ -153,7 +154,6 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc_sol2_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64_sol2_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);
@@ -161,6 +161,8 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris has SVR4-style shared libraries... */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_lp64_fetch_link_map_offsets);
/* ...which means that we need some special handling when doing
prologue analysis. */
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 8aad619eeae..a4398d57adb 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -52,17 +52,6 @@
/* The functions on this page are intended to be used to classify
function arguments. */
-/* Return the contents if register REGNUM as an address. */
-
-static CORE_ADDR
-sparc_address_from_register (int regnum)
-{
- ULONGEST addr;
-
- regcache_cooked_read_unsigned (current_regcache, regnum, &addr);
- return addr;
-}
-
/* Check whether TYPE is "Integral or Pointer". */
static int
@@ -579,8 +568,7 @@ sparc64_frame_base_address (struct frame_info *next_frame, void **this_cache)
struct sparc_frame_cache *cache =
sparc64_frame_cache (next_frame, this_cache);
- /* ??? Should we take BIAS into account here? */
- return cache->base;
+ return cache->base + BIAS;
}
static const struct frame_base sparc64_frame_base =
@@ -943,7 +931,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
gdb_assert (element < 6);
regnum = SPARC_O0_REGNUM + element;
regcache_cooked_write (regcache, regnum, valbuf);
- regcache_cooked_write (regcache, regnum + 1, valbuf);
+ regcache_cooked_write (regcache, regnum + 1, valbuf + 8);
}
}
@@ -960,7 +948,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-sparc64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+sparc64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index 0c410ef5b29..5d3af0077df 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -54,7 +54,7 @@ sparc64fbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- sparc64_supply_gregset (regset->descr, regcache, regnum, gregs);
+ sparc64_supply_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs);
}
static void
@@ -169,8 +169,8 @@ sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc64fbsd_sigtramp_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
@@ -199,16 +199,12 @@ sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = &sparc64fbsd_gregset;
- tdep->gregset->supply_regset = sparc64fbsd_supply_gregset;
+ tdep->gregset = regset_alloc (gdbarch, sparc64fbsd_supply_gregset, NULL);
tdep->sizeof_gregset = 256;
- tdep->fpregset = XMALLOC (struct regset);
- tdep->fpregset->supply_regset = sparc64fbsd_supply_fpregset;
+ tdep->fpregset = regset_alloc (gdbarch, sparc64fbsd_supply_fpregset, NULL);
tdep->sizeof_fpregset = 272;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64fbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64fbsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);
diff --git a/gdb/sparc64nbsd-nat.c b/gdb/sparc64nbsd-nat.c
index 91577039eb3..7d554cf6089 100644
--- a/gdb/sparc64nbsd-nat.c
+++ b/gdb/sparc64nbsd-nat.c
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "regcache.h"
#include "sparc64-tdep.h"
#include "sparc-nat.h"
@@ -122,13 +123,44 @@ sparc64nbsd_fpregset_supplies_p (int regnum)
return 0;
}
+
+
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc64nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ int regnum;
+
+ /* The following is true for NetBSD 1.6.2:
+
+ The pcb contains %sp and %pc, %psr and %wim. From this information
+ we reconstruct the register state as it would look when we just
+ returned from cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_sp == 0)
+ return 0;
+
+ regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+
+ sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+ return 1;
+}
/* Provide a prototype to silence -Wmissing-prototypes. */
-void _initialize_sparcnbsd_nat (void);
+void _initialize_sparc64nbsd_nat (void);
void
-_initialize_sparcnbsd_nat (void)
+_initialize_sparc64nbsd_nat (void)
{
sparc_supply_gregset = sparc64nbsd_supply_gregset;
sparc_collect_gregset = sparc64nbsd_collect_gregset;
@@ -136,4 +168,7 @@ _initialize_sparcnbsd_nat (void)
sparc_collect_fpregset = sparc64nbsd_collect_fpregset;
sparc_gregset_supplies_p = sparc64nbsd_gregset_supplies_p;
sparc_fpregset_supplies_p = sparc64nbsd_fpregset_supplies_p;
+
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (sparc64nbsd_supply_pcb);
}
diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c
index 7b2adf360f5..35ad2326ff3 100644
--- a/gdb/sparc64nbsd-tdep.c
+++ b/gdb/sparc64nbsd-tdep.c
@@ -57,7 +57,7 @@ sparc64nbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- sparc64_supply_gregset (regset->descr, regcache, regnum, gregs);
+ sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
}
static void
@@ -193,8 +193,8 @@ sparc64nbsd_sigcontext_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc64nbsd_sigcontext_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc64nbsd_sigcontext_frame_unwind =
@@ -226,16 +226,12 @@ sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = &sparc64nbsd_gregset;
- tdep->gregset->supply_regset = sparc64nbsd_supply_gregset;
+ tdep->gregset = regset_alloc (gdbarch, sparc64nbsd_supply_gregset, NULL);
tdep->sizeof_gregset = 160;
- tdep->fpregset = XMALLOC (struct regset);
- tdep->fpregset->supply_regset = sparc64nbsd_supply_fpregset;
+ tdep->fpregset = regset_alloc (gdbarch, sparc64nbsd_supply_fpregset, NULL);
tdep->sizeof_fpregset = 272;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64nbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64nbsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);
diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c
index 162f11d386e..5f8cb3bc480 100644
--- a/gdb/sparc64obsd-tdep.c
+++ b/gdb/sparc64obsd-tdep.c
@@ -61,7 +61,7 @@ sparc64obsd_supply_gregset (const struct regset *regset,
{
const char *regs = gregs;
- sparc64_supply_gregset (regset->descr, regcache, regnum, regs);
+ sparc64_supply_gregset (&sparc64obsd_core_gregset, regcache, regnum, regs);
sparc64_supply_fpregset (regcache, regnum, regs + 288);
}
@@ -74,30 +74,40 @@ sparc64obsd_supply_gregset (const struct regset *regset,
The signal trampoline will be mapped at an address that is page
aligned. We recognize the signal trampoline by the looking for the
- sigreturn system call. */
+ sigreturn system call. The offset where we can find the code that
+ makes this system call varies from release to release. For OpenBSD
+ 3.6 and later releases we can find the code at offset 0xec. For
+ OpenBSD 3.5 and earlier releases, we find it at offset 0xe8. */
static const int sparc64obsd_page_size = 8192;
+static const int sparc64obsd_sigreturn_offset[] = { 0xec, 0xe8, -1 };
static int
sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
CORE_ADDR start_pc = (pc & ~(sparc64obsd_page_size - 1));
unsigned long insn;
+ const int *offset;
if (name)
return 0;
- /* Check for "restore %g0, SYS_sigreturn, %g1". */
- insn = sparc_fetch_instruction (start_pc + 0xe8);
- if (insn != 0x83e82067)
- return 0;
+ for (offset = sparc64obsd_sigreturn_offset; *offset != -1; offset++)
+ {
+ /* Check for "restore %g0, SYS_sigreturn, %g1". */
+ insn = sparc_fetch_instruction (start_pc + *offset);
+ if (insn != 0x83e82067)
+ continue;
- /* Check for "t ST_SYSCALL". */
- insn = sparc_fetch_instruction (start_pc + 0xf0);
- if (insn != 0x91d02000)
- return 0;
+ /* Check for "t ST_SYSCALL". */
+ insn = sparc_fetch_instruction (start_pc + *offset + 8);
+ if (insn != 0x91d02000)
+ continue;
+
+ return 1;
+ }
- return 1;
+ return 0;
}
static struct sparc_frame_cache *
@@ -154,8 +164,8 @@ sparc64obsd_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc64obsd_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc64obsd_frame_unwind =
@@ -184,12 +194,9 @@ sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = &sparc64obsd_core_gregset;
- tdep->gregset->supply_regset = sparc64obsd_supply_gregset;
+ tdep->gregset = regset_alloc (gdbarch, sparc64obsd_supply_gregset, NULL);
tdep->sizeof_gregset = 832;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc64obsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc64obsd_sigtramp_frame_sniffer);
sparc64_init_abi (info, gdbarch);
diff --git a/gdb/sparcnbsd-nat.c b/gdb/sparcnbsd-nat.c
index 9038ea334b6..fa663f2478c 100644
--- a/gdb/sparcnbsd-nat.c
+++ b/gdb/sparcnbsd-nat.c
@@ -20,10 +20,44 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdbcore.h"
+#include "regcache.h"
#include "sparc-tdep.h"
#include "sparc-nat.h"
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+sparc32nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ /* The following is true for NetBSD 1.6.2:
+
+ The pcb contains %sp, %pc, %psr and %wim. From this information
+ we reconstruct the register state as it would look when we just
+ returned from cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->pcb_sp == 0)
+ return 0;
+
+ regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache_raw_supply (regcache, SPARC_O7_REGNUM, &pcb->pcb_pc);
+ regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, &pcb->pcb_psr);
+ regcache_raw_supply (regcache, SPARC32_WIM_REGNUM, &pcb->pcb_wim);
+ regcache_raw_supply (regcache, SPARC32_PC_REGNUM, &pcb->pcb_pc);
+
+ sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
+
+ return 1;
+}
+
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_sparcnbsd_nat (void);
@@ -31,4 +65,7 @@ void
_initialize_sparcnbsd_nat (void)
{
sparc_gregset = &sparc32nbsd_gregset;
+
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (sparc32nbsd_supply_pcb);
}
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 4cf4dcffa5e..1dfc13b3868 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -55,7 +55,7 @@ sparc32nbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- sparc32_supply_gregset (regset->descr, regcache, regnum, gregs);
+ sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
/* Traditional NetBSD core files don't use multiple register sets.
Instead, the general-purpose and floating-point registers are
@@ -229,8 +229,8 @@ sparc32nbsd_sigcontext_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc32nbsd_sigcontext_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
@@ -274,16 +274,12 @@ sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
- tdep->gregset = XMALLOC (struct regset);
- tdep->gregset->descr = &sparc32nbsd_gregset;
- tdep->gregset->supply_regset = sparc32nbsd_supply_gregset;
+ tdep->gregset = regset_alloc (gdbarch, sparc32nbsd_supply_gregset, NULL);
tdep->sizeof_gregset = 20 * 4;
- tdep->fpregset = XMALLOC (struct regset);
- tdep->fpregset->supply_regset = sparc32nbsd_supply_fpregset;
+ tdep->fpregset = regset_alloc (gdbarch, sparc32nbsd_supply_fpregset, NULL);
tdep->sizeof_fpregset = 33 * 4;
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32nbsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32nbsd_sigtramp_frame_sniffer);
}
@@ -302,7 +298,7 @@ sparc32nbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
sparc32nbsd_init_abi (info, gdbarch);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
}
static enum gdb_osabi
@@ -346,9 +342,8 @@ _initialize_sparnbsd_tdep (void)
gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_aout_flavour,
sparcnbsd_aout_osabi_sniffer);
- /* BFD doesn't set the architecture for NetBSD style a.out core
- files. */
- gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_unknown_flavour,
+ /* BFD doesn't set a flavour for NetBSD style a.out core files. */
+ gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_unknown_flavour,
sparcnbsd_core_osabi_sniffer);
gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD_AOUT,
diff --git a/gdb/sparcobsd-tdep.c b/gdb/sparcobsd-tdep.c
index 2677d4d978a..47f64bbbbff 100644
--- a/gdb/sparcobsd-tdep.c
+++ b/gdb/sparcobsd-tdep.c
@@ -31,7 +31,6 @@
#include "gdb_assert.h"
#include "sparc-tdep.h"
-#include "nbsd-tdep.h"
/* Signal trampolines. */
@@ -118,8 +117,8 @@ sparc32obsd_frame_prev_register (struct frame_info *next_frame,
struct sparc_frame_cache *cache =
sparc32obsd_frame_cache (next_frame, this_cache);
- trad_frame_prev_register (next_frame, cache->saved_regs, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
static const struct frame_unwind sparc32obsd_frame_unwind =
@@ -152,11 +151,10 @@ sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
- set_gdbarch_deprecated_pc_in_sigtramp (gdbarch, sparc32obsd_pc_in_sigtramp);
frame_unwind_append_sniffer (gdbarch, sparc32obsd_sigtramp_frame_sniffer);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
}
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 07c6fe0b8a2..e91a9809052 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -978,61 +978,17 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned int", NULL);
- if (BELIEVE_PCC_PROMOTION_TYPE)
+ /* If PCC says a parameter is a short or a char, it is
+ really an int. */
+ if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
+ && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
{
- /* This is defined on machines (e.g. sparc) where we
- should believe the type of a PCC 'short' argument,
- but shouldn't believe the address (the address is the
- address of the corresponding int).
-
- My guess is that this correction, as opposed to
- changing the parameter to an 'int' (as done below,
- for PCC on most machines), is the right thing to do
- on all machines, but I don't want to risk breaking
- something that already works. On most PCC machines,
- the sparc problem doesn't come up because the calling
- function has to zero the top bytes (not knowing
- whether the called function wants an int or a short),
- so there is little practical difference between an
- int and a short (except perhaps what happens when the
- GDB user types "print short_arg = 0x10000;").
-
- Hacked for SunOS 4.1 by gnu@cygnus.com. In 4.1, the
- compiler actually produces the correct address (we
- don't need to fix it up). I made this code adapt so
- that it will offset the symbol if it was pointing at
- an int-aligned location and not otherwise. This way
- you can use the same gdb for 4.0.x and 4.1 systems.
-
- If the parameter is shorter than an int, and is
- integral (e.g. char, short, or unsigned equivalent),
- and is claimed to be passed on an integer boundary,
- don't believe it! Offset the parameter's address to
- the tail-end of that integer. */
-
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT
- && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (pcc_promotion_type))
- {
- SYMBOL_VALUE (sym) += TYPE_LENGTH (pcc_promotion_type)
- - TYPE_LENGTH (SYMBOL_TYPE (sym));
- }
- break;
- }
- else
- {
- /* If PCC says a parameter is a short or a char,
- it is really an int. */
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
- {
- SYMBOL_TYPE (sym) =
- TYPE_UNSIGNED (SYMBOL_TYPE (sym))
- ? pcc_unsigned_promotion_type
- : pcc_promotion_type;
- }
- break;
+ SYMBOL_TYPE (sym) =
+ TYPE_UNSIGNED (SYMBOL_TYPE (sym))
+ ? pcc_unsigned_promotion_type
+ : pcc_promotion_type;
}
+ break;
}
case 'P':
diff --git a/gdb/stack.c b/gdb/stack.c
index 93e36b5210f..5d7af0a1959 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -52,7 +52,7 @@ void args_info (char *, int);
void locals_info (char *, int);
-void (*selected_frame_level_changed_hook) (int);
+void (*deprecated_selected_frame_level_changed_hook) (int);
void _initialize_stack (void);
@@ -95,9 +95,9 @@ static int print_block_frame_locals (struct block *,
struct ui_file *);
static void print_frame (struct frame_info *fi,
- int level,
- int source,
- int args,
+ int print_level,
+ enum print_what print_what,
+ int print_args,
struct symtab_and_line sal);
static void backtrace_command (char *, int);
@@ -120,42 +120,38 @@ int annotation_level = 0;
struct print_stack_frame_args
{
struct frame_info *fi;
- int level;
- int source;
- int args;
+ int print_level;
+ enum print_what print_what;
+ int print_args;
};
/* Show or print the frame arguments.
Pass the args the way catch_errors wants them. */
-static int print_stack_frame_stub (void *args);
static int
print_stack_frame_stub (void *args)
{
struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
- print_frame_info (p->fi, p->level, p->source, p->args);
+ print_frame_info (p->fi, p->print_level, p->print_what, p->print_args);
return 0;
}
-/* Show or print a stack frame briefly. FRAME_INFI should be the frame info
- and LEVEL should be its level in the stack (or -1 for level not defined).
- This prints the level, the function executing, the arguments,
- and the file name and line number.
- If the pc is not at the beginning of the source line,
- the actual pc is printed at the beginning.
-
- If SOURCE is 1, print the source line as well.
- If SOURCE is -1, print ONLY the source line. */
+/* Show or print a stack frame FI briefly. The output is format
+ according to PRINT_LEVEL and PRINT_WHAT printing the frame's
+ relative level, function name, argument list, and file name and
+ line number. If the frame's PC is not at the beginning of the
+ source line, the actual PC is printed at the beginning. */
void
-print_stack_frame (struct frame_info *fi, int level, int source)
+print_stack_frame (struct frame_info *fi, int print_level,
+ enum print_what print_what)
{
struct print_stack_frame_args args;
args.fi = fi;
- args.level = level;
- args.source = source;
- args.args = 1;
+ args.print_level = print_level;
+ args.print_what = print_what;
+ args.print_args = 1;
catch_errors (print_stack_frame_stub, (char *) &args, "", RETURN_MASK_ALL);
}
@@ -418,7 +414,8 @@ print_args_stub (void *args)
LOC_AND_SRC: Print location and source line. */
void
-print_frame_info (struct frame_info *fi, int level, int source, int args)
+print_frame_info (struct frame_info *fi, int print_level,
+ enum print_what print_what, int print_args)
{
struct symtab_and_line sal;
int source_print;
@@ -430,14 +427,16 @@ print_frame_info (struct frame_info *fi, int level, int source, int args)
struct cleanup *uiout_cleanup
= make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
- annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
+ annotate_frame_begin (print_level ? frame_relative_level (fi) : 0,
+ get_frame_pc (fi));
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
- if (level >= 0)
+ if (print_level)
{
ui_out_text (uiout, "#");
- ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level",
+ frame_relative_level (fi));
}
if (ui_out_is_mi_like_p (uiout))
{
@@ -471,14 +470,14 @@ print_frame_info (struct frame_info *fi, int level, int source, int args)
line containing fi->pc. */
find_frame_sal (fi, &sal);
- location_print = (source == LOCATION
- || source == LOC_AND_ADDRESS
- || source == SRC_AND_LOC);
+ location_print = (print_what == LOCATION
+ || print_what == LOC_AND_ADDRESS
+ || print_what == SRC_AND_LOC);
if (location_print || !sal.symtab)
- print_frame (fi, level, source, args, sal);
+ print_frame (fi, print_level, print_what, print_args, sal);
- source_print = (source == SRC_LINE || source == SRC_AND_LOC);
+ source_print = (print_what == SRC_LINE || print_what == SRC_AND_LOC);
if (sal.symtab)
set_current_source_symtab_and_line (&sal);
@@ -487,15 +486,16 @@ print_frame_info (struct frame_info *fi, int level, int source, int args)
{
struct symtab_and_line cursal;
int done = 0;
- int mid_statement = (source == SRC_LINE) && (get_frame_pc (fi) != sal.pc);
+ int mid_statement = ((print_what == SRC_LINE)
+ && (get_frame_pc (fi) != sal.pc));
if (annotation_level)
done = identify_source_line (sal.symtab, sal.line, mid_statement,
get_frame_pc (fi));
if (!done)
{
- if (print_frame_info_listing_hook)
- print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
+ if (deprecated_print_frame_info_listing_hook)
+ deprecated_print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
else
{
/* We used to do this earlier, but that is clearly
@@ -522,7 +522,7 @@ print_frame_info (struct frame_info *fi, int level, int source, int args)
set_current_source_symtab_and_line (&cursal);
}
- if (source != 0)
+ if (print_what != LOCATION)
set_default_breakpoint (1, get_frame_pc (fi), sal.symtab, sal.line);
annotate_frame_end ();
@@ -532,9 +532,9 @@ print_frame_info (struct frame_info *fi, int level, int source, int args)
static void
print_frame (struct frame_info *fi,
- int level,
- int source,
- int args,
+ int print_level,
+ enum print_what print_what,
+ int print_args,
struct symtab_and_line sal)
{
struct symbol *func;
@@ -571,14 +571,6 @@ print_frame (struct frame_info *fi,
&& (SYMBOL_VALUE_ADDRESS (msymbol)
> BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
{
-#if 0
- /* There is no particular reason to think the line number
- information is wrong. Someone might have just put in
- a label with asm() but left the line numbers alone. */
- /* In this case we have no way of knowing the source file
- and line number, so don't print them. */
- sal.symtab = 0;
-#endif
/* We also don't know anything about the function besides
its address and name. */
func = 0;
@@ -622,19 +614,21 @@ print_frame (struct frame_info *fi,
}
}
- annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
+ annotate_frame_begin (print_level ? frame_relative_level (fi) : 0,
+ get_frame_pc (fi));
list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
- if (level >= 0)
+ if (print_level)
{
ui_out_text (uiout, "#");
- ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level",
+ frame_relative_level (fi));
}
if (addressprint)
if (get_frame_pc (fi) != sal.pc
|| !sal.symtab
- || source == LOC_AND_ADDRESS)
+ || print_what == LOC_AND_ADDRESS)
{
annotate_frame_address ();
ui_out_field_core_addr (uiout, "addr", get_frame_pc (fi));
@@ -649,7 +643,7 @@ print_frame (struct frame_info *fi,
annotate_frame_args ();
ui_out_text (uiout, " (");
- if (args)
+ if (print_args)
{
struct print_args_args args;
struct cleanup *args_list_chain;
@@ -940,14 +934,6 @@ frame_info (char *addr_exp, int from_tty)
print_address_numeric (frame_pc_unwind (fi), 1, gdb_stdout);
printf_filtered ("\n");
- {
- int frameless;
- frameless = (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()
- && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi));
- if (frameless)
- printf_filtered (" (FRAMELESS),");
- }
-
if (calling_frame_info)
{
printf_filtered (" called by frame at ");
@@ -1017,9 +1003,6 @@ frame_info (char *addr_exp, int from_tty)
}
}
- if (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()
- && deprecated_get_frame_saved_regs (fi) == NULL)
- DEPRECATED_FRAME_INIT_SAVED_REGS (fi);
/* Print as much information as possible on the location of all the
registers. */
{
@@ -1051,7 +1034,7 @@ frame_info (char *addr_exp, int from_tty)
/* NOTE: cagney/2003-05-22: This is assuming that the
stack pointer was packed as an unsigned integer. That
may or may not be valid. */
- sp = extract_unsigned_integer (value, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (value, register_size (current_gdbarch, SP_REGNUM));
printf_filtered (" Previous frame's sp is ");
print_address_numeric (sp, 1, gdb_stdout);
printf_filtered ("\n");
@@ -1102,33 +1085,6 @@ frame_info (char *addr_exp, int from_tty)
}
}
-#if 0
-/* Set a limit on the number of frames printed by default in a
- backtrace. */
-
-static int backtrace_limit;
-
-static void
-set_backtrace_limit_command (char *count_exp, int from_tty)
-{
- int count = parse_and_eval_long (count_exp);
-
- if (count < 0)
- error ("Negative argument not meaningful as backtrace limit.");
-
- backtrace_limit = count;
-}
-
-static void
-backtrace_limit_info (char *arg, int from_tty)
-{
- if (arg)
- error ("\"Info backtrace-limit\" takes no arguments.");
-
- printf_unfiltered ("Backtrace limit: %d.\n", backtrace_limit);
-}
-#endif
-
/* Print briefly all stack frames or just the innermost COUNT frames. */
static void backtrace_command_1 (char *count_exp, int show_locals,
@@ -1220,7 +1176,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty)
means further attempts to backtrace would fail (on the other
hand, perhaps the code does or could be fixed to make sure
the frame->prev field gets set to NULL in that case). */
- print_frame_info (fi, trailing_level + i, 0, 1);
+ print_frame_info (fi, 1, LOCATION, 1);
if (show_locals)
print_frame_local_vars (fi, 1, gdb_stdout);
}
@@ -1353,7 +1309,7 @@ print_block_frame_labels (struct block *b, int *have_default,
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- if (DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
+ if (strcmp (DEPRECATED_SYMBOL_NAME (sym), "default") == 0)
{
if (*have_default)
continue;
@@ -1507,10 +1463,6 @@ catch_info (char *ignore, int from_tty)
/* Ideally, here we should interact with the C++ runtime
system to find the list of active handlers, etc. */
fprintf_filtered (gdb_stdout, "Info catch not supported with this target/compiler combination.\n");
-#if 0
- if (!deprecated_selected_frame)
- error ("No frame selected.");
-#endif
}
else
{
@@ -1606,9 +1558,7 @@ select_and_print_frame (struct frame_info *fi)
{
select_frame (fi);
if (fi)
- {
- print_stack_frame (fi, frame_relative_level (fi), 1);
- }
+ print_stack_frame (fi, 1, SRC_AND_LOC);
}
/* Return the symbol-block in which the selected frame is executing.
@@ -1625,7 +1575,7 @@ get_selected_block (CORE_ADDR *addr_in_block)
return 0;
/* NOTE: cagney/2002-11-28: Why go to all this effort to not create
- a selected/current frame? Perhaphs this function is called,
+ a selected/current frame? Perhaps this function is called,
indirectly, by WFI in "infrun.c" where avoiding the creation of
an inner most frame is very important (it slows down single
step). I suspect, though that this was true in the deep dark
@@ -1695,7 +1645,6 @@ void
select_frame_command (char *level_exp, int from_tty)
{
struct frame_info *frame;
- int level = frame_relative_level (deprecated_selected_frame);
if (!target_has_stack)
error ("No stack.");
@@ -1703,8 +1652,6 @@ select_frame_command (char *level_exp, int from_tty)
frame = parse_frame_specification (level_exp);
select_frame (frame);
- if (level != frame_relative_level (deprecated_selected_frame))
- selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
/* The "frame" command. With no arg, print selected frame briefly.
@@ -1715,8 +1662,7 @@ void
frame_command (char *level_exp, int from_tty)
{
select_frame_command (level_exp, from_tty);
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
/* The XDB Compatibility command to print the current frame. */
@@ -1726,8 +1672,7 @@ current_frame_command (char *level_exp, int from_tty)
{
if (target_has_stack == 0 || deprecated_selected_frame == 0)
error ("No stack.");
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
/* Select the frame up one or COUNT stack levels
@@ -1749,7 +1694,6 @@ up_silently_base (char *count_exp)
if (count1 != 0 && count_exp == 0)
error ("Initial frame selected; you cannot go up.");
select_frame (fi);
- selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
static void
@@ -1762,8 +1706,7 @@ static void
up_command (char *count_exp, int from_tty)
{
up_silently_base (count_exp);
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
/* Select the frame down one or COUNT stack levels
@@ -1794,7 +1737,6 @@ down_silently_base (char *count_exp)
}
select_frame (frame);
- selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
static void
@@ -1807,8 +1749,7 @@ static void
down_command (char *count_exp, int from_tty)
{
down_silently_base (count_exp);
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
}
void
@@ -1844,6 +1785,7 @@ return_command (char *retval_exp, int from_tty)
return_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (thisfun));
if (return_type == NULL)
return_type = builtin_type_int;
+ CHECK_TYPEDEF (return_type);
return_value = value_cast (return_type, return_value);
/* Make sure the value is fully evaluated. It may live in the
@@ -1925,24 +1867,12 @@ If you continue, the return value that you specified will be ignored.\n";
if (return_value != NULL)
{
struct type *return_type = VALUE_TYPE (return_value);
- if (!gdbarch_return_value_p (current_gdbarch))
- {
- STORE_RETURN_VALUE (return_type, current_regcache,
- VALUE_CONTENTS (return_value));
- }
- /* FIXME: cagney/2004-01-17: If extract_returned_value_address
- is available and the function is using
- RETURN_VALUE_STRUCT_CONVENTION, should use it to find the
- address of the returned value so that it can be assigned. */
- else
- {
- gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
- NULL, NULL, NULL)
- == RETURN_VALUE_REGISTER_CONVENTION);
- gdbarch_return_value (current_gdbarch, return_type,
- current_regcache, NULL /*read*/,
- VALUE_CONTENTS (return_value) /*write*/);
- }
+ gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
+ NULL, NULL, NULL)
+ == RETURN_VALUE_REGISTER_CONVENTION);
+ gdbarch_return_value (current_gdbarch, return_type,
+ current_regcache, NULL /*read*/,
+ VALUE_CONTENTS (return_value) /*write*/);
}
/* If we are at the end of a call dummy now, pop the dummy frame
diff --git a/gdb/standalone.c b/gdb/standalone.c
deleted file mode 100644
index 906e37a2b6e..00000000000
--- a/gdb/standalone.c
+++ /dev/null
@@ -1,580 +0,0 @@
-/* Interface to bare machine for GDB running as kernel debugger.
-
- Copyright 1986, 1989, 1991, 1992, 1993, 1995, 1996, 2000, 2001,
- 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 <stdio.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <sys/types.h>
-#include "gdb_stat.h"
-
-#if defined (SIGTSTP) && defined (SIGIO)
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif /* SIGTSTP and SIGIO defined (must be 4.2) */
-
-#include "defs.h"
-#include <signal.h>
-#include "symtab.h"
-#include "frame.h"
-#include "inferior.h"
-#include "gdb_wait.h"
-
-
-/* Random system calls, mostly no-ops to prevent link problems */
-
-ioctl (int desc, int code, int arg)
-{
-}
-
-int (*signal ()) ()
-{
-}
-
-kill (void)
-{
-}
-
-getpid (void)
-{
- return 0;
-}
-
-sigsetmask (void)
-{
-}
-
-chdir (void)
-{
-}
-
-char *
-getcwd (char *buf, unsigned int len)
-{
- buf[0] = '/';
- buf[1] = 0;
- return buf;
-}
-
-/* Used to check for existence of .gdbinit. Say no. */
-
-access (void)
-{
- return -1;
-}
-
-exit (void)
-{
- error ("Fatal error; restarting.");
-}
-
-/* Reading "files". The contents of some files are written into kdb's
- data area before it is run. These files are used to contain the
- symbol table for kdb to load, and the source files (in case the
- kdb user wants to print them). The symbols are stored in a file
- named "kdb-symbols" in a.out format (except that all the text and
- data have been stripped to save room).
-
- The files are stored in the following format:
- int number of bytes of data for this file, including these four.
- char[] name of the file, ending with a null.
- padding to multiple of 4 boundary.
- char[] file contents. The length can be deduced from what was
- specified before. There is no terminating null here.
-
- If the int at the front is zero, it means there are no more files.
-
- Opening a file in kdb returns a nonzero value to indicate success,
- but the value does not matter. Only one file can be open, and only
- for reading. All the primitives for input from the file know
- which file is open and ignore what is specified for the descriptor
- or for the stdio stream.
-
- Input with fgetc can be done either on the file that is open
- or on stdin (which reads from the terminal through tty_input () */
-
-/* Address of data for the files stored in format described above. */
-char *files_start;
-
-/* The file stream currently open: */
-
-char *sourcebeg; /* beginning of contents */
-int sourcesize; /* size of contents */
-char *sourceptr; /* current read pointer */
-int sourceleft; /* number of bytes to eof */
-
-/* "descriptor" for the file now open.
- Incremented at each close.
- If specified descriptor does not match this,
- it means the program is trying to use a closed descriptor.
- We report an error for that. */
-
-int sourcedesc;
-
-open (char *filename, int modes)
-{
- char *next;
-
- if (modes)
- {
- errno = EROFS;
- return -1;
- }
-
- if (sourceptr)
- {
- errno = EMFILE;
- return -1;
- }
-
- for (next = files_start; *(int *) next; next += *(int *) next)
- {
- if (!strcmp (next + 4, filename))
- {
- sourcebeg = next + 4 + strlen (next + 4) + 1;
- sourcebeg = (char *) (((int) sourcebeg + 3) & (-4));
- sourceptr = sourcebeg;
- sourcesize = next + *(int *) next - sourceptr;
- sourceleft = sourcesize;
- return sourcedesc;
- }
- }
- return 0;
-}
-
-close (int desc)
-{
- sourceptr = 0;
- sourcedesc++;
- /* Don't let sourcedesc get big enough to be confused with stdin. */
- if (sourcedesc == 100)
- sourcedesc = 5;
-}
-
-FILE *
-fopen (char *filename, char *modes)
-{
- return (FILE *) open (filename, *modes == 'w');
-}
-
-FILE *
-fdopen (int desc)
-{
- return (FILE *) desc;
-}
-
-fclose (int desc)
-{
- close (desc);
-}
-
-fstat (int desc, struct stat *statbuf)
-{
- if (desc != sourcedesc)
- {
- errno = EBADF;
- return -1;
- }
- statbuf->st_size = sourcesize;
-}
-
-myread (int desc, char *destptr, int size, char *filename)
-{
- int len = min (sourceleft, size);
-
- if (desc != sourcedesc)
- {
- errno = EBADF;
- return -1;
- }
-
- memcpy (destptr, sourceptr, len);
- sourceleft -= len;
- return len;
-}
-
-int
-fread (int bufp, int numelts, int eltsize, int stream)
-{
- int elts = min (numelts, sourceleft / eltsize);
- int len = elts * eltsize;
-
- if (stream != sourcedesc)
- {
- errno = EBADF;
- return -1;
- }
-
- memcpy (bufp, sourceptr, len);
- sourceleft -= len;
- return elts;
-}
-
-int
-fgetc (int desc)
-{
-
- if (desc == (int) stdin)
- return tty_input ();
-
- if (desc != sourcedesc)
- {
- errno = EBADF;
- return -1;
- }
-
- if (sourceleft-- <= 0)
- return EOF;
- return *sourceptr++;
-}
-
-lseek (int desc, int pos)
-{
-
- if (desc != sourcedesc)
- {
- errno = EBADF;
- return -1;
- }
-
- if (pos < 0 || pos > sourcesize)
- {
- errno = EINVAL;
- return -1;
- }
-
- sourceptr = sourcebeg + pos;
- sourceleft = sourcesize - pos;
-}
-
-/* Output in kdb can go only to the terminal, so the stream
- specified may be ignored. */
-
-printf (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9)
-{
- char buffer[1024];
- sprintf (buffer, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- display_string (buffer);
-}
-
-fprintf (int ign, int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9)
-{
- char buffer[1024];
- sprintf (buffer, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- display_string (buffer);
-}
-
-fwrite (char *buf, int numelts, int size, int stream)
-{
- int i = numelts * size;
- while (i-- > 0)
- fputc (*buf++, stream);
-}
-
-fputc (int c, int ign)
-{
- char buf[2];
- buf[0] = c;
- buf[1] = 0;
- display_string (buf);
-}
-
-/* sprintf refers to this, but loading this from the
- library would cause fflush to be loaded from it too.
- In fact there should be no need to call this (I hope). */
-
-_flsbuf (void)
-{
- error ("_flsbuf was actually called.");
-}
-
-fflush (int ign)
-{
-}
-
-/* Entries into core and inflow, needed only to make things link ok. */
-
-exec_file_command (void)
-{
-}
-
-core_file_command (void)
-{
-}
-
-char *
-get_exec_file (int err)
-{
- /* Makes one printout look reasonable; value does not matter otherwise. */
- return "run";
-}
-
-/* Nonzero if there is a core file. */
-
-have_core_file_p (void)
-{
- return 0;
-}
-
-kill_command (void)
-{
- inferior_ptid = null_ptid;
-}
-
-terminal_inferior (void)
-{
-}
-
-terminal_ours (void)
-{
-}
-
-terminal_init_inferior (void)
-{
-}
-
-write_inferior_register (void)
-{
-}
-
-read_inferior_register (void)
-{
-}
-
-read_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- memcpy (myaddr, memaddr, len);
-}
-
-/* Always return 0 indicating success. */
-
-write_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- memcpy (memaddr, myaddr, len);
- return 0;
-}
-
-static REGISTER_TYPE saved_regs[NUM_REGS];
-
-REGISTER_TYPE
-read_register (int regno)
-{
- if (regno < 0 || regno >= NUM_REGS)
- error ("Register number %d out of range.", regno);
- return saved_regs[regno];
-}
-
-void
-write_register (int regno, REGISTER_TYPE value)
-{
- if (regno < 0 || regno >= NUM_REGS)
- error ("Register number %d out of range.", regno);
- saved_regs[regno] = value;
-}
-
-/* System calls needed in relation to running the "inferior". */
-
-vfork (void)
-{
- /* Just appear to "succeed". Say the inferior's pid is 1. */
- return 1;
-}
-
-/* These are called by code that normally runs in the inferior
- that has just been forked. That code never runs, when standalone,
- and these definitions are so it will link without errors. */
-
-ptrace (void)
-{
-}
-
-setpgrp (void)
-{
-}
-
-execle (void)
-{
-}
-
-_exit (void)
-{
-}
-
-/* Malloc calls these. */
-
-malloc_warning (char *str)
-{
- printf ("\n%s.\n\n", str);
-}
-
-char *next_free;
-char *memory_limit;
-
-char *
-sbrk (int amount)
-{
- if (next_free + amount > memory_limit)
- return (char *) -1;
- next_free += amount;
- return next_free - amount;
-}
-
-/* Various ways malloc might ask where end of memory is. */
-
-char *
-ulimit (void)
-{
- return memory_limit;
-}
-
-int
-vlimit (void)
-{
- return memory_limit - next_free;
-}
-
-getrlimit (struct rlimit *addr)
-{
- addr->rlim_cur = memory_limit - next_free;
-}
-
-/* Context switching to and from program being debugged. */
-
-/* GDB calls here to run the user program.
- The frame pointer for this function is saved in
- gdb_stack by save_frame_pointer; then we restore
- all of the user program's registers, including PC and PS. */
-
-static int fault_code;
-static REGISTER_TYPE gdb_stack;
-
-resume (void)
-{
- REGISTER_TYPE restore[NUM_REGS];
-
- PUSH_FRAME_PTR;
- save_frame_pointer ();
-
- memcpy (restore, saved_regs, sizeof restore);
- POP_REGISTERS;
- /* Control does not drop through here! */
-}
-
-save_frame_pointer (CORE_ADDR val)
-{
- gdb_stack = val;
-}
-
-/* Fault handlers call here, running in the user program stack.
- They must first push a fault code,
- old PC, old PS, and any other info about the fault.
- The exact format is machine-dependent and is known only
- in the definition of PUSH_REGISTERS. */
-
-fault (void)
-{
- /* Transfer all registers and fault code to the stack
- in canonical order: registers in order of GDB register number,
- followed by fault code. */
- PUSH_REGISTERS;
-
- /* Transfer them to saved_regs and fault_code. */
- save_registers ();
-
- restore_gdb ();
- /* Control does not reach here */
-}
-
-restore_gdb (void)
-{
- CORE_ADDR new_fp = gdb_stack;
- /* Switch to GDB's stack */
- POP_FRAME_PTR;
- /* Return from the function `resume'. */
-}
-
-/* Assuming register contents and fault code have been pushed on the stack as
- arguments to this function, copy them into the standard place
- for the program's registers while GDB is running. */
-
-save_registers (int firstreg)
-{
- memcpy (saved_regs, &firstreg, sizeof saved_regs);
- fault_code = (&firstreg)[NUM_REGS];
-}
-
-/* Store into the structure such as `wait' would return
- the information on why the program faulted,
- converted into a machine-independent signal number. */
-
-static int fault_table[] = FAULT_TABLE;
-
-int
-wait (WAITTYPE *w)
-{
- WSETSTOP (*w, fault_table[fault_code / FAULT_CODE_UNITS]);
- return PIDGET (inferior_ptid);
-}
-
-/* Allocate a big space in which files for kdb to read will be stored.
- Whatever is left is where malloc can allocate storage.
-
- Initialize it, so that there will be space in the executable file
- for it. Then the files can be put into kdb by writing them into
- kdb's executable file. */
-
-/* The default size is as much space as we expect to be available
- for kdb to use! */
-
-#ifndef HEAP_SIZE
-#define HEAP_SIZE 400000
-#endif
-
-char heap[HEAP_SIZE] =
-{0};
-
-#ifndef STACK_SIZE
-#define STACK_SIZE 100000
-#endif
-
-int kdb_stack_beg[STACK_SIZE / sizeof (int)];
-int kdb_stack_end;
-
-_initialize_standalone (void)
-{
- char *next;
-
- /* Find start of data on files. */
-
- files_start = heap;
-
- /* Find the end of the data on files. */
-
- for (next = files_start; *(int *) next; next += *(int *) next)
- {
- }
-
- /* That is where free storage starts for sbrk to give out. */
- next_free = next;
-
- memory_limit = heap + sizeof heap;
-}
diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c
deleted file mode 100644
index 6c52d3388c2..00000000000
--- a/gdb/sun3-nat.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Host-dependent code for Sun-3 for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1999, 2000, 2001
- 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 "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#include <sys/ptrace.h>
-#define KERNEL /* To get floating point reg definitions */
-#include <machine/reg.h>
-
-static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
-
-void
-fetch_inferior_registers (int regno)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
-
- deprecated_registers_fetched ();
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers);
-
- if (FP0_REGNUM >= 0)
- ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-
- memcpy (deprecated_registers, &inferior_registers, 16 * 4);
- if (FP0_REGNUM >= 0)
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- &inferior_fp_registers, sizeof inferior_fp_registers.fps_regs);
-
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
- if (FP0_REGNUM >= 0)
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- &inferior_fp_registers.fps_control,
- sizeof inferior_fp_registers -
- sizeof inferior_fp_registers.fps_regs);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
-
- memcpy (&inferior_registers, deprecated_registers, 16 * 4);
- if (FP0_REGNUM >= 0)
- memcpy (&inferior_fp_registers,
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.fps_regs);
-
- inferior_registers.r_ps = *(int *) &&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc = *(int *) &&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
-
- if (FP0_REGNUM >= 0)
- memcpy (&inferior_fp_registers.fps_control,
- &&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- sizeof inferior_fp_registers -
- sizeof inferior_fp_registers.fps_regs);
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers);
- if (FP0_REGNUM >= 0)
- ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-}
-
-
-/* All of this stuff is only relevant if both host and target are sun3. */
-
-/* Provide registers to GDB from a core file.
-
- CORE_REG_SECT points to an array of bytes, which were obtained 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
- 2 --- the floating-point register set
-
- REG_ADDR isn't used. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- struct regs *regs = (struct regs *) core_reg_sect;
-
- if (which == 0)
- {
- if (core_reg_size < sizeof (struct regs))
- error ("Can't find registers in core file");
-
- memcpy (&deprecated_registers, (char *) regs, 16 * 4);
- supply_register (PS_REGNUM, (char *) &regs->r_ps);
- supply_register (PC_REGNUM, (char *) &regs->r_pc);
-
- }
- else if (which == 2)
- {
-
-#define fpustruct ((struct fpu *) core_reg_sect)
-
- if (core_reg_size >= sizeof (struct fpu))
- {
- if (FP0_REGNUM >= 0)
- {
- memcpy (&&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- fpustruct->f_fpstatus.fps_regs,
- sizeof fpustruct->f_fpstatus.fps_regs);
- memcpy (&&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- &fpustruct->f_fpstatus.fps_control,
- sizeof fpustruct->f_fpstatus -
- sizeof fpustruct->f_fpstatus.fps_regs);
- }
- }
- else
- fprintf_unfiltered (gdb_stderr,
- "Couldn't read float regs from core file\n");
- }
-}
-
-
-/* Register that we are able to handle sun3 core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns sun3_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_sun3 (void)
-{
- add_core_fns (&sun3_core_fns);
-}
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
new file mode 100644
index 00000000000..71991cffdef
--- /dev/null
+++ b/gdb/symfile-mem.c
@@ -0,0 +1,146 @@
+/* Reading symbol files from memory.
+
+ Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
+ 2001, 2002, 2003, 2004 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. */
+
+/* This file defines functions (and commands to exercise those
+ functions) for reading debugging information from object files
+ whose images are mapped directly into the inferior's memory. For
+ example, the Linux kernel maps a "syscall DSO" into each process's
+ address space; this DSO provides kernel-specific code for some
+ system calls.
+
+ At the moment, BFD only has functions for parsing object files from
+ memory for the ELF format, even though the general idea isn't
+ ELF-specific. This means that BFD only provides the functions GDB
+ needs when configured for ELF-based targets. So these functions
+ may only be compiled on ELF-based targets.
+
+ GDB has no idea whether it has been configured for an ELF-based
+ target or not: it just tries to handle whatever files it is given.
+ But this means there are no preprocessor symbols on which we could
+ make these functions' compilation conditional.
+
+ So, for the time being, we put these functions alone in this file,
+ and have .mt files reference them as appropriate. In the future, I
+ hope BFD will provide a format-independent bfd_from_remote_memory
+ entry point. */
+
+
+#include "defs.h"
+#include "symtab.h"
+#include "gdbcore.h"
+#include "objfiles.h"
+#include "gdbcmd.h"
+#include "target.h"
+#include "value.h"
+#include "symfile.h"
+
+
+/* Read inferior memory at ADDR to find the header of a loaded object file
+ and read its in-core symbols out of inferior memory. TEMPL is a bfd
+ representing the target's format. */
+static struct objfile *
+symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, int from_tty)
+{
+ struct objfile *objf;
+ struct bfd *nbfd;
+ struct bfd_section *sec;
+ bfd_vma loadbase;
+ struct section_addr_info *sai;
+ unsigned int i;
+
+ if (bfd_get_flavour (templ) != bfd_target_elf_flavour)
+ error ("add-symbol-file-from-memory not supported for this target");
+
+ nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
+ target_read_memory);
+ if (nbfd == NULL)
+ error ("Failed to read a valid object file image from memory.");
+
+ nbfd->filename = xstrdup ("shared object read from target memory");
+
+ if (!bfd_check_format (nbfd, bfd_object))
+ {
+ /* FIXME: should be checking for errors from bfd_close (for one thing,
+ on error it does not free all the storage associated with the
+ bfd). */
+ bfd_close (nbfd);
+ error ("Got object file from memory but can't read symbols: %s.",
+ bfd_errmsg (bfd_get_error ()));
+ }
+
+ sai = alloc_section_addr_info (bfd_count_sections (nbfd));
+ make_cleanup (xfree, sai);
+ i = 0;
+ for (sec = nbfd->sections; sec != NULL; sec = sec->next)
+ if ((bfd_get_section_flags (nbfd, sec) & (SEC_ALLOC|SEC_LOAD)) != 0)
+ {
+ sai->other[i].addr = bfd_get_section_vma (nbfd, sec) + loadbase;
+ sai->other[i].name = (char *) bfd_get_section_name (nbfd, sec);
+ sai->other[i].sectindex = sec->index;
+ ++i;
+ }
+
+ objf = symbol_file_add_from_bfd (nbfd, from_tty,
+ sai, 0, OBJF_SHARED);
+
+ /* This might change our ideas about frames already looked at. */
+ reinit_frame_cache ();
+
+ return objf;
+}
+
+
+static void
+add_symbol_file_from_memory_command (char *args, int from_tty)
+{
+ CORE_ADDR addr;
+ struct bfd *templ;
+
+ if (args == NULL)
+ error ("add-symbol-file-from-memory requires an expression argument");
+
+ addr = parse_and_eval_address (args);
+
+ /* We need some representative bfd to know the target we are looking at. */
+ if (symfile_objfile != NULL)
+ templ = symfile_objfile->obfd;
+ else
+ templ = exec_bfd;
+ if (templ == NULL)
+ error ("\
+Must use symbol-file or exec-file before add-symbol-file-from-memory.");
+
+ symbol_file_add_from_memory (templ, addr, from_tty);
+}
+
+
+void
+_initialize_symfile_mem (void)
+{
+ add_cmd ("add-symbol-file-from-memory", class_files,
+ add_symbol_file_from_memory_command,
+ "\
+Load the symbols out of memory from a dynamically loaded object file.\n\
+Give an expression for the address of the file's shared object file header.",
+ &cmdlist);
+
+}
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 19ae2943301..14e8ccd534c 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -60,28 +60,15 @@
#define O_BINARY 0
#endif
-#ifdef HPUXHPPA
-
-/* Some HP-UX related globals to clear when a new "main"
- symbol file is loaded. HP-specific. */
-
-extern int hp_som_som_object_present;
-extern int hp_cxx_exception_support_initialized;
-#define RESET_HP_UX_GLOBALS() do {\
- hp_som_som_object_present = 0; /* indicates HP-compiled code */ \
- hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \
- } while (0)
-#endif
-
-int (*ui_load_progress_hook) (const char *section, unsigned long num);
-void (*show_load_progress) (const char *section,
- unsigned long section_sent,
- unsigned long section_size,
- unsigned long total_sent,
+int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
+void (*deprecated_show_load_progress) (const char *section,
+ unsigned long section_sent,
+ unsigned long section_size,
+ unsigned long total_sent,
unsigned long total_size);
-void (*pre_add_symbol_hook) (char *);
-void (*post_add_symbol_hook) (void);
-void (*target_new_objfile_hook) (struct objfile *);
+void (*deprecated_pre_add_symbol_hook) (const char *);
+void (*deprecated_post_add_symbol_hook) (void);
+void (*deprecated_target_new_objfile_hook) (struct objfile *);
static void clear_symtab_users_cleanup (void *ignore);
@@ -208,8 +195,8 @@ compare_psymbols (const void *s1p, const void *s2p)
struct partial_symbol *const *s1 = s1p;
struct partial_symbol *const *s2 = s2p;
- return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1),
- SYMBOL_NATURAL_NAME (*s2));
+ return strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*s1),
+ SYMBOL_SEARCH_NAME (*s2));
}
void
@@ -294,8 +281,8 @@ psymtab_to_symtab (struct partial_symtab *pst)
return pst->symtab;
}
-/* Remember the lowest-addressed loadable section we've seen.
- This function is called via bfd_map_over_sections.
+/* Remember the lowest-addressed loadable section we've seen.
+ This function is called via bfd_map_over_sections.
In case of equal vmas, the section with the largest size becomes the
lowest-addressed loadable section.
@@ -337,6 +324,32 @@ alloc_section_addr_info (size_t num_sections)
return sap;
}
+
+/* Return a freshly allocated copy of ADDRS. The section names, if
+ any, are also freshly allocated copies of those in ADDRS. */
+struct section_addr_info *
+copy_section_addr_info (struct section_addr_info *addrs)
+{
+ struct section_addr_info *copy
+ = alloc_section_addr_info (addrs->num_sections);
+ int i;
+
+ copy->num_sections = addrs->num_sections;
+ for (i = 0; i < addrs->num_sections; i++)
+ {
+ copy->other[i].addr = addrs->other[i].addr;
+ if (addrs->other[i].name)
+ copy->other[i].name = xstrdup (addrs->other[i].name);
+ else
+ copy->other[i].name = NULL;
+ copy->other[i].sectindex = addrs->other[i].sectindex;
+ }
+
+ return copy;
+}
+
+
+
/* Build (allocate and populate) a section_addr_info struct from
an existing section table. */
@@ -352,12 +365,12 @@ build_section_addr_info_from_section_table (const struct section_table *start,
for (stp = start, oidx = 0; stp != end; stp++)
{
- if (bfd_get_section_flags (stp->bfd,
+ if (bfd_get_section_flags (stp->bfd,
stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD)
&& oidx < end - start)
{
sap->other[oidx].addr = stp->addr;
- sap->other[oidx].name
+ sap->other[oidx].name
= xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section));
sap->other[oidx].sectindex = stp->the_bfd_section->index;
oidx++;
@@ -388,21 +401,21 @@ init_objfile_sect_indices (struct objfile *objfile)
{
asection *sect;
int i;
-
+
sect = bfd_get_section_by_name (objfile->obfd, ".text");
- if (sect)
+ if (sect)
objfile->sect_index_text = sect->index;
sect = bfd_get_section_by_name (objfile->obfd, ".data");
- if (sect)
+ if (sect)
objfile->sect_index_data = sect->index;
sect = bfd_get_section_by_name (objfile->obfd, ".bss");
- if (sect)
+ if (sect)
objfile->sect_index_bss = sect->index;
sect = bfd_get_section_by_name (objfile->obfd, ".rodata");
- if (sect)
+ if (sect)
objfile->sect_index_rodata = sect->index;
/* This is where things get really weird... We MUST have valid
@@ -437,7 +450,7 @@ init_objfile_sect_indices (struct objfile *objfile)
/* Parse the user's idea of an offset for dynamic linking, into our idea
- of how to represent it for fast symbol reading. This is the default
+ of how to represent it for fast symbol reading. This is the default
version of the sym_fns.sym_offsets function for symbol readers that
don't need to do anything special. It allocates a section_offsets table
for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */
@@ -450,9 +463,9 @@ default_symfile_offsets (struct objfile *objfile,
objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->objfile_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
- memset (objfile->section_offsets, 0,
+ memset (objfile->section_offsets, 0,
SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* Now calculate offsets for section that were specified by the
@@ -537,7 +550,7 @@ syms_from_objfile (struct objfile *objfile,
no load address was specified. */
if (! addrs && ! offsets)
{
- local_addr
+ local_addr
= alloc_section_addr_info (bfd_count_sections (objfile->obfd));
make_cleanup (xfree, local_addr);
addrs = local_addr;
@@ -580,7 +593,7 @@ syms_from_objfile (struct objfile *objfile,
CORE_ADDR lower_offset;
int i;
- /* Find lowest loadable section to be used as starting point for
+ /* Find lowest loadable section to be used as starting point for
continguous sections. FIXME!! won't work without call to find
.text first, but this assumes text is lowest section. */
lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
@@ -590,7 +603,7 @@ syms_from_objfile (struct objfile *objfile,
if (lower_sect == NULL)
warning ("no loadable sections found in added symbol-file %s",
objfile->name);
- else
+ else
if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0)
warning ("Lowest section in %s is %s at %s",
objfile->name,
@@ -600,11 +613,11 @@ syms_from_objfile (struct objfile *objfile,
lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
else
lower_offset = 0;
-
+
/* Calculate offsets for the loadable sections.
FIXME! Sections must be in order of increasing loadable section
so that contiguous sections can use the lower-offset!!!
-
+
Adjust offsets if the segments are not contiguous.
If the section is contiguous, its offset should be set to
the offset of the highest loadable section lower than it
@@ -628,7 +641,7 @@ syms_from_objfile (struct objfile *objfile,
else
{
warning ("section %s not found in %s",
- addrs->other[i].name,
+ addrs->other[i].name,
objfile->name);
addrs->other[i].addr = 0;
}
@@ -684,24 +697,24 @@ syms_from_objfile (struct objfile *objfile,
{
struct obj_section *s;
- /* Map section offsets in "addr" back to the object's
- sections by comparing the section names with bfd's
+ /* Map section offsets in "addr" back to the object's
+ sections by comparing the section names with bfd's
section names. Then adjust the section address by
the offset. */ /* for gdb/13815 */
-
+
ALL_OBJFILE_OSECTIONS (objfile, s)
{
CORE_ADDR s_addr = 0;
int i;
- for (i = 0;
+ for (i = 0;
!s_addr && i < addrs->num_sections && addrs->other[i].name;
i++)
- if (strcmp (bfd_section_name (s->objfile->obfd,
- s->the_bfd_section),
+ if (strcmp (bfd_section_name (s->objfile->obfd,
+ s->the_bfd_section),
addrs->other[i].name) == 0)
s_addr = addrs->other[i].addr; /* end added for gdb/13815 */
-
+
s->addr -= s->offset;
s->addr += s_addr;
s->endaddr -= s->offset;
@@ -761,8 +774,8 @@ new_symfile_objfile (struct objfile *objfile, int mainline, int verbo)
/* Process a symbol file, as either the main file or as a dynamically
loaded file.
- NAME is the file name (which will be tilde-expanded and made
- absolute herein) (but we don't free or modify NAME itself).
+ ABFD is a BFD already open on the file, as from symfile_bfd_open.
+ This BFD will be closed on error, and is always consumed by this function.
FROM_TTY says how verbose to be.
@@ -776,7 +789,7 @@ new_symfile_objfile (struct objfile *objfile, int mainline, int verbo)
Upon success, returns a pointer to the objfile that was added.
Upon failure, jumps back to command level (never returns). */
static struct objfile *
-symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
+symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty,
struct section_addr_info *addrs,
struct section_offsets *offsets,
int num_offsets,
@@ -785,14 +798,14 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
struct objfile *objfile;
struct partial_symtab *psymtab;
char *debugfile;
- bfd *abfd;
- struct section_addr_info *orig_addrs;
+ struct section_addr_info *orig_addrs = NULL;
struct cleanup *my_cleanups;
+ const char *name = bfd_get_filename (abfd);
- /* Open a bfd for the file, and give user a chance to burp if we'd be
- interactively wiping out any existing symbols. */
+ my_cleanups = make_cleanup_bfd_close (abfd);
- abfd = symfile_bfd_open (name);
+ /* Give user a chance to burp if we'd be
+ interactively wiping out any existing symbols. */
if ((have_full_symbols () || have_partial_symbols ())
&& mainline
@@ -801,15 +814,12 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
error ("Not confirmed.");
objfile = allocate_objfile (abfd, flags);
+ discard_cleanups (my_cleanups);
- orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
- my_cleanups = make_cleanup (xfree, orig_addrs);
if (addrs)
{
- int i;
- orig_addrs->num_sections = addrs->num_sections;
- for (i = 0; i < addrs->num_sections; i++)
- orig_addrs->other[i] = addrs->other[i];
+ orig_addrs = copy_section_addr_info (addrs);
+ make_cleanup_free_section_addr_info (orig_addrs);
}
/* We either created a new mapped symbol table, mapped an existing
@@ -817,8 +827,8 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
performed, or need to read an unmapped symbol table. */
if (from_tty || info_verbose)
{
- if (pre_add_symbol_hook)
- pre_add_symbol_hook (name);
+ if (deprecated_pre_add_symbol_hook)
+ deprecated_pre_add_symbol_hook (name);
else
{
printf_unfiltered ("Reading symbols from %s...", name);
@@ -866,25 +876,29 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
}
objfile->separate_debug_objfile->separate_debug_objfile_backlink
= objfile;
-
+
/* Put the separate debug object before the normal one, this is so that
usage of the ALL_OBJFILES_SAFE macro will stay safe. */
put_objfile_before (objfile->separate_debug_objfile, objfile);
-
+
xfree (debugfile);
}
-
+
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
- printf_unfiltered ("(no debugging symbols found)...");
+ printf_filtered ("(no debugging symbols found)");
+ if (from_tty || info_verbose)
+ printf_filtered ("...");
+ else
+ printf_filtered ("\n");
wrap_here ("");
}
if (from_tty || info_verbose)
{
- if (post_add_symbol_hook)
- post_add_symbol_hook ();
+ if (deprecated_post_add_symbol_hook)
+ deprecated_post_add_symbol_hook ();
else
{
printf_unfiltered ("done.\n");
@@ -903,13 +917,30 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
new_symfile_objfile (objfile, mainline, from_tty);
- if (target_new_objfile_hook)
- target_new_objfile_hook (objfile);
+ if (deprecated_target_new_objfile_hook)
+ deprecated_target_new_objfile_hook (objfile);
+ bfd_cache_close_all ();
return (objfile);
}
+/* Process the symbol file ABFD, as either the main file or as a
+ dynamically loaded file.
+
+ See symbol_file_add_with_addrs_or_offsets's comments for
+ details. */
+struct objfile *
+symbol_file_add_from_bfd (bfd *abfd, int from_tty,
+ struct section_addr_info *addrs,
+ int mainline, int flags)
+{
+ return symbol_file_add_with_addrs_or_offsets (abfd,
+ from_tty, addrs, 0, 0,
+ mainline, flags);
+}
+
+
/* Process a symbol file, as either the main file or as a dynamically
loaded file. See symbol_file_add_with_addrs_or_offsets's comments
for details. */
@@ -917,8 +948,8 @@ struct objfile *
symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
int mainline, int flags)
{
- return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0,
- mainline, flags);
+ return symbol_file_add_from_bfd (symfile_bfd_open (name), from_tty,
+ addrs, mainline, flags);
}
@@ -929,7 +960,7 @@ symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
The auxiliary function, symbol_file_add_main_1(), has the flags
argument for the switches that can only be specified in the symbol_file
command itself. */
-
+
void
symbol_file_add_main (char *args, int from_tty)
{
@@ -941,10 +972,6 @@ symbol_file_add_main_1 (char *args, int from_tty, int flags)
{
symbol_file_add (args, from_tty, NULL, 1, flags);
-#ifdef HPUXHPPA
- RESET_HP_UX_GLOBALS ();
-#endif
-
/* Getting new symbols may change our opinion about
what is frameless. */
reinit_frame_cache ();
@@ -973,9 +1000,6 @@ symbol_file_clear (int from_tty)
symfile_objfile = NULL;
if (from_tty)
printf_unfiltered ("No symbol file now.\n");
-#ifdef HPUXHPPA
- RESET_HP_UX_GLOBALS ();
-#endif
}
static char *
@@ -987,14 +1011,14 @@ get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
char *contents;
int crc_offset;
unsigned char *p;
-
+
sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink");
if (sect == NULL)
return NULL;
debuglink_size = bfd_section_size (objfile->obfd, sect);
-
+
contents = xmalloc (debuglink_size);
bfd_get_section_contents (objfile->obfd, sect, contents,
(file_ptr)0, (bfd_size_type)debuglink_size);
@@ -1004,7 +1028,7 @@ get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
crc_offset = (crc_offset + 3) & ~3;
crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset));
-
+
*crc32_out = crc32;
return contents;
}
@@ -1051,7 +1075,7 @@ find_separate_debug_file (struct objfile *objfile)
if (basename == NULL)
return NULL;
-
+
dir = xstrdup (objfile->name);
/* Strip off the final filename part, leaving the directory name,
@@ -1065,12 +1089,12 @@ find_separate_debug_file (struct objfile *objfile)
}
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
dir[i+1] = '\0';
-
+
debugfile = alloca (strlen (debug_file_directory) + 1
+ strlen (dir)
+ strlen (DEBUG_SUBDIRECTORY)
+ strlen ("/")
- + strlen (basename)
+ + strlen (basename)
+ 1);
/* First try in the same directory as the original file. */
@@ -1083,7 +1107,7 @@ find_separate_debug_file (struct objfile *objfile)
xfree (dir);
return xstrdup (debugfile);
}
-
+
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
strcpy (debugfile, dir);
strcat (debugfile, DEBUG_SUBDIRECTORY);
@@ -1096,7 +1120,7 @@ find_separate_debug_file (struct objfile *objfile)
xfree (dir);
return xstrdup (debugfile);
}
-
+
/* Then try in the global debugfile directory. */
strcpy (debugfile, debug_file_directory);
strcat (debugfile, "/");
@@ -1109,7 +1133,7 @@ find_separate_debug_file (struct objfile *objfile)
xfree (dir);
return xstrdup (debugfile);
}
-
+
xfree (basename);
xfree (dir);
return NULL;
@@ -1160,7 +1184,7 @@ symbol_file_command (char *args, int from_tty)
else
{
name = *argv;
-
+
symbol_file_add_main_1 (name, from_tty, flags);
}
argv++;
@@ -1224,14 +1248,15 @@ symfile_bfd_open (char *name)
name = tilde_expand (name); /* Returns 1st new malloc'd copy */
/* Look down path for it, allocate 2nd new malloc'd copy. */
- desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name);
+ desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, name, O_RDONLY | O_BINARY,
+ 0, &absolute_name);
#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__)
if (desc < 0)
{
char *exename = alloca (strlen (name) + 5);
strcat (strcpy (exename, name), ".exe");
- desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY,
- 0, &absolute_name);
+ desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename,
+ O_RDONLY | O_BINARY, 0, &absolute_name);
}
#endif
if (desc < 0)
@@ -1353,7 +1378,7 @@ add_section_size_callback (bfd *abfd, asection *asec, void *data)
{
bfd_size_type *sum = data;
- *sum += bfd_get_section_size_before_reloc (asec);
+ *sum += bfd_get_section_size (asec);
}
/* Opaque data for load_section_callback. */
@@ -1373,7 +1398,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
if (bfd_get_section_flags (abfd, asec) & SEC_LOAD)
{
- bfd_size_type size = bfd_get_section_size_before_reloc (asec);
+ bfd_size_type size = bfd_get_section_size (asec);
if (size > 0)
{
char *buffer;
@@ -1422,7 +1447,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
that. remote.c could implement that method
using the ``qCRC'' packet. */
char *check = xmalloc (len);
- struct cleanup *verify_cleanups =
+ struct cleanup *verify_cleanups =
make_cleanup (xfree, check);
if (target_read_memory (lma, check, len) != 0)
@@ -1439,13 +1464,14 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
args->write_count += 1;
sent += len;
if (quit_flag
- || (ui_load_progress_hook != NULL
- && ui_load_progress_hook (sect_name, sent)))
+ || (deprecated_ui_load_progress_hook != NULL
+ && deprecated_ui_load_progress_hook (sect_name, sent)))
error ("Canceled the download");
- if (show_load_progress != NULL)
- show_load_progress (sect_name, sent, size,
- args->data_count, args->total_size);
+ if (deprecated_show_load_progress != NULL)
+ deprecated_show_load_progress (sect_name, sent, size,
+ args->data_count,
+ args->total_size);
}
while (sent < size);
@@ -1511,7 +1537,7 @@ generic_load (char *args, int from_tty)
bfd_errmsg (bfd_get_error ()));
}
- bfd_map_over_sections (loadfile_bfd, add_section_size_callback,
+ bfd_map_over_sections (loadfile_bfd, add_section_size_callback,
(void *) &cbdata.total_size);
start_time = time (NULL);
@@ -1534,9 +1560,9 @@ generic_load (char *args, int from_tty)
to a comment from remote-mips.c (where a call to symbol_file_add
was commented out), making the call confuses GDB if more than one
file is loaded in. Some targets do (e.g., remote-vx.c) but
- others don't (or didn't - perhaphs they have all been deleted). */
+ others don't (or didn't - perhaps they have all been deleted). */
- print_transfer_performance (gdb_stdout, cbdata.data_count,
+ print_transfer_performance (gdb_stdout, cbdata.data_count,
cbdata.write_count, end_time - start_time);
do_cleanups (old_cleanups);
@@ -1552,7 +1578,7 @@ void
report_transfer_performance (unsigned long data_count, time_t start_time,
time_t end_time)
{
- print_transfer_performance (gdb_stdout, data_count,
+ print_transfer_performance (gdb_stdout, data_count,
end_time - start_time, 0);
}
@@ -1565,14 +1591,14 @@ print_transfer_performance (struct ui_file *stream,
ui_out_text (uiout, "Transfer rate: ");
if (time_count > 0)
{
- ui_out_field_fmt (uiout, "transfer-rate", "%lu",
+ ui_out_field_fmt (uiout, "transfer-rate", "%lu",
(data_count * 8) / time_count);
ui_out_text (uiout, " bits/sec");
}
else
{
ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8));
- ui_out_text (uiout, " bits in <1 sec");
+ ui_out_text (uiout, " bits in <1 sec");
}
if (write_count > 0)
{
@@ -1618,7 +1644,7 @@ add_symbol_file_command (char *args, int from_tty)
struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);
num_sect_opts = 16;
- sect_opts = (struct sect_opt *) xmalloc (num_sect_opts
+ sect_opts = (struct sect_opt *) xmalloc (num_sect_opts
* sizeof (struct sect_opt));
dont_repeat ();
@@ -1661,12 +1687,12 @@ 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;
- if (++section_index > num_sect_opts)
+ if (++section_index > num_sect_opts)
{
num_sect_opts *= 2;
- sect_opts = ((struct sect_opt *)
+ sect_opts = ((struct sect_opt *)
xrealloc (sect_opts,
- num_sect_opts
+ num_sect_opts
* sizeof (struct sect_opt)));
}
}
@@ -1697,12 +1723,12 @@ add_symbol_file_command (char *args, int from_tty)
{
sect_opts[section_index].value = arg;
expecting_sec_addr = 0;
- if (++section_index > num_sect_opts)
+ if (++section_index > num_sect_opts)
{
num_sect_opts *= 2;
- sect_opts = ((struct sect_opt *)
+ sect_opts = ((struct sect_opt *)
xrealloc (sect_opts,
- num_sect_opts
+ num_sect_opts
* sizeof (struct sect_opt)));
}
}
@@ -1716,9 +1742,9 @@ add_symbol_file_command (char *args, int from_tty)
/* Print the prompt for the query below. And save the arguments into
a sect_addr_info structure to be passed around to other
functions. We have to split this up into separate print
- statements because local_hex_string returns a local static
+ statements because hex_string returns a local static
string. */
-
+
printf_unfiltered ("add symbol table from file \"%s\" at\n", filename);
section_addrs = alloc_section_addr_info (section_index);
make_cleanup (xfree, section_addrs);
@@ -1727,7 +1753,7 @@ add_symbol_file_command (char *args, int from_tty)
CORE_ADDR addr;
char *val = sect_opts[i].value;
char *sec = sect_opts[i].name;
-
+
addr = parse_and_eval_address (val);
/* Here we store the section offsets in the order they were
@@ -1735,13 +1761,12 @@ add_symbol_file_command (char *args, int from_tty)
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
printf_unfiltered ("\t%s_addr = %s\n",
- sec,
- local_hex_string ((unsigned long)addr));
+ sec, hex_string ((unsigned long)addr));
sec_num++;
- /* The object's sections are initialized when a
+ /* The object's sections are initialized when a
call is made to build_objfile_section_table (objfile).
- This happens in reread_symbols.
+ This happens in reread_symbols.
At this point, we don't know what file type this is,
so we can't determine what section names are valid. */
}
@@ -1846,9 +1871,9 @@ reread_symbols (void)
/* Save the offsets, we will nuke them with the rest of the
objfile_obstack. */
num_offsets = objfile->num_sections;
- offsets = ((struct section_offsets *)
+ offsets = ((struct section_offsets *)
alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets)));
- memcpy (offsets, objfile->section_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
@@ -1858,11 +1883,11 @@ reread_symbols (void)
/* FIXME: Do we have to free a whole linked list, or is this
enough? */
if (objfile->global_psymbols.list)
- xmfree (objfile->md, objfile->global_psymbols.list);
+ xfree (objfile->global_psymbols.list);
memset (&objfile->global_psymbols, 0,
sizeof (objfile->global_psymbols));
if (objfile->static_psymbols.list)
- xmfree (objfile->md, objfile->static_psymbols.list);
+ xfree (objfile->static_psymbols.list);
memset (&objfile->static_psymbols, 0,
sizeof (objfile->static_psymbols));
@@ -1915,9 +1940,9 @@ 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->objfile_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
SIZEOF_N_SECTION_OFFSETS (num_offsets));
- memcpy (objfile->section_offsets, offsets,
+ memcpy (objfile->section_offsets, offsets,
SIZEOF_N_SECTION_OFFSETS (num_offsets));
objfile->num_sections = num_offsets;
@@ -1927,9 +1952,6 @@ reread_symbols (void)
if (objfile == symfile_objfile)
{
(*objfile->sf->sym_new_init) (objfile);
-#ifdef HPUXHPPA
- RESET_HP_UX_GLOBALS ();
-#endif
}
(*objfile->sf->sym_init) (objfile);
@@ -2002,7 +2024,7 @@ reread_separate_symbols (struct objfile *objfile)
separated debug info, or
- if the new primary objfile has separate debug
info, but it's under a different filename.
-
+
If the old and new objfiles both have separate
debug info, under the same filename, then we're
okay --- if the separated file's contents have
@@ -2023,7 +2045,7 @@ reread_separate_symbols (struct objfile *objfile)
Preserve the flags from objfile that make sense. */
objfile->separate_debug_objfile
= (symbol_file_add_with_addrs_or_offsets
- (debug_file,
+ (symfile_bfd_open (debug_file),
info_verbose, /* from_tty: Don't override the default. */
0, /* No addr table. */
objfile->section_offsets, objfile->num_sections,
@@ -2055,7 +2077,7 @@ add_filename_language (char *ext, enum language lang)
if (fl_table_next >= fl_table_size)
{
fl_table_size += 10;
- filename_language_table =
+ filename_language_table =
xrealloc (filename_language_table,
fl_table_size * sizeof (*filename_language_table));
}
@@ -2310,8 +2332,8 @@ clear_symtab_users (void)
set_default_breakpoint (0, 0, 0, 0);
clear_current_source_symtab_and_line ();
clear_pc_function_cache ();
- if (target_new_objfile_hook)
- target_new_objfile_hook (NULL);
+ if (deprecated_target_new_objfile_hook)
+ deprecated_target_new_objfile_hook (NULL);
}
static void
@@ -2324,7 +2346,7 @@ clear_symtab_users_cleanup (void *ignore)
This function is run after symbol reading, or from a cleanup.
If an old symbol table was obsoleted, the old symbol table
- has been blown away, but the other GDB data structures that may
+ has been blown away, but the other GDB data structures that may
reference it have not yet been cleared or re-directed. (The old
symtab was zapped, and the cleanup queued, in free_named_symtab()
below.)
@@ -2549,7 +2571,7 @@ start_psymtab_common (struct objfile *objfile,
}
/* Add a symbol with a long value to a psymtab.
- Since one arg is a struct, we pass in a ptr and deref it (sigh).
+ Since one arg is a struct, we pass in a ptr and deref it (sigh).
Return the partial symbol that has been added. */
/* NOTE: carlton/2003-09-11: The reason why we return the partial
@@ -2689,11 +2711,11 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
if (objfile->global_psymbols.list)
{
- xmfree (objfile->md, objfile->global_psymbols.list);
+ xfree (objfile->global_psymbols.list);
}
if (objfile->static_psymbols.list)
{
- xmfree (objfile->md, objfile->static_psymbols.list);
+ xfree (objfile->static_psymbols.list);
}
/* Current best guess is that approximately a twentieth
@@ -2707,15 +2729,15 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
{
objfile->global_psymbols.next =
objfile->global_psymbols.list = (struct partial_symbol **)
- xmmalloc (objfile->md, (objfile->global_psymbols.size
- * sizeof (struct partial_symbol *)));
+ xmalloc ((objfile->global_psymbols.size
+ * sizeof (struct partial_symbol *)));
}
if (objfile->static_psymbols.size > 0)
{
objfile->static_psymbols.next =
objfile->static_psymbols.list = (struct partial_symbol **)
- xmmalloc (objfile->md, (objfile->static_psymbols.size
- * sizeof (struct partial_symbol *)));
+ xmalloc ((objfile->static_psymbols.size
+ * sizeof (struct partial_symbol *)));
}
}
@@ -2727,10 +2749,10 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
same VMA, each with its own unique LMA (or load address).
2) It is assumed that some runtime mechanism exists for mapping the
sections, one by one, from the load address into the VMA address.
- 3) This code provides a mechanism for gdb to keep track of which
+ 3) This code provides a mechanism for gdb to keep track of which
sections should be considered to be mapped from the VMA to the LMA.
This information is used for symbol lookup, and memory read/write.
- For instance, if a section has been mapped then its contents
+ For instance, if a section has been mapped then its contents
should be read from the VMA, otherwise from the LMA.
Two levels of debugger support for overlays are available. One is
@@ -2754,7 +2776,7 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
Functional interface:
find_pc_mapped_section(pc): if the pc is in the range of a mapped
section, return that section.
- find_pc_overlay(pc): find any overlay section that contains
+ find_pc_overlay(pc): find any overlay section that contains
the pc, either in its VMA or its LMA
overlay_is_mapped(sect): true if overlay is marked as mapped
section_is_overlay(sect): true if section's VMA != LMA
@@ -2778,7 +2800,7 @@ static void simple_overlay_update (struct obj_section *);
void (*target_overlay_update) (struct obj_section *) = simple_overlay_update;
/* Function: section_is_overlay (SECTION)
- Returns true if SECTION has VMA not equal to LMA, ie.
+ Returns true if SECTION has VMA not equal to LMA, ie.
SECTION is loaded at an address different from where it will "run". */
int
@@ -2809,7 +2831,7 @@ overlay_invalidate_all (void)
}
/* Function: overlay_is_mapped (SECTION)
- Returns true if section is an overlay, and is currently mapped.
+ Returns true if section is an overlay, and is currently mapped.
Private: public access is thru function section_is_mapped.
Access to the ovly_mapped flag is restricted to this function, so
@@ -2830,7 +2852,7 @@ overlay_is_mapped (struct obj_section *osect)
case ovly_off:
return 0; /* overlay debugging off */
case ovly_auto: /* overlay debugging automatic */
- /* Unles there is a target_overlay_update function,
+ /* Unles there is a target_overlay_update function,
there's really nothing useful to do here (can't really go auto) */
if (target_overlay_update)
{
@@ -2879,7 +2901,7 @@ pc_in_unmapped_range (CORE_ADDR pc, asection *section)
if (overlay_debugging)
if (section && section_is_overlay (section))
{
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (section->lma <= pc && pc < section->lma + size)
return 1;
}
@@ -2899,7 +2921,7 @@ pc_in_mapped_range (CORE_ADDR pc, asection *section)
if (overlay_debugging)
if (section && section_is_overlay (section))
{
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (section->vma <= pc && pc < section->vma + size)
return 1;
}
@@ -2915,9 +2937,9 @@ sections_overlap (asection *a, asection *b)
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */
CORE_ADDR a_start = a->vma;
- CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a);
+ CORE_ADDR a_end = a->vma + bfd_get_section_size (a);
CORE_ADDR b_start = b->vma;
- CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b);
+ CORE_ADDR b_end = b->vma + bfd_get_section_size (b);
return (a_start < b_end && b_start < a_end);
}
@@ -2957,7 +2979,7 @@ overlay_mapped_address (CORE_ADDR pc, asection *section)
}
-/* Function: symbol_overlayed_address
+/* Function: symbol_overlayed_address
Return one of two addresses (relative to the VMA or to the LMA),
depending on whether the section is mapped or not. */
@@ -2984,7 +3006,7 @@ symbol_overlayed_address (CORE_ADDR address, asection *section)
return address;
}
-/* Function: find_pc_overlay (PC)
+/* Function: find_pc_overlay (PC)
Return the best-match overlay section for PC:
If PC matches a mapped overlay section's VMA, return that section.
Else if PC matches an unmapped section's VMA, return that section.
@@ -3014,7 +3036,7 @@ find_pc_overlay (CORE_ADDR pc)
}
/* Function: find_pc_mapped_section (PC)
- If PC falls into the VMA address range of an overlay section that is
+ If PC falls into the VMA address range of an overlay section that is
currently marked as MAPPED, return that section. Else return NULL. */
asection *
@@ -3052,7 +3074,7 @@ list_overlays_command (char *args, int from_tty)
vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section);
lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section);
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (osect->the_bfd_section);
name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
printf_filtered ("Section %s, loaded at ", name);
@@ -3122,7 +3144,7 @@ the 'overlay manual' command.");
}
/* Function: unmap_overlay_command
- Mark the overlay section as unmapped
+ Mark the overlay section as unmapped
(ie. resident in its LMA address range, rather than the VMA range). */
void
@@ -3216,10 +3238,10 @@ overlay_command (char *args, int from_tty)
/* Target Overlays for the "Simplest" overlay manager:
- This is GDB's default target overlay layer. It works with the
- minimal overlay manager supplied as an example by Cygnus. The
- entry point is via a function pointer "target_overlay_update",
- so targets that use a different runtime overlay manager can
+ This is GDB's default target overlay layer. It works with the
+ minimal overlay manager supplied as an example by Cygnus. The
+ entry point is via a function pointer "target_overlay_update",
+ so targets that use a different runtime overlay manager can
substitute their own overlay_update function and take over the
function pointer.
@@ -3377,7 +3399,7 @@ simple_read_overlay_region_table (void)
}
#endif
-/* Function: simple_overlay_update_1
+/* Function: simple_overlay_update_1
A helper function for simple_overlay_update. Assuming a cached copy
of _ovly_table exists, look through it to find an entry whose vma,
lma and size match those of OSECT. Re-read the entry and make sure
@@ -3392,7 +3414,7 @@ simple_overlay_update_1 (struct obj_section *osect)
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (osect->the_bfd_section);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
@@ -3414,11 +3436,11 @@ simple_overlay_update_1 (struct obj_section *osect)
}
/* Function: simple_overlay_update
- If OSECT is NULL, then update all sections' mapped state
- (after re-reading the entire target _ovly_table).
- If OSECT is non-NULL, then try to find a matching entry in the
+ If OSECT is NULL, then update all sections' mapped state
+ (after re-reading the entire target _ovly_table).
+ If OSECT is non-NULL, then try to find a matching entry in the
cached ovly_table and update only OSECT's mapped state.
- If a cached entry can't be found or the cache isn't valid, then
+ If a cached entry can't be found or the cache isn't valid, then
re-read the entire cache, and go ahead and update all sections. */
static void
@@ -3453,7 +3475,7 @@ simple_overlay_update (struct obj_section *osect)
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (bsect);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
@@ -3538,7 +3560,7 @@ with the text. SECT is a section name to be loaded at SECT_ADDR.",
for access from GDB.", &cmdlist);
set_cmd_completer (c, filename_completer);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("symbol-reloading", class_support, var_boolean,
(char *) &symbol_reloading,
"Set dynamic symbol table reloading multiple times in one run.",
@@ -3582,7 +3604,7 @@ Usage: set extension-language .foo bar",
add_info ("extensions", info_ext_lang_command,
"All filename extensions associated with a source language.");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("download-write-size", class_obscure,
var_integer, (char *) &download_write_size,
"Set the write size used when downloading a program.\n"
@@ -3600,11 +3622,11 @@ Usage: set extension-language .foo bar",
(char *) &debug_file_directory,
"Set the directory where separate debug symbols are searched for.\n"
"Separate debug symbols are first searched for in the same\n"
- "directory as the binary, then in the `" DEBUG_SUBDIRECTORY
+ "directory as the binary, then in the `" DEBUG_SUBDIRECTORY
"' subdirectory,\n"
"and lastly at the path of the directory of the binary with\n"
"the global debug-file directory prepended\n",
&setlist));
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_completer (c, filename_completer);
}
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 6b600ea47f7..0fa9c46a34b 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -189,11 +189,20 @@ extern void new_symfile_objfile (struct objfile *, int, int);
extern struct objfile *symbol_file_add (char *, int,
struct section_addr_info *, int, int);
+extern struct objfile *symbol_file_add_from_bfd (bfd *, int,
+ struct section_addr_info *,
+ int, int);
+
/* Create a new section_addr_info, with room for NUM_SECTIONS. */
extern struct section_addr_info *alloc_section_addr_info (size_t
num_sections);
+/* Return a freshly allocated copy of ADDRS. The section names, if
+ any, are also freshly allocated copies of those in ADDRS. */
+extern struct section_addr_info *(copy_section_addr_info
+ (struct section_addr_info *addrs));
+
/* Build (allocate and populate) a section_addr_info struct from an
existing section table. */
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index c17bda4783d..45e2a44ecd7 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -99,12 +99,12 @@ free_symtab_block (struct objfile *objfile, struct block *b)
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
- xmfree (objfile->md, sym);
+ xfree (DEPRECATED_SYMBOL_NAME (sym));
+ xfree (sym);
}
dict_free (BLOCK_DICT (b));
- xmfree (objfile->md, b);
+ xfree (b);
}
/* Free all the storage associated with the struct symtab <- S.
@@ -138,7 +138,7 @@ free_symtab (struct symtab *s)
for (i = 0; i < n; i++)
free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
/* Free the blockvector itself. */
- xmfree (s->objfile->md, bv);
+ xfree (bv);
/* Also free the linetable. */
case free_linetable:
@@ -146,7 +146,7 @@ free_symtab (struct symtab *s)
or by some other symtab, except for our linetable.
Free that now. */
if (LINETABLE (s))
- xmfree (s->objfile->md, LINETABLE (s));
+ xfree (LINETABLE (s));
break;
}
@@ -156,12 +156,12 @@ free_symtab (struct symtab *s)
/* Free source-related stuff */
if (s->line_charpos != NULL)
- xmfree (s->objfile->md, s->line_charpos);
+ xfree (s->line_charpos);
if (s->fullname != NULL)
- xmfree (s->objfile->md, s->fullname);
+ xfree (s->fullname);
if (s->debugformat != NULL)
- xmfree (s->objfile->md, s->debugformat);
- xmfree (s->objfile->md, s);
+ xfree (s->debugformat);
+ xfree (s);
}
void
@@ -1232,14 +1232,14 @@ extend_psymbol_list (struct psymbol_allocation_list *listp,
{
new_size = 255;
listp->list = (struct partial_symbol **)
- xmmalloc (objfile->md, new_size * sizeof (struct partial_symbol *));
+ xmalloc (new_size * sizeof (struct partial_symbol *));
}
else
{
new_size = listp->size * 2;
listp->list = (struct partial_symbol **)
- xmrealloc (objfile->md, (char *) listp->list,
- new_size * sizeof (struct partial_symbol *));
+ xrealloc ((char *) listp->list,
+ new_size * sizeof (struct partial_symbol *));
}
/* Next assumes we only went one over. Should be good if
program works correctly */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 6995891b5ae..46325db11b7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -114,9 +114,9 @@ struct symbol *lookup_symbol_aux_minsyms (const char *name,
struct symtab **symtab);
#endif
-/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */
-/* Signals the presence of objects compiled by HP compilers */
-int hp_som_som_object_present = 0;
+/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c.
+ Signals the presence of objects compiled by HP compilers. */
+int deprecated_hp_som_som_object_present = 0;
static void fixup_section (struct general_symbol_info *, struct objfile *);
@@ -181,21 +181,25 @@ got_symtab:
if (full_path != NULL)
{
- const char *fp = symtab_to_filename (s);
- if (FILENAME_CMP (full_path, fp) == 0)
- {
- return s;
- }
+ const char *fp = symtab_to_fullname (s);
+ if (fp != NULL && FILENAME_CMP (full_path, fp) == 0)
+ {
+ return s;
+ }
}
if (real_path != NULL)
{
- char *rp = gdb_realpath (symtab_to_filename (s));
- make_cleanup (xfree, rp);
- if (FILENAME_CMP (real_path, rp) == 0)
- {
- return s;
- }
+ char *fullname = symtab_to_fullname (s);
+ if (fullname != NULL)
+ {
+ char *rp = gdb_realpath (fullname);
+ make_cleanup (xfree, rp);
+ if (FILENAME_CMP (real_path, rp) == 0)
+ {
+ return s;
+ }
+ }
}
}
@@ -427,9 +431,9 @@ create_demangled_names_hash (struct objfile *objfile)
Choosing a much larger table size wastes memory, and saves only about
1% in symbol reading. */
- objfile->demangled_names_hash = htab_create_alloc_ex
+ objfile->demangled_names_hash = htab_create_alloc
(256, htab_hash_string, (int (*) (const void *, const void *)) streq,
- NULL, objfile->md, xmcalloc, xmfree);
+ NULL, xcalloc, xfree);
}
/* Try to determine the demangled name for a symbol, based on the
@@ -659,6 +663,14 @@ symbol_demangled_name (struct general_symbol_info *gsymbol)
return NULL;
}
+/* Return the search name of a symbol---generally the demangled or
+ linkage name of the symbol, depending on how it will be searched for.
+ If there is no distinct demangled name, then returns the same value
+ (same pointer) as SYMBOL_LINKAGE_NAME. */
+char *symbol_search_name (const struct general_symbol_info *gsymbol) {
+ return symbol_natural_name (gsymbol);
+}
+
/* Initialize the structure fields to zero values. */
void
init_sal (struct symtab_and_line *sal)
@@ -868,6 +880,62 @@ fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile)
ginfo->bfd_section = SYMBOL_BFD_SECTION (msym);
ginfo->section = SYMBOL_SECTION (msym);
}
+ else if (objfile)
+ {
+ /* Static, function-local variables do appear in the linker
+ (minimal) symbols, but are frequently given names that won't
+ be found via lookup_minimal_symbol(). E.g., it has been
+ observed in frv-uclinux (ELF) executables that a static,
+ function-local variable named "foo" might appear in the
+ linker symbols as "foo.6" or "foo.3". Thus, there is no
+ point in attempting to extend the lookup-by-name mechanism to
+ handle this case due to the fact that there can be multiple
+ names.
+
+ So, instead, search the section table when lookup by name has
+ failed. The ``addr'' and ``endaddr'' fields may have already
+ been relocated. If so, the relocation offset (i.e. the
+ ANOFFSET value) needs to be subtracted from these values when
+ performing the comparison. We unconditionally subtract it,
+ because, when no relocation has been performed, the ANOFFSET
+ value will simply be zero.
+
+ The address of the symbol whose section we're fixing up HAS
+ NOT BEEN adjusted (relocated) yet. It can't have been since
+ the section isn't yet known and knowing the section is
+ necessary in order to add the correct relocation value. In
+ other words, we wouldn't even be in this function (attempting
+ to compute the section) if it were already known.
+
+ Note that it is possible to search the minimal symbols
+ (subtracting the relocation value if necessary) to find the
+ matching minimal symbol, but this is overkill and much less
+ efficient. It is not necessary to find the matching minimal
+ symbol, only its section.
+
+ Note that this technique (of doing a section table search)
+ can fail when unrelocated section addresses overlap. For
+ this reason, we still attempt a lookup by name prior to doing
+ a search of the section table. */
+
+ CORE_ADDR addr;
+ struct obj_section *s;
+
+ addr = ginfo->value.address;
+
+ ALL_OBJFILE_OSECTIONS (objfile, s)
+ {
+ int idx = s->the_bfd_section->index;
+ CORE_ADDR offset = ANOFFSET (objfile->section_offsets, idx);
+
+ if (s->addr - offset <= addr && addr < s->endaddr - offset)
+ {
+ ginfo->bfd_section = s->the_bfd_section;
+ ginfo->section = idx;
+ return;
+ }
+ }
+ }
}
struct symbol *
@@ -1467,7 +1535,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name,
{
do_linear_search = 1;
}
- if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0)
+ if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center), name) >= 0)
{
top = center;
}
@@ -1482,7 +1550,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name,
while (top <= real_top
&& (linkage_name != NULL
? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0
- : SYMBOL_MATCHES_NATURAL_NAME (*top,name)))
+ : SYMBOL_MATCHES_SEARCH_NAME (*top,name)))
{
if (SYMBOL_DOMAIN (*top) == domain)
{
@@ -1503,7 +1571,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name,
{
if (linkage_name != NULL
? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0
- : SYMBOL_MATCHES_NATURAL_NAME (*psym, name))
+ : SYMBOL_MATCHES_SEARCH_NAME (*psym, name))
{
return (*psym);
}
@@ -2349,7 +2417,7 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
!section_is_mapped (section))
pc = overlay_unmapped_address (pc, section);
- pc += FUNCTION_START_OFFSET;
+ pc += DEPRECATED_FUNCTION_START_OFFSET;
pc = SKIP_PROLOGUE (pc);
/* For overlays, map pc back into its mapped VMA range */
@@ -3068,12 +3136,12 @@ print_msymbol_info (struct minimal_symbol *msymbol)
char *tmp;
if (TARGET_ADDR_BIT <= 32)
- tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
- & (CORE_ADDR) 0xffffffff,
- "08l");
+ tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
+ & (CORE_ADDR) 0xffffffff,
+ 8);
else
- tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol),
- "016l");
+ tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol),
+ 16);
printf_filtered ("%s %s\n",
tmp, SYMBOL_PRINT_NAME (msymbol));
}
@@ -3921,7 +3989,7 @@ skip_prologue_using_sal (CORE_ADDR func_addr)
/* Get an initial range for the function. */
find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
- start_pc += FUNCTION_START_OFFSET;
+ start_pc += DEPRECATED_FUNCTION_START_OFFSET;
prologue_sal = find_pc_line (start_pc, 0);
if (prologue_sal.line != 0)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 16a212eff1e..dfde99788e2 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -258,6 +258,20 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol);
#define SYMBOL_MATCHES_NATURAL_NAME(symbol, name) \
(strcmp_iw (SYMBOL_NATURAL_NAME (symbol), (name)) == 0)
+/* Macro that returns the name to be used when sorting and searching symbols.
+ In C++, Chill, and Java, we search for the demangled form of a name,
+ and so sort symbols accordingly. In Ada, however, we search by mangled
+ name. If there is no distinct demangled name, then SYMBOL_SEARCH_NAME
+ returns the same value (same pointer) as SYMBOL_LINKAGE_NAME. */
+#define SYMBOL_SEARCH_NAME(symbol) \
+ (symbol_search_name (&(symbol)->ginfo))
+extern char *symbol_search_name (const struct general_symbol_info *);
+
+/* Analogous to SYMBOL_MATCHES_NATURAL_NAME, but uses the search
+ name. */
+#define SYMBOL_MATCHES_SEARCH_NAME(symbol, name) \
+ (strcmp_iw (SYMBOL_SEARCH_NAME (symbol), (name)) == 0)
+
/* Classification types for a minimal symbol. These should be taken as
"advisory only", since if gdb can't easily figure out a
classification it simply selects mst_unknown. It may also have to
@@ -877,6 +891,10 @@ struct partial_symtab
char *fullname;
+ /* Directory in which it was compiled, or NULL if we don't know. */
+
+ char *dirname;
+
/* Information about the object file from which symbols should be read. */
struct objfile *objfile;
@@ -1362,4 +1380,9 @@ extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search
extern void set_main_name (const char *name);
extern /*const */ char *main_name (void);
+/* Global to indicate presence of HP-compiled objects,
+ in particular, SOM executable file with SOM debug info
+ Defined in symtab.c, used in hppa-tdep.c. */
+extern int deprecated_hp_som_som_object_present;
+
#endif /* !defined(SYMTAB_H) */
diff --git a/gdb/target.c b/gdb/target.c
index d4ff6c05af6..0e76e71ebc5 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -41,8 +41,6 @@
static void target_info (char *, int);
-static void maybe_kill_then_create_inferior (char *, char *, char **);
-
static void maybe_kill_then_attach (char *, int);
static void kill_or_be_killed (int);
@@ -151,8 +149,6 @@ static void debug_to_load (char *, int);
static int debug_to_lookup_symbol (char *, CORE_ADDR *);
-static void debug_to_create_inferior (char *, char *, char **);
-
static void debug_to_mourn_inferior (void);
static int debug_to_can_run (void);
@@ -339,10 +335,11 @@ maybe_kill_then_attach (char *args, int from_tty)
}
static void
-maybe_kill_then_create_inferior (char *exec, char *args, char **env)
+maybe_kill_then_create_inferior (char *exec, char *args, char **env,
+ int from_tty)
{
kill_or_be_killed (0);
- target_create_inferior (exec, args, env);
+ target_create_inferior (exec, args, env, from_tty);
}
/* Go through the target stack from top to bottom, copying over zero
@@ -1219,11 +1216,6 @@ target_info (char *args, int from_tty)
if (symfile_objfile != NULL)
printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name);
-#ifdef FILES_INFO_HOOK
- if (FILES_INFO_HOOK ())
- return;
-#endif
-
for (t = target_stack; t != NULL; t = t->beneath)
{
if (!t->to_has_memory)
@@ -1268,20 +1260,12 @@ target_preopen (int from_tty)
void
target_detach (char *args, int from_tty)
{
- /* Handle any optimized stores to the inferior. */
-#ifdef DO_DEFERRED_STORES
- DO_DEFERRED_STORES;
-#endif
(current_target.to_detach) (args, from_tty);
}
void
target_disconnect (char *args, int from_tty)
{
- /* Handle any optimized stores to the inferior. */
-#ifdef DO_DEFERRED_STORES
- DO_DEFERRED_STORES;
-#endif
(current_target.to_disconnect) (args, from_tty);
}
@@ -1348,12 +1332,13 @@ find_default_attach (char *args, int from_tty)
}
void
-find_default_create_inferior (char *exec_file, char *allargs, char **env)
+find_default_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct target_ops *t;
t = find_default_run_target ("run");
- (t->to_create_inferior) (exec_file, allargs, env);
+ (t->to_create_inferior) (exec_file, allargs, env, from_tty);
return;
}
@@ -1425,6 +1410,13 @@ target_resize_to_sections (struct target_ops *target, int num_added)
(*t)->to_sections_end = target->to_sections_end;
}
}
+ /* There is a flattened view of the target stack in current_target,
+ so its to_sections pointer might also need updating. */
+ if (current_target.to_sections == old_value)
+ {
+ current_target.to_sections = target->to_sections;
+ current_target.to_sections_end = target->to_sections_end;
+ }
}
return old_count;
@@ -1536,11 +1528,6 @@ generic_mourn_inferior (void)
breakpoint_init_inferior (inf_exited);
registers_changed ();
-#ifdef CLEAR_DEFERRED_STORES
- /* Delete any pending stores to the inferior... */
- CLEAR_DEFERRED_STORES;
-#endif
-
reopen_exec_file ();
reinit_frame_cache ();
@@ -1551,8 +1538,8 @@ generic_mourn_inferior (void)
if (!show_breakpoint_hit_counts)
breakpoint_clear_ignore_counts ();
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
/* Helper function for child_wait and the Lynx derivatives of child_wait.
@@ -1777,11 +1764,11 @@ debug_print_register (const char * func, int regno)
unsigned char buf[MAX_REGISTER_SIZE];
deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++)
+ for (i = 0; i < register_size (current_gdbarch, regno); i++)
{
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
}
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST))
+ if (register_size (current_gdbarch, regno) <= sizeof (LONGEST))
{
fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
paddr_nz (read_register (regno)),
@@ -2079,12 +2066,13 @@ debug_to_lookup_symbol (char *name, CORE_ADDR *addrp)
}
static void
-debug_to_create_inferior (char *exec_file, char *args, char **env)
+debug_to_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
- debug_target.to_create_inferior (exec_file, args, env);
+ debug_target.to_create_inferior (exec_file, args, env, from_tty);
- fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n",
- exec_file, args);
+ fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx, %d)\n",
+ exec_file, args, from_tty);
}
static void
@@ -2433,7 +2421,7 @@ initialize_targets (void)
add_info ("target", target_info, targ_desc);
add_info ("files", target_info, targ_desc);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
@@ -2444,11 +2432,12 @@ command.", &setdebuglist),
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
&trust_readonly, "\
-Set mode for reading from readonly sections.\n\
+Set mode for reading from readonly sections.", "\
+Show mode for reading from readonly sections.", "\
When this mode is on, memory reads from readonly sections (such as .text)\n\
will be read from the object file instead of from the target. This will\n\
result in significant performance improvement for remote targets.", "\
-Show mode for reading from readonly sections.\n",
+Mode for reading from readonly sections is %s.",
NULL, NULL,
&setlist, &showlist);
diff --git a/gdb/target.h b/gdb/target.h
index 2d8ce372fc5..92beccaf343 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -353,7 +353,7 @@ struct target_ops
void (*to_kill) (void);
void (*to_load) (char *, int);
int (*to_lookup_symbol) (char *, CORE_ADDR *);
- void (*to_create_inferior) (char *, char *, char **);
+ void (*to_create_inferior) (char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
void (*to_acknowledge_created_inferior) (int);
int (*to_insert_fork_catchpoint) (int);
@@ -712,8 +712,8 @@ extern void target_load (char *arg, int from_tty);
ENV is the environment vector to pass. Errors reported with error().
On VxWorks and various standalone systems, we ignore exec_file. */
-#define target_create_inferior(exec_file, args, env) \
- (*current_target.to_create_inferior) (exec_file, args, env)
+#define target_create_inferior(exec_file, args, env, FROM_TTY) \
+ (*current_target.to_create_inferior) (exec_file, args, env, (FROM_TTY))
/* Some targets (such as ttrace-based HPUX) don't allow us to request
@@ -949,19 +949,19 @@ extern char *normal_pid_to_str (ptid_t ptid);
* The old way of doing this is to define a macro 'target_new_objfile'
* that points to the function that you want to be called on every
* objfile/shlib load.
- *
- * The new way is to grab the function pointer, 'target_new_objfile_hook',
- * and point it to the function that you want to be called on every
- * objfile/shlib load.
- *
- * If multiple clients are willing to be cooperative, they can each
- * save a pointer to the previous value of target_new_objfile_hook
- * before modifying it, and arrange for their function to call the
- * previous function in the chain. In that way, multiple clients
- * can receive this notification (something like with signal handlers).
- */
-extern void (*target_new_objfile_hook) (struct objfile *);
+ The new way is to grab the function pointer,
+ 'deprecated_target_new_objfile_hook', and point it to the function
+ that you want to be called on every objfile/shlib load.
+
+ If multiple clients are willing to be cooperative, they can each
+ save a pointer to the previous value of
+ deprecated_target_new_objfile_hook before modifying it, and arrange
+ for their function to call the previous function in the chain. In
+ that way, multiple clients can receive this notification (something
+ like with signal handlers). */
+
+extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
#ifndef target_pid_or_tid_to_str
#define target_pid_or_tid_to_str(ID) \
@@ -1088,15 +1088,6 @@ extern void (*target_new_objfile_hook) (struct objfile *);
(*current_target.to_stopped_data_address) ()
#endif
-/* Sometimes gdb may pick up what appears to be a valid target address
- from a minimal symbol, but the value really means, essentially,
- "This is an index into a table which is populated when the inferior
- is run. Therefore, do not attempt to use this as a PC." */
-
-#if !defined(PC_REQUIRES_RUN_BEFORE_USE)
-#define PC_REQUIRES_RUN_BEFORE_USE(pc) (0)
-#endif
-
/* This will only be defined by a target that supports catching vfork events,
such as HP-UX.
@@ -1182,7 +1173,7 @@ extern void noprocess (void);
extern void find_default_attach (char *, int);
-extern void find_default_create_inferior (char *, char *, char **);
+extern void find_default_create_inferior (char *, char *, char **, int);
extern struct target_ops *find_run_target (void);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a89c60beaf2..aa6abb45d22 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,1027 @@
+2004-09-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.threads/killed.c: Include <stdlib.h>.
+ * gdb.threads/pthreads.c: Likewise.
+
+2004-09-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.threads/killed.c: Add copyright notice.
+
+2004-09-10 Jason Molenda (jmolenda@apple.com)
+
+ * gdb.base/define.exp: Two new tests to verify zero space chars
+ after 'if' and 'while' commands in a user-defined command is correctly
+ parsed.
+
+2004-09-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/signals.exp (signal_tests_1): Delete. Merge signal
+ delivery test with duplicate at end of file.
+
+2004-09-06 Mark Kettenis <kettenis@jive.nl>
+
+ * gdb.base/unload.exp: Link with -dl on *-*-solaris*.
+
+2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * config/hppro.exp: Removed.
+
+2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * config/sparclet.exp: Removed.
+
+2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * config/udi.exp: Removed.
+
+2004-09-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/sigstep.exp (advance): Use "-continue_timer" option
+ of "exp_continue".
+ (advancei): Likewise.
+
+2004-09-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/unload.exp: Fix so messages aren't duplicated.
+
+2004-09-01 Manoj Iyer <manjo@austin.ibm.com>
+
+ * gdb.gdb/complaints.exp (setup_test): Use new gdb.exp functionality
+ to check for nodebug in executable.
+ * gdb.gdb/observer.exp (setup_test): Likewise.
+ * gdb.gdb/selftest.exp (test_with_self): Likewise.
+ * gdb.gdb/xfullpath.exp (setup_test): Likewise.
+
+2004-09-01 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.threads/staticthreads.c, gdb.threads/staticthreads.exp: New
+ files.
+
+2004-09-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/unload.exp: Fix expected warning message to match
+ latest format.
+
+2004-09-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/call-rt-st.exp: Fix typos.
+
+2004-08-31 Manoj Iyer <manjo@austin.ibm.com>
+
+ * gdb.threads/thread_check.exp: New testcase.
+ * gdb.threads/thread_check.c: New testcase.
+
+2004-08-31 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sigstep.exp (breakpoint_to_handler_entry)
+ (skip_to_handler_entry): New procedures. Test stepping into a
+ handler when the breakpoint is at the handler's entry point.
+
+2004-08-30 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sigstep.exp (breakpoint_over_handler): Remove kfail
+ gdb/1757.
+
+2004-08-27 Michael Chastain <mec.gnu@mindspring.com>
+
+ With code from Manoj Iyer <manjo@austin.ibm.com>:
+ * lib/gdb.exp (gdb_file_cmd): Return more information in the
+ return value. Add an arm for "no debugging symbols found".
+ Change a stray "error" to "perror".
+ (gdb_run_cmd): Adapt to new return value.
+ * gdb.base/remote.exp: Adapt to new return value.
+ * gdb.gdb/complaints.exp: Likewise.
+ * gdb.gdb/observer.exp: Likewise.
+ * gdb.gdb/selftest.exp: Likewise.
+ * gdb.gdb/xfullpath.exp: Likewise.
+
+2004-08-27 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.threads/bp_in_thread.exp: New testcase.
+
+2004-08-27 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR testsuite/1735.
+ * gdb.threads/schedlock.c (thread_function): Add a cast
+ to suppress a gcc warning.
+ * gdb.threads/thread-specific.c (thread_function): Likewise.
+
+2004-08-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/unload.c: Include <stdlib.h>.
+
+2004-08-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ From Paul Gilliam <pgilliam@us.ibm.com>:
+ * gdb.base/call-sc.exp (test_scalar_returns): Make sure PC is
+ synchronized after the "return".
+
+2004-08-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/basics.c: Include <stdio.h>.
+ * gdb.mi/pthreads.c: Include <stdlib.h>.
+ * gdb.mi/var-cmd.c: Include <stdlib.h>.
+
+2004-08-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.threads/schedlock.c: Add copyright notice.
+
+2004-08-25 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sigstep.exp (breakpoint_to_handler, skip_to_handler)
+ (skip_over_handler, breakpoint_over_hander): New test procedures.
+ (advance, advancei): Add a proper prefix, do not use
+ rerun_to_main.
+ * gdb.base/sigstep.c (main): Change to use an infinite loop.
+
+2004-08-24 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/basics.c: Add copyright notice.
+ * gdb.mi/var-cmd.c: Add copyright notice.
+
+2004-08-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/gdb.exp: Remove signed_keyword_not_used.
+ * lib/compiler.c: Likewise.
+ * lib/compiler.cc: Likewise.
+
+2004-08-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/whatis.c: Remove conditional disabling of "signed".
+ * gdb.base/whatis.exp: Remove signed_keyword_not_used.
+
+2004-08-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/whatis.c: Add copyright notice.
+
+2004-08-20 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-prologue.exp (skip_breakpoint): New function. Use
+ it to skip the breakpoints encoded in the inline assembly.
+
+2004-08-20 Michael Chastain <mec.gnu@mindspring.com>
+
+ * Makefile.in: Add gdb.fortran.
+
+2004-08-20 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/call-sc.exp (test_scalar_returns):
+ Fix cut-and-paste glitch in "Make fun return now".
+
+2004-08-17 Michael Chastain <mec.gnu@mindspring.com>
+
+ * configure.in: Add gdb.fortran.
+ * configure: Regenerate.
+ * gdb.fortran/Makefile.in: New file.
+ * lib/gdb.exp (skip_fortran_tests): New procedure.
+
+2004-08-17 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/mi-var-block.exp: Use gdb_get_line_number. Remove
+ reference to bug-gnu@prep.ai.mit.edu.
+ * gdb.mi/mi-var-child.exp: Likewise.
+ * gdb.mi/mi-var-cmd.exp: Likewise.
+ * gdb.mi/mi-var-display.exp: Likewise.
+ * gdb.mi/mi2-var-block.exp: Likewise.
+ * gdb.mi/mi2-var-child.exp: Likewise.
+ * gdb.mi/mi2-var-cmd.exp: Likewise.
+ * gdb.mi/mi2-var-display.exp: Likewise.
+
+2004-08-15 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/unload.c (main): Make local variable msg const.
+
+2004-08-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/mi-cli.exp: Use gdb_get_line_number. Remove reference
+ to bug-gnu@prep.ai.mit.edu.
+ * gdb.mi/mi-disassemble.exp: Likewise.
+ * gdb.mi/mi-eval.exp: Likewise.
+ * gdb.mi/mi-file.exp: Likewise. Also, add comment about the
+ default line number.
+ * gdb.mi/mi-return.exp: Likewise.
+ * gdb.mi/mi-simplerun.exp: Likewise.
+ * gdb.mi/mi-stack.exp: Likewise.
+ * gdb.mi/mi-stepi.exp: Likewise. Also, replace wildcarded line
+ number with explicit range test.
+ * gdb.mi/mi-watch.exp: Likewise.
+ * gdb.mi/mi2-break.exp: Likewise.
+ * gdb.mi/mi2-cli.exp: Likewise.
+ * gdb.mi/mi2-disassemble.exp: Likewise.
+ * gdb.mi/mi2-eval.exp: Likewise.
+ * gdb.mi/mi2-file.exp: Likewise. Also, add comment about the
+ default line number.
+ * gdb.mi/mi2-return.exp: Likewise.
+ * gdb.mi/mi2-simplerun.exp: Likewise.
+ * gdb.mi/mi2-stack.exp: Likewise.
+ * gdb.mi/mi2-stepi.exp: Likewise. Also, replace wildcarded line
+ number with explicit range test.
+ * gdb.mi/mi2-watch.exp: Likewise.
+
+2004-08-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/ctti.exp: Tweak srcfile and objfile to have no slashes.
+ * gdb.cp/m-static.exp: Likewise.
+ * gdb.cp/rtti.exp: Likewise.
+
+2004-08-14 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/bigcore.c: Include <sys/types.h> and <sys/time.h>.
+
+2004-08-14 Eli Zaretskii <eliz@gnu.org>
+
+ * ChangeLog: Prefix Local Variables with semi-colons and indent
+ the reference to older ChangeLog files, to fix fontification in
+ Emacs.
+
+2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/mi-break.exp: Use gdb_get_line_number.
+ * gdb.mi/mi2-break.exp: Likewise.
+
+2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.gdb/selftest.exp: Revert removal of call to init_malloc.
+
+2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/inherit.exp: Use cp_test_ptype_class.
+
+2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Remove unused declarations. Just let
+ test names default instead of providing special names. Remove
+ extraneous demangler test.
+
+2004-08-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/unload.exp: New test for breakpoints in dynamically
+ loaded libraries.
+ * gdb.base/unload.c: Ditto.
+ * gdb.base/unloadshr.c: Ditto.
+
+2004-08-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp (test_ptype_class_objects): Call
+ cp_test_ptype_class.
+ (test_enums): Likewise.
+
+2004-08-10 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.threads/staticthreads.c, gdb.threads/staticthreads.exp: New
+ files.
+
+2004-08-10 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.gdb/selftest.exp (do_steps_and_nexts): Remove code to skip
+ init_malloc call.
+
+2004-08-10 Michael Chastain <mec.gnu@mindspring.com>
+
+ * ChangeLog: Add copyright notice. The notice is copied
+ from emacs 21.3 top level ChangeLog.
+
+2004-08-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/cp-support.exp: New file.
+ * lib/cp-support.exp (cp_test_type_class): New function.
+ * gdb.cp/derivation.exp: Use cp_test_ptype_class.
+ * gdb.cp/virtfunc.exp (test_one_ptype): Removed.
+ * gdb.cp/virtfunc.exp (test_ptype_of_classes): Use
+ cp_test_ptype_class.
+
+2004-08-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/mi2-basics.exp, gdb.mi/mi2-break.exp,
+ gdb.mi/mi2-console.exp, gdb.mi/mi2-disassemble.exp,
+ gdb.mi/mi2-eval.exp, gdb.mi/mi2-file.exp, gdb.mi/mi2-hack-cli.exp,
+ gdb.mi/mi2-read-memory.exp, gdb.mi/mi2-regs.exp,
+ gdb.mi/mi2-return.exp, gdb.mi/mi2-simplerun.exp,
+ gdb.mi/mi2-stack.exp, gdb.mi/mi2-stepi.exp, gdb.mi/mi2-until.exp,
+ gdb.mi/mi2-var-block.exp, gdb.mi/mi2-var-child.exp,
+ gdb.mi/mi2-var-cmd.exp, gdb.mi/mi2-var-display.exp,
+ gdb.mi/mi2-watch.exp: Update copyright years.
+
+2004-08-09 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/sigaltstack.exp: Provide proper anchoring.
+
+2004-08-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-break.exp,
+ gdb.mi/mi-console.exp, gdb.mi/mi-disassemble.exp,
+ gdb.mi/mi-eval.exp, gdb.mi/mi-file.exp, gdb.mi/mi-hack-cli.exp,
+ gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
+ gdb.mi/mi-return.exp, gdb.mi/mi-simplerun.exp,
+ gdb.mi/mi-stack.exp, gdb.mi/mi-stepi.exp, gdb.mi/mi-until.exp,
+ gdb.mi/mi-var-block.exp, gdb.mi/mi-var-child.exp,
+ gdb.mi/mi-var-cmd.exp, gdb.mi/mi-var-display.exp,
+ gdb.mi/mi-watch.exp: Update copyright years.
+
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ PR gdb/1738
+ * gdb.base/signals.exp (signal_tests_1): KFAIL bug in continuing
+ from a breakpoint with a pending signal.
+
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ PR gdb/1736
+ * lib/gdb.exp (gdb_test_multiple): Handle return -code return.
+ * gdb.base/sigaltstack.exp (finish_test): Consume output until
+ the prompt.
+ * gdb.base/sigstep.exp: Add KFAIL for gdb/1736.
+
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ * gdb.cp/templates.exp: Handle (char)115 for template argument 's'.
+
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ PR gdb/1736
+ * gdb.base/sigaltstack.exp (finish_test): New procedure. KFAIL
+ for i?86-*-linux*.
+
+2004-08-08 Daniel Jacobowitz <dan@debian.org>
+
+ * gdb.arch/i386-prologue.exp: Compile without debug information.
+
+2004-08-08 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/gdb.exp (gdb_get_line_number): Rewrite with native tcl
+ rather than asking gdb to search.
+
+2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/gcore.c: Include <string.h>.
+
+2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/gcore.c: Add copyright notice.
+
+2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/freebpcmd.c: Include <stdio.h>.
+ * gdb.base/long_long.c: Include <string.h>.
+ * gdb.base/sigaltstack.c: Include <stdlib.h> <string.h>.
+ * gdb.base/siginfo.c: Include <string.h>.
+ * gdb.base/sigstep.c: Include <string.h>.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/complex.c: Include <stdlib.h>.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/complex.c: Add copyright notice.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/charset.c: Include <stdlib.h>.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/auxv.c: Include <stdlib.h>.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/auxv.c: Add copyright notice.
+
+2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/coremaker.c: Add copyright notice.
+ * gdb.base/coremaker2.c: Add copyright notice.
+
+2004-08-04 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/store.exp: Update copyright.
+ (check_set, up_set, check_struct, up_struct): Add a prefix to test
+ names, do not import gdb_prompt.
+
+2004-08-01 Andrew Cagney <cagney@gnu.org>
+
+ Fix PR testsuite/1729.
+ * gdb.base/dump.exp: Add test name to callers of capture_value, do
+ not use capture_value with value 4.
+ (capture_value): Add optional test name parameter.
+ (test_reload_saved_value, test_restore_saved_value): Use $msg as
+ the prefix, pass to capture_value.
+
+2004-08-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-prologue.exp: Add testcase for standard prolgue.
+ * gdb.arch/i386-prologue.c (standard): New prototype and function.
+ (main): Call new function.
+
+2004-07-31 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/namespace.exp: Accept more varieties of ptype output.
+
+2004-07-31 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.exp: Accept more varieties of ptype output.
+
+2004-07-31 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/inherit.exp: Accept more varieties of ptype output.
+ Accept more values of vtbl pointer. Remove some messages
+ about "obsolete gcc or gdb".
+
+2004-07-30 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Accept more varieties of ptype output.
+
+2004-07-30 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/asm-source.exp: Properly convert target board
+ debug flags from gcc format to binutils format.
+
+2004-07-28 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-prologue.exp: Remove KFAIL of "backtrace in
+ gdb1718". PR backtrace/1718 partially fixed.
+
+2004-07-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.threads/watchthreads.exp: New test for threaded watchpoints.
+
+2004-07-26 Nick Clifton <nickc@redhat.com>
+
+ * gdb.asm/asm-source.exp (debug-flags): New variable. If a known
+ good default value for a specific architecture is available then
+ set it to that value. Otherwise default to the -gstabs switch.
+ Remove the -g... switches from the asm-flags variable. Allow the
+ target board info to override the value if it wants to. Pass the
+ switch on the assembler command line.
+
+2004-07-23 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1718.
+ * gdb.arch/i386-prologue.c (gdb1718): New prototype and function.
+ (main): Call new function.
+
+2004-07-22 Michael Chastain <mec.gnu@mindspring.com>
+
+ Test for PR exp/1715.
+ * gdb.base/radix.exp: Refactor common procedures. Make all
+ test names unique. Change XFAIL to KFAIL.
+
+2004-07-20 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.ada/gnat_ada.gpr.in: Rename from here ...
+ * gdb.ada/gnat_ada.gin: ... to here.
+ * configure.in: Use gnat_ada.gin.
+ * configure: Regenerate.
+
+2004-07-20 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/signals.exp: Replace send_gdb and gdb_expect with
+ gdb_test and gdb_test_multiple. Delete bash_bug. Delete suspect
+ XFAILs. Clean up test messages and comments. Check backtraces.
+ Delete re-sync code.
+
+2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR cli/740.
+ * gdb.base/annota1.exp: Honor gdb,nosignals.
+ * gdb.base/annota3.exp: Likewise.
+
+2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/java.exp: Update copyright notice.
+
+2004-07-19 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/selftest.exp: Copy file from here ...
+ * gdb.gdb/selftest.exp: ... to here.
+
+2004-07-16 Andrew Cagney <cagney@redhat.com>
+
+ * lib/insight-support.exp: Delete file.
+ * lib/java.exp (java_init): Fix copyright.
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/restore.c: Append "prologue" to comments marking the a
+ function's prologue.
+ * gdb.base/restore.exp: Update copyright, re-indent.
+ (restore_tests): Use gdb_test_multiple. Add "calleeN calls
+ callerN" prefix where needed. Update patterns that match a
+ function's prologue.
+
+2004-07-16 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/restore.c: Add copyright notice.
+
+2004-07-16 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/logical.exp: Update copyright.
+ (evaluate): New procedure. Use to re-implement tests using
+ several tables.
+
+2004-07-14 Martin Hunt <hunt@redhat.com>
+
+ * lib/insight-support.exp (gdbtk_start): Unset TCL_LIBRARY
+ which fixes some problems where init.tcl was not found.
+
+2004-07-13 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sizeof.exp: Skip test when no inferior I/O.
+ (check_sizeof, check_valueof): Do not include the output in the
+ test name. Use gdb_test.
+ (get_valueof): Use gdb_test_multiple.
+
+ * gdb.base/step-test.exp: Update copyright. Use
+ gdb_test_multiple. Ensure that test names do not include
+ architecture dependent output.
+
+ * gdb.gdb/observer.exp: Update copyright.
+ (setup_test): Use gdb_test_multiple.
+ (attach_first_observer, attach_second_observer)
+ (attach_third_observer, detach_first_observer)
+ (detach_second_observer, detach_third_observer)
+ (reset_counters, check_counters): Make $message a prefix.
+ (test_normal_stop_notifications): Add "args" parameter - a list of
+ init functions to be called. Make $message a prefix,
+ (test_observer_normal_stop): Change the message prefixes so that
+ they are unique, pass the attach / detach procedures to
+ test_normal_stop_notifications.
+
+ * gdb.base/signull.exp (test_segv): Prefix all tests with
+ "${name}". Clean up test messages.
+
+ * gdb.base/annota3.exp, gdb.base/annota1.exp: Update copyright.
+
+ * gdb.base/ena-dis-br.exp: Update copyright.
+ (break_at): New function. Replace send_gdb with gdb_test,
+ break_at, and gdb_test_multiple. Replace XFAIL of "continue with
+ ignore count, not stopped at bpt", with KFAIL.
+
+2004-07-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/attach.exp: Remove cleanupfile handling.
+
+2004-07-12 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/annota1.exp: Cleanup corefile test name.
+ * gdb.base/annota3.exp: Ditto.
+
+2004-07-12 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/signals.exp: Clean up copyright, re-indent.
+
+ * gdb.base/attach.exp: Replace send_gdb and gdb_expect with
+ gdb_test and gdb_test_multiple.
+
+2004-07-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.java/jmain.exp: Fix expected line number for main to
+ break at. Set XFAIL for break at main test since gcj does not
+ provide line number info for first statement in main.
+
+2004-07-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/attach.exp: Cleanup copyright. Re-indent.
+
+ * gdb.base/sigbpt.exp: Make the common part of each test name a
+ prefix instead of suffix.
+
+2004-07-07 Bob Rossi <bob_rossi@cox.net>
+
+ * gdb.mi/mi2-file.exp: Revert to version 1.1, except changed name of
+ test from test_tbreak_creation_and_listing to
+ test_file_list_exec_source_file
+ * gdb.mi/mi-file.exp: Add test for -file-list-exec-source-files
+ Changed name of test from test_tbreak_creation_and_listing to
+ test_file_list_exec_source_file
+
+2004-07-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.java/jmisc.exp: Fix expected output of ptype to look for
+ the jmisc() constructor instead of <init>.
+ * gdb.java/jmisc1.exp: Ditto.
+
+2004-07-07 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sigbpt.exp (stepi_out): Check for a single step
+ corrupting the PC.
+
+2004-07-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp: Accept whitespace change in demangler
+ output.
+
+2004-07-06 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/sigbpt.exp, gdb.base/sigbpt.c: New test.
+
+2004-07-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/compiler.c: Accept __HP_CXD_SPP for old hp ansi c compiler.
+ * lib/compiler.cc: Likewise.
+
+2004-06-30 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/compiler.cc: Work around string preprocessing problem
+ with old hp c++ compiler.
+ * lib/compiler.c: Likewise.
+
+2004-06-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.arch/i386-prologue.c: Add copyright header. Use preprocessor
+ directives to conditionalize symbol prefixing.
+ * gdb.arch/i386-prologue.exp: Allow symbol prefixing by adding
+ additional_flags handling. Add underscore prefix for Cygwin.
+ * gdb.arch/i386-unwind.c: Use preprocessor directives to
+ conditionalize symbol prefixing.
+ * gdb.arch/i386-unwind.exp: Allow symbol prefixing by adding
+ additional_flags handling. Add underscore prefix for Cygwin.
+
+2004-06-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/bigcore.exp: Skip test on Cygwin.
+
+2004-06-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.hp/gdb.base-hp/reg.exp: Accept both old and new gdb output
+ formats for "info register". Use gdb_test_multiple. Fix
+ the "invalid register" test.
+
+2004-06-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/attach.exp: Fix copyright date. Set testpid to Windows
+ PID for Cygwin. Add Cygwin specific strings to check for in some
+ tests.
+ (do_attach_tests): Add a test for user interaction when attaching
+ to a process with no matching symbol table already loaded.
+
+2004-06-26 Andrew Cagney <cagney@gnu.org>
+
+ Test PR java/1567 and PR java/1565.
+ * gdb.java/jmain.exp, gdb.java/jmain.java: New files.
+ * gdb.java/jmisc2.exp: Delete file.
+
+2004-06-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.hp/gdb.base-hp/reg.exp: Update copyright notice.
+
+2004-06-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/attach.exp (do_attach_tests): Don't forget to kill second
+ attach process.
+
+2004-06-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/pr-1553.exp: Remove.
+
+2004-06-22 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/pr-1553.cc: Remove.
+ * gdb.cp/pr-1553.exp: Disable this test.
+
+2004-06-20 Jim Blandy <jimb@redhat.com>
+
+ Fix PR testsuite/1680.
+ * gdb.arch/i386-sse.exp: Properly quote curly braces in
+ regular expressions.
+
+2004-06-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR testsuite/1679.
+ * gdb.arch/i386-sse.exp: Do not call gdb_suppress_entire_file.
+ Issue an UNSUPPORTED result instead.
+
+2004-06-18 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/charset.exp: Only send a control-C if we see a new
+ prompt and incomplete command.
+
+2004-06-18 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/pr-574.cc: Add copyright notice.
+
+2004-06-17 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/charset.exp: Don't refer to $expect_out(1,string) in
+ cases where the regexp has no groups; this grabs random text from
+ the previous test suite, whatever that was.
+
+2004-06-17 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/printmethod.cc: Add copyright notice.
+
+2004-06-16 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/psmang1.cc, gdb.cp/psmang2.cc: Add copyright notice.
+
+2004-06-16 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/signull.c: Update copyright. Include <string.h>.
+ (bowler): Replace data_pointer with data_read
+ and data_write cases. Add code_descriptor case.
+ (zero, desc): New array and pointer.
+ (data, code): Change to simple pointers.
+ * gdb.base/signull.exp: Fix probe pattern matching a function
+ descriptor SIGSEGV. Replace data_pointer with data_read and
+ data_write tests.
+
+2004-06-16 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/long_long.exp, gdb.base/long_long.c: Rewrite.
+
+2004-06-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/long_long.c: Add copyright notice.
+
+2004-06-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/long_long.exp: Remove reference to
+ bug-gdb@prep.ai.mit.edu. Change line-number-specific breakpoint
+ to gdb_breakpoint and gdb_continue_to_breakpoint.
+
+2004-06-14 Jim Blandy <jimb@redhat.com>
+
+ * gdb.arch/e500-regs.exp: Fix up 'print' pattern for the little-
+ endian case.
+
+2004-06-14 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/gcore.exp (capture_command_output): Delete the always
+ passing tests containing inferior values.
+ * gdb.base/ending-run.exp: Do not include the breakpoint address
+ in the test message. Update copyright.
+ * gdb.base/sizeof.exp (check_sizeof): Do not include the type's
+ size in the test name, use gdb_test_multiple. Update copyright.
+
+2004-06-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/ref-types.cc: Add copyright notice.
+
+2004-06-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/compiler.c: Remove gcc_compiled, hp_cc_compiler,
+ hp_aCC_compiler.
+ * lib/compiler.cc: Likewise.
+ * lib/gdb.exp (get_compiler_info): Eval lines only if they are
+ 'set' commands. Log diagnostics for other lines. Set
+ gcc_compiled, hp_cc_compiler, and hp_aCC_compiler.
+
+2004-06-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/try_catch.cc: Add copyright notice.
+
+2004-06-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/userdef.cc: Add copyright notice.
+
+2004-06-11 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.cc: Add copyright notice.
+
+2004-06-11 Randolph Chung <tausq@debian.org>
+
+ * gdb.base/structs2.exp: Mark two tests as xfail because of a compiler
+ problem.
+
+2004-06-10 Andrew Cagney <cagney@gnu.org>
+
+ * lib/compiler.cc, lib/compiler.c: Append either
+ __GNUC_PATCHLEVEL__, or "unknown" to the compiler_info.
+ * gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
+ instead of gcc-3-3.
+
+2004-06-09 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/structs.exp (test_struct_calls): Fix KFAIL for
+ gdb/1455, bug is specific to "long long" and "double".
+
+ * gdb.base/structs.exp (test_struct_returns, test_struct_returns)
+ (test_struct_calls): Remove KFAIL of "long double" on i*86-*-*,
+ x86_64-*-*, sparc64-*-*, and sparc*-*-solaris2*. PR tdep/1447
+ fixed.
+
+2004-06-09 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.base/structs.exp (test_struct_returns): Replace
+ "return_value_unknown" and "finish_value_unknown" by
+ "return_value_known" and "finish_value_known". Instead of
+ "return_value_unknown" iff "finish_value_unknown", check
+ "return_value_known" implies "finish_value_known".
+
+2004-06-08 Martin Hunt <hunt@redhat.com>
+
+ * gdb.base/float.exp: Add pattern for mips targets.
+
+2004-06-08 Randolph Chung <tausq@debian.org>
+
+ * gdb.base/float.exp: Add pattern for hppa*-* target; make the failure
+ message for unknown architectures more clear.
+
+2004-06-08 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.ada/null_record.exp: Use "start" instead of "begin" to
+ start the execution of the program.
+
+2004-06-07 Jim Blandy <jimb@redhat.com>
+
+ * gdb.arch/i386-sse.exp, gdb.arch/i386-sse.c: New tests.
+ * gdb.arch/i386-cpuid.h: New helper file.
+
+2004-06-07 Randolph Chung <tausq@debian.org>
+
+ * gdb.base/shlib-call.exp: Allow breakpoint to be added after inferior
+ has started.
+
+2004-06-04 Roland McGrath <roland@redhat.com>
+
+ Fix PR gdb/1647.
+ * gdb.base/auxv.exp (fetch_auxv): Revert last change and fix it
+ differently to be robust to output buffering differences.
+
+2004-06-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.threads/pthreads.exp: Update copyright years.
+ (check_control_c): Change asynchronous 'after' to synchronous.
+
+2004-06-04 Roland McGrath <roland@redhat.com>
+
+ * gdb.base/auxv.exp (fetch_auxv): Consume output fully through
+ next gdb prompt.
+
+2004-06-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR gdb/1636.
+ * gdb.threads/manythreads.exp: Change asynchronous 'after'
+ calls to synchronous.
+
+2004-05-26 Jim Blandy <jimb@redhat.com>
+
+ * gdb.arch/e500-prologue.exp, gdb.arch/e500-prologue.c: New tests.
+
+2004-05-24 Randolph Chung <tausq@debian.org>
+
+ * gdb.asm/asm-source.exp: Enable test for hppa-linux target.
+ * gdb.asm/pa.inc: New file.
+
+2004-05-22 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/signull.c: Use sigjmp_buf instead of jmp_buf.
+
+2004-05-21 Joel Brobecker <brobecker@gnat.com>
+ Daniel Jacobowitz <drow@mvista.com>
+
+ * lib/gdb.exp (gdb_test_multiple): Improve regexp matching the
+ GDB prompt.
+
+2004-05-20 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gdb.base/signull.c: Use sigsetjmp/siglongjmp instead of
+ setjmp/longjmp. Use sigaction instead of signal.
+
+2004-05-19 J. Brobecker <brobecker@gnat.com>
+ Michael Snyder <msnyder@redhat.com>
+
+ * gdb.threads/pthread_cond_wait.c: New file.
+ * gdb.threads/pthread_cond_wait.exp: New testcase.
+
+2004-05-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/signull.exp, gdb.base/signull.c: New files.
+ * gdb.base/gdb1476.c, gdb.base/gdb1476.exp: Delete files.
+
+2004-05-11 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/sigstep.exp (advancei): Update KFAILs. gdb/1613 is
+ fixed but revealed gdb/1639.
+
+2004-05-10 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/signals.exp (signal_tests_1): Simplify "continue to
+ func1" and "next to 2nd alarm", kernel bug avoided.
+
+2004-05-10 Daniel Jacobowitz <dan@debian.org>
+
+ PR external/1568
+ * gdb.base/bigcore.exp: Check the size of the dumped core file.
+ XFAIL if it is smaller than bytes_allocated.
+ * gdb.base/bigcore.c (bytes_allocated): Make static and unsigned.
+ (main): Make chunks_allocated unsigned. Correct comment.
+
+2004-05-07 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.arch/powerpc-aix-prologue.c: New file.
+ * gdb.arch/powerpc-aix-prologue.exp: New file.
+
+2004-05-07 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/lineinc.exp, gdb.base/lineinc1.h, gdb.base/lineinc2.h,
+ gdb.base/lineinc3.h, gdb.base/lineinc.c: New tests.
+
+2004-05-06 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.base/sep.exp: No longer setup_kfail when the program was
+ built with dwarf2.
+
+2004-05-05 Jim Ingham <jingham@apple.com>
+
+ * gdb.base/pending.exp: Make sure pending breakpoints
+ preserve the ignore count.
+
+2004-04-27 Jerome Guitton <guitton@gnat.com>
+
+ * i386-prologue.exp: Add testcase for jump instruction as first
+ instruction of the real code.
+ * i386-prologue.c (jump_at_beginning): New function.
+
+2004-04-28 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/call-sc.exp: Remove patterns to KFAIL PR gdb/1624 on
+ x86_64-*-*.
+
+2004-04-28 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/call-sc.exp: Remove patterns to KFAIL PR gdb/1623 on
+ i*86-*-*.
+
+2004-04-25 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/call-sc.exp (start_scalars_test): Fix regular
+ expression that checks the return type.
+
+2004-04-23 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/call-sc.exp: New test of scalar call/return values.
+ * gdb.base/call-sc.c: Ditto.
+
+2004-04-23 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gdb.threads/manythreads.c: Reduce thread stack size.
+
+2004-04-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.threads/manythreads.c: Add copyright notice.
+
+2004-04-23 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/siginfo.exp: Better handle step out of signal.
+ * gdb.base/sigstep.exp: Ditto.
+
+2004-04-22 Jeff Johnston <jjohnstn@redhat.com>
+ Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/manythreads.c: New testcase.
+ * gdb.threads/manythreads.exp: Ditto.
+
+2004-04-22 Jim Blandy <jimb@redhat.com>
+
+ * gdb.stabs/exclfwd.exp, gdb.stabs/exclfwd1.c,
+ gdb.stabs/exclfwd2.c, gdb.stabs/exclfwd.h: New test.
+
+2004-04-21 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.stabs/weird.exp: Accept full pathname for $binfile.
+
+2004-04-21 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/sigstep.c: New file.
+ * gdb.base/sigstep.exp: New file.
+
+2004-04-16 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.gdb/observer.exp (test_normal_stop_notifications): Update
+ call to observer_notify_normal_stop.
+
+2004-04-15 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/siginfo.c: New file.
+ * gdb.base/siginfo.exp: New file.
+
+2004-04-12 J. Brobecker <brobecker@gnat.com>
+
+ * gdb.base/sep.exp: Fix typo in comment.
+
+2004-04-12 J. Brobecker <brobecker@gnat.com>
+
+ * gdb.base/sep.c: New file.
+ * gdb.base/sep-proc.c: New file.
+ * gdb.base/sep.exp: New testcase.
+
+2004-04-09 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/bigcore.exp: Disable on Solaris; no sparse core file
+ support.
+
+2004-04-05 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/sigaltstack.c: New file.
+ * gdb.base/sigaltstack.exp: New file.
+
+2004-04-04 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.base/foll-fork.exp: Update the expected output for
+ "help set follow-fork-mode", to match a change that was made
+ to the help of this variable on 2004-01-13.
+
2004-04-01 Joel Brobecker <brobecker@gnat.com>
* lib/ada.exp: Add copyright notice.
@@ -11873,11 +12897,16 @@ Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
will allow them to work with the new version of dejagnu will be
made in a future update.
-For additional changes see gdb.mi/ChangeLog-1999-2003.
+ For additional changes see gdb.mi/ChangeLog-1999-2003.
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
+;; Local Variables:
+;; mode: change-log
+;; left-margin: 8
+;; fill-column: 74
+;; version-control: never
+;; End:
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
+ Copying and distribution of this file, with or without modification,
+ are permitted provided the copyright notice and this notice are preserved.
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 99c0a8f32b6..d9be89c5e7b 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for regression testing the GNU debugger.
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is part of GDB.
@@ -36,7 +36,8 @@ EXEEXT = @EXEEXT@
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@
ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
- gdb.java gdb.mi gdb.objc gdb.threads gdb.trace $(SUBDIRS)
+ gdb.fortran gdb.java gdb.mi gdb.objc gdb.threads gdb.trace \
+ $(SUBDIRS)
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
echo $${rootme}/../../expect/expect ; \
diff --git a/gdb/testsuite/config/hppro.exp b/gdb/testsuite/config/hppro.exp
deleted file mode 100644
index e341ae6e9e5..00000000000
--- a/gdb/testsuite/config/hppro.exp
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1997 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
-
-load_lib ../config/monitor.exp
-
-# Hppro monitor is very slow...
-set timeout 540
-verbose "Timeout is now $timeout seconds" 2
diff --git a/gdb/testsuite/config/sparclet.exp b/gdb/testsuite/config/sparclet.exp
deleted file mode 100644
index 4e2e96b60d9..00000000000
--- a/gdb/testsuite/config/sparclet.exp
+++ /dev/null
@@ -1,388 +0,0 @@
-# Copyright 1996, 1997 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.
-
-# This file was written by Michael Snyder <msnyder@cygnus.com>.
-
-# GDB support routines for a board using the sparclet remote debugging
-# protocol.
-
-load_lib remote.exp
-load_lib gdb.exp
-
-#
-# Sparclet remote run command.
-#
-
-proc gdb_start { } {
- global gdb_prompt
-
- if ![file exists loader] {
- global libdir
- set loader loader;
-
- if [target_info exists gdb_stub_offset] {
- set result [target_compile "${libdir}/stub-loader.c" $loader executable "libs=-Wl,-Ttext,[target_info gdb_stub_offset]"];
- } else {
- set result [target_compile "${libdir}/stub-loader.c" $loader executable "ldscript=[target_info gdb_stub_ldscript]"];
- }
- }
-
- verbose -log "$gdb_prompt is gdb prompt"
-
- set result 0;
- for { set y 0; } { $y < 4 } { incr y } {
- if { [default_gdb_start] != 0 } {
- return -1;
- }
-
- if [target_info exists baud] {
- send_gdb "set remotebaud [target_info baud]\n"
- gdb_expect {
- -re "$gdb_prompt" { }
- default {
- perror "Error setting baud rate."
- return -1;
- }
- }
- }
-
- for {set x 1;} { $x < 4 } {incr x} {
- set result [gdb_sparclet_startup $result];
- if { $result > 0 } {
- return 1;
- }
- # mmmmm, magic numbers.
- if { $result == -42 || $result == -43 } {
- break;
- } else {
- reboot_target;
- }
- }
- if { $x == 4 } {
- return -1;
- }
- gdb_exit;
- sleep 5;
- }
- return -1;
-}
-
-proc gdb_sparclet_startup { arg } {
- global gdb_prompt
- global GDB
- global verbose
-
- set is_running_stub 0;
-
- if [target_info exists serial] {
- set serial [target_info serial];
- } else {
- set serial [target_info netport];
- }
- set protocol [target_info gdb_protocol];
- set check_stub 1;
- if { $arg != -42 } {
- send_gdb "target $protocol $serial\n";
- # 10 seconds may be a bit short.
- gdb_expect 10 {
- -re "already.*y or n." {
- gdb_send "y\n";
- exp_continue;
- }
- -re "Remote target.*connected to.*$gdb_prompt" { set check_stub 0; }
- -re "$gdb_prompt" { }
- timeout { }
- }
- if { $check_stub } {
- verbose "timed out, checking if stub is already running"
- send_gdb "\003";
- sleep 1;
- send_gdb "\003";
- gdb_expect 10 {
- -re "$gdb_prompt" { }
- default {
- remote_close host;
- return -42;
- }
- }
- }
- }
- if [target_info exists gdb_serial] {
- set gdb_serial [target_info gdb_serial];
- } else {
- set gdb_serial $serial;
- }
- if { $check_stub } {
- send_gdb "target remote $gdb_serial\n";
- gdb_expect 15 {
- -re "Remote debugging.*$gdb_prompt" {
- verbose "stub is already running"
- set is_running_stub 1;
- }
- default {
- warning "board isn't responding";
- remote_close host;
- remote_reboot target;
- return -43;
- }
- }
- }
-
- if { $is_running_stub == 0 } {
- global srcdir
-
- if [is_remote host] {
- set loader [remote_download host "loader"];
- } else {
- set loader "loader";
- }
- send_gdb "file $loader\n";
- gdb_expect {
- -re "A program is being debug.*Kill it.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Load new symbol table.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Reading symbols from.*done..*$gdb_prompt $" {}
- -re "$gdb_prompt $" { perror "GDB couldn't find loader" }
- timeout {
- perror "(timeout) read symbol file" ;
- return -1
- }
- }
-
- send_gdb "target $protocol $serial\n";
- gdb_expect {
- -re "Remote target.*connected to.*$gdb_prompt" { }
- default {
- perror "Error reconnecting to board.";
- return -1;
- }
- }
-
- send_gdb "load $loader [target_info gdb_stub_offset]\n"
- verbose "Loading $loader into $GDB" 2
- set no_run_command 0;
- gdb_expect 1200 {
- -re "Loading.*$gdb_prompt $" {
- verbose "Loaded $loader into $GDB" 1
- }
- -re "Transfer rate:.*Switching to remote protocol.*Remote debugging" {
- set no_run_command 1;
- }
- -re "$gdb_prompt $" {
- if $verbose>1 then {
- perror "GDB couldn't load."
- }
- }
- timeout {
- if $verbose>1 then {
- perror "Timed out trying to load $arg."
- }
- }
- }
-
- if !$no_run_command {
- send_gdb "run\n";
- gdb_expect 60 {
- -re "A program is being debug.*Kill it.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "The program being debugged .*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Starting program:.*loader.*$" {
- verbose "Starting loader succeeded"
- }
- timeout {
- perror "(timeout) starting the loader" ;
- return -1
- }
- default {
- perror "error starting the loader";
- }
- }
- }
- sleep 2;
- send_gdb ""
- sleep 1;
- send_gdb ""
- verbose "Sent ^C^C"
- gdb_expect 10 {
- -re "Give up .and stop debugging it.*$" {
- send_gdb "y\n"
- exp_continue
- }
- -re "$gdb_prompt $" {
- verbose "Running loader succeeded"
- }
- timeout {
- warning "(timeout) interrupting the loader" ;
- remote_close host;
- }
- default {
- warning "error interrupting the loader";
- }
- }
-
- gdb_exit;
- return [gdb_start];
- }
- return 1;
-}
-
-proc gdb_run_cmd { args } {
- global gdb_prompt
-
- gdb_breakpoint exit;
- send_gdb "set \$fp=0\n";
- gdb_expect {
- -re "$gdb_prompt" { }
- }
- # This is needed for the SparcLite. Whee.
- if [target_info exists gdb,start_symbol] {
- set start_comm "jump *[target_info gdb,start_symbol]\n";
- } else {
- set start_comm "jump *start\n";
- }
- send_gdb "break copyloop\n";
- gdb_expect 10 {
- -re "Breakpoint.*$gdb_prompt $" {
- set start_comm "continue\n";
- }
- -re "$gdb_prompt $" { }
- timeout { warning "break copyloop failed badly"; }
- }
- send_gdb $start_comm;
- gdb_expect 10 {
- -re "y or n. $" {
- remote_send host "y\n"
- exp_continue;
- }
- -re "Breakpoint.*in copyloop.*$gdb_prompt $" {
- remote_send host "jump relocd\n";
- exp_continue;
- }
- -re "Continuing at.*\[\r\n\]" { }
- default {
- return -1;
- }
- }
-
- return "";
-}
-
-
-#
-# gdb_load -- load a file into the GDB.
-# Returns a 0 if there was an error,
-# 1 if it load successfully.
-#
-proc gdb_load { arg } {
- global verbose
- global loadpath
- global loadfile
- global gdb_prompt
- global GDB
- global expect_out
-
- set loadfile [file tail $arg]
- set loadpath [file dirname $arg]
-
- set protocol [target_info gdb_protocol];
-
- if [is_remote host] {
- set arg [remote_download host $arg];
- }
- send_gdb "file $arg\n"
- gdb_expect 30 {
- -re "A program is being debug.*Kill it.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Load new symbol table.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Reading symbols from.*done..*$gdb_prompt $" {}
- -re "$gdb_prompt $" { perror "GDB couldn't read file" }
- timeout {
- perror "(timeout) read symbol file" ;
- return -1
- }
- }
-
- if [target_info exists gdb_serial] {
- set gdb_serial [target_info gdb_serial];
- } else {
- if [target_info exists serial] {
- set gdb_serial [target_info serial];
- } else {
- set gdb_serial [target_info netport];
- }
- }
- send_gdb "target remote $gdb_serial\n"
- gdb_expect 30 {
- -re "Kill it?.*y or n.*" {
- send_gdb "y\n";
- exp_continue
- }
- -re "$gdb_prompt $" {
- verbose "Set remote target to $gdb_serial" 2
- }
- timeout {
- perror "Couldn't set remote target."
- return -1
- }
- }
- if [target_info exists gdb_load_offset] {
- set offset "[target_info gdb_load_offset]";
- } else {
- set offset "";
- }
- send_gdb "load $arg $offset\n"
- verbose "Loading $arg into $GDB" 2
- gdb_expect 1200 {
- -re "Loading.*$gdb_prompt $" {
- verbose "Loaded $arg into $GDB" 1
- }
- -re "$gdb_prompt $" {
- if $verbose>1 then {
- perror "GDB couldn't load."
- }
- }
- timeout {
- if $verbose>1 then {
- perror "Timed out trying to load $arg."
- }
- }
- }
- send_gdb "list main\n";
- gdb_expect 60 {
- -re "$gdb_prompt" { }
- default {
- perror "command for list main never completed";
- return -1;
- }
- }
-
- return 0
-}
diff --git a/gdb/testsuite/config/udi.exp b/gdb/testsuite/config/udi.exp
deleted file mode 100644
index 4a35232729c..00000000000
--- a/gdb/testsuite/config/udi.exp
+++ /dev/null
@@ -1,110 +0,0 @@
-# Test Framework Driver for GDB driving Universal Debug Interface on 29K
-# Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1997
-# 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.
-
-# This file was written by Rob Savoye. (rob@cygnus.com)
-
-load_lib gdb.exp
-
-#
-# gdb_target_udi
-# Set gdb to the desired UDI target
-#
-proc gdb_target_udi { } {
- global gdb_prompt
- global verbose
- global exit_status
-
- set targetname [target_info mondfe,name];
- # set targets hostname
- send_gdb "target udi $targetname\n"
- set timeout 60
- verbose "Timeout is now $timeout seconds" 2
- gdb_expect {
- -re "target udi $targetname\[\r\n\]+" {
- exp_continue
- }
- -re "TIP UDI 1.2 Conformant.*$gdb_prompt $" {
- verbose "Set target to $targetname"
- }
- -re "TIP-ipc WARNING,.*failed:" {
- warning "$expect_out(buffer)"
- }
- -re "TIP-ipc ERROR,.*failed:" {
- perror "$expect_out(buffer)"
- }
- -re "A program is being debugged already. Kill it\? \(y or n\)" {
- send "y\n"
- exp_continue
- }
- timeout {
- perror "Couldn't set target for UDI."
- cleanup
- exit $exit_status
- }
- }
- set timeout 10
- verbose "Timeout is now $timeout seconds" 2
-}
-
-#
-# gdb_load -- load a file into the debugger.
-# return a -1 if anything goes wrong.
-#
-
-proc gdb_load { arg } {
- global verbose
- global loadpath
- global loadfile
- global GDB
- global gdb_prompt
-
- if [gdb_file_cmd $arg] {
- return -1
- }
-
- gdb_target_udi
-}
-
-#
-# gdb_start -- start GDB running. This assumes that there the
-# UDICONF enviroment variable is set.
-#
-proc gdb_start { } {
- global env;
-
- set env(UDICONF) [target_info mondfe,udi_soc];
- default_gdb_start
- verbose "Setting up target, Please wait..."
- gdb_target_udi
-}
-
-#
-# gdb_exit -- exit gdb
-#
-proc gdb_exit { } {
- catch default_gdb_exit
- set in [open [concat "|ls -F"] r]
- while {[gets $in line]>-1} {
- if [regexp "=$" $line] then {
- set line [string trimright $line "="]
- verbose "Removing the $line named socket"
- exec rm -f $line
- }
- }
- close $in
-}
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index cbf36522f33..271e11d1281 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -1049,9 +1049,11 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "Makefile gdb.ada/Makefile gdb.ada/gnat_ada.gpr \
+trap 'rm -fr `echo "Makefile \
+ gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
- gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.cp/Makefile gdb.disasm/Makefile gdb.fortran/Makefile \
+ gdb.java/Makefile gdb.mi/Makefile \
gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -1144,9 +1146,11 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile gdb.ada/Makefile gdb.ada/gnat_ada.gpr \
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
+ gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
- gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.cp/Makefile gdb.disasm/Makefile gdb.fortran/Makefile \
+ gdb.java/Makefile gdb.mi/Makefile \
gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index 4b95363488c..8b90e04484c 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-# Copyright 2002, 2003
+# Copyright 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# NOTE ON AUTOCONF VERSION:
+# AC_PREREQ says 2.13.
+# The output file says "Generated automatically using autoconf version 2.13".
+# But that is wrong. This file must be processed with autoconf 000227,
+# a special version which identifies itself as autoconf 2.13.
+
AC_PREREQ(2.13)
AC_INIT(gdb.base)
@@ -112,7 +118,9 @@ AC_CHECK_HEADERS(pthread.h)
AC_EXEEXT
AC_CONFIG_SUBDIRS($configdirs)
-AC_OUTPUT([Makefile gdb.ada/Makefile gdb.ada/gnat_ada.gpr \
+AC_OUTPUT([Makefile \
+ gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
- gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.cp/Makefile gdb.disasm/Makefile gdb.fortran/Makefile \
+ gdb.java/Makefile gdb.mi/Makefile \
gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile])
diff --git a/gdb/testsuite/gdb.ada/gnat_ada.gpr.in b/gdb/testsuite/gdb.ada/gnat_ada.gin
index 23cd5586dab..23cd5586dab 100644
--- a/gdb/testsuite/gdb.ada/gnat_ada.gpr.in
+++ b/gdb/testsuite/gdb.ada/gnat_ada.gin
diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp
index 8e024d6ca24..d98867c0f8e 100644
--- a/gdb/testsuite/gdb.ada/null_record.exp
+++ b/gdb/testsuite/gdb.ada/null_record.exp
@@ -34,9 +34,9 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "begin" \
+gdb_test "start" \
"Breakpoint \[0-9\]+ at .*null_record.adb.*" \
- "begin"
+ "start"
gdb_test "ptype empty" \
"type = record null; end record" \
diff --git a/gdb/testsuite/gdb.arch/e500-prologue.c b/gdb/testsuite/gdb.arch/e500-prologue.c
new file mode 100644
index 00000000000..f9e83dabf8a
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/e500-prologue.c
@@ -0,0 +1,54 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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. */
+
+void arg_passing_test2 (void);
+
+int
+main (void)
+{
+ arg_passing_test2 ();
+ return 0;
+}
+
+
+/* Asm for procedure arg_passing_test2.
+
+ The challenge here is getting past the 'mr 0,3' and 'stb'
+ instructions. */
+
+asm (" .section \".text\"\n"
+ " .align 2\n"
+ " .globl arg_passing_test2\n"
+ " .type arg_passing_test2, @function\n"
+ "arg_passing_test2:\n"
+ " stwu 1,-64(1)\n"
+ " stw 31,60(1)\n"
+ " mr 31,1\n"
+ " mr 0,3\n"
+ " evstdd 4,16(31)\n"
+ " stw 5,24(31)\n"
+ " stw 7,32(31)\n"
+ " stw 8,36(31)\n"
+ " stw 9,40(31)\n"
+ " stb 0,8(31)\n"
+ " lwz 11,0(1)\n"
+ " lwz 31,-4(11)\n"
+ " mr 1,11\n"
+ " blr\n"
+ " .size arg_passing_test2, .-arg_passing_test2\n");
diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp
new file mode 100644
index 00000000000..06dec9fb28d
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/e500-prologue.exp
@@ -0,0 +1,82 @@
+# Copyright 2004 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.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test PowerPC E500 prologue analyzer.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc-*"] then {
+ verbose "Skipping powerpc E500 prologue tests."
+ return
+}
+
+set testfile "e500-prologue"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Insert a breakpoint in FUNCTION and verifies that the breakpoint was
+# inserted at the expected location. EXPECTED_LOCATION should be an
+# offset relative to the function start address.
+proc insert_breakpoint {function expected_location} {
+ global gdb_prompt
+ global expect_out
+ global hex
+
+ set address ""
+
+ # Insert a breakpoint using the given function name, and extract
+ # the breakpoint address for the output.
+ gdb_test_multiple "break $function" "set breakpoint in $function" {
+ -re "Breakpoint 1 at ($hex).*$gdb_prompt $" {
+ set address $expect_out(1,string)
+ }
+ default {
+ fail "set breakpoint in $function"
+ }
+ }
+
+ # If we managed to get the breakpoing address, then check that
+ # we inserted it at the expected location by examining the
+ # instruction at that address (we're not interested in the insn
+ # itself, but rather at the address printed at the begining of
+ # the instruction).
+ if { $address != "" } then {
+ gdb_test "x /i $address" \
+ ".*<$function\\+$expected_location>.*" \
+ "check $function breakpoint address"
+ } else {
+ fail "unable to compute breakpoint address"
+ }
+
+}
+
+insert_breakpoint "arg_passing_test2" 40
diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp
index 9224704b219..30dae0a15f7 100644
--- a/gdb/testsuite/gdb.arch/e500-regs.exp
+++ b/gdb/testsuite/gdb.arch/e500-regs.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
@@ -112,7 +112,7 @@ for {set i 0} {$i < 32} {incr i 1} {
if {$endianness == "big"} {
set decimal_vector ".uint64 = 4294967297, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .0, 1, 0, 1., v8_int8 = ..000.000.000.001.000.000.000.001.."
} else {
- set decimal_vector ".uint64 = 0x0000000100000001, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .1, 0, 1, 0., v8_int8 = ..001.000.000.000.001.000.000.000.001.000.000.000.001.000.000.."
+ set decimal_vector ".uint64 = 4294967297, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .1, 0, 1, 0., v8_int8 = ..001.000.000.000.001.000.000.."
}
for {set i 0} {$i < 32} {incr i 1} {
diff --git a/gdb/testsuite/gdb.arch/i386-cpuid.h b/gdb/testsuite/gdb.arch/i386-cpuid.h
new file mode 100644
index 00000000000..067b22fa712
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-cpuid.h
@@ -0,0 +1,77 @@
+/* Helper file for i386 platform. Runtime check for MMX/SSE/SSE2 support.
+
+ Copyright 2004 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. */
+
+/* Used by 20020523-2.c and i386-sse-6.c, and possibly others. */
+/* Plagarized from 20020523-2.c. */
+/* Plagarized from gcc. */
+
+#define bit_CMOV (1 << 15)
+#define bit_MMX (1 << 23)
+#define bit_SSE (1 << 25)
+#define bit_SSE2 (1 << 26)
+
+#ifndef NOINLINE
+#define NOINLINE __attribute__ ((noinline))
+#endif
+
+unsigned int i386_cpuid (void) NOINLINE;
+
+unsigned int NOINLINE
+i386_cpuid (void)
+{
+ int fl1, fl2;
+
+#ifndef __x86_64__
+ /* See if we can use cpuid. On AMD64 we always can. */
+ __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
+ "pushl %0; popfl; pushfl; popl %0; popfl"
+ : "=&r" (fl1), "=&r" (fl2)
+ : "i" (0x00200000));
+ if (((fl1 ^ fl2) & 0x00200000) == 0)
+ return (0);
+#endif
+
+ /* Host supports cpuid. See if cpuid gives capabilities, try
+ CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we
+ don't need their CPUID values here, and %ebx may be the PIC
+ register. */
+#ifdef __x86_64__
+ __asm__ ("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx"
+ : "=a" (fl1) : "0" (0) : "rdx", "cc");
+#else
+ __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
+ : "=a" (fl1) : "0" (0) : "edx", "cc");
+#endif
+ if (fl1 == 0)
+ return (0);
+
+ /* Invoke CPUID(1), return %edx; caller can examine bits to
+ determine what's supported. */
+#ifdef __x86_64__
+ __asm__ ("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx"
+ : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
+#else
+ __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
+ : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
+#endif
+
+ return fl2;
+}
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c
index 4c92a9c83e5..e6846576fde 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.c
+++ b/gdb/testsuite/gdb.arch/i386-prologue.c
@@ -1,19 +1,63 @@
+/* Unwinder test program.
+
+ Copyright 2003, 2004 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. */
+
+#ifdef SYMBOL_PREFIX
+#define SYMBOL(str) SYMBOL_PREFIX #str
+#else
+#define SYMBOL(str) #str
+#endif
+
void gdb1253 (void);
+void gdb1718 (void);
void gdb1338 (void);
+void jump_at_beginning (void);
int
main (void)
{
+ standard ();
gdb1253 ();
+ gdb1718 ();
gdb1338 ();
+ jump_at_beginning ();
return 0;
}
+/* A normal prologue. */
+
+asm(".text\n"
+ " .align 8\n"
+ SYMBOL (standard) ":\n"
+ " pushl %ebp\n"
+ " movl %esp, %ebp\n"
+ " pushl %edi\n"
+ " int $0x03\n"
+ " leave\n"
+ " ret\n");
+
/* Relevant part of the prologue from symtab/1253. */
asm(".text\n"
" .align 8\n"
- "gdb1253:\n"
+ SYMBOL (gdb1253) ":\n"
" pushl %ebp\n"
" xorl %ecx, %ecx\n"
" movl %esp, %ebp\n"
@@ -22,11 +66,26 @@ asm(".text\n"
" leave\n"
" ret\n");
+/* Relevant part of the prologue from backtrace/1718. */
+
+asm(".text\n"
+ " .align 8\n"
+ SYMBOL (gdb1718) ":\n"
+ " pushl %ebp\n"
+ " movl $0x11111111, %eax\n"
+ " movl %esp, %ebp\n"
+ " pushl %esi\n"
+ " movl $0x22222222, %esi\n"
+ " pushl %ebx\n"
+ " int $0x03\n"
+ " leave\n"
+ " ret\n");
+
/* Relevant part of the prologue from backtrace/1338. */
asm(".text\n"
" .align 8\n"
- "gdb1338:\n"
+ SYMBOL (gdb1338) ":\n"
" pushl %edi\n"
" pushl %esi\n"
" pushl %ebx\n"
@@ -35,3 +94,19 @@ asm(".text\n"
" popl %esi\n"
" popl %edi\n"
" ret\n");
+
+/* The purpose of this function is to verify that, during prologue
+ skip, GDB does not follow a jump at the beginnning of the "real"
+ code. */
+
+asm(".text\n"
+ " .align 8\n"
+ SYMBOL (jump_at_beginning) ":\n"
+ " pushl %ebp\n"
+ " movl %esp,%ebp\n"
+ " jmp .gdbjump\n"
+ " nop\n"
+ ".gdbjump:\n"
+ " movl %ebp,%esp\n"
+ " popl %ebp\n"
+ " ret\n");
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index f1c1e72425a..48aad1c13ae 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
@@ -36,10 +36,36 @@ if ![istarget "i?86-*-*"] then {
set testfile "i386-prologue"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+
+# some targets have leading underscores on assembly symbols.
+# TODO: detect this automatically
+set additional_flags ""
+if [istarget "i?86-*-cygwin*"] then {
+ set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
+}
+
+# Don't use "debug", so that we don't have line information for the assembly
+# fragments.
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list $additional_flags]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
+
+# The code used by the tests here encodes some breakpoints by using
+# inline assembler. This will generate a SIGTRAP which will be caught
+# by GDB. At that point the instruction pointer will point at the
+# next instruction, and execution can continue without any problems.
+# Some systems however (QNX Neutrino, Solaris) will adjust the
+# instruction pointer to point at the breakpoint instruction instead.
+# On these systems we cannot continue unless we skip it. This
+# procedure takes care of that.
+
+proc skip_breakpoint { msg } {
+ gdb_test "if (*(unsigned char *)\$pc == 0xcc)\nset \$pc = \$pc + 1\nend" \
+ "" "skip breakpoint in ${msg}"
+}
+
+
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -53,10 +79,26 @@ if ![runto_main] then {
gdb_suppress_tests
}
+# Testcase for standard prologue.
+
+gdb_test "continue" "Program received signal SIGTRAP.*" "continue to standard"
+
+skip_breakpoint standard
+
+gdb_test "backtrace 10" \
+ "#0\[ \t\]*$hex in standard.*\r\n#1\[ \t\]*$hex in main.*" \
+ "backtrace in standard"
+
+gdb_test "info frame" \
+ ".*Saved registers:.*ebp at.*edi at.*eip at.*" \
+ "saved registers in standard"
+
# Testcase from symtab/1253.
gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1253"
+skip_breakpoint gdb1253
+
gdb_test "backtrace 10" \
"#0\[ \t\]*$hex in gdb1253.*\r\n#1\[ \t\]*$hex in main.*" \
"backtrace in gdb1253"
@@ -65,10 +107,27 @@ gdb_test "info frame" \
".*Saved registers:.*ebp at.*edi at.*eip at.*" \
"saved registers in gdb1253"
+# Testcase from backtrace/1718.
+
+gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1718"
+
+skip_breakpoint gdb1718
+
+gdb_test "backtrace 10" \
+ "#0\[ \t\]*$hex in gdb1718.*\r\n#1\[ \t\]*$hex in main.*" \
+ "backtrace in gdb1718"
+
+setup_kfail *-*-* gdb/1718
+gdb_test "info frame" \
+ ".*Saved registers:.*esi at.*ebx at.*eip at.*" \
+ "saved registers in gdb1718"
+
# Testcase from backtrace/1338.
gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1338"
+skip_breakpoint gdb1338
+
gdb_test "backtrace 10" \
"#0\[ \t\]*$hex in gdb1338.*\r\n#1\[ \t\]*$hex in main.*" \
"backtrace in gdb1338"
@@ -76,3 +135,16 @@ gdb_test "backtrace 10" \
gdb_test "info frame" \
".*Saved registers:.*ebx at.*esi at.*edi at.*eip at.*" \
"saved registers in gdb1338"
+
+# Testcase jump_at_beginning.
+gdb_test_multiple "break jump_at_beginning" \
+ "set breakpoint in jump_at_beginning" {
+ -re "Breakpoint \[0-9\]* at ($hex).*$gdb_prompt $" {
+ gdb_test "x/i $expect_out(1,string)" \
+ ".*<jump_at_beginning.*>:.*jmp.*" \
+ "check jump_at_beginning prologue end"
+ }
+ default {
+ fail "set breakpoint in jump_at_beginning"
+ }
+}
diff --git a/gdb/testsuite/gdb.arch/i386-sse.c b/gdb/testsuite/gdb.arch/i386-sse.c
new file mode 100644
index 00000000000..496721c5e82
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-sse.c
@@ -0,0 +1,90 @@
+/* Test program for SSE registers.
+
+ Copyright 2004 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 <stdio.h>
+#include "i386-cpuid.h"
+
+typedef struct {
+ float f[4];
+} v4sf_t;
+
+
+v4sf_t data[8] =
+ {
+ { { 0.0, 0.25, 0.50, 0.75 } },
+ { { 1.0, 1.25, 1.50, 1.75 } },
+ { { 2.0, 2.25, 2.50, 2.75 } },
+ { { 3.0, 3.25, 3.50, 3.75 } },
+ { { 4.0, 4.25, 4.50, 4.75 } },
+ { { 5.0, 5.25, 5.50, 5.75 } },
+ { { 6.0, 6.25, 6.50, 6.75 } },
+ { { 7.0, 7.25, 7.50, 7.75 } },
+ };
+
+
+int
+have_sse (void)
+{
+ int edx = i386_cpuid ();
+
+ if (edx & bit_SSE)
+ return 1;
+ else
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ if (have_sse ())
+ {
+ asm ("movaps 0(%0), %%xmm0\n\t"
+ "movaps 16(%0), %%xmm1\n\t"
+ "movaps 32(%0), %%xmm2\n\t"
+ "movaps 48(%0), %%xmm3\n\t"
+ "movaps 64(%0), %%xmm4\n\t"
+ "movaps 80(%0), %%xmm5\n\t"
+ "movaps 96(%0), %%xmm6\n\t"
+ "movaps 112(%0), %%xmm7\n\t"
+ : /* no output operands */
+ : "r" (data)
+ : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7");
+
+ puts ("Hi!"); /* first breakpoint here */
+
+ asm (
+ "movaps %%xmm0, 0(%0)\n\t"
+ "movaps %%xmm1, 16(%0)\n\t"
+ "movaps %%xmm2, 32(%0)\n\t"
+ "movaps %%xmm3, 48(%0)\n\t"
+ "movaps %%xmm4, 64(%0)\n\t"
+ "movaps %%xmm5, 80(%0)\n\t"
+ "movaps %%xmm6, 96(%0)\n\t"
+ "movaps %%xmm7, 112(%0)\n\t"
+ : /* no output operands */
+ : "r" (data)
+ : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7");
+
+ puts ("Bye!"); /* second breakpoint here */
+ }
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp
new file mode 100644
index 00000000000..702ee7127a5
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-sse.exp
@@ -0,0 +1,92 @@
+# Copyright 2004 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@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "i?86-*-*"] then {
+ verbose "Skipping i386 SSE tests."
+ return
+}
+
+set testfile "i386-sse"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ unsupported "compiler does not support SSE"
+ return
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+send_gdb "print have_sse ()\r"
+gdb_expect {
+ -re ".. = 1\r\n$gdb_prompt " {
+ pass "check whether processor supports SSE"
+ }
+ -re ".. = 0\r\n$gdb_prompt " {
+ verbose "processor does not support SSE; skipping SSE tests"
+ return
+ }
+ -re ".*$gdb_prompt $" {
+ fail "check whether processor supports SSE"
+ }
+ timeout {
+ fail "check whether processor supports SSE (timeout)"
+ }
+}
+
+gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
+ "Breakpoint .* at .*i386-sse.c.*" \
+ "set breakpoint in main"
+gdb_continue_to_breakpoint "continue to first breakpoint in main"
+
+foreach r {0 1 2 3 4 5 6 7} {
+ gdb_test "print \$xmm$r.v4_float" \
+ ".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \
+ "check contents of %xmm$r"
+}
+
+foreach r {0 1 2 3 4 5 6 7} {
+ gdb_test "set var \$xmm$r.v4_float\[0\] = $r + 10" "" "set %xmm$r"
+}
+
+gdb_test "break [gdb_get_line_number "second breakpoint here"]" \
+ "Breakpoint .* at .*i386-sse.c.*" \
+ "set breakpoint in main"
+gdb_continue_to_breakpoint "continue to second breakpoint in main"
+
+foreach r {0 1 2 3 4 5 6 7} {
+ gdb_test "print data\[$r\]" \
+ ".. = \\{f = \\{[expr $r + 10], $r.25, $r.5, $r.75\\}\\}.*" \
+ "check contents of data\[$r\]"
+}
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.c b/gdb/testsuite/gdb.arch/i386-unwind.c
index 6d10ecb84b2..b1fa1df06ee 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.c
+++ b/gdb/testsuite/gdb.arch/i386-unwind.c
@@ -1,6 +1,6 @@
/* Unwinder test program.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,6 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifdef SYMBOL_PREFIX
+#define SYMBOL(str) SYMBOL_PREFIX #str
+#else
+#define SYMBOL(str) #str
+#endif
+
void
trap (void)
{
@@ -34,9 +40,9 @@ asm(".text\n"
"gdb1435:\n"
" pushl %ebp\n"
" mov %esp, %ebp\n"
- " call trap\n"
- " .globl main\n"
- "main:\n"
+ " call " SYMBOL (trap) "\n"
+ " .globl " SYMBOL (main) "\n"
+ SYMBOL (main) ":\n"
" pushl %ebp\n"
" mov %esp, %ebp\n"
" call gdb1435\n");
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
index 9c3130fc8c3..85fb9da62bc 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
@@ -36,7 +36,15 @@ if ![istarget "i?86-*-*"] then {
set testfile "i386-unwind"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+
+# some targets have leading underscores on assembly symbols.
+# TODO: detect this automatically
+set additional_flags ""
+if [istarget "i?86-*-cygwin*"] then {
+ set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c
new file mode 100644
index 00000000000..ee31b496d3e
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.c
@@ -0,0 +1,55 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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. */
+
+void li_stw (void);
+
+int
+main (void)
+{
+ li_stw ();
+ return 0;
+}
+
+/* Asm for procedure li_stw().
+
+ The purpose of this function is to verify that GDB does not
+ include the li insn as part of the function prologue (only part
+ of the prologue if part of a pair of insns saving vector registers).
+ Similarly, GDB should not include the stw insn following the li insn,
+ because the source register is not used for parameter passing. */
+
+
+asm (" .csect .text[PR]\n"
+ " .align 2\n"
+ " .lglobl .li_stw\n"
+ " .csect li_stw[DS]\n"
+ "li_stw:\n"
+ " .long .li_stw, TOC[tc0], 0\n"
+ " .csect .text[PR]\n"
+ ".li_stw:\n"
+ " stw 31,-4(1)\n"
+ " stwu 1,-48(1)\n"
+ " mr 31,1\n"
+ " stw 11,24(31)\n"
+ " li 0,8765\n"
+ " stw 0,28(31)\n"
+ " lwz 1,0(1)\n"
+ " lwz 31,-4(1)\n"
+ " blr\n");
+
diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
new file mode 100644
index 00000000000..76e3c27cf2e
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
@@ -0,0 +1,82 @@
+# Copyright 2004 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.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test rs6000 prologue analyzer.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc-*-aix*"] then {
+ verbose "Skipping powerpc-aix prologue tests."
+ return
+}
+
+set testfile "powerpc-aix-prologue"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Insert a breakpoint in FUNCTION and verifies that the breakpoint was
+# inserted at the expected location. EXPECTED_LOCATION should be an
+# offset relative to the function start address.
+proc insert_breakpoint {function expected_location} {
+ global gdb_prompt
+ global expect_out
+ global hex
+
+ set address ""
+
+ # Insert a breakpoint using the given function name, and extract
+ # the breakpoint address for the output.
+ gdb_test_multiple "break $function" "set breakpoint in $function" {
+ -re "Breakpoint 1 at ($hex).*$gdb_prompt $" {
+ set address $expect_out(1,string)
+ }
+ default {
+ fail "set breakpoint in $function"
+ }
+ }
+
+ # If we managed to get the breakpoing address, then check that
+ # we inserted it at the expected location by examining the
+ # instruction at that address (we're not interested in the insn
+ # itself, but rather at the address printed at the begining of
+ # the instruction).
+ if { $address != "" } then {
+ gdb_test "x /i $address" \
+ ".*<$function\\+$expected_location>.*" \
+ "check $function breakpoint address"
+ } else {
+ fail "unable to compute breakpoint address"
+ }
+
+}
+
+insert_breakpoint "li_stw" 12
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 75e64b484ea..e2c9e8a0c88 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -35,13 +35,15 @@ set asm-arch ""
set asm-note "empty"
set asm-flags ""
set link-flags "--entry _start"
+set debug-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}"
+ set asm-flags "-no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
"*arm-*-*" {
set asm-arch arm
@@ -63,7 +65,8 @@ switch -glob -- [istarget] {
}
"x86_64-*-*" {
set asm-arch x86_64
- set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
"i\[3456\]86-*-*" {
set asm-arch i386
@@ -74,11 +77,11 @@ switch -glob -- [istarget] {
}
"m6811-*-*" {
set asm-arch m68hc11
- set asm-flags "-mshort-double -m68hc11 -gdwarf2 --no-warn -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-mshort-double -m68hc11 -gdwarf-2 --no-warn -I${srcdir}/${subdir} -I${objdir}/${subdir}"
}
"m6812-*-*" {
set asm-arch m68hc11
- set asm-flags "-mshort-double -m68hc12 -gdwarf2 --no-warn -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-mshort-double -m68hc12 -gdwarf-2 --no-warn -I${srcdir}/${subdir} -I${objdir}/${subdir}"
}
"mips*-*" {
set asm-arch mips
@@ -88,18 +91,21 @@ switch -glob -- [istarget] {
}
"sh*-*-*" {
set asm-arch sh
- set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
"sparc-*-*" {
set asm-arch sparc
}
"sparc64-*-*" {
set asm-arch sparc64
- set asm-flags "-xarch=v9 -gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
"xstormy16-*-*" {
set asm-arch xstormy16
- set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
"v850-*-*" {
set asm-arch v850
@@ -110,7 +116,13 @@ switch -glob -- [istarget] {
}
"ia64-*-*" {
set asm-arch ia64
- set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
+ }
+ "hppa*-linux-*" {
+ set asm-arch pa
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gdwarf-2"
}
}
@@ -157,13 +169,39 @@ remote_exec build "rm -f ${subdir}/note.inc"
remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc
if { "${asm-flags}" == "" } {
- set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-gstabs"
+}
+
+# Allow the target board to override the debug flags.
+if { [board_info $dest exists debug_flags] } then {
+ set debug-flags "[board_info $dest debug_flags]"
}
-if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags}"] != ""} then {
+# The debug flags are in the format that gcc expects:
+# "-gdwarf-2", "-gstabs+", or "-gstabs". To be compatible with the
+# other languages in the test suite, we accept this input format.
+# So the user can run the test suite with:
+#
+# runtest --target_board unix/gdb:debug_flags=-gdwarf-2
+# make check RUNTESTFLAGS="--target_board unix/gdb:debug_flags=-gdwarf-2"
+#
+# However, the GNU assembler has different spellings than gcc.
+# So I adjust the debug flags here.
+
+# The GNU assembler spells "dwarf-2" as "dwarf2".
+regsub "--" "-gdwarf-2" "${debug-flags}" "-gdwarf2" debug-flags
+
+# The GNU assembler before 2.15 did not support "stabs+".
+regsub "--" "-gstabs\[+\]" "${debug-flags}" "-gstabs" debug-flags
+
+# The GNU assembler does not support level options like "-g2" or "-g3".
+regsub "--" "-g\[0-9\]" "${debug-flags}" "" debug-flags
+
+if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags} ${debug-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags} ${debug-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.asm/pa.inc b/gdb/testsuite/gdb.asm/pa.inc
new file mode 100644
index 00000000000..d53336e3167
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/pa.inc
@@ -0,0 +1,44 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ stw %rp, -20(%sp)
+ copy %r3, %r1
+ copy %sp, %r3
+ stwm %r1, 64(%sp)
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldw -20(%r3), %rp
+ bv %r0(%rp)
+ ldwm -64(%sp), %r3
+ .endm
+
+ .macro gdbasm_call subr
+ bl \subr , %rp
+ nop
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ comment "Don't know how to exit, but this will certainly halt..."
+ ldw 0(%r0), %r1
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ .align 4
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index dc8ba29ca4d..a521aea1092 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -1,5 +1,5 @@
-# Copyright 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -15,9 +15,6 @@
# 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 Elena Zannoni (ezannoni@cygnus.com)
if $tracelevel then {
@@ -272,35 +269,40 @@ gdb_expect {
# annotate-arg-value
# annotate-arg-end
#
-send_gdb "signal SIGUSR1\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "send SIGUSR1" }
- -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { setup_xfail "*-*-*" 1270
- fail "send SIGUSR1" }
- -re ".*$gdb_prompt$" { fail "send SIGUSR1" }
- timeout { fail "send SIGUSR1 (timeout)" }
-}
+if [target_info exists gdb,nosignals] {
+ unsupported "send SIGUSR1"
+ unsupported "backtrace @ signal handler"
+} else {
+ send_gdb "signal SIGUSR1\n"
+ gdb_expect {
+ -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { pass "send SIGUSR1" }
+ -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { setup_xfail "*-*-*" 1270
+ fail "send SIGUSR1" }
+ -re ".*$gdb_prompt$" { fail "send SIGUSR1" }
+ timeout { fail "send SIGUSR1 (timeout)" }
+ }
-#
-# test:
-# annotate-signal-handler-caller
-#
-verbose "match_max local is: [match_max]"
-verbose "match_max default is: [match_max -d]"
-# This is necessary because a 2000 buffer is not enought to get everything
-# up to the prompt ad the test gets a timeout.
-match_max 3000
-verbose "match_max now is: [match_max]"
-send_gdb "backtrace\n"
-gdb_expect {
- -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
- pass "backtrace @ signal handler"
+ #
+ # test:
+ # annotate-signal-handler-caller
+ #
+ verbose "match_max local is: [match_max]"
+ verbose "match_max default is: [match_max -d]"
+ # This is necessary because a 2000 buffer is not enought to get everything
+ # up to the prompt ad the test gets a timeout.
+ match_max 3000
+ verbose "match_max now is: [match_max]"
+ send_gdb "backtrace\n"
+ gdb_expect {
+ -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
+ pass "backtrace @ signal handler"
+ }
+ -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
+ timeout { fail "backtrace @ signal handler (timeout)" }
}
- -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
- timeout { fail "backtrace @ signal handler (timeout)" }
}
#
@@ -449,30 +451,35 @@ gdb_expect {
# It has been verified that other signals will be delivered. However,
# rather than twiddle the test, I choose to leave it as-is as it
# exposes an interesting failure on hpux11.
-setup_xfail hppa*-*-hpux11*
-send_gdb "signal SIGTRAP\n"
-gdb_expect {
- -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "signal sent" }
- -re ".*$gdb_prompt$" { fail "signal sent" }
- timeout { fail "signal sent (timeout)" }
+
+if [target_info exists gdb,nosignals] {
+ unsupported "signal sent"
+} else {
+ setup_xfail hppa*-*-hpux11*
+ send_gdb "signal SIGTRAP\n"
+ gdb_expect {
+ -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { pass "signal sent" }
+ -re ".*$gdb_prompt$" { fail "signal sent" }
+ timeout { fail "signal sent (timeout)" }
+ }
}
-# Check for production of a core file
-# and remove it!
+# Check for production of a core file and remove it!
set exec_output [remote_exec build "ls core"]
+set test "cleanup core file"
if [ regexp "core not found" $exec_output] {
- pass "No core dumped"
+ pass "$test (not dumped)"
} else {
- if [ regexp "No such file or directory" $exec_output] {
- pass "No core dumped"
- } else {
- remote_exec build "rm -f core"
- pass "Core dumped and removed"
- }
+ if [ regexp "No such file or directory" $exec_output] {
+ pass "$test (not dumped)"
+ } else {
+ remote_exec build "rm -f core"
+ pass "$test (removed)"
+ }
}
# restore the original prompt for the rest of the testsuite
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index 93086ef609f..ccc16e2bcaf 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
@@ -14,9 +14,6 @@
# 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 Elena Zannoni (ezannoni@cygnus.com)
if $tracelevel then {
@@ -220,34 +217,39 @@ gdb_expect_list "backtrace from shlibrary" "$gdb_prompt$" {
#
# test printing a frame with some arguments:
#
-send_gdb "signal SIGUSR1\n"
-gdb_expect_list "send SIGUSR1" "$gdb_prompt$" {
- "\r\n\032\032post-prompt\r\n"
- "Continuing with signal SIGUSR1.\r\n"
- "\r\n\032\032starting\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032breakpoint 2\r\n"
- "Breakpoint 2, handle_USR1 \\(sig=\[0-9\]+\\) at .*annota3.c:\[0-9\]+\r\n"
- "\r\n\032\032source .*annota3.c:\[0-9\]+:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
- "\r\n\032\032stopped\r\n"
-}
-
-#
-# test:
-#
-verbose "match_max local is: [match_max]"
-verbose "match_max default is: [match_max -d]"
-# This is necessary because a 2000 buffer is not enought to get everything
-# up to the prompt ad the test gets a timeout.
-match_max 3000
-verbose "match_max now is: [match_max]"
-send_gdb "backtrace\n"
-gdb_expect_list "backtrace @ signal handler" "$gdb_prompt$" {
- "#0 +handle_USR1 \[^\r\n\]+\r\n"
- "#1 +.signal handler called.\r\n"
- "#2 .* printf \[^\r\n\]+\r\n"
- "#3 .* main \[^\r\n\]+\r\n"
+if [target_info exists gdb,nosignals] {
+ unsupported "send SIGUSR1"
+ unsupported "backtrace @ signal handler"
+} else {
+ send_gdb "signal SIGUSR1\n"
+ gdb_expect_list "send SIGUSR1" "$gdb_prompt$" {
+ "\r\n\032\032post-prompt\r\n"
+ "Continuing with signal SIGUSR1.\r\n"
+ "\r\n\032\032starting\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032breakpoint 2\r\n"
+ "Breakpoint 2, handle_USR1 \\(sig=\[0-9\]+\\) at .*annota3.c:\[0-9\]+\r\n"
+ "\r\n\032\032source .*annota3.c:\[0-9\]+:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
+ "\r\n\032\032stopped\r\n"
+ }
+
+ #
+ # test:
+ #
+ verbose "match_max local is: [match_max]"
+ verbose "match_max default is: [match_max -d]"
+ # This is necessary because a 2000 buffer is not enought to get everything
+ # up to the prompt ad the test gets a timeout.
+ match_max 3000
+ verbose "match_max now is: [match_max]"
+ send_gdb "backtrace\n"
+ gdb_expect_list "backtrace @ signal handler" "$gdb_prompt$" {
+ "#0 +handle_USR1 \[^\r\n\]+\r\n"
+ "#1 +.signal handler called.\r\n"
+ "#2 .* printf \[^\r\n\]+\r\n"
+ "#3 .* main \[^\r\n\]+\r\n"
+ }
}
#
@@ -372,35 +374,40 @@ gdb_expect_list "breakpoint ignore count" "$gdb_prompt$" {
# It has been verified that other signals will be delivered. However,
# rather than twiddle the test, I choose to leave it as-is as it
# exposes an interesting failure on hpux11.
-setup_xfail hppa*-*-hpux11*
-send_gdb "signal SIGTRAP\n"
-gdb_expect_list "signal sent" "$gdb_prompt$" {
- "\r\n\032\032post-prompt\r\n"
- "Continuing with signal SIGTRAP.\r\n"
- "\r\n\032\032starting\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032signalled\r\n"
- "\r\nProgram terminated with signal SIGTRAP, Trace.breakpoint trap.\r\n"
- "The program no longer exists.\r\n"
- "\r\n\032\032stopped\r\n"
+
+if [target_info exists gdb,nosignals] {
+ unsupported "signal sent"
+} else {
+ setup_xfail hppa*-*-hpux11*
+ send_gdb "signal SIGTRAP\n"
+ gdb_expect_list "signal sent" "$gdb_prompt$" {
+ "\r\n\032\032post-prompt\r\n"
+ "Continuing with signal SIGTRAP.\r\n"
+ "\r\n\032\032starting\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032signalled\r\n"
+ "\r\nProgram terminated with signal SIGTRAP, Trace.breakpoint trap.\r\n"
+ "The program no longer exists.\r\n"
+ "\r\n\032\032stopped\r\n"
+ }
}
-# Check for production of a core file
-# and remove it!
+# Check for production of a core file and remove it!
set exec_output [remote_exec build "ls core"]
+set test "cleanup core file"
if [ regexp "core not found" $exec_output] {
- pass "No core dumped"
+ pass "$test (not dumped)"
} else {
- if [ regexp "No such file or directory" $exec_output] {
- pass "No core dumped"
- } else {
- remote_exec build "rm -f core"
- pass "Core dumped and removed"
- }
+ if [ regexp "No such file or directory" $exec_output] {
+ pass "$test (not dumped)"
+ } else {
+ remote_exec build "rm -f core"
+ pass "$test (removed)"
+ }
}
# restore the original prompt for the rest of the testsuite
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index ea11087f8af..b4aaf9bb1ba 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+# Copyright 1997, 1999, 2002, 2003, 2004 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
@@ -14,12 +14,9 @@
# 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
-
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
set prms_id 0
set bug_id 0
@@ -46,7 +43,6 @@ set srcfile2 ${testfile}2.c
set binfile ${objdir}/${subdir}/${testfile}
set binfile2 ${objdir}/${subdir}/${testfile}2
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
-set cleanupfile ${objdir}/${subdir}/${testfile}.awk
#execute_anywhere "rm -f ${binfile} ${binfile2}"
remote_exec build "rm -f ${binfile} ${binfile2}"
@@ -54,20 +50,16 @@ remote_exec build "rm -f ${binfile} ${binfile2}"
#
#log_user 1
-# Clean out any old files from past runs.
-#
-remote_exec build "${cleanupfile}"
-
# build the first test case
#
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."
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
# Build the in-system-call test
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -75,351 +67,323 @@ if [get_compiler_info ${binfile}] {
}
proc do_attach_tests {} {
- global gdb_prompt
- global binfile
- global escapedbinfile
- global srcfile
- global testfile
- global objdir
- global subdir
- global timeout
-
- # Start the program running and then wait for a bit, to be sure
- # that it can be attached to.
- #
- set testpid [eval exec $binfile &]
- exec sleep 2
-
- # Verify that we cannot attach to nonsense.
- #
- send_gdb "attach abc\n"
- gdb_expect {
- -re ".*Illegal process-id: abc.*$gdb_prompt $"\
- {pass "attach to nonsense is prohibited"}
- -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
- {
- # Response expected from /proc-based systems.
- pass "attach to nonsense is prohibited"
- }
- -re "Attaching to.*$gdb_prompt $"\
- {fail "attach to nonsense is prohibited (bogus pid allowed)"}
- -re "$gdb_prompt $" {fail "attach to nonsense is prohibited"}
- timeout {fail "(timeout) attach to nonsense is prohibited"}
- }
-
- # Verify that we cannot attach to what appears to be a valid
- # 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.
- #
- set boguspid 0
- if { [istarget "*-*-*bsd*"] } {
- # In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead
- # (which should have the desired effect on any version of
- # FreeBSD, and probably other *BSD's too).
- set boguspid -1
- }
- send_gdb "attach $boguspid\n"
- gdb_expect {
- -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
- # executable name via the file command, and using attach with
- # the process ID.
- #
- # (Actually, the test system appears to do this automatically
- # for us. So, we must also be prepared to be asked if we want
- # to discard an existing set of symbols.)
- #
- send_gdb "file $binfile\n"
- gdb_expect {
- -re "Load new symbol table from.*y or n.*$" {
- send_gdb "y\n"
- gdb_expect {
- -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\
- {pass "(re)set file, before attach1"}
- -re "$gdb_prompt $" {fail "(re)set file, before attach1"}
- timeout {fail "(timeout) (re)set file, before attach1"}
- }
- }
- -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\
- {pass "set file, before attach1"}
- -re "$gdb_prompt $" {fail "set file, before attach1"}
- timeout {fail "(timeout) set file, before attach1"}
- }
-
- send_gdb "attach $testpid\n"
- gdb_expect {
- -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
- {pass "attach1, after setting file"}
- -re "$gdb_prompt $" {fail "attach1, after setting file"}
- timeout {fail "(timeout) attach1, after setting file"}
- }
-
- # Verify that we can "see" the variable "should_exit" in the
- # program, and that it is zero.
- #
- send_gdb "print should_exit\n"
- gdb_expect {
- -re ".* = 0.*$gdb_prompt $"\
- {pass "after attach1, print should_exit"}
- -re "$gdb_prompt $" {fail "after attach1, print should_exit"}
- timeout {fail "(timeout) after attach1, print should_exit"}
- }
-
- # Detach the process.
- #
- send_gdb "detach\n"
- gdb_expect {
- -re "Detaching from program: .*$escapedbinfile.*$gdb_prompt $"\
- {pass "attach1 detach"}
- -re "$gdb_prompt $" {fail "attach1 detach"}
- timeout {fail "(timeout) attach1 detach"}
- }
-
- # Wait a bit for gdb to finish detaching
- #
- exec sleep 5
-
- # Purge the symbols from gdb's brain. (We want to be certain
- # the next attach, which won't be preceded by a "file" command,
- # is really getting the executable file without our help.)
- #
- set old_timeout $timeout
- set timeout 15
- send_gdb "file\n"
- gdb_expect {
- -re ".*gdb internal error.*$" {
- fail "Internal error, prob. Memory corruption"
- }
- -re "No executable file now.*Discard symbol table.*y or n.*$" {
- send_gdb "y\n"
- gdb_expect {
- -re "No symbol file now.*$gdb_prompt $"\
- {pass "attach1, purging symbols after detach"}
- -re "$gdb_prompt $" {fail "attach1, purging symbols after detach"}
- timeout {fail "(timeout) attach1, purging symbols after detach"}
- }
- }
- -re "$gdb_prompt $" {fail "attach1, purging file after detach"}
- timeout {
- fail "(timeout) attach1, purging file after detach"
- }
- }
- set timeout $old_timeout
-
- # Verify that we can attach to the process just by giving the
- # process ID.
- #
- send_gdb "attach $testpid\n"
- gdb_expect {
- -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\
- {pass "attach2"}
- -re "$gdb_prompt $" {fail "attach2"}
- timeout {fail "(timeout) attach2"}
- }
-
- # Verify that we can modify the variable "should_exit" in the
- # program.
- #
- send_gdb "set should_exit=1\n"
- gdb_expect {
- -re "$gdb_prompt $" {pass "after attach2, set should_exit"}
- timeout {fail "(timeout) after attach2, set should_exit"}
- }
-
- # Verify that the modification really happened.
- #
- send_gdb "tbreak 19\n"
- gdb_expect {
- -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\
- {pass "after attach2, set tbreak postloop"}
- -re "$gdb_prompt $" {fail "after attach2, set tbreak postloop"}
- timeout {fail "(timeout) after attach2, set tbreak postloop"}
- }
- send_gdb "continue\n"
- gdb_expect {
- -re "main.*at.*$srcfile:19.*$gdb_prompt $"\
- {pass "after attach2, reach tbreak postloop"}
- -re "$gdb_prompt $" {fail "after attach2, reach tbreak postloop"}
- timeout {fail "(timeout) after attach2, reach tbreak postloop"}
- }
-
- # Allow the test process to exit, to cleanup after ourselves.
- #
- send_gdb "continue\n"
- gdb_expect {
- -re "Program exited normally.*$gdb_prompt $"\
- {pass "after attach2, exit"}
- -re "$gdb_prompt $" {fail "after attach2, exit"}
- timeout {fail "(timeout) after attach2, exit"}
- }
-
- # Make sure we don't leave a process around to confuse
- # the next test run (and prevent the compile by keeping
- # the text file busy), in case the "set should_exit" didn't
- # work.
- #
- remote_exec build "kill -9 ${testpid}"
- # Start the program running and then wait for a bit, to be sure
- # that it can be attached to.
- #
- set testpid [eval exec $binfile &]
- exec sleep 2
-
- # Verify that we can attach to the process, and find its a.out
- # when we're cd'd to some directory that doesn't contain the
- # a.out. (We use the source path set by the "dir" command.)
- #
- send_gdb "dir ${objdir}/${subdir}\n"
- gdb_expect {
- -re ".*Source directories searched: .*$gdb_prompt $"\
- {pass "set source path"}
- -re "$gdb_prompt $" {fail "set source path"}
- timeout {fail "(timeout) set source path"}
- }
-
- send_gdb "cd /tmp\n"
- gdb_expect {
- -re ".*Working directory /tmp.*$gdb_prompt $"\
- {pass "cd away from process' a.out"}
- -re "$gdb_prompt $" {fail "cd away from process' a.out"}
- timeout {fail "(timeout) cd away from process' a.out"}
- }
-
- # Explicitly flush out any knowledge of the previous attachment.
- send_gdb "symbol\n"
- gdb_expect {
- -re ".*Discard symbol table from.*y or n. $"\
- {send_gdb "y\n"
- gdb_expect {
- -re ".*No symbol file now.*$gdb_prompt $"\
- {pass "before attach3, flush symbols"}
- -re "$gdb_prompt $" {fail "before attach3, flush symbols"}
- timeout {fail "(timeout) before attach3, flush symbols"}
- }
- }
- -re ".*No symbol file now.*$gdb_prompt $"\
- {pass "before attach3, flush symbols"}
- -re "$gdb_prompt $" {fail "before attach3, flush symbols"}
- timeout {fail "(timeout) before attach3, flush symbols"}
- }
- send_gdb "exec\n"
- gdb_expect {
- -re ".*No executable file now.*$gdb_prompt $"\
- {pass "before attach3, flush exec"}
- -re "$gdb_prompt $" {fail "before attach3, flush exec"}
- timeout {fail "(timeout) before attach3, flush exec"}
- }
-
- send_gdb "attach $testpid\n"
- gdb_expect {
- -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\
- {pass "attach when process' a.out not in cwd"}
- -re "$gdb_prompt $" {fail "attach when process' a.out not in cwd"}
- timeout {fail "(timeout) attach when process' a.out not in cwd"}
- }
-
- send_gdb "kill\n"
- gdb_expect {
- -re ".*Kill the program being debugged.*y or n. $"\
- {send_gdb "y\n"
- gdb_expect {
- -re "$gdb_prompt $" {pass "after attach3, exit"}
- timeout {fail "(timeout) after attach3, exit"}
- }
- }
- -re "$gdb_prompt $" {fail "after attach3, exit"}
- timeout {fail "(timeout) after attach3, exit"}
- }
+ global gdb_prompt
+ global binfile
+ global escapedbinfile
+ global srcfile
+ global testfile
+ global objdir
+ global subdir
+ global timeout
+
+ # Start the program running and then wait for a bit, to be sure
+ # that it can be attached to.
+
+ set testpid [eval exec $binfile &]
+ exec sleep 2
+ if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+ }
+
+ # Verify that we cannot attach to nonsense.
+
+ set test "attach to nonsense is prohibited"
+ gdb_test_multiple "attach abc" "$test" {
+ -re "Illegal process-id: abc.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $" {
+ # Response expected from /proc-based systems.
+ pass "$test"
+ }
+ -re "Can't attach to process..*$gdb_prompt $" {
+ # Response expected on Cygwin
+ pass "$test"
+ }
+ -re "Attaching to.*$gdb_prompt $" {
+ fail "$test (bogus pid allowed)"
+ }
+ }
+
+ # Verify that we cannot attach to what appears to be a valid
+ # 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.
+
+ set boguspid 0
+ if { [istarget "*-*-*bsd*"] } {
+ # In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead
+ # (which should have the desired effect on any version of
+ # FreeBSD, and probably other *BSD's too).
+ set boguspid -1
+ }
+ set test "attach to nonexistent process is prohibited"
+ gdb_test_multiple "attach $boguspid" "$test" {
+ -re "Attaching to.*, process $boguspid.*No such process.*$gdb_prompt $" {
+ # Response expected on ptrace-based systems (i.e. HP-UX 10.20).
+ pass "$test"
+ }
+ -re "Attaching to.*, process $boguspid failed.*Hint.*$gdb_prompt $" {
+ # Response expected on ttrace-based systems (i.e. HP-UX 11.0).
+ pass "$test"
+ }
+ -re "Attaching to.*, process $boguspid.*denied.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to.*, process $boguspid.*not permitted.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $" {
+ # Response expected from /proc-based systems.
+ pass "$test"
+ }
+ -re "Can't attach to process..*$gdb_prompt $" {
+ # Response expected on Cygwin
+ pass "$test"
+ }
+ }
+
+ # Verify that we can attach to the process by first giving its
+ # executable name via the file command, and using attach with the
+ # process ID.
+
+ # (Actually, the test system appears to do this automatically for
+ # us. So, we must also be prepared to be asked if we want to
+ # discard an existing set of symbols.)
+
+ set test "set file, before attach1"
+ gdb_test_multiple "file $binfile" "$test" {
+ -re "Load new symbol table from.*y or n. $" {
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+ "$test (re-read)"
+ }
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ set test "attach1, after setting file"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
+ # Response expected on Cygwin
+ pass "$test"
+ }
+ }
+
+ # Verify that we can "see" the variable "should_exit" in the
+ # program, and that it is zero.
+
+ gdb_test "print should_exit" " = 0" "after attach1, print should_exit"
+
+ # Detach the process.
+
+ gdb_test "detach" \
+ "Detaching from program: .*$escapedbinfile, process $testpid" \
+ "attach1 detach"
+
+ # Wait a bit for gdb to finish detaching
+
+ exec sleep 5
+
+ # Purge the symbols from gdb's brain. (We want to be certain the
+ # next attach, which won't be preceded by a "file" command, is
+ # really getting the executable file without our help.)
+
+ set old_timeout $timeout
+ set timeout 15
+ set test "attach1, purging symbols after detach"
+ gdb_test_multiple "file" "$test" {
+ -re "No executable file now.*Discard symbol table.*y or n. $" {
+ gdb_test "y" "No symbol file now." "$test"
+ }
+ }
+ set timeout $old_timeout
+
+ # Verify that we can attach to the process just by giving the
+ # process ID.
+
+ set test "set file, before attach2"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to process $testpid.*Load new symbol table from \"$escapedbinfile\.exe\".*y or n. $" {
+ # On Cygwin, the DLL's symbol tables are loaded prior to the
+ # executable's symbol table. This in turn always results in
+ # asking the user for actually loading the symbol table of the
+ # executable.
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+ "$test (reset file)"
+ }
+ -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # Verify that we can modify the variable "should_exit" in the
+ # program.
+
+ gdb_test "set should_exit=1" "" "after attach2, set should_exit"
+
+ # Verify that the modification really happened.
+
+ send_gdb "tbreak 19\n"
+ gdb_expect {
+ -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
+ pass "after attach2, set tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach2, set tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach2, set tbreak postloop"
+ }
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re "main.*at.*$srcfile:19.*$gdb_prompt $" {
+ pass "after attach2, reach tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach2, reach tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach2, reach tbreak postloop"
+ }
+ }
+
+ # Allow the test process to exit, to cleanup after ourselves.
+
+ gdb_test "continue" "Program exited normally." "after attach2, exit"
+
+ # Make sure we don't leave a process around to confuse
+ # the next test run (and prevent the compile by keeping
+ # the text file busy), in case the "set should_exit" didn't
+ # work.
+
+ remote_exec build "kill -9 ${testpid}"
+
+ # Start the program running and then wait for a bit, to be sure
+ # that it can be attached to.
+
+ set testpid [eval exec $binfile &]
+ exec sleep 2
+ if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+ }
+
+ # Verify that we can attach to the process, and find its a.out
+ # when we're cd'd to some directory that doesn't contain the
+ # a.out. (We use the source path set by the "dir" command.)
+
+ gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \
+ "set source path"
+
+ gdb_test "cd /tmp" "Working directory /tmp." \
+ "cd away from process working directory"
+
+ # Explicitly flush out any knowledge of the previous attachment.
+
+ set test "before attach3, flush symbols"
+ gdb_test_multiple "symbol" "$test" {
+ -re "Discard symbol table from.*y or n. $" {
+ gdb_test "y" "No symbol file now." \
+ "$test"
+ }
+ -re "No symbol file now.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ gdb_test "exec" "No executable file now." \
+ "before attach3, flush exec"
+
+ gdb_test "attach $testpid" \
+ "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*" \
+ "attach when process' a.out not in cwd"
+
+ set test "after attach3, exit"
+ gdb_test_multiple "kill" "$test" {
+ -re "Kill the program being debugged.*y or n. $" {
+ gdb_test "y" "" "$test"
+ }
+ }
+
+ # Another "don't leave a process around"
+ remote_exec build "kill -9 ${testpid}"
}
proc do_call_attach_tests {} {
- global gdb_prompt
- global binfile2
-
- # Start the program running and then wait for a bit, to be sure
- # that it can be attached to.
- #
- set testpid [eval exec $binfile2 &]
- exec sleep 2
-
- # Attach
- #
- gdb_test "file $binfile2" ".*" "force switch to gdb64, if necessary"
- send_gdb "attach $testpid\n"
- gdb_expect {
- -re ".*warning: reading register.*I.*O error.*$gdb_prompt $" {
- fail "attach call, read register 3 error"
- }
- -re "Attaching to.*process $testpid.*libc.*$gdb_prompt $" {
- pass "attach call"
- }
- -re "$gdb_prompt $" {fail "attach call"}
- timeout {fail "(timeout) attach call"}
- }
-
- # See if other registers are problems
- #
- send_gdb "i r r3\n"
- gdb_expect {
- -re ".*warning: reading register.*$gdb_prompt $" {
- pass "CHFts23490: known bug"
- }
- -re ".*r3.*$gdb_prompt $" {
- pass "Bug fixed, Yayyy!"
- }
- timeout { fail "timeout on info reg" }
- }
-
- # Get rid of the process
- #
- gdb_test "p should_exit = 1" ".*"
- gdb_test "c" ".*Program exited normally.*"
+ global gdb_prompt
+ global binfile2
+
+ # Start the program running and then wait for a bit, to be sure
+ # that it can be attached to.
- # Be paranoid
- #
- remote_exec build "kill -9 ${testpid}"
+ set testpid [eval exec $binfile2 &]
+ exec sleep 2
+ if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+ }
+
+ # Attach
+
+ gdb_test "file $binfile2" "" "force switch to gdb64, if necessary"
+ set test "attach call"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "warning: reading register.*I.*O error.*$gdb_prompt $" {
+ fail "$test (read register error)"
+ }
+ -re "Attaching to.*process $testpid.*libc.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to.*process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # See if other registers are problems
+
+ set test "info other register"
+ gdb_test_multiple "i r r3" "$test" {
+ -re "warning: reading register.*$gdb_prompt $" {
+ fail "$test"
+ }
+ -re "r3.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+ # Get rid of the process
+
+ gdb_test "p should_exit = 1"
+ gdb_test "c" "Program exited normally."
+
+ # Be paranoid
+
+ remote_exec build "kill -9 ${testpid}"
}
# Start with a fresh gdb
-#
+
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# This is a test of gdb's ability to attach to a running process.
-#
+
do_attach_tests
# Test attaching when the target is inside a system call
-#
+
gdb_exit
gdb_start
diff --git a/gdb/testsuite/gdb.base/auxv.c b/gdb/testsuite/gdb.base/auxv.c
index 94f9d000f48..7eba5f97cfa 100644
--- a/gdb/testsuite/gdb.base/auxv.c
+++ b/gdb/testsuite/gdb.base/auxv.c
@@ -1,3 +1,23 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999, 2004
+ 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. */
+
/* Simple little program that just generates a core dump from inside some
nested function calls. Keep this as self contained as possible, I.E.
use no environment resources other than possibly abort(). */
@@ -11,6 +31,7 @@
#endif
#if HAVE_ABORT
+#include <stdlib.h>
#define ABORT abort()
#else
#define ABORT {char *invalid = 0; *invalid = 0xFF;}
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 3a509b98242..cb064f560a5 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -82,12 +82,15 @@ proc fetch_auxv {test} {
}
-ex "The program has no auxiliary information now" {
set bad 1
+ exp_continue
}
-ex "Auxiliary vector is empty" {
set bad 1
+ exp_continue
}
-ex "No auxiliary vector found" {
set bad 1
+ exp_continue
}
-re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" {
lappend auxv_lines $expect_out(0,string)
@@ -103,8 +106,11 @@ proc fetch_auxv {test} {
incr bad
}
-re "^\[^\r\n\]+\[\r\n\]+" {
- warning "Unrecognized output: $expect_out(0,string)"
- set bad 1
+ if {!$bad} {
+ warning "Unrecognized output: $expect_out(0,string)"
+ set bad 1
+ }
+ exp_continue
}
}] != 0} {
return {}
diff --git a/gdb/testsuite/gdb.base/bigcore.c b/gdb/testsuite/gdb.base/bigcore.c
index 8cd1b5f98d2..2a8bb077bb8 100644
--- a/gdb/testsuite/gdb.base/bigcore.c
+++ b/gdb/testsuite/gdb.base/bigcore.c
@@ -19,10 +19,13 @@
Please email any bugs, comments, and/or additions to this file to:
bug-gdb@prep.ai.mit.edu */
-#include <unistd.h>
-#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
#include <sys/resource.h>
+#include <stdlib.h>
+#include <unistd.h>
+
/* Print routines:
The following are so that printf et.al. can be avoided. Those
@@ -117,6 +120,8 @@ struct list
static struct list dummy;
static struct list heap = { &dummy, &dummy };
+static unsigned long bytes_allocated;
+
int
main ()
{
@@ -151,14 +156,13 @@ main ()
each section. The linking ensures that some, but not all, the
memory is allocated. NB: Some kernels handle this efficiently -
only allocating and writing out referenced pages leaving holes in
- the file for unreferend pages - while others handle this poorly -
- writing out all pages including those that wern't referenced. */
+ the file for unmodified pages - while others handle this poorly -
+ writing out all pages including those that weren't modified. */
print_string ("Alocating the entire heap ...\n");
{
size_t chunk_size;
- long bytes_allocated = 0;
- long chunks_allocated = 0;
+ unsigned long chunks_allocated = 0;
/* Create a linked list of memory chunks. Start with
MAX_CHUNK_SIZE blocks of memory and then try allocating smaller
and smaller amounts until all (well at least most) memory has
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 58cbfa1cc66..b7201365361 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -41,7 +41,10 @@ if ![isnative] then {
# consumes too many resources - gigabytes worth of disk space and and
# I/O bandwith.
-if { [istarget "*-*-*bsd*"] || [istarget "*-*-hpux*"] } {
+if { [istarget "*-*-*bsd*"]
+ || [istarget "*-*-hpux*"]
+ || [istarget "*-*-solaris*"]
+ || [istarget "*-*-cygwin*"] } {
untested "Kernel lacks sparse corefile support (PR gdb/1551)"
return
}
@@ -103,9 +106,30 @@ gdb_test "tbreak $print_core_line"
gdb_test continue ".*print_string.*"
gdb_test next ".*0 = 0.*"
+# Check that the corefile is plausibly large enough. We're trying to
+# detect the case where the operating system has truncated the file
+# just before signed wraparound. TCL, unfortunately, has a similar
+# problem - so use catch. It can handle the "bad" size but not necessarily
+# the "good" one. And we must use GDB for the comparison, similarly.
+
+if {[catch {file size $corefile} core_size] == 0} {
+ set core_ok 0
+ gdb_test_multiple "print bytes_allocated < $core_size" "check core size" {
+ -re " = 1\r\n$gdb_prompt $" {
+ pass "check core size"
+ set core_ok 1
+ }
+ -re " = 0\r\n$gdb_prompt $" {
+ xfail "check core size (system does not support large corefiles)"
+ }
+ }
+ if {$core_ok == 0} {
+ return 0
+ }
+}
+
# Traverse part of bigcore's linked list of memory chunks (forward or
-# backward), saving each chunk's address. I don't know why but
-# expect_out didn't work with gdb_test_multiple.
+# backward), saving each chunk's address.
proc extract_heap { dir } {
global gdb_prompt
@@ -113,8 +137,7 @@ proc extract_heap { dir } {
set heap ""
set test "extract ${dir} heap"
set lim 0
- send_gdb "print heap.${dir}\n"
- gdb_expect {
+ gdb_test_multiple "print heap.${dir}" "$test" {
-re " = \\(struct list \\*\\) 0x0.*$gdb_prompt $" {
pass "$test"
}
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 4a912fcdc29..7152a4a1d7f 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -187,13 +187,13 @@ if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \
".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+.\[0-9\]+ = \\{float1 = -2\\.34500003, float2 = 1\\}"
}
-if ![gdb_skip_stdio_test "print print_bit_flags_char(*flags)"] {
- print_struct_call "print_bit_flags_char(*flags)" \
+if ![gdb_skip_stdio_test "print print_bit_flags_char(*cflags)"] {
+ print_struct_call "print_bit_flags_char(*cflags)" \
".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1 '\\\\001', beta = 0 '\\\\0', gamma = 1 '\\\\001', delta = 0 '\\\\0', epsilon = 1 '\\\\001', omega = 0 '\\\\0'\\}"
}
-if ![gdb_skip_stdio_test "print print_bit_flags_short(*flags)"] {
- print_struct_call "print_bit_flags_short(*flags)" \
+if ![gdb_skip_stdio_test "print print_bit_flags_short(*sflags)"] {
+ print_struct_call "print_bit_flags_short(*sflags)" \
".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
}
diff --git a/gdb/testsuite/gdb.base/call-sc.c b/gdb/testsuite/gdb.base/call-sc.c
new file mode 100644
index 00000000000..70ae87f7991
--- /dev/null
+++ b/gdb/testsuite/gdb.base/call-sc.c
@@ -0,0 +1,83 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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.
+
+*/
+
+/* Useful abreviations. */
+typedef void t;
+typedef char tc;
+typedef short ts;
+typedef int ti;
+typedef long tl;
+typedef long long tll;
+typedef float tf;
+typedef double td;
+typedef long double tld;
+typedef enum { e = '1' } te;
+
+/* Force the type of each field. */
+#ifndef T
+typedef t T;
+#endif
+
+T foo = '1', L;
+
+T fun()
+{
+ return foo;
+}
+
+#ifdef PROTOTYPES
+void Fun(T foo)
+#else
+void Fun(foo)
+ T foo;
+#endif
+{
+ L = foo;
+}
+
+zed ()
+{
+ L = 'Z';
+}
+
+int main()
+{
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+ int i;
+
+ Fun(foo);
+
+ /* An infinite loop that first clears all the variables and then
+ calls the function. This "hack" is to make re-testing easier -
+ "advance fun" is guaranteed to have always been preceeded by a
+ global variable clearing zed call. */
+
+ zed ();
+ while (1)
+ {
+ L = fun ();
+ zed ();
+ }
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
new file mode 100644
index 00000000000..01a9f152097
--- /dev/null
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -0,0 +1,500 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2004 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.
+
+# Test "return", "finish", and "call" of functions that a scalar (int,
+# float, enum) and/or take a single scalar parameter.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# Some targets can't call functions, so don't even bother with this
+# test.
+
+if [target_info exists gdb,cannot_call_functions] {
+ setup_xfail "*-*-*"
+ fail "This target can not call functions"
+ continue
+}
+
+set testfile "call-sc"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Create and source the file that provides information about the
+# compiler used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+# Use the file name, compiler and tuples to set up any needed KFAILs.
+
+proc setup_kfails { file tuples bug } {
+ global testfile
+ if [string match $file $testfile] {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+proc setup_compiler_kfails { file compiler format tuples bug } {
+ global testfile
+ if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+# Compile a variant of scalars.c using TYPE to specify the type of the
+# parameter and return-type. Run the compiled program up to "main".
+# Also updates the global "testfile" to reflect the most recent build.
+
+proc start_scalars_test { type } {
+ global testfile
+ global srcfile
+ global binfile
+ global objdir
+ global subdir
+ global srcdir
+ global gdb_prompt
+ global expect_out
+
+ # Create the additional flags
+ set flags "debug additional_flags=-DT=${type}"
+ set testfile "call-sc-${type}"
+
+ set binfile ${objdir}/${subdir}/${testfile}
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
+ # built the second test case since we can't use prototypes
+ warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ }
+
+ # Start with a fresh gdb.
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Make certain that the output is consistent
+ gdb_test "set print sevenbit-strings" "" \
+ "set print sevenbit-strings; ${testfile}"
+ gdb_test "set print address off" "" \
+ "set print address off; ${testfile}"
+ gdb_test "set width 0" "" \
+ "set width 0; ${testfile}"
+
+ # Advance to main
+ if { ![runto_main] } then {
+ gdb_suppress_tests;
+ }
+
+ # Get the debug format
+ get_debug_format
+
+ # check that type matches what was passed in
+ set test "ptype; ${testfile}"
+ set foo_t "xxx"
+ gdb_test_multiple "ptype ${type}" "${test}" {
+ -re "type = (\[^\r\n\]*)\r\n$gdb_prompt $" {
+ set foo_t "$expect_out(1,string)"
+ pass "$test (${foo_t})"
+ }
+ }
+ gdb_test "ptype foo" "type = ${foo_t}" "ptype foo; ${testfile} $expect_out(1,string)"
+}
+
+
+# Given N (0..25), return the corresponding alphabetic letter in lower
+# or upper case. This is ment to be i18n proof.
+
+proc i2a { n } {
+ return [string range "abcdefghijklmnopqrstuvwxyz" $n $n]
+}
+
+proc I2A { n } {
+ return [string toupper [i2a $n]]
+}
+
+
+# Use the file name, compiler and tuples to set up any needed KFAILs.
+
+proc setup_kfails { file tuples bug } {
+ global testfile
+ if [string match $file $testfile] {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+proc setup_compiler_kfails { file compiler format tuples bug } {
+ global testfile
+ if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+# Test GDB's ability to make inferior function calls to functions
+# returning (or passing) in a single scalar.
+
+# start_scalars_test() will have previously built a program with a
+# specified scalar type. To ensure robustness of the output, "p/c" is
+# used.
+
+# This tests the code paths "which return-value convention?" and
+# "extract return-value from registers" called by "infcall.c".
+
+proc test_scalar_calls { } {
+ global testfile
+ global gdb_prompt
+
+ # Check that GDB can always extract a scalar-return value from an
+ # inferior function call. Since GDB always knows the location of
+ # an inferior function call's return value these should never fail
+
+ # Implemented by calling the parameterless function "fun" and then
+ # examining the return value printed by GDB.
+
+ set tests "call ${testfile}"
+
+ # Call fun, checking the printed return-value.
+ gdb_test "p/c fun()" "= 49 '1'" "p/c fun(); ${tests}"
+
+ # Check that GDB can always pass a structure to an inferior function.
+ # This test can never fail.
+
+ # Implemented by calling the one parameter function "Fun" which
+ # stores its parameter in the global variable "L". GDB then
+ # examining that global to confirm that the value is as expected.
+
+ gdb_test "call Fun(foo)" "" "call Fun(foo); ${tests}"
+ gdb_test "p/c L" " = 49 '1'" "p/c L; ${tests}"
+}
+
+# Test GDB's ability to both return a function (with "return" or
+# "finish") and correctly extract/store any corresponding
+# return-value.
+
+# Check that GDB can consistently extract/store structure return
+# values. There are two cases - returned in registers and returned in
+# memory. For the latter case, the return value can't be found and a
+# failure is "expected". However GDB must still both return the
+# function and display the final source and line information.
+
+# N identifies the number of elements in the struct that will be used
+# for the test case. FAILS is a list of target tuples that will fail
+# this test.
+
+# This tests the code paths "which return-value convention?", "extract
+# return-value from registers", and "store return-value in registers".
+# Unlike "test struct calls", this test is expected to "fail" when the
+# return-value is in memory (GDB can't find the location). The test
+# is in three parts: test "return"; test "finish"; check that the two
+# are consistent. GDB can sometimes work for one command and not the
+# other.
+
+proc test_scalar_returns { } {
+ global gdb_prompt
+ global testfile
+
+ set tests "return ${testfile}"
+
+
+ # Check that "return" works.
+
+ # GDB must always force the return of a function that has
+ # a struct result. Dependant on the ABI, it may, or may not be
+ # possible to store the return value in a register.
+
+ # The relevant code looks like "L{n} = fun{n}()". The test forces
+ # "fun{n}" to "return" with an explicit value. Since that code
+ # snippet will store the the returned value in "L{n}" the return
+ # is tested by examining "L{n}". This assumes that the
+ # compiler implemented this as fun{n}(&L{n}) and hence that when
+ # the value isn't stored "L{n}" remains unchanged. Also check for
+ # consistency between this and the "finish" case.
+
+ # Get into a call of fun
+ gdb_test "advance fun" \
+ "fun .*\[\r\n\]+\[0-9\].*return foo.*" \
+ "advance to fun for return; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ gdb_test "p/c L" " = 90 'Z'" "zed L for return; ${tests}"
+
+ # Force the "return". This checks that the return is always
+ # performed, and that GDB correctly reported this to the user.
+ # GDB 6.0 and earlier, when the return-value's location wasn't
+ # known, both failed to print a final "source and line" and misplaced
+ # the frame ("No frame").
+
+ # The test is writen so that it only reports one FAIL/PASS for the
+ # entire operation. The value returned is checked further down.
+ # "return_value_unknown", if non-empty, records why GDB realised
+ # that it didn't know where the return value was.
+
+ set test "return foo; ${tests}"
+ set return_value_unknown 0
+ set return_value_unimplemented 0
+ gdb_test_multiple "return foo" "${test}" {
+ -re "The location" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ exp_continue
+ }
+ -re "A structure or union" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ # Double ulgh. Architecture doesn't use return_value and
+ # hence hasn't implemented small structure return.
+ set return_value_unimplemented 1
+ exp_continue
+ }
+ -re "Make fun return now.*y or n. $" {
+ gdb_test_multiple "y" "${test}" {
+ -re "L *= fun.*${gdb_prompt} $" {
+ # Need to step off the function call
+ gdb_test "next" "zed.*" "${test}"
+ }
+ -re "zed \\(\\);.*$gdb_prompt $" {
+ pass "${test}"
+ }
+ }
+ }
+ }
+
+ # If the previous test did not work, the program counter might
+ # still be inside foo() rather than main(). Make sure the program
+ # counter is is main().
+ #
+ # This happens on ppc64 GNU/Linux with gcc 3.4.1 and a buggy GDB
+
+ set test "return foo; synchronize pc to main()"
+ for {set loop_count 0} {$loop_count < 2} {incr loop_count} {
+ gdb_test_multiple "backtrace 1" $test {
+ -re "#0.*main \\(\\).*${gdb_prompt} $" {
+ pass $test
+ set loop_count 2
+ }
+ -re "#0.*fun \\(\\).*${gdb_prompt} $" {
+ if {$loop_count < 1} {
+ gdb_test "finish" ".*" ""
+ } else {
+ fail $test
+ set loop_count 2
+ }
+ }
+ }
+ }
+
+ # Check that the return-value is as expected. At this stage we're
+ # just checking that GDB has returned a value consistent with
+ # "return_value_unknown" set above.
+
+ set test "value foo returned; ${tests}"
+ gdb_test_multiple "p/c L" "${test}" {
+ -re " = 49 '1'.*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re " = 90 .*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # The struct return case. Since any modification
+ # would be by reference, and that can't happen, the
+ # value should be unmodified and hence Z is expected.
+ # Is this a reasonable assumption?
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB knew
+ # the location of the return-value.
+ fail "${test}"
+ }
+ }
+ -re ".*${gdb_prompt} $" {
+ if $return_value_unimplemented {
+ # What a suprize. The architecture hasn't implemented
+ # return_value, and hence has to fail.
+ kfail "$test" gdb/1444
+ } else {
+ fail "$test"
+ }
+ }
+ }
+
+ # Check that a "finish" works.
+
+ # This is almost but not quite the same as "call struct funcs".
+ # Architectures can have subtle differences in the two code paths.
+
+ # The relevant code snippet is "L{n} = fun{n}()". The program is
+ # advanced into a call to "fun{n}" and then that function is
+ # finished. The returned value that GDB prints, reformatted using
+ # "p/c", is checked.
+
+ # Get into "fun()".
+ gdb_test "advance fun" \
+ "fun .*\[\r\n\]+\[0-9\].*return foo.*" \
+ "advance to fun for finish; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ gdb_test "p/c L" " = 90 'Z'" "zed L for finish; ${tests}"
+
+ # Finish the function, set 'finish_value_unknown" to non-empty if the
+ # return-value was not found.
+ set test "finish foo; ${tests}"
+ set finish_value_unknown 0
+ gdb_test_multiple "finish" "${test}" {
+ -re "Value returned is .*${gdb_prompt} $" {
+ pass "${test}"
+ }
+ -re "Cannot determine contents.*${gdb_prompt} $" {
+ # Expected bad value. For the moment this is ok.
+ set finish_value_unknown 1
+ pass "${test}"
+ }
+ }
+
+ # Re-print the last (return-value) using the more robust
+ # "p/c". If no return value was found, the 'Z' from the previous
+ # check that the variable was cleared, is printed.
+ set test "value foo finished; ${tests}"
+ gdb_test_multiple "p/c" "${test}" {
+ -re " = 49 '1'\[\r\n\]+${gdb_prompt} $" {
+ if $finish_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re " = 90 'Z'\[\r\n\]+${gdb_prompt} $" {
+ # The value didn't get found. This is "expected".
+ if $finish_value_unknown {
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB did
+ # know the location of the return-value.
+ fail "${test}"
+ }
+ }
+ }
+
+ # Finally, check that "return" and finish" have consistent
+ # behavior.
+
+ # Since both "return" and "finish" use equivalent "which
+ # return-value convention" logic, both commands should have
+ # identical can/can-not find return-value messages.
+
+ # Note that since "call" and "finish" use common code paths, a
+ # failure here is a strong indicator of problems with "store
+ # return-value" code paths. Suggest looking at "return_value"
+ # when investigating a fix.
+
+ set test "return and finish use same convention; ${tests}"
+ if {$finish_value_unknown == $return_value_unknown} {
+ pass "${test}"
+ } else {
+ kfail gdb/1444 "${test}"
+ }
+}
+
+# ABIs pass anything >8 or >16 bytes in memory but below that things
+# randomly use register and/and structure conventions. Check all
+# possible sized char scalars in that range. But only a restricted
+# range of the other types.
+
+# NetBSD/PPC returns "unnatural" (3, 5, 6, 7) sized scalars in memory.
+
+# d10v is weird. 5/6 byte scalars go in memory. 2 or more char
+# scalars go in memory. Everything else is in a register!
+
+# Test every single char struct from 1..17 in size. This is what the
+# original "scalars" test was doing.
+
+start_scalars_test tc
+test_scalar_calls
+test_scalar_returns
+
+
+# Let the fun begin.
+
+# Assuming that any integer struct larger than 8 bytes goes in memory,
+# come up with many and varied combinations of a return struct. For
+# "struct calls" test just beyond that 8 byte boundary, for "struct
+# returns" test up to that boundary.
+
+# For floats, assumed that up to two struct elements can be stored in
+# floating point registers, regardless of their size.
+
+# The approx size of each structure it is computed assumed that tc=1,
+# ts=2, ti=4, tl=4, tll=8, tf=4, td=8, tld=16, and that all fields are
+# naturally aligned. Padding being added where needed. Note that
+# these numbers are just approx, the d10v has ti=2, a 64-bit has has
+# tl=8.
+
+# Approx size: 2, 4, ...
+start_scalars_test ts
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 4, 8, ...
+start_scalars_test ti
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 4, 8, ...
+start_scalars_test tl
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 8, 16, ...
+start_scalars_test tll
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 4, 8, ...
+start_scalars_test tf
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 8, 16, ...
+start_scalars_test td
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 16, 32, ...
+start_scalars_test tld
+test_scalar_calls
+test_scalar_returns
+
+# Approx size: 4, 8, ...
+start_scalars_test te
+test_scalar_calls
+test_scalar_returns
+
+return 0
diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c
index 4361ffc7bc2..d35c1baa7d4 100644
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -22,6 +22,7 @@
bug-gdb@gnu.org */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp
index 780e909dbca..588bf059c77 100644
--- a/gdb/testsuite/gdb.base/charset.exp
+++ b/gdb/testsuite/gdb.base/charset.exp
@@ -140,7 +140,7 @@ gdb_expect {
# We got some output that ended with a regular prompt
fail "get valid character sets"
}
- -re "^set charset.*$" {
+ -re ".*$gdb_prompt set charset.*$" {
# We got some other output, send a cntrl-c to gdb to get us back
# to the prompt.
send_gdb "\003"
@@ -200,7 +200,6 @@ gdb_expect {
-re "\\.\r\n$gdb_prompt $" {
#set host_charset_list $expect_out(1,string)
- set charsets($expect_out(1,string)) 1
pass "capture valid host charsets"
}
diff --git a/gdb/testsuite/gdb.base/complex.c b/gdb/testsuite/gdb.base/complex.c
index 98cdd29d0ea..dabbdd60595 100644
--- a/gdb/testsuite/gdb.base/complex.c
+++ b/gdb/testsuite/gdb.base/complex.c
@@ -1,6 +1,28 @@
+/* Copyright 2002, 2003, 2004
+ 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. */
+
/* Test taken from GCC. Verify that we can print a structure containing
a complex number. */
+#include <stdlib.h>
+
typedef __complex__ float cf;
struct x { char c; cf f; } __attribute__ ((__packed__));
struct unpacked_x { char c; cf f; };
diff --git a/gdb/testsuite/gdb.base/coremaker.c b/gdb/testsuite/gdb.base/coremaker.c
index 4bb16d46aa4..a7fbd94141a 100644
--- a/gdb/testsuite/gdb.base/coremaker.c
+++ b/gdb/testsuite/gdb.base/coremaker.c
@@ -1,3 +1,23 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
/* Simple little program that just generates a core dump from inside some
nested function calls. */
diff --git a/gdb/testsuite/gdb.base/coremaker2.c b/gdb/testsuite/gdb.base/coremaker2.c
index 94f9d000f48..470c6d491f1 100644
--- a/gdb/testsuite/gdb.base/coremaker2.c
+++ b/gdb/testsuite/gdb.base/coremaker2.c
@@ -1,3 +1,23 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
/* Simple little program that just generates a core dump from inside some
nested function calls. Keep this as self contained as possible, I.E.
use no environment resources other than possibly abort(). */
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 7e948f18e01..74682feee3b 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2003, 2004 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
@@ -200,6 +200,40 @@ gdb_expect {
timeout {fail "(timeout) help user command: nextwhere"}
}
+# Verify that the command parser doesn't require a space after an 'if'
+# command in a user defined function.
+#
+gdb_test_multiple "define ifnospace" "define user command: ifnospace" \
+{
+ -re "Type commands for definition of \"ifnospace\".\r\nEnd with a line saying just \"end\".\r\n>$" \
+ {
+ gdb_test_multiple "if(3<4)\nprint \"hi there\\n\"\nend\nend" "send body of ifnospace" \
+ {
+ -re "$gdb_prompt $"\
+ {pass "define user command: ifnospace"}
+ }
+ }
+}
+
+gdb_test "ifnospace" ".*hi there.*" "test ifnospace is parsed correctly"
+
+# Verify that the command parser doesn't require a space after an 'while'
+# command in a user defined function.
+#
+gdb_test_multiple "define whilenospace" "define user command: whilenospace" \
+{
+ -re "Type commands for definition of \"whilenospace\".\r\nEnd with a line saying just \"end\".\r\n>$" \
+ {
+ gdb_test_multiple "set \$i=1\nwhile(\$i<2)\nset \$i=2\nprint \"hi there\\n\"\nend\nend" "send body of whilenospace" \
+ {
+ -re "$gdb_prompt $" \
+ {pass "define user command: whilenospace"}
+ }
+ }
+}
+
+gdb_test "whilenospace" ".*hi there.*" "test whilenospace is parsed correctly"
+
# Verify that the user can "hook" a builtin command. We choose to
# hook the "stop" pseudo command, and we'll define it to use a user-
# define command.
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 5e88693889b..a55dc50932b 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -113,18 +113,26 @@ make_dump_file "dump tekhex val intarr1.tekhex intarray" \
make_dump_file "dump tekhex val intstr1.tekhex intstruct" \
"dump struct as value, tekhex"
-proc capture_value { expression } {
+proc capture_value { expression args } {
global gdb_prompt
global expect_out
set output_string ""
- send_gdb "print ${expression}\n"
- gdb_expect {
- -re ".*\[\r\n\]+.\[0123456789\]+ = (\[^\r\n\]+).*$gdb_prompt $" {
- set output_string $expect_out(1,string)
+ if {[llength $args] > 0} {
+ # Convert $args into a simple string.
+ set test "[join $args]; capture $expression"
+ } {
+ set test "capture $expression"
+ }
+ gdb_test_multiple "print ${expression}" "$test" {
+ -re "\\$\[0-9\]+ = (\[^\r\n\]+).*$gdb_prompt $" {
+ set output_string "$expect_out(1,string)"
+ pass "$test"
}
- default {
- fail "capture_value failed on $expression."
+ -re "(Cannot access memory at address \[^\r\n\]+).*$gdb_prompt $" {
+ # Even a failed value is valid
+ set output_string "$expect_out(1,string)"
+ pass "$test"
}
}
return $output_string
@@ -182,13 +190,15 @@ gdb_file_cmd ${binfile}
# Reload saved values one by one, and compare.
-if { ![string compare $array_val [capture_value "intarray"]] } then {
+if { ![string compare $array_val \
+ [capture_value "intarray" "file binfile"]] } then {
fail "start with intarray un-initialized"
} else {
pass "start with intarray un-initialized"
}
-if { ![string compare $struct_val [capture_value "intstruct"]] } then {
+if { ![string compare $struct_val \
+ [capture_value "intstruct" "file binfile"]] } then {
fail "start with intstruct un-initialized"
} else {
pass "start with intstruct un-initialized"
@@ -198,10 +208,11 @@ proc test_reload_saved_value { filename msg oldval newval } {
global gdb_prompt
gdb_file_cmd $filename
- if { ![string compare $oldval [capture_value $newval]] } then {
- pass $msg
+ if { ![string compare $oldval \
+ [capture_value $newval "$msg"]] } then {
+ pass "$msg; value restored ok"
} else {
- fail $msg
+ fail "$msg; value restored ok"
}
}
@@ -209,13 +220,13 @@ proc test_restore_saved_value { restore_args msg oldval newval } {
global gdb_prompt
gdb_test "restore $restore_args" \
- "Restoring .*" \
- "Restore command, $msg"
-
- if { ![string compare $oldval [capture_value $newval]] } then {
- pass "Restored value, $msg"
+ "Restoring .*" \
+ "$msg; file restored ok"
+ if { ![string compare $oldval \
+ [capture_value $newval "$msg"]] } then {
+ pass "$msg; value restored ok"
} else {
- fail "Restored value, $msg"
+ fail "$msg; value restored ok"
}
}
@@ -268,13 +279,15 @@ if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Program failed to run, so remaining tests in this file will automatically fail."
}
-if { ![string compare $array_val [capture_value "intarray"]] } then {
+if { ![string compare $array_val \
+ [capture_value "intarray" "load binfile"]] } then {
fail "start with intarray un-initialized, runto main"
} else {
pass "start with intarray un-initialized, runto main"
}
-if { ![string compare $struct_val [capture_value "intstruct"]] } then {
+if { ![string compare $struct_val \
+ [capture_value "intstruct" "load binfile"]] } then {
fail "start with intstruct un-initialized, runto main"
} else {
pass "start with intstruct un-initialized, runto main"
@@ -420,8 +433,7 @@ if ![string compare $is64bitonly "no"] then {
gdb_test "print zero_all ()" ""
test_restore_saved_value "intarr1.srec 0 $element3_start $element4_start" \
- "array partial, srec" \
- [capture_value "4"] "intarray\[3\]"
+ "array partial, srec" 4 "intarray\[3\]"
gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 1"
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 1"
@@ -429,8 +441,7 @@ if ![string compare $is64bitonly "no"] then {
gdb_test "print zero_all ()" ""
test_restore_saved_value "intarr1.ihex 0 $element3_start $element4_start" \
- "array partial, ihex" \
- [capture_value "4"] "intarray\[3\]"
+ "array partial, ihex" 4 "intarray\[3\]"
gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 2"
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 2"
@@ -438,8 +449,7 @@ if ![string compare $is64bitonly "no"] then {
gdb_test "print zero_all ()" ""
test_restore_saved_value "intarr1.tekhex 0 $element3_start $element4_start" \
- "array partial, tekhex" \
- [capture_value "4"] "intarray\[3\]"
+ "array partial, tekhex" 4 "intarray\[3\]"
gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 3"
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 3"
@@ -449,8 +459,7 @@ gdb_test "print zero_all ()" ""
test_restore_saved_value \
"intarr1.bin binary $array_start $element3_offset $element4_offset" \
- "array partial, binary" \
- [capture_value "4"] "intarray\[3\]"
+ "array partial, binary" 4 "intarray\[3\]"
gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 4"
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 4"
@@ -461,8 +470,7 @@ if ![string compare $is64bitonly "no"] then {
# restore with expressions
test_restore_saved_value \
"intarr3.srec ${array2_start}-${array_start} &intarray\[3\] &intarray\[4\]" \
- "array partial with expressions" \
- [capture_value "4"] "intarray2\[3\]"
+ "array partial with expressions" 4 "intarray2\[3\]"
gdb_test "print intarray2\[2\] == 0" " = 1" "element 2 not changed, == 4"
gdb_test "print intarray2\[4\] == 0" " = 1" "element 4 not changed, == 4"
@@ -471,4 +479,3 @@ if ![string compare $is64bitonly "no"] then {
# clean up files
remote_exec build "rm -f intarr1.bin intarr1b.bin intarr1.ihex intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex intstr2.srec intstr2.tekhex intarr3.srec"
-
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index b0e3c1de623..8d9ef60e752 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -1,4 +1,7 @@
-# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1997, 1998, 1999, 2003, 2004 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
@@ -14,12 +17,9 @@
# 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
-
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
global usestubs
@@ -66,374 +66,211 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
# Verify that we can set a breakpoint (the location is irrelevant),
# then enable it (yes, it's already enabled by default), then hit it.
-#
-send_gdb "break marker1\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
- {pass "break marker1"}
- -re "$gdb_prompt $"\
- {fail "break marker1"}
- timeout {fail "(timeout) break marker1"}
-}
-send_gdb "enable $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "enable break marker1"}
- timeout {fail "(timeout) enable break marker1"}
-}
+proc break_at { breakpoint where } {
+ global gdb_prompt
+ global expect_out
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*$gdb_prompt $"\
- {pass "info break marker1"}
- -re "$gdb_prompt $"\
- {fail "info break marker1"}
- timeout {fail "(timeout) info break marker1"}
+ set test "break $breakpoint"
+ set bp 0
+ gdb_test_multiple "$test" "$test" {
+ -re "Breakpoint (\[0-9\]*) at .*$where.*$gdb_prompt $" {
+ set bp $expect_out(1,string)
+ pass "$test"
+ }
+ }
+ return $bp
}
-# See the comments in condbreak.exp for "run until breakpoint at marker1"
-# for an explanation of the xfail below.
-send_gdb "continue\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
- {pass "continue to break marker1"}
- -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $"\
- {xfail "continue to break marker1"}
- -re "$gdb_prompt $"\
- {fail "continue to break marker1"}
- timeout {fail "(timeout) continue to break marker1"}
-}
+set bp [break_at "marker1" " line ($bp_location15|$bp_location16)"]
-send_gdb "delete $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "delete break marker1"}
- timeout {fail "(timeout) delete break marker1"}
-}
+gdb_test "enable $bp" "" "enable break marker1"
-# Verify that we can set a breakpoint to be self-disabling after
-# the first time it triggers.
-#
-send_gdb "break marker2\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
- {pass "break marker2"}
- -re "$gdb_prompt $"\
- {fail "break marker2"}
- timeout {fail "(timeout) break marker2"}
-}
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*" \
+ "info break marker1"
-send_gdb "enable once $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "enable once break marker2"}
- timeout {fail "(timeout) enable once break marker2"}
+# See the comments in condbreak.exp for "run until breakpoint at
+# marker1" for an explanation of the xfail below.
+set test "continue to break marker1"
+gdb_test_multiple "continue" "$test" {
+ -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $" {
+ xfail "$test"
+ }
}
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+y.*$gdb_prompt $"\
- {pass "info auto-disabled break marker2"}
- -re "$gdb_prompt $"\
- {fail "info auto-disabled break marker2"}
- timeout {fail "(timeout) info auto-disabled break marker2"}
-}
+gdb_test "delete $bp" "" "delete break marker1"
-# See the comments in condbreak.exp for "run until breakpoint at marker1"
-# for an explanation of the xfail below.
-send_gdb "continue\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*, marker2.*$gdb_prompt $"\
- {pass "continue to auto-disabled break marker2"}
- -re "Breakpoint \[0-9\]*, $hex in marker2.*$gdb_prompt $"\
- {xfail "continue to auto-disabled break marker2"}
- -re "$gdb_prompt $"\
- {fail "continue to auto-disabled break marker2"}
- timeout {fail "(timeout) continue to auto-disabled break marker2"}
-}
+# Verify that we can set a breakpoint to be self-disabling after the
+# first time it triggers.
+set bp [break_at "marker2" " line ($bp_location8|$bp_location9)"]
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+n.*$gdb_prompt $"\
- {pass "info auto-disabled break marker2"}
- -re "$gdb_prompt $"\
- {fail "info auto-disabled break marker2"}
- timeout {fail "(timeout) info auto-disabled break marker2"}
+gdb_test "enable once $bp" "" "enable once break marker2"
+
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+y.*" \
+ "info auto-disabled break marker2"
+
+# See the comments in condbreak.exp for "run until breakpoint at
+# marker1" for an explanation of the xfail below.
+set test "continue to auto-disabled break marker2"
+gdb_test_multiple "continue" "$test" {
+ -re "Breakpoint \[0-9\]*, marker2.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Breakpoint \[0-9\]*, $hex in marker2.*$gdb_prompt $" {
+ xfail "$test"
+ }
}
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+n.*" \
+ "info auto-disabled break marker2"
+
# Verify that we don't stop at a disabled breakpoint.
-#
gdb_continue_to_end "no stop"
rerun_to_main
gdb_continue_to_end "no stop at auto-disabled break marker2"
-# Verify that we can set a breakpoint to be self-deleting after
-# the first time it triggers.
-#
-if ![runto_main] then { fail "enable/disable break tests suppressed" }
-
-send_gdb "break marker3\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location17|$bp_location18).*$gdb_prompt $"\
- {pass "break marker3"}
- -re "$gdb_prompt $"\
- {fail "break marker3"}
- timeout {fail "(timeout) break marker3"}
+# Verify that we can set a breakpoint to be self-deleting after the
+# first time it triggers.
+if ![runto_main] then {
+ fail "enable/disable break tests suppressed"
}
-send_gdb "enable del $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "enable del break marker3"}
- timeout {fail "(timeout) enable del break marker3"}
-}
+set bp [break_at "marker3" " line ($bp_location17|$bp_location18)"]
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*$gdb_prompt $"\
- {pass "info auto-deleted break marker2"}
- -re "$gdb_prompt $"\
- {fail "info auto-deleted break marker2"}
- timeout {fail "(timeout) info auto-deleted break marker2"}
-}
+gdb_test "enable del $bp" "" "enable del break marker3"
-send_gdb "continue\n"
-gdb_expect {
- -re ".*marker3 .*:($bp_location17|$bp_location18).*$gdb_prompt $"\
- {pass "continue to auto-deleted break marker3"}
- -re "Breakpoint \[0-9\]*, marker3.*$gdb_prompt $"\
- {fail "continue to auto-deleted break marker3"}
- -re "$gdb_prompt $"\
- {fail "continue to auto-deleted break marker3"}
- timeout {fail "(timeout) continue to break marker3"}
-}
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*" \
+ "info auto-deleted break marker2"
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re ".*No breakpoint or watchpoint number.*$gdb_prompt $"\
- {pass "info auto-deleted break marker3"}
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\].*$gdb_prompt $"\
- {fail "info auto-deleted break marker3"}
- -re "$gdb_prompt $"\
- {fail "info auto-deleted break marker3"}
- timeout {fail "(timeout) info auto-deleted break marker3"}
-}
+gdb_test "continue" \
+ ".*marker3 .*:($bp_location17|$bp_location18).*" \
+ "continue to auto-deleted break marker3"
+
+gdb_test "info break $bp" \
+ ".*No breakpoint or watchpoint number.*" \
+ "info auto-deleted break marker3"
# Verify that we can set a breakpoint and manually disable it (we've
# already proven that disabled bp's don't trigger).
-#
-send_gdb "break marker4\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location14|$bp_location13).*$gdb_prompt $"\
- {pass "break marker4"}
- -re "$gdb_prompt $"\
- {fail "break marker4"}
- timeout {fail "(timeout) break marker4"}
-}
-send_gdb "disable $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "disable break marker4"}
- timeout {fail "(timeout) disable break marker4"}
-}
+set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"]
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*$gdb_prompt $"\
- {pass "info break marker4"}
- -re "$gdb_prompt $"\
- {fail "info break marker4"}
- timeout {fail "(timeout) info break marker4"}
-}
+gdb_test "disable $bp" "" "disable break marker4"
+
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
+ "info break marker4"
# Verify that we can set a breakpoint with an ignore count N, which
# should cause the next N triggers of the bp to be ignored. (This is
# a flavor of enablement/disablement, after all.)
-#
-if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break marker1\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
- {pass "break marker1"}
- -re "$gdb_prompt $"\
- {fail "break marker1"}
- timeout {fail "(timeout) break marker1"}
+if ![runto_main] then {
+ fail "enable/disable break tests suppressed"
}
+set bp [break_at "marker1" " line ($bp_location15|$bp_location16).*"]
+
# Verify that an ignore of a non-existent breakpoint is gracefully
# handled.
-#
-send_gdb "ignore 999 2\n"
-gdb_expect {
- -re "No breakpoint number 999..*$gdb_prompt $"\
- {pass "ignore non-existent break"}
- -re "$gdb_prompt $"\
- {fail "ignore non-existent break"}
- timeout {fail "(timeout) ignore non-existent break"}
-}
+
+gdb_test "ignore 999 2" \
+ "No breakpoint number 999..*" \
+ "ignore non-existent break"
# Verify that a missing ignore count is gracefully handled.
-#
-send_gdb "ignore $expect_out(1,string) \n"
-gdb_expect {
- -re "Second argument .specified ignore-count. is missing..*$gdb_prompt $"\
- {pass "ignore break with missing ignore count"}
- -re "$gdb_prompt $"\
- {fail "ignore break with missing ignore count"}
- timeout {fail "(timeout) ignore break with missing ignore count"}
-}
+
+gdb_test "ignore $bp" \
+ "Second argument .specified ignore-count. is missing..*" \
+ "ignore break with missing ignore count"
# Verify that a negative or zero ignore count is handled gracefully
# (they both are treated the same).
-#
-send_gdb "ignore $expect_out(1,string) -1\n"
-gdb_expect {
- -re "Will stop next time breakpoint \[0-9\]* is reached..*$gdb_prompt $"\
- {pass "ignore break marker1 -1"}
- -re "$gdb_prompt $"\
- {fail "ignore break marker1 -1"}
- timeout {fail "(timeout) ignore break marker1 -1"}
-}
-send_gdb "ignore $expect_out(1,string) 0\n"
-gdb_expect {
- -re "Will stop next time breakpoint \[0-9\]* is reached..*$gdb_prompt $"\
- {pass "ignore break marker1 0"}
- -re "$gdb_prompt $"\
- {fail "ignore break marker1 0"}
- timeout {fail "(timeout) ignore break marker1 0"}
-}
+gdb_test "ignore $bp -1" \
+ "Will stop next time breakpoint \[0-9\]* is reached..*" \
+ "ignore break marker1 -1"
-send_gdb "ignore $expect_out(1,string) 1\n"
-gdb_expect {
- -re "Will ignore next crossing of breakpoint \[0-9\]*.*$gdb_prompt $"\
- {pass "ignore break marker1"}
- -re "$gdb_prompt $"\
- {fail "ignore break marker1"}
- timeout {fail "(timeout) ignore break marker1"}
-}
+gdb_test "ignore $bp 0" \
+ "Will stop next time breakpoint \[0-9\]* is reached..*" \
+ "ignore break marker1 0"
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*ignore next 1 hits.*$gdb_prompt $"\
- {pass "info ignored break marker1"}
- -re "$gdb_prompt $"\
- {fail "info ignored break marker1"}
- timeout {fail "(timeout) info ignored break marker1"}
-}
+gdb_test "ignore $bp 1" \
+ "Will ignore next crossing of breakpoint \[0-9\]*.*" \
+ "ignore break marker1"
+
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*ignore next 1 hits.*" \
+ "info ignored break marker1"
gdb_continue_to_end "no stop at ignored break marker1"
rerun_to_main
# See the comments in condbreak.exp for "run until breakpoint at marker1"
# for an explanation of the xfail below.
-send_gdb "continue\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
- {pass "continue to break marker1, 2nd time"}
- -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $"\
- {xfail "continue to break marker1, 2nd time"}
- -re "$gdb_prompt $"\
- {fail "continue to break marker1, 2nd time"}
- timeout {fail "(timeout) continue to break marker1, 2nd time"}
+set test "continue to break marker1, 2nd time"
+gdb_test_multiple "continue" "$test" {
+ -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $" {
+ pass "continue to break marker1, 2nd time"
+ }
+ -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $" {
+ xfail "continue to break marker1, 2nd time"
+ }
}
# Verify that we can specify both an ignore count and an auto-delete.
-#
-if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break marker1\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
- {pass "break marker1"}
- -re "$gdb_prompt $"\
- {fail "break marker1"}
- timeout {fail "(timeout) break marker1"}
+if ![runto_main] then {
+ fail "enable/disable break tests suppressed"
}
-send_gdb "ignore $expect_out(1,string) 1\n"
-gdb_expect {
- -re "Will ignore next crossing of breakpoint \[0-9\]*.*$gdb_prompt $"\
- {pass "ignore break marker1"}
- -re "$gdb_prompt $"\
- {fail "ignore break marker1"}
- timeout {fail "(timeout) ignore break marker1"}
-}
+set bp [break_at marker1 " line ($bp_location15|$bp_location16).*"]
-send_gdb "enable del $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "enable del break marker1"}
- timeout {fail "(timeout) enable del break marker1"}
-}
+gdb_test "ignore $bp 1" \
+ "Will ignore next crossing of breakpoint \[0-9\]*.*" \
+ "ignore break marker1"
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*ignore next 1 hits.*$gdb_prompt $"\
- {pass "info break marker1"}
- -re "$gdb_prompt $"\
- {fail "info break marker1"}
- timeout {fail "(timeout) info break marker2"}
-}
+gdb_test "enable del $bp" "" "enable del break marker1"
+
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*ignore next 1 hits.*" \
+ "info break marker1"
gdb_continue_to_end "no stop at ignored & auto-deleted break marker1"
rerun_to_main
-send_gdb "continue\n"
-gdb_expect {
- -re ".*marker1 .*:($bp_location15|$bp_location16).*$gdb_prompt $"\
- {pass "continue to ignored & auto-deleted break marker1"}
- -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
- {fail "continue to ignored & auto-deleted break marker1"}
- -re "$gdb_prompt $"\
- {fail "continue to ignored & auto-deleted break marker1"}
- timeout {fail "(timeout) continue to ignored & auto-deleted break marker1"}
-}
+gdb_test "continue" \
+ ".*marker1 .*:($bp_location15|$bp_location16).*" \
+ "continue to ignored & auto-deleted break marker1"
# Verify that a disabled breakpoint's ignore count isn't updated when
# the bp is encountered.
-#
-if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break marker1\n"
-gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
- {pass "break marker1"}
- -re "$gdb_prompt $"\
- {fail "break marker1"}
- timeout {fail "(timeout) break marker1"}
+if ![runto_main] then {
+ fail "enable/disable break tests suppressed"
}
-send_gdb "ignore $expect_out(1,string) 10\n"
-gdb_expect {
- -re "Will ignore next 10 crossings of breakpoint \[0-9\]*.*$gdb_prompt $"\
- {pass "ignore break marker1"}
- -re "$gdb_prompt $"\
- {fail "ignore break marker1"}
- timeout {fail "(timeout) ignore break marker1"}
-}
+set bp [break_at marker1 " line ($bp_location15|$bp_location16)"]
-send_gdb "disable $expect_out(1,string)\n"
-gdb_expect {
- -re "$gdb_prompt $"\
- {pass "disable break marker1"}
- timeout {fail "(timeout) disable break marker1"}
-}
+gdb_test "ignore $bp 10" \
+ "Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \
+ "ignore break marker1"
+
+gdb_test "disable $bp" "" "disable break marker1"
gdb_continue_to_end "no stop at ignored & disabled break marker1"
rerun_to_main
-send_gdb "info break $expect_out(1,string)\n"
-gdb_expect {
- -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*ignore next 10 hits.*$gdb_prompt $"\
- {pass "info ignored & disabled break marker1"}
- -re "$gdb_prompt $"\
- {fail "info ignored & disabled break marker1"}
- timeout {fail "(timeout) info ignored & disabled break marker1"}
-}
+gdb_test "info break $bp" \
+ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*ignore next 10 hits.*" \
+ "info ignored & disabled break marker1"
# Verify that GDB correctly handles the "continue" command with an argument,
# which is an ignore count to set on the currently stopped-at breakpoint.
@@ -442,46 +279,25 @@ gdb_expect {
#
if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break $bp_location1\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*.*, line $bp_location1.*$gdb_prompt $"\
- {pass "prepare to continue with ignore count"}
- -re "$gdb_prompt $"\
- {fail "prepare to continue with ignore count"}
- timeout {fail "(timeout) prepare to continue with ignore count"}
-}
-send_gdb "continue 2\n"
-gdb_expect {
- -re "Will ignore next crossing of breakpoint \[0-9\]*. Continuing..*$gdb_prompt $"\
- {pass "continue with ignore count"}
- -re "$gdb_prompt $"\
- {fail "continue with ignore count"}
- timeout {fail "(timeout) continue with ignore count"}
-}
-
-send_gdb "next\n"
-gdb_expect {
- -re ".*$bp_location11\[ \t\]*marker1.*$gdb_prompt $"\
- {pass "step after continue with ignore count"}
- -re "$gdb_prompt $"\
- {fail "step after continue with ignore count"}
- timeout {fail "(timeout) step after continue with ignore count"}
-}
-
-# ??rehrauer: Huh. This appears to be an actual bug. (No big
-# surprise, since this feature hasn't been tested...) Looks like
-# GDB is currently trying to set the ignore count of bp # -1!
-#
-setup_xfail hppa_*_*
-send_gdb "continue 2\n"
-gdb_expect {
- -re "Not stopped at any breakpoint; argument ignored..*$gdb_prompt $"\
- {pass "continue with ignore count, not stopped at bpt"}
- -re "No breakpoint number -1.*$gdb_prompt $"\
- {xfail "(DTS'd) continue with ignore count, not stopped at bpt"}
- -re "$gdb_prompt $"\
- {fail "continue with ignore count, not stopped at bpt"}
- timeout {fail "(timeout) step after continue with ignore count, not stopped at bpt"}
+gdb_test "break $bp_location1" \
+ "Breakpoint \[0-9\]*.*, line $bp_location1.*" \
+ "prepare to continue with ignore count"
+
+gdb_test "continue 2" \
+ "Will ignore next crossing of breakpoint \[0-9\]*. Continuing..*" \
+ "continue with ignore count"
+
+gdb_test "next" ".*$bp_location11\[ \t\]*marker1.*" \
+ step after continue with ignore count"
+
+set test "continue with ignore count, not stopped at bpt"
+gdb_test_multiple "continue 2" "$test" {
+ -re "Not stopped at any breakpoint; argument ignored.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "No breakpoint number -1.*$gdb_prompt $" {
+ kfail gdb/1689 "$test"
+ }
}
gdb_exit
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index af32acd0673..1363a000ca4 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -1,4 +1,7 @@
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -12,10 +15,7 @@
#
# 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
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# use this to debug:
#
@@ -109,7 +109,7 @@ gdb_expect {
-re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
set line_nine $expect_out(1,string)
gdb_test "b ending-run.c:14" ".*Breakpoint 7.*ending-run.c, line 14.*"
- gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*"
+ gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*" "Breakpoint 7 at *ending-run.c:14"
gdb_test "c" ".*Breakpoint.*7.*callee.*14.*"
gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default"
}
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 01b0a998132..c09c37bb0aa 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -63,6 +63,8 @@ if { [istarget "alpha*-*-*"] } then {
gdb_test "info float" "f0.*f1.*f127.*" "info float"
} elseif [istarget "m68k-*-*"] then {
gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
+} elseif [istarget "mips*-*-*"] then {
+ gdb_test "info float" "f0:.*flt:.*dbl:.*" "info float"
} elseif [istarget "s390*-*-*"] then {
gdb_test "info float" "fpc.*f0.*f1.*f15.*" "info float"
} elseif [istarget "sh*-*"] then {
@@ -75,6 +77,8 @@ if { [istarget "alpha*-*-*"] } then {
pass "info float (without FPU)"
}
}
+} elseif [istarget "hppa*-*"] then {
+ gdb_test "info float" "fr4.*fr4R.*fr31R.*" "info float"
} else {
- gdb_test "info float" "No floating.point info available for this processor." "info float"
+ gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
}
diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp
index d3fb1676878..2ef3a4a0ad7 100644
--- a/gdb/testsuite/gdb.base/foll-fork.exp
+++ b/gdb/testsuite/gdb.base/foll-fork.exp
@@ -280,8 +280,7 @@ proc do_fork_tests {} {
A fork or vfork creates a new process. follow-fork-mode can be:.*
.*parent - the original process is debugged after a fork.*
.*child - the new process is debugged after a fork.*
-.*ask - the debugger will ask for one of the above choices.*
-For \"parent\" or \"child\", the unfollowed process will run free..*
+The unfollowed process will continue to run..*
By default, the debugger will follow the parent process..*$gdb_prompt $"\
{ pass "help set follow" }
-re "$gdb_prompt $" { fail "help set follow" }
diff --git a/gdb/testsuite/gdb.base/freebpcmd.c b/gdb/testsuite/gdb.base/freebpcmd.c
index 765e12d2ca8..36cbcbea29d 100644
--- a/gdb/testsuite/gdb.base/freebpcmd.c
+++ b/gdb/testsuite/gdb.base/freebpcmd.c
@@ -1,5 +1,5 @@
/* Test program for GDB crashes while doing bp commands that continue inferior.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of the gdb testsuite.
@@ -18,6 +18,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <stdio.h>
+
int
main (int argc, char **argv)
{
diff --git a/gdb/testsuite/gdb.base/gcore.c b/gdb/testsuite/gdb.base/gcore.c
index af09dced7e1..24de8c7eb2f 100644
--- a/gdb/testsuite/gdb.base/gcore.c
+++ b/gdb/testsuite/gdb.base/gcore.c
@@ -1,8 +1,28 @@
+/* Copyright 2002, 2004 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. */
+
/*
* Test GDB's ability to save and reload a corefile.
*/
#include <stdlib.h>
+#include <string.h>
int extern_array[4] = {1, 2, 3, 4};
static int static_array[4] = {5, 6, 7, 8};
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 33fcba4810e..29239ef87fd 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -187,7 +187,6 @@ if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
set post_corefile_extern_array \
[capture_command_output "print extern_array" "$print_prefix"]
-pass "extern_array = $post_corefile_extern_array"
if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {
pass "corefile restored extern array"
} else {
@@ -196,7 +195,6 @@ if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {
set post_corefile_static_array \
[capture_command_output "print static_array" "$print_prefix"]
-pass "static_array = $post_corefile_static_array"
if ![string compare $pre_corefile_static_array $post_corefile_static_array] {
pass "corefile restored static array"
} else {
@@ -205,7 +203,6 @@ if ![string compare $pre_corefile_static_array $post_corefile_static_array] {
set post_corefile_uninit_array \
[capture_command_output "print un_initialized_array" "$print_prefix"]
-pass "uninit_array = $post_corefile_uninit_array"
if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array] {
pass "corefile restored un-initialized array"
} else {
@@ -214,7 +211,6 @@ if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array] {
set post_corefile_heap_string \
[capture_command_output "print heap_string" "$print_prefix"]
-pass "heap_string = $post_corefile_heap_string"
if ![string compare $pre_corefile_heap_string $post_corefile_heap_string] {
pass "corefile restored heap array"
} else {
@@ -223,7 +219,6 @@ if ![string compare $pre_corefile_heap_string $post_corefile_heap_string] {
set post_corefile_local_array \
[capture_command_output "print array_func::local_array" "$print_prefix"]
-pass "local_array = $post_corefile_local_array"
if ![string compare $pre_corefile_local_array $post_corefile_local_array] {
pass "corefile restored stack array"
} else {
diff --git a/gdb/testsuite/gdb.base/gdb1476.c b/gdb/testsuite/gdb.base/gdb1476.c
deleted file mode 100644
index c3f43760bf3..00000000000
--- a/gdb/testsuite/gdb.base/gdb1476.c
+++ /dev/null
@@ -1,12 +0,0 @@
-void x()
-{
- void (*fp)() = 0;
- fp();
-}
-
-int
-main()
-{
- x();
- return 0;
-}
diff --git a/gdb/testsuite/gdb.base/gdb1476.exp b/gdb/testsuite/gdb.base/gdb1476.exp
deleted file mode 100644
index b88b2de0652..00000000000
--- a/gdb/testsuite/gdb.base/gdb1476.exp
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2004 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@gnu.org
-
-# This file is part of the gdb testsuite.
-
-if $tracelevel {
- strace $tracelevel
-}
-
-# Testcase for backtrace/gdb1476.
-
-set prms_id 0
-set bug_id 0
-
-set testfile "gdb1476"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-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."
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-#
-# Run to `main' where we begin our tests.
-#
-
-if ![runto_main] then {
- gdb_suppress_tests
-}
-
-# If we can examine what's at memory address 0, it is possible that we
-# could also execute it. This could probably make us run away,
-# executing random code, which could have all sorts of ill effects,
-# especially on targets without an MMU. Don't run the tests in that
-# case.
-
-send_gdb "x 0\n"
-gdb_expect {
- -re "0x0:.*Cannot access memory at address 0x0.*$gdb_prompt $" { }
- -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { }
- -re ".*$gdb_prompt $" {
- untested "Memory at address 0 is possibly executable"
- return
- }
-}
-
-gdb_test "continue" "Program received signal SIGSEGV.*" \
- "continue to null pointer call"
-
-gdb_test "backtrace 10" \
- "#0\[ \t\]*0x0* in .*\r\n#1\[ \t\]*$hex in x.*\r\n#2\[ \t\]*$hex in main.*" \
- "backtrace from null pointer call"
diff --git a/gdb/testsuite/gdb.base/lineinc.c b/gdb/testsuite/gdb.base/lineinc.c
new file mode 100644
index 00000000000..91784e7d2b3
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineinc.c
@@ -0,0 +1,30 @@
+/* The following is written to tickle a specific bug in the macro
+ table code (now hopefully fixed), which doesn't insert new included
+ files in the #including file's list in the proper place. They
+ should be sorted by the number of the line which #included them, in
+ increasing order, but the sense of the comparison was reversed, so
+ the list ends up being built backwards. This isn't a problem by
+ itself, but the code to pick new, non-conflicting line numbers for
+ headers alleged to be #included at the same line as some other
+ header assumes that the list's line numbers are in ascending order.
+
+ So, given the following input, lineinc1.h gets added to lineinc.c's
+ #inclusion list first, at line 10. When the debug info reader
+ tries to add lineinc2.h at line 10 as well, the code will notice the
+ duplication --- since there's only one extant element in the list,
+ it'll find it --- and insert it after lineinc1.h, with line 11.
+ Since the code is putting the list in order of descending
+ #inclusion line number, the list is now out of order. When we try
+ to #include lineinc3.h at line 11, we won't notice the duplication. */
+
+#line 10
+#include "lineinc1.h"
+#line 10
+#include "lineinc2.h"
+#line 11
+#include "lineinc3.h"
+
+int
+main (int argc, char **argv)
+{
+}
diff --git a/gdb/testsuite/gdb.base/lineinc.exp b/gdb/testsuite/gdb.base/lineinc.exp
new file mode 100644
index 00000000000..4707ce516e1
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineinc.exp
@@ -0,0 +1,126 @@
+# Test macro handling of #included files.
+# 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# The test program lineinc.c contains a mix of #line directives and
+# #include directives that will cause the compiler to attribute more
+# than one #inclusion to the same source line. You can get similar
+# effects using things like GCC's '-imacros' flag.
+#
+# Compiling lineinc.c with Dwarf 2 macro information will produce
+# something like this:
+#
+# $ gcc -g3 lineinc.c -o lineinc
+# $ readelf -wml lineinc
+# ...
+# The File Name Table:
+# Entry Dir Time Size Name
+# 1 0 0 0 lineinc.c
+# 2 0 0 0 lineinc1.h
+# 3 0 0 0 lineinc2.h
+# 4 0 0 0 lineinc3.h
+# ...
+# Contents of the .debug_macinfo section:
+#
+# DW_MACINFO_start_file - lineno: 0 filenum: 1
+# DW_MACINFO_define - lineno : 1 macro : __VERSION__ "3.2 20020903 (Red Hat Linux 8.0 3.2-7)"
+# DW_MACINFO_define - lineno : 2 macro : __USER_LABEL_PREFIX__
+# ...
+# DW_MACINFO_define - lineno : 1 macro : __i386__ 1
+# DW_MACINFO_define - lineno : 1 macro : __tune_i386__ 1
+# DW_MACINFO_start_file - lineno: 10 filenum: 2
+# DW_MACINFO_define - lineno : 1 macro : FOO 1
+# DW_MACINFO_end_file
+# DW_MACINFO_start_file - lineno: 10 filenum: 3
+# DW_MACINFO_undef - lineno : 1 macro : FOO
+# DW_MACINFO_define - lineno : 2 macro : FOO 2
+# DW_MACINFO_end_file
+# DW_MACINFO_start_file - lineno: 11 filenum: 4
+# DW_MACINFO_undef - lineno : 1 macro : FOO
+# DW_MACINFO_define - lineno : 2 macro : FOO 3
+# DW_MACINFO_end_file
+# DW_MACINFO_end_file
+# $
+#
+# Note how the inclusions of lineinc1.h and lineinc2.h are both
+# attributed to line 10 of lineinc.c, and the #inclusion of lineinc3.h
+# is attributed to line 11. This is all correct, given the #line
+# directives in lineinc.c.
+#
+# Dwarf 2 macro information doesn't contain enough information to
+# allow GDB to figure out what's really going on here --- it makes no
+# mention of the #line directives --- so we just try to cope as best
+# we can. If the macro table were to attribute more than one
+# #inclusion to the same source line, then GDB wouldn't be able to
+# tell which #included file's #definitions and #undefinitions come
+# first, so it can't tell which #definitions are in scope following
+# all the #inclusions. To cope with this, GDB puts all the files
+# #included by a given source file in a list sorted by the line at
+# which they were #included; this gives GDB the chance to detect
+# multiple #inclusions at the same line, complain, and assign
+# distinct, albiet incorrect, line numbers to each #inclusion.
+#
+# However, at one point GDB was sorting the list in reverse order,
+# while the code to assign new, distinct line numbers assumed it was
+# sorted in ascending order; GDB would get an internal error trying to
+# read the above debugging info.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "lineinc"
+set binfile ${objdir}/${subdir}/${testfile}
+
+
+if {[gdb_compile "${srcdir}/${subdir}/${testfile}.c" ${binfile} executable {debug}] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Any command that causes GDB to read the debugging info for the
+# lineinc.c compilation unit will do here.
+set test_name "tolerate macro info with multiple #inclusions per line"
+gdb_test_multiple "break main" $test_name {
+ -re "Breakpoint 1 at 0x.*: file .*lineinc.c.*\\.\r\n${gdb_prompt}" {
+ pass $test_name
+ }
+ -re ".*internal-error:.*.y or n. " {
+ fail $test_name
+ send_gdb "y\n"
+ gdb_expect {
+ -re ".*.y or n. " {
+ send_gdb "n\n"
+ exp_continue
+ }
+ -re "$gdb_prompt" {
+ }
+ timeout {
+ fail "$test_name (timeout)"
+ }
+ }
+ }
+}
diff --git a/gdb/testsuite/gdb.base/lineinc1.h b/gdb/testsuite/gdb.base/lineinc1.h
new file mode 100644
index 00000000000..8523d58b330
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineinc1.h
@@ -0,0 +1 @@
+#define FOO 1
diff --git a/gdb/testsuite/gdb.base/lineinc2.h b/gdb/testsuite/gdb.base/lineinc2.h
new file mode 100644
index 00000000000..ee800ba72e8
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineinc2.h
@@ -0,0 +1,2 @@
+#undef FOO
+#define FOO 2
diff --git a/gdb/testsuite/gdb.base/lineinc3.h b/gdb/testsuite/gdb.base/lineinc3.h
new file mode 100644
index 00000000000..be3bb54506a
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineinc3.h
@@ -0,0 +1,2 @@
+#undef FOO
+#define FOO 3
diff --git a/gdb/testsuite/gdb.base/logical.exp b/gdb/testsuite/gdb.base/logical.exp
index 304f45c66ec..231f8ae01cf 100644
--- a/gdb/testsuite/gdb.base/logical.exp
+++ b/gdb/testsuite/gdb.base/logical.exp
@@ -1,4 +1,6 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1998, 1999, 2004 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
@@ -14,21 +16,15 @@
# 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 Elena Zannoni (ezannoni@cygnus.com)
-# This file is part of the gdb testsuite
+# Tests for correctenss of logical operators, associativity and
+# precedence with integer type variables
-#
-# tests for correctenss of logical operators, associativity and precedence
-# with integer type variables
-#
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
#
# test running programs
@@ -41,8 +37,8 @@ set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
if [get_compiler_info ${binfile}] {
return -1;
@@ -63,515 +59,74 @@ if ![runto_main] then {
continue
}
-#
-# test expressions with "int" types
-#
-
-gdb_test "set variable x=0" "" "set variable x=0"
-gdb_test "set variable y=0" "" "set variable y=0"
-gdb_test "set variable z=0" "" "set variable z=0"
-
-send_gdb "print x\n"
-gdb_expect {
- -re ".*0.*$gdb_prompt $" {
- pass "print value of x"
- }
- -re ".*$gdb_prompt $" { fail "print value of x" }
- timeout { fail "(timeout) print value of x" }
- }
-
-
-send_gdb "print y\n"
-gdb_expect {
- -re ".*0.*$gdb_prompt $" {
- pass "print value of y"
- }
- -re ".*$gdb_prompt $" { fail "print value of y" }
- timeout { fail "(timeout) print value of y" }
- }
-
-send_gdb "print z\n"
-gdb_expect {
- -re ".*0.*$gdb_prompt $" {
- pass "print value of z"
- }
- -re ".*$gdb_prompt $" { fail "print value of z" }
- timeout { fail "(timeout) print value of z" }
- }
-
-
-# truth tables for && , || , !
-
-send_gdb "print x && y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x<y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<y" }
- timeout { fail "(timeout) print value of x<y" }
- }
-
-
-
-send_gdb "print x || y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x<=y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<=y" }
- timeout { fail "(timeout) print value of x<=y" }
- }
-
-send_gdb "print !x\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x>y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x>y" }
- timeout { fail "(timeout) print value of x>y" }
- }
-
-gdb_test "set variable y=1" "" "set variable y=1"
-
-send_gdb "print x && y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x<y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<y" }
- timeout { fail "(timeout) print value of x<y" }
- }
-
-
-
-send_gdb "print x || y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x<=y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<=y" }
- timeout { fail "(timeout) print value of x<=y" }
- }
-
-gdb_test "set variable x=1" "" "set variable x=1"
-
-send_gdb "print x && y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x<y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<y" }
- timeout { fail "(timeout) print value of x<y" }
- }
-
-
-
-send_gdb "print x || y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x<=y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<=y" }
- timeout { fail "(timeout) print value of x<=y" }
- }
-
-send_gdb "print !x\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x>y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x>y" }
- timeout { fail "(timeout) print value of x>y" }
- }
-
-gdb_test "set variable y=0" "" "set variable y=0"
-
-send_gdb "print x && y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x<y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<y" }
- timeout { fail "(timeout) print value of x<y" }
- }
-
-
-
-send_gdb "print x || y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x<=y"
- }
- -re ".*$gdb_prompt $" { fail "print value of x<=y" }
- timeout { fail "(timeout) print value of x<=y" }
- }
-
-
-# end truth tables for &&, ||, !
-
-
-# test associativity of && , || , !
-
-gdb_test "set variable x=0" "" "set variable x=0"
-gdb_test "set variable y=0" "" "set variable y=0"
-gdb_test "set variable z=0" "" "set variable z=0"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (000)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (000) " }
- timeout { fail "(timeout) print value of x && y && z (000) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x || y || z (000)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (000)" }
- timeout { fail "(timeout) print value of x || y || z (000) " }
- }
-
-send_gdb "print !!x\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of !!x (0)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !!x (0)" }
- timeout { fail "(timeout) print value of !!x (0) " }
- }
-
-
-gdb_test "set variable y=1" "" "set variable y=1"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (010)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (010) " }
- timeout { fail "(timeout) print value of x && y && z (010) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (010)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (010)" }
- timeout { fail "(timeout) print value of x || y || z (010) " }
- }
-
-
-gdb_test "set variable z=1" "" "set variable z=1"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (011)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (011) " }
- timeout { fail "(timeout) print value of x && y && z (011) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (011)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (011)" }
- timeout { fail "(timeout) print value of x || y || z (011) " }
- }
-
-
-gdb_test "set variable x=1" "" "set variable x=1"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x && y && z (111)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (111) " }
- timeout { fail "(timeout) print value of x && y && z (111) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (111)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (111)" }
- timeout { fail "(timeout) print value of x || y || z (111) " }
- }
-
-send_gdb "print !!x\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of !!x (1)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !!x (1)" }
- timeout { fail "(timeout) print value of !!x (1) " }
- }
-
-
-gdb_test "set variable z=0" "" "set variable z=0"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (110)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (110) " }
- timeout { fail "(timeout) print value of x && y && z (110) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (110)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (110)" }
- timeout { fail "(timeout) print value of x || y || z (110) " }
- }
-
-
-
-
-gdb_test "set variable y=0" "" "set variable y=0"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (100)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (100) " }
- timeout { fail "(timeout) print value of x && y && z (100) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (100)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (100)" }
- timeout { fail "(timeout) print value of x || y || z (100) " }
- }
-
-
-
-
-gdb_test "set variable z=1" "" "set variable z=1"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (101)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (101) " }
- timeout { fail "(timeout) print value of x && y && z (101) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (101)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (101)" }
- timeout { fail "(timeout) print value of x || y || z (101) " }
- }
-
-
-gdb_test "set variable x=0" "" "set variable x=0"
-
-send_gdb "print x && y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x && y && z (001)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x && y && z (001) " }
- timeout { fail "(timeout) print value of x && y && z (001) " }
- }
-
-send_gdb "print x || y || z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y || z (001)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y || z (001)" }
- timeout { fail "(timeout) print value of x || y || z (001) " }
- }
-
-
-
-
-# test precedence of &&, || ,!
-
-
-send_gdb "print !x && y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of !x && y (00)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !x && y (00)" }
- timeout { fail "(timeout) print value of !x && y (00) " }
- }
-
-
-gdb_test "set variable x=1" "" "set variable x=1"
-
-
-send_gdb "print !x && y\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of !x && y (10)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !x && y (10)" }
- timeout { fail "(timeout) print value of !x && y (10) " }
- }
-
-
-
-
-gdb_test "set variable y=1" "" "set variable y=1"
-
-send_gdb "print !x || y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of !x || y (11)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !x || y (11)" }
- timeout { fail "(timeout) print value of !x || y (11) " }
- }
-
-
-gdb_test "set variable x=0" "" "set variable x=0"
-
-
-send_gdb "print !x || y\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of !x || y (01)"
- }
- -re ".*$gdb_prompt $" { fail "print value of !x || y (01)" }
- timeout { fail "(timeout) print value of !x || y (01) " }
- }
-
-
-
-gdb_test "set variable x=1" "" "set variable x=1"
-gdb_test "set variable z=0" "" "set variable z=0"
-
-send_gdb "print x || y && z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y && z (110)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y && z (110)" }
- timeout { fail "(timeout) print value of x || y && z (110) " }
- }
-
-
-gdb_test "set variable y=0" "" "set variable y=0"
-
-
-send_gdb "print x || y && z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || y && z (100)"
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y && z (100)" }
- timeout { fail "(timeout) print value of x || y && z (100) " }
- }
-
-
-
-gdb_test "set variable x=0" "" "set variable x=0"
-
-send_gdb "print x || !y && z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
-
- gdb_test "set variable x=1" "" "set variable x=1"
- send_gdb "print x || !y && z\n"
- gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x || !y && z "
- }
- -re ".*$gdb_prompt $" { fail "print value of x || !y && z" }
- timeout { fail "(timeout) print value of x || !y && z " }
- }
- }
- -re ".*$gdb_prompt $" { fail "print value of x || y && z " }
- timeout { fail "(timeout) print value of x || y && z " }
- }
-
-
-
-
-
-gdb_test "set variable x=1" "" "set variable x=1"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable w=3" "" "set variable w=3"
-gdb_test "set variable z=3" "" "set variable z=3"
-
-
-send_gdb "print x > y || w == z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x > y || w == z"
- }
- -re ".*$gdb_prompt $" { fail "print value of x > y || w == z" }
- timeout { fail "(timeout) print value of x > y || w == z " }
- }
-
-
-gdb_test "set variable x=1" "" "set variable x=1"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable w=1" "" "set variable w=1"
-gdb_test "set variable z=3" "" "set variable z=3"
-
-
-send_gdb "print x >= y && w != z\n"
-gdb_expect {
- -re ".*$false.*$gdb_prompt $" {
- pass "print value of x >= y || w != z"
- }
- -re ".*$gdb_prompt $" { fail "print value of x >= y || w != z" }
- timeout { fail "(timeout) print value of x >= y || w != z " }
- }
-
-
-
-gdb_test "set variable x=2" "" "set variable x=2"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable w=2" "" "set variable w=2"
-gdb_test "set variable z=3" "" "set variable z=3"
-
-
-send_gdb "print ! x > y || w + z\n"
-gdb_expect {
- -re ".*$true.*$gdb_prompt $" {
- pass "print value of x > y || w != z"
- }
- -re ".*$gdb_prompt $" { fail "print value of x > y || w != z" }
- timeout { fail "(timeout) print value of x > y || w != z " }
- }
-
-
-
-
-
-
-
-
-
+proc evaluate { vars ops } {
+ for {set vari 0} {$vari < [llength $vars]} {incr vari} {
+ set var [lindex $vars $vari]
+ for {set opi 0} {$opi < [llength $ops]} {incr opi} {
+ set op [lindex [lindex $ops $opi] 0]
+ set val [lindex [lindex $ops $opi] [expr $vari + 1]]
+ gdb_test "print $var, $op" " = $val" "evaluate $op; variables $var; expecting $val"
+ }
+ }
+}
+# Unary
+evaluate {
+ {x = 0} {x = 1}
+} {
+ { {x} 0 1 }
+ { {!x} 1 0 }
+ { {!!x} 0 1 }
+}
+# Binary (with unary)
+
+evaluate {
+ {x = 0, y = 0} {x = 0, y = 1} {x = 1, y = 0} {x = 1, y = 1}
+} {
+ { {x && y} 0 0 0 1 }
+ { {!x && y} 0 1 0 0 }
+ { {x && !y} 0 0 1 0 }
+ { {!x && !y} 1 0 0 0 }
+
+ { {x || y} 0 1 1 1 }
+ { {!x || y} 1 1 0 1 }
+ { {x || !y} 1 0 1 1 }
+ { {!x || !y} 1 1 1 0 }
+
+ { {x < y} 0 1 0 0 }
+ { {x <= y} 1 1 0 1 }
+ { {x == y} 1 0 0 1 }
+ { {x != y} 0 1 1 0 }
+ { {x >= y} 1 0 1 1 }
+ { {x > y} 0 0 1 0 }
+}
+# Full table of &&, || combinations, followed by random mix of unary ops
+evaluate {
+ {x = 0, y = 0, z = 0} {x = 0, y = 0, z = 1} {x = 0, y = 1, z = 0} {x = 0, y = 1, z = 1}
+ {x = 1, y = 0, z = 0} {x = 1, y = 0, z = 1} {x = 1, y = 1, z = 0} {x = 1, y = 1, z = 1}
+} {
+ { {x && y && z} 0 0 0 0 0 0 0 1 }
+ { {x || y && z} 0 0 0 1 1 1 1 1 }
+ { {x && y || z} 0 1 0 1 0 1 1 1 }
+ { {x || y || z} 0 1 1 1 1 1 1 1 }
+ { {x || !y && z} 0 1 0 0 1 1 1 1 }
+ { {!x || y && z} 1 1 1 1 0 0 0 1 }
+ { {!x || y && !z} 1 1 1 1 0 0 1 0 }
+}
+# More complex operations
+evaluate {
+ {x = 1, y = 2, w = 3, z = 3}
+ {x = 1, y = 2, w = 1, z = 3}
+ {x = 2, y = 2, w = 2, z = 3}
+} {
+ { {x > y || w == z} 1 0 0 }
+ { {x >= y && w != z} 0 0 1 }
+ { {! x > y || w + z} 1 1 1 }
+}
diff --git a/gdb/testsuite/gdb.base/long_long.c b/gdb/testsuite/gdb.base/long_long.c
index 04fba92897e..a55cb248227 100644
--- a/gdb/testsuite/gdb.base/long_long.c
+++ b/gdb/testsuite/gdb.base/long_long.c
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 1999, 2004,
+ 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.
+ */
+
/* Test long long expression; test printing in general.
*
* /CLO/BUILD_ENV/Exports/cc -g +e -o long_long long_long.c
@@ -7,55 +27,76 @@
* cc +e +DA2.0 -g -o long_long long_long.c
*/
-#ifdef PROTOTYPES
-long long callee(long long i)
-#else
-long long callee( i )
-long long i;
-#endif
-{
- register long long result;
+#include <string.h>
- result = 0x12345678;
- result = result << i;
- result += 0x9abcdef0;
+enum { MAX_BYTES = 16 };
- return result;
+void
+pack (unsigned char b[MAX_BYTES], int size, int nr)
+{
+ static long long val[] = { 0x123456789abcdefLL, 01234567123456701234567LL, 12345678901234567890ULL};
+ volatile static int e = 1;
+ int i;
+ for (i = 0; i < nr; i++)
+ {
+ int offset;
+ if (*(char *)&e)
+ /* Little endian. */
+ offset = sizeof (long long) - size;
+ else
+ /* Big endian endian. */
+ offset = 0;
+ memcpy (b + size * i, (char *) val + sizeof (long long) * i + offset, size);
+ }
}
+unsigned char b[MAX_BYTES];
+unsigned char h[MAX_BYTES];
+unsigned char w[MAX_BYTES];
+unsigned char g[MAX_BYTES];
+
+unsigned char c[MAX_BYTES];
+unsigned char s[MAX_BYTES];
+unsigned char i[MAX_BYTES];
+unsigned char l[MAX_BYTES];
+unsigned char ll[MAX_BYTES];
+
int known_types()
{
- long long bin = 0, oct = 0, dec = 0, hex = 0;
+ /* A union is used here as, hopefully it has well defined packing
+ rules. */
+ struct {
+ long long bin, oct, dec, hex;
+ } val;
+ memset (&val, 0, sizeof val);
- /* Known values, filling the full 64 bits.
- */
- bin = 0x123456789abcdefLL; /* 64 bits = 16 hex digits */
- oct = 01234567123456701234567LL; /* = 21+ octal digits */
- dec = 12345678901234567890ULL; /* = 19+ decimal digits */
+ /* Known values, filling the full 64 bits. */
+ val.bin = 0x123456789abcdefLL; /* 64 bits = 16 hex digits */
+ val.oct = 01234567123456701234567LL; /* = 21+ octal digits */
+ val.dec = 12345678901234567890ULL; /* = 19+ decimal digits */
- /* Stop here and look!
- */
- hex = bin - dec | oct;
+ /* Stop here and look! */
+ val.hex = val.bin - val.dec | val.oct;
- return 0;
+ return 0;
}
int main() {
- register long long x, y;
- register long long i;
-
- x = (long long) 0xfedcba9876543210LL;
- y = x++;
- x +=y;
- i = 11;
- x = callee( i );
- y += x;
+ /* Pack Byte, Half, Word and Giant arrays with byte-orderd values.
+ That way "(gdb) x" gives the same output on different
+ architectures. */
+ pack (b, 1, 2);
+ pack (h, 2, 2);
+ pack (w, 4, 2);
+ pack (g, 8, 2);
+ pack (c, sizeof (char), 2);
+ pack (s, sizeof (short), 2);
+ pack (i, sizeof (int), 2);
+ pack (l, sizeof (long), 2);
+ pack (ll, sizeof (long long), 2);
known_types();
return 0;
}
-
-
-
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 11308dbac61..b36b30b32b2 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -1,5 +1,7 @@
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -15,10 +17,6 @@
# 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
-
-
# long_long.exp Test printing of 64-bit things in 32-bit gdb.
# Also test differnet kinds of formats.
#
@@ -66,94 +64,141 @@ if { ![runto known_types] } then {
set target_bigendian_p 1
send_gdb "show endian\n"
gdb_expect {
- -re ".*little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
- -re ".*big endian.*$gdb_prompt $" { }
- -re ".*$gdb_prompt $" {
+ -re "little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
+ -re "big endian.*$gdb_prompt $" { }
+ -re "$gdb_prompt $" {
fail "getting target endian"
}
default { fail "(timeout) getting target endian" }
}
-# Detect targets with 2-byte integers. Yes, it's not general to assume
-# that all others have 4-byte ints, but don't worry about it until one
-# actually exists.
+# Detect the size of the target's basic types.
-set sizeof_int 4
-send_gdb "print sizeof(int)\n"
-gdb_expect {
- -re ".* = 2.*$gdb_prompt $" { set sizeof_int 2 }
- -re ".*$gdb_prompt $" { }
- default { }
+proc get_valueof { fmt exp default } {
+ global gdb_prompt
+ send_gdb "print${fmt} ${exp}\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
+ set val $expect_out(1,string)
+ pass "get value of ${exp} ($val)"
+ }
+ timeout {
+ set size ${default}
+ fail "get value of ${exp} (timeout)"
+ }
+ }
+ return ${val}
}
-# Detect targets with 2-byte pointers. Assume all others use 4-bytes.
-set sizeof_ptr 4
-send_gdb "print sizeof(void*)\n"
-gdb_expect {
- -re ".* = 2.*$gdb_prompt $" { set sizeof_ptr 2 }
- -re ".*$gdb_prompt $" { }
- default { }
+proc get_sizeof { type default } {
+ return [get_valueof "/d" "sizeof (${type})" $default]
}
-# Detect targets with 4-byte shorts. Assume all others use 2-bytes.
+set sizeof_char [get_sizeof "char" 1]
+set sizeof_short [get_sizeof "short" 2]
+set sizeof_int [get_sizeof "int" 4]
+set sizeof_long [get_sizeof "long" 4]
+set sizeof_long_long [get_sizeof "long long" 8]
+set sizeof_data_ptr [get_sizeof "void *" 4]
+set sizeof_double [get_sizeof "double" 8]
+set sizeof_long_double [get_sizeof "long double" 8]
+
+# Tests to handle ISA/ABI variants
+
+proc pat2 { n pats } {
+ set i 0
+ while { $n > 1 } {
+ set n [expr $n / 2]
+ incr i
+ }
+ return [lindex $pats $i]
+}
-set sizeof_short 2
-send_gdb "print sizeof(short)\n"
-gdb_expect {
- -re ".* = 4.*$gdb_prompt $" { set sizeof_short 4 }
- -re ".*$gdb_prompt $" { }
- default { }
+proc gdb_test_xxx { test pat name } {
+ if { $pat == "" } {
+ setup_kfail *-*-* gdb/1672
+ gdb_test $test "xxx" $name
+ } else {
+ gdb_test $test $pat $name
+ }
}
-# Detect targets with 4-byte doubles.
+proc gdb_test_bi { test be le } {
+ global target_bigendian_p
-set sizeof_double 8
-send_gdb "print sizeof(double)\n"
-gdb_expect {
- -re ".* = 4.*$gdb_prompt $" { set sizeof_double 4 }
- -re ".*$gdb_prompt $" { }
- default { }
+ if { $target_bigendian_p } {
+ gdb_test_xxx $test $be $test
+ } else {
+ gdb_test_xxx $test $le $test
+ }
}
-set sizeof_long_double 8
-send_gdb "print sizeof(long double)\n"
-gdb_expect {
- -re ".* = 4.*$gdb_prompt $" { set sizeof_long_double 4 }
- -re ".*$gdb_prompt $" { }
- default { }
+proc gdb_test_ptr { test args } {
+ global sizeof_data_ptr
+
+ gdb_test_xxx $test [pat2 $sizeof_data_ptr $args] $test
+}
+
+proc gdb_test_xptr { examine args } {
+ global sizeof_data_ptr
+ set x [pat2 $sizeof_data_ptr $args]
+ # X is of the form { VARIABLE PATTERN }
+ gdb_test_xxx "$examine [lindex $x 0]" [lindex $x 1] "$examine"
+}
+
+proc gdb_test_char { test args } {
+ global sizeof_char
+ gdb_test_xxx $test [pat2 $sizeof_char $args] $test
+}
+
+proc gdb_test_short { test args } {
+ global sizeof_short
+ gdb_test_xxx $test [pat2 $sizeof_short $args] $test
}
-gdb_test "n 4" ".*38.*" "get to known place"
+proc gdb_test_int { test args } {
+ global sizeof_int
+ gdb_test_xxx $test [pat2 $sizeof_int $args] $test
+}
+
+proc gdb_test_long { test args } {
+ global sizeof_long
+ gdb_test_xxx $test [pat2 $sizeof_long $args] $test
+}
+
+proc gdb_test_long_long { test args } {
+ global sizeof_long_long
+ gdb_test_xxx $test [pat2 $sizeof_long_long $args] $test
+}
+
+gdb_breakpoint [gdb_get_line_number "Stop here and look"]
+gdb_continue_to_breakpoint "Stop here and look"
# Check the hack for long long prints.
#
-gdb_test "p/x hex" ".*0x0*0.*" "hex print p/x"
-gdb_test "p/x dec" ".*0xab54a98ceb1f0ad2.*" "decimal print p/x"
+gdb_test "p/x val.hex" "0x0*0" "hex print p/x"
+gdb_test "p/x val.dec" "0xab54a98ceb1f0ad2" "decimal print p/x"
# see if 'p/<code>' is handled same as 'p /<code>'
#
-gdb_test "p /x dec" ".*0xab54a98ceb1f0ad2.*" "default print dec"
-gdb_test "p /x bin" ".*0x0*123456789abcdef.*" "default print bin"
-gdb_test "p /x oct" ".*0xa72ee53977053977.*" "default print oct"
-gdb_test "p hex" ".*= 0*x*0*0.*" "default print hex"
+gdb_test "p /x val.dec" "0xab54a98ceb1f0ad2" "default print val.dec"
+gdb_test "p /x val.bin" "0x123456789abcdef" "default print val.bin"
+gdb_test "p /x val.oct" "0xa72ee53977053977" "default print val.oct"
+gdb_test "p val.hex" "= 0" "default print hex"
-gdb_test "p/u dec" ".*12345678901234567890.*" "decimal print p/u"
-gdb_test "p/t bin" ".*0*100100011010001010110011110001001101010111100110111101111.*" "binary print"
-gdb_test "p/o oct" ".*01234567123456701234567.*" "octal print"
-gdb_test "p /d bin" ".*81985529216486895.*" "print +ve long long"
-gdb_test "p/d dec" ".*-6101065172474983726.*" "decimal print p/d"
+gdb_test "p/u val.dec" "12345678901234567890" "decimal print p/u"
+gdb_test "p/t val.bin" "100100011010001010110011110001001101010111100110111101111" "binary print"
+gdb_test "p/o val.oct" "01234567123456701234567" "octal print"
+gdb_test "p /d val.bin" "81985529216486895" "print +ve long long"
+gdb_test "p/d val.dec" "-6101065172474983726" "decimal print p/d"
# Try all the combinations to bump up coverage.
#
-gdb_test "p/d oct" ".*-6399925985474168457.*"
-gdb_test "p/u oct" ".*12046818088235383159.*"
-gdb_test "p/o oct" ".*.*"
-gdb_test "p/t oct" ".*1010011100101110111001010011100101110111000001010011100101110111.*"
-if { $sizeof_ptr == 2 } {
- gdb_test "p/a oct" ".*0x.*3977.*"
-} else {
- gdb_test "p/a oct" ".*0x.*77053977.*"
-}
-gdb_test "p/c oct" ".*'w'.*"
+gdb_test "p/d val.oct" "-6399925985474168457"
+gdb_test "p/u val.oct" "12046818088235383159"
+gdb_test "p/o val.oct" ""
+gdb_test "p/t val.oct" "1010011100101110111001010011100101110111000001010011100101110111"
+gdb_test_ptr "p/a val.oct" "" "" "0x77053977" "0xa72ee53977053977"
+gdb_test "p/c val.oct" "'w'"
if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
# ARM floating point numbers are not strictly little endian or big endian,
@@ -164,149 +209,130 @@ if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
[istarget "xscale*-*-*"] || \
[istarget "strongarm*-*-*"] } then {
# assume the long long represents a floating point double in ARM format
- gdb_test "p/f oct" ".*2.1386676354387559e\\+265.*"
+ gdb_test "p/f val.oct" "2.1386676354387559e\\+265"
} else {
# assume the long long represents a floating point double in little
# endian format
- gdb_test "p/f oct" ".*-5.9822653797615723e-120.*"
+ gdb_test "p/f val.oct" "-5.9822653797615723e-120"
}
-
} else {
-
- gdb_test "p/f oct" ".*-2.42716126e-15.*"
-
+ gdb_test "p/f val.oct" "-2.42716126e-15"
}
-if { $target_bigendian_p } {
-
- if { $sizeof_int == 4 } {
-
- gdb_test "p/d *(int *)&oct" ".*-1490098887.*"
- gdb_test "p/u *(int *)&oct" ".*2804868409.*"
- gdb_test "p/o *(int *)&oct" ".*024713562471.*"
- gdb_test "p/t *(int *)&oct" ".*10100111001011101110010100111001.*"
-
- if { $sizeof_ptr == 2 } {
- gdb_test "p/a *(int *)&oct" ".*0xe539.*"
- } else {
- gdb_test "p/a *(int *)&oct" ".*0xf*a72ee539.*"
- }
-
- gdb_test "p/c *(int *)&oct" ".*57 '9'.*"
- gdb_test "p/f *(int *)&oct" ".*-2.42716126e-15.*"
-
- } else {
-
- gdb_test "p/d *(int *)&oct" ".*-22738.*"
- gdb_test "p/u *(int *)&oct" ".*42798.*"
- gdb_test "p/o *(int *)&oct" ".*0123456.*"
- gdb_test "p/t *(int *)&oct" ".*1010011100101110.*"
-
- if { $sizeof_ptr == 2 } {
- gdb_test "p/a *(int *)&oct" ".*0xa72e.*"
- } else {
- gdb_test "p/a *(int *)&oct" ".*0xffffa72e.*"
- }
- gdb_test "p/c *(int *)&oct" ".*46 '.'.*"
- gdb_test "p/f *(int *)&oct" ".*-22738.*"
-
- }
-
- if { $sizeof_short == 2 } {
- gdb_test "p/d *(short *)&oct" ".*-22738.*"
- gdb_test "p/u *(short *)&oct" ".*42798.*"
- gdb_test "p/o *(short *)&oct" ".*0123456.*"
- gdb_test "p/t *(short *)&oct" ".*1010011100101110.*"
- if { $sizeof_ptr == 2 } {
- gdb_test "p/a *(short *)&oct" ".*0xa72e.*"
- } else {
- gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
- }
- gdb_test "p/c *(short *)&oct" ".* 46 '.'.*"
- gdb_test "p/f *(short *)&oct" ".*-22738.*"
- } else {
- gdb_test "p/d *(short *)&oct" ".*-1490098887.*"
- gdb_test "p/u *(short *)&oct" ".*2804868409.*"
- gdb_test "p/o *(short *)&oct" ".*024713562471.*"
- gdb_test "p/t *(short *)&oct" ".*10100111001011101110010100111001.*"
- gdb_test "p/a *(short *)&oct" ".*0xf*a72ee539.*"
- gdb_test "p/c *(short *)&oct" ".* 57 '9'.*"
- gdb_test "p/f *(short *)&oct" ".*-2.42716126e-15.*"
- }
-
- gdb_test "x/x &oct" ".*0xa72ee539.*"
- gdb_test "x/d &oct" ".*.-1490098887*"
- gdb_test "x/u &oct" ".*2804868409.*"
- gdb_test "x/o &oct" ".*024713562471.*"
- gdb_test "x/t &oct" ".*10100111001011101110010100111001.*"
- if { $sizeof_ptr == 2 } {
- gdb_test "x/a &oct" ".*0xa72e.*"
- } else {
- gdb_test "x/a &oct" ".*0xa72ee539.*"
- }
- gdb_test "x/c &oct" ".*-89 .*"
- # FIXME GDB's output is correct, but this longer match fails.
- # gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
- if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
- gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
- } else {
- gdb_test "x/f &oct" ".*-2.42716126e-15.*"
- }
-
- # FIXME Fill in the results for all the following tests. (But be careful
- # about looking at locations with unspecified contents!)
-
- gdb_test "x/2x &oct" ".*0xa72ee53977053977.*"
- gdb_test "x/2d &oct" ".*-6399925985474168457.*"
- gdb_test "x/2u &oct" ".*.*"
- gdb_test "x/2o &oct" ".*.*"
- gdb_test "x/2t &oct" ".*.*"
- gdb_test "x/2a &oct" ".*.*"
- gdb_test "x/2c &oct" ".*.*"
- gdb_test "x/2f &oct" ".*.*"
-
- gdb_test "x/2bx &oct" ".*.*"
- gdb_test "x/2bd &oct" ".*.*"
- gdb_test "x/2bu &oct" ".*.*"
- gdb_test "x/2bo &oct" ".*.*"
- gdb_test "x/2bt &oct" ".*.*"
- gdb_test "x/2ba &oct" ".*.*"
- gdb_test "x/2bc &oct" ".*.*"
- gdb_test "x/2bf &oct" ".*.*"
-
- gdb_test "x/2hx &oct" ".*.*"
- gdb_test "x/2hd &oct" ".*.*"
- gdb_test "x/2hu &oct" ".*.*"
- gdb_test "x/2ho &oct" ".*.*"
- gdb_test "x/2ht &oct" ".*.*"
- gdb_test "x/2ha &oct" ".*.*"
- gdb_test "x/2hc &oct" ".*.*"
- gdb_test "x/2hf &oct" ".*.*"
-
- gdb_test "x/2wx &oct" ".*.*"
- gdb_test "x/2wd &oct" ".*.*"
- gdb_test "x/2wu &oct" ".*.*"
- gdb_test "x/2wo &oct" ".*.*"
- gdb_test "x/2wt &oct" ".*.*"
- gdb_test "x/2wa &oct" ".*.*"
- gdb_test "x/2wc &oct" ".*.*"
- gdb_test "x/2wf &oct" ".*.*"
-
- gdb_test "x/2gx &oct" ".*.*"
- gdb_test "x/2gd &oct" ".*.*"
- gdb_test "x/2gu &oct" ".*.*"
- gdb_test "x/2go &oct" ".*.*"
- gdb_test "x/2gt &oct" ".*.*"
- gdb_test "x/2ga &oct" ".*.*"
- gdb_test "x/2gc &oct" ".*.*"
- gdb_test "x/2gf &oct" ".*.*"
-
+gdb_test_char "p/x *(char *)c" "0x1"
+gdb_test_char "p/d *(char *)c" "1"
+gdb_test_char "p/u *(char *)c" "1"
+gdb_test_char "p/o *(char *)c" "01"
+gdb_test_char "p/t *(char *)c" "1"
+gdb_test_char "p/a *(char *)c" "0x1"
+gdb_test_char "p/f *(char *)c" "1"
+gdb_test_char "p/c *(char *)c" "1 '.001'"
+
+gdb_test_short "p/x *(short *)s" "" "0x123" ""
+gdb_test_short "p/d *(short *)s" "" "291" ""
+gdb_test_short "p/u *(short *)s" "" "291" ""
+gdb_test_short "p/o *(short *)s" "" "0443" ""
+gdb_test_short "p/t *(short *)s" "" "100100011" ""
+gdb_test_short "p/a *(short *)s" "" "0x123" ""
+gdb_test_short "p/f *(short *)s" "" "291" ""
+gdb_test_short "p/c *(short *)s" "" "35 '.'" ""
+
+gdb_test_int "p/x *(int *)i" "" "0x123" "0x1234567" ""
+gdb_test_int "p/d *(int *)i" "" "291" "19088743" ""
+gdb_test_int "p/u *(int *)i" "" "291" "19088743" ""
+gdb_test_int "p/o *(int *)i" "" "0443" "0110642547" ""
+gdb_test_int "p/t *(int *)i" "" "100100011" "1001000110100010101100111" ""
+gdb_test_int "p/a *(int *)i" "" "" "0x1234567" ""
+gdb_test_int "p/f *(int *)i" "" "291" "2.99881655e-38" ""
+gdb_test_int "p/c *(int *)i" "" "35 '.'" "103 'g'" ""
+
+gdb_test_long "p/x *(long *)l" "" "0x123" "0x1234567" "0x123456789abcdef"
+gdb_test_long "p/d *(long *)l" "" "291" "19088743" "81985529216486895"
+gdb_test_long "p/u *(long *)l" "" "291" "19088743" "81985529216486895"
+gdb_test_long "p/o *(long *)l" "" "0443" "0110642547" "04432126361152746757"
+gdb_test_long "p/t *(long *)l" "" "100100011" "1001000110100010101100111" "100100011010001010110011110001001101010111100110111101111"
+gdb_test_ptr "p/a *(long *)l" "" "" "0x1234567" "0x123456789abcdef"
+gdb_test_long "p/f *(long *)l" "" "291" "2.99881655e-38" "3.5127005640885037e-303"
+gdb_test_long "p/c *(long *)l" "" "35 '.'" "103 'g'" "-17 '.*'"
+
+gdb_test_long_long "p/x *(long long *)ll" "" "" "" "0x123456789abcdef"
+gdb_test_long_long "p/d *(long long *)ll" "" "" "" "81985529216486895"
+gdb_test_long_long "p/u *(long long *)ll" "" "" "" "81985529216486895"
+gdb_test_long_long "p/o *(long long *)ll" "" "" "" "04432126361152746757"
+gdb_test_long_long "p/t *(long long *)ll" "" "" "" "100100011010001010110011110001001101010111100110111101111"
+gdb_test_ptr "p/a *(long long *)ll" "" "" "0x89abcdef" "0x123456789abcdef"
+gdb_test_long_long "p/f *(long long *)ll" "" "" "" "3.5127005640885037e-303"
+gdb_test_long_long "p/c *(long long *)ll" "" "" "" "-17 '.*'"
+
+# Implict Word size (except for a, c, and f)
+
+gdb_test "x/w w" "" "set examine size to w"
+gdb_test "x/x w" "0x01234567"
+gdb_test "x/d w" "19088743"
+gdb_test "x/u w" "19088743"
+gdb_test "x/o w" "0110642547"
+gdb_test "x/t w" "00000001001000110100010101100111"
+gdb_test_xptr "x/a" { b "" } { h "" } { w "0x1234567" } { g "0x123456789abcdef" }
+gdb_test "x/c b" "1 '.001'"
+if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
+ gdb_test "x/f &val.oct" "-5.9822653797615723e-120"
} else {
+ gdb_test "x/f &val.oct" "-2.42716126e-15"
+}
- # FIXME Add little-endian versions of these tests, or define a
- # gdb_test_bi with two strings to match on.
+# Implict Giant size (except for a, c, and f)
+gdb_test "x/g g" "" "set examine size to g"
+gdb_test "x/2x g" "0x0123456789abcdef.*0xa72ee53977053977"
+gdb_test "x/2d g" "81985529216486895.*-6399925985474168457"
+gdb_test "x/2u g" "81985529216486895.*12046818088235383159"
+gdb_test "x/2o g" "04432126361152746757.*01234567123456701234567"
+gdb_test "x/2t g" "0000000100100011010001010110011110001001101010111100110111101111.*1010011100101110111001010011100101110111000001010011100101110111"
+gdb_test_xptr "x/2a" { b "" } { h "" } { w "0x1234567.*0xa72ee539" } { g "0x123456789abcdef.*0xa72ee53977053977" }
+gdb_test "x/2c b" "1 '.001'.*-89 '.'"
+if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
+ gdb_test "x/2f &val.oct" "-5.9822653797615723e-120.*-5.9041889495880968e-100"
+} else {
+ gdb_test "x/2f &val.oct" "-2.42716126e-15"
}
+# Explicit sizes, and two memory locations ...
+
+gdb_test "x/2bx b" "0x01.*0xa7"
+gdb_test "x/2bd b" "1.*-89"
+gdb_test "x/2bu b" "1.*167"
+gdb_test "x/2bo b" "01.*0247"
+gdb_test "x/2bt b" "00000001.*10100111"
+gdb_test_ptr "x/2ba b" "" "" "0x1.*0xffffffa7" "0x1.*0xffffffffffffffa7"
+gdb_test "x/2bc b" "1 '.001'.*-89 '.'"
+gdb_test "x/2bf b" "1.*-89"
+
+gdb_test "x/2hx h" "0x0123.*0xa72e"
+gdb_test "x/2hd h" "291.*-22738"
+gdb_test "x/2hu h" "291.*42798"
+gdb_test "x/2ho h" "0443.*0123456"
+gdb_test "x/2ht h" "0000000100100011.*1010011100101110"
+gdb_test_ptr "x/2ha h" "" "" "0x123.*0xffffa72e" "0x123.*0xffffffffffffa72e"
+gdb_test "x/2hc h" "35 '.'.*46 '.'"
+gdb_test "x/2hf h" "291.*-22738"
+
+gdb_test "x/2wx w" "0x01234567.*0xa72ee539"
+gdb_test "x/2wd w" "19088743.*-1490098887"
+gdb_test "x/2wu w" "19088743.*2804868409"
+gdb_test "x/2wo w" "0110642547.*024713562471"
+gdb_test "x/2wt w" "00000001001000110100010101100111.*10100111001011101110010100111001"
+gdb_test_ptr "x/2wa w" "" "" "0x1234567.*0xa72ee539" "0x1234567.*0xffffffffa72ee539"
+gdb_test "x/2wc w" "103 'g'.*57 '9'"
+gdb_test "x/2wf w" "2.99881655e-38.*-2.42716126e-15"
+
+gdb_test "x/2gx g" "0x0123456789abcdef.*0xa72ee53977053977"
+gdb_test "x/2gd g" "81985529216486895.*-6399925985474168457"
+gdb_test "x/2gu g" "81985529216486895.*12046818088235383159"
+gdb_test "x/2go g" "04432126361152746757.*01234567123456701234567"
+gdb_test "x/2gt g" "0000000100100011010001010110011110001001101010111100110111101111.*1010011100101110111001010011100101110111000001010011100101110111"
+gdb_test_ptr "x/2ga g" "" "" "0x89abcdef.*0x77053977" "0x123456789abcdef.*0xa72ee53977053977"
+gdb_test "x/2gc g" "-17 '.'.*119 'w'"
+gdb_test "x/2gf g" "3.5127005640885037e-303.*-5.9822653797615723e-120"
+
gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
index 315e544ee74..9bc08020e89 100644
--- a/gdb/testsuite/gdb.base/pending.exp
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -207,6 +207,31 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*" \
"multiple pending breakpoints"
+
+#
+# Try a pending break for a line in a source file with ignore count:
+#
+
+gdb_test_multiple "break pendshr.c:27" "Set pending breakpoint 3" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*pendshr.c:27.*pending." \
+ "Set pending breakpoint 3"
+ }
+}
+
+gdb_test {ignore $bpnum 2} "Will ignore next 2 crossings of breakpoint .*" \
+ "set ignore count on pending breakpoint 3"
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
+\[\t \]+stop only if k == 1.*
+\[\t \]+print k.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:27.*ignore next 2 hits.*" \
+"multiple pending breakpoints 2"
+
#
# Run to main which should resolve a pending breakpoint
#
@@ -239,6 +264,19 @@ gdb_test "continue" \
\[$\]1 = 1." \
"continue to resolved breakpoint 1"
+#
+# Disable the other two breakpoints, and continue to the one with
+# the ignore count. Make sure you hit it the third time, x should
+# be 3 then.
+#
+
+gdb_test "disable 7" "" "Disable other breakpoints"
+gdb_test "disable 5" "" "Disable other breakpoints"
+
+gdb_test "continue" \
+ {.*Breakpoint.*pendfunc1.*\(x=3\) at.*pendshr.c:27.*printf.*;} \
+"continue to resolved breakpoint 3"
+
delete_breakpoints
gdb_breakpoint "main"
@@ -259,6 +297,7 @@ gdb_test_multiple "break imaginary" "set imaginary pending breakpoint" {
#
rerun_to_main
+
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
diff --git a/gdb/testsuite/gdb.base/radix.exp b/gdb/testsuite/gdb.base/radix.exp
index 057751f9aab..7ca03c8a1ea 100644
--- a/gdb/testsuite/gdb.base/radix.exp
+++ b/gdb/testsuite/gdb.base/radix.exp
@@ -1,4 +1,5 @@
-# Copyright 1993, 1997 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+# Copyright 1993, 1997, 2004 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
@@ -14,10 +15,8 @@
# 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 Fred Fish. (fnf@cygnus.com)
+# And rewritten by Michael Chastain (mec.gnu@mindspring.com)
if $tracelevel then {
strace $tracelevel
@@ -26,176 +25,133 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-proc test_input_radix_2 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #1"
- gdb_test "set input-radix 2" \
- "Input radix now set to decimal 2, hex 2, octal 2."
- gdb_test "show radix" \
- "Input radix set to decimal 2, hex 2, octal 2.\r\nOutput radix set to decimal 10, hex a, octal 12." \
- "show radix #1"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "2"
- gdb_test "p -101" "-5"
- gdb_test "p 101" "5"
- gdb_test "p 10101" "21"
- gdb_test "p 4" "Invalid number \"4\"\\."
- gdb_test "p -2" "Invalid number \"2\"\\."
-}
+# Start with a fresh gdb.
-# Test input radix 3 (an non-typical radix)
+gdb_exit
+gdb_start
-proc test_input_radix_3 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #2"
- gdb_test "set input-radix 3" \
- "Input radix now set to decimal 3, hex 3, octal 3."
- gdb_test "show radix" \
- "Input radix set to decimal 3, hex 3, octal 3.\r\nOutput radix set to decimal 10, hex a, octal 12." \
- "show radix #2"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "3"
- gdb_test "p 0" "0"
- gdb_test "p 1" "1"
- gdb_test "p 2" "2"
- gdb_test "p 10" "3"
- gdb_test "p 20" "6"
- gdb_test "p 100" "9"
- gdb_test "p -100" "-9"
- gdb_test "p 3" "Invalid number \"3\"."
- gdb_test "p 30" "Invalid number \"30\"."
-}
+# Test input radices.
-proc test_input_radix_8 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #3"
- gdb_test "set input-radix 8" \
- "Input radix now set to decimal 8, hex 8, octal 10."
- gdb_test "show radix" \
- "Input radix set to decimal 8, hex 8, octal 10.\r\nOutput radix set to decimal 10, hex a, octal 12." \
- "set radix #3"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "8"
- gdb_test "p 20" "16"
- gdb_test "p -20" "-16"
- gdb_test "p 100" "64"
- gdb_test "p 8" "Invalid number \"8\"."
- gdb_test "p -9" "Invalid number \"9\"."
+proc test_one_input { iradix input output } {
+ gdb_test "print $input" "$output" \
+ "print $input; expect $output; input radix $iradix"
}
-proc test_input_radix_10 {} {
+proc test_input_radix { iradix iradixhex iradixoctal } {
+ # set input-radix = $iradix, output-radix = ten
gdb_test "set radix" \
"Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #4"
- gdb_test "set input-radix 10" \
- "Input radix now set to decimal 10, hex a, octal 12."
- gdb_test "show radix" \
- "Input and output radices set to decimal 10, hex a, octal 12." \
- "show radix #4"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "10"
- gdb_test "p -12" "-12"
+ "initialize radix, input radix $iradix"
+ gdb_test "set input-radix $iradix" \
+ "Input radix now set to decimal $iradix, hex $iradixhex, octal $iradixoctal."
+ if { $iradix == 10 } then {
+ gdb_test "show radix" \
+ "Input and output radices set to decimal 10, hex a, octal 12." \
+ "show radix, input radix $iradix"
+ } else {
+ gdb_test "show radix" \
+ "Input radix set to decimal $iradix, hex $iradixhex, octal $iradixoctal.\r\nOutput radix set to decimal 10, hex a, octal 12." \
+ "show radix, input radix $iradix"
+ }
+
+ # test constants with specific bases that do not use $iradix
+ test_one_input $iradix "010" "8"
+ test_one_input $iradix "20." "20"
+ test_one_input $iradix "(int) 20." "20"
+ test_one_input $iradix "0xf" "15"
+
+ # test simple one-digit constants
+ test_one_input $iradix "0" "0"
+ test_one_input $iradix "1" "1"
+ test_one_input $iradix "-1" "-1"
+
+ # test simple two-digit constants
+ test_one_input $iradix "10" [expr $iradix]
+ test_one_input $iradix "11" [expr $iradix + 1]
+ test_one_input $iradix "-10" [expr 0 - $iradix]
+ test_one_input $iradix "-11" [expr 0 - $iradix - 1]
+
+ # test simple three-digit constants
+ test_one_input $iradix "100" [expr $iradix * $iradix]
+ test_one_input $iradix "101" [expr $iradix * $iradix + 1]
+ test_one_input $iradix "-100" [expr 0 - $iradix * $iradix]
+ test_one_input $iradix "-101" [expr 0 - $iradix * $iradix - 1]
+
+ # test a five-digit constant
+ test_one_input $iradix "10101" \
+ [expr $iradix * $iradix * $iradix * $iradix + $iradix * $iradix + 1]
}
-proc test_input_radix_16 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #5"
- gdb_test "set input-radix 16" \
- "Input radix now set to decimal 16, hex 10, octal 20."
- gdb_test "show radix" \
- "Input radix set to decimal 16, hex 10, octal 20.\r\nOutput radix set to decimal 10, hex a, octal 12." \
- "show radix #5"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "16"
- gdb_test "p 100" "256"
-}
+test_input_radix 2 "2" "2"
+ test_one_input 2 "4" "Invalid number \"4\"\\."
+ test_one_input 2 "-2" "Invalid number \"2\"\\."
-proc test_output_radix_8 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #6"
- gdb_test "set output-radix 8" \
- "Output radix now set to decimal 8, hex 8, octal 10."
- gdb_test "show radix" \
- "Input radix set to decimal 10, hex a, octal 12.\r\nOutput radix set to decimal 8, hex 8, octal 10." \
- "show radix #6"
- gdb_test "p 010" "010"
- # FIXME: If gdb can't handle float printing in different radices, it
- # should at least warn once the first time that is attempted.
- setup_xfail "*-*-*"
- gdb_test "p 20." "24" "Float printing when output radix is 8"
- gdb_test "p (int) 20." "24"
- gdb_test "p 0xf" "17"
- gdb_test "p 10" "12"
- gdb_test "p 100" "144"
-}
+test_input_radix 3 "3" "3"
+ test_one_input 3 "2" "2"
+ test_one_input 3 "20" "6"
+ test_one_input 3 "3" "Invalid number \"3\"\\."
+ test_one_input 2 "30" "Invalid number \"30\"\\."
-proc test_output_radix_10 {} {
- gdb_test "set radix" \
- "Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #7"
- gdb_test "set output-radix 10" \
- "Output radix now set to decimal 10, hex a, octal 12."
- gdb_test "show radix" \
- "Input and output radices set to decimal 10, hex a, octal 12." \
- "show radix #7"
- gdb_test "p 010" "8"
- gdb_test "p 20." "20"
- gdb_test "p (int) 20." "20"
- gdb_test "p 0xf" "15"
- gdb_test "p 10" "10"
- gdb_test "p 100" "100"
+test_input_radix 8 "8" "10"
+ test_one_input 8 "20" "16"
+ test_one_input 8 "-20" "-16"
+ test_one_input 8 "8" "Invalid number \"8\"."
+ test_one_input 8 "-9" "Invalid number \"9\"."
+
+test_input_radix 10 "a" "12"
+ test_one_input 10 "-12" "-12"
+
+test_input_radix 16 "10" "20"
+
+# Test output radices.
+
+proc test_one_output { oradix input output } {
+ gdb_test "print $input" "$output" \
+ "print $input; expect $output; output radix $oradix"
}
-proc test_output_radix_16 {} {
+proc test_output_radix { oradix oradixhex oradixoctal } {
+ # set input-radix = ten, output-radix = $oradix
gdb_test "set radix" \
"Input and output radices now set to decimal 10, hex a, octal 12." \
- "set radix #8"
- gdb_test "set output-radix 16" \
- "Output radix now set to decimal 16, hex 10, octal 20."
- gdb_test "show radix" \
- "Input radix set to decimal 10, hex a, octal 12.\r\nOutput radix set to decimal 16, hex 10, octal 20." \
- "show radix #8"
- gdb_test "p 010" "8"
- # FIXME: If gdb can't handle float printing in different radices, it
- # should at least warn once the first time that is attempted.
- setup_xfail "*-*-*"
- gdb_test "p 20." "14" "Float printing when output radix is 16"
- gdb_test "p (int) 20." "14"
- gdb_test "p 0xf" "f"
- gdb_test "p 10" "a"
- gdb_test "p 100" "64"
+ "initialize radix, output radix $oradix"
+ gdb_test "set output-radix $oradix" \
+ "Output radix now set to decimal $oradix, hex $oradixhex, octal $oradixoctal."
+ if { $oradix == 10 } then {
+ gdb_test "show radix" \
+ "Input and output radices set to decimal 10, hex a, octal 12." \
+ "show radix, output radix $oradix"
+ } else {
+ gdb_test "show radix" \
+ "Input radix set to decimal 10, hex a, octal 12.\r\nOutput radix set to decimal $oradix, hex $oradixhex, octal $oradixoctal." \
+ "show radix, output radix $oradix"
+ }
+
+ # no standard tests for output radix
}
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-
-test_input_radix_2
-test_input_radix_3
-test_input_radix_8
-test_input_radix_10
-test_input_radix_16
-test_output_radix_8
-test_output_radix_10
-test_output_radix_16
+test_output_radix 8 "8" "10"
+ test_one_output 8 "010" "010"
+ test_one_output 8 "0xf" "17"
+ test_one_output 8 "10" "12"
+ test_one_output 8 "100" "144"
+ setup_kfail *-*-* "gdb/1715"
+ test_one_output 8 "20." "24"
+ test_one_output 8 "(int) 20." "24"
+
+test_output_radix 10 "a" "12"
+ test_one_output 10 "010" "8"
+ test_one_output 10 "0xf" "15"
+ test_one_output 10 "10" "10"
+ test_one_output 10 "100" "100"
+ test_one_output 10 "20." "20"
+ test_one_output 10 "(int) 20." "20"
+
+test_output_radix 16 "10" "20"
+ test_one_output 16 "010" "8"
+ test_one_output 16 "0xf" "f"
+ test_one_output 16 "10" "a"
+ test_one_output 16 "100" "64"
+ setup_kfail *-*-* "gdb/1715"
+ test_one_output 16 "20." "14"
+ test_one_output 16 "(int) 20." "14"
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index e2967c60b58..b286e3a6539 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1999, 2001, 2004 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
@@ -119,7 +119,10 @@ proc gdb_load_timed {executable downloadsize class writesize} {
set load_begin_time [clock clicks]
set result [gdb_load $executable]
set load_end_time [clock clicks]
- if {$result < 0} then { fail "$test - loading executable"; return }
+ if { $result != 0 } then {
+ fail "$test - loading executable"
+ return
+ }
verbose "$test - time [expr ($load_end_time - $load_begin_time) / 1000] ms"
pass $test
}
diff --git a/gdb/testsuite/gdb.base/restore.c b/gdb/testsuite/gdb.base/restore.c
index a8282eee2c0..6aeac25341b 100644
--- a/gdb/testsuite/gdb.base/restore.c
+++ b/gdb/testsuite/gdb.base/restore.c
@@ -1,3 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2001, 2003, 2004, 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.
+ */
+
/* Test GDB's ability to restore saved registers from stack frames
when using the `return' command.
Jim Blandy <jimb@cygnus.com> --- December 1998 */
@@ -27,7 +46,7 @@
" = increment (" previous ");")
(if first-end
(progn
- (insert " /" "* " first-end " *" "/")
+ (insert " /" "* " first-end " prologue *" "/")
(setq first-end nil)))
(insert "\n")
(setq previous (local j))
@@ -110,7 +129,7 @@ callee0 (int n)
int
callee1 (int n)
{
- register int l1 = increment (n); /* callee1 */
+ register int l1 = increment (n); /* callee1 prologue */
return l1;
}
@@ -118,7 +137,7 @@ callee1 (int n)
int
callee2 (int n)
{
- register int l1 = increment (n); /* callee2 */
+ register int l1 = increment (n); /* callee2 prologue */
register int l2 = increment (l1);
return l1+l2;
}
@@ -127,7 +146,7 @@ callee2 (int n)
int
callee3 (int n)
{
- register int l1 = increment (n); /* callee3 */
+ register int l1 = increment (n); /* callee3 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
return l1+l2+l3;
@@ -137,7 +156,7 @@ callee3 (int n)
int
callee4 (int n)
{
- register int l1 = increment (n); /* callee4 */
+ register int l1 = increment (n); /* callee4 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
register int l4 = increment (l3);
@@ -148,7 +167,7 @@ callee4 (int n)
int
callee5 (int n)
{
- register int l1 = increment (n); /* callee5 */
+ register int l1 = increment (n); /* callee5 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
register int l4 = increment (l3);
@@ -159,7 +178,7 @@ callee5 (int n)
int
caller1 (void)
{
- register int l1 = increment (0x7eeb); /* caller1 */
+ register int l1 = increment (0x7eeb); /* caller1 prologue */
register int n;
n = callee0 (l1);
n = callee1 (n + l1);
@@ -173,7 +192,7 @@ caller1 (void)
int
caller2 (void)
{
- register int l1 = increment (0x7eeb); /* caller2 */
+ register int l1 = increment (0x7eeb); /* caller2 prologue */
register int l2 = increment (l1);
register int n;
n = callee0 (l2);
@@ -188,7 +207,7 @@ caller2 (void)
int
caller3 (void)
{
- register int l1 = increment (0x7eeb); /* caller3 */
+ register int l1 = increment (0x7eeb); /* caller3 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
register int n;
@@ -204,7 +223,7 @@ caller3 (void)
int
caller4 (void)
{
- register int l1 = increment (0x7eeb); /* caller4 */
+ register int l1 = increment (0x7eeb); /* caller4 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
register int l4 = increment (l3);
@@ -221,7 +240,7 @@ caller4 (void)
int
caller5 (void)
{
- register int l1 = increment (0x7eeb); /* caller5 */
+ register int l1 = increment (0x7eeb); /* caller5 prologue */
register int l2 = increment (l1);
register int l3 = increment (l2);
register int l4 = increment (l3);
diff --git a/gdb/testsuite/gdb.base/restore.exp b/gdb/testsuite/gdb.base/restore.exp
index 4c7a33a37c9..1ee71d631d2 100644
--- a/gdb/testsuite/gdb.base/restore.exp
+++ b/gdb/testsuite/gdb.base/restore.exp
@@ -1,4 +1,7 @@
-# Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1998, 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +17,6 @@
# 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
-
# Test GDB's ability to restore saved registers from stack frames
# when using the `return' command.
#
@@ -24,7 +24,7 @@
# fragments borrowed from return.exp.
if $tracelevel then {
- strace $tracelevel
+ strace $tracelevel
}
set prms_id 0
@@ -34,13 +34,15 @@ set testfile "restore"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
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."
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
proc restore_tests { } {
global gdb_prompt
- if { ! [ runto driver ] } then { return 0 }
+ if { ! [ runto driver ] } {
+ return 0
+ }
set limit 5
@@ -48,30 +50,35 @@ proc restore_tests { } {
# call each of the callee functions,
# force a return from the callee, and
# make sure that the local variables still have the right values.
+
for {set c 1} {$c <= $limit} {incr c} {
# Set a breakpoint at the next caller function.
- gdb_test "tbreak caller$c" "Breakpoint.*\[0-9\]*\\." "tbreak caller$c"
+ gdb_test "tbreak caller$c" "Breakpoint.*\[0-9\]*\\." \
+ "tbreak caller$c"
# Continue to the next caller function.
- gdb_test "continue" ".*/\\* caller$c \\*/" "run to caller$c"
+ gdb_test "continue" " caller$c prologue .*" "run to caller$c"
# Do each callee function.
for {set e 1} {$e <= $limit} {incr e} {
gdb_test "tbreak callee$e" "Breakpoint.*\[0-9\]*\\." \
- "tbreak callee$e"
+ "caller$c calls callee$e; tbreak callee"
- gdb_test "continue" ".*/\\* callee$e \\*/" "run to callee$e"
-
+ gdb_test "continue" " callee$e prologue .*/" \
+ "caller$c calls callee$e; continue to callee"
+
# Do a forced return from the callee.
- send_gdb "return 0\n"
- gdb_expect {
+ set test "caller$c calls callee$e; return callee now"
+ gdb_test_multiple "return 0" "$test" {
-re "Make .* return now.*y or n. $" {
send_gdb "y\n"
exp_continue
}
- -re "$gdb_prompt $" { }
+ -re " caller$c .*$gdb_prompt $" {
+ pass "$test"
+ }
}
# Check that the values of the local variables are what
@@ -79,7 +86,7 @@ proc restore_tests { } {
for {set var 1} {$var <= $c} {incr var} {
set expected [expr 0x7eeb + $var]
gdb_test "print l$var" " = $expected" \
- "caller$c called callee$e; variable l$var restored to $expected"
+ "caller$c calls callee$e; return restored l$var to $expected"
}
}
}
diff --git a/gdb/config/arm/xm-nbsd.h b/gdb/testsuite/gdb.base/sep-proc.c
index d3f76a7dd01..0fbb17a82c2 100644
--- a/gdb/config/arm/xm-nbsd.h
+++ b/gdb/testsuite/gdb.base/sep-proc.c
@@ -1,7 +1,6 @@
-/* Parameters for execution on an ARM running NetBSD, for GDB.
- Copyright 1994 Free Software Foundation, Inc.
+/* This file is part of GDB, the GNU debugger.
- This file is part of GDB.
+ Copyright 2004 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
@@ -12,11 +11,16 @@
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. */
+ 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 */
-/* Get generic NetBSD host definitions. */
-#include "config/xm-nbsd.h"
+void
+say_hello (void)
+{
+ printf ("Hello world.\n");
+}
diff --git a/gdb/m68knbsd-tdep.c b/gdb/testsuite/gdb.base/sep.c
index 520d14fa47f..4402bd84251 100644
--- a/gdb/m68knbsd-tdep.c
+++ b/gdb/testsuite/gdb.base/sep.c
@@ -1,8 +1,6 @@
-/* Target-dependent code for NetBSD/i386, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001
- Free Software Foundation, Inc.
+/* This file is part of GDB, the GNU debugger.
- This file is part of GDB.
+ Copyright 2004 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
@@ -13,21 +11,25 @@
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. */
+ 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 */
-#include "defs.h"
-#include "gdbtypes.h"
-#include "regcache.h"
+#include <stdio.h>
+
+/* Include a .c file. This is usually considered bad practice in C,
+ but this emulate a practice which is common in other languages.
+ One such language is Ada and its concept of "separates", for instance. */
+#include "sep-proc.c"
int
-m68knbsd_use_struct_convention (int gcc_p, struct type *type)
+main (void)
{
- return !(TYPE_LENGTH (type) == 1
- || TYPE_LENGTH (type) == 2
- || TYPE_LENGTH (type) == 4
- || TYPE_LENGTH (type) == 8);
+ say_hello ();
+ return 0;
}
+
diff --git a/gdb/testsuite/gdb.base/sep.exp b/gdb/testsuite/gdb.base/sep.exp
new file mode 100644
index 00000000000..7a7c22ae1b6
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sep.exp
@@ -0,0 +1,68 @@
+# Copyright 2004 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
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "sep"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Try to display the source code inside a file which is included by
+# another source file. The purpose of this test is to verify that
+# this operation works, even before we have loaded full symbols for
+# that file (by doing a "break say_hello" for instance).
+#
+# We just check that the command succeeds, so no need to match the
+# complete exact output. Simply verifying that we get procedure
+# say_hello is good enough, and avoid unnecessary failures is someone
+# decides later to reformat sep-proc.c.
+
+gdb_test "list sep-proc.c:23" \
+ "void.*say_hello.*" \
+ "list using location inside included file"
+
+# Try the same, but this time with a breakpoint. We need to exit
+# GDB to make sure that we havn't loaded the full symbols yet when
+# we test the breakpoint insertion.
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set test "breakpoint inside included file"
+gdb_test_multiple "break sep-proc.c:25" "$test" {
+ -re "Breakpoint.*at.* file .*sep-proc.c, line .*" {
+ pass "$test"
+ }
+ -re "No source file named sep-proc.c.*" {
+ fail "$test"
+ }
+}
+
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 4205253e2f5..26a6556464d 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -291,17 +291,17 @@ send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
# PR's 16495, 18213
# test that we can re-set breakpoints in shared libraries
-gdb_breakpoint "shr1"
+gdb_breakpoint "shr1" "allow-pending"
# FIXME: should not send "run" explicitly. Non-portable.
if ![is_remote target] {
- gdb_test "run" "Starting program:.*Breakpoint 1,.*" \
+ gdb_test "run" "Starting program:.*Breakpoint .,.*" \
"run to bp in shared library"
gdb_test "cont" ".*Program exited normally..*"
- gdb_test "run" "Starting program:.*Breakpoint 1,.*" \
+ gdb_test "run" "Starting program:.*Breakpoint .,.*" \
"re-run to bp in shared library (PR's 16495, 18213)"
gdb_test "cont" ".*Program exited normally..*"
diff --git a/gdb/testsuite/gdb.base/sigaltstack.c b/gdb/testsuite/gdb.base/sigaltstack.c
new file mode 100644
index 00000000000..b7abc9b5241
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sigaltstack.c
@@ -0,0 +1,97 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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 */
+
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+
+enum level { MAIN, OUTER, INNER, LEAF, NR_LEVELS };
+
+/* Levels completed flag. */
+volatile enum level level = NR_LEVELS;
+
+void catcher (int signal);
+
+void
+thrower (enum level next_level, int sig, int itimer, int on_stack)
+{
+ level = next_level;
+ /* Set up the signal handler. */
+ {
+ struct sigaction act;
+ memset (&act, 0, sizeof (act));
+ act.sa_handler = catcher;
+ act.sa_flags |= on_stack;
+ sigaction (sig, &act, NULL);
+ }
+ /* Set up a one-off timer. A timer, rather than SIGSEGV, is used as
+ after a timer handler finishes the interrupted code can safely
+ resume. */
+ {
+ struct itimerval itime;
+ memset (&itime, 0, sizeof (itime));
+ itime.it_value.tv_usec = 250 * 1000;
+ setitimer (itimer, &itime, NULL);
+ }
+ /* Wait. */
+ while (level != LEAF);
+}
+
+void
+catcher (int signal)
+{
+ /* Find the next level. */
+ switch (level)
+ {
+ case MAIN:
+ thrower (OUTER, SIGALRM, ITIMER_REAL, SA_ONSTACK);
+ break;
+ case OUTER:
+ thrower (INNER, SIGVTALRM, ITIMER_VIRTUAL, SA_ONSTACK);
+ break;
+ case INNER:
+ level = LEAF;
+ return;
+ }
+}
+
+
+main ()
+{
+ /* Set up the altstack. */
+ {
+ static char stack[SIGSTKSZ * NR_LEVELS];
+ struct sigaltstack alt;
+ memset (&alt, 0, sizeof (alt));
+ alt.ss_sp = stack;
+ alt.ss_size = SIGSTKSZ;
+ alt.ss_flags = 0;
+ if (sigaltstack (&alt, NULL) < 0)
+ {
+ perror ("sigaltstack");
+ exit (0);
+ }
+ }
+ level = MAIN;
+ catcher (0);
+}
diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp
new file mode 100644
index 00000000000..d1e37d8aa98
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sigaltstack.exp
@@ -0,0 +1,105 @@
+# Copyright 2004 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.
+
+
+# The program sigaltstack.c creates a backtrace containing nested
+# signal handlers on an alternative stack. This in turn leads to a
+# non-contiguous (and possibly non-monotonic) backtrace - stack
+# address jump at the normal-alt stack boundary.
+
+# This test confirms that GDB can both backtrace through and finish
+# such a stack.
+
+if [target_info exists gdb,nosignals] {
+ verbose "Skipping signals.exp because of nosignals."
+ continue
+}
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile sigaltstack
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile ${module}.c"
+ return -1
+}
+
+# get things started
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Pass all the alarms straight through (but verbosely)
+gdb_test "handle SIGALRM print pass nostop"
+gdb_test "handle SIGVTALRM print pass nostop"
+gdb_test "handle SIGPROF print pass nostop"
+
+# Advance to main
+if { ![runto_main] } then {
+ gdb_suppress_tests;
+}
+
+# Stop in handle, when at the inner most level
+gdb_test "break catcher if level == INNER"
+gdb_test "continue" ".* catcher .*" "continue to catch"
+# step off the assignment
+gdb_test "next"
+
+# Full backtrace?
+send_gdb "bt\n"
+gdb_expect_list "backtrace" ".*$gdb_prompt $" {
+ "\[\r\n\]+.0 \[^\r\n\]* catcher "
+ "\[\r\n\]+.1 .signal handler called."
+ "\[\r\n\]+.2 \[^\r\n\]* thrower .next_level=INNER"
+ "\[\r\n\]+.3 \[^\r\n\]* catcher "
+ "\[\r\n\]+.4 .signal handler called."
+ "\[\r\n\]+.5 \[^\r\n\]* thrower .next_level=OUTER"
+ "\[\r\n\]+.6 \[^\r\n\]* catcher "
+ "\[\r\n\]+.7 \[^\r\n\]* main .*"
+}
+
+proc finish_test { pattern msg } {
+ global gdb_prompt
+
+ gdb_test_multiple "finish" $msg {
+ -re "Cannot insert breakpoint 0.*${gdb_prompt} $" {
+ # Some platforms use a special read-only page for signal
+ # trampolines. We can't set a breakpoint there, and we
+ # don't gracefully fall back to single-stepping.
+ setup_kfail "i?86-*-linux*" gdb/1736
+ fail "$msg (could not set breakpoint)"
+ }
+ -re "$pattern.*${gdb_prompt} $" {
+ pass $msg
+ }
+ }
+}
+
+# Finish?
+finish_test "signal handler called." "finish from catch LEAF"
+finish_test "thrower .next_level=INNER, .*" "finish to throw INNER"
+finish_test "catcher .*" "finish to catch INNER"
+finish_test "signal handler called.*" "finish from catch INNER"
+finish_test "thrower .next_level=OUTER, .*" "finish to OUTER"
+finish_test "catcher .*" "finish to catch MAIN"
+finish_test "main .*" "finish to MAIN"
diff --git a/gdb/config/s390/tm-linux.h b/gdb/testsuite/gdb.base/sigbpt.c
index d13d06dc139..b189f6da7da 100644
--- a/gdb/config/s390/tm-linux.h
+++ b/gdb/testsuite/gdb.base/sigbpt.c
@@ -1,11 +1,6 @@
-/* Target definitions for GDB for a s390 running GNU/Linux.
+/* This testcase is part of GDB, the GNU debugger.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
-
- Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
- for IBM Deutschland Entwicklung GmbH, IBM Corporation.
-
- This file is part of GDB.
+ Copyright 2004 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
@@ -16,15 +11,43 @@
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 TM_LINUX_H
-#define TM_LINUX_H
-
-#include "config/tm-linux.h"
-
-#endif /* TM_LINUX_H */
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+
+extern void
+keeper (int sig)
+{
+}
+
+volatile long v1 = 0;
+volatile long v2 = 0;
+volatile long v3 = 0;
+
+extern long
+bowler (void)
+{
+ /* Try to read address zero. Do it in a slightly convoluted way so
+ that more than one instruction is used. */
+ return *(char *) (v1 + v2 + v3);
+}
+
+int
+main ()
+{
+ static volatile int i;
+
+ struct sigaction act;
+ memset (&act, 0, sizeof act);
+ act.sa_handler = keeper;
+ sigaction (SIGSEGV, &act, NULL);
+
+ bowler ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp
new file mode 100644
index 00000000000..61625b52373
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sigbpt.exp
@@ -0,0 +1,266 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2004 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.
+
+# Check that GDB can and only executes single instructions when
+# stepping through a sequence of breakpoints interleaved by a signal
+# handler.
+
+# This test is known to tickle the following problems: kernel letting
+# the inferior execute both the system call, and the instruction
+# following, when single-stepping a system call; kernel failing to
+# propogate the single-step state when single-stepping the sigreturn
+# system call, instead resuming the inferior at full speed; GDB
+# doesn't know how to software single-step across a sigreturn
+# instruction. Since the kernel problems can be "fixed" using
+# software single-step this is KFAILed rather than XFAILed.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "sigbpt"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+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."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# If we can examine what's at memory address 0, it is possible that we
+# could also execute it. This could probably make us run away,
+# executing random code, which could have all sorts of ill effects,
+# especially on targets without an MMU. Don't run the tests in that
+# case.
+
+send_gdb "x 0\n"
+gdb_expect {
+ -re "0x0:.*Cannot access memory at address 0x0.*$gdb_prompt $" { }
+ -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { }
+ -re ".*$gdb_prompt $" {
+ untested "Memory at address 0 is possibly executable"
+ return
+ }
+}
+
+gdb_test "break keeper"
+
+# Run to bowler, and then single step until there's a SIGSEGV. Record
+# the address of each single-step instruction (up to and including the
+# instruction that causes the SIGSEGV) in bowler_addrs, and the address
+# of the actual SIGSEGV in segv_addr.
+
+set bowler_addrs bowler
+gdb_test {display/i $pc}
+gdb_test "advance *bowler" "bowler.*" "advance to the bowler"
+set test "stepping to SIGSEGV"
+gdb_test_multiple "stepi" "$test" {
+ -re "Program received signal SIGSEGV.*pc *(0x\[0-9a-f\]*).*$gdb_prompt $" {
+ set segv_addr $expect_out(1,string)
+ pass "$test"
+ }
+ -re " .*pc *(0x\[0-9a-f\]*).*bowler.*$gdb_prompt $" {
+ set bowler_addrs [concat $expect_out(1,string) $bowler_addrs]
+ send_gdb "stepi\n"
+ exp_continue
+ }
+}
+
+# Now record the address of the instruction following the faulting
+# instruction in bowler_addrs.
+
+set test "get insn after fault"
+gdb_test_multiple {x/2i $pc} "$test" {
+ -re "(0x\[0-9a-f\]*).*bowler.*(0x\[0-9a-f\]*).*bowler.*$gdb_prompt $" {
+ set bowler_addrs [concat $expect_out(2,string) $bowler_addrs]
+ pass "$test"
+ }
+}
+
+# Procedures for returning the address of the instruction before, at
+# and after, the faulting instruction.
+
+proc before_segv { } {
+ global bowler_addrs
+ return [lindex $bowler_addrs 2]
+}
+
+proc at_segv { } {
+ global bowler_addrs
+ return [lindex $bowler_addrs 1]
+}
+
+proc after_segv { } {
+ global bowler_addrs
+ return [lindex $bowler_addrs 0]
+}
+
+# Check that the address table and SIGSEGV correspond.
+
+set test "Verify that SIGSEGV occurs at the last STEPI insn"
+if {[string compare $segv_addr [at_segv]] == 0} {
+ pass "$test"
+} else {
+ fail "$test ($segv_addr [at_segv])"
+}
+
+# Check that the inferior is correctly single stepped all the way back
+# to a faulting instruction.
+
+proc stepi_out { name args } {
+ global gdb_prompt
+
+ # Set SIGSEGV to pass+nostop and then run the inferior all the way
+ # through to the signal handler. With the handler is reached,
+ # disable SIGSEGV, ensuring that further signals stop the
+ # inferior. Stops a SIGSEGV infinite loop when a broke system
+ # keeps re-executing the faulting instruction.
+ rerun_to_main
+ gdb_test "handle SIGSEGV nostop print pass" "" "${name}; pass SIGSEGV"
+ gdb_test "continue" "keeper.*" "${name}; continue to keeper"
+ gdb_test "handle SIGSEGV stop print nopass" "" "${name}; nopass SIGSEGV"
+
+ # Insert all the breakpoints. To avoid the need to step over
+ # these instructions, this is delayed until after the keeper has
+ # been reached.
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ gdb_test "break [lindex $args $i]" "Breakpoint.*" \
+ "${name}; set breakpoint $i of [llength $args]"
+ }
+
+ # Single step our way out of the keeper, through the signal
+ # trampoline, and back to the instruction that faulted.
+ set test "${name}; stepi out of handler"
+ gdb_test_multiple "stepi" "$test" {
+ -re "keeper.*$gdb_prompt $" {
+ send_gdb "stepi\n"
+ exp_continue
+ }
+ -re "signal handler.*$gdb_prompt $" {
+ send_gdb "stepi\n"
+ exp_continue
+ }
+ -re "Program received signal SIGSEGV.*$gdb_prompt $" {
+ kfail gdb/1702 "$test (executed fault insn)"
+ }
+ -re "Breakpoint.*pc *[at_segv] .*bowler.*$gdb_prompt $" {
+ pass "$test (at breakpoint)"
+ }
+ -re "Breakpoint.*pc *[after_segv] .*bowler.*$gdb_prompt $" {
+ kfail gdb/1702 "$test (executed breakpoint)"
+ }
+ -re "pc *[at_segv] .*bowler.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "pc *[after_segv] .*bowler.*$gdb_prompt $" {
+ kfail gdb/1702 "$test (skipped fault insn)"
+ }
+ -re "pc *0x\[a-z0-9\]* .*bowler.*$gdb_prompt $" {
+ kfail gdb/1702 "$test (corrupt pc)"
+ }
+ }
+
+ # Clear any breakpoints
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ gdb_test "clear [lindex $args $i]" "Deleted .*" \
+ "${name}; clear breakpoint $i of [llength $args]"
+ }
+}
+
+# Let a signal handler exit, returning to a breakpoint instruction
+# inserted at the original fault instruction. Check that the
+# breakpoint is hit, and that single stepping off that breakpoint
+# executes the underlying fault instruction causing a SIGSEGV.
+
+proc cont_out { name args } {
+ global gdb_prompt
+
+ # Set SIGSEGV to pass+nostop and then run the inferior all the way
+ # through to the signal handler. With the handler is reached,
+ # disable SIGSEGV, ensuring that further signals stop the
+ # inferior. Stops a SIGSEGV infinite loop when a broke system
+ # keeps re-executing the faulting instruction.
+ rerun_to_main
+ gdb_test "handle SIGSEGV nostop print pass" "" "${name}; pass SIGSEGV"
+ gdb_test "continue" "keeper.*" "${name}; continue to keeper"
+ gdb_test "handle SIGSEGV stop print nopass" "" "${name}; nopass SIGSEGV"
+
+ # Insert all the breakpoints. To avoid the need to step over
+ # these instructions, this is delayed until after the keeper has
+ # been reached. Always set a breakpoint at the signal trampoline
+ # instruction.
+ set args [concat $args "*[at_segv]"]
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ gdb_test "break [lindex $args $i]" "Breakpoint.*" \
+ "${name}; set breakpoint $i of [llength $args]"
+ }
+
+ # Let the handler return, it should "appear to hit" the breakpoint
+ # inserted at the faulting instruction. Note that the breakpoint
+ # instruction wasn't executed, rather the inferior was SIGTRAPed
+ # with the PC at the breakpoint.
+ gdb_test "continue" "Breakpoint.*pc *[at_segv] .*" \
+ "${name}; continue to breakpoint at fault"
+
+ # Now single step the faulted instrction at that breakpoint.
+ gdb_test "stepi" \
+ "Program received signal SIGSEGV.*pc *[at_segv] .*" \
+ "${name}; stepi fault"
+
+ # Clear any breakpoints
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ gdb_test "clear [lindex $args $i]" "Deleted .*" \
+ "${name}; clear breakpoint $i of [llength $args]"
+ }
+
+}
+
+
+
+# Try to confuse DECR_PC_AFTER_BREAK architectures by scattering
+# breakpoints around the faulting address. In all cases the inferior
+# should single-step out of the signal trampoline halting (but not
+# executing) the fault instruction.
+
+stepi_out "stepi"
+stepi_out "stepi bp before segv" "*[before_segv]"
+stepi_out "stepi bp at segv" "*[at_segv]"
+stepi_out "stepi bp before and at segv" "*[at_segv]" "*[before_segv]"
+
+
+# Try to confuse DECR_PC_AFTER_BREAK architectures by scattering
+# breakpoints around the faulting address. In all cases the inferior
+# should exit the signal trampoline halting at the breakpoint that
+# replaced the fault instruction.
+cont_out "cont"
+cont_out "cont bp after segv" "*[before_segv]"
+cont_out "cont bp before and after segv" "*[before_segv]" "*[after_segv]"
diff --git a/gdb/testsuite/gdb.base/siginfo.c b/gdb/testsuite/gdb.base/siginfo.c
new file mode 100644
index 00000000000..6303f07194f
--- /dev/null
+++ b/gdb/testsuite/gdb.base/siginfo.c
@@ -0,0 +1,69 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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.
+
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/time.h>
+
+static volatile int done;
+
+#ifdef SA_SIGINFO
+static void /* HANDLER */
+handler (int sig, siginfo_t *info, void *context)
+{
+ done = 1;
+} /* handler */
+#else
+static void
+handler (int sig)
+{
+ done = 1;
+} /* handler */
+#endif
+
+main ()
+{
+ /* Set up the signal handler. */
+ {
+ struct sigaction action;
+ memset (&action, 0, sizeof (action));
+#ifdef SA_SIGINFO
+ action.sa_sigaction = handler;
+ action.sa_flags |= SA_SIGINFO;
+#else
+ action.sa_handler = handler;
+#endif
+ sigaction (SIGVTALRM, &action, NULL);
+ }
+
+ /* Set up a one-off timer. A timer, rather than SIGSEGV, is used as
+ after a timer handler finishes the interrupted code can safely
+ resume. */
+ {
+ struct itimerval itime;
+ memset (&itime, 0, sizeof (itime));
+ itime.it_value.tv_usec = 250 * 1000;
+ setitimer (ITIMER_VIRTUAL, &itime, NULL);
+ }
+ /* Wait. */
+ while (!done);
+ return 0;
+} /* main */
diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp
new file mode 100644
index 00000000000..a081ab8e887
--- /dev/null
+++ b/gdb/testsuite/gdb.base/siginfo.exp
@@ -0,0 +1,98 @@
+# Copyright 2004 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.
+
+
+# The program siginfo.c creates a backtrace containing a signal
+# handler registered using sigaction's sa_sigaction / SA_SIGINFO.
+# Some OS's (e.g., GNU/Linux) use different signal trampolines for
+# sa_sigaction and sa_handler.
+
+# This test first confirms that GDB can backtrace through the
+# alternative sa_sigaction signal handler, and second that GDB can
+# nexti/stepi out of such a handler.
+
+if [target_info exists gdb,nosignals] {
+ verbose "Skipping signals.exp because of nosignals."
+ continue
+}
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile siginfo
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile ${module}.c"
+ return -1
+}
+
+# get things started
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "display/i \$pc"
+
+# Advance to main
+if { ![runto_main] } then {
+ gdb_suppress_tests;
+}
+
+# Pass all the alarms straight through (but verbosely)
+# gdb_test "handle SIGALRM print pass nostop"
+# gdb_test "handle SIGVTALRM print pass nostop"
+# gdb_test "handle SIGPROF print pass nostop"
+
+# Run to the signal handler, validate the backtrace.
+gdb_test "break handler"
+gdb_test "continue" ".* handler .*" "continue to stepi handler"
+send_gdb "bt\n"
+gdb_expect_list "backtrace for nexti" ".*$gdb_prompt $" {
+ "\[\r\n\]+.0 \[^\r\n\]* handler "
+ "\[\r\n\]+.1 .signal handler called."
+ "\[\r\n\]+.2 \[^\r\n\]* main .*"
+}
+
+# Check that GDB can step the inferior back to main
+set test "step out of handler"
+gdb_test_multiple "step" "${test}" {
+ -re "done = 1;.*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue
+ }
+ -re "\} .. handler .*${gdb_prompt} $" {
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re "Program exited normally.*${gdb_prompt} $" {
+ kfail gdb/1613 "$test (program exited)"
+ }
+ -re "(while ..done|return 0).*${gdb_prompt} $" {
+ # After stepping out of a function /r signal-handler, GDB will
+ # advance the inferior until it is at the first instruction of
+ # a code-line. While typically things return to the middle of
+ # the "while..." (and hence GDB advances the inferior to the
+ # "return..." line) it is also possible for the return to land
+ # on the first instruction of "while...". Accept both cases.
+ pass "$test"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index a07e3a8500a..cbe00bf3b12 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
if [target_info exists gdb,nosignals] {
verbose "Skipping signals.exp because of nosignals."
continue
@@ -33,7 +30,7 @@ set testfile signals
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
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."
+ 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
@@ -48,294 +45,13 @@ if {$hp_cc_compiler} {
set void void
}
-proc signal_tests_1 {} {
- global gdb_prompt
- if [runto_main] then {
- gdb_test "next" "signal \\(SIGUSR1.*" \
- "next over signal (SIGALRM, handler)"
- gdb_test "next" "alarm \\(.*" \
- "next over signal (SIGUSR1, handler)"
- gdb_test "next" "\\+\\+count; /\\* first \\*/" \
- "next over alarm (1)"
- # An alarm has been signaled, give the signal time to get delivered.
- sleep 2
-
- # i386 BSD currently fails the next test with a SIGTRAP.
- setup_xfail "i*86-*-bsd*"
- # But Dynix has a DECR_PC_AFTER_BREAK of zero, so the failure
- # is shadowed by hitting the through_sigtramp_breakpoint.
- clear_xfail "i*86-sequent-bsd*"
- # Univel SVR4 i386 continues instead of stepping.
- setup_xfail "i*86-univel-sysv4*"
- # lynx fails with "next" acting like "continue"
- setup_xfail "*-*-*lynx*"
- # linux (aout versions) also fails with "next" acting like "continue"
- # this is probably more dependant on the kernel version than on the
- # object file format or utils. (sigh)
- setup_xfail "i*86-pc-linuxaout-gnu" "i*86-pc-linuxoldld-gnu"
- send_gdb "next\n"
- gdb_expect {
- -re "alarm .*$gdb_prompt $" { pass "next to 2nd alarm (1)" }
- -re "Program received signal SIGTRAP.*first.*$gdb_prompt $" {
-
- # This can happen on machines that have a trace flag
- # in their PS register.
- # The trace flag in the PS register will be set due to
- # the `next' command.
- # Before calling the signal handler, the PS register
- # is pushed along with the context on the user stack.
- # When the signal handler has finished, it reenters the
- # the kernel via a sigreturn syscall, which restores the
- # PS register along with the context.
- # If the kernel erroneously does not clear the trace flag
- # in the pushed context, gdb will receive a SIGTRAP from
- # the set trace flag in the restored context after the
- # signal handler has finished.
-
- # I do not yet understand why the SIGTRAP does not occur
- # after stepping the instruction at the restored PC on
- # i386 BSDI 1.0 systems.
-
- # Note that the vax under Ultrix also exhibits
- # this behaviour (it is uncovered by the `continue from
- # a break in a signal handler' test below).
- # With this test the failure is shadowed by hitting the
- # through_sigtramp_breakpoint upon return from the signal
- # handler.
-
- # SVR4 and Linux based i*86 systems exhibit this behaviour
- # as well (it is uncovered by the `continue from a break
- # in a signal handler' test below).
- # As these systems use procfs, where we tell the kernel not
- # to tell gdb about `pass' signals, and the trace flag is
- # cleared by the kernel before entering the sigtramp
- # routine, GDB will not notice the execution of the signal
- # handler.
- # Upon return from the signal handler, GDB will receive
- # a SIGTRAP from the set trace flag in the restored context.
- # The SIGTRAP marks the end of a (albeit long winded)
- # single step for GDB, causing this test to pass.
-
- fail "next to 2nd alarm (1) (probably kernel bug)"
- gdb_test "next" "alarm.*" "next to 2nd alarm (1)"
- }
- -re "Program exited with code.*$gdb_prompt $" {
-
- # This is apparently a bug in the UnixWare kernel (but
- # has not been investigated beyond the
- # resume/target_wait level, and has not been reported
- # to Univel). If it steps when a signal is pending,
- # it does a continue instead. I don't know whether
- # there is a workaround.
-
- # Perhaps this problem exists on other SVR4 systems;
- # but (a) we have no reason to think so, and (b) if we
- # put a wrong xfail here, we never get an XPASS to let
- # us know that it was incorrect (and then if such a
- # configuration regresses we have no way of knowing).
- # Solaris is not a relevant data point either way
- # because it lacks single stepping.
-
- # fnf: I don't agree with the above philosophy. We
- # can never be sure that any particular XFAIL is
- # specified 100% correctly in that no systems with
- # the bug are missed and all systems without the bug
- # are excluded. If we include an XFAIL that isn't
- # appropriate for a particular system, then when that
- # system gets tested it will XPASS, and someone should
- # investigate and fix the setup_xfail as appropriate,
- # or more preferably, the actual bug. Each such case
- # adds more data to narrowing down the scope of the
- # problem and ultimately fixing it.
-
- setup_xfail "i*86-*-sysv4*"
- fail "'next' behaved as 'continue (known SVR4 bug)'"
- return 0
- }
- -re ".*$gdb_prompt $" { fail "next to 2nd alarm (1)" }
- timeout { fail "next to 2nd alarm (1); (timeout)" }
- eof { fail "next to 2nd alarm (1); (eof)" }
- }
-
- gdb_test "break handler" "Breakpoint \[0-9\]+ .*"
- gdb_test "next" "\\+\\+count; /\\* second \\*/" \
- "next to 2nd ++count in signals_tests_1"
- # An alarm has been signaled, give the signal time to get delivered.
- sleep 2
-
- set bash_bug 0
- send_gdb "next\n"
- gdb_expect {
- -re "Breakpoint.*handler.*$gdb_prompt $" {
- pass "next to handler in signals_tests_1"
- }
- -re "Program received signal SIGEMT.*$gdb_prompt $" {
- # Bash versions before 1.13.5 cause this behaviour
- # by blocking SIGTRAP.
- fail "next to handler in signals_tests_1 (known problem with bash versions before 1.13.5)"
- set bash_bug 1
- gdb_test "signal 0" "Breakpoint.*handler.*"
- }
- -re ".*$gdb_prompt $" { fail "next to handler in signals_tests_1" }
- timeout { fail "next to handler in signals_tests_1 (timeout)" }
- eof { fail "next to handler in signals_tests_1 (eof)" }
- }
-
- # This doesn't test that main is frame #2, just that main is frame
- # #2, #3, or higher. At some point this should be fixed (but
- # it quite possibly would introduce new FAILs on some systems).
- setup_xfail "i*86-*-bsdi2.0"
- gdb_test "backtrace 10" "#0.*handler.*#1.*signal handler.*#2.* main .*" \
- "backtrace in signals_tests_1"
-
- gdb_test "break func1" "Breakpoint \[0-9\]+ .*"
- gdb_test "break func2" "Breakpoint \[0-9\]+ .*"
-
- # Vax Ultrix and i386 BSD currently fail the next test with
- # 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"
- gdb_expect {
- -re "Breakpoint.*func1.*$gdb_prompt $" { pass "continue to func1" }
- -re "Program received signal SIGTRAP.*second.*$gdb_prompt $" {
-
- # See explanation for `next to 2nd alarm (1)' fail above.
- # We did step into the signal handler, hit a breakpoint
- # in the handler and continued from the breakpoint.
- # The set trace flag in the restored context is causing
- # the SIGTRAP, without stepping an instruction.
-
- fail "continue to func1 (probably kernel bug)"
- gdb_test "continue" "Breakpoint.*func1.*" \
- "extra continue to func1"
- }
- -re "Program received signal SIGTRAP.*func1 ..;.*$gdb_prompt $" {
-
- # On the vax under Ultrix the set trace flag in the restored
- # context is causing the SIGTRAP, but after stepping one
- # instruction, as expected.
-
- fail "continue to func1 (probably kernel bug)"
- gdb_test "continue" "Breakpoint.*func1.*" \
- "extra continue to func1"
- }
- -re ".*$gdb_prompt $" { fail "continue to func1" }
- default { fail "continue to func1" }
- }
-
- setup_xfail "*-*-irix*"
- send_gdb "signal SIGUSR1\n"
- gdb_expect {
- -re "Breakpoint.*handler.*$gdb_prompt $" { pass "signal SIGUSR1" }
- -re "Program received signal SIGUSR1.*$gdb_prompt $" {
- # This is what irix4 and irix5 do.
- # It would appear to be a kernel bug.
- fail "signal SIGUSR1"
- gdb_test "continue" "Breakpoint.*handler.*" "pass it SIGUSR1"
- }
- -re ".*$gdb_prompt $" { fail "signal SIGUSR1" }
- default { fail "signal SIGUSR1" }
- }
-
- # Will tend to wrongly require an extra continue.
-
- # The problem here is that the breakpoint at func1 will be
- # inserted, and when the system finishes with the signal
- # handler it will try to execute there. For GDB to try to
- # remember that it was going to step over a breakpoint when a
- # signal happened, distinguish this case from the case where
- # func1 is called from the signal handler, etc., seems
- # exceedingly difficult. So don't expect this to get fixed
- # anytime soon.
-
- setup_xfail "*-*-*"
- send_gdb "continue\n"
- gdb_expect {
- -re "Breakpoint.*func2.*$gdb_prompt $" { pass "continue to func2" }
- -re "Breakpoint.*func1.*$gdb_prompt $" {
- fail "continue to func2"
- gdb_test "continue" "Breakpoint.*func2.*" \
- "extra continue to func2"
- }
- -re ".*$gdb_prompt $" { fail "continue to func2" }
- default { fail "continue to func2" }
- }
-
- sleep 2
-
- # GDB yanks out the breakpoints to step over the breakpoint it
- # stopped at, which means the breakpoint at handler is yanked.
- # But if SOFTWARE_SINGLE_STEP_P, we won't get another chance to
- # reinsert them (at least not with procfs, where we tell the kernel
- # not to tell gdb about `pass' signals). So the fix would appear to
- # be to just yank that one breakpoint when we step over it.
-
- setup_xfail "sparc*-*-*"
- setup_xfail "rs6000-*-*"
- setup_xfail "powerpc-*-*"
-
- # A faulty bash will not step the inferior into sigtramp on sun3.
- if {$bash_bug} then {
- setup_xfail "m68*-*-sunos4*"
- }
-
- setup_xfail "i*86-pc-linux-gnu*"
- setup_xfail "i*86-*-solaris2*"
- gdb_test "continue" "Breakpoint.*handler.*" "continue to handler"
-
- # If the SOFTWARE_SINGLE_STEP_P failure happened, we have already
- # exited.
- # If we succeeded a continue will return from the handler to func2.
- # GDB now has `forgotten' that it intended to step over the
- # breakpoint at func2 and will stop at func2.
- setup_xfail "*-*-*"
- # The sun3 with a faulty bash will also be `forgetful' but it
- # already got the spurious stop at func2 and this continue will work.
- if {$bash_bug} then {
- clear_xfail "m68*-*-sunos4*"
- }
- gdb_test "continue" "Program exited with code 010\\." \
- "continue to exit in signals_tests_1 "
- }
-}
-
-# On a few losing systems, ptrace (PT_CONTINUE) or ptrace (PT_STEP)
-# causes pending signals to be cleared, which causes these tests to
-# get nowhere fast. This is totally losing behavior (perhaps there
-# are cases in which is it useful but the user needs more control,
-# which they mostly have in GDB), but some people apparently think it
-# is a feature. It is documented in the ptrace manpage on Motorola
-# Delta Series sysV68 R3V7.1 and on HPUX 9.0. Even the non-HPUX PA
-# OSes (BSD and OSF/1) seem to have figured they had to copy this
-# braindamage.
-
-if {[ istarget "m68*-motorola-*" ] || [ istarget "hppa*-*-bsd*" ] ||
- [ istarget "hppa*-*-osf*" ]} then {
- setup_xfail "*-*-*"
- fail "ptrace loses on signals on this target"
- return 0
-}
-
-# lynx2.2.2 doesn't lose signals, instead it screws up the stack pointer
-# in some of these tests leading to massive problems. I've
-# reported this to lynx, hopefully it'll be fixed in lynx2.3.
-# Severe braindamage.
-if [ istarget "*-*-*lynx*" ] then {
- setup_xfail "*-*-*"
- fail "kernel scroggs stack pointer in signal tests on this target"
- return 0
-}
-
gdb_exit
gdb_start
# This will need to be updated as the exact list of signals changes,
# but I want to test that TARGET_SIGNAL_0, TARGET_SIGNAL_DEFAULT, and
# TARGET_SIGNAL_UNKNOWN are skipped.
+
proc test_handle_all_print {} {
global timeout
# Increase timeout and expect input buffer for large output from gdb.
@@ -359,282 +75,202 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
-signal_tests_1
-
-# Force a resync, so we're looking at the right prompt. On SCO we
-# were getting out of sync (I don't understand why).
-send_gdb "p 1+1\n"
-gdb_expect {
- -re "= 2.*$gdb_prompt $" {}
- -re ".*$gdb_prompt $" { perror "sync trouble in signals.exp" }
- default { perror "sync trouble in signals.exp" }
-}
if [runto_main] then {
- # Since count is a static variable outside main, runto_main
- # is no guarantee that count will be 0 at this point.
+
+ # Since count is a static variable outside main, runto_main is no
+ # guarantee that count will be 0 at this point.
+
gdb_test "set variable count = 0" ""
+
+ # Test an inferior function call that takes a signal that hits a
+ # breakpoint (with a false condition). When GDB tries to run the
+ # stack dummy, it will hit the breakpoint at handler. Provided it
+ # doesn't lose its cool, this is not a problem, it just has to
+ # note that the breakpoint condition is false and keep going.
+
+ # ...setup an always false conditional breakpoint
+
gdb_test "break handler if 0" "Breakpoint \[0-9\]+ .*"
gdb_test "set \$handler_breakpoint_number = \$bpnum" ""
- # Get to the point where a signal is waiting to be delivered
- gdb_test "next" "signal \\(SIGUSR1.*" "next to signal in signals.exp"
- gdb_test "next" "alarm \\(.*" "next to alarm #1 in signals.exp"
+ # ...setup the signal
+
+ gdb_test "next" "signal \\(SIGUSR1.*" "next to signal"
+ gdb_test "next" "alarm \\(.*" "next to alarm #1"
gdb_test "next" "\\+\\+count; /\\* first \\*/" \
- "next to ++count #1 in signals.exp"
- # Give the signal time to get delivered
+ "next to ++count #1"
sleep 2
- # Now call a function. When GDB tries to run the stack dummy,
- # it will hit the breakpoint at handler. Provided it doesn't
- # lose its cool, this is not a problem, it just has to note
- # that the breakpoint condition is false and keep going.
+ # ...call the function
gdb_test "p func1 ()" "^p func1 \\(\\)\r\n.\[0-9\]* = $void" \
- "p func1 () #1 in signals.exp"
+ "p func1 () #1"
+
+ # ...veryfiy that the cout was updated
- # Make sure the count got incremented.
+ gdb_test "p count" "= 2" "p count #1"
- # Haven't investigated this xfail
- setup_xfail "rs6000-*-*"
- setup_xfail "powerpc-*-*"
- gdb_test "p count" "= 2" "p count #1 in signals.exp"
- if { [istarget "rs6000-*-*"] || [istarget "powerpc-*-*"] } { return 0 }
+ # Now run the same test but with a breakpoint that does stop.
+
+ # ...set up the breakpoint and signal
gdb_test "condition \$handler_breakpoint_number" "now unconditional\\."
- gdb_test "next" "alarm \\(.*" "next to alarm #2 in signals.exp"
+ gdb_test "next" "alarm \\(.*" "next to alarm #2"
gdb_test "next" "\\+\\+count; /\\* second \\*/" \
- "next to ++count #2 in signals.exp"
+ "next to ++count #2"
sleep 2
- # This time we stop when GDB tries to run the stack dummy.
- # So it is OK that we do not print the return value from the function.
+ # ...call the function, which is immediatly interrupted
+
gdb_test "p func1 ()" \
"Breakpoint \[0-9\]*, handler.*
The program being debugged stopped while in a function called from GDB.*" \
- "p func1 () #2 in signals.exp"
- # But we should be able to backtrace...
- # On alpha-*-osf2.0 this test works when run manually but sometime fails when
- # run under dejagnu, making it very hard to debug the problem. Weird...
- gdb_test "bt 10" "#0.*handler.*#1.*signal handler.*#2.* main .*" "bt in signals.exp"
- # ...and continue...
- gdb_test "continue" "Continuing\\." "continue in signals.exp"
+ "p func1 () #2"
+
+ # ...verify the backtrace
+
+ gdb_test "backtrace" \
+ "#0 handler.*#1 .signal handler called.*#2 func1.*#3 .function called from gdb.*#4.*main.*" \
+ "backtrace from handler when calling func1"
+
+ # ...and continue (silently returning)
+
+ gdb_test "continue" "Continuing\\."
+
# ...and then count should have been incremented
- gdb_test "p count" "= 5" "p count #2 in signals.exp"
-
-
-# Verify that "info signals" produces reasonable output.
-#
- send_gdb "info signals\n"
- gdb_expect {
- -re "SIGHUP.*SIGINT.*SIGQUIT.*SIGILL.*SIGTRAP.*SIGABRT.*SIGEMT.*SIGFPE.*SIGKILL.*SIGBUS.*SIGSEGV.*SIGSYS.*SIGPIPE.*SIGALRM.*SIGTERM.*SIGURG.*SIGSTOP.*SIGTSTP.*SIGCONT.*SIGCHLD.*SIGTTIN.*SIGTTOU.*SIGIO.*SIGXCPU.*SIGXFSZ.*SIGVTALRM.*SIGPROF.*SIGWINCH.*SIGLOST.*SIGUSR1.*SIGUSR2.*SIGPWR.*SIGPOLL.*SIGWIND.*SIGPHONE.*SIGWAITING.*SIGLWP.*SIGDANGER.*SIGGRANT.*SIGRETRACT.*SIGMSG.*SIGSOUND.*SIGSAK.*SIGPRIO.*SIG33.*SIG34.*SIG35.*SIG36.*SIG37.*SIG38.*SIG39.*SIG40.*SIG41.*SIG42.*SIG43.*SIG44.*SIG45.*SIG46.*SIG47.*SIG48.*SIG49.*SIG50.*SIG51.*SIG52.*SIG53.*SIG54.*SIG55.*SIG56.*SIG57.*SIG58.*SIG59.*SIG60.*SIG61.*SIG62.*SIG63.*Use the \"handle\" command to change these tables.*$gdb_prompt $"\
- {pass "info signals"}
- -re "$gdb_prompt $"\
- {fail "info signals"}
- timeout {fail "(timeout) info signals"}
- }
-# Verify that "info signal" correctly handles an argument, be it a
-# symbolic signal name, or an integer ID.
-#
- send_gdb "info signal SIGTRAP\n"
- gdb_expect {
- -re ".*SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*$gdb_prompt $"\
- {pass "info signal SIGTRAP"}
- -re "$gdb_prompt $"\
- {fail "info signal SIGTRAP"}
- timeout {fail "(timeout) info signal SIGTRAP"}
- }
+ gdb_test "p count" "= 5" "p count #2"
- send_gdb "info signal 5\n"
- gdb_expect {
- -re ".*SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*$gdb_prompt $"\
- {pass "info signal 5"}
- -re "$gdb_prompt $"\
- {fail "info signal 5"}
- timeout {fail "(timeout) info signal 5"}
- }
-# Verify that "handle" with illegal arguments is gracefully, um, handled.
-#
- send_gdb "handle\n"
- gdb_expect {
- -re "Argument required .signal to handle.*$gdb_prompt $"\
- {pass "handle without arguments"}
- -re "$gdb_prompt $"\
- {fail "handle without arguments"}
- timeout {fail "(timeout) handle without arguments"}
- }
+ # Verify that "info signals" produces reasonable output.
- send_gdb "handle SIGFOO\n"
- gdb_expect {
- -re "Unrecognized or ambiguous flag word: \"SIGFOO\".*$gdb_prompt $"\
- {pass "handle with bogus SIG"}
- -re "$gdb_prompt $"\
- {fail "handle with bogus SIG"}
- timeout {fail "(timeout) handle with bogus SIG"}
- }
+ gdb_test "info signals" "SIGHUP.*SIGINT.*SIGQUIT.*SIGILL.*SIGTRAP.*SIGABRT.*SIGEMT.*SIGFPE.*SIGKILL.*SIGBUS.*SIGSEGV.*SIGSYS.*SIGPIPE.*SIGALRM.*SIGTERM.*SIGURG.*SIGSTOP.*SIGTSTP.*SIGCONT.*SIGCHLD.*SIGTTIN.*SIGTTOU.*SIGIO.*SIGXCPU.*SIGXFSZ.*SIGVTALRM.*SIGPROF.*SIGWINCH.*SIGLOST.*SIGUSR1.*SIGUSR2.*SIGPWR.*SIGPOLL.*SIGWIND.*SIGPHONE.*SIGWAITING.*SIGLWP.*SIGDANGER.*SIGGRANT.*SIGRETRACT.*SIGMSG.*SIGSOUND.*SIGSAK.*SIGPRIO.*SIG33.*SIG34.*SIG35.*SIG36.*SIG37.*SIG38.*SIG39.*SIG40.*SIG41.*SIG42.*SIG43.*SIG44.*SIG45.*SIG46.*SIG47.*SIG48.*SIG49.*SIG50.*SIG51.*SIG52.*SIG53.*SIG54.*SIG55.*SIG56.*SIG57.*SIG58.*SIG59.*SIG60.*SIG61.*SIG62.*SIG63.*Use the \"handle\" command to change these tables.*" \
+ "info signals"
- send_gdb "handle SIGHUP frump\n"
- gdb_expect {
- -re "Unrecognized or ambiguous flag word: \"frump\".*$gdb_prompt $"\
- {pass "handle SIG with bogus action"}
- -re "$gdb_prompt $"\
- {fail "handle SIG with bogus action"}
- timeout {fail "(timeout) handle SIG with bogus action"}
- }
+ # Verify that "info signal" correctly handles an argument, be it a
+ # symbolic signal name, or an integer ID.
-# Verify that "handle" can take multiple actions per SIG, and that in
-# the case of conflicting actions, that the rightmost action "wins".
-#
- send_gdb "handle SIGHUP print noprint\n"
- gdb_expect {
- -re ".*SIGHUP\[ \t\]*No\[ \t\]*No\[ \t\]*Yes\[ \t\]*Hangup.*$gdb_prompt $"\
- {pass "handle SIG with multiple conflicting actions"}
- -re "$gdb_prompt $"\
- {fail "handle SIG with multiple conflicting actions"}
- timeout {fail "(timeout) handle SIG with multiple conflicting actions"}
- }
+ gdb_test "info signal SIGTRAP" \
+ "SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*" \
+ "info signal SIGTRAP"
-# Exercise all the various actions. (We don't care what the outcome
-# is, this is just to ensure that they all can be parsed.)
-#
- send_gdb "handle SIGHUP print noprint stop nostop ignore noignore pass nopass\n"
- gdb_expect {
- -re ".*Signal.*$gdb_prompt $"\
- {pass "handle SIG parses all legal actions"}
- -re "$gdb_prompt $"\
- {fail "handle SIG parses all legal actions"}
- timeout {fail "(timeout) handle SIG parses all legal actions"}
- }
+ gdb_test "info signal 5" \
+ "SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*" \
+ "info signal 5"
-# Verify that we can "handle" multiple signals at once, interspersed
-# with actions.
-#
- send_gdb "handle SIG63 print SIGILL\n"
- gdb_expect {
- -re ".*SIGILL\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Illegal instruction.*SIG63\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Real-time event 63.*$gdb_prompt $"\
- {pass "handle multiple SIGs"}
- -re "$gdb_prompt $"\
- {fail "handle multiple SIGs"}
- timeout {fail "(timeout) handle multiple SIGs"}
- }
+ # Verify that "handle" with illegal arguments is gracefully, um,
+ # handled.
-# Verify that "handle" can take a numeric argument for the signal ID,
-# rather than a symbolic name. (This may not be portable; works for
-# HP-UX.)
-#
-# Also note that this testpoint overrides SIGTRAP, which on HP-UX at
-# least, is used to implement single-steps and breakpoints. Don't
-# expect to run the inferior after this!
-#
- send_gdb "handle 5 nopass\n"
- gdb_expect {
- -re ".*SIGTRAP is used by the debugger.*Are you sure you want to change it.*y or n.*"\
- {send_gdb "y\n"
- gdb_expect {
- -re ".*SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*$gdb_prompt $"\
- {pass "override SIGTRAP (#5)"}
- -re "$gdb_prompt $"\
- {fail "override SIGTRAP (#5)"}
- timeout {fail "(timeout) override SIGTRAP (#5)"}
- }
- }
- -re "$gdb_prompt $"\
- {fail "override SIGTRAP (#5)"}
- timeout {fail "(timeout) override SIGTRAP (#5)"}
- }
+ gdb_test "handle" \
+ "Argument required .signal to handle.*" \
+ "handle without arguments"
-# GDB doesn't seem to allow numeric signal IDs larger than 15. Verify
-# that restriction. ??rehrauer: Not sure if this is a feature or a
-# bug, actually. Why is the range 1-15?
-#
- send_gdb "handle 58\n"
- gdb_expect {
- -re "Only signals 1-15 are valid as numeric signals.*Use \"info signals\" for a list of symbolic signals.*$gdb_prompt $"\
- {pass "invalid signal number rejected"}
- -re "$gdb_prompt $"\
- {fail "invalid signal number rejected"}
- timeout {fail "(timeout) invalid signal number rejected"}
- }
+ gdb_test "handle SIGFOO" \
+ "Unrecognized or ambiguous flag word: \"SIGFOO\".*" \
+ "handle with bogus SIG"
-# Verify that we can accept a signal ID range (number-number).
-# ??rehrauer: This feature isn't documented on the quick-reference
-# card.
-#
- send_gdb "handle 13-15\n"
- gdb_expect {
- -re ".*SIGPIPE.*SIGALRM.*SIGTERM.*$gdb_prompt $"\
- {pass "handle multiple SIGs via integer range"}
- -re "$gdb_prompt $"\
- {fail "handle multiple SIGs via integer range"}
- timeout {fail "(timeout) handle multiple SIGs via integer range"}
+ gdb_test "handle SIGHUP frump" \
+ "Unrecognized or ambiguous flag word: \"frump\".*" \
+ "handle SIG with bogus action"
- }
+ # Verify that "handle" can take multiple actions per SIG, and that
+ # in the case of conflicting actions, that the rightmost action
+ # "wins".
-# Bizarrely enough, GDB also allows you to reverse the range
-# stat, stop IDs. E.g., "3-1" and "1-3" mean the same thing.
-# Probably this isn't documented, but the code anticipates it,
-# so we'd best test it...
-#
- send_gdb "handle 15-13\n"
- gdb_expect {
- -re ".*SIGPIPE.*SIGALRM.*SIGTERM.*$gdb_prompt $"\
- {pass "handle multiple SIGs via integer range"}
- -re "$gdb_prompt $"\
- {fail "handle multiple SIGs via integer range"}
- timeout {fail "(timeout) handle multiple SIGs via integer range"}
+ gdb_test "handle SIGHUP print noprint" \
+ "SIGHUP\[ \t\]*No\[ \t\]*No\[ \t\]*Yes\[ \t\]*Hangup.*" \
+ "handle SIG with multiple conflicting actions"
- }
+ # Exercise all the various actions. (We don't care what the
+ # outcome is, this is just to ensure that they all can be parsed.)
-# SIGINT is used by the debugger as well. Verify that we can change
-# our minds about changing it.
-#
- send_gdb "handle SIGINT nopass\n"
- gdb_expect {
- -re ".*SIGINT is used by the debugger.*Are you sure you want to change it.*y or n.*"\
- {send_gdb "n\n"
-# ??rehrauer: When you answer "n", the header for the signal info is
-# printed, but not the actual handler settings. Probably a bug.
-#
- gdb_expect {
- -re "Not confirmed, unchanged.*Signal.*$gdb_prompt $"\
- {pass "override SIGINT"}
- -re "$gdb_prompt $"\
- {fail "override SIGINT"}
- timeout {fail "(timeout) override SIGINT"}
- }
- }
- -re "$gdb_prompt $"\
- {fail "override SIGINT"}
- timeout {fail "(timeout) override SIGINT"}
- }
+ gdb_test "handle SIGHUP print noprint stop nostop ignore noignore pass nopass" \
+ "Signal.*" \
+ "handle SIG parses all legal actions"
+
+ # Verify that we can "handle" multiple signals at once,
+ # interspersed with actions.
+
+ gdb_test "handle SIG63 print SIGILL" \
+ "SIGILL\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Illegal instruction.*SIG63\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Real-time event 63.*" \
+ "handle multiple SIGs"
+
+ # Verify that "handle" can take a numeric argument for the signal
+ # ID, rather than a symbolic name. (This may not be portable;
+ # works for HP-UX.)
-# Verify that GDB responds gracefully to the "signal" command with
-# a missing argument.
-#
- send_gdb "signal\n"
- gdb_expect {
- -re "Argument required .signal number..*$gdb_prompt $"\
- {pass "signal without arguments disallowed"}
- -re "$gdb_prompt $"\
- {fail "signal without arguments disallowed"}
- timeout {fail "(timeout) signal without arguments disallowed"}
+ # Also note that this testpoint overrides SIGTRAP, which on HP-UX
+ # at least, is used to implement single-steps and breakpoints.
+ # Don't expect to run the inferior after this!
+
+ set test "override SIGTRAP"
+ gdb_test_multiple "handle 5 nopass" "$test" {
+ -re "SIGTRAP is used by the debugger.*Are you sure you want to change it.*y or n.*" {
+ gdb_test "y" \
+ "SIGTRAP\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*No\[ \t\]*Trace/breakpoint trap.*" \
+ "$test"
+ }
}
-# Verify that we can successfully send a signal other than 0 to
-# the inferior. (This probably causes the inferior to run away.
-# Be prepared to rerun to main for further testing.)
-#
- send_gdb "signal 5\n"
- gdb_expect {
- -re "Continuing with signal SIGTRAP.*$gdb_prompt $"\
- {pass "sent signal 5"}
- -re "$gdb_prompt $"\
- {fail "sent signal 5"}
- timeout {fail "(timeout) sent signal 5"}
+ # GDB doesn't seem to allow numeric signal IDs larger than 15. Verify
+ # that restriction. ??rehrauer: Not sure if this is a feature or a
+ # bug, actually. Why is the range 1-15?
+
+ gdb_test "handle 58" \
+ "Only signals 1-15 are valid as numeric signals.*Use \"info signals\" for a list of symbolic signals.*" \
+ "invalid signal number rejected"
+
+ # Verify that we can accept a signal ID range (number-number).
+ # ??rehrauer: This feature isn't documented on the quick-reference
+ # card.
+
+ gdb_test "handle 13-15" \
+ "SIGPIPE.*SIGALRM.*SIGTERM.*" \
+ "handle multiple SIGs via integer range"
+
+ # Bizarrely enough, GDB also allows you to reverse the range stat,
+ # stop IDs. E.g., "3-1" and "1-3" mean the same thing. Probably
+ # this isn't documented, but the code anticipates it, so we'd best
+ # test it...
+
+ gdb_test "handle 15-13" \
+ "SIGPIPE.*SIGALRM.*SIGTERM.*" \
+ "handle multiple SIGs via reverse integer range"
+
+ # SIGINT is used by the debugger as well. Verify that we can
+ # change our minds about changing it.
+
+ set test "override SIGINT"
+ gdb_test_multiple "handle SIGINT nopass" "$test" {
+ -re "SIGINT is used by the debugger.*Are you sure you want to change it.*y or n.*" {
+ gdb_test_multiple "n" "$test" {
+ -re "Not confirmed, unchanged.*Signal.*$gdb_prompt $" {
+ # "Signal ..." should not be in the output.
+ kfail gdb/1707 "$test"
+ }
+ -re "Not confirmed, unchanged.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+ }
}
+ # Verify that GDB responds gracefully to the "signal" command with
+ # a missing argument.
+
+ gdb_test "signal" \
+ "Argument required .signal number..*" \
+ "signal without arguments disallowed"
+
+ # Verify that we can successfully send a signal other than 0 to
+ # the inferior. (This probably causes the inferior to run away.
+ # Be prepared to rerun to main for further testing.)
+
+ gdb_test "signal SIGUSR1" "Breakpoint.*handler.*"
+ gdb_test "bt" \
+ "#0 handler .*#1 .signal handler called.*\#2 .*main.*" \
+ "backtrace for SIGUSR1"
}
return 0
diff --git a/gdb/testsuite/gdb.base/signull.c b/gdb/testsuite/gdb.base/signull.c
new file mode 100644
index 00000000000..4139d14640e
--- /dev/null
+++ b/gdb/testsuite/gdb.base/signull.c
@@ -0,0 +1,88 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1996, 1999, 2003, 2004 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. */
+
+#include <signal.h>
+#include <setjmp.h>
+#include <stdlib.h>
+#include <string.h>
+
+enum tests {
+ code_entry_point, code_descriptor, data_read, data_write
+};
+
+static volatile enum tests test;
+
+/* Some basic types and zero buffers. */
+
+typedef long data_t;
+typedef long code_t (void);
+data_t *volatile data;
+code_t *volatile code;
+/* "desc" is intentionally initialized to a data object. This is
+ needed to test function descriptors on arches like ia64. */
+data_t zero[10];
+code_t *volatile desc = (code_t *) (void *) zero;
+
+sigjmp_buf env;
+
+extern void
+keeper (int sig)
+{
+ siglongjmp (env, 0);
+}
+
+extern long
+bowler (void)
+{
+ switch (test)
+ {
+ case data_read:
+ /* Try to read address zero. */
+ return (*data);
+ case data_write:
+ /* Try to write (the assignment) to address zero. */
+ return (*data) = 1;
+ case code_entry_point:
+ /* For typical architectures, call a function at address
+ zero. */
+ return (*code) ();
+ case code_descriptor:
+ /* For atypical architectures that use function descriptors,
+ call a function descriptor, the code field of which is zero
+ (which has the effect of jumping to address zero). */
+ return (*desc) ();
+ }
+}
+
+int
+main ()
+{
+ static volatile int i;
+
+ struct sigaction act;
+ memset (&act, 0, sizeof act);
+ act.sa_handler = keeper;
+ sigaction (SIGSEGV, &act, NULL);
+
+ for (i = 0; i < 10; i++)
+ {
+ sigsetjmp (env, 1);
+ bowler ();
+ }
+}
diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp
new file mode 100644
index 00000000000..59b1a5647e6
--- /dev/null
+++ b/gdb/testsuite/gdb.base/signull.exp
@@ -0,0 +1,122 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2004 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.
+
+# Check that GDB can trigger and backtrace SIGSEGV signal stacks
+# caused by both accessing (data) and executing (code) at address
+# zero.
+
+# On function descriptor architectures, a zero descriptor, instead of
+# a NULL pointer, is used. That way the NULL code test always
+# contains a zero code reference.
+
+# For recovery, sigjmp/longjmp are used.
+
+# This also tests backtrace/gdb1476.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "signull"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+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."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# If we can examine what's at memory address 0, it is possible that we
+# could also execute it. This could probably make us run away,
+# executing random code, which could have all sorts of ill effects,
+# especially on targets without an MMU. Don't run the tests in that
+# case.
+
+send_gdb "x 0\n"
+gdb_expect {
+ -re "0x0:.*Cannot access memory at address 0x0.*$gdb_prompt $" { }
+ -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { }
+ -re ".*$gdb_prompt $" {
+ untested "Memory at address 0 is possibly executable"
+ return
+ }
+}
+
+# If an attempt to call a NULL pointer leaves the inferior in main,
+# then function pointers are descriptors, probe this and remember the
+# result.
+
+gdb_test "set test = code_entry_point" "" "set for function pointer probe"
+set test "probe function pointer"
+set function_pointer code_entry_point
+gdb_test_multiple "continue" "$test" {
+ -re "Program received signal SIGSEGV.*bowler .*$gdb_prompt $" {
+ set function_pointer code_descriptor
+ pass "$test (function descriptor)"
+ }
+ -re "Program received signal SIGSEGV.*0.*$gdb_prompt $" {
+ pass "$test (function entry-point)"
+ }
+}
+
+# Re-start from scratch, breakpoint the bowler so that control is
+# regained after each test, and run up to that.
+rerun_to_main
+gdb_test "break bowler"
+gdb_test "break keeper"
+# By default Stop:Yes Print:Yes Pass:Yes
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
+
+# For the given signal type, check that: the SIGSEGV occures; a
+# backtrace from the SEGV works; the sigsegv is delivered; a backtrace
+# through the SEGV works.
+
+proc test_segv { name tag bt_from_segv bt_from_keeper } {
+ gdb_test continue "Breakpoint.* bowler.*" "${name}; start with the bowler"
+ # NB: Don't use $tag in the testname - changes across systems.
+ gdb_test "set test = $tag" "" "${name}; select the pointer type"
+ gdb_test continue "Program received signal SIGSEGV.*" \
+ "${name}; take the SIGSEGV"
+ gdb_test backtrace $bt_from_segv "${name}; backtrace from SIGSEGV"
+ gdb_test continue "Breakpoint.* keeper.*" "${name}; continue to the keeper"
+ gdb_test backtrace $bt_from_keeper "${name}; backtrace from keeper through SIGSEGV"
+}
+
+test_segv "data read" data_read \
+ {#0 .* bowler .*#1 .* main .*} \
+ {#0 .* keeper .*#1 .* handler .*#2 .* bowler .*#3 .* main .*}
+test_segv "data write" data_write \
+ {#0 .* bowler .*#1 .* main .*} \
+ {#0 .* keeper .*#1 .* handler .*#2 .* bowler .*#3 .* main .*}
+test_segv code $function_pointer \
+ {#0 .* 0x0+ .*#1 .* bowler .*#2 .* main .*} \
+ {#0 .* keeper .*#1 .* handler .*#2 .* 0x0+ .*#3 .* bowler .*#4 .* main .*}
diff --git a/gdb/testsuite/gdb.base/sigstep.c b/gdb/testsuite/gdb.base/sigstep.c
new file mode 100644
index 00000000000..0f0d8b7a4f0
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sigstep.c
@@ -0,0 +1,68 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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.
+
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/time.h>
+
+static volatile int done;
+
+static void
+handler (int sig)
+{
+ done = 1;
+} /* handler */
+
+struct itimerval itime;
+struct sigaction action;
+
+/* The enum is so that GDB can easily see these macro values. */
+enum {
+ itimer_real = ITIMER_REAL,
+ itimer_virtual = ITIMER_VIRTUAL
+} itimer = ITIMER_VIRTUAL;
+
+main ()
+{
+
+ /* Set up the signal handler. */
+ memset (&action, 0, sizeof (action));
+ action.sa_handler = handler;
+ sigaction (SIGVTALRM, &action, NULL);
+ sigaction (SIGALRM, &action, NULL);
+
+ /* The values needed for the itimer. This needs to be at least long
+ enough for the setitimer() call to return. */
+ memset (&itime, 0, sizeof (itime));
+ itime.it_value.tv_usec = 250 * 1000;
+
+ /* Loop for ever, constantly taking an interrupt. */
+ while (1)
+ {
+ /* Set up a one-off timer. A timer, rather than SIGSEGV, is
+ used as after a timer handler finishes the interrupted code
+ can safely resume. */
+ setitimer (itimer, &itime, NULL);
+ /* Wait. */
+ while (!done);
+ done = 0;
+ }
+}
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
new file mode 100644
index 00000000000..55de44520f8
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sigstep.exp
@@ -0,0 +1,423 @@
+# Copyright 2004 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.
+
+
+# The program sigstep.c creates a very simple backtrace containing one
+# signal handler and signal trampoline. A flag is set and then the
+# handler returns. This is repeated at infinitum.
+
+# This test runs the program up to the signal handler, and then
+# attempts to step/next out of the handler and back into main.
+
+if [target_info exists gdb,nosignals] {
+ verbose "Skipping sigstep.exp because of nosignals."
+ continue
+}
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile sigstep
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile ${module}.c"
+ return -1
+}
+
+# get things started
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "display/i \$pc"
+
+# Advance to main
+if { ![runto_main] } then {
+ gdb_suppress_tests;
+}
+
+# Pass all the alarms straight through (but verbosely)
+# gdb_test "handle SIGALRM print pass nostop"
+# gdb_test "handle SIGVTALRM print pass nostop"
+# gdb_test "handle SIGPROF print pass nostop"
+
+# Run to the signal handler, validate the backtrace.
+gdb_test "break handler"
+gdb_test "continue" ".* handler .*" "continue to stepi handler"
+send_gdb "bt\n"
+gdb_expect_list "backtrace for nexti" ".*$gdb_prompt $" {
+ "\[\r\n\]+.0 \[^\r\n\]* handler "
+ "\[\r\n\]+.1 .signal handler called."
+ "\[\r\n\]+.2 \[^\r\n\]* main .*"
+}
+
+proc advance { i } {
+ global gdb_prompt
+ set prefix "$i from handler"
+
+ # Get us back into the handler
+ gdb_test "continue" ".* handler .*" "$prefix; continue to handler"
+
+ set test "$prefix; leave handler"
+ gdb_test_multiple "$i" "${test}" {
+ -re "done = 1;.*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue -continue_timer
+ }
+ -re "\} .. handler .*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue -continue_timer
+ }
+ -re "Program exited normally.*${gdb_prompt} $" {
+ setup_kfail powerpc-*-*bsd* gdb/1639
+ fail "$test (program exited)"
+ }
+ -re "(while ..done|done = 0).*${gdb_prompt} $" {
+ # After stepping out of a function /r signal-handler, GDB will
+ # advance the inferior until it is at the first instruction of
+ # a code-line. While typically things return to the middle of
+ # the "while..." (and hence GDB advances the inferior to the
+ # "return..." line) it is also possible for the return to land
+ # on the first instruction of "while...". Accept both cases.
+ pass "$test"
+ }
+ }
+}
+
+proc advancei { i } {
+ global gdb_prompt
+ set prefix "$i from handleri"
+ set program_exited 0
+
+ # Get us back into the handler
+ gdb_test "continue" ".* handler .*" "$prefix; continue to handler"
+
+ set test "$prefix; leave handler"
+ gdb_test_multiple "$i" "${test}" {
+ -re "Cannot insert breakpoint 0.*${gdb_prompt} $" {
+ # Some platforms use a special read-only page for signal
+ # trampolines. We can't set a breakpoint there, and we
+ # don't gracefully fall back to single-stepping.
+ setup_kfail "i?86-*-linux*" gdb/1736
+ fail "$test (could not set breakpoint)"
+ return
+ }
+ -re "done = 1;.*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue -continue_timer
+ }
+ -re "\} .. handler .*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue -continue_timer
+ }
+ -re "signal handler called.*${gdb_prompt} $" {
+ pass "$test"
+ }
+ -re "main .*${gdb_prompt} $" {
+ fail "$test (in main)"
+ }
+ -re "Program exited normally.*${gdb_prompt} $" {
+ fail "$test (program exited)"
+ set program_exited 1
+ }
+ -re "Make handler return now.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue -continue_timer
+ }
+ }
+
+ set test "$prefix; leave signal trampoline"
+ gdb_test_multiple "$i" "${test}" {
+ -re "while .*${gdb_prompt} $" {
+ pass "$test (in main)"
+ }
+ -re "signal handler called.*${gdb_prompt} $" {
+ send_gdb "$i\n"
+ exp_continue -continue_timer
+ }
+ -re "return .*${gdb_prompt} $" {
+ fail "$test (stepped)"
+ }
+ -re "Make .*frame return now.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue -continue_timer
+ }
+ -re "Program exited normally.*${gdb_prompt} $" {
+ kfail gdb/1639 "$test (program exited)"
+ set program_exited 1
+ }
+ -re "The program is not being run.*${gdb_prompt} $" {
+ if { $program_exited } {
+ # Previously kfailed with an exit
+ pass "$test (the program is not being run)"
+ } else {
+ fail "$test (the program is not being run)"
+ }
+ }
+ }
+}
+
+# Check that we can step/next our way out of a signal handler.
+
+advance step
+advancei stepi
+
+advance next
+advancei nexti
+
+advancei finish
+advancei return
+gdb_test "set done = 1" "" "Set done as return will have skipped it"
+
+
+# Check that we can step/next our way into / over a signal handler.
+
+# There are at least the following cases: breakpoint @pc VS breakpoint
+# in handler VS step / next / continue.
+
+# Use the real-time itimer, as otherwize the process never gets enough
+# time to expire the timer.
+
+delete_breakpoints
+set infinite_loop [gdb_get_line_number {while (!done)}]
+gdb_test "set itimer = itimer_real"
+gdb_test "break [gdb_get_line_number {done = 0}]"
+
+# Try stepping when there's a signal pending, and a breakpoint at the
+# handler. Should step into the signal handler.
+
+proc skip_to_handler { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i to handler"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ # Advance to the infinite loop
+ gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ # Insert / remove the handler breakpoint.
+ gdb_test "break handler" "" "$prefix; break handler"
+ gdb_test "$i" " handler .*" "$prefix; performing $i"
+ gdb_test "clear handler" "" "$prefix; clear handler"
+}
+
+skip_to_handler step
+skip_to_handler next
+skip_to_handler continue
+
+# Try stepping when there's a signal pending, and a breakpoint at the
+# handler's entry-point. Should step into the signal handler stopping
+# at the entry-point.
+
+# Some systems (e.x., GNU/Linux as of 2004-08-30), when delivering a
+# signal, resume the process at the first instruction of the signal
+# handler and not the first instruction of the signal trampoline. The
+# stack is constructed such that the signal handler still appears to
+# have been called by the trampoline code. This test checks that it
+# is possible to stop the inferior, even at that first instruction.
+
+proc skip_to_handler_entry { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i to handler entry"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ # Advance to the infinite loop
+ gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ # Insert / remove the handler breakpoint.
+ gdb_test "break *handler" "" "$prefix; break handler"
+ gdb_test "$i" " handler .*" "$prefix; performing $i"
+ gdb_test "clear *handler" "" "$prefix; clear handler"
+}
+
+skip_to_handler_entry step
+skip_to_handler_entry next
+skip_to_handler_entry continue
+
+# Try stepping when there's a signal pending but no breakpoints.
+# Should skip the handler advancing to the next line.
+
+proc skip_over_handler { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i over handler"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ # Advance to the infinite loop
+ gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ gdb_test "$i" "done = 0.*" "$prefix; performing $i"
+}
+
+skip_over_handler step
+skip_over_handler next
+skip_over_handler continue
+
+# Try stepping when there's a signal pending, a pre-existing
+# breakpoint at the current instruction, and a breakpoint in the
+# handler. Should advance to the signal handler.
+
+proc breakpoint_to_handler { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i on breakpoint, to handler"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
+ gdb_test "break handler" "" "$prefix; break handler"
+
+ # Continue to the infinite loop
+ gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ setup_kfail "i*86-*-*" gdb/1738
+ gdb_test "$i" " handler .*" "$prefix; performing $i"
+ gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
+ gdb_test "clear handler" "" "$prefix; clear handler"
+}
+
+breakpoint_to_handler step
+breakpoint_to_handler next
+breakpoint_to_handler continue
+
+# Try stepping when there's a signal pending, and a breakpoint at the
+# handler's entry instruction and a breakpoint at the current
+# instruction. Should step into the signal handler and breakpoint at
+# that entry instruction.
+
+# Some systems (e.x., GNU/Linux as of 2004-08-30), when delivering a
+# signal, resume the process at the first instruction of the signal
+# handler and not the first instruction of the signal trampoline. The
+# stack is constructed such that the signal handler still appears to
+# have been called by the trampoline code. This test checks that it
+# is possible to stop the inferior, even at that first instruction.
+
+proc breakpoint_to_handler_entry { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i on breakpoint, to handler entry"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
+ gdb_test "break *handler" "" "$prefix; break handler"
+
+ # Continue to the infinite loop
+ gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ setup_kfail "i*86-*-*" gdb/1738
+ gdb_test "$i" " handler .*" "$prefix; performing $i"
+ gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
+ gdb_test "clear *handler" "" "$prefix; clear handler"
+}
+
+breakpoint_to_handler_entry step
+breakpoint_to_handler_entry next
+breakpoint_to_handler_entry continue
+
+# Try stepping when there's a signal pending, and a pre-existing
+# breakpoint at the current instruction, and no breakpoint in the
+# handler. Should advance to the next line.
+
+proc breakpoint_over_handler { i } {
+ global gdb_prompt
+ global infinite_loop
+ set prefix "$i on breakpoint, skip handler"
+
+ # Run around to the done
+ set test "$prefix; resync"
+ gdb_test_multiple "continue" "$test" {
+ -re "done = 0.*$gdb_prompt " {
+ pass "$test"
+ }
+ # other patterns can go here
+ }
+
+ gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
+
+ # Continue to the infinite loop
+ gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
+
+ # Make the signal pending
+ sleep 1
+
+ gdb_test "$i" "done = 0.*" "$prefix; performing $i"
+ gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
+}
+
+breakpoint_over_handler step
+breakpoint_over_handler next
+breakpoint_over_handler continue
diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp
index 7fcbe0e37e7..b10ffbc13e8 100644
--- a/gdb/testsuite/gdb.base/sizeof.exp
+++ b/gdb/testsuite/gdb.base/sizeof.exp
@@ -1,4 +1,6 @@
-# Copyright 2000, 2002 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2000, 2002, 2003, 2004 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
@@ -14,8 +16,10 @@
# 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
+if [target_info exists gdb,noinferiorio] {
+ verbose "Skipping fileio.exp because of no fileio capabilities."
+ continue
+}
if $tracelevel {
strace $tracelevel
@@ -58,15 +62,13 @@ if ![runto_main] then {
proc get_valueof { fmt exp default } {
global gdb_prompt
- send_gdb "print${fmt} ${exp}\n"
- gdb_expect {
+
+ set test "get valueof \"${exp}\""
+ set val ${default}
+ gdb_test_multiple "print${fmt} ${exp}" "$test" {
-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
set val $expect_out(1,string)
- pass "get value of ${exp} ($val)"
- }
- timeout {
- set size ${default}
- fail "get value of ${exp} (timeout)"
+ pass "$test ($val)"
}
}
return ${val}
@@ -98,23 +100,8 @@ set sizeof_long_double [get_sizeof "long double" 8]
proc check_sizeof { type size } {
global gdb_prompt
- if [gdb_skip_stdio_test "check sizeof $type == $size"] {
- return;
- }
-
set pat [string_to_regexp "sizeof (${type}) == ${size}"]
- send_gdb "next\n"
- gdb_expect {
- -re "${pat}\[\r\n\].*$gdb_prompt $" {
- pass "check sizeof ${type} == ${size}"
- }
- -re ".*$gdb_prompt $" {
- fail "check sizeof ${type} == ${size}"
- }
- timeout {
- fail "check sizeof ${type} == ${size} (timeout)"
- }
- }
+ gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check sizeof \"$type\""
}
check_sizeof "char" ${sizeof_char}
@@ -133,23 +120,8 @@ check_sizeof "long double" ${sizeof_long_double}
proc check_valueof { exp val } {
global gdb_prompt
- if [gdb_skip_stdio_test "check valueof $exp == $val"] {
- return;
- }
-
set pat [string_to_regexp "valueof (${exp}) == ${val}"]
- send_gdb "next\n"
- gdb_expect {
- -re "${pat}\[\r\n\].*$gdb_prompt $" {
- pass "check valueof ${exp} == ${val}"
- }
- -re ".*$gdb_prompt $" {
- fail "check valueof ${exp} == ${val}"
- }
- timeout {
- fail "check valueof ${exp} == ${val} (timeout)"
- }
- }
+ gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\""
}
# Check that GDB and the target agree over the sign of a character.
diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp
index 7a6bd19ff29..1878298a6d3 100644
--- a/gdb/testsuite/gdb.base/step-test.exp
+++ b/gdb/testsuite/gdb.base/step-test.exp
@@ -1,5 +1,7 @@
-# Copyright 1997, 1998, 1999, 2000, 2002, 2001, 2003
-# Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1997, 1998, 1999, 2000, 2002, 2001, 2003, 2004 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
@@ -14,14 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# use this to debug:
-#
-#log_user 1
-
# step-test.exp -- Expect script to test stepping in gdb
if $tracelevel then {
@@ -80,12 +74,15 @@ gdb_test "step" ".*${decimal}.*myglob.*" "step into"
# On IA-64, we also end up on callee instead of on the next line due
# to the restoration of the global pointer (which is a caller-save).
# Similarly on MIPS PIC targets.
+set test "step out"
if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
- send_gdb "finish\n"
- gdb_expect {
- -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { pass "step out 1" }
- -re ".*${decimal}.*callee.*INTO.*$gdb_prompt $" { pass "step out 2" }
- timeout { fail "step out" }
+ gdb_test_multiple "finish" "$test" {
+ -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re ".*${decimal}.*callee.*INTO.*$gdb_prompt $" {
+ pass "$test"
+ }
}
} else {
gdb_test "finish" ".*${decimal}.*a.*5.*= a.*3.*" "step out"
@@ -110,31 +107,19 @@ proc test_i {name command here there} {
global gdb_prompt
set i 0
- while 1 {
- send_gdb "${command}\n"
- gdb_expect {
- -re "$here.*$gdb_prompt $" {
- # Okay, we're still on the same line. Just step again.
- }
- -re "$there.*$gdb_prompt $" {
- # We've reached the next line. Rah.
- pass "$name"
- return
- }
- -re "$gdb_prompt $" {
- # We got something else. Fail.
- fail "$name"
- return
- }
- timeout {
- fail "$name (timeout)"
+ gdb_test_multiple "$command" "$name" {
+ -re "$here.*$gdb_prompt $" {
+ # Have we gone for too many steps without seeing any progress?
+ if {[incr i] >= 100} {
+ fail "$name (no progress after 100 steps)"
return
}
+ send_gdb "$command\n"
+ exp_continue
}
-
- # Have we gone for too many steps without seeing any progress?
- if {[incr i] >= 100} {
- fail "$name (no progress after 100 steps)"
+ -re "$there.*$gdb_prompt $" {
+ # We've reached the next line. Rah.
+ pass "$name"
return
}
}
@@ -157,46 +142,35 @@ test_i "stepi into function's first source line" "stepi" \
# Have to be careful here, if the finish does not work,
# then we may run to the end of the program, which
# will cause erroneous failures in the rest of the tests
-send_gdb "finish\n"
-gdb_expect {
- -re ".*(Program received|Program exited).*$gdb_prompt $" {
- # Oops... We ran to the end of the program... Better reset
- if {![runto_main]} then {
- fail "Can't run to main"
- return 0
+set test "stepi: finish call"
+gdb_test_multiple "finish" "$test" {
+ -re ".*${decimal}.*callee.*NEXTI.*$gdb_prompt $" {
+ pass "$test"
}
- if {![runto step-test.c:45]} {
- fail "Can't run to line 45"
- return 0
+ -re ".*(Program received|Program exited).*$gdb_prompt $" {
+ # Oops... We ran to the end of the program... Better reset
+ if {![runto_main]} then {
+ fail "$test (Can't run to main)"
+ return 0
+ }
+ if {![runto step-test.c:45]} {
+ fail "$test (Can't run to line 45)"
+ return 0
+ }
+ fail "$test"
}
- fail "stepi: finish call"
- }
- -re ".*${decimal}.*callee.*NEXTI.*$gdb_prompt $" {
- pass "stepi: finish call"
- }
- -re ".*${decimal}.*callee.*STEPI.*$gdb_prompt $" {
- # On PA64, we end up at a different instruction than PA32.
- # On IA-64, we end up on callee instead of on the following line due
- # to the restoration of the global pointer.
- # Similarly on MIPS PIC targets.
- if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
- pass "stepi: finish call 2"
- test_i "stepi: past call" "stepi" \
- ".*${decimal}.*callee.*STEPI" ".*${decimal}.*callee.*NEXTI"
- } else {
- fail "stepi: finish call 2"
- return
+ -re ".*${decimal}.*callee.*STEPI.*$gdb_prompt $" {
+ # On PA64, we end up at a different instruction than PA32.
+ # On IA-64, we end up on callee instead of on the following line due
+ # to the restoration of the global pointer.
+ # Similarly on MIPS PIC targets.
+ if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
+ test_i "$test" "stepi" \
+ ".*${decimal}.*callee.*STEPI" ".*${decimal}.*callee.*NEXTI"
+ } else {
+ fail "$test"
+ }
}
- }
- -re "$gdb_prompt $" {
- # We got something else. Fail.
- fail "stepi: finish call"
- return
- }
- timeout {
- fail "stepi: finish call (timeout)"
- return
- }
}
test_i "nexti over function" "nexti" \
@@ -223,22 +197,16 @@ gdb_test \
gdb_test "continue" \
".*Breakpoint ${decimal},.*large_struct_by_value.*" \
"run to pass large struct"
-send_gdb "step\n"
-gdb_expect {
+set test "large struct by value"
+gdb_test_multiple "step" "$test" {
-re ".*step-test.exp: arrive here 1.*$gdb_prompt $" {
- pass "large struct by value"
+ pass "$test"
}
-re ".*(memcpy|bcopy).*$gdb_prompt $" {
send_gdb "finish\n" ; gdb_expect -re "$gdb_prompt $"
send_gdb "step\n"
exp_continue
}
- -re ".*$gdb_prompt $" {
- fail "large struct by value"
- }
- timeout {
- fail "large struct by value (timeout)"
- }
}
gdb_continue_to_end "step-test.exp"
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 49e05ef814d..7b92eca3bf7 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -1,4 +1,6 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2002, 2003, 2004 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
@@ -14,9 +16,6 @@
# 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@gnu.org
-
if $tracelevel {
strace $tracelevel
}
@@ -31,7 +30,7 @@ set testfile "store"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
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."
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -55,16 +54,24 @@ if ![runto_main] then {
#
proc check_set { t l r new add } {
- global gdb_prompt
+ set prefix "var ${t} l"
gdb_test "tbreak wack_${t}"
- gdb_test "continue" "register ${t} l = u, r = v;" "continue to wack_${t}"
- gdb_test "next" "l = add_${t} .l, r.;" "next ${t}"
- gdb_test "print l" " = ${l}" "print old l - ${t}"
- gdb_test "print r" " = ${r}" "print old r - ${t}"
- gdb_test "set variable l = 4"
- gdb_test "print l" " = ${new}" "print new l - ${t}"
- gdb_test "next" "return l \\+ r;"
- gdb_test "print l" " = ${add}" "print add - ${t}"
+ gdb_test "continue" "register ${t} l = u, r = v;" \
+ "continue to wack_${t}"
+ gdb_test "next" "l = add_${t} .l, r.;" \
+ "${prefix}; next ${t}"
+ gdb_test "print l" " = ${l}" \
+ "${prefix}; print old l, expecting ${l}"
+ gdb_test "print r" " = ${r}" \
+ "${prefix}; print old r, expecting ${r}"
+ gdb_test "set variable l = 4" "" \
+ "${prefix}; setting l to 4"
+ gdb_test "print l" " = ${new}" \
+ "${prefix}; print new l, expecting ${l}"
+ gdb_test "next" "return l \\+ r;" \
+ "${prefix}; next over add call"
+ gdb_test "print l" " = ${add}" \
+ "${prefix}; print incremented l, expecting ${add}"
}
check_set "charest" "-1 .*" "-2 .*" "4 ..004." "2 ..002."
@@ -79,14 +86,20 @@ check_set "doublest" "-1" "-2" "4" "2"
#
proc up_set { t l r new } {
- global gdb_prompt
+ set prefix "upvar ${t} l"
gdb_test "tbreak add_${t}"
- gdb_test "continue" "return u . v;" "continue to add_${t}"
- gdb_test "up" "l = add_${t} .l, r.;" "up ${t}"
- gdb_test "print l" " = ${l}" "up print old l - ${t}"
- gdb_test "print r" " = ${r}" "up print old r - ${t}"
- gdb_test "set variable l = 4"
- gdb_test "print l" " = ${new}" "up print new l - ${t}"
+ gdb_test "continue" "return u . v;" \
+ "continue to add_${t}"
+ gdb_test "up" "l = add_${t} .l, r.;" \
+ "${prefix}; up"
+ gdb_test "print l" " = ${l}" \
+ "${prefix}; print old l, expecting ${l}"
+ gdb_test "print r" " = ${r}" \
+ "${prefix}; print old r, expecting ${r}"
+ gdb_test "set variable l = 4" "" \
+ "${prefix}; set l to 4"
+ gdb_test "print l" " = ${new}" \
+ "${prefix}; print new l, expecting ${new}"
}
up_set "charest" "-1 .*" "-2 .*" "4 ..004."
@@ -101,14 +114,18 @@ up_set "doublest" "-1" "-2" "4"
#
proc check_struct { t old new } {
- global gdb_prompt
+ set prefix "var struct ${t} u"
gdb_test "tbreak wack_struct_${t}"
gdb_test "continue" "int i; register struct s_${t} u = z_${t};" \
- "continue set struct ${t}"
- gdb_test "next 2" "add_struct_${t} .u.;"
- gdb_test "print u" " = ${old}" "old check struct ${t}"
- gdb_test "set variable u = s_${t}"
- gdb_test "print u" " = ${new}" "new check struct ${t}"
+ "continue to wack_struct_${t}"
+ gdb_test "next 2" "add_struct_${t} .u.;" \
+ "${prefix}; next to add_struct_${t} call"
+ gdb_test "print u" " = ${old}" \
+ "${prefix}; print old u, expecting ${old}"
+ gdb_test "set variable u = s_${t}" "" \
+ "${prefix}; set u to s_${t}"
+ gdb_test "print u" " = ${new}" \
+ "${prefix}; print new u, expecting ${new}"
}
check_struct "1" "{s = \\{0}}" "{s = \\{1}}"
@@ -117,14 +134,18 @@ check_struct "3" "{s = \\{0, 0, 0}}" "{s = \\{1, 2, 3}}"
check_struct "4" "{s = \\{0, 0, 0, 0}}" "{s = \\{1, 2, 3, 4}}"
proc up_struct { t old new } {
- global gdb_prompt
+ set prefix "up struct ${t} u"
gdb_test "tbreak add_struct_${t}"
gdb_test "continue" "for .i = 0; i < sizeof .s. / sizeof .s.s.0..; i..." \
- "continue up struct ${t}"
- gdb_test "up" "u = add_struct_${t} .u.;" "up struct ${t}"
- gdb_test "print u" " = ${old}" "old up struct ${t}"
- gdb_test "set variable u = s_${t}"
- gdb_test "print u" " = ${new}" "new up struct ${t}"
+ "continue to add_struct_${t}"
+ gdb_test "up" "u = add_struct_${t} .u.;" \
+ "${prefix}; up"
+ gdb_test "print u" " = ${old}" \
+ "${prefix}; print old u, expecting ${old}"
+ gdb_test "set variable u = s_${t}" "" \
+ "${prefix}; set u to s_${t}"
+ gdb_test "print u" " = ${new}" \
+ "${prefix}; print new u, expecting ${new}"
}
up_struct "1" "{s = \\{0}}" "{s = \\{1}}"
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index 4d282d2e58d..84435df84f1 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -218,11 +218,8 @@ proc test_struct_calls { n } {
set tests "call $n ${testfile}"
# Call fun${n}, checking the printed return-value.
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
- setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+ setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun<n>(); ${tests}"
# Check that GDB can always pass a structure to an inferior function.
@@ -233,11 +230,8 @@ proc test_struct_calls { n } {
# examining that global to confirm that the value is as expected.
gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
- setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+ setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
}
@@ -290,10 +284,6 @@ proc test_struct_returns { n } {
"advance to fun<n> for return; ${tests}"
# Check that the program invalidated the relevant global.
- setup_kfails structs-tld i*86-*-* gdb/1447
- setup_kfails structs-tld sparc64-*-* gdb/1447
- setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
- setup_kfails structs-tld x86_64-*-* gdb/1447
gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests}"
# Force the "return". This checks that the return is always
@@ -304,21 +294,21 @@ proc test_struct_returns { n } {
# The test is writen so that it only reports one FAIL/PASS for the
# entire operation. The value returned is checked further down.
- # "return_value_unknown", if non-empty, records why GDB realised
- # that it didn't know where the return value was.
+ # "return_value_known", if non-zero, indicates that GDB knew where
+ # the return value was located.
set test "return foo<n>; ${tests}"
- set return_value_unknown 0
+ set return_value_known 1
set return_value_unimplemented 0
gdb_test_multiple "return foo${n}" "${test}" {
-re "The location" {
# Ulgh, a struct return, remember this (still need prompt).
- set return_value_unknown 1
+ set return_value_known 0
exp_continue
}
-re "A structure or union" {
# Ulgh, a struct return, remember this (still need prompt).
- set return_value_unknown 1
+ set return_value_known 0
# Double ulgh. Architecture doesn't use return_value and
# hence hasn't implemented small structure return.
set return_value_unimplemented 1
@@ -339,34 +329,30 @@ proc test_struct_returns { n } {
# Check that the return-value is as expected. At this stage we're
# just checking that GDB has returned a value consistent with
- # "return_value_unknown" set above.
+ # "return_value_known" set above.
set test "value foo<n> returned; ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c L${n}" "${test}" {
-re " = [foo ${n}].*${gdb_prompt} $" {
- if $return_value_unknown {
+ if $return_value_known {
+ pass "${test}"
# This contradicts the above claim that GDB didn't
# know the location of the return-value.
- fail "${test}"
} else {
- pass "${test}"
+ fail "${test}"
}
}
-re " = [zed ${n}].*${gdb_prompt} $" {
- if $return_value_unknown {
+ if $return_value_known {
+ # This contradicts the above claim that GDB knew
+ # the location of the return-value.
+ fail "${test}"
+ } else {
# The struct return case. Since any modification
# would be by reference, and that can't happen, the
# value should be unmodified and hence Z is expected.
# Is this a reasonable assumption?
pass "${test}"
- } else {
- # This contradicts the above claim that GDB knew
- # the location of the return-value.
- fail "${test}"
}
}
-re ".*${gdb_prompt} $" {
@@ -396,23 +382,20 @@ proc test_struct_returns { n } {
"advance to fun<n> for finish; ${tests}"
# Check that the program invalidated the relevant global.
- setup_kfails structs-tld i*86-*-* gdb/1447
- setup_kfails structs-tld sparc64-*-* gdb/1447
- setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
- setup_kfails structs-tld x86_64-*-* gdb/1447
gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for finish; ${tests}"
- # Finish the function, set 'finish_value_unknown" to non-empty if the
- # return-value was not found.
+ # Finish the function, set 'finish_value_known" to non-empty if
+ # the return-value was found.
+
set test "finish foo<n>; ${tests}"
- set finish_value_unknown 0
+ set finish_value_known 1
gdb_test_multiple "finish" "${test}" {
-re "Value returned is .*${gdb_prompt} $" {
pass "${test}"
}
-re "Cannot determine contents.*${gdb_prompt} $" {
# Expected bad value. For the moment this is ok.
- set finish_value_unknown 1
+ set finish_value_known 0
pass "${test}"
}
}
@@ -421,28 +404,24 @@ proc test_struct_returns { n } {
# "p/c". If no return value was found, the 'Z' from the previous
# check that the variable was cleared, is printed.
set test "value foo<n> finished; ${tests}"
- setup_kfails structs-*tld* i*86-*-* gdb/1447
- setup_kfails structs-*tld* sparc64-*-* gdb/1447
- setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
- setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c" "${test}" {
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
- if $finish_value_unknown {
+ if $finish_value_known {
+ pass "${test}"
+ } else {
# This contradicts the above claim that GDB didn't
# know the location of the return-value.
fail "${test}"
- } else {
- pass "${test}"
}
}
-re "[zed ${n}]\[\r\n\]+${gdb_prompt} $" {
# The value didn't get found. This is "expected".
- if $finish_value_unknown {
- pass "${test}"
- } else {
+ if $finish_value_known {
# This contradicts the above claim that GDB did
# know the location of the return-value.
fail "${test}"
+ } else {
+ pass "${test}"
}
}
}
@@ -450,20 +429,17 @@ proc test_struct_returns { n } {
# Finally, check that "return" and finish" have consistent
# behavior.
- # Since both "return" and "finish" use equivalent "which
- # return-value convention" logic, both commands should have
- # identical can/can-not find return-value messages.
-
- # Note that since "call" and "finish" use common code paths, a
- # failure here is a strong indicator of problems with "store
- # return-value" code paths. Suggest looking at "return_value"
- # when investigating a fix.
+ # Since "finish" works in more cases than "return" (see
+ # RETURN_VALUE_ABI_RETURNS_ADDRESS and
+ # RETURN_VALUE_ABI_PRESERVES_ADDRESS), the "return" value being
+ # known implies that the "finish" value is known (but not the
+ # reverse).
- set test "return and finish use same convention; ${tests}"
- if {$finish_value_unknown == $return_value_unknown} {
- pass "${test}"
- } else {
+ set test "return value known implies finish value known; ${tests}"
+ if {$return_value_known && ! $finish_value_known} {
kfail gdb/1444 "${test}"
+ } else {
+ pass "${test}"
}
}
diff --git a/gdb/testsuite/gdb.base/structs2.exp b/gdb/testsuite/gdb.base/structs2.exp
index c3c4e671c5e..e7f6553c650 100644
--- a/gdb/testsuite/gdb.base/structs2.exp
+++ b/gdb/testsuite/gdb.base/structs2.exp
@@ -29,6 +29,12 @@ set testfile "structs2"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
# build the first test case
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
# built the second test case since we can't use prototypes
@@ -64,10 +70,16 @@ gdb_test "break param_reg" \
"Breakpoint .* at .*" \
"structs2 breakpoint set"
+if [test_compiler_info gcc-*-*] {
+ setup_xfail hppa*-* gcc/15860
+}
gdb_test "continue" \
".*pr_char=120.*pr_uchar=130.*pr_short=32000.*pr_ushort=33000.*bkpt = 1.*" \
"structs2 continue1"
+if [test_compiler_info gcc-*-*] {
+ setup_xfail hppa*-* gcc/15860
+}
gdb_test "continue" \
".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
"structs2 continue2"
diff --git a/gdb/testsuite/gdb.base/unload.c b/gdb/testsuite/gdb.base/unload.c
new file mode 100644
index 00000000000..5c5e3d3c1d8
--- /dev/null
+++ b/gdb/testsuite/gdb.base/unload.c
@@ -0,0 +1,58 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 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. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+
+int k = 0;
+
+#define SHLIB_NAME SHLIB_DIR "/unloadshr.sl"
+
+int main()
+{
+ void *handle;
+ int (*unloadshr) (int);
+ int y;
+ const char *msg;
+
+ handle = dlopen (SHLIB_NAME, RTLD_LAZY);
+ msg = dlerror ();
+
+ if (!handle)
+ {
+ fprintf (stderr, msg);
+ exit (1);
+ }
+
+ unloadshr = (int (*)(int))dlsym (handle, "shrfunc1");
+
+ if (!unloadshr)
+ {
+ fprintf (stderr, dlerror ());
+ exit (1);
+ }
+
+ y = (*unloadshr)(3);
+
+ printf ("y is %d\n", y);
+
+ dlclose (handle);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp
new file mode 100644
index 00000000000..242dcf5d08d
--- /dev/null
+++ b/gdb/testsuite/gdb.base/unload.exp
@@ -0,0 +1,144 @@
+# Copyright 2003, 2004
+# 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.
+
+# This file was created by Jeff Johnston. (jjohnstn@redhat.com)
+# The shared library compilation portion was copied from shlib-call.exp which was
+# written by Elena Zannoni (ezannoni@redhat.com).
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+# are we on a target board?
+if ![isnative] then {
+ return 0
+}
+
+set testfile "unload"
+set libfile "unloadshr"
+set libsrcfile ${libfile}.c
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set shlibdir ${objdir}/${subdir}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+set dl_lib_flag ""
+switch -glob [istarget] {
+ "hppa*-hp-hpux*" { }
+ "*-*-linux*" { set dl_lib_flag "libs=-ldl" }
+ "*-*-solaris*" { set dl_lib_flag "libs=-ldl" }
+ default { }
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"" $dl_lib_flag]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Build the shared libraries this test case needs.
+#
+
+if {$gcc_compiled == 0} {
+ if [istarget "hppa*-hp-hpux*"] then {
+ set additional_flags "additional_flags=+z"
+ } elseif { [istarget "mips-sgi-irix*"] } {
+ # Disable SGI compiler's implicit -Dsgi
+ set additional_flags "additional_flags=-Usgi"
+ } else {
+ # don't know what the compiler is...
+ set additional_flags ""
+ }
+} else {
+ if { ([istarget "powerpc*-*-aix*"]
+ || [istarget "rs6000*-*-aix*"]) } {
+ set additional_flags ""
+ } else {
+ set additional_flags "additional_flags=-fpic"
+ }
+}
+
+if {[gdb_compile "${srcdir}/${subdir}/${libsrcfile}" "${objdir}/${subdir}/${libfile}.o" object [list debug $additional_flags]] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [istarget "hppa*-*-hpux*"] {
+ remote_exec build "ld -b ${objdir}/${subdir}/${libfile}.o -o ${objdir}/${subdir}/${libfile}.sl"
+} else {
+ set additional_flags "additional_flags=-shared"
+ if {[gdb_compile "${objdir}/${subdir}/${libfile}.o" "${objdir}/${subdir}/${libfile}.sl" executable [list debug $additional_flags]] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+ gdb_step_for_stub;
+}
+
+#
+# Test setting a breakpoint in a dynamically loaded library which is
+# manually loaded and unloaded
+#
+
+gdb_test_multiple "break shrfunc1" "set pending breakpoint" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*shrfunc1.*pending." "set pending breakpoint"
+ }
+}
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*shrfunc1.*" \
+"single pending breakpoint info"
+
+set unloadshr_line [gdb_get_line_number "unloadshr break" ${srcdir}/${subdir}/${libsrcfile}]
+
+gdb_test "run" \
+"Starting program.*unload.*
+Breakpoint.*at.*
+Pending breakpoint \"shrfunc1\" resolved.*
+Breakpoint.*, shrfunc1 \\\(x=3\\\).*unloadshr.c:$unloadshr_line.*" \
+"running program"
+
+gdb_test "continue" \
+"Continuing.*y is 7.*warning: Temporarily disabling breakpoints for.*unloadshr.sl.*Program exited normally." \
+"continuing to end of program"
+
+#
+# Try to rerun program and verify that shared breakpoint is reset properly
+#
+
+gdb_test "run" \
+".*Breakpoint.*shrfunc1.*at.*unloadshr.c:$unloadshr_line.*" \
+"rerun to shared library breakpoint"
+
+gdb_test "continue" \
+"Continuing.*y is 7.*warning: Temporarily disabling breakpoints for.*unloadshr.sl.*Program exited normally." \
+"continuing to end of program second time"
+
diff --git a/gdb/config/m68k/tm-st2000.h b/gdb/testsuite/gdb.base/unloadshr.c
index 4d7a2b19bf9..3896e67ffc1 100644
--- a/gdb/config/m68k/tm-st2000.h
+++ b/gdb/testsuite/gdb.base/unloadshr.c
@@ -1,7 +1,6 @@
-/* Parameters for a Tandem ST2000 phone switch.
- Copyright (C) 1986, 1987, 1989, 199 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
- This file is part of GDB.
+ Copyright 2004 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
@@ -12,10 +11,14 @@
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. */
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
-#include "m68k/tm-m68k.h"
+int shrfunc1 (int x)
+{
+ return x + 4; /* unloadshr break */
+}
diff --git a/gdb/testsuite/gdb.base/whatis.c b/gdb/testsuite/gdb.base/whatis.c
index 63d5d3dae09..7d4a647781f 100644
--- a/gdb/testsuite/gdb.base/whatis.c
+++ b/gdb/testsuite/gdb.base/whatis.c
@@ -1,3 +1,23 @@
+/* This test program is part of GDB, the GNU debugger.
+
+ Copyright 1992, 1993, 1994, 1997, 1999, 2004
+ 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.
+ */
+
/*
* Test file with lots of different types, for testing the
* "whatis" command.
@@ -7,10 +27,6 @@
* First the basic C types.
*/
-#if !(defined (__STDC__) || defined (_AIX))
-#define signed /**/
-#endif
-
char v_char;
signed char v_signed_char;
unsigned char v_unsigned_char;
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 98af77a3417..9b41d6a2ff4 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -1,5 +1,5 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002,
+# 2003, 2004 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
@@ -15,9 +15,6 @@
# 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 Rob Savoye. (rob@cygnus.com)
if $tracelevel {
@@ -75,19 +72,9 @@ gdb_test "whatis v_char" \
"type = (unsigned char|char)" \
"whatis char"
-# If we did not use the signed keyword when compiling the file, don't
-# expect GDB to know that char is signed.
-if { $hp_cc_compiler || $hp_aCC_compiler } {
- set signed_keyword_not_used 1
-}
-if $signed_keyword_not_used then {
- set signed_char "char"
-} else {
- set signed_char "signed char"
-}
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
gdb_test "whatis v_signed_char" \
- "type = $signed_char" \
+ "type = (signed char|char)" \
"whatis signed char"
gdb_test "whatis v_unsigned_char" \
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index d4e78c11927..397a14920f2 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -18,7 +18,6 @@
# This file was written by Fred Fish. (fnf@cygnus.com)
# And rewritten by Michael Chastain <mec.gnu@mindspring.com>.
-set ws "\[\r\n\t \]+"
set nl "\[\r\n\]+"
if $tracelevel then {
@@ -27,6 +26,8 @@ if $tracelevel then {
if { [skip_cplus_tests] } { continue }
+load_lib "cp-support.exp"
+
set testfile "classes"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
@@ -36,580 +37,349 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
# Test ptype of class objects.
-#
-# This code accepts the output of gcc v2 and v3, dwarf-2 and stabs+.
-# It could use some expansion with other compilers such as hp-ux ac++.
-#
-# There are lots of variations in the output:
-#
-# . gcc -stabs+ emits debug info for implicit member functions:
-# operator=, copy ctor, ctor. gcc -gdwarf-2 does not.
-#
-# . gcc with abi version 1 puts the implicit member functions
-# at the beginning of the member function list; with abi version 2,
-# the implicit member functions are at the end of the member function
-# list. This appears as an output difference with -gstabs+.
-# gcc 3.3.X defaults to abi version 1, and gcc 3.4 will default
-# to abi version 2.
-#
-# . gcc v2 shows data members for virtual base pointers.
-# gcc v3 does not.
-#
-# . gdb always prints "class" for both "class" and "struct".
-# In the future, I should accept "struct" in case gdb improves.
proc test_ptype_class_objects {} {
- global gdb_prompt
- global ws
- global nl
# Simple type.
- gdb_test_multiple "ptype struct default_public_struct" "ptype struct default_public_struct" {
- -re "type = class default_public_struct \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype struct default_public_struct"
+ cp_test_ptype_class \
+ "ptype struct default_public_struct" "" "struct" "default_public_struct" \
+ {
+ { field public "int a;" }
+ { field public "int b;" }
}
- -re "type = class default_public_struct \{${ws}public:${ws}int a;${ws}int b;${ws}default_public_struct ?& ?operator ?=\\(default_public_struct const ?&\\);${ws}default_public_struct\\(default_public_struct const ?&\\);${ws}default_public_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype struct default_public_struct"
- }
- }
- # Same test, slightly different type.
+ # Another simple type.
- gdb_test_multiple "ptype struct explicit_public_struct" "ptype struct explicit_public_struct" {
- -re "type = class explicit_public_struct \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype struct explicit_public_struct"
- }
- -re "type = class explicit_public_struct \{${ws}public:${ws}int a;${ws}int b;${ws}explicit_public_struct ?& ?operator ?=\\(explicit_public_struct const ?&\\);${ws}explicit_public_struct\\(explicit_public_struct const ?&\\);${ws}explicit_public_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype struct explicit_public_struct"
+ cp_test_ptype_class \
+ "ptype struct explicit_public_struct" "" "struct" "explicit_public_struct" \
+ {
+ { field public "int a;" }
+ { field public "int b;" }
}
- }
- # Same test, slightly different type.
+ # Another simple type.
- gdb_test_multiple "ptype struct protected_struct" "ptype struct protected_struct" {
- -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype struct protected_struct"
+ cp_test_ptype_class \
+ "ptype struct protected_struct" "" "struct" "protected_struct" \
+ {
+ { field protected "int a;" }
+ { field protected "int b;" }
}
- -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;${ws}public:${ws}protected_struct ?& ?operator ?=\\(protected_struct const ?&\\);${ws}protected_struct\\(protected_struct const ?&\\);${ws}protected_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype struct protected_struct"
- }
- }
- # Same test, slightly different type.
+ # Another simple type.
- gdb_test_multiple "ptype struct private_struct" "ptype struct private_struct" {
- -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype struct private_struct"
+ cp_test_ptype_class \
+ "ptype struct private_struct" "" "struct" "private_struct" \
+ {
+ { field private "int a;" }
+ { field private "int b;" }
}
- -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;${ws}public:${ws}private_struct ?& ?operator ?=\\(private_struct const ?&\\);${ws}private_struct\\(private_struct const ?&\\);${ws}private_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype struct private_struct"
- }
- }
- # Similar test, bigger type.
+ # A bigger type.
- gdb_test_multiple "ptype struct mixed_protection_struct" "ptype struct mixed_protection_struct" {
- -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype struct mixed_protection_struct"
+ cp_test_ptype_class \
+ "ptype struct mixed_protection_struct" "" "struct" "mixed_protection_struct" \
+ {
+ { field public "int a;" }
+ { field public "int b;" }
+ { field private "int c;" }
+ { field private "int d;" }
+ { field protected "int e;" }
+ { field protected "int f;" }
+ { field public "int g;" }
+ { field private "int h;" }
+ { field protected "int i;" }
}
- -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;${ws}public:${ws}mixed_protection_struct ?& ?operator ?=\\(mixed_protection_struct const ?&\\);${ws}mixed_protection_struct\\(mixed_protection_struct const ?&\\);${ws}mixed_protection_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype struct mixed_protection_struct"
- }
- }
# All that again with "class" instead of "struct".
# gdb does not care about the difference anyways.
- gdb_test_multiple "ptype class public_class" "ptype class public_class" {
- -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class public_class"
+ cp_test_ptype_class \
+ "ptype class public_class" "" "class" "public_class" \
+ {
+ { field public "int a;" }
+ { field public "int b;" }
}
- -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;${ws}public_class ?& ?operator ?=\\(public_class const ?&\\);${ws}public_class\\(public_class const ?&\\);${ws}public_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class public_class"
- }
- }
- # Same test, slightly different type.
+ # Another simple type.
- gdb_test_multiple "ptype class protected_class" "ptype class protected_class" {
- -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class protected_class"
+ cp_test_ptype_class \
+ "ptype class protected_class" "" "class" "protected_class" \
+ {
+ { field protected "int a;" }
+ { field protected "int b;" }
}
- -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;${ws}public:${ws}protected_class ?& ?operator ?=\\(protected_class const ?&\\);${ws}protected_class\\(protected_class const ?&\\);${ws}protected_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class protected_class"
- }
- }
- # Same test, slightly different type.
- # The 'private' is optional but gdb always prints it.
+ # Another simple type.
- gdb_test_multiple "ptype class default_private_class" "ptype class default_private_class" {
- -re "type = class default_private_class \{${ws}(private:${ws}|)int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class default_private_class"
- }
- -re "type = class default_private_class \{${ws}(private:${ws}|)int a;${ws}int b;${ws}public:${ws}default_private_class ?& ?operator ?=\\(default_private_class const ?&\\);${ws}default_private_class\\(default_private_class const ?&\\);${ws}default_private_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class default_private_class"
+ cp_test_ptype_class \
+ "ptype class default_private_class" "" "class" "default_private_class" \
+ {
+ { field private "int a;" }
+ { field private "int b;" }
}
- }
- # Same test, slightly different type.
+ # Another simple type.
- gdb_test_multiple "ptype class explicit_private_class" "ptype class explicit_private_class" {
- -re "type = class explicit_private_class \{${ws}(private:${ws}|)int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class explicit_private_class"
- }
- -re "type = class explicit_private_class \{${ws}(private:${ws}|)int a;${ws}int b;${ws}public:${ws}explicit_private_class ?& ?operator ?=\\(explicit_private_class const ?&\\);${ws}explicit_private_class\\(explicit_private_class const ?&\\);${ws}explicit_private_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class explicit_private_class"
+ cp_test_ptype_class \
+ "ptype class explicit_private_class" "" "class" "explicit_private_class" \
+ {
+ { field private "int a;" }
+ { field private "int b;" }
}
- }
- # Similar test, bigger type.
+ # A bigger type.
- gdb_test_multiple "ptype class mixed_protection_class" "ptype struct mixed_protection_class" {
- -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class mixed_protection_class"
- }
- -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;${ws}public:${ws}mixed_protection_class ?& ?operator ?=\\(mixed_protection_class const ?&\\);${ws}mixed_protection_class\\(mixed_protection_class const ?&\\);${ws}mixed_protection_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class mixed_protection_class"
+ cp_test_ptype_class \
+ "ptype class mixed_protection_class" "" "class" "mixed_protection_class" \
+ {
+
+ { field public "int a;" }
+ { field public "int b;" }
+ { field private "int c;" }
+ { field private "int d;" }
+ { field protected "int e;" }
+ { field protected "int f;" }
+ { field public "int g;" }
+ { field private "int h;" }
+ { field protected "int i;" }
}
- }
# Here are some classes with inheritance.
# Base class.
- gdb_test_multiple "ptype class A" "ptype class A" {
- -re "type = class A \{${ws}public:${ws}int a;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class A"
+ cp_test_ptype_class \
+ "ptype class A" "" "class" "A" \
+ {
+ { field public "int a;" }
+ { field public "int x;" }
}
- -re "type = class A \{${ws}public:${ws}int a;${ws}int x;${ws}A ?& ?operator ?=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class A"
- }
- }
# Derived class.
- gdb_test_multiple "ptype class B" "ptype class B" {
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class B"
+ cp_test_ptype_class \
+ "ptype class B" "" "class" "B" \
+ {
+ { base "public A" }
+ { field public "int b;" }
+ { field public "int x;" }
}
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B ?& ?operator ?=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class B"
- }
- }
# Derived class.
- gdb_test_multiple "ptype class C" "ptype class C" {
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class C"
+ cp_test_ptype_class \
+ "ptype class C" "" "class" "C" \
+ {
+ { base "public A" }
+ { field public "int c;" }
+ { field public "int x;" }
}
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C ?& ?operator ?=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class C"
- }
- }
# Derived class, multiple inheritance.
- gdb_test_multiple "ptype class D" "ptype class D" {
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class D"
+ cp_test_ptype_class \
+ "ptype class D" "" "class" "D" \
+ {
+ { base "public B" }
+ { base "public C" }
+ { field public "int d;" }
+ { field public "int x;" }
}
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D ?& ?operator ?=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class D"
- }
- }
# Derived class.
- gdb_test_multiple "ptype class E" "ptype class E" {
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class E"
- }
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E ?& ?operator ?=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class E"
+ cp_test_ptype_class \
+ "ptype class E" "" "class" "E" \
+ {
+ { base "public D" }
+ { field public "int e;" }
+ { field public "int x;" }
}
- }
# This is a break from inheritance tests.
#
# gcc 2.X with stabs (stabs or stabs+?) used to have a problem with
# static methods whose name is the same as their argument mangling.
- gdb_test_multiple "ptype class Static" "ptype class Static" {
- -re "type = class Static \{${ws}public:${ws}static void ii\\(int, int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class Static"
- }
- -re "type = class Static \{${ws}public:${ws}Static ?& ?operator ?=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);${ws}static void ii\\(int, int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- pass "ptype class Static"
+ cp_test_ptype_class \
+ "ptype class Static" "" "class" "Static" \
+ {
+ { method public "static void ii(int, int);" }
}
- -re "type = class Static \{${ws}public:${ws}static void ii\\(int, int\\);${ws}Static ?& ?operator ?=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class Static"
- }
- }
# Here are some virtual inheritance tests.
- gdb_test_multiple "ptype class vA" "ptype class vA" {
- -re "type = class vA \{${ws}public:${ws}int va;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class vA"
- }
- -re "type = class vA \{${ws}public:${ws}int va;${ws}int vx;${ws}vA ?& ?operator ?=\\(vA const ?&\\);${ws}vA\\(vA const ?&\\);${ws}vA\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class vA"
- }
- }
-
- # With gcc 2, gdb prints the virtual base pointer.
- # With gcc 3, gdb does not print the virtual base pointer.
- # drow considers it a gdb bug if gdb prints the vbptr.
+ # A virtual base class.
- gdb_test_multiple "ptype class vB" "ptype class vB" {
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.2vA;${ws}public:${ws}int vb;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # TODO: kfail this
- fail "ptype class vB"
+ cp_test_ptype_class \
+ "ptype class vA" "" "class" "vA" \
+ {
+ { field public "int va;" }
+ { field public "int vx;" }
}
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB ?& ?operator ?=\\(vB const ?&\\);${ws}vB\\(int, ?vB const ?&\\);${ws}vB\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # See the hidden "in-charge" ctor parameter!
- # TODO: kfail this
- setup_xfail "*-*-*"
- fail "ptype class vB (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB ?& ?operator ?=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class vB"
- }
- }
- # Another class with a virtual base.
+ # A derived class with a virtual base.
- gdb_test_multiple "ptype class vC" "ptype class vC" {
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.2vA;${ws}public:${ws}int vc;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # TODO: kfail
- fail "ptype class vC"
+ cp_test_ptype_class \
+ "ptype class vB" "" "class" "vB" \
+ {
+ { base "public virtual vA" }
+ { vbase "vA" }
+ { field public "int vb;" }
+ { field public "int vx;" }
}
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC ?& ?operator ?=\\(vC const ?&\\);${ws}vC\\(int, ?vC const ?&\\);${ws}vC\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # See the hidden "in-charge" ctor parameter!
- # TODO: kfail
- setup_xfail "*-*-*"
- fail "ptype class vC (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC ?& ?operator ?=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class vC"
- }
- }
- # The classic diamond inheritance.
+ # Another derived class with a virtual base.
- gdb_test_multiple "ptype class vD" "ptype class vD" {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC ?\\* ?_vb.2vC;${ws}vB ?\\* ?_vb.2vB;${ws}public:${ws}int vd;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # TODO: kfail
- fail "ptype class vD"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class vD"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC ?\\* ?_vb.vC;${ws}vB ?\\* ?_vb.vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD ?& ?operator ?=\\(vD const ?&\\);${ws}vD\\(int, ?vD const ?&\\);${ws}vD\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # See the hidden "in-charge" ctor parameter!
- # TODO: kfail
- setup_xfail "*-*-*"
- fail "ptype class vD (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD ?& ?operator ?=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class vD"
+ cp_test_ptype_class \
+ "ptype class vC" "" "class" "vC" \
+ {
+ { base "public virtual vA" }
+ { vbase "vA" }
+ { field public "int vc;" }
+ { field public "int vx;" }
}
- }
- # One more case of virtual derivation.
+ # A classic diamond class.
- gdb_test_multiple "ptype class vE" "ptype class vE" {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD ?\\* ?_vb.2vD;${ws}public:${ws}int ve;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # TODO: kfail
- fail "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class vE"
+ cp_test_ptype_class \
+ "ptype class vD" "" "class" "vD" \
+ {
+ { base "public virtual vB" }
+ { base "public virtual vC" }
+ { vbase "vC" }
+ { vbase "vB" }
+ { field public "int vd;" }
+ { field public "int vx;" }
}
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD ?\\* ?_vb.vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE ?& ?operator ?=\\(vE const ?&\\);${ws}vE\\(int, ?vE const ?&\\);${ws}vE\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # See the hidden "in-charge" ctor parameter!
- # TODO: kfail
- setup_xfail "*-*-*"
- fail "ptype class vE (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE ?& ?operator ?=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class vE"
- }
- }
- # Another inheritance series.
+ # A class derived from a diamond class.
- gdb_test_multiple "ptype class Base1" "ptype class Base1" {
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class Base1"
- }
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 ?& ?operator ?=\\(Base1 const ?&\\);${ws}Base1\\(Base1 const ?&\\);${ws}Base1\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- pass "ptype class Base1"
- }
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);${ws}Base1 ?& ?operator ?=\\(Base1 const ?&\\);${ws}Base1\\(Base1 const ?&\\);$nl\}$nl$gdb_prompt $" {
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class Base1"
+ cp_test_ptype_class \
+ "ptype class vE" "" "class" "vE" \
+ {
+ { base "public virtual vD" }
+ { vbase "vD" }
+ { field public "int ve;" }
+ { field public "int vx;" }
}
- }
- # The second base class.
+ # Another inheritance series.
- gdb_test_multiple "ptype class Foo" "ptype class Foo" {
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class Foo"
- }
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}int operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # TODO: "int operator int()" is a bug
- # kfail "gdb/1497" "ptype class Foo"
- pass "ptype class Foo"
+ # A base class.
+
+ cp_test_ptype_class \
+ "ptype class Base1" "" "class" "Base1" \
+ {
+ { field public "int x;" }
+ { method public "Base1(int);" }
+ }
+
+ # Another base class.
+
+ cp_test_ptype_class \
+ "ptype class Foo" "" "class" "Foo" \
+ {
+ { field public "int x;" }
+ { field public "int y;" }
+ { field public "static int st;" }
+ { method public "Foo(int, int);" }
+ { method public "int operator!();" }
+ { method public "operator int();" }
+ { method public "int times(int);" }
+ } \
+ "" \
+ {
+ {
+ "operator int();"
+ "int operator int();"
+ { setup_kfail "gdb/1497" "*-*-*" }
+ }
+ {
+ "operator int();"
+ "int operator int(void);"
+ { setup_kfail "gdb/1497" "*-*-*" }
+ }
}
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- pass "ptype class Foo"
- }
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);$nl\}$nl$gdb_prompt $" {
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class Foo"
- }
- }
# A multiple inheritance derived class.
- gdb_test_multiple "ptype class Bar" "ptype class Bar" {
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar\\(int, int, int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
- pass "ptype class Bar"
- }
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar ?& ?operator ?=\\(Bar const ?&\\);${ws}Bar\\(Bar const ?&\\);${ws}Bar\\(int, int, int\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- # gcc 3.3.2 -gstabs+
- pass "ptype class Bar"
+ cp_test_ptype_class \
+ "ptype class Bar" "" "class" "Bar" \
+ {
+ { base "public Base1" }
+ { base "public Foo" }
+ { field public "int z;" }
+ { method public "Bar(int, int, int);" }
}
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar\\(int, int, int\\);${ws}Bar ?& ?operator ?=\\(Bar const ?&\\);${ws}Bar\\(Bar const ?&\\);$nl\}$nl$gdb_prompt $" {
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- pass "ptype class Bar"
- }
- }
+
}
# Test simple access to class members.
-# TODO: these test names are gross!
-# Just let the test name default.
proc test_non_inherited_member_access {} {
- global gdb_prompt
# Print non-inherited members of g_A.
- gdb_test "print g_A.a" ".* = 1" "g_A.a incorrect"
- gdb_test "print g_A.x" ".* = 2" "g_A.x incorrect"
+ gdb_test "print g_A.a" ".* = 1"
+ gdb_test "print g_A.x" ".* = 2"
# Print non-inherited members of g_B.
- gdb_test "print g_B.b" ".* = 5" "g_B.b incorrect"
- gdb_test "print g_B.x" ".* = 6" "g_B.x incorrect"
+ gdb_test "print g_B.b" ".* = 5"
+ gdb_test "print g_B.x" ".* = 6"
# Print non-inherited members of g_C.
- gdb_test "print g_C.c" ".* = 9" "g_C.c incorrect"
- gdb_test "print g_C.x" ".* = 10" "g_C.x incorrect"
+ gdb_test "print g_C.c" ".* = 9"
+ gdb_test "print g_C.x" ".* = 10"
# Print non-inherited members of g_D.
- gdb_test "print g_D.d" ".* = 19" "g_D.d incorrect"
- gdb_test "print g_D.x" ".* = 20" "g_D.x incorrect"
+ gdb_test "print g_D.d" ".* = 19"
+ gdb_test "print g_D.x" ".* = 20"
# Print non-inherited members of g_E.
- gdb_test "print g_E.e" ".* = 31" "g_E.e incorrect"
- gdb_test "print g_E.x" ".* = 32" "g_E.x incorrect"
+ gdb_test "print g_E.e" ".* = 31"
+ gdb_test "print g_E.x" ".* = 32"
}
# Test access to members of other classes.
# gdb should refuse to print them.
# (I feel old -- I remember when this was legal in C -- chastain).
-# TODO: Again, change the silly test names.
proc test_wrong_class_members {} {
- global gdb_prompt
-
- gdb_test "print g_A.b" "There is no member( or method|) named b." "print g_A.b should be error"
- gdb_test "print g_B.c" "There is no member( or method|) named c." "print g_B.c should be error"
- gdb_test "print g_B.d" "There is no member( or method|) named d." "print g_B.d should be error"
- gdb_test "print g_C.b" "There is no member( or method|) named b." "print g_C.b should be error"
- gdb_test "print g_C.d" "There is no member( or method|) named d." "print g_C.d should be error"
- gdb_test "print g_D.e" "There is no member( or method|) named e." "print g_D.e should be error"
+ gdb_test "print g_A.b" "There is no member( or method|) named b."
+ gdb_test "print g_B.c" "There is no member( or method|) named c."
+ gdb_test "print g_B.d" "There is no member( or method|) named d."
+ gdb_test "print g_C.b" "There is no member( or method|) named b."
+ gdb_test "print g_C.d" "There is no member( or method|) named d."
+ gdb_test "print g_D.e" "There is no member( or method|) named e."
}
# Test access to names that are not members of any class.
-# TODO: test names again.
proc test_nonexistent_members {} {
- global gdb_prompt
-
- gdb_test "print g_A.y" "There is no member( or method|) named y." "print g_A.y should be error"
- gdb_test "print g_B.z" "There is no member( or method|) named z." "print g_B.z should be error"
- gdb_test "print g_C.q" "There is no member( or method|) named q." "print g_C.q should be error"
- gdb_test "print g_D.p" "There is no member( or method|) named p." "print g_D.p should be error"
+ gdb_test "print g_A.y" "There is no member( or method|) named y."
+ gdb_test "print g_B.z" "There is no member( or method|) named z."
+ gdb_test "print g_C.q" "There is no member( or method|) named q."
+ gdb_test "print g_D.p" "There is no member( or method|) named p."
}
# Call a method that expects a base class parameter with base, inherited,
# and unrelated class arguments.
proc test_method_param_class {} {
- gdb_test "call class_param.Aptr_a (&g_A)" ".* = 1" "base class param->a"
- gdb_test "call class_param.Aptr_x (&g_A)" ".* = 2" "base class param->x"
- gdb_test "call class_param.Aptr_a (&g_B)" ".* = 3" "inherited class param->a"
- gdb_test "call class_param.Aptr_x (&g_B)" ".* = 4" "inherited class param->x"
- gdb_test "call class_param.Aref_a (g_A)" ".* = 1" "base class (&param)->a"
- gdb_test "call class_param.Aref_x (g_A)" ".* = 2" "base class (&param)->x"
- gdb_test "call class_param.Aref_a (g_B)" ".* = 3" "inherited class (&param)->a"
- gdb_test "call class_param.Aref_x (g_B)" ".* = 4" "inherited class (&param)->x"
- gdb_test "call class_param.Aval_a (g_A)" ".* = 1" "base class param.a"
- gdb_test "call class_param.Aval_x (g_A)" ".* = 2" "base class param.x"
- gdb_test "call class_param.Aval_a (g_B)" ".* = 3" "inherited class param.a"
- gdb_test "call class_param.Aval_x (g_B)" ".* = 4" "inherited class param.x"
+ gdb_test "call class_param.Aptr_a (&g_A)" ".* = 1"
+ gdb_test "call class_param.Aptr_x (&g_A)" ".* = 2"
+ gdb_test "call class_param.Aptr_a (&g_B)" ".* = 3"
+ gdb_test "call class_param.Aptr_x (&g_B)" ".* = 4"
+ gdb_test "call class_param.Aref_a (g_A)" ".* = 1"
+ gdb_test "call class_param.Aref_x (g_A)" ".* = 2"
+ gdb_test "call class_param.Aref_a (g_B)" ".* = 3"
+ gdb_test "call class_param.Aref_x (g_B)" ".* = 4"
+ gdb_test "call class_param.Aval_a (g_A)" ".* = 1"
+ gdb_test "call class_param.Aval_x (g_A)" ".* = 2"
+ gdb_test "call class_param.Aval_a (g_B)" ".* = 3"
+ gdb_test "call class_param.Aval_x (g_B)" ".* = 4"
gdb_test "call class_param.Aptr_a (&foo)" "Cannot resolve .*" "unrelated class *param"
gdb_test "call class_param.Aref_a (foo)" "Cannot resolve .*" "unrelated class &param"
@@ -621,7 +391,6 @@ proc test_method_param_class {} {
proc test_enums {} {
global gdb_prompt
global nl
- global ws
# print the object
@@ -670,37 +439,30 @@ proc test_enums {} {
}
# ptype on the object
- gdb_test_multiple "ptype obj_with_enum" "ptype obj_with_enum" {
- -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)ClassWithEnum::PrivEnum priv_enum;${ws}int x;$nl\}$nl$gdb_prompt $" {
- pass "ptype obj_with_enum"
- }
- -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)PrivEnum priv_enum;${ws}int x;$nl\}$nl$gdb_prompt $" {
- # NOTE: carlton/2003-02-28: One could certainly argue that
- # this output is acceptable: PrivEnum is a member of
- # ClassWithEnum, so there's no need to explicitly qualify
- # its name with "ClassWithEnum::". The truth, though, is
- # that GDB is simply forgetting that PrivEnum is a member
- # of ClassWithEnum, so we do that output for a bad reason
- # instead of a good reason. Under stabs, we probably
- # can't get this right; under DWARF-2, we can.
- #
- # gcc 2.95.3 -gdwarf-2
- # gcc 3.3.2 -gdwarf-2
- kfail "gdb/57" "ptype obj_with_enum"
- }
- -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)PrivEnum priv_enum;${ws}int x;${ws}ClassWithEnum ?& ?operator ?=\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- kfail "gdb/57" "ptype obj_with_enum"
- }
- -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)ClassWithEnum::PrivEnum priv_enum;${ws}int x;${ws}ClassWithEnum ?& ?operator ?=\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\((void|)\\);$nl\}$nl$gdb_prompt $" {
- # I think this is a PASS, but only carlton knows for sure.
- # -- chastain 2003-12-30
- #
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
- fail "ptype obj_with_enum"
+
+ # NOTE: carlton/2003-02-28: One could certainly argue that plain
+ # "PrivEnum"
+ # is acceptable: PrivEnum is a member of ClassWithEnum, so
+ # there's no need to explicitly qualify its name with
+ # "ClassWithEnum::". The truth, though, is that GDB is simply
+ # forgetting that PrivEnum is a member of ClassWithEnum, so we do
+ # that output for a bad reason instead of a good reason. Under
+ # stabs, we probably can't get this right; under DWARF-2, we can.
+
+ cp_test_ptype_class \
+ "ptype obj_with_enum" "" "class" "ClassWithEnum" \
+ {
+ { field public "ClassWithEnum::PrivEnum priv_enum;" }
+ { field public "int x;" }
+ } \
+ "" \
+ {
+ {
+ "ClassWithEnum::PrivEnum priv_enum;"
+ "PrivEnum priv_enum;"
+ { setup_kfail "gdb/57" "*-*-*" }
+ }
}
- }
# I'll do this test two different ways, because of a parser bug.
# See PR gdb/1588.
@@ -735,8 +497,6 @@ proc test_enums {} {
# Pointers to class members
proc test_pointers_to_class_members {} {
- global gdb_prompt
-
gdb_test "print Bar::z" "\\$\[0-9\]+ = \\(int ?\\( ?Bar::& ?\\) ?\\) ?Bar::z"
gdb_test "print &Foo::x" "\\$\[0-9\]+ = \\(int ?\\( ?Foo::\\* ?\\) ?\\) ?&Foo::x"
gdb_test "print (int)&Foo::x" "\\$\[0-9\]+ = 0"
@@ -753,7 +513,6 @@ proc test_pointers_to_class_members {} {
# Test static members.
proc test_static_members {} {
- global gdb_prompt
global hex
gdb_test "print Foo::st" "\\$\[0-9\]+ = 100"
@@ -860,11 +619,6 @@ proc do_tests {} {
fail "calling method for small class"
}
}
-
- # This is a random v2 demangling test.
- # This is redundant with existing tests in demangle.exp.
- # TODO: Just remove this.
- gdb_test "maint demangle inheritance1__Fv" "inheritance1\\(void\\)" "demangle"
}
do_tests
diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp
index a2a2e0a3245..de1ee3496d9 100644
--- a/gdb/testsuite/gdb.cp/ctti.exp
+++ b/gdb/testsuite/gdb.cp/ctti.exp
@@ -29,33 +29,33 @@ if $tracelevel then {
if { [skip_cplus_tests] } { continue }
set testfile "cttiadd"
-set srcfile "${srcdir}/${subdir}/${testfile}.cc"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
-set srcfile3 "${srcdir}/${subdir}/${testfile}3.cc"
-set objfile "${objdir}/${subdir}/${testfile}.o"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
-set objfile2 "${objdir}/${subdir}/${testfile}2.o"
-set objfile3 "${objdir}/${subdir}/${testfile}3.o"
+set srcfile "${testfile}.cc"
+set srcfile1 "${testfile}1.cc"
+set srcfile2 "${testfile}2.cc"
+set srcfile3 "${testfile}3.cc"
+set objfile "${testfile}.o"
+set objfile1 "${testfile}1.o"
+set objfile2 "${testfile}2.o"
+set objfile3 "${testfile}3.o"
set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile" "$objdir/$subdir/$objfile" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile3}" "${objfile3}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile3" "$objdir/$subdir/$objfile3" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile} ${objfile1} ${objfile2} ${objfile3}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1 $objdir/$subdir/$objfile2 $objdir/$subdir/$objfile3" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index d82ab1f6cf9..6c98d3ce5a4 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -38,6 +38,8 @@ set bug_id 0
if { [skip_cplus_tests] } { continue }
+load_lib "cp-support.exp"
+
set testfile "derivation"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
@@ -61,124 +63,91 @@ if ![runto 'marker1'] then {
gdb_test "up" ".*main.*" "up from marker1"
# Print class types and values.
-# See virtfunc.exp for a discussion of ptype.
# class A
-set re_class "((struct|class) A \{${ws}public:|struct A \{)"
-set re_fields "int a;${ws}int aa;"
-set re_methods "A\\((void|)\\);${ws}int afoo\\((void|)\\);${ws}int foo\\((void|)\\);"
-set re_synth_gcc_23 "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);"
-set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
-
gdb_test "print a_instance" "\\$\[0-9\]+ = \{a = 1, aa = 2\}" "print value of a_instance"
-gdb_test_multiple "ptype a_instance" "ptype a_instance" {
- -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
- pass "ptype a_instance (no synth ops)"
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods${ws}$nl\}$nl$gdb_prompt $" {
- pass "ptype a_instance (with synth ops)"
+cp_test_ptype_class \
+ "ptype a_instance" "" "class" "A" \
+ {
+ { field public "int a;" }
+ { field public "int aa;" }
+ { method public "A();" }
+ { method public "int afoo();" }
+ { method public "int foo();" }
}
- -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass "ptype a_instance (with synth ops)"
- }
-}
# class D
-set re_class "class D : private A, public B, protected C \{${ws}public:"
-set XX_class "class D : private A, public B, private C \{${ws}public:"
-set re_fields "int d;${ws}int dd;"
-set re_methods "D\\((void|)\\);${ws}int dfoo\\((void|)\\);${ws}int foo\\((void|)\\);"
-set re_synth_gcc_23 "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);"
-set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
-
gdb_test_multiple "print d_instance" "print value of d_instance" {
-re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, d = 7, dd = 8\}$nl$gdb_prompt $" {
pass "print value of d_instance"
}
}
-gdb_test_multiple "ptype d_instance" "ptype d_instance" {
- -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass "ptype d_instance"
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
- pass "ptype d_instance"
- }
- -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- # This is a gcc bug, gcc/13539, gdb/1498.
- # Fixed in gcc HEAD 2004-01-13
- setup_xfail "*-*-*" "gcc/13539"
- fail "ptype d_instance"
- }
- -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
- # This is a gcc bug, gcc/13539, gdb/1498.
- # Fixed in gcc HEAD 2004-01-13
- setup_xfail "*-*-*" "gcc/13539"
- fail "ptype d_instance"
+cp_test_ptype_class \
+ "ptype d_instance" "" "class" "D" \
+ {
+ { base "private A" }
+ { base "public B" }
+ { base "protected C" }
+ { field public "int d;" }
+ { field public "int dd;" }
+ { method public "D();" }
+ { method public "int dfoo();" }
+ { method public "int foo();" }
+ } \
+ "" \
+ {
+ { "protected C" "private C" { setup_xfail "*-*-*" "gcc/13539" } }
}
-}
# class E
-set re_class "class E : public A, private B, protected C \{${ws}public:"
-set XX_class "class E : public A, private B, private C \{${ws}public:"
-set re_fields "int e;${ws}int ee;"
-set re_methods "E\\((void|)\\);${ws}int efoo\\((void|)\\);${ws}int foo\\((void|)\\);"
-set re_synth_gcc_23 "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);"
-set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
-
gdb_test_multiple "print e_instance" "print value of e_instance" {
-re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, e = 9, ee = 10\}$nl$gdb_prompt $" {
pass "print value of e_instance"
}
}
-gdb_test_multiple "ptype e_instance" "ptype e_instance" {
- -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass "ptype e_instance"
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
- pass "ptype e_instance"
- }
- -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- # This is a gcc bug, gcc/13539, gdb/1498.
- # Fixed in gcc HEAD 2004-01-13
- setup_xfail "*-*-*" "gcc/13539"
- fail "ptype e_instance"
- }
- -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
- # This is a gcc bug, gcc/13539, gdb/1498.
- # Fixed in gcc HEAD 2004-01-13
- setup_xfail "*-*-*" "gcc/13539"
- fail "ptype e_instance"
+cp_test_ptype_class \
+ "ptype e_instance" "" "class" "E" \
+ {
+ { base "public A" }
+ { base "private B" }
+ { base "protected C" }
+ { field public "int e;" }
+ { field public "int ee;" }
+ { method public "E();" }
+ { method public "int efoo();" }
+ { method public "int foo();" }
+ } \
+ "" \
+ {
+ { "protected C" "private C" { setup_xfail "*-*-*" "gcc/13539" } }
}
-}
# class F
-set re_class "class F : private A, public B, private C \{${ws}public:"
-set re_fields "int f;${ws}int ff;"
-set re_methods "F\\((void|)\\);${ws}int ffoo\\((void|)\\);${ws}int foo\\((void|)\\);"
-set re_synth_gcc_23 "F & operator=\\(F const ?&\\);${ws}F\\(F const ?&\\);"
-set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
-
gdb_test_multiple "print f_instance" "print value of f_instance" {
-re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, f = 11, ff = 12\}$nl$gdb_prompt $" {
pass "print value of f_instance"
}
}
-gdb_test_multiple "ptype f_instance" "ptype f_instance" {
- -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass "ptype f_instance"
+cp_test_ptype_class \
+ "ptype f_instance" "" "class" "F" \
+ {
+ { base "private A" }
+ { base "public B" }
+ { base "private C" }
+ { field public "int f;" }
+ { field public "int ff;" }
+ { method public "F();" }
+ { method public "int ffoo();" }
+ { method public "int foo();" }
}
- -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
- pass "ptype f_instance"
- }
-}
# Print individual fields.
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index 72de1ac33a7..9ae1c1e2f3a 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -28,6 +28,8 @@ if $tracelevel then {
if { [skip_cplus_tests] } { continue }
+load_lib "cp-support.exp"
+
set testfile "inherit"
set srcfile misc.cc
set binfile ${objdir}/${subdir}/${testfile}
@@ -43,127 +45,44 @@ proc test_ptype_si { } {
global ws
global nl
- # Print class A as a type.
-
- set re_class "class A \{${ws}public:"
- set re_fields "int a;${ws}int x;"
- set re_synth_gcc_23 "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);"
-
- set name "ptype A (FIXME)"
- gdb_test_multiple "ptype A" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print class A as an explicit class.
-
- set name "ptype class A (FIXME)"
- gdb_test_multiple "ptype class A" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print type of an object of type A.
-
- set name "ptype g_A (FIXME)"
- gdb_test_multiple "ptype g_A" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print class B as a type.
-
- set re_class "class B : public A \{${ws}public:"
- set re_fields "int b;${ws}int x;"
- set re_synth_gcc_23 "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);"
-
- set name "ptype B"
- gdb_test_multiple "ptype B" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print class B as an explicit class.
-
- set name "ptype class B"
- gdb_test_multiple "ptype class B" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print type of an object of type B.
+ # A simple class.
- set name "ptype g_B"
- gdb_test_multiple "ptype g_B" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype A" "ptype A (FIXME)" "class" "A" \
+ {
+ { field public "int a;" }
+ { field public "int x;" }
}
- }
-
- # Print class C as a type.
+ cp_test_ptype_class "ptype class A" "ptype class A (FIXME)" "class" "A" ibid
+ cp_test_ptype_class "ptype g_A" "ptype g_A (FIXME)" "class" "A" ibid
- set re_class "class C : public A \{${ws}public:"
- set re_fields "int c;${ws}int x;"
- set re_synth_gcc_23 "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);"
+ # A derived class.
- set name "ptype C"
- gdb_test_multiple "ptype C" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- # Print class C as an explicit class.
-
- set name "ptype class C"
- gdb_test_multiple "ptype class C" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype B" "" "class" "B" \
+ {
+ { base "public A" }
+ { field public "int b;" }
+ { field public "int x;" }
}
- }
+ cp_test_ptype_class "ptype class B" "" "class" "B" ibid
+ cp_test_ptype_class "ptype g_B" "" "class" "B" ibid
- # Print type of an object of type g_C.
+ # Another derived class.
- set name "ptype g_C"
- gdb_test_multiple "ptype g_C" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype C" "" "class" "C" \
+ {
+ { base "public A" }
+ { field public "int c;" }
+ { field public "int x;" }
}
- }
+ cp_test_ptype_class "ptype class C" "" "class" "C" ibid
+ cp_test_ptype_class "ptype g_C" "" "class" "C" ibid
- # Print a structure with no tag.
+ # A structure with no tag.
+ # TODO: move this mess into a separate file, and re-specify
+ # which results are PASS, KFAIL, XFAIL, and FAIL.
set re_tag "tagless_struct"
set XX_tag "\\._1"
@@ -177,20 +96,22 @@ proc test_ptype_si { } {
gdb_test_multiple "ptype tagless_struct" $name {
-re "type = $XX_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
# gcc 2.95.3 -gdwarf-2
- pass "$name (obsolete gcc or gdb)"
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields${ws}$XX_synth_gcc_23$nl\}$nl$gdb_prompt $" {
# gcc 2.95.3 -gstabs+
- pass "$name (obsolete gcc or gdb)"
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (obsolete gcc or gdb)"
+ # gcc 3.3.4 -gdwarf-2
+ # gcc 3.4.1 -gdwarf-2
+ # gcc HEAD 2004-07-31 -gdwarf-2
+ # gcc HEAD 2004-07-31 -gstabs+
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
+ # gcc 3.3.4 -gstabs+
+ # gcc 3.4.1 -gstabs+
pass "$name"
}
}
@@ -199,20 +120,22 @@ proc test_ptype_si { } {
gdb_test_multiple "ptype v_tagless" $name {
-re "type = $XX_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
# gcc 2.95.3 -gdwarf-2
- pass "$name (obsolete gcc or gdb)"
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields${ws}$XX_synth_gcc_23$nl\}$nl$gdb_prompt $" {
# gcc 2.95.3 -gstabs+
- pass "$name (obsolete gcc or gdb)"
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (obsolete gcc or gdb)"
+ # gcc 3.3.4 -gdwarf-2
+ # gcc 3.4.1 -gdwarf-2
+ # gcc HEAD 2004-07-31 -gdwarf-2
+ # gcc HEAD 2004-07-31 -gstabs+
+ pass "$name"
}
-re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
+ # gcc 3.3.4 -gstabs+
+ # gcc 3.4.1 -gstabs+
pass "$name"
}
}
@@ -221,433 +144,108 @@ proc test_ptype_si { } {
# Multiple inheritance, print type definitions.
proc test_ptype_mi { } {
- global gdb_prompt
- global ws
- global nl
-
- set re_class "class D : public B, public C \{${ws}public:"
- set re_fields "int d;${ws}int x;"
- set re_synth_gcc_23 "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);"
-
- # ptype D: type, class, object.
-
- set name "ptype D"
- gdb_test_multiple "ptype D" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- set name "ptype class D"
- gdb_test_multiple "ptype class D" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- set name "ptype g_D"
- gdb_test_multiple "ptype g_D" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
-
- set re_class "class E : public D \{${ws}public:"
- set re_fields "int e;${ws}int x;"
- set re_synth_gcc_23 "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);"
- # ptype E: type, class, object.
+ # A class with two bases.
- set name "ptype E"
- gdb_test_multiple "ptype E" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype D" "" "class" "D" \
+ {
+ { base "public B" }
+ { base "public C" }
+ { field public "int d;" }
+ { field public "int x;" }
}
- }
+ cp_test_ptype_class "ptype class D" "" "class" "D" ibid
+ cp_test_ptype_class "ptype g_D" "" "class" "D" ibid
- set name "ptype class E"
- gdb_test_multiple "ptype class E" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
+ # A class derived from the previous class.
- set name "ptype g_E"
- gdb_test_multiple "ptype g_E" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype E" "" "class" "E" \
+ {
+ { base "public D" }
+ { field public "int e;" }
+ { field public "int x;" }
}
- }
+ cp_test_ptype_class "ptype class E" "" "class" "E" ibid
+ cp_test_ptype_class "ptype g_E" "" "class" "E" ibid
}
# Single virtual inheritance, print type definitions.
proc test_ptype_vi { } {
- global gdb_prompt
- global ws
- global nl
-
- # ptype vA: type, class, object.
- set re_class "class vA \{${ws}public:"
- set re_fields "int va;${ws}int vx;"
- set re_synth_gcc_23 "vA & operator=\\(vA const ?&\\);${ws}vA\\(vA const ?&\\);${ws}vA\\((void|)\\);"
+ # class vA
- set name "ptype vA"
- gdb_test_multiple "ptype vA" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype vA" "" "class" "vA" \
+ {
+ { field public "int va;" }
+ { field public "int vx;" }
}
- }
+ cp_test_ptype_class "ptype class vA" "" "class" "vA" ibid
+ cp_test_ptype_class "ptype g_vA" "" "class" "vA" ibid
- set name "ptype class vA"
- gdb_test_multiple "ptype class vA" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- }
+ # class vB
- set name "ptype g_vA"
- gdb_test_multiple "ptype g_vA" $name {
- -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype vB" "" "class" "vB" \
+ {
+ { base "public virtual vA" }
+ { vbase "vA" }
+ { field public "int vb;" }
+ { field public "int vx;" }
}
- }
-
- # ptype vB: type, class, object.
+ cp_test_ptype_class "ptype class vB" "" "class" "vB" ibid
+ cp_test_ptype_class "ptype g_vB" "" "class" "vB" ibid
- set re_class "class vB : public virtual vA \{(${ws}private:|)"
- set re_vbptr "vA \\*(_vb.2vA|_vb.vA);${ws}"
- set re_access "public:"
- set re_fields "int vb;${ws}int vx;"
- set re_synth_gcc_2 "vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);"
- set re_synth_gcc_3 "vB & operator=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\((void|)\\);"
+ # class vC
- set name "ptype vB"
- gdb_test_multiple "ptype vB" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
+ cp_test_ptype_class \
+ "ptype vC" "" "class" "vC" \
+ {
+ { base "public virtual vA" }
+ { vbase "vA" }
+ { field public "int vc;" }
+ { field public "int vx;" }
}
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
+ cp_test_ptype_class "ptype class vC" "" "class" "vC" ibid
+ cp_test_ptype_class "ptype g_vC" "" "class" "vC" ibid
- set name "ptype class vB"
- gdb_test_multiple "ptype class vB" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
-
- set name "ptype g_vB"
- gdb_test_multiple "ptype g_vB" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
-
- # ptype vC: type, class, object.
-
- set re_class "class vC : public virtual vA \{(${ws}private:|)"
- set re_vbptr "vA \\*(_vb.2vA|_vb.vA);${ws}"
- set re_access "public:"
- set re_fields "int vc;${ws}int vx;"
- set re_synth_gcc_2 "vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);"
- set re_synth_gcc_3 "vC & operator=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\((void|)\\);"
-
- set name "ptype vC"
- gdb_test_multiple "ptype vC" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
-
- set name "ptype class vC"
- gdb_test_multiple "ptype class vC" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
-
- set name "ptype g_vC"
- gdb_test_multiple "ptype g_vC" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name (aCC)"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name (aCC)"
- }
- }
}
# Multiple virtual inheritance, print type definitions.
proc test_ptype_mvi { } {
- global gdb_prompt
- global ws
- global nl
-
- # ptype vD: type, class, object.
- set re_class "class vD : public virtual vB, public virtual vC \{(${ws}private:|)"
- set re_vbptr "vC \\*(_vb.2vC|_vb.vC);${ws}vB \\*(_vb.2vB|_vb.vB);"
- set re_access "public:"
- set re_fields "int vd;${ws}int vx;"
- set re_synth_gcc_2 "vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);"
- set re_synth_gcc_3 "vD & operator=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\((void|)\\);"
+ # class vD
- set name "ptype vD"
- gdb_test_multiple "ptype vD" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
+ cp_test_ptype_class \
+ "ptype vD" "" "class" "vD" \
+ {
+ { base "public virtual vB" }
+ { base "public virtual vC" }
+ { vbase "vC" }
+ { vbase "vB" }
+ { field public "int vd;" }
+ { field public "int vx;" }
}
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
+ cp_test_ptype_class "ptype class vD" "" "class" "vD" ibid
+ cp_test_ptype_class "ptype g_vD" "" "class" "vD" ibid
- set name "ptype class vD"
- gdb_test_multiple "ptype class vD" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
+ # class vE
- set name "ptype g_vD"
- gdb_test_multiple "ptype g_vD" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
-
- # ptype vE: type, class, object.
-
- set re_class "class vE : public virtual vD \{(${ws}private:|)"
- set re_vbptr "vD \\*(_vb.2vD|_vb.vD);"
- set re_access "public:"
- set re_fields "int ve;${ws}int vx;"
- set re_synth_gcc_2 "vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);"
- set re_synth_gcc_3 "vE & operator=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\((void|)\\);"
-
- set name "ptype vE"
- gdb_test_multiple "ptype vE" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
+ cp_test_ptype_class \
+ "ptype vE" "" "class" "vE" \
+ {
+ { base "public virtual vD" }
+ { vbase "vD" }
+ { field public "int ve;" }
+ { field public "int vx;" }
}
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
+ cp_test_ptype_class "ptype class vE" "" "class" "vE" ibid
+ cp_test_ptype_class "ptype g_vE" "" "class" "vE" ibid
- set name "ptype class vE"
- gdb_test_multiple "ptype class vE" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
-
- set name "ptype g_vE"
- gdb_test_multiple "ptype g_vE" $name {
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gdwarf-2
- pass $name
- }
- -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
- # gcc 2.95.3 -gstabs+
- pass $name
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- pass "$name"
- }
- -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gstabs+
- pass "$name"
- }
- }
}
# Single inheritance, print individual members.
@@ -812,20 +410,20 @@ proc test_print_anon_union {} {
}
}
- set re_class "class class_with_anon_union \{${ws}public:"
- set re_fields "int one;${ws}"
- set re_anon_union "union \{${ws}int a;${ws}long int b;${ws}\};"
- set re_synth_gcc_23 "class_with_anon_union & operator=\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\((void|)\\);"
+ # The nested union prints as a multi-line field, but the class body
+ # scanner is inherently line-oriented. This is ugly but it works.
- set name "print type of anonymous union"
- gdb_test_multiple "ptype g_anon_union" $name {
- -re "type = $re_class${ws}$re_fields${ws}$re_anon_union$nl\}$nl$gdb_prompt $" {
- pass $name
- }
- -re "type = $re_class${ws}$re_fields${ws}$re_anon_union${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
- pass $name
+ cp_test_ptype_class \
+ "ptype g_anon_union" "print type of anonymous union" \
+ "class" "class_with_anon_union" \
+ {
+ { field public "int one;" }
+ { field public "union \{" }
+ { field public "int a;" }
+ { field public "long int b;" }
+ { field public "\};" }
}
- }
+
}
@@ -888,13 +486,18 @@ proc test_print_svi_classes { } {
pass $name
}
-re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- # gcc HEAD 2004-01-21 -gstabs+
+ # gcc 3.3.4 -gdwarf-2
+ # gcc 3.4.1 -gdwarf-2
+ # gcc 3.4.1 -gstabs+
+ # gcc HEAD 2004-07-31 -gdwarf-2
pass "$name (FIXME v3 vtbl ptr)"
}
-re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
+ # gcc 3.3.4 -gstabs+
+ pass $name
+ }
+ -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex <typeinfo for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+ # gcc HEAD 2004-07-31 -gstabs+
pass $name
}
}
@@ -911,13 +514,18 @@ proc test_print_svi_classes { } {
pass $name
}
-re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc HEAD 2004-01-21 -gdwarf-2
- # gcc HEAD 2004-01-21 -gstabs+
+ # gcc 3.3.4 -gdwarf-2
+ # gcc 3.4.1 -gdwarf-2
+ # gcc 3.4.1 -gstabs+
+ # gcc HEAD 2004-07-31 -gdwarf-2
pass "$name (FIXME v3 vtbl ptr)"
}
-re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gstabs+
+ # gcc 3.3.4 -gstabs+
+ pass $name
+ }
+ -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex <typeinfo for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+ # gcc HEAD 2004-07-31 -gstabs+
pass $name
}
}
@@ -1003,15 +611,20 @@ proc test_print_mvi_classes { } {
pass $name
}
-re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
- # gcc 3.3.2 -gdwarf-2
- # gcc 3.3.2 -gstabs+
- # gcc HEAD 2004-01-21 -gdwarf-2
- # gcc HEAD 2004-01-21 -gstabs+
+ # gcc 3.3.4 -gdwarf-2
+ # gcc 3.3.4 -gstabs+
+ # gcc 3.4.1 -gdwarf-2
+ # gcc 3.4.1 -gstabs+
+ # gcc HEAD 2004-07-31 -gdwarf-2
pass "$name (FIXME v3 vtbl ptr)"
}
-re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex <VTT for vD>, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
# gcc 3.2.7-rh -gstabs+
- pass "$name (FIXME v3 vtbl ptr)"
+ pass $name
+ }
+ -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex <typeinfo for vE>, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+ # gcc HEAD 2004-07-31 -gstabs+
+ pass $name
}
}
}
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 56cd7bc3bfc..7963a101686 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -33,21 +33,21 @@ set prms_id 0
set bug_id 0
set testfile "m-static"
-set srcfile "${srcdir}/${subdir}/${testfile}.cc"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set objfile "${objdir}/${subdir}/${testfile}.o"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
+set srcfile "${testfile}.cc"
+set srcfile1 "${testfile}1.cc"
+set objfile "${testfile}.o"
+set objfile1 "${testfile}1.o"
set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile" "$objdir/$subdir/$objfile" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile} ${objfile1}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index 4b3f1e255c7..4d295894986 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -254,8 +254,8 @@ gdb_test "print E::ce" "No symbol \"ce\" in namespace \"C::D::E\"."
gdb_test "ptype C" "type = namespace C::C"
gdb_test "ptype E" "type = namespace C::D::E"
-gdb_test "ptype CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
-gdb_test "ptype CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}"
+gdb_test "ptype CClass" "type = (class C::CClass \{\r\n public:|struct C::CClass \{)\r\n int x;\r\n\}"
+gdb_test "ptype CClass::NestedClass" "type = (class C::CClass::NestedClass \{\r\n public:|struct C::CClass::NestedClass \{)\r\n int y;\r\n\}"
gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
@@ -270,7 +270,7 @@ gdb_test "ptype C::NestedClass" "No symbol \"NestedClass\" in namespace \"C::C\"
# Tests involving multiple files
gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
-gdb_test "ptype OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
+gdb_test "ptype OtherFileClass" "type = (class C::OtherFileClass \{\r\n public:|struct C::OtherFileClass \{)\r\n int z;\r\n\}"
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
gdb_test "ptype C::OtherFileClass" "No symbol \"OtherFileClass\" in namespace \"C::C\"."
diff --git a/gdb/testsuite/gdb.cp/pr-1553.cc b/gdb/testsuite/gdb.cp/pr-1553.cc
deleted file mode 100644
index 58441fdb80f..00000000000
--- a/gdb/testsuite/gdb.cp/pr-1553.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-class A {
-public:
- class B;
- class C;
-};
-
-class A::B {
- int a_b;
-
-public:
- C* get_c(int i);
-};
-
-class A::C
-{
- int a_c;
-};
-
-class E {
-public:
- class F;
-};
-
-class E::F {
-public:
- int e_f;
-
- F& operator=(const F &other);
-};
-
-void refer_to (E::F *f) {
- // Do nothing.
-}
-
-void refer_to (A::C **ref) {
- // Do nothing. But, while we're at it, force out debug info for
- // A::B and E::F.
-
- A::B b;
- E::F f;
-
- refer_to (&f);
-}
-
-int main () {
- A::C* c_var;
- A::B* b_var;
- E *e_var;
-
- // Keep around a reference so that GCC 3.4 doesn't optimize the variable
- // away.
- refer_to (&c_var);
-}
diff --git a/gdb/testsuite/gdb.cp/pr-574.cc b/gdb/testsuite/gdb.cp/pr-574.cc
index eb06b61b7ae..ff9df6c2361 100644
--- a/gdb/testsuite/gdb.cp/pr-574.cc
+++ b/gdb/testsuite/gdb.cp/pr-574.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004
+ 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.
+ */
+
/*
An attempt to replicate PR gdb/574 with a shorter program.
diff --git a/gdb/testsuite/gdb.cp/printmethod.cc b/gdb/testsuite/gdb.cp/printmethod.cc
index d32e1b1d1c4..6afb491ddc5 100644
--- a/gdb/testsuite/gdb.cp/printmethod.cc
+++ b/gdb/testsuite/gdb.cp/printmethod.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004,
+ 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.
+ */
+
/* Create some objects, and try to print out their methods. */
class A {
diff --git a/gdb/testsuite/gdb.cp/psmang1.cc b/gdb/testsuite/gdb.cp/psmang1.cc
index 19a9283bbb4..9f19bed2e32 100644
--- a/gdb/testsuite/gdb.cp/psmang1.cc
+++ b/gdb/testsuite/gdb.cp/psmang1.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004,
+ 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.
+ */
+
/* Do not move this definition into a header file! See the comments
in psmang.exp. */
struct s
diff --git a/gdb/testsuite/gdb.cp/psmang2.cc b/gdb/testsuite/gdb.cp/psmang2.cc
index b9b1bb55b15..88e04ba4cf2 100644
--- a/gdb/testsuite/gdb.cp/psmang2.cc
+++ b/gdb/testsuite/gdb.cp/psmang2.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004,
+ 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.
+ */
+
#include <stdio.h>
/* Do not move this definition into a header file! See the comments
diff --git a/gdb/testsuite/gdb.cp/ref-types.cc b/gdb/testsuite/gdb.cp/ref-types.cc
index 23cc51095e3..1c2f4f46cce 100644
--- a/gdb/testsuite/gdb.cp/ref-types.cc
+++ b/gdb/testsuite/gdb.cp/ref-types.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 1999, 2004
+ 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.
+ */
+
int main2(void);
void marker1 (void)
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 18f3cc295da..991836d3073 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -40,25 +40,21 @@ set prms_id 0
set bug_id 0
set testfile "rtti"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
-set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
-set objfile2 "${objdir}/${subdir}/${testfile}2.o"
-set binfile ${objdir}/${subdir}/${testfile}
+set srcfile1 "${testfile}1.cc"
+set objfile1 "${testfile}1.o"
+set srcfile2 "${testfile}2.cc"
+set objfile2 "${testfile}2.o"
+set binfile "${objdir}/${subdir}/${testfile}"
-# gdb_get_line_number needs this to be called srcfile. Except that it
-# gets confused if the directories are included. :-(
-set srcfile "${testfile}1.cc"
-
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile1} ${objfile2}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile1 $objdir/$subdir/$objfile2" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -79,7 +75,7 @@ if ![runto_main] then {
# First, run to after we've constructed the object:
-gdb_breakpoint [gdb_get_line_number "main-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "main-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in main"
gdb_test_multiple "print *e1" "print *e1" {
@@ -135,12 +131,12 @@ gdb_test_multiple "print *e2" "print *e2" {
# Now we test the hack that's been implemented to get around some
# instances of PR gdb/1511.
-gdb_breakpoint [gdb_get_line_number "func-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "func-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in func"
gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
-gdb_breakpoint [gdb_get_line_number "func3-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "func3-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in func3"
gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 00a5598629c..15e9a58f94c 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -399,7 +399,7 @@ gdb_expect {
-re "type = class Baz<int, ?'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.1, DWARF-2 output.
kfail "gdb/57" "ptype Baz" }
- -re "type = class Baz<int, ?115> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ -re "type = class Baz<int, ?(\\(char\\))?115> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.x, DWARF-2 output, running into gdb/57 and gdb/1512.
kfail "gdb/57" "ptype Baz" }
-re "No symbol \"Baz\" in current context.\r\n$gdb_prompt $"
@@ -453,10 +453,10 @@ gdb_expect {
send_gdb "ptype quxint\n"
gdb_expect {
- -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
- -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
- -re "type = class Qux<int, ?\\(char ?\\*\\)\\(&string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
- -re "type = class Qux<int, ?&\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" {
+ -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?\\(char ?\\*\\)\\(& ?string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?& ?\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" {
kfail "gdb/1512" "ptype quxint"
}
-re "$gdb_prompt $" { fail "ptype quxint" }
diff --git a/gdb/testsuite/gdb.cp/try_catch.cc b/gdb/testsuite/gdb.cp/try_catch.cc
index e13dd641b49..764a6121066 100644
--- a/gdb/testsuite/gdb.cp/try_catch.cc
+++ b/gdb/testsuite/gdb.cp/try_catch.cc
@@ -1,4 +1,22 @@
-// 2002-05-27
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004,
+ 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.
+ */
#include <exception>
#include <stdexcept>
diff --git a/gdb/testsuite/gdb.cp/userdef.cc b/gdb/testsuite/gdb.cp/userdef.cc
index 0bb88a2d166..a40995a8650 100644
--- a/gdb/testsuite/gdb.cp/userdef.cc
+++ b/gdb/testsuite/gdb.cp/userdef.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 1999, 2002, 2003, 2004,
+ 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.
+ */
+
#include <iostream>
using namespace std;
diff --git a/gdb/testsuite/gdb.cp/virtfunc.cc b/gdb/testsuite/gdb.cp/virtfunc.cc
index 005de9d0ea6..0757ae78ecd 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.cc
+++ b/gdb/testsuite/gdb.cp/virtfunc.cc
@@ -1,3 +1,23 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 1993, 1994, 1997, 1998, 1999, 2003, 2004,
+ 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.
+ */
+
// Pls try the following program on virtual functions and try to do print on
// most of the code in main(). Almost none of them works !
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index bd931a629e3..0a0291d2493 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -18,8 +18,6 @@
# This file was written by Fred Fish. (fnf@cygnus.com)
# And rewritten by Michael Chastain <mec.gnu@mindspring.com>.
-set wsopt "\[\r\n\t \]*"
-set ws "\[\r\n\t \]+"
set nl "\[\r\n\]+"
if $tracelevel then {
@@ -28,6 +26,8 @@ if $tracelevel then {
if { [skip_cplus_tests] } { continue }
+load_lib "cp-support.exp"
+
set testfile "virtfunc"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
@@ -36,444 +36,146 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Test ptype of a class.
-#
-# Different C++ compilers produce different output. I build up regular
-# expressions piece by piece to accommodate all the compilers that I
-# have seen: gcc 2.95.3, gcc 3.3.2 (ABI 1), gcc 3.4 prerelease (ABI 2);
-# and all the debug formats I have seen: dwarf-2 and stabs+.
-#
-# A complicated class declaration looks like this:
-#
-# class A : public virtual V { // re_class
-# private:
-# V * _vb$V; // re_vbptr
-# int a; // re_fields
-#
-# public: // re_access_methods
-# A & operator=(A const &); // re_synth_gcc_2
-# A(int, A const &); // ...
-# A(int); // ...
-# virtual int f(void); // re_methods
-# }
-#
-# RE_CLASS matches the class declaration. C++ allows multiple ways of
-# expressing this.
-#
-# struct ... { private: ... };
-# class ... { private: ... };
-# class ... { ... };
-#
-# RE_VBPTR matches the virtual base declarations. gcc 2.95.3 sometimes
-# emits these, but gcc 3.X.Y never emits these. The name depends on the
-# debug format.
-#
-# RE_FIELDS matches the data fields of the class.
-# RE_METHODS matches the methods explicitly declared for the class.
-#
-# RE_SYNTH_GCC_2 and RE_SYNTH_GCC_3 match the optional synthetic methods
-# of the class. gcc -gstabs+ emits these methods, and gcc -gdwarf-2
-# does not.
-#
-# RE_ACCESS_METHODS is an access specifier after RE_FIELDS and before
-# the methods (explicit methods and/or synthetic methods).
-# There is also an RE_ACCESS_FIELDS.
-#
-# When I get HP-UX aCC, I hope that I can just add RE_SYNTH_ACC_NNN.
-#
-# Yet another twist: with gcc v2, ctor and dtor methods have a hidden
-# argument in front, the "in-charge" flag. With gcc v3, there is no
-# hidden argument; instead, there are multiple object functions for
-# each ctor and dtor.
-#
-# -- chastain 2004-01-01
-
-proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fields re_access_methods re_methods re_synth_gcc_2 re_synth_gcc_3 re_star } {
- global gdb_prompt
- global wsopt
- global ws
- global nl
-
- gdb_test_multiple "$command" "$testname" {
- -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 2.95.3, dwarf-2, no vbptr
- # gcc 3.X, abi 1, dwarf-2
- # gcc 3.X, abi 2, dwarf-2
- pass "$testname"
- }
- -re "type = $re_class${wsopt}$re_vbptr${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 2.95.3, dwarf-2, vbptr
- # TODO: drow says the vbptr is a bug
- pass "$testname"
- }
- -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_2${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 2.95.3, stabs+, no vbptr
- pass "$testname"
- }
- -re "type = $re_class${wsopt}$re_vbptr${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_2${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 2.95.3, stabs+, vbptr
- # TODO: drow says the vbptr is a bug
- pass "$testname"
- }
- -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_3${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 3.X, abi 1, stabs+
- pass "$testname"
- }
- -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods${wsopt}$re_synth_gcc_3$nl\}$re_star$nl$gdb_prompt $" {
- # gcc 3.X, abi 2, stabs+
- pass "$testname"
- }
- }
-
-}
-
proc test_ptype_of_classes {} {
- global gdb_prompt
- global ws
- global nl
# class VA
- test_one_ptype "ptype VA" "ptype VA" \
- "((struct|class) VA \{${ws}public:|struct VA \{)" \
- "" \
- "" "int va;" \
- "" "" \
- "VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);" \
- "VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype VA" "" "class" "VA" \
+ {
+ { field public "int va;" }
+ }
# class VB
- test_one_ptype "ptype VB" "ptype VB" \
- "((struct|class) VB \{${ws}public:|struct VB \{)" \
- "" \
- "" "int vb;" \
- "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype VB" "" "class" "VB" \
+ {
+ { field public "int vb;" }
+ { method public "int fvb();" }
+ { method public "virtual int vvb();" }
+ }
# class V
- test_one_ptype "ptype V" "ptype V" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype V" "" "class" "V" \
+ {
+ { base "public VA" }
+ { base "public VB" }
+ { field public "int w;" }
+ { method public "int f();" }
+ { method public "virtual int vv();" }
+ }
# class A
- test_one_ptype "ptype A" "ptype A" \
- "class A : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int a;" \
- "public:" "virtual int f\\((void|)\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype A" "" "class" "A" \
+ {
+ { base "public virtual V" }
+ { vbase "V" }
+ { field private "int a;" }
+ { method public "virtual int f();" }
+ }
# class B
- test_one_ptype "ptype B" "ptype B" \
- "class B : public A \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int b;" \
- "public:" "virtual int f\\((void|)\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype B" "" "class" "B" \
+ {
+ { base "public A" }
+ { field private "int b;" }
+ { method public "virtual int f();" }
+ }
# class C
- test_one_ptype "ptype C" "ptype C" \
- "class C : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int c;" \
- "" "" \
- "C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);" \
- "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype C" "" "class" "C" \
+ {
+ { base "public virtual V" }
+ { vbase "V" }
+ { field public "int c;" }
+ }
# class AD
- test_one_ptype "ptype AD" "ptype AD" \
- "((struct|class) AD \{${ws}public:|struct AD \{)" \
- "" \
- "" "" \
- "" "virtual int vg\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype AD" "" "class" "AD" \
+ {
+ { method public "virtual int vg();" }
+ }
# class D
- test_one_ptype "ptype D" "ptype D" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype D" "" "class" "D" \
+ {
+ { base "public AD" }
+ { base "public virtual V" }
+ { vbase "V" }
+ { method public "static void s();" }
+ { method public "virtual int vg();" }
+ { method public "virtual int vd();" }
+ { method public "int fd();" }
+ { field public "int d;" }
+ }
# class E
- # TODO: E does not show a vbptr for V. That seems strange.
- test_one_ptype "ptype E" "ptype E" \
- "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
- "" \
- "public:" "int e;" \
- "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
- ""
+ cp_test_ptype_class \
+ "ptype E" "" "class" "E" \
+ {
+ { base "public B" }
+ { base "public virtual V" }
+ { base "public D" }
+ { base "public C" }
+ { vbase "V" }
+ { method public "virtual int f();" }
+ { method public "virtual int vg();" }
+ { method public "virtual int vv();" }
+ { field public "int e;" }
+ }
# An instance of D
- test_one_ptype "ptype dd" "ptype dd" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- ""
+ cp_test_ptype_class "ptype dd" "" "class" "D" ibid
# An instance of D *
- test_one_ptype "ptype ppd" "ptype ppd" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- " ?\\*"
+ cp_test_ptype_class "ptype ppd" "" "class" "D" ibid "*"
# An instance of AD *
# TODO: this should be named pADd, not pAd.
- test_one_ptype "ptype pAd" "ptype pAd" \
- "((struct|class) AD \{${ws}public:|struct AD \{)" \
- "" \
- "" "" \
- "" "virtual int vg\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- " ?\\*"
-
- # An instance of A
-
- test_one_ptype "ptype a" "ptype a" \
- "class A : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int a;" \
- "public:" "virtual int f\\((void|)\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
- ""
-
- # An instance of B
-
- test_one_ptype "ptype b" "ptype b" \
- "class B : public A \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int b;" \
- "public:" "virtual int f\\((void|)\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
- ""
-
- # An instance of C
-
- test_one_ptype "ptype c" "ptype c" \
- "class C : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int c;" \
- "" "" \
- "C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);" \
- "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);" \
- ""
-
- # An instance of D
-
- test_one_ptype "ptype d" "ptype d" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- ""
-
- # An instance of E
-
- test_one_ptype "ptype e" "ptype e" \
- "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
- "" \
- "public:" "int e;" \
- "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
- ""
-
- # An instance of V
-
- test_one_ptype "ptype v" "ptype v" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- ""
-
- # An instance of VB
-
- test_one_ptype "ptype vb" "ptype vb" \
- "((struct|class) VB \{${ws}public:|struct VB \{)" \
- "" \
- "" "int vb;" \
- "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- ""
-
- # An instance of A *
-
- test_one_ptype "ptype pAa" "ptype pAa" \
- "class A : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int a;" \
- "public:" "virtual int f\\((void|)\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
- " ?\\*"
-
- # An instance of A *
-
- test_one_ptype "ptype pAe" "ptype pAe" \
- "class A : public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int a;" \
- "public:" "virtual int f\\((void|)\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
- "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
- " ?\\*"
-
- # An instance of B *
-
- test_one_ptype "ptype pBe" "ptype pBe" \
- "class B : public A \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "" "int b;" \
- "public:" "virtual int f\\((void|)\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
- "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
- " ?\\*"
-
- # An instance of D *
-
- test_one_ptype "ptype pDd" "ptype pDd" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- " ?\\*"
-
- # An instance of D *
-
- test_one_ptype "ptype pDe" "ptype pDe" \
- "class D : public AD, public virtual V \{(${ws}private:|)" \
- "V \\*(_vb.1V|_vb.V);" \
- "public:" "int d;" \
- "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
- "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
- " ?\\*"
-
- # An instance of V *
-
- test_one_ptype "ptype pVa" "ptype pVa" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- " ?\\*"
-
- # An instance of V *
-
- test_one_ptype "ptype pVv" "ptype pVv" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- " ?\\*"
-
- # An instance of V *
-
- test_one_ptype "ptype pVe" "ptype pVe" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- " ?\\*"
-
- # An instance of V *
-
- test_one_ptype "ptype pVd" "ptype pVd" \
- "class V : public VA, public VB \{${ws}public:" \
- "" \
- "" "int w;" \
- "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
- " ?\\*"
-
- # An instance of AD *
+ cp_test_ptype_class "ptype pAd" "" "class" "AD" ibid "*"
+
+ # Instances of these classes.
+
+ cp_test_ptype_class "ptype a" "" "class" "A" ibid
+ cp_test_ptype_class "ptype b" "" "class" "B" ibid
+ cp_test_ptype_class "ptype c" "" "class" "C" ibid
+ cp_test_ptype_class "ptype d" "" "class" "D" ibid
+ cp_test_ptype_class "ptype e" "" "class" "E" ibid
+ cp_test_ptype_class "ptype v" "" "class" "V" ibid
+ cp_test_ptype_class "ptype vb" "" "class" "VB" ibid
+
+ # Instances of pointers to these classes.
+
+ cp_test_ptype_class "ptype pAa" "" "class" "A" ibid "*"
+ cp_test_ptype_class "ptype pAe" "" "class" "A" ibid "*"
+ cp_test_ptype_class "ptype pBe" "" "class" "B" ibid "*"
+ cp_test_ptype_class "ptype pDd" "" "class" "D" ibid "*"
+ cp_test_ptype_class "ptype pDe" "" "class" "D" ibid "*"
+ cp_test_ptype_class "ptype pVa" "" "class" "V" ibid "*"
+ cp_test_ptype_class "ptype pVv" "" "class" "V" ibid "*"
+ cp_test_ptype_class "ptype pVe" "" "class" "V" ibid "*"
+ cp_test_ptype_class "ptype pVd" "" "class" "V" ibid "*"
+ cp_test_ptype_class "ptype pADe" "" "class" "AD" ibid "*"
+ cp_test_ptype_class "ptype pEe" "" "class" "E" ibid "*"
+ cp_test_ptype_class "ptype pVB" "" "class" "VB" ibid "*"
- test_one_ptype "ptype pADe" "ptype pADe" \
- "((struct|class) AD \{${ws}public:|struct AD \{)" \
- "" \
- "" "" \
- "" "virtual int vg\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
- " ?\\*"
-
- # An instance of E *
-
- test_one_ptype "ptype pEe" "ptype pEe" \
- "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
- "" \
- "public:" "int e;" \
- "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
- "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
- " ?\\*"
-
- # An instance of VB *
-
- test_one_ptype "ptype pVB" "ptype pVB" \
- "((struct|class) VB \{${ws}public:|struct VB \{)" \
- "" \
- "" "int vb;" \
- "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
- " ?\\*"
}
# Call virtual functions.
diff --git a/gdb/testsuite/gdb.fortran/Makefile.in b/gdb/testsuite/gdb.fortran/Makefile.in
new file mode 100644
index 00000000000..a1c3b074a07
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/Makefile.in
@@ -0,0 +1,34 @@
+# Makefile for regression testing the GNU debugger.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1999, 2001, 2003, 2004
+# Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# GDB 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, or (at your option)
+# any later version.
+
+# GDB 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.
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES =
+
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core ${EXECUTABLES}
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 3d3426f2474..2dd1508fed6 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -1,5 +1,5 @@
-# Copyright 2002
-# Free Software Foundation, Inc.
+# Copyright 2002, 2004
+# 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
@@ -15,9 +15,6 @@
# 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 Andrew Cagney (cagney at redhat dot com),
# derived from xfullpath.exp (written by Joel Brobecker), derived from
# selftest.exp (written by Rob Savoye).
@@ -51,14 +48,23 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ global gdb_file_cmd_debug_info
+ set gdb_file_cmd_debug_info "unset"
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { $result != 0 } then {
+ return -1
+ }
+
+ if { $gdb_file_cmd_debug_info != "debug" } then {
+ untested "No debug information, skipping testcase."
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_command_loop" \
"Breakpoint.*at.* file.*, line.*" \
diff --git a/gdb/testsuite/gdb.gdb/observer.exp b/gdb/testsuite/gdb.gdb/observer.exp
index 80ab29a05b5..b6d43b57599 100644
--- a/gdb/testsuite/gdb.gdb/observer.exp
+++ b/gdb/testsuite/gdb.gdb/observer.exp
@@ -1,5 +1,4 @@
-# Copyright 2003
-# Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
@@ -15,9 +14,6 @@
# 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 Joel Brobecker (brobecker@gnat.com), derived
# from xfullpath.exp.
@@ -50,14 +46,23 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ global gdb_file_cmd_debug_info
+ set gdb_file_cmd_debug_info "unset"
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { $result != 0 } then {
+ return -1
+ }
+
+ if { $gdb_file_cmd_debug_info != "debug" } then {
+ untested "No debug information, skipping testcase."
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_main" \
"Breakpoint.*at.* file.*, line.*" \
@@ -69,8 +74,7 @@ proc setup_test { executable } {
set timeout 600
set description "run until breakpoint at captured_main"
- send_gdb "run -nw\n"
- gdb_expect {
+ gdb_test_multiple "run -nw" "$description" {
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
@@ -89,9 +93,6 @@ proc setup_test { executable } {
verbose "Timeout is now $timeout seconds" 2
return -1
}
- timeout {
- fail "$description (timeout)"
- }
}
set timeout $oldtimeout
@@ -100,61 +101,68 @@ proc setup_test { executable } {
return 0
}
-proc attach_first_observer { } {
+proc attach_first_observer { message } {
gdb_test "set \$first_obs = observer_attach_normal_stop (&observer_test_first_notification_function)" \
- "" "attach first observer"
+ "" "$message; attach first observer"
}
-proc attach_second_observer { } {
+proc attach_second_observer { message } {
gdb_test "set \$second_obs = observer_attach_normal_stop (&observer_test_second_notification_function)" \
- "" "attach second observer"
+ "" "$message; attach second observer"
}
-proc attach_third_observer { } {
+proc attach_third_observer { message } {
gdb_test "set \$third_obs = observer_attach_normal_stop (&observer_test_third_notification_function)" \
- "" "attach third observer"
+ "" "$message; attach third observer"
}
-proc detach_first_observer { } {
+proc detach_first_observer { message } {
gdb_test "call observer_detach_normal_stop (\$first_obs)" \
- "" "detach first observer"
+ "" "$message; detach first observer"
}
-proc detach_second_observer { } {
+proc detach_second_observer { message } {
gdb_test "call observer_detach_normal_stop (\$second_obs)" \
- "" "detach second observer"
+ "" "$message; detach second observer"
}
-proc detach_third_observer { } {
+proc detach_third_observer { message } {
gdb_test "call observer_detach_normal_stop (\$third_obs)" \
- "" "detach third observer"
+ "" "$message; detach third observer"
}
proc check_counters { first second third message } {
gdb_test "print observer_test_first_observer" \
- ".\[0-9\]+ =.*$first" \
- "check first observer counter value ($message)"
+ ".\[0-9\]+ =.*$first" \
+ "$message; check first observer counter value"
gdb_test "print observer_test_second_observer" \
- ".\[0-9\]+ =.*$second" \
- "check second observer counter value ($message)"
+ ".\[0-9\]+ =.*$second" \
+ "$message; check second observer counter value"
gdb_test "print observer_test_third_observer" \
- ".\[0-9\]+ =.*$third" \
- "check third observer counter value ($message)"
+ ".\[0-9\]+ =.*$third" \
+ "$message; check third observer counter value"
}
-proc reset_counters { } {
+proc reset_counters { message } {
gdb_test "set variable observer_test_first_observer = 0" "" \
- "reset first observer counter"
+ "$message; reset first observer counter"
gdb_test "set variable observer_test_second_observer = 0" "" \
- "reset second observer counter"
+ "$message; reset second observer counter"
gdb_test "set variable observer_test_third_observer = 0" "" \
- "reset third observer counter"
+ "$message; reset third observer counter"
}
-proc test_normal_stop_notifications { first second third message } {
- reset_counters
- gdb_test "call observer_notify_normal_stop ()" "" \
- "sending notification ($message)"
+proc test_normal_stop_notifications { first second third message args } {
+ # Do any initialization
+ for {set i 0} {$i < [llength $args]} {incr i} {
+ [lindex $args $i] $message
+ }
+ reset_counters $message
+ # Call observer_notify_normal_stop. Note that this procedure
+ # takes one argument, but this argument is ignored by the observer
+ # callbacks we have installed. So we just pass an arbitrary value.
+ gdb_test "call observer_notify_normal_stop (0)" "" \
+ "$message; sending notification"
check_counters $first $second $third $message
}
@@ -166,57 +174,57 @@ proc test_observer_normal_stop { executable } {
}
# First, try sending a notification without any observer attached.
- test_normal_stop_notifications 0 0 0 "no observer"
+ test_normal_stop_notifications 0 0 0 "no observer attached"
# Now, attach one observer, and send a notification.
- attach_second_observer
- test_normal_stop_notifications 0 1 0 "one observer"
+ test_normal_stop_notifications 0 1 0 "second observer attached" \
+ attach_second_observer
# Remove the observer, and send a notification.
- detach_second_observer
- test_normal_stop_notifications 0 0 0 "no observer"
+ test_normal_stop_notifications 0 0 0 "second observer detached" \
+ detach_second_observer
# With a new observer.
- attach_first_observer
- test_normal_stop_notifications 1 0 0 "a new observer"
+ test_normal_stop_notifications 1 0 0 "1st observer added" \
+ attach_first_observer
# With 2 observers.
- attach_second_observer
- test_normal_stop_notifications 1 1 0 "2 observers"
+ test_normal_stop_notifications 1 1 0 "2nd observer added" \
+ attach_second_observer
# With 3 observers.
- attach_third_observer
- test_normal_stop_notifications 1 1 1 "3 observers"
+ test_normal_stop_notifications 1 1 1 "3rd observer added" \
+ attach_third_observer
# Remove middle observer.
- detach_second_observer
- test_normal_stop_notifications 1 0 1 "middle observer removed"
+ test_normal_stop_notifications 1 0 1 "2nd observer removed" \
+ detach_second_observer
# Remove first observer.
- detach_first_observer
- test_normal_stop_notifications 0 0 1 "first observer removed"
+ test_normal_stop_notifications 0 0 1 "1st observer removed" \
+ detach_first_observer
# Remove last observer.
- detach_third_observer
- test_normal_stop_notifications 0 0 0 "last observer removed"
+ test_normal_stop_notifications 0 0 0 "3rd observer removed" \
+ detach_third_observer
# Go back to 3 observers, and remove them in a different order...
- attach_first_observer
- attach_second_observer
- attach_third_observer
- test_normal_stop_notifications 1 1 1 "3 observers again"
+ test_normal_stop_notifications 1 1 1 "three observers added" \
+ attach_first_observer \
+ attach_second_observer \
+ attach_third_observer
# Remove the third observer.
- detach_third_observer
- test_normal_stop_notifications 1 1 0 "third observer removed"
+ test_normal_stop_notifications 1 1 0 "third observer removed" \
+ detach_third_observer
# Remove the second observer.
- detach_second_observer
- test_normal_stop_notifications 1 0 0 "second observer removed"
+ test_normal_stop_notifications 1 0 0 "second observer removed" \
+ detach_second_observer
# Remove the first observer, no more observers.
- detach_first_observer
- test_normal_stop_notifications 0 0 0 "last observer removed"
+ test_normal_stop_notifications 0 0 0 "first observer removed" \
+ detach_first_observer
return 0
}
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 4196b74e786..e7d46bdc331 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -1,5 +1,5 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002,
+# 2003, 2004 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
@@ -15,9 +15,6 @@
# 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 Rob Savoye. (rob@cygnus.com)
if $tracelevel then {
@@ -106,6 +103,7 @@ proc do_steps_and_nexts {} {
set command "next"
}
-re ".*init_malloc.*$gdb_prompt $" {
+ # gdb 6.2.X is the last gdb which called init_malloc
set description "next over init_malloc and everything it calls"
set command "next"
}
@@ -242,14 +240,23 @@ proc test_with_self { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ global gdb_file_cmd_debug_info
+ set gdb_file_cmd_debug_info "unset"
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { $result != 0 } then {
+ return -1
+ }
+
+ if { $gdb_file_cmd_debug_info != "debug" } then {
+ untested "No debug information, skipping testcase."
+ return -1
+ }
+
# disassemble yourself
gdb_test "x/10i main" \
"x/10i.*main.*main.$decimal.*main.$decimal.*" \
diff --git a/gdb/testsuite/gdb.gdb/xfullpath.exp b/gdb/testsuite/gdb.gdb/xfullpath.exp
index 60449a343c5..570b311295f 100644
--- a/gdb/testsuite/gdb.gdb/xfullpath.exp
+++ b/gdb/testsuite/gdb.gdb/xfullpath.exp
@@ -1,5 +1,5 @@
-# Copyright 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004
+# 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
@@ -15,9 +15,6 @@
# 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 Joel Brobecker. (brobecker@gnat.com), derived
# from selftest.exp, written by Rob Savoye.
@@ -50,14 +47,23 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ global gdb_file_cmd_debug_info
+ set gdb_file_cmd_debug_info "unset"
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { $result != 0 } then {
+ return -1
+ }
+
+ if { $gdb_file_cmd_debug_info != "debug" } then {
+ untested "No debug information, skipping testcase."
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_main" \
"Breakpoint.*at.* file.*, line.*" \
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
index 797dc854580..cc1028d5375 100644
--- a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
@@ -1,4 +1,7 @@
-# Copyright (C) 1998 Free Software Foundation, Inc.
+# This test script is part of GDB, the GNU debugger.
+
+# Copyright 1998, 1999, 2001, 2004,
+# 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
@@ -104,44 +107,81 @@ runto mainend
# Look for known values
#
-gdb_test "info reg r1" "r1 1"
-gdb_test "info reg r4" "r4 2"
-gdb_test "info reg r5" "r5 4"
-gdb_test "info reg r6" "r6 8"
-gdb_test "info reg r7" "r7 10"
-gdb_test "info reg r8" "r8 20"
-gdb_test "info reg r9" "r9 40"
-gdb_test "info reg r10" "r10 80"
-gdb_test "info reg r11" "r11 100"
-gdb_test "info reg r12" "r12 200"
-gdb_test "info reg r13" "r13 400"
-gdb_test "info reg r14" "r14 800"
-gdb_test "info reg r15" "r15 1000"
-gdb_test "info reg r16" "r16 2000"
+# The output format changed between gdb 6.1.1 and gdb HEAD 2004-06-01.
+#
+# gdb 6.1.1:
+# (gdb) info reg r1
+# r1 1
+#
+# gdb HEAD 2004-06-01:
+# (gdb) info reg r1
+# r1 0x1 1
+#
+# For now, I accept both formats. In the future, you can remove
+# the old gdb 6.1.1 format.
+#
+# -- chastain 2004-06-26
+
+set ws "\[\r\n\t \]+"
+
+proc hp_integer_reg {regname vhex vdec} {
+ global ws
+ set value_611 "$regname${ws}$vhex"
+ set value_new "$regname${ws}0x$vhex${ws}$vdec"
+ gdb_test "info reg $regname" "$value_611|$value_new"
+}
+
+hp_integer_reg "r1" "1" "1"
+hp_integer_reg "r4" "2" "2"
+hp_integer_reg "r5" "4" "4"
+hp_integer_reg "r6" "8" "8"
+hp_integer_reg "r7" "10" "16"
+hp_integer_reg "r8" "20" "32"
+hp_integer_reg "r9" "40" "64"
+hp_integer_reg "r10" "80" "128"
+hp_integer_reg "r11" "100" "256"
+hp_integer_reg "r12" "200" "512"
+hp_integer_reg "r13" "400" "1024"
+hp_integer_reg "r14" "800" "2048"
+hp_integer_reg "r15" "1000" "4096"
+hp_integer_reg "r16" "2000" "8192"
# Two odd variants that GDB supports are:
# "1" means "r1", and
# "$1" means "r1"
-#
-gdb_test "info reg 1 4" "r1 1.*r4 2"
-gdb_test "info reg \$1" "r1 1"
+
+hp_integer_reg "1" "1" "1"
+hp_integer_reg "4" "2" "2"
+
+set name "info reg \$1"
+gdb_test_multiple "info reg \$1" "$name" {
+ -re "r1${ws}1\r\n$gdb_prompt $" {
+ pass "$name"
+ }
+ -re "r1${ws}0x1${ws}1\r\n$gdb_prompt $" {
+ pass "$name"
+ }
+}
# Verify that GDB responds gracefully to a register ID number that
# is out of range.
-#
-gdb_test "info reg 999" "999: invalid register"
+
+gdb_test "info reg 999" "Invalid register.*999.*"
# Make sure the floating point status and error registers
# don't show up as floating point numbers!
-#
-gdb_test "info reg fpsr" ".*fpsr 0.*" "fpsr"
-gdb_test "info reg fpe1" ".*fpe1 0.*" "fpe1"
-gdb_test "info reg fpe2" ".*fpe2 0.*" "fpe2"
-gdb_test "info reg fpe3" ".*fpe3 0.*" "fpe3"
-gdb_test "info reg fpe4" ".*fpe4 0.*" "fpe4"
-gdb_test "info reg fpe5" ".*fpe5 0.*" "fpe5"
-gdb_test "info reg fpe6" ".*fpe6 0.*" "fpe6"
-gdb_test "info reg fpe7" ".*fpe7 0.*" "fpe7"
+
+hp_integer_reg "fpsr" "0" "0"
+hp_integer_reg "fpe1" "0" "0"
+hp_integer_reg "fpe2" "0" "0"
+hp_integer_reg "fpe3" "0" "0"
+hp_integer_reg "fpe4" "0" "0"
+hp_integer_reg "fpe5" "0" "0"
+hp_integer_reg "fpe6" "0" "0"
+hp_integer_reg "fpe7" "0" "0"
+
+# Floating point registers.
+# TODO: these are old format only.
gdb_test "info reg fr4" ".*fr4.*(double precision).* 1"
gdb_test "info reg fr5" ".*fr5.*(double precision).* 2"
@@ -151,33 +191,39 @@ gdb_test "info reg fr8" ".*fr8.*(double precision).* 8"
gdb_test "info reg fr9" ".*fr9.*(double precision).* 32"
gdb_test "info reg fr10" ".*fr10.*(double precision).* 256"
-gdb_test "info reg r19" "r19 deadbeefbadcadee"
+# An integer register with a 64-bit value.
-# Need to add test of use of $<register-name>
-#
-# Q: How do you say a literal "$" in expect?
-# A: You say "\$". A literal "\" is "\\".
-#
-# Please note that this test will fail as long as we are running
-# in 32-bit mode: it will produce "$1 = 0xbadcadee". To fix it
-# would require building a real 64-bit gdb (expression evaluation,
-# in particular).
-#
-send_gdb "p/x \$r19\n"
- gdb_expect {
- -re ".*= 0xdeadbeefbadcadee.*$gdb_prompt $" {
- pass "64-bit works"
- }
- -re ".*= 0xbadcadee.*$gdb_prompt $" {
- pass "32-bit extract when using PRINT; expected but not good"
- }
- -re ".*$gdb_prompt $" {
- fail "didn't print any part of right value"
- }
- timeout {
- fail "timeout on print"
- }
+set name "info reg r19"
+gdb_test_multiple "info reg r19" "$name" {
+ -re "r19${ws}deadbeefbadcadee\r\n$gdb_prompt $" {
+ # old gdb 6.1.1 format, good result
+ pass "$name"
+ }
+ -re "r19${ws}badcadee\r\n$gdb_prompt $" {
+ # old gdb 6.1.1 format, bad result
+ fail "$name (32-bit truncation)"
+ }
+ -re "r19${ws}0xdeadbeefbadcadee${ws}16045690984232431086\r\n$gdb_prompt $" {
+ # new gdb HEAD 2004-06-01 format, good result
+ pass "$name"
}
+ -re "r19${ws}0xbadcadee${ws}3135024622\r\n$gdb_prompt $" {
+ # new gdb HEAD 2004-06-01 format, 32 bit truncation
+ fail "$name (32-bit truncation)"
+ }
+}
+
+set name "print /x \$r19"
+gdb_test_multiple "print /x \$r19" "$name" {
+ -re "= 0xdeadbeefbadcadee\r\n$gdb_prompt $" {
+ pass "$name"
+ }
+ -re "= 0xbadcadee\r\n$gdb_prompt $" {
+ # this was a PASS in the last version so keep it PASS for now
+ # -- chastain 2004-06-26
+ pass "$name (32-bit truncation)"
+ }
+}
# Need to add tests of setting wide regs too. E.g.
#
diff --git a/gdb/testsuite/gdb.java/jmain.exp b/gdb/testsuite/gdb.java/jmain.exp
new file mode 100644
index 00000000000..49e7ca3b511
--- /dev/null
+++ b/gdb/testsuite/gdb.java/jmain.exp
@@ -0,0 +1,67 @@
+# Copyright 2000, 2004 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.
+
+# This file was based on jmisc.exp which in turn was written by
+# Anthony Green. (green@redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+load_lib "java.exp"
+
+set testfile "jmain"
+set srcfile ${srcdir}/$subdir/${testfile}.java
+set binfile ${objdir}/${subdir}/${testfile}
+if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
+ untested "Couldn't compile ${srcfile}"
+ return -1
+}
+
+set prms_id 0
+set bug_id 0
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_test "set print sevenbit-strings" ".*"
+
+# Check that plain old "main" works. The load should both set the
+# language to java and (since --main=jmain), some how set the scope to
+# jmain's main.
+
+# Where the breakpoint should always land
+
+set bpmain "Breakpoint .* file .*jmain.java, line 5\."
+
+gdb_load "${binfile}"
+setup_kfail *-*-* java/1567
+gdb_test "break main" "${bpmain}"
+
+# Check that an unqualified "main" works.
+
+
+gdb_load "${binfile}"
+setup_kfail *-*-* java/1565
+gdb_test "break jmain.main" "${bpmain}"
+
+# Check that a fully qualified "main" works.
+gdb_load "${binfile}"
+setup_xfail *-*-* gcc/16439
+gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"
diff --git a/gdb/testsuite/gdb.java/jmain.java b/gdb/testsuite/gdb.java/jmain.java
new file mode 100644
index 00000000000..ee5c8bb00ce
--- /dev/null
+++ b/gdb/testsuite/gdb.java/jmain.java
@@ -0,0 +1,7 @@
+public class jmain
+{
+ public static void main (String[] args)
+ {
+ return;
+ }
+}
diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp
index 9fd220ff307..9e32011d62b 100644
--- a/gdb/testsuite/gdb.java/jmisc.exp
+++ b/gdb/testsuite/gdb.java/jmisc.exp
@@ -1,4 +1,4 @@
-# Copyright 2000 Free Software Foundation, Inc.
+# Copyright 2000, 2004 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
@@ -72,7 +72,7 @@ if ![set_lang_java] then {
send_gdb "ptype jmisc\n"
gdb_expect {
- -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" }
+ -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" }
-re ".*$gdb_prompt $" { fail "ptype jmisc" }
timeout { fail "ptype jmisc (timeout)" ; return }
}
diff --git a/gdb/testsuite/gdb.java/jmisc1.exp b/gdb/testsuite/gdb.java/jmisc1.exp
index dd5af98bbe2..dab85c8e7a8 100644
--- a/gdb/testsuite/gdb.java/jmisc1.exp
+++ b/gdb/testsuite/gdb.java/jmisc1.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 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
@@ -70,7 +70,7 @@ if ![set_lang_java] then {
send_gdb "ptype jmisc\n"
gdb_expect {
- -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" }
+ -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" }
-re ".*$gdb_prompt $" { fail "ptype jmisc" }
timeout { fail "ptype jmisc (timeout)" ; return }
}
diff --git a/gdb/testsuite/gdb.java/jmisc2.exp b/gdb/testsuite/gdb.java/jmisc2.exp
deleted file mode 100644
index 2eeb99df7ad..00000000000
--- a/gdb/testsuite/gdb.java/jmisc2.exp
+++ /dev/null
@@ -1,91 +0,0 @@
-# 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 Anthony Green. (green@redhat.com)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-load_lib "java.exp"
-
-set testfile "jmisc"
-set srcfile ${srcdir}/$subdir/${testfile}.java
-set binfile ${objdir}/${subdir}/${testfile}
-if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
- untested "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to java. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_java {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language java\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language java (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"java\".*" \
- "set language to \"java\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_java] then {
- send_gdb "ptype jmisc\n"
- gdb_expect {
- -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void <init>\\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" }
- -re ".*$gdb_prompt $" { fail "ptype jmisc" }
- timeout { fail "ptype jmisc (timeout)" ; return }
- }
-
- runto ${testfile}.main(java.lang.String\[\])
-
- send_gdb "p args\n"
- gdb_expect {
- -re "\\\$1 = java\.lang\.String\\\[]@\[a-f0-9]+\[\r\n\ \t]+$gdb_prompt $" { pass "p args" }
- -re ".*$gdb_prompt $" { fail "p args" }
- timeout { fail "p args (timeout)" ; return }
- }
-
- send_gdb "p *args\n"
- gdb_expect {
- -re "\\\$2 = \{length: 0\}\[\r\n\ \t]+$gdb_prompt $" { pass "p *args" }
- -re ".*$gdb_prompt $" { fail "p *args" }
- timeout { fail "p *args (timeout)" ; return }
- }
-}
diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c
index 9a61aa2dc39..0e3c1d8abfc 100644
--- a/gdb/testsuite/gdb.mi/basics.c
+++ b/gdb/testsuite/gdb.mi/basics.c
@@ -1,8 +1,30 @@
+/* Copyright 1999, 2000, 2004
+ 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. */
+
/*
* This simple program that passes different types of arguments
* on function calls. Useful to test printing frames, stepping, etc.
*/
+#include <stdio.h>
+
int callee4 (void)
{
int A=1;
diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp
index 8196464e647..37fc3ae8daf 100644
--- a/gdb/testsuite/gdb.mi/gdb792.exp
+++ b/gdb/testsuite/gdb.mi/gdb792.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 9377baf9e6c..39a08736910 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index 5cbe4e40d2e..941317b5f8c 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2001, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -47,39 +44,56 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
+# Locate line numbers in basics.c.
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
+set line_callee3_head [gdb_get_line_number "callee3 ("]
+set line_callee3_body [expr $line_callee3_head + 2]
+set line_callee2_head [gdb_get_line_number "callee2 ("]
+set line_callee2_body [expr $line_callee2_head + 2]
+set line_callee1_head [gdb_get_line_number "callee1 ("]
+set line_callee1_body [expr $line_callee1_head + 2]
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+
proc test_tbreak_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
global hex
+ global line_callee4_head line_callee4_body
+ global line_callee3_head line_callee3_body
+ global line_callee2_head line_callee2_body
+ global line_callee1_head line_callee1_body
+ global line_main_head line_main_body
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
# Tests:
# -break-insert -t main
# -break-insert -t basics.c:callee2
- # -break-insert -t basics.c:15
- # -break-insert -t srcfile:6
+ # -break-insert -t basics.c:$line_callee3_head
+ # -break-insert -t srcfile:$line_callee4_head
# -break-list
mi_gdb_test "222-break-insert -t main" \
- "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert -t operation"
mi_gdb_test "333-break-insert -t basics.c:callee2" \
- "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
+ "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
"insert temp breakpoint at basics.c:callee2"
- mi_gdb_test "444-break-insert -t basics.c:15" \
- "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert temp breakpoint at basics.c:15 (callee3)"
+ mi_gdb_test "444-break-insert -t basics.c:$line_callee3_head" \
+ "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_head\",times=\"0\"\}" \
+ "insert temp breakpoint at basics.c:\$line_callee3_body"
- # Getting the quoting right is tricky. That is "\"<file>\":6"
- mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \
- "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
+ # Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
+ mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":$line_callee4_head\"" \
+ "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_head\",times=\"0\"\}" \
+ "insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
mi_gdb_test "666-break-list" \
- "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \
+ "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}.*\\\]\}" \
"list of breakpoints"
mi_gdb_test "777-break-delete" \
@@ -91,6 +105,11 @@ proc test_rbreak_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
global hex
+ global line_callee4_head line_callee4_body
+ global line_callee3_head line_callee3_body
+ global line_callee2_head line_callee2_body
+ global line_callee1_head line_callee1_body
+ global line_main_head line_main_body
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
@@ -103,27 +122,27 @@ proc test_rbreak_creation_and_listing {} {
setup_xfail "*-*-*"
mi_gdb_test "122-break-insert -r main" \
- "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
+ "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
"break-insert -r operation"
setup_xfail "*-*-*"
mi_gdb_test "133-break-insert -r callee2" \
- "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\}" \
+ "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\}" \
"insert breakpoint with regexp callee2"
setup_xfail "*-*-*"
mi_gdb_test "144-break-insert -r callee" \
- "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
+ "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
"insert breakpoint with regexp callee"
setup_xfail "*-*-*"
mi_gdb_test "155-break-insert -r \.\*llee" \
- "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
+ "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
"insert breakpoint with regexp .*llee"
setup_xfail "*-*-*"
mi_gdb_test "166-break-list" \
- "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of breakpoints"
mi_gdb_test "177-break-delete" \
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index 62501e03a19..4b493ab761a 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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 tests that GDB's console can be accessed via the MI.
# Specifically, we are testing the "interpreter-exec" command and that
# the commands that are executed via this command are properly executed.
@@ -67,6 +64,11 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
mi_run_to_main
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+set line_main_hello [gdb_get_line_number "Hello, World!"]
+set line_main_return [expr $line_main_hello + 2]
+
mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \
"-interpreter-exec console \"set args foobar\""
@@ -91,8 +93,9 @@ mi_gdb_test "-interpreter-exec console \"set listsize 1\"" \
{\^done} \
"-interpreter-exec console \"set listsize 1\""
+# {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done }
mi_gdb_test "-interpreter-exec console \"list\"" \
- {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \
+ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\""
# # NOTE: cagney/2003-02-03: Not yet.
@@ -150,43 +153,43 @@ mi_gdb_test "500-stack-select-frame 0" \
"-stack-select-frame 0"
# NOTE: cagney/2003-02-03: Not yet.
-# mi_gdb_test "-break-insert -t basics.c:35" \
+# mi_gdb_test "-break-insert -t basics.c:$line_main_hello" \
# {.*=breakpoint-create,number="3".*\^done} \
-# "-break-insert -t basics.c:35"
-mi_gdb_test "600-break-insert -t basics.c:35" \
+# "-break-insert -t basics.c:\$line_main_hello"
+mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
- "-break-insert -t basics.c:35"
+ "-break-insert -t basics.c:\$line_main_hello"
# mi_gdb_test "-exec-continue" \
-# {.*\*stopped.*,file=".*basics.c",line="35"\}} \
-# "-exec-continue to line 35"
+# {.*\*stopped.*,file=".*basics.c",line="$line_main_hello"\}} \
+# "-exec-continue to line \$line_main_hello"
send_gdb "700-exec-continue\n"
gdb_expect {
- -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" {
- pass "-exec-continue to line 35"
+ -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.$line_main_hello.*$mi_gdb_prompt$" {
+ pass "-exec-continue to line \$line_main_hello"
}
timeout {
- fail "-exec-continue to line 35"
+ fail "-exec-continue to line \$line_main_hello"
}
}
# NOTE: cagney/2003-02-03: Not yet.
# mi_gdb_test "-exec-next" \
-# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
-# "-exec-next to line 37"
+# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="$line_main_return"\}} \
+# "-exec-next to line \$line_main_return"
send_gdb "800-exec-next\n"
gdb_expect {
- -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" {
- pass "-exec-next to line 37"
+ -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.$line_main_return.*$mi_gdb_prompt$" {
+ pass "-exec-next to line \$line_main_return"
}
timeout {
- fail "-exec-next to line 37"
+ fail "-exec-next to line \$line_main_return"
}
}
mi_gdb_test "-interpreter-exec console \"list\"" \
- {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \
- "-interpreter-exec console \"list\" at basics.c:37"
+ "\~\"$line_main_return\[\\\\t ]*return 0;\\\\n\".*\\^done" \
+ "-interpreter-exec console \"list\" at basics.c:\$line_main_return"
mi_gdb_test "-interpreter-exec console \"help set args\"" \
{\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index 0fb85e0dda1..9986b5eb425 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp
index 46f00ddf51c..0b124976a7e 100644
--- a/gdb/testsuite/gdb.mi/mi-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test Machine interface (MI) operations for disassembly.
#
@@ -48,17 +45,20 @@ proc test_disassembly_only {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
# -data-disassemble -s $pc -e "$pc+8" -- 0
- # -data-disassembly -f basics.c -l 32 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -- 0
mi_gdb_test "print/x \$pc" "" ""
mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
"111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
"data-disassemble from pc to pc+12 assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file & line, assembly only"
}
@@ -68,22 +68,25 @@ proc test_disassembly_lines_limit {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 0
- # -data-disassembly -f basics.c -l 32 -n 0 -- 0
- # -data-disassembly -f basics.c -l 32 -n 50 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 0
mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 0" \
"222\\^done,asm_insns=\\\[\\\]" \
"data-disassemble file, line, number (zero lines) assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number (more than main lines) assembly only"
}
@@ -94,13 +97,16 @@ proc test_disassembly_mixed {} {
global hex
global decimal
+ set line_callee2_head [gdb_get_line_number "callee2 ("]
+ set line_callee2_open_brace [expr $line_callee2_head + 1]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 21 -- 1
+ # -data-disassembly -f basics.c -l $line_callee2_open_brace -- 1
# -data-disassembly -s $pc -e "$pc+8" -- 1
- mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
- "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
+ mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 1" \
+ "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
"data-disassemble file, line assembly mixed"
#
@@ -118,22 +124,26 @@ proc test_disassembly_mixed_lines_limit {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_open_brace [expr $line_main_head + 1]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 1
- # -data-disassembly -f basics.c -l 32 -n 0 -- 1
- # -data-disassembly -f basics.c -l 32 -n 50 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 1
mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 1" \
"222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number assembly mixed"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 1" \
+ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_main_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
"data-disassemble file, line, number (zero lines) assembly mixed"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 1" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 1" \
"222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number (more than main lines) assembly mixed"
}
@@ -142,6 +152,9 @@ proc test_disassembly_bogus_args {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test that bogus input to disassembly command is rejected.
# Tests:
# -data-disassembly -f foo -l abc -n 0 -- 0
@@ -161,7 +174,7 @@ proc test_disassembly_bogus_args {} {
"456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. | .-s startaddr -e endaddr.\\) .--. mixed_mode.\"" \
"data-disassemble mix different args"
- mi_gdb_test "789-data-disassemble -f basics.c -l 32 -- 9" \
+ mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
"789\\^error,msg=\"mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.\"" \
"data-disassemble wrong mode arg"
diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp
index 536dd791530..a07f607e52c 100644
--- a/gdb/testsuite/gdb.mi/mi-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi-eval.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -46,8 +43,11 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
+
mi_runto callee4
-mi_next_to "callee4" "" "basics.c" "9" "next at callee4"
+mi_next_to "callee4" "" "basics.c" [expr $line_callee4_body + 1] "next at callee4"
mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp
index 2ffdcbfc6a9..0ce4fd64948 100644
--- a/gdb/testsuite/gdb.mi/mi-file.exp
+++ b/gdb/testsuite/gdb.mi/mi-file.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -47,19 +44,40 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_tbreak_creation_and_listing {} {
+proc test_file_list_exec_source_file {} {
global srcfile
global srcdir
global subdir
set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
# get the path and absolute path to the current executable
+ #
+ # In gdb 6.2 (at least), the default line number is set by
+ # select_source_symtab to the first line of "main" minus
+ # the value of "lines_to_list" (which defaults to 10) plus one.
+ # --chastain 2004-08-13
+
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+ set gdb_lines_to_list 10
+ set line_default [expr $line_main_body - $gdb_lines_to_list + 1]
+
mi_gdb_test "111-file-list-exec-source-file" \
- "111\\\^done,line=\"23\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
+ "111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
"request path info of current source file (${srcfile})"
}
-test_tbreak_creation_and_listing
+proc test_file_list_exec_source_files {} {
+ global srcfile
+
+ # get the path and absolute path to the current executable
+ mi_gdb_test "222-file-list-exec-source-files" \
+ "222\\\^done,files=\\\[\{file=\".*/${srcfile}\",fullname=\"/.*/${srcfile}\"\},\{file=\".*\"\},\{file=\".*\"\},\{file=\".*\"\},\{file=\".*\"\}\\\]" \
+ "Getting a list of source files."
+}
+
+test_file_list_exec_source_file
+test_file_list_exec_source_files
mi_gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.mi/mi-hack-cli.exp b/gdb/testsuite/gdb.mi/mi-hack-cli.exp
index a0489431a2e..185fe9b48fb 100644
--- a/gdb/testsuite/gdb.mi/mi-hack-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-hack-cli.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2001 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
diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp
index 573c8964c22..2cc74dda6d4 100644
--- a/gdb/testsuite/gdb.mi/mi-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 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
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index a6a6406a76d..5dbda48fa91 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 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
diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp
index ca37e9fc9fc..d599940599b 100644
--- a/gdb/testsuite/gdb.mi/mi-return.exp
+++ b/gdb/testsuite/gdb.mi/mi-return.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test Machine interface (MI) operations
# Verify that, using the MI, we can run a simple program and perform
# exec-return.
@@ -51,9 +48,12 @@ proc test_return_simple {} {
global mi_gdb_prompt
global hex
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+
send_gdb "111-exec-return\n"
gdb_expect {
- -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
+ -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"$line_callee3_close_brace\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
-re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
timeout { fail "return from callee4 now (timeout)"
}
diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp
index a3ebd20910b..9e9385e9571 100644
--- a/gdb/testsuite/gdb.mi/mi-simplerun.exp
+++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -53,6 +50,13 @@ proc test_breakpoints_creation_and_listing {} {
global srcfile
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee2_head [gdb_get_line_number "callee2 ("]
+ set line_callee2_body [expr $line_callee2_head + 2]
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
# Tests:
@@ -62,23 +66,23 @@ proc test_breakpoints_creation_and_listing {} {
# -break-info
mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert operation"
mi_gdb_test "201-break-insert basics.c:callee2" \
- "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
+ "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
"insert breakpoint at basics.c:callee2"
- mi_gdb_test "202-break-insert basics.c:15" \
- "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert breakpoint at basics.c:15 (callee3)"
+ mi_gdb_test "202-break-insert basics.c:$line_callee3_head" \
+ "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_head\",times=\"0\"\}" \
+ "insert breakpoint at basics.c:\$line_callee3_head"
- mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \
- "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert breakpoint at \"<fullfilename>\":6 (callee4)"
+ mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":$line_callee4_head\"" \
+ "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_head\",times=\"0\"\}" \
+ "insert breakpoint at \"<fullfilename>\":\$line_callee4_head"
mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of breakpoints"
mi_gdb_test "205-break-disable 2 3 4" \
@@ -94,6 +98,9 @@ proc test_running_the_program {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Run the program without args, then specify srgs and rerun the program
# Tests:
# -exec-run
@@ -104,7 +111,7 @@ proc test_running_the_program {} {
# The following is equivalent to a send_gdb "000-exec-run\n"
mi_run_cmd
gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+ -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" {
pass "run to main"
}
-re ".*$mi_gdb_prompt$" {
@@ -120,6 +127,15 @@ proc test_controlled_execution {} {
global mi_gdb_prompt
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+ set line_callee1_head [gdb_get_line_number "callee1 ("]
+ set line_callee1_body [expr $line_callee1_head + 2]
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Continue execution until a breakpoint is reached, step into calls, verifying
# if the arguments are correctly shown, continue to the end of a called
# function, step over a call (next).
@@ -129,24 +145,24 @@ proc test_controlled_execution {} {
# -exec-step
# -exec-finish
- mi_next_to "main" "" "basics.c" "33" "next at main"
+ mi_next_to "main" "" "basics.c" [expr $line_main_body + 1] "next at main"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
# NOTE: The ``\\\\\"'' is for \".
mi_step_to "callee1" \
"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
- "basics.c" "27" "step at main"
+ "basics.c" "$line_callee1_body" "step at main"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
mi_execute_to "exec-step 3" "end-stepping-range" "callee4" "" \
- "basics.c" "8" "" "step to callee4"
+ "basics.c" $line_callee4_body "" "step to callee4"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
# NOTE: The ``.'' is part of ``gdb-result-var="$1"''
- mi_finish_to "callee3" ".*" "basics.c" "18" ".1" "0" "exec-finish"
+ mi_finish_to "callee3" ".*" "basics.c" $line_callee3_close_brace ".1" "0" "exec-finish"
}
proc test_controlling_breakpoints {} {
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 966a86dc7ff..2bd12fabe38 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -1,4 +1,4 @@
-# Copyright 2000, 2002, 2004 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -50,6 +47,9 @@ proc test_stack_frame_listing {} {
global mi_gdb_prompt
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+
# Obtain a stack trace
# Tests:
# -stack-list-frames
@@ -57,7 +57,7 @@ proc test_stack_frame_listing {} {
# -stack-list-frames 1 3
mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
+ "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
"stack frame listing"
mi_gdb_test "232-stack-list-frames 1 1" \
"232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
@@ -156,10 +156,12 @@ proc test_stack_locals_listing {} {
"232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\"\\\]" \
"stack locals listing 0"
+set line_callee4_return_0 [gdb_get_line_number "return 0;"]
+
# step until A, B, C, have some reasonable values.
send_gdb "-exec-next 3\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" {
pass "next's in callee4"
}
timeout { fail "next in callee4 (timeout)" }
diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp
index 44e6442150a..867fc39481d 100644
--- a/gdb/testsuite/gdb.mi/mi-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi-stepi.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test Machine interface (MI) operations
# Verify that, using the MI, we can run a simple program and perform
# exec-step-instruction and exec-next-instruction.
@@ -50,10 +47,19 @@ proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+ set line_main_hello [gdb_get_line_number "Hello, World!"]
+
send_gdb "111-exec-step-instruction\n"
gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "step-instruction at main"
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "step-instruction at main"
+ } else {
+ fail "step-instruction at main"
+ }
}
timeout {
fail "step-instruction at main (timeout)"
@@ -61,8 +67,13 @@ proc test_stepi_nexti {} {
}
send_gdb "222-exec-next-instruction\n"
gdb_expect {
- -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
+ -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "next-instruction at main"
+ } else {
+ fail "next-instruction at main"
+ }
}
timeout {
fail "next-instruction at main (timeout)"
@@ -70,8 +81,13 @@ proc test_stepi_nexti {} {
}
send_gdb "333-exec-next-instruction\n"
gdb_expect {
- -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
+ -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "next-instruction at main"
+ } else {
+ fail "next-instruction at main"
+ }
}
timeout {
fail "next-instruction at main (timeout)"
diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp
index ac276cc5229..b95cc7625b3 100644
--- a/gdb/testsuite/gdb.mi/mi-until.exp
+++ b/gdb/testsuite/gdb.mi/mi-until.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001 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
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
index a0b456a90f1..db49456a637 100644
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -55,7 +52,9 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 123;"] \
+ "step at do_block_test"
# Be paranoid and assume 3.2 created foo
@@ -71,7 +70,9 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo2 = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo2 = 123;"] \
+ "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
@@ -80,7 +81,9 @@ mi_gdb_test "-var-update *" \
"update all vars: cb foo changed"
# step to "foo = 321;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 321;"] \
+ "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
@@ -89,7 +92,9 @@ mi_gdb_test "-var-create inner_foo * foo" \
"create local variable inner_foo"
# step to "foo2 = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo2 = 0;"] \
+ "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
@@ -121,7 +126,9 @@ mi_gdb_test "-var-delete inner_foo" \
"delete var inner_foo"
# step to "foo = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 0;"] \
+ "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
@@ -132,7 +139,9 @@ mi_gdb_test "-var-update foo2" \
clear_xfail *-*-*
# step to "cb = 21;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "cb = 21;"] \
+ "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 74a5894ce5d..d0fb3957658 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation
+# Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation
# 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -555,8 +552,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr
# Step to "struct_declarations.integer = 123;"
-set line 192
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"
+set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ $line_dct_123 "step to line \$line_dct_123"
# Test: c_variable-4.81
# Desc: create local variable "weird"
@@ -754,8 +752,8 @@ mi_gdb_test "-var-update *" \
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
-set line 193
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
# Test: c_variable-5.2
# Desc: check that integer changed
@@ -767,8 +765,8 @@ mi_gdb_test "-var-update *" \
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
-set line 196
-mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
@@ -777,8 +775,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
-set line 197
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
@@ -787,8 +785,8 @@ mi_gdb_test "-var-update *" \
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
-set line 198
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
@@ -797,8 +795,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
-set line 199
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
@@ -807,8 +805,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
-set line 200
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
@@ -824,8 +822,10 @@ mi_gdb_test "-var-update *" \
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
-set line 208
-mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+
+set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
+mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ $line_dct_nothing {} "step \$line_dct_nothing"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
@@ -838,8 +838,9 @@ mi_gdb_test "-var-list-children --all-values struct_declarations.long_array" \
"listing of names and values of children"
# Step over "weird->func_ptr = nothing;"
-set line 211
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+set line_dct_a0_0 [gdb_get_line_number "a0 = '0';"]
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ $line_dct_a0_0 "step \$line_dct_a0_0"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
@@ -859,8 +860,10 @@ mi_gdb_test "-var-delete weird->int_ptr_ptr" \
# Step over all lines:
# ...
# psnp = &snp0;
-set line 254
-mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+
+set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
+mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
@@ -1130,8 +1133,8 @@ mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
-set line 255
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
@@ -1140,8 +1143,8 @@ mi_gdb_test "-var-update *" \
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
-set line 256
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
@@ -1151,8 +1154,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp2.char_ptr = &a3;"
-set line 257
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
@@ -1162,8 +1165,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp0.long_ptr = &y3;"
-set line 258
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
@@ -1173,8 +1176,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp1.long_ptr = &x3;"
-set line 259
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
@@ -1190,8 +1193,8 @@ clear_xfail *-*-*
#
# Step over "snp2.long_ptr = &z3;"
-set line 260
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 7d02b36943a..adc49951468 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -168,7 +165,8 @@ mi_gdb_test "-var-update *" \
"update all vars"
# Step over "linteger = 1234;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
+set line_dlt_linteger [gdb_get_line_number "lpinteger = &linteger;"]
+mi_step_to "do_locals_tests" "" "var-cmd.c" $line_dlt_linteger "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
@@ -177,7 +175,7 @@ mi_gdb_test "-var-update *" \
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 1] "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
@@ -186,7 +184,7 @@ mi_gdb_test "-var-update *" \
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 2] "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
@@ -195,7 +193,7 @@ mi_gdb_test "-var-update *" \
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 3] "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
@@ -216,7 +214,7 @@ mi_gdb_test "-var-update *" \
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "119" "" "step at do_locals_tests (5)"
+ "var-cmd.c" [expr $line_dlt_linteger + 12] "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
@@ -231,8 +229,10 @@ mi_gdb_test "-var-update *" \
# lpsimple = &lsimple;
# func = nothing;
+set line_dlt_4321 [gdb_get_line_number "linteger = 4321;"]
+
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "125" "" "step at do_locals_tests (6)"
+ "var-cmd.c" $line_dlt_4321 "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
@@ -251,7 +251,7 @@ mi_gdb_test "-var-update *" \
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "133" "" "step at do_locals_tests (7)"
+ "var-cmd.c" [expr $line_dlt_4321 + 8] "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
@@ -384,12 +384,14 @@ mi_gdb_test "-var-assign lsimple.integer 333" \
# End of assign tests
#####
+set line_subroutine1_body [gdb_get_line_number "global_simple.integer = i + 3;"]
+
mi_gdb_test "-break-insert subroutine1" \
- "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
+ "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"$line_subroutine1_body\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
- "var-cmd.c" "146" "continue to subroutine1"
+ "var-cmd.c" $line_subroutine1_body "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
@@ -408,7 +410,7 @@ mi_gdb_test "-var-create linteger * linteger" \
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "147" "step at subroutine1"
+ "var-cmd.c" [expr $line_subroutine1_body + 1] "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
@@ -424,7 +426,7 @@ mi_gdb_test "-var-update *" \
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "148" "step at subroutine1 (2)"
+ "var-cmd.c" [expr $line_subroutine1_body + 2] "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
@@ -433,7 +435,7 @@ mi_gdb_test "-var-update *" \
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "149" "step at subroutine1 (3)"
+ "var-cmd.c" [expr $line_subroutine1_body + 3] "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
@@ -441,7 +443,9 @@ mi_gdb_test "-var-update *" \
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
-mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
+set line_dlt_call_subroutine1 [gdb_get_line_number "subroutine1 (linteger, &llong);"]
+mi_next_to "do_locals_tests" "" "var-cmd.c" \
+ [expr $line_dlt_call_subroutine1 + 1] "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index ab5a17b4ada..a9576e1cb09 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -42,14 +39,16 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-mi_gdb_test "200-break-insert 260" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \
+set line_dct_close_brace [expr [gdb_get_line_number "snp2.long_ptr = &z3;"] + 1]
+
+mi_gdb_test "200-break-insert $line_dct_close_brace" \
+ "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_close_brace\",times=\"0\"\}" \
"break-insert operation"
mi_run_cmd
# The running part has been checked already by mi_run_cmd
gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
+ -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dct_close_brace\"\}\r\n$mi_gdb_prompt$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
@@ -324,13 +323,16 @@ mi_gdb_test "-var-delete weird" \
##### #####
# Stop in "do_special_tests"
+
+set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+
mi_gdb_test "200-break-insert do_special_tests" \
- "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
@@ -583,15 +585,17 @@ gdb_expect {
timeout { fail "print FP register (timeout)"}
}
+set line_incr_a_b_a [gdb_get_line_number "b = a;"]
+
mi_gdb_test "200-break-insert incr_a" \
- "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"([expr $line_incr_a_b_a - 2]|[expr $line_incr_a_b_a - 1]|$line_incr_a_b_a)\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp
index ba243999d19..8fe9173f1bc 100644
--- a/gdb/testsuite/gdb.mi/mi-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -52,6 +49,9 @@ proc test_watchpoint_creation_and_listing {} {
global srcfile
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+
# Insert a watchpoint and list
# Tests:
# -break-watch C
@@ -62,7 +62,7 @@ proc test_watchpoint_creation_and_listing {} {
"break-watch operation"
mi_gdb_test "222-break-list" \
- "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
+ "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
"list of watchpoints"
}
@@ -73,17 +73,20 @@ proc test_awatch_creation_and_listing {} {
global srcfile
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert an access watchpoint and list it
# Tests:
# -break-watch -a A
# -break-list
mi_gdb_test "333-break-watch -a A" \
- "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
+ "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
"break-watch -a operation"
mi_gdb_test "444-break-list" \
- "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of watchpoints awatch"
mi_gdb_test "777-break-delete 3" \
@@ -97,17 +100,20 @@ proc test_rwatch_creation_and_listing {} {
global srcfile
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert a read watchpoint and list it.
# Tests:
# -break-insert -r B
# -break-list
mi_gdb_test "200-break-watch -r C" \
- "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert -r operation"
mi_gdb_test "300-break-list" \
- "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \
+ "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\}\}" \
"list of breakpoints"
mi_gdb_test "177-break-delete 4" \
@@ -119,6 +125,10 @@ proc test_watchpoint_triggering {} {
global mi_gdb_prompt
global hex
+ set line_callee4_return_0 [gdb_get_line_number "return 0;"]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+
# Continue execution until the watchpoint is reached, continue again,
# to see the watchpoint go out of scope.
# Does:
@@ -129,7 +139,7 @@ proc test_watchpoint_triggering {} {
gdb_expect {
-re "222\\^running\r\n$mi_gdb_prompt" {
gdb_expect {
- -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+ -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" {
pass "watchpoint trigger"
}
-re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"}
@@ -144,7 +154,7 @@ proc test_watchpoint_triggering {} {
gdb_expect {
-re "223\\^running\r\n$mi_gdb_prompt" {
gdb_expect {
- -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
+ -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"$line_callee3_close_brace\"\}\r\n$mi_gdb_prompt$" {
pass "wp out of scope"
}
-re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"}
diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp
index a86ba3765b5..0fd1c87e157 100644
--- a/gdb/testsuite/gdb.mi/mi2-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi2-basics.exp
@@ -1,4 +1,5 @@
-# Copyright 1999, 2000, 2004 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004
+# 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
diff --git a/gdb/testsuite/gdb.mi/mi2-break.exp b/gdb/testsuite/gdb.mi/mi2-break.exp
index 11cb0d98045..e22bf1686f7 100644
--- a/gdb/testsuite/gdb.mi/mi2-break.exp
+++ b/gdb/testsuite/gdb.mi/mi2-break.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2001, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -47,39 +44,56 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
+# Locate line numbers in basics.c.
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
+set line_callee3_head [gdb_get_line_number "callee3 ("]
+set line_callee3_body [expr $line_callee3_head + 2]
+set line_callee2_head [gdb_get_line_number "callee2 ("]
+set line_callee2_body [expr $line_callee2_head + 2]
+set line_callee1_head [gdb_get_line_number "callee1 ("]
+set line_callee1_body [expr $line_callee1_head + 2]
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+
proc test_tbreak_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
global hex
+ global line_callee4_head line_callee4_body
+ global line_callee3_head line_callee3_body
+ global line_callee2_head line_callee2_body
+ global line_callee1_head line_callee1_body
+ global line_main_head line_main_body
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
# Tests:
# -break-insert -t main
# -break-insert -t basics.c:callee2
- # -break-insert -t basics.c:15
- # -break-insert -t srcfile:6
+ # -break-insert -t basics.c:$line_callee3_head
+ # -break-insert -t srcfile:$line_callee4_head
# -break-list
mi_gdb_test "222-break-insert -t main" \
- "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert -t operation"
mi_gdb_test "333-break-insert -t basics.c:callee2" \
- "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
+ "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
"insert temp breakpoint at basics.c:callee2"
- mi_gdb_test "444-break-insert -t basics.c:15" \
- "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert temp breakpoint at basics.c:15 (callee3)"
+ mi_gdb_test "444-break-insert -t basics.c:$line_callee3_head" \
+ "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_head\",times=\"0\"\}" \
+ "insert temp breakpoint at basics.c:\$line_callee3_body"
- # Getting the quoting right is tricky. That is "\"<file>\":6"
- mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \
- "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
+ # Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
+ mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":$line_callee4_head\"" \
+ "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_head\",times=\"0\"\}" \
+ "insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
mi_gdb_test "666-break-list" \
- "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \
+ "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}.*\\\]\}" \
"list of breakpoints"
mi_gdb_test "777-break-delete" \
@@ -91,6 +105,11 @@ proc test_rbreak_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
global hex
+ global line_callee4_head line_callee4_body
+ global line_callee3_head line_callee3_body
+ global line_callee2_head line_callee2_body
+ global line_callee1_head line_callee1_body
+ global line_main_head line_main_body
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
@@ -103,27 +122,27 @@ proc test_rbreak_creation_and_listing {} {
setup_xfail "*-*-*"
mi_gdb_test "122-break-insert -r main" \
- "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
+ "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
"break-insert -r operation"
setup_xfail "*-*-*"
mi_gdb_test "133-break-insert -r callee2" \
- "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\}" \
+ "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\}" \
"insert breakpoint with regexp callee2"
setup_xfail "*-*-*"
mi_gdb_test "144-break-insert -r callee" \
- "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
+ "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
"insert breakpoint with regexp callee"
setup_xfail "*-*-*"
mi_gdb_test "155-break-insert -r \.\*llee" \
- "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
+ "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
"insert breakpoint with regexp .*llee"
setup_xfail "*-*-*"
mi_gdb_test "166-break-list" \
- "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of breakpoints"
mi_gdb_test "177-break-delete" \
diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp
index 10295a90ce2..3a0793d420b 100644
--- a/gdb/testsuite/gdb.mi/mi2-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi2-cli.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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 tests that GDB's console can be accessed via the MI.
# Specifically, we are testing the "interpreter-exec" command and that
# the commands that are executed via this command are properly executed.
@@ -67,6 +64,11 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
mi_run_to_main
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+set line_main_hello [gdb_get_line_number "Hello, World!"]
+set line_main_return [expr $line_main_hello + 2]
+
mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \
"-interpreter-exec console \"set args foobar\""
@@ -91,8 +93,9 @@ mi_gdb_test "-interpreter-exec console \"set listsize 1\"" \
{\^done} \
"-interpreter-exec console \"set listsize 1\""
+# {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done }
mi_gdb_test "-interpreter-exec console \"list\"" \
- {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \
+ ".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\""
# # NOTE: cagney/2003-02-03: Not yet.
@@ -150,43 +153,43 @@ mi_gdb_test "500-stack-select-frame 0" \
"-stack-select-frame 0"
# NOTE: cagney/2003-02-03: Not yet.
-# mi_gdb_test "-break-insert -t basics.c:35" \
+# mi_gdb_test "-break-insert -t basics.c:$line_main_hello" \
# {.*=breakpoint-create,number="3".*\^done} \
-# "-break-insert -t basics.c:35"
-mi_gdb_test "600-break-insert -t basics.c:35" \
+# "-break-insert -t basics.c:\$line_main_hello"
+mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
- "-break-insert -t basics.c:35"
+ "-break-insert -t basics.c:\$line_main_hello"
# mi_gdb_test "-exec-continue" \
-# {.*\*stopped.*,file=".*basics.c",line="35"\}} \
-# "-exec-continue to line 35"
+# {.*\*stopped.*,file=".*basics.c",line="$line_main_hello"\}} \
+# "-exec-continue to line \$line_main_hello"
send_gdb "700-exec-continue\n"
gdb_expect {
- -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" {
- pass "-exec-continue to line 35"
+ -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.$line_main_hello.*$mi_gdb_prompt$" {
+ pass "-exec-continue to line \$line_main_hello"
}
timeout {
- fail "-exec-continue to line 35"
+ fail "-exec-continue to line \$line_main_hello"
}
}
# NOTE: cagney/2003-02-03: Not yet.
# mi_gdb_test "-exec-next" \
-# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
-# "-exec-next to line 37"
+# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="$line_main_return"\}} \
+# "-exec-next to line \$line_main_return"
send_gdb "800-exec-next\n"
gdb_expect {
- -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" {
- pass "-exec-next to line 37"
+ -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.$line_main_return.*$mi_gdb_prompt$" {
+ pass "-exec-next to line \$line_main_return"
}
timeout {
- fail "-exec-next to line 37"
+ fail "-exec-next to line \$line_main_return"
}
}
mi_gdb_test "-interpreter-exec console \"list\"" \
- {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \
- "-interpreter-exec console \"list\" at basics.c:37"
+ "\~\"$line_main_return\[\\\\t ]*return 0;\\\\n\".*\\^done" \
+ "-interpreter-exec console \"list\" at basics.c:\$line_main_return"
mi_gdb_test "-interpreter-exec console \"help set args\"" \
{\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \
diff --git a/gdb/testsuite/gdb.mi/mi2-console.exp b/gdb/testsuite/gdb.mi/mi2-console.exp
index 5e307b9e6f3..dba80c9f606 100644
--- a/gdb/testsuite/gdb.mi/mi2-console.exp
+++ b/gdb/testsuite/gdb.mi/mi2-console.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi2-disassemble.exp b/gdb/testsuite/gdb.mi/mi2-disassemble.exp
index 8cd76f968c4..a56b027ee21 100644
--- a/gdb/testsuite/gdb.mi/mi2-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi2-disassemble.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test Machine interface (MI) operations for disassembly.
#
@@ -48,17 +45,20 @@ proc test_disassembly_only {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
# -data-disassemble -s $pc -e "$pc+8" -- 0
- # -data-disassembly -f basics.c -l 32 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -- 0
mi_gdb_test "print/x \$pc" "" ""
mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
"111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
"data-disassemble from pc to pc+12 assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file & line, assembly only"
}
@@ -68,22 +68,25 @@ proc test_disassembly_lines_limit {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 0
- # -data-disassembly -f basics.c -l 32 -n 0 -- 0
- # -data-disassembly -f basics.c -l 32 -n 50 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 0
+ # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 0
mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 0" \
"222\\^done,asm_insns=\\\[\\\]" \
"data-disassemble file, line, number (zero lines) assembly only"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 0" \
"222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number (more than main lines) assembly only"
}
@@ -94,13 +97,16 @@ proc test_disassembly_mixed {} {
global hex
global decimal
+ set line_callee2_head [gdb_get_line_number "callee2 ("]
+ set line_callee2_open_brace [expr $line_callee2_head + 1]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 21 -- 1
+ # -data-disassembly -f basics.c -l $line_callee2_open_brace -- 1
# -data-disassembly -s $pc -e "$pc+8" -- 1
- mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
- "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
+ mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 1" \
+ "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
"data-disassemble file, line assembly mixed"
#
@@ -118,22 +124,26 @@ proc test_disassembly_mixed_lines_limit {} {
global hex
global decimal
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_open_brace [expr $line_main_head + 1]
+ set line_main_body [expr $line_main_head + 2]
+
# Test disassembly more only for the current function.
# Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 1
- # -data-disassembly -f basics.c -l 32 -n 0 -- 1
- # -data-disassembly -f basics.c -l 32 -n 50 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 20 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 0 -- 1
+ # -data-disassembly -f basics.c -l $line_main_body -n 50 -- 1
mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 1" \
"222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number assembly mixed"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 1" \
+ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_main_open_brace\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
"data-disassemble file, line, number (zero lines) assembly mixed"
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 1" \
+ mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 1" \
"222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number (more than main lines) assembly mixed"
}
@@ -142,6 +152,9 @@ proc test_disassembly_bogus_args {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Test that bogus input to disassembly command is rejected.
# Tests:
# -data-disassembly -f foo -l abc -n 0 -- 0
@@ -161,7 +174,7 @@ proc test_disassembly_bogus_args {} {
"456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. | .-s startaddr -e endaddr.\\) .--. mixed_mode.\"" \
"data-disassemble mix different args"
- mi_gdb_test "789-data-disassemble -f basics.c -l 32 -- 9" \
+ mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
"789\\^error,msg=\"mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.\"" \
"data-disassemble wrong mode arg"
diff --git a/gdb/testsuite/gdb.mi/mi2-eval.exp b/gdb/testsuite/gdb.mi/mi2-eval.exp
index 85fd991bbd3..1d181913aaa 100644
--- a/gdb/testsuite/gdb.mi/mi2-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi2-eval.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -46,8 +43,11 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
+
mi_runto callee4
-mi_next_to "callee4" "" "basics.c" "9" "next at callee4"
+mi_next_to "callee4" "" "basics.c" [expr $line_callee4_body + 1] "next at callee4"
mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
diff --git a/gdb/testsuite/gdb.mi/mi2-file.exp b/gdb/testsuite/gdb.mi/mi2-file.exp
index fe75a934197..1e81df6d6a4 100644
--- a/gdb/testsuite/gdb.mi/mi2-file.exp
+++ b/gdb/testsuite/gdb.mi/mi2-file.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -47,19 +44,30 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_tbreak_creation_and_listing {} {
+proc test_file_list_exec_source_file {} {
global srcfile
global srcdir
global subdir
set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
# get the path and absolute path to the current executable
+ #
+ # In gdb 6.2 (at least), the default line number is set by
+ # select_source_symtab to the first line of "main" minus
+ # the value of "lines_to_list" (which defaults to 10) plus one.
+ # --chastain 2004-08-13
+
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+ set gdb_lines_to_list 10
+ set line_default [expr $line_main_body - $gdb_lines_to_list + 1]
+
mi_gdb_test "111-file-list-exec-source-file" \
- "111\\\^done,line=\"23\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
+ "111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
"request path info of current source file (${srcfile})"
}
-test_tbreak_creation_and_listing
+test_file_list_exec_source_file
mi_gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-hack-cli.exp b/gdb/testsuite/gdb.mi/mi2-hack-cli.exp
index 066eea2d425..2e02a71eb9c 100644
--- a/gdb/testsuite/gdb.mi/mi2-hack-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi2-hack-cli.exp
@@ -1,4 +1,4 @@
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999, 2001, 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
diff --git a/gdb/testsuite/gdb.mi/mi2-read-memory.exp b/gdb/testsuite/gdb.mi/mi2-read-memory.exp
index eee36a75f16..c3f16774e4a 100644
--- a/gdb/testsuite/gdb.mi/mi2-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi2-read-memory.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi2-regs.exp b/gdb/testsuite/gdb.mi/mi2-regs.exp
index a14b2417767..546cc93bf47 100644
--- a/gdb/testsuite/gdb.mi/mi2-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi2-regs.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 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
diff --git a/gdb/testsuite/gdb.mi/mi2-return.exp b/gdb/testsuite/gdb.mi/mi2-return.exp
index b54f15a6d89..670329e79be 100644
--- a/gdb/testsuite/gdb.mi/mi2-return.exp
+++ b/gdb/testsuite/gdb.mi/mi2-return.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test Machine interface (MI) operations
# Verify that, using the MI, we can run a simple program and perform
# exec-return.
@@ -51,9 +48,12 @@ proc test_return_simple {} {
global mi_gdb_prompt
global hex
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+
send_gdb "111-exec-return\n"
gdb_expect {
- -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
+ -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"$line_callee3_close_brace\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
-re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
timeout { fail "return from callee4 now (timeout)"
}
diff --git a/gdb/testsuite/gdb.mi/mi2-simplerun.exp b/gdb/testsuite/gdb.mi/mi2-simplerun.exp
index 93d44265699..6fdaffde056 100644
--- a/gdb/testsuite/gdb.mi/mi2-simplerun.exp
+++ b/gdb/testsuite/gdb.mi/mi2-simplerun.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -53,6 +50,13 @@ proc test_breakpoints_creation_and_listing {} {
global srcfile
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee2_head [gdb_get_line_number "callee2 ("]
+ set line_callee2_body [expr $line_callee2_head + 2]
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert some breakpoints and list them
# Also, disable some so they do not interfere with other tests
# Tests:
@@ -62,23 +66,23 @@ proc test_breakpoints_creation_and_listing {} {
# -break-info
mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert operation"
mi_gdb_test "201-break-insert basics.c:callee2" \
- "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
+ "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
"insert breakpoint at basics.c:callee2"
- mi_gdb_test "202-break-insert basics.c:15" \
- "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert breakpoint at basics.c:15 (callee3)"
+ mi_gdb_test "202-break-insert basics.c:$line_callee3_head" \
+ "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_head\",times=\"0\"\}" \
+ "insert breakpoint at basics.c:\$line_callee3_head"
- mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \
- "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert breakpoint at \"<fullfilename>\":6 (callee4)"
+ mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":$line_callee4_head\"" \
+ "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_head\",times=\"0\"\}" \
+ "insert breakpoint at \"<fullfilename>\":\$line_callee4_head"
mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of breakpoints"
mi_gdb_test "205-break-disable 2 3 4" \
@@ -94,6 +98,9 @@ proc test_running_the_program {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Run the program without args, then specify srgs and rerun the program
# Tests:
# -exec-run
@@ -104,7 +111,7 @@ proc test_running_the_program {} {
# The following is equivalent to a send_gdb "000-exec-run\n"
mi_run_cmd
gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+ -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" {
pass "run to main"
}
-re ".*$mi_gdb_prompt$" {
@@ -120,6 +127,15 @@ proc test_controlled_execution {} {
global mi_gdb_prompt
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+ set line_callee1_head [gdb_get_line_number "callee1 ("]
+ set line_callee1_body [expr $line_callee1_head + 2]
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Continue execution until a breakpoint is reached, step into calls, verifying
# if the arguments are correctly shown, continue to the end of a called
# function, step over a call (next).
@@ -129,24 +145,24 @@ proc test_controlled_execution {} {
# -exec-step
# -exec-finish
- mi_next_to "main" "" "basics.c" "33" "next at main"
+ mi_next_to "main" "" "basics.c" [expr $line_main_body + 1] "next at main"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
# NOTE: The ``\\\\\"'' is for \".
mi_step_to "callee1" \
"\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
- "basics.c" "27" "step at main"
+ "basics.c" "$line_callee1_body" "step at main"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
mi_execute_to "exec-step 3" "end-stepping-range" "callee4" "" \
- "basics.c" "8" "" "step to callee4"
+ "basics.c" $line_callee4_body "" "step to callee4"
# FIXME: A string argument is not printed right; should be fixed and
# we should look for the right thing here.
# NOTE: The ``.'' is part of ``gdb-result-var="$1"''
- mi_finish_to "callee3" ".*" "basics.c" "18" ".1" "0" "exec-finish"
+ mi_finish_to "callee3" ".*" "basics.c" $line_callee3_close_brace ".1" "0" "exec-finish"
}
proc test_controlling_breakpoints {} {
diff --git a/gdb/testsuite/gdb.mi/mi2-stack.exp b/gdb/testsuite/gdb.mi/mi2-stack.exp
index f0a4a6124be..6f524f8f3ac 100644
--- a/gdb/testsuite/gdb.mi/mi2-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi2-stack.exp
@@ -1,4 +1,4 @@
-# Copyright 2000, 2002 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -50,6 +47,9 @@ proc test_stack_frame_listing {} {
global mi_gdb_prompt
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+
# Obtain a stack trace
# Tests:
# -stack-list-frames
@@ -57,7 +57,7 @@ proc test_stack_frame_listing {} {
# -stack-list-frames 1 3
mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
+ "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
"stack frame listing"
mi_gdb_test "232-stack-list-frames 1 1" \
"232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
@@ -155,10 +155,12 @@ proc test_stack_locals_listing {} {
"232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\"\\\]" \
"stack locals listing 0"
+set line_callee4_return_0 [gdb_get_line_number "return 0;"]
+
# step until A, B, C, have some reasonable values.
send_gdb "-exec-next 3\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" {
pass "next's in callee4"
}
timeout { fail "next in callee4 (timeout)" }
diff --git a/gdb/testsuite/gdb.mi/mi2-stepi.exp b/gdb/testsuite/gdb.mi/mi2-stepi.exp
index 208b9e2ba06..99276d7f2b9 100644
--- a/gdb/testsuite/gdb.mi/mi2-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi2-stepi.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test Machine interface (MI) operations
# Verify that, using the MI, we can run a simple program and perform
# exec-step-instruction and exec-next-instruction.
@@ -50,10 +47,19 @@ proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+ set line_main_hello [gdb_get_line_number "Hello, World!"]
+
send_gdb "111-exec-step-instruction\n"
gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "step-instruction at main"
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "step-instruction at main"
+ } else {
+ fail "step-instruction at main"
+ }
}
timeout {
fail "step-instruction at main (timeout)"
@@ -61,8 +67,13 @@ proc test_stepi_nexti {} {
}
send_gdb "222-exec-next-instruction\n"
gdb_expect {
- -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
+ -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "next-instruction at main"
+ } else {
+ fail "next-instruction at main"
+ }
}
timeout {
fail "next-instruction at main (timeout)"
@@ -70,8 +81,13 @@ proc test_stepi_nexti {} {
}
send_gdb "333-exec-next-instruction\n"
gdb_expect {
- -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
+ -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"(\[0-9\]+)\"\}\r\n$mi_gdb_prompt$" {
+ set line $expect_out(1,string)
+ if { $line >= $line_main_body && $line <= $line_main_hello } {
+ pass "next-instruction at main"
+ } else {
+ fail "next-instruction at main"
+ }
}
timeout {
fail "next-instruction at main (timeout)"
diff --git a/gdb/testsuite/gdb.mi/mi2-until.exp b/gdb/testsuite/gdb.mi/mi2-until.exp
index 4ef296c0121..7387da0a29e 100644
--- a/gdb/testsuite/gdb.mi/mi2-until.exp
+++ b/gdb/testsuite/gdb.mi/mi2-until.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 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
diff --git a/gdb/testsuite/gdb.mi/mi2-var-block.exp b/gdb/testsuite/gdb.mi/mi2-var-block.exp
index 84bc1fffba4..474891030cc 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-block.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -55,7 +52,9 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 123;"] \
+ "step at do_block_test"
# Be paranoid and assume 3.2 created foo
@@ -71,7 +70,9 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo2 = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo2 = 123;"] \
+ "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
@@ -80,7 +81,9 @@ mi_gdb_test "-var-update *" \
"update all vars: cb foo changed"
# step to "foo = 321;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 321;"] \
+ "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
@@ -89,7 +92,9 @@ mi_gdb_test "-var-create inner_foo * foo" \
"create local variable inner_foo"
# step to "foo2 = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo2 = 0;"] \
+ "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
@@ -121,7 +126,9 @@ mi_gdb_test "-var-delete inner_foo" \
"delete var inner_foo"
# step to "foo = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "foo = 0;"] \
+ "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
@@ -132,7 +139,9 @@ mi_gdb_test "-var-update foo2" \
clear_xfail *-*-*
# step to "cb = 21;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
+mi_step_to "do_block_tests" "" "var-cmd.c" \
+ [gdb_get_line_number "cb = 21;"] \
+ "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp
index 3f6a3fddfc6..be2dc849214 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
# 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -555,8 +552,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr
# Step to "struct_declarations.integer = 123;"
-set line 192
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"
+set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ $line_dct_123 "step to line \$line_dct_123"
# Test: c_variable-4.81
# Desc: create local variable "weird"
@@ -754,8 +752,8 @@ mi_gdb_test "-var-update *" \
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
-set line 193
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
# Test: c_variable-5.2
# Desc: check that integer changed
@@ -767,8 +765,8 @@ mi_gdb_test "-var-update *" \
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
-set line 196
-mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
@@ -777,8 +775,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
-set line 197
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
@@ -787,8 +785,8 @@ mi_gdb_test "-var-update *" \
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
-set line 198
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
@@ -797,8 +795,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
-set line 199
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
@@ -807,8 +805,8 @@ mi_gdb_test "-var-update *" \
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
-set line 200
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
@@ -824,8 +822,10 @@ mi_gdb_test "-var-update *" \
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
-set line 208
-mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+
+set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
+mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ $line_dct_nothing {} "step \$line_dct_nothing"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
@@ -835,8 +835,9 @@ mi_gdb_test "-var-update *" \
# Step over "weird->func_ptr = nothing;"
-set line 211
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+set line_dct_a0_0 [gdb_get_line_number "a0 = '0';"]
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ $line_dct_a0_0 "step \$line_dct_a0_0"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
@@ -856,8 +857,10 @@ mi_gdb_test "-var-delete weird->int_ptr_ptr" \
# Step over all lines:
# ...
# psnp = &snp0;
-set line 254
-mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
+
+set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
+mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
@@ -1127,8 +1130,8 @@ mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
-set line 255
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
@@ -1137,8 +1140,8 @@ mi_gdb_test "-var-update *" \
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
-set line 256
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
@@ -1148,8 +1151,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp2.char_ptr = &a3;"
-set line 257
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
@@ -1159,8 +1162,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp0.long_ptr = &y3;"
-set line 258
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
@@ -1170,8 +1173,8 @@ mi_gdb_test "-var-update *" \
# Step over "snp1.long_ptr = &x3;"
-set line 259
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
@@ -1187,8 +1190,8 @@ clear_xfail *-*-*
#
# Step over "snp2.long_ptr = &z3;"
-set line 260
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
+mi_step_to do_children_tests {} {.*var-cmd.c} \
+ [expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
diff --git a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp
index 25326dfe886..bbecda8d3cd 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -168,7 +165,8 @@ mi_gdb_test "-var-update *" \
"update all vars"
# Step over "linteger = 1234;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
+set line_dlt_linteger [gdb_get_line_number "lpinteger = &linteger;"]
+mi_step_to "do_locals_tests" "" "var-cmd.c" $line_dlt_linteger "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
@@ -177,7 +175,7 @@ mi_gdb_test "-var-update *" \
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 1] "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
@@ -186,7 +184,7 @@ mi_gdb_test "-var-update *" \
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 2] "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
@@ -195,7 +193,7 @@ mi_gdb_test "-var-update *" \
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
+mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 3] "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
@@ -216,7 +214,7 @@ mi_gdb_test "-var-update *" \
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "119" "" "step at do_locals_tests (5)"
+ "var-cmd.c" [expr $line_dlt_linteger + 12] "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
@@ -231,8 +229,10 @@ mi_gdb_test "-var-update *" \
# lpsimple = &lsimple;
# func = nothing;
+set line_dlt_4321 [gdb_get_line_number "linteger = 4321;"]
+
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "125" "" "step at do_locals_tests (6)"
+ "var-cmd.c" $line_dlt_4321 "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
@@ -251,7 +251,7 @@ mi_gdb_test "-var-update *" \
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "133" "" "step at do_locals_tests (7)"
+ "var-cmd.c" [expr $line_dlt_4321 + 8] "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
@@ -384,12 +384,14 @@ mi_gdb_test "-var-assign lsimple.integer 333" \
# End of assign tests
#####
+set line_subroutine1_body [gdb_get_line_number "global_simple.integer = i + 3;"]
+
mi_gdb_test "-break-insert subroutine1" \
- "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
+ "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"$line_subroutine1_body\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
- "var-cmd.c" "146" "continue to subroutine1"
+ "var-cmd.c" $line_subroutine1_body "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
@@ -408,7 +410,7 @@ mi_gdb_test "-var-create linteger * linteger" \
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "147" "step at subroutine1"
+ "var-cmd.c" [expr $line_subroutine1_body + 1] "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
@@ -424,7 +426,7 @@ mi_gdb_test "-var-update *" \
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "148" "step at subroutine1 (2)"
+ "var-cmd.c" [expr $line_subroutine1_body + 2] "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
@@ -433,7 +435,7 @@ mi_gdb_test "-var-update *" \
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "149" "step at subroutine1 (3)"
+ "var-cmd.c" [expr $line_subroutine1_body + 3] "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
@@ -441,7 +443,9 @@ mi_gdb_test "-var-update *" \
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
-mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
+set line_dlt_call_subroutine1 [gdb_get_line_number "subroutine1 (linteger, &llong);"]
+mi_next_to "do_locals_tests" "" "var-cmd.c" \
+ [expr $line_dlt_call_subroutine1 + 1] "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
diff --git a/gdb/testsuite/gdb.mi/mi2-var-display.exp b/gdb/testsuite/gdb.mi/mi2-var-display.exp
index 3b0990d7866..090614c2efd 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-display.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
@@ -42,14 +39,16 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-mi_gdb_test "200-break-insert 260" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \
+set line_dct_close_brace [expr [gdb_get_line_number "snp2.long_ptr = &z3;"] + 1]
+
+mi_gdb_test "200-break-insert $line_dct_close_brace" \
+ "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_close_brace\",times=\"0\"\}" \
"break-insert operation"
mi_run_cmd
# The running part has been checked already by mi_run_cmd
gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
+ -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dct_close_brace\"\}\r\n$mi_gdb_prompt$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
@@ -324,13 +323,16 @@ mi_gdb_test "-var-delete weird" \
##### #####
# Stop in "do_special_tests"
+
+set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+
mi_gdb_test "200-break-insert do_special_tests" \
- "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
@@ -583,15 +585,17 @@ gdb_expect {
timeout { fail "print FP register (timeout)"}
}
+set line_incr_a_b_a [gdb_get_line_number "b = a;"]
+
mi_gdb_test "200-break-insert incr_a" \
- "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
+ -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"([expr $line_incr_a_b_a - 2]|[expr $line_incr_a_b_a - 1]|$line_incr_a_b_a)\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
diff --git a/gdb/testsuite/gdb.mi/mi2-watch.exp b/gdb/testsuite/gdb.mi/mi2-watch.exp
index ba7df2b4648..301505e9683 100644
--- a/gdb/testsuite/gdb.mi/mi2-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi2-watch.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -14,9 +14,6 @@
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -52,6 +49,9 @@ proc test_watchpoint_creation_and_listing {} {
global srcfile
global hex
+ set line_callee4_head [gdb_get_line_number "callee4 ("]
+ set line_callee4_body [expr $line_callee4_head + 2]
+
# Insert a watchpoint and list
# Tests:
# -break-watch C
@@ -62,7 +62,7 @@ proc test_watchpoint_creation_and_listing {} {
"break-watch operation"
mi_gdb_test "222-break-list" \
- "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
+ "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
"list of watchpoints"
}
@@ -73,17 +73,20 @@ proc test_awatch_creation_and_listing {} {
global srcfile
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert an access watchpoint and list it
# Tests:
# -break-watch -a A
# -break-list
mi_gdb_test "333-break-watch -a A" \
- "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
+ "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
"break-watch -a operation"
mi_gdb_test "444-break-list" \
- "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+ "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
"list of watchpoints awatch"
mi_gdb_test "777-break-delete 3" \
@@ -97,17 +100,20 @@ proc test_rwatch_creation_and_listing {} {
global srcfile
global hex
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+
# Insert a read watchpoint and list it.
# Tests:
# -break-insert -r B
# -break-list
mi_gdb_test "200-break-watch -r C" \
- "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
+ "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
"break-insert -r operation"
mi_gdb_test "300-break-list" \
- "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \
+ "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\}\}" \
"list of breakpoints"
mi_gdb_test "177-break-delete 4" \
@@ -119,6 +125,10 @@ proc test_watchpoint_triggering {} {
global mi_gdb_prompt
global hex
+ set line_callee4_return_0 [gdb_get_line_number "return 0;"]
+ set line_callee3_head [gdb_get_line_number "callee3 ("]
+ set line_callee3_close_brace [expr $line_callee3_head + 3]
+
# Continue execution until the watchpoint is reached, continue again,
# to see the watchpoint go out of scope.
# Does:
@@ -129,7 +139,7 @@ proc test_watchpoint_triggering {} {
gdb_expect {
-re "222\\^running\r\n$mi_gdb_prompt" {
gdb_expect {
- -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+ -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_callee4_return_0\"\}\r\n$mi_gdb_prompt$" {
pass "watchpoint trigger"
}
-re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"}
@@ -144,7 +154,7 @@ proc test_watchpoint_triggering {} {
gdb_expect {
-re "223\\^running\r\n$mi_gdb_prompt" {
gdb_expect {
- -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
+ -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"$line_callee3_close_brace\"\}\r\n$mi_gdb_prompt$" {
pass "wp out of scope"
}
-re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"}
diff --git a/gdb/testsuite/gdb.mi/pthreads.c b/gdb/testsuite/gdb.mi/pthreads.c
index 0d8f1b616fc..701dfec8d49 100644
--- a/gdb/testsuite/gdb.mi/pthreads.c
+++ b/gdb/testsuite/gdb.mi/pthreads.c
@@ -24,6 +24,7 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+#include <stdlib.h>
#include <pthread.h>
/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c
index 42c2336fffc..2a297d2c02d 100644
--- a/gdb/testsuite/gdb.mi/var-cmd.c
+++ b/gdb/testsuite/gdb.mi/var-cmd.c
@@ -1,3 +1,24 @@
+/* Copyright 1999, 2004 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 <stdlib.h>
+
struct _simple_struct {
int integer;
unsigned int unsigned_integer;
diff --git a/gdb/testsuite/gdb.stabs/exclfwd.exp b/gdb/testsuite/gdb.stabs/exclfwd.exp
new file mode 100644
index 00000000000..05ab97c0fb0
--- /dev/null
+++ b/gdb/testsuite/gdb.stabs/exclfwd.exp
@@ -0,0 +1,72 @@
+# Copyright 2004 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@gnu.org
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile exclfwd
+set binfile ${objdir}/${subdir}/${testfile}
+
+foreach file {exclfwd1 exclfwd2} {
+ if {[gdb_compile "${srcdir}/${subdir}/${file}.c" "${file}.o" object {debug}] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+}
+
+if {[gdb_compile "exclfwd1.o exclfwd2.o" ${binfile} executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+get_debug_format
+
+set eol "\[ \t\]*\[\n\r\]+"
+
+gdb_test "ptype v1" "type = struct a {$eol
+ int x;$eol
+ int y;$eol
+}$eol"
+
+if { [test_debug_format "stabs"] } then {
+ setup_kfail "gdb/1602" *-*-*
+}
+gdb_test "ptype v2" "type = struct a {$eol
+ const char .c;$eol
+}$eol"
+
+if { [test_debug_format "stabs"] } then {
+ setup_kfail "gdb/1603" *-*-*
+}
+gdb_test "ptype v3" "type = const char ."
diff --git a/gdb/config/arm/tm-nbsd.h b/gdb/testsuite/gdb.stabs/exclfwd.h
index 97bca68bc18..3f064b12857 100644
--- a/gdb/config/arm/tm-nbsd.h
+++ b/gdb/testsuite/gdb.stabs/exclfwd.h
@@ -1,7 +1,6 @@
-/* Macro definitions for ARM running under NetBSD.
- Copyright 2003 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
- This file is part of GDB.
+ Copyright 2004 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
@@ -12,15 +11,12 @@
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 TM_NBSD_H
-#define TM_NBSD_H
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "solib.h"
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
-#endif /* TM_NBSD_H */
+typedef struct a a_t;
diff --git a/gdb/config/alpha/xm-alphalinux.h b/gdb/testsuite/gdb.stabs/exclfwd1.c
index f1bc14da4bd..a7574e5098b 100644
--- a/gdb/config/alpha/xm-alphalinux.h
+++ b/gdb/testsuite/gdb.stabs/exclfwd1.c
@@ -1,8 +1,6 @@
-/* Host definitions for GDB running on an Alpha under GNU/Linux.
+/* This testcase is part of GDB, the GNU debugger.
- Copyright 1996, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
+ Copyright 2004 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
@@ -13,14 +11,24 @@
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. */
+ 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@gnu.org */
+
+#include "exclfwd.h"
+
+struct a
+{
+ int x, y;
+};
-/* The alpha has no siginterrupt routine. */
-#define NO_SIGINTERRUPT
+a_t v1;
-#define HAVE_TERMIOS
-#define USG
+int
+main ()
+{
+}
diff --git a/gdb/config/i386/nm-i386lynx.h b/gdb/testsuite/gdb.stabs/exclfwd2.c
index bc6a23410f2..f7de01544be 100644
--- a/gdb/config/i386/nm-i386lynx.h
+++ b/gdb/testsuite/gdb.stabs/exclfwd2.c
@@ -1,7 +1,6 @@
-/* Native-dependent definitions for Intel 386 running LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
- This file is part of GDB.
+ Copyright 2004 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
@@ -12,15 +11,20 @@
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. */
+ 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@gnu.org */
-#ifndef NM_I386LYNX_H
-#define NM_I386LYNX_H
+#include "exclfwd.h"
-#include "config/nm-lynx.h"
+struct a
+{
+ const char *c;
+};
-#endif /* NM_I386LYNX_H */
+a_t v2;
+const char *v3;
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index 324f67b1f0b..7f67ccb132b 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -317,7 +317,7 @@ gdb_expect 60 {
send_gdb "y\n"
exp_continue
}
- -re "^Reading symbols from $binfile\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
+ -re "^Reading symbols from .*$binfile\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
pass "weirdx.o read without error"
}
-re ".*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.cp/pr-1553.exp b/gdb/testsuite/gdb.threads/bp_in_thread.exp
index fe9e2a26171..e9dfadb9b1a 100644
--- a/gdb/testsuite/gdb.cp/pr-1553.exp
+++ b/gdb/testsuite/gdb.threads/bp_in_thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004 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
@@ -14,33 +14,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Test for PR gdb/1553.
-
-# This file is part of the gdb testsuite.
-
-set ws "\[\r\n\t \]+"
+# gdb 6.1.1 on AIX had a bug where the aix-threads code called
+# getthrds() incorrectly so that gdb lost track of breakpoints.
+# GDB reported a SIGTRAP signal in a random thread when hitting
+# a breakpoint.
if $tracelevel then {
strace $tracelevel
}
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "pr-1553"
-set srcfile ${testfile}.cc
+set testfile "pthread_cond_wait"
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
return -1
}
@@ -49,14 +36,14 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
+gdb_test "break noreturn" \
+ "Breakpoint 1 at .*: file .*${srcfile}, line .*" \
+ "breakpoint on noreturn"
-gdb_test "ptype c_var" "type = class A::C \{${ws}private:${ws}int a_c;${ws}\} \\*"
+# Run the program and make sure GDB reports that we stopped after
+# hitting breakpoint 1 in noreturn().
-gdb_test "ptype E::F" "type = class E::F \{${ws}public:${ws}int e_f;${ws}E::F & operator=\\(E::F const ?&\\);${ws}\}"
+gdb_test "run" \
+ ".*Breakpoint 1, noreturn ().*" \
+ "run to noreturn"
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.threads/killed.c b/gdb/testsuite/gdb.threads/killed.c
index 6cb3928a346..590bf206f9b 100644
--- a/gdb/testsuite/gdb.threads/killed.c
+++ b/gdb/testsuite/gdb.threads/killed.c
@@ -1,7 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2004 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. */
+
#include <sys/types.h>
#include <signal.h>
#include <pthread.h>
#include <stdio.h>
+#include <stdlib.h>
int pid;
diff --git a/gdb/testsuite/gdb.threads/manythreads.c b/gdb/testsuite/gdb.threads/manythreads.c
new file mode 100644
index 00000000000..e39412cde8f
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/manythreads.c
@@ -0,0 +1,68 @@
+/* Manythreads test program.
+ Copyright 2004
+ Free Software Foundation, Inc.
+
+ Written by Jeff Johnston <jjohnstn@redhat.com>
+ Contributed by Red Hat
+
+ 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 <pthread.h>
+#include <stdio.h>
+#include <limits.h>
+
+void *
+thread_function (void *arg)
+{
+ int x = (int)arg;
+
+ printf ("Thread <%d> executing\n", x);
+
+ return NULL;
+}
+
+int
+main (int argc, char **argv)
+{
+ pthread_attr_t attr;
+ pthread_t threads[256];
+ int i, j;
+
+ pthread_attr_init (&attr);
+ pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+
+ /* Create a ton of quick-executing threads, then wait for them to
+ complete. */
+ for (i = 0; i < 1000; ++i)
+ {
+ for (j = 0; j < 256; ++j)
+ {
+ pthread_create (&threads[j], &attr, thread_function,
+ (void *)(i * 1000 + j));
+ }
+
+ for (j = 0; j < 256; ++j)
+ {
+ pthread_join (threads[j], NULL);
+ }
+ }
+
+ pthread_attr_destroy (&attr);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
new file mode 100644
index 00000000000..a2baf846aa9
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -0,0 +1,127 @@
+# manythreads.exp -- Expect script to test stopping many threads
+# Copyright (C) 2004 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 Jeff Johnston. (jjohnstn@redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "manythreads"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "set print sevenbit-strings" ""
+runto_main
+
+# We'll need this when we send_gdb a ^C to GDB. Need to do it before we
+# run the program and gdb starts saving and restoring tty states.
+# On Ultrix, we don't need it and it is really slow (because shell_escape
+# doesn't use vfork).
+if ![istarget "*-*-ultrix*"] then {
+ gdb_test "shell stty intr '^C'" ""
+}
+
+set message "first continue"
+gdb_test_multiple "continue" "first continue" {
+ -re "error:.*$gdb_prompt $" {
+ fail "$message"
+ }
+ -re "Continuing" {
+ pass "$message"
+ }
+}
+
+# Send a Ctrl-C and verify that we can do info threads and continue
+after 1000
+send_gdb "\003"
+set message "stop threads 1"
+gdb_test_multiple "" "stop threads 1" {
+ -re "\\\[New \[^\]\]*\\\]\r\n" {
+ exp_continue
+ }
+ -re "\\\[\[^\]\]* exited\\\]\r\n" {
+ exp_continue
+ }
+ -re "Thread \[^\n\]* executing\r\n" {
+ exp_continue
+ }
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
+ pass "$message"
+ }
+ timeout {
+ fail "$message (timeout)"
+ }
+}
+
+gdb_test "info threads" ".*1 Thread.*.LWP.*"
+
+set message "second continue"
+gdb_test_multiple "continue" "second continue" {
+ -re "error:.*$gdb_prompt $" {
+ fail "$message"
+ }
+ -re "Continuing" {
+ pass "$message"
+ }
+}
+
+# Send another Ctrl-C and verify that we can do info threads and quit
+after 1000
+send_gdb "\003"
+set message "stop threads 2"
+gdb_test_multiple "" "stop threads 2" {
+ -re "\\\[New \[^\]\]*\\\]\r\n" {
+ exp_continue
+ }
+ -re "\\\[\[^\]\]* exited\\\]\r\n" {
+ exp_continue
+ }
+ -re "Thread \[^\n\]* executing\r\n" {
+ exp_continue
+ }
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
+ pass "stop threads 2"
+ }
+}
+
+gdb_test_multiple "quit" "GDB exits after stopping multithreaded program" {
+ -re "The program is running. Exit anyway\\? \\(y or n\\) $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ eof {
+ pass "GDB exits after stopping multithreaded program"
+ }
+ timeout {
+ fail "GDB exits after stopping multithreaded program (timeout)"
+ }
+}
+
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.c b/gdb/testsuite/gdb.threads/pthread_cond_wait.c
new file mode 100644
index 00000000000..ae87f8cb765
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.c
@@ -0,0 +1,76 @@
+/* A small multi-threaded test case.
+
+ Copyright 2004
+ 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 <pthread.h>
+#include <stdio.h>
+#include <time.h>
+
+void
+cond_wait (pthread_cond_t *cond, pthread_mutex_t *mut)
+{
+ pthread_mutex_lock(mut);
+ pthread_cond_wait (cond, mut);
+ pthread_mutex_unlock (mut);
+}
+
+void
+noreturn (void)
+{
+ pthread_mutex_t mut;
+ pthread_cond_t cond;
+
+ pthread_mutex_init (&mut, NULL);
+ pthread_cond_init (&cond, NULL);
+
+ /* Wait for a condition that will never be signaled, so we effectively
+ block the thread here. */
+ cond_wait (&cond, &mut);
+}
+
+void *
+forever_pthread (void *unused)
+{
+ noreturn ();
+}
+
+void
+break_me (void)
+{
+ /* Just an anchor to help putting a breakpoint. */
+}
+
+int
+main (void)
+{
+ pthread_t forever;
+ const struct timespec ts = { 0, 10000000 }; /* 0.01 sec */
+
+ pthread_create (&forever, NULL, forever_pthread, NULL);
+ for (;;)
+ {
+ nanosleep (&ts, NULL);
+ break_me();
+ }
+
+ return 0;
+}
+
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
new file mode 100644
index 00000000000..72ae03a0cd9
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
@@ -0,0 +1,73 @@
+# Copyright (C) 2004 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@gnu.org
+
+# This file verifies that GDB is able to compute a backtrace for a thread
+# being blocked on a call to pthread_cond_wait().
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "pthread_cond_wait"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break break_me" \
+ "Breakpoint 1 at .*: file .*${srcfile}, line .*" \
+ "breakpoint on break_me"
+
+gdb_test "run" \
+ ".*Breakpoint 1, break_me ().*" \
+ "run to break_me"
+
+#
+# Backtrace all threads, find the one running noreturn, and
+# verify that we are able to get a sensible backtrace, including
+# the frame for the pthread_cond_wait() call.
+#
+# The string below will only match if the functions named
+# occur in a single thread's backtrace, in the given order.
+#
+
+global hex
+global decimal
+
+#
+# This is a "backtrace break" ("btb"):
+#
+set btb "\[^\r\n\]+\[\r\n\]+\#${decimal}\[ \t\]+${hex} in "
+
+# One of the threads is blocked on a call to pthread_cond_wait, and
+# we want to verify that we are able to get a sensible backtrace for
+# that thread. Because we don't know its thread ID, we can't switch
+# to it before doing the backtrace. So we get a backtrace for all
+# threads, and verify that one them returns the expected backtrace.
+gdb_test "thread apply all backtrace" \
+ "pthread_cond_wait${btb}cond_wait${btb}noreturn${btb}forever_pthread.*" \
+ "backtrace in blocked thread"
+
diff --git a/gdb/testsuite/gdb.threads/pthreads.c b/gdb/testsuite/gdb.threads/pthreads.c
index d82d550ffb4..abedb248b3e 100644
--- a/gdb/testsuite/gdb.threads/pthreads.c
+++ b/gdb/testsuite/gdb.threads/pthreads.c
@@ -1,5 +1,5 @@
/* Pthreads test program.
- Copyright 1996, 2002, 2003
+ Copyright 1996, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Fred Fish of Cygnus Support
@@ -23,6 +23,7 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+#include <stdlib.h>
#include <pthread.h>
/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 5dbe1a8348f..a60a3d372fe 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+# 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
@@ -230,9 +231,9 @@ proc check_control_c {} {
fail "Continue with all threads running (timeout)"
}
}
- sleep 1
+ after 2000
+ send_gdb "\003"
set description "Stopped with a ^C"
- after 1000 [send_gdb "\003"]
gdb_expect {
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass $description
diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c
index 13f9e75d2df..29022824d26 100644
--- a/gdb/testsuite/gdb.threads/schedlock.c
+++ b/gdb/testsuite/gdb.threads/schedlock.c
@@ -1,3 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2003, 2004 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. */
+
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -33,7 +52,7 @@ int main() {
void *thread_function(void *arg) {
int my_number = (long) arg;
- int *myp = &args[my_number];
+ int *myp = (int *) &args[my_number];
/* Don't run forever. Run just short of it :) */
while (*myp > 0)
diff --git a/gdb/testsuite/gdb.threads/staticthreads.c b/gdb/testsuite/gdb.threads/staticthreads.c
new file mode 100644
index 00000000000..57defefcae4
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/staticthreads.c
@@ -0,0 +1,73 @@
+/* This test program is part of GDB, The GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ Originally written by Jeff Johnston <jjohnstn@redhat.com>,
+ contributed by Red Hat
+
+ 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 <pthread.h>
+#include <semaphore.h>
+#include <stdio.h>
+#include <limits.h>
+#include <errno.h>
+
+sem_t semaphore;
+
+void *
+thread_function (void *arg)
+{
+ printf ("Thread executing\n");
+ while (sem_wait (&semaphore) != 0)
+ {
+ if (errno != EINTR)
+ {
+ perror ("thread_function");
+ return;
+ }
+ }
+ return NULL;
+}
+
+int
+main (int argc, char **argv)
+{
+ pthread_attr_t attr;
+
+ pthread_attr_init (&attr);
+ pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+
+ if (sem_init (&semaphore, 0, 0) == -1)
+ {
+ perror ("semaphore");
+ return -1;
+ }
+
+
+ /* Create a thread, wait for it to complete. */
+ {
+ pthread_t thread;
+ pthread_create (&thread, &attr, thread_function, NULL);
+ sem_post (&semaphore);
+ pthread_join (thread, NULL);
+ }
+
+ pthread_attr_destroy (&attr);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp
new file mode 100644
index 00000000000..bf04fa3bcee
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/staticthreads.exp
@@ -0,0 +1,95 @@
+# static.exp -- test script, for GDB, the GNU debugger.
+
+# Copyright 2004 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.
+
+# Based on manythreads written by Jeff Johnston, contributed by Red
+# Hat.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "staticthreads"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set static_flag "-static"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable \
+ [list debug "incdir=${objdir}" "additional_flags=${static_flag}" \
+ ]] != "" } {
+ return -1
+}
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "set print sevenbit-strings" ""
+
+
+# See if the static multi-threaded program runs.
+
+runto_main
+gdb_test "break sem_post"
+set test "Continue to main's call of sem_post"
+gdb_test_multiple "continue" "$test" {
+ -re " sem_post .*$gdb_prompt " {
+ pass "$test"
+ }
+ -re "Program received signal .*$gdb_prompt " {
+ kfail gdb/1328 "$test"
+ }
+}
+
+
+# See if handle SIG32 helps (a little) with a static multi-threaded
+# program.
+
+rerun_to_main
+gdb_test "handle SIG32 nostop noprint pass"
+set test "Handle SIG32 helps"
+gdb_test "continue" " sem_post .*" "handle SIG32 helps"
+
+
+# See if info threads produces anything approaching a thread list.
+
+set test "info threads"
+gdb_test_multiple "info threads" "$test" {
+ -re " Thread .*$gdb_prompt " {
+ pass "$test"
+ }
+ -re "$gdb_prompt " {
+ kfail gdb/1328 "$test"
+ }
+}
+
+
+# Check that the program can be quit.
+
+set test "GDB exits with static thread program"
+gdb_test_multiple "quit" "$test" {
+ -re "The program is running. Exit anyway\\? \\(y or n\\) $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ eof {
+ pass "$test"
+ }
+}
diff --git a/gdb/testsuite/gdb.threads/thread-specific.c b/gdb/testsuite/gdb.threads/thread-specific.c
index 88a462dac29..8839d72e176 100644
--- a/gdb/testsuite/gdb.threads/thread-specific.c
+++ b/gdb/testsuite/gdb.threads/thread-specific.c
@@ -53,7 +53,7 @@ int main() {
void *thread_function(void *arg) {
int my_number = (long) arg;
- int *myp = &args[my_number];
+ int *myp = (int *) &args[my_number];
/* Don't run forever. Run just short of it :) */
while (*myp > 0)
diff --git a/gdb/testsuite/gdb.threads/thread_check.c b/gdb/testsuite/gdb.threads/thread_check.c
new file mode 100644
index 00000000000..58cb79e01fa
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/thread_check.c
@@ -0,0 +1,75 @@
+/*
+* Copyright (C) 2004 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.
+
+* This file was written by Steve Munroe. (sjmunroe@us.ibm.com)
+* Test break points and single step on thread functions.
+*/
+
+#include <string.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+
+#define N 2
+
+static void *
+tf (void *arg)
+{
+ int n = (int) (long int) arg;
+ char number[160];
+ int unslept = 10;
+
+ sprintf(number, "tf(%ld): begin", (long)arg);
+ puts (number);
+
+ while (unslept > 0)
+ unslept = sleep(unslept);
+
+ sprintf(number, "tf(%ld): end", (long)arg);
+ puts (number);
+ return NULL;
+}
+
+int main (int argc, char *argv[])
+{
+ int n;
+ int unslept = 2;
+ pthread_t th[N];
+
+ for (n = 0; n < N; ++n)
+ if (pthread_create (&th[n], NULL, tf, (void *) (long int) n) != 0)
+ {
+ while (unslept > 0)
+ unslept = sleep(2);
+ puts ("create failed");
+ exit (1);
+ }
+
+ puts("after create");
+
+ for (n = 0; n < N; ++n)
+ if (pthread_join (th[n], NULL) != 0)
+ {
+ puts ("join failed");
+ exit (1);
+ }
+
+ puts("after join");
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp
new file mode 100644
index 00000000000..95b89d03968
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/thread_check.exp
@@ -0,0 +1,96 @@
+# Copyright (C) 2004 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 Manoj Iyer. (manjo@austin.ibm.com)
+# Test break points and single step on thread functions.
+#
+# Test Purpose:
+# - Test that breakpoints, continue in a threaded application works.
+# On powerpc64-unknown-linux-gnu system, running kernel version
+# 2.6.5-7.71-pseries64 this test is known to fail due to kernel bug
+# in ptrace system call.
+#
+# Test Strategy:
+# - tbug.c creates 2 threads
+# - start gdb
+# - create 2 breakpoints #1 main() #2 tf() (the thread function)
+# - run gdb till #1 main() breakpoint is reached
+# - continue to breakpoint #2 tf()
+# - delete all breakpoints
+# - exit gdb.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "thread_check"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 1;
+}
+
+
+#
+# set breakpoint at thread fucntion tf
+#
+gdb_test "break tf" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint at tf"
+
+
+#
+#
+# continue to tf() breakpoint #2
+#
+gdb_test "continue" \
+ ".*Breakpoint 2.*tf.* at .*tbug.* .*\r\n.*$gdb_prompt $" \
+ "continue to tf"
+
+#
+# backtrace from thread function.
+#
+gdb_test "backtrace" \
+ "#0 .*tf .*at .*tbug.*" \
+ "backtrace from thread function"
+
+
+#
+# delete all breakpoints
+#
+delete_breakpoints
+
+#
+# exit gdb
+#
+gdb_exit
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
new file mode 100644
index 00000000000..d6e89d93824
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -0,0 +1,125 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2004 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.
+
+# Check that GDB can support multiple watchpoints across threads.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# This test verifies that a watchpoint is detected in the proper thread
+# so the test is only meaningful on a system with hardware watchpoints.
+if [target_info exists gdb,no_hardware_watchpoints] {
+ return 0;
+}
+
+set testfile "schedlock"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set can-use-hw-watchpoints 1" "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+set args_0 0
+set args_1 0
+
+# Watch values that will be modified by distinct threads.
+gdb_test "watch args\[0\]" "Hardware watchpoint 2: args\\\[0\\\]"
+gdb_test "watch args\[1\]" "Hardware watchpoint 3: args\\\[1\\\]"
+
+# Loop and continue to allow both watchpoints to be triggered.
+for {set i 0} {$i < 30} {incr i} {
+ set test_flag 0
+ gdb_test_multiple "continue" "threaded watch loop" {
+ -re "Hardware watchpoint 2: args\\\[0\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*schedlock.c:21.*$gdb_prompt $"
+ { set args_0 1; set test_flag 1 }
+ -re "Hardware watchpoint 3: args\\\[1\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*schedlock.c:21.*$gdb_prompt $"
+ { set args_1 1; set test_flag 1 }
+ -re "Hardware watchpoint 2: args\\\[0\\\].*Old value = $args_0.*New value = [expr $args_0+1].*in thread_function \\\(arg=0x0\\\) at .*schedlock.c:42.*$gdb_prompt $"
+ { set args_0 [expr $args_0+1]; set test_flag 1 }
+ -re "Hardware watchpoint 3: args\\\[1\\\].*Old value = $args_1.*New value = [expr $args_1+1].*in thread_function \\\(arg=0x1\\\) at .*schedlock.c:42.*$gdb_prompt $"
+ { set args_1 [expr $args_1+1]; set test_flag 1 }
+ }
+ # If we fail above, don't bother continuing loop
+ if { $test_flag == 0 } {
+ set i 30;
+ }
+}
+
+# Print success message if loop succeeded.
+if { $test_flag == 1 } {
+ pass "threaded watch loop"
+}
+
+# Verify that we hit first watchpoint in main thread.
+set message "first watchpoint on args\[0\] hit"
+if { $args_0 > 0 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit second watchpoint in main thread.
+set message "first watchpoint on args\[1\] hit"
+if { $args_1 > 0 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit first watchpoint in child thread.
+set message "watchpoint on args\[0\] hit in thread"
+if { $args_0 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit second watchpoint in child thread.
+set message "watchpoint on args\[1\] hit in thread"
+if { $args_1 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that all watchpoint hits are accounted for.
+set message "combination of threaded watchpoints = 30"
+if { [expr $args_0+$args_1] == 30 } {
+ pass $message
+} else {
+ fail $message
+}
diff --git a/gdb/testsuite/lib/compiler.c b/gdb/testsuite/lib/compiler.c
index b1f1f5d5f62..8ebccaf95c4 100644
--- a/gdb/testsuite/lib/compiler.c
+++ b/gdb/testsuite/lib/compiler.c
@@ -16,8 +16,7 @@
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 */
+ */
/* Sometimes the behavior of a test depends upon the compiler used to
compile the test program. A test script can call get_compiler_info
@@ -32,34 +31,36 @@
TODO: all clients should use test_compiler_info and should not
use gcc_compiled, hp_cc_compiler, or hp_aCC_compiler.
- TODO: purge signed_keyword_not_used. */
+ */
-set compiler_info ""
+/* Note the semicolon at the end of this line. Older versions of
+ hp c++ have a bug in string preprocessing: if the last token on a
+ line is a string, then the preprocessor concatenates the next line
+ onto the current line and eats the newline! That messes up TCL of
+ course. That happens with HP aC++ A.03.13, but it no longer happens
+ with HP aC++ A.03.45. */
+
+set compiler_info "unknown" ;
#if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
-set gcc_compiled __GNUC__
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro. */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
#else
-set gcc_compiled 0
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#endif
+#endif
+
+#if defined (__HP_CXD_SPP)
+/* older hp ansi c, such as A.11.01.25171.gp, defines this */
+set compiler_info [join {hpcc __HP_CXD_SPP} -]
#endif
#if defined (__HP_cc)
+/* newer hp ansi c, such as B.11.11.28706.gp, defines this */
set compiler_info [join {hpcc __HP_cc} -]
-set hp_cc_compiler __HP_cc
-#else
-set hp_cc_compiler 0
#endif
#if defined (__HP_aCC)
set compiler_info [join {hpacc __HP_aCC} -]
-set hp_aCC_compiler __HP_aCC
-#else
-set hp_aCC_compiler 0
-#endif
-
-/* gdb.base/whatis.exp still uses this */
-#if defined (__STDC__) || defined (_AIX)
-set signed_keyword_not_used 0
-#else
-set signed_keyword_not_used 1
#endif
diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc
index 0c5eb663b96..4e4eeee1ba7 100644
--- a/gdb/testsuite/lib/compiler.cc
+++ b/gdb/testsuite/lib/compiler.cc
@@ -16,38 +16,39 @@
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 is exactly like compiler.c. I could just use compiler.c if
I could be sure that every C++ compiler accepted extensions of ".c". */
-set compiler_info ""
+/* Note the semicolon at the end of this line. Older versions of
+ hp c++ have a bug in string preprocessing: if the last token on a
+ line is a string, then the preprocessor concatenates the next line
+ onto the current line and eats the newline! That messes up TCL of
+ course. That happens with HP aC++ A.03.13, but it no longer happens
+ with HP aC++ A.03.45. */
+
+set compiler_info "unknown" ;
#if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
-set gcc_compiled __GNUC__
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro. */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
#else
-set gcc_compiled 0
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#endif
+#endif
+
+#if defined (__HP_CXD_SPP)
+/* older hp ansi c, such as A.11.01.25171.gp, defines this */
+set compiler_info [join {hpcc __HP_CXD_SPP} -]
#endif
#if defined (__HP_cc)
+/* newer hp ansi c, such as B.11.11.28706.gp, defines this */
set compiler_info [join {hpcc __HP_cc} -]
-set hp_cc_compiler __HP_cc
-#else
-set hp_cc_compiler 0
#endif
#if defined (__HP_aCC)
set compiler_info [join {hpacc __HP_aCC} -]
-set hp_aCC_compiler __HP_aCC
-#else
-set hp_aCC_compiler 0
-#endif
-
-/* gdb.base/whatis.exp still uses this */
-#if defined (__STDC__) || defined (_AIX)
-set signed_keyword_not_used 0
-#else
-set signed_keyword_not_used 1
#endif
diff --git a/gdb/testsuite/lib/cp-support.exp b/gdb/testsuite/lib/cp-support.exp
new file mode 100644
index 00000000000..7ce1e4806a7
--- /dev/null
+++ b/gdb/testsuite/lib/cp-support.exp
@@ -0,0 +1,469 @@
+# This test code is part of GDB, the GNU debugger.
+
+# Copyright 2003, 2004 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.
+
+# Auxiliary function to check for known problems.
+#
+# EXPECTED_STRING is the string expected by the test.
+#
+# ACTUAL_STRING is the actual string output by gdb.
+#
+# ERRATA_TABLE is a list of lines of the form:
+#
+# { expected-string broken-string {eval-block} }
+#
+# If there is a line for the given EXPECTED_STRING, and if the
+# ACTUAL_STRING output by gdb is the same as the BROKEN_STRING in the
+# table, then I eval the eval-block.
+
+proc cp_check_errata { expected_string actual_string errata_table } {
+ foreach erratum $errata_table {
+ if { "$expected_string" == [lindex $erratum 0]
+ && "$actual_string" == [lindex $erratum 1] } then {
+ eval [lindex $erratum 2]
+ }
+ }
+}
+
+# Test ptype of a class.
+#
+# Different C++ compilers produce different output. To accommodate all
+# the variations listed below, I read the output of "ptype" and process
+# each line, matching it to the class description given in the
+# parameters.
+#
+# IN_COMMAND and IN_TESTNAME are the command and testname for
+# gdb_test_multiple. If IN_TESTNAME is the empty string, then it
+# defaults to IN_COMMAND.
+#
+# IN_KEY is "class" or "struct". For now, I ignore it, and allow either
+# "class" or "struct" in the output, as long as the access specifiers all
+# work out okay.
+#
+# IN_TAG is the class tag or structure tag.
+#
+# IN_CLASS_TABLE is a list of class information. Each entry contains a
+# keyword and some values. The keywords and their values are:
+#
+# { base "base-declaration" }
+#
+# the class has a base with the given declaration.
+#
+# { vbase "name" }
+#
+# the class has a virtual base pointer with the given name. this
+# is for gcc 2.95.3, which emits ptype entries for the virtual base
+# pointers. the vbase list includes both indirect and direct
+# virtual base classes (indeed, a virtual base is usually
+# indirect), so this information cannot be derived from the base
+# declarations.
+#
+# { field "access" "declaration" }
+#
+# the class has a data field with the given access type and the
+# given declaration.
+#
+# { method "access" "declaration" }
+#
+# the class has a member function with the given access type
+# and the given declaration.
+#
+# If you test the same class declaration more than once, you can specify
+# IN_CLASS_TABLE as "ibid". "ibid" means: look for a previous class
+# table that had the same IN_KEY and IN_TAG, and re-use that table.
+#
+# IN_TAIL is the expected text after the close brace, specifically the "*"
+# in "struct { ... } *". This is an optional parameter. The default
+# value is "", for no tail.
+#
+# IN_ERRATA_TABLE is a list of errata entries. See cp_check_errata for the
+# format of the errata table. Note: the errata entries are not subject to
+# demangler syntax adjustment, so you have to make a bigger table
+# with lines for each output variation.
+#
+# gdb can vary the output of ptype in several ways:
+#
+# . CLASS/STRUCT
+#
+# The output can start with either "class" or "struct", depending on
+# what the symbol table reader in gdb decides. This is usually
+# unrelated to the original source code.
+#
+# dwarf-2 debug info distinguishes class/struct, but gdb ignores it
+# stabs+ debug info does not distinguish class/struct
+# hp debug info distinguishes class/struct, and gdb honors it
+#
+# I tried to accommodate this with regular expressions such as
+# "((class|struct) A \{ public:|struct A \{)", but that turns into a
+# hairy mess because of optional private virtual base pointers and
+# optional public synthetic operators. This is the big reason I gave
+# up on regular expressions and started parsing the output.
+#
+# . REDUNDANT ACCESS SPECIFIER
+#
+# In "class { private: ... }" or "struct { public: ... }", gdb might
+# or might not emit a redundant initial access specifier, depending
+# on the gcc version.
+#
+# . VIRTUAL BASE POINTERS
+#
+# If a class has virtual bases, either direct or indirect, the class
+# will have virtual base pointers. With gcc 2.95.3, gdb prints lines
+# for these virtual base pointers. This does not happen with gcc
+# 3.3.4, gcc 3.4.1, or hp acc A.03.45.
+#
+# I accept these lines. These lines are optional; but if I see one of
+# these lines, then I expect to see all of them.
+#
+# Note: drow considers printing these lines to be a bug in gdb.
+#
+# . SYNTHETIC METHODS
+#
+# A C++ compiler may synthesize some methods: an assignment
+# operator, a copy constructor, a constructor, and a destructor. The
+# compiler might include debug information for these methods.
+#
+# dwarf-2 gdb does not show these methods
+# stabs+ gdb shows these methods
+# hp gdb does not show these methods
+#
+# I accept these methods. These lines are optional, and any or
+# all of them might appear, mixed in anywhere in the regular methods.
+#
+# With gcc v2, the synthetic copy-ctor and ctor have an additional
+# "int" parameter at the beginning, the "in-charge" flag.
+#
+# . DEMANGLER SYNTAX VARIATIONS
+#
+# Different demanglers produce "int foo(void)" versus "int foo()",
+# "const A&" versus "const A &", and so on.
+#
+# TESTED WITH
+#
+# gcc 2.95.3 -gdwarf-2
+# gcc 2.95.3 -gstabs+
+# gcc 3.3.4 -gdwarf-2
+# gcc 3.3.4 -gstabs+
+# gcc 3.4.1 -gdwarf-2
+# gcc 3.4.1 -gstabs+
+# gcc HEAD 20040731 -gdwarf-2
+# gcc HEAD 20040731 -gstabs+
+#
+# TODO
+#
+# Tagless structs.
+#
+# "A*" versus "A *" and "A&" versus "A &" in user methods.
+#
+# Test with hp ACC.
+#
+# -- chastain 2004-08-07
+
+proc cp_test_ptype_class { in_command in_testname in_key in_tag in_class_table { in_tail "" } { in_errata_table { } } } {
+ global gdb_prompt
+ set wsopt "\[\r\n\t \]*"
+
+ # The test name defaults to the command.
+
+ if { "$in_testname" == "" } then { set in_testname "$in_command" }
+
+ # Save class tables in a history array for reuse.
+
+ global cp_class_table_history
+ if { $in_class_table == "ibid" } then {
+ if { ! [info exists cp_class_table_history("$in_key,$in_tag") ] } then {
+ fail "$in_testname // bad ibid"
+ return
+ }
+ set in_class_table $cp_class_table_history("$in_key,$in_tag")
+ } else {
+ set cp_class_table_history("$in_key,$in_tag") $in_class_table
+ }
+
+ # Split the class table into separate tables.
+
+ set list_bases { }
+ set list_vbases { }
+ set list_fields { }
+ set list_methods { }
+
+ foreach class_line $in_class_table {
+ switch [lindex $class_line 0] {
+ "base" { lappend list_bases [lindex $class_line 1] }
+ "vbase" { lappend list_vbases [lindex $class_line 1] }
+ "field" { lappend list_fields [lrange $class_line 1 2] }
+ "method" { lappend list_methods [lrange $class_line 1 2] }
+ default { fail "$in_testname // bad line in class table: $class_line"; return; }
+ }
+ }
+
+ # Construct a list of synthetic operators.
+ # These are: { count ccess-type regular-expression }.
+
+ set list_synth { }
+ lappend list_synth [list 0 "public" "$in_tag & operator=\\($in_tag const ?&\\);"]
+ lappend list_synth [list 0 "public" "$in_tag\\((int,|) ?$in_tag const ?&\\);"]
+ lappend list_synth [list 0 "public" "$in_tag\\((int|void|)\\);"]
+
+ # Actually do the ptype.
+
+ set parse_okay 0
+ gdb_test_multiple "$in_command" "$in_testname // parse failed" {
+ -re "type = (struct|class)${wsopt}(\[A-Za-z0-9_\]*)${wsopt}((:\[^\{\]*)?)${wsopt}\{(.*)\}${wsopt}(\[^\r\n\]*)\[\r\n\]+$gdb_prompt $" {
+ set parse_okay 1
+ set actual_key $expect_out(1,string)
+ set actual_tag $expect_out(2,string)
+ set actual_base_string $expect_out(3,string)
+ set actual_body $expect_out(5,string)
+ set actual_tail $expect_out(6,string)
+ }
+ }
+ if { ! $parse_okay } then { return }
+
+ # Check the actual key. It would be nice to require that it match
+ # the input key, but gdb does not support that. For now, accept any
+ # $actual_key as long as the access property of each field/method
+ # matches.
+
+ switch "$actual_key" {
+ "class" { set access "private" }
+ "struct" { set access "public" }
+ default {
+ cp_check_errata "class" "$actual_key" $in_errata_table
+ cp_check_errata "struct" "$actual_key" $in_errata_table
+ fail "$in_testname // wrong key: $actual_key"
+ return
+ }
+ }
+
+ # Check the actual tag.
+
+ if { "$actual_tag" != "$in_tag" } then {
+ cp_check_errata "$in_tag" "$actual_tag" $in_errata_table
+ fail "$in_testname // wrong tag: $actual_tag"
+ return
+ }
+
+ # Check the actual bases.
+ # First parse them into a list.
+
+ set list_actual_bases { }
+ if { "$actual_base_string" != "" } then {
+ regsub "^:${wsopt}" $actual_base_string "" actual_base_string
+ set list_actual_bases [split $actual_base_string ","]
+ }
+
+ # Check the base count.
+
+ if { [llength $list_actual_bases] < [llength $list_bases] } then {
+ fail "$in_testname // too few bases"
+ return
+ }
+ if { [llength $list_actual_bases] > [llength $list_bases] } then {
+ fail "$in_testname // too many bases"
+ return
+ }
+
+ # Check each base.
+
+ foreach actual_base $list_actual_bases {
+ set actual_base [string trim $actual_base]
+ set base [lindex $list_bases 0]
+ if { "$actual_base" != "$base" } then {
+ cp_check_errata "$base" "$actual_base" $in_errata_table
+ fail "$in_testname // wrong base: $actual_base"
+ return
+ }
+ set list_bases [lreplace $list_bases 0 0]
+ }
+
+ # Parse each line in the body.
+
+ set last_was_access 0
+ set vbase_match 0
+
+ foreach actual_line [split $actual_body "\r\n"] {
+
+ # Chomp the line.
+
+ set actual_line [string trim $actual_line]
+ if { "$actual_line" == "" } then { continue }
+
+ # Access specifiers.
+
+ if { [regexp "^(public|protected|private)${wsopt}:\$" "$actual_line" s0 s1] } then {
+ set access "$s1"
+ if { $last_was_access } then {
+ fail "$in_testname // redundant access specifier"
+ return
+ }
+ set last_was_access 1
+ continue
+ } else {
+ set last_was_access 0
+ }
+
+ # Optional virtual base pointer.
+
+ if { [ llength $list_vbases ] > 0 } then {
+ set vbase [lindex $list_vbases 0]
+ if { [ regexp "$vbase \\*(_vb.|_vb\\\$|__vb_)\[0-9\]*$vbase;" $actual_line ] } then {
+ if { "$access" != "private" } then {
+ cp_check_errata "private" "$access" $in_errata_table
+ fail "$in_testname // wrong access specifier for virtual base: $access"
+ return
+ }
+ set list_vbases [lreplace $list_vbases 0 0]
+ set vbase_match 1
+ continue
+ }
+ }
+
+ # Data field.
+
+ if { [llength $list_fields] > 0 } then {
+ set field_access [lindex [lindex $list_fields 0] 0]
+ set field_decl [lindex [lindex $list_fields 0] 1]
+ if { "$actual_line" == "$field_decl" } then {
+ if { "$access" != "$field_access" } then {
+ cp_check_errata "$field_access" "$access" $in_errata_table
+ fail "$in_testname // wrong access specifier for field: $access"
+ return
+ }
+ set list_fields [lreplace $list_fields 0 0]
+ continue
+ }
+
+ # Data fields must appear before synths and methods.
+ cp_check_errata "$field_decl" "$actual_line" $in_errata_table
+ fail "$in_testname // unrecognized line type 1: $actual_line"
+ return
+ }
+
+ # Method function.
+
+ if { [llength $list_methods] > 0 } then {
+ set method_access [lindex [lindex $list_methods 0] 0]
+ set method_decl [lindex [lindex $list_methods 0] 1]
+ if { "$actual_line" == "$method_decl" } then {
+ if { "$access" != "$method_access" } then {
+ cp_check_errata "$method_access" "$access" $in_errata_table
+ fail "$in_testname // wrong access specifier for method: $access"
+ return
+ }
+ set list_methods [lreplace $list_methods 0 0]
+ continue
+ }
+
+ # gcc 2.95.3 shows "foo()" as "foo(void)".
+ regsub -all "\\(\\)" $method_decl "(void)" method_decl
+ if { "$actual_line" == "$method_decl" } then {
+ if { "$access" != "$method_access" } then {
+ cp_check_errata "$method_access" "$access" $in_errata_table
+ fail "$in_testname // wrong access specifier for method: $access"
+ return
+ }
+ set list_methods [lreplace $list_methods 0 0]
+ continue
+ }
+ }
+
+ # Synthetic operators. These are optional and can be mixed in
+ # with the methods in any order, but duplicates are wrong.
+ #
+ # This test must come after the user methods, so that a user
+ # method which matches a synth-method pattern is treated
+ # properly as a user method.
+
+ set synth_match 0
+ for { set isynth 0 } { $isynth < [llength $list_synth] } { incr isynth } {
+ set synth [lindex $list_synth $isynth]
+ set synth_count [lindex $synth 0]
+ set synth_access [lindex $synth 1]
+ set synth_re [lindex $synth 2]
+
+ if { [ regexp "$synth_re" "$actual_line" ] } then {
+
+ if { "$access" != "$synth_access" } then {
+ cp_check_errata "$synth_access" "$access" $in_errata_table
+ fail "$in_testname // wrong access specifier for synthetic operator: $access"
+ return
+ }
+
+ if { $synth_count > 0 } then {
+ cp_check_errata "$actual_line" "$actual_line" $in_errata_table
+ fail "$in_testname // duplicate synthetic operator: $actual_line"
+ }
+
+ # Update the count in list_synth.
+
+ incr synth_count
+ set synth [list $synth_count $synth_access "$synth_re"]
+ set list_synth [lreplace $list_synth $isynth $isynth $synth]
+
+ # Match found.
+
+ set synth_match 1
+ break
+ }
+ }
+ if { $synth_match } then { continue }
+
+ # Unrecognized line.
+
+ if { [llength $list_methods] > 0 } then {
+ set method_decl [lindex [lindex $list_methods 0] 1]
+ cp_check_errata "$method_decl" "$actual_line" $in_errata_table
+ }
+
+ fail "$in_testname // unrecognized line type 2: $actual_line"
+ return
+ }
+
+ # Check for missing elements.
+
+ if { $vbase_match } then {
+ if { [llength $list_vbases] > 0 } then {
+ fail "$in_testname // missing virtual base pointers"
+ return
+ }
+ }
+
+ if { [llength $list_fields] > 0 } then {
+ fail "$in_testname // missing fields"
+ return
+ }
+
+ if { [llength $list_methods] > 0 } then {
+ fail "$in_testname // missing methods"
+ return
+ }
+
+ # Check the tail.
+
+ set actual_tail [string trim $actual_tail]
+ if { "$actual_tail" != "$in_tail" } then {
+ cp_check_errata "$in_tail" "$actual_tail" $in_errata_table
+ fail "$in_testname // wrong tail: $actual_tail"
+ return
+ }
+
+ # It all worked!
+
+ pass "$in_testname"
+ return
+}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f49cbbf9855..91001185623 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -16,9 +16,6 @@
# 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 Fred Fish. (fnf@cygnus.com)
# Generic gdb subroutines that should work for any target. If these
@@ -183,7 +180,7 @@ proc gdb_run_cmd {args} {
if [target_info exists gdb,do_reload_on_run] {
# Specifying no file, defaults to the executable
# currently being debugged.
- if { [gdb_load ""] < 0 } {
+ if { [gdb_load ""] != 0 } {
return;
}
send_gdb "continue\n";
@@ -228,7 +225,7 @@ proc gdb_run_cmd {args} {
send_gdb "y\n"
}
-re "The program is not being run.*$gdb_prompt $" {
- if { [gdb_load ""] < 0 } {
+ if { [gdb_load ""] != 0 } {
return;
}
send_gdb "jump *$start\n";
@@ -250,7 +247,7 @@ proc gdb_run_cmd {args} {
}
if [target_info exists gdb,do_reload_on_run] {
- if { [gdb_load ""] < 0 } {
+ if { [gdb_load ""] != 0 } {
return;
}
}
@@ -661,7 +658,7 @@ proc gdb_test_multiple { command message user_code } {
fail "$errmsg"
set result -1
}
- -re ".*$gdb_prompt $" {
+ -re "\r\n$gdb_prompt $" {
if ![string match "" $message] then {
fail "$message"
}
@@ -700,7 +697,17 @@ proc gdb_test_multiple { command message user_code } {
}
set result 0
- gdb_expect $tmt $code
+ set code [catch {gdb_expect $tmt $code} string]
+ if {$code == 1} {
+ global errorInfo errorCode;
+ return -code error -errorinfo $errorInfo -errorcode $errorCode $string
+ } elseif {$code == 2} {
+ return -code return $string
+ } elseif {$code == 3} {
+ return
+ } elseif {$code > 4} {
+ return -code $code $string
+ }
return $result
}
@@ -946,39 +953,56 @@ proc default_gdb_exit {} {
unset gdb_spawn_id
}
+# Load a file into the debugger.
+# The return value is 0 for success, -1 for failure.
#
-# load a file into the debugger.
-# return a -1 if anything goes wrong.
+# This procedure also set the global variable GDB_FILE_CMD_DEBUG_INFO
+# to one of these values:
#
+# debug file was loaded successfully and has debug information
+# nodebug file was loaded successfully and has no debug information
+# fail file was not loaded
+#
+# I tried returning this information as part of the return value,
+# but ran into a mess because of the many re-implementations of
+# gdb_load in config/*.exp.
+#
+# TODO: gdb.base/sepdebug.exp and gdb.stabs/weird.exp might be able to use
+# this if they can get more information set.
+
proc gdb_file_cmd { arg } {
+ global gdb_prompt
global verbose
- global loadpath
- global loadfile
global GDB
- global gdb_prompt
- upvar timeout timeout
+
+ # Set whether debug info was found.
+ # Default to "fail".
+ global gdb_file_cmd_debug_info
+ set gdb_file_cmd_debug_info "fail"
if [is_remote host] {
- set arg [remote_download host $arg];
+ set arg [remote_download host $arg]
if { $arg == "" } {
- error "download failed"
- return -1;
+ perror "download failed"
+ return -1
}
}
send_gdb "file $arg\n"
gdb_expect 120 {
+ -re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
+ verbose "\t\tLoaded $arg into the $GDB with no debugging symbols"
+ set gdb_file_cmd_debug_info "nodebug"
+ return 0
+ }
-re "Reading symbols from.*done.*$gdb_prompt $" {
verbose "\t\tLoaded $arg into the $GDB"
- return 0
- }
- -re "has no symbol-table.*$gdb_prompt $" {
- perror "$arg wasn't compiled with \"-g\""
- return -1
+ set gdb_file_cmd_debug_info "debug"
+ return 0
}
-re "A program is being debugged already.*Kill it.*y or n. $" {
send_gdb "y\n"
- verbose "\t\tKilling previous program being debugged"
+ verbose "\t\tKilling previous program being debugged"
exp_continue
}
-re "Load new symbol table from \".*\".*y or n. $" {
@@ -986,32 +1010,33 @@ proc gdb_file_cmd { arg } {
gdb_expect 120 {
-re "Reading symbols from.*done.*$gdb_prompt $" {
verbose "\t\tLoaded $arg with new symbol table into $GDB"
- return 0
+ set gdb_file_cmd_debug_info "debug"
+ return 0
}
timeout {
perror "(timeout) Couldn't load $arg, other program already loaded."
- return -1
+ return -1
}
}
}
-re "No such file or directory.*$gdb_prompt $" {
- perror "($arg) No such file or directory\n"
- return -1
+ perror "($arg) No such file or directory"
+ return -1
}
-re "$gdb_prompt $" {
perror "couldn't load $arg into $GDB."
- return -1
+ return -1
}
timeout {
perror "couldn't load $arg into $GDB (timed out)."
- return -1
+ return -1
}
eof {
# This is an attempt to detect a core dump, but seems not to
# work. Perhaps we need to match .* followed by eof, in which
# gdb_expect does not seem to have a way to do that.
perror "couldn't load $arg into $GDB (end of file)."
- return -1
+ return -1
}
}
}
@@ -1111,6 +1136,12 @@ proc skip_cplus_tests {} {
return 0
}
+# Return a 1 if I don't even want to try to test FORTRAN.
+
+proc skip_fortran_tests {} {
+ return 0
+}
+
# Skip all the tests in the file if you are not on an hppa running
# hpux target.
@@ -1124,7 +1155,6 @@ set compiler_info "unknown"
set gcc_compiled 0
set hp_cc_compiler 0
set hp_aCC_compiler 0
-set signed_keyword_not_used 0
# Figure out what compiler I am using.
#
@@ -1190,10 +1220,11 @@ proc get_compiler_info {binfile args} {
# These come from compiler.c or compiler.cc
global compiler_info
+
+ # Legacy global data symbols.
global gcc_compiled
global hp_cc_compiler
global hp_aCC_compiler
- global signed_keyword_not_used
# Choose which file to preprocess.
set ifile "${srcdir}/lib/compiler.c"
@@ -1207,15 +1238,42 @@ proc get_compiler_info {binfile args} {
set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
log_file -a "$outdir/$tool.log"
- # Source the output.
+ # Eval the output.
+ set unknown 0
foreach cppline [ split "$cppout" "\n" ] {
- if { ! [ regexp "^#" "$cppline" ] } {
- if { ! [ regexp "^\[\n\r\t \]*$" "$cppline" ] } {
- verbose "get_compiler_info: $cppline" 2
- eval "$cppline"
- }
+ if { [ regexp "^#" "$cppline" ] } {
+ # line marker
+ } elseif { [ regexp "^\[\n\r\t \]*$" "$cppline" ] } {
+ # blank line
+ } elseif { [ regexp "^\[\n\r\t \]*set\[\n\r\t \]" "$cppline" ] } {
+ # eval this line
+ verbose "get_compiler_info: $cppline" 2
+ eval "$cppline"
+ } else {
+ # unknown line
+ verbose -log "get_compiler_info: $cppline"
+ set unknown 1
}
}
+
+ # Reset to unknown compiler if any diagnostics happened.
+ if { $unknown } {
+ set compiler_info "unknown"
+ }
+
+ # Set the legacy symbols.
+ set gcc_compiled 0
+ set hp_cc_compiler 0
+ set hp_aCC_compiler 0
+ if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 }
+ if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 }
+ if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 }
+ if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 }
+ if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 }
+ if { [regexp "^hpcc-" "$compiler_info" ] } { set hp_cc_compiler 1 }
+ if { [regexp "^hpacc-" "$compiler_info" ] } { set hp_aCC_compiler 1 }
+
+ # Log what happened.
verbose -log "get_compiler_info: $compiler_info"
# Most compilers will evaluate comparisons and other boolean
@@ -1593,7 +1651,7 @@ proc gdb_exit { } {
#
# gdb_load -- load a file into the debugger.
-# return a -1 if anything goes wrong.
+# Many files in config/*.exp override this procedure.
#
proc gdb_load { arg } {
return [gdb_file_cmd $arg]
@@ -1763,66 +1821,107 @@ proc gdb_step_for_stub { } {
}
}
-### gdb_get_line_number TEXT [FILE]
-###
-### Search the source file FILE, and return the line number of a line
-### containing TEXT. Use this function instead of hard-coding line
-### numbers into your test script.
-###
-### Specifically, this function uses GDB's "search" command to search
-### FILE for the first line containing TEXT, and returns its line
-### number. Thus, FILE must be a source file, compiled into the
-### executable you are running. If omitted, FILE defaults to the
-### value of the global variable `srcfile'; most test scripts set
-### `srcfile' appropriately at the top anyway.
-###
-### Use this function to keep your test scripts independent of the
-### exact line numbering of the source file. Don't write:
-###
-### send_gdb "break 20"
-###
-### This means that if anyone ever edits your test's source file,
-### your test could break. Instead, put a comment like this on the
-### source file line you want to break at:
-###
-### /* breakpoint spot: frotz.exp: test name */
-###
-### and then write, in your test script (which we assume is named
-### frotz.exp):
-###
-### send_gdb "break [gdb_get_line_number "frotz.exp: test name"]\n"
-###
-### (Yes, Tcl knows how to handle the nested quotes and brackets.
-### Try this:
-### $ tclsh
-### % puts "foo [lindex "bar baz" 1]"
-### foo baz
-### %
-### Tcl is quite clever, for a little stringy language.)
-
-proc gdb_get_line_number {text {file /omitted/}} {
- global gdb_prompt;
- global srcfile;
+# gdb_get_line_number TEXT [FILE]
+#
+# Search the source file FILE, and return the line number of the
+# first line containing TEXT. If no match is found, return -1.
+#
+# TEXT is a string literal, not a regular expression.
+#
+# The default value of FILE is "$srcdir/$subdir/$srcfile". If FILE is
+# specified, and does not start with "/", then it is assumed to be in
+# "$srcdir/$subdir". This is awkward, and can be fixed in the future,
+# by changing the callers and the interface at the same time.
+# In particular: gdb.base/break.exp, gdb.base/condbreak.exp,
+# gdb.base/ena-dis-br.exp.
+#
+# Use this function to keep your test scripts independent of the
+# exact line numbering of the source file. Don't write:
+#
+# send_gdb "break 20"
+#
+# This means that if anyone ever edits your test's source file,
+# your test could break. Instead, put a comment like this on the
+# source file line you want to break at:
+#
+# /* breakpoint spot: frotz.exp: test name */
+#
+# and then write, in your test script (which we assume is named
+# frotz.exp):
+#
+# send_gdb "break [gdb_get_line_number "frotz.exp: test name"]\n"
+#
+# (Yes, Tcl knows how to handle the nested quotes and brackets.
+# Try this:
+# $ tclsh
+# % puts "foo [lindex "bar baz" 1]"
+# foo baz
+# %
+# Tcl is quite clever, for a little stringy language.)
+#
+# ===
+#
+# The previous implementation of this procedure used the gdb search command.
+# This version is different:
+#
+# . It works with MI, and it also works when gdb is not running.
+#
+# . It operates on the build machine, not the host machine.
+#
+# . For now, this implementation fakes a current directory of
+# $srcdir/$subdir to be compatible with the old implementation.
+# This will go away eventually and some callers will need to
+# be changed.
+#
+# . The TEXT argument is literal text and matches literally,
+# not a regular expression as it was before.
+#
+# . State changes in gdb, such as changing the current file
+# and setting $_, no longer happen.
+#
+# After a bit of time we can forget about the differences from the
+# old implementation.
+#
+# --chastain 2004-08-05
- if {! [string compare $file /omitted/]} {
- set file $srcfile
+proc gdb_get_line_number { text { file "" } } {
+ global srcdir
+ global subdir
+ global srcfile
+
+ if { "$file" == "" } then {
+ set file "$srcfile"
+ }
+ if { ! [regexp "^/" "$file"] } then {
+ set file "$srcdir/$subdir/$file"
}
- set result -1;
- gdb_test "list ${file}:1,1" ".*" ""
- send_gdb "search ${text}\n"
- gdb_expect {
- -re "\[\r\n\]+(\[0-9\]+)\[ \t\].*${text}.*$gdb_prompt $" {
- set result $expect_out(1,string)
- }
- -re ".*$gdb_prompt $" {
- fail "find line number containing \"${text}\""
- }
- timeout {
- fail "find line number containing \"${text}\" (timeout)"
- }
+ if { [ catch { set fd [open "$file"] } message ] } then {
+ perror "$message"
+ return -1
}
- return $result;
+
+ set found -1
+ for { set line 1 } { 1 } { incr line } {
+ if { [ catch { set nchar [gets "$fd" body] } message ] } then {
+ perror "$message"
+ return -1
+ }
+ if { $nchar < 0 } then {
+ break
+ }
+ if { [string first "$text" "$body"] >= 0 } then {
+ set found $line
+ break
+ }
+ }
+
+ if { [ catch { close "$fd" } message ] } then {
+ perror "$message"
+ return -1
+ }
+
+ return $found
}
# gdb_continue_to_end:
diff --git a/gdb/testsuite/lib/insight-support.exp b/gdb/testsuite/lib/insight-support.exp
deleted file mode 100644
index cbdf163c85f..00000000000
--- a/gdb/testsuite/lib/insight-support.exp
+++ /dev/null
@@ -1,318 +0,0 @@
-# GDB Testsuite Support for Insight.
-#
-# Copyright 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-# Initializes the display for gdbtk testing.
-# Returns 1 if tests should run, 0 otherwise.
-proc gdbtk_initialize_display {} {
- global _using_windows
-
- # This is hacky, but, we don't have much choice. When running
- # expect under Windows, tcl_platform(platform) is "unix".
- if {![info exists _using_windows]} {
- set _using_windows [expr {![catch {exec cygpath --help}]}]
- }
-
- if {![_gdbtk_xvfb_init]} {
- if {$_using_windows} {
- untested "No GDB_DISPLAY -- skipping tests"
- } else {
- untested "No GDB_DISPLAY or Xvfb -- skipping tests"
- }
-
- return 0
- }
-
- return 1
-}
-
-# From dejagnu:
-# srcdir = testsuite src dir (e.g., devo/gdb/testsuite)
-# objdir = testsuite obj dir (e.g., gdb/testsuite)
-# subdir = subdir of testsuite (e.g., gdb.gdbtk)
-#
-# To gdbtk:
-# env(DEFS)=the "defs" files (e.g., devo/gdb/testsuite/gdb.gdbtk/defs)
-# env(SRCDIR)=directory containing the test code (e.g., *.test)
-# env(OBJDIR)=directory which contains any executables
-# (e.g., gdb/testsuite/gdb.gdbtk)
-proc gdbtk_start {test} {
- global verbose
- global GDB
- global GDBFLAGS
- global env srcdir subdir objdir
-
- gdb_stop_suppressing_tests;
-
- # Need to convert ::GDB to use (-)?insight...
- if {[regsub {gdb$} $GDB insight newGDB]} {
- set INSIGHT $newGDB
- } else {
- perror "Cannot find Insight executable"
- exit 1
- }
-
- verbose "Starting $INSIGHT -nx -q --tclcommand=$test"
-
- set real_test [which $test]
- if {$real_test == 0} {
- perror "$test is not found"
- exit 1
- }
-
- if {![is_remote host]} {
- if { [which $INSIGHT] == 0 } {
- perror "$INSIGHT does not exist."
- exit 1
- }
- }
-
- set wd [pwd]
-
- # Find absolute path to test
- set test [to_tcl_path -abs $test]
-
- # Set some environment variables
- cd $srcdir
- set abs_srcdir [pwd]
- set env(DEFS) [to_tcl_path -abs [file join $abs_srcdir $subdir defs]]
-
- cd $wd
- cd [file join $objdir $subdir]
- set env(OBJDIR) [pwd]
- cd $wd
-
- # Set info about target into env
- _gdbtk_export_target_info
-
- set env(SRCDIR) $abs_srcdir
- set env(GDBTK_VERBOSE) 1
- set env(GDBTK_LOGFILE) [to_tcl_path [file join $objdir gdb.log]]
-
- set err [catch {exec $INSIGHT -nx -q --tclcommand=$test} res]
- if { $err } {
- perror "Execing $INSIGHT failed: $res"
- append res "\nERROR gdb-crash"
- }
- return $res
-}
-
-# Start xvfb when using it.
-# The precedence is:
-# 1. If GDB_DISPLAY is set (and not ""), use it
-# 2. If Xvfb exists, use it (not on cygwin)
-# 3. Skip tests
-proc _gdbtk_xvfb_init {} {
- global env spawn_id _xvfb_spawn_id _using_windows
-
- if {[info exists env(GDB_DISPLAY)]} {
- if {$env(GDB_DISPLAY) != ""} {
- set env(DISPLAY) $env(GDB_DISPLAY)
- } else {
- # Suppress tests
- return 0
- }
- } elseif {!$_using_windows && [which Xvfb] != 0} {
- set screen ":[getpid]"
- set pid [spawn Xvfb $screen -ac]
- set _xvfb_spawn_id $spawn_id
- set env(DISPLAY) localhost$screen
- } else {
- # No Xvfb found -- skip test
- return 0
- }
-
- return 1
-}
-
-# Kill xvfb
-proc _gdbtk_xvfb_exit {} {
- global objdir subdir env _xvfb_spawn_id
-
- if {[info exists _xvfb_spawn_id]} {
- exec kill [exp_pid -i $_xvfb_spawn_id]
- wait -i $_xvfb_spawn_id
- }
-}
-
-# help proc for setting tcl-style paths from unix-style paths
-# pass "-abs" to make it an absolute path
-proc to_tcl_path {unix_path {arg {}}} {
- global _using_windows
-
- if {[string compare $unix_path "-abs"] == 0} {
- set unix_path $arg
- set wd [pwd]
- cd [file dirname $unix_path]
- set dirname [pwd]
- set unix_name [file join $dirname [file tail $unix_path]]
- cd $wd
- }
-
- if {$_using_windows} {
- set unix_path [exec cygpath -aw $unix_path]
- set unix_path [join [split $unix_path \\] /]
- }
-
- return $unix_path
-}
-
-# Set information about the target into the environment
-# variable TARGET_INFO. This array will contain a list
-# of commands that are necessary to run a target.
-#
-# This is mostly devined from how dejagnu works, what
-# procs are defined, and analyzing unix.exp, monitor.exp,
-# and sim.exp.
-#
-# Array elements exported:
-# Index Meaning
-# ----- -------
-# init list of target/board initialization commands
-# target target command for target/board
-# load load command for target/board
-# run run command for target_board
-proc _gdbtk_export_target_info {} {
- global env
-
- # Figure out what "target class" the testsuite is using,
- # i.e., sim, monitor, native
- if {[string compare [info proc gdb_target_monitor] gdb_target_monitor] == 0} {
- # Using a monitor/remote target
- set target monitor
- } elseif {[string compare [info proc gdb_target_sim] gdb_target_sim] == 0} {
- # Using a simulator target
- set target simulator
- } elseif {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} {
- # Using sid
- set target sid
- } else {
- # Assume native
- set target native
- }
-
- # Now setup the array to be exported.
- set info(init) {}
- set info(target) {}
- set info(load) {}
- set info(run) {}
-
- switch $target {
- simulator {
- set opts "[target_info gdb,target_sim_options]"
- set info(target) "target sim $opts"
- set info(load) "load"
- set info(run) "run"
- }
-
- monitor {
- # Setup options for the connection
- if {[target_info exists baud]} {
- lappend info(init) "set remotebaud [target_info baud]"
- }
- if {[target_info exists binarydownload]} {
- lappend info(init) "set remotebinarydownload [target_info binarydownload]"
- }
- if {[target_info exists disable_x_packet]} {
- lappend info(init) "set remote X-packet disable"
- }
- if {[target_info exists disable_z_packet]} {
- lappend info(init) "set remote Z-packet disable"
- }
-
- # Get target name and connection info
- if {[target_info exists gdb_protocol]} {
- set targetname "[target_info gdb_protocol]"
- } else {
- set targetname "not_specified"
- }
- if {[target_info exists gdb_serial]} {
- set serialport "[target_info gdb_serial]"
- } elseif {[target_info exists netport]} {
- set serialport "[target_info netport]"
- } else {
- set serialport "[target_info serial]"
- }
-
- set info(target) "target $targetname $serialport"
- set info(load) "load"
- set info(run) "continue"
- }
-
- sid {
- # We must start sid first, since Insight won't have a clue
- # about how to do this.
- sid_start
- set info(target) "target [target_info gdb_protocol] [target_info netport]"
- set info(load) "load"
- set info(run) "continue"
- }
-
- native {
- set info(run) "run"
- }
- }
-
- # Export the array to the environment
- set env(TARGET_INFO) [array get info]
-}
-
-# gdbtk tests call this function to print out the results of the
-# tests. The argument is a proper list of lists of the form:
-# {status name description msg}. All of these things typically
-# come from the testsuite harness.
-proc gdbtk_analyze_results {results} {
- foreach test $results {
- set status [lindex $test 0]
- set name [lindex $test 1]
- set description [lindex $test 2]
- set msg [lindex $test 3]
-
- switch $status {
- PASS {
- pass "$description ($name)"
- }
-
- FAIL {
- fail "$description ($name)"
- }
-
- ERROR {
- perror "$name"
- }
-
- XFAIL {
- xfail "$description ($name)"
- }
-
- XPASS {
- xpass "$description ($name)"
- }
- }
- }
-}
-
-proc gdbtk_done {{results {}}} {
- global _xvfb_spawn_id
- gdbtk_analyze_results $results
-
- # Kill off xvfb if using it
- if {[info exists _xvfb_spawn_id]} {
- _gdbtk_xvfb_exit
- }
-
- # Yich. If we're using sid, we must kill it
- if {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} {
- sid_exit
- }
-}
diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp
index 5c1432fcd37..3a0b2140763 100644
--- a/gdb/testsuite/lib/java.exp
+++ b/gdb/testsuite/lib/java.exp
@@ -1,4 +1,21 @@
-# Copyright (C) 1998, 1999 Red Hat, Inc.
+# This test code is part of GDB, the GNU debugger.
+
+# Copyright 1998, 1999, 2000, 2003, 2004
+# 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.
load_lib "libgloss.exp"
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 46838474e34..8bf52924b3e 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -63,10 +63,6 @@ static void (*target_new_objfile_chain) (struct objfile * objfile);
/* Non-zero if we're using this module's target vector. */
static int using_thread_db;
-/* Non-zero if we have to keep this module's target vector active
- across re-runs. */
-static int keep_thread_db;
-
/* Non-zero if we have determined the signals used by the threads
library. */
static int thread_signals;
@@ -252,7 +248,10 @@ thread_db_state_str (td_thr_state_e state)
THP is a handle to the current thread; if INFOP is not NULL, the
struct thread_info associated with this thread is returned in
- *INFOP. */
+ *INFOP.
+
+ If the thread is a zombie, TD_THR_ZOMBIE is returned. Otherwise,
+ zero is returned to indicate success. */
static int
thread_get_info_callback (const td_thrhandle_t *thp, void *infop)
@@ -271,6 +270,22 @@ thread_get_info_callback (const td_thrhandle_t *thp, void *infop)
thread_ptid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_ptid));
thread_info = find_thread_pid (thread_ptid);
+ /* In the case of a zombie thread, don't continue. We don't want to
+ attach to it thinking it is a new thread. */
+ if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
+ {
+ if (infop != NULL)
+ *(struct thread_info **) infop = thread_info;
+ if (thread_info != NULL)
+ {
+ memcpy (&thread_info->private->th, thp, sizeof (*thp));
+ thread_info->private->th_valid = 1;
+ memcpy (&thread_info->private->ti, &ti, sizeof (ti));
+ thread_info->private->ti_valid = 1;
+ }
+ return TD_THR_ZOMBIE;
+ }
+
if (thread_info == NULL)
{
/* New thread. Attach to it now (why wait?). */
@@ -355,7 +370,19 @@ thread_from_lwp (ptid_t ptid)
GET_LWP (ptid), thread_db_err_str (err));
thread_info = NULL;
- thread_get_info_callback (&th, &thread_info);
+
+ /* Fetch the thread info. If we get back TD_THR_ZOMBIE, then the
+ event thread has already died. If another gdb interface has called
+ thread_alive() previously, the thread won't be found on the thread list
+ anymore. In that case, we don't want to process this ptid anymore
+ to avoid the possibility of later treating it as a newly
+ discovered thread id that we should add to the list. Thus,
+ we return a -1 ptid which is also how the thread list marks a
+ dead thread. */
+ if (thread_get_info_callback (&th, &thread_info) == TD_THR_ZOMBIE
+ && thread_info == NULL)
+ return pid_to_ptid (-1);
+
gdb_assert (thread_info && thread_info->private->ti_valid);
return BUILD_THREAD (thread_info->private->ti.ti_tid, GET_PID (ptid));
@@ -642,8 +669,6 @@ thread_db_new_objfile (struct objfile *objfile)
using_thread_db = 0;
}
- keep_thread_db = 0;
-
goto quit;
}
@@ -672,26 +697,8 @@ thread_db_new_objfile (struct objfile *objfile)
push_target (&thread_db_ops);
using_thread_db = 1;
- /* If the thread library was detected in the main symbol file
- itself, we assume that the program was statically linked
- against the thread library and well have to keep this
- module's target vector activated until forever... Well, at
- least until all symbols have been discarded anyway (see
- above). */
- if (objfile == symfile_objfile)
- {
- gdb_assert (proc_handle.pid == 0);
- keep_thread_db = 1;
- }
-
- /* We can only poke around if there actually is a child process.
- If there is no child process alive, postpone the steps below
- until one has been created. */
- if (proc_handle.pid != 0)
- {
- enable_thread_event_reporting ();
- thread_db_find_new_threads ();
- }
+ enable_thread_event_reporting ();
+ thread_db_find_new_threads ();
break;
default:
@@ -950,7 +957,16 @@ thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (!ptid_equal (trap_ptid, null_ptid))
trap_ptid = thread_from_lwp (trap_ptid);
- return thread_from_lwp (ptid);
+ /* Change the ptid back into the higher level PID + TID format.
+ If the thread is dead and no longer on the thread list, we will
+ get back a dead ptid. This can occur if the thread death event
+ gets postponed by other simultaneous events. In such a case,
+ we want to just ignore the event and continue on. */
+ ptid = thread_from_lwp (ptid);
+ if (GET_PID (ptid) == -1)
+ ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
+
+ return ptid;
}
static int
@@ -1037,7 +1053,7 @@ thread_db_store_registers (int regno)
deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
- supply_register (regno, raw);
+ regcache_raw_supply (current_regcache, regno, raw);
}
fill_gregset ((gdb_gregset_t *) gregset, -1);
@@ -1063,15 +1079,12 @@ thread_db_kill (void)
}
static void
-thread_db_create_inferior (char *exec_file, char *allargs, char **env)
+thread_db_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- if (!keep_thread_db)
- {
- unpush_target (&thread_db_ops);
- using_thread_db = 0;
- }
-
- target_beneath->to_create_inferior (exec_file, allargs, env);
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
+ target_beneath->to_create_inferior (exec_file, allargs, env, from_tty);
}
static void
@@ -1100,17 +1113,9 @@ thread_db_mourn_inferior (void)
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;
- }
+ /* Detach thread_db target ops. */
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
}
static int
@@ -1359,7 +1364,7 @@ _initialize_thread_db (void)
add_target (&thread_db_ops);
/* Add ourselves to objfile event chain. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = thread_db_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = thread_db_new_objfile;
}
}
diff --git a/gdb/thread.c b/gdb/thread.c
index f8cc18d72a2..a52395bd144 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1,7 +1,7 @@
/* Multi-process/thread control for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
@@ -294,7 +294,6 @@ load_infrun_state (ptid_t ptid,
CORE_ADDR *prev_pc,
int *trap_expected,
struct breakpoint **step_resume_breakpoint,
- struct breakpoint **through_sigtramp_breakpoint,
CORE_ADDR *step_range_start,
CORE_ADDR *step_range_end,
struct frame_id *step_frame_id,
@@ -302,9 +301,8 @@ load_infrun_state (ptid_t ptid,
int *another_trap,
int *stepping_through_solib_after_catch,
bpstat *stepping_through_solib_catchpoints,
- int *stepping_through_sigtramp,
int *current_line,
- struct symtab **current_symtab, CORE_ADDR *step_sp)
+ struct symtab **current_symtab)
{
struct thread_info *tp;
@@ -317,7 +315,6 @@ load_infrun_state (ptid_t ptid,
*prev_pc = tp->prev_pc;
*trap_expected = tp->trap_expected;
*step_resume_breakpoint = tp->step_resume_breakpoint;
- *through_sigtramp_breakpoint = tp->through_sigtramp_breakpoint;
*step_range_start = tp->step_range_start;
*step_range_end = tp->step_range_end;
*step_frame_id = tp->step_frame_id;
@@ -327,10 +324,8 @@ load_infrun_state (ptid_t ptid,
tp->stepping_through_solib_after_catch;
*stepping_through_solib_catchpoints =
tp->stepping_through_solib_catchpoints;
- *stepping_through_sigtramp = tp->stepping_through_sigtramp;
*current_line = tp->current_line;
*current_symtab = tp->current_symtab;
- *step_sp = tp->step_sp;
}
/* Save infrun state for the thread PID. */
@@ -340,7 +335,6 @@ save_infrun_state (ptid_t ptid,
CORE_ADDR prev_pc,
int trap_expected,
struct breakpoint *step_resume_breakpoint,
- struct breakpoint *through_sigtramp_breakpoint,
CORE_ADDR step_range_start,
CORE_ADDR step_range_end,
const struct frame_id *step_frame_id,
@@ -348,9 +342,8 @@ save_infrun_state (ptid_t ptid,
int another_trap,
int stepping_through_solib_after_catch,
bpstat stepping_through_solib_catchpoints,
- int stepping_through_sigtramp,
int current_line,
- struct symtab *current_symtab, CORE_ADDR step_sp)
+ struct symtab *current_symtab)
{
struct thread_info *tp;
@@ -363,7 +356,6 @@ save_infrun_state (ptid_t ptid,
tp->prev_pc = prev_pc;
tp->trap_expected = trap_expected;
tp->step_resume_breakpoint = step_resume_breakpoint;
- tp->through_sigtramp_breakpoint = through_sigtramp_breakpoint;
tp->step_range_start = step_range_start;
tp->step_range_end = step_range_end;
tp->step_frame_id = (*step_frame_id);
@@ -371,10 +363,8 @@ save_infrun_state (ptid_t ptid,
tp->another_trap = another_trap;
tp->stepping_through_solib_after_catch = stepping_through_solib_after_catch;
tp->stepping_through_solib_catchpoints = stepping_through_solib_catchpoints;
- tp->stepping_through_sigtramp = stepping_through_sigtramp;
tp->current_line = current_line;
tp->current_symtab = current_symtab;
- tp->step_sp = step_sp;
}
/* Return true if TP is an active thread. */
@@ -417,15 +407,9 @@ info_threads_command (char *arg, int from_tty)
struct thread_info *tp;
ptid_t current_ptid;
struct frame_info *cur_frame;
- int saved_frame_level = frame_relative_level (get_selected_frame ());
- int counter;
+ struct frame_id saved_frame_id = get_frame_id (get_selected_frame ());
char *extra_info;
- /* Check that there really is a frame. This happens when a simulator
- is connected but not loaded or running, for instance. */
- if (legacy_frame_p (current_gdbarch) && saved_frame_level < 0)
- error ("No frame.");
-
prune_threads ();
target_find_new_threads ();
current_ptid = inferior_ptid;
@@ -436,11 +420,7 @@ info_threads_command (char *arg, int from_tty)
else
printf_filtered (" ");
-#ifdef HPUXHPPA
printf_filtered ("%d %s", tp->num, target_tid_to_str (tp->ptid));
-#else
- printf_filtered ("%d %s", tp->num, target_pid_to_str (tp->ptid));
-#endif
extra_info = target_extra_thread_info (tp);
if (extra_info)
@@ -448,32 +428,28 @@ info_threads_command (char *arg, int from_tty)
puts_filtered (" ");
switch_to_thread (tp->ptid);
- print_stack_frame (get_selected_frame (), -1, 0);
+ print_stack_frame (get_selected_frame (), 0, LOCATION);
}
switch_to_thread (current_ptid);
- /* Code below copied from "up_silently_base" in "stack.c".
- * It restores the frame set by the user before the "info threads"
- * command. We have finished the info-threads display by switching
- * back to the current thread. That switch has put us at the top
- * of the stack (leaf frame).
- */
- counter = saved_frame_level;
- cur_frame = find_relative_frame (get_selected_frame (), &counter);
- if (counter != 0)
+ /* Restores the frame set by the user before the "info threads"
+ command. We have finished the info-threads display by switching
+ back to the current thread. That switch has put us at the top of
+ the stack (leaf frame). */
+ cur_frame = frame_find_by_id (saved_frame_id);
+ if (cur_frame == NULL)
{
- /* Ooops, can't restore, tell user where we are. */
+ /* Ooops, can't restore, tell user where we are. */
warning ("Couldn't restore frame in current thread, at frame 0");
- print_stack_frame (get_selected_frame (), -1, 0);
+ print_stack_frame (get_selected_frame (), 0, LOCATION);
}
else
{
select_frame (cur_frame);
+ /* re-show current frame. */
+ show_stack_frame (cur_frame);
}
-
- /* re-show current frame. */
- show_stack_frame (cur_frame);
}
/* Switch from one thread to another. */
@@ -497,7 +473,7 @@ restore_current_thread (ptid_t ptid)
if (!ptid_equal (ptid, inferior_ptid))
{
switch_to_thread (ptid);
- print_stack_frame (get_current_frame (), 0, -1);
+ print_stack_frame (get_current_frame (), 1, SRC_LINE);
}
}
@@ -557,13 +533,8 @@ thread_apply_all_command (char *cmd, int from_tty)
if (thread_alive (tp))
{
switch_to_thread (tp->ptid);
-#ifdef HPUXHPPA
printf_filtered ("\nThread %d (%s):\n",
tp->num, target_tid_to_str (inferior_ptid));
-#else
- printf_filtered ("\nThread %d (%s):\n", tp->num,
- target_pid_to_str (inferior_ptid));
-#endif
execute_command (cmd, from_tty);
strcpy (cmd, saved_cmd); /* Restore exact command used previously */
}
@@ -633,13 +604,8 @@ thread_apply_command (char *tidlist, int from_tty)
else
{
switch_to_thread (tp->ptid);
-#ifdef HPUXHPPA
printf_filtered ("\nThread %d (%s):\n", tp->num,
target_tid_to_str (inferior_ptid));
-#else
- printf_filtered ("\nThread %d (%s):\n", tp->num,
- target_pid_to_str (inferior_ptid));
-#endif
execute_command (cmd, from_tty);
strcpy (cmd, saved_cmd); /* Restore exact command used previously */
}
@@ -662,12 +628,7 @@ thread_command (char *tidstr, int from_tty)
if (target_has_stack)
printf_filtered ("[Current thread is %d (%s)]\n",
pid_to_thread_id (inferior_ptid),
-#if defined(HPUXHPPA)
- target_tid_to_str (inferior_ptid)
-#else
- target_pid_to_str (inferior_ptid)
-#endif
- );
+ target_tid_to_str (inferior_ptid));
else
error ("No stack.");
return;
@@ -697,15 +658,10 @@ do_captured_thread_select (struct ui_out *uiout, void *tidstr)
ui_out_text (uiout, "[Switching to thread ");
ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_ptid));
ui_out_text (uiout, " (");
-#if defined(HPUXHPPA)
ui_out_text (uiout, target_tid_to_str (inferior_ptid));
-#else
- ui_out_text (uiout, target_pid_to_str (inferior_ptid));
-#endif
ui_out_text (uiout, ")]");
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
return GDB_RC_OK;
}
diff --git a/gdb/top.c b/gdb/top.c
index d6bdfd09284..e586efd9481 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -193,103 +193,104 @@ static void stop_sig (int);
If the UI fails to initialize and it wants GDB to continue
using the default UI, then it should clear this hook before returning. */
-void (*init_ui_hook) (char *argv0);
+void (*deprecated_init_ui_hook) (char *argv0);
/* This hook is called from within gdb's many mini-event loops which could
steal control from a real user interface's event loop. It returns
non-zero if the user is requesting a detach, zero otherwise. */
-int (*ui_loop_hook) (int);
+int (*deprecated_ui_loop_hook) (int);
/* Called instead of command_loop at top level. Can be invoked via
throw_exception(). */
-void (*command_loop_hook) (void);
+void (*deprecated_command_loop_hook) (void);
/* Called from print_frame_info to list the line we stopped in. */
-void (*print_frame_info_listing_hook) (struct symtab * s, int line,
- int stopline, int noerror);
+void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int line,
+ int stopline, int noerror);
/* Replaces most of query. */
-int (*query_hook) (const char *, va_list);
+int (*deprecated_query_hook) (const char *, va_list);
/* Replaces most of warning. */
-void (*warning_hook) (const char *, va_list);
+void (*deprecated_warning_hook) (const char *, va_list);
-/* These three functions support getting lines of text from the user. They
- are used in sequence. First readline_begin_hook is called with a text
- string that might be (for example) a message for the user to type in a
- sequence of commands to be executed at a breakpoint. If this function
- calls back to a GUI, it might take this opportunity to pop up a text
- interaction window with this message. Next, readline_hook is called
- with a prompt that is emitted prior to collecting the user input.
- It can be called multiple times. Finally, readline_end_hook is called
- to notify the GUI that we are done with the interaction window and it
- can close it. */
+/* These three functions support getting lines of text from the user.
+ They are used in sequence. First deprecated_readline_begin_hook is
+ called with a text string that might be (for example) a message for
+ the user to type in a sequence of commands to be executed at a
+ breakpoint. If this function calls back to a GUI, it might take
+ this opportunity to pop up a text interaction window with this
+ message. Next, deprecated_readline_hook is called with a prompt
+ that is emitted prior to collecting the user input. It can be
+ called multiple times. Finally, deprecated_readline_end_hook is
+ called to notify the GUI that we are done with the interaction
+ window and it can close it. */
-void (*readline_begin_hook) (char *, ...);
-char *(*readline_hook) (char *);
-void (*readline_end_hook) (void);
+void (*deprecated_readline_begin_hook) (char *, ...);
+char *(*deprecated_readline_hook) (char *);
+void (*deprecated_readline_end_hook) (void);
/* Called as appropriate to notify the interface of the specified breakpoint
conditions. */
-void (*create_breakpoint_hook) (struct breakpoint * bpt);
-void (*delete_breakpoint_hook) (struct breakpoint * bpt);
-void (*modify_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_create_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt);
/* Called as appropriate to notify the interface that we have attached
to or detached from an already running process. */
-void (*attach_hook) (void);
-void (*detach_hook) (void);
+void (*deprecated_attach_hook) (void);
+void (*deprecated_detach_hook) (void);
/* Called during long calculations to allow GUI to repair window damage, and to
check for stop buttons, etc... */
-void (*interactive_hook) (void);
+void (*deprecated_interactive_hook) (void);
/* Called when the registers have changed, as a hint to a GUI
to minimize window update. */
-void (*registers_changed_hook) (void);
+void (*deprecated_registers_changed_hook) (void);
/* Tell the GUI someone changed the register REGNO. -1 means
that the caller does not know which register changed or
that several registers have changed (see value_assign). */
-void (*register_changed_hook) (int regno);
+void (*deprecated_register_changed_hook) (int regno);
/* Tell the GUI someone changed LEN bytes of memory at ADDR */
-void (*memory_changed_hook) (CORE_ADDR addr, int len);
+void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len);
/* Called when going to wait for the target. Usually allows the GUI to run
while waiting for target events. */
-ptid_t (*target_wait_hook) (ptid_t ptid,
- struct target_waitstatus * status);
+ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
+ struct target_waitstatus * status);
/* Used by UI as a wrapper around command execution. May do various things
like enabling/disabling buttons, etc... */
-void (*call_command_hook) (struct cmd_list_element * c, char *cmd,
- int from_tty);
+void (*deprecated_call_command_hook) (struct cmd_list_element * c, char *cmd,
+ int from_tty);
/* Called after a `set' command has finished. Is only run if the
`set' command succeeded. */
-void (*set_hook) (struct cmd_list_element * c);
+void (*deprecated_set_hook) (struct cmd_list_element * c);
/* Called when the current thread changes. Argument is thread id. */
-void (*context_hook) (int id);
+void (*deprecated_context_hook) (int id);
/* Takes control from error (). Typically used to prevent longjmps out of the
middle of the GUI. Usually used in conjunction with a catch routine. */
-NORETURN void (*error_hook) (void) ATTR_NORETURN;
+void (*deprecated_error_hook) (void);
/* One should use catch_errors rather than manipulating these
@@ -321,9 +322,9 @@ throw_exception (enum return_reason reason)
disable_current_display ();
do_cleanups (ALL_CLEANUPS);
- if (event_loop_p && target_can_async_p () && !target_executing)
+ if (target_can_async_p () && !target_executing)
do_exec_cleanups (ALL_CLEANUPS);
- if (event_loop_p && sync_execution)
+ if (sync_execution)
do_exec_error_cleanups (ALL_CLEANUPS);
if (annotation_level > 1)
@@ -577,8 +578,6 @@ catch_command_errors (catch_command_errors_ftype * command,
/* Handler for SIGHUP. */
#ifdef SIGHUP
-/* Just a little helper function for disconnect(). */
-
/* NOTE 1999-04-29: This function will be static again, once we modify
gdb to use the event loop as the default command loop and we merge
event-top.c into this file, top.c */
@@ -590,15 +589,6 @@ quit_cover (void *s)
quit_command ((char *) 0, 0);
return 0;
}
-
-static void
-disconnect (int signo)
-{
- catch_errors (quit_cover, NULL,
- "Could not kill the program being debugged", RETURN_MASK_ALL);
- signal (SIGHUP, SIG_DFL);
- kill (getpid (), SIGHUP);
-}
#endif /* defined SIGHUP */
/* Line number we are currently in in a file which is being sourced. */
@@ -695,7 +685,7 @@ execute_command (char *p, int from_tty)
/* If the target is running, we allow only a limited set of
commands. */
- if (event_loop_p && target_can_async_p () && target_executing)
+ if (target_can_async_p () && target_executing)
if (strcmp (c->name, "help") != 0
&& strcmp (c->name, "pwd") != 0
&& strcmp (c->name, "show") != 0
@@ -737,8 +727,8 @@ execute_command (char *p, int from_tty)
do_setshow_command (arg, from_tty & caution, c);
else if (!cmd_func_p (c))
error ("That is not a command, just a help topic.");
- else if (call_command_hook)
- call_command_hook (c, arg, from_tty & caution);
+ else if (deprecated_call_command_hook)
+ deprecated_call_command_hook (c, arg, from_tty & caution);
else
cmd_func (c, arg, from_tty & caution);
@@ -990,7 +980,7 @@ char *
gdb_readline_wrapper (char *prompt)
{
/* Set the hook that works in this case. */
- if (event_loop_p && after_char_processing_hook)
+ if (after_char_processing_hook)
{
rl_pre_input_hook = (Function *) after_char_processing_hook;
after_char_processing_hook = NULL;
@@ -1051,37 +1041,6 @@ do_nothing (int signo)
signal (signo, do_nothing);
}
-static void
-init_signals (void)
-{
- signal (SIGINT, request_quit);
-
- /* If SIGTRAP was set to SIG_IGN, then the SIG_IGN will get passed
- to the inferior and breakpoints will be ignored. */
-#ifdef SIGTRAP
- signal (SIGTRAP, SIG_DFL);
-#endif
-
- /* If we initialize SIGQUIT to SIG_IGN, then the SIG_IGN will get
- passed to the inferior, which we don't want. It would be
- possible to do a "signal (SIGQUIT, SIG_DFL)" after we fork, but
- on BSD4.3 systems using vfork, that can affect the
- GDB process as well as the inferior (the signal handling tables
- might be in memory, shared between the two). Since we establish
- a handler for SIGQUIT, when we call exec it will set the signal
- to SIG_DFL for us. */
- signal (SIGQUIT, do_nothing);
-#ifdef SIGHUP
- if (signal (SIGHUP, do_nothing) != SIG_IGN)
- signal (SIGHUP, disconnect);
-#endif
- signal (SIGFPE, float_handler);
-
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
- signal (SIGWINCH, SIGWINCH_HANDLER);
-#endif
-}
-
/* The current saved history number from operate-and-get-next.
This is -1 if not valid. */
static int operate_saved_history = -1;
@@ -1113,17 +1072,8 @@ gdb_rl_operate_and_get_next (int count, int key)
{
int where;
- if (event_loop_p)
- {
- /* Use the async hook. */
- after_char_processing_hook = gdb_rl_operate_and_get_next_completion;
- }
- else
- {
- /* This hook only works correctly when we are using the
- synchronous readline. */
- rl_pre_input_hook = (Function *) gdb_rl_operate_and_get_next_completion;
- }
+ /* Use the async hook. */
+ after_char_processing_hook = gdb_rl_operate_and_get_next_completion;
/* Find the current line, and find the next line to use. */
where = where_history();
@@ -1199,12 +1149,7 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
immediate_quit++;
#ifdef STOP_SIGNAL
if (job_control)
- {
- if (event_loop_p)
- signal (STOP_SIGNAL, handle_stop_sig);
- else
- signal (STOP_SIGNAL, stop_sig);
- }
+ signal (STOP_SIGNAL, handle_stop_sig);
#endif
while (1)
@@ -1234,9 +1179,9 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
}
/* Don't use fancy stuff if not talking to stdin. */
- if (readline_hook && instream == NULL)
+ if (deprecated_readline_hook && instream == NULL)
{
- rl = (*readline_hook) (local_prompt);
+ rl = (*deprecated_readline_hook) (local_prompt);
}
else if (command_editing_p && instream == stdin && ISATTY (instream))
{
@@ -1418,10 +1363,7 @@ There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
char *
get_prompt (void)
{
- if (event_loop_p)
- return PROMPT (0);
- else
- return gdb_prompt_string;
+ return PROMPT (0);
}
void
@@ -1432,10 +1374,7 @@ set_prompt (char *s)
if (prompt != NULL)
xfree (prompt);
*/
- if (event_loop_p)
- PROMPT (0) = savestring (s, strlen (s));
- else
- gdb_prompt_string = savestring (s, strlen (s));
+ PROMPT (0) = savestring (s, strlen (s));
}
@@ -1452,7 +1391,7 @@ quit_confirm (void)
/* This is something of a hack. But there's no reliable way to
see if a GUI is running. The `use_windows' variable doesn't
cut it. */
- if (init_ui_hook)
+ if (deprecated_init_ui_hook)
s = "A debugging session is active.\nDo you still want to close the debugger?";
else if (attach_flag)
s = "The program is running. Quit anyway (and detach it)? ";
@@ -1712,32 +1651,23 @@ init_main (void)
{
struct cmd_list_element *c;
- /* If we are running the asynchronous version,
- we initialize the prompts differently. */
- if (!event_loop_p)
- {
- gdb_prompt_string = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
- }
- else
- {
- /* initialize the prompt stack to a simple "(gdb) " prompt or to
- whatever the DEFAULT_PROMPT is. */
- the_prompts.top = 0;
- PREFIX (0) = "";
- PROMPT (0) = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
- SUFFIX (0) = "";
- /* Set things up for annotation_level > 1, if the user ever decides
- to use it. */
- async_annotation_suffix = "prompt";
- /* Set the variable associated with the setshow prompt command. */
- new_async_prompt = savestring (PROMPT (0), strlen (PROMPT (0)));
-
- /* If gdb was started with --annotate=2, this is equivalent to
- the user entering the command 'set annotate 2' at the gdb
- prompt, so we need to do extra processing. */
- if (annotation_level > 1)
- set_async_annotation_level (NULL, 0, NULL);
- }
+ /* initialize the prompt stack to a simple "(gdb) " prompt or to
+ whatever the DEFAULT_PROMPT is. */
+ the_prompts.top = 0;
+ PREFIX (0) = "";
+ PROMPT (0) = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
+ SUFFIX (0) = "";
+ /* Set things up for annotation_level > 1, if the user ever decides
+ to use it. */
+ async_annotation_suffix = "prompt";
+ /* Set the variable associated with the setshow prompt command. */
+ new_async_prompt = savestring (PROMPT (0), strlen (PROMPT (0)));
+
+ /* If gdb was started with --annotate=2, this is equivalent to the
+ user entering the command 'set annotate 2' at the gdb prompt, so
+ we need to do extra processing. */
+ if (annotation_level > 1)
+ set_async_annotation_level (NULL, 0, NULL);
/* Set the important stuff up for command editing. */
command_editing_p = 1;
@@ -1755,57 +1685,26 @@ init_main (void)
15 is Control-o, the same binding this function has in Bash. */
rl_add_defun ("operate-and-get-next", gdb_rl_operate_and_get_next, 15);
- /* The set prompt command is different depending whether or not the
- async version is run. NOTE: this difference is going to
- disappear as we make the event loop be the default engine of
- gdb. */
- if (!event_loop_p)
- {
- add_show_from_set
- (add_set_cmd ("prompt", class_support, var_string,
- (char *) &gdb_prompt_string, "Set gdb's prompt",
- &setlist),
- &showlist);
- }
- else
- {
- c = add_set_cmd ("prompt", class_support, var_string,
- (char *) &new_async_prompt, "Set gdb's prompt",
- &setlist);
- add_show_from_set (c, &showlist);
- set_cmd_sfunc (c, set_async_prompt);
- }
+ c = add_set_cmd ("prompt", class_support, var_string,
+ (char *) &new_async_prompt, "Set gdb's prompt",
+ &setlist);
+ deprecated_add_show_from_set (c, &showlist);
+ set_cmd_sfunc (c, set_async_prompt);
add_com ("dont-repeat", class_support, dont_repeat_command, "Don't repeat this command.\n\
Primarily used inside of user-defined commands that should not be repeated when\n\
hitting return.");
- /* The set editing command is different depending whether or not the
- async version is run. NOTE: this difference is going to disappear
- as we make the event loop be the default engine of gdb. */
- if (!event_loop_p)
- {
- add_show_from_set
- (add_set_cmd ("editing", class_support, var_boolean, (char *) &command_editing_p,
- "Set editing of command lines as they are typed.\n\
-Use \"on\" to enable the editing, and \"off\" to disable it.\n\
-Without an argument, command line editing is enabled. To edit, use\n\
-EMACS-like or VI-like commands like control-P or ESC.", &setlist),
- &showlist);
- }
- else
- {
- c = add_set_cmd ("editing", class_support, var_boolean, (char *) &async_command_editing_p,
- "Set editing of command lines as they are typed.\n\
+ c = add_set_cmd ("editing", class_support, var_boolean, (char *) &async_command_editing_p,
+ "Set editing of command lines as they are typed.\n\
Use \"on\" to enable the editing, and \"off\" to disable it.\n\
Without an argument, command line editing is enabled. To edit, use\n\
EMACS-like or VI-like commands like control-P or ESC.", &setlist);
- add_show_from_set (c, &showlist);
- set_cmd_sfunc (c, set_async_editing_command);
- }
+ deprecated_add_show_from_set (c, &showlist);
+ set_cmd_sfunc (c, set_async_editing_command);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("save", no_class, var_boolean, (char *) &write_history_p,
"Set saving of the history record on exit.\n\
Use \"on\" to enable the saving, and \"off\" to disable it.\n\
@@ -1815,7 +1714,7 @@ Without an argument, saving is enabled.", &sethistlist),
c = add_set_cmd ("size", no_class, var_integer, (char *) &history_size,
"Set the size of the command history,\n\
ie. the number of previous commands to keep a record of.", &sethistlist);
- add_show_from_set (c, &showhistlist);
+ deprecated_add_show_from_set (c, &showhistlist);
set_cmd_sfunc (c, set_history_size_command);
c = add_set_cmd ("filename", no_class, var_filename,
@@ -1823,46 +1722,28 @@ ie. the number of previous commands to keep a record of.", &sethistlist);
"Set the filename in which to record the command history\n\
(the list of previous commands of which a record is kept).", &sethistlist);
set_cmd_completer (c, filename_completer);
- add_show_from_set (c, &showhistlist);
+ deprecated_add_show_from_set (c, &showhistlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("confirm", class_support, var_boolean,
(char *) &caution,
"Set whether to confirm potentially dangerous operations.",
&setlist),
&showlist);
- /* The set annotate command is different depending whether or not
- the async version is run. NOTE: this difference is going to
- disappear as we make the event loop be the default engine of
- gdb. */
- if (!event_loop_p)
- {
- c = add_set_cmd ("annotate", class_obscure, var_zinteger,
- (char *) &annotation_level, "Set annotation_level.\n\
-0 == normal; 1 == fullname (for use when running under emacs)\n\
-2 == output annotated suitably for use by programs that control GDB.",
- &setlist);
- c = add_show_from_set (c, &showlist);
- }
- else
- {
- c = add_set_cmd ("annotate", class_obscure, var_zinteger,
- (char *) &annotation_level, "Set annotation_level.\n\
+ c = add_set_cmd ("annotate", class_obscure, var_zinteger,
+ (char *) &annotation_level, "Set annotation_level.\n\
0 == normal; 1 == fullname (for use when running under emacs)\n\
2 == output annotated suitably for use by programs that control GDB.",
- &setlist);
- add_show_from_set (c, &showlist);
- set_cmd_sfunc (c, set_async_annotation_level);
- }
- if (event_loop_p)
- {
- add_show_from_set
- (add_set_cmd ("exec-done-display", class_support, var_boolean, (char *) &exec_done_display_p,
- "Set notification of completion for asynchronous execution commands.\n\
+ &setlist);
+ deprecated_add_show_from_set (c, &showlist);
+ set_cmd_sfunc (c, set_async_annotation_level);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("exec-done-display", class_support, var_boolean, (char *) &exec_done_display_p,
+ "Set notification of completion for asynchronous execution commands.\n\
Use \"on\" to enable the notification, and \"off\" to disable it.", &setlist),
- &showlist);
- }
+ &showlist);
}
void
@@ -1890,14 +1771,7 @@ gdb_init (char *argv0)
init_cli_cmds();
init_main (); /* But that omits this file! Do it now */
- /* The signal handling mechanism is different depending whether or
- not the async version is run. NOTE: in the future we plan to make
- the event loop be the default engine of gdb, and this difference
- will disappear. */
- if (event_loop_p)
- async_init_signals ();
- else
- init_signals ();
+ async_init_signals ();
/* We need a default language for parsing expressions, so simple things like
"set width 0" won't fail if no language is explicitly set in a config file
@@ -1905,8 +1779,9 @@ gdb_init (char *argv0)
set_language (language_c);
expected_language = current_language; /* don't warn about the change. */
- /* Allow another UI to initialize. If the UI fails to initialize, and
- it wants GDB to revert to the CLI, it should clear init_ui_hook. */
- if (init_ui_hook)
- init_ui_hook (argv0);
+ /* Allow another UI to initialize. If the UI fails to initialize,
+ and it wants GDB to revert to the CLI, it should clear
+ deprecated_init_ui_hook. */
+ if (deprecated_init_ui_hook)
+ deprecated_init_ui_hook (argv0);
}
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 39c6877c2a8..5d8b076cce1 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1,7 +1,7 @@
/* Tracing functionality for remote targets in custom GDB protocol
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -65,9 +65,9 @@
#define MAX_AGENT_EXPR_LEN 184
-extern void (*readline_begin_hook) (char *, ...);
-extern char *(*readline_hook) (char *);
-extern void (*readline_end_hook) (void);
+extern void (*deprecated_readline_begin_hook) (char *, ...);
+extern char *(*deprecated_readline_hook) (char *);
+extern void (*deprecated_readline_end_hook) (void);
extern void x_command (char *, int);
extern int addressprint; /* Print machine addresses? */
@@ -494,11 +494,10 @@ tracepoints_info (char *tpnum_exp, int from_tty)
char *tmp;
if (TARGET_ADDR_BIT <= 32)
- tmp = local_hex_string_custom (t->address
- & (CORE_ADDR) 0xffffffff,
- "08l");
+ tmp = hex_string_custom (t->address & (CORE_ADDR) 0xffffffff,
+ 8);
else
- tmp = local_hex_string_custom (t->address, "016l");
+ tmp = hex_string_custom (t->address, 16);
printf_filtered ("%s ", tmp);
}
@@ -787,8 +786,8 @@ trace_actions_command (char *args, int from_tty)
if (from_tty)
{
- if (readline_begin_hook)
- (*readline_begin_hook) ("%s %s\n", tmpbuf, end_msg);
+ if (deprecated_readline_begin_hook)
+ (*deprecated_readline_begin_hook) ("%s %s\n", tmpbuf, end_msg);
else if (input_from_terminal_p ())
printf_filtered ("%s\n%s\n", tmpbuf, end_msg);
}
@@ -797,8 +796,8 @@ trace_actions_command (char *args, int from_tty)
t->step_count = 0; /* read_actions may set this */
read_actions (t);
- if (readline_end_hook)
- (*readline_end_hook) ();
+ if (deprecated_readline_end_hook)
+ (*deprecated_readline_end_hook) ();
/* tracepoints_changed () */
}
/* else just return */
@@ -826,12 +825,7 @@ read_actions (struct tracepoint *t)
isn't declared. Leave this alone for now. */
#ifdef STOP_SIGNAL
if (job_control)
- {
- if (event_loop_p)
- signal (STOP_SIGNAL, handle_stop_sig);
- else
- signal (STOP_SIGNAL, stop_sig);
- }
+ signal (STOP_SIGNAL, handle_stop_sig);
#endif
old_chain = make_cleanup_free_actions (t);
while (1)
@@ -842,8 +836,8 @@ read_actions (struct tracepoint *t)
gdb_flush (gdb_stdout);
gdb_flush (gdb_stderr);
- if (readline_hook && instream == NULL)
- line = (*readline_hook) (prompt);
+ if (deprecated_readline_hook && instream == NULL)
+ line = (*deprecated_readline_hook) (prompt);
else if (instream == stdin && ISATTY (instream))
{
line = gdb_readline_wrapper (prompt);
@@ -1219,7 +1213,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym,
/* check for doubles stored in two registers */
/* FIXME: how about larger types stored in 3 or more regs? */
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FLT &&
- len > DEPRECATED_REGISTER_RAW_SIZE (reg))
+ len > register_size (current_gdbarch, reg))
add_register (collect, reg + 1);
break;
case LOC_REF_ARG:
@@ -1693,7 +1687,7 @@ remote_set_transparent_ranges (void)
anysecs = 1;
lma = s->lma;
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
sprintf_vma (tmp1, lma);
sprintf_vma (tmp2, lma + size);
sprintf (target_buf + strlen (target_buf),
@@ -1804,8 +1798,8 @@ trace_start_command (char *args, int from_tty)
set_tracepoint_num (-1);
set_traceframe_context (-1);
trace_running_p = 1;
- if (trace_start_stop_hook)
- trace_start_stop_hook (1, from_tty);
+ if (deprecated_trace_start_stop_hook)
+ deprecated_trace_start_stop_hook (1, from_tty);
}
else
@@ -1823,8 +1817,8 @@ trace_stop_command (char *args, int from_tty)
if (strcmp (target_buf, "OK"))
error ("Bogus reply from target: %s", target_buf);
trace_running_p = 0;
- if (trace_start_stop_hook)
- trace_start_stop_hook (0, from_tty);
+ if (deprecated_trace_start_stop_hook)
+ deprecated_trace_start_stop_hook (0, from_tty);
}
else
error ("Trace can only be run on remote targets.");
@@ -1935,7 +1929,7 @@ finish_tfind_command (char *msg,
if (from_tty)
{
- int source_only;
+ enum print_what print_what;
/* NOTE: in immitation of the step command, try to determine
whether we have made a transition from one function to another.
@@ -1951,13 +1945,11 @@ finish_tfind_command (char *msg,
(old_frame_addr == 0 ||
get_frame_base (get_current_frame ()) == 0 ||
old_frame_addr == get_frame_base (get_current_frame ())))
- source_only = -1;
+ print_what = SRC_LINE;
else
- source_only = 1;
+ print_what = SRC_AND_LOC;
- print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame),
- source_only);
+ print_stack_frame (get_selected_frame (), 1, print_what);
do_displays ();
}
}
@@ -1985,8 +1977,8 @@ trace_find_command (char *args, int from_tty)
if (target_is_remote ())
{
- if (trace_find_hook)
- trace_find_hook (args, from_tty);
+ if (deprecated_trace_find_hook)
+ deprecated_trace_find_hook (args, from_tty);
if (args == 0 || *args == 0)
{ /* TFIND with no args means find NEXT trace frame. */
@@ -2347,7 +2339,7 @@ scope_info (char *args, int from_tty)
sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
if (sals.nelts == 0)
- return; /* presumably decode_line_1 has already warned */
+ return; /* presumably decode_line_1 has already warned */
/* Resolve line numbers to PC */
resolve_sal_pc (&sals.sals[0]);
@@ -2389,7 +2381,8 @@ scope_info (char *args, int from_tty)
break;
case LOC_STATIC:
printf_filtered ("in static storage at address ");
- print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, gdb_stdout);
+ print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
+ 1, gdb_stdout);
break;
case LOC_REGISTER:
printf_filtered ("a local variable in register $%s",
@@ -2421,12 +2414,13 @@ scope_info (char *args, int from_tty)
continue;
case LOC_LABEL:
printf_filtered ("a label at address ");
- print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, gdb_stdout);
+ print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
+ 1, gdb_stdout);
break;
case LOC_BLOCK:
printf_filtered ("a function at address ");
- print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)), 1,
- gdb_stdout);
+ print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
+ 1, gdb_stdout);
break;
case LOC_BASEREG:
printf_filtered ("a variable at offset %ld from register $%s",
@@ -2439,7 +2433,8 @@ scope_info (char *args, int from_tty)
REGISTER_NAME (SYMBOL_BASEREG (sym)));
break;
case LOC_UNRESOLVED:
- msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, NULL);
+ msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym),
+ NULL, NULL);
if (msym == NULL)
printf_filtered ("Unresolved Static");
else
@@ -2452,10 +2447,22 @@ scope_info (char *args, int from_tty)
case LOC_OPTIMIZED_OUT:
printf_filtered ("optimized out.\n");
continue;
+ case LOC_HP_THREAD_LOCAL_STATIC:
+ printf_filtered ("HP thread local static ");
+ break;
+ case LOC_INDIRECT:
+ printf_filtered ("extern (local indirect) at address ");
+ print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
+ 1, gdb_stdout);
+ break;
+ case LOC_COMPUTED:
+ case LOC_COMPUTED_ARG:
+ SYMBOL_OPS (sym)->describe_location (sym, gdb_stdout);
+ break;
}
if (SYMBOL_TYPE (sym))
printf_filtered (", length %d.\n",
- TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
+ TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
}
if (BLOCK_FUNCTION (block))
break;
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h
index c464ae1f98c..280d36c6e0f 100644
--- a/gdb/tracepoint.h
+++ b/gdb/tracepoint.h
@@ -109,11 +109,11 @@ extern unsigned long trace_running_p;
/* A hook used to notify the UI of tracepoint operations */
-void (*create_tracepoint_hook) (struct tracepoint *);
-void (*delete_tracepoint_hook) (struct tracepoint *);
-void (*modify_tracepoint_hook) (struct tracepoint *);
-void (*trace_find_hook) (char *arg, int from_tty);
-void (*trace_start_stop_hook) (int start, int from_tty);
+void (*deprecated_create_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_delete_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_modify_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_trace_find_hook) (char *arg, int from_tty);
+void (*deprecated_trace_start_stop_hook) (int start, int from_tty);
struct tracepoint *get_tracepoint_by_number (char **, int, int);
int get_traceframe_number (void);
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c
index f51998d42b8..b9ee2e15e8e 100644
--- a/gdb/trad-frame.c
+++ b/gdb/trad-frame.c
@@ -98,6 +98,14 @@ trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
}
void
+trad_frame_set_reg_realreg (struct trad_frame_cache *this_trad_cache,
+ int regnum, int realreg)
+{
+ this_trad_cache->prev_regs[regnum].realreg = realreg;
+ this_trad_cache->prev_regs[regnum].addr = -1;
+}
+
+void
trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache,
int regnum, CORE_ADDR addr)
{
@@ -114,11 +122,11 @@ trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[],
}
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 *realregp, void *bufferp)
+trad_frame_get_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 *realregp, void *bufferp)
{
struct gdbarch *gdbarch = get_frame_arch (next_frame);
if (trad_frame_addr_p (this_saved_regs, regnum))
@@ -166,9 +174,9 @@ trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realregp, void *bufferp)
{
- trad_frame_prev_register (next_frame, this_trad_cache->prev_regs,
- regnum, optimizedp, lvalp, addrp, realregp,
- bufferp);
+ trad_frame_get_prev_register (next_frame, this_trad_cache->prev_regs,
+ regnum, optimizedp, lvalp, addrp, realregp,
+ bufferp);
}
void
@@ -184,3 +192,16 @@ trad_frame_get_id (struct trad_frame_cache *this_trad_cache,
{
(*this_id) = this_trad_cache->this_id;
}
+
+void
+trad_frame_set_this_base (struct trad_frame_cache *this_trad_cache,
+ CORE_ADDR this_base)
+{
+ this_trad_cache->this_base = this_base;
+}
+
+CORE_ADDR
+trad_frame_get_this_base (struct trad_frame_cache *this_trad_cache)
+{
+ return this_trad_cache->this_base;
+}
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h
index 51f3a0ea9e3..55a257f40f0 100644
--- a/gdb/trad-frame.h
+++ b/gdb/trad-frame.h
@@ -39,7 +39,12 @@ void trad_frame_set_id (struct trad_frame_cache *this_trad_cache,
struct frame_id this_id);
void trad_frame_get_id (struct trad_frame_cache *this_trad_cache,
struct frame_id *this_id);
+void trad_frame_set_this_base (struct trad_frame_cache *this_trad_cache,
+ CORE_ADDR this_base);
+CORE_ADDR trad_frame_get_this_base (struct trad_frame_cache *this_trad_cache);
+void trad_frame_set_reg_realreg (struct trad_frame_cache *this_trad_cache,
+ int regnum, int realreg);
void trad_frame_set_reg_unknown (struct trad_frame_cache *this_trad_cache,
int regnum, CORE_ADDR addr);
void trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache,
@@ -105,10 +110,10 @@ struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *nex
/* 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 *realregp, void *bufferp);
+void trad_frame_get_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 *realregp, void *bufferp);
#endif
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index ee3635f743b..e1b946b4c79 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -85,12 +85,13 @@ tramp_frame_prev_register (struct frame_info *next_frame,
}
static CORE_ADDR
-tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp)
+tramp_frame_start (const struct tramp_frame *tramp,
+ struct frame_info *next_frame, CORE_ADDR pc)
{
int ti;
/* Search through the trampoline for one that matches the
instruction sequence around PC. */
- for (ti = 0; tramp->insn[ti] != TRAMP_SENTINEL_INSN; ti++)
+ for (ti = 0; tramp->insn[ti].bytes != TRAMP_SENTINEL_INSN; ti++)
{
CORE_ADDR func = pc - tramp->insn_size * ti;
int i;
@@ -98,13 +99,14 @@ tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp)
{
bfd_byte buf[sizeof (tramp->insn[0])];
ULONGEST insn;
- if (tramp->insn[i] == TRAMP_SENTINEL_INSN)
+ if (tramp->insn[i].bytes == TRAMP_SENTINEL_INSN)
return func;
- if (target_read_memory (func + i * tramp->insn_size, buf,
- tramp->insn_size) != 0)
+ if (!safe_frame_unwind_memory (next_frame,
+ func + i * tramp->insn_size,
+ buf, tramp->insn_size))
break;
insn = extract_unsigned_integer (buf, tramp->insn_size);
- if (tramp->insn[i] != insn)
+ if (tramp->insn[i].bytes != (insn & tramp->insn[i].mask))
break;
}
}
@@ -133,7 +135,7 @@ tramp_frame_sniffer (const struct frame_unwind *self,
if (find_pc_section (pc) != NULL)
return 0;
/* Finally, check that the trampoline matches at PC. */
- func = tramp_frame_start (pc, tramp);
+ func = tramp_frame_start (tramp, next_frame, pc);
if (func == 0)
return 0;
tramp_cache = FRAME_OBSTACK_ZALLOC (struct tramp_frame_cache);
@@ -144,8 +146,8 @@ tramp_frame_sniffer (const struct frame_unwind *self,
}
void
-tramp_frame_append (struct gdbarch *gdbarch,
- const struct tramp_frame *tramp_frame)
+tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
+ const struct tramp_frame *tramp_frame)
{
struct frame_data *data;
struct frame_unwind *unwinder;
@@ -154,11 +156,11 @@ tramp_frame_append (struct gdbarch *gdbarch,
/* Check that the instruction sequence contains a sentinel. */
for (i = 0; i < ARRAY_SIZE (tramp_frame->insn); i++)
{
- if (tramp_frame->insn[i] == TRAMP_SENTINEL_INSN)
+ if (tramp_frame->insn[i].bytes == TRAMP_SENTINEL_INSN)
break;
}
gdb_assert (i < ARRAY_SIZE (tramp_frame->insn));
- gdb_assert (tramp_frame->insn_size <= sizeof (tramp_frame->insn[0]));
+ gdb_assert (tramp_frame->insn_size <= sizeof (tramp_frame->insn[0].bytes));
data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_data);
unwinder = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind);
@@ -169,5 +171,5 @@ tramp_frame_append (struct gdbarch *gdbarch,
unwinder->sniffer = tramp_frame_sniffer;
unwinder->this_id = tramp_frame_this_id;
unwinder->prev_register = tramp_frame_prev_register;
- frame_unwind_register_unwinder (gdbarch, unwinder);
+ frame_unwind_prepend_unwinder (gdbarch, unwinder);
}
diff --git a/gdb/tramp-frame.h b/gdb/tramp-frame.h
index 54f29bbca54..9244701e9aa 100644
--- a/gdb/tramp-frame.h
+++ b/gdb/tramp-frame.h
@@ -22,6 +22,8 @@
#ifndef TRAMP_FRAME_H
#define TRAMP_FRAME_H
+#include "frame.h" /* For "enum frame_type". */
+
struct trad_frame;
struct frame_info;
struct trad_frame_cache;
@@ -45,16 +47,24 @@ struct trad_frame_cache;
struct tramp_frame
{
- /* The trampoline's entire instruction sequence. Search for this in
- the inferior at or around the frame's PC. It is assumed that the
- PC is INSN_SIZE aligned, and that each element of TRAMP contains
- one INSN_SIZE instruction. It is also assumed that TRAMP[0]
- contains the first instruction of the trampoline and hence the
- address of the instruction matching TRAMP[0] is the trampoline's
- "func" address. The instruction sequence shall be terminated by
+ /* The trampoline's type, some a signal trampolines, some are normal
+ call-frame trampolines (aka thunks). */
+ enum frame_type frame_type;
+ /* The trampoline's entire instruction sequence. It consists of a
+ bytes/mask pair. Search for this in the inferior at or around
+ the frame's PC. It is assumed that the PC is INSN_SIZE aligned,
+ and that each element of TRAMP contains one INSN_SIZE
+ instruction. It is also assumed that INSN[0] contains the first
+ instruction of the trampoline and hence the address of the
+ instruction matching INSN[0] is the trampoline's "func" address.
+ The instruction sequence is terminated by
TRAMP_SENTINEL_INSN. */
int insn_size;
- ULONGEST insn[8];
+ struct
+ {
+ ULONGEST bytes;
+ ULONGEST mask;
+ } insn[8];
/* Initialize a trad-frame cache corresponding to the tramp-frame.
FUNC is the address of the instruction TRAMP[0] in memory. */
void (*init) (const struct tramp_frame *self,
@@ -63,7 +73,7 @@ struct tramp_frame
CORE_ADDR func);
};
-void tramp_frame_append (struct gdbarch *gdbarch,
- const struct tramp_frame *tramp);
+void tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
+ const struct tramp_frame *tramp);
#endif
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index a864be28276..64bcb996d87 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -35,7 +35,6 @@
#include "gdb-events.h"
#include "ui-out.h"
#include "top.h"
-#include "readline/readline.h"
#include <unistd.h>
#include <fcntl.h>
@@ -52,6 +51,11 @@
#include "gdb_curses.h"
+/* This redefines CTRL if it is not already defined, so it must come
+ after terminal state releated include files like <term.h> and
+ "gdb_curses.h". */
+#include "readline/readline.h"
+
int tui_target_has_run = 0;
static void (* tui_target_new_objfile_chain) (struct objfile*);
@@ -123,7 +127,7 @@ tui_query_hook (const char * msg, va_list argp)
return retval;
}
-/* Prevent recursion of registers_changed_hook(). */
+/* Prevent recursion of deprecated_registers_changed_hook(). */
static int tui_refreshing_registers = 0;
static void
@@ -279,34 +283,34 @@ tui_detach_hook (void)
void
tui_install_hooks (void)
{
- target_wait_hook = tui_target_wait_hook;
- selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook;
- print_frame_info_listing_hook = tui_print_frame_info_listing_hook;
+ deprecated_target_wait_hook = tui_target_wait_hook;
+ deprecated_selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook;
+ deprecated_print_frame_info_listing_hook = tui_print_frame_info_listing_hook;
- query_hook = tui_query_hook;
+ deprecated_query_hook = tui_query_hook;
/* Install the event hooks. */
- tui_old_event_hooks = set_gdb_event_hooks (&tui_event_hooks);
+ tui_old_event_hooks = deprecated_set_gdb_event_hooks (&tui_event_hooks);
- registers_changed_hook = tui_registers_changed_hook;
- register_changed_hook = tui_register_changed_hook;
- detach_hook = tui_detach_hook;
+ deprecated_registers_changed_hook = tui_registers_changed_hook;
+ deprecated_register_changed_hook = tui_register_changed_hook;
+ deprecated_detach_hook = tui_detach_hook;
}
/* Remove the TUI specific hooks. */
void
tui_remove_hooks (void)
{
- target_wait_hook = 0;
- selected_frame_level_changed_hook = 0;
- print_frame_info_listing_hook = 0;
- query_hook = 0;
- registers_changed_hook = 0;
- register_changed_hook = 0;
- detach_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_selected_frame_level_changed_hook = 0;
+ deprecated_print_frame_info_listing_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_detach_hook = 0;
/* Restore the previous event hooks. */
- set_gdb_event_hooks (tui_old_event_hooks);
+ deprecated_set_gdb_event_hooks (tui_old_event_hooks);
}
void _initialize_tui_hooks (void);
@@ -315,6 +319,6 @@ void
_initialize_tui_hooks (void)
{
/* Install the permanent hooks. */
- tui_target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = tui_new_objfile_hook;
+ tui_target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = tui_new_objfile_hook;
}
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index addb3b003c4..07926d9e9bf 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -29,7 +29,6 @@
#include "event-top.h"
#include "command.h"
#include "top.h"
-#include "readline/readline.h"
#include "tui/tui.h"
#include "tui/tui-data.h"
#include "tui/tui-io.h"
@@ -45,6 +44,11 @@
#include "gdb_curses.h"
+/* This redefines CTRL if it is not already defined, so it must come
+ after terminal state releated include files like <term.h> and
+ "gdb_curses.h". */
+#include "readline/readline.h"
+
int
key_is_start_sequence (int ch)
{
@@ -599,8 +603,8 @@ tui_initialize_io (void)
tui_stderr = tui_fileopen (stderr);
tui_out = tui_out_new (tui_stdout);
- /* Create the default UI. It is not created because we installed
- a init_ui_hook. */
+ /* Create the default UI. It is not created because we installed a
+ deprecated_init_ui_hook. */
tui_old_uiout = uiout = cli_out_new (gdb_stdout);
#ifdef TUI_USE_PIPE_FOR_READLINE
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 1c67baa8b01..a646a5a24f7 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -301,7 +301,7 @@ tui_command (char *args, int from_tty)
}
struct cmd_list_element **
-tui_get_cmd_list ()
+tui_get_cmd_list (void)
{
if (tuilist == 0)
add_prefix_cmd ("tui", class_tui, tui_command,
@@ -379,7 +379,7 @@ Usage: w <#lines>\n");
"ascii use ascii characters + - | for the border\n"
"acs use the Alternate Character Set\n",
&tui_setlist);
- add_show_from_set (c, &tui_showlist);
+ deprecated_add_show_from_set (c, &tui_showlist);
c = add_set_enum_cmd
("border-mode", no_class,
@@ -394,7 +394,7 @@ Usage: w <#lines>\n");
"bold use extra bright or bold\n"
"bold-standout use extra bright or bold with standout mode\n",
&tui_setlist);
- add_show_from_set (c, &tui_showlist);
+ deprecated_add_show_from_set (c, &tui_showlist);
c = add_set_enum_cmd
("active-border-mode", no_class,
@@ -409,7 +409,7 @@ Usage: w <#lines>\n");
"bold use extra bright or bold\n"
"bold-standout use extra bright or bold with standout mode\n",
&tui_setlist);
- add_show_from_set (c, &tui_showlist);
+ deprecated_add_show_from_set (c, &tui_showlist);
}
/* Update gdb's knowledge of the terminal size. */
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index d6f344f43d5..e9a9b1b99f2 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -58,7 +58,7 @@
/* This redefines CTRL if it is not already defined, so it must come
after terminal state releated include files like <term.h> and
- "gdb_ncurses.h". */
+ "gdb_curses.h". */
#include "readline/readline.h"
/* Tells whether the TUI is active or not. */
@@ -485,9 +485,9 @@ tui_reset (void)
** reset the teletype mode bits to a sensible state.
** Copied tset.c
*/
-#if ! defined (USG) && defined (TIOCGETC)
+#if defined (TIOCGETC)
struct tchars tbuf;
-#endif /* !USG && TIOCGETC */
+#endif /* TIOCGETC */
#ifdef UCB_NTTY
struct ltchars ltc;
@@ -503,7 +503,6 @@ tui_reset (void)
ioctl (FILEDES, TIOCSLTC, &ltc);
}
#endif /* UCB_NTTY */
-#ifndef USG
#ifdef TIOCGETC
ioctl (FILEDES, TIOCGETC, &tbuf);
tbuf.t_intrc = CHK (tbuf.t_intrc, CTRL ('?'));
@@ -520,27 +519,6 @@ tui_reset (void)
#endif /* CBREAK */
| VTDELAY | ALLDELAY);
mode.sg_flags |= XTABS | ECHO | CRMOD | ANYP;
-#else /*USG */
- ioctl (FILEDES, TCGETA, &mode);
- mode.c_cc[VINTR] = CHK (mode.c_cc[VINTR], CTRL ('?'));
- mode.c_cc[VQUIT] = CHK (mode.c_cc[VQUIT], CTRL ('\\'));
- mode.c_cc[VEOF] = CHK (mode.c_cc[VEOF], CTRL ('D'));
-
- mode.c_iflag &= ~(IGNBRK | PARMRK | INPCK | INLCR | IGNCR | IUCLC | IXOFF);
- mode.c_iflag |= (BRKINT | ISTRIP | ICRNL | IXON);
- mode.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |
- NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY);
- mode.c_oflag |= (OPOST | ONLCR);
- mode.c_cflag &= ~(CSIZE | PARODD | CLOCAL);
-#ifndef hp9000s800
- mode.c_cflag |= (CS8 | CREAD);
-#else /*hp9000s800 */
- mode.c_cflag |= (CS8 | CSTOPB | CREAD);
-#endif /* hp9000s800 */
- mode.c_lflag &= ~(XCASE | ECHONL | NOFLSH);
- mode.c_lflag |= (ISIG | ICANON | ECHO | ECHOK);
- ioctl (FILEDES, TCSETAW, &mode);
-#endif /* USG */
return;
}
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 854ec490ddf..783c5380ade 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -496,9 +496,9 @@ ui_out_field_core_addr (struct ui_out *uiout,
based on TARGET_ADDR_BIT. */
/* print_address_numeric (address, 1, local_stream); */
if (TARGET_ADDR_BIT <= 32)
- strcpy (addstr, local_hex_string_custom (address, "08l"));
+ strcpy (addstr, hex_string_custom (address, 8));
else
- strcpy (addstr, local_hex_string_custom (address, "016l"));
+ strcpy (addstr, hex_string_custom (address, 16));
ui_out_field_string (uiout, fldname, addstr);
}
diff --git a/gdb/utils.c b/gdb/utils.c
index a5b28c1258f..1c7b73882a5 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -51,6 +51,7 @@
#include "charset.h"
#include "annotate.h"
#include "filenames.h"
+#include "symfile.h"
#include "inferior.h" /* for signed_pointer_to_address */
@@ -83,7 +84,7 @@ extern char *canonicalize_file_name (const char *);
/* readline defines this. */
#undef savestring
-void (*error_begin_hook) (void);
+void (*deprecated_error_begin_hook) (void);
/* Holds the last error message issued by gdb */
@@ -260,6 +261,19 @@ make_cleanup_ui_file_delete (struct ui_file *arg)
return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg);
}
+static void
+do_free_section_addr_info (void *arg)
+{
+ free_section_addr_info (arg);
+}
+
+struct cleanup *
+make_cleanup_free_section_addr_info (struct section_addr_info *addrs)
+{
+ return make_my_cleanup (&cleanup_chain, do_free_section_addr_info, addrs);
+}
+
+
struct cleanup *
make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function,
void *arg)
@@ -566,8 +580,8 @@ discard_all_intermediate_continuations (void)
void
vwarning (const char *string, va_list args)
{
- if (warning_hook)
- (*warning_hook) (string, args);
+ if (deprecated_warning_hook)
+ (*deprecated_warning_hook) (string, args);
else
{
target_terminal_ours ();
@@ -659,8 +673,8 @@ error_output_message (char *pre_print, char *msg)
NORETURN void
error_stream (struct ui_file *stream)
{
- if (error_begin_hook)
- error_begin_hook ();
+ if (deprecated_error_begin_hook)
+ deprecated_error_begin_hook ();
/* Copy the stream into the GDB_LASTERR buffer. */
ui_file_rewind (gdb_lasterr);
@@ -752,8 +766,8 @@ internal_vproblem (struct internal_problem *problem,
so that the user knows that they are living on the edge. */
{
char *msg;
- xvasprintf (&msg, fmt, ap);
- xasprintf (&reason, "\
+ msg = xstrvprintf (fmt, ap);
+ reason = xstrprintf ("\
%s:%d: %s: %s\n\
A problem internal to GDB has been detected,\n\
further debugging may prove unreliable.", file, line, problem->name, msg);
@@ -838,7 +852,7 @@ internal_error (const char *file, int line, const char *string, ...)
}
static struct internal_problem internal_warning_problem = {
- "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO
+ "internal-warning", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO
};
void
@@ -974,51 +988,14 @@ void
request_quit (int signo)
{
quit_flag = 1;
- /* Restore the signal handler. Harmless with BSD-style signals, needed
- for System V-style signals. So just always do it, rather than worrying
- about USG defines and stuff like that. */
+ /* Restore the signal handler. Harmless with BSD-style signals,
+ needed for System V-style signals. */
signal (signo, request_quit);
if (immediate_quit)
quit ();
}
-/* Memory management stuff (malloc friends). */
-
-static void *
-mmalloc (void *md, size_t size)
-{
- return malloc (size); /* NOTE: GDB's only call to malloc() */
-}
-
-static void *
-mrealloc (void *md, void *ptr, size_t size)
-{
- if (ptr == 0) /* Guard against old realloc's */
- return mmalloc (md, size);
- else
- return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */
-}
-
-static void *
-mcalloc (void *md, size_t number, size_t size)
-{
- return calloc (number, size); /* NOTE: GDB's only call to calloc() */
-}
-
-static void
-mfree (void *md, void *ptr)
-{
- free (ptr); /* NOTE: GDB's only call to free() */
-}
-
-/* This used to do something interesting with USE_MMALLOC.
- * It can be retired any time. -- chastain 2004-01-19. */
-void
-init_malloc (void *md)
-{
-}
-
/* Called when a memory allocation fails, with the number of bytes of
memory requested in SIZE. */
@@ -1037,18 +1014,17 @@ nomem (long size)
}
}
-/* The xmmalloc() family of memory management routines.
+/* The xmalloc() (libiberty.h) family of memory management routines.
- These are are like the mmalloc() family except that they implement
+ These are like the ISO-C malloc() family except that they implement
consistent semantics and guard against typical memory management
- problems: if a malloc fails, an internal error is thrown; if
- free(NULL) is called, it is ignored; if *alloc(0) is called, NULL
- is returned.
+ problems. */
- All these routines are implemented using the mmalloc() family. */
+/* NOTE: These are declared using PTR to ensure consistency with
+ "libiberty.h". xfree() is GDB local. */
-void *
-xmmalloc (void *md, size_t size)
+PTR /* OK: PTR */
+xmalloc (size_t size)
{
void *val;
@@ -1057,15 +1033,15 @@ xmmalloc (void *md, size_t size)
if (size == 0)
size = 1;
- val = mmalloc (md, size);
+ val = malloc (size); /* OK: malloc */
if (val == NULL)
nomem (size);
return (val);
}
-void *
-xmrealloc (void *md, void *ptr, size_t size)
+PTR /* OK: PTR */
+xrealloc (PTR ptr, size_t size) /* OK: PTR */
{
void *val;
@@ -1075,17 +1051,17 @@ xmrealloc (void *md, void *ptr, size_t size)
size = 1;
if (ptr != NULL)
- val = mrealloc (md, ptr, size);
+ val = realloc (ptr, size); /* OK: realloc */
else
- val = mmalloc (md, size);
+ val = malloc (size); /* OK: malloc */
if (val == NULL)
nomem (size);
return (val);
}
-void *
-xmcalloc (void *md, size_t number, size_t size)
+PTR /* OK: PTR */
+xcalloc (size_t number, size_t size)
{
void *mem;
@@ -1097,7 +1073,7 @@ xmcalloc (void *md, size_t number, size_t size)
size = 1;
}
- mem = mcalloc (md, number, size);
+ mem = calloc (number, size); /* OK: xcalloc */
if (mem == NULL)
nomem (number * size);
@@ -1105,45 +1081,10 @@ xmcalloc (void *md, size_t number, size_t size)
}
void
-xmfree (void *md, void *ptr)
-{
- if (ptr != NULL)
- mfree (md, ptr);
-}
-
-/* The xmalloc() (libiberty.h) family of memory management routines.
-
- These are like the ISO-C malloc() family except that they implement
- consistent semantics and guard against typical memory management
- problems. See xmmalloc() above for further information.
-
- All these routines are wrappers to the xmmalloc() family. */
-
-/* NOTE: These are declared using PTR to ensure consistency with
- "libiberty.h". xfree() is GDB local. */
-
-PTR /* OK: PTR */
-xmalloc (size_t size)
-{
- return xmmalloc (NULL, size);
-}
-
-PTR /* OK: PTR */
-xrealloc (PTR ptr, size_t size) /* OK: PTR */
-{
- return xmrealloc (NULL, ptr, size);
-}
-
-PTR /* OK: PTR */
-xcalloc (size_t number, size_t size)
-{
- return xmcalloc (NULL, number, size);
-}
-
-void
xfree (void *ptr)
{
- xmfree (NULL, ptr);
+ if (ptr != NULL)
+ free (ptr); /* OK: free */
}
@@ -1156,7 +1097,7 @@ xstrprintf (const char *format, ...)
char *ret;
va_list args;
va_start (args, format);
- xvasprintf (&ret, format, args);
+ ret = xstrvprintf (format, args);
va_end (args);
return ret;
}
@@ -1166,27 +1107,32 @@ xasprintf (char **ret, const char *format, ...)
{
va_list args;
va_start (args, format);
- xvasprintf (ret, format, args);
+ (*ret) = xstrvprintf (format, args);
va_end (args);
}
void
xvasprintf (char **ret, const char *format, va_list ap)
{
- int status = vasprintf (ret, format, ap);
- /* NULL could be returned due to a memory allocation problem; a
- badly format string; or something else. */
- if ((*ret) == NULL)
- internal_error (__FILE__, __LINE__,
- "vasprintf returned NULL buffer (errno %d)", errno);
- /* A negative status with a non-NULL buffer shouldn't never
- happen. But to be sure. */
+ (*ret) = xstrvprintf (format, ap);
+}
+
+char *
+xstrvprintf (const char *format, va_list ap)
+{
+ char *ret = NULL;
+ int status = vasprintf (&ret, format, ap);
+ /* NULL is returned when there was a memory allocation problem. */
+ if (ret == NULL)
+ nomem (0);
+ /* A negative status (the printed length) with a non-NULL buffer
+ should never happen, but just to be sure. */
if (status < 0)
internal_error (__FILE__, __LINE__,
"vasprintf call failed (errno %d)", errno);
+ return ret;
}
-
/* My replacement for the read system call.
Used like `read' but keeps going if `read' returns too soon. */
@@ -1225,7 +1171,7 @@ savestring (const char *ptr, size_t size)
char *
msavestring (void *md, const char *ptr, size_t size)
{
- char *p = (char *) xmmalloc (md, size + 1);
+ char *p = (char *) xmalloc (size + 1);
memcpy (p, ptr, size);
p[size] = 0;
return p;
@@ -1270,10 +1216,10 @@ query (const char *ctlstr, ...)
int ans2;
int retval;
- if (query_hook)
+ if (deprecated_query_hook)
{
va_start (args, ctlstr);
- return query_hook (ctlstr, args);
+ return deprecated_query_hook (ctlstr, args);
}
/* Automatically answer "yes" if input is not from a terminal. */
@@ -1373,9 +1319,9 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
n_string = "[n]";
}
- if (query_hook)
+ if (deprecated_query_hook)
{
- return query_hook (ctlstr, args);
+ return deprecated_query_hook (ctlstr, args);
}
/* Automatically answer default value if input is not from a terminal. */
@@ -1388,13 +1334,13 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
gdb_flush (gdb_stdout);
if (annotation_level > 1)
- printf_filtered ("\n\032\032pre-%cquery\n", defchar);
+ printf_filtered ("\n\032\032pre-query\n");
vfprintf_filtered (gdb_stdout, ctlstr, args);
printf_filtered ("(%s or %s) ", y_string, n_string);
if (annotation_level > 1)
- printf_filtered ("\n\032\032%cquery\n", defchar);
+ printf_filtered ("\n\032\032query\n");
wrap_here ("");
gdb_flush (gdb_stdout);
@@ -1438,7 +1384,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
}
if (annotation_level > 1)
- printf_filtered ("\n\032\032post-%cquery\n", defchar);
+ printf_filtered ("\n\032\032post-query\n");
return retval;
}
@@ -1856,12 +1802,7 @@ prompt_for_continue (void)
while (*p == ' ' || *p == '\t')
++p;
if (p[0] == 'q')
- {
- if (!event_loop_p)
- request_quit (SIGINT);
- else
- async_request_quit (0);
- }
+ async_request_quit (0);
xfree (ignore);
}
immediate_quit--;
@@ -2260,7 +2201,7 @@ vfprintf_maybe_filtered (struct ui_file *stream, const char *format,
char *linebuffer;
struct cleanup *old_cleanups;
- xvasprintf (&linebuffer, format, args);
+ linebuffer = xstrvprintf (format, args);
old_cleanups = make_cleanup (xfree, linebuffer);
fputs_maybe_filtered (linebuffer, stream, filter);
do_cleanups (old_cleanups);
@@ -2279,7 +2220,7 @@ vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args)
char *linebuffer;
struct cleanup *old_cleanups;
- xvasprintf (&linebuffer, format, args);
+ linebuffer = xstrvprintf (format, args);
old_cleanups = make_cleanup (xfree, linebuffer);
fputs_unfiltered (linebuffer, stream);
do_cleanups (old_cleanups);
@@ -2610,23 +2551,23 @@ initialize_utils (void)
c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line,
"Set number of characters gdb thinks are in a line.",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_width_command);
c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page,
"Set number of lines gdb thinks are in a page.", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_height_command);
init_page_info ();
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("demangle", class_support, var_boolean,
(char *) &demangle,
"Set demangling of encoded C++/ObjC names when displaying symbols.",
&setprintlist), &showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("pagination", class_support,
var_boolean, (char *) &pagination_enabled,
"Set state of pagination.", &setlist), &showlist);
@@ -2639,13 +2580,13 @@ initialize_utils (void)
"Disable pagination");
}
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("sevenbit-strings", class_support, var_boolean,
(char *) &sevenbit_strings,
"Set printing of 8-bit characters in strings as \\nnn.",
&setprintlist), &showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("asm-demangle", class_support, var_boolean,
(char *) &asm_demangle,
"Set demangling of C++/ObjC names in disassembly listings.",
@@ -2660,7 +2601,7 @@ SIGWINCH_HANDLER_BODY
/* print routines to handle variable size regs, etc. */
/* temporary storage using circular buffer */
#define NUMCELLS 16
-#define CELLSIZE 32
+#define CELLSIZE 50
static char *
get_cell (void)
{
@@ -2690,7 +2631,7 @@ paddr_nz (CORE_ADDR addr)
}
static void
-decimal2str (char *paddr_str, char *sign, ULONGEST addr)
+decimal2str (char *paddr_str, char *sign, ULONGEST addr, int width)
{
/* steal code from valprint.c:print_decimal(). Should this worry
about the real size of addr as the above does? */
@@ -2701,18 +2642,60 @@ decimal2str (char *paddr_str, char *sign, ULONGEST addr)
temp[i] = addr % (1000 * 1000 * 1000);
addr /= (1000 * 1000 * 1000);
i++;
+ width -= 9;
+ }
+ while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0])));
+ width += 9;
+ if (width < 0)
+ width = 0;
+ switch (i)
+ {
+ case 1:
+ sprintf (paddr_str, "%s%0*lu", sign, width, temp[0]);
+ break;
+ case 2:
+ sprintf (paddr_str, "%s%0*lu%09lu", sign, width, temp[1], temp[0]);
+ break;
+ case 3:
+ sprintf (paddr_str, "%s%0*lu%09lu%09lu", sign, width,
+ temp[2], temp[1], temp[0]);
+ break;
+ default:
+ internal_error (__FILE__, __LINE__,
+ "failed internal consistency check");
+ }
+}
+
+static void
+octal2str (char *paddr_str, ULONGEST addr, int width)
+{
+ unsigned long temp[3];
+ int i = 0;
+ do
+ {
+ temp[i] = addr % (0100000 * 0100000);
+ addr /= (0100000 * 0100000);
+ i++;
+ width -= 10;
}
while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0])));
+ width += 10;
+ if (width < 0)
+ width = 0;
switch (i)
{
case 1:
- sprintf (paddr_str, "%s%lu", sign, temp[0]);
+ if (temp[0] == 0)
+ sprintf (paddr_str, "%*o", width, 0);
+ else
+ sprintf (paddr_str, "0%0*lo", width, temp[0]);
break;
case 2:
- sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]);
+ sprintf (paddr_str, "0%0*lo%010lo", width, temp[1], temp[0]);
break;
case 3:
- sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]);
+ sprintf (paddr_str, "0%0*lo%010lo%010lo", width,
+ temp[2], temp[1], temp[0]);
break;
default:
internal_error (__FILE__, __LINE__,
@@ -2724,7 +2707,7 @@ char *
paddr_u (CORE_ADDR addr)
{
char *paddr_str = get_cell ();
- decimal2str (paddr_str, "", addr);
+ decimal2str (paddr_str, "", addr, 0);
return paddr_str;
}
@@ -2733,9 +2716,9 @@ paddr_d (LONGEST addr)
{
char *paddr_str = get_cell ();
if (addr < 0)
- decimal2str (paddr_str, "-", -addr);
+ decimal2str (paddr_str, "-", -addr, 0);
else
- decimal2str (paddr_str, "", addr);
+ decimal2str (paddr_str, "", addr, 0);
return paddr_str;
}
@@ -2800,6 +2783,87 @@ phex_nz (ULONGEST l, int sizeof_l)
return str;
}
+/* Converts a LONGEST to a C-format hexadecimal literal and stores it
+ in a static string. Returns a pointer to this string. */
+char *
+hex_string (LONGEST num)
+{
+ char *result = get_cell ();
+ snprintf (result, CELLSIZE, "0x%s", phex_nz (num, sizeof (num)));
+ return result;
+}
+
+/* Converts a LONGEST number to a C-format hexadecimal literal and
+ stores it in a static string. Returns a pointer to this string
+ that is valid until the next call. The number is padded on the
+ left with 0s to at least WIDTH characters. */
+char *
+hex_string_custom (LONGEST num, int width)
+{
+ char *result = get_cell ();
+ char *result_end = result + CELLSIZE - 1;
+ const char *hex = phex_nz (num, sizeof (num));
+ int hex_len = strlen (hex);
+
+ if (hex_len > width)
+ width = hex_len;
+ if (width + 2 >= CELLSIZE)
+ internal_error (__FILE__, __LINE__,
+ "hex_string_custom: insufficient space to store result");
+
+ strcpy (result_end - width - 2, "0x");
+ memset (result_end - width, '0', width);
+ strcpy (result_end - hex_len, hex);
+ return result_end - width - 2;
+}
+
+/* Convert VAL to a numeral in the given radix. For
+ * radix 10, IS_SIGNED may be true, indicating a signed quantity;
+ * otherwise VAL is interpreted as unsigned. If WIDTH is supplied,
+ * it is the minimum width (0-padded if needed). USE_C_FORMAT means
+ * to use C format in all cases. If it is false, then 'x'
+ * and 'o' formats do not include a prefix (0x or leading 0). */
+
+char *
+int_string (LONGEST val, int radix, int is_signed, int width,
+ int use_c_format)
+{
+ switch (radix)
+ {
+ case 16:
+ {
+ char *result;
+ if (width == 0)
+ result = hex_string (val);
+ else
+ result = hex_string_custom (val, width);
+ if (! use_c_format)
+ result += 2;
+ return result;
+ }
+ case 10:
+ {
+ char *result = get_cell ();
+ if (is_signed && val < 0)
+ decimal2str (result, "-", -val, width);
+ else
+ decimal2str (result, "", val, width);
+ return result;
+ }
+ case 8:
+ {
+ char *result = get_cell ();
+ octal2str (result, val, width);
+ if (use_c_format || val == 0)
+ return result;
+ else
+ return result + 1;
+ }
+ default:
+ internal_error (__FILE__, __LINE__,
+ "failed internal consistency check");
+ }
+}
/* Convert a CORE_ADDR into a string. */
const char *
diff --git a/gdb/uw-thread.c b/gdb/uw-thread.c
index cc6ed6daf4c..c37e0ffeb70 100644
--- a/gdb/uw-thread.c
+++ b/gdb/uw-thread.c
@@ -206,7 +206,8 @@ static struct target_ops uw_thread_ops;
they lack current_target's default callbacks. */
static struct target_ops base_ops;
-/* Saved pointer to previous owner of target_new_objfile_hook. */
+/* Saved pointer to previous owner of
+ deprecated_target_new_objfile_hook. */
static void (*target_new_objfile_chain)(struct objfile *);
/* Whether we are debugging a user-space thread program. This isn't
@@ -796,12 +797,13 @@ uw_thread_prepare_to_store (void)
This function only gets called with uw_thread_active == 0. */
static void
-uw_thread_create_inferior (char *exec_file, char *allargs, char **env)
+uw_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
if (uw_thread_active)
deactivate_uw_thread ();
- procfs_ops.to_create_inferior (exec_file, allargs, env);
+ procfs_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (uw_thread_active)
{
find_main ();
@@ -1000,7 +1002,7 @@ libthread_init (void)
deactivate_uw_thread ();
}
-/* target_new_objfile_hook callback.
+/* deprecated_target_new_objfile_hook callback.
If OBJFILE is non-null, check whether libthread.so was just loaded,
and if so, prepare for user-mode thread debugging.
@@ -1062,6 +1064,6 @@ _initialize_uw_thread (void)
procfs_suppress_run = 1;
/* Notice when libthread.so gets loaded. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = uw_thread_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = uw_thread_new_objfile;
}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 948143cc2c0..79dbafce5dd 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -797,8 +797,7 @@ static CORE_ADDR
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = get_next_frame (fi))
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), regnum);
else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
@@ -825,7 +824,7 @@ v850_frame_chain (struct frame_info *fi)
callers_pc = DEPRECATED_FRAME_SAVED_PC (fi);
/* If caller is a call-dummy, then our FP bears no relation to his FP! */
fp = v850_find_callers_reg (fi, E_FP_RAW_REGNUM);
- if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+ if (deprecated_pc_in_call_dummy (callers_pc))
return fp; /* caller is call-dummy: return oldest value of FP */
/* Caller is NOT a call-dummy, so everything else should just work.
@@ -882,9 +881,7 @@ v850_pop_frame (void)
struct frame_info *frame = get_current_frame ();
int regnum;
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
deprecated_pop_dummy_frame ();
else
{
@@ -1010,8 +1007,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
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),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), E_PC_REGNUM);
else
@@ -1019,27 +1015,6 @@ v850_frame_saved_pc (struct frame_info *fi)
}
-/* Function: fix_call_dummy
- Pokes the callee function's address into the CALL_DUMMY assembly stub.
- Assumes that the CALL_DUMMY looks like this:
- jarl <offset24>, r31
- trap
- */
-
-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)
-{
- long offset24;
-
- offset24 = (long) fun - (long) entry_point_address ();
- offset24 &= 0x3fffff;
- offset24 |= 0xff800000; /* jarl <offset24>, r31 */
-
- store_unsigned_integer ((unsigned int *) &dummy[2], 2, offset24 & 0xffff);
- store_unsigned_integer ((unsigned int *) &dummy[0], 2, offset24 >> 16);
-}
-
static CORE_ADDR
v850_saved_pc_after_call (struct frame_info *ignore)
{
@@ -1065,7 +1040,7 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
pointed to by R6. */
return_buffer =
extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (E_V0_REGNUM),
- DEPRECATED_REGISTER_RAW_SIZE (E_V0_REGNUM));
+ register_size (current_gdbarch, E_V0_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -1107,8 +1082,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
/* The call dummy doesn't save any registers on the stack, so we
can return now. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return;
/* Find the beginning of this function, so we can analyze its
@@ -1175,7 +1149,6 @@ v850_target_read_fp (void)
static struct gdbarch *
v850_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;
int i;
@@ -1218,12 +1191,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
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_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_deprecated_register_raw_size (current_gdbarch, 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_deprecated_register_virtual_type (gdbarch, v850_reg_virtual_type);
set_gdbarch_deprecated_target_read_fp (gdbarch, v850_target_read_fp);
@@ -1254,10 +1224,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, v850_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, v850_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
- set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_nil);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, v850_fix_call_dummy);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, v850_use_struct_convention);
set_gdbarch_breakpoint_from_pc (gdbarch, v850_breakpoint_from_pc);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 9f516a32d91..21daeea6f00 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -50,8 +50,6 @@ struct MessageIO
/* Prototypes for functions located in other files */
extern void break_command (char *, int);
-extern int (*ui_loop_hook) (int);
-
/* Prototypes for local functions */
static int init_hidden_window (void);
@@ -443,7 +441,7 @@ v850ice_wait (ptid_t ptid, struct target_waitstatus *status)
{
if (count++ % 100000)
{
- ui_loop_hook (0);
+ deprecated_ui_loop_hook (0);
count = 0;
}
@@ -534,8 +532,8 @@ v850ice_fetch_registers (int regno)
error ("v850ice_fetch_registers (%d): bad value from ICE: %s.",
regno, val);
- store_unsigned_integer (val, DEPRECATED_REGISTER_RAW_SIZE (regno), regval);
- supply_register (regno, val);
+ store_unsigned_integer (val, register_size (current_gdbarch, regno), regval);
+ regcache_raw_supply (current_regcache, regno, val);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
@@ -560,7 +558,7 @@ v850ice_store_registers (int regno)
}
regval = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_RAW_SIZE (regno));
+ register_size (current_gdbarch, regno));
strcpy (cmd, "reg ");
if (!convert_register (regno, &cmd[4]))
return;
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 1a86e921f42..7858f91d0de 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1040,7 +1040,10 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
break;
case BINOP_DIV:
- v = v1 / v2;
+ if (v2 != 0)
+ v = v1 / v2;
+ else
+ error ("Division by zero");
break;
case BINOP_EXP:
@@ -1050,7 +1053,10 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
break;
case BINOP_REM:
- v = v1 % v2;
+ if (v2 != 0)
+ v = v1 % v2;
+ else
+ error ("Division by zero");
break;
case BINOP_MOD:
diff --git a/gdb/valops.c b/gdb/valops.c
index 60422779a14..575c9a335ea 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -42,10 +42,7 @@
#include "gdb_string.h"
#include "gdb_assert.h"
#include "cp-support.h"
-
-/* Flag indicating HP compilers were used; needed to correctly handle some
- value operations with HP aCC code/runtime. */
-extern int hp_som_som_object_present;
+#include "observer.h"
extern int overload_debug;
/* Local functions. */
@@ -53,8 +50,6 @@ extern int overload_debug;
static int typecmp (int staticp, int varargs, int nargs,
struct field t1[], struct value *t2[]);
-static CORE_ADDR value_push (CORE_ADDR, struct value *);
-
static struct value *search_struct_field (char *, struct value *, int,
struct type *, int);
@@ -299,8 +294,8 @@ value_cast (struct type *type, struct value *arg2)
{
LONGEST longest;
- if (hp_som_som_object_present && /* if target compiled by HP aCC */
- (code2 == TYPE_CODE_PTR))
+ if (deprecated_hp_som_som_object_present /* if target compiled by HP aCC */
+ && (code2 == TYPE_CODE_PTR))
{
unsigned int *ptr;
struct value *retvalp;
@@ -530,8 +525,6 @@ value_assign (struct value *toval, struct value *fromval)
{
struct type *type;
struct value *val;
- char raw_buffer[MAX_REGISTER_SIZE];
- int use_buffer = 0;
struct frame_id old_frame;
if (!toval->modifiable)
@@ -574,10 +567,10 @@ value_assign (struct value *toval, struct value *fromval)
char *dest_buffer;
CORE_ADDR changed_addr;
int changed_len;
+ char buffer[sizeof (LONGEST)];
if (VALUE_BITSIZE (toval))
{
- char buffer[sizeof (LONGEST)];
/* We assume that the argument to read_memory is in units of
host chars. FIXME: Is that correct? */
changed_len = (VALUE_BITPOS (toval)
@@ -596,12 +589,6 @@ value_assign (struct value *toval, struct value *fromval)
changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval);
dest_buffer = buffer;
}
- else if (use_buffer)
- {
- changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval);
- changed_len = use_buffer;
- dest_buffer = raw_buffer;
- }
else
{
changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval);
@@ -610,9 +597,8 @@ value_assign (struct value *toval, struct value *fromval)
}
write_memory (changed_addr, dest_buffer, changed_len);
- if (memory_changed_hook)
- memory_changed_hook (changed_addr, changed_len);
- target_changed_event ();
+ if (deprecated_memory_changed_hook)
+ deprecated_memory_changed_hook (changed_addr, changed_len);
}
break;
@@ -663,7 +649,7 @@ value_assign (struct value *toval, struct value *fromval)
{
int offset;
for (reg_offset = value_reg, offset = 0;
- offset + DEPRECATED_REGISTER_RAW_SIZE (reg_offset) <= VALUE_OFFSET (toval);
+ offset + register_size (current_gdbarch, reg_offset) <= VALUE_OFFSET (toval);
reg_offset++);
byte_offset = VALUE_OFFSET (toval) - offset;
}
@@ -681,7 +667,7 @@ value_assign (struct value *toval, struct value *fromval)
/* Copy it in. */
for (regno = reg_offset, amount_copied = 0;
amount_copied < amount_to_copy;
- amount_copied += DEPRECATED_REGISTER_RAW_SIZE (regno), regno++)
+ amount_copied += register_size (current_gdbarch, regno), regno++)
frame_register_read (frame, regno, buffer + amount_copied);
/* Modify what needs to be modified. */
@@ -689,8 +675,6 @@ value_assign (struct value *toval, struct value *fromval)
modify_field (buffer + byte_offset,
value_as_long (fromval),
VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
- else if (use_buffer)
- memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer);
else
memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
TYPE_LENGTH (type));
@@ -698,13 +682,13 @@ value_assign (struct value *toval, struct value *fromval)
/* Copy it out. */
for (regno = reg_offset, amount_copied = 0;
amount_copied < amount_to_copy;
- amount_copied += DEPRECATED_REGISTER_RAW_SIZE (regno), regno++)
+ amount_copied += register_size (current_gdbarch, regno), regno++)
put_frame_register (frame, regno, buffer + amount_copied);
}
- if (register_changed_hook)
- register_changed_hook (-1);
- target_changed_event ();
+ if (deprecated_register_changed_hook)
+ deprecated_register_changed_hook (-1);
+ observer_notify_target_changed (&current_target);
break;
}
@@ -1009,58 +993,6 @@ push_bytes (CORE_ADDR sp, char *buffer, int len)
return sp;
}
-#ifndef PARM_BOUNDARY
-#define PARM_BOUNDARY (0)
-#endif
-
-/* Push onto the stack the specified value VALUE. Pad it correctly for
- it to be an argument to a function. */
-
-static CORE_ADDR
-value_push (CORE_ADDR sp, struct value *arg)
-{
- int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
- int container_len = len;
- int offset;
-
- /* How big is the container we're going to put this value in? */
- if (PARM_BOUNDARY)
- container_len = ((len + PARM_BOUNDARY / TARGET_CHAR_BIT - 1)
- & ~(PARM_BOUNDARY / TARGET_CHAR_BIT - 1));
-
- /* Are we going to put it at the high or low end of the container? */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = container_len - len;
- else
- offset = 0;
-
- if (INNER_THAN (1, 2))
- {
- /* stack grows downward */
- sp -= container_len;
- write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len);
- }
- else
- {
- /* stack grows upward */
- write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len);
- sp += container_len;
- }
-
- return sp;
-}
-
-CORE_ADDR
-legacy_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
-{
- /* ASSERT ( !struct_return); */
- int i;
- for (i = nargs - 1; i >= 0; i--)
- sp = value_push (sp, args[i]);
- return sp;
-}
-
/* Create a value for an array by allocating space in the inferior, copying
the data into that space, and then setting up an array value.
@@ -2918,14 +2850,14 @@ void
_initialize_valops (void)
{
#if 0
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("abandon", class_support, var_boolean, (char *) &auto_abandon,
"Set automatic abandonment of expressions upon failure.",
&setlist),
&showlist);
#endif
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("overload-resolution", class_support, var_boolean, (char *) &overload_resolution,
"Set overload resolution in evaluating C++ functions.",
&setlist),
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 294e09f58ab..fd92750b8c6 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -209,202 +209,52 @@ val_print_type_code_int (struct type *type, char *valaddr,
/* Print a number according to FORMAT which is one of d,u,x,o,b,h,w,g.
The raison d'etre of this function is to consolidate printing of
- LONG_LONG's into this one function. Some platforms have long longs but
- don't have a printf() that supports "ll" in the format string. We handle
- these by seeing if the number is representable as either a signed or
- unsigned long, depending upon what format is desired, and if not we just
- bail out and print the number in hex.
-
- The format chars b,h,w,g are from print_scalar_formatted(). If USE_LOCAL,
- format it according to the current language (this should be used for most
- integers which GDB prints, the exception is things like protocols where
- the format of the integer is a protocol thing, not a user-visible thing).
- */
-
-#if defined (CC_HAS_LONG_LONG) && !defined (PRINTF_HAS_LONG_LONG)
-static void print_decimal (struct ui_file * stream, char *sign,
- int use_local, ULONGEST val_ulong);
-static void
-print_decimal (struct ui_file *stream, char *sign, int use_local,
- ULONGEST val_ulong)
-{
- unsigned long temp[3];
- int i = 0;
- do
- {
- temp[i] = val_ulong % (1000 * 1000 * 1000);
- val_ulong /= (1000 * 1000 * 1000);
- i++;
- }
- while (val_ulong != 0 && i < (sizeof (temp) / sizeof (temp[0])));
- switch (i)
- {
- case 1:
- fprintf_filtered (stream, "%s%lu",
- sign, temp[0]);
- break;
- case 2:
- fprintf_filtered (stream, "%s%lu%09lu",
- sign, temp[1], temp[0]);
- break;
- case 3:
- fprintf_filtered (stream, "%s%lu%09lu%09lu",
- sign, temp[2], temp[1], temp[0]);
- break;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
- return;
-}
-#endif
+ LONG_LONG's into this one function. The format chars b,h,w,g are
+ from print_scalar_formatted(). Numbers are printed using C
+ format.
+
+ USE_C_FORMAT means to use C format in all cases. Without it,
+ 'o' and 'x' format do not include the standard C radix prefix
+ (leading 0 or 0x).
+
+ Hilfinger/2004-09-09: USE_C_FORMAT was originally called USE_LOCAL
+ and was intended to request formating according to the current
+ language and would be used for most integers that GDB prints. The
+ exceptional cases were things like protocols where the format of
+ the integer is a protocol thing, not a user-visible thing). The
+ parameter remains to preserve the information of what things might
+ be printed with language-specific format, should we ever resurrect
+ that capability. */
void
-print_longest (struct ui_file *stream, int format, int use_local,
+print_longest (struct ui_file *stream, int format, int use_c_format,
LONGEST val_long)
{
-#if defined (CC_HAS_LONG_LONG) && !defined (PRINTF_HAS_LONG_LONG)
- if (sizeof (long) < sizeof (LONGEST))
- {
- switch (format)
- {
- case 'd':
- {
- /* Print a signed value, that doesn't fit in a long */
- if ((long) val_long != val_long)
- {
- if (val_long < 0)
- print_decimal (stream, "-", use_local, -val_long);
- else
- print_decimal (stream, "", use_local, val_long);
- return;
- }
- break;
- }
- case 'u':
- {
- /* Print an unsigned value, that doesn't fit in a long */
- if ((unsigned long) val_long != (ULONGEST) val_long)
- {
- print_decimal (stream, "", use_local, val_long);
- return;
- }
- break;
- }
- case 'x':
- case 'o':
- case 'b':
- case 'h':
- case 'w':
- case 'g':
- /* Print as unsigned value, must fit completely in unsigned long */
- {
- unsigned long temp = val_long;
- if (temp != val_long)
- {
- /* Urk, can't represent value in long so print in hex.
- Do shift in two operations so that if sizeof (long)
- == sizeof (LONGEST) we can avoid warnings from
- picky compilers about shifts >= the size of the
- shiftee in bits */
- unsigned long vbot = (unsigned long) val_long;
- LONGEST temp = (val_long >> (sizeof (long) * HOST_CHAR_BIT - 1));
- unsigned long vtop = temp >> 1;
- fprintf_filtered (stream, "0x%lx%08lx", vtop, vbot);
- return;
- }
- break;
- }
- }
- }
-#endif
+ const char *val;
-#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
switch (format)
{
case 'd':
- fprintf_filtered (stream,
- use_local ? local_decimal_format_custom ("ll")
- : "%lld",
- (long long) val_long);
- break;
+ val = int_string (val_long, 10, 1, 0, 1); break;
case 'u':
- fprintf_filtered (stream, "%llu", (long long) val_long);
- break;
+ val = int_string (val_long, 10, 0, 0, 1); break;
case 'x':
- fprintf_filtered (stream,
- use_local ? local_hex_format_custom ("ll")
- : "%llx",
- (unsigned long long) val_long);
- break;
- case 'o':
- fprintf_filtered (stream,
- use_local ? local_octal_format_custom ("ll")
- : "%llo",
- (unsigned long long) val_long);
- break;
+ val = int_string (val_long, 16, 0, 0, use_c_format); break;
case 'b':
- fprintf_filtered (stream, local_hex_format_custom ("02ll"), val_long);
- break;
+ val = int_string (val_long, 16, 0, 2, 1); break;
case 'h':
- fprintf_filtered (stream, local_hex_format_custom ("04ll"), val_long);
- break;
+ val = int_string (val_long, 16, 0, 4, 1); break;
case 'w':
- fprintf_filtered (stream, local_hex_format_custom ("08ll"), val_long);
- break;
+ val = int_string (val_long, 16, 0, 8, 1); break;
case 'g':
- fprintf_filtered (stream, local_hex_format_custom ("016ll"), val_long);
- break;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-#else /* !CC_HAS_LONG_LONG || !PRINTF_HAS_LONG_LONG */
- /* In the following it is important to coerce (val_long) to a long. It does
- nothing if !LONG_LONG, but it will chop off the top half (which we know
- we can ignore) if the host supports long longs. */
-
- switch (format)
- {
- case 'd':
- fprintf_filtered (stream,
- use_local ? local_decimal_format_custom ("l")
- : "%ld",
- (long) val_long);
- break;
- case 'u':
- fprintf_filtered (stream, "%lu", (unsigned long) val_long);
- break;
- case 'x':
- fprintf_filtered (stream,
- use_local ? local_hex_format_custom ("l")
- : "%lx",
- (unsigned long) val_long);
+ val = int_string (val_long, 16, 0, 16, 1); break;
break;
case 'o':
- fprintf_filtered (stream,
- use_local ? local_octal_format_custom ("l")
- : "%lo",
- (unsigned long) val_long);
- break;
- case 'b':
- fprintf_filtered (stream, local_hex_format_custom ("02l"),
- (unsigned long) val_long);
- break;
- case 'h':
- fprintf_filtered (stream, local_hex_format_custom ("04l"),
- (unsigned long) val_long);
- break;
- case 'w':
- fprintf_filtered (stream, local_hex_format_custom ("08l"),
- (unsigned long) val_long);
- break;
- case 'g':
- fprintf_filtered (stream, local_hex_format_custom ("016l"),
- (unsigned long) val_long);
- break;
+ val = int_string (val_long, 8, 0, 0, use_c_format); break;
default:
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-#endif /* CC_HAS_LONG_LONG || PRINTF_HAS_LONG_LONG */
+ }
+ fputs_filtered (val, stream);
}
/* This used to be a macro, but I don't think it is called often enough
@@ -449,9 +299,8 @@ print_floating (char *valaddr, struct type *type, struct ui_file *stream)
if (floatformat_is_negative (fmt, valaddr))
fprintf_filtered (stream, "-");
fprintf_filtered (stream, "nan(");
- fputs_filtered (local_hex_format_prefix (), stream);
+ fputs_filtered ("0x", stream);
fputs_filtered (floatformat_mantissa (fmt, valaddr), stream);
- fputs_filtered (local_hex_format_suffix (), stream);
fprintf_filtered (stream, ")");
return;
}
@@ -512,7 +361,6 @@ print_binary_chars (struct ui_file *stream, unsigned char *valaddr,
/* FIXME: We should be not printing leading zeroes in most cases. */
- fputs_filtered (local_binary_format_prefix (), stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
@@ -550,7 +398,6 @@ print_binary_chars (struct ui_file *stream, unsigned char *valaddr,
}
}
}
- fputs_filtered (local_binary_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes.
@@ -599,7 +446,7 @@ print_octal_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
cycle = (len * BITS_IN_BYTES) % BITS_IN_OCTAL;
carry = 0;
- fputs_filtered (local_octal_format_prefix (), stream);
+ fputs_filtered ("0", stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
@@ -698,7 +545,6 @@ print_octal_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
}
}
- fputs_filtered (local_octal_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes.
@@ -741,8 +587,6 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
digits[i] = 0;
}
- fputs_filtered (local_decimal_format_prefix (), stream);
-
/* Ok, we have an unknown number of bytes of data to be printed in
* decimal.
*
@@ -837,8 +681,6 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
fprintf_filtered (stream, "%1d", digits[i]);
}
xfree (digits);
-
- fputs_filtered (local_decimal_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes. Print it in hex on stream. */
@@ -850,7 +692,7 @@ print_hex_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
/* FIXME: We should be not printing leading zeroes in most cases. */
- fputs_filtered (local_hex_format_prefix (), stream);
+ fputs_filtered ("0x", stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
@@ -869,7 +711,6 @@ print_hex_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
fprintf_filtered (stream, "%02x", *p);
}
}
- fputs_filtered (local_hex_format_suffix (), stream);
}
/* VALADDR points to a char integer of LEN bytes. Print it out in appropriate language form on stream.
@@ -1359,21 +1200,21 @@ _initialize_valprint (void)
add_alias_cmd ("p", "print", no_class, 1, &showlist);
add_alias_cmd ("pr", "print", no_class, 1, &showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("elements", no_class, var_uinteger, (char *) &print_max,
"Set limit on string chars or array elements to print.\n\
\"set print elements 0\" causes there to be no limit.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("null-stop", no_class, var_boolean,
(char *) &stop_print_at_null,
"Set printing of char arrays to stop at first null char.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("repeats", no_class, var_uinteger,
(char *) &repeat_count_threshold,
"Set threshold for repeated print elements.\n\
@@ -1381,27 +1222,27 @@ _initialize_valprint (void)
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("pretty", class_support, var_boolean,
(char *) &prettyprint_structs,
"Set prettyprinting of structures.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("union", class_support, var_boolean, (char *) &unionprint,
"Set printing of unions interior to structures.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("array", class_support, var_boolean,
(char *) &prettyprint_arrays,
"Set prettyprinting of arrays.",
&setprintlist),
&showprintlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("address", class_support, var_boolean, (char *) &addressprint,
"Set printing of addresses.",
&setprintlist),
@@ -1411,21 +1252,21 @@ _initialize_valprint (void)
(char *) &input_radix,
"Set default input radix for entering numbers.",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_input_radix);
c = add_set_cmd ("output-radix", class_support, var_uinteger,
(char *) &output_radix,
"Set default output radix for printing of values.",
&setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_output_radix);
- /* The "set radix" and "show radix" commands are special in that they are
- like normal set and show commands but allow two normally independent
- variables to be either set or shown with a single command. So the
- usual add_set_cmd() and add_show_from_set() commands aren't really
- appropriate. */
+ /* The "set radix" and "show radix" commands are special in that
+ they are like normal set and show commands but allow two normally
+ independent variables to be either set or shown with a single
+ command. So the usual deprecated_add_set_cmd() and
+ add_show_from_set() commands aren't really appropriate. */
add_cmd ("radix", class_support, set_radix,
"Set default input and output number radices.\n\
Use 'set input-radix' or 'set output-radix' to independently set each.\n\
diff --git a/gdb/value.h b/gdb/value.h
index 690edb96e89..c50c2cac2e6 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -560,10 +560,6 @@ extern struct value *find_function_in_inferior (const char *);
extern struct value *value_allocate_space_in_inferior (int);
-extern CORE_ADDR legacy_push_arguments (int nargs, struct value ** args,
- CORE_ADDR sp, int struct_return,
- CORE_ADDR struct_addr);
-
extern struct value *value_of_local (const char *name, int complain);
#endif /* !defined (VALUE_H) */
diff --git a/gdb/values.c b/gdb/values.c
index 87baf2144b9..eaf3765c31a 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1170,15 +1170,18 @@ value_from_string (char *ptr)
struct value *val;
int len = strlen (ptr);
int lowbound = current_language->string_lower_bound;
- struct type *rangetype =
- create_range_type ((struct type *) NULL,
- builtin_type_int,
- lowbound, len + lowbound - 1);
- struct type *stringtype =
- create_array_type ((struct type *) NULL,
- *current_language->string_char_type,
- rangetype);
-
+ struct type *string_char_type;
+ struct type *rangetype;
+ struct type *stringtype;
+
+ rangetype = create_range_type ((struct type *) NULL,
+ builtin_type_int,
+ lowbound, len + lowbound - 1);
+ string_char_type = language_string_char_type (current_language,
+ current_gdbarch);
+ stringtype = create_array_type ((struct type *) NULL,
+ string_char_type,
+ rangetype);
val = allocate_value (stringtype);
memcpy (VALUE_CONTENTS_RAW (val), ptr, len);
return val;
@@ -1202,50 +1205,6 @@ value_from_double (struct type *type, DOUBLEST num)
return val;
}
-/* Deal with the return-value of a function that has "just returned".
-
- Extract the return-value (as a "struct value") that a function,
- using register convention, has just returned to its caller. Assume
- that the type of the function is VALTYPE, and that the "just
- returned" register state is found in RETBUF.
-
- The function has "just returned" because GDB halts a returning
- function by setting a breakpoint at the return address (in the
- caller), and not the return instruction (in the callee).
-
- Because, in the case of a return from an inferior function call,
- GDB needs to restore the inferiors registers, RETBUF is normally a
- copy of the inferior's registers. */
-
-struct value *
-register_value_being_returned (struct type *valtype, struct regcache *retbuf)
-{
- struct value *val = allocate_value (valtype);
-
- /* If the function returns void, don't bother fetching the return
- value. See also "using_struct_return". */
- if (TYPE_CODE (valtype) == TYPE_CODE_VOID)
- return val;
-
- if (!gdbarch_return_value_p (current_gdbarch))
- {
- /* NOTE: cagney/2003-10-20: Unlike "gdbarch_return_value", the
- EXTRACT_RETURN_VALUE and USE_STRUCT_CONVENTION methods do not
- handle the edge case of a function returning a small
- structure / union in registers. */
- CHECK_TYPEDEF (valtype);
- EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
- return val;
- }
-
- /* This function only handles "register convention". */
- gdb_assert (gdbarch_return_value (current_gdbarch, valtype,
- NULL, NULL, NULL)
- == RETURN_VALUE_REGISTER_CONVENTION);
- gdbarch_return_value (current_gdbarch, valtype, retbuf,
- VALUE_CONTENTS_RAW (val) /*read*/, NULL /*write*/);
- return val;
-}
/* Should we use DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS instead of
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc and TYPE
@@ -1261,15 +1220,16 @@ register_value_being_returned (struct type *valtype, struct regcache *retbuf)
2.0-2.3.3. This is somewhat unfortunate, but changing gcc2_compiled
would cause more chaos than dealing with some struct returns being
handled wrong. */
+/* NOTE: cagney/2004-06-13: Deleted check for "gcc_p". GCC 1.x is
+ dead. */
int
generic_use_struct_convention (int gcc_p, struct type *value_type)
{
- return !((gcc_p == 1)
- && (TYPE_LENGTH (value_type) == 1
- || TYPE_LENGTH (value_type) == 2
- || TYPE_LENGTH (value_type) == 4
- || TYPE_LENGTH (value_type) == 8));
+ return !(TYPE_LENGTH (value_type) == 1
+ || TYPE_LENGTH (value_type) == 2
+ || TYPE_LENGTH (value_type) == 4
+ || TYPE_LENGTH (value_type) == 8);
}
/* Return true if the function returning the specified type is using
@@ -1287,28 +1247,13 @@ using_struct_return (struct type *value_type, int gcc_p)
if (code == TYPE_CODE_VOID)
/* A void return value is never in memory. See also corresponding
- code in "register_value_being_returned". */
+ code in "print_return_value". */
return 0;
- if (!gdbarch_return_value_p (current_gdbarch))
- {
- /* FIXME: cagney/2003-10-01: The below is dead. Instead an
- architecture should implement "gdbarch_return_value". Using
- that new function it is possible to exactly specify the ABIs
- "struct return" vs "register return" conventions. */
- if (code == TYPE_CODE_STRUCT
- || code == TYPE_CODE_UNION
- || code == TYPE_CODE_ARRAY
- || RETURN_VALUE_ON_STACK (value_type))
- return USE_STRUCT_CONVENTION (gcc_p, value_type);
- else
- return 0;
- }
-
/* Probe the architecture for the return-value convention. */
return (gdbarch_return_value (current_gdbarch, value_type,
NULL, NULL, NULL)
- == RETURN_VALUE_STRUCT_CONVENTION);
+ != RETURN_VALUE_REGISTER_CONVENTION);
}
void
diff --git a/gdb/varobj.c b/gdb/varobj.c
index c662518c82f..8c1cd5729ec 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -549,7 +549,7 @@ varobj_gen_name (void)
/* generate a name for this object */
id++;
- xasprintf (&obj_name, "var%d", id);
+ obj_name = xstrprintf ("var%d", id);
return obj_name;
}
@@ -1254,7 +1254,7 @@ create_child (struct varobj *parent, int index, char *name)
child->error = 1;
child->parent = parent;
child->root = parent->root;
- xasprintf (&childs_name, "%s.%s", parent->obj_name, name);
+ childs_name = xstrprintf ("%s.%s", parent->obj_name, name);
child->obj_name = childs_name;
install_variable (child);
@@ -1837,7 +1837,7 @@ c_name_of_child (struct varobj *parent, int index)
switch (TYPE_CODE (type))
{
case TYPE_CODE_ARRAY:
- xasprintf (&name, "%d", index);
+ name = xstrprintf ("%d", index);
break;
case TYPE_CODE_STRUCT:
@@ -1856,7 +1856,7 @@ c_name_of_child (struct varobj *parent, int index)
break;
default:
- xasprintf (&name, "*%s", parent->name);
+ name = xstrprintf ("*%s", parent->name);
break;
}
break;
@@ -2070,7 +2070,7 @@ c_value_of_variable (struct varobj *var)
case TYPE_CODE_ARRAY:
{
char *number;
- xasprintf (&number, "[%d]", var->num_children);
+ number = xstrprintf ("[%d]", var->num_children);
return (number);
}
/* break; */
@@ -2558,7 +2558,7 @@ _initialize_varobj (void)
varobj_table = xmalloc (sizeof_table);
memset (varobj_table, 0, sizeof_table);
- add_show_from_set (add_set_cmd ("debugvarobj", class_maintenance, var_zinteger, (char *) &varobjdebug, "Set varobj debugging.\n\
+ deprecated_add_show_from_set (add_set_cmd ("debugvarobj", class_maintenance, var_zinteger, (char *) &varobjdebug, "Set varobj debugging.\n\
When non-zero, varobj debugging is enabled.", &setlist),
&showlist);
}
diff --git a/gdb/vax-nat.c b/gdb/vax-nat.c
new file mode 100644
index 00000000000..9dc0c51fa05
--- /dev/null
+++ b/gdb/vax-nat.c
@@ -0,0 +1,106 @@
+/* Native-dependent code for VAX UNIXen (including older BSD's).
+
+ Copyright 2004 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 "inferior.h"
+
+#include "gdb_assert.h"
+#include <sys/types.h>
+#include <sys/dir.h>
+#include <sys/user.h>
+
+#ifdef HAVE_SYS_PTRACE_H
+#include <sys/ptrace.h>
+#endif
+
+#ifndef PT_READ_U
+#define PT_READ_U 3
+#endif
+
+#ifdef SYS_REG_H
+/* UNIX 32V and derivatives (including 3BSD). */
+#include <sys/reg.h>
+#else
+/* 4.2BSD and derivatives. */
+#include <machine/reg.h>
+#endif
+
+#include "vax-tdep.h"
+
+/* Address of the user structure. This is the the value for 32V; 3BSD
+ uses a different value, but hey, who's still using those systems? */
+CORE_ADDR vax_kernel_u_addr = 0x80020000;
+
+/* Location of the user's stored registers; usage is `u.u_ar0[XX]'.
+ For 4.2BSD and ULTRIX these are negative! See <machine/reg.h>. */
+static int vax_register_index[] =
+{
+ R0, R1, R2, R3, R4, R5,
+ R6, R7, R8, R9, R10, R11,
+ AP, FP, SP, PC, PS
+};
+
+CORE_ADDR
+vax_register_u_addr (CORE_ADDR u_ar0, int regnum)
+{
+ gdb_assert (regnum >= 0 && regnum < ARRAY_SIZE (vax_register_index));
+
+ /* Type is `int *u_ar0'. See <sys/user.h>. */
+ return u_ar0 + vax_register_index[regnum - VAX_R0_REGNUM] * 4;
+}
+
+
+CORE_ADDR
+vax_register_u_offset (int regnum)
+{
+ size_t u_ar0_offset = offsetof (struct user, u_ar0);
+ CORE_ADDR u_ar0;
+ int pid;
+
+ errno = 0;
+ pid = PIDGET (inferior_ptid);
+ u_ar0 = ptrace (PT_READ_U, pid, u_ar0_offset, 0);
+ if (errno)
+ perror_with_name ("Unable to determine location of registers");
+
+ return vax_register_u_addr (u_ar0, regnum) - vax_kernel_u_addr;
+}
+
+
+#include <nlist.h>
+
+#ifndef _PATH_UNIX
+#define _PATH_UNIX "/vmunix"
+#endif
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_vax_nat (void);
+
+void
+_initialize_vax_nat (void)
+{
+ struct nlist names[2];
+
+ names[0].n_name = "_u";
+ names[1].n_name = NULL;
+ if (nlist (_PATH_UNIX, names) == 0)
+ vax_kernel_u_addr = names[0].n_value;
+}
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index a0eac7dbcda..21e71b96558 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -1,4 +1,4 @@
-/* Print VAX instructions for GDB, the GNU debugger.
+/* Target-dependent code for the VAX.
Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000,
2002, 2003, 2004 Free Software Foundation, Inc.
@@ -21,302 +21,442 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "symtab.h"
-#include "opcode/vax.h"
+#include "arch-utils.h"
+#include "dis-asm.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
#include "gdbcore.h"
-#include "inferior.h"
+#include "gdbtypes.h"
+#include "osabi.h"
#include "regcache.h"
-#include "frame.h"
+#include "regset.h"
+#include "trad-frame.h"
#include "value.h"
-#include "arch-utils.h"
+
#include "gdb_string.h"
-#include "osabi.h"
-#include "dis-asm.h"
#include "vax-tdep.h"
-static gdbarch_register_name_ftype vax_register_name;
-
-static gdbarch_skip_prologue_ftype vax_skip_prologue;
-static gdbarch_frame_num_args_ftype vax_frame_num_args;
-static gdbarch_deprecated_frame_chain_ftype vax_frame_chain;
+/* Return the name of register REGNUM. */
-static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
-
-static gdbarch_deprecated_push_dummy_frame_ftype vax_push_dummy_frame;
-
static const char *
-vax_register_name (int regno)
+vax_register_name (int regnum)
{
static char *register_names[] =
{
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "ap", "fp", "sp", "pc",
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "ap", "fp", "sp", "pc",
"ps",
};
- if (regno < 0)
- return (NULL);
- if (regno >= (sizeof(register_names) / sizeof(*register_names)))
- return (NULL);
- return (register_names[regno]);
+ if (regnum >= 0 && regnum < ARRAY_SIZE (register_names))
+ return register_names[regnum];
+
+ return NULL;
}
-static int
-vax_register_byte (int regno)
+/* Return the GDB type object for the "standard" data type of data in
+ register REGNUM. */
+
+static struct type *
+vax_register_type (struct gdbarch *gdbarch, int regnum)
{
- return (regno * 4);
+ return builtin_type_int;
}
+
+/* Core file support. */
-static int
-vax_register_raw_size (int regno)
+/* Supply register REGNUM from the buffer specified by GREGS and LEN
+ in the general-purpose register set REGSET to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+static void
+vax_supply_gregset (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
{
- return (4);
+ const char *regs = gregs;
+ int i;
+
+ for (i = 0; i < VAX_NUM_REGS; i++)
+ {
+ if (regnum == i || regnum == -1)
+ regcache_raw_supply (regcache, i, regs + i * 4);
+ }
}
-static int
-vax_register_virtual_size (int regno)
+/* VAX register set. */
+
+static struct regset vax_gregset =
{
- return (4);
-}
+ NULL,
+ vax_supply_gregset
+};
-static struct type *
-vax_register_virtual_type (int regno)
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+vax_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
{
- return (builtin_type_int);
+ if (strcmp (sect_name, ".reg") == 0 && sect_size >= VAX_NUM_REGS * 4)
+ return &vax_gregset;
+
+ return NULL;
}
-static void
-vax_frame_init_saved_regs (struct frame_info *frame)
-{
- int regnum, regmask;
- CORE_ADDR next_addr;
-
- if (deprecated_get_frame_saved_regs (frame))
- return;
+/* The VAX UNIX calling convention uses R1 to pass a structure return
+ value address instead of passing it as a first (hidden) argument as
+ the VMS calling convention suggests. */
- frame_saved_regs_zalloc (frame);
-
- regmask = read_memory_integer (get_frame_base (frame) + 4, 4) >> 16;
+static CORE_ADDR
+vax_store_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
+{
+ char buf[4];
+ int count = 0;
+ int i;
- next_addr = get_frame_base (frame) + 16;
+ /* We create an argument list on the stack, and make the argument
+ pointer to it. */
- /* regmask's low bit is for register 0, which is the first one
- what would be pushed. */
- for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
+ /* Push arguments in reverse order. */
+ for (i = nargs - 1; i >= 0; i--)
{
- if (regmask & (1 << regnum))
- deprecated_get_frame_saved_regs (frame)[regnum] = next_addr += 4;
+ int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
+
+ sp -= (len + 3) & ~3;
+ count += (len + 3) / 4;
+ write_memory (sp, VALUE_CONTENTS_ALL (args[i]), len);
}
- deprecated_get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4;
- if (regmask & (1 << DEPRECATED_FP_REGNUM))
- deprecated_get_frame_saved_regs (frame)[SP_REGNUM] +=
- 4 + (4 * read_memory_integer (next_addr + 4, 4));
+ /* Push argument count. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, count);
+ write_memory (sp, buf, 4);
- deprecated_get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16;
- deprecated_get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = get_frame_base (frame) + 12;
- deprecated_get_frame_saved_regs (frame)[VAX_AP_REGNUM] = get_frame_base (frame) + 8;
- deprecated_get_frame_saved_regs (frame)[PS_REGNUM] = get_frame_base (frame) + 4;
-}
+ /* Update the argument pointer. */
+ store_unsigned_integer (buf, 4, sp);
+ regcache_cooked_write (regcache, VAX_AP_REGNUM, buf);
-/* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */
+ return sp;
+}
static CORE_ADDR
-vax_sigtramp_saved_pc (struct frame_info *frame)
+vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
- CORE_ADDR sigcontext_addr;
- char *buf;
- int ptrbytes = TYPE_LENGTH (builtin_type_void_func_ptr);
- int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
-
- buf = alloca (ptrbytes);
- /* Get sigcontext address, it is the third parameter on the stack. */
- if (get_next_frame (frame))
- sigcontext_addr = read_memory_typed_address
- (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame))
- + FRAME_ARGS_SKIP + sigcontext_offs,
- builtin_type_void_data_ptr);
- else
- sigcontext_addr = read_memory_typed_address
- (read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr);
-
- /* Offset to saved PC in sigcontext, from <sys/signal.h>. Don't
- cause a memory_error when accessing sigcontext in case the stack
- layout has changed or the stack is corrupt. */
- target_read_memory (sigcontext_addr + 12, buf, ptrbytes);
- return extract_typed_address (buf, builtin_type_void_func_ptr);
+ CORE_ADDR fp = sp;
+ char buf[4];
+
+ /* Set up the function arguments. */
+ sp = vax_store_arguments (regcache, nargs, args, sp);
+
+ /* Store return value address. */
+ if (struct_return)
+ regcache_cooked_write_unsigned (regcache, VAX_R1_REGNUM, struct_addr);
+
+ /* Store return address in the PC slot. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, bp_addr);
+ write_memory (sp, buf, 4);
+
+ /* Store the (fake) frame pointer in the FP slot. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, fp);
+ write_memory (sp, buf, 4);
+
+ /* Skip the AP slot. */
+ sp -= 4;
+
+ /* Store register save mask and control bits. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, 0);
+ write_memory (sp, buf, 4);
+
+ /* Store condition handler. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, 0);
+ write_memory (sp, buf, 4);
+
+ /* Update the stack pointer and frame pointer. */
+ store_unsigned_integer (buf, 4, sp);
+ regcache_cooked_write (regcache, VAX_SP_REGNUM, buf);
+ regcache_cooked_write (regcache, VAX_FP_REGNUM, buf);
+
+ /* Return the saved (fake) frame pointer. */
+ return fp;
}
-static CORE_ADDR
-vax_frame_saved_pc (struct frame_info *frame)
+static struct frame_id
+vax_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return (vax_sigtramp_saved_pc (frame)); /* XXXJRT */
+ CORE_ADDR fp;
- return (read_memory_integer (get_frame_base (frame) + 16, 4));
+ fp = frame_unwind_register_unsigned (next_frame, VAX_FP_REGNUM);
+ return frame_id_build (fp, frame_pc_unwind (next_frame));
}
+
-static CORE_ADDR
-vax_frame_args_address (struct frame_info *frame)
+static enum return_value_convention
+vax_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- /* 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));
- /* 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;
+ int len = TYPE_LENGTH (type);
+ char buf[8];
+
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (type) == TYPE_CODE_UNION
+ || TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ {
+ /* The default on VAX is to return structures in static memory.
+ Consequently a function must return the address where we can
+ find the return value. */
+
+ if (readbuf)
+ {
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
+ read_memory (addr, readbuf, len);
+ }
+
+ return RETURN_VALUE_ABI_RETURNS_ADDRESS;
+ }
+
+ if (readbuf)
+ {
+ /* Read the contents of R0 and (if necessary) R1. */
+ regcache_cooked_read (regcache, VAX_R0_REGNUM, buf);
+ if (len > 4)
+ regcache_cooked_read (regcache, VAX_R1_REGNUM, buf + 4);
+ memcpy (readbuf, buf, len);
+ }
+ if (writebuf)
+ {
+ /* Read the contents to R0 and (if necessary) R1. */
+ memcpy (buf, writebuf, len);
+ regcache_cooked_write (regcache, VAX_R0_REGNUM, buf);
+ if (len > 4)
+ regcache_cooked_write (regcache, VAX_R1_REGNUM, buf + 4);
+ }
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
+
-static int
-vax_frame_num_args (struct frame_info *fi)
+/* 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 const unsigned char *
+vax_breakpoint_from_pc (CORE_ADDR *pc, int *len)
{
- return (0xff & read_memory_integer (DEPRECATED_FRAME_ARGS_ADDRESS (fi), 1));
+ static unsigned char break_insn[] = { 3 };
+
+ *len = sizeof (break_insn);
+ return break_insn;
}
+
+/* Advance PC across any function entry prologue instructions
+ to reach some "real" code. */
static CORE_ADDR
-vax_frame_chain (struct frame_info *frame)
+vax_skip_prologue (CORE_ADDR pc)
{
- /* In the case of the VAX, the frame's nominal address is the FP value,
- and 12 bytes later comes the saved previous FP value as a 4-byte word. */
- return (read_memory_integer (get_frame_base (frame) + 12, 4));
+ unsigned char op = read_memory_unsigned_integer (pc, 1);
+
+ if (op == 0x11)
+ pc += 2; /* skip brb */
+ if (op == 0x31)
+ pc += 3; /* skip brw */
+ if (op == 0xC2
+ && (read_memory_unsigned_integer (pc + 2, 1)) == 0x5E)
+ pc += 3; /* skip subl2 */
+ if (op == 0x9E
+ && (read_memory_unsigned_integer (pc + 1, 1)) == 0xAE
+ && (read_memory_unsigned_integer (pc + 3, 1)) == 0x5E)
+ pc += 4; /* skip movab */
+ if (op == 0x9E
+ && (read_memory_unsigned_integer (pc + 1, 1)) == 0xCE
+ && (read_memory_unsigned_integer (pc + 4, 1)) == 0x5E)
+ pc += 5; /* skip movab */
+ if (op == 0x9E
+ && (read_memory_unsigned_integer (pc + 1, 1)) == 0xEE
+ && (read_memory_unsigned_integer (pc + 6, 1)) == 0x5E)
+ pc += 7; /* skip movab */
+
+ return pc;
}
-static void
-vax_push_dummy_frame (void)
+
+/* Unwinding the stack is relatively easy since the VAX has a
+ dedicated frame pointer, and frames are set up automatically as the
+ result of a function call. Most of the relevant information can be
+ inferred from the documentation of the Procedure Call Instructions
+ in the VAX MACRO and Instruction Set Reference Manual. */
+
+struct vax_frame_cache
{
- CORE_ADDR sp = read_register (SP_REGNUM);
- int regnum;
+ /* Base address. */
+ CORE_ADDR base;
- sp = push_word (sp, 0); /* arglist */
- for (regnum = 11; regnum >= 0; regnum--)
- sp = push_word (sp, read_register (regnum));
- sp = push_word (sp, read_register (PC_REGNUM));
- sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM));
- sp = push_word (sp, read_register (VAX_AP_REGNUM));
- sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) + 0x2fff0000);
- sp = push_word (sp, 0);
- write_register (SP_REGNUM, sp);
- write_register (DEPRECATED_FP_REGNUM, sp);
- write_register (VAX_AP_REGNUM, sp + (17 * 4));
-}
+ /* Table of saved registers. */
+ struct trad_frame_saved_reg *saved_regs;
+};
-static void
-vax_pop_frame (void)
+struct vax_frame_cache *
+vax_frame_cache (struct frame_info *next_frame, void **this_cache)
{
- CORE_ADDR fp = read_register (DEPRECATED_FP_REGNUM);
+ struct vax_frame_cache *cache;
+ CORE_ADDR addr;
+ ULONGEST mask;
int regnum;
- int regmask = read_memory_integer (fp + 4, 4);
-
- write_register (PS_REGNUM,
- (regmask & 0xffff)
- | (read_register (PS_REGNUM) & 0xffff0000));
- write_register (PC_REGNUM, read_memory_integer (fp + 16, 4));
- write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp + 12, 4));
- write_register (VAX_AP_REGNUM, read_memory_integer (fp + 8, 4));
- fp += 16;
- for (regnum = 0; regnum < 12; regnum++)
- if (regmask & (0x10000 << regnum))
- write_register (regnum, read_memory_integer (fp += 4, 4));
- fp = fp + 4 + ((regmask >> 30) & 3);
- if (regmask & 0x20000000)
+
+ if (*this_cache)
+ return *this_cache;
+
+ /* Allocate a new cache. */
+ cache = FRAME_OBSTACK_ZALLOC (struct vax_frame_cache);
+ cache->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+ /* The frame pointer is used as the base for the frame. */
+ cache->base = frame_unwind_register_unsigned (next_frame, VAX_FP_REGNUM);
+ if (cache->base == 0)
+ return cache;
+
+ /* The register save mask and control bits determine the layout of
+ the stack frame. */
+ mask = get_frame_memory_unsigned (next_frame, cache->base + 4, 4) >> 16;
+
+ /* These are always saved. */
+ cache->saved_regs[VAX_PC_REGNUM].addr = cache->base + 16;
+ cache->saved_regs[VAX_FP_REGNUM].addr = cache->base + 12;
+ cache->saved_regs[VAX_AP_REGNUM].addr = cache->base + 8;
+ cache->saved_regs[VAX_PS_REGNUM].addr = cache->base + 4;
+
+ /* Scan the register save mask and record the location of the saved
+ registers. */
+ addr = cache->base + 20;
+ for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
{
- regnum = read_memory_integer (fp, 4);
- fp += (regnum + 1) * 4;
+ if (mask & (1 << regnum))
+ {
+ cache->saved_regs[regnum].addr = addr;
+ addr += 4;
+ }
}
- write_register (SP_REGNUM, fp);
- flush_cached_frames ();
-}
-/* The VAX call dummy sequence:
+ /* The CALLS/CALLG flag determines whether this frame has a General
+ Argument List or a Stack Argument List. */
+ if (mask & (1 << 13))
+ {
+ ULONGEST numarg;
+
+ /* This is a procedure with Stack Argument List. Adjust the
+ stack address for the arguments that were pushed onto the
+ stack. The return instruction will automatically pop the
+ arguments from the stack. */
+ numarg = get_frame_memory_unsigned (next_frame, addr, 1);
+ addr += 4 + numarg * 4;
+ }
- calls #69, @#32323232
- bpt
+ /* Bits 1:0 of the stack pointer were saved in the control bits. */
+ trad_frame_set_value (cache->saved_regs, VAX_SP_REGNUM, addr + (mask >> 14));
- It is 8 bytes long. The address and argc are patched by
- vax_fix_call_dummy(). */
-static LONGEST vax_call_dummy_words[] = { 0x329f69fb, 0x03323232 };
-static int sizeof_vax_call_dummy_words = sizeof(vax_call_dummy_words);
+ return cache;
+}
static void
-vax_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
+vax_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
{
- dummy[1] = nargs;
- store_unsigned_integer (dummy + 3, 4, fun);
+ struct vax_frame_cache *cache = vax_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
+
+ (*this_id) = frame_id_build (cache->base, frame_func_unwind (next_frame));
}
-
+
static void
-vax_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+vax_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)
{
- write_register (1, addr);
+ struct vax_frame_cache *cache = vax_frame_cache (next_frame, this_cache);
+
+ trad_frame_get_prev_register (next_frame, cache->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
-static void
-vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
+static const struct frame_unwind vax_frame_unwind =
{
- memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (0), TYPE_LENGTH (valtype));
-}
+ NORMAL_FRAME,
+ vax_frame_this_id,
+ vax_frame_prev_register
+};
-static void
-vax_store_return_value (struct type *valtype, char *valbuf)
+static const struct frame_unwind *
+vax_frame_sniffer (struct frame_info *next_frame)
{
- deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
+ return &vax_frame_unwind;
}
-static const unsigned char *
-vax_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+
+static CORE_ADDR
+vax_frame_base_address (struct frame_info *next_frame, void **this_cache)
{
- static const unsigned char vax_breakpoint[] = { 3 };
+ struct vax_frame_cache *cache = vax_frame_cache (next_frame, this_cache);
- *lenptr = sizeof(vax_breakpoint);
- return (vax_breakpoint);
+ return cache->base;
}
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
static CORE_ADDR
-vax_skip_prologue (CORE_ADDR pc)
+vax_frame_args_address (struct frame_info *next_frame, void **this_cache)
{
- int op = (unsigned char) read_memory_integer (pc, 1);
- if (op == 0x11)
- pc += 2; /* skip brb */
- if (op == 0x31)
- pc += 3; /* skip brw */
- if (op == 0xC2
- && ((unsigned char) read_memory_integer (pc + 2, 1)) == 0x5E)
- pc += 3; /* skip subl2 */
- if (op == 0x9E
- && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xAE
- && ((unsigned char) read_memory_integer (pc + 3, 1)) == 0x5E)
- pc += 4; /* skip movab */
- if (op == 0x9E
- && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xCE
- && ((unsigned char) read_memory_integer (pc + 4, 1)) == 0x5E)
- pc += 5; /* skip movab */
- if (op == 0x9E
- && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xEE
- && ((unsigned char) read_memory_integer (pc + 6, 1)) == 0x5E)
- pc += 7; /* skip movab */
- return pc;
+ return frame_unwind_register_unsigned (next_frame, VAX_AP_REGNUM);
+}
+
+static const struct frame_base vax_frame_base =
+{
+ &vax_frame_unwind,
+ vax_frame_base_address,
+ vax_frame_base_address,
+ vax_frame_args_address
+};
+
+/* Return number of arguments for FRAME. */
+
+static int
+vax_frame_num_args (struct frame_info *frame)
+{
+ CORE_ADDR args;
+
+ /* Assume that the argument pointer for the outermost frame is
+ hosed, as is the case on NetBSD/vax ELF. */
+ if (get_frame_base_address (frame) == 0)
+ return 0;
+
+ args = get_frame_register_unsigned (frame, VAX_AP_REGNUM);
+ return get_frame_memory_unsigned (frame, args, 1);
}
static CORE_ADDR
-vax_saved_pc_after_call (struct frame_info *frame)
+vax_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return (DEPRECATED_FRAME_SAVED_PC(frame));
+ return frame_unwind_register_unsigned (next_frame, VAX_PC_REGNUM);
}
+
/* 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.
@@ -336,80 +476,55 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch = gdbarch_alloc (&info, NULL);
- /* 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, deprecated_init_frame_pc_default);
-
/* Register info */
set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS);
+ set_gdbarch_register_name (gdbarch, vax_register_name);
+ set_gdbarch_register_type (gdbarch, vax_register_type);
set_gdbarch_sp_regnum (gdbarch, VAX_SP_REGNUM);
- set_gdbarch_deprecated_fp_regnum (gdbarch, VAX_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, VAX_PC_REGNUM);
set_gdbarch_ps_regnum (gdbarch, VAX_PS_REGNUM);
- 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_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_deprecated_register_virtual_size (gdbarch, vax_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
- VAX_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_deprecated_register_virtual_type (gdbarch, vax_register_virtual_type);
+ set_gdbarch_regset_from_core_section
+ (gdbarch, vax_regset_from_core_section);
/* Frame and stack info */
set_gdbarch_skip_prologue (gdbarch, vax_skip_prologue);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, vax_saved_pc_after_call);
-
set_gdbarch_frame_num_args (gdbarch, vax_frame_num_args);
-
- set_gdbarch_deprecated_frame_chain (gdbarch, vax_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
-
- set_gdbarch_deprecated_frame_args_address (gdbarch, vax_frame_args_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
-
set_gdbarch_frame_args_skip (gdbarch, 4);
+ /* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Return value info */
- set_gdbarch_deprecated_store_struct_return (gdbarch, vax_store_struct_return);
- set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value);
- set_gdbarch_deprecated_store_return_value (gdbarch, vax_store_return_value);
-
- /* Call dummy info */
- set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame);
- set_gdbarch_deprecated_pop_frame (gdbarch, vax_pop_frame);
- set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, vax_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, vax_fix_call_dummy);
- set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 7);
- set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
+ set_gdbarch_return_value (gdbarch, vax_return_value);
+
+ /* Call dummy code. */
+ set_gdbarch_push_dummy_call (gdbarch, vax_push_dummy_call);
+ set_gdbarch_unwind_dummy_id (gdbarch, vax_unwind_dummy_id);
/* Breakpoint info */
set_gdbarch_breakpoint_from_pc (gdbarch, vax_breakpoint_from_pc);
/* Misc info */
- set_gdbarch_function_start_offset (gdbarch, 2);
+ set_gdbarch_deprecated_function_start_offset (gdbarch, 2);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+ set_gdbarch_print_insn (gdbarch, print_insn_vax);
+
+ set_gdbarch_unwind_pc (gdbarch, vax_unwind_pc);
+
+ frame_base_set_default (gdbarch, &vax_frame_base);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- set_gdbarch_print_insn (gdbarch, print_insn_vax);
+ frame_unwind_append_sniffer (gdbarch, vax_frame_sniffer);
return (gdbarch);
}
-extern initialize_file_ftype _initialize_vax_tdep; /* -Wmissing-prototypes */
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_vax_tdep (void);
void
_initialize_vax_tdep (void)
diff --git a/gdb/vax-tdep.h b/gdb/vax-tdep.h
index 1a19917740a..444d758059f 100644
--- a/gdb/vax-tdep.h
+++ b/gdb/vax-tdep.h
@@ -1,5 +1,6 @@
-/* Common target dependent code for GDB on VAX systems.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+/* Target-dependent code for the VAX.
+
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,35 +22,20 @@
#ifndef VAX_TDEP_H
#define VAX_TDEP_H
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; DEPRECATED_REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-#define VAX_REGISTER_SIZE 4
+/* Register numbers of various important registers. */
+
+enum vax_regnum
+{
+ VAX_R0_REGNUM,
+ VAX_R1_REGNUM,
+ VAX_AP_REGNUM = 12, /* Argument pointer on user stack. */
+ VAX_FP_REGNUM, /* Address of executing stack frame. */
+ VAX_SP_REGNUM, /* Address of top of stack. */
+ VAX_PC_REGNUM, /* Program counter. */
+ VAX_PS_REGNUM /* Processor status. */
+};
/* Number of machine registers. */
#define VAX_NUM_REGS 17
-/* Total amount of space needed to store our copies of the machine's
- register state. */
-#define VAX_REGISTER_BYTES (VAX_NUM_REGS * 4)
-
-/* Largest value DEPRECATED_REGISTER_RAW_SIZE can have. */
-#define VAX_MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value DEPRECATED_REGISTER_VIRTUAL_SIZE can have. */
-#define VAX_MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* 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 are "phony" register numbers 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. */
-
-#define VAX_AP_REGNUM 12 /* argument pointer */
-#define VAX_FP_REGNUM 13 /* Contains address of executing stack frame */
-#define VAX_SP_REGNUM 14 /* Contains address of top of stack */
-#define VAX_PC_REGNUM 15 /* Contains program counter */
-#define VAX_PS_REGNUM 16 /* Contains processor status */
-
-#endif /* VAX_TDEP_H */
+#endif /* vax-tdep.h */
diff --git a/gdb/vaxbsd-nat.c b/gdb/vaxbsd-nat.c
new file mode 100644
index 00000000000..b00e93db3b5
--- /dev/null
+++ b/gdb/vaxbsd-nat.c
@@ -0,0 +1,138 @@
+/* Native-dependent code for modern VAX BSD's.
+
+ Copyright 2004 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 "inferior.h"
+#include "regcache.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+#include "vax-tdep.h"
+
+/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
+
+static void
+vaxbsd_supply_gregset (struct regcache *regcache, const void *gregs)
+{
+ const char *regs = gregs;
+ int regnum;
+
+ for (regnum = 0; regnum < VAX_NUM_REGS; regnum++)
+ regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+}
+
+/* Collect the general-purpose registers from REGCACHE and store them
+ in GREGS. */
+
+static void
+vaxbsd_collect_gregset (const struct regcache *regcache,
+ void *gregs, int regnum)
+{
+ char *regs = gregs;
+ int i;
+
+ for (i = 0; i <= VAX_NUM_REGS; i++)
+ {
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (regcache, i, regs + i * 4);
+ }
+}
+
+
+/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
+ for all registers. */
+
+void
+fetch_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ vaxbsd_supply_gregset (current_regcache, &regs);
+}
+
+/* Store register REGNUM back into the inferior. If REGNUM is -1, do
+ this for all registers. */
+
+void
+store_inferior_registers (int regnum)
+{
+ struct reg regs;
+
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't get registers");
+
+ vaxbsd_collect_gregset (current_regcache, &regs, regnum);
+
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) &regs, 0) == -1)
+ perror_with_name ("Couldn't write registers");
+}
+
+
+/* Support for debugging kernel virtual memory images. */
+
+#include <sys/types.h>
+#include <machine/pcb.h>
+
+#include "bsd-kvm.h"
+
+static int
+vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ int regnum;
+
+ /* The following is true for OpenBSD 3.5:
+
+ The pcb contains the register state at the context switch inside
+ cpu_switch(). */
+
+ /* The stack pointer shouldn't be zero. */
+ if (pcb->KSP == 0)
+ return 0;
+
+ for (regnum = VAX_R0_REGNUM; regnum < VAX_AP_REGNUM; regnum++)
+ regcache_raw_supply (regcache, regnum, &pcb->R[regnum - VAX_R0_REGNUM]);
+ regcache_raw_supply (regcache, VAX_AP_REGNUM, &pcb->AP);
+ regcache_raw_supply (regcache, VAX_FP_REGNUM, &pcb->FP);
+ regcache_raw_supply (regcache, VAX_SP_REGNUM, &pcb->KSP);
+ regcache_raw_supply (regcache, VAX_PC_REGNUM, &pcb->PC);
+ regcache_raw_supply (regcache, VAX_PS_REGNUM, &pcb->PSL);
+
+ return 1;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_vaxbsd_nat (void);
+
+void
+_initialize_vaxbsd_nat (void)
+{
+ /* Support debugging kernel virtual memory images. */
+ bsd_kvm_add_target (vaxbsd_supply_pcb);
+}
diff --git a/gdb/vaxnbsd-tdep.c b/gdb/vaxnbsd-tdep.c
new file mode 100644
index 00000000000..c324da8cd43
--- /dev/null
+++ b/gdb/vaxnbsd-tdep.c
@@ -0,0 +1,75 @@
+/* Target-dependent code for NetBSD/vax.
+
+ Copyright 2004 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 "arch-utils.h"
+#include "osabi.h"
+
+#include "vax-tdep.h"
+#include "solib-svr4.h"
+
+#include "gdb_string.h"
+
+/* Support for shared libraries. */
+
+/* Return non-zero if we are in a shared library trampoline code stub. */
+
+int
+vaxnbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return (name && !strcmp (name, "_DYNAMIC"));
+}
+
+
+/* NetBSD a.out. */
+
+static void
+vaxnbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* Assume SunOS-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, vaxnbsd_aout_in_solib_call_trampoline);
+}
+
+/* NetBSD ELF. */
+
+static void
+vaxnbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* NetBSD ELF uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, generic_in_solib_call_trampoline);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_vaxnbsd_tdep (void);
+
+void
+_initialize_vaxnbsd_tdep (void)
+{
+ gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD_AOUT,
+ vaxnbsd_aout_init_abi);
+ gdbarch_register_osabi (bfd_arch_vax, 0, GDB_OSABI_NETBSD_ELF,
+ vaxnbsd_elf_init_abi);
+}
diff --git a/gdb/version.in b/gdb/version.in
index a6caf8203d6..bcce9d2be7b 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2004-04-02-cvs
+2004-09-15-cvs
diff --git a/gdb/vx-share/wait.h b/gdb/vx-share/wait.h
index cb8d1b5bbaa..f4670c0d050 100644
--- a/gdb/vx-share/wait.h
+++ b/gdb/vx-share/wait.h
@@ -10,9 +10,9 @@ modification history
01a,05jun90,llk borrowed.
*/
-/* Define how to access the structure that the wait system call stores.
- On many systems, there is a structure defined for this.
- But on vanilla-ish USG systems there is not. */
+/* Define how to access the structure that the wait system call
+ stores. On many systems, there is a structure defined for
+ this. */
#ifndef HAVE_WAIT_STRUCT
#define WAITTYPE int
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 8b26916e2b7..601f28bf129 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1,7 +1,7 @@
/* Target-vector operations for controlling win32 child processes, for GDB.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
- Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions, A Red Hat Company.
@@ -56,9 +56,6 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
-/* The ui's event loop. */
-extern int (*ui_loop_hook) (int signo);
-
/* If we're not using the old Cygwin header file set, define the
following which never should have been in the generic Win32 API
headers in the first place since they were our own invention... */
@@ -361,15 +358,15 @@ do_child_fetch_inferior_registers (int r)
if (r == I387_FISEG_REGNUM)
{
l = *((long *) context_offset) & 0xffff;
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r == I387_FOP_REGNUM)
{
l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1);
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r >= 0)
- supply_register (r, context_offset);
+ regcache_raw_supply (current_regcache, r, context_offset);
else
{
for (r = 0; r < NUM_REGS; r++)
@@ -395,7 +392,8 @@ do_child_store_inferior_registers (int r)
if (!current_thread)
/* Windows sometimes uses a non-existent thread id in its events */;
else if (r >= 0)
- regcache_collect (r, ((char *) &current_thread->context) + mappings[r]);
+ regcache_raw_collect (current_regcache, r,
+ ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
@@ -1420,8 +1418,8 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
int detach = 0;
- if (ui_loop_hook != NULL)
- detach = ui_loop_hook (0);
+ if (deprecated_ui_loop_hook != NULL)
+ detach = deprecated_ui_loop_hook (0);
if (detach)
child_kill_inferior ();
@@ -1659,6 +1657,36 @@ child_detach (char *args, int from_tty)
unpush_target (&child_ops);
}
+char *
+child_pid_to_exec_file (int pid)
+{
+ /* Try to find the process path using the Cygwin internal process list
+ pid isn't a valid pid, unfortunately. Use current_event.dwProcessId
+ instead. */
+ /* TODO: Also find native Windows processes using CW_GETPINFO_FULL. */
+
+ static char path[MAX_PATH + 1];
+ char *path_ptr = NULL;
+ int cpid;
+ struct external_pinfo *pinfo;
+
+ cygwin_internal (CW_LOCK_PINFO, 1000);
+ for (cpid = 0;
+ (pinfo = (struct external_pinfo *)
+ cygwin_internal (CW_GETPINFO, cpid | CW_NEXTPID));
+ cpid = pinfo->pid)
+ {
+ if (pinfo->dwProcessId == current_event.dwProcessId) /* Got it */
+ {
+ cygwin_conv_to_full_posix_path (pinfo->progname, path);
+ path_ptr = path;
+ break;
+ }
+ }
+ cygwin_internal (CW_UNLOCK_PINFO);
+ return path_ptr;
+}
+
/* Print status information about what we're accessing. */
static void
@@ -1680,7 +1708,8 @@ child_open (char *arg, int from_tty)
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *allargs, char **env)
+child_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
char *winenv;
char *temp;
@@ -2080,6 +2109,7 @@ init_child_ops (void)
child_ops.to_has_registers = 1;
child_ops.to_has_execution = 1;
child_ops.to_magic = OPS_MAGIC;
+ child_ops.to_pid_to_exec_file = child_pid_to_exec_file;
}
void
@@ -2095,47 +2125,54 @@ _initialize_win32_nat (void)
add_com_alias ("sharedlibrary", "dll-symbols", class_alias, 1);
- add_show_from_set (add_set_cmd ("shell", class_support, var_boolean,
- (char *) &useshell,
- "Set use of shell to start subprocess.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("new-console", class_support, var_boolean,
- (char *) &new_console,
- "Set creation of new console when creating child process.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("new-group", class_support, var_boolean,
- (char *) &new_group,
- "Set creation of new group when creating child process.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("debugexec", class_support, var_boolean,
- (char *) &debug_exec,
- "Set whether to display execution in child process.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("debugevents", class_support, var_boolean,
- (char *) &debug_events,
- "Set whether to display kernel events in child process.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("debugmemory", class_support, var_boolean,
- (char *) &debug_memory,
- "Set whether to display memory accesses in child process.",
- &setlist),
- &showlist);
-
- add_show_from_set (add_set_cmd ("debugexceptions", class_support, var_boolean,
- (char *) &debug_exceptions,
- "Set whether to display kernel exceptions in child process.",
- &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("shell", class_support, var_boolean,
+ (char *) &useshell,
+ "Set use of shell to start subprocess.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("new-console", class_support, var_boolean,
+ (char *) &new_console,
+ "Set creation of new console when creating child process.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("new-group", class_support, var_boolean,
+ (char *) &new_group,
+ "Set creation of new group when creating child process.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("debugexec", class_support, var_boolean,
+ (char *) &debug_exec,
+ "Set whether to display execution in child process.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("debugevents", class_support, var_boolean,
+ (char *) &debug_events,
+ "Set whether to display kernel events in child process.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("debugmemory", class_support, var_boolean,
+ (char *) &debug_memory,
+ "Set whether to display memory accesses in child process.",
+ &setlist),
+ &showlist);
+
+ deprecated_add_show_from_set
+ (add_set_cmd ("debugexceptions", class_support, var_boolean,
+ (char *) &debug_exceptions,
+ "Set whether to display kernel exceptions in child process.",
+ &setlist),
+ &showlist);
add_info ("dll", info_dll_command, "Status of loaded DLLs.");
add_info_alias ("sharedlibrary", "dll", 1);
@@ -2238,65 +2275,65 @@ core_dll_symbols_add (char *dll_name, DWORD base_addr)
}
}
- register_loaded_dll (dll_name, base_addr + 0x1000);
- solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
+ register_loaded_dll (dll_name, base_addr + 0x1000);
+ solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
- out:
- return 1;
- }
+ out:
+ return 1;
+}
- typedef struct
- {
- struct target_ops *target;
- bfd_vma addr;
- } map_code_section_args;
+typedef struct
+{
+ struct target_ops *target;
+ bfd_vma addr;
+} map_code_section_args;
- static void
- map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
- {
- int old;
- int update_coreops;
- struct section_table *new_target_sect_ptr;
+static void
+map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
+{
+ int old;
+ int update_coreops;
+ struct section_table *new_target_sect_ptr;
- map_code_section_args *args = (map_code_section_args *) obj;
- struct target_ops *target = args->target;
- if (sect->flags & SEC_CODE)
- {
- update_coreops = core_ops.to_sections == target->to_sections;
+ map_code_section_args *args = (map_code_section_args *) obj;
+ struct target_ops *target = args->target;
+ if (sect->flags & SEC_CODE)
+ {
+ update_coreops = core_ops.to_sections == target->to_sections;
- if (target->to_sections)
- {
- old = target->to_sections_end - target->to_sections;
- target->to_sections = (struct section_table *)
- xrealloc ((char *) target->to_sections,
- (sizeof (struct section_table)) * (1 + old));
- }
- else
- {
- old = 0;
- target->to_sections = (struct section_table *)
- xmalloc ((sizeof (struct section_table)));
- }
- target->to_sections_end = target->to_sections + (1 + old);
+ if (target->to_sections)
+ {
+ old = target->to_sections_end - target->to_sections;
+ target->to_sections = (struct section_table *)
+ xrealloc ((char *) target->to_sections,
+ (sizeof (struct section_table)) * (1 + old));
+ }
+ else
+ {
+ old = 0;
+ target->to_sections = (struct section_table *)
+ xmalloc ((sizeof (struct section_table)));
+ }
+ target->to_sections_end = target->to_sections + (1 + old);
- /* Update the to_sections field in the core_ops structure
- if needed. */
- if (update_coreops)
- {
- core_ops.to_sections = target->to_sections;
- core_ops.to_sections_end = target->to_sections_end;
- }
- new_target_sect_ptr = target->to_sections + old;
- new_target_sect_ptr->addr = args->addr + bfd_section_vma (abfd, sect);
- new_target_sect_ptr->endaddr = args->addr + bfd_section_vma (abfd, sect) +
- bfd_section_size (abfd, sect);;
- new_target_sect_ptr->the_bfd_section = sect;
- new_target_sect_ptr->bfd = abfd;
- }
- }
+ /* Update the to_sections field in the core_ops structure
+ if needed. */
+ if (update_coreops)
+ {
+ core_ops.to_sections = target->to_sections;
+ core_ops.to_sections_end = target->to_sections_end;
+ }
+ new_target_sect_ptr = target->to_sections + old;
+ new_target_sect_ptr->addr = args->addr + bfd_section_vma (abfd, sect);
+ new_target_sect_ptr->endaddr = args->addr + bfd_section_vma (abfd, sect) +
+ bfd_section_size (abfd, sect);;
+ new_target_sect_ptr->the_bfd_section = sect;
+ new_target_sect_ptr->bfd = abfd;
+ }
+}
- static int
- dll_code_sections_add (const char *dll_name, int base_addr, struct target_ops *target)
+static int
+dll_code_sections_add (const char *dll_name, int base_addr, struct target_ops *target)
{
bfd *dll_bfd;
map_code_section_args map_args;
@@ -2339,20 +2376,20 @@ core_section_load_dll_symbols (bfd * abfd, asection * sect, void *obj)
if (strncmp (sect->name, ".module", 7))
return;
- buf = (char *) xmalloc (sect->_raw_size + 1);
+ buf = (char *) xmalloc (bfd_get_section_size (sect) + 1);
if (!buf)
{
printf_unfiltered ("memory allocation failed for %s\n", sect->name);
goto out;
}
- if (!bfd_get_section_contents (abfd, sect, buf, 0, sect->_raw_size))
+ if (!bfd_get_section_contents (abfd, sect, buf, 0, bfd_get_section_size (sect)))
goto out;
pstatus = (struct win32_pstatus *) buf;
memmove (&base_addr, &(pstatus->data.module_info.base_address), sizeof (base_addr));
dll_name_size = pstatus->data.module_info.module_name_size;
- if (offsetof (struct win32_pstatus, data.module_info.module_name) + dll_name_size > sect->_raw_size)
+ if (offsetof (struct win32_pstatus, data.module_info.module_name) + dll_name_size > bfd_get_section_size (sect))
goto out;
dll_name = (char *) xmalloc (dll_name_size + 1);
@@ -2412,7 +2449,7 @@ fetch_elf_core_registers (char *core_reg_sect,
return;
}
for (r = 0; r < NUM_REGS; r++)
- supply_register (r, core_reg_sect + mappings[r]);
+ regcache_raw_supply (current_regcache, r, core_reg_sect + mappings[r]);
}
static struct core_fns win32_elf_core_fns =
@@ -2427,7 +2464,7 @@ static struct core_fns win32_elf_core_fns =
void
_initialize_core_win32 (void)
{
- add_core_fns (&win32_elf_core_fns);
+ deprecated_add_core_fns (&win32_elf_core_fns);
}
void
diff --git a/gdb/wince.c b/gdb/wince.c
index f15bbd4fa0f..a9dafee1cb7 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -60,9 +60,6 @@
#include "mips-tdep.h"
#endif
-/* The ui's event loop. */
-extern int (*ui_loop_hook) (int signo);
-
/* If we're not using the old Cygwin header file set, define the
following which never should have been in the generic Win32 API
headers in the first place since they were our own invention... */
@@ -1122,7 +1119,8 @@ do_child_fetch_inferior_registers (int r)
{
if (r >= 0)
{
- supply_register (r, (char *) regptr (&current_thread->context, r));
+ regcache_raw_supply (current_regcache, r,
+ (char *) regptr (&current_thread->context, r));
}
else
{
@@ -1510,8 +1508,8 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
int detach = 0;
- if (ui_loop_hook != NULL)
- detach = ui_loop_hook (0);
+ if (deprecated_ui_loop_hook != NULL)
+ detach = deprecated_ui_loop_hook (0);
if (detach)
child_kill_inferior ();
@@ -1589,7 +1587,8 @@ upload_to_device (const char *to, const char *from)
return remotefile; /* Don't bother uploading. */
/* Open the source. */
- if ((fd = openp (getenv ("PATH"), TRUE, (char *) from, O_RDONLY, 0, NULL)) < 0)
+ if ((fd = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, (char *) from, O_RDONLY,
+ 0, NULL)) < 0)
error ("couldn't open %s", from);
/* Get the time for later comparison. */
@@ -1720,7 +1719,8 @@ wince_initialize (void)
ALLARGS is a string containing the arguments to the program.
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *args, char **env)
+child_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
PROCESS_INFORMATION pi;
struct target_waitstatus dummy;
@@ -1971,7 +1971,7 @@ _initialize_wince (void)
struct cmd_list_element *set;
init_child_ops ();
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "remotedirectory", no_class,
var_string_noescape, (char *) &remote_directory,
(char *) "Set directory for remote upload.\n",
@@ -1983,18 +1983,18 @@ _initialize_wince (void)
var_string_noescape, (char *) &remote_upload,
(char *) "Set how to upload executables to remote device.\n",
&setlist);
- add_show_from_set (set, &showlist);
+ deprecated_add_show_from_set (set, &showlist);
set_cmd_cfunc (set, set_upload_type);
set_upload_type (NULL, 0);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "debugexec", class_support, var_boolean,
(char *) &debug_exec,
(char *) "Set whether to display execution in child process.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "remoteaddhost", class_support, var_boolean,
(char *) &remote_add_host,
(char *) "\
@@ -2002,21 +2002,21 @@ Set whether to add this host to remote stub arguments for\n\
debugging over a network.", &setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "debugevents", class_support, var_boolean,
(char *) &debug_events,
(char *) "Set whether to display kernel events in child process.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "debugmemory", class_support, var_boolean,
(char *) &debug_memory,
(char *) "Set whether to display memory accesses in child process.",
&setlist),
&showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ((char *) "debugexceptions", class_support, var_boolean,
(char *) &debug_exceptions,
(char *) "Set whether to display kernel exceptions in child process.",
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 759dfcb1fb7..2f1bd23ae1c 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -31,7 +31,7 @@
#include "gdb_string.h"
#include <sys/param.h>
-#ifndef NO_SYS_FILE
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
#include "gdb_stat.h"
@@ -1838,8 +1838,7 @@ static void
xcoff_symfile_init (struct objfile *objfile)
{
/* Allocate struct to keep track of the symfile */
- objfile->sym_private = xmmalloc (objfile->md,
- sizeof (struct coff_symfile_info));
+ objfile->sym_private = xmalloc (sizeof (struct coff_symfile_info));
/* XCOFF objects may be reordered, so set OBJF_REORDERED. If we
find this causes a significant slowdown in gdb then we could
@@ -1859,7 +1858,7 @@ xcoff_symfile_finish (struct objfile *objfile)
{
if (objfile->sym_private != NULL)
{
- xmfree (objfile->md, objfile->sym_private);
+ xfree (objfile->sym_private);
}
/* Start with a fresh include table for the next objfile. */
diff --git a/gdb/xcoffsolib.c b/gdb/xcoffsolib.c
index 99d2cc8e8f7..9dcc3c4f715 100644
--- a/gdb/xcoffsolib.c
+++ b/gdb/xcoffsolib.c
@@ -48,11 +48,11 @@ xcoff_solib_address (CORE_ADDR addr)
if (vp->tstart <= addr && addr < vp->tend)
{
xfree (buffer);
- xasprintf (&buffer, "%s%s%s%s",
- vp->name,
- *vp->member ? "(" : "",
- vp->member,
- *vp->member ? ")" : "");
+ buffer = xstrprintf ("%s%s%s%s",
+ vp->name,
+ *vp->member ? "(" : "",
+ vp->member,
+ *vp->member ? ")" : "");
return buffer;
}
return NULL;
@@ -183,7 +183,7 @@ _initialize_xcoffsolib (void)
add_info ("sharedlibrary", solib_info,
"Status of loaded shared object libraries");
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("auto-solib-add", class_support, var_boolean,
(char *) &auto_solib_add,
"Set autoloading of shared library symbols.\n\
diff --git a/gdb/xmodem.c b/gdb/xmodem.c
deleted file mode 100644
index 7b8d77d1055..00000000000
--- a/gdb/xmodem.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* XMODEM support for GDB, the GNU debugger.
- Copyright 1995, 2000, 2001 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 "serial.h"
-#include "target.h"
-#include "xmodem.h"
-
-/* These definitions are for xmodem protocol. */
-
-#define SOH 0x01
-#define STX 0x02
-#define ACK 0x06
-#define NAK 0x15
-#define EOT 0x04
-#define CANCEL 0x18
-
-static int blknum; /* XMODEM block number */
-static int crcflag; /* Sez we are using CRC's instead of cksums */
-
-static int
-readchar (struct serial *desc, int timeout)
-{
- int c;
-
- c = serial_readchar (desc, timeout);
-
- if (remote_debug > 0)
- fputc_unfiltered (c, gdb_stdlog);
-
- if (c >= 0)
- return c;
-
- if (c == SERIAL_TIMEOUT)
- error ("Timeout reading from remote system.");
-
- perror_with_name ("xmodem.c:readchar()");
-}
-
-#define CRC16 0x1021 /* Generator polynomial (X^16 + X^12 + X^5 + 1) */
-
-static unsigned short *crctab;
-
-/* Call this to init the fast CRC-16 calculation table. */
-
-static void
-crcinit (void)
-{
- static int crctab_inited = 0;
- int val;
-
- if (crctab_inited == 1)
- return;
-
- crctab = xmalloc (256 * sizeof (short));
-
- for (val = 0; val <= 255; val++)
- {
- int i;
- unsigned int crc;
-
- crc = val << 8;
-
- for (i = 0; i < 8; ++i)
- {
- crc <<= 1;
-
- if (crc & 0x10000)
- crc ^= CRC16;
- }
-
- crctab[val] = crc;
- }
-
- crctab_inited = 1;
-}
-
-/* Calculate a CRC-16 for the LEN byte message pointed at by P. */
-
-static unsigned short
-docrc (unsigned char *p, int len)
-{
- unsigned short crc = 0;
-
- while (len-- > 0)
- crc = (crc << 8) ^ crctab[(crc >> 8) ^ *p++];
-
- return crc;
-}
-
-/* Start up the transmit process. Reset state variables. Wait for receiver to
- send NAK or CRC request. */
-
-int
-xmodem_init_xfer (struct serial *desc)
-{
- int c;
- int i;
-
- blknum = 1;
- crcflag = 0;
- crcinit ();
-
- for (i = 1; i <= 10; i++)
- {
- c = readchar (desc, 6);
-
- switch (c)
- {
- case 'C':
- crcflag = 1;
- case NAK:
- return 0;
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_init_xfer: Got unexpected character %c (0%o)\n", c, c);
- continue;
- case CANCEL: /* target aborted load */
- fprintf_unfiltered (gdb_stderr, "Got a CANCEL from the target.\n");
- continue;
- }
- }
- error ("xmodem_init_xfer: Too many unexpected characters.");
-}
-
-/* Take 128 bytes of data and make a packet out of it.
-
- * Each packet looks like this:
- * +-----+-------+-------+------+-----+
- * | SOH | Seq1. | Seq2. | data | SUM |
- * +-----+-------+-------+------+-----+
- * SOH = 0x01
- * Seq1 = The sequence number.
- * Seq2 = The complement of the sequence number.
- * Data = A 128 bytes of data.
- * SUM = Add the contents of the 128 bytes and use the low-order
- * 8 bits of the result.
- *
- * send_xmodem_packet fills in the XMODEM fields of PACKET and sends it to the
- * remote system. PACKET must be XMODEM_PACKETSIZE bytes long. The data must
- * start 3 bytes after the beginning of the packet to leave room for the
- * XMODEM header. LEN is the length of the data portion of the packet (and
- * must be <= 128 bytes). If it is < 128 bytes, ^Z padding will be added.
- */
-
-void
-xmodem_send_packet (struct serial *desc, unsigned char *packet, int len, int hashmark)
-{
- int i;
- int retries;
- int pktlen;
- int datasize;
-
- /* build the packet header */
-
- packet[1] = blknum;
- packet[2] = ~blknum;
-
- blknum++;
-
- if (len <= XMODEM_DATASIZE)
- {
- packet[0] = SOH;
- datasize = XMODEM_DATASIZE;
- }
- else if (len <= XMODEM_1KDATASIZE)
- {
- packet[0] = STX;
- datasize = XMODEM_1KDATASIZE;
- }
- else
- internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Packet way too large */
-
- /* Add ^Z padding if packet < 128 (or 1024) bytes */
-
- memset (packet + 3 + len, '\026', datasize - len);
-
- if (crcflag)
- {
- int crc;
-
- crc = docrc (packet + 3, datasize);
-
- packet[3 + datasize] = crc >> 8;
- packet[3 + datasize + 1] = crc;
- pktlen = datasize + 5;
- }
- else
- {
- int sum;
-
- sum = 0;
- for (i = 3; i < datasize + 3; i++)
- sum += packet[i];
-
- packet[3 + datasize] = sum; /* add the checksum */
- pktlen = datasize + 4;
- }
-
- for (retries = 3; retries >= 0; retries--)
- {
- int c;
-
- serial_write (desc, packet, pktlen);
-
- c = readchar (desc, 3);
- switch (c)
- {
- case ACK:
- return;
- case NAK:
- if (!hashmark)
- continue;
- putchar_unfiltered ('-');
- gdb_flush (gdb_stdout);
- continue;
- case CANCEL:
- error ("xmodem_send_packet: Transfer aborted by receiver.");
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_send_packet: Got unexpected character %c (0%o)\n", c, c);
- continue;
- }
- }
-
- serial_write (desc, "\004", 1); /* Send an EOT */
-
- error ("xmodem_send_packet: Excessive retries.");
-}
-
-/* Finish off the transfer. Send out the EOT, and wait for an ACK. */
-
-void
-xmodem_finish_xfer (struct serial *desc)
-{
- int retries;
-
- for (retries = 10; retries >= 0; retries--)
- {
- int c;
-
- serial_write (desc, "\004", 1); /* Send an EOT */
-
- c = readchar (desc, 3);
- switch (c)
- {
- case ACK:
- return;
- case NAK:
- continue;
- case CANCEL:
- error ("xmodem_finish_xfer: Transfer aborted by receiver.");
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_send_packet: Got unexpected character %c (0%o)\n", c, c);
- continue;
- }
- }
-
- error ("xmodem_finish_xfer: Excessive retries.");
-}
diff --git a/gdb/xmodem.h b/gdb/xmodem.h
deleted file mode 100644
index 83aa24f71ec..00000000000
--- a/gdb/xmodem.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* XMODEM support for GDB, the GNU debugger.
- Copyright 1995, 2000 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. */
-
-struct serial;
-
-int xmodem_init_xfer (struct serial *desc);
-void send_xmodem_packet (struct serial *desc, unsigned char *packet, int len,
- int hashmark);
-void xmodem_finish_xfer (struct serial *desc);
-
-#define XMODEM_DATASIZE 128 /* The data size is ALWAYS 128 */
-#define XMODEM_1KDATASIZE 1024 /* Unless it's 1024!!! */
-#define XMODEM_PACKETSIZE 133 /* data + packet headers and crc */
-#define XMODEM_1KPACKETSIZE 1024 + 5 /* data + packet headers and crc */
-#define XMODEM_DATAOFFSET 3 /* Offset to start of actual data */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 9e7b016f1c6..771a48e0248 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -167,16 +167,116 @@ xstormy16_reg_virtual_type (int regnum)
}
/* Function: xstormy16_get_saved_register
- Find a register's saved value on the call stack. */
+ Find a register's saved value on the call stack.
+
+ Find register number REGNUM relative to FRAME and put its (raw,
+ target format) contents in *RAW_BUFFER.
+
+ Set *OPTIMIZED if the variable was optimized out (and thus can't be
+ fetched). Note that this is never set to anything other than zero
+ in this implementation.
+
+ Set *LVAL to lval_memory, lval_register, or not_lval, depending on
+ whether the value was fetched from memory, from a register, or in a
+ strange and non-modifiable way (e.g. a frame pointer which was
+ calculated rather than fetched). We will use not_lval for values
+ fetched from generic dummy frames.
+
+ Set *ADDRP to the address, either in memory or as a
+ DEPRECATED_REGISTER_BYTE offset into the registers array. If the
+ value is stored in a dummy frame, set *ADDRP to zero.
+
+ The argument RAW_BUFFER must point to aligned memory.
+
+ The GET_SAVED_REGISTER architecture interface is entirely
+ redundant. New architectures should implement per-frame unwinders
+ (ref "frame-unwind.h"). */
static void
-xstormy16_get_saved_register (char *raw_buffer,
- int *optimized,
+xstormy16_get_saved_register (char *raw_buffer, int *optimized,
CORE_ADDR *addrp,
- struct frame_info *fi,
- int regnum, enum lval_type *lval)
+ struct frame_info *frame, int regnum,
+ enum lval_type *lval)
{
- deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, fi, regnum, lval);
+ if (!target_has_registers)
+ error ("No registers.");
+
+ /* Normal systems don't optimize out things with register numbers. */
+ if (optimized != NULL)
+ *optimized = 0;
+
+ if (addrp) /* default assumption: not found in memory */
+ *addrp = 0;
+
+ /* Note: since the current frame's registers could only have been
+ saved by frames INTERIOR TO the current frame, we skip examining
+ the current frame itself: otherwise, we would be getting the
+ previous frame's registers which were saved by the current frame. */
+
+ if (frame != NULL)
+ {
+ for (frame = get_next_frame (frame);
+ get_frame_type (frame) != SENTINEL_FRAME;
+ frame = get_next_frame (frame))
+ {
+ if (get_frame_type (frame) == DUMMY_FRAME)
+ {
+ if (lval) /* found it in a CALL_DUMMY frame */
+ *lval = not_lval;
+ if (raw_buffer)
+ {
+ LONGEST val;
+ /* FIXME: cagney/2002-06-26: This should be via the
+ gdbarch_register_read() method so that it, on the
+ fly, constructs either a raw or pseudo register
+ from the raw register cache. */
+ val = deprecated_read_register_dummy (get_frame_pc (frame),
+ get_frame_base (frame),
+ regnum);
+ store_unsigned_integer (raw_buffer,
+ register_size (current_gdbarch, regnum),
+ val);
+ }
+ return;
+ }
+
+ DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
+ if (deprecated_get_frame_saved_regs (frame) != NULL
+ && deprecated_get_frame_saved_regs (frame)[regnum] != 0)
+ {
+ if (lval) /* found it saved on the stack */
+ *lval = lval_memory;
+ if (regnum == SP_REGNUM)
+ {
+ if (raw_buffer) /* SP register treated specially */
+ /* NOTE: cagney/2003-05-09: In-line store_address()
+ with it's body - store_unsigned_integer(). */
+ store_unsigned_integer (raw_buffer,
+ register_size (current_gdbarch, regnum),
+ deprecated_get_frame_saved_regs (frame)[regnum]);
+ }
+ else
+ {
+ if (addrp) /* any other register */
+ *addrp = deprecated_get_frame_saved_regs (frame)[regnum];
+ if (raw_buffer)
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+ }
+ }
+
+ /* If we get thru the loop to this point, it means the register was
+ not saved in any frame. Return the actual live-register value. */
+
+ if (lval) /* found it in a live register */
+ *lval = lval_register;
+ if (addrp)
+ *addrp = DEPRECATED_REGISTER_BYTE (regnum);
+ if (raw_buffer)
+ deprecated_read_register_gen (regnum, raw_buffer);
}
/* Function: xstormy16_type_is_scalar
@@ -219,7 +319,7 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
pointed to by R2. */
return_buffer =
extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (E_PTR_RET_REGNUM),
- DEPRECATED_REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
+ register_size (current_gdbarch, E_PTR_RET_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -323,8 +423,7 @@ xstormy16_pop_frame (void)
if (fi == NULL)
return; /* paranoia */
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
{
deprecated_pop_dummy_frame ();
}
@@ -433,7 +532,7 @@ xstormy16_frame_saved_register (struct frame_info *fi, int regnum)
int size = xstormy16_register_raw_size (regnum);
char *buf = (char *) alloca (size);
- deprecated_generic_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
+ xstormy16_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
return (CORE_ADDR) extract_unsigned_integer (buf, size);
}
@@ -460,8 +559,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (fi)
{
/* In a call dummy, don't touch the frame. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
return start_addr;
/* Grab the frame-relative values of SP and FP, needed below.
@@ -749,8 +847,7 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
{
CORE_ADDR saved_pc;
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
{
saved_pc = deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi),
@@ -811,8 +908,7 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
static CORE_ADDR
xstormy16_frame_chain (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
+ if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
{
/* Call dummy's frame is the same as caller's. */
return get_frame_base (fi);
@@ -1002,7 +1098,6 @@ xstormy16_save_dummy_frame_tos (CORE_ADDR sp)
static struct gdbarch *
xstormy16_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;
@@ -1032,12 +1127,9 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
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_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_deprecated_register_virtual_size (gdbarch, xstormy16_register_raw_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_deprecated_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
/*
@@ -1074,10 +1166,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch,
- xstormy16_use_struct_convention);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_deprecated_use_struct_convention (gdbarch, xstormy16_use_struct_convention);
set_gdbarch_breakpoint_from_pc (gdbarch, xstormy16_breakpoint_from_pc);
set_gdbarch_char_signed (gdbarch, 0);
diff --git a/include/ChangeLog b/include/ChangeLog
index 883088ea6df..fa03f7cd7fa 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,2172 +1,129 @@
-2004-03-30 Zack Weinberg <zack@codesourcery.com>
-
- * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
-
-2004-03-25 Stan Shebs <shebs@apple.com>
-
- * mpw/: Remove subdirectory and everything in it.
-
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
-
- PR 51.
- * bfdlink.h (struct bfd_link_info): Add wrap_char.
-
-2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_link_info): Correct comments for the
- unresolved_syms_in_objects field.
-
-2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
-
- * dyn-string.h: Update copyright date.
-
-2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
-
- * dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
- the associated #defines.
-
-2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
-
- * demangle.h: Instead of checking ANSI_PROTOTYPES, just include
- "libiberty.h".
-
- * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
-
- * demangle.h (enum demangle_component_type): Define.
- (struct demangle_operator_info): Declare.
- (struct demangle_builtin_type_info): Declare.
- (struct demangle_component): Define.
- (cplus_demangle_fill_component): Declare.
- (cplus_demangle_fill_name): Declare.
- (cplus_demangle_fill_builtin_type): Declare.
- (cplus_demangle_fill_operator): Declare.
- (cplus_demangle_fill_extended_operator): Declare.
- (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
- (cplus_demangle_v3_components): Declare.
- (cplus_demangle_print): Declare.
-
-2003-12-19 Andreas Tobler <a.tobler@schweiz.ch>
-
- * include/fibheap.h (fibnode): Use __extension__ for
- bit-fields mark and degree if __GNUC__.
-
-2003-12-18 Kazu Hirata <kazu@cs.umass.edu>
-
- * include/fibheap.h (fibnode): Use unsigned long int for
- bit-fields if __GNUC__ is defined.
-
-2003-10-22 Joseph S. Myers <jsm@polyomino.org.uk>
-
- * obstack.h: Merge the following change from gnulib:
- 2003-10-21 Paul Eggert <eggert@twinsun.com>
- * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
- (obstack_ptr_grow_fast, obstack_int_grow_fast):
- Don't use lvalue casts, as GCC plans to remove support for them
- in GCC 3.5. Reported by Joseph S. Myers. This bug
- was also present in the non-GCC version, indicating that this
- code had always been buggy and had never been widely used.
- (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
- Use the fast variant of each macro, rather than copying the
- definiens of the fast variant; that way, we'll be more likely to
- catch future bugs in the fast variants.
-
-2003-09-22 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Add field "is_valid".
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (floatformat_to_double): Make input buffer constant.
- (floatformat_from_double, floatformat_is_valid): Ditto.
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Make "exp_bias" signed.
-
-2003-09-15 Daniel Jacobowitz <drow@mvista.com>
-
- * floatformat.h (floatformat_is_valid): Add prototype.
-
-2003-07-09 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: Undef all macros before defining them.
-
-2003-07-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * demangle.h: Support C++.
-
-2003-07-01 Zack Weinberg <zack@codesourcery.com>
-
- * filenames.h: New file imported from binutils.
-
-2003-06-30 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: New file imported from binutils.
-
-2003-06-22 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
- HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
- respectively.
-
-2003-06-21 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
- New #defines.
-
-2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.
-
-2003-05-15 Jim Blandy <jimb@redhat.com>
-
- * libiberty.h (hex_value): Make the value an unsigned int, to
- avoid unexpected sign-extension when cast to unsigned types larger
- than int --- like bfd_vma, on some platforms.
- (_hex_value): Update declaration.
-
-2003-05-07 Jason Merrill <jason@redhat.com>
-
- * hashtab.h (iterative_hash): Prototype.
- (iterative_hash_object): New macro.
-
-2003-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
- ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
- ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
- ATTRIBUTE_NULL_PRINTF_5): New.
- (ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.
-
-2003-03-17 Jan Hubicka <jh@suse.cz>
-
- * hashtab.h (htab_traverse_noresize): Declare.
-
-2003-02-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Document return value of physmem routines.
-
-2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (physmem_total, physmem_available): Prototype.
-
-2003-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (lrealpath): Add declaration.
-
-2003-01-26 Daniel Jacobowitz <drow@mvista.com>
-
- * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
- (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
- (htab_create_alloc_ex): New prototype.
- (htab_set_functions_ex): New prototype.
-
-2002-07-17 Geoffrey Keating <geoffk@redhat.com>
-
- * splay-tree.h (GTY): Define if undefined.
- (splay_tree_allocate_fn): Return PTR for compatibility, not void *.
- (struct splay_tree_node_s): Support gengtype.
- (struct splay_tree_s): Likewise. Make allocate_data a PTR,
- not a void *.
-
-2002-11-23 Simon Burge <simonb@wasabisystems.com>
-
- * libiberty.h (basename): Add NetBSD to the list.
-
-2002-11-22 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (make_relative_prefix): Add prototype.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
-
- * partition.h: Close the extern "C" scope when compiling with C++.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
- DJ Delorie <dj@redhat.com>
-
- PR bootstrap/8351
- * getopt.h: Avoid prototyping getopt with no arguments in C++.
-
-2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
-
- * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
- list of platform compilers that may look, smell and act
- like __STDC__ but that may not define it.
-
-2002-10-11 David O'Brien <obrien@FreeBSD.org>
-
- * getopt.h: getopt is in unistd.h (based on SUSv2).
-
-2002-09-19 Alexandre Oliva <aoliva@redhat.com>
-
- * libiberty.h (asprintf, vasprintf): Don't declare them if the
- corresponding HAVE_DECL_ macro is 1.
-
-2002-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
- * fibheap.h: Likewise.
- * hashtab.h: Likewise.
- * partition.h: Likewise.
- * sort.h: Likewise.
- * splay-tree.h: Likewise.
-
-2002-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
- * getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
-
-2002-06-06 DJ Delorie <dj@redhat.com>
-
- * hashtab.h (htab): Rearrange new members for backward
- compatibility.
- (htab_create): Don't use a macro that requires other headers.
-
-2002-06-05 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (htab_create): Restore prototype for backward
- compatibility.
- (htab_try_create): Likewise.
-
-2002-05-22 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (struct htab): Update for change to length specifier.
-
-2002-05-10 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (GTY): Define if undefined.
- (htab_alloc): New typedef.
- (htab_free): New typedef.
- (struct htab): Support gengtype; allow user-specified memory
- allocation.
- (htab_create_alloc): New.
- (htab_create): Replace with #define.
- (htab_try_create): Delete.
-
-2002-04-16 David S. Miller <davem@redhat.com>
-
- * xregex2.h (__restrict_arr): Define to __restrict on GCC
- 3.1 and later. Do not redefine.
-
-2002-04-01 Phil Edwards <pme@gcc.gnu.org>
-
- * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names.
-
-2002-03-06 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Delete declaration.
-
-2002-02-22 Jim Blandy <jimb@redhat.com>
-
- Allow the user to specify functions for allocating memory for
- splay tree roots and nodes.
- * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
- New types.
- (splay_tree): New fields: `allocate', `deallocate', and
- `allocate_data'.
- (splay_tree_new_with_allocator): New function declaration.
-
-2002-02-05 Jason Merrill <jason@redhat.com>
-
- * demangle.h (cplus_demangle_v3): Add "options" parm.
- (cplus_demangle_v3_type): Remove prototype.
- (DMGL_VERBOSE): New macro.
- (DMGL_TYPES): New macro.
-
-2002-02-02 H.J. Lu (hjl@gnu.org)
-
- * demangle.h (cplus_demangle_v3_type): New prototype.
-
-2002-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
-
-2001-12-06 Richard Henderson <rth@redhat.com>
-
- * demangle.h (no_demangling): New.
- (NO_DEMANGLING_STYLE_STRING): New.
-
-2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
-
- * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
-
-2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (hex_init): Revert delete.
-
- * libiberty.h (_hex_value): Const-ify.
- (hex_init): Delete.
-
-2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Const-ify.
- * libiberty.h (buildargv): Likewise.
-
-2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (reconcat): New function.
-
-2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat, concat_length, concat_copy, concat_copy2,
- ACONCAT): Improve comments.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
-
-2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat_length, concat_copy, concat_copy2,
- libiberty_concat_ptr, ACONCAT): New.
-
- * libiberty.h (ASTRDUP): New macro.
- libiberty_optr, libiberty_nptr, libiberty_len): Declare.
-
-2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Update comments reflecting previous change.
-
-2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
-
-2001-08-23 Lars Brinkhoff <lars@nocrew.org>
-
- * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
- replace "GNU CC" with "GCC".
-
-2001-08-21 Richard Henderson <rth@redhat.com>
-
- * fibheap.h: Tidy formatting.
- (fibnode_t): Limit degree to 31 bits to avoid warning.
-
-2001-08-20 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Document as deprecated.
- (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
- (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
- (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
- (floatformat_m88110_harris_ext): Declare.
-
-2001-08-20 Daniel Berlin <dan@cgsoftware.com>
-
- * fibheap.h: New file. Fibonacci heap.
-
-2001-08-18 Zack Weinberg <zackw@panix.com>
-
- * ansidecl.h: Reorganize for readability, remove documentation
- of obsolete macros, document PARAMS and VPARAMS. Add new
- macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
- function implementation.
-
-2001-08-16 Richard Henderson <rth@redhat.com>
-
- * hashtab.h (htab_hash_string): Declare.
-
-2001-08-10 Andrew Cagney <ac131313@redhat.com>
-
- * libiberty.h (lbasename): Change function declaration to return a
- const char pointer.
-
-2001-08-02 Mark Kettenis <kettenis@gnu.org>
-
- * xregex.h (_REGEX_RE_COMP): Define.
- (re_comp): Define to xre_comp.
- (re_exec): Define to xre_exec.
-
-2001-07-18 Andreas Jaeger <aj@suse.de>
-
- * xregex2.h: Place under LGPL version 2.1.
-
-2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * xregex.h: New file to support libiberty regex.
- * xregex2.h: Ditto.
-
-2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
-
- * partition.h: Fix misspelling of `implementation'.
-
-2001-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (NULL_PTR): Delete.
-
-2001-05-07 Zack Weinberg <zackw@stanford.edu>
-
- * demangle.h: Use PARAMS for all prototypes.
- * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *.
- Make arguments constant where possible.
-
-2001-05-07 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_max): New function.
- (splay_tree_min): Likewise.
-
-2001-04-15 Daniel Berlin <dan@cgsoftware.com>
-
- * ternary.h: New file - Ternary search tree header.
-
-2001-04-03 Zack Weinberg <zackw@stanford.edu>
-
- * ansidecl.h: All logic from gcc/gansidecl.h moved here.
-
-2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (alloca): Handle setting C_ALLOCA.
-
-2001-03-20 Jim Blandy <jimb@redhat.com>
-
- * demangle.h (enum gnu_v3_constructor_kinds,
- is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
- is_gnu_v3_mangled_dtor): New declarations.
-
-2001-03-14 Nick Clifton <nickc@redhat.com>
-
- * ansidecl.h: Fix copyright dates.
- * demangle.h: Fix copyright dates.
- * floatformat.h: Fix copyright dates.
- * fnmatch.h: Fix copyright dates.
- * getopt.h: Fix copyright dates.
- * libiberty.h: Add FSF copyright notice.
- * md5.h: Fix copyright dates.
- * obstack.h: Fix copyright dates.
- * splay-tree.h: Fix copyright dates.
-
-2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
- John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * libiberty.h: Add lbasename.
-
-2001-03-06 Zack Weinberg <zackw@stanford.edu>
-
- * libiberty.h: Prototype C_alloca; define alloca to either
- __builtin_alloca or C_alloca as appropriate.
-
-2001-03-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
- compatibility.
-
-2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
-
- * COPYING: Update to current
- ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
- to 19yy as example year in copyright notice).
-
-2000-12-16 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
-
- * safe-ctype.h: Make code work on all targets and not just on
- targets where a char is 8 bits.
-
-2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
-
- * safe-ctype.h: New file.
-
-2000-12-06 Rodney Brown <RodneyBrown@mynd.com>
-
- * getopt.h obstack.h: Standarize copyright statement.
-
-2000-12-04 Richard Henderson <rth@redhat.com>
-
- * demangle.h: Change "new_abi" to "v3" everywhere.
-
-2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
-
- * libiberty.h: Move #includes to top. Prototype xmalloc_failed.
-
-2000-11-15 Kenneth Block <kenneth.block@compaq.com>
-
- * demangle.h: Add gnat and java demangle styles.
-
-2000-11-04 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h (struct htab): Add member return_allocation_failure.
- (htab_try_create): New prototype. Mention which functions may
- return NULL when this is used.
-
-2000-11-03 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h: Change void * to PTR where necessary.
-
-2000-09-10 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_predecessor): Declare.
-
-2000-09-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Adjust formatting.
- (dyn_string_insert_char): New macro. New declaration.
-
-2000-08-28 Jason Merrill <jason@redhat.com>
-
- * md5.h: New file.
-
-2000-08-24 Greg McGary <greg@mcgary.org>
-
- * libiberty.h (ARRAY_SIZE): New macro.
-
-2000-06-21 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h (dyn_string_init, dyn_string_new,
- dyn_string_delete, dyn_string_release, dyn_string_resize,
- dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring_dyn_string_eq):
- Define as same name with __cxa_ prepended, if IN_LIBGCC2.
- (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring): Change return type
- to int.
-
-2000-06-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangling_styles): Remove trailing comma in enum.
-
- * dyn-string.h (dyn_string_append_char): Change parameter from
- char to int.
-
-2000-06-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions.
-
- * demangle.h (DMGL_GNU_NEW_ABI): New macro.
- (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
- (current_demangling_style): Add gnu_new_abi_demangling.
- (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
- (GNU_NEW_ABI_DEMANGLING): Likewise.
- (cplus_demangle_new_abi): New declaration.
-
-Tue May 30 16:53:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * floatformat.h (struct floatformat): Add field name.
-
-2000-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
-
- * libiberty.h (basename): Likewise.
-
-2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
-
- * ansidecl.h: #define __extension__ to nothing if
- GCC_VERSION < 2008.
-
-2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Constify.
-
-Thu May 4 17:15:26 2000 Philippe De Muyter <phdm@macqel.be>
-
- * sort.h (sys/types.h): File included unconditionnaly.
- (stddef.h): File include only #ifdef __STDC__.
-
-2000-05-03 Zack Weinberg <zack@wolery.cumb.org>
-
- * symcat.h: Remove #endif label.
-
-2000-04-28 Kenneth Block <block@zk3.dec.com>
- Jason Merrill <jason@casey.cygnus.com>
-
- * demangle.h (libiberty_demanglers): new table for different styles.
- (cplus_demangle_set_style): New function for setting style.
- (cplus_demangle_name_to_style): New function to translate name.
-
-2000-04-24 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hash_pointer): Declare.
- (eq_pointer): Likewise.
-
-2000-04-23 Mark Mitchell <mark@codesourcery.com>
-
- * sort.h: New file.
-
-Tue Apr 18 16:22:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * hashtab.h (enum insert_option): New type.
- (htab_find_slot, htab_find_slot_with_hash): Use it.
-
-2000-04-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add
- comments/caveats with regard to traditional C behavior.
-
-2000-04-05 Richard Henderson <rth@cygnus.com>
-
- * splay-tree.h (splay_tree_remove): Declare.
-
-2000-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hashval_t): New type.
- (htab_find_with_hash): Use it as an argument.
- (htab_find_slot_with_hash): Likewise.
-
-2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * hashtab.h (htab_trav): Modify type so that first arg is of type
- void **.
- (htab_find_with_hash, htab_find_slot_with_hash): Declare new
- functions.
-
-2000-03-09 Alex Samuel <samuel@codesourcery.com>
-
- * partition.h: New file.
-
-2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (struct htab): Add del_f.
- (htab_del): New type.
- (htab_create): Add fourth argument.
-
-2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (hash_table_t): Rename to htab_t.
- (struct hash_table): Rename to struct htab. Shorten element
- names. Reorder elements by size.
- (htab_hash, htab_eq, htab_trav): New typedefs for the callback
- function pointers.
- (hash_table_entry_t): Discard; just use void * for element
- type.
-
-Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson <hp@bitrange.com>
-
- * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
- to stringify argument s.
-
-1999-12-05 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (struct splay_tree_node): Rename to ...
- (struct splay_tree_node_s): ... this.
- (struct splay_tree): Rename to ...
- (struct splay_tree_s): ... this.
-
-1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_MALLOC): New macro.
-
- * libiberty.h (buildargv, dupargv, concat, choose_temp_base,
- make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
- ATTRIBUTE_MALLOC.
- (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
-
-1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
- (asprintf, vasprintf): Provide declarations.
-
-Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
- Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.
-
-1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
-
- * hashtab.h: Give hash_table_t a struct tag. Add prototypes
- for clear_hash_table_slot and traverse_hash_table. Correct
- prototype of all_hash_table_collisions.
-
-Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
-
- * hashtab.h: New file.
-
-1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of
- explicitly testing __GNUC__ and __GNUC_MINOR__.
-
- (ATTRIBUTE_PRINTF): Use `__format__', not `format'.
-
-1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (make_temp_file): Add a prototype.
-
-Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
-
- * libiberty.h (basename): OpenBSD has a correct prototype.
- (xrealloc): Remove outdated comment.
-
-1999-09-07 Jeff Garzik <jgarzik@pobox.com>
-
- * libiberty.h (xmemdup): Add prototype for new function.
-
-1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
- in calls to `_obstack_memcpy' from here ...
-
- (_obstack_memcpy): ... to here, except in the __STDC__ case which
- doesn't need it.
-
-1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (getpwd): Prototype.
-
-1999-08-01 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_insert): Return the new node.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * ansidecl.h: Copy attribute support macros from egcs.
-
-1999-04-02 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_pointers): Declare.
-
-1999-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_ints): Declare.
-
-Wed Mar 24 12:46:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * libiberty.h (basename): Cygwin{,32} should have the prototype.
-
-Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't check IN_GCC anymore.
- * splay-tree.h: Likewise.
-
-Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
- (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
- (demangling_styles): add new edg_demangling style
- (EDG_DEMANGLING_STYLE_STRING): new macro
- (EDG_DEMANGLING): new macro
- (DMGL_HP): new macro, for HP/aCC compiler.
- (DMGL_STYLE_MASK): modify to include new HP's style.
- (demangling_styles): add new hp_demangling value.
- (HP_DEMANGLING_STYLE_STRING): new macro.
- (ARM_DEMANGLING): coerce to int.
- (HP_DEMANGLING): new macro.
-
-Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libiberty.h (basename): Add prototype for FreeBSD.
-
-Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Prototype xcalloc.
-
-Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Wrap problematic macros with !IN_GCC.
-
- * demangle.h: Never define PARAMS().
- * splay-tree.h: Likewise.
-
-Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't include gansidecl.h.
- * splay-tree.h: Likewise.
-
-Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * splay-tree.h: Wrap function pointer parameter declarations in
- PARAMS() macro.
-
-1998-10-21 Mark Mitchell <mark@markmitchell.com>
-
- * splay-tree.h: New file.
-
-Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * Merge devo and egcs include directories.
-
-Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com)
-
- * getopt.h, obstack.h: Updated from gcc.
-
-1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * libiberty.h (xexit): Change decl to use modern GCC attribute
- to indicate exit does not return.
-
-Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * obstack.h: Update to latest FSF version.
-
-Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
- and made an "asymbol **". New member num_symbols.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Update.
-
-Tue Feb 17 12:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_fetch_register, sim_store_register): Add
- register length parameter. Functions return actual length of
- register.
-
-Thu Feb 12 16:29:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * getopt.h: Update to latest FSF version.
-
-Wed Feb 11 16:56:06 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * symcat.h: New file.
-
-Mon Feb 2 17:13:31 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * dis-asm.h (print_insn_tic30): Declare.
-
-Thu Jan 22 16:23:59 1998 Fred Fish <fnf@cygnus.com>
-
- * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly
- function there is a reloc on this line.
-
-Mon Dec 8 11:22:23 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Remove prototype of disasm_symaddr() as this function
- no longer exists.
-
-Tue Dec 2 10:20:53 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (disasm_symaddr): New prototype.
-
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * coff/sh.h (R_SH_SWITCH8): New.
-
-Mon Dec 1 11:29:35 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Comment out arg names in prototypes.
-
-Wed Nov 26 16:47:58 1997 Michael Meissner <meissner@cygnus.com>
-
- * callback.h (CB_SYSCALL): Consistantly use names for prototype
- arguments.
-
-Wed Nov 26 11:39:30 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Change byte count arguments to
- {read,write}_mem to `int'. New member `magic'.
- (CB_SYSCALL_MAGIC,CB_SYSCALL_INIT): New macros.
-
-Tue Nov 25 01:35:52 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (struct stat): Move forward decl up.
- (host_callback): Pass stat struct pointer to stat,fstat.
- (CB_SYS_nnn): Reorganize.
- (CB_SYSCALL): New members p1,p2.
- (cb_host_to_target_stat): Delete fourth arg.
-
-Sat Nov 22 23:34:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC
- argument.
-
-Mon Nov 17 14:00:51 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map.
- (host_callback): Add stat, fstat, syscall_map, errno_map, open_map,
- signal_map, stat_map.
- (errn_map,open_map): Renamed to cb_init_foo_map.
- (cb_host_to_target_errno,cb_target_to_host_open): Renamed from
- host_to_target_errno,target_to_host_open.
- (cb_read_target_syscall_maps): Add prototype.
- (cb_target_to_host_syscall): Likewise.
- (cb_host_to_target_stat): Likewise.
- (cb_syscall): Likewise.
- (CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat,
- argvlen,argv,chdir,stat,chmod,utime,time}): Define.
- (CB_SYSCALL): New type.
- (CB_RC): New enum.
-
-Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com>
-
- * libiberty.h: Add extern "C" { so it can be used with C++
- programs.
- * remote-sim.h: Add extern "C" { so it can be used with C++
- programs.
-
-Tue Oct 14 16:07:51 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (struct disassemble_info): New field
- 'symbol_at_address_func'.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with
- generic_symbol_at_address.
-
-Mon Oct 13 10:17:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Clarify sim_read, sim_write MEM argument.
-
-Wed Sep 24 18:03:10 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * remote-sim.h (SIM_RC): Add a bunch of new return codes for
- breakpoint stuff.
- * Add functions to tell the simulator to set/clear/enable/disable
- intrinsic breakpoints.
-
-Thu Aug 28 19:41:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libiberty.h (dupargv): Add prototype.
-
-Tue Aug 26 12:25:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_create_inferior): Add ABFD arg. Document.
-
-Mon Aug 25 10:50:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_open): Add ABFD arg. Document.
-
-Fri Aug 8 16:43:56 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (arc_get_disassembler): Declare.
-
-Wed Jul 30 11:39:50 1997 Per Bothner <bothner@deneb.cygnus.com>
-
- * demangle.h (DMGL_JAVA): New option to request Java demangling.
-
-Tue Jul 22 17:59:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (PEXECUTE_*): Define.
- (pexecute, pwait): Declare.
-
-Fri Jun 6 13:02:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_kill): Mark as deprecated.
-
-Fri May 23 13:43:41 1997 Fred Fish <fnf@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add task_link member.
-
-Thu May 22 11:32:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Review documentation. Clarify restrictions on
- when functions can be called.
-
-Wed May 21 16:47:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_set_profile_size): Add prototype, document as
- deprecated.
-
-Tue May 20 09:32:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_open): Add callback struct.
- (sim_set_callbacks): Drop SIM_DESC argument. Document.
- (sim_size): Remove recently added SIM_DESC argument. Document.
-
-Mon May 19 19:14:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Pass SD into sim_size.
-
-Thu May 15 01:24:16 1997 Mark Alexander <marka@cygnus.com>
-
- * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun,
- obstack_freefun): Eliminate compile warnings in gdb.
-
-Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * coff/arm.h (constants): Added new flag bits F_APCS_26 and
- F_APCS_SET for the f_flags field of the filehdr structure. Added new
- flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store
- information in the flags field of the internal_f structure used by BFD
- routines.
-
-Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
-
- * floatformat.h (floatformat_byteorders): Add comments for previous
- formats and add floatformat_littlebyte_bigword, primarily for ARM.
- Add declaration for floatformat_ieee_double_littlebyte_bigword.
-
-Fri Apr 18 13:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_stop): New interface - asynchronous
- notification of a request to stop / suspend the running
- simulation.
-
- * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as
- states for use internal to simulators.
-
- * callback.h (struct host_callback_strut): Put a magic number at
- the end of the struct to allow basic checking.
- (struct host_callback_struct ): Add poll_quit - so
- that the console etc can be polled at regular intervals.
-
-Thu Apr 17 02:17:12 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h (struct _bfd): Declare.
- (sim_load): Return SIM_RC. New arg `abfd'.
- (sim_create_inferior): Return SIM_RC. Delete arg `start_address'.
-
-Wed Apr 2 17:09:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.h (sim_trace, sim_size): Make these global. They
- will go away shortly.
-
-Wed Apr 2 15:23:49 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h (SIM_OPEN_KIND, SIM_RC): New enums.
- (sim_open): New argument `kind'.
-
-Wed Apr 2 14:45:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * COPYING: Update FSF address.
-
-Fri Mar 28 15:29:54 1997 Mike Meissner <meissner@cygnus.com>
-
- * callback.h (top level): Include stdarg.h or varargs.h if
- va_start is not defined.
- (host_callback_struct): Make {,e}vprintf_filtered take a va_list
- instead of void *, since va_list might be an array or structure
- type.
-
-Fri Mar 28 15:44:41 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * libiberty.h (basename): Add prototype for glibc and linux.
-
-Mon Mar 17 19:22:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objalloc.h: New file.
-
-Mon Mar 17 14:57:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.h: New file, copied in from gdb/remote-sim.h. One
- day this will be placed in a directory of its own.
-
-Sat Mar 15 19:00:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * obstack.h: Update to current FSF version.
+2004-09-13 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
-Thu Mar 6 15:46:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
+ * libiberty.h (basename): Prototype for __MINGW32__.
- * callback.h (struct host_callback_struct): Add callbacks -
- flush_stdout, write_stderr, flush_stderr, vprintf_filtered,
- evprintf_filtered. Delete redundant callbacks - printf_filtered.
+2004-09-13 Paul Brook <paul@codesourcery.com>
-Thu Feb 27 23:18:27 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf/arm.h: Rename RELABS to TARGET1.
- * bfdlink.h (struct bfd_link_info): Remove lprefix and lprefix_len
- fields.
+2004-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Tue Feb 25 00:10:49 1997 Ian Lance Taylor <ian@cygnus.com>
+ * ansidecl.h (ATTRIBUTE_SENTINEL): Define.
+ * libiberty.h (concat, reconcat, concat_length, concat_copy,
+ concat_copy2): Use ATTRIBUTE_SENTINEL.
- * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize
- bytes_per_chunk and display_endian.
+2004-08-13 Alan Modra <amodra@bigpond.net.au>
-Mon Feb 24 17:47:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
+ (LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
- From Eric Youngdale <eric@andante.jic.com>:
- * bfdlink.h (struct bfd_elf_version_expr): Define.
- (struct bfd_elf_version_deps): Define.
- (struct bfd_elf_version_tree): Define.
+2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
-Thu Feb 6 14:20:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
+ const-qualification before disposal.
- * dis-asm.h: (disassemble_info): Add new fields
- bytes_per_chunk and display_endian to control the
- display of raw instructions.
+2004-07-24 Bernardo Innocenti <bernie@develer.com>
-Sun Dec 8 17:11:12 1996 Doug Evans <dje@canuck.cygnus.com>
+ * ansidecl.h (ARG_UNUSED): New Macro.
- * callback.h (host_callback): New member `error'.
+2004-07-23 H.J. Lu <hongjiu.lu@intel.com>
-Wed Nov 20 00:40:23 1996 Doug Evans <dje@canuck.cygnus.com>
+ * bin-bugs.h (REPORT_BUGS_TO): Set to
+ "<URL:http://www.sourceware.org/bugzilla/>".
- * callback.h: New file, moved here from gdb.
+2004-07-21 Paolo Bonzini <bonzini@gnu.org>
-Mon Nov 18 16:34:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * ansidecl.h (ATTRIBUTE_PURE): New.
- * libiberty.h: Checkin again; last checkin failed due to sticky tag.
+2004-07-13 Bernardo Innocenti <bernie@develer.com>
-Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
+ libcpp/internal.h.
+ (XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
+ macros.
- * libiberty.h: Revert last commit due to conflicts with hpux
- system headers.
+2004-07-13 Bernardo Innocenti <bernie@develer.com>
-Tue Nov 12 16:31:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * libiberty.h (ASTRDUP): Add casts required for stricter
+ type conversion rules of C++.
+ * obstack.h (obstack_free): Likewise.
- * libiberty.h: Move prototypes from argv.c here.
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
-Thu Oct 31 14:56:18 1996 Doug Evans <dje@canuck.cygnus.com>
+ * dis-asm.h (print_insn_crx): Declare.
- * ansidecl.h (VPARAMS,VA_START): Define.
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
-Fri Oct 25 12:08:04 1996 Ian Lance Taylor <ian@cygnus.com>
+ * bfdlink.h (struct bfd_link_order): Update comment.
- * dis-asm.h (disassemble_info): Add bytes_per_line field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize bytes_per_line field.
+2004-05-11 Jakub Jelinek <jakub@redhat.com>
-Thu Oct 24 17:10:01 1996 Ian Lance Taylor <ian@cygnus.com>
+ * bfdlink.h (struct bfd_link_info): Add relro, relro_start and
+ relro_end fields.
+ * elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
+ (PT_GNU_RELRO): Define.
- * dis-asm.h (disassemble_info): Add symbol field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize symbol field.
+2004-05-04 Andreas Jaeger <aj@suse.de>
-Thu Oct 17 11:17:40 1996 Doug Evans <dje@canuck.cygnus.com>
+ * demangle.h: Do not use C++ reserved keyword typename as
+ parameter for cplus_demangle_fill_builtin_type.
- * dis-asm.h (print_insn_m32r): Declare.
+2004-04-22 Richard Henderson <rth@redhat.com>
-Mon Oct 14 23:56:52 1996 Ian Lance Taylor <ian@cygnus.com>
+ * hashtab.h (struct htab): Add size_prime_index.
- * libiberty.h: Declare parameter types for xmalloc and xrealloc.
+2004-04-13 Jeff Law <law@redhat.com>
-Thu Oct 3 13:45:27 1996 Ian Lance Taylor <ian@cygnus.com>
+ * hashtab.h (htab_remove_elt_with_hash): Prototype new function.
- * fnmatch.h: New file.
-
-Thu Oct 3 10:33:14 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_mn10x00): Delete declaration.
- (print_insn_mn10200, print_insn_mn10300): Declare.
-
-Wed Oct 2 21:24:43 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_mn10x00): Declare.
-
-Mon Sep 30 13:56:11 1996 Fred Fish <fnf@cygnus.com>
-
- * libiberty.h: Remove #ifndef PRIVATE_XMALLOC.
-
-Sat Aug 31 13:27:06 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_v850): Declare.
-
-Tue Aug 13 16:10:30 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * obstack.h: Change bcopy to memcpy. Works better on Posix
- systems, which generally lack bcopy.
-
-Mon Aug 12 17:03:18 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * ansidecl.h: Change WIN32 to _WIN32.
-
-Fri Jul 26 13:58:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-asm.h: Add flavour field.
- (print_insn_alpha): Declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Don't declare.
- (INIT_DISASSEMBLE_INFO): Initialize flavour field.
-
-Tue Jul 23 17:37:58 1996 Fred Fish <fnf@cygnus.com>
-
- * libiberty.h (PRIVATE_XMALLOC): Enclose xmalloc/xrealloc
- definitions inside #ifndef so that programs that want to
- can define PRIVATE_XMALLOC and then define xmalloc and
- xrealloc anyway they want.
- (basename): Document in source that we can't declare the
- parameter type because it is declared inconsistently across
- different systems.
-
-Mon Jul 22 13:16:13 1996 Richard Henderson <rth@tamu.edu>
-
- * dis-asm.h (print_insn_alpha): Don't declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Declare.
-
-Wed Jul 17 14:45:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * dis-asm.h: (print_insn_d10v): Declare.
-
-Mon Jul 15 16:55:38 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h: Get rid of decls for print_insn_i8086,
- print_insn_sparc64 and print_insn_sparclite.
- * (INIT_DISASSEMBLE_INFO): Split into two pieces. One,
- INIT_DISASSEMBLE_INFO_NO_ARCH inits everything except for endian,
- mach, and arch.
-
-Fri Jul 12 10:19:27 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_i8086): Declare.
-
-Wed Jul 3 16:02:39 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_sparclite): Declare.
-
-Tue Jun 18 16:02:46 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * dis-asm.h (print_insn_h8300s): Declare.
-
-Tue Jun 18 15:11:33 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * fopen-vms.h: New file.
-
-Tue Jun 4 18:58:16 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add notice_all field.
-
-Fri Apr 26 10:33:12 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * demangle.h (#ifdef IN_GCC): #include "gansidecl.h".
- (PROTO,PTR,const): Delete.
-
-Mon Apr 22 17:27:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add traditional_format field.
-
-Mon Apr 15 15:16:56 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libiberty.h (choose_temp_base): Add prototype.
-
-Tue Mar 12 17:29:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare.
- (struct bfd_link_info): Add wrap_hash field.
-
-Wed Feb 14 16:49:17 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ieee.h (ieee_record_enum_type): Define
- ieee_external_reference_info_enum.
-
-Fri Feb 2 17:09:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (DISASM_RAW_INSN): Delete.
-
-Tue Jan 23 09:21:47 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN.
- New argument FPRINTF_FUNC.
-
-Mon Jan 22 16:37:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (disassemble_info): New members arch, mach, endian.
- (INIT_DISASSEMBLE_INFO): Initialize them.
- (DISASM_RAW_INSN{,FLAG}): Define.
-
-Thu Jan 18 11:32:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * demangle.h (cplus_demangle_opname): Change opname parameter to
- const char *.
- (cplus_mangle_opname): Change return type and opname parameter to
- const char *.
-
-Fri Jan 5 00:01:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.h (enum ieee_record): Add ieee_asn_record_enum,
- ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum,
- ieee_bb_record_enum, and ieee_be_record_enum.
-
-Wed Jan 3 13:12:09 1996 Fred Fish <fnf@cygnus.com>
-
- * obstack.h: Update copyright to 1996.
- (_obstack_memory_used): Declare.
- (obstack_memory_used): Define macro.
-
-Thu Dec 28 11:42:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (xstrdup): Declare.
-
-Thu Dec 21 14:47:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * wait.h: Protect all macros with #ifndef.
-
-Tue Oct 24 21:45:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add static_link field.
-
-Tue Sep 12 16:28:04 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to
- warning callback.
-
-Fri Sep 1 13:11:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Change warning callback
- to take BFD, section, and address arguments.
-
-Thu Aug 31 16:45:12 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Tue Aug 22 03:18:23 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * libiberty.h: Declare xstrerror. From Pat Rankin.
-
-Mon Aug 21 18:11:36 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Wed Aug 2 08:14:12 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (print_insn_sparc64): Declare.
-
-Mon Jul 10 13:26:49 1995 Eric Youngdale <eric@aib.com>
-
- * bfdlink.h (struct bfd_link_info): Add new field symbolic.
-
-Sun Jul 2 17:48:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Change type of base_file to
- PTR.
-
-Thu Jun 29 00:02:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Added base_file member.
-
-Tue Jun 20 16:40:04 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ansidecl.h: win32s is ANSI enough.
-
-Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- * dis-asm.h (print_insn_arm): Delete declaration.
- (print_insn_{little,big}_arm): New declarations.
-
- * floatformat.h (floatformat_arm_ext): Declare.
-
-Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * coff/pe.h: New file.
- * bfdlink.h (subsytem, stack_heap_parameters): New.
- * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * coff/internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
-
-Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * demangle.h: Don't include ansidecl.h if IN_GCC.
-
-Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler
- does not handle them correctly.
-
-Thu Feb 9 14:20:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (basename): Don't declare parameter type; some
- systems have this in their header files.
-
-Wed Feb 8 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change format of common
- symbol information, to remove restrictions on maximum size and
- alignment power, by using a pointer to a structure instead.
-
-Mon Feb 6 14:55:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak
- to bfd_link_hash_undefweak. Add bfd_link_hash_defweak.
-
-Mon Jan 16 21:00:23 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all
- GDB-specific definitions.
-
-Sun Jan 15 18:39:35 1995 Steve Chamberlain <sac@splat>
-
- * dis-asm.h (print_insn_w65): Declare.
-
-Thu Jan 12 17:51:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (hex_p): Fix sense of test.
-
-Wed Jan 11 22:36:40 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init,
- hex_p, hex_value): New macros and declarations, for hex.c.
-
-Fri Jan 6 17:44:14 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * dis-asm.h: Make idempotent.
-
-Wed Dec 14 13:08:43 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * progress.h: New file, empty definitions for progress macros.
-
-Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: New file describing the debug symbols emitted
- by the HP C compilers.
-
-Fri Nov 11 15:48:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24
- to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6
- bit in the alignment power is enough for a 64 bit address space.
-
-Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_mangle_opname): Declare.
-
-Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Fix comments for
- multiple_common field.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * aout/aout64.h: Only define QMAGIC if it isn't already defined.
-
- * dis-asm.h: Add support for the ARM.
-
-Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libiberty.h (strsignal): Document its existence even if we
- can't declare it.
-
-Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and
- expand their uses. Those names conflict with Mach headers.
-
-Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a
- bitfield. Add field u.c.alignment_power.
-
-Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * dis-asm.h: Add print_insn_ns32k declaration.
-
-Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (bfd_link_hash_table): Make creator a const pointer.
-
-Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_demangle_opname): Declare.
-
-Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_info): Add new field shared.
-
-Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Remove written field:
- not needed for all backends.
-
-Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * dis-asm.h (disassembler): Declare.
-
-Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
-
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
-
-Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order.
- (struct bfd_link_order): Add data field to union.
-
-Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
- to add_to_set to reloc. Remove bitsize argument from constructor.
- Comment that reloc_overflow, reloc_dangerous and unattached_reloc
- must handle NULL pointers for reloc location.
- (enum bfd_link_order_type): Add bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order.
- (struct bfd_link_order): Add reloc field to union.
- (struct bfd_link_order_reloc): Define.
-
-Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ieee-float.h: Removed; no longer used.
-
-Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9k.h: os9000 target specific header file, the header of the
- object file is used now.
-
-Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * floatformat.h: New file, intended to replace ieee-float.h.
-
-Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes.
-
-Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libiberty.h: Don't declare strsignal, to avoid conflicts with
- Solaris system header files.
-
-Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * libiberty.h (xexit): Use __volatile__ to avoid losing if
- compiling with gcc -traditional.
-
-Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * libiberty.h: New file. Declares functions provided by
- libiberty.
-
-Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- Handle obstack_chunk_alloc returning NULL. This allows
- obstacks to be used by libraries, without forcing them
- to call exit or longjmp.
- * obstack.h (struct obstack): Add alloc_failed flag.
- _obstack_begin, _obstack_begin_1): Declare to return int, not void.
- (obstack_finish): If alloc_failed, return NULL.
- (obstack_base, obstack_next_free, objstack_object_size):
- If alloc_failed, return 0.
- (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
- obstack_int_grow, obstack_blank): If alloc_failed, do nothing that
- could corrupt the obstack.
-
-Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and
- addend argments to reloc_overflow callback.
-
-Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc,
- print_insn_rs6000): Declare.
-
-Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to
- add_to_set field. Add new callback named constructor.
-
-Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
-
- * bfdlink.h: New file for new BFD linker backend routines.
-
-Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
-
-Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Move comment to right place.
-
-Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from
- previous version. Are these Cygnus local changes?
-
-Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * getopt.h, obstack.h: Update to latest FSF version.
-
-Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff/i386.h: Add Lynx magic number.
-
-Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Move enum outside of struct defn to avoid warnings.
-
-Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
-
- * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is
- for systems that store stuff into the high 16 bits of a wait
- status.
-
-Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
- data_size, insn_type, target, target2. These are used to return
- information from the instruction decoders back to the calling
- program. Add comments, make more readable.
-
-Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * nlm: New directory containing NLM/NetWare includes.
-
-Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (struct disassemble_info): New field application_data.
-
-Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h: Added declaration of print_insn_m88k.
-
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * opcode/h8300.h: Lots of little fixes for the h8/300h.
-
-Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are
- defined, since RISC/OS cc handles ANSI declarations in SVR4 mode
- but does not define __STDC__.
-
-Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * dis-asm.h: Don't need to include ansidecl.h any more.
-
-Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com)
-
- * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and
- their variants. These changes are coordinated with corresponding
- changes in ../bfd/oasys.c.
-
-Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Note that it has been removed.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it.
- * coff/h8300.h: New magic number.
- * coff/internal.h: New relocations.
- * opcode/h8300.h: Lots of new opcodes.
-
-Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * ansidecl.h (const): Don't define it if it's already defined.
-
-Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (print_insn_hppa): Declare it.
-
- * bfd.h: Moved to bfd directory. Small stub here includes it
- without requiring "-I../bfd".
-
-Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * bfd.h: Updated with BSF_FUNCTION.
-
-Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h, dis-asm.h: Updated with Hitachi SH.
-
-Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Updated with alpha changes.
- * dis-asm.h: Added alpha.
-
-Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Update for signed bfd_*get_*.
-
-Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Updated for file_truncated error.
-
-Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: If no ANSI, define const to be empty.
-
-Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * dis-asm.h: Declare a29k and i960 print_insn_*.
-
- * dis-asm.h: Add print_address_func and related stuff.
-
- * dis-asm.h (dis_asm_read_memory): Fix prototype.
-
-Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Add print_insn_sparc.
-
-Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size
- prototypes.
-
-Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com)
-
- * dis-asm.h: (disassemble_info): Fix typo in prototype of
- dis_asm_memory_error().
-
-Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h (disassembler_info): Add read_memory_func,
- memory_error_func, buffer, and length.
- ({GDB_,}INIT_DISASSEMBLE_INFO): Set them.
- print_insn_*: Remove second argument.
-
-Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Update for lma field of section.
-
-Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__.
-
-Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * dis-asm.h: Add h8500.
-
-Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.h: Moved from ../gdb.
- * dis-asm.h: New file. Interface to dis-assembler.
-
-Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use
- in place of bare 0, for readability reasons.
-
-Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Replace all references to cfront with ARM.
-
-Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for new elements in JUMP_TABLE.
-
-Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update for BFD_VERSION 2.1.
-
-Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for SEC_IS_COMMON flag.
-
-Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update for bfd_asymbol_value bug fix.
-
-Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update to include ECOFF tdata and target_flavour.
-
-Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Add declaration for bfd_get_size().
-
-Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Protect file from multiple inclusions with
- #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif.
-
-Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: Update to get hppa_core_struct from bfd.c.
-
-Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to get tekhex tdata name change from bfd.
-
-Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com)
-
- * ansidecl.h: Update comments to discourage use of EXFUN.
-
-Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update to bring in SEC_SHARED_LIBRARY.
-
-Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF
- cleanups in bfd.
-
-Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so
- widening works consistently.
-
-Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com)
-
- * getopt.h: Update to Revised Standard FSF Version.
-
-Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * getopt.h (struct option): use the provided enum for has_arg.
-
- * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING,
- LUCID_DEMANGLING): ultrix compilers require enums to be
- enums and ints to be ints and casts where they meet. cast some
- enums into ints.
-
-Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update after comment changes.
-
-Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec
-
-Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h (struct reloc_howto_struct): size needs to be signed if
- it's going to hold negative values.
-
-Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * demangle.h: New file, moved from ../gdb. Made independent
- of gdb. Allow demangling style option to be passed as a
- parameter to cplus_demangle(), but using the
- current_demangling_style global as the default.
-
-Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge comment change from current FSF version.
-
-Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * bfd.h: add we32k
-
-Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after Z8000 stuff
-
-Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bfd.h: Regenerated after page/segment size changes.
-
-Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge changes from current FSF version.
-
-Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h (area_id, flags): Remove, replace with extra_arg,
- use_extra_arg, and maybe_empty_object.
- * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE):
- Remove, replaced by maybe_empty_object and use_extra_arg bitfields.
- * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id
- and flags arguments.
- * obstack.h (obstack_alloc_arg): New macro to set extra_arg.
-
-Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after adding BFD_IS_RELAXABLE
-
-Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen after adding BSF_FILE.
-
-Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish)
-
- * obstack.h: Convert bcopy() use to memcpy(), which is more
- portable, more standard, and can take advantage of gcc's builtin
- functions for increased performance.
-
-Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com)
-
- * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h.
- It's a cleaner way to forward-declare function prototypes.
-
-Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: HPPA merge.
-
-Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: gratuitous white space changes merged from other prep
- releases.
-
-Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct.
-
-Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from make-3.62.11.
-
- * getopt.h: merged changes from grep-1.6 (alpha).
-
-Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from bison-1.18.
-
-Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Add "area_id" and "flags" members to obstack
- structure. Add obstack_chunkfun() and obstack_freefun() to
- set functions explicitly. Convert maybe_empty_object to
- a bit in "flags".
-
-Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com)
-
- * wait.h (WIFSTOPPED): Add IBM rs6000-specific version.
-
-Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com)
-
- * obstack.h: Add obstack_full_begin.
- * bfd.h, obstack.h: Protolint.
-
-Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Remove comma from enum declaration.
-
-Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
-
- * bfd.h : new target entr, bfd_relax_section
-
-Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums.
-
-Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
-
- * fopen-same.h, fopen-bin.h: New files for configuring
- whether fopen distinguishes binary files or not. For use
- by host-dependent config files.
-
-Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * bfd.h: change the documentation format.
-
- * created coff, elf and opcode and aout directories. Moved:
-
- aout64.h ==> aout/aout64.h
- ar.h ==> aout/ar.h
- a.out.encap.h ==> aout/encap.h
- a.out.host.h ==> aout/host.h
- a.out.hp.h ==> aout/hp.h
- a.out.sun4.h ==> aout/sun4.h
- ranlib.h ==> aout/ranlib.h
- reloc.h ==> aout/reloc.h
- stab.def ==> aout/stab.def
- stab.gnu.h ==> aout/stab_gnu.h
-
- coff-a29k.h ==> coff/a29k.h
- coff-h8300.h ==> coff/h8300.h
- coff-i386.h ==> coff/i386.h
- coff-i960.h ==> coff/i960.h
- internalcoff.h ==> coff/internal.h
- coff-m68k.h ==> coff/m68k.h
- coff-m88k.h ==> coff/m88k.h
- coff-mips.h ==> coff/mips.h
- coff-rs6000.h ==> coff/rs6000.h
-
- elf-common.h ==> elf/common.h
- dwarf.h ==> elf/dwarf.h
- elf-external.h ==> elf/external.h
- elf-internal.h ==> elf/internal.h
-
- a29k-opcode.h ==> opcode/a29k.h
- arm-opcode.h ==> opcode/arm.h
- h8300-opcode.h ==> opcode/h8300.h
- i386-opcode.h ==> opcode/i386.h
- i860-opcode.h ==> opcode/i860.h
- i960-opcode.h ==> opcode/i960.h
- m68k-opcode.h ==> opcode/m68k.h
- m88k-opcode.h ==> opcode/m88k.h
- mips-opcode.h ==> opcode/mips.h
- np1-opcode.h ==> opcode/np1.h
- ns32k-opcode.h ==> opcode/ns32k.h
- pn-opcode.h ==> opcode/pn.h
- pyr-opcode.h ==> opcode/pyr.h
- sparc-opcode.h ==> opcode/sparc.h
- tahoe-opcode.h ==> opcode/tahoe.h
- vax-opcode.h ==> opcode/vax.h
-
-
-
-Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * internalcoff.h: (internal_scnhdr) took out #def dependency, now
- s_nreloc and s_nlnno are always long.
- (internal_reloc): Always has an offset field now.
-
-Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com)
-
- * coff-rs6000.h: Lint; use unsigned chars for external fields.
- * internalcoff.h: Lint; cast storage classes to signed char.
-
-Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Remove the GNU extended type codes (e.g. N_SETT).
- * aout64.h: The heuristic for distinguishing between
- sunos-style and bsd-style ZMAGIC files (wrt. where the
- text segment starts) is moved into (the default definition of)
- the macro N_HEADER_IN_TEXT. This definition is only used
- if no other definition is used - e.g. bfd/newsos3.c defines
- N_HEADER_IN_TEXT(x) to be always 0 (as before).
-
-Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions
- that should handle all uses. LOGICAL_ versions deleted.
- Eliminate N_HEADER_IN_TEXT, using a_entry to determine which
- kind of zmagic a.out file we are looking at.
- * coff-rs6000.h: Typo.
-
-Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com)
-
- (Note: This is a revised entry, as was aout64.h.)
- * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF:
- Will now work for both old- and new-style ZMAGIC files,
- depending on N_HEADER_IN_TEXT macro.
- Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE
- that don't count the exec header as part
- of the text segment, to be consistent with bfd.
- * a.out.sun4.h: Simplified/fixed for previous change.
-
-Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: Update to DWARF draft 5 version from gcc2.
-
-Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Added defs for extended GNU symbol types,
- such as N_SETT. These are normally ifdef'd out (because
- of conflicts with a.out.gnu.h), but are used by bfb_stab_name().
-
-Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-common.h: Add defines to support ELF symbol table code.
-
-Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-internal.h, elf-external.h, elf-common.h: Add support for
- note sections, which are used in ELF core files to hold copies
- of various /proc structures.
-
-Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com)
-
- * internalcoff.h: took out the M88 dependency in the lineno
- struct.
- * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use
- 32bit linno entries.
- * a29k-opcode.h: fixed encoding of mtacc
-
-Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com)
-
- * bfd.h: Updated from ../bfd/bfd-in.h (q.v).
-
-Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com)
-
- * internalcoff.h: Add x_csect defines.
-
-Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
-
- * Rename COFF-related files in `coff-ARCH.h' form.
- coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h,
- coff-mips.h, coff-rs6000.h to be exact.
-
-Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
-
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
- John Gilmore.
-
- * a.out.gnu.h: Update slightly.
- * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000.
- * internalcoff.h: Add more F_ codes for filehdr. Add
- rs/6000-dependent fields to aouthdr. Add storage classes
- to syments. Add 6000-specific auxent. Add r_size in reloc.
- * rs6000coff.c: New file.
-
-Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: New file for dwarf support. Copied from gcc2
- distribution.
-
-Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Remove PAGE_SIZE defines; they are target-dependent.
- Add N_FN_SEQ for N_FN symbol type used on Sequent machines.
- * stab.def: Include N_FN_SEQ in table.
- * bout.h: External formats of structures use unsigned chars.
-
-Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com)
-
- * bfd.h:upgrade from bfd.c
- * internalcoff.h: add n_name, n_zeroes and n_offset macros
- * amdcoff.h: Define OMAGIC and AOUTHDRSZ.
-
-Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com)
-
- * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony.
- * bfd.h (align_power): Add (actually move) comment.
-
-Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com)
-
- * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c).
-
-Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Move struct internal_exec to ../bfd/libaout.h so
- it can be shared by all `a.out-family' code. Rename
- EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types
- for nlist members, and make strx integral rather than pointer.
- More commentary on n_type values.
- * bout.h: Provide a struct external_exec rather than an
- internal_exec.
- * m68kcoff.h: Remove `tagentries' which snuck in from the i960
- COFF port.
-
-Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com)
-
- * h8300-opcode.h: Remove `_enum' from the typedef for an enum.
- * bfd.h: Update to match bfd changes.
-
- * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support.
-
-Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com)
-
- * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
- Add preliminary ELF support, sufficient for GDB, from Fred Fish.
- * sysdep.h, sys/h-amix.h: Support Amiga SVR4.
-
- * sys/h-vaxult.h: Make it work. (David Taylor <taylor@think.com>)
- * a.out.vax.h: Remove unused and confusing file.
-
-Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com)
-
- * sysdep.h: Define NEWSOS3_SYS, and use it.
-
-Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com)
-
- * a.out.gnu.h (N_FN): Its value *really is* 0x1F.
- Fix it, and add comments warning about or-ing N_EXT with it
- and/or N_WARNING.
- * aout64.h (N_FN): Fix value, add comments about N_EXT.
- * stab.def (table at end): Update to show all the type
- values <0x20, including low order bits. Move N_FN to
- its rightful place.
-
-Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com)
-
- * sys/h-irix3.h: sgi/irix support.
-
-Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew
- Beers.
-
-Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com)
+2004-03-30 Zack Weinberg <zack@codesourcery.com>
- * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these
- for internalcoff, separately from the various external coff's.
- * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h,
- m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for
- the external struct definitions.
- * ecoff.h: Remove these #define's, kludge no longer needed.
+ * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
- * sys/h-ultra3.h: Add new Ultracomputer host.
- * sysdep.h: Add ULTRA3_SYM1_SYS and use it.
+2004-03-25 Stan Shebs <shebs@apple.com>
-Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * mpw/: Remove subdirectory and everything in it.
- * i386coff.h (LINESZ): Always 6, not based on sizeof().
- (Fix from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.)
+2004-03-23 Alan Modra <amodra@bigpond.net.au>
-Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com)
+ PR 51.
+ * bfdlink.h (struct bfd_link_info): Add wrap_char.
- * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E,
- to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib
- support.
- * stab.def: Add N_COMM to table, fix overlap comment.
+2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
-Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * bfdlink.h (bfd_link_info): Correct comments for the
+ unresolved_syms_in_objects field.
- Merge with latest FSF versions of these files.
+2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
- * stab.gnu.h: Add LAST_UNUSED_STAB_CODE.
- * stab.def: Update to GPL2. Move N_WARNING out, since not a
- debug symbol. Change comments, and reorder table to numeric
- order. Update final table comment.
- (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48.
+ * dyn-string.h: Update copyright date.
- * obstack.h: GPL2. Merge.
+2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
-Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
+ the associated #defines.
- * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend
- on the particular a.out being examined.
- * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's.
- * FIXME: a.out.gnu.h is almost obsolete.
- * FIXME: a.out.sun4.h should be renamed a.out.sun.h now.
+2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
-Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * demangle.h: Instead of checking ANSI_PROTOTYPES, just include
+ "libiberty.h".
- * Start a ChangeLog for the includes directory.
+ * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
- * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E.
- * stab.def: Update allocation table in comments at end,
- to reflect reality as I know it.
+ * demangle.h (enum demangle_component_type): Define.
+ (struct demangle_operator_info): Declare.
+ (struct demangle_builtin_type_info): Declare.
+ (struct demangle_component): Define.
+ (cplus_demangle_fill_component): Declare.
+ (cplus_demangle_fill_name): Declare.
+ (cplus_demangle_fill_builtin_type): Declare.
+ (cplus_demangle_fill_operator): Declare.
+ (cplus_demangle_fill_extended_operator): Declare.
+ (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
+ (cplus_demangle_v3_components): Declare.
+ (cplus_demangle_print): Declare.
+For older changes see ChangeLog-9103
Local Variables:
mode: change-log
diff --git a/include/ansidecl.h b/include/ansidecl.h
index d2c87768ce2..04c3a30bb53 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -264,6 +264,14 @@ So instead we use the macro below and test it against specific values. */
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */
+/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
+ identifier name. */
+#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
+# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
+#else /* !__cplusplus || GNUC >= 3.4 */
+# define ARG_UNUSED(NAME) NAME
+#endif /* !__cplusplus || GNUC >= 3.4 */
+
#ifndef ATTRIBUTE_NORETURN
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#endif /* ATTRIBUTE_NORETURN */
@@ -277,6 +285,15 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 3.3 */
#endif /* ATTRIBUTE_NONNULL */
+/* Attribute `pure' was valid as of gcc 3.0. */
+#ifndef ATTRIBUTE_PURE
+# if (GCC_VERSION >= 3000)
+# define ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define ATTRIBUTE_PURE
+# endif /* GNUC >= 3.0 */
+#endif /* ATTRIBUTE_PURE */
+
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
This was the case for the `printf' format attribute by itself
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
@@ -305,6 +322,15 @@ So instead we use the macro below and test it against specific values. */
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
#endif /* ATTRIBUTE_NULL_PRINTF */
+/* Attribute `sentinel' was valid as of gcc 3.5. */
+#ifndef ATTRIBUTE_SENTINEL
+# if (GCC_VERSION >= 3005)
+# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
+# else
+# define ATTRIBUTE_SENTINEL
+# endif /* GNUC >= 3.5 */
+#endif /* ATTRIBUTE_SENTINEL */
+
/* We use __extension__ in some places to suppress -pedantic warnings
about GCC extensions. This feature didn't work properly before
gcc 2.8. */
diff --git a/include/bfdlink.h b/include/bfdlink.h
index cc2043e10ed..5adad790e6f 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -302,6 +302,9 @@ struct bfd_link_info
flags. */
unsigned int noexecstack: 1;
+ /* TRUE if PT_GNU_RELRO segment should be created. */
+ unsigned int relro: 1;
+
/* What to do with unresolved symbols in an object file.
When producing executables the default is GENERATE_ERROR.
When producing shared libraries the default is IGNORE. The
@@ -391,6 +394,9 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
+
+ /* Start and end of RELRO region. */
+ bfd_vma relro_start, relro_end;
};
/* This structures holds a set of callback functions. These are
@@ -505,14 +511,6 @@ struct bfd_link_callbacks
bfd_boolean (*notice)
(struct bfd_link_info *, const char *name,
bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called for reporting a linker error. ID is the
- error identifier. The remaining input is the same as einfo () in
- ld. */
- bfd_boolean (*error_handler)
- (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
@@ -550,7 +548,7 @@ struct bfd_link_order
/* Section to include. If this is used, then
section->output_section must be the section the
link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->_raw_size
+ equal the link_order offset field, and section->size
must equal the link_order size field. Maybe these
restrictions should be relaxed someday. */
asection *section;
diff --git a/include/bin-bugs.h b/include/bin-bugs.h
index 3c97715add4..63901b044f4 100644
--- a/include/bin-bugs.h
+++ b/include/bin-bugs.h
@@ -1,3 +1,3 @@
#ifndef REPORT_BUGS_TO
-#define REPORT_BUGS_TO "bug-binutils@gnu.org"
+#define REPORT_BUGS_TO "<URL:http://www.sourceware.org/bugzilla/>"
#endif
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 33163834229..290a5070ab4 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,17 @@
+2004-08-13 Mark Kettenis <kettenis@gnu.org>
+
+ * symconst.h (langMax): Fix typo in comment.
+
+2004-04-23 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
+ (MIPS_R_PCREL16): Update comment.
+ * ecoff.h (struct ecoff_value_adjust): Remove structure.
+ (struct ecoff_debug_info): Remove 'adjust' member.
+
+2004-04-20 DJ Delorie <dj@redhat.com>
+
+ * internal.h (R_SECREL32): Add.
For older changes see ChangeLog-9103
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
index 3a7aa4fbbb5..1a39fcbd68b 100644
--- a/include/coff/ecoff.h
+++ b/include/coff/ecoff.h
@@ -322,34 +322,6 @@ struct ecoff_debug_info
this changes in the future. This is a pointer to an array, not a
single structure. */
FDR *fdr;
-
- /* When relaxing MIPS embedded PIC code, we may need to adjust
- symbol values when they are output. This is a linked list of
- structures indicating how values should be adjusted. There is no
- requirement that the entries be in any order, or that they not
- overlap. This field is normally NULL, in which case no
- adjustments need to be made. */
- struct ecoff_value_adjust *adjust;
-};
-
-/* This structure describes how to adjust symbol values when
- outputting MIPS embedded PIC code. These adjustments only apply to
- the internal symbols, as the external symbol values will come from
- the hash table and have already been adjusted. */
-
-struct ecoff_value_adjust
-{
- /* Next entry on adjustment list. */
- struct ecoff_value_adjust *next;
- /* Starting VMA of adjustment. This is the VMA in the ECOFF file,
- not the offset from the start of the section. Thus it should
- indicate a particular section. */
- bfd_vma start;
- /* Ending VMA of adjustment. */
- bfd_vma end;
- /* Adjustment. This should be added to the value of the symbol, or
- FDR. This is zero for the last entry in the array. */
- long adjust;
};
/* These structures are used by the ECOFF find_nearest_line function. */
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 2d41bf9a5f4..710e932c708 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -607,6 +607,7 @@ struct internal_reloc
#define R_REL24 5
#define R_DIR32 6
#define R_IMAGEBASE 7
+#define R_SECREL32 11
#define R_RELBYTE 15
#define R_RELWORD 16
#define R_RELLONG 17
diff --git a/include/coff/mips.h b/include/coff/mips.h
index b9503bd5555..bec8da2d39f 100644
--- a/include/coff/mips.h
+++ b/include/coff/mips.h
@@ -105,34 +105,10 @@ struct external_reloc
#define MIPS_R_GPREL 6
#define MIPS_R_LITERAL 7
-/* These reloc types are a Cygnus extension used when generating
- position independent code for embedded systems. The numbers are
- taken from Irix 4, but at least for internal relocs Irix 5 does not
- give them the same meaning. For an internal reloc the symbol index
- of RELHI and RELLO is modified as described below for
- MIPS_R_SWITCH. */
+/* FIXME: This relocation is used (internally only) to represent branches
+ when assembling. It should never appear in output files, and
+ be removed. (It used to be used for embedded-PIC support.) */
#define MIPS_R_PCREL16 12
-#define MIPS_R_RELHI 13
-#define MIPS_R_RELLO 14
-
-/* This reloc type is a Cygnus extension used when generating position
- independent code for embedded systems. It is used for an entry in
- a switch table, which looks like this:
- .word $L3-$LS12
- The object file will contain the correct difference, and does not
- require adjustment. However, when the linker is relaxing PC
- relative calls, it is possible for $L3 to move farther away. This
- reloc always appears in the .text section, and is always against
- the .text section. However, the symbol index is not
- RELOC_SECTION_TEXT. It is, instead, the distance between this
- switch table entry and $LS12. Thus, the original value of $L12 is
- vaddr - symndx
- and the original value of $L3 is
- vaddr - symndx + addend
- where addend is the value in the object file. Knowing this, the
- linker can know whether the addend in the object file must be
- adjusted. */
-#define MIPS_R_SWITCH 22
/********************** STABS **********************/
diff --git a/include/coff/symconst.h b/include/coff/symconst.h
index f40eef2a311..3e45705f408 100644
--- a/include/coff/symconst.h
+++ b/include/coff/symconst.h
@@ -48,7 +48,7 @@
#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
#define langCplusplus 9 /* FIXME: Collides with langStdc */
#define langCplusplusV2 10 /* SGI addition */
-#define langMax 11 /* maximun allowed 32 -- 5 bits */
+#define langMax 11 /* maximum allowed 32 -- 5 bits */
/* The following are value definitions for the fields in the SYMR */
diff --git a/include/demangle.h b/include/demangle.h
index 6e995e4817d..b3b8c58c517 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -458,7 +458,7 @@ cplus_demangle_fill_name PARAMS ((struct demangle_component *fill,
extern int
cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
- const char *typename));
+ const char *type_name));
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
operator and the number of arguments which it takes (the latter is
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 3670c518986..7171c847a57 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -224,6 +224,7 @@ extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
+extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 28ec205b586..6b0cf0d4e0d 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,62 @@
+2004-08-25 Dmitry Diky <diwil@spec.ru>
+
+ * msp430.h: Add new relocs.
+
+2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (R_386_USED_BY_INTEL_200): New.
+
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * sh.h (EF_SH2A_NOFPU): New.
+ 2003-12-01 Michael Snyder <msnyder@redhat.com>
+ * sh.h (EF_SH2A): New.
+
+2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32.
+
+2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * common.h (EM_CRX): Define.
+ * crx.h: New file.
+
+2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
+ R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
+
+2004-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (ELF64_R_INFO): Warning fix.
+
+2004-06-14 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
+ with an updated comment.
+
+2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * sh.h (EF_SH_HAS_DSP): Remove.
+ (EF_SH_HAS_FP): Remove.
+ (EF_SH_MERGE_MACH): Remove.
+ (EF_SH4_NOFPU): Convert to decimal.
+ (EF_SH4A_NOFPU): Likewise.
+ (EF_SH4_NOMMU_NOFPU): Likewise.
+ (EF_SH3_NOMMU): Add new macro.
+ (EF_SH_BFD_TABLE): Likewise.
+ (sh_find_elf_flags): Add prototype.
+ (sh_elf_get_flags_from_mach): Likewise.
+
+2004-04-24 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
+ (R_MIPS_GNU_REL_HI16): Remove.
+ (R_MIPS_GNU_REL16_S2): Update comment.
+
2004-30-30 Galit Heller <Galit.Heller@nsc.com>
Tomer Levi <Tomer.Levi@nsc.com>
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 158a4b55e4f..34bde17e921 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -124,10 +124,15 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32)
RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33)
RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34)
- RELOC_NUMBER (R_ARM_LDR_SBREL11_0, 35)
- RELOC_NUMBER (R_ARM_ALU_SBREL19_12, 36)
- RELOC_NUMBER (R_ARM_ALU_SBREL27_20, 37)
- FAKE_RELOC (FIRST_INVALID_RELOC2, 38)
+ RELOC_NUMBER (R_ARM_LDR_SBREL_11_0, 35)
+ RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 36)
+ RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 37)
+ RELOC_NUMBER (R_ARM_TARGET1, 38)
+ RELOC_NUMBER (R_ARM_ROSEGREL32, 39)
+ RELOC_NUMBER (R_ARM_V4BX, 40)
+ RELOC_NUMBER (R_ARM_STKCHK, 41)
+ RELOC_NUMBER (R_ARM_THM_STKCHK, 42)
+ FAKE_RELOC (FIRST_INVALID_RELOC2, 43)
FAKE_RELOC (LAST_INVALID_RELOC2, 99)
RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
diff --git a/include/elf/common.h b/include/elf/common.h
index 8ebc2cf4724..5573fca7678 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -182,6 +182,7 @@
#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
#define EM_CR 103 /* National Semiconductor CompactRISC */
#define EM_MSP430 105 /* TI msp430 micro controller */
+#define EM_CRX 114 /* National Semiconductor CRX */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -288,8 +289,9 @@
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
-#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */
+#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
+#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
/* Program segment permissions, in program header p_flags field. */
@@ -494,7 +496,7 @@
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
-#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
+#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t))
/* Dynamic section tags. */
diff --git a/include/elf/crx.h b/include/elf/crx.h
new file mode 100644
index 00000000000..33ba0051478
--- /dev/null
+++ b/include/elf/crx.h
@@ -0,0 +1,53 @@
+/* CRX ELF support for BFD.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
+ Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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 _ELF_CRX_H
+#define _ELF_CRX_H
+
+#include "elf/reloc-macros.h"
+
+/* Creating indices for reloc_map_index array. */
+START_RELOC_NUMBERS(elf_crx_reloc_type)
+ RELOC_NUMBER (R_CRX_NONE, 0)
+ RELOC_NUMBER (R_CRX_REL4, 1)
+ RELOC_NUMBER (R_CRX_REL8, 2)
+ RELOC_NUMBER (R_CRX_REL8_CMP, 3)
+ RELOC_NUMBER (R_CRX_REL16, 4)
+ RELOC_NUMBER (R_CRX_REL24, 5)
+ RELOC_NUMBER (R_CRX_REL32, 6)
+ RELOC_NUMBER (R_CRX_REGREL12, 7)
+ RELOC_NUMBER (R_CRX_REGREL22, 8)
+ RELOC_NUMBER (R_CRX_REGREL28, 9)
+ RELOC_NUMBER (R_CRX_REGREL32, 10)
+ RELOC_NUMBER (R_CRX_ABS16, 11)
+ RELOC_NUMBER (R_CRX_ABS32, 12)
+ RELOC_NUMBER (R_CRX_NUM8, 13)
+ RELOC_NUMBER (R_CRX_NUM16, 14)
+ RELOC_NUMBER (R_CRX_NUM32, 15)
+ RELOC_NUMBER (R_CRX_IMM16, 16)
+ RELOC_NUMBER (R_CRX_IMM32, 17)
+ RELOC_NUMBER (R_CRX_SWITCH8, 18)
+ RELOC_NUMBER (R_CRX_SWITCH16, 19)
+ RELOC_NUMBER (R_CRX_SWITCH32, 20)
+END_RELOC_NUMBERS(R_CRX_MAX)
+
+#endif /* _ELF_CRX_H */
diff --git a/include/elf/i386.h b/include/elf/i386.h
index 95941196c7e..bd54e8eade5 100644
--- a/include/elf/i386.h
+++ b/include/elf/i386.h
@@ -62,6 +62,9 @@ START_RELOC_NUMBERS (elf_i386_reloc_type)
RELOC_NUMBER (R_386_TLS_DTPOFF32, 36)
RELOC_NUMBER (R_386_TLS_TPOFF32, 37)
+ /* Used by Intel. */
+ RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200)
+
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_386_GNU_VTENTRY, 251)
diff --git a/include/elf/m32r.h b/include/elf/m32r.h
index 709d7923446..6441efe27e8 100644
--- a/include/elf/m32r.h
+++ b/include/elf/m32r.h
@@ -1,5 +1,5 @@
/* M32R ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -67,6 +67,9 @@ START_RELOC_NUMBERS (elf_m32r_reloc_type)
RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59)
RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60)
RELOC_NUMBER (R_M32R_GOTPC_LO, 61)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63)
+ RELOC_NUMBER (R_M32R_GOTOFF_LO, 64)
END_RELOC_NUMBERS (R_M32R_max)
/* Processor specific section indices. These sections do not actually
diff --git a/include/elf/mips.h b/include/elf/mips.h
index ce43158123f..b7d800a70ed 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -76,12 +76,13 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
/* These relocs are used for the mips16. */
RELOC_NUMBER (R_MIPS16_26, 100)
RELOC_NUMBER (R_MIPS16_GPREL, 101)
- /* These are GNU extensions to handle embedded-pic. */
+ /* This was a GNU extension used by embedded-PIC. It was co-opted by
+ mips-linux for exception-handling data. It is no longer used, but
+ should continue to be supported by the linker for backward
+ compatibility. (GCC stopped using it in May, 2004.) */
RELOC_NUMBER (R_MIPS_PC32, 248)
- RELOC_NUMBER (R_MIPS_PC64, 249)
+ /* FIXME: this relocation is used internally by gas. */
RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
- RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251)
- RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
index 912ded7685d..2bf95a629b2 100644
--- a/include/elf/msp430.h
+++ b/include/elf/msp430.h
@@ -1,5 +1,5 @@
/* MSP430 ELF support for BFD.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -50,6 +50,8 @@ START_RELOC_NUMBERS (elf_msp430_reloc_type)
RELOC_NUMBER (R_MSP430_16_PCREL, 4)
RELOC_NUMBER (R_MSP430_16_BYTE, 5)
RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6)
+ RELOC_NUMBER (R_MSP430_2X_PCREL, 7)
+ RELOC_NUMBER (R_MSP430_RL_PCREL, 8)
END_RELOC_NUMBERS (R_MSP430_max)
diff --git a/include/elf/sh.h b/include/elf/sh.h
index c46a5ff149f..ddb387b18bc 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -27,57 +27,54 @@
#define EF_SH1 1
#define EF_SH2 2
#define EF_SH3 3
-#define EF_SH_HAS_DSP(flags) (((flags) & EF_SH_MACH_MASK & ~3) == 4)
#define EF_SH_DSP 4
#define EF_SH3_DSP 5
#define EF_SH4AL_DSP 6
-#define EF_SH_HAS_FP(flags) ((flags) & 8)
#define EF_SH3E 8
#define EF_SH4 9
#define EF_SH2E 11
#define EF_SH4A 12
+#define EF_SH2A 13
-#define EF_SH4_NOFPU 0x10
-#define EF_SH4A_NOFPU 0x11
-#define EF_SH4_NOMMU_NOFPU 0x12
+#define EF_SH4_NOFPU 16
+#define EF_SH4A_NOFPU 17
+#define EF_SH4_NOMMU_NOFPU 18
+#define EF_SH2A_NOFPU 19
+#define EF_SH3_NOMMU 20
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
-#define EF_SH_MERGE_MACH(mach1, mach2) \
- (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
- || ((mach1) == EF_SH_DSP \
- && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \
- ? EF_SH3_DSP \
- : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH3 \
- : ((mach1) == EF_SH2E && EF_SH_HAS_FP (mach2)) \
- ? (mach2) \
- : ((mach2) == EF_SH2E && EF_SH_HAS_FP (mach1)) \
- ? (mach1) \
- : (((mach1) == EF_SH2E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH2E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH2E \
- : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH4 \
- /* ??? SH4? Why not SH3E? */ \
- : ((((mach1) == EF_SH4_NOFPU || (mach1) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach2)) \
- || (((mach2) == EF_SH4_NOFPU || (mach2) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach1))) \
- ? EF_SH4AL_DSP \
- : ((mach1) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) < EF_SH4A) ? EF_SH4 : (mach2) \
- : ((mach2) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) < EF_SH4A) ? EF_SH4 : (mach1) \
- : ((mach1) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) <= EF_SH4A) ? EF_SH4A : (mach2) \
- : ((mach2) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) <= EF_SH4A) ? EF_SH4A : (mach1) \
- : (((mach1) == EF_SH2E ? 7 : (mach1)) > ((mach2) == EF_SH2E ? 7 : (mach2)) \
- ? (mach1) : (mach2)))
+/* Define the mapping from ELF to bfd mach numbers.
+ bfd_mach_* are defined in bfd_in2.h (generated from
+ archures.c). */
+#define EF_SH_BFD_TABLE \
+/* EF_SH_UNKNOWN */ bfd_mach_sh3 , \
+/* EF_SH1 */ bfd_mach_sh , \
+/* EF_SH2 */ bfd_mach_sh2 , \
+/* EF_SH3 */ bfd_mach_sh3 , \
+/* EF_SH_DSP */ bfd_mach_sh_dsp , \
+/* EF_SH3_DSP */ bfd_mach_sh3_dsp , \
+/* EF_SHAL_DSP */ bfd_mach_sh4al_dsp , \
+/* 7 */ 0, \
+/* EF_SH3E */ bfd_mach_sh3e , \
+/* EF_SH4 */ bfd_mach_sh4 , \
+/* EF_SH5 */ 0, \
+/* EF_SH2E */ bfd_mach_sh2e , \
+/* EF_SH4A */ bfd_mach_sh4a , \
+/* EF_SH2A */ bfd_mach_sh2a , \
+/* 14, 15 */ 0, 0, \
+/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \
+/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \
+/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \
+/* EF_SH2A_NOFPU */ bfd_mach_sh2a_nofpu , \
+/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu
+
+/* Convert arch_sh* into EF_SH*. */
+int sh_find_elf_flags (unsigned int arch_set);
+
+/* Convert bfd_mach_* into EF_SH*. */
+int sh_elf_get_flags_from_mach (unsigned long mach);
/* Flags for the st_other symbol field.
Keep away from the STV_ visibility flags (bit 0..1). */
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index 3a17b1d797f..06c02af58ad 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,23 @@
+2004-09-08 Michael Snyder <msnyder@redhat.com>
+
+ Commited by Corinna Vinschen <vinschen@redhat.com>
+ * sim-sh.h: Add new sh2a banked registers.
+
+2004-08-04 Andrew Cagney <cagney@gnu.org>
+
+ * sim-ppc.h: Add extern "C" wrapper.
+ (enum sim_ppc_regnum): Add full list of SPRs.
+
+2004-08-04 Jim Blandy <jimb@redhat.com>
+
+ * sim-ppc.h: New file.
+
+2004-06-25 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * callback.h (host_callback_struct): Replace members fdopen and
+ alwaysopen with fd_buddy.
+ [sim/common: * callback.c: Changed all users. ]
+
2003-10-31 Kevin Buettner <kevin@redhat.com>
* sim-frv.h: New file.
diff --git a/include/gdb/callback.h b/include/gdb/callback.h
index 3fa419143ae..aa956d05f47 100644
--- a/include/gdb/callback.h
+++ b/include/gdb/callback.h
@@ -123,8 +123,15 @@ struct host_callback_struct
int last_errno; /* host format */
int fdmap[MAX_CALLBACK_FDS];
- char fdopen[MAX_CALLBACK_FDS];
- char alwaysopen[MAX_CALLBACK_FDS];
+ /* fd_buddy is used to contruct circular lists of target fds that point to
+ the same host fd. A uniquely mapped fd points to itself; for a closed
+ one, fd_buddy has the value -1. The host file descriptors for stdin /
+ stdout / stderr are never closed by the simulators, so they are put
+ in a special fd_buddy circular list which also has MAX_CALLBACK_FDS
+ as a member. */
+ /* ??? We don't have a callback entry for dup, although it is trival to
+ implement now. */
+ short fd_buddy[MAX_CALLBACK_FDS+1];
/* System call numbers. */
CB_TARGET_DEFS_MAP *syscall_map;
diff --git a/include/gdb/sim-ppc.h b/include/gdb/sim-ppc.h
new file mode 100644
index 00000000000..e31a6711292
--- /dev/null
+++ b/include/gdb/sim-ppc.h
@@ -0,0 +1,771 @@
+/* sim-ppc.h --- interface between PowerPC simulator and GDB.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ Contributed by Red Hat.
+
+ 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. */
+
+#if !defined (SIM_PPC_H)
+#define SIM_PPC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The register access functions, sim_fetch_register and
+ sim_store_register, use the following numbering for PowerPC
+ registers. */
+
+enum sim_ppc_regnum
+ {
+ /* General-purpose registers, r0 -- r31. */
+ sim_ppc_r0_regnum,
+ sim_ppc_r1_regnum,
+ sim_ppc_r2_regnum,
+ sim_ppc_r3_regnum,
+ sim_ppc_r4_regnum,
+ sim_ppc_r5_regnum,
+ sim_ppc_r6_regnum,
+ sim_ppc_r7_regnum,
+ sim_ppc_r8_regnum,
+ sim_ppc_r9_regnum,
+ sim_ppc_r10_regnum,
+ sim_ppc_r11_regnum,
+ sim_ppc_r12_regnum,
+ sim_ppc_r13_regnum,
+ sim_ppc_r14_regnum,
+ sim_ppc_r15_regnum,
+ sim_ppc_r16_regnum,
+ sim_ppc_r17_regnum,
+ sim_ppc_r18_regnum,
+ sim_ppc_r19_regnum,
+ sim_ppc_r20_regnum,
+ sim_ppc_r21_regnum,
+ sim_ppc_r22_regnum,
+ sim_ppc_r23_regnum,
+ sim_ppc_r24_regnum,
+ sim_ppc_r25_regnum,
+ sim_ppc_r26_regnum,
+ sim_ppc_r27_regnum,
+ sim_ppc_r28_regnum,
+ sim_ppc_r29_regnum,
+ sim_ppc_r30_regnum,
+ sim_ppc_r31_regnum,
+
+ /* Floating-point registers, f0 -- f31. */
+ sim_ppc_f0_regnum,
+ sim_ppc_f1_regnum,
+ sim_ppc_f2_regnum,
+ sim_ppc_f3_regnum,
+ sim_ppc_f4_regnum,
+ sim_ppc_f5_regnum,
+ sim_ppc_f6_regnum,
+ sim_ppc_f7_regnum,
+ sim_ppc_f8_regnum,
+ sim_ppc_f9_regnum,
+ sim_ppc_f10_regnum,
+ sim_ppc_f11_regnum,
+ sim_ppc_f12_regnum,
+ sim_ppc_f13_regnum,
+ sim_ppc_f14_regnum,
+ sim_ppc_f15_regnum,
+ sim_ppc_f16_regnum,
+ sim_ppc_f17_regnum,
+ sim_ppc_f18_regnum,
+ sim_ppc_f19_regnum,
+ sim_ppc_f20_regnum,
+ sim_ppc_f21_regnum,
+ sim_ppc_f22_regnum,
+ sim_ppc_f23_regnum,
+ sim_ppc_f24_regnum,
+ sim_ppc_f25_regnum,
+ sim_ppc_f26_regnum,
+ sim_ppc_f27_regnum,
+ sim_ppc_f28_regnum,
+ sim_ppc_f29_regnum,
+ sim_ppc_f30_regnum,
+ sim_ppc_f31_regnum,
+
+ /* Altivec vector registers, vr0 -- vr31. */
+ sim_ppc_vr0_regnum,
+ sim_ppc_vr1_regnum,
+ sim_ppc_vr2_regnum,
+ sim_ppc_vr3_regnum,
+ sim_ppc_vr4_regnum,
+ sim_ppc_vr5_regnum,
+ sim_ppc_vr6_regnum,
+ sim_ppc_vr7_regnum,
+ sim_ppc_vr8_regnum,
+ sim_ppc_vr9_regnum,
+ sim_ppc_vr10_regnum,
+ sim_ppc_vr11_regnum,
+ sim_ppc_vr12_regnum,
+ sim_ppc_vr13_regnum,
+ sim_ppc_vr14_regnum,
+ sim_ppc_vr15_regnum,
+ sim_ppc_vr16_regnum,
+ sim_ppc_vr17_regnum,
+ sim_ppc_vr18_regnum,
+ sim_ppc_vr19_regnum,
+ sim_ppc_vr20_regnum,
+ sim_ppc_vr21_regnum,
+ sim_ppc_vr22_regnum,
+ sim_ppc_vr23_regnum,
+ sim_ppc_vr24_regnum,
+ sim_ppc_vr25_regnum,
+ sim_ppc_vr26_regnum,
+ sim_ppc_vr27_regnum,
+ sim_ppc_vr28_regnum,
+ sim_ppc_vr29_regnum,
+ sim_ppc_vr30_regnum,
+ sim_ppc_vr31_regnum,
+
+ /* SPE APU GPR upper halves. These are the upper 32 bits of the
+ gprs; there is one upper-half register for each gpr, so it is
+ appropriate to use sim_ppc_num_gprs for iterating through
+ these. */
+ sim_ppc_rh0_regnum,
+ sim_ppc_rh1_regnum,
+ sim_ppc_rh2_regnum,
+ sim_ppc_rh3_regnum,
+ sim_ppc_rh4_regnum,
+ sim_ppc_rh5_regnum,
+ sim_ppc_rh6_regnum,
+ sim_ppc_rh7_regnum,
+ sim_ppc_rh8_regnum,
+ sim_ppc_rh9_regnum,
+ sim_ppc_rh10_regnum,
+ sim_ppc_rh11_regnum,
+ sim_ppc_rh12_regnum,
+ sim_ppc_rh13_regnum,
+ sim_ppc_rh14_regnum,
+ sim_ppc_rh15_regnum,
+ sim_ppc_rh16_regnum,
+ sim_ppc_rh17_regnum,
+ sim_ppc_rh18_regnum,
+ sim_ppc_rh19_regnum,
+ sim_ppc_rh20_regnum,
+ sim_ppc_rh21_regnum,
+ sim_ppc_rh22_regnum,
+ sim_ppc_rh23_regnum,
+ sim_ppc_rh24_regnum,
+ sim_ppc_rh25_regnum,
+ sim_ppc_rh26_regnum,
+ sim_ppc_rh27_regnum,
+ sim_ppc_rh28_regnum,
+ sim_ppc_rh29_regnum,
+ sim_ppc_rh30_regnum,
+ sim_ppc_rh31_regnum,
+
+ /* SPE APU GPR full registers. Each of these registers is the
+ 64-bit concatenation of a 32-bit GPR (providing the lower bits)
+ and a 32-bit upper-half register (providing the higher bits).
+ As for the upper-half registers, it is appropriate to use
+ sim_ppc_num_gprs with these. */
+ sim_ppc_ev0_regnum,
+ sim_ppc_ev1_regnum,
+ sim_ppc_ev2_regnum,
+ sim_ppc_ev3_regnum,
+ sim_ppc_ev4_regnum,
+ sim_ppc_ev5_regnum,
+ sim_ppc_ev6_regnum,
+ sim_ppc_ev7_regnum,
+ sim_ppc_ev8_regnum,
+ sim_ppc_ev9_regnum,
+ sim_ppc_ev10_regnum,
+ sim_ppc_ev11_regnum,
+ sim_ppc_ev12_regnum,
+ sim_ppc_ev13_regnum,
+ sim_ppc_ev14_regnum,
+ sim_ppc_ev15_regnum,
+ sim_ppc_ev16_regnum,
+ sim_ppc_ev17_regnum,
+ sim_ppc_ev18_regnum,
+ sim_ppc_ev19_regnum,
+ sim_ppc_ev20_regnum,
+ sim_ppc_ev21_regnum,
+ sim_ppc_ev22_regnum,
+ sim_ppc_ev23_regnum,
+ sim_ppc_ev24_regnum,
+ sim_ppc_ev25_regnum,
+ sim_ppc_ev26_regnum,
+ sim_ppc_ev27_regnum,
+ sim_ppc_ev28_regnum,
+ sim_ppc_ev29_regnum,
+ sim_ppc_ev30_regnum,
+ sim_ppc_ev31_regnum,
+
+ /* Segment registers, sr0 -- sr15. */
+ sim_ppc_sr0_regnum,
+ sim_ppc_sr1_regnum,
+ sim_ppc_sr2_regnum,
+ sim_ppc_sr3_regnum,
+ sim_ppc_sr4_regnum,
+ sim_ppc_sr5_regnum,
+ sim_ppc_sr6_regnum,
+ sim_ppc_sr7_regnum,
+ sim_ppc_sr8_regnum,
+ sim_ppc_sr9_regnum,
+ sim_ppc_sr10_regnum,
+ sim_ppc_sr11_regnum,
+ sim_ppc_sr12_regnum,
+ sim_ppc_sr13_regnum,
+ sim_ppc_sr14_regnum,
+ sim_ppc_sr15_regnum,
+
+ /* Miscellaneous --- but non-SPR --- registers. */
+ sim_ppc_pc_regnum,
+ sim_ppc_ps_regnum,
+ sim_ppc_cr_regnum,
+ sim_ppc_fpscr_regnum,
+ sim_ppc_acc_regnum,
+ sim_ppc_vscr_regnum,
+
+ /* Special-purpose registers. */
+ sim_ppc_spr0_regnum, sim_ppc_spr1_regnum,
+ sim_ppc_spr2_regnum, sim_ppc_spr3_regnum,
+ sim_ppc_spr4_regnum, sim_ppc_spr5_regnum,
+ sim_ppc_spr6_regnum, sim_ppc_spr7_regnum,
+ sim_ppc_spr8_regnum, sim_ppc_spr9_regnum,
+ sim_ppc_spr10_regnum, sim_ppc_spr11_regnum,
+ sim_ppc_spr12_regnum, sim_ppc_spr13_regnum,
+ sim_ppc_spr14_regnum, sim_ppc_spr15_regnum,
+ sim_ppc_spr16_regnum, sim_ppc_spr17_regnum,
+ sim_ppc_spr18_regnum, sim_ppc_spr19_regnum,
+ sim_ppc_spr20_regnum, sim_ppc_spr21_regnum,
+ sim_ppc_spr22_regnum, sim_ppc_spr23_regnum,
+ sim_ppc_spr24_regnum, sim_ppc_spr25_regnum,
+ sim_ppc_spr26_regnum, sim_ppc_spr27_regnum,
+ sim_ppc_spr28_regnum, sim_ppc_spr29_regnum,
+ sim_ppc_spr30_regnum, sim_ppc_spr31_regnum,
+ sim_ppc_spr32_regnum, sim_ppc_spr33_regnum,
+ sim_ppc_spr34_regnum, sim_ppc_spr35_regnum,
+ sim_ppc_spr36_regnum, sim_ppc_spr37_regnum,
+ sim_ppc_spr38_regnum, sim_ppc_spr39_regnum,
+ sim_ppc_spr40_regnum, sim_ppc_spr41_regnum,
+ sim_ppc_spr42_regnum, sim_ppc_spr43_regnum,
+ sim_ppc_spr44_regnum, sim_ppc_spr45_regnum,
+ sim_ppc_spr46_regnum, sim_ppc_spr47_regnum,
+ sim_ppc_spr48_regnum, sim_ppc_spr49_regnum,
+ sim_ppc_spr50_regnum, sim_ppc_spr51_regnum,
+ sim_ppc_spr52_regnum, sim_ppc_spr53_regnum,
+ sim_ppc_spr54_regnum, sim_ppc_spr55_regnum,
+ sim_ppc_spr56_regnum, sim_ppc_spr57_regnum,
+ sim_ppc_spr58_regnum, sim_ppc_spr59_regnum,
+ sim_ppc_spr60_regnum, sim_ppc_spr61_regnum,
+ sim_ppc_spr62_regnum, sim_ppc_spr63_regnum,
+ sim_ppc_spr64_regnum, sim_ppc_spr65_regnum,
+ sim_ppc_spr66_regnum, sim_ppc_spr67_regnum,
+ sim_ppc_spr68_regnum, sim_ppc_spr69_regnum,
+ sim_ppc_spr70_regnum, sim_ppc_spr71_regnum,
+ sim_ppc_spr72_regnum, sim_ppc_spr73_regnum,
+ sim_ppc_spr74_regnum, sim_ppc_spr75_regnum,
+ sim_ppc_spr76_regnum, sim_ppc_spr77_regnum,
+ sim_ppc_spr78_regnum, sim_ppc_spr79_regnum,
+ sim_ppc_spr80_regnum, sim_ppc_spr81_regnum,
+ sim_ppc_spr82_regnum, sim_ppc_spr83_regnum,
+ sim_ppc_spr84_regnum, sim_ppc_spr85_regnum,
+ sim_ppc_spr86_regnum, sim_ppc_spr87_regnum,
+ sim_ppc_spr88_regnum, sim_ppc_spr89_regnum,
+ sim_ppc_spr90_regnum, sim_ppc_spr91_regnum,
+ sim_ppc_spr92_regnum, sim_ppc_spr93_regnum,
+ sim_ppc_spr94_regnum, sim_ppc_spr95_regnum,
+ sim_ppc_spr96_regnum, sim_ppc_spr97_regnum,
+ sim_ppc_spr98_regnum, sim_ppc_spr99_regnum,
+ sim_ppc_spr100_regnum, sim_ppc_spr101_regnum,
+ sim_ppc_spr102_regnum, sim_ppc_spr103_regnum,
+ sim_ppc_spr104_regnum, sim_ppc_spr105_regnum,
+ sim_ppc_spr106_regnum, sim_ppc_spr107_regnum,
+ sim_ppc_spr108_regnum, sim_ppc_spr109_regnum,
+ sim_ppc_spr110_regnum, sim_ppc_spr111_regnum,
+ sim_ppc_spr112_regnum, sim_ppc_spr113_regnum,
+ sim_ppc_spr114_regnum, sim_ppc_spr115_regnum,
+ sim_ppc_spr116_regnum, sim_ppc_spr117_regnum,
+ sim_ppc_spr118_regnum, sim_ppc_spr119_regnum,
+ sim_ppc_spr120_regnum, sim_ppc_spr121_regnum,
+ sim_ppc_spr122_regnum, sim_ppc_spr123_regnum,
+ sim_ppc_spr124_regnum, sim_ppc_spr125_regnum,
+ sim_ppc_spr126_regnum, sim_ppc_spr127_regnum,
+ sim_ppc_spr128_regnum, sim_ppc_spr129_regnum,
+ sim_ppc_spr130_regnum, sim_ppc_spr131_regnum,
+ sim_ppc_spr132_regnum, sim_ppc_spr133_regnum,
+ sim_ppc_spr134_regnum, sim_ppc_spr135_regnum,
+ sim_ppc_spr136_regnum, sim_ppc_spr137_regnum,
+ sim_ppc_spr138_regnum, sim_ppc_spr139_regnum,
+ sim_ppc_spr140_regnum, sim_ppc_spr141_regnum,
+ sim_ppc_spr142_regnum, sim_ppc_spr143_regnum,
+ sim_ppc_spr144_regnum, sim_ppc_spr145_regnum,
+ sim_ppc_spr146_regnum, sim_ppc_spr147_regnum,
+ sim_ppc_spr148_regnum, sim_ppc_spr149_regnum,
+ sim_ppc_spr150_regnum, sim_ppc_spr151_regnum,
+ sim_ppc_spr152_regnum, sim_ppc_spr153_regnum,
+ sim_ppc_spr154_regnum, sim_ppc_spr155_regnum,
+ sim_ppc_spr156_regnum, sim_ppc_spr157_regnum,
+ sim_ppc_spr158_regnum, sim_ppc_spr159_regnum,
+ sim_ppc_spr160_regnum, sim_ppc_spr161_regnum,
+ sim_ppc_spr162_regnum, sim_ppc_spr163_regnum,
+ sim_ppc_spr164_regnum, sim_ppc_spr165_regnum,
+ sim_ppc_spr166_regnum, sim_ppc_spr167_regnum,
+ sim_ppc_spr168_regnum, sim_ppc_spr169_regnum,
+ sim_ppc_spr170_regnum, sim_ppc_spr171_regnum,
+ sim_ppc_spr172_regnum, sim_ppc_spr173_regnum,
+ sim_ppc_spr174_regnum, sim_ppc_spr175_regnum,
+ sim_ppc_spr176_regnum, sim_ppc_spr177_regnum,
+ sim_ppc_spr178_regnum, sim_ppc_spr179_regnum,
+ sim_ppc_spr180_regnum, sim_ppc_spr181_regnum,
+ sim_ppc_spr182_regnum, sim_ppc_spr183_regnum,
+ sim_ppc_spr184_regnum, sim_ppc_spr185_regnum,
+ sim_ppc_spr186_regnum, sim_ppc_spr187_regnum,
+ sim_ppc_spr188_regnum, sim_ppc_spr189_regnum,
+ sim_ppc_spr190_regnum, sim_ppc_spr191_regnum,
+ sim_ppc_spr192_regnum, sim_ppc_spr193_regnum,
+ sim_ppc_spr194_regnum, sim_ppc_spr195_regnum,
+ sim_ppc_spr196_regnum, sim_ppc_spr197_regnum,
+ sim_ppc_spr198_regnum, sim_ppc_spr199_regnum,
+ sim_ppc_spr200_regnum, sim_ppc_spr201_regnum,
+ sim_ppc_spr202_regnum, sim_ppc_spr203_regnum,
+ sim_ppc_spr204_regnum, sim_ppc_spr205_regnum,
+ sim_ppc_spr206_regnum, sim_ppc_spr207_regnum,
+ sim_ppc_spr208_regnum, sim_ppc_spr209_regnum,
+ sim_ppc_spr210_regnum, sim_ppc_spr211_regnum,
+ sim_ppc_spr212_regnum, sim_ppc_spr213_regnum,
+ sim_ppc_spr214_regnum, sim_ppc_spr215_regnum,
+ sim_ppc_spr216_regnum, sim_ppc_spr217_regnum,
+ sim_ppc_spr218_regnum, sim_ppc_spr219_regnum,
+ sim_ppc_spr220_regnum, sim_ppc_spr221_regnum,
+ sim_ppc_spr222_regnum, sim_ppc_spr223_regnum,
+ sim_ppc_spr224_regnum, sim_ppc_spr225_regnum,
+ sim_ppc_spr226_regnum, sim_ppc_spr227_regnum,
+ sim_ppc_spr228_regnum, sim_ppc_spr229_regnum,
+ sim_ppc_spr230_regnum, sim_ppc_spr231_regnum,
+ sim_ppc_spr232_regnum, sim_ppc_spr233_regnum,
+ sim_ppc_spr234_regnum, sim_ppc_spr235_regnum,
+ sim_ppc_spr236_regnum, sim_ppc_spr237_regnum,
+ sim_ppc_spr238_regnum, sim_ppc_spr239_regnum,
+ sim_ppc_spr240_regnum, sim_ppc_spr241_regnum,
+ sim_ppc_spr242_regnum, sim_ppc_spr243_regnum,
+ sim_ppc_spr244_regnum, sim_ppc_spr245_regnum,
+ sim_ppc_spr246_regnum, sim_ppc_spr247_regnum,
+ sim_ppc_spr248_regnum, sim_ppc_spr249_regnum,
+ sim_ppc_spr250_regnum, sim_ppc_spr251_regnum,
+ sim_ppc_spr252_regnum, sim_ppc_spr253_regnum,
+ sim_ppc_spr254_regnum, sim_ppc_spr255_regnum,
+ sim_ppc_spr256_regnum, sim_ppc_spr257_regnum,
+ sim_ppc_spr258_regnum, sim_ppc_spr259_regnum,
+ sim_ppc_spr260_regnum, sim_ppc_spr261_regnum,
+ sim_ppc_spr262_regnum, sim_ppc_spr263_regnum,
+ sim_ppc_spr264_regnum, sim_ppc_spr265_regnum,
+ sim_ppc_spr266_regnum, sim_ppc_spr267_regnum,
+ sim_ppc_spr268_regnum, sim_ppc_spr269_regnum,
+ sim_ppc_spr270_regnum, sim_ppc_spr271_regnum,
+ sim_ppc_spr272_regnum, sim_ppc_spr273_regnum,
+ sim_ppc_spr274_regnum, sim_ppc_spr275_regnum,
+ sim_ppc_spr276_regnum, sim_ppc_spr277_regnum,
+ sim_ppc_spr278_regnum, sim_ppc_spr279_regnum,
+ sim_ppc_spr280_regnum, sim_ppc_spr281_regnum,
+ sim_ppc_spr282_regnum, sim_ppc_spr283_regnum,
+ sim_ppc_spr284_regnum, sim_ppc_spr285_regnum,
+ sim_ppc_spr286_regnum, sim_ppc_spr287_regnum,
+ sim_ppc_spr288_regnum, sim_ppc_spr289_regnum,
+ sim_ppc_spr290_regnum, sim_ppc_spr291_regnum,
+ sim_ppc_spr292_regnum, sim_ppc_spr293_regnum,
+ sim_ppc_spr294_regnum, sim_ppc_spr295_regnum,
+ sim_ppc_spr296_regnum, sim_ppc_spr297_regnum,
+ sim_ppc_spr298_regnum, sim_ppc_spr299_regnum,
+ sim_ppc_spr300_regnum, sim_ppc_spr301_regnum,
+ sim_ppc_spr302_regnum, sim_ppc_spr303_regnum,
+ sim_ppc_spr304_regnum, sim_ppc_spr305_regnum,
+ sim_ppc_spr306_regnum, sim_ppc_spr307_regnum,
+ sim_ppc_spr308_regnum, sim_ppc_spr309_regnum,
+ sim_ppc_spr310_regnum, sim_ppc_spr311_regnum,
+ sim_ppc_spr312_regnum, sim_ppc_spr313_regnum,
+ sim_ppc_spr314_regnum, sim_ppc_spr315_regnum,
+ sim_ppc_spr316_regnum, sim_ppc_spr317_regnum,
+ sim_ppc_spr318_regnum, sim_ppc_spr319_regnum,
+ sim_ppc_spr320_regnum, sim_ppc_spr321_regnum,
+ sim_ppc_spr322_regnum, sim_ppc_spr323_regnum,
+ sim_ppc_spr324_regnum, sim_ppc_spr325_regnum,
+ sim_ppc_spr326_regnum, sim_ppc_spr327_regnum,
+ sim_ppc_spr328_regnum, sim_ppc_spr329_regnum,
+ sim_ppc_spr330_regnum, sim_ppc_spr331_regnum,
+ sim_ppc_spr332_regnum, sim_ppc_spr333_regnum,
+ sim_ppc_spr334_regnum, sim_ppc_spr335_regnum,
+ sim_ppc_spr336_regnum, sim_ppc_spr337_regnum,
+ sim_ppc_spr338_regnum, sim_ppc_spr339_regnum,
+ sim_ppc_spr340_regnum, sim_ppc_spr341_regnum,
+ sim_ppc_spr342_regnum, sim_ppc_spr343_regnum,
+ sim_ppc_spr344_regnum, sim_ppc_spr345_regnum,
+ sim_ppc_spr346_regnum, sim_ppc_spr347_regnum,
+ sim_ppc_spr348_regnum, sim_ppc_spr349_regnum,
+ sim_ppc_spr350_regnum, sim_ppc_spr351_regnum,
+ sim_ppc_spr352_regnum, sim_ppc_spr353_regnum,
+ sim_ppc_spr354_regnum, sim_ppc_spr355_regnum,
+ sim_ppc_spr356_regnum, sim_ppc_spr357_regnum,
+ sim_ppc_spr358_regnum, sim_ppc_spr359_regnum,
+ sim_ppc_spr360_regnum, sim_ppc_spr361_regnum,
+ sim_ppc_spr362_regnum, sim_ppc_spr363_regnum,
+ sim_ppc_spr364_regnum, sim_ppc_spr365_regnum,
+ sim_ppc_spr366_regnum, sim_ppc_spr367_regnum,
+ sim_ppc_spr368_regnum, sim_ppc_spr369_regnum,
+ sim_ppc_spr370_regnum, sim_ppc_spr371_regnum,
+ sim_ppc_spr372_regnum, sim_ppc_spr373_regnum,
+ sim_ppc_spr374_regnum, sim_ppc_spr375_regnum,
+ sim_ppc_spr376_regnum, sim_ppc_spr377_regnum,
+ sim_ppc_spr378_regnum, sim_ppc_spr379_regnum,
+ sim_ppc_spr380_regnum, sim_ppc_spr381_regnum,
+ sim_ppc_spr382_regnum, sim_ppc_spr383_regnum,
+ sim_ppc_spr384_regnum, sim_ppc_spr385_regnum,
+ sim_ppc_spr386_regnum, sim_ppc_spr387_regnum,
+ sim_ppc_spr388_regnum, sim_ppc_spr389_regnum,
+ sim_ppc_spr390_regnum, sim_ppc_spr391_regnum,
+ sim_ppc_spr392_regnum, sim_ppc_spr393_regnum,
+ sim_ppc_spr394_regnum, sim_ppc_spr395_regnum,
+ sim_ppc_spr396_regnum, sim_ppc_spr397_regnum,
+ sim_ppc_spr398_regnum, sim_ppc_spr399_regnum,
+ sim_ppc_spr400_regnum, sim_ppc_spr401_regnum,
+ sim_ppc_spr402_regnum, sim_ppc_spr403_regnum,
+ sim_ppc_spr404_regnum, sim_ppc_spr405_regnum,
+ sim_ppc_spr406_regnum, sim_ppc_spr407_regnum,
+ sim_ppc_spr408_regnum, sim_ppc_spr409_regnum,
+ sim_ppc_spr410_regnum, sim_ppc_spr411_regnum,
+ sim_ppc_spr412_regnum, sim_ppc_spr413_regnum,
+ sim_ppc_spr414_regnum, sim_ppc_spr415_regnum,
+ sim_ppc_spr416_regnum, sim_ppc_spr417_regnum,
+ sim_ppc_spr418_regnum, sim_ppc_spr419_regnum,
+ sim_ppc_spr420_regnum, sim_ppc_spr421_regnum,
+ sim_ppc_spr422_regnum, sim_ppc_spr423_regnum,
+ sim_ppc_spr424_regnum, sim_ppc_spr425_regnum,
+ sim_ppc_spr426_regnum, sim_ppc_spr427_regnum,
+ sim_ppc_spr428_regnum, sim_ppc_spr429_regnum,
+ sim_ppc_spr430_regnum, sim_ppc_spr431_regnum,
+ sim_ppc_spr432_regnum, sim_ppc_spr433_regnum,
+ sim_ppc_spr434_regnum, sim_ppc_spr435_regnum,
+ sim_ppc_spr436_regnum, sim_ppc_spr437_regnum,
+ sim_ppc_spr438_regnum, sim_ppc_spr439_regnum,
+ sim_ppc_spr440_regnum, sim_ppc_spr441_regnum,
+ sim_ppc_spr442_regnum, sim_ppc_spr443_regnum,
+ sim_ppc_spr444_regnum, sim_ppc_spr445_regnum,
+ sim_ppc_spr446_regnum, sim_ppc_spr447_regnum,
+ sim_ppc_spr448_regnum, sim_ppc_spr449_regnum,
+ sim_ppc_spr450_regnum, sim_ppc_spr451_regnum,
+ sim_ppc_spr452_regnum, sim_ppc_spr453_regnum,
+ sim_ppc_spr454_regnum, sim_ppc_spr455_regnum,
+ sim_ppc_spr456_regnum, sim_ppc_spr457_regnum,
+ sim_ppc_spr458_regnum, sim_ppc_spr459_regnum,
+ sim_ppc_spr460_regnum, sim_ppc_spr461_regnum,
+ sim_ppc_spr462_regnum, sim_ppc_spr463_regnum,
+ sim_ppc_spr464_regnum, sim_ppc_spr465_regnum,
+ sim_ppc_spr466_regnum, sim_ppc_spr467_regnum,
+ sim_ppc_spr468_regnum, sim_ppc_spr469_regnum,
+ sim_ppc_spr470_regnum, sim_ppc_spr471_regnum,
+ sim_ppc_spr472_regnum, sim_ppc_spr473_regnum,
+ sim_ppc_spr474_regnum, sim_ppc_spr475_regnum,
+ sim_ppc_spr476_regnum, sim_ppc_spr477_regnum,
+ sim_ppc_spr478_regnum, sim_ppc_spr479_regnum,
+ sim_ppc_spr480_regnum, sim_ppc_spr481_regnum,
+ sim_ppc_spr482_regnum, sim_ppc_spr483_regnum,
+ sim_ppc_spr484_regnum, sim_ppc_spr485_regnum,
+ sim_ppc_spr486_regnum, sim_ppc_spr487_regnum,
+ sim_ppc_spr488_regnum, sim_ppc_spr489_regnum,
+ sim_ppc_spr490_regnum, sim_ppc_spr491_regnum,
+ sim_ppc_spr492_regnum, sim_ppc_spr493_regnum,
+ sim_ppc_spr494_regnum, sim_ppc_spr495_regnum,
+ sim_ppc_spr496_regnum, sim_ppc_spr497_regnum,
+ sim_ppc_spr498_regnum, sim_ppc_spr499_regnum,
+ sim_ppc_spr500_regnum, sim_ppc_spr501_regnum,
+ sim_ppc_spr502_regnum, sim_ppc_spr503_regnum,
+ sim_ppc_spr504_regnum, sim_ppc_spr505_regnum,
+ sim_ppc_spr506_regnum, sim_ppc_spr507_regnum,
+ sim_ppc_spr508_regnum, sim_ppc_spr509_regnum,
+ sim_ppc_spr510_regnum, sim_ppc_spr511_regnum,
+ sim_ppc_spr512_regnum, sim_ppc_spr513_regnum,
+ sim_ppc_spr514_regnum, sim_ppc_spr515_regnum,
+ sim_ppc_spr516_regnum, sim_ppc_spr517_regnum,
+ sim_ppc_spr518_regnum, sim_ppc_spr519_regnum,
+ sim_ppc_spr520_regnum, sim_ppc_spr521_regnum,
+ sim_ppc_spr522_regnum, sim_ppc_spr523_regnum,
+ sim_ppc_spr524_regnum, sim_ppc_spr525_regnum,
+ sim_ppc_spr526_regnum, sim_ppc_spr527_regnum,
+ sim_ppc_spr528_regnum, sim_ppc_spr529_regnum,
+ sim_ppc_spr530_regnum, sim_ppc_spr531_regnum,
+ sim_ppc_spr532_regnum, sim_ppc_spr533_regnum,
+ sim_ppc_spr534_regnum, sim_ppc_spr535_regnum,
+ sim_ppc_spr536_regnum, sim_ppc_spr537_regnum,
+ sim_ppc_spr538_regnum, sim_ppc_spr539_regnum,
+ sim_ppc_spr540_regnum, sim_ppc_spr541_regnum,
+ sim_ppc_spr542_regnum, sim_ppc_spr543_regnum,
+ sim_ppc_spr544_regnum, sim_ppc_spr545_regnum,
+ sim_ppc_spr546_regnum, sim_ppc_spr547_regnum,
+ sim_ppc_spr548_regnum, sim_ppc_spr549_regnum,
+ sim_ppc_spr550_regnum, sim_ppc_spr551_regnum,
+ sim_ppc_spr552_regnum, sim_ppc_spr553_regnum,
+ sim_ppc_spr554_regnum, sim_ppc_spr555_regnum,
+ sim_ppc_spr556_regnum, sim_ppc_spr557_regnum,
+ sim_ppc_spr558_regnum, sim_ppc_spr559_regnum,
+ sim_ppc_spr560_regnum, sim_ppc_spr561_regnum,
+ sim_ppc_spr562_regnum, sim_ppc_spr563_regnum,
+ sim_ppc_spr564_regnum, sim_ppc_spr565_regnum,
+ sim_ppc_spr566_regnum, sim_ppc_spr567_regnum,
+ sim_ppc_spr568_regnum, sim_ppc_spr569_regnum,
+ sim_ppc_spr570_regnum, sim_ppc_spr571_regnum,
+ sim_ppc_spr572_regnum, sim_ppc_spr573_regnum,
+ sim_ppc_spr574_regnum, sim_ppc_spr575_regnum,
+ sim_ppc_spr576_regnum, sim_ppc_spr577_regnum,
+ sim_ppc_spr578_regnum, sim_ppc_spr579_regnum,
+ sim_ppc_spr580_regnum, sim_ppc_spr581_regnum,
+ sim_ppc_spr582_regnum, sim_ppc_spr583_regnum,
+ sim_ppc_spr584_regnum, sim_ppc_spr585_regnum,
+ sim_ppc_spr586_regnum, sim_ppc_spr587_regnum,
+ sim_ppc_spr588_regnum, sim_ppc_spr589_regnum,
+ sim_ppc_spr590_regnum, sim_ppc_spr591_regnum,
+ sim_ppc_spr592_regnum, sim_ppc_spr593_regnum,
+ sim_ppc_spr594_regnum, sim_ppc_spr595_regnum,
+ sim_ppc_spr596_regnum, sim_ppc_spr597_regnum,
+ sim_ppc_spr598_regnum, sim_ppc_spr599_regnum,
+ sim_ppc_spr600_regnum, sim_ppc_spr601_regnum,
+ sim_ppc_spr602_regnum, sim_ppc_spr603_regnum,
+ sim_ppc_spr604_regnum, sim_ppc_spr605_regnum,
+ sim_ppc_spr606_regnum, sim_ppc_spr607_regnum,
+ sim_ppc_spr608_regnum, sim_ppc_spr609_regnum,
+ sim_ppc_spr610_regnum, sim_ppc_spr611_regnum,
+ sim_ppc_spr612_regnum, sim_ppc_spr613_regnum,
+ sim_ppc_spr614_regnum, sim_ppc_spr615_regnum,
+ sim_ppc_spr616_regnum, sim_ppc_spr617_regnum,
+ sim_ppc_spr618_regnum, sim_ppc_spr619_regnum,
+ sim_ppc_spr620_regnum, sim_ppc_spr621_regnum,
+ sim_ppc_spr622_regnum, sim_ppc_spr623_regnum,
+ sim_ppc_spr624_regnum, sim_ppc_spr625_regnum,
+ sim_ppc_spr626_regnum, sim_ppc_spr627_regnum,
+ sim_ppc_spr628_regnum, sim_ppc_spr629_regnum,
+ sim_ppc_spr630_regnum, sim_ppc_spr631_regnum,
+ sim_ppc_spr632_regnum, sim_ppc_spr633_regnum,
+ sim_ppc_spr634_regnum, sim_ppc_spr635_regnum,
+ sim_ppc_spr636_regnum, sim_ppc_spr637_regnum,
+ sim_ppc_spr638_regnum, sim_ppc_spr639_regnum,
+ sim_ppc_spr640_regnum, sim_ppc_spr641_regnum,
+ sim_ppc_spr642_regnum, sim_ppc_spr643_regnum,
+ sim_ppc_spr644_regnum, sim_ppc_spr645_regnum,
+ sim_ppc_spr646_regnum, sim_ppc_spr647_regnum,
+ sim_ppc_spr648_regnum, sim_ppc_spr649_regnum,
+ sim_ppc_spr650_regnum, sim_ppc_spr651_regnum,
+ sim_ppc_spr652_regnum, sim_ppc_spr653_regnum,
+ sim_ppc_spr654_regnum, sim_ppc_spr655_regnum,
+ sim_ppc_spr656_regnum, sim_ppc_spr657_regnum,
+ sim_ppc_spr658_regnum, sim_ppc_spr659_regnum,
+ sim_ppc_spr660_regnum, sim_ppc_spr661_regnum,
+ sim_ppc_spr662_regnum, sim_ppc_spr663_regnum,
+ sim_ppc_spr664_regnum, sim_ppc_spr665_regnum,
+ sim_ppc_spr666_regnum, sim_ppc_spr667_regnum,
+ sim_ppc_spr668_regnum, sim_ppc_spr669_regnum,
+ sim_ppc_spr670_regnum, sim_ppc_spr671_regnum,
+ sim_ppc_spr672_regnum, sim_ppc_spr673_regnum,
+ sim_ppc_spr674_regnum, sim_ppc_spr675_regnum,
+ sim_ppc_spr676_regnum, sim_ppc_spr677_regnum,
+ sim_ppc_spr678_regnum, sim_ppc_spr679_regnum,
+ sim_ppc_spr680_regnum, sim_ppc_spr681_regnum,
+ sim_ppc_spr682_regnum, sim_ppc_spr683_regnum,
+ sim_ppc_spr684_regnum, sim_ppc_spr685_regnum,
+ sim_ppc_spr686_regnum, sim_ppc_spr687_regnum,
+ sim_ppc_spr688_regnum, sim_ppc_spr689_regnum,
+ sim_ppc_spr690_regnum, sim_ppc_spr691_regnum,
+ sim_ppc_spr692_regnum, sim_ppc_spr693_regnum,
+ sim_ppc_spr694_regnum, sim_ppc_spr695_regnum,
+ sim_ppc_spr696_regnum, sim_ppc_spr697_regnum,
+ sim_ppc_spr698_regnum, sim_ppc_spr699_regnum,
+ sim_ppc_spr700_regnum, sim_ppc_spr701_regnum,
+ sim_ppc_spr702_regnum, sim_ppc_spr703_regnum,
+ sim_ppc_spr704_regnum, sim_ppc_spr705_regnum,
+ sim_ppc_spr706_regnum, sim_ppc_spr707_regnum,
+ sim_ppc_spr708_regnum, sim_ppc_spr709_regnum,
+ sim_ppc_spr710_regnum, sim_ppc_spr711_regnum,
+ sim_ppc_spr712_regnum, sim_ppc_spr713_regnum,
+ sim_ppc_spr714_regnum, sim_ppc_spr715_regnum,
+ sim_ppc_spr716_regnum, sim_ppc_spr717_regnum,
+ sim_ppc_spr718_regnum, sim_ppc_spr719_regnum,
+ sim_ppc_spr720_regnum, sim_ppc_spr721_regnum,
+ sim_ppc_spr722_regnum, sim_ppc_spr723_regnum,
+ sim_ppc_spr724_regnum, sim_ppc_spr725_regnum,
+ sim_ppc_spr726_regnum, sim_ppc_spr727_regnum,
+ sim_ppc_spr728_regnum, sim_ppc_spr729_regnum,
+ sim_ppc_spr730_regnum, sim_ppc_spr731_regnum,
+ sim_ppc_spr732_regnum, sim_ppc_spr733_regnum,
+ sim_ppc_spr734_regnum, sim_ppc_spr735_regnum,
+ sim_ppc_spr736_regnum, sim_ppc_spr737_regnum,
+ sim_ppc_spr738_regnum, sim_ppc_spr739_regnum,
+ sim_ppc_spr740_regnum, sim_ppc_spr741_regnum,
+ sim_ppc_spr742_regnum, sim_ppc_spr743_regnum,
+ sim_ppc_spr744_regnum, sim_ppc_spr745_regnum,
+ sim_ppc_spr746_regnum, sim_ppc_spr747_regnum,
+ sim_ppc_spr748_regnum, sim_ppc_spr749_regnum,
+ sim_ppc_spr750_regnum, sim_ppc_spr751_regnum,
+ sim_ppc_spr752_regnum, sim_ppc_spr753_regnum,
+ sim_ppc_spr754_regnum, sim_ppc_spr755_regnum,
+ sim_ppc_spr756_regnum, sim_ppc_spr757_regnum,
+ sim_ppc_spr758_regnum, sim_ppc_spr759_regnum,
+ sim_ppc_spr760_regnum, sim_ppc_spr761_regnum,
+ sim_ppc_spr762_regnum, sim_ppc_spr763_regnum,
+ sim_ppc_spr764_regnum, sim_ppc_spr765_regnum,
+ sim_ppc_spr766_regnum, sim_ppc_spr767_regnum,
+ sim_ppc_spr768_regnum, sim_ppc_spr769_regnum,
+ sim_ppc_spr770_regnum, sim_ppc_spr771_regnum,
+ sim_ppc_spr772_regnum, sim_ppc_spr773_regnum,
+ sim_ppc_spr774_regnum, sim_ppc_spr775_regnum,
+ sim_ppc_spr776_regnum, sim_ppc_spr777_regnum,
+ sim_ppc_spr778_regnum, sim_ppc_spr779_regnum,
+ sim_ppc_spr780_regnum, sim_ppc_spr781_regnum,
+ sim_ppc_spr782_regnum, sim_ppc_spr783_regnum,
+ sim_ppc_spr784_regnum, sim_ppc_spr785_regnum,
+ sim_ppc_spr786_regnum, sim_ppc_spr787_regnum,
+ sim_ppc_spr788_regnum, sim_ppc_spr789_regnum,
+ sim_ppc_spr790_regnum, sim_ppc_spr791_regnum,
+ sim_ppc_spr792_regnum, sim_ppc_spr793_regnum,
+ sim_ppc_spr794_regnum, sim_ppc_spr795_regnum,
+ sim_ppc_spr796_regnum, sim_ppc_spr797_regnum,
+ sim_ppc_spr798_regnum, sim_ppc_spr799_regnum,
+ sim_ppc_spr800_regnum, sim_ppc_spr801_regnum,
+ sim_ppc_spr802_regnum, sim_ppc_spr803_regnum,
+ sim_ppc_spr804_regnum, sim_ppc_spr805_regnum,
+ sim_ppc_spr806_regnum, sim_ppc_spr807_regnum,
+ sim_ppc_spr808_regnum, sim_ppc_spr809_regnum,
+ sim_ppc_spr810_regnum, sim_ppc_spr811_regnum,
+ sim_ppc_spr812_regnum, sim_ppc_spr813_regnum,
+ sim_ppc_spr814_regnum, sim_ppc_spr815_regnum,
+ sim_ppc_spr816_regnum, sim_ppc_spr817_regnum,
+ sim_ppc_spr818_regnum, sim_ppc_spr819_regnum,
+ sim_ppc_spr820_regnum, sim_ppc_spr821_regnum,
+ sim_ppc_spr822_regnum, sim_ppc_spr823_regnum,
+ sim_ppc_spr824_regnum, sim_ppc_spr825_regnum,
+ sim_ppc_spr826_regnum, sim_ppc_spr827_regnum,
+ sim_ppc_spr828_regnum, sim_ppc_spr829_regnum,
+ sim_ppc_spr830_regnum, sim_ppc_spr831_regnum,
+ sim_ppc_spr832_regnum, sim_ppc_spr833_regnum,
+ sim_ppc_spr834_regnum, sim_ppc_spr835_regnum,
+ sim_ppc_spr836_regnum, sim_ppc_spr837_regnum,
+ sim_ppc_spr838_regnum, sim_ppc_spr839_regnum,
+ sim_ppc_spr840_regnum, sim_ppc_spr841_regnum,
+ sim_ppc_spr842_regnum, sim_ppc_spr843_regnum,
+ sim_ppc_spr844_regnum, sim_ppc_spr845_regnum,
+ sim_ppc_spr846_regnum, sim_ppc_spr847_regnum,
+ sim_ppc_spr848_regnum, sim_ppc_spr849_regnum,
+ sim_ppc_spr850_regnum, sim_ppc_spr851_regnum,
+ sim_ppc_spr852_regnum, sim_ppc_spr853_regnum,
+ sim_ppc_spr854_regnum, sim_ppc_spr855_regnum,
+ sim_ppc_spr856_regnum, sim_ppc_spr857_regnum,
+ sim_ppc_spr858_regnum, sim_ppc_spr859_regnum,
+ sim_ppc_spr860_regnum, sim_ppc_spr861_regnum,
+ sim_ppc_spr862_regnum, sim_ppc_spr863_regnum,
+ sim_ppc_spr864_regnum, sim_ppc_spr865_regnum,
+ sim_ppc_spr866_regnum, sim_ppc_spr867_regnum,
+ sim_ppc_spr868_regnum, sim_ppc_spr869_regnum,
+ sim_ppc_spr870_regnum, sim_ppc_spr871_regnum,
+ sim_ppc_spr872_regnum, sim_ppc_spr873_regnum,
+ sim_ppc_spr874_regnum, sim_ppc_spr875_regnum,
+ sim_ppc_spr876_regnum, sim_ppc_spr877_regnum,
+ sim_ppc_spr878_regnum, sim_ppc_spr879_regnum,
+ sim_ppc_spr880_regnum, sim_ppc_spr881_regnum,
+ sim_ppc_spr882_regnum, sim_ppc_spr883_regnum,
+ sim_ppc_spr884_regnum, sim_ppc_spr885_regnum,
+ sim_ppc_spr886_regnum, sim_ppc_spr887_regnum,
+ sim_ppc_spr888_regnum, sim_ppc_spr889_regnum,
+ sim_ppc_spr890_regnum, sim_ppc_spr891_regnum,
+ sim_ppc_spr892_regnum, sim_ppc_spr893_regnum,
+ sim_ppc_spr894_regnum, sim_ppc_spr895_regnum,
+ sim_ppc_spr896_regnum, sim_ppc_spr897_regnum,
+ sim_ppc_spr898_regnum, sim_ppc_spr899_regnum,
+ sim_ppc_spr900_regnum, sim_ppc_spr901_regnum,
+ sim_ppc_spr902_regnum, sim_ppc_spr903_regnum,
+ sim_ppc_spr904_regnum, sim_ppc_spr905_regnum,
+ sim_ppc_spr906_regnum, sim_ppc_spr907_regnum,
+ sim_ppc_spr908_regnum, sim_ppc_spr909_regnum,
+ sim_ppc_spr910_regnum, sim_ppc_spr911_regnum,
+ sim_ppc_spr912_regnum, sim_ppc_spr913_regnum,
+ sim_ppc_spr914_regnum, sim_ppc_spr915_regnum,
+ sim_ppc_spr916_regnum, sim_ppc_spr917_regnum,
+ sim_ppc_spr918_regnum, sim_ppc_spr919_regnum,
+ sim_ppc_spr920_regnum, sim_ppc_spr921_regnum,
+ sim_ppc_spr922_regnum, sim_ppc_spr923_regnum,
+ sim_ppc_spr924_regnum, sim_ppc_spr925_regnum,
+ sim_ppc_spr926_regnum, sim_ppc_spr927_regnum,
+ sim_ppc_spr928_regnum, sim_ppc_spr929_regnum,
+ sim_ppc_spr930_regnum, sim_ppc_spr931_regnum,
+ sim_ppc_spr932_regnum, sim_ppc_spr933_regnum,
+ sim_ppc_spr934_regnum, sim_ppc_spr935_regnum,
+ sim_ppc_spr936_regnum, sim_ppc_spr937_regnum,
+ sim_ppc_spr938_regnum, sim_ppc_spr939_regnum,
+ sim_ppc_spr940_regnum, sim_ppc_spr941_regnum,
+ sim_ppc_spr942_regnum, sim_ppc_spr943_regnum,
+ sim_ppc_spr944_regnum, sim_ppc_spr945_regnum,
+ sim_ppc_spr946_regnum, sim_ppc_spr947_regnum,
+ sim_ppc_spr948_regnum, sim_ppc_spr949_regnum,
+ sim_ppc_spr950_regnum, sim_ppc_spr951_regnum,
+ sim_ppc_spr952_regnum, sim_ppc_spr953_regnum,
+ sim_ppc_spr954_regnum, sim_ppc_spr955_regnum,
+ sim_ppc_spr956_regnum, sim_ppc_spr957_regnum,
+ sim_ppc_spr958_regnum, sim_ppc_spr959_regnum,
+ sim_ppc_spr960_regnum, sim_ppc_spr961_regnum,
+ sim_ppc_spr962_regnum, sim_ppc_spr963_regnum,
+ sim_ppc_spr964_regnum, sim_ppc_spr965_regnum,
+ sim_ppc_spr966_regnum, sim_ppc_spr967_regnum,
+ sim_ppc_spr968_regnum, sim_ppc_spr969_regnum,
+ sim_ppc_spr970_regnum, sim_ppc_spr971_regnum,
+ sim_ppc_spr972_regnum, sim_ppc_spr973_regnum,
+ sim_ppc_spr974_regnum, sim_ppc_spr975_regnum,
+ sim_ppc_spr976_regnum, sim_ppc_spr977_regnum,
+ sim_ppc_spr978_regnum, sim_ppc_spr979_regnum,
+ sim_ppc_spr980_regnum, sim_ppc_spr981_regnum,
+ sim_ppc_spr982_regnum, sim_ppc_spr983_regnum,
+ sim_ppc_spr984_regnum, sim_ppc_spr985_regnum,
+ sim_ppc_spr986_regnum, sim_ppc_spr987_regnum,
+ sim_ppc_spr988_regnum, sim_ppc_spr989_regnum,
+ sim_ppc_spr990_regnum, sim_ppc_spr991_regnum,
+ sim_ppc_spr992_regnum, sim_ppc_spr993_regnum,
+ sim_ppc_spr994_regnum, sim_ppc_spr995_regnum,
+ sim_ppc_spr996_regnum, sim_ppc_spr997_regnum,
+ sim_ppc_spr998_regnum, sim_ppc_spr999_regnum,
+ sim_ppc_spr1000_regnum, sim_ppc_spr1001_regnum,
+ sim_ppc_spr1002_regnum, sim_ppc_spr1003_regnum,
+ sim_ppc_spr1004_regnum, sim_ppc_spr1005_regnum,
+ sim_ppc_spr1006_regnum, sim_ppc_spr1007_regnum,
+ sim_ppc_spr1008_regnum, sim_ppc_spr1009_regnum,
+ sim_ppc_spr1010_regnum, sim_ppc_spr1011_regnum,
+ sim_ppc_spr1012_regnum, sim_ppc_spr1013_regnum,
+ sim_ppc_spr1014_regnum, sim_ppc_spr1015_regnum,
+ sim_ppc_spr1016_regnum, sim_ppc_spr1017_regnum,
+ sim_ppc_spr1018_regnum, sim_ppc_spr1019_regnum,
+ sim_ppc_spr1020_regnum, sim_ppc_spr1021_regnum,
+ sim_ppc_spr1022_regnum, sim_ppc_spr1023_regnum
+ };
+
+
+/* Sizes of various register sets. */
+enum
+ {
+ sim_ppc_num_gprs = 32,
+ sim_ppc_num_fprs = 32,
+ sim_ppc_num_vrs = 32,
+ sim_ppc_num_srs = 16,
+ sim_ppc_num_sprs = 1024,
+ };
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SIM_PPC_H */
diff --git a/include/gdb/sim-sh.h b/include/gdb/sim-sh.h
index ec0d6276b4b..a40eff6311c 100644
--- a/include/gdb/sim-sh.h
+++ b/include/gdb/sim-sh.h
@@ -1,5 +1,5 @@
/* This file defines the interface between the sh simulator and gdb.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -129,8 +129,17 @@ enum
SIM_SH_R4_BANK_REGNUM,
SIM_SH_R5_BANK_REGNUM,
SIM_SH_R6_BANK_REGNUM,
- SIM_SH_R7_BANK_REGNUM
- /* 100..127: room for expansion. */
+ SIM_SH_R7_BANK_REGNUM,
+ /* 109..127: room for expansion. */
+ SIM_SH_TBR_REGNUM,
+ SIM_SH_IBNR_REGNUM,
+ SIM_SH_IBCR_REGNUM,
+ SIM_SH_BANK_REGNUM,
+ SIM_SH_BANK_MACL_REGNUM,
+ SIM_SH_BANK_GBR_REGNUM,
+ SIM_SH_BANK_PR_REGNUM,
+ SIM_SH_BANK_IVN_REGNUM,
+ SIM_SH_BANK_MACH_REGNUM
};
enum
diff --git a/include/hashtab.h b/include/hashtab.h
index 1af7368d338..de24dedb91b 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -101,13 +101,13 @@ struct htab GTY(())
/* Table itself. */
PTR * GTY ((use_param, length ("%h.size"))) entries;
- /* Current size (in entries) of the hash table */
+ /* Current size (in entries) of the hash table. */
size_t size;
- /* Current number of elements including also deleted elements */
+ /* Current number of elements including also deleted elements. */
size_t n_elements;
- /* Current number of deleted elements in the table */
+ /* Current number of deleted elements in the table. */
size_t n_deleted;
/* The following member is used for debugging. Its value is number
@@ -126,6 +126,10 @@ struct htab GTY(())
PTR GTY((skip)) alloc_arg;
htab_alloc_with_arg alloc_with_arg_f;
htab_free_with_arg free_with_arg_f;
+
+ /* Current size (in entries) of the hash table, as an index into the
+ table of primes. */
+ unsigned int size_prime_index;
};
typedef struct htab *htab_t;
@@ -166,6 +170,7 @@ extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
enum insert_option));
extern void htab_clear_slot PARAMS ((htab_t, void **));
extern void htab_remove_elt PARAMS ((htab_t, void *));
+extern void htab_remove_elt_with_hash PARAMS ((htab_t, void *, hashval_t));
extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
diff --git a/include/libiberty.h b/include/libiberty.h
index 761b2cf060f..c9f480aaf69 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -74,7 +74,7 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
#if !HAVE_DECL_BASENAME
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME)
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();
@@ -93,7 +93,7 @@ extern char *lrealpath PARAMS ((const char *));
the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
-extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
@@ -102,27 +102,27 @@ extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
pointer to be freed after the new string is created, similar to the
way xrealloc works. */
-extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC;
+extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Determine the length of concatenating an arbitrary number of
strings. You must pass NULL as the last argument of this function,
to terminate the list of strings. */
-extern unsigned long concat_length PARAMS ((const char *, ...));
+extern unsigned long concat_length PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a SUPPLIED area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy PARAMS ((char *, const char *, ...));
+extern char *concat_copy PARAMS ((char *, const char *, ...)) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a GLOBAL area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy2 PARAMS ((const char *, ...));
+extern char *concat_copy2 PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL;
/* This is the global area used by concat_copy2. */
@@ -250,6 +250,37 @@ extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
extern double physmem_total PARAMS ((void));
extern double physmem_available PARAMS ((void));
+
+/* These macros provide a K&R/C89/C++-friendly way of allocating structures
+ with nice encapsulation. The XDELETE*() macros are technically
+ superfluous, but provided here for symmetry. Using them consistently
+ makes it easier to update client code to use different allocators such
+ as new/delete and new[]/delete[]. */
+
+/* Scalar allocators. */
+
+#define XNEW(T) ((T *) xmalloc (sizeof (T)))
+#define XCNEW(T) ((T *) xcalloc (1, sizeof (T)))
+#define XDELETE(P) free ((void*) (P))
+
+/* Array allocators. */
+
+#define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N)))
+#define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T)))
+#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N)))
+#define XDELETEVEC(P) free ((void*) (P))
+
+/* Allocators for variable-sized structures and raw buffers. */
+
+#define XNEWVAR(T, S) ((T *) xmalloc ((S)))
+#define XCNEWVAR(T, S) ((T *) xcalloc (1, (S)))
+#define XRESIZEVAR(T, P, S) ((T *) xrealloc ((P), (S)))
+
+/* Type-safe obstack allocator. */
+
+#define XOBNEW(O, T) ((T *) obstack_alloc ((O), sizeof (T)))
+
+
/* hex character manipulation routines */
#define _hex_array_size 256
@@ -309,7 +340,7 @@ extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
# define ASTRDUP(X) \
(__extension__ ({ const char *const libiberty_optr = (X); \
const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
- char *const libiberty_nptr = alloca (libiberty_len); \
+ char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
(char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
#else
# define alloca(x) C_alloca(x)
@@ -323,7 +354,7 @@ extern unsigned long libiberty_len;
# define ASTRDUP(X) \
(libiberty_optr = (X), \
libiberty_len = strlen (libiberty_optr) + 1, \
- libiberty_nptr = alloca (libiberty_len), \
+ libiberty_nptr = (char *) alloca (libiberty_len), \
(char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
#endif
diff --git a/include/obstack.h b/include/obstack.h
index 5496ff24071..007853e805d 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -494,9 +494,9 @@ __extension__ \
# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
+ void *__obj = (void *) (OBJ); \
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __obj; \
+ __o->next_free = __o->object_base = (char *) __obj; \
else (obstack_free) (__o, __obj); })
#else /* not __GNUC__ or not __STDC__ */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index ebde6b6164d..462165c45cf 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,70 @@
+2004-09-11 Theodore A. Roth <troth@openavr.org>
+
+ * avr.h: Add support for
+ atmega48, atmega88, atmega168, attiny13, attiny2313, at90can128.
+
+2004-09-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * ppc.h (PPC_OPERAND_OPTIONAL): Fix comment.
+
+2004-08-24 Dmitry Diky <diwil@spec.ru>
+
+ * msp430.h (msp430_opc): Add new instructions.
+ (msp430_rcodes): Declare new instructions.
+ (msp430_hcodes): Likewise..
+
+2004-08-13 Nick Clifton <nickc@redhat.com>
+
+ PR/301
+ * h8300.h (O_JSR): Do not allow VECIND addressing for non-SX
+ processors.
+
+2004-08-30 Michal Ludvig <mludvig@suse.cz>
+
+ * i386.h (i386_optab): Added montmul/xsha1/xsha256 insns.
+
+2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Allow cs/ds in 64bit for branch hints.
+
+2004-07-21 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h: Adjust instruction descriptions to better match the
+ specification.
+
+2004-07-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h: Remove all old content. Replace with architecture defines
+ from gas/config/tc-arm.c.
+
+2004-07-09 Andreas Schwab <schwab@suse.de>
+
+ * m68k.h: Fix comment.
+
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: New file.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Remove fildd, fistpd and fisttpd.
+
+2004-05-24 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add 'size' to m68k_opcode.
+
+2004-05-05 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Switch from ColdFire chip name to core variant.
+
+2004-04-22 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add mcfmac/mcfemac definitions. Update operand
+ descriptions for new EMAC cases.
+ Remove ColdFire macmw/macml/msacmw/msacmw hacks and properly
+ handle Motorola MAC syntax.
+ Allow disassembly of ColdFire V4e object files.
+
2004-03-16 Alan Modra <amodra@bigpond.net.au>
* ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines.
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 99bb9a64f01..6ccccbd4eca 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -1,294 +1,91 @@
-/* ARM opcode list.
- Copyright 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are 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 1, or (at your option)
-any later version.
-
-GDB and GAS are 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 GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* types of instruction (encoded in bits 26 and 27 of the instruction) */
-
-#define TYPE_ARITHMETIC 0
-#define TYPE_LDR_STR 1
-#define TYPE_BLOCK_BRANCH 2
-#define TYPE_SWI 3
-
-/* bit 25 decides whether an instruction is a block move or a branch */
-#define SUBTYPE_BLOCK 0
-#define SUBTYPE_BRANCH 1
-
-/* codes to distinguish the arithmetic instructions */
-
-#define OPCODE_AND 0
-#define OPCODE_EOR 1
-#define OPCODE_SUB 2
-#define OPCODE_RSB 3
-#define OPCODE_ADD 4
-#define OPCODE_ADC 5
-#define OPCODE_SBC 6
-#define OPCODE_RSC 7
-#define OPCODE_TST 8
-#define OPCODE_TEQ 9
-#define OPCODE_CMP 10
-#define OPCODE_CMN 11
-#define OPCODE_ORR 12
-#define OPCODE_MOV 13
-#define OPCODE_BIC 14
-#define OPCODE_MVN 15
-
-/* condition codes */
-
-#define COND_EQ 0
-#define COND_NE 1
-#define COND_CS 2
-#define COND_CC 3
-#define COND_MI 4
-#define COND_PL 5
-#define COND_VS 6
-#define COND_VC 7
-#define COND_HI 8
-#define COND_LS 9
-#define COND_GE 10
-#define COND_LT 11
-#define COND_GT 12
-#define COND_LE 13
-#define COND_AL 14
-#define COND_NV 15
-
-/* Describes the format of an ARM machine instruction */
-
-struct generic_fmt {
- unsigned rest :25; /* the rest of the instruction */
- unsigned subtype :1; /* used to decide between block and branch */
- unsigned type :2; /* one of TYPE_* */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct arith_fmt {
- unsigned operand2 :12; /* #nn or rn or rn shift #m or rn shift rm */
- unsigned dest :4; /* place where the answer goes */
- unsigned operand1 :4; /* first operand to instruction */
- unsigned set :1; /* == 1 means set processor flags */
- unsigned opcode :4; /* one of OPCODE_* defined above */
- unsigned immed :1; /* operand2 is an immediate value */
- unsigned type :2; /* == TYPE_ARITHMETIC */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct ldr_str_fmt {
- unsigned offset :12; /* #nn or rn or rn shift #m */
- unsigned reg :4; /* destination for LDR, source for STR */
- unsigned base :4; /* base register */
- unsigned is_load :1; /* == 1 for LDR */
- unsigned writeback :1; /* == 1 means write back (base+offset) into base */
- unsigned byte :1; /* == 1 means byte access else word */
- unsigned up :1; /* == 1 means add offset else subtract it */
- unsigned pre_index :1; /* == 1 means [a,b] form else [a],b form */
- unsigned immed :1; /* == 0 means immediate offset */
- unsigned type :2; /* == TYPE_LDR_STR */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct block_fmt {
- unsigned mask :16; /* register mask */
- unsigned base :4; /* register used as base of move */
- unsigned is_load :1; /* == 1 for LDM */
- unsigned writeback :1; /* == 1 means update base after move */
- unsigned set :1; /* == 1 means set flags in pc if included in mask */
- unsigned increment :1; /* == 1 means increment base register */
- unsigned before :1; /* == 1 means inc/dec before each move */
- unsigned is_block :1; /* == SUBTYPE_BLOCK */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct branch_fmt {
- unsigned dest :24; /* destination of the branch */
- unsigned link :1; /* branch with link (function call) */
- unsigned is_branch :1; /* == SUBTYPE_BRANCH */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-#define ROUND_N 0
-#define ROUND_P 1
-#define ROUND_M 2
-#define ROUND_Z 3
-
-#define FLOAT2_MVF 0
-#define FLOAT2_MNF 1
-#define FLOAT2_ABS 2
-#define FLOAT2_RND 3
-#define FLOAT2_SQT 4
-#define FLOAT2_LOG 5
-#define FLOAT2_LGN 6
-#define FLOAT2_EXP 7
-#define FLOAT2_SIN 8
-#define FLOAT2_COS 9
-#define FLOAT2_TAN 10
-#define FLOAT2_ASN 11
-#define FLOAT2_ACS 12
-#define FLOAT2_ATN 13
-
-#define FLOAT3_ADF 0
-#define FLOAT3_MUF 1
-#define FLOAT3_SUF 2
-#define FLOAT3_RSF 3
-#define FLOAT3_DVF 4
-#define FLOAT3_RDF 5
-#define FLOAT3_POW 6
-#define FLOAT3_RPW 7
-#define FLOAT3_RMF 8
-#define FLOAT3_FML 9
-#define FLOAT3_FDV 10
-#define FLOAT3_FRD 11
-#define FLOAT3_POL 12
-
-struct float2_fmt {
- unsigned operand2 :3; /* second operand */
- unsigned immed :1; /* == 1 if second operand is a constant */
- unsigned pad1 :1; /* == 0 */
- unsigned rounding :2; /* ROUND_* */
- unsigned is_double :1; /* == 1 if precision is double (only if not extended) */
- unsigned pad2 :4; /* == 1 */
- unsigned dest :3; /* destination */
- unsigned is_2_op :1; /* == 1 if 2 operand ins */
- unsigned operand1 :3; /* first operand (only of is_2_op == 0) */
- unsigned is_extended :1; /* == 1 if precision is extended */
- unsigned opcode :4; /* FLOAT2_* or FLOAT3_* depending on is_2_op */
- unsigned must_be_2 :2; /* == 2 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* COND_* */
-};
-
-struct swi_fmt {
- unsigned argument :24; /* argument to SWI (syscall number) */
- unsigned must_be_3 :2; /* == 3 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-union insn_fmt {
- struct generic_fmt generic;
- struct arith_fmt arith;
- struct ldr_str_fmt ldr_str;
- struct block_fmt block;
- struct branch_fmt branch;
- struct swi_fmt swi;
- unsigned long ins;
-};
-
-struct opcode {
- unsigned long value, mask; /* recognise instruction if (op&mask)==value */
- char *assembler; /* how to disassemble this instruction */
-};
-
-/* format of the assembler string :
-
- %% %
- %<bitfield>d print the bitfield in decimal
- %<bitfield>x print the bitfield in hex
- %<bitfield>r print as an ARM register
- %<bitfield>f print a floating point constant if >7 else an fp register
- %c print condition code (always bits 28-31)
- %P print floating point precision in arithmetic insn
- %Q print floating point precision in ldf/stf insn
- %R print floating point rounding mode
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
- %p print 'p' iff bits 12-15 are 15
- %o print operand2 (immediate or register + shift)
- %a print address for ldr/str instruction
- %b print branch destination
- %A print address for ldc/stc/ldf/stf instruction
- %m print register mask for ldm/stm instruction
-*/
-
-static struct opcode opcodes[] = {
- /* ARM instructions */
- 0x00000090, 0x0fe000f0, "mul%20's %12-15r, %16-19r, %0-3r",
- 0x00200090, 0x0fe000f0, "mla%20's %12-15r, %16-19r, %0-3r, %8-11r",
- 0x00000000, 0x0de00000, "and%c%20's %12-15r, %16-19r, %o",
- 0x00200000, 0x0de00000, "eor%c%20's %12-15r, %16-19r, %o",
- 0x00400000, 0x0de00000, "sub%c%20's %12-15r, %16-19r, %o",
- 0x00600000, 0x0de00000, "rsb%c%20's %12-15r, %16-19r, %o",
- 0x00800000, 0x0de00000, "add%c%20's %12-15r, %16-19r, %o",
- 0x00a00000, 0x0de00000, "adc%c%20's %12-15r, %16-19r, %o",
- 0x00c00000, 0x0de00000, "sbc%c%20's %12-15r, %16-19r, %o",
- 0x00e00000, 0x0de00000, "rsc%c%20's %12-15r, %16-19r, %o",
- 0x01000000, 0x0de00000, "tst%c%p %16-19r, %o",
- 0x01200000, 0x0de00000, "teq%c%p %16-19r, %o",
- 0x01400000, 0x0de00000, "cmp%c%p %16-19r, %o",
- 0x01600000, 0x0de00000, "cmn%c%p %16-19r, %o",
- 0x01800000, 0x0de00000, "orr%c%20's %12-15r, %16-19r, %o",
- 0x01a00000, 0x0de00000, "mov%c%20's %12-15r, %o",
- 0x01c00000, 0x0de00000, "bic%c%20's %12-15r, %16-19r, %o",
- 0x01e00000, 0x0de00000, "mvn%c%20's %12-15r, %o",
- 0x04000000, 0x0c100000, "str%c%22'b %12-15r, %a",
- 0x04100000, 0x0c100000, "ldr%c%22'b %12-15r, %a",
- 0x08000000, 0x0e100000, "stm%c%23?id%24?ba %16-19r%22`!, %m",
- 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba %16-19r%22`!, %m%22'^",
- 0x0a000000, 0x0e000000, "b%c%24'l %b",
- 0x0f000000, 0x0f000000, "swi%c %0-23x",
- /* Floating point coprocessor instructions */
- 0x0e000100, 0x0ff08f10, "adf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e100100, 0x0ff08f10, "muf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e200100, 0x0ff08f10, "suf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e300100, 0x0ff08f10, "rsf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e400100, 0x0ff08f10, "dvf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e500100, 0x0ff08f10, "rdf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e600100, 0x0ff08f10, "pow%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e700100, 0x0ff08f10, "rpw%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e800100, 0x0ff08f10, "rmf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e900100, 0x0ff08f10, "fml%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ea00100, 0x0ff08f10, "fdv%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0eb00100, 0x0ff08f10, "frd%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ec00100, 0x0ff08f10, "pol%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e008100, 0x0ff08f10, "mvf%c%P%R %12-14f, %0-3f",
- 0x0e108100, 0x0ff08f10, "mnf%c%P%R %12-14f, %0-3f",
- 0x0e208100, 0x0ff08f10, "abs%c%P%R %12-14f, %0-3f",
- 0x0e308100, 0x0ff08f10, "rnd%c%P%R %12-14f, %0-3f",
- 0x0e408100, 0x0ff08f10, "sqt%c%P%R %12-14f, %0-3f",
- 0x0e508100, 0x0ff08f10, "log%c%P%R %12-14f, %0-3f",
- 0x0e608100, 0x0ff08f10, "lgn%c%P%R %12-14f, %0-3f",
- 0x0e708100, 0x0ff08f10, "exp%c%P%R %12-14f, %0-3f",
- 0x0e808100, 0x0ff08f10, "sin%c%P%R %12-14f, %0-3f",
- 0x0e908100, 0x0ff08f10, "cos%c%P%R %12-14f, %0-3f",
- 0x0ea08100, 0x0ff08f10, "tan%c%P%R %12-14f, %0-3f",
- 0x0eb08100, 0x0ff08f10, "asn%c%P%R %12-14f, %0-3f",
- 0x0ec08100, 0x0ff08f10, "acs%c%P%R %12-14f, %0-3f",
- 0x0ed08100, 0x0ff08f10, "atn%c%P%R %12-14f, %0-3f",
- 0x0e000110, 0x0ff00f1f, "flt%c%P%R %16-18f, %12-15r",
- 0x0e100110, 0x0fff0f98, "fix%c%R %12-15r, %0-2f",
- 0x0e200110, 0x0fff0fff, "wfs%c %12-15r",
- 0x0e300110, 0x0fff0fff, "rfs%c %12-15r",
- 0x0e400110, 0x0fff0fff, "wfc%c %12-15r",
- 0x0e500110, 0x0fff0fff, "rfc%c %12-15r",
- 0x0e90f110, 0x0ff8fff0, "cmf%c %16-18f, %0-3f",
- 0x0eb0f110, 0x0ff8fff0, "cnf%c %16-18f, %0-3f",
- 0x0ed0f110, 0x0ff8fff0, "cmfe%c %16-18f, %0-3f",
- 0x0ef0f110, 0x0ff8fff0, "cnfe%c %16-18f, %0-3f",
- 0x0c000100, 0x0e100f00, "stf%c%Q %12-14f, %A",
- 0x0c100100, 0x0e100f00, "ldf%c%Q %12-14f, %A",
- /* Generic coprocessor instructions */
- 0x0e000000, 0x0f000010, "cdp%c %8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e000010, 0x0f100010, "mrc%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e100010, 0x0f100010, "mcr%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0c000000, 0x0e100000, "stc%c%22`l %8-11d, cr%12-15d, %A",
- 0x0c100000, 0x0e100000, "ldc%c%22`l %8-11d, cr%12-15d, %A",
- /* the rest */
- 0x00000000, 0x00000000, "undefined instruction %0-31x",
-};
-#define N_OPCODES (sizeof opcodes / sizeof opcodes[0])
+/* ARM assembler/disassembler support.
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB and GAS.
+
+ GDB and GAS are 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 1, or (at
+ your option) any later version.
+
+ GDB and GAS are 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 GDB or GAS; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+/* The following bitmasks control CPU extensions: */
+#define ARM_EXT_V1 0x00000001 /* All processors (core set). */
+#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */
+#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */
+#define ARM_EXT_V3 0x00000008 /* MSR MRS. */
+#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */
+#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */
+#define ARM_EXT_V4T 0x00000040 /* Thumb v1. */
+#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
+#define ARM_EXT_V5T 0x00000100 /* Thumb v2. */
+#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */
+#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */
+#define ARM_EXT_V5J 0x00000800 /* Jazelle extension. */
+#define ARM_EXT_V6 0x00001000 /* ARM V6. */
+
+/* Co-processor space extensions. */
+#define ARM_CEXT_XSCALE 0x00800000 /* Allow MIA etc. */
+#define ARM_CEXT_MAVERICK 0x00400000 /* Use Cirrus/DSP coprocessor. */
+#define ARM_CEXT_IWMMXT 0x00200000 /* Intel Wireless MMX technology coprocessor. */
+
+/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
+ defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
+ ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
+ three more to cover cores prior to ARM6. Finally, there are cores which
+ implement further extensions in the co-processor space. */
+#define ARM_ARCH_V1 ARM_EXT_V1
+#define ARM_ARCH_V2 (ARM_ARCH_V1 | ARM_EXT_V2)
+#define ARM_ARCH_V2S (ARM_ARCH_V2 | ARM_EXT_V2S)
+#define ARM_ARCH_V3 (ARM_ARCH_V2S | ARM_EXT_V3)
+#define ARM_ARCH_V3M (ARM_ARCH_V3 | ARM_EXT_V3M)
+#define ARM_ARCH_V4xM (ARM_ARCH_V3 | ARM_EXT_V4)
+#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_V4)
+#define ARM_ARCH_V4TxM (ARM_ARCH_V4xM | ARM_EXT_V4T)
+#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_V4T)
+#define ARM_ARCH_V5xM (ARM_ARCH_V4xM | ARM_EXT_V5)
+#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
+#define ARM_ARCH_V5TxM (ARM_ARCH_V5xM | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_ARCH_V5TExP (ARM_ARCH_V5T | ARM_EXT_V5ExP)
+#define ARM_ARCH_V5TE (ARM_ARCH_V5TExP | ARM_EXT_V5E)
+#define ARM_ARCH_V5TEJ (ARM_ARCH_V5TE | ARM_EXT_V5J)
+#define ARM_ARCH_V6 (ARM_ARCH_V5TEJ | ARM_EXT_V6)
+
+/* Processors with specific extensions in the co-processor space. */
+#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_CEXT_XSCALE)
+#define ARM_ARCH_IWMMXT (ARM_ARCH_XSCALE | ARM_CEXT_IWMMXT)
+
+#define FPU_FPA_EXT_V1 0x80000000 /* Base FPA instruction set. */
+#define FPU_FPA_EXT_V2 0x40000000 /* LFM/SFM. */
+#define FPU_VFP_EXT_NONE 0x20000000 /* Use VFP word-ordering. */
+#define FPU_VFP_EXT_V1xD 0x10000000 /* Base VFP instruction set. */
+#define FPU_VFP_EXT_V1 0x08000000 /* Double-precision insns. */
+#define FPU_VFP_EXT_V2 0x04000000 /* ARM10E VFPr1. */
+#define FPU_MAVERICK 0x02000000 /* Cirrus Maverick. */
+#define FPU_NONE 0
+
+#define FPU_ARCH_FPE FPU_FPA_EXT_V1
+#define FPU_ARCH_FPA (FPU_ARCH_FPE | FPU_FPA_EXT_V2)
+
+#define FPU_ARCH_VFP FPU_VFP_EXT_NONE
+#define FPU_ARCH_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_NONE)
+#define FPU_ARCH_VFP_V1 (FPU_ARCH_VFP_V1xD | FPU_VFP_EXT_V1)
+#define FPU_ARCH_VFP_V2 (FPU_ARCH_VFP_V1 | FPU_VFP_EXT_V2)
+
+#define FPU_ARCH_MAVERICK FPU_MAVERICK
+
+/* Some useful combinations: */
+#define ARM_ANY 0x0000ffff /* Any basic core. */
+#define ARM_ALL 0x00ffffff /* Any core + co-processor */
+#define CPROC_ANY 0x00ff0000 /* Any co-processor */
+#define FPU_ANY 0xff000000 /* Note this is ~ARM_ALL. */
diff --git a/include/opcode/avr.h b/include/opcode/avr.h
index bcc093d302b..4634823487c 100644
--- a/include/opcode/avr.h
+++ b/include/opcode/avr.h
@@ -23,20 +23,25 @@
#define AVR_ISA_SRAM 0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
#define AVR_ISA_MEGA 0x0020 /* device has >8K program memory (JMP and CALL
supported, no 8K wrap on RJMP and RCALL) */
-#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, MOVW, ...) */
+#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, FMUL, ...) */
#define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
#define AVR_ISA_SPM 0x0200 /* device can program itself */
#define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */
#define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
+#define AVR_ISA_MOVW 0x1000 /* device has MOVW */
#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
+#define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
+ AVR_ISA_SPM | AVR_ISA_BRK)
+#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \
+ AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
-#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)
+#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \
+ AVR_ISA_LPMX | AVR_ISA_SPM)
+#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX)
#define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
#define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
@@ -236,7 +241,7 @@ AVR_INSN (ror, "r", "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407)
AVR_INSN (swap, "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
/* Known to be decoded as `nop' by the old core. */
-AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MUL, 0x0100)
+AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL, 0x0200)
AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL, 0x0300)
AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL, 0x0308)
diff --git a/include/opcode/crx.h b/include/opcode/crx.h
new file mode 100644
index 00000000000..1e0d5733ab3
--- /dev/null
+++ b/include/opcode/crx.h
@@ -0,0 +1,395 @@
+/* crx.h -- Header file for CRX opcode and register tables.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
+ Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
+
+ This file is part of GAS, GDB and the GNU binutils.
+
+ GAS, GDB, and GNU binutils 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, or (at your
+ option) any later version.
+
+ GAS, GDB, and GNU binutils are distributed in the hope that they 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 _CRX_H_
+#define _CRX_H_
+
+/* CRX core/debug Registers :
+ The enums are used as indices to CRX registers table (crx_regtab).
+ Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* 32-bit general purpose registers. */
+ r0, r1, r2, r3, r4, r5, r6, r7, r8, r9,
+ r10, r11, r12, r13, r14, r15, ra, sp,
+ /* 32-bit user registers. */
+ u0, u1, u2, u3, u4, u5, u6, u7, u8, u9,
+ u10, u11, u12, u13, u14, u15, ura, usp,
+ /* hi and lo registers. */
+ hi, lo,
+ /* hi and lo user registers. */
+ uhi, ulo,
+ /* Processor Status Register. */
+ psr,
+ /* Configuration Register. */
+ cfg,
+ /* Coprocessor Configuration Register. */
+ cpcfg,
+ /* Cashe Configuration Register. */
+ ccfg,
+ /* Interrupt Base Register. */
+ intbase,
+ /* Interrupt Stack Pointer Register. */
+ isp,
+ /* Coprocessor Enable Register. */
+ cen,
+ /* Program Counter Register. */
+ pc,
+ /* Not a register. */
+ nullregister,
+ MAX_REG
+ }
+reg;
+
+/* CRX Coprocessor registers and special registers :
+ The enums are used as indices to CRX coprocessor registers table
+ (crx_copregtab). Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* Coprocessor registers. */
+ c0 = MAX_REG, c1, c2, c3, c4, c5, c6, c7, c8,
+ c9, c10, c11, c12, c13, c14, c15,
+ /* Coprocessor special registers. */
+ cs0, cs1 ,cs2, cs3, cs4, cs5, cs6, cs7, cs8,
+ cs9, cs10, cs11, cs12, cs13, cs14, cs15,
+ /* Not a Coprocessor register. */
+ nullcopregister,
+ MAX_COPREG
+ }
+copreg;
+
+/* CRX Register types. */
+
+typedef enum
+ {
+ CRX_PC_REGTYPE, /* pc type */
+ CRX_R_REGTYPE, /* r<N> */
+ CRX_U_REGTYPE, /* u<N> */
+ CRX_C_REGTYPE, /* c<N> */
+ CRX_CS_REGTYPE, /* cs<N> */
+ CRX_MTPR_REGTYPE, /* mtpr */
+ CRX_CFG_REGTYPE /* *hi|lo, *cfg, psr */
+ }
+reg_type;
+
+/* CRX argument types :
+ The argument types correspond to instructions operands
+
+ Argument types :
+ r - register
+ c - constant
+ d - displacement
+ ic - immediate
+ icr - index register
+ rbase - register base
+ s - star ('*')
+ copr - coprocessor register
+ copsr - coprocessor special register. */
+
+typedef enum
+ {
+ arg_r, arg_c, arg_cr, arg_dc, arg_dcr, arg_sc,
+ arg_ic, arg_icr, arg_rbase, arg_copr, arg_copsr,
+ /* Not an argument. */
+ nullargs
+ }
+argtype;
+
+/* CRX operand types :
+ The operand types correspond to instructions operands
+
+ Operand Types :
+ cst4 - 4-bit encoded constant
+ iN - N-bit immediate field
+ d, dispsN - N-bit immediate signed displacement
+ dispuN - N-bit immediate unsigned displacement
+ absN - N-bit absolute address
+ rbase - 4-bit genaral-purpose register specifier
+ regr - 4-bit genaral-purpose register specifier
+ regr8 - 8-bit register address space
+ copregr - coprocessor register
+ copsregr - coprocessor special register
+ scl2 - 2-bit scaling factor for memory index
+ ridx - register index. */
+
+typedef enum
+ {
+ dummy, cst4, disps9,
+ i3, i4, i5, i8, i12, i16, i32,
+ d5, d9, d17, d25, d33,
+ abs16, abs32,
+ rbase, rbase_cst4,
+ rbase_dispu8, rbase_dispu12, rbase_dispu16, rbase_dispu28, rbase_dispu32,
+ rbase_ridx_scl2_dispu6, rbase_ridx_scl2_dispu22,
+ regr, regr8, copregr,copregr8,copsregr,
+ /* Not an operand. */
+ nulloperand,
+ /* Maximum supported operand. */
+ MAX_OPRD
+ }
+operand_type;
+
+/* CRX instruction types. */
+
+#define ARITH_INS 1
+#define LD_STOR_INS 2
+#define BRANCH_INS 3
+#define ARITH_BYTE_INS 4
+#define CMPBR_INS 5
+#define SHIFT_INS 6
+#define BRANCH_NEQ_INS 7
+#define LD_STOR_INS_INC 8
+#define STOR_IMM_INS 9
+#define CSTBIT_INS 10
+#define SYS_INS 11
+#define JMP_INS 12
+#define MUL_INS 13
+#define DIV_INS 14
+#define COP_BRANCH_INS 15
+#define COP_REG_INS 16
+#define DCR_BRANCH_INS 17
+#define MMC_INS 18
+#define MMU_INS 19
+
+/* Maximum value supported for instruction types. */
+#define CRX_INS_MAX (1 << 5)
+/* Mask to record an instruction type. */
+#define CRX_INS_MASK (CRX_INS_MAX - 1)
+/* Return instruction type, given instruction's attributes. */
+#define CRX_INS_TYPE(attr) ((attr) & CRX_INS_MASK)
+
+/* Indicates whether this instruction has a register list as parameter. */
+#define REG_LIST CRX_INS_MAX
+/* The operands in binary and assembly are placed in reverse order.
+ load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
+#define REVERSE_MATCH (REG_LIST << 1)
+
+/* Kind of displacement map used DISPU[BWD]4. */
+#define DISPUB4 (REVERSE_MATCH << 1)
+#define DISPUW4 (DISPUB4 << 1)
+#define DISPUD4 (DISPUW4 << 1)
+#define CST4MAP (DISPUB4 | DISPUW4 | DISPUD4)
+
+/* Printing formats, where the instruction prefix isn't consecutive. */
+#define FMT_1 (DISPUD4 << 1) /* 0xF0F00000 */
+#define FMT_2 (FMT_1 << 1) /* 0xFFF0FF00 */
+#define FMT_3 (FMT_2 << 1) /* 0xFFF00F00 */
+#define FMT_4 (FMT_3 << 1) /* 0xFFF0F000 */
+#define FMT_5 (FMT_4 << 1) /* 0xFFF0FFF0 */
+#define FMT_CRX (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
+
+#define RELAXABLE (FMT_5 << 1)
+
+/* Maximum operands per instruction. */
+#define MAX_OPERANDS 5
+/* Maximum words per instruction. */
+#define MAX_WORDS 3
+/* Maximum register name length. */
+#define MAX_REGNAME_LEN 10
+/* Maximum instruction length. */
+#define MAX_INST_LEN 256
+
+/* Single operand description. */
+
+typedef struct
+ {
+ /* Operand type. */
+ operand_type op_type;
+ /* Operand location within the opcode. */
+ unsigned int shift;
+ }
+operand_desc;
+
+/* Instruction data structure used in instruction table. */
+
+typedef struct
+ {
+ /* Name. */
+ const char *mnemonic;
+ /* Size (in words). */
+ unsigned int size;
+ /* Constant prefix (matched by the disassembler). */
+ unsigned long match;
+ /* Match size (in bits). */
+ int match_bits;
+ /* Attributes. */
+ unsigned int flags;
+ /* Operands (always last, so unreferenced operands are initialized). */
+ operand_desc operands[MAX_OPERANDS];
+ }
+inst;
+
+/* Data structure for a single instruction's arguments (Operands). */
+
+typedef struct
+ {
+ /* Register or base register. */
+ reg r;
+ /* Index register. */
+ reg i_r;
+ /* Coprocessor register. */
+ copreg cr;
+ /* Constant/immediate/absolute value. */
+ unsigned long int constant;
+ /* Scaled index mode. */
+ unsigned int scale;
+ /* Argument type. */
+ argtype type;
+ /* Size of the argument (in bits) required to represent. */
+ int size;
+ /* Indicates whether a constant is positive or negative. */
+ int signflag;
+ }
+argument;
+
+/* Internal structure to hold the various entities
+ corresponding to the current assembling instruction. */
+
+typedef struct
+ {
+ /* Number of arguments. */
+ int nargs;
+ /* The argument data structure for storing args (operands). */
+ argument arg[MAX_OPERANDS];
+/* The following fields are required only by CRX-assembler. */
+#ifdef TC_CRX
+ /* Expression used for setting the fixups (if any). */
+ expressionS exp;
+ bfd_reloc_code_real_type rtype;
+#endif /* TC_CRX */
+ /* Instruction size (in bytes). */
+ int size;
+ }
+ins;
+
+/* Structure to hold information about predefined operands. */
+
+typedef struct
+ {
+ /* Size (in bits). */
+ unsigned int bit_size;
+ /* Argument type. */
+ argtype arg_type;
+ }
+operand_entry;
+
+/* Structure to hold trap handler information. */
+
+typedef struct
+ {
+ /* Trap name. */
+ char *name;
+ /* Index in dispatch table. */
+ unsigned int entry;
+ }
+trap_entry;
+
+/* Structure to hold information about predefined registers. */
+
+typedef struct
+ {
+ /* Name (string representation). */
+ char *name;
+ /* Value (enum representation). */
+ union
+ {
+ /* Register. */
+ reg reg_val;
+ /* Coprocessor register. */
+ copreg copreg_val;
+ } value;
+ /* Register image. */
+ int image;
+ /* Register type. */
+ reg_type type;
+ }
+reg_entry;
+
+/* Structure to hold a cst4 operand mapping. */
+
+typedef struct
+ {
+ /* The binary value which is written to the object file. */
+ int binary;
+ /* The value which is mapped. */
+ int value;
+ }
+cst4_entry;
+
+/* CRX opcode table. */
+extern const inst crx_instruction[];
+extern const int crx_num_opcodes;
+#define NUMOPCODES crx_num_opcodes
+
+/* CRX operands table. */
+extern const operand_entry crx_optab[];
+
+/* CRX registers table. */
+extern const reg_entry crx_regtab[];
+extern const int crx_num_regs;
+#define NUMREGS crx_num_regs
+
+/* CRX coprocessor registers table. */
+extern const reg_entry crx_copregtab[];
+extern const int crx_num_copregs;
+#define NUMCOPREGS crx_num_copregs
+
+/* CRX trap/interrupt table. */
+extern const trap_entry crx_traps[];
+extern const int crx_num_traps;
+#define NUMTRAPS crx_num_traps
+
+/* cst4 operand mapping. */
+extern const cst4_entry cst4_map[];
+extern const int cst4_maps;
+
+/* Current instruction we're assembling. */
+extern const inst *instruction;
+
+/* A macro for representing the instruction "constant" opcode, that is,
+ the FIXED part of the instruction. The "constant" opcode is represented
+ as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
+ over that range. */
+#define BIN(OPC,SHIFT) (OPC << SHIFT)
+
+/* Is the current instruction type is TYPE ? */
+#define IS_INSN_TYPE(TYPE) \
+ (CRX_INS_TYPE(instruction->flags) == TYPE)
+
+/* Is the current instruction mnemonic is MNEMONIC ? */
+#define IS_INSN_MNEMONIC(MNEMONIC) \
+ (strcmp(instruction->mnemonic,MNEMONIC) == 0)
+
+/* Does the current instruction has register list ? */
+#define INST_HAS_REG_LIST \
+ (instruction->flags & REG_LIST)
+
+/* Long long type handling. */
+/* Replace all appearances of 'long long int' with LONGLONG. */
+typedef long long int LONGLONG;
+typedef unsigned long long ULONGLONG;
+/* A mask for the upper 31 bits of a 64 bits type. */
+#define UPPER31_MASK 0xFFFFFFFE00000000LL
+
+#endif /* _CRX_H_ */
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 29374df5b4f..fe1097fd286 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -1418,7 +1418,7 @@ struct h8_opcode h8_opcodes[] =
{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_JSR, SN), AV_H8SX, 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}}},
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 5e3673e2b04..96bf149d59a 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -3,21 +3,21 @@
2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
-This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
+ This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
-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. */
/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
ix86 Unix assemblers, generate floating point instructions with
@@ -48,7 +48,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define OLDGCC_COMPAT SYSV386_COMPAT
#endif
-static const template i386_optab[] = {
+static const template i386_optab[] =
+{
#define X None
#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
@@ -138,23 +139,22 @@ static const template i386_optab[] = {
{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm, { Reg16|ShortMem, Reg32, 0} },
/* These instructions are not particulary usefull, since the zero extend
32->64 is implicit, but we can encode them. */
-{"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
-{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} },
+{"movzx", 2, 0x0fb6, X, Cpu64, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
+{"movzx", 2, 0x0fb7, X, Cpu64, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} },
/* Push instructions. */
{"push", 1, 0x50, X, CpuNo64, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
{"push", 1, 0xff, 6, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
{"push", 1, 0x6a, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
{"push", 1, 0x68, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, X, 0|CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
+{"push", 1, 0x06, X, CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
/* In 64bit mode, the operand size is implicitly 64bit. */
-{"push", 1, 0x50, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { WordReg, 0, 0 } },
-{"push", 1, 0xff, 6, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm32S|Imm16, 0, 0} },
-{"push", 1, 0x06, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
-{"push", 1, 0x0fa0, X, Cpu386|Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
+{"push", 1, 0x50, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { Reg16|Reg64, 0, 0 } },
+{"push", 1, 0xff, 6, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem, 0, 0 } },
+{"push", 1, 0x6a, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
+{"push", 1, 0x68, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm32S|Imm16, 0, 0} },
+{"push", 1, 0x0fa0, X, Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"pusha", 0, 0x60, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
@@ -165,9 +165,8 @@ static const template i386_optab[] = {
{"pop", 1, 0x07, X, CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
/* In 64bit mode, the operand size is implicitly 64bit. */
-{"pop", 1, 0x58, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { WordReg, 0, 0 } },
-{"pop", 1, 0x8f, 0, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
-{"pop", 1, 0x07, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
+{"pop", 1, 0x58, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { Reg16|Reg64, 0, 0 } },
+{"pop", 1, 0x8f, 0, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem, 0, 0 } },
{"pop", 1, 0x0fa1, X, Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"popa", 0, 0x61, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
@@ -175,14 +174,24 @@ static const template i386_optab[] = {
/* Exchange instructions.
xchg commutes: we allow both operand orders.
- In the 64bit code, xchg eax, eax is reused for new nop instruction.
- */
+ In the 64bit code, xchg eax, eax is reused for new nop instruction. */
+#if 0 /* While the two entries that are disabled generate shorter code
+ for xchg eax, reg (on x86_64), the special case xchg eax, eax
+ does not get handled correctly - it degenerates into nop, but
+ that way the side effect of zero-extending eax to rax is lost. */
{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { WordReg, Acc, 0 } },
{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { Acc, WordReg, 0 } },
+#else
+{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
+{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
+{"xchg", 2, 0x90, X, Cpu64, wq_Suf|ShortForm, { Reg16|Reg64, Acc, 0 } },
+{"xchg", 2, 0x90, X, Cpu64, wq_Suf|ShortForm, { Acc, Reg16|Reg64, 0 } },
+#endif
{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
/* In/out from ports. */
+/* XXX should reject %rax */
{"in", 2, 0xe4, X, 0, bwl_Suf|W, { Imm8, Acc, 0 } },
{"in", 2, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
{"in", 1, 0xe4, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
@@ -196,11 +205,11 @@ static const template i386_optab[] = {
{"lea", 2, 0x8d, X, 0, wlq_Suf|Modrm, { WordMem, WordReg, 0 } },
/* Load segment registers from memory. */
-{"lds", 2, 0xc5, X, CpuNo64, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"les", 2, 0xc4, X, CpuNo64, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lfs", 2, 0x0fb4, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lgs", 2, 0x0fb5, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lss", 2, 0x0fb2, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lds", 2, 0xc5, X, CpuNo64, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"les", 2, 0xc4, X, CpuNo64, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lfs", 2, 0x0fb4, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lgs", 2, 0x0fb5, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lss", 2, 0x0fb2, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
/* Flags register instructions. */
{"clc", 0, 0xf8, X, 0, NoSuf, { 0, 0, 0} },
@@ -210,9 +219,9 @@ static const template i386_optab[] = {
{"cmc", 0, 0xf5, X, 0, NoSuf, { 0, 0, 0} },
{"lahf", 0, 0x9f, X, CpuNo64,NoSuf, { 0, 0, 0} },
{"sahf", 0, 0x9e, X, CpuNo64,NoSuf, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
+{"pushf", 0, 0x9c, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
{"pushf", 0, 0x9c, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"popf", 0, 0x9d, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
+{"popf", 0, 0x9d, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
{"popf", 0, 0x9d, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
{"stc", 0, 0xf9, X, 0, NoSuf, { 0, 0, 0} },
{"std", 0, 0xfd, X, 0, NoSuf, { 0, 0, 0} },
@@ -276,14 +285,14 @@ static const template i386_optab[] = {
{"neg", 1, 0xf6, 3, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
{"not", 1, 0xf6, 2, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"aaa", 0, 0x37, X, 0, NoSuf, { 0, 0, 0} },
-{"aas", 0, 0x3f, X, 0, NoSuf, { 0, 0, 0} },
-{"daa", 0, 0x27, X, 0, NoSuf, { 0, 0, 0} },
-{"das", 0, 0x2f, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 0, 0xd50a, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 1, 0xd5, X, 0, NoSuf, { Imm8S, 0, 0} },
-{"aam", 0, 0xd40a, X, 0, NoSuf, { 0, 0, 0} },
-{"aam", 1, 0xd4, X, 0, NoSuf, { Imm8S, 0, 0} },
+{"aaa", 0, 0x37, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"aas", 0, 0x3f, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"daa", 0, 0x27, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"das", 0, 0x2f, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"aad", 0, 0xd50a, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"aad", 1, 0xd5, X, CpuNo64, NoSuf, { Imm8S, 0, 0} },
+{"aam", 0, 0xd40a, X, CpuNo64, NoSuf, { 0, 0, 0} },
+{"aam", 1, 0xd4, X, CpuNo64, NoSuf, { Imm8S, 0, 0} },
/* Conversion insns. */
/* Intel naming */
@@ -370,37 +379,38 @@ static const template i386_optab[] = {
{"shrd", 2, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
/* Control transfer instructions. */
-{"call", 1, 0xe8, X, 0, wlq_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
+{"call", 1, 0xe8, X, CpuNo64, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
+{"call", 1, 0xe8, X, Cpu64, wq_Suf|JumpDword|DefaultSize|NoRex64, { Disp16|Disp32, 0, 0} },
{"call", 1, 0xff, 2, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-{"call", 1, 0xff, 2, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64,{ WordReg|WordMem|JumpAbsolute, 0, 0} },
+{"call", 1, 0xff, 2, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem|LLongMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
-{"call", 2, 0x9a, X, CpuNo64,wlq_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
+{"call", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
/* Intel Syntax */
-{"call", 1, 0xff, 3, 0, x_Suf|Modrm|DefaultSize, { WordMem, 0, 0} },
-{"lcall", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-{"lcall", 1, 0xff, 3, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} },
-{"lcall", 1, 0xff, 3, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64,{ WordMem|JumpAbsolute, 0, 0} },
+{"call", 1, 0xff, 3, 0, x_Suf|Modrm|DefaultSize, {WordMem, 0, 0} },
+{"lcall", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, {Imm16, Imm16|Imm32, 0} },
+{"lcall", 1, 0xff, 3, 0, wl_Suf|Modrm|DefaultSize, {WordMem|JumpAbsolute, 0, 0} },
#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp,0, 0} },
{"jmp", 1, 0xff, 4, CpuNo64, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-{"jmp", 1, 0xff, 4, Cpu64, wq_Suf|Modrm|NoRex64, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax */
+{"jmp", 1, 0xff, 4, Cpu64, wq_Suf|Modrm|NoRex64, { Reg16|Reg64|ShortMem|LLongMem|JumpAbsolute, 0, 0} },
+/* Intel Syntax. */
{"jmp", 2, 0xea, X, CpuNo64,wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-/* Intel Syntax */
+/* Intel Syntax. */
{"jmp", 1, 0xff, 5, 0, x_Suf|Modrm, { WordMem, 0, 0} },
-{"ljmp", 2, 0xea, X, CpuNo64, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-{"ljmp", 1, 0xff, 5, CpuNo64, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-{"ljmp", 1, 0xff, 5, Cpu64, q_Suf|Modrm|NoRex64, { WordMem|JumpAbsolute, 0, 0} },
-
-{"ret", 0, 0xc3, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
-{"ret", 1, 0xc2, X, CpuNo64,wlq_Suf|DefaultSize, { Imm16, 0, 0} },
-{"ret", 0, 0xc3, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"ret", 1, 0xc2, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ Imm16, 0, 0} },
+{"ljmp", 2, 0xea, X, CpuNo64, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
+{"ljmp", 1, 0xff, 5, 0, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
+
+{"ret", 0, 0xc3, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
+{"ret", 1, 0xc2, X, CpuNo64,wl_Suf|DefaultSize, { Imm16, 0, 0} },
+{"ret", 0, 0xc3, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
+{"ret", 1, 0xc2, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ Imm16, 0, 0} },
{"lret", 0, 0xcb, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} },
{"lret", 1, 0xca, X, 0, wlq_Suf|DefaultSize, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, X, Cpu186, wlq_Suf|DefaultSize, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, X, Cpu186, wlq_Suf|DefaultSize, { 0, 0, 0} },
+{"enter", 2, 0xc8, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
+{"enter", 2, 0xc8, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm16, Imm8, 0} },
+{"leave", 0, 0xc9, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"leave", 0, 0xc9, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { 0, 0, 0} },
/* Conditional jumps. */
{"jo", 1, 0x70, X, 0, NoSuf|Jump, { Disp, 0, 0} },
@@ -536,33 +546,37 @@ static const template i386_optab[] = {
/* Interrupts & op. sys insns. */
/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
int 3 insn. */
-#define INT_OPCODE 0xcd
+#define INT_OPCODE 0xcd
#define INT3_OPCODE 0xcc
{"int", 1, 0xcd, X, 0, NoSuf, { Imm8, 0, 0} },
{"int3", 0, 0xcc, X, 0, NoSuf, { 0, 0, 0} },
-{"into", 0, 0xce, X, 0, NoSuf, { 0, 0, 0} },
+{"into", 0, 0xce, X, CpuNo64, NoSuf, { 0, 0, 0} },
{"iret", 0, 0xcf, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} },
/* i386sl, i486sl, later 486, and Pentium. */
{"rsm", 0, 0x0faa, X, Cpu386, NoSuf, { 0, 0, 0} },
-{"bound", 2, 0x62, X, Cpu186, wlq_Suf|Modrm, { WordReg, WordMem, 0} },
+{"bound", 2, 0x62, X, Cpu186|CpuNo64, wl_Suf|Modrm, { WordReg, WordMem, 0} },
{"hlt", 0, 0xf4, X, 0, NoSuf, { 0, 0, 0} },
/* nop is actually 'xchgl %eax, %eax'. */
{"nop", 0, 0x90, X, 0, NoSuf, { 0, 0, 0} },
/* Protection control. */
-{"arpl", 2, 0x63, X, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
+{"arpl", 2, 0x63, X, Cpu286|CpuNo64, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
{"lar", 2, 0x0f02, X, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
+{"lgdt", 1, 0x0f01, 2, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"lgdt", 1, 0x0f01, 2, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
+{"lidt", 1, 0x0f01, 3, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"lidt", 1, 0x0f01, 3, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
{"lldt", 1, 0x0f00, 2, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
{"lmsw", 1, 0x0f01, 6, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
{"lsl", 2, 0x0f03, X, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
{"ltr", 1, 0x0f00, 3, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"sgdt", 1, 0x0f01, 0, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
+{"sgdt", 1, 0x0f01, 0, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"sgdt", 1, 0x0f01, 0, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
+{"sidt", 1, 0x0f01, 1, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"sidt", 1, 0x0f01, 1, Cpu64, q_Suf|Modrm, { LLongMem, 0, 0} },
{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
{"sldt", 1, 0x0f00, 0, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
@@ -583,7 +597,6 @@ static const template i386_optab[] = {
{"fld", 1, 0xdb, 5, 0, x_FP|Modrm, { LLongMem, 0, 0} },
{"fild", 1, 0xdf, 0, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fildd", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fildq", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fildll", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fldt", 1, 0xdb, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
@@ -603,7 +616,6 @@ static const template i386_optab[] = {
{"fstp", 1, 0xdb, 7, 0, x_FP|Modrm, { LLongMem, 0, 0} },
{"fistp", 1, 0xdf, 3, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fistpd", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fistpq", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fistpll",1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fstpt", 1, 0xdb, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
@@ -652,7 +664,7 @@ static const template i386_optab[] = {
{"fldln2", 0, 0xd9ed, X, 0, FP, { 0, 0, 0} },
{"fldz", 0, 0xd9ee, X, 0, FP, { 0, 0, 0} },
-/* arithmetic */
+/* Arithmetic. */
/* add */
{"fadd", 2, 0xd8c0, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
@@ -829,30 +841,30 @@ static const template i386_optab[] = {
/* Opcode prefixes; we allow them as separate insns too. */
#define ADDR_PREFIX_OPCODE 0x67
-{"addr16", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"addr32", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"aword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"adword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"addr16", 0, 0x67, X, Cpu386|CpuNo64, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"addr32", 0, 0x67, X, Cpu386,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"aword", 0, 0x67, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"adword", 0, 0x67, X, Cpu386,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
#define DATA_PREFIX_OPCODE 0x66
-{"data16", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"data32", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"word", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"dword", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"data16", 0, 0x66, X, Cpu386,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"data32", 0, 0x66, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"word", 0, 0x66, X, Cpu386,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"dword", 0, 0x66, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
#define LOCK_PREFIX_OPCODE 0xf0
{"lock", 0, 0xf0, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
{"wait", 0, 0x9b, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define CS_PREFIX_OPCODE 0x2e
-{"cs", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"cs", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define DS_PREFIX_OPCODE 0x3e
-{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define ES_PREFIX_OPCODE 0x26
-{"es", 0, 0x26, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"es", 0, 0x26, X, CpuNo64, NoSuf|IsPrefix, { 0, 0, 0} },
#define FS_PREFIX_OPCODE 0x64
{"fs", 0, 0x64, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define GS_PREFIX_OPCODE 0x65
{"gs", 0, 0x65, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define SS_PREFIX_OPCODE 0x36
-{"ss", 0, 0x36, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"ss", 0, 0x36, X, CpuNo64, NoSuf|IsPrefix, { 0, 0, 0} },
#define REPNE_PREFIX_OPCODE 0xf2
#define REPE_PREFIX_OPCODE 0xf3
{"rep", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
@@ -1308,7 +1320,6 @@ static const template i386_optab[] = {
{"addsubps", 2, 0xf20fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fisttpd", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"fisttpq", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"haddpd", 2, 0x660f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
@@ -1361,14 +1372,17 @@ static const template i386_optab[] = {
{"sysret", 0, 0x0f07, X, CpuK6, lq_Suf|DefaultSize, { 0, 0, 0} },
{"swapgs", 0, 0x0f01, 0xf8, Cpu64, NoSuf|ImmExt, { 0, 0, 0} },
-/* VIA PadLock extensions. */
-{"xstorerng", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+/* VIA PadLock extensions. */
+{"xstorerng", 0, 0x000fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
{"xcryptecb", 0, 0xf30fa7c8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
{"xcryptcbc", 0, 0xf30fa7d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
{"xcryptcfb", 0, 0xf30fa7e0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
{"xcryptofb", 0, 0xf30fa7e8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-/* alias for xstorerng */
-{"xstore", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+{"montmul", 0, 0xf30fa6c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+{"xsha1", 0, 0xf30fa6c8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+{"xsha256", 0, 0xf30fa6d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+/* Alias for xstorerng. */
+{"xstore", 0, 0x000fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
/* sentinel */
{NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
@@ -1392,13 +1406,13 @@ static const template i386_optab[] = {
#undef x_FP
#undef sl_FP
-#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
-
+#define MAX_MNEM_SIZE 16 /* For parsing insn mnemonics from input. */
/* 386 register table. */
-static const reg_entry i386_regtab[] = {
- /* make %st first as we test for it */
+static const reg_entry i386_regtab[] =
+{
+ /* Make %st first as we test for it. */
{"st", FloatReg|FloatAcc, 0, 0},
/* 8 bit regs */
#define REGNAM_AL 1 /* Entry in i386_regtab. */
@@ -1446,7 +1460,7 @@ static const reg_entry i386_regtab[] = {
{"r15w", Reg16, RegRex, 7},
/* 32 bit regs */
#define REGNAM_EAX 41
- {"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot */
+ {"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot. */
{"ecx", Reg32|BaseIndex, 0, 1},
{"edx", Reg32|BaseIndex, 0, 2},
{"ebx", Reg32|BaseIndex, 0, 3},
@@ -1478,14 +1492,14 @@ static const reg_entry i386_regtab[] = {
{"r13", Reg64|BaseIndex, RegRex, 5},
{"r14", Reg64|BaseIndex, RegRex, 6},
{"r15", Reg64|BaseIndex, RegRex, 7},
- /* segment registers */
+ /* Segment registers. */
{"es", SReg2, 0, 0},
{"cs", SReg2, 0, 1},
{"ss", SReg2, 0, 2},
{"ds", SReg2, 0, 3},
{"fs", SReg3, 0, 4},
{"gs", SReg3, 0, 5},
- /* control registers */
+ /* Control registers. */
{"cr0", Control, 0, 0},
{"cr1", Control, 0, 1},
{"cr2", Control, 0, 2},
@@ -1502,7 +1516,7 @@ static const reg_entry i386_regtab[] = {
{"cr13", Control, RegRex, 5},
{"cr14", Control, RegRex, 6},
{"cr15", Control, RegRex, 7},
- /* debug registers */
+ /* Debug registers. */
{"db0", Debug, 0, 0},
{"db1", Debug, 0, 1},
{"db2", Debug, 0, 2},
@@ -1535,7 +1549,7 @@ static const reg_entry i386_regtab[] = {
{"dr13", Debug, RegRex, 5},
{"dr14", Debug, RegRex, 6},
{"dr15", Debug, RegRex, 7},
- /* test registers */
+ /* Test registers. */
{"tr0", Test, 0, 0},
{"tr1", Test, 0, 1},
{"tr2", Test, 0, 2},
@@ -1544,7 +1558,7 @@ static const reg_entry i386_regtab[] = {
{"tr5", Test, 0, 5},
{"tr6", Test, 0, 6},
{"tr7", Test, 0, 7},
- /* mmx and simd registers */
+ /* MMX and simd registers. */
{"mm0", RegMMX, 0, 0},
{"mm1", RegMMX, 0, 1},
{"mm2", RegMMX, 0, 2},
@@ -1569,12 +1583,13 @@ static const reg_entry i386_regtab[] = {
{"xmm13", RegXMM, RegRex, 5},
{"xmm14", RegXMM, RegRex, 6},
{"xmm15", RegXMM, RegRex, 7},
- /* no type will make this register rejected for all purposes except
+ /* No type will make this register rejected for all purposes except
for addressing. This saves creating one extra type for RIP. */
{"rip", BaseIndex, 0, 0}
};
-static const reg_entry i386_float_regtab[] = {
+static const reg_entry i386_float_regtab[] =
+{
{"st(0)", FloatReg|FloatAcc, 0, 0},
{"st(1)", FloatReg, 0, 1},
{"st(2)", FloatReg, 0, 2},
@@ -1585,9 +1600,9 @@ static const reg_entry i386_float_regtab[] = {
{"st(7)", FloatReg, 0, 7}
};
-#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
+#define MAX_REG_NAME_SIZE 8 /* For parsing register names from input. */
-/* segment stuff */
+/* Segment stuff. */
static const seg_entry cs = { "cs", 0x2e };
static const seg_entry ds = { "ds", 0x3e };
static const seg_entry ss = { "ss", 0x36 };
@@ -1595,4 +1610,3 @@ static const seg_entry es = { "es", 0x26 };
static const seg_entry fs = { "fs", 0x64 };
static const seg_entry gs = { "gs", 0x65 };
-/* end of opcode/i386.h */
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
index 3f189841d8f..014495b9720 100644
--- a/include/opcode/m68k.h
+++ b/include/opcode/m68k.h
@@ -1,6 +1,6 @@
/* Opcode table header for m680[01234]0/m6888[12]/m68851.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -35,13 +35,27 @@
#define m68881 0x040
#define m68882 m68881 /* Synonym for -m68881. otherwise unused. */
#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-#define mcf5200 0x200
-#define mcf5206e 0x400
-#define mcf5307 0x800
-#define mcf5407 0x1000
-#define mcfv4e 0x2000
-#define mcf528x 0x4000
+#define cpu32 0x100 /* e.g., 68332 */
+
+#define mcfmac 0x200 /* ColdFire MAC. */
+#define mcfemac 0x400 /* ColdFire EMAC. */
+#define cfloat 0x800 /* ColdFire FPU. */
+#define mcfhwdiv 0x1000 /* ColdFire hardware divide. */
+
+#define mcfisa_a 0x2000 /* ColdFire ISA_A. */
+#define mcfisa_aa 0x4000 /* ColdFire ISA_A+. */
+#define mcfisa_b 0x8000 /* ColdFire ISA_B. */
+#define mcfusp 0x10000 /* ColdFire USP instructions. */
+
+#define mcf5200 0x20000
+#define mcf5206e 0x40000
+#define mcf521x 0x80000
+#define mcf5249 0x100000
+#define mcf528x 0x200000
+#define mcf5307 0x400000
+#define mcf5407 0x800000
+#define mcf5470 0x1000000
+#define mcf5480 0x2000000
/* Handy aliases. */
#define m68040up (m68040 | m68060)
@@ -49,13 +63,7 @@
#define m68020up (m68020 | m68030up)
#define m68010up (m68010 | cpu32 | m68020up)
#define m68000up (m68000 | m68010up)
-#define mcf (mcf5200 | mcf5206e | mcf528x | mcf5307 | mcf5407 | mcfv4e)
-#define mcf5206eup (mcf5206e | mcf528x | mcf5307 | mcf5407 | mcfv4e)
-#define mcf5307up (mcf5307 | mcf5407 | mcfv4e)
-#define mcfv4up (mcf5407 | mcfv4e)
-#define mcfv4eup (mcfv4e)
-#define cfloat (mcfv4e)
#define mfloat (m68881 | m68882 | m68040 | m68060)
#define mmmu (m68851 | m68030 | m68040 | m68060)
@@ -65,6 +73,9 @@ struct m68k_opcode
{
/* The opcode name. */
const char *name;
+ /* The pseudo-size of the instruction(in bytes). Used to determine
+ number of bytes necessary to disassemble the instruction. */
+ unsigned int size;
/* The opcode itself. */
unsigned long opcode;
/* The mask used by the disassembler. */
@@ -99,7 +110,7 @@ struct m68k_opcode_alias
operand; the second, the place it is stored. */
/* Kinds of operands:
- Characters used: AaBbCcDdEFfGHIJkLlMmnOopQqRrSsTtU VvWwXxYyZz0123|*~%;@!&$?/<>#^+-
+ Characters used: AaBbCcDdEeFfGgHIiJkLlMmnOopQqRrSsTtU VvWwXxYyZz01234|*~%;@!&$?/<>#^+-
D data register only. Stored as 3 bits.
A address register only. Stored as 3 bits.
@@ -133,9 +144,12 @@ struct m68k_opcode_alias
C the CCR. No need to store it; this is just for filtering validity.
S the SR. No need to store, just as with CCR.
U the USP. No need to store, just as with CCR.
- E the ACC. No need to store, just as with CCR.
- G the MACSR. No need to store, just as with CCR.
+ E the MAC ACC. No need to store, just as with CCR.
+ e the EMAC ACC[0123].
+ G the MAC/EMAC MACSR. No need to store, just as with CCR.
+ g the EMAC ACCEXT{01,23}.
H the MASK. No need to store, just as with CCR.
+ i the MAC/EMAC scale factor.
I Coprocessor ID. Not printed if 1. The Coprocessor ID is always
extracted from the 'd' field of word one, which means that an extended
@@ -205,7 +219,7 @@ struct m68k_opcode_alias
! control (modes 2,5,6,7.0-3)
(not 0,1,3,4,7.4)
& alterable control (modes 2,5,6,7.0,7.1)
- (not 0,1,7.2-4)
+ (not 0,1,3,4,7.2-4)
$ alterable data (modes 0,2-6,7.0,7.1)
(not 1,7.2-4)
? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
@@ -230,7 +244,9 @@ struct m68k_opcode_alias
w (modes 2-5,7.2)
y (modes 2,5)
z (modes 2,5,7.2)
- x mov3q immediate operand. */
+ x mov3q immediate operand.
+ 4 (modes 2,3,4,5)
+ */
/* For the 68851: */
/* I didn't use much imagination in choosing the
@@ -283,7 +299,7 @@ struct m68k_opcode_alias
*/
/* Places to put an operand, for non-general operands:
- Characters used: BbCcDdghijkLlMmNnostWw123456789
+ Characters used: BbCcDdFfGgHhIijkLlMmNnostWw123456789/
s source, low bits of first word.
d dest, shifted 9 in first word
@@ -348,6 +364,13 @@ struct m68k_opcode_alias
F double precision float, low bit of 1st word, immediate uses 8 bytes
x extended precision float, low bit of 1st word, immediate uses 12 bytes
p packed float, low bit of 1st word, immediate uses 12 bytes
+ G EMAC accumulator, load (bit 4 2nd word, !bit8 first word)
+ H EMAC accumulator, non load (bit 4 2nd word, bit 8 first word)
+ F EMAC ACCx
+ f EMAC ACCy
+ I MAC/EMAC scale factor
+ / Like 's', but set 2nd word, bit 5 if trailing_ampersand set
+ ] first word, bit 10
*/
extern const struct m68k_opcode m68k_opcodes[];
diff --git a/include/opcode/msp430.h b/include/opcode/msp430.h
index 19702254eef..a59ede21517 100644
--- a/include/opcode/msp430.h
+++ b/include/opcode/msp430.h
@@ -1,6 +1,6 @@
/* Opcode table for the TI MSP430 microcontrollers
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This program is free software; you can redistribute it and/or modify
@@ -103,9 +103,114 @@ static struct msp430_opcode_s msp430_opcodes[] =
MSP_INSN (rra, 2, 1, 0x1100, 0xff80),
MSP_INSN (swpb, 2, 1, 0x1080, 0xffc0),
MSP_INSN (rrc, 2, 1, 0x1000, 0xff80),
+ /* Simple polymorphs. */
+ MSP_INSN (beq, 4, 0, 0, 0xffff),
+ MSP_INSN (bne, 4, 1, 0, 0xffff),
+ MSP_INSN (blt, 4, 2, 0, 0xffff),
+ MSP_INSN (bltu, 4, 3, 0, 0xffff),
+ MSP_INSN (bge, 4, 4, 0, 0xffff),
+ MSP_INSN (bgeu, 4, 5, 0, 0xffff),
+ MSP_INSN (bltn, 4, 6, 0, 0xffff),
+ MSP_INSN (jump, 4, 7, 0, 0xffff),
+ /* Long polymorphs. */
+ MSP_INSN (bgt, 5, 0, 0, 0xffff),
+ MSP_INSN (bgtu, 5, 1, 0, 0xffff),
+ MSP_INSN (bleu, 5, 2, 0, 0xffff),
+ MSP_INSN (ble, 5, 3, 0, 0xffff),
/* End of instruction set. */
{ NULL, 0, 0, 0, 0 }
};
+/* GCC uses the some condition codes which we'll
+ implement as new polymorph instructions.
+
+ COND EXPL SHORT JUMP LONG JUMP
+ ===============================================
+ eq == jeq jne +4; br lab
+ ne != jne jeq +4; br lab
+
+ ltn honours no-overflow flag
+ ltn < jn jn +2; jmp +4; br lab
+
+ lt < jl jge +4; br lab
+ ltu < jlo lhs +4; br lab
+ le <= see below
+ leu <= see below
+
+ gt > see below
+ gtu > see below
+ ge >= jge jl +4; br lab
+ geu >= jhs jlo +4; br lab
+ ===============================================
+
+ Therefore, new opcodes are (BranchEQ -> beq; and so on...)
+ beq,bne,blt,bltn,bltu,bge,bgeu
+ 'u' means unsigned compares
+
+ Also, we add 'jump' instruction:
+ jump UNCOND -> jmp br lab
+
+ They will have fmt == 4, and insn_opnumb == number of instruction. */
+
+struct rcodes_s
+{
+ char * name;
+ int index; /* Corresponding insn_opnumb. */
+ int sop; /* Opcode if jump length is short. */
+ long lpos; /* Label position. */
+ long lop0; /* Opcode 1 _word_ (16 bits). */
+ long lop1; /* Opcode second word. */
+ long lop2; /* Opcode third word. */
+};
+
+#define MSP430_RLC(n,i,sop,o1) \
+ {#n, i, sop, 2, (o1 + 2), 0x4010, 0}
+
+static struct rcodes_s msp430_rcodes[] =
+{
+ MSP430_RLC (beq, 0, 0x2400, 0x2000),
+ MSP430_RLC (bne, 1, 0x2000, 0x2400),
+ MSP430_RLC (blt, 2, 0x3800, 0x3400),
+ MSP430_RLC (bltu, 3, 0x2800, 0x2c00),
+ MSP430_RLC (bge, 4, 0x3400, 0x3800),
+ MSP430_RLC (bgeu, 5, 0x2c00, 0x2800),
+ {"bltn", 6, 0x3000, 3, 0x3000 + 1, 0x3c00 + 2,0x4010},
+ {"jump", 7, 0x3c00, 1, 0x4010, 0, 0},
+ {0,0,0,0,0,0,0}
+};
+#undef MSP430_RLC
+
+
+/* More difficult than above and they have format 5.
+
+ COND EXPL SHORT LONG
+ =================================================================
+ gt > jeq +2; jge label jeq +6; jl +4; br label
+ gtu > jeq +2; jhs label jeq +6; jlo +4; br label
+ leu <= jeq label; jlo label jeq +2; jhs +4; br label
+ le <= jeq label; jl label jeq +2; jge +4; br label
+ ================================================================= */
+
+struct hcodes_s
+{
+ char * name;
+ int index; /* Corresponding insn_opnumb. */
+ int tlab; /* Number of labels in short mode. */
+ int op0; /* Opcode for first word of short jump. */
+ int op1; /* Opcode for second word of short jump. */
+ int lop0; /* Opcodes for long jump mode. */
+ int lop1;
+ int lop2;
+};
+
+static struct hcodes_s msp430_hcodes[] =
+{
+ {"bgt", 0, 1, 0x2401, 0x3400, 0x2403, 0x3802, 0x4010 },
+ {"bgtu", 1, 1, 0x2401, 0x2c00, 0x2403, 0x2802, 0x4010 },
+ {"bleu", 2, 2, 0x2400, 0x2800, 0x2401, 0x2c02, 0x4010 },
+ {"ble", 3, 2, 0x2400, 0x3800, 0x2401, 0x3402, 0x4010 },
+ {0,0,0,0,0,0,0,0}
+};
+
#endif
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index d55caa7568f..a21cc301e82 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -249,7 +249,7 @@ extern const struct powerpc_operand powerpc_operands[];
#define PPC_OPERAND_ABSOLUTE (01000)
/* This operand is optional, and is zero if omitted. This is used for
- the optional BF and L fields in the comparison instructions. The
+ example, in the optional BF field in the comparison instructions. The
assembler must count the number of operands remaining on the line,
and the number of operands remaining for the opcode, and decide
whether this operand is present or not. The disassembler should
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 661ca4b45b9..c8ea3331525 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,74 @@
+2004-09-08 Adam Nemet <anemet@lnxw.com>
+
+ * vasprintf.c: Accept __va_copy in addition to va_copy.
+
+2004-09-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2004-09-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Do not enable multilibs for build-side libiberty.
+
+2004-06-29 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * lrealpath.c (lrealpath): Add _WIN32 support.
+
+2004-06-28 Zack Weinberg <zack@codesourcery.com>
+
+ * cp-demangle.h: Declare cplus_demangle_operators,
+ cplus_demangle_builtin_types, cplus_demangle_mangled_name, and
+ cplus_demangle_type as static if IN_GLIBCPP_V3.
+
+2004-06-28 Ian Lance Taylor <ian@wasabisystems.com>
+
+ PR other/16240
+ * cp-demangle.c (d_expr_primary): Check for a failure return from
+ cplus_demangle_type.
+ * testsuite/demangle-expected: Add test case.
+
+2004-05-31 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * pex-win32.c (fix_argv): Expand comment.
+
+2004-05-25 Daniel Jacobowitz <drow@false.org>
+
+ * Makefile.in: Add .NOEXPORT.
+
+2004-04-29 Douglas B Rupp <rupp@gnat.com>
+
+ * mkstemps.c (mkstemps) [VMS]: Remove special open option. Update
+ copyright.
+
+2004-04-26 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * configure.ac (UNSIGNED_64BIT_TYPE): Unquote the definition.
+ * configure: Regenerate.
+
+2004-04-22 Richard Henderson <rth@redhat.com>
+
+ * hashtab.c: Include limits.h, stdint.h, ansidecl.h.
+ (CHAR_BIT): Provide default.
+ (struct prime_ent, prime_tab): New.
+ (higher_prime_index): Rename from higher_prime_number, return index.
+ (htab_mod_1): New.
+ (htab_mod, htab_mod_m2): Use it.
+ (htab_create_alloc, htab_create_alloc_ex): Store prime index.
+ (htab_expand): Likewise.
+ * configure.ac: Check for stdint.h.
+ (UNSIGNED_64BIT_TYPE): New define and checks to fill it in.
+ * config.in, configure: Rebuild.
+
+2004-04-13 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * strerror.c: Include config.h, and redefine sys_nerr and
+ sys_errlist, before including ansidecl.h and libiberty.h.
+
+2004-04-13 Jeff Law <law@redhat.com>
+
+ * hashtab.c (htab_remove_elt_with_hash): New function.
+ (htab_remove_elt): Implement in terms of htab_remove_elt_with_hash.
+
2004-03-31 Richard Henderson <rth@redhat.com>
* hashtab.c (htab_size): Move to top of file; mark inline.
@@ -555,7 +626,7 @@
2003-08-12 Nathanael Nerode <neroden@gcc.gnu.org>
- * cp-demangle.c: Clarify what package(s) this is part of.
+ * cp-demangle.c: Clarify what package(s) this is part of.
2003-07-05 Danny Smith <dannysmith@users.sourceforge.net>
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 78cc4bca864..9f95c01327f 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -1057,3 +1057,6 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/xstrerror.c $(OUTPUT_OPTION)
+# Don't export variables to the environment, in order to not confuse
+# configure.
+.NOEXPORT:
diff --git a/libiberty/config.in b/libiberty/config.in
index 99ee0826708..3cce9aa1979 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -353,6 +353,9 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
+/* Define to an unsigned 64-bit type available in the compiler. */
+#undef UNSIGNED_64BIT_TYPE
+
/* whether byteorder is bigendian */
#undef WORDS_BIGENDIAN
diff --git a/libiberty/configure b/libiberty/configure
index 374d11b9321..7e189bcefd4 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -957,7 +957,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd $ac_popdir
+ cd "$ac_popdir"
done
fi
@@ -1305,6 +1305,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is
@@ -2329,8 +2330,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2388,8 +2388,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2505,8 +2504,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2560,8 +2558,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2606,8 +2603,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2651,8 +2647,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3108,8 +3103,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3169,8 +3163,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3246,8 +3239,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3288,8 +3280,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3538,7 +3529,8 @@ host_makefile_frag=${frag}
-for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
+
+for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -3630,8 +3622,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3695,8 +3686,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3757,8 +3747,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3838,8 +3827,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4068,8 +4056,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4102,6 +4089,167 @@ _ACEOF
fi
+
+# Look for a 64-bit type.
+echo "$as_me:$LINENO: checking for a 64-bit type" >&5
+echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
+if test "${liberty_cv_uint64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+int
+main ()
+{
+extern uint64_t foo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ liberty_cv_uint64=uint64_t
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+int
+main ()
+{
+extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ liberty_cv_uint64="unsigned long"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+int
+main ()
+{
+extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ liberty_cv_uint64="unsigned long long"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+liberty_cv_uint64=none
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
+echo "${ECHO_T}$liberty_cv_uint64" >&6
+if test "$liberty_cv_uint64" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
+_ACEOF
+
+fi
+
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
@@ -4143,8 +4291,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4377,8 +4524,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4792,8 +4938,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4852,8 +4997,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4953,8 +5097,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5092,8 +5235,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5314,8 +5456,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5660,8 +5801,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5772,8 +5912,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5842,8 +5981,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5908,8 +6046,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6005,8 +6142,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6082,8 +6218,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6256,8 +6391,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6601,7 +6735,9 @@ LIBOBJS="$L"
# We need multilib support, but only if configuring for the target.
ac_config_files="$ac_config_files Makefile testsuite/Makefile"
+
ac_config_commands="$ac_config_commands default"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -7130,7 +7266,6 @@ srcdir=${srcdir}
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
-with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
@@ -7444,11 +7579,6 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@@ -7487,6 +7617,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
@@ -7855,7 +7991,7 @@ echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
- if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
+ if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 39bfb51e416..d6eb26fa284 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -159,13 +159,47 @@ AC_SUBST_FILE(host_makefile_frag)
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
libiberty_AC_DECLARE_ERRNO
AC_CHECK_TYPE(uintptr_t, unsigned long)
+
+# Look for a 64-bit type.
+AC_MSG_CHECKING([for a 64-bit type])
+AC_CACHE_VAL(liberty_cv_uint64,
+[AC_TRY_COMPILE(
+[#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif],
+[extern uint64_t foo;],
+liberty_cv_uint64=uint64_t,
+[AC_TRY_COMPILE(
+[#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif],
+[extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];],
+liberty_cv_uint64="unsigned long",
+[AC_TRY_COMPILE(
+[#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif],
+[extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];],
+liberty_cv_uint64="unsigned long long", liberty_cv_uint64=none)])])])
+AC_MSG_RESULT($liberty_cv_uint64)
+if test "$liberty_cv_uint64" != none; then
+ AC_DEFINE_UNQUOTED(UNSIGNED_64BIT_TYPE, $liberty_cv_uint64,
+ [Define to an unsigned 64-bit type available in the compiler.])
+fi
+
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
@@ -512,7 +546,7 @@ AC_CONFIG_FILES([Makefile testsuite/Makefile])
AC_CONFIG_COMMANDS([default],
[[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
- if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
+ if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
@@ -523,7 +557,6 @@ fi]],
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
-with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index fe4b36712d3..8608bc82507 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2398,6 +2398,8 @@ d_expr_primary (di)
const char *s;
type = cplus_demangle_type (di);
+ if (type == NULL)
+ return NULL;
/* If we have a type we know how to print, we aren't going to
print the type name itself. */
diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h
index eea086862d6..02e74ec8735 100644
--- a/libiberty/cp-demangle.h
+++ b/libiberty/cp-demangle.h
@@ -131,19 +131,31 @@ struct d_info
/* Functions and arrays in cp-demangle.c which are referenced by
functions in cp-demint.c. */
+#ifdef IN_GLIBCPP_V3
+#define CP_STATIC_IF_GLIBCPP_V3 static
+#else
+#define CP_STATIC_IF_GLIBCPP_V3 extern
+#endif
-extern const struct demangle_operator_info cplus_demangle_operators[];
+CP_STATIC_IF_GLIBCPP_V3
+const struct demangle_operator_info cplus_demangle_operators[];
#define D_BUILTIN_TYPE_COUNT (26)
-extern const struct demangle_builtin_type_info
+CP_STATIC_IF_GLIBCPP_V3
+const struct demangle_builtin_type_info
cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT];
-extern struct demangle_component *
+CP_STATIC_IF_GLIBCPP_V3
+struct demangle_component *
cplus_demangle_mangled_name PARAMS ((struct d_info *, int));
-extern struct demangle_component *
+CP_STATIC_IF_GLIBCPP_V3
+struct demangle_component *
cplus_demangle_type PARAMS ((struct d_info *));
extern void
cplus_demangle_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+
+/* cp-demangle.c needs to define this a little differently */
+#undef CP_STATIC_IF_GLIBCPP_V3
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index f7751664f04..6e7a44b9c91 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -1,5 +1,6 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
@@ -40,20 +41,29 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
-
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
#include <stdio.h>
#include "libiberty.h"
+#include "ansidecl.h"
#include "hashtab.h"
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
/* This macro defines reserved value for empty table entry. */
#define EMPTY_ENTRY ((PTR) 0)
@@ -63,7 +73,10 @@ Boston, MA 02111-1307, USA. */
#define DELETED_ENTRY ((PTR) 1)
-static unsigned long higher_prime_number PARAMS ((unsigned long));
+static unsigned int higher_prime_index PARAMS ((unsigned long));
+static hashval_t htab_mod_1 PARAMS ((hashval_t, hashval_t, hashval_t, int));
+static hashval_t htab_mod PARAMS ((hashval_t, htab_t));
+static hashval_t htab_mod_m2 PARAMS ((hashval_t, htab_t));
static hashval_t hash_pointer PARAMS ((const void *));
static int eq_pointer PARAMS ((const void *, const void *));
static int htab_expand PARAMS ((htab_t));
@@ -75,69 +88,117 @@ static PTR *find_empty_slot_for_expand PARAMS ((htab_t, hashval_t));
htab_hash htab_hash_pointer = hash_pointer;
htab_eq htab_eq_pointer = eq_pointer;
-/* The following function returns a nearest prime number which is
- greater than N, and near a power of two. */
+/* Table of primes and multiplicative inverses.
+
+ Note that these are not minimally reduced inverses. Unlike when generating
+ code to divide by a constant, we want to be able to use the same algorithm
+ all the time. All of these inverses (are implied to) have bit 32 set.
+
+ For the record, here's the function that computed the table; it's a
+ vastly simplified version of the function of the same name from gcc. */
+
+#if 0
+unsigned int
+ceil_log2 (unsigned int x)
+{
+ int i;
+ for (i = 31; i >= 0 ; --i)
+ if (x > (1u << i))
+ return i+1;
+ abort ();
+}
+
+unsigned int
+choose_multiplier (unsigned int d, unsigned int *mlp, unsigned char *shiftp)
+{
+ unsigned long long mhigh;
+ double nx;
+ int lgup, post_shift;
+ int pow, pow2;
+ int n = 32, precision = 32;
+
+ lgup = ceil_log2 (d);
+ pow = n + lgup;
+ pow2 = n + lgup - precision;
+
+ nx = ldexp (1.0, pow) + ldexp (1.0, pow2);
+ mhigh = nx / d;
+
+ *shiftp = lgup - 1;
+ *mlp = mhigh;
+ return mhigh >> 32;
+}
+#endif
-static unsigned long
-higher_prime_number (n)
+struct prime_ent
+{
+ hashval_t prime;
+ hashval_t inv;
+ hashval_t inv_m2; /* inverse of prime-2 */
+ hashval_t shift;
+};
+
+static struct prime_ent const prime_tab[] = {
+ { 7, 0x24924925, 0x9999999b, 2 },
+ { 13, 0x3b13b13c, 0x745d1747, 3 },
+ { 31, 0x08421085, 0x1a7b9612, 4 },
+ { 61, 0x0c9714fc, 0x15b1e5f8, 5 },
+ { 127, 0x02040811, 0x0624dd30, 6 },
+ { 251, 0x05197f7e, 0x073260a5, 7 },
+ { 509, 0x01824366, 0x02864fc8, 8 },
+ { 1021, 0x00c0906d, 0x014191f7, 9 },
+ { 2039, 0x0121456f, 0x0161e69e, 10 },
+ { 4093, 0x00300902, 0x00501908, 11 },
+ { 8191, 0x00080041, 0x00180241, 12 },
+ { 16381, 0x000c0091, 0x00140191, 13 },
+ { 32749, 0x002605a5, 0x002a06e6, 14 },
+ { 65521, 0x000f00e2, 0x00110122, 15 },
+ { 131071, 0x00008001, 0x00018003, 16 },
+ { 262139, 0x00014002, 0x0001c004, 17 },
+ { 524287, 0x00002001, 0x00006001, 18 },
+ { 1048573, 0x00003001, 0x00005001, 19 },
+ { 2097143, 0x00004801, 0x00005801, 20 },
+ { 4194301, 0x00000c01, 0x00001401, 21 },
+ { 8388593, 0x00001e01, 0x00002201, 22 },
+ { 16777213, 0x00000301, 0x00000501, 23 },
+ { 33554393, 0x00001381, 0x00001481, 24 },
+ { 67108859, 0x00000141, 0x000001c1, 25 },
+ { 134217689, 0x000004e1, 0x00000521, 26 },
+ { 268435399, 0x00000391, 0x000003b1, 27 },
+ { 536870909, 0x00000019, 0x00000029, 28 },
+ { 1073741789, 0x0000008d, 0x00000095, 29 },
+ { 2147483647, 0x00000003, 0x00000007, 30 },
+ /* Avoid "decimal constant so large it is unsigned" for 4294967291. */
+ { 0xfffffffb, 0x00000006, 0x00000008, 31 }
+};
+
+/* The following function returns an index into the above table of the
+ nearest prime number which is greater than N, and near a power of two. */
+
+static unsigned int
+higher_prime_index (n)
unsigned long n;
{
- /* These are primes that are near, but slightly smaller than, a
- power of two. */
- static const unsigned long primes[] = {
- (unsigned long) 7,
- (unsigned long) 13,
- (unsigned long) 31,
- (unsigned long) 61,
- (unsigned long) 127,
- (unsigned long) 251,
- (unsigned long) 509,
- (unsigned long) 1021,
- (unsigned long) 2039,
- (unsigned long) 4093,
- (unsigned long) 8191,
- (unsigned long) 16381,
- (unsigned long) 32749,
- (unsigned long) 65521,
- (unsigned long) 131071,
- (unsigned long) 262139,
- (unsigned long) 524287,
- (unsigned long) 1048573,
- (unsigned long) 2097143,
- (unsigned long) 4194301,
- (unsigned long) 8388593,
- (unsigned long) 16777213,
- (unsigned long) 33554393,
- (unsigned long) 67108859,
- (unsigned long) 134217689,
- (unsigned long) 268435399,
- (unsigned long) 536870909,
- (unsigned long) 1073741789,
- (unsigned long) 2147483647,
- /* 4294967291L */
- ((unsigned long) 2147483647) + ((unsigned long) 2147483644),
- };
-
- const unsigned long *low = &primes[0];
- const unsigned long *high = &primes[sizeof(primes) / sizeof(primes[0])];
+ unsigned int low = 0;
+ unsigned int high = sizeof(prime_tab) / sizeof(prime_tab[0]);
while (low != high)
{
- const unsigned long *mid = low + (high - low) / 2;
- if (n > *mid)
+ unsigned int mid = low + (high - low) / 2;
+ if (n > prime_tab[mid].prime)
low = mid + 1;
else
high = mid;
}
/* If we've run out of primes, abort. */
- if (n > *low)
+ if (n > prime_tab[low].prime)
{
fprintf (stderr, "Cannot find prime bigger than %lu\n", n);
abort ();
}
- return *low;
+ return low;
}
/* Returns a hash code for P. */
@@ -177,6 +238,36 @@ htab_elements (htab)
return htab->n_elements - htab->n_deleted;
}
+/* Return X % Y. */
+
+static inline hashval_t
+htab_mod_1 (x, y, inv, shift)
+ hashval_t x, y, inv;
+ int shift;
+{
+ /* The multiplicative inverses computed above are for 32-bit types, and
+ requires that we be able to compute a highpart multiply. */
+#ifdef UNSIGNED_64BIT_TYPE
+ __extension__ typedef UNSIGNED_64BIT_TYPE ull;
+ if (sizeof (hashval_t) * CHAR_BIT <= 32)
+ {
+ hashval_t t1, t2, t3, t4, q, r;
+
+ t1 = ((ull)x * inv) >> 32;
+ t2 = x - t1;
+ t3 = t2 >> 1;
+ t4 = t1 + t3;
+ q = t4 >> shift;
+ r = x - (q * y);
+
+ return r;
+ }
+#endif
+
+ /* Otherwise just use the native division routines. */
+ return x % y;
+}
+
/* Compute the primary hash for HASH given HTAB's current size. */
static inline hashval_t
@@ -184,7 +275,8 @@ htab_mod (hash, htab)
hashval_t hash;
htab_t htab;
{
- return hash % htab_size (htab);
+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
+ return htab_mod_1 (hash, p->prime, p->inv, p->shift);
}
/* Compute the secondary hash for HASH given HTAB's current size. */
@@ -194,7 +286,8 @@ htab_mod_m2 (hash, htab)
hashval_t hash;
htab_t htab;
{
- return 1 + hash % (htab_size (htab) - 2);
+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
+ return 1 + htab_mod_1 (hash, p->prime - 2, p->inv_m2, p->shift);
}
/* This function creates table with length slightly longer than given
@@ -212,8 +305,11 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
htab_free free_f;
{
htab_t result;
+ unsigned int size_prime_index;
+
+ size_prime_index = higher_prime_index (size);
+ size = prime_tab[size_prime_index].prime;
- size = higher_prime_number (size);
result = (htab_t) (*alloc_f) (1, sizeof (struct htab));
if (result == NULL)
return NULL;
@@ -225,6 +321,7 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
return NULL;
}
result->size = size;
+ result->size_prime_index = size_prime_index;
result->hash_f = hash_f;
result->eq_f = eq_f;
result->del_f = del_f;
@@ -248,8 +345,11 @@ htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
htab_free_with_arg free_f;
{
htab_t result;
+ unsigned int size_prime_index;
+
+ size_prime_index = higher_prime_index (size);
+ size = prime_tab[size_prime_index].prime;
- size = higher_prime_number (size);
result = (htab_t) (*alloc_f) (alloc_arg, 1, sizeof (struct htab));
if (result == NULL)
return NULL;
@@ -261,6 +361,7 @@ htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
return NULL;
}
result->size = size;
+ result->size_prime_index = size_prime_index;
result->hash_f = hash_f;
result->eq_f = eq_f;
result->del_f = del_f;
@@ -412,19 +513,27 @@ htab_expand (htab)
PTR *olimit;
PTR *p;
PTR *nentries;
- size_t nsize;
+ size_t nsize, osize, elts;
+ unsigned int oindex, nindex;
oentries = htab->entries;
- olimit = oentries + htab->size;
+ oindex = htab->size_prime_index;
+ osize = htab->size;
+ olimit = oentries + osize;
+ elts = htab_elements (htab);
/* Resize only when table after removal of unused elements is either
too full or too empty. */
- if ((htab->n_elements - htab->n_deleted) * 2 > htab->size
- || ((htab->n_elements - htab->n_deleted) * 8 < htab->size
- && htab->size > 32))
- nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2);
+ if (elts * 2 > osize || (elts * 8 < osize && osize > 32))
+ {
+ nindex = higher_prime_index (elts * 2);
+ nsize = prime_tab[nindex].prime;
+ }
else
- nsize = htab->size;
+ {
+ nindex = oindex;
+ nsize = osize;
+ }
if (htab->alloc_with_arg_f != NULL)
nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
@@ -435,7 +544,7 @@ htab_expand (htab)
return 0;
htab->entries = nentries;
htab->size = nsize;
-
+ htab->size_prime_index = nindex;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
@@ -600,17 +709,31 @@ htab_find_slot (htab, element, insert)
}
/* This function deletes an element with the given value from hash
+ table (the hash is computed from the element). If there is no matching
+ element in the hash table, this function does nothing. */
+
+void
+htab_remove_elt (htab, element)
+ htab_t htab;
+ PTR element;
+{
+ htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
+}
+
+
+/* This function deletes an element with the given value from hash
table. If there is no matching element in the hash table, this
function does nothing. */
void
-htab_remove_elt (htab, element)
+htab_remove_elt_with_hash (htab, element, hash)
htab_t htab;
PTR element;
+ hashval_t hash;
{
PTR *slot;
- slot = htab_find_slot (htab, element, NO_INSERT);
+ slot = htab_find_slot_with_hash (htab, element, hash, NO_INSERT);
if (*slot == EMPTY_ENTRY)
return;
diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c
index b001b38ef66..4877753cd66 100644
--- a/libiberty/lrealpath.c
+++ b/libiberty/lrealpath.c
@@ -64,6 +64,12 @@ extern char *canonicalize_file_name (const char *);
# define REALPATH_LIMIT MAXPATHLEN
# endif
# endif
+#else
+ /* cygwin has realpath, so it won't get here. */
+# if defined (_WIN32)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h> /* for GetFullPathName */
+# endif
#endif
char *
@@ -123,6 +129,30 @@ lrealpath (filename)
}
#endif
+ /* The MS Windows method. If we don't have realpath, we assume we
+ don't have symlinks and just canonicalize to a Windows absolute
+ path. GetFullPath converts ../ and ./ in relative paths to
+ absolute paths, filling in current drive if one is not given
+ or using the current directory of a specified drive (eg, "E:foo").
+ It also converts all forward slashes to back slashes. */
+#if defined (_WIN32)
+ {
+ char buf[MAX_PATH];
+ char* basename;
+ DWORD len = GetFullPathName (filename, MAX_PATH, buf, &basename);
+ if (len == 0 || len > MAX_PATH - 1)
+ return strdup (filename);
+ else
+ {
+ /* The file system is case-preserving but case-insensitive,
+ Canonicalize to lowercase, using the codepage associated
+ with the process locale. */
+ CharLowerBuff (buf, len);
+ return strdup (buf);
+ }
+ }
+#endif
+
/* This system is a lost cause, just duplicate the filename. */
return strdup (filename);
}
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c
index 1f6600a15b9..94edf78755b 100644
--- a/libiberty/mkstemps.c
+++ b/libiberty/mkstemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998, 2004 Free Software Foundation, Inc.
This file is derived from mkstemp.c from the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -121,11 +121,7 @@ mkstemps (template, suffix_len)
v /= 62;
XXXXXX[5] = letters[v % 62];
-#ifdef VMS
- fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
-#else
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
-#endif
if (fd >= 0)
/* The file does not exist. */
return fd;
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 27a5bb4e309..2b4abdffbf9 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -59,7 +59,12 @@ fix_argv (argvec)
int i;
char * command0 = argvec[0];
- /* Ensure that the executable pathname uses Win32 backslashes. */
+ /* Ensure that the executable pathname uses Win32 backslashes. This
+ is not necessary on NT, but on W9x, forward slashes causes failure
+ of spawn* and exec* functions (and probably any function that
+ calls CreateProcess) *iff* the executable pathname (argvec[0]) is
+ a quoted string. And quoting is necessary in case a pathname
+ contains embedded white space. You can't win. */
for (; *command0 != '\0'; command0++)
if (*command0 == '/')
*command0 = '\\';
diff --git a/libiberty/strerror.c b/libiberty/strerror.c
index 83a5992b4dd..c0edb47e0c8 100644
--- a/libiberty/strerror.c
+++ b/libiberty/strerror.c
@@ -2,9 +2,6 @@
Written by Fred Fish. fnf@cygnus.com
This file is in the public domain. --Per Bothner. */
-#include "ansidecl.h"
-#include "libiberty.h"
-
#include "config.h"
#ifdef HAVE_SYS_ERRLIST
@@ -17,6 +14,9 @@
#define sys_errlist sys_errlist__
#endif
+#include "ansidecl.h"
+#include "libiberty.h"
+
#include <stdio.h>
#include <errno.h>
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 9a3f0b9da8d..d38ce33c830 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3699,6 +3699,11 @@ _Z3fooIPA3_iEvRKT_
void foo<int (*) [3]>(int (* const&) [3])
foo<int (*) [3]>
#
+# This used to crash the demangler--PR 16240
+--format=gnu-v3 --no-params
+_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
+_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
+PatternDriver::StringScalarDeleteValue::StringScalarDeleteValue
# Test GNU V3 constructor and destructor identification.
# 0 means it is not a constructor/destructor.
# Other integers correspond to enum gnu_v3_{c,d}tor_kinds in demangle.h.
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index d3d4f3a1553..7eaf2b18d6f 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA. */
#else
#include <varargs.h>
#endif
+#if !defined (va_copy) && defined (__va_copy)
+# define va_copy(d,s) __va_copy((d),(s))
+#endif
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
diff --git a/libtool.m4 b/libtool.m4
index d2e36088dee..7e4a2eec463 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -577,7 +577,7 @@ darwin* | rhapsody*)
esac
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -645,7 +645,7 @@ linux-gnu*)
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
-netbsd*)
+netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
else
diff --git a/ltcf-c.sh b/ltcf-c.sh
index d60a3baa19b..e73ff16f7f8 100644
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -185,7 +185,7 @@ EOF
whole_archive_flag_spec='-all_load $convenience'
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -409,7 +409,7 @@ else
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -456,7 +456,7 @@ else
link_all_deplibs=yes
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh
index 9059b1a002f..465650ff4d5 100644
--- a/ltcf-cxx.sh
+++ b/ltcf-cxx.sh
@@ -244,7 +244,7 @@ case $host_os in
# C++ shared libraries reported to be fairly broken before switch to ELF
ld_shlibs=no
;;
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs=yes
@@ -404,7 +404,7 @@ case $host_os in
;;
esac
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
# NetBSD uses g++ - do we need to do anything?
;;
osf3*)
@@ -759,7 +759,7 @@ else
;;
esac
;;
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
# FreeBSD uses GNU C++
;;
gnu*)
diff --git a/ltcf-gcj.sh b/ltcf-gcj.sh
index 2d704975c86..95c6fcd353a 100644
--- a/ltcf-gcj.sh
+++ b/ltcf-gcj.sh
@@ -178,7 +178,7 @@ EOF
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -402,7 +402,7 @@ else
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -433,7 +433,7 @@ else
link_all_deplibs=yes
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
diff --git a/ltconfig b/ltconfig
index 0a8c7d2f4c4..7972327da0a 100755
--- a/ltconfig
+++ b/ltconfig
@@ -1164,6 +1164,17 @@ gnu*)
hardcode_into_libs=yes
;;
+kfreebsd*-gnu | knetbsd*-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=yes
+ hardcode_into_libs=yes
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
diff --git a/missing b/missing
index 25c96676def..64b5f901dd5 100755
--- a/missing
+++ b/missing
@@ -1,6 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2004-09-07.08
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -38,18 +42,24 @@ else
configure_ac=configure.in
fi
+msg="missing on your system"
+
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit 0
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.4 - GNU automake"
+ echo "missing $scriptversion (GNU Automake)"
+ exit 0
;;
-*)
@@ -87,14 +101,44 @@ Supported PROGRAM values:
exit 1
;;
- aclocal*)
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
@@ -262,13 +281,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
@@ -284,10 +298,6 @@ WARNING: \`$1' is missing on your system. You should only need it if
tar)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,10 +333,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@@ -334,3 +344,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac
exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 65b0898b0d1..6405e9f0557 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,273 @@
+2004-09-11 Andreas Schwab <schwab@suse.de>
+
+ * configure: Rebuild.
+
+2004-09-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * ppc-opc.c (L): Make this field not optional.
+
+2004-09-03 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * opc-crx.c: Rename 'popma' to 'popa', remove 'pushma'.
+ Fix parameter to 'm[t|f]csr' insns.
+
+2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Autoupdate to autoconf 2.59.
+ * aclocal.m4: Rebuild with aclocal 1.4p6.
+ * configure: Rebuild with autoconf 2.59.
+ * Makefile.in: Rebuild with automake 1.4p6 (picking up
+ bfd changes for autoconf 2.59 on the way).
+ * config.in: Rebuild with autoheader 2.59.
+
+2004-08-27 Richard Sandiford <rsandifo@redhat.com>
+
+ * frv-desc.[ch], frv-opc.[ch]: Regenerated.
+
+2004-07-30 Michal Ludvig <mludvig@suse.cz>
+
+ * i386-dis.c (GRPPADLCK): Renamed to GRPPADLCK1
+ (GRPPADLCK2): New define.
+ (twobyte_has_modrm): True for 0xA6.
+ (grps): GRPPADLCK2 for opcode 0xA6.
+
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ * sh-opc.h (arch_sh2a_base): Renumber.
+ (arch_sh2a_nofpu_base): Remove.
+ (arch_sh_base_mask): Adjust.
+ (arch_opann_mask): New.
+ (arch_sh2a, arch_sh2a_nofpu): Adjust.
+ (arch_sh2a_up, arch_sh2a_nofpu_up): Likewise.
+ (sh_table): Adjust whitespace.
+ 2004-02-24 Corinna Vinschen <vinschen@redhat.com>
+ * sh-opc.h (arch_sh2a_nofpu_up): New. Use instead of arch_sh2a_up in
+ instruction list throughout.
+ (arch_sh2a_up): Redefine to include fpu instruction set. Use instead
+ of arch_sh2a in instruction list throughout.
+ (arch_sh2e_up): Accomodate above changes.
+ (arch_sh2_up): Ditto.
+ 2004-02-20 Corinna Vinschen <vinschen@redhat.com>
+ * sh-opc.h: Add arch_sh2a_nofpu to arch_sh2_up.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * sh-dis.c (print_insn_sh): Add bfd_mach_sh2a_nofpu handling.
+ * sh-opc.h (arch_sh2a_nofpu): New.
+ (arch_sh2a_up): New, defines sh2a and sh2a_nofpu.
+ (sh_table): Change all arch_sh2a to arch_sh2a_up unless FPU
+ instruction.
+ 2004-01-20 DJ Delorie <dj@redhat.com>
+ * sh-dis.c (print_insn_sh): SH2A does not have 'X' fp regs.
+ 2003-12-29 DJ Delorie <dj@redhat.com>
+ * sh-opc.c (sh_nibble_type, sh_arg_type, arch_2a, arch_2e_up,
+ sh_opcode_info, sh_table): Add sh2a support.
+ (arch_op32): New, to tag 32-bit opcodes.
+ * sh-dis.c (print_insn_sh): Support sh2a opcodes.
+ 2003-12-02 Michael Snyder <msnyder@redhat.com>
+ * sh-opc.h (arch_sh2a): Add.
+ * sh-dis.c (arch_sh2a): Handle.
+ * sh-opc.h (arch_sh2_up): Fix up to include arch_sh2a.
+
+2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx-opc.c: Add popx,pushx insns. Indent code, fix comments.
+
+2004-07-22 Nick Clifton <nickc@redhat.com>
+
+ PR/280
+ * h8300-dis.c (bfd_h8_disassemble): Do not dump raw bytes for the
+ insns - this is done by objdump itself.
+ * h8500-dis.c (print_insn_h8500): Likewise.
+
+2004-07-21 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (OP_E): Show rip-relative addressing in 64-bit mode
+ regardless of address size prefix in effect.
+ (ptr_reg): Size or address registers does not depend on rex64, but
+ on the presence of an address size override.
+ (OP_MMX): Use rex.x only for xmm registers.
+ (OP_EM): Use rex.z only for xmm registers.
+
+2004-07-20 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * mips-opc.c (mips_builtin_opcodes): Move coprocessor 2
+ move/branch operations to the bottom so that VR5400 multimedia
+ instructions take precedence in disassembly.
+
+2004-07-20 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * mips-opc.c (mips_builtin_opcodes): Remove the MIPS32
+ ISA-specific "break" encoding.
+
+2004-07-13 Elvis Chiang <elvisfb@gmail.com>
+
+ * arm-opc.h: Fix typo in comment.
+
+2004-07-11 Andreas Schwab <schwab@suse.de>
+
+ * m68k-dis.c (m68k_valid_ea): Fix typos in last change.
+
+2004-07-09 Andreas Schwab <schwab@suse.de>
+
+ * m68k-dis.c (m68k_valid_ea): Check validity of all codes.
+
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * Makefile.am (CFILES): Add crx-dis.c, crx-opc.c.
+ (ALL_MACHINES): Add crx-dis.lo, crx-opc.lo.
+ (crx-dis.lo): New target.
+ (crx-opc.lo): Likewise.
+ * Makefile.in: Regenerate.
+ * configure.in: Handle bfd_crx_arch.
+ * configure: Regenerate.
+ * crx-dis.c: New file.
+ * crx-opc.c: New file.
+ * disassemble.c (ARCH_crx): Define.
+ (disassembler): Handle ARCH_crx.
+
+2004-06-29 James E Wilson <wilson@specifixinc.com>
+
+ * ia64-opc-a.c (ia64_opcodes_a): Delete mov immediate pseudo for adds.
+ * ia64-asmtab.c: Regnerate.
+
+2004-06-28 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (insert_fxm): Handle mfocrf and mtocrf.
+ (extract_fxm): Don't test dialect.
+ (XFXFXM_MASK): Include the power4 bit.
+ (XFXM): Add p4 param.
+ (powerpc_opcodes): Add mfocrf and mtocrf. Adjust mtcr.
+
+2004-06-27 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-07-21 Richard Sandiford <rsandifo@redhat.com>
+ * disassemble.c (disassembler): Handle bfd_mach_h8300sxn.
+
+2004-06-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (BH, XLBH_MASK): Define.
+ (powerpc_opcodes): Allow BH field on bclr, bclrl, bcctr, bcctrl.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * i386-dis.c (x_mode): Comment.
+ (two_source_ops): File scope.
+ (float_mem): Correct fisttpll and fistpll.
+ (float_mem_mode): New table.
+ (dofloat): Use it.
+ (OP_E): Correct intel mode PTR output.
+ (ptr_reg): Use open_char and close_char.
+ (PNI_Fixup): Handle possible suffix on sidt. Use op1out etc. for
+ operands. Set two_source_ops.
+
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * arc-ext.c (build_ARC_extmap): Use bfd_get_section_size
+ instead of _raw_size.
+
+2004-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ * ia64-gen.c (in_iclass): Handle more postinc st
+ and ld variants.
+ * ia64-asmtab.c: Rebuilt.
+
+2004-06-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390-opc.txt: Correct architecture mask for some opcodes.
+ lrv, lrvh, strv, ml, dl, alc, slb rll and mvclu are available
+ in the esa mode as well.
+
+2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * sh-dis.c (target_arch): Make unsigned.
+ (print_insn_sh): Replace (most of) switch with a call to
+ sh_get_arch_from_bfd_mach(). Also use new architecture flags system.
+ * sh-opc.h: Redefine architecture flags values.
+ Add sh3-nommu architecture.
+ Reorganise <arch>_up macros so they make more visual sense.
+ (SH_MERGE_ARCH_SET): Define new macro.
+ (SH_VALID_BASE_ARCH_SET): Likewise.
+ (SH_VALID_MMU_ARCH_SET): Likewise.
+ (SH_VALID_CO_ARCH_SET): Likewise.
+ (SH_VALID_ARCH_SET): Likewise.
+ (SH_MERGE_ARCH_SET_VALID): Likewise.
+ (SH_ARCH_SET_HAS_FPU): Likewise.
+ (SH_ARCH_SET_HAS_DSP): Likewise.
+ (SH_ARCH_UNKNOWN_ARCH): Likewise.
+ (sh_get_arch_from_bfd_mach): Add prototype.
+ (sh_get_arch_up_from_bfd_mach): Likewise.
+ (sh_get_bfd_mach_from_arch_set): Likewise.
+ (sh_merge_bfd_arc): Likewise.
+
+2004-05-24 Peter Barada <peter@the-baradas.com>
+
+ * m68k-dis.c(print_insn_m68k): Strip body of diassembly out
+ into new match_insn_m68k function. Loop over canidate
+ matches and select first that completely matches.
+ * m68k-dis.c(print_insn_arg): Fix 'g' case to only extract 1 bit.
+ * m68k-dis.c(print_insn_arg): Call new function m68k_valid_ea
+ to verify addressing for MAC/EMAC.
+ * m68k-dis.c(print_insn_arg): Use reg_half_names for MAC/EMAC
+ reigster halves since 'fpu' and 'spl' look misleading.
+ * m68k-dis.c(fetch_arg): Fix 'G', 'H', 'I', 'f', 'M', 'N' cases.
+ * m68k-opc.c: Rearragne mac/emac cases to use longest for
+ first, tighten up match masks.
+ * m68k-opc.c: Add 'size' field to struct m68k_opcode. Produce
+ 'size' from special case code in print_insn_m68k to
+ determine decode size of insns.
+
+2004-05-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (insert_fxm): Enable two operand mfcr when -many as
+ well as when -mpower4.
+
+2004-05-13 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2004-05-05 Peter Barada <peter@the-baradas.com>
+
+ * m68k-dis.c(print_insn_m68k): Add new chips, use core
+ variants in arch_mask. Only set m68881/68851 for 68k chips.
+ * m68k-op.c: Switch from ColdFire chips to core variants.
+
+2004-05-05 Alan Modra <amodra@bigpond.net.au>
+
+ PR 147.
+ * ppc-opc.c (PPCVEC): Remove PPC_OPCODE_PPC.
+
+2004-04-29 Ben Elliston <bje@au.ibm.com>
+
+ * ppc-opc.c (XCMPL): Renmame to XOPL. Update users.
+ (powerpc_opcodes): Add "dbczl" instruction for PPC970.
+
+2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * sh-dis.c (print_insn_sh): Print the value in constant pool
+ as a symbol if it looks like a symbol.
+
+2004-04-22 Peter Barada <peter@the-baradas.com>
+
+ * m68k-dis.c(print_insn_m68k): Set mfcmac/mcfemac on
+ appropriate ColdFire architectures.
+ (print_insn_m68k): Handle EMAC, MAC/EMAC scalefactor, and MAC/EMAC
+ mask addressing.
+ Add EMAC instructions, fix MAC instructions. Remove
+ macmw/macml/msacmw/msacml instructions since mask addressing now
+ supported.
+
+2004-04-20 Jakub Jelinek <jakub@redhat.com>
+
+ * sparc-opc.c (fmoviccx, fmovfccx, fmovccx): Define.
+ (fmovicc, fmovfcc, fmovcc): Remove fpsize argument, change opcode to
+ suffix. Use fmov*x macros, create all 3 fpsize variants in one
+ macro. Adjust all users.
+
+2004-04-15 Anil Paranjpe <anilp1@kpitcummins.com>
+
+ * h8300-dis.c (bfd_h8_disassemble) : Treat "adds" & "subs"
+ separately.
+
2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* m32r-asm.c: Regenerate.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index ea621f2d366..5c28971dade 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -57,6 +57,8 @@ CFILES = \
cgen-opc.c \
cris-dis.c \
cris-opc.c \
+ crx-dis.c \
+ crx-opc.c \
d10v-dis.c \
d10v-opc.c \
d30v-dis.c \
@@ -179,6 +181,8 @@ ALL_MACHINES = \
cgen-opc.lo \
cris-dis.lo \
cris-opc.lo \
+ crx-dis.lo \
+ crx-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
d30v-dis.lo \
@@ -548,6 +552,9 @@ cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
$(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
+crx-dis.lo: crx-dis.c $(INCDIR)/opcode/crx.h \
+ $(INCDIR)/dis-asm.h sysdep.h $(INCDIR)/ansidecl.h
+crx-opc.lo: crx-opc.c $(INCDIR)/opcode/crx.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 559194dab78..9acfc0b03a9 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -57,12 +57,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
AR = @AR@
AS = @AS@
BFD_MACHINES = @BFD_MACHINES@
@@ -70,6 +66,7 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
+CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
@@ -80,16 +77,21 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
+GNATBIND = @GNATBIND@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
+HAVE_LIB = @HAVE_LIB@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LIB = @LIB@
LIBTOOL = @LIBTOOL@
+LN = @LN@
LN_S = @LN_S@
+LTLIB = @LTLIB@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -107,8 +109,16 @@ VERSION = @VERSION@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
archdefs = @archdefs@
+build_noncanonical = @build_noncanonical@
+build_subdir = @build_subdir@
cgendir = @cgendir@
+do_compare = @do_compare@
+host_noncanonical = @host_noncanonical@
+host_subdir = @host_subdir@
l = @l@
+ncn_cv_ = @ncn_cv_@
+target_noncanonical = @target_noncanonical@
+target_subdir = @target_subdir@
AUTOMAKE_OPTIONS = cygnus
@@ -133,259 +143,14 @@ BFD_H = ../bfd/bfd.h
LIBIBERTY = ../libiberty/libiberty.a
# Header files.
-HFILES = \
- arm-opc.h \
- fr30-desc.h fr30-opc.h \
- frv-desc.h frv-opc.h \
- h8500-opc.h \
- ia64-asmtab.h \
- ia64-opc.h \
- ip2k-desc.h ip2k-opc.h \
- iq2000-desc.h iq2000-opc.h \
- m32r-desc.h m32r-opc.h \
- mcore-opc.h \
- openrisc-desc.h openrisc-opc.h \
- sh-opc.h \
- sh64-opc.h \
- sysdep.h \
- w65-opc.h \
- xstormy16-desc.h xstormy16-opc.h \
- z8k-opc.h
+HFILES = arm-opc.h fr30-desc.h fr30-opc.h frv-desc.h frv-opc.h h8500-opc.h ia64-asmtab.h ia64-opc.h ip2k-desc.h ip2k-opc.h iq2000-desc.h iq2000-opc.h m32r-desc.h m32r-opc.h mcore-opc.h openrisc-desc.h openrisc-opc.h sh-opc.h sh64-opc.h sysdep.h w65-opc.h xstormy16-desc.h xstormy16-opc.h z8k-opc.h
# C source files that correspond to .o's.
-CFILES = \
- a29k-dis.c \
- alpha-dis.c \
- alpha-opc.c \
- arc-dis.c \
- arc-opc.c \
- arc-ext.c \
- arm-dis.c \
- avr-dis.c \
- cgen-asm.c \
- cgen-dis.c \
- cgen-opc.c \
- cris-dis.c \
- cris-opc.c \
- d10v-dis.c \
- d10v-opc.c \
- d30v-dis.c \
- d30v-opc.c \
- dlx-dis.c \
- dis-buf.c \
- dis-init.c \
- disassemble.c \
- fr30-asm.c \
- fr30-desc.c \
- fr30-dis.c \
- fr30-ibld.c \
- fr30-opc.c \
- frv-asm.c \
- frv-desc.c \
- frv-dis.c \
- frv-ibld.c \
- frv-opc.c \
- h8300-dis.c \
- h8500-dis.c \
- hppa-dis.c \
- i370-dis.c \
- i370-opc.c \
- i386-dis.c \
- i860-dis.c \
- i960-dis.c \
- ia64-dis.c \
- ia64-opc-a.c \
- ia64-opc-b.c \
- ia64-opc-f.c \
- ia64-opc-i.c \
- ia64-opc-m.c \
- ia64-opc-d.c \
- ia64-opc.c \
- ia64-gen.c \
- ia64-asmtab.c \
- ip2k-asm.c \
- ip2k-desc.c \
- ip2k-dis.c \
- ip2k-ibld.c \
- ip2k-opc.c \
- iq2000-asm.c \
- iq2000-desc.c \
- iq2000-dis.c \
- iq2000-ibld.c \
- iq2000-opc.c \
- m32r-asm.c \
- m32r-desc.c \
- m32r-dis.c \
- m32r-ibld.c \
- m32r-opc.c \
- m32r-opinst.c \
- m68hc11-dis.c \
- m68hc11-opc.c \
- m68k-dis.c \
- m68k-opc.c \
- m88k-dis.c \
- mcore-dis.c \
- mips-dis.c \
- mips-opc.c \
- mips16-opc.c \
- m10200-dis.c \
- m10200-opc.c \
- m10300-dis.c \
- m10300-opc.c \
- mmix-dis.c \
- mmix-opc.c \
- ns32k-dis.c \
- openrisc-asm.c \
- openrisc-desc.c \
- openrisc-dis.c \
- openrisc-ibld.c \
- openrisc-opc.c \
- or32-dis.c \
- or32-opc.c \
- pdp11-dis.c \
- pdp11-opc.c \
- pj-dis.c \
- pj-opc.c \
- ppc-dis.c \
- ppc-opc.c \
- s390-mkopc.c \
- s390-opc.c \
- s390-dis.c \
- sh-dis.c \
- sh64-dis.c \
- sh64-opc.c \
- sparc-dis.c \
- sparc-opc.c \
- tic30-dis.c \
- tic4x-dis.c \
- tic54x-dis.c \
- tic54x-opc.c \
- tic80-dis.c \
- tic80-opc.c \
- v850-dis.c \
- v850-opc.c \
- vax-dis.c \
- w65-dis.c \
- xstormy16-asm.c \
- xstormy16-desc.c \
- xstormy16-dis.c \
- xstormy16-ibld.c \
- xstormy16-opc.c \
- xtensa-dis.c \
- z8k-dis.c \
- z8kgen.c
-
-
-ALL_MACHINES = \
- a29k-dis.lo \
- alpha-dis.lo \
- alpha-opc.lo \
- arc-dis.lo \
- arc-opc.lo \
- arc-ext.lo \
- arm-dis.lo \
- avr-dis.lo \
- cgen-asm.lo \
- cgen-dis.lo \
- cgen-opc.lo \
- cris-dis.lo \
- cris-opc.lo \
- d10v-dis.lo \
- d10v-opc.lo \
- d30v-dis.lo \
- d30v-opc.lo \
- dlx-dis.lo \
- fr30-asm.lo \
- fr30-desc.lo \
- fr30-dis.lo \
- fr30-ibld.lo \
- fr30-opc.lo \
- frv-asm.lo \
- frv-desc.lo \
- frv-dis.lo \
- frv-ibld.lo \
- frv-opc.lo \
- h8300-dis.lo \
- h8500-dis.lo \
- hppa-dis.lo \
- i386-dis.lo \
- i370-dis.lo \
- i370-opc.lo \
- i860-dis.lo \
- i960-dis.lo \
- ia64-dis.lo \
- ia64-opc.lo \
- ip2k-asm.lo \
- ip2k-desc.lo \
- ip2k-dis.lo \
- ip2k-ibld.lo \
- ip2k-opc.lo \
- iq2000-asm.lo \
- iq2000-desc.lo \
- iq2000-dis.lo \
- iq2000-ibld.lo \
- iq2000-opc.lo \
- m32r-asm.lo \
- m32r-desc.lo \
- m32r-dis.lo \
- m32r-ibld.lo \
- m32r-opc.lo \
- m32r-opinst.lo \
- m68hc11-dis.lo \
- m68hc11-opc.lo \
- m68k-dis.lo \
- m68k-opc.lo \
- m88k-dis.lo \
- m10200-dis.lo \
- m10200-opc.lo \
- m10300-dis.lo \
- m10300-opc.lo \
- mcore-dis.lo \
- mips-dis.lo \
- mips-opc.lo \
- mips16-opc.lo \
- mmix-dis.lo \
- mmix-opc.lo \
- msp430-dis.lo \
- ns32k-dis.lo \
- openrisc-asm.lo \
- openrisc-desc.lo \
- openrisc-dis.lo \
- openrisc-ibld.lo \
- openrisc-opc.lo \
- or32-dis.lo \
- or32-opc.lo \
- pdp11-dis.lo \
- pdp11-opc.lo \
- pj-dis.lo \
- pj-opc.lo \
- ppc-dis.lo \
- ppc-opc.lo \
- s390-dis.lo \
- s390-opc.lo \
- sh-dis.lo \
- sh64-dis.lo \
- sh64-opc.lo \
- sparc-dis.lo \
- sparc-opc.lo \
- tic30-dis.lo \
- tic4x-dis.lo \
- tic54x-dis.lo \
- tic54x-opc.lo \
- tic80-dis.lo \
- tic80-opc.lo \
- v850-dis.lo \
- v850-opc.lo \
- vax-dis.lo \
- w65-dis.lo \
- xstormy16-asm.lo \
- xstormy16-desc.lo \
- xstormy16-dis.lo \
- xstormy16-ibld.lo \
- xstormy16-opc.lo \
- xtensa-dis.lo \
- z8k-dis.lo
+CFILES = a29k-dis.c alpha-dis.c alpha-opc.c arc-dis.c arc-opc.c arc-ext.c arm-dis.c avr-dis.c cgen-asm.c cgen-dis.c cgen-opc.c cris-dis.c cris-opc.c crx-dis.c crx-opc.c d10v-dis.c d10v-opc.c d30v-dis.c d30v-opc.c dlx-dis.c dis-buf.c dis-init.c disassemble.c fr30-asm.c fr30-desc.c fr30-dis.c fr30-ibld.c fr30-opc.c frv-asm.c frv-desc.c frv-dis.c frv-ibld.c frv-opc.c h8300-dis.c h8500-dis.c hppa-dis.c i370-dis.c i370-opc.c i386-dis.c i860-dis.c i960-dis.c ia64-dis.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c ia64-opc-i.c ia64-opc-m.c ia64-opc-d.c ia64-opc.c ia64-gen.c ia64-asmtab.c ip2k-asm.c ip2k-desc.c ip2k-dis.c ip2k-ibld.c ip2k-opc.c iq2000-asm.c iq2000-desc.c iq2000-dis.c iq2000-ibld.c iq2000-opc.c m32r-asm.c m32r-desc.c m32r-dis.c m32r-ibld.c m32r-opc.c m32r-opinst.c m68hc11-dis.c m68hc11-opc.c m68k-dis.c m68k-opc.c m88k-dis.c mcore-dis.c mips-dis.c mips-opc.c mips16-opc.c m10200-dis.c m10200-opc.c m10300-dis.c m10300-opc.c mmix-dis.c mmix-opc.c ns32k-dis.c openrisc-asm.c openrisc-desc.c openrisc-dis.c openrisc-ibld.c openrisc-opc.c or32-dis.c or32-opc.c pdp11-dis.c pdp11-opc.c pj-dis.c pj-opc.c ppc-dis.c ppc-opc.c s390-mkopc.c s390-opc.c s390-dis.c sh-dis.c sh64-dis.c sh64-opc.c sparc-dis.c sparc-opc.c tic30-dis.c tic4x-dis.c tic54x-dis.c tic54x-opc.c tic80-dis.c tic80-opc.c v850-dis.c v850-opc.c vax-dis.c w65-dis.c xstormy16-asm.c xstormy16-desc.c xstormy16-dis.c xstormy16-ibld.c xstormy16-opc.c xtensa-dis.c z8k-dis.c z8kgen.c
+
+
+ALL_MACHINES = a29k-dis.lo alpha-dis.lo alpha-opc.lo arc-dis.lo arc-opc.lo arc-ext.lo arm-dis.lo avr-dis.lo cgen-asm.lo cgen-dis.lo cgen-opc.lo cris-dis.lo cris-opc.lo crx-dis.lo crx-opc.lo d10v-dis.lo d10v-opc.lo d30v-dis.lo d30v-opc.lo dlx-dis.lo fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo h8300-dis.lo h8500-dis.lo hppa-dis.lo i386-dis.lo i370-dis.lo i370-opc.lo i860-dis.lo i960-dis.lo ia64-dis.lo ia64-opc.lo ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo m68hc11-dis.lo m68hc11-opc.lo m68k-dis.lo m68k-opc.lo m88k-dis.lo m10200-dis.lo m10200-opc.lo m10300-dis.lo m10300-opc.lo mcore-dis.lo mips-dis.lo mips-opc.lo mips16-opc.lo mmix-dis.lo mmix-opc.lo msp430-dis.lo ns32k-dis.lo openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo or32-dis.lo or32-opc.lo pdp11-dis.lo pdp11-opc.lo pj-dis.lo pj-opc.lo ppc-dis.lo ppc-opc.lo s390-dis.lo s390-opc.lo sh-dis.lo sh64-dis.lo sh64-opc.lo sparc-dis.lo sparc-opc.lo tic30-dis.lo tic4x-dis.lo tic54x-dis.lo tic54x-opc.lo tic80-dis.lo tic80-opc.lo v850-dis.lo v850-opc.lo vax-dis.lo w65-dis.lo xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo xtensa-dis.lo z8k-dis.lo
OFILES = @BFD_MACHINES@
@@ -411,10 +176,7 @@ noinst_LIBRARIES = libopcodes.a
POTFILES = $(HFILES) $(CFILES)
-CLEANFILES = \
- stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
- stamp-iq2000 stamp-xstormy16 \
- libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
+CLEANFILES = stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc stamp-iq2000 stamp-xstormy16 libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGENDIR = @cgendir@
@@ -422,28 +184,23 @@ CPUDIR = $(CGENDIR)/cpu
CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
-CGENDEPS = \
- $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
- $(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
- $(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
- $(CGENDIR)/opc-opinst.scm \
- cgen-asm.in cgen-dis.in cgen-ibld.in
+CGENDEPS = $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm $(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm $(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm $(CGENDIR)/opc-opinst.scm cgen-asm.in cgen-dis.in cgen-ibld.in
CGEN_CPUS = fr30 frv ip2k m32r openrisc xstormy16
-@CGEN_MAINT_TRUE@IP2K_DEPS = @CGEN_MAINT_TRUE@stamp-ip2k
+@CGEN_MAINT_TRUE@IP2K_DEPS = stamp-ip2k
@CGEN_MAINT_FALSE@IP2K_DEPS =
-@CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
+@CGEN_MAINT_TRUE@M32R_DEPS = stamp-m32r
@CGEN_MAINT_FALSE@M32R_DEPS =
-@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
+@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
@CGEN_MAINT_FALSE@FR30_DEPS =
-@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv
+@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
@CGEN_MAINT_FALSE@FRV_DEPS =
-@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
+@CGEN_MAINT_TRUE@OPENRISC_DEPS = stamp-openrisc
@CGEN_MAINT_FALSE@OPENRISC_DEPS =
-@CGEN_MAINT_TRUE@IQ2000_DEPS = @CGEN_MAINT_TRUE@stamp-iq2000
+@CGEN_MAINT_TRUE@IQ2000_DEPS = stamp-iq2000
@CGEN_MAINT_FALSE@IQ2000_DEPS =
-@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
+@CGEN_MAINT_TRUE@XSTORMY16_DEPS = stamp-xstormy16
@CGEN_MAINT_FALSE@XSTORMY16_DEPS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -622,7 +379,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
+ test "$$subdir" != "." || dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@@ -664,7 +421,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.in $$unique $(LISP))
mostlyclean-tags:
@@ -1044,6 +801,9 @@ cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
$(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
+crx-dis.lo: crx-dis.c $(INCDIR)/opcode/crx.h \
+ $(INCDIR)/dis-asm.h sysdep.h $(INCDIR)/ansidecl.h
+crx-opc.lo: crx-opc.c $(INCDIR)/opcode/crx.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h
diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4
index a9b0b29cb05..d5ae2337731 100644
--- a/opcodes/aclocal.m4
+++ b/opcodes/aclocal.m4
@@ -35,6 +35,827 @@ AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
])
+# lib-prefix.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
# isc-posix.m4 serial 2 (gettext-0.11.2)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
diff --git a/opcodes/arc-ext.c b/opcodes/arc-ext.c
index fd43d29ab3f..6634534016d 100644
--- a/opcodes/arc-ext.c
+++ b/opcodes/arc-ext.c
@@ -1,5 +1,5 @@
/* ARC target-dependent stuff. Extension structure access functions
- Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -248,7 +248,7 @@ build_ARC_extmap (text_bfd)
for (p = text_bfd->sections; p != NULL; p = p->next)
if (!strcmp (p->name, ".arcextmap"))
{
- count = p->_raw_size;
+ count = bfd_get_section_size (p);
arcExtMap = (char *) xmalloc (count);
if (bfd_get_section_contents (text_bfd, p, (PTR) arcExtMap, 0, count))
{
diff --git a/opcodes/arm-opc.h b/opcodes/arm-opc.h
index 574bc1f7a82..4b52f131719 100644
--- a/opcodes/arm-opc.h
+++ b/opcodes/arm-opc.h
@@ -35,7 +35,7 @@ struct thumb_opcode
%<bitfield>d print the bitfield in decimal
%<bitfield>x print the bitfield in hex
%<bitfield>X print the bitfield as 1 hex digit without leading "0x"
- %<bitfield>w print the bitfield plus one in decimal
+ %<bitfield>W print the bitfield plus one in decimal
%<bitfield>r print as an ARM register
%<bitfield>f print a floating point constant if >7 else a
floating point register
diff --git a/opcodes/config.in b/opcodes/config.in
index 1185e89fa7a..76e2f3d585d 100644
--- a/opcodes/config.in
+++ b/opcodes/config.in
@@ -1,138 +1,162 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* 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.
+ */
+#undef CRAY_STACKSEG_END
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* 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. */
-#undef CRAY_STACKSEG_END
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the munmap function. */
+/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
-/* Define if you have the putenv function. */
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
-/* Define if you have the setenv function. */
+/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
-/* Define if you have the setlocale function. */
+/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define if you have the stpcpy function. */
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the stpcpy function */
#undef HAVE_STPCPY
-/* Define if you have the strcasecmp function. */
+/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
-/* Define if you have the strchr function. */
+/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <string.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/stat.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
+
/* Name of package */
#undef PACKAGE
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Version number of package */
#undef VERSION
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/opcodes/configure b/opcodes/configure
index 6cff4e76e9f..26eaf59b25a 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -1,55 +1,325 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
-# Defaults:
-ac_help=
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=no]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
-ac_help="$ac_help
- --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-install-libbfd controls installation of libbfd and related headers"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-cgen-maint[=dir] build cgen generated files"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="z8k-dis.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S STRIP ac_ct_STRIP LIBTOOL WARN_CFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -58,10 +328,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -75,17 +350,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -93,59 +360,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -154,95 +421,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -251,19 +470,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -277,26 +496,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -313,7 +532,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -323,7 +542,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -334,58 +553,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -396,99 +614,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=z8k-dis.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -498,13 +727,487 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-shared=PKGS build shared libraries default=no
+ --enable-static=PKGS build static libraries default=yes
+ --enable-fast-install=PKGS optimize for fast installation default=yes
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-targets alternative target configurations
+ --enable-commonbfdlib build shared BFD/opcodes/libiberty library
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-install-libbfd controls installation of libbfd and related headers
+ --disable-nls do not use Native Language Support
+ --enable-cgen-maint=dir build cgen generated files
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-included-gettext use the GNU gettext library included here
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd "$ac_popdir"
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -515,102 +1218,105 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
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
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:554: 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 559 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-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:587: 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 592 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -623,146 +1329,1097 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:664: checking host system type" >&5
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:685: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:703: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:727: 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
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 735 "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();
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:746: \"$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"
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
rm -f conftest*
-LIBS="$ac_save_LIBS"
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cposix_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_cposix_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+ LIBS="$LIBS -lcposix"
fi
-
+
# We currently only use the version number for the name of any shared
@@ -778,65 +2435,80 @@ am__api_version="1.4"
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:787: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:840: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -858,8 +2530,11 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
test "$2" = conftestfile
@@ -868,54 +2543,54 @@ then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-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:897: 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
-else
- cat > conftestmake <<\EOF
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -925,189 +2600,257 @@ PACKAGE=opcodes
VERSION=${BFD_VERSION}
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:943: checking for working aclocal-${am__api_version}" >&5
+echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5
+echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6
# 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.
if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:956: checking for working autoconf" >&5
+echo "$as_me:$LINENO: checking for working autoconf" >&5
+echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
# 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.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:969: checking for working automake-${am__api_version}" >&5
+echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5
+echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6
# 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.
if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:982: checking for working autoheader" >&5
+echo "$as_me:$LINENO: checking for working autoheader" >&5
+echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
# 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.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:995: checking for working makeinfo" >&5
+echo "$as_me:$LINENO: checking for working makeinfo" >&5
+echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
# 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.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
else
MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: missing" >&5
+echo "${ECHO_T}missing" >&6
fi
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:1018: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # 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:1050: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# 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:1082: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -1132,8 +2875,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=no
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
@@ -1156,8 +2898,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1179,229 +2920,7 @@ no) enable_fast_install=no ;;
esac
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:1188: 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:1218: 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:1269: 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:1301: 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 1312 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1317: \"$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:1343: 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:1348: 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:1357: \"$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:1376: 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
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1409,13 +2928,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
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:1419: checking for ld used by GCC" >&5
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1444,14 +2962,14 @@ echo "configure:1419: 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:1449: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1452: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
@@ -1477,15 +2995,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:1487: 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
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -1494,27 +3016,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
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:1504: 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
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_ld_reload_flag='-r'
fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
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:1516: 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
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -1547,33 +3069,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1554: 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
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1575: 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
+echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -1622,7 +3135,7 @@ darwin* | rhapsody*)
esac
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1690,7 +3203,7 @@ linux-gnu*)
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
-netbsd*)
+netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
@@ -1738,67 +3251,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
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:1748: 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:1754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1774: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
@@ -1806,10 +3265,10 @@ ac_exeext=$EXEEXT
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:1811: 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
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -1861,17 +3320,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:1873: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -1923,9 +3384,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1937,138 +3400,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:1944: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# 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:1976: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # 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:2011: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP="$ac_cv_prog_STRIP"
+STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_STRIP=$STRIP
# 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:2043: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -2084,20 +3573,19 @@ test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
- :
-fi
+fi;
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
-fi
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2106,8 +3594,12 @@ 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 2110 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 3597 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2140,7 +3632,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2157,47 +3653,73 @@ ia64-*-hpux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2162: 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
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
+
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
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat > conftest.$ac_ext <<EOF
-#line 2175 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
lt_cv_cc_needs_belf=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
@@ -2209,54 +3731,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | 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 \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ 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 \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
@@ -2266,15 +3795,26 @@ objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
+echo "$as_me: error: libtool configure failed" >&2;}
+ { (exit 1); exit 1; }; }
# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
fi
@@ -2288,32 +3828,34 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
-
-
-
+
+
+
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac
-fi
-# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
if test "${enable_commonbfdlib+set}" = set; then
enableval="$enable_commonbfdlib"
case "${enableval}" in
yes) commonbfdlib=true ;;
no) commonbfdlib=false ;;
- *) { echo "configure: error: bad value ${enableval} for opcodes commonbfdlib option" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for opcodes commonbfdlib option" >&5
+echo "$as_me: error: bad value ${enableval} for opcodes commonbfdlib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
-fi
-
+fi;
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
@@ -2330,33 +3872,36 @@ esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi
-fi
-WARN_CFLAGS=""
+fi; WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
+ ac_config_headers="$ac_config_headers config.h:config.in"
+ ac_config_commands="$ac_config_commands default-1"
if test -z "$target" ; then
- { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2350: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -2366,10 +3911,25 @@ else
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
-
-echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2373: checking whether to install libbfd" >&5
+
+ case ${build_alias} in
+ "") build_noncanonical=${build} ;;
+ *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
+esac
+
+ case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
+esac
+
+echo "$as_me:$LINENO: checking whether to install libbfd" >&5
+echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2380,10 +3940,10 @@ else
else
install_libbfd_p=no
fi
-fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
- echo "$ac_t""$install_libbfd_p" 1>&6
-
if test $install_libbfd_p = yes; then
INSTALL_LIBBFD_TRUE=
@@ -2392,427 +3952,1150 @@ else
INSTALL_LIBBFD_TRUE='#'
INSTALL_LIBBFD_FALSE=
fi
+ # Need _noncanonical variables for this.
+
+
+
+
# libbfd.a is a host library containing target dependent code
bfdlibdir='$(libdir)'
bfdincludedir='$(includedir)'
if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2410: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+# host-specific stuff:
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+done
+done
+
+fi
fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# host-specific stuff:
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+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:2446: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
else
- echo "$ac_t""no" 1>&6
+ CC="$ac_cv_prog_CC"
fi
+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:2476: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
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
+ if test $# != 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="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&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:2527: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2559: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$ac_ct_CC" && break
+done
-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
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-cat > conftest.$ac_ext << EOF
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-#line 2570 "configure"
-#include "confdefs.h"
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-main(){return(0);}
-EOF
-if { (eval echo configure:2575: \"$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
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
- ac_cv_prog_cc_cross=yes
+ CFLAGS="-g"
fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
-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:2601: 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:2606: 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;
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- ac_cv_prog_gcc=no
-fi
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
else
- GCC=
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-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:2634: 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
+ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
+if test -n "$ac_tool_prefix"; then
+ # 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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+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
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2668: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2683 "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:2689: \"$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
- :
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2700 "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:2706: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2717 "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:2723: \"$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
- :
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-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:2750: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2778: 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
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2783 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2791: \"$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*
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 2808 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2821,16 +5104,19 @@ 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 2826 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2839,269 +5125,524 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2847 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-EOF
-if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2882: 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 2887 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-; return 0; }
-EOF
-if { (eval echo configure:2936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_const=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2957: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2997: 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
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3002 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((off_t *) 0)
+ return 0;
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_off_t=no
fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6
+if test $ac_cv_type_off_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define off_t long
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3030: 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
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3035 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_size_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define size_t unsigned
-EOF
+_ACEOF
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:3065: 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 3070 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3077: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_working_alloca_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_working_alloca_h=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3098: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3103 "configure"
-#include "confdefs.h"
-
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
@@ -3123,137 +5664,215 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3163: 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
+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3168 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&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:3193: 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 3198 "configure"
-#include "confdefs.h"
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3221: \"$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
- cat >> confdefs.h <<EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3248: 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
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
- cat > conftest.$ac_ext <<EOF
-#line 3256 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
find_stack_direction ()
{
static char *addr = 0;
@@ -3266,138 +5885,314 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3300: 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 3305 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3310: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
+
for ac_func in getpagesize
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3339: 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 3344 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3367: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3392: 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
+echo "$as_me:$LINENO: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_mmap_fixed_mapped=no
else
- cat > conftest.$ac_ext <<EOF
-#line 3400 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
@@ -3411,47 +6206,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ VM page cache was not coherent with the file system buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+ propagated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
-#include <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
#endif
/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-
+#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
+# if !HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3478,327 +6260,574 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ exit (1);
+ if (write (fd, data, pagesize) != pagesize)
+ exit (1);
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ exit (1);
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ exit (1);
+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit (1);
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ exit (1);
+ if (read (fd, data3, pagesize) != pagesize)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit (1);
+ close (fd);
+ exit (0);
}
-
-EOF
-if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
fi
-rm -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
+
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
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:3581: 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 3586 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3591: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3621: 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 3626 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3649: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3678: 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 3683 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3706: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3740: 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 3745 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <locale.h>
-int main() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3773: checking whether NLS is requested" >&5
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define ENABLE_NLS 1
-EOF
+_ACEOF
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3793: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
+
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+fi;
+ echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
+echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@@ -3806,141 +6835,332 @@ fi
nls_cv_header_libgt=
CATOBJEXT=NONE
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3812: 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 3817 "configure"
-#include "confdefs.h"
+ if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3822: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
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:3839: 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
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3844 "configure"
-#include "confdefs.h"
+ ac_cv_header_libintl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+
+fi
+if test $ac_cv_header_libintl_h = yes; then
+ echo "$as_me:$LINENO: checking for gettext in libc" >&5
+echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <libintl.h>
-int main() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gettext_libc=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3867: 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
+ echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3875 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:3886: \"$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
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-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:3902: 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 3907 "configure"
-#include "confdefs.h"
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain ();
+int
+main ()
+{
+bindtextdomain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_intl_bindtextdomain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+ echo "$as_me:$LINENO: checking for gettext in libintl" >&5
+echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libintl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
gt_cv_func_gettext_libintl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
fi
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# 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:3942: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3964,108 +7184,160 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3976: 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 3981 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* 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();
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-int main() {
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* 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 ();
/* 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();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4004: \"$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
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-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
# 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:4031: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4067: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4089,42 +7361,70 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4099 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
CATOBJEXT=.gmo
DATADIRNAME=share
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
+
+
if test "$CATOBJEXT" = "NONE"; then
nls_cv_use_gnu_gettext=yes
fi
@@ -4134,10 +7434,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# 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:4139: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4161,53 +7461,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4173: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
;;
esac
fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:4209: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4231,12 +7537,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4252,7 +7560,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
XGETTEXT=":"
fi
fi
@@ -4277,25 +7586,25 @@ fi
POFILES="$POFILES $lang.po"
done
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4299: checking for catalogs to be installed" >&5
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4303,7 +7612,8 @@ echo "configure:4299: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4317,45 +7627,154 @@ echo "configure:4299: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
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:4327: 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 4332 "configure"
-#include "confdefs.h"
+ if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for linux/version.h" >&5
+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking linux/version.h usability" >&5
+echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4337: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking linux/version.h presence" >&5
+echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <linux/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for linux/version.h" >&5
+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_linux_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_linux_version_h = yes; then
msgformat=linux
else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4369,14 +7788,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4393,7 +7812,7 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
+
. ${srcdir}/../bfd/configure.host
@@ -4410,10 +7829,10 @@ fi
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:4415: 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
+ echo "$as_me:$LINENO: checking for build system executable suffix" >&5
+echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
+if test "${bfd_cv_build_exeext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
@@ -4428,8 +7847,8 @@ else
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
-
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
+echo "${ECHO_T}$bfd_cv_build_exeext" >&6
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
@@ -4443,102 +7862,228 @@ fi
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:4452: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-for ac_hdr in string.h strings.h stdlib.h
+
+
+
+for ac_header 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:4509: 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 4514 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4519: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
@@ -4559,8 +8104,7 @@ if test "${enable_cgen_maint+set}" = set; then
cgendir=${cgen_maint}/lib/cgen
;;
esac
-fi
-
+fi;
if test x${cgen_maint} = xyes; then
CGEN_MAINT_TRUE=
@@ -4613,7 +8157,7 @@ do
. $srcdir/../bfd/config.bfd
selarchs="$selarchs $targ_archs"
fi
-done
+done
# Utility var, documents generic cgen support files.
@@ -4639,6 +8183,7 @@ if test x${all_targets} = xfalse ; then
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_convex_arch) ;;
bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;;
+ bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_dlx_arch) ta="$ta dlx-dis.lo" ;;
@@ -4708,7 +8253,9 @@ if test x${all_targets} = xfalse ; then
bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
"") ;;
- *) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: *** unknown target architecture $arch" >&5
+echo "$as_me: error: *** unknown target architecture $arch" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
done
@@ -4746,431 +8293,1327 @@ fi
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
+
+ ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | 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 \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ 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 \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-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
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-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
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
-s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
-s%@bfdlibdir@%$bfdlibdir%g
-s%@bfdincludedir@%$bfdincludedir%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@HDEFINES@%$HDEFINES%g
-s%@CGEN_MAINT_TRUE@%$CGEN_MAINT_TRUE%g
-s%@CGEN_MAINT_FALSE@%$CGEN_MAINT_FALSE%g
-s%@cgendir@%$cgendir%g
-s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
-s%@WIN32LIBADD@%$WIN32LIBADD%g
-s%@archdefs@%$archdefs%g
-s%@BFD_MACHINES@%$BFD_MACHINES%g
-CEOF
-EOF
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
-CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LN_S@,$LN_S,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@INSTALL_LIBBFD_TRUE@,$INSTALL_LIBBFD_TRUE,;t t
+s,@INSTALL_LIBBFD_FALSE@,$INSTALL_LIBBFD_FALSE,;t t
+s,@host_noncanonical@,$host_noncanonical,;t t
+s,@target_noncanonical@,$target_noncanonical,;t t
+s,@bfdlibdir@,$bfdlibdir,;t t
+s,@bfdincludedir@,$bfdincludedir,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@GMOFILES@,$GMOFILES,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@INTLDEPS@,$INTLDEPS,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@INTLOBJS@,$INTLOBJS,;t t
+s,@POFILES@,$POFILES,;t t
+s,@POSUB@,$POSUB,;t t
+s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
+s,@GT_NO@,$GT_NO,;t t
+s,@GT_YES@,$GT_YES,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;t t
+s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
+s,@HDEFINES@,$HDEFINES,;t t
+s,@CGEN_MAINT_TRUE@,$CGEN_MAINT_TRUE,;t t
+s,@CGEN_MAINT_FALSE@,$CGEN_MAINT_FALSE,;t t
+s,@cgendir@,$cgendir,;t t
+s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
+s,@WIN32LIBADD@,$WIN32LIBADD,;t t
+s,@archdefs@,$archdefs,;t t
+s,@BFD_MACHINES@,$BFD_MACHINES,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
+ default ) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 89199243a2f..8c165fcf27e 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -1,10 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.13)
-AC_INIT(z8k-dis.c)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([z8k-dis.c])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ISC_POSIX
# We currently only use the version number for the name of any shared
@@ -30,7 +31,7 @@ AM_PROG_LIBTOOL
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
@@ -177,6 +178,7 @@ if test x${all_targets} = xfalse ; then
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_convex_arch) ;;
bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;;
+ bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_dlx_arch) ta="$ta dlx-dis.lo" ;;
@@ -284,5 +286,6 @@ fi
AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
-[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
+AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
+AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])
+AC_OUTPUT
diff --git a/opcodes/crx-dis.c b/opcodes/crx-dis.c
new file mode 100644
index 00000000000..5796a2ef08a
--- /dev/null
+++ b/opcodes/crx-dis.c
@@ -0,0 +1,700 @@
+/* Disassembler code for CRX.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Written by Tomer Levi.
+
+ This file is part of the GNU binutils and GDB, the GNU debugger.
+
+ 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, 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 "dis-asm.h"
+#include "sysdep.h"
+#include "opcode/crx.h"
+
+/* String to print when opcode was not matched. */
+#define ILLEGAL "illegal"
+ /* Escape to 16-bit immediate. */
+#define ESCAPE_16_BIT 0xE
+
+/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
+#define EXTRACT(a, offs, n_bits) \
+ (n_bits == 32 ? (((a) >> (offs)) & ~0L) \
+ : (((a) >> (offs)) & ((1 << (n_bits)) -1)))
+
+/* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */
+#define SBM(offs) ((((1 << (32 - offs)) -1) << (offs)))
+
+typedef unsigned long dwordU;
+typedef unsigned short wordU;
+
+typedef struct
+{
+ dwordU val;
+ int nbits;
+} parameter;
+
+/* Structure to hold valid 'cinv' instruction options. */
+
+typedef struct
+ {
+ /* Cinv printed string. */
+ char *str;
+ /* Value corresponding to the string. */
+ unsigned int value;
+ }
+cinv_entry;
+
+/* CRX 'cinv' options. */
+const cinv_entry crx_cinvs[] =
+{
+ {"[i]", 2}, {"[i,u]", 3}, {"[d]", 4},
+ {"[d,u]", 5}, {"[d,i]", 6}, {"[d,i,u]", 7}
+};
+
+/* Number of valid 'cinv' instruction options. */
+int NUMCINVS = ((sizeof crx_cinvs)/(sizeof crx_cinvs[0]));
+/* Current opcode table entry we're disassembling. */
+const inst *instruction;
+/* Current instruction we're disassembling. */
+ins currInsn;
+/* The current instruction is read into 3 consecutive words. */
+wordU words[3];
+/* Contains all words in appropriate order. */
+ULONGLONG allWords;
+/* Holds the current processed argument number. */
+int processing_argument_number;
+/* Nonzero means a CST4 instruction. */
+int cst4flag;
+/* Nonzero means the instruction's original size is
+ incremented (escape sequence is used). */
+int size_changed;
+
+static int get_number_of_operands (void);
+static argtype getargtype (operand_type);
+static int getbits (operand_type);
+static char *getregname (reg);
+static char *getcopregname (copreg, reg_type);
+static char * getprocregname (int);
+static char *gettrapstring (unsigned);
+static char *getcinvstring (unsigned);
+static void getregliststring (int, char *, int);
+static wordU get_word_at_PC (bfd_vma, struct disassemble_info *);
+static void get_words_at_PC (bfd_vma, struct disassemble_info *);
+static unsigned long build_mask (void);
+static int powerof2 (int);
+static int match_opcode (void);
+static void make_instruction (void);
+static void print_arguments (ins *, struct disassemble_info *);
+static void print_arg (argument *, struct disassemble_info *);
+
+/* Retrieve the number of operands for the current assembled instruction. */
+
+static int
+get_number_of_operands (void)
+{
+ int i;
+
+ for (i = 0; instruction->operands[i].op_type && i < MAX_OPERANDS; i++)
+ ;
+
+ return i;
+}
+
+/* Return the bit size for a given operand. */
+
+static int
+getbits (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return crx_optab[op].bit_size;
+ else
+ return 0;
+}
+
+/* Return the argument type of a given operand. */
+
+static argtype
+getargtype (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return crx_optab[op].arg_type;
+ else
+ return nullargs;
+}
+
+/* Given the trap index in dispatch table, return its name.
+ This routine is used when disassembling the 'excp' instruction. */
+
+static char *
+gettrapstring (unsigned int index)
+{
+ const trap_entry *trap;
+
+ for (trap = crx_traps; trap < crx_traps + NUMTRAPS; trap++)
+ if (trap->entry == index)
+ return trap->name;
+
+ return ILLEGAL;
+}
+
+/* Given a 'cinv' instruction constant operand, return its corresponding string.
+ This routine is used when disassembling the 'cinv' instruction. */
+
+static char *
+getcinvstring (unsigned int num)
+{
+ const cinv_entry *cinv;
+
+ for (cinv = crx_cinvs; cinv < (crx_cinvs + NUMCINVS); cinv++)
+ if (cinv->value == num)
+ return cinv->str;
+
+ return ILLEGAL;
+}
+
+/* Given a register enum value, retrieve its name. */
+
+char *
+getregname (reg r)
+{
+ const reg_entry *reg = &crx_regtab[r];
+
+ if (reg->type != CRX_R_REGTYPE)
+ return ILLEGAL;
+ else
+ return reg->name;
+}
+
+/* Given a coprocessor register enum value, retrieve its name. */
+
+char *
+getcopregname (copreg r, reg_type type)
+{
+ const reg_entry *reg;
+
+ if (type == CRX_C_REGTYPE)
+ reg = &crx_copregtab[r];
+ else if (type == CRX_CS_REGTYPE)
+ reg = &crx_copregtab[r+(cs0-c0)];
+ else
+ return ILLEGAL;
+
+ return reg->name;
+}
+
+
+/* Getting a processor register name. */
+
+static char *
+getprocregname (int index)
+{
+ const reg_entry *r;
+
+ for (r = crx_regtab; r < crx_regtab + NUMREGS; r++)
+ if (r->image == index)
+ return r->name;
+
+ return "ILLEGAL REGISTER";
+}
+
+/* Get the power of two for a given integer. */
+
+static int
+powerof2 (int x)
+{
+ int product, i;
+
+ for (i = 0, product = 1; i < x; i++)
+ product *= 2;
+
+ return product;
+}
+
+/* Transform a register bit mask to a register list. */
+
+void
+getregliststring (int trap, char *string, int core_cop)
+{
+ char temp_string[5];
+ int i;
+
+ string[0] = '{';
+ string[1] = '\0';
+
+ for (i = 0; i < 16; i++)
+ {
+ if (trap & 0x1)
+ {
+ if (core_cop)
+ sprintf (temp_string, "r%d", i);
+ else
+ sprintf (temp_string, "c%d", i);
+ strcat (string, temp_string);
+ if (trap & 0xfffe)
+ strcat (string, ",");
+ }
+ trap = trap >> 1;
+ }
+
+ strcat (string, "}");
+}
+
+/* START and END are relating 'allWords' struct, which is 48 bits size.
+
+ START|--------|END
+ +---------+---------+---------+---------+
+ | | V | A | L |
+ +---------+---------+---------+---------+
+ 0 16 32 48
+ words [0] [1] [2] */
+
+static parameter
+makelongparameter (ULONGLONG val, int start, int end)
+{
+ parameter p;
+
+ p.val = (dwordU) EXTRACT(val, 48 - end, end - start);
+ p.nbits = end - start;
+ return p;
+}
+
+/* Build a mask of the instruction's 'constant' opcode,
+ based on the instruction's printing flags. */
+
+static unsigned long
+build_mask (void)
+{
+ unsigned int print_flags;
+ unsigned long mask;
+
+ print_flags = instruction->flags & FMT_CRX;
+ switch (print_flags)
+ {
+ case FMT_1:
+ mask = 0xF0F00000;
+ break;
+ case FMT_2:
+ mask = 0xFFF0FF00;
+ break;
+ case FMT_3:
+ mask = 0xFFF00F00;
+ break;
+ case FMT_4:
+ mask = 0xFFF0F000;
+ break;
+ case FMT_5:
+ mask = 0xFFF0FFF0;
+ break;
+ default:
+ mask = SBM(instruction->match_bits);
+ break;
+ }
+
+ return mask;
+}
+
+/* Search for a matching opcode. Return 1 for success, 0 for failure. */
+
+static int
+match_opcode (void)
+{
+ unsigned long mask;
+
+ /* The instruction 'constant' opcode doewsn't exceed 32 bits. */
+ unsigned long doubleWord = words[1] + (words[0] << 16);
+
+ /* Start searching from end of instruction table. */
+ instruction = &crx_instruction[NUMOPCODES - 2];
+
+ /* Loop over instruction table until a full match is found. */
+ while (instruction >= crx_instruction)
+ {
+ mask = build_mask ();
+ if ((doubleWord & mask) == BIN(instruction->match, instruction->match_bits))
+ return 1;
+ else
+ instruction--;
+ }
+ return 0;
+}
+
+/* Set the proper parameter value for different type of arguments. */
+
+static void
+make_argument (argument * a, int start_bits)
+{
+ int inst_bit_size, total_size;
+ parameter p;
+
+ if ((instruction->size == 3) && a->size >= 16)
+ inst_bit_size = 48;
+ else
+ inst_bit_size = 32;
+
+ switch (a->type)
+ {
+ case arg_copr:
+ case arg_copsr:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->cr = p.val;
+ break;
+
+ case arg_r:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->r = p.val;
+ break;
+
+ case arg_ic:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+
+ if ((p.nbits == 4) && cst4flag)
+ {
+ if (IS_INSN_TYPE (CMPBR_INS) && (p.val == ESCAPE_16_BIT))
+ {
+ /* A special case, where the value is actually stored
+ in the last 4 bits. */
+ p = makelongparameter (allWords, 44, 48);
+ /* The size of the instruction should be incremented. */
+ size_changed = 1;
+ }
+
+ if (p.val == 6)
+ p.val = -1;
+ else if (p.val == 13)
+ p.val = 48;
+ else if (p.val == 5)
+ p.val = -4;
+ else if (p.val == 10)
+ p.val = 32;
+ else if (p.val == 11)
+ p.val = 20;
+ else if (p.val == 9)
+ p.val = 16;
+ }
+
+ a->constant = p.val;
+ break;
+
+ case arg_icr:
+ a->scale = 0;
+ total_size = a->size + 10; /* sizeof(rbase + ridx + scl2) = 10. */
+ p = makelongparameter (allWords, inst_bit_size - total_size,
+ inst_bit_size - (total_size - 4));
+ a->r = p.val;
+ p = makelongparameter (allWords, inst_bit_size - (total_size - 4),
+ inst_bit_size - (total_size - 8));
+ a->i_r = p.val;
+ p = makelongparameter (allWords, inst_bit_size - (total_size - 8),
+ inst_bit_size - (total_size - 10));
+ a->scale = p.val;
+ p = makelongparameter (allWords, inst_bit_size - (total_size - 10),
+ inst_bit_size);
+ a->constant = p.val;
+ break;
+
+ case arg_rbase:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + 4),
+ inst_bit_size - start_bits);
+ a->r = p.val;
+ break;
+
+ case arg_cr:
+ if (a->size <= 8)
+ {
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + 4),
+ inst_bit_size - start_bits);
+ a->r = p.val;
+ /* Case for opc4 r dispu rbase. */
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + 8),
+ inst_bit_size - (start_bits + 4));
+ }
+ else
+ {
+ /* The 'rbase' start_bits is always relative to a 32-bit data type. */
+ p = makelongparameter (allWords, 32 - (start_bits + 4),
+ 32 - start_bits);
+ a->r = p.val;
+ p = makelongparameter (allWords, 32 - start_bits,
+ inst_bit_size);
+ }
+ if ((p.nbits == 4) && cst4flag)
+ {
+ if (instruction->flags & DISPUW4)
+ p.val *= 2;
+ else if (instruction->flags & DISPUD4)
+ p.val *= 4;
+ }
+ a->constant = p.val;
+ break;
+
+ case arg_c:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->constant = p.val;
+ break;
+ default:
+ break;
+ }
+}
+
+/* Print a single argument. */
+
+static void
+print_arg (argument *a, struct disassemble_info *info)
+{
+ LONGLONG longdisp, mask;
+ char sign_flag;
+ int op_index = 0;
+ char string[200];
+ PTR stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ switch (a->type)
+ {
+ case arg_copr:
+ func (stream, "%s", getcopregname (a->cr, CRX_C_REGTYPE));
+ break;
+
+ case arg_copsr:
+ func (stream, "%s", getcopregname (a->cr, CRX_CS_REGTYPE));
+ break;
+
+ case arg_r:
+ if (IS_INSN_MNEMONIC ("mtpr") || IS_INSN_MNEMONIC ("mfpr"))
+ func (stream, "%s", getprocregname (a->r));
+ else
+ func (stream, "%s", getregname (a->r));
+ break;
+
+ case arg_ic:
+ if (IS_INSN_MNEMONIC ("excp"))
+ func (stream, "%s", gettrapstring (a->constant));
+
+ else if (IS_INSN_MNEMONIC ("cinv"))
+ func (stream, "%s", getcinvstring (a->constant));
+
+ else if (INST_HAS_REG_LIST)
+ {
+ if (!IS_INSN_TYPE (COP_REG_INS))
+ {
+ getregliststring (a->constant, string, 1);
+ func (stream, "%s", string);
+ }
+ else
+ {
+ /* Check for proper argument number. */
+ if (processing_argument_number == 2)
+ {
+ getregliststring (a->constant, string, 0);
+ func (stream, "%s", string);
+ }
+ else
+ func (stream, "$0x%x", a->constant);
+ }
+ }
+ else
+ func (stream, "$0x%x", a->constant);
+ break;
+
+ case arg_icr:
+ func (stream, "0x%x(%s,%s,%d)", a->constant, getregname (a->r),
+ getregname (a->i_r), powerof2 (a->scale));
+ break;
+
+ case arg_rbase:
+ func (stream, "(%s)", getregname (a->r));
+ break;
+
+ case arg_cr:
+ func (stream, "0x%x(%s)", a->constant, getregname (a->r));
+
+ if (IS_INSN_TYPE (LD_STOR_INS_INC))
+ func (stream, "+");
+ break;
+
+ case arg_c:
+ /* Removed the *2 part as because implicit zeros are no more required.
+ Have to fix this as this needs a bit of extension in terms of branchins.
+ Have to add support for cmp and branch instructions. */
+ if (IS_INSN_TYPE (BRANCH_INS) || IS_INSN_MNEMONIC ("bal")
+ || IS_INSN_TYPE (CMPBR_INS) || IS_INSN_TYPE (DCR_BRANCH_INS)
+ || IS_INSN_TYPE (COP_BRANCH_INS))
+ {
+ func (stream, "%c", '*');
+ longdisp = a->constant;
+ longdisp <<= 1;
+ sign_flag = '+';
+
+ switch (a->size)
+ {
+ case 8:
+ case 16:
+ case 24:
+ case 32:
+ mask = ((LONGLONG)1 << a->size) - 1;
+ if (longdisp & ((LONGLONG)1 << a->size))
+ {
+ sign_flag = '-';
+ longdisp = ~(longdisp) + 1;
+ }
+ a->constant = (unsigned long int) (longdisp & mask);
+ break;
+ default:
+ func (stream,
+ "Wrong offset used in branch/bal instruction");
+ break;
+ }
+
+ func (stream, "%c", sign_flag);
+ }
+ /* For branch Neq instruction it is 2*offset + 2. */
+ if (IS_INSN_TYPE (BRANCH_NEQ_INS))
+ a->constant = 2 * a->constant + 2;
+ if (IS_INSN_TYPE (LD_STOR_INS_INC)
+ || IS_INSN_TYPE (LD_STOR_INS)
+ || IS_INSN_TYPE (STOR_IMM_INS)
+ || IS_INSN_TYPE (CSTBIT_INS))
+ {
+ op_index = instruction->flags & REVERSE_MATCH ? 0 : 1;
+ if (instruction->operands[op_index].op_type == abs16)
+ a->constant |= 0xFFFF0000;
+ }
+ func (stream, "0x%x", a->constant);
+ break;
+ default:
+ break;
+ }
+}
+
+/* Print all the arguments of CURRINSN instruction. */
+
+static void
+print_arguments (ins *currInsn, struct disassemble_info *info)
+{
+ int i;
+
+ for (i = 0; i < currInsn->nargs; i++)
+ {
+ processing_argument_number = i;
+
+ print_arg (&currInsn->arg[i], info);
+
+ if (i != currInsn->nargs - 1)
+ info->fprintf_func (info->stream, ", ");
+ }
+}
+
+/* Build the instruction's arguments. */
+
+static void
+make_instruction (void)
+{
+ int i;
+ unsigned int temp_value, shift;
+ argument a;
+
+ for (i = 0; i < currInsn.nargs; i++)
+ {
+ a.type = getargtype (instruction->operands[i].op_type);
+ if (instruction->operands[i].op_type == cst4
+ || instruction->operands[i].op_type == rbase_cst4)
+ cst4flag = 1;
+ a.size = getbits (instruction->operands[i].op_type);
+ shift = instruction->operands[i].shift;
+
+ make_argument (&a, shift);
+ currInsn.arg[i] = a;
+ }
+
+ /* Calculate instruction size (in bytes). */
+ currInsn.size = instruction->size + (size_changed ? 1 : 0);
+ currInsn.size *= 2;
+
+ /* Swapping first and second arguments. */
+ if (IS_INSN_TYPE (COP_BRANCH_INS))
+ {
+ temp_value = currInsn.arg[0].constant;
+ currInsn.arg[0].constant = currInsn.arg[1].constant;
+ currInsn.arg[1].constant = temp_value;
+ }
+}
+
+/* Retrieve a single word from a given memory address. */
+
+static wordU
+get_word_at_PC (bfd_vma memaddr, struct disassemble_info *info)
+{
+ bfd_byte buffer[4];
+ int status;
+ wordU insn = 0;
+
+ status = info->read_memory_func (memaddr, buffer, 2, info);
+
+ if (status == 0)
+ insn = (wordU) bfd_getl16 (buffer);
+
+ return insn;
+}
+
+/* Retrieve multiple words (3) from a given memory address. */
+
+static void
+get_words_at_PC (bfd_vma memaddr, struct disassemble_info *info)
+{
+ int i;
+ bfd_vma mem;
+
+ for (i = 0, mem = memaddr; i < 3; i++, mem += 2)
+ words[i] = get_word_at_PC (mem, info);
+
+ allWords =
+ ((ULONGLONG) words[0] << 32) + ((unsigned long) words[1] << 16) + words[2];
+}
+
+/* Prints the instruction by calling print_arguments after proper matching. */
+
+int
+print_insn_crx (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ int is_decoded; /* Nonzero means instruction has a match. */
+
+ /* Initialize global variables. */
+ cst4flag = 0;
+ size_changed = 0;
+
+ /* Retrieve the encoding from current memory location. */
+ get_words_at_PC (memaddr, info);
+ /* Find a matching opcode in table. */
+ is_decoded = match_opcode ();
+ /* If found, print the instruction's mnemonic and arguments. */
+ if (is_decoded > 0 && (words[0] << 16 || words[1]) != 0)
+ {
+ info->fprintf_func (info->stream, "%s", instruction->mnemonic);
+ if ((currInsn.nargs = get_number_of_operands ()) != 0)
+ info->fprintf_func (info->stream, "\t");
+ make_instruction ();
+ print_arguments (&currInsn, info);
+ return currInsn.size;
+ }
+
+ /* No match found. */
+ info->fprintf_func (info->stream,"%s ",ILLEGAL);
+ return 2;
+}
diff --git a/opcodes/crx-opc.c b/opcodes/crx-opc.c
new file mode 100644
index 00000000000..b01addfa525
--- /dev/null
+++ b/opcodes/crx-opc.c
@@ -0,0 +1,675 @@
+/* crx-opc.c -- Table of opcodes for the CRX processor.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi.
+
+ This file is part of GAS, GDB and the GNU binutils.
+
+ GAS, GDB, and GNU binutils 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, or (at your
+ option) any later version.
+
+ GAS, GDB, and GNU binutils are distributed in the hope that they 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 <stdio.h>
+#include "libiberty.h"
+#include "symcat.h"
+#include "opcode/crx.h"
+
+const inst crx_instruction[] =
+{
+/* Create an arithmetic instruction - INST[bw]. */
+#define ARITH_BYTE_INST(NAME, OPC) \
+ /* opc8 cst4 r */ \
+ {NAME, 1, OPC, 24, ARITH_BYTE_INS, {{cst4,20}, {regr,16}}}, \
+ /* opc8 i16 r */ \
+ {NAME, 2, (OPC<<4)+0xE, 20, ARITH_BYTE_INS, {{i16,0}, {regr,16}}}, \
+ /* opc8 r r */ \
+ {NAME, 1, OPC+0x40, 24, ARITH_BYTE_INS, {{regr,20}, {regr,16}}}
+
+ ARITH_BYTE_INST ("addub", 0x0),
+ ARITH_BYTE_INST ("addb", 0x1),
+ ARITH_BYTE_INST ("addcb", 0x2),
+ ARITH_BYTE_INST ("andb", 0x3),
+ ARITH_BYTE_INST ("cmpb", 0x4),
+ ARITH_BYTE_INST ("movb", 0x5),
+ ARITH_BYTE_INST ("orb", 0x6),
+ ARITH_BYTE_INST ("subb", 0x7),
+ ARITH_BYTE_INST ("subcb", 0x8),
+ ARITH_BYTE_INST ("xorb", 0x9),
+ ARITH_BYTE_INST ("mulb", 0xA),
+
+ ARITH_BYTE_INST ("adduw", 0x10),
+ ARITH_BYTE_INST ("addw", 0x11),
+ ARITH_BYTE_INST ("addcw", 0x12),
+ ARITH_BYTE_INST ("andw", 0x13),
+ ARITH_BYTE_INST ("cmpw", 0x14),
+ ARITH_BYTE_INST ("movw", 0x15),
+ ARITH_BYTE_INST ("orw", 0x16),
+ ARITH_BYTE_INST ("subw", 0x17),
+ ARITH_BYTE_INST ("subcw", 0x18),
+ ARITH_BYTE_INST ("xorw", 0x19),
+ ARITH_BYTE_INST ("mulw", 0x1A),
+
+/* Create an arithmetic instruction - INST[d]. */
+#define ARITH_INST(NAME, OPC) \
+ /* opc8 cst4 r */ \
+ {NAME, 1, OPC, 24, ARITH_INS, {{cst4,20}, {regr,16}}}, \
+ /* opc8 i16 r */ \
+ {NAME, 2, (OPC<<4)+0xE, 20, ARITH_INS, {{i16,0}, {regr,16}}}, \
+ /* opc8 i32 r */ \
+ {NAME, 3, (OPC<<4)+0xF, 20, ARITH_INS, {{i32,0}, {regr,16}}}, \
+ /* opc8 r r */ \
+ {NAME, 1, OPC+0x40, 24, ARITH_INS, {{regr,20}, {regr,16}}}
+
+ ARITH_INST ("addud", 0x20),
+ ARITH_INST ("addd", 0x21),
+ ARITH_INST ("addcd", 0x22),
+ ARITH_INST ("andd", 0x23),
+ ARITH_INST ("cmpd", 0x24),
+ ARITH_INST ("movd", 0x25),
+ ARITH_INST ("ord", 0x26),
+ ARITH_INST ("subd", 0x27),
+ ARITH_INST ("subcd", 0x28),
+ ARITH_INST ("xord", 0x29),
+ ARITH_INST ("muld", 0x2A),
+
+/* Create a shift instruction. */
+#define SHIFT_INST(NAME, OPRD, OPC1, SHIFT1, OPC2) \
+ /* OPRD=i3 -->> opc9 i3 r */ \
+ /* OPRD=i4 -->> opc8 i4 r */ \
+ /* OPRD=i5 -->> opc7 i5 r */ \
+ {NAME, 1, OPC1, SHIFT1, SHIFT_INS, {{OPRD,20}, {regr,16}}}, \
+ /* opc8 r r */ \
+ {NAME, 1, OPC2, 24, SHIFT_INS, {{regr,20}, {regr,16}}}
+
+ SHIFT_INST ("sllb", i3, 0x1F8, 23, 0x4D),
+ SHIFT_INST ("srlb", i3, 0x1F9, 23, 0x4E),
+ SHIFT_INST ("srab", i3, 0x1FA, 23, 0x4F),
+
+ SHIFT_INST ("sllw", i4, 0xB6, 24, 0x5D),
+ SHIFT_INST ("srlw", i4, 0xB7, 24, 0x5E),
+ SHIFT_INST ("sraw", i4, 0xB8, 24, 0x5F),
+
+ SHIFT_INST ("slld", i5, 0x78, 25, 0x6D),
+ SHIFT_INST ("srld", i5, 0x79, 25, 0x6E),
+ SHIFT_INST ("srad", i5, 0x7A, 25, 0x6F),
+
+/* Create a conditional branch instruction. */
+#define BRANCH_INST(NAME, OPC) \
+ /* opc4 c4 dispe9 */ \
+ {NAME, 1, OPC, 24, BRANCH_INS | RELAXABLE, {{d9,16}}}, \
+ /* opc4 c4 disps17 */ \
+ {NAME, 2, (OPC<<8)+0x7E, 16, BRANCH_INS | RELAXABLE, {{d17,0}}}, \
+ /* opc4 c4 disps33 */ \
+ {NAME, 3, (OPC<<8)+0x7F, 16, BRANCH_INS | RELAXABLE, {{d33,0}}}
+
+ BRANCH_INST ("beq", 0x70),
+ BRANCH_INST ("bne", 0x71),
+ BRANCH_INST ("bcs", 0x72),
+ BRANCH_INST ("bcc", 0x73),
+ BRANCH_INST ("bhi", 0x74),
+ BRANCH_INST ("bls", 0x75),
+ BRANCH_INST ("bgt", 0x76),
+ BRANCH_INST ("ble", 0x77),
+ BRANCH_INST ("bfs", 0x78),
+ BRANCH_INST ("bfc", 0x79),
+ BRANCH_INST ("blo", 0x7A),
+ BRANCH_INST ("bhs", 0x7B),
+ BRANCH_INST ("blt", 0x7C),
+ BRANCH_INST ("bge", 0x7D),
+ BRANCH_INST ("br", 0x7E),
+
+/* Create a 'Branch if Equal to 0' instruction. */
+#define BRANCH_NEQ_INST(NAME, OPC) \
+ /* opc8 dispu5 r */ \
+ {NAME, 1, OPC, 24, BRANCH_NEQ_INS, {{regr,16}, {d5,20}}}
+
+ BRANCH_NEQ_INST ("beq0b", 0xB0),
+ BRANCH_NEQ_INST ("bne0b", 0xB1),
+ BRANCH_NEQ_INST ("beq0w", 0xB2),
+ BRANCH_NEQ_INST ("bne0w", 0xB3),
+ BRANCH_NEQ_INST ("beq0d", 0xB4),
+ BRANCH_NEQ_INST ("bne0d", 0xB5),
+
+/* Create instruction with no operands. */
+#define NO_OP_INST(NAME, OPC) \
+ /* opc16 */ \
+ {NAME, 1, OPC, 16, 0, {{0, 0}}}
+
+ NO_OP_INST ("nop", 0x3002),
+ NO_OP_INST ("retx", 0x3003),
+ NO_OP_INST ("di", 0x3004),
+ NO_OP_INST ("ei", 0x3005),
+ NO_OP_INST ("wait", 0x3006),
+ NO_OP_INST ("eiwait", 0x3007),
+
+/* Create a 'Compare & Branch' instruction. */
+#define CMPBR_INST(NAME, OPC1, OPC2, C4) \
+ /* opc12 r r c4 disps9 */ \
+ {NAME, 2, ((0x300+OPC1)<<12)+C4, 8, CMPBR_INS | FMT_3 | RELAXABLE, {{regr,16}, {regr,12}, {d9,0}}}, \
+ /* opc12 r r c4 disps25 */ \
+ {NAME, 3, ((0x310+OPC1)<<12)+C4, 8, CMPBR_INS | FMT_3 | RELAXABLE, {{regr,16}, {regr,12}, {d25,0}}}, \
+ /* opc12 i4cst4 r c4 disps9 */ \
+ {NAME, 2, ((0x300+OPC2)<<12)+C4, 8, CMPBR_INS | FMT_3 | RELAXABLE, {{cst4,16}, {regr,12}, {d9,0}}}, \
+ /* opc12 i4cst4 r c4 disps25 */ \
+ {NAME, 3, ((0x310+OPC2)<<12)+C4, 8, CMPBR_INS | FMT_3 | RELAXABLE, {{cst4,16}, {regr,12}, {d25,0}}}
+
+ CMPBR_INST ("cmpbeqb", 0x8, 0xC, 0x0),
+ CMPBR_INST ("cmpbneb", 0x8, 0xC, 0x1),
+ CMPBR_INST ("cmpbhib", 0x8, 0xC, 0x4),
+ CMPBR_INST ("cmpblsb", 0x8, 0xC, 0x5),
+ CMPBR_INST ("cmpbgtb", 0x8, 0xC, 0x6),
+ CMPBR_INST ("cmpbleb", 0x8, 0xC, 0x7),
+ CMPBR_INST ("cmpblob", 0x8, 0xC, 0xA),
+ CMPBR_INST ("cmpbhsb", 0x8, 0xC, 0xB),
+ CMPBR_INST ("cmpbltb", 0x8, 0xC, 0xC),
+ CMPBR_INST ("cmpbgeb", 0x8, 0xC, 0xD),
+
+ CMPBR_INST ("cmpbeqw", 0x9, 0xD, 0x0),
+ CMPBR_INST ("cmpbnew", 0x9, 0xD, 0x1),
+ CMPBR_INST ("cmpbhiw", 0x9, 0xD, 0x4),
+ CMPBR_INST ("cmpblsw", 0x9, 0xD, 0x5),
+ CMPBR_INST ("cmpbgtw", 0x9, 0xD, 0x6),
+ CMPBR_INST ("cmpblew", 0x9, 0xD, 0x7),
+ CMPBR_INST ("cmpblow", 0x9, 0xD, 0xA),
+ CMPBR_INST ("cmpbhsw", 0x9, 0xD, 0xB),
+ CMPBR_INST ("cmpbltw", 0x9, 0xD, 0xC),
+ CMPBR_INST ("cmpbgew", 0x9, 0xD, 0xD),
+
+ CMPBR_INST ("cmpbeqd", 0xA, 0xE, 0x0),
+ CMPBR_INST ("cmpbned", 0xA, 0xE, 0x1),
+ CMPBR_INST ("cmpbhid", 0xA, 0xE, 0x4),
+ CMPBR_INST ("cmpblsd", 0xA, 0xE, 0x5),
+ CMPBR_INST ("cmpbgtd", 0xA, 0xE, 0x6),
+ CMPBR_INST ("cmpbled", 0xA, 0xE, 0x7),
+ CMPBR_INST ("cmpblod", 0xA, 0xE, 0xA),
+ CMPBR_INST ("cmpbhsd", 0xA, 0xE, 0xB),
+ CMPBR_INST ("cmpbltd", 0xA, 0xE, 0xC),
+ CMPBR_INST ("cmpbged", 0xA, 0xE, 0xD),
+
+/* Create an instruction using a single register operand. */
+#define REG1_INST(NAME, OPC) \
+ /* opc8 c4 r */ \
+ {NAME, 1, OPC, 20, 0, {{regr,16}}}
+
+ /* JCond instructions */
+ REG1_INST ("jeq", 0xBA0),
+ REG1_INST ("jne", 0xBA1),
+ REG1_INST ("jcs", 0xBA2),
+ REG1_INST ("jcc", 0xBA3),
+ REG1_INST ("jhi", 0xBA4),
+ REG1_INST ("jls", 0xBA5),
+ REG1_INST ("jgt", 0xBA6),
+ REG1_INST ("jle", 0xBA7),
+ REG1_INST ("jfs", 0xBA8),
+ REG1_INST ("jfc", 0xBA9),
+ REG1_INST ("jlo", 0xBAA),
+ REG1_INST ("jhs", 0xBAB),
+ REG1_INST ("jlt", 0xBAC),
+ REG1_INST ("jge", 0xBAD),
+ REG1_INST ("jump", 0xBAE),
+
+ /* SCond instructions */
+ REG1_INST ("seq", 0xBB0),
+ REG1_INST ("sne", 0xBB1),
+ REG1_INST ("scs", 0xBB2),
+ REG1_INST ("scc", 0xBB3),
+ REG1_INST ("shi", 0xBB4),
+ REG1_INST ("sls", 0xBB5),
+ REG1_INST ("sgt", 0xBB6),
+ REG1_INST ("sle", 0xBB7),
+ REG1_INST ("sfs", 0xBB8),
+ REG1_INST ("sfc", 0xBB9),
+ REG1_INST ("slo", 0xBBA),
+ REG1_INST ("shs", 0xBBB),
+ REG1_INST ("slt", 0xBBC),
+ REG1_INST ("sge", 0xBBD),
+
+/* Create an instruction using two register operands. */
+#define REG2_INST(NAME, OPC) \
+ /* opc24 r r OR opc20 c4 r r */ \
+ {NAME, 2, 0x300800+OPC, 8, 0, {{regr,4}, {regr,0}}}
+
+ /* MULTIPLY INSTRUCTIONS */
+ REG2_INST ("macsb", 0x40),
+ REG2_INST ("macub", 0x41),
+ REG2_INST ("macqb", 0x42),
+
+ REG2_INST ("macsw", 0x50),
+ REG2_INST ("macuw", 0x51),
+ REG2_INST ("macqw", 0x52),
+
+ REG2_INST ("macsd", 0x60),
+ REG2_INST ("macud", 0x61),
+ REG2_INST ("macqd", 0x62),
+
+ REG2_INST ("mullsd", 0x65),
+ REG2_INST ("mullud", 0x66),
+
+ REG2_INST ("mulsbw", 0x3B),
+ REG2_INST ("mulubw", 0x3C),
+ REG2_INST ("mulswd", 0x3D),
+ REG2_INST ("muluwd", 0x3E),
+
+ /* SIGNEXTEND STUFF */
+ REG2_INST ("sextbw", 0x30),
+ REG2_INST ("sextbd", 0x31),
+ REG2_INST ("sextwd", 0x32),
+ REG2_INST ("zextbw", 0x34),
+ REG2_INST ("zextbd", 0x35),
+ REG2_INST ("zextwd", 0x36),
+
+ REG2_INST ("bswap", 0x3F),
+
+ REG2_INST ("maxsb", 0x80),
+ REG2_INST ("minsb", 0x81),
+ REG2_INST ("maxub", 0x82),
+ REG2_INST ("minub", 0x83),
+ REG2_INST ("absb", 0x84),
+ REG2_INST ("negb", 0x85),
+ REG2_INST ("cntl0b", 0x86),
+ REG2_INST ("cntl1b", 0x87),
+ REG2_INST ("popcntb",0x88),
+ REG2_INST ("rotlb", 0x89),
+ REG2_INST ("rotrb", 0x8A),
+ REG2_INST ("mulqb", 0x8B),
+ REG2_INST ("addqb", 0x8C),
+ REG2_INST ("subqb", 0x8D),
+ REG2_INST ("cntlsb", 0x8E),
+
+ REG2_INST ("maxsw", 0x90),
+ REG2_INST ("minsw", 0x91),
+ REG2_INST ("maxuw", 0x92),
+ REG2_INST ("minuw", 0x93),
+ REG2_INST ("absw", 0x94),
+ REG2_INST ("negw", 0x95),
+ REG2_INST ("cntl0w", 0x96),
+ REG2_INST ("cntl1w", 0x97),
+ REG2_INST ("popcntw",0x98),
+ REG2_INST ("rotlw", 0x99),
+ REG2_INST ("rotrw", 0x9A),
+ REG2_INST ("mulqw", 0x9B),
+ REG2_INST ("addqw", 0x9C),
+ REG2_INST ("subqw", 0x9D),
+ REG2_INST ("cntlsw", 0x9E),
+
+ REG2_INST ("maxsd", 0xA0),
+ REG2_INST ("minsd", 0xA1),
+ REG2_INST ("maxud", 0xA2),
+ REG2_INST ("minud", 0xA3),
+ REG2_INST ("absd", 0xA4),
+ REG2_INST ("negd", 0xA5),
+ REG2_INST ("cntl0d", 0xA6),
+ REG2_INST ("cntl1d", 0xA7),
+ REG2_INST ("popcntd",0xA8),
+ REG2_INST ("rotld", 0xA9),
+ REG2_INST ("rotrd", 0xAA),
+ REG2_INST ("mulqd", 0xAB),
+ REG2_INST ("addqd", 0xAC),
+ REG2_INST ("subqd", 0xAD),
+ REG2_INST ("cntlsd", 0xAE),
+
+/* Conditional move instructions */
+ REG2_INST ("cmoveqd", 0x70),
+ REG2_INST ("cmovned", 0x71),
+ REG2_INST ("cmovcsd", 0x72),
+ REG2_INST ("cmovccd", 0x73),
+ REG2_INST ("cmovhid", 0x74),
+ REG2_INST ("cmovlsd", 0x75),
+ REG2_INST ("cmovgtd", 0x76),
+ REG2_INST ("cmovled", 0x77),
+ REG2_INST ("cmovfsd", 0x78),
+ REG2_INST ("cmovfcd", 0x79),
+ REG2_INST ("cmovlod", 0x7A),
+ REG2_INST ("cmovhsd", 0x7B),
+ REG2_INST ("cmovltd", 0x7C),
+ REG2_INST ("cmovged", 0x7D),
+
+/* Load instructions (from memory to register). */
+#define LD_REG_INST(NAME, OPC1, OPC2, DISP) \
+ /* opc12 r abs16 */ \
+ {NAME, 2, 0x320+OPC1, 20, LD_STOR_INS | REVERSE_MATCH, {{abs16,0}, {regr,16}}}, \
+ /* opc12 r abs32 */ \
+ {NAME, 3, 0x330+OPC1, 20, LD_STOR_INS | REVERSE_MATCH, {{abs32,0}, {regr,16}}}, \
+ /* opc4 r c4 rbase */ \
+ {NAME, 1, ((0x8+OPC2)<<8), 20, LD_STOR_INS | DISP | FMT_1 | REVERSE_MATCH, {{rbase,20}, {regr,24}}},\
+ /* opc4 r rbase dispu[bwd]4 */ \
+ {NAME, 1, 0x8+OPC2, 28, LD_STOR_INS | DISP | REVERSE_MATCH, {{rbase_cst4,16}, {regr,24}}}, \
+ /* opc4 r rbase disps16 */ \
+ {NAME, 2, ((0x8+OPC2)<<8)+0xE, 20, LD_STOR_INS | DISP | FMT_1 | REVERSE_MATCH, {{rbase_dispu16,16}, {regr,24}}}, \
+ /* opc4 r rbase disps32 */ \
+ {NAME, 3, ((0x8+OPC2)<<8)+0xF, 20, LD_STOR_INS | FMT_1 | REVERSE_MATCH, {{rbase_dispu32,16}, {regr,24}}}, \
+ /* opc12 r rbase */ \
+ {NAME, 2, 0x328+OPC1, 20, LD_STOR_INS_INC | REVERSE_MATCH, {{rbase,12}, {regr,16}}}, \
+ /* opc12 r rbase disps12 */ \
+ {NAME, 2, 0x328+OPC1, 20, LD_STOR_INS_INC | REVERSE_MATCH, {{rbase_dispu12,12}, {regr,16}}}, \
+ /* opc12 r rbase ridx scl2 disps6 */ \
+ {NAME, 2, 0x32C+OPC1, 20, LD_STOR_INS | REVERSE_MATCH, {{rbase_ridx_scl2_dispu6,0}, {regr,16}}}, \
+ /* opc12 r rbase ridx scl2 disps22 */ \
+ {NAME, 3, 0x33C+OPC1, 20, LD_STOR_INS | REVERSE_MATCH, {{rbase_ridx_scl2_dispu22,0}, {regr,16}}}
+
+ LD_REG_INST ("loadb", 0x0, 0x0, DISPUB4),
+ LD_REG_INST ("loadw", 0x1, 0x1, DISPUW4),
+ LD_REG_INST ("loadd", 0x2, 0x2, DISPUD4),
+
+/* Store instructions (from Register to Memory). */
+#define ST_REG_INST(NAME, OPC1, OPC2, DISP) \
+ /* opc12 r abs16 */ \
+ {NAME, 2, 0x320+OPC1, 20, LD_STOR_INS, {{regr,16}, {abs16,0}}}, \
+ /* opc12 r abs32 */ \
+ {NAME, 3, 0x330+OPC1, 20, LD_STOR_INS, {{regr,16}, {abs32,0}}}, \
+ /* opc4 r c4 rbase */ \
+ {NAME, 1, ((0x8+OPC2)<<8), 20, LD_STOR_INS | DISP | FMT_1, {{regr,24}, {rbase,20}}},\
+ /* opc4 r rbase dispu[bwd]4 */ \
+ {NAME, 1, 0x8+OPC2, 28, LD_STOR_INS | DISP, {{regr,24}, {rbase_cst4,16}}}, \
+ /* opc4 r rbase disps16 */ \
+ {NAME, 2, ((0x8+OPC2)<<8)+0xE, 20, LD_STOR_INS | DISP | FMT_1, {{regr,24}, {rbase_dispu16,16}}}, \
+ /* opc4 r rbase disps32 */ \
+ {NAME, 3, ((0x8+OPC2)<<8)+0xF, 20, LD_STOR_INS | FMT_1, {{regr,24}, {rbase_dispu32,16}}}, \
+ /* opc12 r rbase */ \
+ {NAME, 2, 0x328+OPC1, 20, LD_STOR_INS_INC, {{regr,16}, {rbase,12}}}, \
+ /* opc12 r rbase disps12 */ \
+ {NAME, 2, 0x328+OPC1, 20, LD_STOR_INS_INC, {{regr,16}, {rbase_dispu12,12}}}, \
+ /* opc12 r rbase ridx scl2 disps6 */ \
+ {NAME, 2, 0x32C+OPC1, 20, LD_STOR_INS, {{regr,16}, {rbase_ridx_scl2_dispu6,0}}}, \
+ /* opc12 r rbase ridx scl2 disps22 */ \
+ {NAME, 3, 0x33C+OPC1, 20, LD_STOR_INS, {{regr,16}, {rbase_ridx_scl2_dispu22,0}}}
+
+/* Store instructions (Immediate to Memory). */
+#define ST_I_INST(NAME, OPC) \
+ /* opc12 i4 abs16 */ \
+ {NAME, 2, 0x360+OPC, 20, STOR_IMM_INS, {{i4,16}, {abs16,0}}}, \
+ /* opc12 i4 abs32 */ \
+ {NAME, 3, 0x370+OPC, 20, STOR_IMM_INS, {{i4,16}, {abs32,0}}}, \
+ /* opc12 i4 c4 rbase */ \
+ {NAME, 1, 0x368+OPC, 20, LD_STOR_INS_INC, {{i4,16}, {rbase,12}}}, \
+ /* opc12 i4 rbase disps12 */ \
+ {NAME, 2, 0x368+OPC, 20, LD_STOR_INS_INC, {{i4,16}, {rbase_dispu12,12}}}, \
+ /* opc4 i4 c4 rbase */ \
+ {NAME, 1, 0x364+OPC, 20, STOR_IMM_INS, {{i4,16}, {rbase,12}}}, \
+ /* opc12 i4 rbase disps12 */ \
+ {NAME, 2, 0x364+OPC, 20, STOR_IMM_INS, {{i4,16}, {rbase_dispu12,12}}}, \
+ /* opc12 i4 rbase disps28 */ \
+ {NAME, 3, 0x374+OPC, 20, STOR_IMM_INS, {{i4,16}, {rbase_dispu28,12}}}, \
+ /* opc12 i4 rbase ridx scl2 disps6 */ \
+ {NAME, 2, 0x36C+OPC, 20, STOR_IMM_INS, {{i4,16}, {rbase_ridx_scl2_dispu6,0}}},\
+ /* opc12 i4 rbase ridx scl2 disps22 */ \
+ {NAME, 3, 0x37C+OPC, 20, STOR_IMM_INS, {{i4,16}, {rbase_ridx_scl2_dispu22,0}}}
+
+ ST_REG_INST ("storb", 0x20, 0x4, DISPUB4),
+ ST_I_INST ("storb", 0x0),
+
+ ST_REG_INST ("storw", 0x21, 0x5, DISPUW4),
+ ST_I_INST ("storw", 0x1),
+
+ ST_REG_INST ("stord", 0x22, 0x6, DISPUD4),
+ ST_I_INST ("stord", 0x2),
+
+/* Create a bit instruction. */
+#define CSTBIT_INST(NAME, OP, OPC1, DIFF, SHIFT, OPC2) \
+ /* OP=i3 -->> opc13 i3 */ \
+ /* OP=i4 -->> opc12 i4 */ \
+ /* OP=i5 -->> opc11 i5 */ \
+ \
+ /* opcNN iN abs16 */ \
+ {NAME, 2, OPC1+0*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {abs16,0}}}, \
+ /* opcNN iN abs32 */ \
+ {NAME, 3, OPC1+1*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {abs32,0}}}, \
+ /* opcNN iN rbase */ \
+ {NAME, 1, OPC2, SHIFT+4, CSTBIT_INS, {{OP,20}, {rbase,16}}}, \
+ /* opcNN iN rbase disps12 */ \
+ {NAME, 2, OPC1+2*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {rbase_dispu12,12}}}, \
+ /* opcNN iN rbase disps28 */ \
+ {NAME, 3, OPC1+3*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {rbase_dispu28,12}}}, \
+ /* opcNN iN rbase ridx scl2 disps6 */ \
+ {NAME, 2, OPC1+4*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {rbase_ridx_scl2_dispu6,0}}}, \
+ /* opcNN iN rbase ridx scl2 disps22 */ \
+ {NAME, 3, OPC1+5*DIFF, SHIFT, CSTBIT_INS, {{OP,16}, {rbase_ridx_scl2_dispu22,0}}}
+
+ CSTBIT_INST ("cbitb", i3, 0x700, 0x20, 19, 0x1FC),
+ CSTBIT_INST ("cbitw", i4, 0x382, 0x10, 20, 0xBD),
+ CSTBIT_INST ("cbitd", i5, 0x1C3, 0x8, 21, 0x7B),
+ {"cbitd", 2, 0x300838, 8, CSTBIT_INS, {{regr,4}, {regr,0}}},
+ {"cbitd", 2, 0x18047B, 9, CSTBIT_INS, {{i5,4}, {regr,0}}},
+
+ CSTBIT_INST ("sbitb", i3, 0x701, 0x20, 19, 0x1FD),
+ CSTBIT_INST ("sbitw", i4, 0x383, 0x10, 20, 0xBE),
+ CSTBIT_INST ("sbitd", i5, 0x1C4, 0x8, 21, 0x7C),
+ {"sbitd", 2, 0x300839, 8, CSTBIT_INS, {{regr,4}, {regr,0}}},
+ {"sbitd", 2, 0x18047C, 9, CSTBIT_INS, {{i5,4}, {regr,0}}},
+
+ CSTBIT_INST ("tbitb", i3, 0x702, 0x20, 19, 0x1FE),
+ CSTBIT_INST ("tbitw", i4, 0x384, 0x10, 20, 0xBF),
+ CSTBIT_INST ("tbitd", i5, 0x1C5, 0x8, 21, 0x7D),
+ {"tbitd", 2, 0x30083A, 8, CSTBIT_INS, {{regr,4}, {regr,0}}},
+ {"tbitd", 2, 0x18047D, 9, CSTBIT_INS, {{i5,4}, {regr,0}}},
+
+/* Instructions including a register list (opcode is represented as a mask). */
+#define REGLIST_INST(NAME, OPC) \
+ /* opc12 r mask16 */ \
+ {NAME, 2, OPC, 20, REG_LIST, {{regr,16}, {i16,0}}}
+
+ REG1_INST ("getrfid", 0xFF9),
+ REG1_INST ("setrfid", 0xFFA),
+
+ REGLIST_INST ("push", 0x346),
+ REG1_INST ("push", 0xFFB),
+ REGLIST_INST ("pushx", 0x347),
+
+ REGLIST_INST ("pop", 0x324),
+ REG1_INST ("pop", 0xFFC),
+ REGLIST_INST ("popx", 0x327),
+
+ REGLIST_INST ("popret", 0x326),
+ REG1_INST ("popret", 0xFFD),
+
+ REGLIST_INST ("loadm", 0x324),
+ REGLIST_INST ("loadma", 0x325),
+ REGLIST_INST ("popa", 0x325),
+
+ REGLIST_INST ("storm", 0x344),
+ REGLIST_INST ("storma", 0x345),
+
+/* Create a branch instruction. */
+#define BR_INST(NAME, OPC1, OPC2, INS_TYPE) \
+ /* opc12 r disps17 */ \
+ {NAME, 2, OPC1, 20, INS_TYPE | RELAXABLE, {{regr,16}, {d17,0}}}, \
+ /* opc12 r disps33 */ \
+ {NAME, 3, OPC2, 20, INS_TYPE | RELAXABLE, {{regr,16}, {d33,0}}}
+
+ BR_INST ("bal", 0x307, 0x317, 0),
+
+ /* Decrement and Branch instructions */
+ BR_INST ("dbnzb", 0x304, 0x314, DCR_BRANCH_INS),
+ BR_INST ("dbnzw", 0x305, 0x315, DCR_BRANCH_INS),
+ BR_INST ("dbnzd", 0x306, 0x316, DCR_BRANCH_INS),
+
+ /* Jump and link instructions */
+ REG1_INST ("jal", 0xFF8),
+ REG2_INST ("jal", 0x37),
+ REG2_INST ("jalid", 0x33),
+
+ /* opc12 c4 opc12 r mask16 */
+ {"loadmcr", 3, 0x3110300, 4, COP_REG_INS | REG_LIST | FMT_5, {{i4,16}, {regr,0}, {i16,0}}},
+ {"stormcr", 3, 0x3110301, 4, COP_REG_INS | REG_LIST | FMT_5, {{i4,16}, {regr,0}, {i16,0}}},
+
+ /* esc16 r procreg */
+ {"mtpr", 2, 0x3009, 16, 0, {{regr8,8}, {regr8,0}}},
+ /* esc16 procreg r */
+ {"mfpr", 2, 0x300A, 16, 0, {{regr8,8}, {regr8,0}}},
+ /* opc12 c4 opc8 r copreg */
+ {"mtcr", 2, 0x301030, 8, COP_REG_INS | FMT_2, {{i4,16}, {regr,4}, {copregr,0}}},
+ /* opc12 c4 opc8 copreg r */
+ {"mfcr", 2, 0x301031, 8, COP_REG_INS | FMT_2, {{i4,16}, {copregr,4}, {regr,0}}},
+ /* opc12 c4 opc8 r copsreg */
+ {"mtcsr", 2, 0x301032, 8, COP_REG_INS | FMT_2, {{i4,16}, {regr,4}, {copsregr,0}}},
+ /* opc12 c4 opc8 copsreg r */
+ {"mfcsr", 2, 0x301033, 8, COP_REG_INS | FMT_2, {{i4,16}, {copsregr,4}, {regr,0}}},
+
+ /* CO-processor extensions */
+ /* opc12 c4 opc4 i4 disps9 */
+ {"bcop", 2, 0x30107, 12, COP_BRANCH_INS | FMT_4, {{i4,16}, {i4,8}, {d9,0}}},
+ /* opc12 c4 opc4 i4 disps25 */
+ {"bcop", 3, 0x31107, 12, COP_BRANCH_INS | FMT_4, {{i4,16}, {i4,8}, {d25,0}}},
+
+ /* opc12 i4 */
+ {"excp", 1, 0xFFF, 20, 0, {{i4,16}}},
+ /* opc28 i4 */
+ {"cinv", 2, 0x3010000, 4, 0, {{i4,0}}},
+
+ /* opc9 i5 i5 i5 r r */
+ {"ram", 2, 0x7C, 23, 0, {{i5,18}, {i5,13}, {i5,8}, {regr,4}, {regr,0}}},
+ {"rim", 2, 0x7D, 23, 0, {{i5,18}, {i5,13}, {i5,8}, {regr,4}, {regr,0}}},
+
+ /* opc9 i3 r */
+ {"rotb", 1, 0x1FB, 23, 0, {{i3,20}, {regr,16}}},
+ /* opc8 i4 r */
+ {"rotw", 1, 0xB9, 24, 0, {{i4,20}, {regr,16}}},
+ /* opc23 i5 r */
+ {"rotd", 2, 0x180478, 9, 0, {{i5,4}, {regr,0}}},
+
+ {NULL, 0, 0, 0, 0, {{0, 0}}}
+};
+
+const int crx_num_opcodes = ARRAY_SIZE (crx_instruction);
+
+/* Macro to build a reg_entry, which have an opcode image :
+ For example :
+ REG(u4, 0x84, CRX_U_REGTYPE)
+ is interpreted as :
+ {"u4", u4, 0x84, CRX_U_REGTYPE} */
+#define REG(NAME, N, TYPE) {STRINGX(NAME), {NAME}, N, TYPE}
+
+const reg_entry crx_regtab[] =
+{
+/* Build a general purpose register r<N>. */
+#define REG_R(N) REG(CONCAT2(r,N), N, CRX_R_REGTYPE)
+
+ REG_R(0), REG_R(1), REG_R(2), REG_R(3),
+ REG_R(4), REG_R(5), REG_R(6), REG_R(7),
+ REG_R(8), REG_R(9), REG_R(10), REG_R(11),
+ REG_R(12), REG_R(13), REG_R(14), REG_R(15),
+ REG(ra, 0xe, CRX_R_REGTYPE),
+ REG(sp, 0xf, CRX_R_REGTYPE),
+
+/* Build a user register u<N>. */
+#define REG_U(N) REG(CONCAT2(u,N), 0x80 + N, CRX_U_REGTYPE)
+
+ REG_U(0), REG_U(1), REG_U(2), REG_U(3),
+ REG_U(4), REG_U(5), REG_U(6), REG_U(7),
+ REG_U(8), REG_U(9), REG_U(10), REG_U(11),
+ REG_U(12), REG_U(13), REG_U(14), REG_U(15),
+ REG(ura, 0x8e, CRX_U_REGTYPE),
+ REG(usp, 0x8f, CRX_U_REGTYPE),
+
+/* Build a configuration register. */
+#define REG_CFG(NAME, N) REG(NAME, N, CRX_CFG_REGTYPE)
+
+ REG_CFG(hi, 0x10),
+ REG_CFG(lo, 0x11),
+ REG_CFG(uhi, 0x90),
+ REG_CFG(ulo, 0x91),
+ REG_CFG(psr, 0x12),
+ REG_CFG(cfg, 0x15),
+ REG_CFG(cpcfg, 0x16),
+ REG_CFG(ccfg, 0x1b),
+
+/* Build a mptr register. */
+#define REG_MPTR(NAME, N) REG(NAME, N, CRX_MTPR_REGTYPE)
+
+ REG_MPTR(intbase, 0x13),
+ REG_MPTR(isp, 0x14),
+ REG_MPTR(cen, 0x17),
+
+/* Build a pc register. */
+#define REG_PC(NAME, N) REG(NAME, N, CRX_PC_REGTYPE)
+
+ REG_PC(pc, 0x0)
+};
+
+const int crx_num_regs = ARRAY_SIZE (crx_regtab);
+
+const reg_entry crx_copregtab[] =
+{
+/* Build a Coprocessor register c<N>. */
+#define REG_C(N) REG(CONCAT2(c,N), N, CRX_C_REGTYPE)
+
+ REG_C(0), REG_C(1), REG_C(2), REG_C(3),
+ REG_C(4), REG_C(5), REG_C(6), REG_C(7),
+ REG_C(8), REG_C(9), REG_C(10), REG_C(11),
+ REG_C(12), REG_C(13), REG_C(14), REG_C(15),
+
+/* Build a Coprocessor Special register cs<N>. */
+#define REG_CS(N) REG(CONCAT2(cs,N), N, CRX_CS_REGTYPE)
+
+ REG_CS(0), REG_CS(1), REG_CS(2), REG_CS(3),
+ REG_CS(4), REG_CS(5), REG_CS(6), REG_CS(7),
+ REG_CS(8), REG_CS(9), REG_CS(10), REG_CS(11),
+ REG_CS(12), REG_CS(13), REG_CS(14), REG_CS(15)
+};
+
+const int crx_num_copregs = ARRAY_SIZE (crx_copregtab);
+
+/* CRX operands table. */
+const operand_entry crx_optab[] =
+{
+ /* Index 0 is dummy, so we can count the instruction's operands. */
+ {0, nullargs}, /* dummy */
+ {4, arg_ic}, /* cst4 */
+ {8, arg_c}, /* disps9 */
+ {3, arg_ic}, /* i3 */
+ {4, arg_ic}, /* i4 */
+ {5, arg_ic}, /* i5 */
+ {8, arg_ic}, /* i8 */
+ {12, arg_ic}, /* i12 */
+ {16, arg_ic}, /* i16 */
+ {32, arg_ic}, /* i32 */
+ {4, arg_c}, /* d5 */
+ {8, arg_c}, /* d9 */
+ {16, arg_c}, /* d17 */
+ {24, arg_c}, /* d25 */
+ {32, arg_c}, /* d33 */
+ {16, arg_c}, /* abs16 */
+ {32, arg_c}, /* abs32 */
+ {4, arg_rbase}, /* rbase */
+ {4, arg_cr}, /* rbase_cst4 */
+ {8, arg_cr}, /* rbase_dispu8 */
+ {12, arg_cr}, /* rbase_dispu12 */
+ {16, arg_cr}, /* rbase_dispu16 */
+ {28, arg_cr}, /* rbase_dispu28 */
+ {32, arg_cr}, /* rbase_dispu32 */
+ {6, arg_icr}, /* rbase_ridx_scl2_dispu6 */
+ {22, arg_icr}, /* rbase_ridx_scl2_dispu22 */
+ {4, arg_r}, /* regr */
+ {8, arg_r}, /* regr8 */
+ {4, arg_copr}, /* copregr */
+ {8, arg_copr}, /* copregr8 */
+ {4, arg_copsr} /* copsregr */
+};
+
+/* CRX traps/interrupts. */
+const trap_entry crx_traps[] =
+{
+ {"nmi", 1}, {"svc", 5}, {"dvz", 6}, {"flg", 7},
+ {"bpt", 8}, {"und", 10}, {"prv", 11}, {"iberr", 12}
+};
+
+const int crx_num_traps = ARRAY_SIZE (crx_traps);
+
+/* cst4 operand mapping. */
+const cst4_entry cst4_map[] =
+{
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}, {5,-4}, {6,-1},
+ {7,7}, {8,8}, {9,16}, {10,32}, {11,20}, {12,12}, {13,48}
+};
+
+const int cst4_maps = ARRAY_SIZE (cst4_map);
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index d5b17be3253..1bcd3222285 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_arm
#define ARCH_avr
#define ARCH_cris
+#define ARCH_crx
#define ARCH_d10v
#define ARCH_d30v
#define ARCH_dlx
@@ -123,6 +124,11 @@ disassembler (abfd)
disassemble = cris_get_disassembler (abfd);
break;
#endif
+#ifdef ARCH_crx
+ case bfd_arch_crx:
+ disassemble = print_insn_crx;
+ break;
+#endif
#ifdef ARCH_d10v
case bfd_arch_d10v:
disassemble = print_insn_d10v;
@@ -146,7 +152,8 @@ disassembler (abfd)
disassemble = print_insn_h8300h;
else if (bfd_get_mach (abfd) == bfd_mach_h8300s
|| bfd_get_mach (abfd) == bfd_mach_h8300sn
- || bfd_get_mach (abfd) == bfd_mach_h8300sx)
+ || bfd_get_mach (abfd) == bfd_mach_h8300sx
+ || bfd_get_mach (abfd) == bfd_mach_h8300sxn)
disassemble = print_insn_h8300s;
else
disassemble = print_insn_h8300;
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 7e0b3b424a8..91f8ccadfec 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -5160,7 +5160,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* cfmovs$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMOVS, "cfmovs", "cfmovs", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR450_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR450_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fnegs$pack $FRj,$FRk */
{
diff --git a/opcodes/frv-desc.h b/opcodes/frv-desc.h
index 5a11f8d031e..4e9b446da6c 100644
--- a/opcodes/frv-desc.h
+++ b/opcodes/frv-desc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index 2e307e03076..f220799bbfd 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
diff --git a/opcodes/frv-opc.h b/opcodes/frv-opc.h
index dd343dea675..c0a52dc4169 100644
--- a/opcodes/frv-opc.h
+++ b/opcodes/frv-opc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index 895a9efbdc1..8ba93f66b0a 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -1,20 +1,20 @@
/* Disassemble h8300 instructions.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFINE_TABLE
@@ -640,14 +640,6 @@ bfd_h8_disassemble (addr, info, mach)
}
else if (looking_for == (op_type) E)
{
- int i;
-
- for (i = 0; i < qi->length; i++)
- outfn (stream, "%02x ", data[i]);
-
- for (; i < 6; i++)
- outfn (stream, " ");
-
outfn (stream, "%s\t", q->name);
/* Gross. Disgusting. */
@@ -716,6 +708,17 @@ bfd_h8_disassemble (addr, info, mach)
int hadone = 0;
int nargs;
+ /* Special case handling for the adds and subs instructions
+ since in H8 mode thay can only take the r0-r7 registers but
+ in other (higher) modes they can take the er0-er7 registers
+ as well. */
+ if (strcmp (qi->opcode->name, "adds") == 0
+ || strcmp (qi->opcode->name, "subs") == 0)
+ {
+ outfn (stream, "#%d,%s", cst[0], pregnames[regno[1] & 0x7]);
+ return qi->length;
+ }
+
for (nargs = 0;
nargs < 3 && args[nargs] != (op_type) E;
nargs++)
@@ -750,9 +753,7 @@ bfd_h8_disassemble (addr, info, mach)
}
/* Fell off the end. */
- outfn (stream, "%02x %02x .word\tH'%x,H'%x",
- data[0], data[1],
- data[0], data[1]);
+ outfn (stream, ".word\tH'%x,H'%x", data[0], data[1]);
return 2;
}
diff --git a/opcodes/h8500-dis.c b/opcodes/h8500-dis.c
index 5fa52fbf99e..144c7e41e08 100644
--- a/opcodes/h8500-dis.c
+++ b/opcodes/h8500-dis.c
@@ -1,19 +1,19 @@
/* Disassemble h8500 instructions.
- Copyright 1993, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
@@ -227,14 +227,6 @@ print_insn_h8500 (addr, info)
/* We get here when all the masks have passed so we can output
the operands. */
FETCH_DATA (info, buffer + opcode->length);
- for (i = 0; i < opcode->length; i++)
- {
- (func) (stream, "%02x ", buffer[i]);
- }
- for (; i < 6; i++)
- {
- (func) (stream, " ");
- }
(func) (stream, "%s\t", opcode->name);
for (i = 0; i < opcode->nargs; i++)
{
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index a71eb0c9105..66fd388a455 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -2,38 +2,34 @@
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2001, 2002, 2003, 2004 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. */
-
-/*
- * 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
- * July 1988
- * modified by John Hassey (hassey@dg-rtp.dg.com)
- * x86-64 support added by Jan Hubicka (jh@suse.cz)
- * VIA PadLock support by Michal Ludvig (mludvig@suse.cz)
- */
-
-/*
- * The main tables describing the instructions is essentially a copy
- * of the "Opcode Map" chapter (Appendix A) of the Intel 80386
- * Programmers Manual. Usually, there is a capital letter, followed
- * by a small letter. The capital letter tell the addressing mode,
- * and the small letter tells about the operand size. Refer to
- * the Intel manual for details.
- */
+ 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. */
+
+/* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
+ July 1988
+ modified by John Hassey (hassey@dg-rtp.dg.com)
+ x86-64 support added by Jan Hubicka (jh@suse.cz)
+ VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
+
+/* The main tables describing the instructions is essentially a copy
+ of the "Opcode Map" chapter (Appendix A) of the Intel 80386
+ Programmers Manual. Usually, there is a capital letter, followed
+ by a small letter. The capital letter tell the addressing mode,
+ and the small letter tells about the operand size. Refer to
+ the Intel manual for details. */
#include "dis-asm.h"
#include "sysdep.h"
@@ -312,7 +308,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define w_mode 3 /* word operand */
#define d_mode 4 /* double word operand */
#define q_mode 5 /* quad word operand */
-#define x_mode 6
+#define x_mode 6 /* 80 bit float operand */
#define m_mode 7 /* d_mode in 32bit, q_mode in 64bit mode. */
#define cond_jump_mode 8
#define loop_jcxz_mode 9
@@ -393,7 +389,8 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define GRP13 NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0
#define GRP14 NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0
#define GRPAMD NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0
-#define GRPPADLCK NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0
+#define GRPPADLCK1 NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0
+#define GRPPADLCK2 NULL, NULL, USE_GROUPS, NULL, 24, NULL, 0
#define PREGRP0 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0
#define PREGRP1 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0
@@ -952,8 +949,8 @@ static const struct dis386 dis386_twobyte[] = {
{ "btS", Ev, Gv, XX },
{ "shldS", Ev, Gv, Ib },
{ "shldS", Ev, Gv, CL },
- { "(bad)", XX, XX, XX },
- { GRPPADLCK },
+ { GRPPADLCK2 },
+ { GRPPADLCK1 },
/* a8 */
{ "pushT", gs, XX, XX },
{ "popT", gs, XX, XX },
@@ -1091,7 +1088,7 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
- /* a0 */ 0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1, /* af */
+ /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
/* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
/* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
/* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
@@ -1455,7 +1452,7 @@ static const struct dis386 grps[][8] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
},
- /* GRPPADLCK */
+ /* GRPPADLCK1 */
{
{ "xstorerng", OP_0f07, 0, XX, XX },
{ "xcryptecb", OP_0f07, 0, XX, XX },
@@ -1465,6 +1462,17 @@ static const struct dis386 grps[][8] = {
{ "xcryptofb", OP_0f07, 0, XX, XX },
{ "(bad)", OP_0f07, 0, XX, XX },
{ "(bad)", OP_0f07, 0, XX, XX },
+ },
+ /* GRPPADLCK2 */
+ {
+ { "montmul", OP_0f07, 0, XX, XX },
+ { "xsha1", OP_0f07, 0, XX, XX },
+ { "xsha256", OP_0f07, 0, XX, XX },
+ { "(bad)", OP_0f07, 0, XX, XX },
+ { "(bad)", OP_0f07, 0, XX, XX },
+ { "(bad)", OP_0f07, 0, XX, XX },
+ { "(bad)", OP_0f07, 0, XX, XX },
+ { "(bad)", OP_0f07, 0, XX, XX },
}
};
@@ -1881,6 +1889,7 @@ prefix_name (int pref, int sizeflag)
static char op1out[100], op2out[100], op3out[100];
static int op_ad, op_index[3];
+static int two_source_ops;
static bfd_vma op_address[3];
static bfd_vma op_riprel[3];
static bfd_vma start_pc;
@@ -1932,7 +1941,6 @@ print_insn (bfd_vma pc, disassemble_info *info)
{
const struct dis386 *dp;
int i;
- int two_source_ops;
char *first, *second, *third;
int needcomma;
unsigned char uses_SSE_prefix;
@@ -2364,7 +2372,7 @@ static const char *float_mem[] = {
"fdivr{l||l|}",
/* dd */
"fld{l||l|}",
- "fisttpll",
+ "fisttp{ll||ll|}",
"fst{l||l|}",
"fstp{l||l|}",
"frstor",
@@ -2388,7 +2396,82 @@ static const char *float_mem[] = {
"fbld",
"fild{ll||ll|}",
"fbstp",
- "fistpll",
+ "fistp{ll||ll|}",
+};
+
+static const unsigned char float_mem_mode[] = {
+ /* d8 */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ /* d9 */
+ d_mode,
+ 0,
+ d_mode,
+ d_mode,
+ 0,
+ w_mode,
+ 0,
+ w_mode,
+ /* da */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ /* db */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ 0,
+ x_mode,
+ 0,
+ x_mode,
+ /* dc */
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ /* dd */
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ 0,
+ 0,
+ 0,
+ w_mode,
+ /* de */
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ /* df */
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ x_mode,
+ q_mode,
+ x_mode,
+ q_mode
};
#define ST OP_ST, 0
@@ -2567,14 +2650,11 @@ dofloat (int sizeflag)
if (mod != 3)
{
- putop (float_mem[(floatop - 0xd8) * 8 + reg], sizeflag);
+ int fp_indx = (floatop - 0xd8) * 8 + reg;
+
+ putop (float_mem[fp_indx], sizeflag);
obufp = op1out;
- if (floatop == 0xdb)
- OP_E (x_mode, sizeflag);
- else if (floatop == 0xdd)
- OP_E (d_mode, sizeflag);
- else
- OP_E (v_mode, sizeflag);
+ OP_E (float_mem_mode[fp_indx], sizeflag);
return;
}
/* Skip mod/rm byte. */
@@ -3094,7 +3174,7 @@ OP_E (int bytemode, int sizeflag)
if ((base & 7) == 5)
{
havebase = 0;
- if (mode_64bit && !havesib && (sizeflag & AFLAG))
+ if (mode_64bit && !havesib)
riprel = 1;
disp = get32s ();
}
@@ -3135,9 +3215,15 @@ OP_E (int bytemode, int sizeflag)
oappend ("WORD PTR ");
break;
case v_mode:
- oappend ("DWORD PTR ");
+ if (sizeflag & DFLAG)
+ oappend ("DWORD PTR ");
+ else
+ oappend ("WORD PTR ");
break;
case d_mode:
+ oappend ("DWORD PTR ");
+ break;
+ case q_mode:
oappend ("QWORD PTR ");
break;
case m_mode:
@@ -3776,13 +3862,10 @@ static void
ptr_reg (int code, int sizeflag)
{
const char *s;
- if (intel_syntax)
- oappend ("[");
- else
- oappend ("(");
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ *obufp++ = open_char;
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ if (mode_64bit)
{
if (!(sizeflag & AFLAG))
s = names32[code - eAX_reg];
@@ -3794,10 +3877,8 @@ ptr_reg (int code, int sizeflag)
else
s = names16[code - eAX_reg];
oappend (s);
- if (intel_syntax)
- oappend ("]");
- else
- oappend (")");
+ *obufp++ = close_char;
+ *obufp = 0;
}
static void
@@ -3866,15 +3947,17 @@ OP_Rd (int bytemode, int sizeflag)
static void
OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
- add = 8;
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
- sprintf (scratchbuf, "%%xmm%d", reg + add);
+ {
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", reg + add);
+ }
else
- sprintf (scratchbuf, "%%mm%d", reg + add);
+ sprintf (scratchbuf, "%%mm%d", reg);
oappend (scratchbuf + intel_syntax);
}
@@ -3892,24 +3975,27 @@ OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
static void
OP_EM (int bytemode, int sizeflag)
{
- int add = 0;
if (mod != 3)
{
OP_E (bytemode, sizeflag);
return;
}
- USED_REX (REX_EXTZ);
- if (rex & REX_EXTZ)
- add = 8;
/* Skip mod/rm byte. */
MODRM_CHECK;
codep++;
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
- sprintf (scratchbuf, "%%xmm%d", rm + add);
+ {
+ int add = 0;
+
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
+ }
else
- sprintf (scratchbuf, "%%mm%d", rm + add);
+ sprintf (scratchbuf, "%%mm%d", rm);
oappend (scratchbuf + intel_syntax);
}
@@ -4162,21 +4248,29 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
static void
PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
{
- if (mod == 3 && reg == 1)
+ if (mod == 3 && reg == 1 && rm <= 1)
{
- char *p = obuf + strlen (obuf);
-
/* Override "sidt". */
+ char *p = obuf + strlen (obuf) - 4;
+
+ /* We might have a suffix. */
+ if (*p == 'i')
+ --p;
+
if (rm)
{
/* mwait %eax,%ecx */
- strcpy (p - 4, "mwait %eax,%ecx");
+ strcpy (p, "mwait");
}
else
{
/* monitor %eax,%ecx,%edx" */
- strcpy (p - 4, "monitor %eax,%ecx,%edx");
+ strcpy (p, "monitor");
+ strcpy (op3out, names32[2]);
}
+ strcpy (op1out, names32[0]);
+ strcpy (op2out, names32[1]);
+ two_source_ops = 1;
codep++;
}
diff --git a/opcodes/ia64-asmtab.c b/opcodes/ia64-asmtab.c
index 2465d393850..2b0af2715f6 100644
--- a/opcodes/ia64-asmtab.c
+++ b/opcodes/ia64-asmtab.c
@@ -1544,36 +1544,82 @@ static const short dep235[] = {
};
static const short dep236[] = {
+ 96, 267, 2135, 2139, 2310, 2312, 18593, 18594, 18746, 18747, 18749, 18750,
+
+};
+
+static const short dep237[] = {
+ 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136, 138,
+ 139, 146, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2310,
+ 2312, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+};
+
+static const short dep238[] = {
+ 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
+ 138, 139, 146, 148, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169,
+ 2172, 2310, 2312, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+};
+
+static const short dep239[] = {
+ 0, 96, 181, 267, 2135, 2139, 2310, 2312, 18593, 18594, 18746, 18747, 18749,
+ 18750,
+};
+
+static const short dep240[] = {
+ 0, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
+ 138, 139, 146, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165, 2166, 2169,
+ 2172, 2310, 2312, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+};
+
+static const short dep241[] = {
+ 0, 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135,
+ 136, 138, 139, 146, 148, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165,
+ 2166, 2169, 2172, 2310, 2312, 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+ 20613,
+};
+
+static const short dep242[] = {
+ 0, 96, 181, 267, 2136, 2139, 2310, 2312, 18593, 18594, 18746, 18747, 18749,
+ 18750,
+};
+
+static const short dep243[] = {
0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
139, 146, 163, 174, 178, 181, 267, 274, 2134, 2135, 2136, 2137, 2138, 2139,
2165, 2166, 2169, 2172, 4135, 16524, 16526, 20613,
};
-static const short dep237[] = {
+static const short dep244[] = {
40, 41, 75, 96, 134, 148, 174, 267, 2165, 2166, 2169, 2172, 4135,
};
-static const short dep238[] = {
+static const short dep245[] = {
40, 41, 75, 96, 134, 135, 139, 148, 174, 267, 2165, 2166, 2169, 2172, 4135,
};
-static const short dep239[] = {
+static const short dep246[] = {
40, 41, 75, 96, 134, 148, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
2312, 4135, 20613,
};
-static const short dep240[] = {
+static const short dep247[] = {
40, 41, 75, 96, 134, 135, 139, 148, 174, 267, 2137, 2138, 2139, 2165, 2166,
2169, 2172, 2312, 4135, 20613,
};
-static const short dep241[] = {
+static const short dep248[] = {
40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2310, 4135,
16524, 16526, 18746, 18748, 18749, 18751, 20613,
};
-static const short dep242[] = {
+static const short dep249[] = {
+ 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
+ 139, 146, 163, 174, 178, 181, 267, 274, 2134, 2135, 2136, 2137, 2138, 2139,
+ 2165, 2166, 2169, 2172, 2312, 4135, 16524, 16526, 20613,
+};
+
+static const short dep250[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 24, 26, 27, 28, 29, 30, 31, 96, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 195, 197, 198, 200, 201, 203, 204, 206, 207, 208,
@@ -1581,7 +1627,7 @@ static const short dep242[] = {
2312, 28852, 29002,
};
-static const short dep243[] = {
+static const short dep251[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 24, 25, 26, 28, 29, 30, 31, 40, 41, 96, 134, 171, 174, 182, 183, 184,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 197, 198, 200, 201,
@@ -1738,14 +1784,20 @@ op_dependencies[] = {
{ NELS(dep233), dep233, NELS(dep232), dep232, },
{ NELS(dep234), dep234, NELS(dep232), dep232, },
{ NELS(dep233), dep233, NELS(dep235), dep235, },
- { NELS(dep236), dep236, NELS(dep217), dep217, },
- { NELS(dep237), dep237, NELS(dep31), dep31, },
- { NELS(dep238), dep238, NELS(dep31), dep31, },
- { NELS(dep239), dep239, NELS(dep0), dep0, },
- { NELS(dep240), dep240, NELS(dep0), dep0, },
- { NELS(dep241), dep241, NELS(dep62), dep62, },
+ { NELS(dep237), dep237, NELS(dep236), dep236, },
+ { NELS(dep238), dep238, NELS(dep236), dep236, },
+ { NELS(dep240), dep240, NELS(dep239), dep239, },
+ { NELS(dep241), dep241, NELS(dep239), dep239, },
+ { NELS(dep240), dep240, NELS(dep242), dep242, },
+ { NELS(dep243), dep243, NELS(dep217), dep217, },
+ { NELS(dep244), dep244, NELS(dep31), dep31, },
+ { NELS(dep245), dep245, NELS(dep31), dep31, },
+ { NELS(dep246), dep246, NELS(dep0), dep0, },
+ { NELS(dep247), dep247, NELS(dep0), dep0, },
+ { NELS(dep248), dep248, NELS(dep62), dep62, },
+ { NELS(dep249), dep249, NELS(dep222), dep222, },
{ 0, NULL, 0, NULL, },
- { NELS(dep243), dep243, NELS(dep242), dep242, },
+ { NELS(dep251), dep251, NELS(dep250), dep250, },
};
static const struct ia64_completer_table
@@ -1763,36 +1815,36 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 455, -1, 0, 1, 6 },
- { 0x0, 0x0, 0, 518, -1, 0, 1, 17 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
- { 0x0, 0x0, 0, 617, -1, 0, 1, 17 },
- { 0x0, 0x0, 0, 1836, -1, 0, 1, 10 },
+ { 0x0, 0x0, 0, 454, -1, 0, 1, 6 },
+ { 0x0, 0x0, 0, 517, -1, 0, 1, 17 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 157 },
+ { 0x0, 0x0, 0, 616, -1, 0, 1, 17 },
+ { 0x0, 0x0, 0, 1835, -1, 0, 1, 10 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 9 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 13 },
{ 0x1, 0x1, 0, -1, -1, 13, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 2014, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2013, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 958, -1, 0, 1, 122 },
+ { 0x0, 0x0, 0, 957, -1, 0, 1, 122 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 44 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 78 },
- { 0x0, 0x0, 0, 1878, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 1877, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2057, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 1882, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2056, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 1881, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 1884, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2066, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2069, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 1883, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2065, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2068, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
@@ -1801,66 +1853,65 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2091, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2090, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2094, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 2093, -1, 0, 1, 29 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 35 },
- { 0x0, 0x0, 0, 2102, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 1181, -1, 0, 1, 33 },
+ { 0x0, 0x0, 0, 2101, -1, 0, 1, 29 },
+ { 0x0, 0x0, 0, 1180, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 157 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 77 },
- { 0x0, 0x0, 0, 1216, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1225, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1234, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1236, -1, 0, 1, 125 },
- { 0x0, 0x0, 0, 1245, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1254, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1263, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1272, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1281, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1290, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1300, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1310, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1320, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1329, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1335, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1341, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1347, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1353, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1359, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1365, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1371, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1377, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1383, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1389, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1395, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1401, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1407, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1413, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1419, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1425, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1431, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1435, -1, 0, 1, 146 },
- { 0x0, 0x0, 0, 1439, -1, 0, 1, 148 },
- { 0x0, 0x0, 0, 1443, -1, 0, 1, 148 },
+ { 0x0, 0x0, 0, 1215, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1224, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1233, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1235, -1, 0, 1, 125 },
+ { 0x0, 0x0, 0, 1244, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1253, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1262, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1271, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1280, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1289, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1299, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1309, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1319, -1, 0, 1, 124 },
+ { 0x0, 0x0, 0, 1328, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1334, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1340, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1346, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1352, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1358, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1364, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1370, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1376, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1382, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1388, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1394, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1400, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1406, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1412, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1418, -1, 0, 1, 140 },
+ { 0x0, 0x0, 0, 1424, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1430, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1434, -1, 0, 1, 151 },
+ { 0x0, 0x0, 0, 1438, -1, 0, 1, 153 },
+ { 0x0, 0x0, 0, 1442, -1, 0, 1, 153 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 79 },
- { 0x0, 0x0, 0, 253, -1, 0, 1, 40 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 252, -1, 0, 1, 40 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 67 },
- { 0x1, 0x1, 0, 984, -1, 20, 1, 67 },
+ { 0x1, 0x1, 0, 983, -1, 20, 1, 67 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 68 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 69 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 70 },
@@ -1887,25 +1938,25 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 111 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 112 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 113 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 158 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 158 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 158 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 71 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 157 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2393, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 2394, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2395, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 1847, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 1848, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 1849, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2409, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2408, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
@@ -1913,13 +1964,13 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2409, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 2410, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 2411, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 2412, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2413, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2395, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, 2396, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2397, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 11 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 84 },
@@ -1929,26 +1980,26 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x1, 0x1, 0, -1, -1, 13, 1, 0 },
- { 0x0, 0x0, 0, 2415, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2414, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 84 },
- { 0x0, 0x0, 0, 1711, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1713, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1715, -1, 0, 1, 132 },
- { 0x0, 0x0, 0, 1717, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1719, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1721, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1723, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1726, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1729, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1732, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1733, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1734, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1735, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1736, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1737, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1738, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1739, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1710, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1712, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1714, -1, 0, 1, 132 },
+ { 0x0, 0x0, 0, 1716, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1718, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1720, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1722, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1725, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1728, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1731, -1, 0, 1, 150 },
+ { 0x0, 0x0, 0, 1732, -1, 0, 1, 156 },
+ { 0x0, 0x0, 0, 1733, -1, 0, 1, 150 },
+ { 0x0, 0x0, 0, 1734, -1, 0, 1, 156 },
+ { 0x0, 0x0, 0, 1735, -1, 0, 1, 150 },
+ { 0x0, 0x0, 0, 1736, -1, 0, 1, 156 },
+ { 0x0, 0x0, 0, 1737, -1, 0, 1, 150 },
+ { 0x0, 0x0, 0, 1738, -1, 0, 1, 156 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
@@ -1960,94 +2011,95 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 118 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 120 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 119 },
+ { 0x0, 0x0, 0, 1443, -1, 0, 1, 136 },
{ 0x0, 0x0, 0, 1444, -1, 0, 1, 136 },
{ 0x0, 0x0, 0, 1445, -1, 0, 1, 136 },
{ 0x0, 0x0, 0, 1446, -1, 0, 1, 136 },
- { 0x0, 0x0, 0, 1447, -1, 0, 1, 136 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 1, 220, -1, 0, 1, 12 },
+ { 0x0, 0x0, 1, 219, -1, 0, 1, 12 },
{ 0x1, 0x1, 2, -1, -1, 27, 1, 12 },
+ { 0x0, 0x0, 3, -1, 1122, 0, 0, -1 },
{ 0x0, 0x0, 3, -1, 1123, 0, 0, -1 },
- { 0x0, 0x0, 3, -1, 1124, 0, 0, -1 },
- { 0x1, 0x1, 3, 2285, 1209, 33, 1, 127 },
- { 0x1, 0x1, 3, 2286, 1218, 33, 1, 127 },
- { 0x1, 0x1, 3, 2287, 1227, 33, 1, 127 },
- { 0x1, 0x1, 3, 2288, 1238, 33, 1, 127 },
- { 0x1, 0x1, 3, 2289, 1247, 33, 1, 127 },
- { 0x1, 0x1, 3, 2290, 1256, 33, 1, 127 },
- { 0x1, 0x1, 3, 2291, 1265, 33, 1, 127 },
- { 0x1, 0x1, 3, 2292, 1274, 33, 1, 127 },
- { 0x1, 0x1, 3, 2293, 1283, 33, 1, 127 },
- { 0x1, 0x1, 3, 2294, 1292, 33, 1, 127 },
- { 0x1, 0x1, 3, 2295, 1302, 33, 1, 127 },
- { 0x1, 0x1, 3, 2296, 1312, 33, 1, 127 },
- { 0x1, 0x1, 3, 2297, 1325, 33, 1, 142 },
- { 0x1, 0x1, 3, 2298, 1331, 33, 1, 142 },
- { 0x1, 0x1, 3, 2299, 1337, 33, 1, 142 },
- { 0x1, 0x1, 3, 2300, 1343, 33, 1, 142 },
- { 0x1, 0x1, 3, 2301, 1349, 33, 1, 142 },
- { 0x1, 0x1, 3, 2302, 1355, 33, 1, 142 },
- { 0x1, 0x1, 3, 2303, 1361, 33, 1, 142 },
- { 0x1, 0x1, 3, 2304, 1367, 33, 1, 142 },
- { 0x1, 0x1, 3, 2305, 1373, 33, 1, 142 },
- { 0x1, 0x1, 3, 2306, 1379, 33, 1, 142 },
- { 0x1, 0x1, 3, 2307, 1385, 33, 1, 142 },
- { 0x1, 0x1, 3, 2308, 1391, 33, 1, 142 },
- { 0x1, 0x1, 3, 2309, 1397, 33, 1, 142 },
- { 0x1, 0x1, 3, 2310, 1403, 33, 1, 142 },
- { 0x1, 0x1, 3, 2311, 1409, 33, 1, 142 },
- { 0x1, 0x1, 3, 2312, 1415, 33, 1, 142 },
- { 0x1, 0x1, 3, 2313, 1421, 33, 1, 142 },
- { 0x1, 0x1, 3, 2314, 1427, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2284, 1208, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2285, 1217, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2286, 1226, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2287, 1237, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2288, 1246, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2289, 1255, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2290, 1264, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2291, 1273, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2292, 1282, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2293, 1291, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2294, 1301, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2295, 1311, 33, 1, 127 },
+ { 0x1, 0x1, 3, 2296, 1324, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2297, 1330, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2298, 1336, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2299, 1342, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2300, 1348, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2301, 1354, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2302, 1360, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2303, 1366, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2304, 1372, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2305, 1378, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2306, 1384, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2307, 1390, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2308, 1396, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2309, 1402, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2310, 1408, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2311, 1414, 33, 1, 142 },
+ { 0x1, 0x1, 3, 2312, 1420, 33, 1, 147 },
+ { 0x1, 0x1, 3, 2313, 1426, 33, 1, 147 },
{ 0x1, 0x1, 3, -1, -1, 27, 1, 40 },
- { 0x0, 0x0, 4, 1850, 1194, 0, 1, 135 },
- { 0x0, 0x0, 4, 1851, 1196, 0, 1, 134 },
- { 0x0, 0x0, 4, 1852, 1198, 0, 1, 134 },
- { 0x0, 0x0, 4, 1853, 1200, 0, 1, 134 },
- { 0x0, 0x0, 4, 1854, 1202, 0, 1, 134 },
- { 0x0, 0x0, 4, 1855, 1204, 0, 1, 136 },
- { 0x0, 0x0, 4, 1856, 1206, 0, 1, 136 },
- { 0x1, 0x1, 4, -1, 1213, 33, 1, 130 },
- { 0x5, 0x5, 4, 413, 1212, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1222, 33, 1, 130 },
- { 0x5, 0x5, 4, 414, 1221, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1231, 33, 1, 130 },
- { 0x5, 0x5, 4, 415, 1230, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1235, 32, 1, 125 },
- { 0x1, 0x1, 4, -1, 1242, 33, 1, 130 },
- { 0x5, 0x5, 4, 416, 1241, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1251, 33, 1, 130 },
- { 0x5, 0x5, 4, 417, 1250, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1260, 33, 1, 130 },
- { 0x5, 0x5, 4, 418, 1259, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1269, 33, 1, 130 },
- { 0x5, 0x5, 4, 419, 1268, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1278, 33, 1, 130 },
- { 0x5, 0x5, 4, 420, 1277, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1287, 33, 1, 130 },
- { 0x5, 0x5, 4, 421, 1286, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1297, 33, 1, 130 },
- { 0x5, 0x5, 4, 888, 1295, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1307, 33, 1, 130 },
- { 0x5, 0x5, 4, 889, 1305, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1317, 33, 1, 130 },
- { 0x5, 0x5, 4, 890, 1315, 32, 1, 124 },
- { 0x1, 0x21, 10, 1748, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1749, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 1750, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1751, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 1752, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1753, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 351, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1779, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 355, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1781, -1, 12, 1, 3 },
- { 0x1, 0x21, 10, 1758, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1759, -1, 12, 1, 3 },
+ { 0x0, 0x0, 4, 1849, 1193, 0, 1, 135 },
+ { 0x0, 0x0, 4, 1850, 1195, 0, 1, 134 },
+ { 0x0, 0x0, 4, 1851, 1197, 0, 1, 134 },
+ { 0x0, 0x0, 4, 1852, 1199, 0, 1, 134 },
+ { 0x0, 0x0, 4, 1853, 1201, 0, 1, 134 },
+ { 0x0, 0x0, 4, 1854, 1203, 0, 1, 136 },
+ { 0x0, 0x0, 4, 1855, 1205, 0, 1, 136 },
+ { 0x1, 0x1, 4, -1, 1212, 33, 1, 130 },
+ { 0x5, 0x5, 4, 412, 1211, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1221, 33, 1, 130 },
+ { 0x5, 0x5, 4, 413, 1220, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1230, 33, 1, 130 },
+ { 0x5, 0x5, 4, 414, 1229, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1234, 32, 1, 125 },
+ { 0x1, 0x1, 4, -1, 1241, 33, 1, 130 },
+ { 0x5, 0x5, 4, 415, 1240, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1250, 33, 1, 130 },
+ { 0x5, 0x5, 4, 416, 1249, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1259, 33, 1, 130 },
+ { 0x5, 0x5, 4, 417, 1258, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1268, 33, 1, 130 },
+ { 0x5, 0x5, 4, 418, 1267, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1277, 33, 1, 130 },
+ { 0x5, 0x5, 4, 419, 1276, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1286, 33, 1, 130 },
+ { 0x5, 0x5, 4, 420, 1285, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1296, 33, 1, 130 },
+ { 0x5, 0x5, 4, 887, 1294, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1306, 33, 1, 130 },
+ { 0x5, 0x5, 4, 888, 1304, 32, 1, 124 },
+ { 0x1, 0x1, 4, -1, 1316, 33, 1, 130 },
+ { 0x5, 0x5, 4, 889, 1314, 32, 1, 124 },
+ { 0x1, 0x21, 10, 1747, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1748, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 1749, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 1750, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 1751, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1752, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 350, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 1778, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 354, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1780, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 1757, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1758, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 1787, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1788, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1789, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1790, 0, 0, -1 },
@@ -2059,19 +2111,19 @@ completer_table[] = {
{ 0x0, 0x0, 10, -1, 1796, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1797, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1798, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1799, 0, 0, -1 },
- { 0x1, 0x21, 10, 1760, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1761, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 1762, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1763, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 1764, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1765, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 375, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1803, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 379, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1805, -1, 12, 1, 3 },
- { 0x1, 0x21, 10, 1770, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1771, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 1759, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1760, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 1761, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 1762, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 1763, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1764, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 374, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 1802, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 378, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1804, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 1769, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 1770, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 1811, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1812, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1813, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1814, 0, 0, -1 },
@@ -2083,86 +2135,86 @@ completer_table[] = {
{ 0x0, 0x0, 10, -1, 1820, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1821, 0, 0, -1 },
{ 0x0, 0x0, 10, -1, 1822, 0, 0, -1 },
+ { 0x1, 0x1, 10, 1771, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 1772, -1, 12, 1, 3 },
{ 0x0, 0x0, 10, -1, 1823, 0, 0, -1 },
- { 0x1, 0x1, 10, 1772, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 10, 1773, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1824, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1826, 0, 0, -1 },
- { 0x1, 0x1, 10, 1774, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 10, 1775, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1828, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1830, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 1825, 0, 0, -1 },
+ { 0x1, 0x1, 10, 1773, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 1774, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 1827, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 1829, 0, 0, -1 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1776, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1777, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 1775, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1776, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 1754, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1753, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 293, -1, 0, 1, 3 },
+ { 0x0, 0x0, 11, 292, -1, 0, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x200001, 0x200001, 11, 1756, -1, 12, 1, 3 },
+ { 0x200001, 0x200001, 11, 1755, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 295, -1, 33, 1, 3 },
- { 0x0, 0x0, 11, 1782, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1783, -1, 12, 1, 3 },
- { 0x1, 0x1, 11, 1784, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 11, 1785, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 294, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 1781, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1782, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1783, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 11, 1784, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1786, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1787, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 1785, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1786, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1800, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1801, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 1799, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1800, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 1766, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1765, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 317, -1, 0, 1, 3 },
+ { 0x0, 0x0, 11, 316, -1, 0, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x200001, 0x200001, 11, 1768, -1, 12, 1, 3 },
+ { 0x200001, 0x200001, 11, 1767, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 319, -1, 33, 1, 3 },
- { 0x0, 0x0, 11, 1806, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1807, -1, 12, 1, 3 },
- { 0x1, 0x1, 11, 1808, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 11, 1809, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 318, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 1805, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1806, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1807, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 11, 1808, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1810, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1811, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 1809, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 1810, -1, 12, 1, 3 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
- { 0x1, 0x1, 11, 1825, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 11, 1827, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1824, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 1826, -1, 12, 1, 3 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
- { 0x1, 0x1, 11, 1829, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 11, 1831, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 1828, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 1830, -1, 12, 1, 3 },
{ 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
{ 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
{ 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
- { 0x1, 0x1, 13, 262, 1211, 34, 1, 124 },
- { 0x1, 0x1, 13, 264, 1220, 34, 1, 124 },
- { 0x1, 0x1, 13, 266, 1229, 34, 1, 124 },
- { 0x1, 0x1, 13, 269, 1240, 34, 1, 124 },
- { 0x1, 0x1, 13, 271, 1249, 34, 1, 124 },
- { 0x1, 0x1, 13, 273, 1258, 34, 1, 124 },
- { 0x1, 0x1, 13, 275, 1267, 34, 1, 124 },
- { 0x1, 0x1, 13, 277, 1276, 34, 1, 124 },
- { 0x1, 0x1, 13, 279, 1285, 34, 1, 124 },
- { 0x1, 0x1, 13, 281, 1294, 34, 1, 124 },
- { 0x1, 0x1, 13, 283, 1304, 34, 1, 124 },
- { 0x1, 0x1, 13, 285, 1314, 34, 1, 124 },
+ { 0x1, 0x1, 13, 261, 1210, 34, 1, 124 },
+ { 0x1, 0x1, 13, 263, 1219, 34, 1, 124 },
+ { 0x1, 0x1, 13, 265, 1228, 34, 1, 124 },
+ { 0x1, 0x1, 13, 268, 1239, 34, 1, 124 },
+ { 0x1, 0x1, 13, 270, 1248, 34, 1, 124 },
+ { 0x1, 0x1, 13, 272, 1257, 34, 1, 124 },
+ { 0x1, 0x1, 13, 274, 1266, 34, 1, 124 },
+ { 0x1, 0x1, 13, 276, 1275, 34, 1, 124 },
+ { 0x1, 0x1, 13, 278, 1284, 34, 1, 124 },
+ { 0x1, 0x1, 13, 280, 1293, 34, 1, 124 },
+ { 0x1, 0x1, 13, 282, 1303, 34, 1, 124 },
+ { 0x1, 0x1, 13, 284, 1313, 34, 1, 124 },
+ { 0x0, 0x0, 19, -1, 655, 0, 0, -1 },
{ 0x0, 0x0, 19, -1, 656, 0, 0, -1 },
{ 0x0, 0x0, 19, -1, 657, 0, 0, -1 },
{ 0x0, 0x0, 19, -1, 658, 0, 0, -1 },
@@ -2192,20 +2244,19 @@ completer_table[] = {
{ 0x0, 0x0, 19, -1, 682, 0, 0, -1 },
{ 0x0, 0x0, 19, -1, 683, 0, 0, -1 },
{ 0x0, 0x0, 19, -1, 684, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 685, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2362, 0, 0, -1 },
{ 0x0, 0x0, 20, -1, 2363, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2364, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2378, 0, 0, -1 },
{ 0x0, 0x0, 20, -1, 2379, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2380, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2384, 0, 0, -1 },
{ 0x0, 0x0, 20, -1, 2385, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2386, 0, 0, -1 },
- { 0x0, 0x0, 21, 692, 2375, 0, 0, -1 },
- { 0x0, 0x0, 21, 693, 2377, 0, 0, -1 },
+ { 0x0, 0x0, 21, 691, 2374, 0, 0, -1 },
+ { 0x0, 0x0, 21, 692, 2376, 0, 0, -1 },
+ { 0x0, 0x0, 23, -1, 2372, 0, 0, -1 },
{ 0x0, 0x0, 23, -1, 2373, 0, 0, -1 },
- { 0x0, 0x0, 23, -1, 2374, 0, 0, -1 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
- { 0x1, 0x1, 24, 1055, -1, 35, 1, 6 },
+ { 0x1, 0x1, 24, 1054, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
@@ -2268,7 +2319,7 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, 1076, -1, 35, 1, 17 },
+ { 0x1, 0x1, 24, 1075, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
@@ -2367,7 +2418,7 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, 1109, -1, 35, 1, 17 },
+ { 0x1, 0x1, 24, 1108, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
@@ -2406,304 +2457,304 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 33, 1, 76 },
{ 0x1, 0x1, 24, -1, -1, 33, 1, 76 },
- { 0x1, 0x1, 24, 1125, 1214, 35, 1, 130 },
- { 0x1, 0x1, 24, 1126, 1223, 35, 1, 130 },
- { 0x1, 0x1, 24, 1127, 1232, 35, 1, 130 },
- { 0x1, 0x1, 24, 1128, 1243, 35, 1, 130 },
- { 0x1, 0x1, 24, 1129, 1252, 35, 1, 130 },
- { 0x1, 0x1, 24, 1130, 1261, 35, 1, 130 },
- { 0x1, 0x1, 24, 1131, 1270, 35, 1, 130 },
- { 0x1, 0x1, 24, 1132, 1279, 35, 1, 130 },
- { 0x1, 0x1, 24, 1133, 1288, 35, 1, 130 },
- { 0x1, 0x1, 24, 1134, 1298, 35, 1, 130 },
- { 0x1, 0x1, 24, 1135, 1308, 35, 1, 130 },
- { 0x1, 0x1, 24, 1136, 1318, 35, 1, 130 },
- { 0x1, 0x1, 24, 1137, 1327, 35, 1, 144 },
- { 0x1, 0x1, 24, 1138, 1333, 35, 1, 144 },
- { 0x1, 0x1, 24, 1139, 1339, 35, 1, 144 },
- { 0x1, 0x1, 24, 1140, 1345, 35, 1, 144 },
- { 0x1, 0x1, 24, 1141, 1351, 35, 1, 144 },
- { 0x1, 0x1, 24, 1142, 1357, 35, 1, 144 },
- { 0x1, 0x1, 24, 1143, 1363, 35, 1, 144 },
- { 0x1, 0x1, 24, 1144, 1369, 35, 1, 144 },
- { 0x1, 0x1, 24, 1145, 1375, 35, 1, 144 },
- { 0x1, 0x1, 24, 1146, 1381, 35, 1, 144 },
- { 0x1, 0x1, 24, 1147, 1387, 35, 1, 144 },
- { 0x1, 0x1, 24, 1148, 1393, 35, 1, 144 },
- { 0x1, 0x1, 24, 1149, 1399, 35, 1, 144 },
- { 0x1, 0x1, 24, 1150, 1405, 35, 1, 144 },
- { 0x1, 0x1, 24, 1151, 1411, 35, 1, 144 },
- { 0x1, 0x1, 24, 1152, 1417, 35, 1, 144 },
- { 0x1, 0x1, 24, 1153, 1423, 35, 1, 144 },
- { 0x1, 0x1, 24, 1154, 1429, 35, 1, 144 },
- { 0x0, 0x0, 33, 2357, 2355, 0, 0, -1 },
- { 0x0, 0x0, 33, 2360, 2358, 0, 0, -1 },
- { 0x0, 0x0, 33, 2366, 2365, 0, 0, -1 },
- { 0x0, 0x0, 33, 2368, 2367, 0, 0, -1 },
- { 0x0, 0x0, 33, 2382, 2381, 0, 0, -1 },
- { 0x0, 0x0, 33, 2384, 2383, 0, 0, -1 },
- { 0x0, 0x0, 35, -1, 2376, 0, 0, -1 },
- { 0x0, 0x0, 35, -1, 2378, 0, 0, -1 },
- { 0x1, 0x1, 38, -1, 1922, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1957, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1960, 0, 0, -1 },
+ { 0x1, 0x1, 24, 1124, 1213, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1125, 1222, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1126, 1231, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1127, 1242, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1128, 1251, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1129, 1260, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1130, 1269, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1131, 1278, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1132, 1287, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1133, 1297, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1134, 1307, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1135, 1317, 35, 1, 130 },
+ { 0x1, 0x1, 24, 1136, 1326, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1137, 1332, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1138, 1338, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1139, 1344, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1140, 1350, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1141, 1356, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1142, 1362, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1143, 1368, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1144, 1374, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1145, 1380, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1146, 1386, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1147, 1392, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1148, 1398, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1149, 1404, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1150, 1410, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1151, 1416, 35, 1, 144 },
+ { 0x1, 0x1, 24, 1152, 1422, 35, 1, 149 },
+ { 0x1, 0x1, 24, 1153, 1428, 35, 1, 149 },
+ { 0x0, 0x0, 33, 2356, 2354, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2359, 2357, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2365, 2364, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2367, 2366, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2381, 2380, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2383, 2382, 0, 0, -1 },
+ { 0x0, 0x0, 35, -1, 2375, 0, 0, -1 },
+ { 0x0, 0x0, 35, -1, 2377, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, 1921, 37, 1, 29 },
+ { 0x1, 0x1, 38, -1, 1956, 37, 1, 29 },
+ { 0x0, 0x0, 38, -1, 1959, 0, 0, -1 },
{ 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1965, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1968, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, 1964, 37, 1, 29 },
+ { 0x0, 0x0, 38, -1, 1967, 0, 0, -1 },
{ 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1971, 0, 0, -1 },
+ { 0x0, 0x0, 38, -1, 1970, 0, 0, -1 },
{ 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1974, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1977, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 2010, 37, 1, 29 },
+ { 0x1, 0x1, 38, -1, 1973, 37, 1, 29 },
+ { 0x1, 0x1, 38, -1, 1976, 37, 1, 29 },
+ { 0x1, 0x1, 38, -1, 2009, 37, 1, 29 },
{ 0x3, 0x3, 38, -1, -1, 30, 1, 137 },
- { 0x0, 0x0, 38, 960, -1, 0, 1, 95 },
+ { 0x0, 0x0, 38, 959, -1, 0, 1, 95 },
{ 0x0, 0x0, 38, -1, -1, 0, 1, 104 },
- { 0x0, 0x0, 38, 966, -1, 0, 1, 116 },
- { 0x3, 0x3, 38, -1, -1, 30, 1, 150 },
- { 0x0, 0x0, 38, 967, -1, 0, 1, 40 },
- { 0x0, 0x0, 40, -1, 825, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 833, 0, 0, -1 },
- { 0x0, 0x0, 40, 969, 829, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 483, 33, 1, 6 },
- { 0x18000001, 0x18000001, 40, -1, 491, 6, 1, 7 },
- { 0x3, 0x3, 40, 970, 487, 33, 1, 6 },
- { 0x0, 0x0, 40, -1, 837, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 503, 33, 1, 8 },
- { 0x0, 0x0, 40, -1, 841, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 515, 33, 1, 15 },
- { 0x0, 0x0, 40, -1, 846, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 850, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 538, 33, 1, 17 },
- { 0x3, 0x3, 40, -1, 542, 33, 1, 17 },
- { 0x0, 0x0, 40, -1, 854, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 858, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 562, 33, 1, 18 },
- { 0x18000001, 0x18000001, 40, -1, 566, 6, 1, 18 },
- { 0x0, 0x0, 40, -1, 862, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 578, 33, 1, 19 },
- { 0x0, 0x0, 40, -1, 866, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 870, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 598, 33, 1, 20 },
- { 0x18000001, 0x18000001, 40, -1, 602, 6, 1, 20 },
- { 0x0, 0x0, 40, -1, 874, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 614, 33, 1, 21 },
- { 0x0, 0x0, 40, -1, 879, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 883, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 637, 33, 1, 17 },
- { 0x3, 0x3, 40, -1, 641, 33, 1, 17 },
- { 0x0, 0x0, 40, -1, 887, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 653, 33, 1, 21 },
- { 0x0, 0x0, 41, 712, 824, 0, 0, -1 },
- { 0x0, 0x0, 41, 713, 832, 0, 0, -1 },
- { 0x0, 0x0, 41, 714, 828, 0, 0, -1 },
- { 0x1, 0x1, 41, 715, 482, 34, 1, 6 },
- { 0x10000001, 0x10000001, 41, 716, 490, 6, 1, 7 },
- { 0x1, 0x1, 41, 717, 486, 34, 1, 6 },
- { 0x0, 0x0, 41, 718, 836, 0, 0, -1 },
- { 0x1, 0x1, 41, 719, 502, 34, 1, 8 },
- { 0x0, 0x0, 41, 720, 840, 0, 0, -1 },
- { 0x1, 0x1, 41, 721, 514, 34, 1, 15 },
- { 0x0, 0x0, 41, 722, 845, 0, 0, -1 },
- { 0x0, 0x0, 41, 723, 849, 0, 0, -1 },
- { 0x1, 0x1, 41, 724, 537, 34, 1, 17 },
- { 0x1, 0x1, 41, 725, 541, 34, 1, 17 },
- { 0x0, 0x0, 41, 726, 853, 0, 0, -1 },
- { 0x0, 0x0, 41, 727, 857, 0, 0, -1 },
- { 0x1, 0x1, 41, 728, 561, 34, 1, 18 },
- { 0x10000001, 0x10000001, 41, 729, 565, 6, 1, 18 },
- { 0x0, 0x0, 41, 730, 861, 0, 0, -1 },
- { 0x1, 0x1, 41, 731, 577, 34, 1, 19 },
- { 0x0, 0x0, 41, 732, 865, 0, 0, -1 },
- { 0x0, 0x0, 41, 733, 869, 0, 0, -1 },
- { 0x1, 0x1, 41, 734, 597, 34, 1, 20 },
- { 0x10000001, 0x10000001, 41, 735, 601, 6, 1, 20 },
- { 0x0, 0x0, 41, 736, 873, 0, 0, -1 },
- { 0x1, 0x1, 41, 737, 613, 34, 1, 21 },
- { 0x0, 0x0, 41, 738, 878, 0, 0, -1 },
- { 0x0, 0x0, 41, 739, 882, 0, 0, -1 },
- { 0x1, 0x1, 41, 740, 636, 34, 1, 17 },
- { 0x1, 0x1, 41, 741, 640, 34, 1, 17 },
- { 0x0, 0x0, 41, 742, 886, 0, 0, -1 },
- { 0x1, 0x1, 41, 743, 652, 34, 1, 21 },
- { 0x800001, 0x800001, 41, -1, 974, 4, 1, 16 },
- { 0x1, 0x1, 41, 1868, 972, 4, 1, 16 },
- { 0x1, 0x1, 41, 809, 977, 4, 1, 22 },
- { 0x2, 0x3, 41, -1, 982, 20, 1, 67 },
- { 0x1, 0x1, 41, 1869, 980, 21, 1, 67 },
+ { 0x0, 0x0, 38, 965, -1, 0, 1, 116 },
+ { 0x3, 0x3, 38, -1, -1, 30, 1, 155 },
+ { 0x0, 0x0, 38, 966, -1, 0, 1, 40 },
+ { 0x0, 0x0, 40, -1, 824, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 832, 0, 0, -1 },
+ { 0x0, 0x0, 40, 968, 828, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 482, 33, 1, 6 },
+ { 0x18000001, 0x18000001, 40, -1, 490, 6, 1, 7 },
+ { 0x3, 0x3, 40, 969, 486, 33, 1, 6 },
+ { 0x0, 0x0, 40, -1, 836, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 502, 33, 1, 8 },
+ { 0x0, 0x0, 40, -1, 840, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 514, 33, 1, 15 },
+ { 0x0, 0x0, 40, -1, 845, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 849, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 537, 33, 1, 17 },
+ { 0x3, 0x3, 40, -1, 541, 33, 1, 17 },
+ { 0x0, 0x0, 40, -1, 853, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 857, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 561, 33, 1, 18 },
+ { 0x18000001, 0x18000001, 40, -1, 565, 6, 1, 18 },
+ { 0x0, 0x0, 40, -1, 861, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 577, 33, 1, 19 },
+ { 0x0, 0x0, 40, -1, 865, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 869, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 597, 33, 1, 20 },
+ { 0x18000001, 0x18000001, 40, -1, 601, 6, 1, 20 },
+ { 0x0, 0x0, 40, -1, 873, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 613, 33, 1, 21 },
+ { 0x0, 0x0, 40, -1, 878, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 882, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 636, 33, 1, 17 },
+ { 0x3, 0x3, 40, -1, 640, 33, 1, 17 },
+ { 0x0, 0x0, 40, -1, 886, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 652, 33, 1, 21 },
+ { 0x0, 0x0, 41, 711, 823, 0, 0, -1 },
+ { 0x0, 0x0, 41, 712, 831, 0, 0, -1 },
+ { 0x0, 0x0, 41, 713, 827, 0, 0, -1 },
+ { 0x1, 0x1, 41, 714, 481, 34, 1, 6 },
+ { 0x10000001, 0x10000001, 41, 715, 489, 6, 1, 7 },
+ { 0x1, 0x1, 41, 716, 485, 34, 1, 6 },
+ { 0x0, 0x0, 41, 717, 835, 0, 0, -1 },
+ { 0x1, 0x1, 41, 718, 501, 34, 1, 8 },
+ { 0x0, 0x0, 41, 719, 839, 0, 0, -1 },
+ { 0x1, 0x1, 41, 720, 513, 34, 1, 15 },
+ { 0x0, 0x0, 41, 721, 844, 0, 0, -1 },
+ { 0x0, 0x0, 41, 722, 848, 0, 0, -1 },
+ { 0x1, 0x1, 41, 723, 536, 34, 1, 17 },
+ { 0x1, 0x1, 41, 724, 540, 34, 1, 17 },
+ { 0x0, 0x0, 41, 725, 852, 0, 0, -1 },
+ { 0x0, 0x0, 41, 726, 856, 0, 0, -1 },
+ { 0x1, 0x1, 41, 727, 560, 34, 1, 18 },
+ { 0x10000001, 0x10000001, 41, 728, 564, 6, 1, 18 },
+ { 0x0, 0x0, 41, 729, 860, 0, 0, -1 },
+ { 0x1, 0x1, 41, 730, 576, 34, 1, 19 },
+ { 0x0, 0x0, 41, 731, 864, 0, 0, -1 },
+ { 0x0, 0x0, 41, 732, 868, 0, 0, -1 },
+ { 0x1, 0x1, 41, 733, 596, 34, 1, 20 },
+ { 0x10000001, 0x10000001, 41, 734, 600, 6, 1, 20 },
+ { 0x0, 0x0, 41, 735, 872, 0, 0, -1 },
+ { 0x1, 0x1, 41, 736, 612, 34, 1, 21 },
+ { 0x0, 0x0, 41, 737, 877, 0, 0, -1 },
+ { 0x0, 0x0, 41, 738, 881, 0, 0, -1 },
+ { 0x1, 0x1, 41, 739, 635, 34, 1, 17 },
+ { 0x1, 0x1, 41, 740, 639, 34, 1, 17 },
+ { 0x0, 0x0, 41, 741, 885, 0, 0, -1 },
+ { 0x1, 0x1, 41, 742, 651, 34, 1, 21 },
+ { 0x800001, 0x800001, 41, -1, 973, 4, 1, 16 },
+ { 0x1, 0x1, 41, 1867, 971, 4, 1, 16 },
+ { 0x1, 0x1, 41, 808, 976, 4, 1, 22 },
+ { 0x2, 0x3, 41, -1, 981, 20, 1, 67 },
+ { 0x1, 0x1, 41, 1868, 979, 21, 1, 67 },
{ 0x0, 0x0, 42, -1, -1, 0, 1, 80 },
{ 0x0, 0x0, 42, -1, -1, 0, 1, 80 },
{ 0x0, 0x0, 42, -1, -1, 0, 1, 123 },
- { 0x1, 0x1, 44, 1155, 286, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 345, 0, 0, -1 },
- { 0x1, 0x1, 44, 1158, 296, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 365, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 299, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 309, 0, 0, -1 },
- { 0x1, 0x1, 44, 1163, 310, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 369, 0, 0, -1 },
- { 0x1, 0x1, 44, 1166, 320, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 389, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 323, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 333, 0, 0, -1 },
- { 0x0, 0x0, 44, 1037, 1929, 0, 0, -1 },
- { 0x0, 0x0, 44, 1038, 2462, 0, 1, 54 },
- { 0x0, 0x0, 44, 1039, 1981, 0, 0, -1 },
- { 0x0, 0x0, 44, 1040, -1, 0, 1, 49 },
+ { 0x1, 0x1, 44, 1154, 285, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 344, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1157, 295, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 364, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 298, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 308, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1162, 309, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 368, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1165, 319, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 388, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 322, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 332, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1036, 1928, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1037, 2461, 0, 1, 54 },
+ { 0x0, 0x0, 44, 1038, 1980, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1039, -1, 0, 1, 49 },
+ { 0x0, 0x0, 44, 941, -1, 0, 1, 0 },
{ 0x0, 0x0, 44, 942, -1, 0, 1, 0 },
{ 0x0, 0x0, 44, 943, -1, 0, 1, 0 },
- { 0x0, 0x0, 44, 944, -1, 0, 1, 0 },
- { 0x1, 0x1, 45, -1, 1433, 30, 1, 147 },
- { 0x1, 0x1, 45, 815, 1432, 30, 1, 146 },
- { 0x1, 0x1, 45, -1, 1437, 30, 1, 149 },
- { 0x1, 0x1, 45, 816, 1436, 30, 1, 148 },
- { 0x1, 0x1, 45, -1, 1441, 30, 1, 149 },
- { 0x1, 0x1, 45, 817, 1440, 30, 1, 148 },
- { 0x3, 0x3, 46, -1, 978, 3, 1, 22 },
- { 0x1, 0x1, 47, 1889, -1, 30, 1, 137 },
- { 0x1, 0x1, 47, 1920, -1, 30, 1, 150 },
+ { 0x1, 0x1, 45, -1, 1432, 30, 1, 152 },
+ { 0x1, 0x1, 45, 814, 1431, 30, 1, 151 },
+ { 0x1, 0x1, 45, -1, 1436, 30, 1, 154 },
+ { 0x1, 0x1, 45, 815, 1435, 30, 1, 153 },
+ { 0x1, 0x1, 45, -1, 1440, 30, 1, 154 },
+ { 0x1, 0x1, 45, 816, 1439, 30, 1, 153 },
+ { 0x3, 0x3, 46, -1, 977, 3, 1, 22 },
+ { 0x1, 0x1, 47, 1888, -1, 30, 1, 137 },
+ { 0x1, 0x1, 47, 1919, -1, 30, 1, 155 },
{ 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 56, -1, 1434, 31, 1, 147 },
- { 0x1, 0x1, 56, -1, 1438, 31, 1, 149 },
- { 0x1, 0x1, 56, -1, 1442, 31, 1, 149 },
+ { 0x1, 0x1, 56, -1, 1433, 31, 1, 152 },
+ { 0x1, 0x1, 56, -1, 1437, 31, 1, 154 },
+ { 0x1, 0x1, 56, -1, 1441, 31, 1, 154 },
{ 0x0, 0x0, 56, -1, -1, 0, 1, 94 },
{ 0x2, 0x3, 56, -1, -1, 27, 1, 94 },
{ 0x1, 0x1, 56, -1, -1, 28, 1, 94 },
- { 0x0, 0x0, 65, 13, 453, 0, 1, 6 },
- { 0x0, 0x0, 65, 1056, 456, 0, 1, 6 },
- { 0x1, 0x1, 65, 1057, 458, 33, 1, 6 },
- { 0x1, 0x1, 65, 1058, 460, 34, 1, 6 },
- { 0x3, 0x3, 65, 1059, 462, 33, 1, 6 },
- { 0x0, 0x0, 65, 1060, 464, 0, 1, 6 },
- { 0x1, 0x1, 65, 1061, 466, 33, 1, 6 },
- { 0x1, 0x1, 65, 1062, 468, 34, 1, 6 },
- { 0x3, 0x3, 65, 1063, 470, 33, 1, 6 },
- { 0x1, 0x1, 65, 1064, 472, 6, 1, 7 },
- { 0x8000001, 0x8000001, 65, 1065, 474, 6, 1, 7 },
- { 0x10000001, 0x10000001, 65, 1066, 476, 6, 1, 7 },
- { 0x18000001, 0x18000001, 65, 1067, 478, 6, 1, 7 },
- { 0x0, 0x0, 65, 1068, 492, 0, 1, 8 },
- { 0x1, 0x1, 65, 1069, 494, 33, 1, 8 },
- { 0x1, 0x1, 65, 1070, 496, 34, 1, 8 },
- { 0x3, 0x3, 65, 1071, 498, 33, 1, 8 },
- { 0x0, 0x0, 65, 1072, 504, 0, 1, 15 },
- { 0x1, 0x1, 65, 1073, 506, 33, 1, 15 },
- { 0x1, 0x1, 65, 1074, 508, 34, 1, 15 },
- { 0x3, 0x3, 65, 1075, 510, 33, 1, 15 },
- { 0x0, 0x0, 65, 14, 516, 0, 1, 17 },
- { 0x0, 0x0, 65, 1077, 519, 0, 1, 17 },
- { 0x1, 0x1, 65, 1078, 521, 33, 1, 17 },
- { 0x1, 0x1, 65, 1079, 523, 34, 1, 17 },
- { 0x3, 0x3, 65, 1080, 525, 33, 1, 17 },
- { 0x0, 0x0, 65, 1081, 527, 0, 1, 17 },
- { 0x1, 0x1, 65, 1082, 529, 33, 1, 17 },
- { 0x1, 0x1, 65, 1083, 531, 34, 1, 17 },
- { 0x3, 0x3, 65, 1084, 533, 33, 1, 17 },
- { 0x0, 0x0, 65, 1085, 543, 0, 1, 18 },
- { 0x1, 0x1, 65, 1086, 545, 33, 1, 18 },
- { 0x1, 0x1, 65, 1087, 547, 34, 1, 18 },
- { 0x3, 0x3, 65, 1088, 549, 33, 1, 18 },
- { 0x1, 0x1, 65, 1089, 551, 6, 1, 18 },
- { 0x8000001, 0x8000001, 65, 1090, 553, 6, 1, 18 },
- { 0x10000001, 0x10000001, 65, 1091, 555, 6, 1, 18 },
- { 0x18000001, 0x18000001, 65, 1092, 557, 6, 1, 18 },
- { 0x0, 0x0, 65, 1093, 567, 0, 1, 19 },
- { 0x1, 0x1, 65, 1094, 569, 33, 1, 19 },
- { 0x1, 0x1, 65, 1095, 571, 34, 1, 19 },
- { 0x3, 0x3, 65, 1096, 573, 33, 1, 19 },
- { 0x0, 0x0, 65, 1097, 579, 0, 1, 20 },
- { 0x1, 0x1, 65, 1098, 581, 33, 1, 20 },
- { 0x1, 0x1, 65, 1099, 583, 34, 1, 20 },
- { 0x3, 0x3, 65, 1100, 585, 33, 1, 20 },
- { 0x1, 0x1, 65, 1101, 587, 6, 1, 20 },
- { 0x8000001, 0x8000001, 65, 1102, 589, 6, 1, 20 },
- { 0x10000001, 0x10000001, 65, 1103, 591, 6, 1, 20 },
- { 0x18000001, 0x18000001, 65, 1104, 593, 6, 1, 20 },
- { 0x0, 0x0, 65, 1105, 603, 0, 1, 21 },
- { 0x1, 0x1, 65, 1106, 605, 33, 1, 21 },
- { 0x1, 0x1, 65, 1107, 607, 34, 1, 21 },
- { 0x3, 0x3, 65, 1108, 609, 33, 1, 21 },
- { 0x0, 0x0, 65, 16, 615, 0, 1, 17 },
- { 0x0, 0x0, 65, 1110, 618, 0, 1, 17 },
- { 0x1, 0x1, 65, 1111, 620, 33, 1, 17 },
- { 0x1, 0x1, 65, 1112, 622, 34, 1, 17 },
- { 0x3, 0x3, 65, 1113, 624, 33, 1, 17 },
- { 0x0, 0x0, 65, 1114, 626, 0, 1, 17 },
- { 0x1, 0x1, 65, 1115, 628, 33, 1, 17 },
- { 0x1, 0x1, 65, 1116, 630, 34, 1, 17 },
- { 0x3, 0x3, 65, 1117, 632, 33, 1, 17 },
- { 0x0, 0x0, 65, 1118, 642, 0, 1, 21 },
- { 0x1, 0x1, 65, 1119, 644, 33, 1, 21 },
- { 0x1, 0x1, 65, 1120, 646, 34, 1, 21 },
- { 0x3, 0x3, 65, 1121, 648, 33, 1, 21 },
- { 0x3, 0x3, 66, 422, 1296, 33, 1, 129 },
- { 0x3, 0x3, 66, 423, 1306, 33, 1, 129 },
- { 0x3, 0x3, 66, 424, 1316, 33, 1, 129 },
- { 0x0, 0x0, 66, -1, 1321, 0, 1, 140 },
- { 0x0, 0x0, 66, -1, 1322, 0, 1, 140 },
- { 0x0, 0x0, 66, -1, 1323, 0, 1, 140 },
- { 0x0, 0x0, 107, 898, 1953, 0, 0, -1 },
- { 0x0, 0x0, 107, 899, 2400, 0, 1, 29 },
- { 0x0, 0x0, 107, 900, 1994, 0, 0, -1 },
- { 0x0, 0x0, 107, 901, 2404, 0, 1, 29 },
- { 0x0, 0x0, 109, -1, 1955, 0, 0, -1 },
- { 0x1, 0x1, 109, -1, 2401, 27, 1, 29 },
- { 0x0, 0x0, 109, -1, 1996, 0, 0, -1 },
- { 0x1, 0x1, 109, -1, 2405, 27, 1, 29 },
- { 0x0, 0x0, 110, 903, -1, 0, 1, 115 },
+ { 0x0, 0x0, 65, 13, 452, 0, 1, 6 },
+ { 0x0, 0x0, 65, 1055, 455, 0, 1, 6 },
+ { 0x1, 0x1, 65, 1056, 457, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1057, 459, 34, 1, 6 },
+ { 0x3, 0x3, 65, 1058, 461, 33, 1, 6 },
+ { 0x0, 0x0, 65, 1059, 463, 0, 1, 6 },
+ { 0x1, 0x1, 65, 1060, 465, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1061, 467, 34, 1, 6 },
+ { 0x3, 0x3, 65, 1062, 469, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1063, 471, 6, 1, 7 },
+ { 0x8000001, 0x8000001, 65, 1064, 473, 6, 1, 7 },
+ { 0x10000001, 0x10000001, 65, 1065, 475, 6, 1, 7 },
+ { 0x18000001, 0x18000001, 65, 1066, 477, 6, 1, 7 },
+ { 0x0, 0x0, 65, 1067, 491, 0, 1, 8 },
+ { 0x1, 0x1, 65, 1068, 493, 33, 1, 8 },
+ { 0x1, 0x1, 65, 1069, 495, 34, 1, 8 },
+ { 0x3, 0x3, 65, 1070, 497, 33, 1, 8 },
+ { 0x0, 0x0, 65, 1071, 503, 0, 1, 15 },
+ { 0x1, 0x1, 65, 1072, 505, 33, 1, 15 },
+ { 0x1, 0x1, 65, 1073, 507, 34, 1, 15 },
+ { 0x3, 0x3, 65, 1074, 509, 33, 1, 15 },
+ { 0x0, 0x0, 65, 14, 515, 0, 1, 17 },
+ { 0x0, 0x0, 65, 1076, 518, 0, 1, 17 },
+ { 0x1, 0x1, 65, 1077, 520, 33, 1, 17 },
+ { 0x1, 0x1, 65, 1078, 522, 34, 1, 17 },
+ { 0x3, 0x3, 65, 1079, 524, 33, 1, 17 },
+ { 0x0, 0x0, 65, 1080, 526, 0, 1, 17 },
+ { 0x1, 0x1, 65, 1081, 528, 33, 1, 17 },
+ { 0x1, 0x1, 65, 1082, 530, 34, 1, 17 },
+ { 0x3, 0x3, 65, 1083, 532, 33, 1, 17 },
+ { 0x0, 0x0, 65, 1084, 542, 0, 1, 18 },
+ { 0x1, 0x1, 65, 1085, 544, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1086, 546, 34, 1, 18 },
+ { 0x3, 0x3, 65, 1087, 548, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1088, 550, 6, 1, 18 },
+ { 0x8000001, 0x8000001, 65, 1089, 552, 6, 1, 18 },
+ { 0x10000001, 0x10000001, 65, 1090, 554, 6, 1, 18 },
+ { 0x18000001, 0x18000001, 65, 1091, 556, 6, 1, 18 },
+ { 0x0, 0x0, 65, 1092, 566, 0, 1, 19 },
+ { 0x1, 0x1, 65, 1093, 568, 33, 1, 19 },
+ { 0x1, 0x1, 65, 1094, 570, 34, 1, 19 },
+ { 0x3, 0x3, 65, 1095, 572, 33, 1, 19 },
+ { 0x0, 0x0, 65, 1096, 578, 0, 1, 20 },
+ { 0x1, 0x1, 65, 1097, 580, 33, 1, 20 },
+ { 0x1, 0x1, 65, 1098, 582, 34, 1, 20 },
+ { 0x3, 0x3, 65, 1099, 584, 33, 1, 20 },
+ { 0x1, 0x1, 65, 1100, 586, 6, 1, 20 },
+ { 0x8000001, 0x8000001, 65, 1101, 588, 6, 1, 20 },
+ { 0x10000001, 0x10000001, 65, 1102, 590, 6, 1, 20 },
+ { 0x18000001, 0x18000001, 65, 1103, 592, 6, 1, 20 },
+ { 0x0, 0x0, 65, 1104, 602, 0, 1, 21 },
+ { 0x1, 0x1, 65, 1105, 604, 33, 1, 21 },
+ { 0x1, 0x1, 65, 1106, 606, 34, 1, 21 },
+ { 0x3, 0x3, 65, 1107, 608, 33, 1, 21 },
+ { 0x0, 0x0, 65, 16, 614, 0, 1, 17 },
+ { 0x0, 0x0, 65, 1109, 617, 0, 1, 17 },
+ { 0x1, 0x1, 65, 1110, 619, 33, 1, 17 },
+ { 0x1, 0x1, 65, 1111, 621, 34, 1, 17 },
+ { 0x3, 0x3, 65, 1112, 623, 33, 1, 17 },
+ { 0x0, 0x0, 65, 1113, 625, 0, 1, 17 },
+ { 0x1, 0x1, 65, 1114, 627, 33, 1, 17 },
+ { 0x1, 0x1, 65, 1115, 629, 34, 1, 17 },
+ { 0x3, 0x3, 65, 1116, 631, 33, 1, 17 },
+ { 0x0, 0x0, 65, 1117, 641, 0, 1, 21 },
+ { 0x1, 0x1, 65, 1118, 643, 33, 1, 21 },
+ { 0x1, 0x1, 65, 1119, 645, 34, 1, 21 },
+ { 0x3, 0x3, 65, 1120, 647, 33, 1, 21 },
+ { 0x3, 0x3, 66, 421, 1295, 33, 1, 129 },
+ { 0x3, 0x3, 66, 422, 1305, 33, 1, 129 },
+ { 0x3, 0x3, 66, 423, 1315, 33, 1, 129 },
+ { 0x0, 0x0, 66, -1, 1320, 0, 1, 140 },
+ { 0x0, 0x0, 66, -1, 1321, 0, 1, 145 },
+ { 0x0, 0x0, 66, -1, 1322, 0, 1, 145 },
+ { 0x0, 0x0, 107, 897, 1952, 0, 0, -1 },
+ { 0x0, 0x0, 107, 898, 2399, 0, 1, 29 },
+ { 0x0, 0x0, 107, 899, 1993, 0, 0, -1 },
+ { 0x0, 0x0, 107, 900, 2403, 0, 1, 29 },
+ { 0x0, 0x0, 109, -1, 1954, 0, 0, -1 },
+ { 0x1, 0x1, 109, -1, 2400, 27, 1, 29 },
+ { 0x0, 0x0, 109, -1, 1995, 0, 0, -1 },
+ { 0x1, 0x1, 109, -1, 2404, 27, 1, 29 },
+ { 0x0, 0x0, 110, 902, -1, 0, 1, 115 },
{ 0x1, 0x1, 111, -1, -1, 27, 1, 115 },
- { 0x0, 0x0, 112, 921, 2423, 0, 1, 1 },
- { 0x0, 0x0, 112, 1024, 290, 0, 0, -1 },
- { 0x0, 0x0, 112, 1001, 353, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 361, 0, 0, -1 },
- { 0x0, 0x0, 112, 922, 2431, 0, 1, 1 },
- { 0x0, 0x0, 112, -1, 303, 0, 0, -1 },
- { 0x0, 0x0, 112, 1029, 304, 0, 0, -1 },
- { 0x0, 0x0, 112, 923, 2443, 0, 1, 1 },
- { 0x0, 0x0, 112, 1031, 314, 0, 0, -1 },
- { 0x0, 0x0, 112, 1008, 377, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 385, 0, 0, -1 },
- { 0x0, 0x0, 112, 1167, 2450, 0, 1, 1 },
- { 0x0, 0x0, 112, -1, 327, 0, 0, -1 },
- { 0x0, 0x0, 112, 1036, 328, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 1939, 0, 0, -1 },
- { 0x1, 0x9, 112, -1, 2469, 33, 1, 54 },
- { 0x2, 0x3, 112, 1180, 1990, 27, 1, 49 },
- { 0x1, 0x1, 114, 1156, 2424, 37, 1, 1 },
- { 0x1, 0x1, 114, 1159, 2432, 37, 1, 1 },
- { 0x1, 0x1, 114, 1164, 2444, 37, 1, 1 },
- { 0x0, 0x0, 114, -1, 2455, 0, 1, 1 },
- { 0x0, 0x0, 115, 945, 2421, 0, 1, 1 },
- { 0x0, 0x0, 115, 1000, 288, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 357, 0, 0, -1 },
- { 0x0, 0x0, 115, 1026, 359, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 2430, 0, 1, 1 },
- { 0x0, 0x0, 115, 1028, 301, 0, 0, -1 },
- { 0x0, 0x0, 115, 1005, 306, 0, 0, -1 },
- { 0x0, 0x0, 115, 947, 2441, 0, 1, 1 },
- { 0x0, 0x0, 115, 1007, 312, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 381, 0, 0, -1 },
- { 0x0, 0x0, 115, 1033, 383, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 2449, 0, 1, 1 },
- { 0x0, 0x0, 115, 1035, 325, 0, 0, -1 },
- { 0x0, 0x0, 115, 1012, 330, 0, 0, -1 },
- { 0x0, 0x0, 115, 918, 1937, 0, 0, -1 },
- { 0x0, 0x0, 115, 919, 2468, 0, 1, 54 },
- { 0x0, 0x0, 115, 920, 1989, 0, 1, 49 },
+ { 0x0, 0x0, 112, 920, 2422, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1023, 289, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1000, 352, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 360, 0, 0, -1 },
+ { 0x0, 0x0, 112, 921, 2430, 0, 1, 1 },
+ { 0x0, 0x0, 112, -1, 302, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1028, 303, 0, 0, -1 },
+ { 0x0, 0x0, 112, 922, 2442, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1030, 313, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1007, 376, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 384, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1166, 2449, 0, 1, 1 },
+ { 0x0, 0x0, 112, -1, 326, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1035, 327, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 1938, 0, 0, -1 },
+ { 0x1, 0x9, 112, -1, 2468, 33, 1, 54 },
+ { 0x2, 0x3, 112, 1179, 1989, 27, 1, 49 },
+ { 0x1, 0x1, 114, 1155, 2423, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1158, 2431, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1163, 2443, 37, 1, 1 },
+ { 0x0, 0x0, 114, -1, 2454, 0, 1, 1 },
+ { 0x0, 0x0, 115, 944, 2420, 0, 1, 1 },
+ { 0x0, 0x0, 115, 999, 287, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 356, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1025, 358, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 2429, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1027, 300, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1004, 305, 0, 0, -1 },
+ { 0x0, 0x0, 115, 946, 2440, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1006, 311, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 380, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1032, 382, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 2448, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1034, 324, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1011, 329, 0, 0, -1 },
+ { 0x0, 0x0, 115, 917, 1936, 0, 0, -1 },
+ { 0x0, 0x0, 115, 918, 2467, 0, 1, 54 },
+ { 0x0, 0x0, 115, 919, 1988, 0, 1, 49 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
- { 0x1, 0x1, 116, -1, 2422, 37, 1, 1 },
- { 0x0, 0x0, 116, -1, 2435, 0, 1, 1 },
- { 0x1, 0x1, 116, -1, 2442, 37, 1, 1 },
- { 0x0, 0x0, 116, -1, 2454, 0, 1, 1 },
+ { 0x1, 0x1, 116, -1, 2421, 37, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2434, 0, 1, 1 },
+ { 0x1, 0x1, 116, -1, 2441, 37, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2453, 0, 1, 1 },
+ { 0x0, 0x0, 117, 993, -1, 0, 1, 0 },
{ 0x0, 0x0, 117, 994, -1, 0, 1, 0 },
{ 0x0, 0x0, 117, 995, -1, 0, 1, 0 },
- { 0x0, 0x0, 117, 996, -1, 0, 1, 0 },
- { 0x3, 0x3, 117, 954, -1, 34, 1, 33 },
- { 0x3, 0x3, 117, 955, -1, 34, 1, 40 },
+ { 0x3, 0x3, 117, 953, -1, 34, 1, 33 },
+ { 0x3, 0x3, 117, 954, -1, 34, 1, 40 },
{ 0x1, 0x1, 119, -1, -1, 35, 1, 33 },
{ 0x1, 0x1, 119, -1, -1, 35, 1, 40 },
{ 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
@@ -2719,8 +2770,8 @@ completer_table[] = {
{ 0x1, 0x1, 120, -1, -1, 27, 1, 117 },
{ 0x1, 0x1, 120, -1, -1, 27, 1, 40 },
{ 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 121, -1, 2356, 0, 0, -1 },
- { 0x0, 0x0, 121, -1, 2359, 0, 0, -1 },
+ { 0x0, 0x0, 121, -1, 2355, 0, 0, -1 },
+ { 0x0, 0x0, 121, -1, 2358, 0, 0, -1 },
{ 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
{ 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
{ 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
@@ -2733,10 +2784,10 @@ completer_table[] = {
{ 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
{ 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
{ 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
- { 0x1, 0x1, 122, 779, -1, 23, 1, 67 },
- { 0x9, 0x9, 122, 780, -1, 20, 1, 67 },
+ { 0x1, 0x1, 122, 778, -1, 23, 1, 67 },
+ { 0x9, 0x9, 122, 779, -1, 20, 1, 67 },
+ { 0x0, 0x0, 126, 1836, -1, 0, 1, 0 },
{ 0x0, 0x0, 126, 1837, -1, 0, 1, 0 },
- { 0x0, 0x0, 126, 1838, -1, 0, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 28, 1, 33 },
{ 0x1, 0x1, 126, -1, -1, 27, 1, 33 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
@@ -2747,205 +2798,206 @@ completer_table[] = {
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
- { 0x0, 0x0, 126, 952, -1, 0, 1, 33 },
- { 0x0, 0x0, 126, 1046, -1, 0, 1, 40 },
- { 0x0, 0x0, 140, 1017, 2419, 0, 1, 1 },
- { 0x0, 0x0, 140, 905, 289, 0, 0, -1 },
- { 0x0, 0x0, 140, 927, 294, 0, 0, -1 },
- { 0x0, 0x0, 140, 928, 358, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 2429, 0, 1, 1 },
- { 0x0, 0x0, 140, 930, 300, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 307, 0, 0, -1 },
- { 0x0, 0x0, 140, 1019, 2439, 0, 1, 1 },
- { 0x0, 0x0, 140, 912, 313, 0, 0, -1 },
- { 0x0, 0x0, 140, 934, 318, 0, 0, -1 },
- { 0x0, 0x0, 140, 935, 382, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 2448, 0, 1, 1 },
- { 0x0, 0x0, 140, 937, 324, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 331, 0, 0, -1 },
- { 0x0, 0x0, 140, 2486, 1933, 0, 0, -1 },
- { 0x1, 0x1, 140, 2487, 2464, 33, 1, 54 },
- { 0x0, 0x0, 140, 2488, 1983, 0, 0, -1 },
- { 0x1, 0x1, 140, 2489, -1, 28, 1, 49 },
- { 0x1, 0x1, 141, -1, 2420, 37, 1, 1 },
- { 0x0, 0x0, 141, -1, 2434, 0, 1, 1 },
- { 0x1, 0x1, 141, -1, 2440, 37, 1, 1 },
- { 0x0, 0x0, 141, -1, 2453, 0, 1, 1 },
- { 0x1, 0x1, 144, 778, 976, 3, 1, 22 },
- { 0x0, 0x0, 145, 1839, -1, 0, 1, 33 },
- { 0x0, 0x0, 146, 784, 2416, 0, 1, 1 },
- { 0x0, 0x0, 146, -1, 291, 0, 0, -1 },
- { 0x0, 0x0, 146, 906, 292, 0, 0, -1 },
- { 0x0, 0x0, 146, 907, 360, 0, 0, -1 },
- { 0x0, 0x0, 146, 786, 2426, 0, 1, 1 },
- { 0x0, 0x0, 146, 909, 302, 0, 0, -1 },
- { 0x0, 0x0, 146, 931, 305, 0, 0, -1 },
- { 0x0, 0x0, 146, 790, 2436, 0, 1, 1 },
- { 0x0, 0x0, 146, -1, 315, 0, 0, -1 },
- { 0x0, 0x0, 146, 913, 316, 0, 0, -1 },
- { 0x0, 0x0, 146, 914, 384, 0, 0, -1 },
- { 0x0, 0x0, 146, 792, 2446, 0, 1, 1 },
- { 0x0, 0x0, 146, 916, 326, 0, 0, -1 },
- { 0x0, 0x0, 146, 938, 329, 0, 0, -1 },
- { 0x0, 0x0, 146, 1013, 1931, 0, 0, -1 },
- { 0x1, 0x1, 146, 1014, 2463, 36, 1, 54 },
- { 0x0, 0x0, 146, 1015, 1982, 0, 0, -1 },
- { 0x1, 0x1, 146, 1016, -1, 27, 1, 49 },
- { 0x1, 0x1, 147, -1, 2418, 37, 1, 1 },
- { 0x1, 0x1, 147, -1, 2428, 37, 1, 1 },
- { 0x1, 0x1, 147, -1, 2438, 37, 1, 1 },
- { 0x0, 0x0, 147, -1, 2452, 0, 1, 1 },
+ { 0x0, 0x0, 126, 951, -1, 0, 1, 33 },
+ { 0x0, 0x0, 126, 1045, -1, 0, 1, 40 },
+ { 0x0, 0x0, 140, 1016, 2418, 0, 1, 1 },
+ { 0x0, 0x0, 140, 904, 288, 0, 0, -1 },
+ { 0x0, 0x0, 140, 926, 293, 0, 0, -1 },
+ { 0x0, 0x0, 140, 927, 357, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 2428, 0, 1, 1 },
+ { 0x0, 0x0, 140, 929, 299, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 306, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1018, 2438, 0, 1, 1 },
+ { 0x0, 0x0, 140, 911, 312, 0, 0, -1 },
+ { 0x0, 0x0, 140, 933, 317, 0, 0, -1 },
+ { 0x0, 0x0, 140, 934, 381, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 2447, 0, 1, 1 },
+ { 0x0, 0x0, 140, 936, 323, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 330, 0, 0, -1 },
+ { 0x0, 0x0, 140, 2485, 1932, 0, 0, -1 },
+ { 0x1, 0x1, 140, 2486, 2463, 33, 1, 54 },
+ { 0x0, 0x0, 140, 2487, 1982, 0, 0, -1 },
+ { 0x1, 0x1, 140, 2488, -1, 28, 1, 49 },
+ { 0x1, 0x1, 141, -1, 2419, 37, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2433, 0, 1, 1 },
+ { 0x1, 0x1, 141, -1, 2439, 37, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2452, 0, 1, 1 },
+ { 0x1, 0x1, 144, 777, 975, 3, 1, 22 },
+ { 0x0, 0x0, 145, 1838, -1, 0, 1, 33 },
+ { 0x0, 0x0, 146, 783, 2415, 0, 1, 1 },
+ { 0x0, 0x0, 146, -1, 290, 0, 0, -1 },
+ { 0x0, 0x0, 146, 905, 291, 0, 0, -1 },
+ { 0x0, 0x0, 146, 906, 359, 0, 0, -1 },
+ { 0x0, 0x0, 146, 785, 2425, 0, 1, 1 },
+ { 0x0, 0x0, 146, 908, 301, 0, 0, -1 },
+ { 0x0, 0x0, 146, 930, 304, 0, 0, -1 },
+ { 0x0, 0x0, 146, 789, 2435, 0, 1, 1 },
+ { 0x0, 0x0, 146, -1, 314, 0, 0, -1 },
+ { 0x0, 0x0, 146, 912, 315, 0, 0, -1 },
+ { 0x0, 0x0, 146, 913, 383, 0, 0, -1 },
+ { 0x0, 0x0, 146, 791, 2445, 0, 1, 1 },
+ { 0x0, 0x0, 146, 915, 325, 0, 0, -1 },
+ { 0x0, 0x0, 146, 937, 328, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1012, 1930, 0, 0, -1 },
+ { 0x1, 0x1, 146, 1013, 2462, 36, 1, 54 },
+ { 0x0, 0x0, 146, 1014, 1981, 0, 0, -1 },
+ { 0x1, 0x1, 146, 1015, -1, 27, 1, 49 },
+ { 0x1, 0x1, 147, -1, 2417, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2427, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2437, 37, 1, 1 },
+ { 0x0, 0x0, 147, -1, 2451, 0, 1, 1 },
{ 0x0, 0x0, 148, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 148, 953, -1, 0, 1, 40 },
+ { 0x0, 0x0, 148, 952, -1, 0, 1, 40 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 66 },
- { 0x0, 0x0, 149, -1, 2456, 0, 1, 63 },
+ { 0x0, 0x0, 149, -1, 2455, 0, 1, 63 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 81 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 81 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 85 },
{ 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 150, -1, 454, 12, 1, 6 },
- { 0x1, 0x1, 150, -1, 457, 12, 1, 6 },
- { 0x200001, 0x200001, 150, -1, 459, 12, 1, 6 },
- { 0x400001, 0x400001, 150, -1, 461, 12, 1, 6 },
- { 0x600001, 0x600001, 150, -1, 463, 12, 1, 6 },
- { 0x1, 0x1, 150, -1, 465, 12, 1, 6 },
- { 0x200001, 0x200001, 150, -1, 467, 12, 1, 6 },
- { 0x400001, 0x400001, 150, -1, 469, 12, 1, 6 },
- { 0x600001, 0x600001, 150, -1, 471, 12, 1, 6 },
- { 0x41, 0x41, 150, -1, 473, 6, 1, 7 },
- { 0x8000041, 0x8000041, 150, -1, 475, 6, 1, 7 },
- { 0x10000041, 0x10000041, 150, -1, 477, 6, 1, 7 },
- { 0x18000041, 0x18000041, 150, -1, 479, 6, 1, 7 },
- { 0x1, 0x1, 150, -1, 493, 12, 1, 8 },
- { 0x200001, 0x200001, 150, -1, 495, 12, 1, 8 },
- { 0x400001, 0x400001, 150, -1, 497, 12, 1, 8 },
- { 0x600001, 0x600001, 150, -1, 499, 12, 1, 8 },
- { 0x1, 0x1, 150, -1, 505, 12, 1, 15 },
- { 0x200001, 0x200001, 150, -1, 507, 12, 1, 15 },
- { 0x400001, 0x400001, 150, -1, 509, 12, 1, 15 },
- { 0x600001, 0x600001, 150, -1, 511, 12, 1, 15 },
- { 0x1, 0x1, 150, -1, 517, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 520, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 522, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 524, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 526, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 528, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 530, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 532, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 534, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 544, 12, 1, 18 },
- { 0x200001, 0x200001, 150, -1, 546, 12, 1, 18 },
- { 0x400001, 0x400001, 150, -1, 548, 12, 1, 18 },
- { 0x600001, 0x600001, 150, -1, 550, 12, 1, 18 },
- { 0x41, 0x41, 150, -1, 552, 6, 1, 18 },
- { 0x8000041, 0x8000041, 150, -1, 554, 6, 1, 18 },
- { 0x10000041, 0x10000041, 150, -1, 556, 6, 1, 18 },
- { 0x18000041, 0x18000041, 150, -1, 558, 6, 1, 18 },
- { 0x1, 0x1, 150, -1, 568, 12, 1, 19 },
- { 0x200001, 0x200001, 150, -1, 570, 12, 1, 19 },
- { 0x400001, 0x400001, 150, -1, 572, 12, 1, 19 },
- { 0x600001, 0x600001, 150, -1, 574, 12, 1, 19 },
- { 0x1, 0x1, 150, -1, 580, 12, 1, 20 },
- { 0x200001, 0x200001, 150, -1, 582, 12, 1, 20 },
- { 0x400001, 0x400001, 150, -1, 584, 12, 1, 20 },
- { 0x600001, 0x600001, 150, -1, 586, 12, 1, 20 },
- { 0x41, 0x41, 150, -1, 588, 6, 1, 20 },
- { 0x8000041, 0x8000041, 150, -1, 590, 6, 1, 20 },
- { 0x10000041, 0x10000041, 150, -1, 592, 6, 1, 20 },
- { 0x18000041, 0x18000041, 150, -1, 594, 6, 1, 20 },
- { 0x1, 0x1, 150, -1, 604, 12, 1, 21 },
- { 0x200001, 0x200001, 150, -1, 606, 12, 1, 21 },
- { 0x400001, 0x400001, 150, -1, 608, 12, 1, 21 },
- { 0x600001, 0x600001, 150, -1, 610, 12, 1, 21 },
- { 0x1, 0x1, 150, -1, 616, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 619, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 621, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 623, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 625, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 627, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 629, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 631, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 633, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 643, 12, 1, 21 },
- { 0x200001, 0x200001, 150, -1, 645, 12, 1, 21 },
- { 0x400001, 0x400001, 150, -1, 647, 12, 1, 21 },
- { 0x600001, 0x600001, 150, -1, 649, 12, 1, 21 },
+ { 0x1, 0x1, 150, -1, 453, 12, 1, 6 },
+ { 0x1, 0x1, 150, -1, 456, 12, 1, 6 },
+ { 0x200001, 0x200001, 150, -1, 458, 12, 1, 6 },
+ { 0x400001, 0x400001, 150, -1, 460, 12, 1, 6 },
+ { 0x600001, 0x600001, 150, -1, 462, 12, 1, 6 },
+ { 0x1, 0x1, 150, -1, 464, 12, 1, 6 },
+ { 0x200001, 0x200001, 150, -1, 466, 12, 1, 6 },
+ { 0x400001, 0x400001, 150, -1, 468, 12, 1, 6 },
+ { 0x600001, 0x600001, 150, -1, 470, 12, 1, 6 },
+ { 0x41, 0x41, 150, -1, 472, 6, 1, 7 },
+ { 0x8000041, 0x8000041, 150, -1, 474, 6, 1, 7 },
+ { 0x10000041, 0x10000041, 150, -1, 476, 6, 1, 7 },
+ { 0x18000041, 0x18000041, 150, -1, 478, 6, 1, 7 },
+ { 0x1, 0x1, 150, -1, 492, 12, 1, 8 },
+ { 0x200001, 0x200001, 150, -1, 494, 12, 1, 8 },
+ { 0x400001, 0x400001, 150, -1, 496, 12, 1, 8 },
+ { 0x600001, 0x600001, 150, -1, 498, 12, 1, 8 },
+ { 0x1, 0x1, 150, -1, 504, 12, 1, 15 },
+ { 0x200001, 0x200001, 150, -1, 506, 12, 1, 15 },
+ { 0x400001, 0x400001, 150, -1, 508, 12, 1, 15 },
+ { 0x600001, 0x600001, 150, -1, 510, 12, 1, 15 },
+ { 0x1, 0x1, 150, -1, 516, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 519, 12, 1, 17 },
+ { 0x200001, 0x200001, 150, -1, 521, 12, 1, 17 },
+ { 0x400001, 0x400001, 150, -1, 523, 12, 1, 17 },
+ { 0x600001, 0x600001, 150, -1, 525, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 527, 12, 1, 17 },
+ { 0x200001, 0x200001, 150, -1, 529, 12, 1, 17 },
+ { 0x400001, 0x400001, 150, -1, 531, 12, 1, 17 },
+ { 0x600001, 0x600001, 150, -1, 533, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 543, 12, 1, 18 },
+ { 0x200001, 0x200001, 150, -1, 545, 12, 1, 18 },
+ { 0x400001, 0x400001, 150, -1, 547, 12, 1, 18 },
+ { 0x600001, 0x600001, 150, -1, 549, 12, 1, 18 },
+ { 0x41, 0x41, 150, -1, 551, 6, 1, 18 },
+ { 0x8000041, 0x8000041, 150, -1, 553, 6, 1, 18 },
+ { 0x10000041, 0x10000041, 150, -1, 555, 6, 1, 18 },
+ { 0x18000041, 0x18000041, 150, -1, 557, 6, 1, 18 },
+ { 0x1, 0x1, 150, -1, 567, 12, 1, 19 },
+ { 0x200001, 0x200001, 150, -1, 569, 12, 1, 19 },
+ { 0x400001, 0x400001, 150, -1, 571, 12, 1, 19 },
+ { 0x600001, 0x600001, 150, -1, 573, 12, 1, 19 },
+ { 0x1, 0x1, 150, -1, 579, 12, 1, 20 },
+ { 0x200001, 0x200001, 150, -1, 581, 12, 1, 20 },
+ { 0x400001, 0x400001, 150, -1, 583, 12, 1, 20 },
+ { 0x600001, 0x600001, 150, -1, 585, 12, 1, 20 },
+ { 0x41, 0x41, 150, -1, 587, 6, 1, 20 },
+ { 0x8000041, 0x8000041, 150, -1, 589, 6, 1, 20 },
+ { 0x10000041, 0x10000041, 150, -1, 591, 6, 1, 20 },
+ { 0x18000041, 0x18000041, 150, -1, 593, 6, 1, 20 },
+ { 0x1, 0x1, 150, -1, 603, 12, 1, 21 },
+ { 0x200001, 0x200001, 150, -1, 605, 12, 1, 21 },
+ { 0x400001, 0x400001, 150, -1, 607, 12, 1, 21 },
+ { 0x600001, 0x600001, 150, -1, 609, 12, 1, 21 },
+ { 0x1, 0x1, 150, -1, 615, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 618, 12, 1, 17 },
+ { 0x200001, 0x200001, 150, -1, 620, 12, 1, 17 },
+ { 0x400001, 0x400001, 150, -1, 622, 12, 1, 17 },
+ { 0x600001, 0x600001, 150, -1, 624, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 626, 12, 1, 17 },
+ { 0x200001, 0x200001, 150, -1, 628, 12, 1, 17 },
+ { 0x400001, 0x400001, 150, -1, 630, 12, 1, 17 },
+ { 0x600001, 0x600001, 150, -1, 632, 12, 1, 17 },
+ { 0x1, 0x1, 150, -1, 642, 12, 1, 21 },
+ { 0x200001, 0x200001, 150, -1, 644, 12, 1, 21 },
+ { 0x400001, 0x400001, 150, -1, 646, 12, 1, 21 },
+ { 0x600001, 0x600001, 150, -1, 648, 12, 1, 21 },
{ 0x0, 0x0, 155, -1, -1, 0, 1, 124 },
+ { 0x0, 0x0, 159, 653, -1, 0, 1, 75 },
{ 0x0, 0x0, 159, 654, -1, 0, 1, 75 },
- { 0x0, 0x0, 159, 655, -1, 0, 1, 75 },
- { 0x9, 0x9, 159, -1, 1215, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1224, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1233, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1244, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1253, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1262, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1271, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1280, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1289, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1299, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1309, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1319, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1328, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1334, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1340, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1346, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1352, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1358, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1364, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1370, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1376, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1382, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1388, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1394, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1400, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1406, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1412, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1418, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1424, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1430, 32, 1, 144 },
- { 0x0, 0x0, 160, 1041, 287, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2425, 38, 1, 1 },
- { 0x0, 0x0, 160, 785, 344, 0, 0, -1 },
- { 0x0, 0x0, 160, 1042, 297, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2433, 38, 1, 1 },
- { 0x0, 0x0, 160, 787, 364, 0, 0, -1 },
- { 0x0, 0x0, 160, 788, 298, 0, 0, -1 },
- { 0x0, 0x0, 160, 789, 308, 0, 0, -1 },
- { 0x0, 0x0, 160, 1043, 311, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2445, 38, 1, 1 },
- { 0x0, 0x0, 160, 791, 368, 0, 0, -1 },
- { 0x0, 0x0, 160, -1, 321, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2451, 38, 1, 1 },
- { 0x0, 0x0, 160, 793, 388, 0, 0, -1 },
- { 0x0, 0x0, 160, 794, 322, 0, 0, -1 },
- { 0x0, 0x0, 160, 795, 332, 0, 0, -1 },
- { 0x0, 0x0, 161, 1186, 1941, 0, 0, -1 },
- { 0x0, 0x0, 161, 1187, 2474, 0, 1, 54 },
- { 0x0, 0x0, 161, 1188, 1985, 0, 0, -1 },
- { 0x1, 0x1, 161, 1189, -1, 29, 1, 49 },
- { 0x0, 0x0, 162, -1, 1951, 0, 0, -1 },
- { 0x1, 0x9, 162, -1, 2481, 33, 1, 54 },
- { 0x6, 0x7, 162, -1, 1992, 27, 1, 49 },
- { 0x0, 0x0, 163, 1175, 1949, 0, 0, -1 },
- { 0x0, 0x0, 163, 1176, 2480, 0, 1, 54 },
- { 0x1, 0x1, 163, 1177, 1991, 29, 1, 49 },
- { 0x1, 0x1, 164, 1191, -1, 27, 1, 33 },
- { 0x0, 0x0, 165, 1832, 1945, 0, 0, -1 },
- { 0x1, 0x1, 165, 1833, 2476, 33, 1, 54 },
- { 0x0, 0x0, 165, 1834, 1987, 0, 0, -1 },
- { 0x3, 0x3, 165, 1835, -1, 28, 1, 49 },
- { 0x0, 0x0, 166, 1182, 1943, 0, 0, -1 },
- { 0x1, 0x1, 166, 1183, 2475, 36, 1, 54 },
- { 0x0, 0x0, 166, 1184, 1986, 0, 0, -1 },
- { 0x5, 0x5, 166, 1185, -1, 27, 1, 49 },
- { 0x0, 0x0, 167, -1, 2457, 0, 1, 63 },
+ { 0x9, 0x9, 159, -1, 1214, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1223, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1232, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1243, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1252, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1261, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1270, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1279, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1288, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1298, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1308, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1318, 32, 1, 130 },
+ { 0x9, 0x9, 159, -1, 1327, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1333, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1339, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1345, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1351, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1357, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1363, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1369, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1375, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1381, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1387, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1393, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1399, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1405, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1411, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1417, 32, 1, 144 },
+ { 0x9, 0x9, 159, -1, 1423, 32, 1, 149 },
+ { 0x9, 0x9, 159, -1, 1429, 32, 1, 149 },
+ { 0x0, 0x0, 160, 1040, 286, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2424, 38, 1, 1 },
+ { 0x0, 0x0, 160, 784, 343, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1041, 296, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2432, 38, 1, 1 },
+ { 0x0, 0x0, 160, 786, 363, 0, 0, -1 },
+ { 0x0, 0x0, 160, 787, 297, 0, 0, -1 },
+ { 0x0, 0x0, 160, 788, 307, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1042, 310, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2444, 38, 1, 1 },
+ { 0x0, 0x0, 160, 790, 367, 0, 0, -1 },
+ { 0x0, 0x0, 160, -1, 320, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2450, 38, 1, 1 },
+ { 0x0, 0x0, 160, 792, 387, 0, 0, -1 },
+ { 0x0, 0x0, 160, 793, 321, 0, 0, -1 },
+ { 0x0, 0x0, 160, 794, 331, 0, 0, -1 },
+ { 0x0, 0x0, 161, 1185, 1940, 0, 0, -1 },
+ { 0x0, 0x0, 161, 1186, 2473, 0, 1, 54 },
+ { 0x0, 0x0, 161, 1187, 1984, 0, 0, -1 },
+ { 0x1, 0x1, 161, 1188, -1, 29, 1, 49 },
+ { 0x0, 0x0, 162, -1, 1950, 0, 0, -1 },
+ { 0x1, 0x9, 162, -1, 2480, 33, 1, 54 },
+ { 0x6, 0x7, 162, -1, 1991, 27, 1, 49 },
+ { 0x0, 0x0, 163, 1174, 1948, 0, 0, -1 },
+ { 0x0, 0x0, 163, 1175, 2479, 0, 1, 54 },
+ { 0x1, 0x1, 163, 1176, 1990, 29, 1, 49 },
+ { 0x1, 0x1, 164, 1190, -1, 27, 1, 33 },
+ { 0x0, 0x0, 165, 1831, 1944, 0, 0, -1 },
+ { 0x1, 0x1, 165, 1832, 2475, 33, 1, 54 },
+ { 0x0, 0x0, 165, 1833, 1986, 0, 0, -1 },
+ { 0x3, 0x3, 165, 1834, -1, 28, 1, 49 },
+ { 0x0, 0x0, 166, 1181, 1942, 0, 0, -1 },
+ { 0x1, 0x1, 166, 1182, 2474, 36, 1, 54 },
+ { 0x0, 0x0, 166, 1183, 1985, 0, 0, -1 },
+ { 0x5, 0x5, 166, 1184, -1, 27, 1, 49 },
+ { 0x0, 0x0, 167, -1, 2456, 0, 1, 63 },
{ 0x1, 0x1, 169, -1, -1, 28, 1, 33 },
+ { 0x1, 0x1, 170, 2314, -1, 27, 1, 33 },
{ 0x1, 0x1, 170, 2315, -1, 27, 1, 33 },
- { 0x1, 0x1, 170, 2316, -1, 27, 1, 33 },
+ { 0x1, 0x1, 171, 1459, -1, 28, 1, 135 },
{ 0x1, 0x1, 171, 1460, -1, 28, 1, 135 },
- { 0x1, 0x1, 171, 1461, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1461, -1, 28, 1, 134 },
{ 0x1, 0x1, 171, 1462, -1, 28, 1, 134 },
{ 0x1, 0x1, 171, 1463, -1, 28, 1, 134 },
{ 0x1, 0x1, 171, 1464, -1, 28, 1, 134 },
@@ -2953,263 +3005,262 @@ completer_table[] = {
{ 0x1, 0x1, 171, 1466, -1, 28, 1, 134 },
{ 0x1, 0x1, 171, 1467, -1, 28, 1, 134 },
{ 0x1, 0x1, 171, 1468, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1469, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1469, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1470, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1471, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1472, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1473, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1474, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1475, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1476, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1473, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1474, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1475, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1476, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1477, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1478, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1478, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1479, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1480, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1481, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1482, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1483, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1484, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1485, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1481, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1482, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1483, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1484, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1485, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1486, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1487, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1487, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1488, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1489, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1490, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1491, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1492, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1493, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1494, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1490, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1491, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1492, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1493, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1494, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1495, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1496, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1496, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1497, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1498, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1499, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1500, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1499, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1500, -1, 28, 1, 125 },
{ 0x1, 0x1, 171, 1501, -1, 28, 1, 125 },
- { 0x1, 0x1, 171, 1502, -1, 28, 1, 125 },
- { 0x1, 0x1, 171, 1503, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1504, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1505, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1502, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1503, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1504, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1505, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1506, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1507, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1507, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1508, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1509, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1510, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1511, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1512, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1513, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1514, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1510, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1511, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1512, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1513, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1514, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1515, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1516, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1516, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1517, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1518, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1519, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1520, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1521, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1522, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1523, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1519, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1520, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1521, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1522, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1523, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1524, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1525, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1525, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1526, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1527, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1528, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1529, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1530, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1531, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1532, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1528, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1529, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1530, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1531, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1532, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1533, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1534, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1534, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1535, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1536, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1537, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1538, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1539, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1540, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1541, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1537, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1538, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1539, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1540, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1541, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1542, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1543, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1543, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1544, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1545, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1546, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1547, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1548, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1549, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1550, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1546, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1547, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1548, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1549, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1550, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1551, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1552, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1552, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1553, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1554, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1555, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1556, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1557, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1558, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1559, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1555, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1556, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1557, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1558, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1559, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1560, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1561, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1562, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1561, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1562, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1563, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1564, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1565, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1566, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1567, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1568, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1569, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1565, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1566, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1567, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1568, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1569, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1570, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1571, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1572, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1571, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1572, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1573, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1574, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1575, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1576, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1577, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1578, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1579, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1575, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1576, -1, 28, 1, 126 },
+ { 0x1, 0x1, 171, 1577, -1, 28, 1, 127 },
+ { 0x1, 0x1, 171, 1578, -1, 28, 1, 128 },
+ { 0x1, 0x1, 171, 1579, -1, 28, 1, 124 },
{ 0x1, 0x1, 171, 1580, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1581, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1582, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1581, -1, 28, 1, 129 },
+ { 0x1, 0x1, 171, 1582, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1583, -1, 28, 1, 130 },
{ 0x1, 0x1, 171, 1584, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1585, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1586, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1587, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1588, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1589, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1590, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1591, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1592, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1585, -1, 28, 1, 124 },
+ { 0x1, 0x1, 171, 1586, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1587, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1588, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1589, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1590, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1591, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1592, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1593, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1594, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1595, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1596, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1597, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1598, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1599, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1600, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1601, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1602, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1603, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1604, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1605, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1606, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1607, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1608, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1609, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1610, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1594, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1595, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1596, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1597, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1598, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1599, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1600, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1601, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1602, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1603, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1604, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1605, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1606, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1607, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1608, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1609, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1610, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1611, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1612, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1613, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1614, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1615, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1616, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1617, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1618, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1619, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1620, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1621, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1622, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1623, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1624, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1625, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1626, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1627, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1628, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1612, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1613, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1614, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1615, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1616, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1617, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1618, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1619, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1620, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1621, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1622, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1623, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1624, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1625, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1626, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1627, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1628, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1629, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1630, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1631, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1632, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1633, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1634, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1635, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1636, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1637, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1638, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1639, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1640, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1641, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1642, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1643, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1644, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1645, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1646, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1630, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1631, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1632, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1633, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1634, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1635, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1636, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1637, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1638, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1639, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1640, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1641, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1642, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1643, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1644, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1645, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1646, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1647, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1648, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1649, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1650, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1651, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1652, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1653, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1654, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1655, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1656, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1657, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1658, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1648, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1649, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1650, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1651, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1652, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1653, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1654, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1655, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1656, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1657, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1658, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1659, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1660, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1661, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1662, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1663, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1664, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1665, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1666, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1667, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1668, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1669, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1670, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1660, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1661, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1662, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1663, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1664, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1665, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1666, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1667, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1668, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1669, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1670, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1671, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1672, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1673, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1674, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1675, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1676, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1677, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1678, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1679, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1680, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1681, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1682, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1672, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1673, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1674, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1675, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1676, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1677, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1678, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1679, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1680, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1681, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1682, -1, 28, 1, 144 },
{ 0x1, 0x1, 171, 1683, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1684, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1685, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1686, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1687, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1688, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1689, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1690, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1691, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1692, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1693, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1694, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1695, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1696, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1697, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1448, -1, 28, 1, 146 },
- { 0x1, 0x1, 171, 1449, -1, 28, 1, 147 },
- { 0x1, 0x1, 171, 1450, -1, 28, 1, 147 },
- { 0x1, 0x1, 171, 1451, -1, 28, 1, 146 },
- { 0x1, 0x1, 171, 1452, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1453, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1454, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1455, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1456, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1457, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1458, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1459, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1684, -1, 28, 1, 140 },
+ { 0x1, 0x1, 171, 1685, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1686, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1687, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1688, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1689, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1690, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1691, -1, 28, 1, 146 },
+ { 0x1, 0x1, 171, 1692, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1693, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1694, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1695, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1696, -1, 28, 1, 145 },
+ { 0x1, 0x1, 171, 1447, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1448, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1449, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1450, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1451, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1452, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1453, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1454, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1455, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1456, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1457, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1458, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1739, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1740, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1741, -1, 28, 1, 136 },
{ 0x1, 0x1, 171, 1742, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1743, -1, 28, 1, 136 },
- { 0x1, 0x1, 172, 1698, -1, 29, 1, 146 },
- { 0x1, 0x1, 172, 1699, -1, 29, 1, 147 },
- { 0x1, 0x1, 172, 1700, -1, 29, 1, 147 },
- { 0x1, 0x1, 172, 1701, -1, 29, 1, 146 },
- { 0x1, 0x1, 172, 1702, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1703, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1704, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1705, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1706, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1707, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1708, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1709, -1, 29, 1, 148 },
+ { 0x1, 0x1, 172, 1697, -1, 29, 1, 151 },
+ { 0x1, 0x1, 172, 1698, -1, 29, 1, 152 },
+ { 0x1, 0x1, 172, 1699, -1, 29, 1, 152 },
+ { 0x1, 0x1, 172, 1700, -1, 29, 1, 151 },
+ { 0x1, 0x1, 172, 1701, -1, 29, 1, 153 },
+ { 0x1, 0x1, 172, 1702, -1, 29, 1, 154 },
+ { 0x1, 0x1, 172, 1703, -1, 29, 1, 154 },
+ { 0x1, 0x1, 172, 1704, -1, 29, 1, 153 },
+ { 0x1, 0x1, 172, 1705, -1, 29, 1, 153 },
+ { 0x1, 0x1, 172, 1706, -1, 29, 1, 154 },
+ { 0x1, 0x1, 172, 1707, -1, 29, 1, 154 },
+ { 0x1, 0x1, 172, 1708, -1, 29, 1, 153 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
@@ -3230,7 +3281,16 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 261, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 260, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 1889, -1, 28, 1, 124 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 262, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1890, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3239,27 +3299,27 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 263, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 264, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1891, -1, 28, 1, 124 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 125 },
+ { 0x3, 0x3, 173, 266, -1, 28, 1, 125 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 265, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 267, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1892, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 125 },
- { 0x3, 0x3, 173, 267, -1, 28, 1, 125 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 268, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 269, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1893, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3268,7 +3328,7 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 270, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 271, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1894, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3277,7 +3337,7 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 272, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 273, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1895, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3286,7 +3346,7 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 274, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 275, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1896, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3295,7 +3355,7 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 276, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 277, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1897, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3303,8 +3363,9 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 278, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 279, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1898, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3314,7 +3375,7 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 280, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 281, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1899, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
@@ -3324,214 +3385,204 @@ completer_table[] = {
{ 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 282, -1, 28, 1, 130 },
+ { 0x3, 0x3, 173, 283, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
{ 0x3, 0x3, 173, 1900, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 284, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1901, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1902, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1903, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, 1901, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1902, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1903, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1904, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1905, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1906, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1905, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1906, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1907, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1908, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1909, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1908, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1909, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1910, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1911, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1911, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1912, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1913, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1913, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1914, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1915, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1915, -1, 28, 1, 145 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
{ 0x3, 0x3, 173, 1916, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1917, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1918, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1919, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
- { 0x3, 0x3, 173, 803, -1, 28, 1, 147 },
- { 0x3, 0x3, 173, 804, -1, 28, 1, 146 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 805, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 806, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1917, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 807, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 808, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, 1918, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, 802, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, 803, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, 804, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, 805, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, 806, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, 807, -1, 28, 1, 153 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1857, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, 1856, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1858, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, 1857, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 132 },
- { 0x3, 0x3, 173, 1859, -1, 28, 1, 132 },
+ { 0x3, 0x3, 173, 1858, -1, 28, 1, 132 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1860, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, 1859, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1861, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, 1860, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1862, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, 1861, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1863, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, 1862, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
- { 0x3, 0x3, 173, 1864, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, 1863, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 139 },
- { 0x3, 0x3, 173, 1865, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, 1864, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x0, 0x0, 174, -1, 335, 0, 0, -1 },
- { 0x0, 0x0, 174, 2514, 2483, 0, 1, 1 },
- { 0x0, 0x0, 174, -1, 339, 0, 0, -1 },
- { 0x0, 0x0, 174, 2516, 2485, 0, 1, 1 },
- { 0x11, 0x31, 175, 2417, 342, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 343, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 346, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 347, 12, 1, 4 },
- { 0x11, 0x11, 175, -1, 348, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 349, 12, 1, 4 },
- { 0x1, 0x1, 175, 1778, 350, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 352, 12, 1, 4 },
- { 0x11, 0x11, 175, 1780, 354, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 356, 12, 1, 4 },
- { 0x11, 0x31, 175, 2427, 362, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 363, 12, 1, 4 },
- { 0x11, 0x31, 175, 2437, 366, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 367, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 370, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 371, 12, 1, 4 },
- { 0x11, 0x11, 175, -1, 372, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 373, 12, 1, 4 },
- { 0x1, 0x1, 175, 1802, 374, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 376, 12, 1, 4 },
- { 0x11, 0x11, 175, 1804, 378, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 380, 12, 1, 4 },
- { 0x11, 0x31, 175, 2447, 386, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 387, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 390, 33, 1, 4 },
- { 0x200001, 0x200001, 175, -1, 391, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 394, 33, 1, 4 },
- { 0x200001, 0x200001, 175, -1, 395, 12, 1, 4 },
+ { 0x0, 0x0, 174, -1, 334, 0, 0, -1 },
+ { 0x0, 0x0, 174, 2513, 2482, 0, 1, 1 },
+ { 0x0, 0x0, 174, -1, 338, 0, 0, -1 },
+ { 0x0, 0x0, 174, 2515, 2484, 0, 1, 1 },
+ { 0x11, 0x31, 175, 2416, 341, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 342, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 345, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 346, 12, 1, 4 },
+ { 0x11, 0x11, 175, -1, 347, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 348, 12, 1, 4 },
+ { 0x1, 0x1, 175, 1777, 349, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 351, 12, 1, 4 },
+ { 0x11, 0x11, 175, 1779, 353, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 355, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2426, 361, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 362, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2436, 365, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 366, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 369, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 370, 12, 1, 4 },
+ { 0x11, 0x11, 175, -1, 371, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 372, 12, 1, 4 },
+ { 0x1, 0x1, 175, 1801, 373, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 375, 12, 1, 4 },
+ { 0x11, 0x11, 175, 1803, 377, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 379, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2446, 385, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 386, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 389, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 390, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 393, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 394, 12, 1, 4 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
- { 0x1, 0x1, 176, 1755, -1, 37, 1, 4 },
+ { 0x1, 0x1, 176, 1754, -1, 37, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
- { 0x11, 0x11, 176, 1757, -1, 33, 1, 4 },
+ { 0x11, 0x11, 176, 1756, -1, 33, 1, 4 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x11, 0x11, 176, -1, -1, 33, 1, 4 },
@@ -3553,9 +3604,9 @@ completer_table[] = {
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
- { 0x1, 0x1, 176, 1767, -1, 37, 1, 4 },
+ { 0x1, 0x1, 176, 1766, -1, 37, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
- { 0x11, 0x11, 176, 1769, -1, 33, 1, 4 },
+ { 0x11, 0x11, 176, 1768, -1, 33, 1, 4 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x11, 0x11, 176, -1, -1, 33, 1, 4 },
@@ -3575,433 +3626,433 @@ completer_table[] = {
{ 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
{ 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
- { 0x1, 0x1, 176, 336, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, 335, -1, 33, 1, 4 },
{ 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
- { 0x200001, 0x200001, 176, 337, -1, 12, 1, 4 },
+ { 0x200001, 0x200001, 176, 336, -1, 12, 1, 4 },
{ 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
- { 0x1, 0x1, 176, 340, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, 339, -1, 33, 1, 4 },
{ 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
- { 0x200001, 0x200001, 176, 341, -1, 12, 1, 4 },
- { 0x0, 0x0, 177, -1, 1947, 0, 0, -1 },
- { 0x9, 0x9, 177, -1, 2477, 33, 1, 49 },
- { 0x0, 0x0, 177, -1, 1988, 0, 0, -1 },
+ { 0x200001, 0x200001, 176, 340, -1, 12, 1, 4 },
+ { 0x0, 0x0, 177, -1, 1946, 0, 0, -1 },
+ { 0x9, 0x9, 177, -1, 2476, 33, 1, 49 },
+ { 0x0, 0x0, 177, -1, 1987, 0, 0, -1 },
{ 0x7, 0x7, 177, -1, -1, 27, 1, 49 },
{ 0x1, 0x1, 197, -1, -1, 27, 1, 10 },
{ 0x1, 0x1, 211, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 211, -1, -1, 29, 1, 0 },
- { 0x2, 0x3, 211, 987, -1, 27, 1, 33 },
- { 0x0, 0x0, 211, 988, -1, 0, 1, 33 },
+ { 0x2, 0x3, 211, 986, -1, 27, 1, 33 },
+ { 0x0, 0x0, 211, 987, -1, 0, 1, 33 },
+ { 0x0, 0x0, 211, 988, -1, 0, 1, 0 },
{ 0x0, 0x0, 211, 989, -1, 0, 1, 0 },
{ 0x0, 0x0, 211, 990, -1, 0, 1, 0 },
{ 0x0, 0x0, 211, 991, -1, 0, 1, 0 },
- { 0x0, 0x0, 211, 992, -1, 0, 1, 0 },
+ { 0x0, 0x0, 211, 2498, -1, 0, 1, 93 },
{ 0x0, 0x0, 211, 2499, -1, 0, 1, 93 },
- { 0x0, 0x0, 211, 2500, -1, 0, 1, 93 },
- { 0x0, 0x0, 211, 2501, 819, 0, 0, -1 },
+ { 0x0, 0x0, 211, 2500, 818, 0, 0, -1 },
{ 0x1, 0x1, 212, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 212, -1, -1, 27, 1, 0 },
- { 0x1, 0x1, 213, -1, 1195, 32, 1, 135 },
- { 0x1, 0x1, 213, -1, 1197, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1199, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1201, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1203, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1205, 32, 1, 136 },
- { 0x1, 0x1, 213, -1, 1207, 32, 1, 136 },
- { 0x1, 0x1, 213, -1, 1710, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1712, 32, 1, 138 },
- { 0x1, 0x1, 213, -1, 1714, 32, 1, 132 },
- { 0x1, 0x1, 213, -1, 1716, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1718, 32, 1, 138 },
- { 0x1, 0x1, 213, -1, 1720, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1722, 32, 1, 138 },
- { 0x1, 0x1, 213, 2319, 1724, 32, 1, 131 },
- { 0x1, 0x1, 213, 2320, 1727, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1194, 32, 1, 135 },
+ { 0x1, 0x1, 213, -1, 1196, 32, 1, 134 },
+ { 0x1, 0x1, 213, -1, 1198, 32, 1, 134 },
+ { 0x1, 0x1, 213, -1, 1200, 32, 1, 134 },
+ { 0x1, 0x1, 213, -1, 1202, 32, 1, 134 },
+ { 0x1, 0x1, 213, -1, 1204, 32, 1, 136 },
+ { 0x1, 0x1, 213, -1, 1206, 32, 1, 136 },
+ { 0x1, 0x1, 213, -1, 1709, 32, 1, 131 },
+ { 0x1, 0x1, 213, -1, 1711, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1713, 32, 1, 132 },
+ { 0x1, 0x1, 213, -1, 1715, 32, 1, 131 },
+ { 0x1, 0x1, 213, -1, 1717, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1719, 32, 1, 131 },
+ { 0x1, 0x1, 213, -1, 1721, 32, 1, 138 },
+ { 0x1, 0x1, 213, 2318, 1723, 32, 1, 131 },
+ { 0x1, 0x1, 213, 2319, 1726, 32, 1, 138 },
+ { 0x0, 0x0, 214, -1, 2360, 0, 0, -1 },
{ 0x0, 0x0, 214, -1, 2361, 0, 0, -1 },
- { 0x0, 0x0, 214, -1, 2362, 0, 0, -1 },
- { 0x0, 0x0, 214, -1, 2387, 0, 0, -1 },
- { 0x5, 0x5, 214, -1, 2390, 20, 1, 67 },
- { 0x0, 0x0, 218, 1847, 818, 0, 0, -1 },
- { 0x0, 0x0, 219, -1, 957, 0, 0, -1 },
- { 0x0, 0x0, 219, -1, 1048, 0, 0, -1 },
+ { 0x0, 0x0, 214, -1, 2386, 0, 0, -1 },
+ { 0x5, 0x5, 214, -1, 2389, 20, 1, 67 },
+ { 0x0, 0x0, 218, 1846, 817, 0, 0, -1 },
+ { 0x0, 0x0, 219, -1, 956, 0, 0, -1 },
+ { 0x0, 0x0, 219, -1, 1047, 0, 0, -1 },
{ 0x0, 0x0, 219, -1, -1, 0, 1, 121 },
{ 0x0, 0x0, 219, -1, -1, 0, 1, 66 },
- { 0x1, 0x1, 219, 694, 1921, 36, 1, 65 },
- { 0x1, 0x1, 219, 695, 1956, 36, 1, 65 },
- { 0x0, 0x0, 219, 696, 1959, 0, 0, -1 },
- { 0x1, 0x1, 219, 697, -1, 36, 1, 65 },
+ { 0x1, 0x1, 219, 693, 1920, 36, 1, 65 },
+ { 0x1, 0x1, 219, 694, 1955, 36, 1, 65 },
+ { 0x0, 0x0, 219, 695, 1958, 0, 0, -1 },
+ { 0x1, 0x1, 219, 696, -1, 36, 1, 65 },
+ { 0x0, 0x0, 219, 1191, -1, 0, 1, 33 },
+ { 0x1, 0x1, 219, 697, 1963, 36, 1, 65 },
+ { 0x0, 0x0, 219, 698, 1966, 0, 0, -1 },
+ { 0x1, 0x1, 219, 699, -1, 36, 1, 65 },
+ { 0x0, 0x0, 219, 700, 1969, 0, 0, -1 },
+ { 0x1, 0x1, 219, 701, -1, 36, 1, 65 },
+ { 0x1, 0x1, 219, 702, 1972, 36, 1, 65 },
+ { 0x1, 0x1, 219, 703, 1975, 36, 1, 65 },
{ 0x0, 0x0, 219, 1192, -1, 0, 1, 33 },
- { 0x1, 0x1, 219, 698, 1964, 36, 1, 65 },
- { 0x0, 0x0, 219, 699, 1967, 0, 0, -1 },
- { 0x1, 0x1, 219, 700, -1, 36, 1, 65 },
- { 0x0, 0x0, 219, 701, 1970, 0, 0, -1 },
- { 0x1, 0x1, 219, 702, -1, 36, 1, 65 },
- { 0x1, 0x1, 219, 703, 1973, 36, 1, 65 },
- { 0x1, 0x1, 219, 704, 1976, 36, 1, 65 },
- { 0x0, 0x0, 219, 1193, -1, 0, 1, 33 },
- { 0x1, 0x1, 219, 705, 2009, 36, 1, 65 },
- { 0x1, 0x1, 219, 706, -1, 31, 1, 137 },
- { 0x1, 0x1, 219, 223, 1208, 32, 1, 126 },
- { 0x1, 0x1, 219, 224, 1217, 32, 1, 126 },
- { 0x1, 0x1, 219, 225, 1226, 32, 1, 126 },
- { 0x1, 0x1, 219, 226, 1237, 32, 1, 126 },
- { 0x1, 0x1, 219, 227, 1246, 32, 1, 126 },
- { 0x1, 0x1, 219, 228, 1255, 32, 1, 126 },
- { 0x1, 0x1, 219, 229, 1264, 32, 1, 126 },
- { 0x1, 0x1, 219, 230, 1273, 32, 1, 126 },
- { 0x1, 0x1, 219, 231, 1282, 32, 1, 126 },
- { 0x1, 0x1, 219, 232, 1291, 32, 1, 126 },
- { 0x1, 0x1, 219, 233, 1301, 32, 1, 126 },
- { 0x1, 0x1, 219, 234, 1311, 32, 1, 126 },
- { 0x1, 0x1, 219, 235, 1324, 32, 1, 141 },
- { 0x1, 0x1, 219, 236, 1330, 32, 1, 141 },
- { 0x1, 0x1, 219, 237, 1336, 32, 1, 141 },
- { 0x1, 0x1, 219, 238, 1342, 32, 1, 141 },
- { 0x1, 0x1, 219, 239, 1348, 32, 1, 141 },
- { 0x1, 0x1, 219, 240, 1354, 32, 1, 141 },
- { 0x1, 0x1, 219, 241, 1360, 32, 1, 141 },
- { 0x1, 0x1, 219, 242, 1366, 32, 1, 141 },
- { 0x1, 0x1, 219, 243, 1372, 32, 1, 141 },
- { 0x1, 0x1, 219, 244, 1378, 32, 1, 141 },
- { 0x1, 0x1, 219, 245, 1384, 32, 1, 141 },
- { 0x1, 0x1, 219, 246, 1390, 32, 1, 141 },
- { 0x1, 0x1, 219, 247, 1396, 32, 1, 141 },
- { 0x1, 0x1, 219, 248, 1402, 32, 1, 141 },
- { 0x1, 0x1, 219, 249, 1408, 32, 1, 141 },
- { 0x1, 0x1, 219, 250, 1414, 32, 1, 141 },
- { 0x1, 0x1, 219, 251, 1420, 32, 1, 141 },
- { 0x1, 0x1, 219, 252, 1426, 32, 1, 141 },
- { 0x1, 0x1, 219, 710, -1, 31, 1, 150 },
- { 0x0, 0x0, 220, 2012, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2013, -1, 0, 1, 28 },
+ { 0x1, 0x1, 219, 704, 2008, 36, 1, 65 },
+ { 0x1, 0x1, 219, 705, -1, 31, 1, 137 },
+ { 0x1, 0x1, 219, 222, 1207, 32, 1, 126 },
+ { 0x1, 0x1, 219, 223, 1216, 32, 1, 126 },
+ { 0x1, 0x1, 219, 224, 1225, 32, 1, 126 },
+ { 0x1, 0x1, 219, 225, 1236, 32, 1, 126 },
+ { 0x1, 0x1, 219, 226, 1245, 32, 1, 126 },
+ { 0x1, 0x1, 219, 227, 1254, 32, 1, 126 },
+ { 0x1, 0x1, 219, 228, 1263, 32, 1, 126 },
+ { 0x1, 0x1, 219, 229, 1272, 32, 1, 126 },
+ { 0x1, 0x1, 219, 230, 1281, 32, 1, 126 },
+ { 0x1, 0x1, 219, 231, 1290, 32, 1, 126 },
+ { 0x1, 0x1, 219, 232, 1300, 32, 1, 126 },
+ { 0x1, 0x1, 219, 233, 1310, 32, 1, 126 },
+ { 0x1, 0x1, 219, 234, 1323, 32, 1, 141 },
+ { 0x1, 0x1, 219, 235, 1329, 32, 1, 146 },
+ { 0x1, 0x1, 219, 236, 1335, 32, 1, 146 },
+ { 0x1, 0x1, 219, 237, 1341, 32, 1, 141 },
+ { 0x1, 0x1, 219, 238, 1347, 32, 1, 146 },
+ { 0x1, 0x1, 219, 239, 1353, 32, 1, 146 },
+ { 0x1, 0x1, 219, 240, 1359, 32, 1, 141 },
+ { 0x1, 0x1, 219, 241, 1365, 32, 1, 146 },
+ { 0x1, 0x1, 219, 242, 1371, 32, 1, 146 },
+ { 0x1, 0x1, 219, 243, 1377, 32, 1, 141 },
+ { 0x1, 0x1, 219, 244, 1383, 32, 1, 146 },
+ { 0x1, 0x1, 219, 245, 1389, 32, 1, 141 },
+ { 0x1, 0x1, 219, 246, 1395, 32, 1, 146 },
+ { 0x1, 0x1, 219, 247, 1401, 32, 1, 141 },
+ { 0x1, 0x1, 219, 248, 1407, 32, 1, 146 },
+ { 0x1, 0x1, 219, 249, 1413, 32, 1, 141 },
+ { 0x1, 0x1, 219, 250, 1419, 32, 1, 146 },
+ { 0x1, 0x1, 219, 251, 1425, 32, 1, 146 },
+ { 0x1, 0x1, 219, 709, -1, 31, 1, 155 },
+ { 0x0, 0x0, 220, 2011, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2012, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 24, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2014, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2015, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2016, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2017, -1, 0, 1, 44 },
- { 0x0, 0x0, 220, 2018, -1, 0, 1, 39 },
- { 0x1, 0x1, 220, 2019, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2020, -1, 0, 1, 53 },
- { 0x1000001, 0x1000001, 220, 2021, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2022, -1, 36, 1, 53 },
- { 0x200001, 0x200001, 220, 2023, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2024, -1, 33, 1, 53 },
- { 0x1200001, 0x1200001, 220, 2025, -1, 12, 1, 48 },
- { 0x9, 0x9, 220, 2026, -1, 33, 1, 48 },
- { 0x1, 0x1, 220, 2027, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2028, -1, 0, 1, 53 },
- { 0x200001, 0x1200001, 220, 2029, -1, 12, 1, 58 },
- { 0x1, 0x9, 220, 2030, -1, 33, 1, 53 },
- { 0x1, 0x1, 220, 2031, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2032, -1, 0, 1, 53 },
- { 0x1000001, 0x1000001, 220, 2033, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2034, -1, 36, 1, 53 },
- { 0x200001, 0x200001, 220, 2035, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2036, -1, 33, 1, 53 },
- { 0x1200001, 0x1200001, 220, 2037, -1, 12, 1, 48 },
- { 0x9, 0x9, 220, 2038, -1, 33, 1, 48 },
- { 0x1, 0x1, 220, 2039, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2040, -1, 0, 1, 53 },
- { 0x200001, 0x1200001, 220, 2041, -1, 12, 1, 58 },
- { 0x1, 0x9, 220, 2042, -1, 33, 1, 53 },
- { 0x1, 0x1, 220, 2043, -1, 28, 1, 28 },
- { 0x0, 0x0, 220, 2044, -1, 0, 1, 28 },
- { 0x3, 0x3, 220, 2045, -1, 27, 1, 28 },
- { 0x1, 0x1, 220, 2046, -1, 27, 1, 28 },
- { 0x0, 0x0, 220, 2047, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2016, -1, 0, 1, 44 },
+ { 0x0, 0x0, 220, 2017, -1, 0, 1, 39 },
+ { 0x1, 0x1, 220, 2018, -1, 12, 1, 58 },
+ { 0x0, 0x0, 220, 2019, -1, 0, 1, 53 },
+ { 0x1000001, 0x1000001, 220, 2020, -1, 12, 1, 58 },
+ { 0x1, 0x1, 220, 2021, -1, 36, 1, 53 },
+ { 0x200001, 0x200001, 220, 2022, -1, 12, 1, 58 },
+ { 0x1, 0x1, 220, 2023, -1, 33, 1, 53 },
+ { 0x1200001, 0x1200001, 220, 2024, -1, 12, 1, 48 },
+ { 0x9, 0x9, 220, 2025, -1, 33, 1, 48 },
+ { 0x1, 0x1, 220, 2026, -1, 12, 1, 58 },
+ { 0x0, 0x0, 220, 2027, -1, 0, 1, 53 },
+ { 0x200001, 0x1200001, 220, 2028, -1, 12, 1, 58 },
+ { 0x1, 0x9, 220, 2029, -1, 33, 1, 53 },
+ { 0x1, 0x1, 220, 2030, -1, 12, 1, 58 },
+ { 0x0, 0x0, 220, 2031, -1, 0, 1, 53 },
+ { 0x1000001, 0x1000001, 220, 2032, -1, 12, 1, 58 },
+ { 0x1, 0x1, 220, 2033, -1, 36, 1, 53 },
+ { 0x200001, 0x200001, 220, 2034, -1, 12, 1, 58 },
+ { 0x1, 0x1, 220, 2035, -1, 33, 1, 53 },
+ { 0x1200001, 0x1200001, 220, 2036, -1, 12, 1, 48 },
+ { 0x9, 0x9, 220, 2037, -1, 33, 1, 48 },
+ { 0x1, 0x1, 220, 2038, -1, 12, 1, 58 },
+ { 0x0, 0x0, 220, 2039, -1, 0, 1, 53 },
+ { 0x200001, 0x1200001, 220, 2040, -1, 12, 1, 58 },
+ { 0x1, 0x9, 220, 2041, -1, 33, 1, 53 },
+ { 0x1, 0x1, 220, 2042, -1, 28, 1, 28 },
+ { 0x0, 0x0, 220, 2043, -1, 0, 1, 28 },
+ { 0x3, 0x3, 220, 2044, -1, 27, 1, 28 },
+ { 0x1, 0x1, 220, 2045, -1, 27, 1, 28 },
+ { 0x0, 0x0, 220, 2046, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2047, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2048, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2049, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2050, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2051, -1, 37, 1, 28 },
+ { 0x1, 0x1, 220, 2049, -1, 36, 1, 65 },
+ { 0x1, 0x1, 220, 2050, -1, 37, 1, 28 },
+ { 0x0, 0x0, 220, 2051, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2052, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2053, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2054, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2055, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2056, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2054, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2055, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 36, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2058, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2059, -1, 37, 1, 28 },
- { 0x0, 0x0, 220, 2060, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2061, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2062, -1, 37, 1, 28 },
- { 0x0, 0x0, 220, 2063, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2064, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2065, -1, 0, 1, 28 },
+ { 0x1, 0x1, 220, 2057, -1, 36, 1, 65 },
+ { 0x1, 0x1, 220, 2058, -1, 37, 1, 28 },
+ { 0x0, 0x0, 220, 2059, -1, 0, 1, 28 },
+ { 0x1, 0x1, 220, 2060, -1, 36, 1, 65 },
+ { 0x1, 0x1, 220, 2061, -1, 37, 1, 28 },
+ { 0x0, 0x0, 220, 2062, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2063, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2064, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 41, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2067, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2068, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2066, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2067, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 42, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2069, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2070, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2071, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2072, -1, 0, 1, 48 },
- { 0x1, 0x1, 220, 2073, -1, 27, 1, 48 },
- { 0x1, 0x1, 220, 2074, -1, 28, 1, 48 },
- { 0x3, 0x3, 220, 2075, -1, 27, 1, 48 },
- { 0x1, 0x1, 220, 2076, -1, 29, 1, 48 },
- { 0x5, 0x5, 220, 2077, -1, 27, 1, 48 },
- { 0x3, 0x3, 220, 2078, -1, 28, 1, 48 },
- { 0x7, 0x7, 220, 2079, -1, 27, 1, 48 },
+ { 0x0, 0x0, 220, 2071, -1, 0, 1, 48 },
+ { 0x1, 0x1, 220, 2072, -1, 27, 1, 48 },
+ { 0x1, 0x1, 220, 2073, -1, 28, 1, 48 },
+ { 0x3, 0x3, 220, 2074, -1, 27, 1, 48 },
+ { 0x1, 0x1, 220, 2075, -1, 29, 1, 48 },
+ { 0x5, 0x5, 220, 2076, -1, 27, 1, 48 },
+ { 0x3, 0x3, 220, 2077, -1, 28, 1, 48 },
+ { 0x7, 0x7, 220, 2078, -1, 27, 1, 48 },
+ { 0x0, 0x0, 220, 2079, -1, 0, 1, 48 },
{ 0x0, 0x0, 220, 2080, -1, 0, 1, 48 },
{ 0x0, 0x0, 220, 2081, -1, 0, 1, 48 },
{ 0x0, 0x0, 220, 2082, -1, 0, 1, 48 },
- { 0x0, 0x0, 220, 2083, -1, 0, 1, 48 },
- { 0x1, 0x1, 220, 2084, -1, 28, 1, 28 },
- { 0x0, 0x0, 220, 2085, -1, 0, 1, 28 },
- { 0x3, 0x3, 220, 2086, -1, 27, 1, 28 },
- { 0x1, 0x1, 220, 2087, -1, 27, 1, 28 },
+ { 0x1, 0x1, 220, 2083, -1, 28, 1, 28 },
+ { 0x0, 0x0, 220, 2084, -1, 0, 1, 28 },
+ { 0x3, 0x3, 220, 2085, -1, 27, 1, 28 },
+ { 0x1, 0x1, 220, 2086, -1, 27, 1, 28 },
+ { 0x0, 0x0, 220, 2087, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2088, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2089, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2090, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 51, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2091, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 2092, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2093, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 56, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2094, -1, 0, 1, 23 },
{ 0x0, 0x0, 220, 2095, -1, 0, 1, 23 },
{ 0x0, 0x0, 220, 2096, -1, 0, 1, 23 },
{ 0x0, 0x0, 220, 2097, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2098, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2099, -1, 0, 1, 34 },
- { 0x0, 0x0, 220, 2100, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2101, -1, 0, 1, 28 },
+ { 0x0, 0x0, 220, 2098, -1, 0, 1, 34 },
+ { 0x0, 0x0, 220, 2099, -1, 0, 1, 65 },
+ { 0x0, 0x0, 220, 2100, -1, 0, 1, 28 },
{ 0x0, 0x0, 220, 63, -1, 0, 1, 28 },
- { 0x1, 0x1, 221, 2103, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2102, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2103, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2104, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2105, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2106, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2107, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2108, -1, 34, 1, 45 },
- { 0x1, 0x1, 221, 2109, -1, 34, 1, 41 },
- { 0x400001, 0x400001, 221, 2110, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2111, -1, 34, 1, 55 },
- { 0x1400001, 0x1400001, 221, 2112, -1, 12, 1, 60 },
- { 0x5, 0x5, 221, 2113, -1, 34, 1, 55 },
- { 0x600001, 0x600001, 221, 2114, -1, 12, 1, 60 },
- { 0x3, 0x3, 221, 2115, -1, 33, 1, 55 },
- { 0x1600001, 0x1600001, 221, 2116, -1, 12, 1, 50 },
- { 0xb, 0xb, 221, 2117, -1, 33, 1, 50 },
- { 0x400001, 0x400001, 221, 2118, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2119, -1, 34, 1, 55 },
- { 0x600001, 0x1600001, 221, 2120, -1, 12, 1, 60 },
- { 0x3, 0xb, 221, 2121, -1, 33, 1, 55 },
- { 0x400001, 0x400001, 221, 2122, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2123, -1, 34, 1, 55 },
- { 0x1400001, 0x1400001, 221, 2124, -1, 12, 1, 60 },
- { 0x5, 0x5, 221, 2125, -1, 34, 1, 55 },
- { 0x600001, 0x600001, 221, 2126, -1, 12, 1, 60 },
- { 0x3, 0x3, 221, 2127, -1, 33, 1, 55 },
- { 0x1600001, 0x1600001, 221, 2128, -1, 12, 1, 50 },
- { 0xb, 0xb, 221, 2129, -1, 33, 1, 50 },
- { 0x400001, 0x400001, 221, 2130, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2131, -1, 34, 1, 55 },
- { 0x600001, 0x1600001, 221, 2132, -1, 12, 1, 60 },
- { 0x3, 0xb, 221, 2133, -1, 33, 1, 55 },
- { 0x41, 0x41, 221, 2134, -1, 28, 1, 30 },
- { 0x1, 0x1, 221, 2135, -1, 34, 1, 30 },
- { 0x83, 0x83, 221, 2136, -1, 27, 1, 30 },
- { 0x81, 0x81, 221, 2137, -1, 27, 1, 30 },
- { 0x1, 0x1, 221, 2138, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2107, -1, 34, 1, 45 },
+ { 0x1, 0x1, 221, 2108, -1, 34, 1, 41 },
+ { 0x400001, 0x400001, 221, 2109, -1, 12, 1, 60 },
+ { 0x1, 0x1, 221, 2110, -1, 34, 1, 55 },
+ { 0x1400001, 0x1400001, 221, 2111, -1, 12, 1, 60 },
+ { 0x5, 0x5, 221, 2112, -1, 34, 1, 55 },
+ { 0x600001, 0x600001, 221, 2113, -1, 12, 1, 60 },
+ { 0x3, 0x3, 221, 2114, -1, 33, 1, 55 },
+ { 0x1600001, 0x1600001, 221, 2115, -1, 12, 1, 50 },
+ { 0xb, 0xb, 221, 2116, -1, 33, 1, 50 },
+ { 0x400001, 0x400001, 221, 2117, -1, 12, 1, 60 },
+ { 0x1, 0x1, 221, 2118, -1, 34, 1, 55 },
+ { 0x600001, 0x1600001, 221, 2119, -1, 12, 1, 60 },
+ { 0x3, 0xb, 221, 2120, -1, 33, 1, 55 },
+ { 0x400001, 0x400001, 221, 2121, -1, 12, 1, 60 },
+ { 0x1, 0x1, 221, 2122, -1, 34, 1, 55 },
+ { 0x1400001, 0x1400001, 221, 2123, -1, 12, 1, 60 },
+ { 0x5, 0x5, 221, 2124, -1, 34, 1, 55 },
+ { 0x600001, 0x600001, 221, 2125, -1, 12, 1, 60 },
+ { 0x3, 0x3, 221, 2126, -1, 33, 1, 55 },
+ { 0x1600001, 0x1600001, 221, 2127, -1, 12, 1, 50 },
+ { 0xb, 0xb, 221, 2128, -1, 33, 1, 50 },
+ { 0x400001, 0x400001, 221, 2129, -1, 12, 1, 60 },
+ { 0x1, 0x1, 221, 2130, -1, 34, 1, 55 },
+ { 0x600001, 0x1600001, 221, 2131, -1, 12, 1, 60 },
+ { 0x3, 0xb, 221, 2132, -1, 33, 1, 55 },
+ { 0x41, 0x41, 221, 2133, -1, 28, 1, 30 },
+ { 0x1, 0x1, 221, 2134, -1, 34, 1, 30 },
+ { 0x83, 0x83, 221, 2135, -1, 27, 1, 30 },
+ { 0x81, 0x81, 221, 2136, -1, 27, 1, 30 },
+ { 0x1, 0x1, 221, 2137, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2138, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2139, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2140, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2141, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2142, -1, 34, 1, 30 },
+ { 0x5, 0x5, 221, 2140, -1, 34, 1, 65 },
+ { 0x9, 0x9, 221, 2141, -1, 34, 1, 30 },
+ { 0x1, 0x1, 221, 2142, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2143, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2144, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2145, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2146, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2145, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2146, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2147, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2148, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2149, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2150, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2151, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2152, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2153, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2154, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2155, -1, 34, 1, 65 },
+ { 0x5, 0x5, 221, 2148, -1, 34, 1, 65 },
+ { 0x9, 0x9, 221, 2149, -1, 34, 1, 30 },
+ { 0x1, 0x1, 221, 2150, -1, 34, 1, 30 },
+ { 0x5, 0x5, 221, 2151, -1, 34, 1, 65 },
+ { 0x9, 0x9, 221, 2152, -1, 34, 1, 30 },
+ { 0x1, 0x1, 221, 2153, -1, 34, 1, 30 },
+ { 0x1, 0x1, 221, 2154, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2155, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2156, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2157, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2158, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2157, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2158, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2159, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2160, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2161, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2162, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2163, -1, 34, 1, 50 },
- { 0x81, 0x81, 221, 2164, -1, 27, 1, 50 },
- { 0x41, 0x41, 221, 2165, -1, 28, 1, 50 },
- { 0x83, 0x83, 221, 2166, -1, 27, 1, 50 },
- { 0x21, 0x21, 221, 2167, -1, 29, 1, 50 },
- { 0x85, 0x85, 221, 2168, -1, 27, 1, 50 },
- { 0x43, 0x43, 221, 2169, -1, 28, 1, 50 },
- { 0x87, 0x87, 221, 2170, -1, 27, 1, 50 },
+ { 0x1, 0x1, 221, 2162, -1, 34, 1, 50 },
+ { 0x81, 0x81, 221, 2163, -1, 27, 1, 50 },
+ { 0x41, 0x41, 221, 2164, -1, 28, 1, 50 },
+ { 0x83, 0x83, 221, 2165, -1, 27, 1, 50 },
+ { 0x21, 0x21, 221, 2166, -1, 29, 1, 50 },
+ { 0x85, 0x85, 221, 2167, -1, 27, 1, 50 },
+ { 0x43, 0x43, 221, 2168, -1, 28, 1, 50 },
+ { 0x87, 0x87, 221, 2169, -1, 27, 1, 50 },
+ { 0x1, 0x1, 221, 2170, -1, 34, 1, 50 },
{ 0x1, 0x1, 221, 2171, -1, 34, 1, 50 },
{ 0x1, 0x1, 221, 2172, -1, 34, 1, 50 },
{ 0x1, 0x1, 221, 2173, -1, 34, 1, 50 },
- { 0x1, 0x1, 221, 2174, -1, 34, 1, 50 },
- { 0x41, 0x41, 221, 2175, -1, 28, 1, 30 },
- { 0x1, 0x1, 221, 2176, -1, 34, 1, 30 },
- { 0x83, 0x83, 221, 2177, -1, 27, 1, 30 },
- { 0x81, 0x81, 221, 2178, -1, 27, 1, 30 },
+ { 0x41, 0x41, 221, 2174, -1, 28, 1, 30 },
+ { 0x1, 0x1, 221, 2175, -1, 34, 1, 30 },
+ { 0x83, 0x83, 221, 2176, -1, 27, 1, 30 },
+ { 0x81, 0x81, 221, 2177, -1, 27, 1, 30 },
+ { 0x1, 0x1, 221, 2178, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2179, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2180, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2181, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2182, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2183, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2184, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2185, -1, 34, 1, 30 },
+ { 0x1, 0x1, 221, 2185, -1, 34, 1, 25 },
{ 0x1, 0x1, 221, 2186, -1, 34, 1, 25 },
{ 0x1, 0x1, 221, 2187, -1, 34, 1, 25 },
{ 0x1, 0x1, 221, 2188, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2189, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2190, -1, 34, 1, 36 },
- { 0x1, 0x1, 221, 2191, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2189, -1, 34, 1, 36 },
+ { 0x1, 0x1, 221, 2190, -1, 34, 1, 65 },
+ { 0x1, 0x1, 221, 2191, -1, 34, 1, 30 },
{ 0x1, 0x1, 221, 2192, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2193, -1, 34, 1, 30 },
- { 0x1, 0x1, 222, 2194, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2193, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2194, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2195, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2196, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2197, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2198, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2199, -1, 35, 1, 46 },
- { 0x1, 0x1, 222, 2200, -1, 35, 1, 42 },
- { 0x800001, 0x800001, 222, 2201, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2202, -1, 35, 1, 56 },
- { 0x1800001, 0x1800001, 222, 2203, -1, 12, 1, 61 },
- { 0x3, 0x3, 222, 2204, -1, 35, 1, 56 },
- { 0xa00001, 0xa00001, 222, 2205, -1, 12, 1, 61 },
- { 0x5, 0x5, 222, 2206, -1, 33, 1, 56 },
- { 0x1a00001, 0x1a00001, 222, 2207, -1, 12, 1, 51 },
- { 0xd, 0xd, 222, 2208, -1, 33, 1, 51 },
- { 0x800001, 0x800001, 222, 2209, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2210, -1, 35, 1, 56 },
- { 0xa00001, 0x1a00001, 222, 2211, -1, 12, 1, 61 },
- { 0x5, 0xd, 222, 2212, -1, 33, 1, 56 },
- { 0x800001, 0x800001, 222, 2213, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2214, -1, 35, 1, 56 },
- { 0x1800001, 0x1800001, 222, 2215, -1, 12, 1, 61 },
- { 0x3, 0x3, 222, 2216, -1, 35, 1, 56 },
- { 0xa00001, 0xa00001, 222, 2217, -1, 12, 1, 61 },
- { 0x5, 0x5, 222, 2218, -1, 33, 1, 56 },
- { 0x1a00001, 0x1a00001, 222, 2219, -1, 12, 1, 51 },
- { 0xd, 0xd, 222, 2220, -1, 33, 1, 51 },
- { 0x800001, 0x800001, 222, 2221, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2222, -1, 35, 1, 56 },
- { 0xa00001, 0x1a00001, 222, 2223, -1, 12, 1, 61 },
- { 0x5, 0xd, 222, 2224, -1, 33, 1, 56 },
- { 0x81, 0x81, 222, 2225, -1, 28, 1, 31 },
- { 0x1, 0x1, 222, 2226, -1, 35, 1, 31 },
- { 0x103, 0x103, 222, 2227, -1, 27, 1, 31 },
- { 0x101, 0x101, 222, 2228, -1, 27, 1, 31 },
- { 0x1, 0x1, 222, 2229, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2198, -1, 35, 1, 46 },
+ { 0x1, 0x1, 222, 2199, -1, 35, 1, 42 },
+ { 0x800001, 0x800001, 222, 2200, -1, 12, 1, 61 },
+ { 0x1, 0x1, 222, 2201, -1, 35, 1, 56 },
+ { 0x1800001, 0x1800001, 222, 2202, -1, 12, 1, 61 },
+ { 0x3, 0x3, 222, 2203, -1, 35, 1, 56 },
+ { 0xa00001, 0xa00001, 222, 2204, -1, 12, 1, 61 },
+ { 0x5, 0x5, 222, 2205, -1, 33, 1, 56 },
+ { 0x1a00001, 0x1a00001, 222, 2206, -1, 12, 1, 51 },
+ { 0xd, 0xd, 222, 2207, -1, 33, 1, 51 },
+ { 0x800001, 0x800001, 222, 2208, -1, 12, 1, 61 },
+ { 0x1, 0x1, 222, 2209, -1, 35, 1, 56 },
+ { 0xa00001, 0x1a00001, 222, 2210, -1, 12, 1, 61 },
+ { 0x5, 0xd, 222, 2211, -1, 33, 1, 56 },
+ { 0x800001, 0x800001, 222, 2212, -1, 12, 1, 61 },
+ { 0x1, 0x1, 222, 2213, -1, 35, 1, 56 },
+ { 0x1800001, 0x1800001, 222, 2214, -1, 12, 1, 61 },
+ { 0x3, 0x3, 222, 2215, -1, 35, 1, 56 },
+ { 0xa00001, 0xa00001, 222, 2216, -1, 12, 1, 61 },
+ { 0x5, 0x5, 222, 2217, -1, 33, 1, 56 },
+ { 0x1a00001, 0x1a00001, 222, 2218, -1, 12, 1, 51 },
+ { 0xd, 0xd, 222, 2219, -1, 33, 1, 51 },
+ { 0x800001, 0x800001, 222, 2220, -1, 12, 1, 61 },
+ { 0x1, 0x1, 222, 2221, -1, 35, 1, 56 },
+ { 0xa00001, 0x1a00001, 222, 2222, -1, 12, 1, 61 },
+ { 0x5, 0xd, 222, 2223, -1, 33, 1, 56 },
+ { 0x81, 0x81, 222, 2224, -1, 28, 1, 31 },
+ { 0x1, 0x1, 222, 2225, -1, 35, 1, 31 },
+ { 0x103, 0x103, 222, 2226, -1, 27, 1, 31 },
+ { 0x101, 0x101, 222, 2227, -1, 27, 1, 31 },
+ { 0x1, 0x1, 222, 2228, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2229, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2230, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2231, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2232, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2233, -1, 35, 1, 31 },
+ { 0x3, 0x3, 222, 2231, -1, 35, 1, 65 },
+ { 0x5, 0x5, 222, 2232, -1, 35, 1, 31 },
+ { 0x1, 0x1, 222, 2233, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2234, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2235, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2236, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2237, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2236, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2237, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2238, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2239, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2240, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2241, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2242, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2243, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2244, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2245, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2246, -1, 35, 1, 65 },
+ { 0x3, 0x3, 222, 2239, -1, 35, 1, 65 },
+ { 0x5, 0x5, 222, 2240, -1, 35, 1, 31 },
+ { 0x1, 0x1, 222, 2241, -1, 35, 1, 31 },
+ { 0x3, 0x3, 222, 2242, -1, 35, 1, 65 },
+ { 0x5, 0x5, 222, 2243, -1, 35, 1, 31 },
+ { 0x1, 0x1, 222, 2244, -1, 35, 1, 31 },
+ { 0x1, 0x1, 222, 2245, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2246, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2247, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2248, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2249, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2248, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2249, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2250, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2251, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2252, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2253, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2254, -1, 35, 1, 51 },
- { 0x101, 0x101, 222, 2255, -1, 27, 1, 51 },
- { 0x81, 0x81, 222, 2256, -1, 28, 1, 51 },
- { 0x103, 0x103, 222, 2257, -1, 27, 1, 51 },
- { 0x41, 0x41, 222, 2258, -1, 29, 1, 51 },
- { 0x105, 0x105, 222, 2259, -1, 27, 1, 51 },
- { 0x83, 0x83, 222, 2260, -1, 28, 1, 51 },
- { 0x107, 0x107, 222, 2261, -1, 27, 1, 51 },
+ { 0x1, 0x1, 222, 2253, -1, 35, 1, 51 },
+ { 0x101, 0x101, 222, 2254, -1, 27, 1, 51 },
+ { 0x81, 0x81, 222, 2255, -1, 28, 1, 51 },
+ { 0x103, 0x103, 222, 2256, -1, 27, 1, 51 },
+ { 0x41, 0x41, 222, 2257, -1, 29, 1, 51 },
+ { 0x105, 0x105, 222, 2258, -1, 27, 1, 51 },
+ { 0x83, 0x83, 222, 2259, -1, 28, 1, 51 },
+ { 0x107, 0x107, 222, 2260, -1, 27, 1, 51 },
+ { 0x1, 0x1, 222, 2261, -1, 35, 1, 51 },
{ 0x1, 0x1, 222, 2262, -1, 35, 1, 51 },
{ 0x1, 0x1, 222, 2263, -1, 35, 1, 51 },
{ 0x1, 0x1, 222, 2264, -1, 35, 1, 51 },
- { 0x1, 0x1, 222, 2265, -1, 35, 1, 51 },
- { 0x81, 0x81, 222, 2266, -1, 28, 1, 31 },
- { 0x1, 0x1, 222, 2267, -1, 35, 1, 31 },
- { 0x103, 0x103, 222, 2268, -1, 27, 1, 31 },
- { 0x101, 0x101, 222, 2269, -1, 27, 1, 31 },
+ { 0x81, 0x81, 222, 2265, -1, 28, 1, 31 },
+ { 0x1, 0x1, 222, 2266, -1, 35, 1, 31 },
+ { 0x103, 0x103, 222, 2267, -1, 27, 1, 31 },
+ { 0x101, 0x101, 222, 2268, -1, 27, 1, 31 },
+ { 0x1, 0x1, 222, 2269, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2270, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2271, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2272, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2273, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2274, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2275, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2276, -1, 35, 1, 31 },
+ { 0x1, 0x1, 222, 2276, -1, 35, 1, 26 },
{ 0x1, 0x1, 222, 2277, -1, 35, 1, 26 },
{ 0x1, 0x1, 222, 2278, -1, 35, 1, 26 },
{ 0x1, 0x1, 222, 2279, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2280, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2281, -1, 35, 1, 37 },
- { 0x1, 0x1, 222, 2282, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2280, -1, 35, 1, 37 },
+ { 0x1, 0x1, 222, 2281, -1, 35, 1, 65 },
+ { 0x1, 0x1, 222, 2282, -1, 35, 1, 31 },
{ 0x1, 0x1, 222, 2283, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2284, -1, 35, 1, 31 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1875, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1874, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 47 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 43 },
{ 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2458, -1, 34, 1, 57 },
+ { 0x3, 0x3, 223, 2457, -1, 34, 1, 57 },
{ 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2459, -1, 34, 1, 57 },
+ { 0x7, 0x7, 223, 2458, -1, 34, 1, 57 },
{ 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2460, -1, 33, 1, 57 },
+ { 0x7, 0x7, 223, 2459, -1, 33, 1, 57 },
{ 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 52 },
- { 0xf, 0xf, 223, 2461, -1, 33, 1, 52 },
+ { 0xf, 0xf, 223, 2460, -1, 33, 1, 52 },
{ 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2466, -1, 34, 1, 57 },
+ { 0x3, 0x3, 223, 2465, -1, 34, 1, 57 },
{ 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0xf, 223, 2467, -1, 33, 1, 57 },
+ { 0x7, 0xf, 223, 2466, -1, 33, 1, 57 },
{ 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2470, -1, 34, 1, 57 },
+ { 0x3, 0x3, 223, 2469, -1, 34, 1, 57 },
{ 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2471, -1, 34, 1, 57 },
+ { 0x7, 0x7, 223, 2470, -1, 34, 1, 57 },
{ 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2472, -1, 33, 1, 57 },
+ { 0x7, 0x7, 223, 2471, -1, 33, 1, 57 },
{ 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 52 },
- { 0xf, 0xf, 223, 2473, -1, 33, 1, 52 },
+ { 0xf, 0xf, 223, 2472, -1, 33, 1, 52 },
{ 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2478, -1, 34, 1, 57 },
+ { 0x3, 0x3, 223, 2477, -1, 34, 1, 57 },
{ 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0xf, 223, 2479, -1, 33, 1, 57 },
+ { 0x7, 0xf, 223, 2478, -1, 33, 1, 57 },
{ 0xc1, 0xc1, 223, -1, -1, 28, 1, 32 },
- { 0x3, 0x3, 223, 2398, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 2397, -1, 34, 1, 32 },
{ 0x183, 0x183, 223, -1, -1, 27, 1, 32 },
- { 0x181, 0x181, 223, 2399, -1, 27, 1, 32 },
+ { 0x181, 0x181, 223, 2398, -1, 27, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1876, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1875, -1, 34, 1, 32 },
{ 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
{ 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1877, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1876, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1880, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1879, -1, 34, 1, 32 },
{ 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
{ 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1881, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1880, -1, 34, 1, 32 },
{ 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
{ 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1883, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1882, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1885, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1884, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1886, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 1885, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
@@ -4017,9 +4068,9 @@ completer_table[] = {
{ 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
{ 0xc1, 0xc1, 223, -1, -1, 28, 1, 32 },
- { 0x3, 0x3, 223, 2402, -1, 34, 1, 32 },
+ { 0x3, 0x3, 223, 2401, -1, 34, 1, 32 },
{ 0x183, 0x183, 223, -1, -1, 27, 1, 32 },
- { 0x181, 0x181, 223, 2403, -1, 27, 1, 32 },
+ { 0x181, 0x181, 223, 2402, -1, 27, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
@@ -4034,126 +4085,126 @@ completer_table[] = {
{ 0x3, 0x3, 223, -1, -1, 34, 1, 38 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
{ 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1888, -1, 34, 1, 32 },
- { 0x3, 0x3, 224, 401, 1210, 32, 1, 128 },
- { 0x3, 0x3, 224, 402, 1219, 32, 1, 128 },
- { 0x3, 0x3, 224, 403, 1228, 32, 1, 128 },
- { 0x3, 0x3, 224, 404, 1239, 32, 1, 128 },
- { 0x3, 0x3, 224, 405, 1248, 32, 1, 128 },
- { 0x3, 0x3, 224, 406, 1257, 32, 1, 128 },
- { 0x3, 0x3, 224, 407, 1266, 32, 1, 128 },
- { 0x3, 0x3, 224, 408, 1275, 32, 1, 128 },
- { 0x3, 0x3, 224, 409, 1284, 32, 1, 128 },
- { 0x3, 0x3, 224, 410, 1293, 32, 1, 128 },
- { 0x3, 0x3, 224, 411, 1303, 32, 1, 128 },
- { 0x3, 0x3, 224, 412, 1313, 32, 1, 128 },
- { 0x3, 0x3, 224, 425, 1326, 32, 1, 143 },
- { 0x3, 0x3, 224, 426, 1332, 32, 1, 143 },
- { 0x3, 0x3, 224, 427, 1338, 32, 1, 143 },
- { 0x3, 0x3, 224, 428, 1344, 32, 1, 143 },
- { 0x3, 0x3, 224, 429, 1350, 32, 1, 143 },
- { 0x3, 0x3, 224, 430, 1356, 32, 1, 143 },
- { 0x3, 0x3, 224, 431, 1362, 32, 1, 143 },
- { 0x3, 0x3, 224, 432, 1368, 32, 1, 143 },
- { 0x3, 0x3, 224, 433, 1374, 32, 1, 143 },
- { 0x3, 0x3, 224, 434, 1380, 32, 1, 143 },
- { 0x3, 0x3, 224, 435, 1386, 32, 1, 143 },
- { 0x3, 0x3, 224, 436, 1392, 32, 1, 143 },
- { 0x3, 0x3, 224, 437, 1398, 32, 1, 143 },
- { 0x3, 0x3, 224, 438, 1404, 32, 1, 143 },
- { 0x3, 0x3, 224, 439, 1410, 32, 1, 143 },
- { 0x3, 0x3, 224, 440, 1416, 32, 1, 143 },
- { 0x3, 0x3, 224, 441, 1422, 32, 1, 143 },
- { 0x3, 0x3, 224, 442, 1428, 32, 1, 143 },
+ { 0x3, 0x3, 223, 1887, -1, 34, 1, 32 },
+ { 0x3, 0x3, 224, 400, 1209, 32, 1, 128 },
+ { 0x3, 0x3, 224, 401, 1218, 32, 1, 128 },
+ { 0x3, 0x3, 224, 402, 1227, 32, 1, 128 },
+ { 0x3, 0x3, 224, 403, 1238, 32, 1, 128 },
+ { 0x3, 0x3, 224, 404, 1247, 32, 1, 128 },
+ { 0x3, 0x3, 224, 405, 1256, 32, 1, 128 },
+ { 0x3, 0x3, 224, 406, 1265, 32, 1, 128 },
+ { 0x3, 0x3, 224, 407, 1274, 32, 1, 128 },
+ { 0x3, 0x3, 224, 408, 1283, 32, 1, 128 },
+ { 0x3, 0x3, 224, 409, 1292, 32, 1, 128 },
+ { 0x3, 0x3, 224, 410, 1302, 32, 1, 128 },
+ { 0x3, 0x3, 224, 411, 1312, 32, 1, 128 },
+ { 0x3, 0x3, 224, 424, 1325, 32, 1, 143 },
+ { 0x3, 0x3, 224, 425, 1331, 32, 1, 148 },
+ { 0x3, 0x3, 224, 426, 1337, 32, 1, 148 },
+ { 0x3, 0x3, 224, 427, 1343, 32, 1, 143 },
+ { 0x3, 0x3, 224, 428, 1349, 32, 1, 148 },
+ { 0x3, 0x3, 224, 429, 1355, 32, 1, 148 },
+ { 0x3, 0x3, 224, 430, 1361, 32, 1, 143 },
+ { 0x3, 0x3, 224, 431, 1367, 32, 1, 148 },
+ { 0x3, 0x3, 224, 432, 1373, 32, 1, 148 },
+ { 0x3, 0x3, 224, 433, 1379, 32, 1, 143 },
+ { 0x3, 0x3, 224, 434, 1385, 32, 1, 148 },
+ { 0x3, 0x3, 224, 435, 1391, 32, 1, 143 },
+ { 0x3, 0x3, 224, 436, 1397, 32, 1, 148 },
+ { 0x3, 0x3, 224, 437, 1403, 32, 1, 143 },
+ { 0x3, 0x3, 224, 438, 1409, 32, 1, 148 },
+ { 0x3, 0x3, 224, 439, 1415, 32, 1, 143 },
+ { 0x3, 0x3, 224, 440, 1421, 32, 1, 148 },
+ { 0x3, 0x3, 224, 441, 1427, 32, 1, 148 },
{ 0x1, 0x1, 225, -1, -1, 28, 1, 33 },
{ 0x1, 0x1, 225, -1, -1, 28, 1, 33 },
- { 0x0, 0x0, 232, 810, -1, 0, 1, 137 },
- { 0x0, 0x0, 232, 811, -1, 0, 1, 150 },
- { 0x1, 0x1, 233, -1, 1725, 33, 1, 133 },
- { 0x1, 0x1, 233, -1, 1728, 33, 1, 139 },
- { 0x0, 0x0, 233, -1, 1730, 0, 1, 145 },
- { 0x0, 0x0, 233, -1, 1731, 0, 1, 145 },
- { 0x0, 0x0, 234, 744, 823, 0, 0, -1 },
- { 0x0, 0x0, 234, 745, 831, 0, 0, -1 },
- { 0x0, 0x0, 234, 746, 827, 0, 0, -1 },
- { 0x1, 0x1, 234, 747, 481, 33, 1, 6 },
- { 0x8000001, 0x8000001, 234, 748, 489, 6, 1, 7 },
- { 0x1, 0x1, 234, 749, 485, 33, 1, 6 },
- { 0x0, 0x0, 234, 750, 835, 0, 0, -1 },
- { 0x1, 0x1, 234, 751, 501, 33, 1, 8 },
- { 0x0, 0x0, 234, 752, 839, 0, 0, -1 },
- { 0x1, 0x1, 234, 753, 513, 33, 1, 15 },
- { 0x0, 0x0, 234, 754, 844, 0, 0, -1 },
- { 0x0, 0x0, 234, 755, 848, 0, 0, -1 },
- { 0x1, 0x1, 234, 756, 536, 33, 1, 17 },
- { 0x1, 0x1, 234, 757, 540, 33, 1, 17 },
- { 0x0, 0x0, 234, 758, 852, 0, 0, -1 },
- { 0x0, 0x0, 234, 759, 856, 0, 0, -1 },
- { 0x1, 0x1, 234, 760, 560, 33, 1, 18 },
- { 0x8000001, 0x8000001, 234, 761, 564, 6, 1, 18 },
- { 0x0, 0x0, 234, 762, 860, 0, 0, -1 },
- { 0x1, 0x1, 234, 763, 576, 33, 1, 19 },
- { 0x0, 0x0, 234, 764, 864, 0, 0, -1 },
- { 0x0, 0x0, 234, 765, 868, 0, 0, -1 },
- { 0x1, 0x1, 234, 766, 596, 33, 1, 20 },
- { 0x8000001, 0x8000001, 234, 767, 600, 6, 1, 20 },
- { 0x0, 0x0, 234, 768, 872, 0, 0, -1 },
- { 0x1, 0x1, 234, 769, 612, 33, 1, 21 },
- { 0x0, 0x0, 234, 770, 877, 0, 0, -1 },
- { 0x0, 0x0, 234, 771, 881, 0, 0, -1 },
- { 0x1, 0x1, 234, 772, 635, 33, 1, 17 },
- { 0x1, 0x1, 234, 773, 639, 33, 1, 17 },
- { 0x0, 0x0, 234, 774, 885, 0, 0, -1 },
- { 0x1, 0x1, 234, 775, 651, 33, 1, 21 },
- { 0x0, 0x0, 235, 2323, 822, 0, 0, -1 },
- { 0x0, 0x0, 235, 2324, 830, 0, 0, -1 },
- { 0x0, 0x0, 235, 2325, 826, 0, 0, -1 },
- { 0x0, 0x0, 235, 2326, 480, 0, 1, 6 },
- { 0x1, 0x1, 235, 2327, 488, 6, 1, 7 },
- { 0x0, 0x0, 235, 2328, 484, 0, 1, 6 },
- { 0x0, 0x0, 235, 2329, 834, 0, 0, -1 },
- { 0x0, 0x0, 235, 2330, 500, 0, 1, 8 },
- { 0x0, 0x0, 235, 2331, 838, 0, 0, -1 },
- { 0x0, 0x0, 235, 2332, 512, 0, 1, 15 },
- { 0x0, 0x0, 235, 2333, 843, 0, 0, -1 },
- { 0x0, 0x0, 235, 2334, 847, 0, 0, -1 },
- { 0x0, 0x0, 235, 2335, 535, 0, 1, 17 },
- { 0x0, 0x0, 235, 2336, 539, 0, 1, 17 },
- { 0x0, 0x0, 235, 2337, 851, 0, 0, -1 },
- { 0x0, 0x0, 235, 2338, 855, 0, 0, -1 },
- { 0x0, 0x0, 235, 2339, 559, 0, 1, 18 },
- { 0x1, 0x1, 235, 2340, 563, 6, 1, 18 },
- { 0x0, 0x0, 235, 2341, 859, 0, 0, -1 },
- { 0x0, 0x0, 235, 2342, 575, 0, 1, 19 },
- { 0x0, 0x0, 235, 2343, 863, 0, 0, -1 },
- { 0x0, 0x0, 235, 2344, 867, 0, 0, -1 },
- { 0x0, 0x0, 235, 2345, 595, 0, 1, 20 },
- { 0x1, 0x1, 235, 2346, 599, 6, 1, 20 },
- { 0x0, 0x0, 235, 2347, 871, 0, 0, -1 },
- { 0x0, 0x0, 235, 2348, 611, 0, 1, 21 },
- { 0x0, 0x0, 235, 2349, 876, 0, 0, -1 },
- { 0x0, 0x0, 235, 2350, 880, 0, 0, -1 },
- { 0x0, 0x0, 235, 2351, 634, 0, 1, 17 },
- { 0x0, 0x0, 235, 2352, 638, 0, 1, 17 },
- { 0x0, 0x0, 235, 2353, 884, 0, 0, -1 },
- { 0x0, 0x0, 235, 2354, 650, 0, 1, 21 },
- { 0x1, 0x1, 235, 776, 973, 27, 1, 16 },
- { 0x0, 0x0, 235, 777, 971, 0, 1, 16 },
- { 0x0, 0x0, 235, 1021, 975, 0, 1, 22 },
- { 0x0, 0x1, 235, 983, 981, 20, 1, 67 },
- { 0x0, 0x0, 235, 110, 979, 0, 1, 67 },
+ { 0x0, 0x0, 232, 809, -1, 0, 1, 137 },
+ { 0x0, 0x0, 232, 810, -1, 0, 1, 155 },
+ { 0x1, 0x1, 233, -1, 1724, 33, 1, 133 },
+ { 0x1, 0x1, 233, -1, 1727, 33, 1, 139 },
+ { 0x0, 0x0, 233, -1, 1729, 0, 1, 150 },
+ { 0x0, 0x0, 233, -1, 1730, 0, 1, 156 },
+ { 0x0, 0x0, 234, 743, 822, 0, 0, -1 },
+ { 0x0, 0x0, 234, 744, 830, 0, 0, -1 },
+ { 0x0, 0x0, 234, 745, 826, 0, 0, -1 },
+ { 0x1, 0x1, 234, 746, 480, 33, 1, 6 },
+ { 0x8000001, 0x8000001, 234, 747, 488, 6, 1, 7 },
+ { 0x1, 0x1, 234, 748, 484, 33, 1, 6 },
+ { 0x0, 0x0, 234, 749, 834, 0, 0, -1 },
+ { 0x1, 0x1, 234, 750, 500, 33, 1, 8 },
+ { 0x0, 0x0, 234, 751, 838, 0, 0, -1 },
+ { 0x1, 0x1, 234, 752, 512, 33, 1, 15 },
+ { 0x0, 0x0, 234, 753, 843, 0, 0, -1 },
+ { 0x0, 0x0, 234, 754, 847, 0, 0, -1 },
+ { 0x1, 0x1, 234, 755, 535, 33, 1, 17 },
+ { 0x1, 0x1, 234, 756, 539, 33, 1, 17 },
+ { 0x0, 0x0, 234, 757, 851, 0, 0, -1 },
+ { 0x0, 0x0, 234, 758, 855, 0, 0, -1 },
+ { 0x1, 0x1, 234, 759, 559, 33, 1, 18 },
+ { 0x8000001, 0x8000001, 234, 760, 563, 6, 1, 18 },
+ { 0x0, 0x0, 234, 761, 859, 0, 0, -1 },
+ { 0x1, 0x1, 234, 762, 575, 33, 1, 19 },
+ { 0x0, 0x0, 234, 763, 863, 0, 0, -1 },
+ { 0x0, 0x0, 234, 764, 867, 0, 0, -1 },
+ { 0x1, 0x1, 234, 765, 595, 33, 1, 20 },
+ { 0x8000001, 0x8000001, 234, 766, 599, 6, 1, 20 },
+ { 0x0, 0x0, 234, 767, 871, 0, 0, -1 },
+ { 0x1, 0x1, 234, 768, 611, 33, 1, 21 },
+ { 0x0, 0x0, 234, 769, 876, 0, 0, -1 },
+ { 0x0, 0x0, 234, 770, 880, 0, 0, -1 },
+ { 0x1, 0x1, 234, 771, 634, 33, 1, 17 },
+ { 0x1, 0x1, 234, 772, 638, 33, 1, 17 },
+ { 0x0, 0x0, 234, 773, 884, 0, 0, -1 },
+ { 0x1, 0x1, 234, 774, 650, 33, 1, 21 },
+ { 0x0, 0x0, 235, 2322, 821, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2323, 829, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2324, 825, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2325, 479, 0, 1, 6 },
+ { 0x1, 0x1, 235, 2326, 487, 6, 1, 7 },
+ { 0x0, 0x0, 235, 2327, 483, 0, 1, 6 },
+ { 0x0, 0x0, 235, 2328, 833, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2329, 499, 0, 1, 8 },
+ { 0x0, 0x0, 235, 2330, 837, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2331, 511, 0, 1, 15 },
+ { 0x0, 0x0, 235, 2332, 842, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2333, 846, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2334, 534, 0, 1, 17 },
+ { 0x0, 0x0, 235, 2335, 538, 0, 1, 17 },
+ { 0x0, 0x0, 235, 2336, 850, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2337, 854, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2338, 558, 0, 1, 18 },
+ { 0x1, 0x1, 235, 2339, 562, 6, 1, 18 },
+ { 0x0, 0x0, 235, 2340, 858, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2341, 574, 0, 1, 19 },
+ { 0x0, 0x0, 235, 2342, 862, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2343, 866, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2344, 594, 0, 1, 20 },
+ { 0x1, 0x1, 235, 2345, 598, 6, 1, 20 },
+ { 0x0, 0x0, 235, 2346, 870, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2347, 610, 0, 1, 21 },
+ { 0x0, 0x0, 235, 2348, 875, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2349, 879, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2350, 633, 0, 1, 17 },
+ { 0x0, 0x0, 235, 2351, 637, 0, 1, 17 },
+ { 0x0, 0x0, 235, 2352, 883, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2353, 649, 0, 1, 21 },
+ { 0x1, 0x1, 235, 775, 972, 27, 1, 16 },
+ { 0x0, 0x0, 235, 776, 970, 0, 1, 16 },
+ { 0x0, 0x0, 235, 1020, 974, 0, 1, 22 },
+ { 0x0, 0x1, 235, 982, 980, 20, 1, 67 },
+ { 0x0, 0x0, 235, 109, 978, 0, 1, 67 },
{ 0x1, 0x1, 238, -1, -1, 29, 1, 0 },
{ 0x0, 0x0, 238, -1, -1, 0, 1, 0 },
+ { 0x1, 0x1, 238, 2494, -1, 27, 1, 0 },
{ 0x1, 0x1, 238, 2495, -1, 27, 1, 0 },
{ 0x1, 0x1, 238, 2496, -1, 27, 1, 0 },
{ 0x1, 0x1, 238, 2497, -1, 27, 1, 0 },
- { 0x1, 0x1, 238, 2498, -1, 27, 1, 0 },
- { 0x0, 0x0, 260, -1, 1952, 0, 0, -1 },
- { 0x0, 0x0, 260, -1, 1954, 0, 0, -1 },
+ { 0x0, 0x0, 260, -1, 1951, 0, 0, -1 },
+ { 0x0, 0x0, 260, -1, 1953, 0, 0, -1 },
{ 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
{ 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
- { 0x0, 0x0, 260, -1, 1993, 0, 0, -1 },
- { 0x0, 0x0, 260, -1, 1995, 0, 0, -1 },
+ { 0x0, 0x0, 260, -1, 1992, 0, 0, -1 },
+ { 0x0, 0x0, 260, -1, 1994, 0, 0, -1 },
{ 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
{ 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
{ 0x0, 0x0, 262, 22, -1, 0, 1, 0 },
@@ -4164,7 +4215,7 @@ completer_table[] = {
{ 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
{ 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
{ 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x0, 262, 178, -1, 0, 1, 0 },
+ { 0x0, 0x0, 262, 177, -1, 0, 1, 0 },
{ 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
@@ -4208,65 +4259,65 @@ completer_table[] = {
{ 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 64 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 64 },
- { 0x0, 0x0, 263, -1, 1928, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1930, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1932, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1934, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1927, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1929, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1931, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1933, 0, 0, -1 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 49 },
- { 0x0, 0x0, 263, -1, 1936, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1938, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1935, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1937, 0, 0, -1 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x0, 0x0, 263, -1, 1940, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1942, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1944, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1946, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1939, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1941, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1943, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1945, 0, 0, -1 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 49 },
- { 0x0, 0x0, 263, -1, 1948, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1950, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1947, 0, 0, -1 },
+ { 0x0, 0x0, 263, -1, 1949, 0, 0, -1 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
{ 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, 334, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 392, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 338, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 396, -1, 12, 1, 2 },
- { 0x0, 0x0, 264, -1, 1935, 0, 0, -1 },
- { 0x9, 0x9, 264, -1, 2465, 33, 1, 49 },
- { 0x0, 0x0, 264, 1173, 1984, 0, 0, -1 },
- { 0x3, 0x3, 264, 1174, -1, 27, 1, 49 },
- { 0x0, 0x0, 268, 2392, -1, 0, 1, 0 },
+ { 0x1, 0x1, 263, 333, -1, 12, 1, 2 },
+ { 0x1, 0x1, 263, 391, -1, 12, 1, 2 },
+ { 0x1, 0x1, 263, 337, -1, 12, 1, 2 },
+ { 0x1, 0x1, 263, 395, -1, 12, 1, 2 },
+ { 0x0, 0x0, 264, -1, 1934, 0, 0, -1 },
+ { 0x9, 0x9, 264, -1, 2464, 33, 1, 49 },
+ { 0x0, 0x0, 264, 1172, 1983, 0, 0, -1 },
+ { 0x3, 0x3, 264, 1173, -1, 27, 1, 49 },
+ { 0x0, 0x0, 268, 2391, -1, 0, 1, 0 },
{ 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
{ 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
{ 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
{ 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
+ { 0x1, 0x1, 270, 2490, -1, 28, 1, 0 },
{ 0x1, 0x1, 270, 2491, -1, 28, 1, 0 },
{ 0x1, 0x1, 270, 2492, -1, 28, 1, 0 },
{ 0x1, 0x1, 270, 2493, -1, 28, 1, 0 },
- { 0x1, 0x1, 270, 2494, -1, 28, 1, 0 },
{ 0x1, 0x1, 271, -1, -1, 27, 1, 93 },
{ 0x1, 0x1, 271, -1, -1, 27, 1, 93 },
- { 0x0, 0x0, 271, -1, 820, 0, 0, -1 },
- { 0x0, 0x0, 272, 2504, 2369, 0, 0, -1 },
- { 0x0, 0x0, 272, 2505, 2371, 0, 0, -1 },
- { 0x0, 0x0, 273, -1, 2370, 0, 0, -1 },
- { 0x0, 0x0, 273, -1, 2372, 0, 0, -1 },
+ { 0x0, 0x0, 271, -1, 819, 0, 0, -1 },
+ { 0x0, 0x0, 272, 2503, 2368, 0, 0, -1 },
+ { 0x0, 0x0, 272, 2504, 2370, 0, 0, -1 },
+ { 0x0, 0x0, 273, -1, 2369, 0, 0, -1 },
+ { 0x0, 0x0, 273, -1, 2371, 0, 0, -1 },
{ 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
{ 0x0, 0x0, 279, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 283, -1, 1958, 0, 1, 29 },
+ { 0x0, 0x0, 283, -1, 1957, 0, 1, 29 },
{ 0x0, 0x0, 284, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 284, -1, -1, 0, 1, 71 },
- { 0x0, 0x0, 284, 1744, 2482, 0, 1, 1 },
- { 0x0, 0x0, 284, -1, 393, 0, 0, -1 },
- { 0x0, 0x0, 284, 1746, 2484, 0, 1, 1 },
- { 0x0, 0x0, 284, -1, 397, 0, 0, -1 },
+ { 0x0, 0x0, 284, 1743, 2481, 0, 1, 1 },
+ { 0x0, 0x0, 284, -1, 392, 0, 0, -1 },
+ { 0x0, 0x0, 284, 1745, 2483, 0, 1, 1 },
+ { 0x0, 0x0, 284, -1, 396, 0, 0, -1 },
};
static const struct ia64_main_table
@@ -4284,202 +4335,202 @@ main_table[] = {
{ 10, 1, 1, 0x0000010160000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 10, },
{ 11, 1, 1, 0x0000010068000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 11, },
{ 11, 1, 1, 0x0000010168000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 12, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011ffull, { 16, 0, 0, 0, 0 }, 0x40, 821, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x0, 686, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x40, 687, },
- { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x200, 1866, },
- { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x240, 1867, },
- { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x0, 443, },
- { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x40, 444, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 81, 0, 0, 0, 0 }, 0x40, 842, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x0, 688, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x40, 689, },
- { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x210, 2502, },
- { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x250, 2503, },
- { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x30, 451, },
- { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x70, 452, },
- { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x230, 449, },
- { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x270, 450, },
- { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x0, 445, },
- { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x40, 446, },
- { 15, 4, 0, 0x0000000000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 398, },
- { 15, 5, 0, 0x0000000000000000ull, 0x000001e3f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 812, },
- { 15, 2, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x2, 956, },
- { 15, 3, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1047, },
- { 15, 6, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2506, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011ffull, { 16, 0, 0, 0, 0 }, 0x40, 820, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x0, 685, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x40, 686, },
+ { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x200, 1865, },
+ { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x240, 1866, },
+ { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x0, 442, },
+ { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x40, 443, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 81, 0, 0, 0, 0 }, 0x40, 841, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x0, 687, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x40, 688, },
+ { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x210, 2501, },
+ { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x250, 2502, },
+ { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x30, 450, },
+ { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x70, 451, },
+ { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x230, 448, },
+ { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x270, 449, },
+ { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x0, 444, },
+ { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x40, 445, },
+ { 15, 4, 0, 0x0000000000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 397, },
+ { 15, 5, 0, 0x0000000000000000ull, 0x000001e3f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 811, },
+ { 15, 2, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x2, 955, },
+ { 15, 3, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1046, },
+ { 15, 6, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2505, },
{ 15, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 15, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011ffull, { 82, 0, 0, 0, 0 }, 0x40, 875, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x0, 690, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x40, 691, },
- { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x0, 447, },
- { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x40, 448, },
- { 17, 4, 0, 0x0000004080000000ull, 0x000001e9f8000018ull, { 16, 77, 0, 0, 0 }, 0x20, 2388, },
- { 17, 4, 0, 0x000000e000000000ull, 0x000001e800000018ull, { 81, 77, 0, 0, 0 }, 0x20, 2389, },
- { 18, 4, 0, 0x0000000060000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x2c, 219, },
- { 22, 2, 0, 0x0000000200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1871, },
- { 22, 3, 0, 0x0000000800000000ull, 0x000001ee00000000ull, { 24, 81, 0, 0, 0 }, 0x0, 221, },
- { 22, 3, 0, 0x0000000c00000000ull, 0x000001ee00000000ull, { 18, 81, 0, 0, 0 }, 0x0, 222, },
- { 22, 3, 0, 0x0000002200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1872, },
- { 22, 3, 0, 0x0000002600000000ull, 0x000001ee00000000ull, { 19, 80, 0, 0, 0 }, 0x0, 1873, },
- { 22, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1874, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011ffull, { 82, 0, 0, 0, 0 }, 0x40, 874, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x0, 689, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x40, 690, },
+ { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x0, 446, },
+ { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x40, 447, },
+ { 17, 4, 0, 0x0000004080000000ull, 0x000001e9f8000018ull, { 16, 77, 0, 0, 0 }, 0x20, 2387, },
+ { 17, 4, 0, 0x000000e000000000ull, 0x000001e800000018ull, { 81, 77, 0, 0, 0 }, 0x20, 2388, },
+ { 18, 4, 0, 0x0000000060000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x2c, 218, },
+ { 22, 2, 0, 0x0000000200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1870, },
+ { 22, 3, 0, 0x0000000800000000ull, 0x000001ee00000000ull, { 24, 81, 0, 0, 0 }, 0x0, 220, },
+ { 22, 3, 0, 0x0000000c00000000ull, 0x000001ee00000000ull, { 18, 81, 0, 0, 0 }, 0x0, 221, },
+ { 22, 3, 0, 0x0000002200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1871, },
+ { 22, 3, 0, 0x0000002600000000ull, 0x000001ee00000000ull, { 19, 80, 0, 0, 0 }, 0x0, 1872, },
+ { 22, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1873, },
{ 25, 4, 0, 0x0000000020000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 17, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1023, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 999, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 925, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 904, },
- { 26, 1, 2, 0x0000018200000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1157, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 926, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1025, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1002, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1027, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1003, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 929, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 908, },
- { 26, 1, 2, 0x0000018a00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1160, },
- { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 22, 23, 59, 26, 0 }, 0x0, 1018, },
- { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 23, 22, 59, 26, 0 }, 0x0, 946, },
- { 26, 1, 2, 0x000001c200000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1161, },
- { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1004, },
- { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 910, },
- { 26, 1, 2, 0x000001ca00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1162, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1030, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 1006, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 932, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 911, },
- { 27, 1, 2, 0x0000018600000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1165, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 933, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1032, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1009, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1034, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1010, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 936, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 915, },
- { 27, 1, 2, 0x0000018e00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1168, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x0, 1044, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 58, 26, 0 }, 0x0, 1020, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 58, 26, 0 }, 0x0, 948, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x0, 924, },
- { 27, 1, 2, 0x000001c600000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1169, },
- { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1011, },
- { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 917, },
- { 27, 1, 2, 0x000001ce00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1170, },
- { 28, 3, 1, 0x0000008808000000ull, 0x000001fff8000000ull, { 24, 33, 25, 1, 2 }, 0x0, 254, },
- { 29, 3, 1, 0x0000008008000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 255, },
- { 30, 3, 1, 0x0000008048000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 256, },
- { 31, 3, 1, 0x0000008088000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 257, },
- { 32, 3, 1, 0x00000080c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 258, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1022, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 998, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 924, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 903, },
+ { 26, 1, 2, 0x0000018200000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1156, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 925, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1024, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1001, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1026, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1002, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 928, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 907, },
+ { 26, 1, 2, 0x0000018a00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1159, },
+ { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 22, 23, 59, 26, 0 }, 0x0, 1017, },
+ { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 23, 22, 59, 26, 0 }, 0x0, 945, },
+ { 26, 1, 2, 0x000001c200000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1160, },
+ { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1003, },
+ { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 909, },
+ { 26, 1, 2, 0x000001ca00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1161, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1029, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 1005, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 931, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 910, },
+ { 27, 1, 2, 0x0000018600000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1164, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 932, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1031, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1008, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1033, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1009, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 935, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 914, },
+ { 27, 1, 2, 0x0000018e00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1167, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x0, 1043, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 58, 26, 0 }, 0x0, 1019, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 58, 26, 0 }, 0x0, 947, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x0, 923, },
+ { 27, 1, 2, 0x000001c600000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1168, },
+ { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1010, },
+ { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 916, },
+ { 27, 1, 2, 0x000001ce00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1169, },
+ { 28, 3, 1, 0x0000008808000000ull, 0x000001fff8000000ull, { 24, 33, 25, 1, 2 }, 0x0, 253, },
+ { 29, 3, 1, 0x0000008008000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 254, },
+ { 30, 3, 1, 0x0000008048000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 255, },
+ { 31, 3, 1, 0x0000008088000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 256, },
+ { 32, 3, 1, 0x00000080c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 257, },
{ 34, 4, 0, 0x0000000010000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 18, },
- { 36, 2, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 985, },
- { 37, 2, 1, 0x00000000c8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 986, },
+ { 36, 2, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 984, },
+ { 37, 2, 1, 0x00000000c8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 985, },
{ 39, 2, 1, 0x0000008000000000ull, 0x000001e000000000ull, { 24, 25, 26, 47, 72 }, 0x0, 19, },
- { 39, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 73, 0 }, 0x0, 2511, },
- { 39, 2, 1, 0x000000a604000000ull, 0x000001ee04000000ull, { 24, 55, 45, 73, 0 }, 0x0, 2512, },
+ { 39, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 73, 0 }, 0x0, 2510, },
+ { 39, 2, 1, 0x000000a604000000ull, 0x000001ee04000000ull, { 24, 55, 45, 73, 0 }, 0x0, 2511, },
{ 39, 2, 1, 0x000000ae00000000ull, 0x000001ee00000000ull, { 24, 48, 26, 46, 73 }, 0x0, 20, },
{ 43, 4, 0, 0x0000000080000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x20, 21, },
- { 48, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 73, 0 }, 0x0, 2406, },
+ { 48, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 73, 0 }, 0x0, 2405, },
{ 50, 5, 1, 0x0000000080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 23, },
- { 51, 5, 1, 0x0000010008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 1923, },
- { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1924, },
+ { 51, 5, 1, 0x0000010008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 1922, },
+ { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1923, },
{ 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 25, },
- { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1925, },
+ { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1924, },
{ 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 26, },
{ 54, 5, 1, 0x0000000160000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 27, },
{ 55, 5, 1, 0x0000000168000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 28, },
{ 57, 3, 0, 0x0000002180000000ull, 0x000001fff8000000ull, { 26, 0, 0, 0, 0 }, 0x0, 29, },
- { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 79, 0, 0, 0, 0 }, 0x0, 1926, },
+ { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 79, 0, 0, 0, 0 }, 0x0, 1925, },
{ 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 79, 0, 0, 0, 0 }, 0x40, 30, },
- { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 22, 23, 19, 60, 0 }, 0x0, 1049, },
- { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 23, 22, 19, 60, 0 }, 0x40, 1190, },
- { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 1927, },
+ { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 22, 23, 19, 60, 0 }, 0x0, 1048, },
+ { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 23, 22, 19, 60, 0 }, 0x40, 1189, },
+ { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 1926, },
{ 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x40, 31, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x0, 796, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x40, 797, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x0, 939, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x40, 940, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x0, 1171, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x40, 1172, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x0, 1178, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x40, 1179, },
- { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 894, },
- { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 895, },
- { 62, 5, 1, 0x00000000e0000000ull, 0x000001e3f8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 2509, },
- { 62, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 2510, },
- { 63, 3, 1, 0x0000008488000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 259, },
- { 64, 3, 1, 0x00000084c8000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 260, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x0, 795, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x40, 796, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x0, 938, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x40, 939, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x0, 1170, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x40, 1171, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x0, 1177, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x40, 1178, },
+ { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 893, },
+ { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 894, },
+ { 62, 5, 1, 0x00000000e0000000ull, 0x000001e3f8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 2508, },
+ { 62, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 2509, },
+ { 63, 3, 1, 0x0000008488000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 258, },
+ { 64, 3, 1, 0x00000084c8000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 259, },
{ 67, 3, 0, 0x0000000060000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 32, },
- { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1961, },
+ { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1960, },
{ 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 33, },
- { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1962, },
+ { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1961, },
{ 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 34, },
- { 70, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1879, },
- { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1963, },
+ { 70, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1878, },
+ { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1962, },
{ 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 35, },
- { 72, 5, 1, 0x00000001c8000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1022, },
- { 73, 5, 1, 0x0000010000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1966, },
- { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1969, },
+ { 72, 5, 1, 0x00000001c8000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1021, },
+ { 73, 5, 1, 0x0000010000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1965, },
+ { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1968, },
{ 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 37, },
{ 75, 5, 1, 0x0000000088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 38, },
{ 76, 5, 1, 0x0000000088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 39, },
- { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1972, },
+ { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1971, },
{ 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 40, },
- { 78, 5, 1, 0x0000018000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1975, },
- { 79, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 1978, },
+ { 78, 5, 1, 0x0000018000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1974, },
+ { 79, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 1977, },
{ 80, 5, 1, 0x0000000170000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 43, },
{ 81, 5, 1, 0x0000002080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 44, },
{ 82, 5, 1, 0x0000000140000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 45, },
- { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1979, },
+ { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1978, },
{ 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 46, },
- { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1980, },
+ { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1979, },
{ 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 47, },
- { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 798, },
- { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 799, },
- { 85, 5, 1, 0x0000002188000000ull, 0x000001eff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 941, },
- { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 896, },
- { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 897, },
- { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1997, },
+ { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 797, },
+ { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 798, },
+ { 85, 5, 1, 0x0000002188000000ull, 0x000001eff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 940, },
+ { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 895, },
+ { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 896, },
+ { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1996, },
{ 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 48, },
- { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1998, },
+ { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1997, },
{ 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 49, },
- { 89, 5, 1, 0x0000002080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1887, },
- { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1999, },
+ { 89, 5, 1, 0x0000002080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1886, },
+ { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1998, },
{ 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 50, },
- { 91, 5, 1, 0x0000013000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2000, },
- { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2001, },
+ { 91, 5, 1, 0x0000013000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1999, },
+ { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2000, },
{ 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 52, },
{ 93, 5, 1, 0x0000002088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 53, },
{ 94, 5, 1, 0x0000002088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 54, },
- { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2002, },
+ { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2001, },
{ 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 55, },
- { 96, 5, 1, 0x000001b000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2003, },
- { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2004, },
+ { 96, 5, 1, 0x000001b000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2002, },
+ { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2003, },
{ 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 57, },
- { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2005, },
+ { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2004, },
{ 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 58, },
- { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2006, },
+ { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2005, },
{ 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 59, },
- { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2007, },
+ { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2006, },
{ 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 60, },
{ 101, 5, 1, 0x000001c000000000ull, 0x000001f000000000ull, { 18, 20, 21, 19, 0 }, 0x0, 61, },
- { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 50, 51, 0, 0, 0 }, 0x0, 2008, },
+ { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 50, 51, 0, 0, 0 }, 0x0, 2007, },
{ 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 50, 51, 0, 0, 0 }, 0x40, 62, },
- { 103, 5, 1, 0x0000014008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 2011, },
+ { 103, 5, 1, 0x0000014008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 2010, },
{ 104, 5, 1, 0x00000001a0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 64, },
- { 105, 5, 1, 0x00000001e0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1840, },
+ { 105, 5, 1, 0x00000001e0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1839, },
{ 106, 3, 0, 0x0000000100000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 65, },
{ 108, 5, 1, 0x0000000178000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 66, },
- { 113, 3, 1, 0x0000008708000000ull, 0x000001ffc8000000ull, { 24, 19, 0, 0, 0 }, 0x0, 2317, },
- { 118, 4, 0, 0x0000004008000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 399, },
- { 118, 5, 0, 0x000000000c000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 813, },
- { 118, 2, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 959, },
- { 118, 3, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1050, },
- { 118, 6, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2507, },
+ { 113, 3, 1, 0x0000008708000000ull, 0x000001ffc8000000ull, { 24, 19, 0, 0, 0 }, 0x0, 2316, },
+ { 118, 4, 0, 0x0000004008000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 398, },
+ { 118, 5, 0, 0x000000000c000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 812, },
+ { 118, 2, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 958, },
+ { 118, 3, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1049, },
+ { 118, 6, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2506, },
{ 118, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 67, },
{ 123, 3, 0, 0x0000000080000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 68, },
- { 123, 3, 0, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 0, 0, 0, 0 }, 0x0, 781, },
- { 123, 3, 0, 0x0000000098000000ull, 0x000001eff8000000ull, { 18, 0, 0, 0, 0 }, 0x0, 782, },
- { 124, 3, 0, 0x0000002170000000ull, 0x000001eff8000000ull, { 25, 0, 0, 0, 0 }, 0xc, 707, },
- { 125, 3, 1, 0x0000002070000000ull, 0x000001eff8000000ull, { 30, 25, 0, 0, 0 }, 0x8, 708, },
- { 125, 3, 1, 0x0000002078000000ull, 0x000001eff8000000ull, { 31, 25, 0, 0, 0 }, 0x8, 961, },
+ { 123, 3, 0, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 0, 0, 0, 0 }, 0x0, 780, },
+ { 123, 3, 0, 0x0000000098000000ull, 0x000001eff8000000ull, { 18, 0, 0, 0, 0 }, 0x0, 781, },
+ { 124, 3, 0, 0x0000002170000000ull, 0x000001eff8000000ull, { 25, 0, 0, 0, 0 }, 0xc, 706, },
+ { 125, 3, 1, 0x0000002070000000ull, 0x000001eff8000000ull, { 30, 25, 0, 0, 0 }, 0x8, 707, },
+ { 125, 3, 1, 0x0000002078000000ull, 0x000001eff8000000ull, { 31, 25, 0, 0, 0 }, 0x8, 960, },
{ 127, 3, 1, 0x0000008000000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 69, },
{ 127, 3, 1, 0x0000009000000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 70, },
{ 127, 3, 1, 0x000000a000000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 71, },
@@ -4491,12 +4542,12 @@ main_table[] = {
{ 130, 3, 1, 0x0000009080000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 77, },
{ 130, 3, 1, 0x000000a080000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 78, },
{ 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 79, },
- { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 33, 83, 0, 0 }, 0x0, 1122, },
+ { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 33, 83, 0, 0 }, 0x0, 1121, },
{ 131, 3, 1, 0x00000090c0000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 80, },
{ 131, 3, 1, 0x000000a0c0000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 81, },
- { 132, 3, 1, 0x000000c6c0000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 891, },
- { 132, 3, 1, 0x000000d6c0000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 892, },
- { 132, 3, 1, 0x000000e6c0000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 893, },
+ { 132, 3, 1, 0x000000c6c0000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 890, },
+ { 132, 3, 1, 0x000000d6c0000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 891, },
+ { 132, 3, 1, 0x000000e6c0000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 892, },
{ 133, 3, 1, 0x000000c040000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 82, },
{ 133, 3, 1, 0x000000d040000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 83, },
{ 133, 3, 1, 0x000000e040000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 84, },
@@ -4520,164 +4571,163 @@ main_table[] = {
{ 142, 3, 0, 0x000000eb00000000ull, 0x000001eff0000000ull, { 33, 62, 0, 0, 0 }, 0x400, 102, },
{ 143, 3, 0, 0x0000000050000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 103, },
{ 151, 3, 0, 0x0000000110000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 104, },
- { 152, 2, 1, 0x000000e880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1841, },
- { 153, 2, 1, 0x000000ea80000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1842, },
- { 154, 2, 1, 0x000000f880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1843, },
+ { 152, 2, 1, 0x000000e880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1840, },
+ { 153, 2, 1, 0x000000ea80000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1841, },
+ { 154, 2, 1, 0x000000f880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1842, },
{ 155, 1, 1, 0x0000010800000000ull, 0x000001fff80fe000ull, { 24, 26, 0, 0, 0 }, 0x0, 105, },
- { 155, 1, 1, 0x0000010800000000ull, 0x000001ee07f00000ull, { 24, 63, 0, 0, 0 }, 0x40, 106, },
- { 155, 1, 1, 0x0000012000000000ull, 0x000001e000300000ull, { 24, 66, 0, 0, 0 }, 0x40, 107, },
- { 155, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 108, },
- { 155, 2, 1, 0x0000000e00100000ull, 0x000001ee00f00000ull, { 15, 25, 0, 0, 0 }, 0x40, 109, },
- { 155, 2, 1, 0x0000000e00000000ull, 0x000001ee00f00000ull, { 15, 25, 78, 0, 0 }, 0x0, 2391, },
- { 155, 2, 1, 0x0000000188000000ull, 0x000001eff8000000ull, { 24, 16, 0, 0, 0 }, 0x0, 111, },
- { 155, 2, 1, 0x0000000600000000ull, 0x000001ee00000000ull, { 9, 25, 64, 0, 0 }, 0x0, 112, },
- { 155, 2, 1, 0x0000000400000000ull, 0x000001ee00000000ull, { 10, 68, 0, 0, 0 }, 0x0, 113, },
- { 155, 2, 1, 0x0000000180000000ull, 0x000001eff8000000ull, { 24, 8, 0, 0, 0 }, 0x0, 114, },
- { 155, 2, 1, 0x0000000198000000ull, 0x000001eff8000000ull, { 24, 9, 0, 0, 0 }, 0x0, 115, },
- { 155, 2, 1, 0x0000000150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 962, },
- { 155, 2, 1, 0x0000000050000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 963, },
- { 155, 2, 1, 0x0000000190000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 964, },
- { 155, 3, 1, 0x0000000140000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 1051, },
- { 155, 3, 1, 0x0000002150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 1052, },
- { 155, 3, 1, 0x0000002110000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 1053, },
- { 155, 3, 1, 0x0000002160000000ull, 0x000001eff8000000ull, { 17, 25, 0, 0, 0 }, 0x8, 116, },
- { 155, 3, 1, 0x0000002120000000ull, 0x000001eff8000000ull, { 24, 17, 0, 0, 0 }, 0x8, 117, },
- { 155, 3, 1, 0x0000002168000000ull, 0x000001eff8000000ull, { 12, 25, 0, 0, 0 }, 0x8, 118, },
- { 155, 3, 1, 0x0000002148000000ull, 0x000001eff8000000ull, { 13, 25, 0, 0, 0 }, 0x0, 119, },
- { 155, 3, 1, 0x0000002128000000ull, 0x000001eff8000000ull, { 24, 11, 0, 0, 0 }, 0x8, 120, },
- { 155, 3, 1, 0x0000002108000000ull, 0x000001eff8000000ull, { 24, 13, 0, 0, 0 }, 0x0, 121, },
- { 155, 3, 1, 0x0000002000000000ull, 0x000001eff8000000ull, { 38, 25, 0, 0, 0 }, 0x8, 122, },
- { 155, 3, 1, 0x0000002008000000ull, 0x000001eff8000000ull, { 29, 25, 0, 0, 0 }, 0x8, 123, },
- { 155, 3, 1, 0x0000002010000000ull, 0x000001eff8000000ull, { 32, 25, 0, 0, 0 }, 0x8, 124, },
- { 155, 3, 1, 0x0000002018000000ull, 0x000001eff8000000ull, { 35, 25, 0, 0, 0 }, 0x8, 125, },
- { 155, 3, 1, 0x0000002020000000ull, 0x000001eff8000000ull, { 36, 25, 0, 0, 0 }, 0x8, 126, },
- { 155, 3, 1, 0x0000002028000000ull, 0x000001eff8000000ull, { 37, 25, 0, 0, 0 }, 0x8, 127, },
- { 155, 3, 1, 0x0000002030000000ull, 0x000001eff8000000ull, { 34, 25, 0, 0, 0 }, 0x8, 128, },
- { 155, 3, 1, 0x0000002080000000ull, 0x000001eff8000000ull, { 24, 38, 0, 0, 0 }, 0x8, 129, },
- { 155, 3, 1, 0x0000002088000000ull, 0x000001eff8000000ull, { 24, 29, 0, 0, 0 }, 0x8, 130, },
- { 155, 3, 1, 0x0000002090000000ull, 0x000001eff8000000ull, { 24, 32, 0, 0, 0 }, 0x8, 131, },
- { 155, 3, 1, 0x0000002098000000ull, 0x000001eff8000000ull, { 24, 35, 0, 0, 0 }, 0x8, 132, },
- { 155, 3, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 24, 36, 0, 0, 0 }, 0x8, 133, },
- { 155, 3, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 24, 37, 0, 0, 0 }, 0x0, 134, },
- { 155, 3, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 24, 34, 0, 0, 0 }, 0x8, 135, },
- { 155, 3, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 136, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 14, 0, 0, 0 }, 0x0, 137, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 55, 0, 0, 0 }, 0x0, 138, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 25, 0, 0, 0 }, 0x0, 139, },
- { 156, 6, 1, 0x000000c000000000ull, 0x000001e000100000ull, { 24, 70, 0, 0, 0 }, 0x0, 140, },
- { 157, 2, 1, 0x000000eca0000000ull, 0x000001fff0000000ull, { 24, 25, 74, 0, 0 }, 0x0, 141, },
- { 158, 2, 1, 0x000000eea0000000ull, 0x000001fff0000000ull, { 24, 25, 75, 0, 0 }, 0x0, 142, },
- { 168, 4, 0, 0x0000004000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 400, },
- { 168, 5, 0, 0x0000000008000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 814, },
- { 168, 2, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 965, },
- { 168, 3, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1054, },
- { 168, 6, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2508, },
- { 168, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 143, },
- { 175, 1, 1, 0x0000010070000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 144, },
- { 175, 1, 1, 0x0000010170000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 145, },
- { 178, 2, 1, 0x000000ea00000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2490, },
- { 179, 2, 1, 0x000000f820000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2393, },
- { 180, 1, 1, 0x0000010400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 146, },
- { 181, 1, 1, 0x0000010600000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 147, },
- { 182, 1, 1, 0x0000011400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 148, },
- { 183, 1, 1, 0x0000010450000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 149, },
- { 184, 1, 1, 0x0000010650000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 150, },
- { 185, 1, 1, 0x0000010470000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 151, },
- { 186, 1, 1, 0x0000010670000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 152, },
- { 187, 1, 1, 0x0000010520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 800, },
- { 188, 1, 1, 0x0000010720000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 801, },
- { 189, 1, 1, 0x0000011520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 802, },
- { 190, 2, 1, 0x000000e850000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2407, },
- { 191, 2, 1, 0x000000ea70000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 153, },
- { 192, 2, 1, 0x000000e810000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2408, },
- { 193, 2, 1, 0x000000ea30000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 154, },
- { 194, 2, 1, 0x000000ead0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1844, },
- { 195, 2, 1, 0x000000e230000000ull, 0x000001ff30000000ull, { 24, 25, 26, 42, 0 }, 0x0, 155, },
- { 196, 2, 1, 0x000000e690000000ull, 0x000001fff0000000ull, { 24, 26, 0, 0, 0 }, 0x0, 156, },
- { 198, 3, 1, 0x00000021c0000000ull, 0x000001eff8000000ull, { 24, 26, 25, 0, 0 }, 0x0, 1845, },
- { 198, 3, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 24, 26, 49, 0, 0 }, 0x0, 1846, },
- { 198, 3, 0, 0x0000002188000000ull, 0x000001eff8000000ull, { 26, 49, 0, 0, 0 }, 0x0, 1870, },
- { 199, 2, 1, 0x000000e8b0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 157, },
- { 200, 2, 1, 0x000000e240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 158, },
- { 200, 2, 1, 0x000000ee50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 159, },
- { 201, 2, 1, 0x000000f040000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 160, },
- { 201, 2, 1, 0x000000fc50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 161, },
- { 202, 1, 1, 0x0000010680000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 162, },
- { 203, 2, 1, 0x000000e220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 163, },
- { 203, 2, 1, 0x000000e630000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 164, },
- { 204, 2, 1, 0x000000f020000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 165, },
- { 204, 2, 1, 0x000000f430000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 166, },
- { 205, 1, 1, 0x00000106c0000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 167, },
- { 206, 1, 1, 0x0000010420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 168, },
- { 207, 1, 1, 0x0000010620000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 169, },
- { 208, 1, 1, 0x0000011420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 170, },
- { 209, 3, 0, 0x0000002048000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 993, },
- { 209, 3, 0, 0x0000002050000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0xc, 902, },
- { 209, 3, 0, 0x00000021a0000000ull, 0x000001eff8000000ull, { 26, 0, 0, 0, 0 }, 0x8, 783, },
- { 210, 3, 0, 0x0000002060000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 709, },
- { 215, 4, 0, 0x0000000040000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x22c, 171, },
- { 216, 3, 0, 0x0000000038000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 172, },
- { 217, 3, 0, 0x0000000028000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 173, },
- { 226, 3, 1, 0x000000c708000000ull, 0x000001ffc8000000ull, { 18, 25, 0, 0, 0 }, 0x0, 2318, },
- { 227, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 0, 0 }, 0x140, 174, },
- { 227, 2, 1, 0x000000f240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 175, },
- { 228, 1, 1, 0x0000010080000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 176, },
- { 229, 1, 1, 0x00000100c0000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 177, },
- { 230, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 0, 0 }, 0x140, 2414, },
- { 230, 2, 1, 0x000000f220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 179, },
- { 231, 2, 1, 0x000000ac00000000ull, 0x000001ee00000000ull, { 24, 25, 26, 44, 0 }, 0x0, 180, },
- { 236, 3, 0, 0x0000000180000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 711, },
- { 237, 3, 0, 0x0000000030000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 181, },
- { 239, 3, 1, 0x0000008c00000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 182, },
- { 239, 3, 1, 0x000000ac00000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 183, },
- { 240, 3, 1, 0x0000008c08000000ull, 0x000001fff8000000ull, { 33, 25, 1, 0, 0 }, 0x0, 184, },
- { 241, 3, 1, 0x0000008c40000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 185, },
- { 241, 3, 1, 0x000000ac40000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 186, },
- { 242, 3, 1, 0x0000008c80000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 187, },
- { 242, 3, 1, 0x000000ac80000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 188, },
- { 243, 3, 1, 0x0000008cc0000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 189, },
- { 243, 3, 1, 0x000000acc0000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 190, },
- { 244, 3, 1, 0x000000cec0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 2321, },
- { 244, 3, 1, 0x000000eec0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 2322, },
- { 245, 3, 1, 0x000000cc40000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 191, },
- { 245, 3, 1, 0x000000ec40000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 192, },
- { 246, 3, 1, 0x000000ccc0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 193, },
- { 246, 3, 1, 0x000000ecc0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 194, },
- { 247, 3, 1, 0x000000cc00000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 195, },
- { 247, 3, 1, 0x000000ec00000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 196, },
- { 248, 3, 1, 0x000000cc80000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 197, },
- { 248, 3, 1, 0x000000ec80000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 198, },
- { 249, 1, 1, 0x0000010028000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 199, },
- { 249, 1, 1, 0x0000010020000000ull, 0x000001eff8000000ull, { 24, 25, 26, 4, 0 }, 0x0, 200, },
- { 249, 1, 1, 0x0000010128000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 201, },
- { 250, 3, 0, 0x0000000020000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 202, },
- { 251, 2, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 203, },
- { 252, 2, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 204, },
- { 253, 2, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 205, },
- { 254, 3, 0, 0x0000000198000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 968, },
- { 255, 3, 1, 0x00000020f8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 206, },
- { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 22, 23, 26, 76, 0 }, 0x0, 2513, },
- { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 23, 22, 26, 76, 0 }, 0x40, 1745, },
- { 257, 3, 1, 0x00000020d0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 207, },
- { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 22, 23, 26, 0, 0 }, 0x0, 2515, },
- { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 23, 22, 26, 0, 0 }, 0x40, 1747, },
- { 259, 3, 1, 0x00000020f0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 208, },
- { 261, 3, 1, 0x00000020d8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 209, },
- { 265, 2, 1, 0x000000e840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 949, },
- { 266, 2, 1, 0x000000ea40000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 950, },
- { 267, 2, 1, 0x000000f840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 951, },
- { 275, 3, 1, 0x0000008208000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 210, },
- { 276, 3, 1, 0x0000008248000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 211, },
- { 277, 3, 1, 0x0000008288000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 212, },
- { 278, 3, 1, 0x00000082c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 213, },
- { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 997, },
- { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 1045, },
- { 281, 5, 1, 0x000001d000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 998, },
- { 282, 1, 1, 0x0000010078000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 214, },
- { 282, 1, 1, 0x0000010178000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 215, },
- { 285, 2, 1, 0x0000000080000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 216, },
- { 286, 2, 1, 0x0000000088000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 217, },
- { 287, 2, 1, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 218, },
+ { 155, 1, 1, 0x0000012000000000ull, 0x000001e000300000ull, { 24, 66, 0, 0, 0 }, 0x40, 106, },
+ { 155, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 107, },
+ { 155, 2, 1, 0x0000000e00100000ull, 0x000001ee00f00000ull, { 15, 25, 0, 0, 0 }, 0x40, 108, },
+ { 155, 2, 1, 0x0000000e00000000ull, 0x000001ee00f00000ull, { 15, 25, 78, 0, 0 }, 0x0, 2390, },
+ { 155, 2, 1, 0x0000000188000000ull, 0x000001eff8000000ull, { 24, 16, 0, 0, 0 }, 0x0, 110, },
+ { 155, 2, 1, 0x0000000600000000ull, 0x000001ee00000000ull, { 9, 25, 64, 0, 0 }, 0x0, 111, },
+ { 155, 2, 1, 0x0000000400000000ull, 0x000001ee00000000ull, { 10, 68, 0, 0, 0 }, 0x0, 112, },
+ { 155, 2, 1, 0x0000000180000000ull, 0x000001eff8000000ull, { 24, 8, 0, 0, 0 }, 0x0, 113, },
+ { 155, 2, 1, 0x0000000198000000ull, 0x000001eff8000000ull, { 24, 9, 0, 0, 0 }, 0x0, 114, },
+ { 155, 2, 1, 0x0000000150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 961, },
+ { 155, 2, 1, 0x0000000050000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 962, },
+ { 155, 2, 1, 0x0000000190000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 963, },
+ { 155, 3, 1, 0x0000000140000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 1050, },
+ { 155, 3, 1, 0x0000002150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 1051, },
+ { 155, 3, 1, 0x0000002110000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 1052, },
+ { 155, 3, 1, 0x0000002160000000ull, 0x000001eff8000000ull, { 17, 25, 0, 0, 0 }, 0x8, 115, },
+ { 155, 3, 1, 0x0000002120000000ull, 0x000001eff8000000ull, { 24, 17, 0, 0, 0 }, 0x8, 116, },
+ { 155, 3, 1, 0x0000002168000000ull, 0x000001eff8000000ull, { 12, 25, 0, 0, 0 }, 0x8, 117, },
+ { 155, 3, 1, 0x0000002148000000ull, 0x000001eff8000000ull, { 13, 25, 0, 0, 0 }, 0x0, 118, },
+ { 155, 3, 1, 0x0000002128000000ull, 0x000001eff8000000ull, { 24, 11, 0, 0, 0 }, 0x8, 119, },
+ { 155, 3, 1, 0x0000002108000000ull, 0x000001eff8000000ull, { 24, 13, 0, 0, 0 }, 0x0, 120, },
+ { 155, 3, 1, 0x0000002000000000ull, 0x000001eff8000000ull, { 38, 25, 0, 0, 0 }, 0x8, 121, },
+ { 155, 3, 1, 0x0000002008000000ull, 0x000001eff8000000ull, { 29, 25, 0, 0, 0 }, 0x8, 122, },
+ { 155, 3, 1, 0x0000002010000000ull, 0x000001eff8000000ull, { 32, 25, 0, 0, 0 }, 0x8, 123, },
+ { 155, 3, 1, 0x0000002018000000ull, 0x000001eff8000000ull, { 35, 25, 0, 0, 0 }, 0x8, 124, },
+ { 155, 3, 1, 0x0000002020000000ull, 0x000001eff8000000ull, { 36, 25, 0, 0, 0 }, 0x8, 125, },
+ { 155, 3, 1, 0x0000002028000000ull, 0x000001eff8000000ull, { 37, 25, 0, 0, 0 }, 0x8, 126, },
+ { 155, 3, 1, 0x0000002030000000ull, 0x000001eff8000000ull, { 34, 25, 0, 0, 0 }, 0x8, 127, },
+ { 155, 3, 1, 0x0000002080000000ull, 0x000001eff8000000ull, { 24, 38, 0, 0, 0 }, 0x8, 128, },
+ { 155, 3, 1, 0x0000002088000000ull, 0x000001eff8000000ull, { 24, 29, 0, 0, 0 }, 0x8, 129, },
+ { 155, 3, 1, 0x0000002090000000ull, 0x000001eff8000000ull, { 24, 32, 0, 0, 0 }, 0x8, 130, },
+ { 155, 3, 1, 0x0000002098000000ull, 0x000001eff8000000ull, { 24, 35, 0, 0, 0 }, 0x8, 131, },
+ { 155, 3, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 24, 36, 0, 0, 0 }, 0x8, 132, },
+ { 155, 3, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 24, 37, 0, 0, 0 }, 0x0, 133, },
+ { 155, 3, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 24, 34, 0, 0, 0 }, 0x8, 134, },
+ { 155, 3, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 135, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 14, 0, 0, 0 }, 0x0, 136, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 55, 0, 0, 0 }, 0x0, 137, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 25, 0, 0, 0 }, 0x0, 138, },
+ { 156, 6, 1, 0x000000c000000000ull, 0x000001e000100000ull, { 24, 70, 0, 0, 0 }, 0x0, 139, },
+ { 157, 2, 1, 0x000000eca0000000ull, 0x000001fff0000000ull, { 24, 25, 74, 0, 0 }, 0x0, 140, },
+ { 158, 2, 1, 0x000000eea0000000ull, 0x000001fff0000000ull, { 24, 25, 75, 0, 0 }, 0x0, 141, },
+ { 168, 4, 0, 0x0000004000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 399, },
+ { 168, 5, 0, 0x0000000008000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 813, },
+ { 168, 2, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 964, },
+ { 168, 3, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1053, },
+ { 168, 6, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2507, },
+ { 168, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 142, },
+ { 175, 1, 1, 0x0000010070000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 143, },
+ { 175, 1, 1, 0x0000010170000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 144, },
+ { 178, 2, 1, 0x000000ea00000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2489, },
+ { 179, 2, 1, 0x000000f820000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2392, },
+ { 180, 1, 1, 0x0000010400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 145, },
+ { 181, 1, 1, 0x0000010600000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 146, },
+ { 182, 1, 1, 0x0000011400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 147, },
+ { 183, 1, 1, 0x0000010450000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 148, },
+ { 184, 1, 1, 0x0000010650000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 149, },
+ { 185, 1, 1, 0x0000010470000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 150, },
+ { 186, 1, 1, 0x0000010670000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 151, },
+ { 187, 1, 1, 0x0000010520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 799, },
+ { 188, 1, 1, 0x0000010720000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 800, },
+ { 189, 1, 1, 0x0000011520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 801, },
+ { 190, 2, 1, 0x000000e850000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2406, },
+ { 191, 2, 1, 0x000000ea70000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 152, },
+ { 192, 2, 1, 0x000000e810000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2407, },
+ { 193, 2, 1, 0x000000ea30000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 153, },
+ { 194, 2, 1, 0x000000ead0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1843, },
+ { 195, 2, 1, 0x000000e230000000ull, 0x000001ff30000000ull, { 24, 25, 26, 42, 0 }, 0x0, 154, },
+ { 196, 2, 1, 0x000000e690000000ull, 0x000001fff0000000ull, { 24, 26, 0, 0, 0 }, 0x0, 155, },
+ { 198, 3, 1, 0x00000021c0000000ull, 0x000001eff8000000ull, { 24, 26, 25, 0, 0 }, 0x0, 1844, },
+ { 198, 3, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 24, 26, 49, 0, 0 }, 0x0, 1845, },
+ { 198, 3, 0, 0x0000002188000000ull, 0x000001eff8000000ull, { 26, 49, 0, 0, 0 }, 0x0, 1869, },
+ { 199, 2, 1, 0x000000e8b0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 156, },
+ { 200, 2, 1, 0x000000e240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 157, },
+ { 200, 2, 1, 0x000000ee50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 158, },
+ { 201, 2, 1, 0x000000f040000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 159, },
+ { 201, 2, 1, 0x000000fc50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 160, },
+ { 202, 1, 1, 0x0000010680000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 161, },
+ { 203, 2, 1, 0x000000e220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 162, },
+ { 203, 2, 1, 0x000000e630000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 163, },
+ { 204, 2, 1, 0x000000f020000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 164, },
+ { 204, 2, 1, 0x000000f430000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 165, },
+ { 205, 1, 1, 0x00000106c0000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 166, },
+ { 206, 1, 1, 0x0000010420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 167, },
+ { 207, 1, 1, 0x0000010620000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 168, },
+ { 208, 1, 1, 0x0000011420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 169, },
+ { 209, 3, 0, 0x0000002048000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 992, },
+ { 209, 3, 0, 0x0000002050000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0xc, 901, },
+ { 209, 3, 0, 0x00000021a0000000ull, 0x000001eff8000000ull, { 26, 0, 0, 0, 0 }, 0x8, 782, },
+ { 210, 3, 0, 0x0000002060000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 708, },
+ { 215, 4, 0, 0x0000000040000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x22c, 170, },
+ { 216, 3, 0, 0x0000000038000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 171, },
+ { 217, 3, 0, 0x0000000028000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 172, },
+ { 226, 3, 1, 0x000000c708000000ull, 0x000001ffc8000000ull, { 18, 25, 0, 0, 0 }, 0x0, 2317, },
+ { 227, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 0, 0 }, 0x140, 173, },
+ { 227, 2, 1, 0x000000f240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 174, },
+ { 228, 1, 1, 0x0000010080000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 175, },
+ { 229, 1, 1, 0x00000100c0000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 176, },
+ { 230, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 0, 0 }, 0x140, 2413, },
+ { 230, 2, 1, 0x000000f220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 178, },
+ { 231, 2, 1, 0x000000ac00000000ull, 0x000001ee00000000ull, { 24, 25, 26, 44, 0 }, 0x0, 179, },
+ { 236, 3, 0, 0x0000000180000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 710, },
+ { 237, 3, 0, 0x0000000030000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 180, },
+ { 239, 3, 1, 0x0000008c00000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 181, },
+ { 239, 3, 1, 0x000000ac00000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 182, },
+ { 240, 3, 1, 0x0000008c08000000ull, 0x000001fff8000000ull, { 33, 25, 1, 0, 0 }, 0x0, 183, },
+ { 241, 3, 1, 0x0000008c40000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 184, },
+ { 241, 3, 1, 0x000000ac40000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 185, },
+ { 242, 3, 1, 0x0000008c80000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 186, },
+ { 242, 3, 1, 0x000000ac80000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 187, },
+ { 243, 3, 1, 0x0000008cc0000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 188, },
+ { 243, 3, 1, 0x000000acc0000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 189, },
+ { 244, 3, 1, 0x000000cec0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 2320, },
+ { 244, 3, 1, 0x000000eec0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 2321, },
+ { 245, 3, 1, 0x000000cc40000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 190, },
+ { 245, 3, 1, 0x000000ec40000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 191, },
+ { 246, 3, 1, 0x000000ccc0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 192, },
+ { 246, 3, 1, 0x000000ecc0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 193, },
+ { 247, 3, 1, 0x000000cc00000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 194, },
+ { 247, 3, 1, 0x000000ec00000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 195, },
+ { 248, 3, 1, 0x000000cc80000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 196, },
+ { 248, 3, 1, 0x000000ec80000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 197, },
+ { 249, 1, 1, 0x0000010028000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 198, },
+ { 249, 1, 1, 0x0000010020000000ull, 0x000001eff8000000ull, { 24, 25, 26, 4, 0 }, 0x0, 199, },
+ { 249, 1, 1, 0x0000010128000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 200, },
+ { 250, 3, 0, 0x0000000020000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 201, },
+ { 251, 2, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 202, },
+ { 252, 2, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 203, },
+ { 253, 2, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 204, },
+ { 254, 3, 0, 0x0000000198000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 967, },
+ { 255, 3, 1, 0x00000020f8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 205, },
+ { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 22, 23, 26, 76, 0 }, 0x0, 2512, },
+ { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 23, 22, 26, 76, 0 }, 0x40, 1744, },
+ { 257, 3, 1, 0x00000020d0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 206, },
+ { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 22, 23, 26, 0, 0 }, 0x0, 2514, },
+ { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 23, 22, 26, 0, 0 }, 0x40, 1746, },
+ { 259, 3, 1, 0x00000020f0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 207, },
+ { 261, 3, 1, 0x00000020d8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 208, },
+ { 265, 2, 1, 0x000000e840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 948, },
+ { 266, 2, 1, 0x000000ea40000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 949, },
+ { 267, 2, 1, 0x000000f840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 950, },
+ { 275, 3, 1, 0x0000008208000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 209, },
+ { 276, 3, 1, 0x0000008248000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 210, },
+ { 277, 3, 1, 0x0000008288000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 211, },
+ { 278, 3, 1, 0x00000082c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 212, },
+ { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 996, },
+ { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 1044, },
+ { 281, 5, 1, 0x000001d000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 997, },
+ { 282, 1, 1, 0x0000010078000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 213, },
+ { 282, 1, 1, 0x0000010178000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 214, },
+ { 285, 2, 1, 0x0000000080000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 215, },
+ { 286, 2, 1, 0x0000000088000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 216, },
+ { 287, 2, 1, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 217, },
};
static const char dis_table[] = {
@@ -5206,7 +5256,7 @@ static const char dis_table[] = {
0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, 0x02, 0xc8, 0x80, 0x10, 0x10,
0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, 0x24, 0x02, 0xa0, 0xd7, 0x42,
0x00, 0xa4, 0x32, 0x30, 0x36, 0x48, 0xa4, 0x32, 0x10, 0x36, 0x44, 0xa0,
-0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, 0x88, 0x9e, 0x88, 0x09, 0xd0,
+0x14, 0x68, 0xa0, 0x10, 0x90, 0xa0, 0x0c, 0x60, 0x9e, 0x88, 0x09, 0xd0,
0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1,
0x31, 0xc0, 0x85, 0x34, 0xe3, 0xcb, 0x61, 0x2a, 0x80, 0x85, 0x34, 0xb9,
0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, 0x91, 0x10, 0x90, 0xa0, 0x90,
@@ -5221,7 +5271,7 @@ static const char dis_table[] = {
0x38, 0x95, 0x90, 0x28, 0x80, 0x38, 0x8e, 0x80, 0x38, 0x8d, 0x81, 0x10,
0x10, 0x80, 0xa4, 0x44, 0x88, 0x38, 0x92, 0xcb, 0x61, 0x2a, 0x40, 0x85,
0x34, 0xb8, 0x90, 0xd8, 0x88, 0x00, 0x90, 0x84, 0x90, 0x38, 0xc1, 0xc0,
-0x85, 0x38, 0xb1, 0xc9, 0xe1, 0x31, 0x80, 0x85, 0x34, 0xdf, 0xcb, 0x61,
+0x85, 0x38, 0xb0, 0xc9, 0xe1, 0x31, 0x80, 0x85, 0x34, 0xdf, 0xcb, 0x61,
0x2a, 0x00, 0x85, 0x34, 0xb7, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9,
0xe1, 0x31, 0x40, 0x85, 0x34, 0xdd, 0xcb, 0x61, 0x29, 0xc0, 0x85, 0x34,
0xb6, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9,
@@ -5233,86 +5283,85 @@ static const char dis_table[] = {
0xc9, 0xe1, 0x30, 0x40, 0x85, 0x34, 0xd5, 0xcb, 0x61, 0x28, 0xc0, 0x85,
0x34, 0xb2, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x30, 0x00,
0x85, 0x34, 0xd3, 0xcb, 0x61, 0x28, 0x80, 0x85, 0x34, 0xb1, 0x92, 0x38,
-0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, 0x46,
-0x00, 0x38, 0xc1, 0x80, 0xa4, 0x45, 0xf8, 0x38, 0xbe, 0x90, 0x28, 0x81,
-0x38, 0xbd, 0x90, 0x38, 0xa4, 0x45, 0xd8, 0x38, 0xbc, 0xa4, 0x45, 0xc8,
-0x38, 0xba, 0x90, 0x28, 0x80, 0x38, 0xb8, 0x80, 0x38, 0xb7, 0x80, 0x90,
-0x40, 0x10, 0x10, 0x80, 0x24, 0x45, 0xb0, 0x10, 0x10, 0x90, 0x38, 0xa4,
-0x45, 0xa0, 0x38, 0xb5, 0xa4, 0x45, 0x90, 0x38, 0xb3, 0x90, 0x50, 0x80,
-0xc9, 0xa2, 0x2b, 0xc0, 0x85, 0x38, 0xb0, 0x80, 0x38, 0xae, 0x9a, 0xd0,
-0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10,
-0xc9, 0xe1, 0x2f, 0x80, 0x85, 0x34, 0xcf, 0xcb, 0x61, 0x28, 0x00, 0x85,
-0x34, 0xaf, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x40,
-0x85, 0x34, 0xcd, 0xcb, 0x61, 0x27, 0xc0, 0x85, 0x34, 0xae, 0x90, 0xb0,
-0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x00, 0x85, 0x34,
-0xcb, 0xcb, 0x61, 0x27, 0x80, 0x85, 0x34, 0xad, 0x88, 0x00, 0x68, 0x84,
-0x10, 0x10, 0xc9, 0xe1, 0x2e, 0xc0, 0x85, 0x34, 0xc9, 0xcb, 0x61, 0x27,
-0x40, 0x85, 0x34, 0xac, 0x90, 0x90, 0x90, 0x48, 0xcb, 0xa1, 0x25, 0x80,
-0x85, 0x34, 0x9b, 0xcb, 0xa1, 0x25, 0x40, 0x85, 0x34, 0x9a, 0x90, 0x48,
-0xcb, 0xa1, 0x25, 0x00, 0x85, 0x34, 0x99, 0xcb, 0xa1, 0x24, 0xc0, 0x85,
-0x34, 0x98, 0xcb, 0xa2, 0x22, 0xc0, 0x80, 0x38, 0x8c, 0x92, 0x40, 0x91,
-0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x24, 0x10, 0x84, 0x24, 0x24, 0x88,
-0x8c, 0x24, 0x08, 0x84, 0x24, 0x24, 0x80, 0x90, 0x48, 0x8c, 0x24, 0x00,
-0x84, 0x24, 0x24, 0x78, 0x8c, 0x23, 0xf8, 0x84, 0x24, 0x24, 0x70, 0x90,
-0x90, 0x90, 0x48, 0x8c, 0x23, 0xe8, 0x84, 0x24, 0x24, 0x60, 0x8c, 0x23,
-0xe0, 0x84, 0x24, 0x24, 0x58, 0x90, 0x48, 0x8c, 0x23, 0xd8, 0x84, 0x24,
-0x24, 0x50, 0x8c, 0x23, 0xd0, 0x84, 0x24, 0x24, 0x48, 0x91, 0x20, 0x90,
-0x90, 0x90, 0x48, 0x8c, 0x23, 0xc0, 0x84, 0x24, 0x24, 0x38, 0x8c, 0x23,
-0xb8, 0x84, 0x24, 0x24, 0x30, 0x90, 0x48, 0x8c, 0x23, 0xb0, 0x84, 0x24,
-0x24, 0x28, 0x8c, 0x23, 0xa8, 0x84, 0x24, 0x24, 0x20, 0x90, 0x38, 0xa4,
-0x23, 0x90, 0x34, 0x73, 0xa4, 0x23, 0x80, 0x34, 0x71, 0xa0, 0x0f, 0x50,
-0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98,
-0x50, 0x00, 0x80, 0xe5, 0x22, 0x21, 0xc0, 0x38, 0x83, 0xe5, 0x22, 0x1d,
-0xc0, 0x38, 0x81, 0xcb, 0x61, 0x17, 0xc0, 0x85, 0x34, 0x6e, 0x98, 0x50,
-0x00, 0x80, 0xe5, 0x22, 0x19, 0xc0, 0x38, 0x63, 0xe5, 0x22, 0x15, 0xc0,
-0x38, 0x61, 0xcb, 0x61, 0x17, 0x80, 0x85, 0x34, 0x6d, 0x90, 0x48, 0xcb,
-0xa1, 0x17, 0x40, 0x85, 0x34, 0x6c, 0xcb, 0xa1, 0x17, 0x00, 0x85, 0x34,
-0x6b, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0e,
-0xc0, 0x38, 0x47, 0xe5, 0x22, 0x08, 0xc0, 0x38, 0x2f, 0xcb, 0x61, 0x16,
-0x80, 0x85, 0x34, 0x69, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x02, 0xc0,
-0x38, 0x17, 0xe5, 0x21, 0xfc, 0xc0, 0x37, 0xff, 0xcb, 0x61, 0x16, 0x40,
-0x85, 0x34, 0x68, 0x90, 0x48, 0xcb, 0xa1, 0x16, 0x00, 0x85, 0x34, 0x67,
-0xcb, 0xa1, 0x15, 0xc0, 0x85, 0x34, 0x66, 0x92, 0x20, 0x91, 0x30, 0x90,
-0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0xa0, 0x84, 0x30,
-0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, 0x84, 0x30, 0x3c, 0xd5, 0x02,
-0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, 0xc0, 0x81, 0x30, 0x24, 0x90,
-0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x1c, 0xc0, 0xc0, 0x81,
-0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x10, 0xc0, 0xc0,
-0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, 0xd5, 0x03, 0x80, 0xc8, 0xe1,
-0xf8, 0xc0, 0x81, 0x8c, 0x01, 0xc0, 0x84, 0x30, 0x40, 0xc8, 0xe1, 0xf9,
-0xc0, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, 0x3d, 0xd5, 0x02, 0x80, 0xc8,
-0xe1, 0xf8, 0x40, 0x81, 0x30, 0x2c, 0xc8, 0xe1, 0xf5, 0x40, 0x81, 0x30,
-0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xef, 0x40, 0x81, 0x30,
-0x20, 0xc8, 0xe1, 0xf0, 0x40, 0x81, 0x30, 0x1a, 0xd5, 0x02, 0x80, 0xc8,
-0xe1, 0xee, 0xc0, 0x81, 0x30, 0x14, 0xc8, 0xe1, 0xeb, 0xc0, 0x81, 0x30,
-0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00,
-0x80, 0xe5, 0x22, 0x1b, 0xc0, 0x38, 0x6b, 0xe5, 0x22, 0x1c, 0xc0, 0x38,
-0x7d, 0xcb, 0x61, 0x15, 0x40, 0x85, 0x34, 0x64, 0x98, 0x50, 0x00, 0x80,
-0xe5, 0x22, 0x13, 0xc0, 0x38, 0x4b, 0xe5, 0x22, 0x14, 0xc0, 0x38, 0x5d,
-0xcb, 0x61, 0x15, 0x00, 0x85, 0x34, 0x63, 0x90, 0x48, 0xcb, 0xa1, 0x14,
-0xc0, 0x85, 0x34, 0x62, 0xcb, 0xa1, 0x14, 0x80, 0x85, 0x34, 0x61, 0x91,
-0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0c, 0xc0, 0x38,
-0x3f, 0xe5, 0x22, 0x06, 0xc0, 0x38, 0x27, 0xcb, 0x61, 0x12, 0xc0, 0x85,
-0x34, 0x50, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x00, 0xc0, 0x38, 0x0f,
-0xe5, 0x21, 0xfa, 0xc0, 0x37, 0xf7, 0xcb, 0x61, 0x12, 0x80, 0x85, 0x34,
-0x4f, 0x90, 0x48, 0xcb, 0xa1, 0x12, 0x40, 0x85, 0x34, 0x4e, 0xcb, 0xa1,
-0x12, 0x00, 0x85, 0x34, 0x4d, 0x91, 0x00, 0x90, 0x80, 0x90, 0x40, 0xe5,
-0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, 0x01, 0x80, 0x30, 0x07, 0x90,
-0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, 0xe5, 0x20, 0x00, 0x00, 0x30,
-0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xf2, 0xc0, 0x37, 0xc5, 0xe5,
-0x21, 0xf4, 0x00, 0x37, 0xdb, 0x90, 0x40, 0xe5, 0x21, 0xe9, 0x40, 0x37,
-0x9f, 0xe5, 0x21, 0xea, 0x80, 0x37, 0xb5, 0x80, 0x99, 0x28, 0x02, 0xf0,
-0x8c, 0x21, 0xf8, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22, 0x1e, 0xc0, 0x38,
-0x79, 0xe5, 0x22, 0x1d, 0x40, 0x38, 0x7f, 0x90, 0x40, 0xe5, 0x22, 0x16,
-0xc0, 0x38, 0x59, 0xe5, 0x22, 0x15, 0x40, 0x38, 0x5f, 0x91, 0x48, 0x90,
-0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0d, 0xc0, 0x38, 0x43, 0xe5,
-0x22, 0x07, 0xc0, 0x38, 0x2b, 0xcb, 0x61, 0x10, 0x80, 0x85, 0x34, 0x46,
-0x90, 0x40, 0xe5, 0x22, 0x01, 0xc0, 0x38, 0x13, 0xe5, 0x21, 0xfb, 0xc0,
-0x37, 0xfb, 0x90, 0x48, 0xcb, 0xa1, 0x10, 0x00, 0x85, 0x34, 0x44, 0xcb,
-0xa1, 0x10, 0x40, 0x85, 0x34, 0x45, 0x10, 0x10, 0x90, 0x80, 0x90, 0x40,
-0xe5, 0x21, 0xf6, 0x40, 0x37, 0xd7, 0xe5, 0x21, 0xf4, 0xc0, 0x37, 0xdf,
-0x90, 0x40, 0xe5, 0x21, 0xec, 0xc0, 0x37, 0xb1, 0xe5, 0x21, 0xeb, 0x40,
-0x37, 0xb9,
+0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, 0x45,
+0xf8, 0x38, 0xc0, 0x80, 0xa4, 0x45, 0xf0, 0x38, 0xbd, 0x90, 0x28, 0x81,
+0x38, 0xbc, 0x90, 0x38, 0xa4, 0x45, 0xd0, 0x38, 0xbb, 0xa4, 0x45, 0xc0,
+0x38, 0xb9, 0x90, 0x28, 0x80, 0x38, 0xb7, 0x80, 0x38, 0xb6, 0x80, 0x90,
+0x40, 0x10, 0x10, 0x80, 0x24, 0x45, 0xa8, 0x10, 0x10, 0x90, 0x38, 0xa4,
+0x45, 0x98, 0x38, 0xb4, 0xa4, 0x45, 0x88, 0x38, 0xb2, 0x90, 0x28, 0x80,
+0x38, 0xaf, 0x80, 0x38, 0xae, 0x9a, 0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90,
+0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x80, 0x85,
+0x34, 0xcf, 0xcb, 0x61, 0x28, 0x00, 0x85, 0x34, 0xaf, 0x88, 0x00, 0x68,
+0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x40, 0x85, 0x34, 0xcd, 0xcb, 0x61,
+0x27, 0xc0, 0x85, 0x34, 0xae, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10,
+0x10, 0xc9, 0xe1, 0x2f, 0x00, 0x85, 0x34, 0xcb, 0xcb, 0x61, 0x27, 0x80,
+0x85, 0x34, 0xad, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2e,
+0xc0, 0x85, 0x34, 0xc9, 0xcb, 0x61, 0x27, 0x40, 0x85, 0x34, 0xac, 0x90,
+0x90, 0x90, 0x48, 0xcb, 0xa1, 0x25, 0x80, 0x85, 0x34, 0x9b, 0xcb, 0xa1,
+0x25, 0x40, 0x85, 0x34, 0x9a, 0x90, 0x48, 0xcb, 0xa1, 0x25, 0x00, 0x85,
+0x34, 0x99, 0xcb, 0xa1, 0x24, 0xc0, 0x85, 0x34, 0x98, 0xcb, 0xa2, 0x22,
+0xc0, 0x80, 0x38, 0x8c, 0x92, 0x40, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48,
+0x8c, 0x24, 0x10, 0x84, 0x24, 0x24, 0x88, 0x8c, 0x24, 0x08, 0x84, 0x24,
+0x24, 0x80, 0x90, 0x48, 0x8c, 0x24, 0x00, 0x84, 0x24, 0x24, 0x78, 0x8c,
+0x23, 0xf8, 0x84, 0x24, 0x24, 0x70, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23,
+0xe8, 0x84, 0x24, 0x24, 0x60, 0x8c, 0x23, 0xe0, 0x84, 0x24, 0x24, 0x58,
+0x90, 0x48, 0x8c, 0x23, 0xd8, 0x84, 0x24, 0x24, 0x50, 0x8c, 0x23, 0xd0,
+0x84, 0x24, 0x24, 0x48, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23,
+0xc0, 0x84, 0x24, 0x24, 0x38, 0x8c, 0x23, 0xb8, 0x84, 0x24, 0x24, 0x30,
+0x90, 0x48, 0x8c, 0x23, 0xb0, 0x84, 0x24, 0x24, 0x28, 0x8c, 0x23, 0xa8,
+0x84, 0x24, 0x24, 0x20, 0x90, 0x38, 0xa4, 0x23, 0x90, 0x34, 0x73, 0xa4,
+0x23, 0x80, 0x34, 0x71, 0xa0, 0x0f, 0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30,
+0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22,
+0x21, 0xc0, 0x38, 0x83, 0xe5, 0x22, 0x1d, 0xc0, 0x38, 0x81, 0xcb, 0x61,
+0x17, 0xc0, 0x85, 0x34, 0x6e, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x19,
+0xc0, 0x38, 0x63, 0xe5, 0x22, 0x15, 0xc0, 0x38, 0x61, 0xcb, 0x61, 0x17,
+0x80, 0x85, 0x34, 0x6d, 0x90, 0x48, 0xcb, 0xa1, 0x17, 0x40, 0x85, 0x34,
+0x6c, 0xcb, 0xa1, 0x17, 0x00, 0x85, 0x34, 0x6b, 0x91, 0x90, 0x90, 0xc8,
+0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0e, 0xc0, 0x38, 0x47, 0xe5, 0x22,
+0x08, 0xc0, 0x38, 0x2f, 0xcb, 0x61, 0x16, 0x80, 0x85, 0x34, 0x69, 0x98,
+0x50, 0x00, 0x80, 0xe5, 0x22, 0x02, 0xc0, 0x38, 0x17, 0xe5, 0x21, 0xfc,
+0xc0, 0x37, 0xff, 0xcb, 0x61, 0x16, 0x40, 0x85, 0x34, 0x68, 0x90, 0x48,
+0xcb, 0xa1, 0x16, 0x00, 0x85, 0x34, 0x67, 0xcb, 0xa1, 0x15, 0xc0, 0x85,
+0x34, 0x66, 0x92, 0x20, 0x91, 0x30, 0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0,
+0xc0, 0x81, 0x8c, 0x01, 0xa0, 0x84, 0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c,
+0x01, 0x80, 0x84, 0x30, 0x3c, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30,
+0x28, 0xc0, 0xc0, 0x81, 0x30, 0x24, 0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0,
+0xc0, 0x81, 0x30, 0x1c, 0xc0, 0xc0, 0x81, 0x30, 0x18, 0xd5, 0x02, 0x00,
+0xc0, 0xc0, 0x81, 0x30, 0x10, 0xc0, 0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70,
+0x90, 0xd8, 0xd5, 0x03, 0x80, 0xc8, 0xe1, 0xf8, 0xc0, 0x81, 0x8c, 0x01,
+0xc0, 0x84, 0x30, 0x40, 0xc8, 0xe1, 0xf9, 0xc0, 0x81, 0x8c, 0x01, 0x90,
+0x84, 0x30, 0x3d, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xf8, 0x40, 0x81, 0x30,
+0x2c, 0xc8, 0xe1, 0xf5, 0x40, 0x81, 0x30, 0x26, 0x90, 0x98, 0xd5, 0x02,
+0x80, 0xc8, 0xe1, 0xef, 0x40, 0x81, 0x30, 0x20, 0xc8, 0xe1, 0xf0, 0x40,
+0x81, 0x30, 0x1a, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xee, 0xc0, 0x81, 0x30,
+0x14, 0xc8, 0xe1, 0xeb, 0xc0, 0x81, 0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40,
+0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x1b, 0xc0,
+0x38, 0x6b, 0xe5, 0x22, 0x1c, 0xc0, 0x38, 0x7d, 0xcb, 0x61, 0x15, 0x40,
+0x85, 0x34, 0x64, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x13, 0xc0, 0x38,
+0x4b, 0xe5, 0x22, 0x14, 0xc0, 0x38, 0x5d, 0xcb, 0x61, 0x15, 0x00, 0x85,
+0x34, 0x63, 0x90, 0x48, 0xcb, 0xa1, 0x14, 0xc0, 0x85, 0x34, 0x62, 0xcb,
+0xa1, 0x14, 0x80, 0x85, 0x34, 0x61, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50,
+0x00, 0x80, 0xe5, 0x22, 0x0c, 0xc0, 0x38, 0x3f, 0xe5, 0x22, 0x06, 0xc0,
+0x38, 0x27, 0xcb, 0x61, 0x12, 0xc0, 0x85, 0x34, 0x50, 0x98, 0x50, 0x00,
+0x80, 0xe5, 0x22, 0x00, 0xc0, 0x38, 0x0f, 0xe5, 0x21, 0xfa, 0xc0, 0x37,
+0xf7, 0xcb, 0x61, 0x12, 0x80, 0x85, 0x34, 0x4f, 0x90, 0x48, 0xcb, 0xa1,
+0x12, 0x40, 0x85, 0x34, 0x4e, 0xcb, 0xa1, 0x12, 0x00, 0x85, 0x34, 0x4d,
+0x91, 0x00, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a,
+0xe5, 0x20, 0x01, 0x80, 0x30, 0x07, 0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0,
+0x30, 0x04, 0xe5, 0x20, 0x00, 0x00, 0x30, 0x01, 0x90, 0x80, 0x90, 0x40,
+0xe5, 0x21, 0xf2, 0xc0, 0x37, 0xc5, 0xe5, 0x21, 0xf4, 0x00, 0x37, 0xdb,
+0x90, 0x40, 0xe5, 0x21, 0xe9, 0x40, 0x37, 0x9f, 0xe5, 0x21, 0xea, 0x80,
+0x37, 0xb5, 0x80, 0x99, 0x28, 0x02, 0xf0, 0x8c, 0x21, 0xf8, 0x90, 0x80,
+0x90, 0x40, 0xe5, 0x22, 0x1e, 0xc0, 0x38, 0x79, 0xe5, 0x22, 0x1d, 0x40,
+0x38, 0x7f, 0x90, 0x40, 0xe5, 0x22, 0x16, 0xc0, 0x38, 0x59, 0xe5, 0x22,
+0x15, 0x40, 0x38, 0x5f, 0x91, 0x48, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80,
+0xe5, 0x22, 0x0d, 0xc0, 0x38, 0x43, 0xe5, 0x22, 0x07, 0xc0, 0x38, 0x2b,
+0xcb, 0x61, 0x10, 0x80, 0x85, 0x34, 0x46, 0x90, 0x40, 0xe5, 0x22, 0x01,
+0xc0, 0x38, 0x13, 0xe5, 0x21, 0xfb, 0xc0, 0x37, 0xfb, 0x90, 0x48, 0xcb,
+0xa1, 0x10, 0x00, 0x85, 0x34, 0x44, 0xcb, 0xa1, 0x10, 0x40, 0x85, 0x34,
+0x45, 0x10, 0x10, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xf6, 0x40, 0x37,
+0xd7, 0xe5, 0x21, 0xf4, 0xc0, 0x37, 0xdf, 0x90, 0x40, 0xe5, 0x21, 0xec,
+0xc0, 0x37, 0xb1, 0xe5, 0x21, 0xeb, 0x40, 0x37, 0xb9,
};
static const struct ia64_dis_names ia64_dis_names[] = {
@@ -5382,7 +5431,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x2, 37, 0, 85 },
{ 0x3, 37, 1, 84 },
{ 0x4, 37, 0, 83 },
-{ 0x1, 293, 0, 87 },
+{ 0x1, 292, 0, 87 },
{ 0x20, 246, 0, 98 },
{ 0x220, 246, 0, 94 },
{ 0x1220, 246, 0, 91 },
@@ -5399,16 +5448,16 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x4, 246, 0, 104 },
{ 0x2, 246, 0, 105 },
{ 0x1, 246, 0, 106 },
-{ 0x1, 367, 0, 108 },
-{ 0x3, 367, 0, 107 },
-{ 0x2, 373, 0, 109 },
-{ 0x1, 373, 0, 110 },
-{ 0x2, 369, 0, 111 },
-{ 0x1, 369, 0, 112 },
-{ 0x2, 371, 0, 113 },
-{ 0x1, 371, 0, 114 },
-{ 0x2, 375, 0, 115 },
-{ 0x1, 375, 0, 116 },
+{ 0x1, 366, 0, 108 },
+{ 0x3, 366, 0, 107 },
+{ 0x2, 372, 0, 109 },
+{ 0x1, 372, 0, 110 },
+{ 0x2, 368, 0, 111 },
+{ 0x1, 368, 0, 112 },
+{ 0x2, 370, 0, 113 },
+{ 0x1, 370, 0, 114 },
+{ 0x2, 374, 0, 115 },
+{ 0x1, 374, 0, 116 },
{ 0x1, 225, 0, 143 },
{ 0x5, 225, 0, 141 },
{ 0x3, 225, 0, 142 },
@@ -5484,10 +5533,10 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x4, 243, 0, 189 },
{ 0x2, 243, 0, 190 },
{ 0x1, 243, 0, 191 },
-{ 0x8, 347, 0, 192 },
-{ 0x4, 347, 0, 193 },
-{ 0x2, 347, 0, 194 },
-{ 0x1, 347, 0, 195 },
+{ 0x8, 346, 0, 192 },
+{ 0x4, 346, 0, 193 },
+{ 0x2, 346, 0, 194 },
+{ 0x1, 346, 0, 195 },
{ 0x20, 245, 0, 203 },
{ 0x220, 245, 0, 199 },
{ 0x1220, 245, 0, 196 },
@@ -5628,16 +5677,16 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x4, 239, 0, 333 },
{ 0x2, 239, 0, 334 },
{ 0x1, 239, 0, 335 },
-{ 0x1, 366, 0, 337 },
-{ 0x3, 366, 0, 336 },
-{ 0x2, 372, 0, 338 },
-{ 0x1, 372, 0, 339 },
-{ 0x2, 368, 0, 340 },
-{ 0x1, 368, 0, 341 },
-{ 0x2, 370, 0, 342 },
-{ 0x1, 370, 0, 343 },
-{ 0x2, 374, 0, 344 },
-{ 0x1, 374, 0, 345 },
+{ 0x1, 365, 0, 337 },
+{ 0x3, 365, 0, 336 },
+{ 0x2, 371, 0, 338 },
+{ 0x1, 371, 0, 339 },
+{ 0x2, 367, 0, 340 },
+{ 0x1, 367, 0, 341 },
+{ 0x2, 369, 0, 342 },
+{ 0x1, 369, 0, 343 },
+{ 0x2, 373, 0, 344 },
+{ 0x1, 373, 0, 345 },
{ 0x1, 224, 0, 372 },
{ 0x5, 224, 0, 370 },
{ 0x3, 224, 0, 371 },
@@ -5788,24 +5837,24 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x4, 241, 0, 493 },
{ 0x2, 241, 0, 494 },
{ 0x1, 241, 0, 495 },
-{ 0x8, 365, 0, 497 },
-{ 0x18, 365, 0, 496 },
-{ 0x4, 365, 0, 499 },
-{ 0xc, 365, 0, 498 },
-{ 0x2, 365, 0, 506 },
-{ 0x1, 365, 0, 507 },
-{ 0x4, 363, 0, 501 },
-{ 0xc, 363, 0, 500 },
-{ 0x2, 363, 0, 508 },
-{ 0x1, 363, 0, 509 },
-{ 0x4, 361, 0, 503 },
-{ 0xc, 361, 0, 502 },
-{ 0x2, 361, 0, 510 },
-{ 0x1, 361, 0, 511 },
-{ 0x4, 358, 0, 505 },
-{ 0xc, 358, 0, 504 },
-{ 0x2, 358, 0, 512 },
-{ 0x1, 358, 0, 513 },
+{ 0x8, 364, 0, 497 },
+{ 0x18, 364, 0, 496 },
+{ 0x4, 364, 0, 499 },
+{ 0xc, 364, 0, 498 },
+{ 0x2, 364, 0, 506 },
+{ 0x1, 364, 0, 507 },
+{ 0x4, 362, 0, 501 },
+{ 0xc, 362, 0, 500 },
+{ 0x2, 362, 0, 508 },
+{ 0x1, 362, 0, 509 },
+{ 0x4, 360, 0, 503 },
+{ 0xc, 360, 0, 502 },
+{ 0x2, 360, 0, 510 },
+{ 0x1, 360, 0, 511 },
+{ 0x4, 357, 0, 505 },
+{ 0xc, 357, 0, 504 },
+{ 0x2, 357, 0, 512 },
+{ 0x1, 357, 0, 513 },
{ 0xa00, 222, 0, 528 },
{ 0x2a00, 222, 0, 526 },
{ 0x1a00, 222, 0, 527 },
@@ -5933,18 +5982,18 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 133, 0, 640 },
{ 0x5, 133, 0, 638 },
{ 0x3, 133, 0, 639 },
-{ 0x4, 398, 0, 641 },
-{ 0x2, 398, 0, 642 },
-{ 0x1, 398, 0, 643 },
-{ 0x4, 397, 0, 644 },
-{ 0x2, 397, 0, 645 },
-{ 0x1, 397, 0, 646 },
-{ 0x4, 396, 0, 647 },
-{ 0x2, 396, 0, 648 },
-{ 0x1, 396, 0, 649 },
-{ 0x4, 395, 0, 650 },
-{ 0x2, 395, 0, 651 },
-{ 0x1, 395, 0, 652 },
+{ 0x4, 397, 0, 641 },
+{ 0x2, 397, 0, 642 },
+{ 0x1, 397, 0, 643 },
+{ 0x4, 396, 0, 644 },
+{ 0x2, 396, 0, 645 },
+{ 0x1, 396, 0, 646 },
+{ 0x4, 395, 0, 647 },
+{ 0x2, 395, 0, 648 },
+{ 0x1, 395, 0, 649 },
+{ 0x4, 394, 0, 650 },
+{ 0x2, 394, 0, 651 },
+{ 0x1, 394, 0, 652 },
{ 0x2, 92, 0, 655 },
{ 0xa, 92, 0, 653 },
{ 0x6, 92, 0, 654 },
@@ -5975,28 +6024,28 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 93, 0, 682 },
{ 0x5, 93, 0, 680 },
{ 0x3, 93, 0, 681 },
-{ 0x4, 359, 0, 686 },
-{ 0xc, 359, 0, 685 },
-{ 0x2, 359, 0, 695 },
-{ 0x1, 359, 0, 696 },
-{ 0x8, 364, 0, 684 },
-{ 0x18, 364, 0, 683 },
-{ 0x4, 364, 0, 688 },
-{ 0xc, 364, 0, 687 },
-{ 0x2, 364, 0, 697 },
-{ 0x1, 364, 0, 698 },
-{ 0x4, 362, 0, 690 },
-{ 0xc, 362, 0, 689 },
-{ 0x2, 362, 0, 699 },
-{ 0x1, 362, 0, 700 },
-{ 0x4, 360, 0, 692 },
-{ 0xc, 360, 0, 691 },
-{ 0x2, 360, 0, 701 },
-{ 0x1, 360, 0, 702 },
-{ 0x4, 357, 0, 694 },
-{ 0xc, 357, 0, 693 },
-{ 0x2, 357, 0, 703 },
-{ 0x1, 357, 0, 704 },
+{ 0x4, 358, 0, 686 },
+{ 0xc, 358, 0, 685 },
+{ 0x2, 358, 0, 695 },
+{ 0x1, 358, 0, 696 },
+{ 0x8, 363, 0, 684 },
+{ 0x18, 363, 0, 683 },
+{ 0x4, 363, 0, 688 },
+{ 0xc, 363, 0, 687 },
+{ 0x2, 363, 0, 697 },
+{ 0x1, 363, 0, 698 },
+{ 0x4, 361, 0, 690 },
+{ 0xc, 361, 0, 689 },
+{ 0x2, 361, 0, 699 },
+{ 0x1, 361, 0, 700 },
+{ 0x4, 359, 0, 692 },
+{ 0xc, 359, 0, 691 },
+{ 0x2, 359, 0, 701 },
+{ 0x1, 359, 0, 702 },
+{ 0x4, 356, 0, 694 },
+{ 0xc, 356, 0, 693 },
+{ 0x2, 356, 0, 703 },
+{ 0x1, 356, 0, 704 },
{ 0xa00, 221, 0, 719 },
{ 0x2a00, 221, 0, 717 },
{ 0x1a00, 221, 0, 718 },
@@ -6230,44 +6279,44 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 114, 0, 936 },
{ 0x1, 49, 0, 937 },
{ 0x3, 48, 0, 938 },
-{ 0x1, 384, 0, 939 },
-{ 0x1, 390, 0, 940 },
-{ 0x2, 343, 0, 943 },
-{ 0x1, 343, 0, 944 },
-{ 0x2, 341, 0, 945 },
-{ 0x1, 341, 0, 946 },
-{ 0x1, 340, 0, 947 },
-{ 0x1, 285, 0, 952 },
-{ 0x1, 284, 0, 953 },
-{ 0x1, 283, 0, 954 },
-{ 0x1, 282, 0, 955 },
+{ 0x1, 383, 0, 939 },
+{ 0x1, 389, 0, 940 },
+{ 0x2, 342, 0, 943 },
+{ 0x1, 342, 0, 944 },
+{ 0x2, 340, 0, 945 },
+{ 0x1, 340, 0, 946 },
+{ 0x1, 339, 0, 947 },
+{ 0x1, 284, 0, 952 },
+{ 0x1, 283, 0, 953 },
+{ 0x1, 282, 0, 954 },
+{ 0x1, 281, 0, 955 },
{ 0x1, 208, 0, 956 },
{ 0x1, 207, 0, 957 },
-{ 0x1, 281, 0, 958 },
-{ 0x1, 280, 0, 959 },
-{ 0x1, 279, 0, 960 },
-{ 0x1, 278, 0, 961 },
-{ 0x1, 277, 0, 962 },
-{ 0x1, 276, 0, 963 },
-{ 0x1, 275, 0, 964 },
+{ 0x1, 280, 0, 958 },
+{ 0x1, 279, 0, 959 },
+{ 0x1, 278, 0, 960 },
+{ 0x1, 277, 0, 961 },
+{ 0x1, 276, 0, 962 },
+{ 0x1, 275, 0, 963 },
+{ 0x1, 274, 0, 964 },
{ 0x2, 206, 0, 965 },
{ 0x1, 206, 0, 966 },
-{ 0x2, 323, 0, 972 },
-{ 0x1, 323, 0, 973 },
-{ 0x1, 274, 0, 974 },
-{ 0x1, 273, 0, 975 },
-{ 0x1, 272, 0, 976 },
-{ 0x1, 271, 0, 977 },
+{ 0x2, 322, 0, 972 },
+{ 0x1, 322, 0, 973 },
+{ 0x1, 273, 0, 974 },
+{ 0x1, 272, 0, 975 },
+{ 0x1, 271, 0, 976 },
+{ 0x1, 270, 0, 977 },
{ 0x1, 8, 0, 978 },
-{ 0x1, 270, 0, 979 },
-{ 0x1, 269, 0, 980 },
-{ 0x1, 268, 0, 981 },
-{ 0x1, 267, 0, 982 },
-{ 0x1, 345, 0, 983 },
-{ 0x1, 356, 0, 984 },
-{ 0x1, 346, 0, 985 },
-{ 0x1, 379, 0, 986 },
-{ 0x1, 266, 0, 990 },
+{ 0x1, 269, 0, 979 },
+{ 0x1, 268, 0, 980 },
+{ 0x1, 267, 0, 981 },
+{ 0x1, 266, 0, 982 },
+{ 0x1, 344, 0, 983 },
+{ 0x1, 355, 0, 984 },
+{ 0x1, 345, 0, 985 },
+{ 0x1, 378, 0, 986 },
+{ 0x1, 265, 0, 990 },
{ 0x1, 205, 0, 991 },
{ 0x1, 135, 0, 994 },
{ 0x2, 248, 0, 998 },
@@ -6277,141 +6326,141 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x3, 47, 0, 1003 },
{ 0x5, 46, 0, 1004 },
{ 0x3, 46, 0, 1005 },
-{ 0x1, 322, 0, 1006 },
-{ 0x1, 330, 0, 1007 },
-{ 0x1, 328, 0, 1008 },
-{ 0x1, 349, 0, 1009 },
-{ 0x1, 329, 0, 1010 },
-{ 0x1, 327, 0, 1011 },
-{ 0x2, 335, 0, 1012 },
-{ 0x1, 335, 0, 1014 },
-{ 0x2, 333, 0, 1013 },
-{ 0x1, 333, 0, 1015 },
-{ 0x2, 353, 0, 1016 },
-{ 0x1, 353, 0, 1019 },
-{ 0x2, 334, 0, 1017 },
-{ 0x1, 334, 0, 1020 },
-{ 0x2, 332, 0, 1018 },
-{ 0x1, 332, 0, 1021 },
-{ 0x1, 295, 0, 1022 },
-{ 0x1, 294, 0, 1023 },
-{ 0x1, 326, 0, 1024 },
-{ 0x1, 317, 0, 1025 },
-{ 0x1, 319, 0, 1026 },
-{ 0x1, 316, 0, 1027 },
-{ 0x1, 318, 0, 1028 },
-{ 0x2, 394, 0, 1029 },
-{ 0x1, 394, 0, 1032 },
-{ 0x2, 393, 0, 1030 },
-{ 0x1, 393, 0, 1033 },
-{ 0x2, 392, 0, 1031 },
-{ 0x1, 392, 0, 1034 },
-{ 0x1, 305, 0, 1035 },
-{ 0x2, 304, 0, 1036 },
-{ 0x1, 304, 0, 1037 },
+{ 0x1, 321, 0, 1006 },
+{ 0x1, 329, 0, 1007 },
+{ 0x1, 327, 0, 1008 },
+{ 0x1, 348, 0, 1009 },
+{ 0x1, 328, 0, 1010 },
+{ 0x1, 326, 0, 1011 },
+{ 0x2, 334, 0, 1012 },
+{ 0x1, 334, 0, 1014 },
+{ 0x2, 332, 0, 1013 },
+{ 0x1, 332, 0, 1015 },
+{ 0x2, 352, 0, 1016 },
+{ 0x1, 352, 0, 1019 },
+{ 0x2, 333, 0, 1017 },
+{ 0x1, 333, 0, 1020 },
+{ 0x2, 331, 0, 1018 },
+{ 0x1, 331, 0, 1021 },
+{ 0x1, 294, 0, 1022 },
+{ 0x1, 293, 0, 1023 },
+{ 0x1, 325, 0, 1024 },
+{ 0x1, 316, 0, 1025 },
+{ 0x1, 318, 0, 1026 },
+{ 0x1, 315, 0, 1027 },
+{ 0x1, 317, 0, 1028 },
+{ 0x2, 393, 0, 1029 },
+{ 0x1, 393, 0, 1032 },
+{ 0x2, 392, 0, 1030 },
+{ 0x1, 392, 0, 1033 },
+{ 0x2, 391, 0, 1031 },
+{ 0x1, 391, 0, 1034 },
+{ 0x1, 304, 0, 1035 },
+{ 0x2, 303, 0, 1036 },
+{ 0x1, 303, 0, 1037 },
{ 0x2, 251, 0, 1038 },
{ 0x1, 251, 0, 1041 },
{ 0x2, 250, 0, 1039 },
{ 0x1, 250, 0, 1042 },
{ 0x2, 249, 0, 1040 },
{ 0x1, 249, 0, 1043 },
-{ 0x2, 320, 0, 1044 },
-{ 0x1, 320, 0, 1045 },
-{ 0x2, 321, 0, 1046 },
-{ 0x1, 321, 0, 1047 },
-{ 0xa, 388, 1, 1053 },
-{ 0xa, 389, 0, 1052 },
-{ 0x1a, 388, 1, 1049 },
-{ 0x32, 389, 0, 1048 },
-{ 0x6, 388, 1, 1057 },
-{ 0x6, 389, 0, 1056 },
-{ 0x1, 388, 1, 1063 },
-{ 0x1, 389, 0, 1062 },
-{ 0x9, 388, 1, 1055 },
-{ 0x9, 389, 0, 1054 },
-{ 0x19, 388, 1, 1051 },
-{ 0x31, 389, 0, 1050 },
-{ 0x5, 388, 1, 1059 },
-{ 0x5, 389, 0, 1058 },
-{ 0x3, 388, 1, 1061 },
-{ 0x3, 389, 0, 1060 },
-{ 0xa, 385, 1, 1069 },
-{ 0xa, 386, 0, 1068 },
-{ 0x1a, 385, 1, 1065 },
-{ 0x32, 386, 0, 1064 },
-{ 0x6, 385, 1, 1073 },
-{ 0x6, 386, 0, 1072 },
-{ 0x1, 385, 1, 1079 },
-{ 0x1, 386, 0, 1078 },
-{ 0x9, 385, 1, 1071 },
-{ 0x9, 386, 0, 1070 },
-{ 0x19, 385, 1, 1067 },
-{ 0x31, 386, 0, 1066 },
-{ 0x5, 385, 1, 1075 },
-{ 0x5, 386, 0, 1074 },
-{ 0x3, 385, 1, 1077 },
-{ 0x3, 386, 0, 1076 },
+{ 0x2, 319, 0, 1044 },
+{ 0x1, 319, 0, 1045 },
+{ 0x2, 320, 0, 1046 },
+{ 0x1, 320, 0, 1047 },
+{ 0xa, 387, 1, 1053 },
+{ 0xa, 388, 0, 1052 },
+{ 0x1a, 387, 1, 1049 },
+{ 0x32, 388, 0, 1048 },
+{ 0x6, 387, 1, 1057 },
+{ 0x6, 388, 0, 1056 },
+{ 0x1, 387, 1, 1063 },
+{ 0x1, 388, 0, 1062 },
+{ 0x9, 387, 1, 1055 },
+{ 0x9, 388, 0, 1054 },
+{ 0x19, 387, 1, 1051 },
+{ 0x31, 388, 0, 1050 },
+{ 0x5, 387, 1, 1059 },
+{ 0x5, 388, 0, 1058 },
+{ 0x3, 387, 1, 1061 },
+{ 0x3, 388, 0, 1060 },
+{ 0xa, 384, 1, 1069 },
+{ 0xa, 385, 0, 1068 },
+{ 0x1a, 384, 1, 1065 },
+{ 0x32, 385, 0, 1064 },
+{ 0x6, 384, 1, 1073 },
+{ 0x6, 385, 0, 1072 },
+{ 0x1, 384, 1, 1079 },
+{ 0x1, 385, 0, 1078 },
+{ 0x9, 384, 1, 1071 },
+{ 0x9, 385, 0, 1070 },
+{ 0x19, 384, 1, 1067 },
+{ 0x31, 385, 0, 1066 },
+{ 0x5, 384, 1, 1075 },
+{ 0x5, 385, 0, 1074 },
+{ 0x3, 384, 1, 1077 },
+{ 0x3, 385, 0, 1076 },
{ 0x1, 103, 0, 1080 },
{ 0x1, 102, 0, 1081 },
-{ 0x1, 348, 1, 1083 },
+{ 0x1, 347, 1, 1083 },
{ 0x1, 101, 0, 1082 },
-{ 0x2, 352, 1, 1085 },
+{ 0x2, 351, 1, 1085 },
{ 0x2, 105, 0, 1084 },
-{ 0x1, 352, 1, 1087 },
+{ 0x1, 351, 1, 1087 },
{ 0x1, 105, 0, 1086 },
-{ 0x1, 354, 0, 1088 },
+{ 0x1, 353, 0, 1088 },
{ 0x1, 100, 0, 1089 },
{ 0x2, 99, 0, 1090 },
{ 0x2, 98, 0, 1091 },
-{ 0x1, 406, 1, 1097 },
+{ 0x1, 405, 1, 1097 },
{ 0x1, 204, 0, 992 },
-{ 0x1, 405, 0, 1098 },
-{ 0x1, 404, 1, 1099 },
+{ 0x1, 404, 0, 1098 },
+{ 0x1, 403, 1, 1099 },
{ 0x1, 203, 0, 1001 },
-{ 0x1, 265, 0, 1100 },
-{ 0x1, 264, 1, 1101 },
+{ 0x1, 264, 0, 1100 },
+{ 0x1, 263, 1, 1101 },
{ 0x1, 247, 0, 993 },
-{ 0x1, 263, 0, 1102 },
-{ 0x1, 262, 1, 1103 },
-{ 0x1, 383, 0, 995 },
-{ 0x1, 261, 1, 1104 },
-{ 0x1, 355, 0, 997 },
-{ 0x1, 260, 0, 1105 },
-{ 0x1, 259, 0, 1106 },
-{ 0x1, 258, 1, 1107 },
-{ 0x2, 355, 0, 996 },
-{ 0x10, 257, 0, 1111 },
-{ 0x90, 257, 0, 1109 },
-{ 0x190, 257, 0, 1108 },
-{ 0x50, 257, 0, 1110 },
-{ 0x30, 257, 0, 1113 },
-{ 0x70, 257, 0, 1112 },
-{ 0x8, 257, 0, 1115 },
-{ 0x18, 257, 0, 1114 },
-{ 0x4, 257, 0, 1116 },
-{ 0x1, 257, 0, 1119 },
-{ 0x3, 257, 0, 1118 },
-{ 0x1, 256, 1, 1120 },
-{ 0x2, 257, 0, 1117 },
+{ 0x1, 262, 0, 1102 },
+{ 0x1, 261, 1, 1103 },
+{ 0x1, 382, 0, 995 },
+{ 0x1, 260, 1, 1104 },
+{ 0x1, 354, 0, 997 },
+{ 0x1, 259, 0, 1105 },
+{ 0x1, 258, 0, 1106 },
+{ 0x1, 257, 1, 1107 },
+{ 0x2, 354, 0, 996 },
+{ 0x10, 256, 0, 1111 },
+{ 0x90, 256, 0, 1109 },
+{ 0x190, 256, 0, 1108 },
+{ 0x50, 256, 0, 1110 },
+{ 0x30, 256, 0, 1113 },
+{ 0x70, 256, 0, 1112 },
+{ 0x8, 256, 0, 1115 },
+{ 0x18, 256, 0, 1114 },
+{ 0x4, 256, 0, 1116 },
+{ 0x1, 256, 0, 1119 },
+{ 0x3, 256, 0, 1118 },
+{ 0x1, 255, 1, 1120 },
+{ 0x2, 256, 0, 1117 },
{ 0x3, 45, 0, 1121 },
{ 0x1, 199, 1, 1122 },
{ 0x1, 200, 1, 987 },
{ 0x1, 201, 0, 88 },
-{ 0x1, 298, 1, 1123 },
-{ 0x1, 299, 1, 988 },
-{ 0x1, 300, 0, 89 },
+{ 0x1, 297, 1, 1123 },
+{ 0x1, 298, 1, 988 },
+{ 0x1, 299, 0, 89 },
{ 0x1, 33, 1, 1124 },
{ 0x1, 34, 1, 989 },
{ 0x1, 35, 0, 90 },
{ 0x1, 188, 0, 1125 },
-{ 0x4, 399, 0, 1126 },
-{ 0x2, 399, 0, 1127 },
-{ 0x1, 399, 1, 1129 },
-{ 0x1, 400, 0, 1128 },
-{ 0x8, 401, 0, 1130 },
-{ 0x4, 401, 0, 1131 },
-{ 0x1, 401, 1, 1133 },
-{ 0x2, 401, 0, 1132 },
+{ 0x4, 398, 0, 1126 },
+{ 0x2, 398, 0, 1127 },
+{ 0x1, 398, 1, 1129 },
+{ 0x1, 399, 0, 1128 },
+{ 0x8, 400, 0, 1130 },
+{ 0x4, 400, 0, 1131 },
+{ 0x1, 400, 1, 1133 },
+{ 0x2, 400, 0, 1132 },
{ 0x8, 177, 0, 1134 },
{ 0x4, 177, 0, 1135 },
{ 0x2, 177, 0, 1136 },
@@ -6700,25 +6749,25 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x142, 163, 0, 1420 },
{ 0xc2, 163, 1, 1422 },
{ 0x6, 164, 1, 1421 },
-{ 0x1, 391, 0, 941 },
+{ 0x1, 390, 0, 941 },
{ 0x22, 163, 0, 1428 },
{ 0x12, 163, 0, 1429 },
{ 0xa, 163, 0, 1430 },
{ 0x6, 163, 1, 1432 },
{ 0x2, 164, 1, 1431 },
-{ 0x2, 324, 0, 970 },
+{ 0x2, 323, 0, 970 },
{ 0x221, 163, 0, 1423 },
{ 0x121, 163, 0, 1424 },
{ 0xa1, 163, 0, 1425 },
{ 0x61, 163, 1, 1427 },
{ 0x3, 164, 1, 1426 },
-{ 0x1, 387, 0, 942 },
+{ 0x1, 386, 0, 942 },
{ 0x11, 163, 0, 1433 },
{ 0x9, 163, 0, 1434 },
{ 0x5, 163, 0, 1435 },
{ 0x3, 163, 1, 1437 },
{ 0x1, 164, 1, 1436 },
-{ 0x1, 324, 0, 971 },
+{ 0x1, 323, 0, 971 },
{ 0x4, 169, 0, 1438 },
{ 0x1, 169, 0, 1440 },
{ 0x1, 176, 0, 1441 },
@@ -6755,13 +6804,13 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x50, 160, 0, 1471 },
{ 0x30, 160, 1, 1473 },
{ 0x10, 161, 1, 1472 },
-{ 0x1, 342, 0, 934 },
+{ 0x1, 341, 0, 934 },
{ 0x88, 160, 0, 1474 },
{ 0x48, 160, 0, 1475 },
{ 0x28, 160, 0, 1476 },
{ 0x18, 160, 1, 1478 },
{ 0x8, 161, 1, 1477 },
-{ 0xc, 325, 0, 967 },
+{ 0xc, 324, 0, 967 },
{ 0x44, 160, 1, 1489 },
{ 0x22, 162, 0, 1479 },
{ 0x24, 160, 1, 1490 },
@@ -6772,7 +6821,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x4, 161, 1, 1492 },
{ 0x6, 162, 1, 1483 },
{ 0x2, 162, 1, 1482 },
-{ 0x6, 325, 0, 968 },
+{ 0x6, 324, 0, 968 },
{ 0x22, 160, 1, 1494 },
{ 0x11, 162, 0, 1484 },
{ 0x12, 160, 1, 1495 },
@@ -6783,7 +6832,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x2, 161, 1, 1497 },
{ 0x3, 162, 1, 1488 },
{ 0x1, 162, 1, 1487 },
-{ 0x3, 325, 0, 969 },
+{ 0x3, 324, 0, 969 },
{ 0x11, 160, 0, 1499 },
{ 0x9, 160, 0, 1500 },
{ 0x5, 160, 0, 1501 },
@@ -6794,25 +6843,25 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x2, 156, 0, 1506 },
{ 0x1, 156, 1, 1508 },
{ 0x1, 157, 1, 1507 },
-{ 0x1, 289, 0, 948 },
+{ 0x1, 288, 0, 948 },
{ 0x8, 158, 0, 1509 },
{ 0x4, 158, 0, 1510 },
{ 0x2, 158, 0, 1511 },
{ 0x1, 158, 1, 1513 },
{ 0x1, 159, 1, 1512 },
-{ 0x1, 288, 0, 949 },
+{ 0x1, 287, 0, 949 },
{ 0x8, 167, 0, 1514 },
{ 0x4, 167, 0, 1515 },
{ 0x2, 167, 0, 1516 },
{ 0x1, 167, 1, 1518 },
{ 0x1, 168, 1, 1517 },
-{ 0x1, 287, 0, 950 },
+{ 0x1, 286, 0, 950 },
{ 0x8, 170, 0, 1519 },
{ 0x4, 170, 0, 1520 },
{ 0x2, 170, 0, 1521 },
{ 0x1, 170, 1, 1523 },
{ 0x1, 171, 1, 1522 },
-{ 0x1, 286, 0, 951 },
+{ 0x1, 285, 0, 951 },
{ 0x8, 182, 0, 1524 },
{ 0x4, 182, 0, 1525 },
{ 0x2, 182, 0, 1526 },
@@ -6824,7 +6873,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 180, 1, 1533 },
{ 0x1, 181, 0, 1532 },
{ 0x1, 198, 0, 1534 },
-{ 0x1, 297, 0, 1535 },
+{ 0x1, 296, 0, 1535 },
{ 0x1, 32, 0, 1536 },
{ 0x8, 115, 0, 1537 },
{ 0x4, 115, 0, 1538 },
@@ -6882,7 +6931,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 147, 1, 1590 },
{ 0x2, 140, 0, 1587 },
{ 0x1, 106, 0, 1591 },
-{ 0x1, 255, 1, 1592 },
+{ 0x1, 254, 1, 1592 },
{ 0x1, 140, 0, 1588 },
{ 0x8, 108, 0, 1593 },
{ 0x4, 108, 0, 1594 },
@@ -6894,19 +6943,19 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x2, 110, 0, 1600 },
{ 0x1, 110, 1, 1602 },
{ 0x1, 111, 1, 1601 },
-{ 0x1, 382, 0, 1094 },
+{ 0x1, 381, 0, 1094 },
{ 0x8, 138, 0, 1603 },
{ 0x4, 138, 0, 1604 },
{ 0x2, 138, 0, 1605 },
{ 0x1, 138, 1, 1607 },
{ 0x1, 139, 1, 1606 },
-{ 0x1, 381, 0, 1095 },
+{ 0x1, 380, 0, 1095 },
{ 0x8, 141, 0, 1608 },
{ 0x4, 141, 0, 1609 },
{ 0x2, 141, 0, 1610 },
{ 0x1, 141, 1, 1612 },
{ 0x1, 142, 1, 1611 },
-{ 0x1, 380, 0, 1096 },
+{ 0x1, 379, 0, 1096 },
{ 0x8, 186, 0, 1613 },
{ 0x4, 186, 0, 1614 },
{ 0x2, 186, 0, 1615 },
@@ -7124,7 +7173,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x3, 20, 1, 1826 },
{ 0x4, 20, 0, 1825 },
{ 0x1, 197, 0, 1829 },
-{ 0x1, 296, 0, 1830 },
+{ 0x1, 295, 0, 1830 },
{ 0x14, 42, 0, 1833 },
{ 0x34, 42, 0, 1831 },
{ 0xc, 42, 0, 1834 },
@@ -7161,7 +7210,7 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x1, 104, 0, 1864 },
{ 0x2, 44, 0, 1865 },
{ 0x1, 44, 0, 1866 },
-{ 0x1, 344, 0, 1867 },
+{ 0x1, 343, 0, 1867 },
{ 0x2, 51, 0, 1868 },
{ 0x1, 51, 0, 1869 },
{ 0x1, 97, 0, 1870 },
@@ -7504,59 +7553,58 @@ static const struct ia64_dis_names ia64_dis_names[] = {
{ 0x3, 54, 1, 2190 },
{ 0x3, 55, 0, 2189 },
{ 0x1, 4, 0, 2197 },
-{ 0x1, 254, 0, 2198 },
-{ 0x1, 336, 0, 2199 },
-{ 0x1, 331, 0, 2200 },
-{ 0x2, 315, 0, 2201 },
-{ 0x1, 315, 0, 2204 },
-{ 0x2, 314, 0, 2202 },
-{ 0x1, 314, 0, 2205 },
-{ 0x2, 313, 0, 2203 },
-{ 0x1, 313, 0, 2206 },
-{ 0x1, 312, 0, 2207 },
-{ 0x1, 311, 0, 2208 },
-{ 0x2, 310, 0, 2209 },
-{ 0x1, 310, 0, 2211 },
-{ 0x2, 309, 0, 2210 },
-{ 0x1, 309, 0, 2212 },
-{ 0x1, 339, 0, 2219 },
-{ 0x8, 338, 0, 2213 },
-{ 0x4, 338, 0, 2215 },
-{ 0x2, 338, 0, 2217 },
-{ 0x1, 338, 0, 2220 },
-{ 0x8, 337, 0, 2214 },
-{ 0x4, 337, 0, 2216 },
-{ 0x2, 337, 0, 2218 },
-{ 0x1, 337, 0, 2221 },
-{ 0x1, 308, 0, 2228 },
-{ 0x8, 307, 0, 2222 },
-{ 0x4, 307, 0, 2224 },
-{ 0x2, 307, 0, 2226 },
-{ 0x1, 307, 0, 2229 },
-{ 0x8, 306, 0, 2223 },
-{ 0x4, 306, 0, 2225 },
-{ 0x2, 306, 1, 2227 },
+{ 0x1, 253, 0, 2198 },
+{ 0x1, 335, 0, 2199 },
+{ 0x1, 330, 0, 2200 },
+{ 0x2, 314, 0, 2201 },
+{ 0x1, 314, 0, 2204 },
+{ 0x2, 313, 0, 2202 },
+{ 0x1, 313, 0, 2205 },
+{ 0x2, 312, 0, 2203 },
+{ 0x1, 312, 0, 2206 },
+{ 0x1, 311, 0, 2207 },
+{ 0x1, 310, 0, 2208 },
+{ 0x2, 309, 0, 2209 },
+{ 0x1, 309, 0, 2211 },
+{ 0x2, 308, 0, 2210 },
+{ 0x1, 308, 0, 2212 },
+{ 0x1, 338, 0, 2219 },
+{ 0x8, 337, 0, 2213 },
+{ 0x4, 337, 0, 2215 },
+{ 0x2, 337, 0, 2217 },
+{ 0x1, 337, 0, 2220 },
+{ 0x8, 336, 0, 2214 },
+{ 0x4, 336, 0, 2216 },
+{ 0x2, 336, 0, 2218 },
+{ 0x1, 336, 0, 2221 },
+{ 0x1, 307, 0, 2228 },
+{ 0x8, 306, 0, 2222 },
+{ 0x4, 306, 0, 2224 },
+{ 0x2, 306, 0, 2226 },
+{ 0x1, 306, 0, 2229 },
+{ 0x8, 305, 0, 2223 },
+{ 0x4, 305, 0, 2225 },
+{ 0x2, 305, 1, 2227 },
{ 0x4, 107, 0, 1271 },
-{ 0x1, 306, 0, 2230 },
+{ 0x1, 305, 0, 2230 },
{ 0x1, 6, 0, 2231 },
{ 0x1, 7, 0, 2232 },
-{ 0x1, 253, 0, 2233 },
-{ 0x1, 252, 0, 2234 },
-{ 0x1, 403, 0, 2235 },
-{ 0x1, 303, 0, 2236 },
-{ 0x1, 12, 0, 2237 },
-{ 0x1, 10, 0, 2238 },
-{ 0x1, 378, 0, 2239 },
-{ 0x1, 351, 0, 2240 },
-{ 0x1, 350, 0, 2241 },
-{ 0x1, 402, 0, 2242 },
-{ 0x1, 302, 0, 2243 },
-{ 0x1, 11, 0, 2244 },
-{ 0x1, 9, 0, 2245 },
-{ 0x1, 5, 0, 2246 },
-{ 0x1, 377, 0, 2247 },
-{ 0x1, 376, 0, 2248 },
-{ 0x1, 1, 0, 2249 },
-{ 0x1, 0, 0, 2250 },
+{ 0x1, 252, 0, 2233 },
+{ 0x1, 402, 0, 2234 },
+{ 0x1, 302, 0, 2235 },
+{ 0x1, 12, 0, 2236 },
+{ 0x1, 10, 0, 2237 },
+{ 0x1, 377, 0, 2238 },
+{ 0x1, 350, 0, 2239 },
+{ 0x1, 349, 0, 2240 },
+{ 0x1, 401, 0, 2241 },
+{ 0x1, 301, 0, 2242 },
+{ 0x1, 11, 0, 2243 },
+{ 0x1, 9, 0, 2244 },
+{ 0x1, 5, 0, 2245 },
+{ 0x1, 376, 0, 2246 },
+{ 0x1, 375, 0, 2247 },
+{ 0x1, 1, 0, 2248 },
+{ 0x1, 0, 0, 2249 },
};
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c
index a4e2cecd20b..c38cc359770 100644
--- a/opcodes/ia64-gen.c
+++ b/opcodes/ia64-gen.c
@@ -1134,7 +1134,13 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
else if (strcmp (ic->name, "invala") == 0)
resolved = strcmp (idesc->name, ic->name) == 0;
else if (strncmp (idesc->name, "st", 2) == 0
- && strstr (format, "M5") != NULL)
+ && (strstr (format, "M5") != NULL
+ || strstr (format, "M10") != NULL))
+ resolved = idesc->flags & IA64_OPCODE_POSTINC;
+ else if (strncmp (idesc->name, "ld", 2) == 0
+ && (strstr (format, "M2 M3") != NULL
+ || strstr (format, "M12") != NULL
+ || strstr (format, "M7 M8") != NULL))
resolved = idesc->flags & IA64_OPCODE_POSTINC;
else
resolved = 0;
diff --git a/opcodes/ia64-opc-a.c b/opcodes/ia64-opc-a.c
index c9e316234f8..9f1c5e364d4 100644
--- a/opcodes/ia64-opc-a.c
+++ b/opcodes/ia64-opc-a.c
@@ -107,7 +107,8 @@ struct ia64_opcode ia64_opcodes_a[] =
{"or", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 2), {R1, IMM8, R3}, EMPTY},
{"xor", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 3), {R1, IMM8, R3}, EMPTY},
{"mov", A, OpX2aVeImm14 (8, 2, 0, 0), {R1, R3}, EMPTY},
- {"mov", A, OpX2aVeR3a (8, 2, 0, 0), {R1, IMM14}, PSEUDO, 0, NULL},
+ /* A mov immediate pseudo for adds was deleted. It failed for immediate
+ operands requiring relocs, e.g. @pltoff(a). */
{"adds", A, OpX2aVe (8, 2, 0), {R1, IMM14, R3}, EMPTY},
{"addp4", A, OpX2aVe (8, 3, 0), {R1, IMM14, R3}, EMPTY},
{"padd1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 0), {R1, R2, R3}, EMPTY},
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index bfd8c893faf..af102b17cb9 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -1,6 +1,6 @@
/* Print Motorola 68k instructions.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify
@@ -46,18 +46,31 @@ static int
print_insn_arg PARAMS ((const char *, unsigned char *, unsigned char *,
bfd_vma, disassemble_info *));
-const char * const fpcr_names[] = {
+static bfd_boolean m68k_valid_ea (char code, int val);
+
+const char * const fpcr_names[] =
+{
"", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
"%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
};
-static char *const reg_names[] = {
+static char *const reg_names[] =
+{
"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",
"%ps", "%pc"
};
-/* Sign-extend an (unsigned char). */
+/* Name of register halves for MAC/EMAC.
+ Seperate from reg_names since 'spu', 'fpl' look weird. */
+static char *const reg_half_names[] =
+{
+ "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
+ "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%a7",
+ "%ps", "%pc"
+};
+
+/* Sign-extend an (unsigned char). */
#if __STDC__ == 1
#define COERCE_SIGNED_CHAR(ch) ((signed char) (ch))
#else
@@ -169,6 +182,147 @@ dummy_print_address (vma, info)
{
}
+/* Try to match the current instruction to best and if so, return the
+ number of bytes consumed from the instruction stream, else zero. */
+
+static int
+match_insn_m68k (bfd_vma memaddr, disassemble_info * info,
+ const struct m68k_opcode * best, struct private * priv)
+{
+ unsigned char *save_p;
+ unsigned char *p;
+ const char *d;
+
+ bfd_byte *buffer = priv->the_buffer;
+ fprintf_ftype save_printer = info->fprintf_func;
+ void (* save_print_address) (bfd_vma, struct disassemble_info *)
+ = info->print_address_func;
+
+ /* Point at first word of argument data,
+ and at descriptor for first argument. */
+ p = buffer + 2;
+
+ /* Figure out how long the fixed-size portion of the instruction is.
+ The only place this is stored in the opcode table is
+ in the arguments--look for arguments which specify fields in the 2nd
+ or 3rd words of the instruction. */
+ for (d = best->args; *d; d += 2)
+ {
+ /* I don't think it is necessary to be checking d[0] here;
+ I suspect all this could be moved to the case statement below. */
+ if (d[0] == '#')
+ {
+ if (d[1] == 'l' && p - buffer < 6)
+ p = buffer + 6;
+ else if (p - buffer < 4 && d[1] != 'C' && d[1] != '8')
+ p = buffer + 4;
+ }
+
+ if ((d[0] == 'L' || d[0] == 'l') && d[1] == 'w' && p - buffer < 4)
+ p = buffer + 4;
+
+ switch (d[1])
+ {
+ case '1':
+ case '2':
+ case '3':
+ case '7':
+ case '8':
+ case '9':
+ case 'i':
+ if (p - buffer < 4)
+ p = buffer + 4;
+ break;
+ case '4':
+ case '5':
+ case '6':
+ if (p - buffer < 6)
+ p = buffer + 6;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* pflusha is an exceptions. It takes no arguments but is two words
+ long. Recognize it by looking at the lower 16 bits of the mask. */
+ if (p - buffer < 4 && (best->match & 0xFFFF) != 0)
+ p = buffer + 4;
+
+ /* lpstop is another exception. It takes a one word argument but is
+ three words long. */
+ if (p - buffer < 6
+ && (best->match & 0xffff) == 0xffff
+ && best->args[0] == '#'
+ && best->args[1] == 'w')
+ {
+ /* Copy the one word argument into the usual location for a one
+ word argument, to simplify printing it. We can get away with
+ this because we know exactly what the second word is, and we
+ aren't going to print anything based on it. */
+ p = buffer + 6;
+ FETCH_DATA (info, p);
+ buffer[2] = buffer[4];
+ buffer[3] = buffer[5];
+ }
+
+ FETCH_DATA (info, p);
+
+ d = best->args;
+
+ save_p = p;
+ info->print_address_func = dummy_print_address;
+ info->fprintf_func = (fprintf_ftype) dummy_printer;
+
+ /* We scan the operands twice. The first time we don't print anything,
+ but look for errors. */
+ for (; *d; d += 2)
+ {
+ int eaten = print_insn_arg (d, buffer, p, memaddr + (p - buffer), info);
+
+ if (eaten >= 0)
+ p += eaten;
+ else if (eaten == -1)
+ {
+ info->fprintf_func = save_printer;
+ info->print_address_func = save_print_address;
+ return 0;
+ }
+ else
+ {
+ info->fprintf_func (info->stream,
+ /* xgettext:c-format */
+ _("<internal error in opcode table: %s %s>\n"),
+ best->name, best->args);
+ info->fprintf_func = save_printer;
+ info->print_address_func = save_print_address;
+ return 2;
+ }
+ }
+
+ p = save_p;
+ info->fprintf_func = save_printer;
+ info->print_address_func = save_print_address;
+
+ d = best->args;
+
+ info->fprintf_func (info->stream, "%s", best->name);
+
+ if (*d)
+ info->fprintf_func (info->stream, " ");
+
+ while (*d)
+ {
+ p += print_insn_arg (d, buffer, p, memaddr + (p - buffer), info);
+ d += 2;
+
+ if (*d && *(d - 2) != 'I' && *d != 'k')
+ info->fprintf_func (info->stream, ",");
+ }
+
+ return p - buffer;
+}
+
/* Print the m68k instruction at address MEMADDR in debugged memory,
on INFO->STREAM. Returns length of the instruction, in bytes. */
@@ -177,38 +331,32 @@ print_insn_m68k (memaddr, info)
bfd_vma memaddr;
disassemble_info *info;
{
- register int i;
- register unsigned char *p;
- unsigned char *save_p;
- register const char *d;
- register unsigned long bestmask;
- const struct m68k_opcode *best;
+ int i;
+ const char *d;
unsigned int arch_mask;
struct private priv;
bfd_byte *buffer = priv.the_buffer;
- fprintf_ftype save_printer = info->fprintf_func;
- void (*save_print_address) PARAMS ((bfd_vma, struct disassemble_info *))
- = info->print_address_func;
int major_opcode;
static int numopcodes[16];
static const struct m68k_opcode **opcodes[16];
+ int val;
if (!opcodes[0])
{
- /* Speed up the matching by sorting the opcode table on the upper
- four bits of the opcode. */
+ /* Speed up the matching by sorting the opcode
+ table on the upper four bits of the opcode. */
const struct m68k_opcode **opc_pointer[16];
/* First count how many opcodes are in each of the sixteen buckets. */
for (i = 0; i < m68k_numopcodes; i++)
numopcodes[(m68k_opcodes[i].opcode >> 28) & 15]++;
- /* Then create a sorted table of pointers that point into the
- unsorted table. */
- opc_pointer[0] = ((const struct m68k_opcode **)
- xmalloc (sizeof (struct m68k_opcode *)
- * m68k_numopcodes));
+ /* Then create a sorted table of pointers
+ that point into the unsorted table. */
+ opc_pointer[0] = xmalloc (sizeof (struct m68k_opcode *)
+ * m68k_numopcodes);
opcodes[0] = opc_pointer[0];
+
for (i = 1; i < 16; i++)
{
opc_pointer[i] = opc_pointer[i - 1] + numopcodes[i - 1];
@@ -217,22 +365,21 @@ print_insn_m68k (memaddr, info)
for (i = 0; i < m68k_numopcodes; i++)
*opc_pointer[(m68k_opcodes[i].opcode >> 28) & 15]++ = &m68k_opcodes[i];
-
}
info->private_data = (PTR) &priv;
- /* Tell objdump to use two bytes per chunk and six bytes per line for
- displaying raw data. */
+ /* Tell objdump to use two bytes per chunk
+ and six bytes per line for displaying raw data. */
info->bytes_per_chunk = 2;
info->bytes_per_line = 6;
info->display_endian = BFD_ENDIAN_BIG;
priv.max_fetched = priv.the_buffer;
priv.insn_start = memaddr;
+
if (setjmp (priv.bailout) != 0)
/* Error return. */
return -1;
- best = NULL;
switch (info->mach)
{
default:
@@ -240,48 +387,55 @@ print_insn_m68k (memaddr, info)
arch_mask = (unsigned int) -1;
break;
case bfd_mach_m68000:
- arch_mask = m68000;
+ arch_mask = m68000|m68881|m68851;
break;
case bfd_mach_m68008:
- arch_mask = m68008;
+ arch_mask = m68008|m68881|m68851;
break;
case bfd_mach_m68010:
- arch_mask = m68010;
+ arch_mask = m68010|m68881|m68851;
break;
case bfd_mach_m68020:
- arch_mask = m68020;
+ arch_mask = m68020|m68881|m68851;
break;
case bfd_mach_m68030:
- arch_mask = m68030;
+ arch_mask = m68030|m68881|m68851;
break;
case bfd_mach_m68040:
- arch_mask = m68040;
+ arch_mask = m68040|m68881|m68851;
break;
case bfd_mach_m68060:
- arch_mask = m68060;
+ arch_mask = m68060|m68881|m68851;
break;
case bfd_mach_mcf5200:
- arch_mask = mcf5200;
+ arch_mask = mcfisa_a;
break;
+ case bfd_mach_mcf521x:
case bfd_mach_mcf528x:
- arch_mask = mcf528x;
+ arch_mask = mcfisa_a|mcfhwdiv|mcfisa_aa|mcfusp|mcfemac;
break;
case bfd_mach_mcf5206e:
- arch_mask = mcf5206e;
+ arch_mask = mcfisa_a|mcfhwdiv|mcfmac;
+ break;
+ case bfd_mach_mcf5249:
+ arch_mask = mcfisa_a|mcfhwdiv|mcfemac;
break;
case bfd_mach_mcf5307:
- arch_mask = mcf5307;
+ arch_mask = mcfisa_a|mcfhwdiv|mcfmac;
break;
case bfd_mach_mcf5407:
- arch_mask = mcf5407;
+ arch_mask = mcfisa_a|mcfhwdiv|mcfisa_b|mcfmac;
+ break;
+ case bfd_mach_mcf547x:
+ case bfd_mach_mcf548x:
+ case bfd_mach_mcfv4e:
+ arch_mask = mcfisa_a|mcfhwdiv|mcfisa_b|mcfusp|cfloat|mcfemac;
break;
}
- arch_mask |= m68881 | m68851;
-
- bestmask = 0;
FETCH_DATA (info, buffer + 2);
major_opcode = (buffer[0] >> 4) & 15;
+
for (i = 0; i < numopcodes[major_opcode]; i++)
{
const struct m68k_opcode *opc = opcodes[major_opcode][i];
@@ -308,22 +462,20 @@ print_insn_m68k (memaddr, info)
/* Don't use for printout the variants of most floating
point coprocessor instructions which use the same
- register number in two places, as above. */
+ register number in two places, as above. */
if (*d == '\0')
for (d = opc->args; *d; d += 2)
if (d[1] == 't')
break;
- /* Don't match fmovel with more than one register; wait for
- fmoveml. */
+ /* Don't match fmovel with more than one register;
+ wait for fmoveml. */
if (*d == '\0')
{
for (d = opc->args; *d; d += 2)
{
if (d[0] == 's' && d[1] == '8')
{
- int val;
-
val = fetch_arg (buffer, d[1], 3, info);
if ((val & (val - 1)) != 0)
break;
@@ -331,158 +483,35 @@ print_insn_m68k (memaddr, info)
}
}
- if (*d == '\0' && match > bestmask)
- {
- best = opc;
- bestmask = match;
- }
- }
- }
-
- if (best == NULL)
- goto invalid;
-
- /* Point at first word of argument data,
- and at descriptor for first argument. */
- p = buffer + 2;
-
- /* Figure out how long the fixed-size portion of the instruction is.
- The only place this is stored in the opcode table is
- in the arguments--look for arguments which specify fields in the 2nd
- or 3rd words of the instruction. */
- for (d = best->args; *d; d += 2)
- {
- /* I don't think it is necessary to be checking d[0] here; I suspect
- all this could be moved to the case statement below. */
- if (d[0] == '#')
- {
- if (d[1] == 'l' && p - buffer < 6)
- p = buffer + 6;
- else if (p - buffer < 4 && d[1] != 'C' && d[1] != '8')
- p = buffer + 4;
- }
- if ((d[0] == 'L' || d[0] == 'l') && d[1] == 'w' && p - buffer < 4)
- p = buffer + 4;
- switch (d[1])
- {
- case '1':
- case '2':
- case '3':
- case '7':
- case '8':
- case '9':
- case 'i':
- if (p - buffer < 4)
- p = buffer + 4;
- break;
- case '4':
- case '5':
- case '6':
- if (p - buffer < 6)
- p = buffer + 6;
- break;
- default:
- break;
- }
- }
-
- /* pflusha is an exceptions. It takes no arguments but is two words
- long. Recognize it by looking at the lower 16 bits of the mask. */
- if (p - buffer < 4 && (best->match & 0xFFFF) != 0)
- p = buffer + 4;
-
- /* lpstop is another exception. It takes a one word argument but is
- three words long. */
- if (p - buffer < 6
- && (best->match & 0xffff) == 0xffff
- && best->args[0] == '#'
- && best->args[1] == 'w')
- {
- /* Copy the one word argument into the usual location for a one
- word argument, to simplify printing it. We can get away with
- this because we know exactly what the second word is, and we
- aren't going to print anything based on it. */
- p = buffer + 6;
- FETCH_DATA (info, p);
- buffer[2] = buffer[4];
- buffer[3] = buffer[5];
- }
-
- FETCH_DATA (info, p);
-
- d = best->args;
-
- /* We scan the operands twice. The first time we don't print anything,
- but look for errors. */
-
- save_p = p;
- info->print_address_func = dummy_print_address;
- info->fprintf_func = (fprintf_ftype) dummy_printer;
- for (; *d; d += 2)
- {
- int eaten = print_insn_arg (d, buffer, p, memaddr + (p - buffer), info);
- if (eaten >= 0)
- p += eaten;
- else if (eaten == -1)
- goto invalid;
- else
- {
- (*info->fprintf_func) (info->stream,
- /* xgettext:c-format */
- _("<internal error in opcode table: %s %s>\n"),
- best->name,
- best->args);
- goto invalid;
+ if (*d == '\0')
+ if ((val = match_insn_m68k (memaddr, info, opc, & priv)))
+ return val;
}
-
- }
- p = save_p;
- info->fprintf_func = save_printer;
- info->print_address_func = save_print_address;
-
- d = best->args;
-
- (*info->fprintf_func) (info->stream, "%s", best->name);
-
- if (*d)
- (*info->fprintf_func) (info->stream, " ");
-
- while (*d)
- {
- p += print_insn_arg (d, buffer, p, memaddr + (p - buffer), info);
- d += 2;
- if (*d && *(d - 2) != 'I' && *d != 'k')
- (*info->fprintf_func) (info->stream, ",");
}
- return p - buffer;
- invalid:
/* Handle undefined instructions. */
- info->fprintf_func = save_printer;
- info->print_address_func = save_print_address;
- (*info->fprintf_func) (info->stream, "0%o",
- (buffer[0] << 8) + buffer[1]);
+ info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]);
return 2;
}
/* Returns number of bytes "eaten" by the operand, or
return -1 if an invalid operand was found, or -2 if
- an opcode tabe error was found. */
+ an opcode tabe error was found. */
static int
print_insn_arg (d, buffer, p0, addr, info)
const char *d;
unsigned char *buffer;
unsigned char *p0;
- bfd_vma addr; /* PC for this arg to be relative to */
+ bfd_vma addr; /* PC for this arg to be relative to. */
disassemble_info *info;
{
- register int val = 0;
- register int place = d[1];
- register unsigned char *p = p0;
+ int val = 0;
+ int place = d[1];
+ unsigned char *p = p0;
int regno;
- register const char *regname;
- register unsigned char *p1;
+ const char *regname;
+ unsigned char *p1;
double flval;
int flt_p;
bfd_signed_vma disp;
@@ -490,7 +519,7 @@ print_insn_arg (d, buffer, p0, addr, info)
switch (*d)
{
- case 'c': /* cache identifier */
+ case 'c': /* Cache identifier. */
{
static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
val = fetch_arg (buffer, place, 2, info);
@@ -498,7 +527,7 @@ print_insn_arg (d, buffer, p0, addr, info)
break;
}
- case 'a': /* address register indirect only. Cf. case '+'. */
+ case 'a': /* Address register indirect only. Cf. case '+'. */
{
(*info->fprintf_func)
(info->stream,
@@ -507,7 +536,7 @@ print_insn_arg (d, buffer, p0, addr, info)
break;
}
- case '_': /* 32-bit absolute address for move16. */
+ case '_': /* 32-bit absolute address for move16. */
{
uval = NEXTULONG (p);
(*info->print_address_func) (uval, info);
@@ -736,6 +765,26 @@ print_insn_arg (d, buffer, p0, addr, info)
fpcr_names[fetch_arg (buffer, place, 3, info)]);
break;
+ case 'e':
+ val = fetch_arg(buffer, place, 2, info);
+ (*info->fprintf_func) (info->stream, "%%acc%d", val);
+ break;
+
+ case 'g':
+ val = fetch_arg(buffer, place, 1, info);
+ (*info->fprintf_func) (info->stream, "%%accext%s", val==0 ? "01" : "23");
+ break;
+
+ case 'i':
+ val = fetch_arg(buffer, place, 2, info);
+ if (val == 1)
+ (*info->fprintf_func) (info->stream, "<<");
+ else if (val == 3)
+ (*info->fprintf_func) (info->stream, ">>");
+ else
+ return -1;
+ break;
+
case 'I':
/* Get coprocessor ID... */
val = fetch_arg (buffer, 'd', 3, info);
@@ -744,6 +793,7 @@ print_insn_arg (d, buffer, p0, addr, info)
(*info->fprintf_func) (info->stream, "(cpid=%d) ", val);
break;
+ case '4':
case '*':
case '~':
case '%':
@@ -775,6 +825,10 @@ print_insn_arg (d, buffer, p0, addr, info)
else
val = fetch_arg (buffer, 's', 6, info);
+ /* If the <ea> is invalid for *d, then reject this match. */
+ if (!m68k_valid_ea (*d, val))
+ return -1;
+
/* Get register number assuming address register. */
regno = (val & 7) + 8;
regname = reg_names[regno];
@@ -881,6 +935,16 @@ print_insn_arg (d, buffer, p0, addr, info)
return -1;
}
}
+
+ /* If place is '/', then this is the case of the mask bit for
+ mac/emac loads. Now that the arg has been printed, grab the
+ mask bit and if set, add a '&' to the arg. */
+ if (place == '/')
+ {
+ val = fetch_arg (buffer, place, 1, info);
+ if (val)
+ info->fprintf_func (info->stream, "&");
+ }
break;
case 'L':
@@ -1048,7 +1112,7 @@ print_insn_arg (d, buffer, p0, addr, info)
reg &= 0xf;
}
(*info->fprintf_func) (info->stream, "%s%s",
- reg_names[reg],
+ reg_half_names[reg],
is_upper ? "u" : "l");
}
break;
@@ -1060,6 +1124,106 @@ print_insn_arg (d, buffer, p0, addr, info)
return p - p0;
}
+/* Check if an EA is valid for a particular code. This is required
+ for the EMAC instructions since the type of source address determines
+ if it is a EMAC-load instruciton if the EA is mode 2-5, otherwise it
+ is a non-load EMAC instruction and the bits mean register Ry.
+ A similar case exists for the movem instructions where the register
+ mask is interpreted differently for different EAs. */
+
+static bfd_boolean
+m68k_valid_ea (char code, int val)
+{
+ int mode, mask;
+#define M(n0,n1,n2,n3,n4,n5,n6,n70,n71,n72,n73,n74) \
+ (n0 | n1 << 1 | n2 << 2 | n3 << 3 | n4 << 4 | n5 << 5 | n6 << 6 \
+ | n70 << 7 | n71 << 8 | n72 << 9 | n73 << 10 | n74 << 11)
+
+ switch (code)
+ {
+ case '*':
+ mask = M (1,1,1,1,1,1,1,1,1,1,1,1);
+ break;
+ case '~':
+ mask = M (0,0,1,1,1,1,1,1,1,0,0,0);
+ break;
+ case '%':
+ mask = M (1,1,1,1,1,1,1,1,1,0,0,0);
+ break;
+ case ';':
+ mask = M (1,0,1,1,1,1,1,1,1,1,1,1);
+ break;
+ case '@':
+ mask = M (1,0,1,1,1,1,1,1,1,1,1,0);
+ break;
+ case '!':
+ mask = M (0,0,1,0,0,1,1,1,1,1,1,0);
+ break;
+ case '&':
+ mask = M (0,0,1,0,0,1,1,1,1,0,0,0);
+ break;
+ case '$':
+ mask = M (1,0,1,1,1,1,1,1,1,0,0,0);
+ break;
+ case '?':
+ mask = M (1,0,1,0,0,1,1,1,1,0,0,0);
+ break;
+ case '/':
+ mask = M (1,0,1,0,0,1,1,1,1,1,1,0);
+ break;
+ case '|':
+ mask = M (0,0,1,0,0,1,1,1,1,1,1,0);
+ break;
+ case '>':
+ mask = M (0,0,1,0,1,1,1,1,1,0,0,0);
+ break;
+ case '<':
+ mask = M (0,0,1,1,0,1,1,1,1,1,1,0);
+ break;
+ case 'm':
+ mask = M (1,1,1,1,1,0,0,0,0,0,0,0);
+ break;
+ case 'n':
+ mask = M (0,0,0,0,0,1,0,0,0,1,0,0);
+ break;
+ case 'o':
+ mask = M (0,0,0,0,0,0,1,1,1,0,1,1);
+ break;
+ case 'p':
+ mask = M (1,1,1,1,1,1,0,0,0,0,0,0);
+ break;
+ case 'q':
+ mask = M (1,0,1,1,1,1,0,0,0,0,0,0);
+ break;
+ case 'v':
+ mask = M (1,0,1,1,1,1,0,1,1,0,0,0);
+ break;
+ case 'b':
+ mask = M (1,0,1,1,1,1,0,0,0,1,0,0);
+ break;
+ case 'w':
+ mask = M (0,0,1,1,1,1,0,0,0,1,0,0);
+ break;
+ case 'y':
+ mask = M (0,0,1,0,0,1,0,0,0,0,0,0);
+ break;
+ case 'z':
+ mask = M (0,0,1,0,0,1,0,0,0,1,0,0);
+ break;
+ case '4':
+ mask = M (0,0,1,1,1,1,0,0,0,0,0,0);
+ break;
+ default:
+ abort ();
+ }
+#undef M
+
+ mode = (val >> 3) & 7;
+ if (mode == 7)
+ mode += val & 7;
+ return (mask & (1 << mode)) != 0;
+}
+
/* Fetch BITS bits from a position in the instruction specified by CODE.
CODE is a "place to put an argument", or 'x' for a destination
that is a general address (mode and register).
@@ -1072,9 +1236,38 @@ fetch_arg (buffer, code, bits, info)
int bits;
disassemble_info *info;
{
- register int val = 0;
+ int val = 0;
+
switch (code)
{
+ case '/': /* MAC/EMAC mask bit. */
+ val = buffer[3] >> 5;
+ break;
+
+ case 'G': /* EMAC ACC load. */
+ val = ((buffer[3] >> 3) & 0x2) | ((~buffer[1] >> 7) & 0x1);
+ break;
+
+ case 'H': /* EMAC ACC !load. */
+ val = ((buffer[3] >> 3) & 0x2) | ((buffer[1] >> 7) & 0x1);
+ break;
+
+ case ']': /* EMAC ACCEXT bit. */
+ val = buffer[0] >> 2;
+ break;
+
+ case 'I': /* MAC/EMAC scale factor. */
+ val = buffer[2] >> 1;
+ break;
+
+ case 'F': /* EMAC ACCx. */
+ val = buffer[0] >> 1;
+ break;
+
+ case 'f':
+ val = buffer[1];
+ break;
+
case 's':
val = buffer[1];
break;
@@ -1171,11 +1364,11 @@ fetch_arg (buffer, code, bits, info)
break;
case 'M':
- val = buffer[1] | (buffer[3] & 0x40 ? 0x10 : 0);
+ val = (buffer[1] & 0xf) | (buffer[3] & 0x40 ? 0x10 : 0);
break;
case 'N':
- val = buffer[3] | (buffer[3] & 0x40 ? 0x10 : 0);
+ val = (buffer[3] & 0xf) | (buffer[3] & 0x40 ? 0x10 : 0);
break;
case 'h':
@@ -1222,7 +1415,7 @@ print_indexed (basereg, p, addr, info)
bfd_vma addr;
disassemble_info *info;
{
- register int word;
+ int word;
static char *const scales[] = { "", ":2", ":4", ":8" };
bfd_vma base_disp;
bfd_vma outer_disp;
diff --git a/opcodes/m68k-opc.c b/opcodes/m68k-opc.c
index 8fa6c0e7405..82d1c42cab2 100644
--- a/opcodes/m68k-opc.c
+++ b/opcodes/m68k-opc.c
@@ -1,6 +1,6 @@
/* Opcode table for m680[012346]0/m6888[12]/m68851/mcf5200.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2003
+ 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -32,1471 +32,1460 @@
const struct m68k_opcode m68k_opcodes[] =
{
-{"abcd", one(0140400), one(0170770), "DsDd", m68000up },
-{"abcd", one(0140410), one(0170770), "-s-d", m68000up },
+{"abcd", 2, one(0140400), one(0170770), "DsDd", m68000up },
+{"abcd", 2, one(0140410), one(0170770), "-s-d", m68000up },
-{"addaw", one(0150300), one(0170700), "*wAd", m68000up },
-{"addal", one(0150700), one(0170700), "*lAd", m68000up | mcf },
+{"addaw", 2, one(0150300), one(0170700), "*wAd", m68000up },
+{"addal", 2, one(0150700), one(0170700), "*lAd", m68000up | mcfisa_a },
-{"addib", one(0003000), one(0177700), "#b$s", m68000up },
-{"addiw", one(0003100), one(0177700), "#w$s", m68000up },
-{"addil", one(0003200), one(0177700), "#l$s", m68000up },
-{"addil", one(0003200), one(0177700), "#lDs", mcf },
+{"addib", 4, one(0003000), one(0177700), "#b$s", m68000up },
+{"addiw", 4, one(0003100), one(0177700), "#w$s", m68000up },
+{"addil", 6, one(0003200), one(0177700), "#l$s", m68000up },
+{"addil", 6, one(0003200), one(0177700), "#lDs", mcfisa_a },
-{"addqb", one(0050000), one(0170700), "Qd$b", m68000up },
-{"addqw", one(0050100), one(0170700), "Qd%w", m68000up },
-{"addql", one(0050200), one(0170700), "Qd%l", m68000up | mcf },
+{"addqb", 2, one(0050000), one(0170700), "Qd$b", m68000up },
+{"addqw", 2, one(0050100), one(0170700), "Qd%w", m68000up },
+{"addql", 2, one(0050200), one(0170700), "Qd%l", m68000up | mcfisa_a },
/* The add opcode can generate the adda, addi, and addq instructions. */
-{"addb", one(0050000), one(0170700), "Qd$b", m68000up },
-{"addb", one(0003000), one(0177700), "#b$s", m68000up },
-{"addb", one(0150000), one(0170700), ";bDd", m68000up },
-{"addb", one(0150400), one(0170700), "Dd~b", m68000up },
-{"addw", one(0050100), one(0170700), "Qd%w", m68000up },
-{"addw", one(0150300), one(0170700), "*wAd", m68000up },
-{"addw", one(0003100), one(0177700), "#w$s", m68000up },
-{"addw", one(0150100), one(0170700), "*wDd", m68000up },
-{"addw", one(0150500), one(0170700), "Dd~w", m68000up },
-{"addl", one(0050200), one(0170700), "Qd%l", m68000up | mcf },
-{"addl", one(0003200), one(0177700), "#l$s", m68000up },
-{"addl", one(0003200), one(0177700), "#lDs", mcf },
-{"addl", one(0150700), one(0170700), "*lAd", m68000up | mcf },
-{"addl", one(0150200), one(0170700), "*lDd", m68000up | mcf },
-{"addl", one(0150600), one(0170700), "Dd~l", m68000up | mcf },
-
-{"addxb", one(0150400), one(0170770), "DsDd", m68000up },
-{"addxb", one(0150410), one(0170770), "-s-d", m68000up },
-{"addxw", one(0150500), one(0170770), "DsDd", m68000up },
-{"addxw", one(0150510), one(0170770), "-s-d", m68000up },
-{"addxl", one(0150600), one(0170770), "DsDd", m68000up | mcf },
-{"addxl", one(0150610), one(0170770), "-s-d", m68000up },
-
-{"andib", one(0001000), one(0177700), "#b$s", m68000up },
-{"andib", one(0001074), one(0177777), "#bCs", m68000up },
-{"andiw", one(0001100), one(0177700), "#w$s", m68000up },
-{"andiw", one(0001174), one(0177777), "#wSs", m68000up },
-{"andil", one(0001200), one(0177700), "#l$s", m68000up },
-{"andil", one(0001200), one(0177700), "#lDs", mcf },
-{"andi", one(0001100), one(0177700), "#w$s", m68000up },
-{"andi", one(0001074), one(0177777), "#bCs", m68000up },
-{"andi", one(0001174), one(0177777), "#wSs", m68000up },
+{"addb", 2, one(0050000), one(0170700), "Qd$b", m68000up },
+{"addb", 4, one(0003000), one(0177700), "#b$s", m68000up },
+{"addb", 2, one(0150000), one(0170700), ";bDd", m68000up },
+{"addb", 2, one(0150400), one(0170700), "Dd~b", m68000up },
+{"addw", 2, one(0050100), one(0170700), "Qd%w", m68000up },
+{"addw", 2, one(0150300), one(0170700), "*wAd", m68000up },
+{"addw", 4, one(0003100), one(0177700), "#w$s", m68000up },
+{"addw", 2, one(0150100), one(0170700), "*wDd", m68000up },
+{"addw", 2, one(0150500), one(0170700), "Dd~w", m68000up },
+{"addl", 2, one(0050200), one(0170700), "Qd%l", m68000up | mcfisa_a },
+{"addl", 6, one(0003200), one(0177700), "#l$s", m68000up },
+{"addl", 6, one(0003200), one(0177700), "#lDs", mcfisa_a },
+{"addl", 2, one(0150700), one(0170700), "*lAd", m68000up | mcfisa_a },
+{"addl", 2, one(0150200), one(0170700), "*lDd", m68000up | mcfisa_a },
+{"addl", 2, one(0150600), one(0170700), "Dd~l", m68000up | mcfisa_a },
+
+{"addxb", 2, one(0150400), one(0170770), "DsDd", m68000up },
+{"addxb", 2, one(0150410), one(0170770), "-s-d", m68000up },
+{"addxw", 2, one(0150500), one(0170770), "DsDd", m68000up },
+{"addxw", 2, one(0150510), one(0170770), "-s-d", m68000up },
+{"addxl", 2, one(0150600), one(0170770), "DsDd", m68000up | mcfisa_a },
+{"addxl", 2, one(0150610), one(0170770), "-s-d", m68000up },
+
+{"andib", 4, one(0001000), one(0177700), "#b$s", m68000up },
+{"andib", 4, one(0001074), one(0177777), "#bCs", m68000up },
+{"andiw", 4, one(0001100), one(0177700), "#w$s", m68000up },
+{"andiw", 4, one(0001174), one(0177777), "#wSs", m68000up },
+{"andil", 6, one(0001200), one(0177700), "#l$s", m68000up },
+{"andil", 6, one(0001200), one(0177700), "#lDs", mcfisa_a },
+{"andi", 4, one(0001100), one(0177700), "#w$s", m68000up },
+{"andi", 4, one(0001074), one(0177777), "#bCs", m68000up },
+{"andi", 4, one(0001174), one(0177777), "#wSs", m68000up },
/* The and opcode can generate the andi instruction. */
-{"andb", one(0001000), one(0177700), "#b$s", m68000up },
-{"andb", one(0001074), one(0177777), "#bCs", m68000up },
-{"andb", one(0140000), one(0170700), ";bDd", m68000up },
-{"andb", one(0140400), one(0170700), "Dd~b", m68000up },
-{"andw", one(0001100), one(0177700), "#w$s", m68000up },
-{"andw", one(0001174), one(0177777), "#wSs", m68000up },
-{"andw", one(0140100), one(0170700), ";wDd", m68000up },
-{"andw", one(0140500), one(0170700), "Dd~w", m68000up },
-{"andl", one(0001200), one(0177700), "#l$s", m68000up },
-{"andl", one(0001200), one(0177700), "#lDs", mcf },
-{"andl", one(0140200), one(0170700), ";lDd", m68000up | mcf },
-{"andl", one(0140600), one(0170700), "Dd~l", m68000up | mcf },
-{"and", one(0001100), one(0177700), "#w$w", m68000up },
-{"and", one(0001074), one(0177777), "#bCs", m68000up },
-{"and", one(0001174), one(0177777), "#wSs", m68000up },
-{"and", one(0140100), one(0170700), ";wDd", m68000up },
-{"and", one(0140500), one(0170700), "Dd~w", m68000up },
-
-{"aslb", one(0160400), one(0170770), "QdDs", m68000up },
-{"aslb", one(0160440), one(0170770), "DdDs", m68000up },
-{"aslw", one(0160500), one(0170770), "QdDs", m68000up },
-{"aslw", one(0160540), one(0170770), "DdDs", m68000up },
-{"aslw", one(0160700), one(0177700), "~s", m68000up },
-{"asll", one(0160600), one(0170770), "QdDs", m68000up | mcf },
-{"asll", one(0160640), one(0170770), "DdDs", m68000up | mcf },
-
-{"asrb", one(0160000), one(0170770), "QdDs", m68000up },
-{"asrb", one(0160040), one(0170770), "DdDs", m68000up },
-{"asrw", one(0160100), one(0170770), "QdDs", m68000up },
-{"asrw", one(0160140), one(0170770), "DdDs", m68000up },
-{"asrw", one(0160300), one(0177700), "~s", m68000up },
-{"asrl", one(0160200), one(0170770), "QdDs", m68000up | mcf },
-{"asrl", one(0160240), one(0170770), "DdDs", m68000up | mcf },
-
-{"bhiw", one(0061000), one(0177777), "BW", m68000up | mcf },
-{"blsw", one(0061400), one(0177777), "BW", m68000up | mcf },
-{"bccw", one(0062000), one(0177777), "BW", m68000up | mcf },
-{"bcsw", one(0062400), one(0177777), "BW", m68000up | mcf },
-{"bnew", one(0063000), one(0177777), "BW", m68000up | mcf },
-{"beqw", one(0063400), one(0177777), "BW", m68000up | mcf },
-{"bvcw", one(0064000), one(0177777), "BW", m68000up | mcf },
-{"bvsw", one(0064400), one(0177777), "BW", m68000up | mcf },
-{"bplw", one(0065000), one(0177777), "BW", m68000up | mcf },
-{"bmiw", one(0065400), one(0177777), "BW", m68000up | mcf },
-{"bgew", one(0066000), one(0177777), "BW", m68000up | mcf },
-{"bltw", one(0066400), one(0177777), "BW", m68000up | mcf },
-{"bgtw", one(0067000), one(0177777), "BW", m68000up | mcf },
-{"blew", one(0067400), one(0177777), "BW", m68000up | mcf },
-
-{"bhil", one(0061377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"blsl", one(0061777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bccl", one(0062377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bcsl", one(0062777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bnel", one(0063377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"beql", one(0063777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bvcl", one(0064377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bvsl", one(0064777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bpll", one(0065377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bmil", one(0065777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bgel", one(0066377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bltl", one(0066777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bgtl", one(0067377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"blel", one(0067777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-
-{"bhis", one(0061000), one(0177400), "BB", m68000up | mcf },
-{"blss", one(0061400), one(0177400), "BB", m68000up | mcf },
-{"bccs", one(0062000), one(0177400), "BB", m68000up | mcf },
-{"bcss", one(0062400), one(0177400), "BB", m68000up | mcf },
-{"bnes", one(0063000), one(0177400), "BB", m68000up | mcf },
-{"beqs", one(0063400), one(0177400), "BB", m68000up | mcf },
-{"bvcs", one(0064000), one(0177400), "BB", m68000up | mcf },
-{"bvss", one(0064400), one(0177400), "BB", m68000up | mcf },
-{"bpls", one(0065000), one(0177400), "BB", m68000up | mcf },
-{"bmis", one(0065400), one(0177400), "BB", m68000up | mcf },
-{"bges", one(0066000), one(0177400), "BB", m68000up | mcf },
-{"blts", one(0066400), one(0177400), "BB", m68000up | mcf },
-{"bgts", one(0067000), one(0177400), "BB", m68000up | mcf },
-{"bles", one(0067400), one(0177400), "BB", m68000up | mcf },
-
-{"jhi", one(0061000), one(0177400), "Bg", m68000up | mcf },
-{"jls", one(0061400), one(0177400), "Bg", m68000up | mcf },
-{"jcc", one(0062000), one(0177400), "Bg", m68000up | mcf },
-{"jcs", one(0062400), one(0177400), "Bg", m68000up | mcf },
-{"jne", one(0063000), one(0177400), "Bg", m68000up | mcf },
-{"jeq", one(0063400), one(0177400), "Bg", m68000up | mcf },
-{"jvc", one(0064000), one(0177400), "Bg", m68000up | mcf },
-{"jvs", one(0064400), one(0177400), "Bg", m68000up | mcf },
-{"jpl", one(0065000), one(0177400), "Bg", m68000up | mcf },
-{"jmi", one(0065400), one(0177400), "Bg", m68000up | mcf },
-{"jge", one(0066000), one(0177400), "Bg", m68000up | mcf },
-{"jlt", one(0066400), one(0177400), "Bg", m68000up | mcf },
-{"jgt", one(0067000), one(0177400), "Bg", m68000up | mcf },
-{"jle", one(0067400), one(0177400), "Bg", m68000up | mcf },
-
-{"bchg", one(0000500), one(0170700), "Dd$s", m68000up | mcf },
-{"bchg", one(0004100), one(0177700), "#b$s", m68000up },
-{"bchg", one(0004100), one(0177700), "#bqs", mcf },
-
-{"bclr", one(0000600), one(0170700), "Dd$s", m68000up | mcf },
-{"bclr", one(0004200), one(0177700), "#b$s", m68000up },
-{"bclr", one(0004200), one(0177700), "#bqs", mcf },
-
-{"bfchg", two(0165300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
-{"bfclr", two(0166300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
-{"bfexts", two(0165700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
-{"bfextu", two(0164700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
-{"bfffo", two(0166700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
-{"bfins", two(0167700, 0), two(0177700, 0100000), "D1?sO2O3", m68020up },
-{"bfset", two(0167300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
-{"bftst", two(0164300, 0), two(0177700, 0170000), "/sO2O3", m68020up },
-
-{"bgnd", one(0045372), one(0177777), "", cpu32 },
-
-{"bitrev", one(0000300), one(0177770), "Ds", mcf528x},
-
-{"bkpt", one(0044110), one(0177770), "ts", m68010up },
-
-{"braw", one(0060000), one(0177777), "BW", m68000up | mcf },
-{"bral", one(0060377), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bras", one(0060000), one(0177400), "BB", m68000up | mcf },
-
-{"bset", one(0000700), one(0170700), "Dd$s", m68000up | mcf },
-{"bset", one(0000700), one(0170700), "Ddvs", mcf },
-{"bset", one(0004300), one(0177700), "#b$s", m68000up },
-{"bset", one(0004300), one(0177700), "#bqs", mcf },
-
-{"bsrw", one(0060400), one(0177777), "BW", m68000up | mcf },
-{"bsrl", one(0060777), one(0177777), "BL", m68020up | cpu32 | mcfv4up},
-{"bsrs", one(0060400), one(0177400), "BB", m68000up | mcf },
-
-{"btst", one(0000400), one(0170700), "Dd;b", m68000up | mcf },
-{"btst", one(0004000), one(0177700), "#b@s", m68000up },
-{"btst", one(0004000), one(0177700), "#bqs", mcf },
-
-{"byterev", one(0001300), one(0177770), "Ds", mcf528x},
-
-{"callm", one(0003300), one(0177700), "#b!s", m68020 },
-
-{"cas2w", two(0006374,0), two(0177777,0007070), "D3D6D2D5r1r4", m68020up },
-{"cas2w", two(0006374,0), two(0177777,0007070), "D3D6D2D5R1R4", m68020up },
-{"cas2l", two(0007374,0), two(0177777,0007070), "D3D6D2D5r1r4", m68020up },
-{"cas2l", two(0007374,0), two(0177777,0007070), "D3D6D2D5R1R4", m68020up },
-
-{"casb", two(0005300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
-{"casw", two(0006300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
-{"casl", two(0007300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
-
-{"chk2b", two(0000300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
-{"chk2w", two(0001300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
-{"chk2l", two(0002300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
-
-{"chkl", one(0040400), one(0170700), ";lDd", m68000up },
-{"chkw", one(0040600), one(0170700), ";wDd", m68000up },
+{"andb", 4, one(0001000), one(0177700), "#b$s", m68000up },
+{"andb", 4, one(0001074), one(0177777), "#bCs", m68000up },
+{"andb", 2, one(0140000), one(0170700), ";bDd", m68000up },
+{"andb", 2, one(0140400), one(0170700), "Dd~b", m68000up },
+{"andw", 4, one(0001100), one(0177700), "#w$s", m68000up },
+{"andw", 4, one(0001174), one(0177777), "#wSs", m68000up },
+{"andw", 2, one(0140100), one(0170700), ";wDd", m68000up },
+{"andw", 2, one(0140500), one(0170700), "Dd~w", m68000up },
+{"andl", 6, one(0001200), one(0177700), "#l$s", m68000up },
+{"andl", 6, one(0001200), one(0177700), "#lDs", mcfisa_a },
+{"andl", 2, one(0140200), one(0170700), ";lDd", m68000up | mcfisa_a },
+{"andl", 2, one(0140600), one(0170700), "Dd~l", m68000up | mcfisa_a },
+{"and", 4, one(0001100), one(0177700), "#w$w", m68000up },
+{"and", 4, one(0001074), one(0177777), "#bCs", m68000up },
+{"and", 4, one(0001174), one(0177777), "#wSs", m68000up },
+{"and", 2, one(0140100), one(0170700), ";wDd", m68000up },
+{"and", 2, one(0140500), one(0170700), "Dd~w", m68000up },
+
+{"aslb", 2, one(0160400), one(0170770), "QdDs", m68000up },
+{"aslb", 2, one(0160440), one(0170770), "DdDs", m68000up },
+{"aslw", 2, one(0160500), one(0170770), "QdDs", m68000up },
+{"aslw", 2, one(0160540), one(0170770), "DdDs", m68000up },
+{"aslw", 2, one(0160700), one(0177700), "~s", m68000up },
+{"asll", 2, one(0160600), one(0170770), "QdDs", m68000up | mcfisa_a },
+{"asll", 2, one(0160640), one(0170770), "DdDs", m68000up | mcfisa_a },
+
+{"asrb", 2, one(0160000), one(0170770), "QdDs", m68000up },
+{"asrb", 2, one(0160040), one(0170770), "DdDs", m68000up },
+{"asrw", 2, one(0160100), one(0170770), "QdDs", m68000up },
+{"asrw", 2, one(0160140), one(0170770), "DdDs", m68000up },
+{"asrw", 2, one(0160300), one(0177700), "~s", m68000up },
+{"asrl", 2, one(0160200), one(0170770), "QdDs", m68000up | mcfisa_a },
+{"asrl", 2, one(0160240), one(0170770), "DdDs", m68000up | mcfisa_a },
+
+{"bhiw", 2, one(0061000), one(0177777), "BW", m68000up | mcfisa_a },
+{"blsw", 2, one(0061400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bccw", 2, one(0062000), one(0177777), "BW", m68000up | mcfisa_a },
+{"bcsw", 2, one(0062400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bnew", 2, one(0063000), one(0177777), "BW", m68000up | mcfisa_a },
+{"beqw", 2, one(0063400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bvcw", 2, one(0064000), one(0177777), "BW", m68000up | mcfisa_a },
+{"bvsw", 2, one(0064400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bplw", 2, one(0065000), one(0177777), "BW", m68000up | mcfisa_a },
+{"bmiw", 2, one(0065400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bgew", 2, one(0066000), one(0177777), "BW", m68000up | mcfisa_a },
+{"bltw", 2, one(0066400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bgtw", 2, one(0067000), one(0177777), "BW", m68000up | mcfisa_a },
+{"blew", 2, one(0067400), one(0177777), "BW", m68000up | mcfisa_a },
+
+{"bhil", 2, one(0061377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"blsl", 2, one(0061777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bccl", 2, one(0062377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bcsl", 2, one(0062777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bnel", 2, one(0063377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"beql", 2, one(0063777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bvcl", 2, one(0064377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bvsl", 2, one(0064777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bpll", 2, one(0065377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bmil", 2, one(0065777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bgel", 2, one(0066377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bltl", 2, one(0066777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bgtl", 2, one(0067377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"blel", 2, one(0067777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+
+{"bhis", 2, one(0061000), one(0177400), "BB", m68000up | mcfisa_a },
+{"blss", 2, one(0061400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bccs", 2, one(0062000), one(0177400), "BB", m68000up | mcfisa_a },
+{"bcss", 2, one(0062400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bnes", 2, one(0063000), one(0177400), "BB", m68000up | mcfisa_a },
+{"beqs", 2, one(0063400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bvcs", 2, one(0064000), one(0177400), "BB", m68000up | mcfisa_a },
+{"bvss", 2, one(0064400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bpls", 2, one(0065000), one(0177400), "BB", m68000up | mcfisa_a },
+{"bmis", 2, one(0065400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bges", 2, one(0066000), one(0177400), "BB", m68000up | mcfisa_a },
+{"blts", 2, one(0066400), one(0177400), "BB", m68000up | mcfisa_a },
+{"bgts", 2, one(0067000), one(0177400), "BB", m68000up | mcfisa_a },
+{"bles", 2, one(0067400), one(0177400), "BB", m68000up | mcfisa_a },
+
+{"jhi", 2, one(0061000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jls", 2, one(0061400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jcc", 2, one(0062000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jcs", 2, one(0062400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jne", 2, one(0063000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jeq", 2, one(0063400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jvc", 2, one(0064000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jvs", 2, one(0064400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jpl", 2, one(0065000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jmi", 2, one(0065400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jge", 2, one(0066000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jlt", 2, one(0066400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jgt", 2, one(0067000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jle", 2, one(0067400), one(0177400), "Bg", m68000up | mcfisa_a },
+
+{"bchg", 2, one(0000500), one(0170700), "Dd$s", m68000up | mcfisa_a },
+{"bchg", 4, one(0004100), one(0177700), "#b$s", m68000up },
+{"bchg", 4, one(0004100), one(0177700), "#bqs", mcfisa_a },
+
+{"bclr", 2, one(0000600), one(0170700), "Dd$s", m68000up | mcfisa_a },
+{"bclr", 4, one(0004200), one(0177700), "#b$s", m68000up },
+{"bclr", 4, one(0004200), one(0177700), "#bqs", mcfisa_a },
+
+{"bfchg", 4, two(0165300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
+{"bfclr", 4, two(0166300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
+{"bfexts", 4, two(0165700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
+{"bfextu", 4, two(0164700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
+{"bfffo", 4, two(0166700, 0), two(0177700, 0100000), "/sO2O3D1", m68020up },
+{"bfins", 4, two(0167700, 0), two(0177700, 0100000), "D1?sO2O3", m68020up },
+{"bfset", 4, two(0167300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
+{"bftst", 4, two(0164300, 0), two(0177700, 0170000), "/sO2O3", m68020up },
+
+{"bgnd", 2, one(0045372), one(0177777), "", cpu32 },
+
+{"bitrev", 2, one(0000300), one(0177770), "Ds", mcfisa_aa},
+
+{"bkpt", 2, one(0044110), one(0177770), "ts", m68010up },
+
+{"braw", 2, one(0060000), one(0177777), "BW", m68000up | mcfisa_a },
+{"bral", 2, one(0060377), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bras", 2, one(0060000), one(0177400), "BB", m68000up | mcfisa_a },
+
+{"bset", 2, one(0000700), one(0170700), "Dd$s", m68000up | mcfisa_a },
+{"bset", 2, one(0000700), one(0170700), "Ddvs", mcfisa_a },
+{"bset", 4, one(0004300), one(0177700), "#b$s", m68000up },
+{"bset", 4, one(0004300), one(0177700), "#bqs", mcfisa_a },
+
+{"bsrw", 2, one(0060400), one(0177777), "BW", m68000up | mcfisa_a },
+{"bsrl", 2, one(0060777), one(0177777), "BL", m68020up | cpu32 | mcfisa_b},
+{"bsrs", 2, one(0060400), one(0177400), "BB", m68000up | mcfisa_a },
+
+{"btst", 2, one(0000400), one(0170700), "Dd;b", m68000up | mcfisa_a },
+{"btst", 4, one(0004000), one(0177700), "#b@s", m68000up },
+{"btst", 4, one(0004000), one(0177700), "#bqs", mcfisa_a },
+
+{"byterev", 2, one(0001300), one(0177770), "Ds", mcfisa_aa},
+
+{"callm", 4, one(0003300), one(0177700), "#b!s", m68020 },
+
+{"cas2w", 6, two(0006374,0), two(0177777,0007070), "D3D6D2D5r1r4", m68020up },
+{"cas2w", 6, two(0006374,0), two(0177777,0007070), "D3D6D2D5R1R4", m68020up },
+{"cas2l", 6, two(0007374,0), two(0177777,0007070), "D3D6D2D5r1r4", m68020up },
+{"cas2l", 6, two(0007374,0), two(0177777,0007070), "D3D6D2D5R1R4", m68020up },
+
+{"casb", 4, two(0005300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
+{"casw", 4, two(0006300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
+{"casl", 4, two(0007300, 0), two(0177700, 0177070), "D3D2~s", m68020up },
+
+{"chk2b", 4, two(0000300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
+{"chk2w", 4, two(0001300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
+{"chk2l", 4, two(0002300,0004000), two(0177700,07777), "!sR1", m68020up | cpu32 },
+
+{"chkl", 2, one(0040400), one(0170700), ";lDd", m68000up },
+{"chkw", 2, one(0040600), one(0170700), ";wDd", m68000up },
#define SCOPE_LINE (0x1 << 3)
#define SCOPE_PAGE (0x2 << 3)
#define SCOPE_ALL (0x3 << 3)
-{"cinva", one(0xf400|SCOPE_ALL), one(0xff38), "ce", m68040up },
-{"cinvl", one(0xf400|SCOPE_LINE), one(0xff38), "ceas", m68040up },
-{"cinvp", one(0xf400|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
+{"cinva", 2, one(0xf400|SCOPE_ALL), one(0xff38), "ce", m68040up },
+{"cinvl", 2, one(0xf400|SCOPE_LINE), one(0xff38), "ceas", m68040up },
+{"cinvp", 2, one(0xf400|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
-{"cpusha", one(0xf420|SCOPE_ALL), one(0xff38), "ce", m68040up },
-{"cpushl", one(0xf420|SCOPE_LINE), one(0xff38), "ceas", m68040up | mcf },
-{"cpushp", one(0xf420|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
+{"cpusha", 2, one(0xf420|SCOPE_ALL), one(0xff38), "ce", m68040up },
+{"cpushl", 2, one(0xf420|SCOPE_LINE), one(0xff38), "ceas", m68040up | mcfisa_a },
+{"cpushp", 2, one(0xf420|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
#undef SCOPE_LINE
#undef SCOPE_PAGE
#undef SCOPE_ALL
-{"clrb", one(0041000), one(0177700), "$s", m68000up | mcf },
-{"clrw", one(0041100), one(0177700), "$s", m68000up | mcf },
-{"clrl", one(0041200), one(0177700), "$s", m68000up | mcf },
+{"clrb", 2, one(0041000), one(0177700), "$s", m68000up | mcfisa_a },
+{"clrw", 2, one(0041100), one(0177700), "$s", m68000up | mcfisa_a },
+{"clrl", 2, one(0041200), one(0177700), "$s", m68000up | mcfisa_a },
-{"cmp2b", two(0000300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
-{"cmp2w", two(0001300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
-{"cmp2l", two(0002300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
+{"cmp2b", 4, two(0000300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
+{"cmp2w", 4, two(0001300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
+{"cmp2l", 4, two(0002300,0), two(0177700,07777), "!sR1", m68020up | cpu32 },
-{"cmpaw", one(0130300), one(0170700), "*wAd", m68000up },
-{"cmpal", one(0130700), one(0170700), "*lAd", m68000up | mcf },
+{"cmpaw", 2, one(0130300), one(0170700), "*wAd", m68000up },
+{"cmpal", 2, one(0130700), one(0170700), "*lAd", m68000up | mcfisa_a },
-{"cmpib", one(0006000), one(0177700), "#b@s", m68000up },
-{"cmpib", one(0006000), one(0177700), "#bDs", mcfv4up },
-{"cmpiw", one(0006100), one(0177700), "#w@s", m68000up },
-{"cmpiw", one(0006100), one(0177700), "#wDs", mcfv4up },
-{"cmpil", one(0006200), one(0177700), "#l@s", m68000up },
-{"cmpil", one(0006200), one(0177700), "#lDs", mcf },
+{"cmpib", 4, one(0006000), one(0177700), "#b@s", m68000up },
+{"cmpib", 4, one(0006000), one(0177700), "#bDs", mcfisa_b },
+{"cmpiw", 4, one(0006100), one(0177700), "#w@s", m68000up },
+{"cmpiw", 4, one(0006100), one(0177700), "#wDs", mcfisa_b },
+{"cmpil", 6, one(0006200), one(0177700), "#l@s", m68000up },
+{"cmpil", 6, one(0006200), one(0177700), "#lDs", mcfisa_a },
-{"cmpmb", one(0130410), one(0170770), "+s+d", m68000up },
-{"cmpmw", one(0130510), one(0170770), "+s+d", m68000up },
-{"cmpml", one(0130610), one(0170770), "+s+d", m68000up },
+{"cmpmb", 2, one(0130410), one(0170770), "+s+d", m68000up },
+{"cmpmw", 2, one(0130510), one(0170770), "+s+d", m68000up },
+{"cmpml", 2, one(0130610), one(0170770), "+s+d", m68000up },
/* The cmp opcode can generate the cmpa, cmpm, and cmpi instructions. */
-{"cmpb", one(0006000), one(0177700), "#b@s", m68000up },
-{"cmpb", one(0006000), one(0177700), "#bDs", mcfv4up },
-{"cmpb", one(0130410), one(0170770), "+s+d", m68000up },
-{"cmpb", one(0130000), one(0170700), ";bDd", m68000up },
-{"cmpb", one(0130000), one(0170700), "*bDd", mcfv4up },
-{"cmpw", one(0130300), one(0170700), "*wAd", m68000up },
-{"cmpw", one(0006100), one(0177700), "#w@s", m68000up },
-{"cmpw", one(0006100), one(0177700), "#wDs", mcfv4up },
-{"cmpw", one(0130510), one(0170770), "+s+d", m68000up },
-{"cmpw", one(0130100), one(0170700), "*wDd", m68000up | mcfv4up },
-{"cmpl", one(0130700), one(0170700), "*lAd", m68000up | mcf },
-{"cmpl", one(0006200), one(0177700), "#l@s", m68000up },
-{"cmpl", one(0006200), one(0177700), "#lDs", mcf },
-{"cmpl", one(0130610), one(0170770), "+s+d", m68000up },
-{"cmpl", one(0130200), one(0170700), "*lDd", m68000up | mcf },
-
-{"dbcc", one(0052310), one(0177770), "DsBw", m68000up },
-{"dbcs", one(0052710), one(0177770), "DsBw", m68000up },
-{"dbeq", one(0053710), one(0177770), "DsBw", m68000up },
-{"dbf", one(0050710), one(0177770), "DsBw", m68000up },
-{"dbge", one(0056310), one(0177770), "DsBw", m68000up },
-{"dbgt", one(0057310), one(0177770), "DsBw", m68000up },
-{"dbhi", one(0051310), one(0177770), "DsBw", m68000up },
-{"dble", one(0057710), one(0177770), "DsBw", m68000up },
-{"dbls", one(0051710), one(0177770), "DsBw", m68000up },
-{"dblt", one(0056710), one(0177770), "DsBw", m68000up },
-{"dbmi", one(0055710), one(0177770), "DsBw", m68000up },
-{"dbne", one(0053310), one(0177770), "DsBw", m68000up },
-{"dbpl", one(0055310), one(0177770), "DsBw", m68000up },
-{"dbt", one(0050310), one(0177770), "DsBw", m68000up },
-{"dbvc", one(0054310), one(0177770), "DsBw", m68000up },
-{"dbvs", one(0054710), one(0177770), "DsBw", m68000up },
-
-{"divsw", one(0100700), one(0170700), ";wDd", m68000up | mcf5206eup },
-
-{"divsl", two(0046100,0006000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
-{"divsl", two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-{"divsl", two(0046100,0004000),two(0177700,0107770),"qsDD", mcf5206eup },
-
-{"divsll", two(0046100,0004000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
-{"divsll", two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-
-{"divuw", one(0100300), one(0170700), ";wDd", m68000up | mcf5206eup },
-
-{"divul", two(0046100,0002000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
-{"divul", two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-{"divul", two(0046100,0000000),two(0177700,0107770),"qsDD", mcf5206eup },
-
-{"divull", two(0046100,0000000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
-{"divull", two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-
-{"eorib", one(0005000), one(0177700), "#b$s", m68000up },
-{"eorib", one(0005074), one(0177777), "#bCs", m68000up },
-{"eoriw", one(0005100), one(0177700), "#w$s", m68000up },
-{"eoriw", one(0005174), one(0177777), "#wSs", m68000up },
-{"eoril", one(0005200), one(0177700), "#l$s", m68000up },
-{"eoril", one(0005200), one(0177700), "#lDs", mcf },
-{"eori", one(0005074), one(0177777), "#bCs", m68000up },
-{"eori", one(0005174), one(0177777), "#wSs", m68000up },
-{"eori", one(0005100), one(0177700), "#w$s", m68000up },
+{"cmpb", 4, one(0006000), one(0177700), "#b@s", m68000up },
+{"cmpb", 4, one(0006000), one(0177700), "#bDs", mcfisa_b },
+{"cmpb", 2, one(0130410), one(0170770), "+s+d", m68000up },
+{"cmpb", 2, one(0130000), one(0170700), ";bDd", m68000up },
+{"cmpb", 2, one(0130000), one(0170700), "*bDd", mcfisa_b },
+{"cmpw", 2, one(0130300), one(0170700), "*wAd", m68000up },
+{"cmpw", 4, one(0006100), one(0177700), "#w@s", m68000up },
+{"cmpw", 4, one(0006100), one(0177700), "#wDs", mcfisa_b },
+{"cmpw", 2, one(0130510), one(0170770), "+s+d", m68000up },
+{"cmpw", 2, one(0130100), one(0170700), "*wDd", m68000up | mcfisa_b },
+{"cmpl", 2, one(0130700), one(0170700), "*lAd", m68000up | mcfisa_a },
+{"cmpl", 6, one(0006200), one(0177700), "#l@s", m68000up },
+{"cmpl", 6, one(0006200), one(0177700), "#lDs", mcfisa_a },
+{"cmpl", 2, one(0130610), one(0170770), "+s+d", m68000up },
+{"cmpl", 2, one(0130200), one(0170700), "*lDd", m68000up | mcfisa_a },
+
+{"dbcc", 2, one(0052310), one(0177770), "DsBw", m68000up },
+{"dbcs", 2, one(0052710), one(0177770), "DsBw", m68000up },
+{"dbeq", 2, one(0053710), one(0177770), "DsBw", m68000up },
+{"dbf", 2, one(0050710), one(0177770), "DsBw", m68000up },
+{"dbge", 2, one(0056310), one(0177770), "DsBw", m68000up },
+{"dbgt", 2, one(0057310), one(0177770), "DsBw", m68000up },
+{"dbhi", 2, one(0051310), one(0177770), "DsBw", m68000up },
+{"dble", 2, one(0057710), one(0177770), "DsBw", m68000up },
+{"dbls", 2, one(0051710), one(0177770), "DsBw", m68000up },
+{"dblt", 2, one(0056710), one(0177770), "DsBw", m68000up },
+{"dbmi", 2, one(0055710), one(0177770), "DsBw", m68000up },
+{"dbne", 2, one(0053310), one(0177770), "DsBw", m68000up },
+{"dbpl", 2, one(0055310), one(0177770), "DsBw", m68000up },
+{"dbt", 2, one(0050310), one(0177770), "DsBw", m68000up },
+{"dbvc", 2, one(0054310), one(0177770), "DsBw", m68000up },
+{"dbvs", 2, one(0054710), one(0177770), "DsBw", m68000up },
+
+{"divsw", 2, one(0100700), one(0170700), ";wDd", m68000up | mcfhwdiv },
+
+{"divsl", 4, two(0046100,0006000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
+{"divsl", 4, two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
+{"divsl", 4, two(0046100,0004000),two(0177700,0107770),"qsDD", mcfhwdiv },
+
+{"divsll", 4, two(0046100,0004000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
+{"divsll", 4, two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
+
+{"divuw", 2, one(0100300), one(0170700), ";wDd", m68000up | mcfhwdiv },
+
+{"divul", 4, two(0046100,0002000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
+{"divul", 4, two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
+{"divul", 4, two(0046100,0000000),two(0177700,0107770),"qsDD", mcfhwdiv },
+
+{"divull", 4, two(0046100,0000000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
+{"divull", 4, two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
+
+{"eorib", 4, one(0005000), one(0177700), "#b$s", m68000up },
+{"eorib", 4, one(0005074), one(0177777), "#bCs", m68000up },
+{"eoriw", 4, one(0005100), one(0177700), "#w$s", m68000up },
+{"eoriw", 4, one(0005174), one(0177777), "#wSs", m68000up },
+{"eoril", 6, one(0005200), one(0177700), "#l$s", m68000up },
+{"eoril", 6, one(0005200), one(0177700), "#lDs", mcfisa_a },
+{"eori", 4, one(0005074), one(0177777), "#bCs", m68000up },
+{"eori", 4, one(0005174), one(0177777), "#wSs", m68000up },
+{"eori", 4, one(0005100), one(0177700), "#w$s", m68000up },
/* The eor opcode can generate the eori instruction. */
-{"eorb", one(0005000), one(0177700), "#b$s", m68000up },
-{"eorb", one(0005074), one(0177777), "#bCs", m68000up },
-{"eorb", one(0130400), one(0170700), "Dd$s", m68000up },
-{"eorw", one(0005100), one(0177700), "#w$s", m68000up },
-{"eorw", one(0005174), one(0177777), "#wSs", m68000up },
-{"eorw", one(0130500), one(0170700), "Dd$s", m68000up },
-{"eorl", one(0005200), one(0177700), "#l$s", m68000up },
-{"eorl", one(0005200), one(0177700), "#lDs", mcf },
-{"eorl", one(0130600), one(0170700), "Dd$s", m68000up | mcf },
-{"eor", one(0005074), one(0177777), "#bCs", m68000up },
-{"eor", one(0005174), one(0177777), "#wSs", m68000up },
-{"eor", one(0005100), one(0177700), "#w$s", m68000up },
-{"eor", one(0130500), one(0170700), "Dd$s", m68000up },
-
-{"exg", one(0140500), one(0170770), "DdDs", m68000up },
-{"exg", one(0140510), one(0170770), "AdAs", m68000up },
-{"exg", one(0140610), one(0170770), "DdAs", m68000up },
-{"exg", one(0140610), one(0170770), "AsDd", m68000up },
-
-{"extw", one(0044200), one(0177770), "Ds", m68000up|mcf },
-{"extl", one(0044300), one(0177770), "Ds", m68000up|mcf },
-{"extbl", one(0044700), one(0177770), "Ds", m68020up|cpu32|mcf },
-
-{"ff1", one(0002300), one(0177770), "Ds", mcf528x},
+{"eorb", 4, one(0005000), one(0177700), "#b$s", m68000up },
+{"eorb", 4, one(0005074), one(0177777), "#bCs", m68000up },
+{"eorb", 2, one(0130400), one(0170700), "Dd$s", m68000up },
+{"eorw", 4, one(0005100), one(0177700), "#w$s", m68000up },
+{"eorw", 4, one(0005174), one(0177777), "#wSs", m68000up },
+{"eorw", 2, one(0130500), one(0170700), "Dd$s", m68000up },
+{"eorl", 6, one(0005200), one(0177700), "#l$s", m68000up },
+{"eorl", 6, one(0005200), one(0177700), "#lDs", mcfisa_a },
+{"eorl", 2, one(0130600), one(0170700), "Dd$s", m68000up | mcfisa_a },
+{"eor", 4, one(0005074), one(0177777), "#bCs", m68000up },
+{"eor", 4, one(0005174), one(0177777), "#wSs", m68000up },
+{"eor", 4, one(0005100), one(0177700), "#w$s", m68000up },
+{"eor", 2, one(0130500), one(0170700), "Dd$s", m68000up },
+
+{"exg", 2, one(0140500), one(0170770), "DdDs", m68000up },
+{"exg", 2, one(0140510), one(0170770), "AdAs", m68000up },
+{"exg", 2, one(0140610), one(0170770), "DdAs", m68000up },
+{"exg", 2, one(0140610), one(0170770), "AsDd", m68000up },
+
+{"extw", 2, one(0044200), one(0177770), "Ds", m68000up|mcfisa_a },
+{"extl", 2, one(0044300), one(0177770), "Ds", m68000up|mcfisa_a },
+{"extbl", 2, one(0044700), one(0177770), "Ds", m68020up|cpu32|mcfisa_a },
+
+{"ff1", 2, one(0002300), one(0177770), "Ds", mcfisa_aa},
/* float stuff starts here */
-{"fabsb", two(0xF000, 0x5818), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fabsb", two(0xF000, 0x5818), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fabsd", two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fabsd", two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fabsd", two(0xF000, 0x5418), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fabsd", two(0xF000, 0x5418), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fabsl", two(0xF000, 0x4018), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fabsl", two(0xF000, 0x4018), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fabsp", two(0xF000, 0x4C18), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fabss", two(0xF000, 0x4418), two(0xF1C0, 0xFC7F), "Ii;fF7", cfloat },
-{"fabss", two(0xF000, 0x4418), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fabsw", two(0xF000, 0x5018), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fabsw", two(0xF000, 0x5018), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fabsx", two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fabsx", two(0xF000, 0x4818), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fabsx", two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsabsb", two(0xF000, 0x5858), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsabsb", two(0xF000, 0x5858), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsabsd", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsabsd", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fsabsd", two(0xF000, 0x5458), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsabsd", two(0xF000, 0x5458), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsabsl", two(0xF000, 0x4058), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsabsl", two(0xF000, 0x4058), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsabsp", two(0xF000, 0x4C58), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fsabss", two(0xF000, 0x4258), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsabss", two(0xF000, 0x4458), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsabsw", two(0xF000, 0x5058), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsabsw", two(0xF000, 0x5058), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsabsx", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsabsx", two(0xF000, 0x4858), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fsabsx", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fdabsb", two(0xF000, 0x585C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdabsb", two(0xF000, 0x585c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up},
-{"fdabsd", two(0xF000, 0x005C), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdabsd", two(0xF000, 0x005C), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fdabsd", two(0xF000, 0x545C), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdabsd", two(0xF000, 0x545c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up},
-{"fdabsl", two(0xF000, 0x405C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdabsl", two(0xF000, 0x405c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up},
-{"fdabsp", two(0xF000, 0x4C5c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up},
-{"fdabss", two(0xF000, 0x425C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdabss", two(0xF000, 0x445c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up},
-{"fdabsw", two(0xF000, 0x505C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdabsw", two(0xF000, 0x505c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up},
-{"fdabsx", two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiF8F7", m68040up},
-{"fdabsx", two(0xF000, 0x485c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up},
-{"fdabsx", two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiFt", m68040up},
-
-{"facosb", two(0xF000, 0x581C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"facosd", two(0xF000, 0x541C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"facosl", two(0xF000, 0x401C), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"facosp", two(0xF000, 0x4C1C), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"facoss", two(0xF000, 0x441C), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"facosw", two(0xF000, 0x501C), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"facosx", two(0xF000, 0x001C), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"facosx", two(0xF000, 0x481C), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"facosx", two(0xF000, 0x001C), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"faddb", two(0xF000, 0x5822), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"faddb", two(0xF000, 0x5822), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"faddd", two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"faddd", two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"faddd", two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"faddd", two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"faddl", two(0xF000, 0x4022), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"faddl", two(0xF000, 0x4022), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"faddp", two(0xF000, 0x4C22), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fadds", two(0xF000, 0x4422), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fadds", two(0xF000, 0x4422), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"faddw", two(0xF000, 0x5022), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"faddw", two(0xF000, 0x5022), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"faddx", two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"faddx", two(0xF000, 0x4822), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"fsaddb", two(0xF000, 0x5862), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsaddb", two(0xF000, 0x5862), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsaddd", two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsaddd", two(0xF000, 0x5462), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsaddd", two(0xF000, 0x5462), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsaddl", two(0xF000, 0x4062), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsaddl", two(0xF000, 0x4062), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsaddp", two(0xF000, 0x4C62), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fsadds", two(0xF000, 0x4462), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsadds", two(0xF000, 0x4862), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsaddw", two(0xF000, 0x5062), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsaddw", two(0xF000, 0x5062), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsaddx", two(0xF000, 0x0062), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsaddx", two(0xF000, 0x4862), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fdaddb", two(0xF000, 0x5826), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdaddb", two(0xF000, 0x5866), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdaddd", two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdaddd", two(0xF000, 0x5426), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdaddd", two(0xF000, 0x5466), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdaddl", two(0xF000, 0x4026), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdaddl", two(0xF000, 0x4066), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdaddp", two(0xF000, 0x4C66), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fdadds", two(0xF000, 0x4466), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdadds", two(0xF000, 0x4826), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdaddw", two(0xF000, 0x5026), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdaddw", two(0xF000, 0x5066), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdaddx", two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdaddx", two(0xF000, 0x4866), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fasinb", two(0xF000, 0x580C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fasind", two(0xF000, 0x540C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fasinl", two(0xF000, 0x400C), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fasinp", two(0xF000, 0x4C0C), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fasins", two(0xF000, 0x440C), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fasinw", two(0xF000, 0x500C), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fasinx", two(0xF000, 0x000C), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fasinx", two(0xF000, 0x480C), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fasinx", two(0xF000, 0x000C), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fatanb", two(0xF000, 0x580A), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fatand", two(0xF000, 0x540A), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fatanl", two(0xF000, 0x400A), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fatanp", two(0xF000, 0x4C0A), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fatans", two(0xF000, 0x440A), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fatanw", two(0xF000, 0x500A), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fatanx", two(0xF000, 0x000A), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fatanx", two(0xF000, 0x480A), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fatanx", two(0xF000, 0x000A), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fatanhb", two(0xF000, 0x580D), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fatanhd", two(0xF000, 0x540D), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fatanhl", two(0xF000, 0x400D), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fatanhp", two(0xF000, 0x4C0D), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fatanhs", two(0xF000, 0x440D), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fatanhw", two(0xF000, 0x500D), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fatanhx", two(0xF000, 0x000D), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fatanhx", two(0xF000, 0x480D), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fatanhx", two(0xF000, 0x000D), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fbeq", one(0xF081), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbf", one(0xF080), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbge", one(0xF093), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbgl", one(0xF096), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbgle", one(0xF097), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbgt", one(0xF092), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fble", one(0xF095), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fblt", one(0xF094), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbne", one(0xF08E), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbnge", one(0xF09C), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbngl", one(0xF099), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbngle", one(0xF098), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbngt", one(0xF09D), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbnle", one(0xF09A), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbnlt", one(0xF09B), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fboge", one(0xF083), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbogl", one(0xF086), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbogt", one(0xF082), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbole", one(0xF085), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbolt", one(0xF084), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbor", one(0xF087), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbseq", one(0xF091), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbsf", one(0xF090), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbsne", one(0xF09E), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbst", one(0xF09F), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbt", one(0xF08F), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbueq", one(0xF089), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbuge", one(0xF08B), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbugt", one(0xF08A), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbule", one(0xF08D), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbult", one(0xF08C), one(0xF1FF), "IdBW", mfloat | cfloat },
-{"fbun", one(0xF088), one(0xF1FF), "IdBW", mfloat | cfloat },
-
-{"fbeql", one(0xF0C1), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbfl", one(0xF0C0), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbgel", one(0xF0D3), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbgll", one(0xF0D6), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbglel", one(0xF0D7), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbgtl", one(0xF0D2), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fblel", one(0xF0D5), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbltl", one(0xF0D4), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbnel", one(0xF0CE), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbngel", one(0xF0DC), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbngll", one(0xF0D9), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbnglel", one(0xF0D8), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbngtl", one(0xF0DD), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbnlel", one(0xF0DA), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbnltl", one(0xF0DB), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbogel", one(0xF0C3), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbogll", one(0xF0C6), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbogtl", one(0xF0C2), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbolel", one(0xF0C5), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fboltl", one(0xF0C4), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fborl", one(0xF0C7), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbseql", one(0xF0D1), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbsfl", one(0xF0D0), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbsnel", one(0xF0DE), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbstl", one(0xF0DF), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbtl", one(0xF0CF), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbueql", one(0xF0C9), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbugel", one(0xF0CB), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbugtl", one(0xF0CA), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbulel", one(0xF0CD), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbultl", one(0xF0CC), one(0xF1FF), "IdBC", mfloat | cfloat },
-{"fbunl", one(0xF0C8), one(0xF1FF), "IdBC", mfloat | cfloat },
-
-{"fjeq", one(0xF081), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjf", one(0xF080), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjge", one(0xF093), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjgl", one(0xF096), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjgle", one(0xF097), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjgt", one(0xF092), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjle", one(0xF095), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjlt", one(0xF094), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjne", one(0xF08E), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjnge", one(0xF09C), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjngl", one(0xF099), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjngle", one(0xF098), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjngt", one(0xF09D), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjnle", one(0xF09A), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjnlt", one(0xF09B), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjoge", one(0xF083), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjogl", one(0xF086), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjogt", one(0xF082), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjole", one(0xF085), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjolt", one(0xF084), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjor", one(0xF087), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjseq", one(0xF091), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjsf", one(0xF090), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjsne", one(0xF09E), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjst", one(0xF09F), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjt", one(0xF08F), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjueq", one(0xF089), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjuge", one(0xF08B), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjugt", one(0xF08A), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjule", one(0xF08D), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjult", one(0xF08C), one(0xF1BF), "IdBc", mfloat | cfloat },
-{"fjun", one(0xF088), one(0xF1BF), "IdBc", mfloat | cfloat },
-
-{"fcmpb", two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fcmpb", two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fcmpd", two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fcmpd", two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fcmpd", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fcmpl", two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fcmpl", two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fcmpp", two(0xF000, 0x4C38), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fcmps", two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fcmps", two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fcmpw", two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fcmpw", two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fcmpx", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fcmpx", two(0xF000, 0x4838), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"fcosb", two(0xF000, 0x581D), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fcosd", two(0xF000, 0x541D), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fcosl", two(0xF000, 0x401D), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fcosp", two(0xF000, 0x4C1D), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fcoss", two(0xF000, 0x441D), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fcosw", two(0xF000, 0x501D), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fcosx", two(0xF000, 0x001D), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fcosx", two(0xF000, 0x481D), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fcosx", two(0xF000, 0x001D), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fcoshb", two(0xF000, 0x5819), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fcoshd", two(0xF000, 0x5419), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fcoshl", two(0xF000, 0x4019), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fcoshp", two(0xF000, 0x4C19), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fcoshs", two(0xF000, 0x4419), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fcoshw", two(0xF000, 0x5019), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fcoshx", two(0xF000, 0x0019), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fcoshx", two(0xF000, 0x4819), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fcoshx", two(0xF000, 0x0019), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fdbeq", two(0xF048, 0x0001), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbf", two(0xF048, 0x0000), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbge", two(0xF048, 0x0013), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbgl", two(0xF048, 0x0016), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbgle", two(0xF048, 0x0017), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbgt", two(0xF048, 0x0012), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdble", two(0xF048, 0x0015), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdblt", two(0xF048, 0x0014), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbne", two(0xF048, 0x000E), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbnge", two(0xF048, 0x001C), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbngl", two(0xF048, 0x0019), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbngle", two(0xF048, 0x0018), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbngt", two(0xF048, 0x001D), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbnle", two(0xF048, 0x001A), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbnlt", two(0xF048, 0x001B), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdboge", two(0xF048, 0x0003), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbogl", two(0xF048, 0x0006), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbogt", two(0xF048, 0x0002), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbole", two(0xF048, 0x0005), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbolt", two(0xF048, 0x0004), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbor", two(0xF048, 0x0007), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbseq", two(0xF048, 0x0011), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbsf", two(0xF048, 0x0010), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbsne", two(0xF048, 0x001E), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbst", two(0xF048, 0x001F), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbt", two(0xF048, 0x000F), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbueq", two(0xF048, 0x0009), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbuge", two(0xF048, 0x000B), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbugt", two(0xF048, 0x000A), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbule", two(0xF048, 0x000D), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbult", two(0xF048, 0x000C), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-{"fdbun", two(0xF048, 0x0008), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
-
-{"fdivb", two(0xF000, 0x5820), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fdivb", two(0xF000, 0x5820), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdivd", two(0xF000, 0x0020), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdivd", two(0xF000, 0x5420), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fdivd", two(0xF000, 0x5420), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdivl", two(0xF000, 0x4020), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fdivl", two(0xF000, 0x4020), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdivp", two(0xF000, 0x4C20), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fdivs", two(0xF000, 0x4420), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fdivs", two(0xF000, 0x4420), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdivw", two(0xF000, 0x5020), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fdivw", two(0xF000, 0x5020), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdivx", two(0xF000, 0x0020), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fdivx", two(0xF000, 0x4820), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"fsdivb", two(0xF000, 0x5860), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsdivb", two(0xF000, 0x5860), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsdivd", two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsdivd", two(0xF000, 0x5460), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsdivd", two(0xF000, 0x5460), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsdivl", two(0xF000, 0x4060), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsdivl", two(0xF000, 0x4060), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsdivp", two(0xF000, 0x4C60), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fsdivs", two(0xF000, 0x4460), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsdivs", two(0xF000, 0x4460), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsdivw", two(0xF000, 0x5060), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsdivw", two(0xF000, 0x5060), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsdivx", two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsdivx", two(0xF000, 0x4860), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fddivb", two(0xF000, 0x5864), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fddivb", two(0xF000, 0x5864), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fddivd", two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fddivd", two(0xF000, 0x5464), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fddivd", two(0xF000, 0x5464), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fddivl", two(0xF000, 0x4064), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fddivl", two(0xF000, 0x4064), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fddivp", two(0xF000, 0x4C64), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fddivs", two(0xF000, 0x4464), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fddivs", two(0xF000, 0x4464), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fddivw", two(0xF000, 0x5064), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fddivw", two(0xF000, 0x5064), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fddivx", two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fddivx", two(0xF000, 0x4864), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fetoxb", two(0xF000, 0x5810), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fetoxd", two(0xF000, 0x5410), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fetoxl", two(0xF000, 0x4010), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fetoxp", two(0xF000, 0x4C10), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fetoxs", two(0xF000, 0x4410), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fetoxw", two(0xF000, 0x5010), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fetoxx", two(0xF000, 0x0010), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fetoxx", two(0xF000, 0x4810), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fetoxx", two(0xF000, 0x0010), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fetoxm1b", two(0xF000, 0x5808), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fetoxm1d", two(0xF000, 0x5408), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fetoxm1l", two(0xF000, 0x4008), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fetoxm1p", two(0xF000, 0x4C08), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fetoxm1s", two(0xF000, 0x4408), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fetoxm1w", two(0xF000, 0x5008), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fetoxm1x", two(0xF000, 0x0008), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fetoxm1x", two(0xF000, 0x4808), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fetoxm1x", two(0xF000, 0x0008), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fgetexpb", two(0xF000, 0x581E), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fgetexpd", two(0xF000, 0x541E), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fgetexpl", two(0xF000, 0x401E), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fgetexpp", two(0xF000, 0x4C1E), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fgetexps", two(0xF000, 0x441E), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fgetexpw", two(0xF000, 0x501E), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fgetexpx", two(0xF000, 0x001E), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fgetexpx", two(0xF000, 0x481E), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fgetexpx", two(0xF000, 0x001E), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fgetmanb", two(0xF000, 0x581F), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fgetmand", two(0xF000, 0x541F), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fgetmanl", two(0xF000, 0x401F), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fgetmanp", two(0xF000, 0x4C1F), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fgetmans", two(0xF000, 0x441F), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fgetmanw", two(0xF000, 0x501F), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fgetmanx", two(0xF000, 0x001F), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fgetmanx", two(0xF000, 0x481F), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fgetmanx", two(0xF000, 0x001F), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fintb", two(0xF000, 0x5801), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fintb", two(0xF000, 0x5801), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintd", two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fintd", two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fintd", two(0xF000, 0x5401), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fintd", two(0xF000, 0x5401), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fintl", two(0xF000, 0x4001), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fintl", two(0xF000, 0x4001), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintp", two(0xF000, 0x4C01), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fints", two(0xF000, 0x4401), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fints", two(0xF000, 0x4401), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintw", two(0xF000, 0x5001), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fintw", two(0xF000, 0x5001), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintx", two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fintx", two(0xF000, 0x4801), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fintx", two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fintrzb", two(0xF000, 0x5803), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fintrzb", two(0xF000, 0x5803), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintrzd", two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fintrzd", two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fintrzd", two(0xF000, 0x5403), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fintrzd", two(0xF000, 0x5403), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fintrzl", two(0xF000, 0x4003), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fintrzl", two(0xF000, 0x4003), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintrzp", two(0xF000, 0x4C03), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fintrzs", two(0xF000, 0x4403), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fintrzs", two(0xF000, 0x4403), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintrzw", two(0xF000, 0x5003), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fintrzw", two(0xF000, 0x5003), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fintrzx", two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fintrzx", two(0xF000, 0x4803), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fintrzx", two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"flog10b", two(0xF000, 0x5815), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"flog10d", two(0xF000, 0x5415), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"flog10l", two(0xF000, 0x4015), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"flog10p", two(0xF000, 0x4C15), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"flog10s", two(0xF000, 0x4415), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"flog10w", two(0xF000, 0x5015), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"flog10x", two(0xF000, 0x0015), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"flog10x", two(0xF000, 0x4815), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"flog10x", two(0xF000, 0x0015), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"flog2b", two(0xF000, 0x5816), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"flog2d", two(0xF000, 0x5416), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"flog2l", two(0xF000, 0x4016), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"flog2p", two(0xF000, 0x4C16), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"flog2s", two(0xF000, 0x4416), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"flog2w", two(0xF000, 0x5016), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"flog2x", two(0xF000, 0x0016), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"flog2x", two(0xF000, 0x4816), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"flog2x", two(0xF000, 0x0016), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"flognb", two(0xF000, 0x5814), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"flognd", two(0xF000, 0x5414), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"flognl", two(0xF000, 0x4014), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"flognp", two(0xF000, 0x4C14), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"flogns", two(0xF000, 0x4414), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"flognw", two(0xF000, 0x5014), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"flognx", two(0xF000, 0x0014), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"flognx", two(0xF000, 0x4814), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"flognx", two(0xF000, 0x0014), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"flognp1b", two(0xF000, 0x5806), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"flognp1d", two(0xF000, 0x5406), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"flognp1l", two(0xF000, 0x4006), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"flognp1p", two(0xF000, 0x4C06), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"flognp1s", two(0xF000, 0x4406), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"flognp1w", two(0xF000, 0x5006), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"flognp1x", two(0xF000, 0x0006), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"flognp1x", two(0xF000, 0x4806), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"flognp1x", two(0xF000, 0x0006), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fmodb", two(0xF000, 0x5821), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fmodd", two(0xF000, 0x5421), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fmodl", two(0xF000, 0x4021), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fmodp", two(0xF000, 0x4C21), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fmods", two(0xF000, 0x4421), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fmodw", two(0xF000, 0x5021), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fmodx", two(0xF000, 0x0021), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fmodx", two(0xF000, 0x4821), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"fmoveb", two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmoveb", two(0xF000, 0x7800), two(0xF1C0, 0xFC7F), "IiF7bs", cfloat },
-{"fmoveb", two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fmoveb", two(0xF000, 0x7800), two(0xF1C0, 0xFC7F), "IiF7$b", mfloat },
-{"fmoved", two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fmoved", two(0xF000, 0x7400), two(0xF1C0, 0xFC7F), "IiF7~F", mfloat },
-{"fmoved", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fmoved", two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fmoved", two(0xF000, 0x7400), two(0xF1C0, 0xFC7F), "IiF7ws", cfloat },
-{"fmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fmovel", two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7$l", mfloat },
+{"fabsb", 4, two(0xF000, 0x5818), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fabsb", 4, two(0xF000, 0x5818), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fabsd", 4, two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fabsd", 4, two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fabsd", 4, two(0xF000, 0x5418), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fabsd", 4, two(0xF000, 0x5418), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fabsl", 4, two(0xF000, 0x4018), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fabsl", 4, two(0xF000, 0x4018), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fabsp", 4, two(0xF000, 0x4C18), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fabss", 4, two(0xF000, 0x4418), two(0xF1C0, 0xFC7F), "Ii;fF7", cfloat },
+{"fabss", 4, two(0xF000, 0x4418), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fabsw", 4, two(0xF000, 0x5018), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fabsw", 4, two(0xF000, 0x5018), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fabsx", 4, two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fabsx", 4, two(0xF000, 0x4818), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fabsx", 4, two(0xF000, 0x0018), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsabsb", 4, two(0xF000, 0x5858), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsabsb", 4, two(0xF000, 0x5858), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsabsd", 4, two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsabsd", 4, two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fsabsd", 4, two(0xF000, 0x5458), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsabsd", 4, two(0xF000, 0x5458), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsabsl", 4, two(0xF000, 0x4058), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsabsl", 4, two(0xF000, 0x4058), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsabsp", 4, two(0xF000, 0x4C58), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fsabss", 4, two(0xF000, 0x4258), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsabss", 4, two(0xF000, 0x4458), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsabsw", 4, two(0xF000, 0x5058), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsabsw", 4, two(0xF000, 0x5058), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsabsx", 4, two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsabsx", 4, two(0xF000, 0x4858), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fsabsx", 4, two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fdabsb", 4, two(0xF000, 0x585C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdabsb", 4, two(0xF000, 0x585c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up},
+{"fdabsd", 4, two(0xF000, 0x005C), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdabsd", 4, two(0xF000, 0x005C), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fdabsd", 4, two(0xF000, 0x545C), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdabsd", 4, two(0xF000, 0x545c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up},
+{"fdabsl", 4, two(0xF000, 0x405C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdabsl", 4, two(0xF000, 0x405c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up},
+{"fdabsp", 4, two(0xF000, 0x4C5c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up},
+{"fdabss", 4, two(0xF000, 0x425C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdabss", 4, two(0xF000, 0x445c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up},
+{"fdabsw", 4, two(0xF000, 0x505C), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdabsw", 4, two(0xF000, 0x505c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up},
+{"fdabsx", 4, two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiF8F7", m68040up},
+{"fdabsx", 4, two(0xF000, 0x485c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up},
+{"fdabsx", 4, two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiFt", m68040up},
+
+{"facosb", 4, two(0xF000, 0x581C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"facosd", 4, two(0xF000, 0x541C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"facosl", 4, two(0xF000, 0x401C), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"facosp", 4, two(0xF000, 0x4C1C), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"facoss", 4, two(0xF000, 0x441C), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"facosw", 4, two(0xF000, 0x501C), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"facosx", 4, two(0xF000, 0x001C), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"facosx", 4, two(0xF000, 0x481C), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"facosx", 4, two(0xF000, 0x001C), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"faddb", 4, two(0xF000, 0x5822), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"faddb", 4, two(0xF000, 0x5822), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"faddd", 4, two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"faddd", 4, two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"faddd", 4, two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"faddd", 4, two(0xF000, 0x5422), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"faddl", 4, two(0xF000, 0x4022), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"faddl", 4, two(0xF000, 0x4022), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"faddp", 4, two(0xF000, 0x4C22), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fadds", 4, two(0xF000, 0x4422), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fadds", 4, two(0xF000, 0x4422), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"faddw", 4, two(0xF000, 0x5022), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"faddw", 4, two(0xF000, 0x5022), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"faddx", 4, two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"faddx", 4, two(0xF000, 0x4822), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"fsaddb", 4, two(0xF000, 0x5862), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsaddb", 4, two(0xF000, 0x5862), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsaddd", 4, two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsaddd", 4, two(0xF000, 0x5462), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsaddd", 4, two(0xF000, 0x5462), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsaddl", 4, two(0xF000, 0x4062), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsaddl", 4, two(0xF000, 0x4062), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsaddp", 4, two(0xF000, 0x4C62), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fsadds", 4, two(0xF000, 0x4462), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsadds", 4, two(0xF000, 0x4862), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsaddw", 4, two(0xF000, 0x5062), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsaddw", 4, two(0xF000, 0x5062), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsaddx", 4, two(0xF000, 0x0062), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsaddx", 4, two(0xF000, 0x4862), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fdaddb", 4, two(0xF000, 0x5826), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdaddb", 4, two(0xF000, 0x5866), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdaddd", 4, two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdaddd", 4, two(0xF000, 0x5426), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdaddd", 4, two(0xF000, 0x5466), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdaddl", 4, two(0xF000, 0x4026), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdaddl", 4, two(0xF000, 0x4066), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdaddp", 4, two(0xF000, 0x4C66), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fdadds", 4, two(0xF000, 0x4466), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdadds", 4, two(0xF000, 0x4826), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdaddw", 4, two(0xF000, 0x5026), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdaddw", 4, two(0xF000, 0x5066), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdaddx", 4, two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdaddx", 4, two(0xF000, 0x4866), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fasinb", 4, two(0xF000, 0x580C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fasind", 4, two(0xF000, 0x540C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fasinl", 4, two(0xF000, 0x400C), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fasinp", 4, two(0xF000, 0x4C0C), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fasins", 4, two(0xF000, 0x440C), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fasinw", 4, two(0xF000, 0x500C), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fasinx", 4, two(0xF000, 0x000C), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fasinx", 4, two(0xF000, 0x480C), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fasinx", 4, two(0xF000, 0x000C), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fatanb", 4, two(0xF000, 0x580A), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fatand", 4, two(0xF000, 0x540A), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fatanl", 4, two(0xF000, 0x400A), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fatanp", 4, two(0xF000, 0x4C0A), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fatans", 4, two(0xF000, 0x440A), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fatanw", 4, two(0xF000, 0x500A), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fatanx", 4, two(0xF000, 0x000A), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fatanx", 4, two(0xF000, 0x480A), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fatanx", 4, two(0xF000, 0x000A), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fatanhb", 4, two(0xF000, 0x580D), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fatanhd", 4, two(0xF000, 0x540D), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fatanhl", 4, two(0xF000, 0x400D), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fatanhp", 4, two(0xF000, 0x4C0D), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fatanhs", 4, two(0xF000, 0x440D), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fatanhw", 4, two(0xF000, 0x500D), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fatanhx", 4, two(0xF000, 0x000D), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fatanhx", 4, two(0xF000, 0x480D), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fatanhx", 4, two(0xF000, 0x000D), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fbeq", 2, one(0xF081), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbf", 2, one(0xF080), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbge", 2, one(0xF093), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbgl", 2, one(0xF096), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbgle", 2, one(0xF097), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbgt", 2, one(0xF092), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fble", 2, one(0xF095), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fblt", 2, one(0xF094), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbne", 2, one(0xF08E), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbnge", 2, one(0xF09C), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbngl", 2, one(0xF099), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbngle", 2, one(0xF098), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbngt", 2, one(0xF09D), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbnle", 2, one(0xF09A), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbnlt", 2, one(0xF09B), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fboge", 2, one(0xF083), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbogl", 2, one(0xF086), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbogt", 2, one(0xF082), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbole", 2, one(0xF085), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbolt", 2, one(0xF084), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbor", 2, one(0xF087), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbseq", 2, one(0xF091), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbsf", 2, one(0xF090), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbsne", 2, one(0xF09E), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbst", 2, one(0xF09F), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbt", 2, one(0xF08F), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbueq", 2, one(0xF089), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbuge", 2, one(0xF08B), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbugt", 2, one(0xF08A), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbule", 2, one(0xF08D), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbult", 2, one(0xF08C), one(0xF1FF), "IdBW", mfloat | cfloat },
+{"fbun", 2, one(0xF088), one(0xF1FF), "IdBW", mfloat | cfloat },
+
+{"fbeql", 2, one(0xF0C1), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbfl", 2, one(0xF0C0), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbgel", 2, one(0xF0D3), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbgll", 2, one(0xF0D6), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbglel", 2, one(0xF0D7), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbgtl", 2, one(0xF0D2), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fblel", 2, one(0xF0D5), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbltl", 2, one(0xF0D4), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbnel", 2, one(0xF0CE), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbngel", 2, one(0xF0DC), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbngll", 2, one(0xF0D9), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbnglel", 2, one(0xF0D8), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbngtl", 2, one(0xF0DD), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbnlel", 2, one(0xF0DA), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbnltl", 2, one(0xF0DB), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbogel", 2, one(0xF0C3), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbogll", 2, one(0xF0C6), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbogtl", 2, one(0xF0C2), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbolel", 2, one(0xF0C5), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fboltl", 2, one(0xF0C4), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fborl", 2, one(0xF0C7), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbseql", 2, one(0xF0D1), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbsfl", 2, one(0xF0D0), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbsnel", 2, one(0xF0DE), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbstl", 2, one(0xF0DF), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbtl", 2, one(0xF0CF), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbueql", 2, one(0xF0C9), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbugel", 2, one(0xF0CB), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbugtl", 2, one(0xF0CA), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbulel", 2, one(0xF0CD), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbultl", 2, one(0xF0CC), one(0xF1FF), "IdBC", mfloat | cfloat },
+{"fbunl", 2, one(0xF0C8), one(0xF1FF), "IdBC", mfloat | cfloat },
+
+{"fjeq", 2, one(0xF081), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjf", 2, one(0xF080), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjge", 2, one(0xF093), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjgl", 2, one(0xF096), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjgle", 2, one(0xF097), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjgt", 2, one(0xF092), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjle", 2, one(0xF095), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjlt", 2, one(0xF094), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjne", 2, one(0xF08E), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjnge", 2, one(0xF09C), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjngl", 2, one(0xF099), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjngle", 2, one(0xF098), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjngt", 2, one(0xF09D), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjnle", 2, one(0xF09A), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjnlt", 2, one(0xF09B), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjoge", 2, one(0xF083), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjogl", 2, one(0xF086), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjogt", 2, one(0xF082), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjole", 2, one(0xF085), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjolt", 2, one(0xF084), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjor", 2, one(0xF087), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjseq", 2, one(0xF091), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjsf", 2, one(0xF090), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjsne", 2, one(0xF09E), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjst", 2, one(0xF09F), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjt", 2, one(0xF08F), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjueq", 2, one(0xF089), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjuge", 2, one(0xF08B), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjugt", 2, one(0xF08A), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjule", 2, one(0xF08D), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjult", 2, one(0xF08C), one(0xF1BF), "IdBc", mfloat | cfloat },
+{"fjun", 2, one(0xF088), one(0xF1BF), "IdBc", mfloat | cfloat },
+
+{"fcmpb", 4, two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fcmpb", 4, two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fcmpd", 4, two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fcmpd", 4, two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fcmpd", 4, two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fcmpl", 4, two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fcmpl", 4, two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fcmpp", 4, two(0xF000, 0x4C38), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fcmps", 4, two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fcmps", 4, two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fcmpw", 4, two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fcmpw", 4, two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fcmpx", 4, two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fcmpx", 4, two(0xF000, 0x4838), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"fcosb", 4, two(0xF000, 0x581D), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fcosd", 4, two(0xF000, 0x541D), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fcosl", 4, two(0xF000, 0x401D), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fcosp", 4, two(0xF000, 0x4C1D), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fcoss", 4, two(0xF000, 0x441D), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fcosw", 4, two(0xF000, 0x501D), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fcosx", 4, two(0xF000, 0x001D), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fcosx", 4, two(0xF000, 0x481D), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fcosx", 4, two(0xF000, 0x001D), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fcoshb", 4, two(0xF000, 0x5819), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fcoshd", 4, two(0xF000, 0x5419), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fcoshl", 4, two(0xF000, 0x4019), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fcoshp", 4, two(0xF000, 0x4C19), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fcoshs", 4, two(0xF000, 0x4419), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fcoshw", 4, two(0xF000, 0x5019), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fcoshx", 4, two(0xF000, 0x0019), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fcoshx", 4, two(0xF000, 0x4819), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fcoshx", 4, two(0xF000, 0x0019), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fdbeq", 4, two(0xF048, 0x0001), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbf", 4, two(0xF048, 0x0000), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbge", 4, two(0xF048, 0x0013), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbgl", 4, two(0xF048, 0x0016), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbgle", 4, two(0xF048, 0x0017), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbgt", 4, two(0xF048, 0x0012), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdble", 4, two(0xF048, 0x0015), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdblt", 4, two(0xF048, 0x0014), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbne", 4, two(0xF048, 0x000E), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbnge", 4, two(0xF048, 0x001C), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbngl", 4, two(0xF048, 0x0019), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbngle", 4, two(0xF048, 0x0018), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbngt", 4, two(0xF048, 0x001D), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbnle", 4, two(0xF048, 0x001A), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbnlt", 4, two(0xF048, 0x001B), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdboge", 4, two(0xF048, 0x0003), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbogl", 4, two(0xF048, 0x0006), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbogt", 4, two(0xF048, 0x0002), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbole", 4, two(0xF048, 0x0005), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbolt", 4, two(0xF048, 0x0004), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbor", 4, two(0xF048, 0x0007), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbseq", 4, two(0xF048, 0x0011), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbsf", 4, two(0xF048, 0x0010), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbsne", 4, two(0xF048, 0x001E), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbst", 4, two(0xF048, 0x001F), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbt", 4, two(0xF048, 0x000F), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbueq", 4, two(0xF048, 0x0009), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbuge", 4, two(0xF048, 0x000B), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbugt", 4, two(0xF048, 0x000A), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbule", 4, two(0xF048, 0x000D), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbult", 4, two(0xF048, 0x000C), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+{"fdbun", 4, two(0xF048, 0x0008), two(0xF1F8, 0xFFFF), "IiDsBw", mfloat },
+
+{"fdivb", 4, two(0xF000, 0x5820), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fdivb", 4, two(0xF000, 0x5820), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdivd", 4, two(0xF000, 0x0020), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdivd", 4, two(0xF000, 0x5420), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fdivd", 4, two(0xF000, 0x5420), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdivl", 4, two(0xF000, 0x4020), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fdivl", 4, two(0xF000, 0x4020), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdivp", 4, two(0xF000, 0x4C20), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fdivs", 4, two(0xF000, 0x4420), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fdivs", 4, two(0xF000, 0x4420), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdivw", 4, two(0xF000, 0x5020), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fdivw", 4, two(0xF000, 0x5020), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdivx", 4, two(0xF000, 0x0020), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fdivx", 4, two(0xF000, 0x4820), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"fsdivb", 4, two(0xF000, 0x5860), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsdivb", 4, two(0xF000, 0x5860), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsdivd", 4, two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsdivd", 4, two(0xF000, 0x5460), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsdivd", 4, two(0xF000, 0x5460), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsdivl", 4, two(0xF000, 0x4060), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsdivl", 4, two(0xF000, 0x4060), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsdivp", 4, two(0xF000, 0x4C60), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fsdivs", 4, two(0xF000, 0x4460), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsdivs", 4, two(0xF000, 0x4460), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsdivw", 4, two(0xF000, 0x5060), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsdivw", 4, two(0xF000, 0x5060), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsdivx", 4, two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsdivx", 4, two(0xF000, 0x4860), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fddivb", 4, two(0xF000, 0x5864), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fddivb", 4, two(0xF000, 0x5864), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fddivd", 4, two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fddivd", 4, two(0xF000, 0x5464), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fddivd", 4, two(0xF000, 0x5464), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fddivl", 4, two(0xF000, 0x4064), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fddivl", 4, two(0xF000, 0x4064), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fddivp", 4, two(0xF000, 0x4C64), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fddivs", 4, two(0xF000, 0x4464), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fddivs", 4, two(0xF000, 0x4464), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fddivw", 4, two(0xF000, 0x5064), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fddivw", 4, two(0xF000, 0x5064), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fddivx", 4, two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fddivx", 4, two(0xF000, 0x4864), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fetoxb", 4, two(0xF000, 0x5810), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fetoxd", 4, two(0xF000, 0x5410), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fetoxl", 4, two(0xF000, 0x4010), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fetoxp", 4, two(0xF000, 0x4C10), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fetoxs", 4, two(0xF000, 0x4410), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fetoxw", 4, two(0xF000, 0x5010), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fetoxx", 4, two(0xF000, 0x0010), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fetoxx", 4, two(0xF000, 0x4810), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fetoxx", 4, two(0xF000, 0x0010), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fetoxm1b", 4, two(0xF000, 0x5808), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fetoxm1d", 4, two(0xF000, 0x5408), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fetoxm1l", 4, two(0xF000, 0x4008), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fetoxm1p", 4, two(0xF000, 0x4C08), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fetoxm1s", 4, two(0xF000, 0x4408), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fetoxm1w", 4, two(0xF000, 0x5008), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fetoxm1x", 4, two(0xF000, 0x0008), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fetoxm1x", 4, two(0xF000, 0x4808), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fetoxm1x", 4, two(0xF000, 0x0008), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fgetexpb", 4, two(0xF000, 0x581E), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fgetexpd", 4, two(0xF000, 0x541E), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fgetexpl", 4, two(0xF000, 0x401E), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fgetexpp", 4, two(0xF000, 0x4C1E), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fgetexps", 4, two(0xF000, 0x441E), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fgetexpw", 4, two(0xF000, 0x501E), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fgetexpx", 4, two(0xF000, 0x001E), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fgetexpx", 4, two(0xF000, 0x481E), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fgetexpx", 4, two(0xF000, 0x001E), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fgetmanb", 4, two(0xF000, 0x581F), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fgetmand", 4, two(0xF000, 0x541F), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fgetmanl", 4, two(0xF000, 0x401F), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fgetmanp", 4, two(0xF000, 0x4C1F), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fgetmans", 4, two(0xF000, 0x441F), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fgetmanw", 4, two(0xF000, 0x501F), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fgetmanx", 4, two(0xF000, 0x001F), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fgetmanx", 4, two(0xF000, 0x481F), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fgetmanx", 4, two(0xF000, 0x001F), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fintb", 4, two(0xF000, 0x5801), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fintb", 4, two(0xF000, 0x5801), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintd", 4, two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fintd", 4, two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fintd", 4, two(0xF000, 0x5401), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fintd", 4, two(0xF000, 0x5401), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fintl", 4, two(0xF000, 0x4001), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fintl", 4, two(0xF000, 0x4001), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintp", 4, two(0xF000, 0x4C01), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fints", 4, two(0xF000, 0x4401), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fints", 4, two(0xF000, 0x4401), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintw", 4, two(0xF000, 0x5001), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fintw", 4, two(0xF000, 0x5001), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintx", 4, two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fintx", 4, two(0xF000, 0x4801), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fintx", 4, two(0xF000, 0x0001), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fintrzb", 4, two(0xF000, 0x5803), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fintrzb", 4, two(0xF000, 0x5803), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintrzd", 4, two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fintrzd", 4, two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fintrzd", 4, two(0xF000, 0x5403), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fintrzd", 4, two(0xF000, 0x5403), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fintrzl", 4, two(0xF000, 0x4003), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fintrzl", 4, two(0xF000, 0x4003), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintrzp", 4, two(0xF000, 0x4C03), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fintrzs", 4, two(0xF000, 0x4403), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fintrzs", 4, two(0xF000, 0x4403), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintrzw", 4, two(0xF000, 0x5003), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fintrzw", 4, two(0xF000, 0x5003), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fintrzx", 4, two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fintrzx", 4, two(0xF000, 0x4803), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fintrzx", 4, two(0xF000, 0x0003), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"flog10b", 4, two(0xF000, 0x5815), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"flog10d", 4, two(0xF000, 0x5415), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"flog10l", 4, two(0xF000, 0x4015), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"flog10p", 4, two(0xF000, 0x4C15), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"flog10s", 4, two(0xF000, 0x4415), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"flog10w", 4, two(0xF000, 0x5015), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"flog10x", 4, two(0xF000, 0x0015), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"flog10x", 4, two(0xF000, 0x4815), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"flog10x", 4, two(0xF000, 0x0015), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"flog2b", 4, two(0xF000, 0x5816), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"flog2d", 4, two(0xF000, 0x5416), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"flog2l", 4, two(0xF000, 0x4016), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"flog2p", 4, two(0xF000, 0x4C16), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"flog2s", 4, two(0xF000, 0x4416), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"flog2w", 4, two(0xF000, 0x5016), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"flog2x", 4, two(0xF000, 0x0016), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"flog2x", 4, two(0xF000, 0x4816), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"flog2x", 4, two(0xF000, 0x0016), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"flognb", 4, two(0xF000, 0x5814), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"flognd", 4, two(0xF000, 0x5414), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"flognl", 4, two(0xF000, 0x4014), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"flognp", 4, two(0xF000, 0x4C14), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"flogns", 4, two(0xF000, 0x4414), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"flognw", 4, two(0xF000, 0x5014), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"flognx", 4, two(0xF000, 0x0014), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"flognx", 4, two(0xF000, 0x4814), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"flognx", 4, two(0xF000, 0x0014), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"flognp1b", 4, two(0xF000, 0x5806), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"flognp1d", 4, two(0xF000, 0x5406), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"flognp1l", 4, two(0xF000, 0x4006), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"flognp1p", 4, two(0xF000, 0x4C06), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"flognp1s", 4, two(0xF000, 0x4406), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"flognp1w", 4, two(0xF000, 0x5006), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"flognp1x", 4, two(0xF000, 0x0006), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"flognp1x", 4, two(0xF000, 0x4806), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"flognp1x", 4, two(0xF000, 0x0006), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fmodb", 4, two(0xF000, 0x5821), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fmodd", 4, two(0xF000, 0x5421), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fmodl", 4, two(0xF000, 0x4021), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fmodp", 4, two(0xF000, 0x4C21), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fmods", 4, two(0xF000, 0x4421), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fmodw", 4, two(0xF000, 0x5021), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fmodx", 4, two(0xF000, 0x0021), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fmodx", 4, two(0xF000, 0x4821), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"fmoveb", 4, two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmoveb", 4, two(0xF000, 0x7800), two(0xF1C0, 0xFC7F), "IiF7bs", cfloat },
+{"fmoveb", 4, two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fmoveb", 4, two(0xF000, 0x7800), two(0xF1C0, 0xFC7F), "IiF7$b", mfloat },
+{"fmoved", 4, two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fmoved", 4, two(0xF000, 0x7400), two(0xF1C0, 0xFC7F), "IiF7~F", mfloat },
+{"fmoved", 4, two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fmoved", 4, two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fmoved", 4, two(0xF000, 0x7400), two(0xF1C0, 0xFC7F), "IiF7ws", cfloat },
+{"fmovel", 4, two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fmovel", 4, two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7$l", mfloat },
/* FIXME: the next two variants should not permit moving an address
register to anything but the floating point instruction register. */
-{"fmovel", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
-{"fmovel", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ls8", mfloat },
-{"fmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmovel", two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7bs", cfloat },
- /* Move the FP control registers */
-{"fmovel", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8ps", cfloat },
-{"fmovel", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Iibss8", cfloat },
-{"fmovep", two(0xF000, 0x4C00), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fmovep", two(0xF000, 0x6C00), two(0xF1C0, 0xFC00), "IiF7~pkC", mfloat },
-{"fmovep", two(0xF000, 0x7C00), two(0xF1C0, 0xFC0F), "IiF7~pDk", mfloat },
-{"fmoves", two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fmoves", two(0xF000, 0x6400), two(0xF1C0, 0xFC7F), "IiF7$f", mfloat },
-{"fmoves", two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmoves", two(0xF000, 0x6400), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fmovew", two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fmovew", two(0xF000, 0x7000), two(0xF1C0, 0xFC7F), "IiF7$w", mfloat },
-{"fmovew", two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmovew", two(0xF000, 0x7000), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fmovex", two(0xF000, 0x0000), two(0xF1FF, 0xE07F), "IiF8F7", mfloat },
-{"fmovex", two(0xF000, 0x4800), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fmovex", two(0xF000, 0x6800), two(0xF1C0, 0xFC7F), "IiF7~x", mfloat },
-
-{"fsmoveb", two(0xF000, 0x5840), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsmoveb", two(0xF000, 0x5840), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmoveb", two(0xF000, 0x7840), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fsmoved", two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsmoved", two(0xF000, 0x5440), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsmoved", two(0xF000, 0x5440), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsmoved", two(0xF000, 0x7440), two(0xF1C0, 0xFC7F), "IiF7ws", cfloat },
-{"fsmovel", two(0xF000, 0x4040), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsmovel", two(0xF000, 0x4040), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmovel", two(0xF000, 0x6040), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fsmoves", two(0xF000, 0x4440), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsmoves", two(0xF000, 0x4440), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmoves", two(0xF000, 0x6440), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fsmovew", two(0xF000, 0x5040), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsmovew", two(0xF000, 0x5040), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmovew", two(0xF000, 0x7040), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fsmovex", two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsmovex", two(0xF000, 0x4840), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fsmovep", two(0xF000, 0x4C40), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-
-{"fdmoveb", two(0xF000, 0x5844), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdmoveb", two(0xF000, 0x5844), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmoveb", two(0xF000, 0x7844), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fdmoved", two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdmoved", two(0xF000, 0x5444), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdmoved", two(0xF000, 0x5444), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdmoved", two(0xF000, 0x7444), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fdmovel", two(0xF000, 0x4044), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdmovel", two(0xF000, 0x4044), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmovel", two(0xF000, 0x6044), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fdmoves", two(0xF000, 0x4444), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdmoves", two(0xF000, 0x4444), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmoves", two(0xF000, 0x6444), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fdmovew", two(0xF000, 0x5044), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdmovew", two(0xF000, 0x5044), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmovew", two(0xF000, 0x7044), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
-{"fdmovex", two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdmovex", two(0xF000, 0x4844), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fdmovep", two(0xF000, 0x4C44), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-
-{"fmovecrx", two(0xF000, 0x5C00), two(0xF1FF, 0xFC00), "Ii#CF7", mfloat },
-
-{"fmovemd", two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizsl3", cfloat },
-{"fmovemd", two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizs#3", cfloat },
-{"fmovemd", two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Ii#3ys", cfloat },
-{"fmovemd", two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Iil3ys", cfloat },
-
-{"fmovemx", two(0xF000, 0xF800), two(0xF1C0, 0xFF8F), "IiDk&s", mfloat },
-{"fmovemx", two(0xF020, 0xE800), two(0xF1F8, 0xFF8F), "IiDk-s", mfloat },
-{"fmovemx", two(0xF000, 0xD800), two(0xF1C0, 0xFF8F), "Ii&sDk", mfloat },
-{"fmovemx", two(0xF018, 0xD800), two(0xF1F8, 0xFF8F), "Ii+sDk", mfloat },
-{"fmovemx", two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Idl3&s", mfloat },
-{"fmovemx", two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Id#3&s", mfloat },
-{"fmovemx", two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&sl3", mfloat },
-{"fmovemx", two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&s#3", mfloat },
-{"fmovemx", two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "IdL3-s", mfloat },
-{"fmovemx", two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "Id#3-s", mfloat },
-{"fmovemx", two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+sl3", mfloat },
-{"fmovemx", two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+s#3", mfloat },
-
-{"fmoveml", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
-{"fmoveml", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "IiL8~s", mfloat },
+{"fmovel", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
+{"fmovel", 4, two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ls8", mfloat },
+{"fmovel", 4, two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmovel", 4, two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7bs", cfloat },
+ /* Move the FP control registers. */
+{"fmovel", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8ps", cfloat },
+{"fmovel", 4, two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Iibss8", cfloat },
+{"fmovep", 4, two(0xF000, 0x4C00), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fmovep", 4, two(0xF000, 0x6C00), two(0xF1C0, 0xFC00), "IiF7~pkC", mfloat },
+{"fmovep", 4, two(0xF000, 0x7C00), two(0xF1C0, 0xFC0F), "IiF7~pDk", mfloat },
+{"fmoves", 4, two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fmoves", 4, two(0xF000, 0x6400), two(0xF1C0, 0xFC7F), "IiF7$f", mfloat },
+{"fmoves", 4, two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmoves", 4, two(0xF000, 0x6400), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fmovew", 4, two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fmovew", 4, two(0xF000, 0x7000), two(0xF1C0, 0xFC7F), "IiF7$w", mfloat },
+{"fmovew", 4, two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmovew", 4, two(0xF000, 0x7000), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fmovex", 4, two(0xF000, 0x0000), two(0xF1FF, 0xE07F), "IiF8F7", mfloat },
+{"fmovex", 4, two(0xF000, 0x4800), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fmovex", 4, two(0xF000, 0x6800), two(0xF1C0, 0xFC7F), "IiF7~x", mfloat },
+
+{"fsmoveb", 4, two(0xF000, 0x5840), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsmoveb", 4, two(0xF000, 0x5840), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmoveb", 4, two(0xF000, 0x7840), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fsmoved", 4, two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsmoved", 4, two(0xF000, 0x5440), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsmoved", 4, two(0xF000, 0x5440), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsmoved", 4, two(0xF000, 0x7440), two(0xF1C0, 0xFC7F), "IiF7ws", cfloat },
+{"fsmovel", 4, two(0xF000, 0x4040), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsmovel", 4, two(0xF000, 0x4040), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmovel", 4, two(0xF000, 0x6040), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fsmoves", 4, two(0xF000, 0x4440), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsmoves", 4, two(0xF000, 0x4440), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmoves", 4, two(0xF000, 0x6440), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fsmovew", 4, two(0xF000, 0x5040), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsmovew", 4, two(0xF000, 0x5040), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmovew", 4, two(0xF000, 0x7040), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fsmovex", 4, two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsmovex", 4, two(0xF000, 0x4840), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fsmovep", 4, two(0xF000, 0x4C40), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+
+{"fdmoveb", 4, two(0xF000, 0x5844), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdmoveb", 4, two(0xF000, 0x5844), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmoveb", 4, two(0xF000, 0x7844), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fdmoved", 4, two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdmoved", 4, two(0xF000, 0x5444), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdmoved", 4, two(0xF000, 0x5444), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdmoved", 4, two(0xF000, 0x7444), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fdmovel", 4, two(0xF000, 0x4044), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdmovel", 4, two(0xF000, 0x4044), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmovel", 4, two(0xF000, 0x6044), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fdmoves", 4, two(0xF000, 0x4444), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdmoves", 4, two(0xF000, 0x4444), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmoves", 4, two(0xF000, 0x6444), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fdmovew", 4, two(0xF000, 0x5044), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdmovew", 4, two(0xF000, 0x5044), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmovew", 4, two(0xF000, 0x7044), two(0xF1C0, 0xFC7F), "IiF7qs", cfloat },
+{"fdmovex", 4, two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdmovex", 4, two(0xF000, 0x4844), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fdmovep", 4, two(0xF000, 0x4C44), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+
+{"fmovecrx", 4, two(0xF000, 0x5C00), two(0xF1FF, 0xFC00), "Ii#CF7", mfloat },
+
+{"fmovemd", 4, two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizsl3", cfloat },
+{"fmovemd", 4, two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizs#3", cfloat },
+{"fmovemd", 4, two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Ii#3ys", cfloat },
+{"fmovemd", 4, two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Iil3ys", cfloat },
+
+{"fmovemx", 4, two(0xF000, 0xF800), two(0xF1C0, 0xFF8F), "IiDk&s", mfloat },
+{"fmovemx", 4, two(0xF020, 0xE800), two(0xF1F8, 0xFF8F), "IiDk-s", mfloat },
+{"fmovemx", 4, two(0xF000, 0xD800), two(0xF1C0, 0xFF8F), "Ii&sDk", mfloat },
+{"fmovemx", 4, two(0xF018, 0xD800), two(0xF1F8, 0xFF8F), "Ii+sDk", mfloat },
+{"fmovemx", 4, two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Idl3&s", mfloat },
+{"fmovemx", 4, two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Id#3&s", mfloat },
+{"fmovemx", 4, two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&sl3", mfloat },
+{"fmovemx", 4, two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&s#3", mfloat },
+{"fmovemx", 4, two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "IdL3-s", mfloat },
+{"fmovemx", 4, two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "Id#3-s", mfloat },
+{"fmovemx", 4, two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+sl3", mfloat },
+{"fmovemx", 4, two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+s#3", mfloat },
+
+{"fmoveml", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
+{"fmoveml", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "IiL8~s", mfloat },
/* FIXME: In the next instruction, we should only permit %dn if the
target is a single register. We should only permit %an if the
target is a single %fpiar. */
-{"fmoveml", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*lL8", mfloat },
-
-{"fmovem", two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "IizsL3", cfloat },
-{"fmovem", two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizs#3", cfloat },
-{"fmovem", two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Ii#3ys", cfloat },
-{"fmovem", two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "IiL3ys", cfloat },
-
-{"fmovem", two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "IdL3-s", mfloat },
-{"fmovem", two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Idl3&s", mfloat },
-{"fmovem", two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+sl3", mfloat },
-{"fmovem", two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&sl3", mfloat },
-{"fmovem", two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "Id#3-s", mfloat },
-{"fmovem", two(0xF020, 0xE800), two(0xF1F8, 0xFF8F), "IiDk-s", mfloat },
-{"fmovem", two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Id#3&s", mfloat },
-{"fmovem", two(0xF000, 0xF800), two(0xF1C0, 0xFF8F), "IiDk&s", mfloat },
-{"fmovem", two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+s#3", mfloat },
-{"fmovem", two(0xF018, 0xD800), two(0xF1F8, 0xFF8F), "Ii+sDk", mfloat },
-{"fmovem", two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&s#3", mfloat },
-{"fmovem", two(0xF000, 0xD800), two(0xF1C0, 0xFF8F), "Ii&sDk", mfloat },
-{"fmovem", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
-{"fmovem", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ss8", mfloat },
-{"fmovem", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "IiL8~s", mfloat },
-{"fmovem", two(0xF000, 0x8000), two(0xF2C0, 0xE3FF), "Ii*sL8", mfloat },
-
-{"fmulb", two(0xF000, 0x5823), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fmulb", two(0xF000, 0x5823), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmuld", two(0xF000, 0x0023), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fmuld", two(0xF000, 0x5423), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fmuld", two(0xF000, 0x5423), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fmull", two(0xF000, 0x4023), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fmull", two(0xF000, 0x4023), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmulp", two(0xF000, 0x4C23), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fmuls", two(0xF000, 0x4423), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fmuls", two(0xF000, 0x4423), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmulw", two(0xF000, 0x5023), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fmulw", two(0xF000, 0x5023), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fmulx", two(0xF000, 0x0023), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fmulx", two(0xF000, 0x4823), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"fsmulb", two(0xF000, 0x5863), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsmulb", two(0xF000, 0x5863), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmuld", two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsmuld", two(0xF000, 0x5463), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsmuld", two(0xF000, 0x5463), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsmull", two(0xF000, 0x4063), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsmull", two(0xF000, 0x4063), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmulp", two(0xF000, 0x4C63), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fsmuls", two(0xF000, 0x4463), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsmuls", two(0xF000, 0x4463), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmulw", two(0xF000, 0x5063), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsmulw", two(0xF000, 0x5063), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsmulx", two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsmulx", two(0xF000, 0x4863), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fdmulb", two(0xF000, 0x5867), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdmulb", two(0xF000, 0x5867), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmuld", two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdmuld", two(0xF000, 0x5467), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdmuld", two(0xF000, 0x5467), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdmull", two(0xF000, 0x4067), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdmull", two(0xF000, 0x4067), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmulp", two(0xF000, 0x4C67), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fdmuls", two(0xF000, 0x4467), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdmuls", two(0xF000, 0x4467), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmulw", two(0xF000, 0x5067), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdmulw", two(0xF000, 0x5067), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdmulx", two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdmulx", two(0xF000, 0x4867), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-
-{"fnegb", two(0xF000, 0x581A), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fnegb", two(0xF000, 0x581A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fnegd", two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fnegd", two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fnegd", two(0xF000, 0x541A), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fnegd", two(0xF000, 0x541A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fnegl", two(0xF000, 0x401A), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fnegl", two(0xF000, 0x401A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fnegp", two(0xF000, 0x4C1A), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fnegs", two(0xF000, 0x441A), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fnegs", two(0xF000, 0x441A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fnegw", two(0xF000, 0x501A), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fnegw", two(0xF000, 0x501A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fnegx", two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fnegx", two(0xF000, 0x481A), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fnegx", two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsnegb", two(0xF000, 0x585A), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fsnegb", two(0xF000, 0x585A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsnegd", two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsnegd", two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fsnegd", two(0xF000, 0x545A), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fsnegd", two(0xF000, 0x545A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsnegl", two(0xF000, 0x405A), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fsnegl", two(0xF000, 0x405A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsnegp", two(0xF000, 0x4C5A), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fsnegs", two(0xF000, 0x445A), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fsnegs", two(0xF000, 0x445A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsnegw", two(0xF000, 0x505A), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fsnegw", two(0xF000, 0x505A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsnegx", two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fsnegx", two(0xF000, 0x485A), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fsnegx", two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fdnegb", two(0xF000, 0x585E), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdnegb", two(0xF000, 0x585E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdnegd", two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdnegd", two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fdnegd", two(0xF000, 0x545E), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdnegd", two(0xF000, 0x545E), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdnegl", two(0xF000, 0x405E), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdnegl", two(0xF000, 0x405E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdnegp", two(0xF000, 0x4C5E), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fdnegs", two(0xF000, 0x445E), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdnegs", two(0xF000, 0x445E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdnegw", two(0xF000, 0x505E), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdnegw", two(0xF000, 0x505E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdnegx", two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdnegx", two(0xF000, 0x485E), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fdnegx", two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fnop", two(0xF280, 0x0000), two(0xFFFF, 0xFFFF), "Ii", mfloat | cfloat },
-
-{"fremb", two(0xF000, 0x5825), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fremd", two(0xF000, 0x5425), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"freml", two(0xF000, 0x4025), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fremp", two(0xF000, 0x4C25), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"frems", two(0xF000, 0x4425), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fremw", two(0xF000, 0x5025), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fremx", two(0xF000, 0x0025), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fremx", two(0xF000, 0x4825), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-
-{"frestore", one(0xF140), one(0xF1C0), "Id<s", mfloat },
-{"frestore", one(0xF140), one(0xF1C0), "Idys", cfloat },
-
-{"fsave", one(0xF100), one(0xF1C0), "Id>s", mfloat },
-{"fsave", one(0xF100), one(0xF1C0), "Idzs", cfloat },
-
-{"fscaleb", two(0xF000, 0x5826), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fscaled", two(0xF000, 0x5426), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fscalel", two(0xF000, 0x4026), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fscalep", two(0xF000, 0x4C26), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fscales", two(0xF000, 0x4426), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fscalew", two(0xF000, 0x5026), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fscalex", two(0xF000, 0x0026), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fscalex", two(0xF000, 0x4826), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fmoveml", 4, two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*lL8", mfloat },
+
+{"fmovem", 4, two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "IizsL3", cfloat },
+{"fmovem", 4, two(0xF000, 0xD000), two(0xFFC0, 0xFF00), "Iizs#3", cfloat },
+{"fmovem", 4, two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "Ii#3ys", cfloat },
+{"fmovem", 4, two(0xF000, 0xF000), two(0xFFC0, 0xFF00), "IiL3ys", cfloat },
+
+{"fmovem", 4, two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "IdL3-s", mfloat },
+{"fmovem", 4, two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Idl3&s", mfloat },
+{"fmovem", 4, two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+sl3", mfloat },
+{"fmovem", 4, two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&sl3", mfloat },
+{"fmovem", 4, two(0xF020, 0xE000), two(0xF1F8, 0xFF00), "Id#3-s", mfloat },
+{"fmovem", 4, two(0xF020, 0xE800), two(0xF1F8, 0xFF8F), "IiDk-s", mfloat },
+{"fmovem", 4, two(0xF000, 0xF000), two(0xF1C0, 0xFF00), "Id#3&s", mfloat },
+{"fmovem", 4, two(0xF000, 0xF800), two(0xF1C0, 0xFF8F), "IiDk&s", mfloat },
+{"fmovem", 4, two(0xF018, 0xD000), two(0xF1F8, 0xFF00), "Id+s#3", mfloat },
+{"fmovem", 4, two(0xF018, 0xD800), two(0xF1F8, 0xFF8F), "Ii+sDk", mfloat },
+{"fmovem", 4, two(0xF000, 0xD000), two(0xF1C0, 0xFF00), "Id&s#3", mfloat },
+{"fmovem", 4, two(0xF000, 0xD800), two(0xF1C0, 0xFF8F), "Ii&sDk", mfloat },
+{"fmovem", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat },
+{"fmovem", 4, two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ss8", mfloat },
+{"fmovem", 4, two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "IiL8~s", mfloat },
+{"fmovem", 4, two(0xF000, 0x8000), two(0xF2C0, 0xE3FF), "Ii*sL8", mfloat },
+
+{"fmulb", 4, two(0xF000, 0x5823), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fmulb", 4, two(0xF000, 0x5823), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmuld", 4, two(0xF000, 0x0023), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fmuld", 4, two(0xF000, 0x5423), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fmuld", 4, two(0xF000, 0x5423), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fmull", 4, two(0xF000, 0x4023), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fmull", 4, two(0xF000, 0x4023), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmulp", 4, two(0xF000, 0x4C23), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fmuls", 4, two(0xF000, 0x4423), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fmuls", 4, two(0xF000, 0x4423), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmulw", 4, two(0xF000, 0x5023), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fmulw", 4, two(0xF000, 0x5023), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fmulx", 4, two(0xF000, 0x0023), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fmulx", 4, two(0xF000, 0x4823), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"fsmulb", 4, two(0xF000, 0x5863), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsmulb", 4, two(0xF000, 0x5863), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmuld", 4, two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsmuld", 4, two(0xF000, 0x5463), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsmuld", 4, two(0xF000, 0x5463), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsmull", 4, two(0xF000, 0x4063), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsmull", 4, two(0xF000, 0x4063), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmulp", 4, two(0xF000, 0x4C63), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fsmuls", 4, two(0xF000, 0x4463), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsmuls", 4, two(0xF000, 0x4463), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmulw", 4, two(0xF000, 0x5063), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsmulw", 4, two(0xF000, 0x5063), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsmulx", 4, two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsmulx", 4, two(0xF000, 0x4863), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fdmulb", 4, two(0xF000, 0x5867), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdmulb", 4, two(0xF000, 0x5867), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmuld", 4, two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdmuld", 4, two(0xF000, 0x5467), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdmuld", 4, two(0xF000, 0x5467), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdmull", 4, two(0xF000, 0x4067), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdmull", 4, two(0xF000, 0x4067), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmulp", 4, two(0xF000, 0x4C67), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fdmuls", 4, two(0xF000, 0x4467), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdmuls", 4, two(0xF000, 0x4467), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmulw", 4, two(0xF000, 0x5067), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdmulw", 4, two(0xF000, 0x5067), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdmulx", 4, two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdmulx", 4, two(0xF000, 0x4867), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+
+{"fnegb", 4, two(0xF000, 0x581A), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fnegb", 4, two(0xF000, 0x581A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fnegd", 4, two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fnegd", 4, two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fnegd", 4, two(0xF000, 0x541A), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fnegd", 4, two(0xF000, 0x541A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fnegl", 4, two(0xF000, 0x401A), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fnegl", 4, two(0xF000, 0x401A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fnegp", 4, two(0xF000, 0x4C1A), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fnegs", 4, two(0xF000, 0x441A), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fnegs", 4, two(0xF000, 0x441A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fnegw", 4, two(0xF000, 0x501A), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fnegw", 4, two(0xF000, 0x501A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fnegx", 4, two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fnegx", 4, two(0xF000, 0x481A), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fnegx", 4, two(0xF000, 0x001A), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsnegb", 4, two(0xF000, 0x585A), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fsnegb", 4, two(0xF000, 0x585A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsnegd", 4, two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsnegd", 4, two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fsnegd", 4, two(0xF000, 0x545A), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fsnegd", 4, two(0xF000, 0x545A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsnegl", 4, two(0xF000, 0x405A), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fsnegl", 4, two(0xF000, 0x405A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsnegp", 4, two(0xF000, 0x4C5A), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fsnegs", 4, two(0xF000, 0x445A), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fsnegs", 4, two(0xF000, 0x445A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsnegw", 4, two(0xF000, 0x505A), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fsnegw", 4, two(0xF000, 0x505A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsnegx", 4, two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fsnegx", 4, two(0xF000, 0x485A), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fsnegx", 4, two(0xF000, 0x005A), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fdnegb", 4, two(0xF000, 0x585E), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdnegb", 4, two(0xF000, 0x585E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdnegd", 4, two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdnegd", 4, two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fdnegd", 4, two(0xF000, 0x545E), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdnegd", 4, two(0xF000, 0x545E), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdnegl", 4, two(0xF000, 0x405E), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdnegl", 4, two(0xF000, 0x405E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdnegp", 4, two(0xF000, 0x4C5E), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fdnegs", 4, two(0xF000, 0x445E), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdnegs", 4, two(0xF000, 0x445E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdnegw", 4, two(0xF000, 0x505E), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdnegw", 4, two(0xF000, 0x505E), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdnegx", 4, two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdnegx", 4, two(0xF000, 0x485E), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fdnegx", 4, two(0xF000, 0x005E), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fnop", 4, two(0xF280, 0x0000), two(0xFFFF, 0xFFFF), "Ii", mfloat | cfloat },
+
+{"fremb", 4, two(0xF000, 0x5825), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fremd", 4, two(0xF000, 0x5425), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"freml", 4, two(0xF000, 0x4025), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fremp", 4, two(0xF000, 0x4C25), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"frems", 4, two(0xF000, 0x4425), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fremw", 4, two(0xF000, 0x5025), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fremx", 4, two(0xF000, 0x0025), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fremx", 4, two(0xF000, 0x4825), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+
+{"frestore", 2, one(0xF140), one(0xF1C0), "Id<s", mfloat },
+{"frestore", 2, one(0xF140), one(0xF1C0), "Idys", cfloat },
+
+{"fsave", 2, one(0xF100), one(0xF1C0), "Id>s", mfloat },
+{"fsave", 2, one(0xF100), one(0xF1C0), "Idzs", cfloat },
+
+{"fscaleb", 4, two(0xF000, 0x5826), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fscaled", 4, two(0xF000, 0x5426), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fscalel", 4, two(0xF000, 0x4026), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fscalep", 4, two(0xF000, 0x4C26), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fscales", 4, two(0xF000, 0x4426), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fscalew", 4, two(0xF000, 0x5026), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fscalex", 4, two(0xF000, 0x0026), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fscalex", 4, two(0xF000, 0x4826), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
/* $ is necessary to prevent the assembler from using PC-relative.
- If @ were used, "label: fseq label" could produce "ftrapeq",
+ If @ were used, "label: fseq label" could produce "ftrapeq", 2,
because "label" became "pc@label". */
-{"fseq", two(0xF040, 0x0001), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsf", two(0xF040, 0x0000), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsge", two(0xF040, 0x0013), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsgl", two(0xF040, 0x0016), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsgle", two(0xF040, 0x0017), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsgt", two(0xF040, 0x0012), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsle", two(0xF040, 0x0015), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fslt", two(0xF040, 0x0014), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsne", two(0xF040, 0x000E), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsnge", two(0xF040, 0x001C), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsngl", two(0xF040, 0x0019), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsngle", two(0xF040, 0x0018), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsngt", two(0xF040, 0x001D), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsnle", two(0xF040, 0x001A), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsnlt", two(0xF040, 0x001B), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsoge", two(0xF040, 0x0003), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsogl", two(0xF040, 0x0006), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsogt", two(0xF040, 0x0002), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsole", two(0xF040, 0x0005), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsolt", two(0xF040, 0x0004), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsor", two(0xF040, 0x0007), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsseq", two(0xF040, 0x0011), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fssf", two(0xF040, 0x0010), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fssne", two(0xF040, 0x001E), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsst", two(0xF040, 0x001F), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fst", two(0xF040, 0x000F), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsueq", two(0xF040, 0x0009), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsuge", two(0xF040, 0x000B), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsugt", two(0xF040, 0x000A), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsule", two(0xF040, 0x000D), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsult", two(0xF040, 0x000C), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-{"fsun", two(0xF040, 0x0008), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
-
-{"fsgldivb", two(0xF000, 0x5824), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsgldivd", two(0xF000, 0x5424), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsgldivl", two(0xF000, 0x4024), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsgldivp", two(0xF000, 0x4C24), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsgldivs", two(0xF000, 0x4424), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsgldivw", two(0xF000, 0x5024), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsgldivx", two(0xF000, 0x0024), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsgldivx", two(0xF000, 0x4824), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsgldivx", two(0xF000, 0x0024), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsglmulb", two(0xF000, 0x5827), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsglmuld", two(0xF000, 0x5427), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsglmull", two(0xF000, 0x4027), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsglmulp", two(0xF000, 0x4C27), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsglmuls", two(0xF000, 0x4427), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsglmulw", two(0xF000, 0x5027), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsglmulx", two(0xF000, 0x0027), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsglmulx", two(0xF000, 0x4827), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsglmulx", two(0xF000, 0x0027), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsinb", two(0xF000, 0x580E), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsind", two(0xF000, 0x540E), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsinl", two(0xF000, 0x400E), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsinp", two(0xF000, 0x4C0E), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsins", two(0xF000, 0x440E), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsinw", two(0xF000, 0x500E), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsinx", two(0xF000, 0x000E), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsinx", two(0xF000, 0x480E), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsinx", two(0xF000, 0x000E), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsincosb", two(0xF000, 0x5830), two(0xF1C0, 0xFC78), "Ii;bF3F7", mfloat },
-{"fsincosd", two(0xF000, 0x5430), two(0xF1C0, 0xFC78), "Ii;FF3F7", mfloat },
-{"fsincosl", two(0xF000, 0x4030), two(0xF1C0, 0xFC78), "Ii;lF3F7", mfloat },
-{"fsincosp", two(0xF000, 0x4C30), two(0xF1C0, 0xFC78), "Ii;pF3F7", mfloat },
-{"fsincoss", two(0xF000, 0x4430), two(0xF1C0, 0xFC78), "Ii;fF3F7", mfloat },
-{"fsincosw", two(0xF000, 0x5030), two(0xF1C0, 0xFC78), "Ii;wF3F7", mfloat },
-{"fsincosx", two(0xF000, 0x0030), two(0xF1C0, 0xE078), "IiF8F3F7", mfloat },
-{"fsincosx", two(0xF000, 0x4830), two(0xF1C0, 0xFC78), "Ii;xF3F7", mfloat },
-
-{"fsinhb", two(0xF000, 0x5802), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsinhd", two(0xF000, 0x5402), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsinhl", two(0xF000, 0x4002), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsinhp", two(0xF000, 0x4C02), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsinhs", two(0xF000, 0x4402), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsinhw", two(0xF000, 0x5002), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsinhx", two(0xF000, 0x0002), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsinhx", two(0xF000, 0x4802), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsinhx", two(0xF000, 0x0002), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fsqrtb", two(0xF000, 0x5804), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsqrtb", two(0xF000, 0x5804), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsqrtd", two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsqrtd", two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fsqrtd", two(0xF000, 0x5404), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsqrtd", two(0xF000, 0x5404), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsqrtl", two(0xF000, 0x4004), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsqrtl", two(0xF000, 0x4004), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsqrtp", two(0xF000, 0x4C04), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsqrts", two(0xF000, 0x4404), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsqrts", two(0xF000, 0x4404), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsqrtw", two(0xF000, 0x5004), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsqrtw", two(0xF000, 0x5004), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsqrtx", two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsqrtx", two(0xF000, 0x4804), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsqrtx", two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fssqrtb", two(0xF000, 0x5841), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fssqrtb", two(0xF000, 0x5841), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssqrtd", two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fssqrtd", two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fssqrtd", two(0xF000, 0x5441), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fssqrtd", two(0xF000, 0x5441), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fssqrtl", two(0xF000, 0x4041), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fssqrtl", two(0xF000, 0x4041), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssqrtp", two(0xF000, 0x4C41), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fssqrts", two(0xF000, 0x4441), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fssqrts", two(0xF000, 0x4441), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssqrtw", two(0xF000, 0x5041), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fssqrtw", two(0xF000, 0x5041), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssqrtx", two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fssqrtx", two(0xF000, 0x4841), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fssqrtx", two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fdsqrtb", two(0xF000, 0x5845), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdsqrtb", two(0xF000, 0x5845), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsqrtd", two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdsqrtd", two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiFt", cfloat },
-{"fdsqrtd", two(0xF000, 0x5445), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdsqrtl", two(0xF000, 0x4045), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdsqrtl", two(0xF000, 0x4045), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsqrtp", two(0xF000, 0x4C45), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fdsqrts", two(0xF000, 0x4445), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdsqrts", two(0xF000, 0x4445), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsqrtw", two(0xF000, 0x5045), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdsqrtw", two(0xF000, 0x5045), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsqrtx", two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdsqrtx", two(0xF000, 0x4845), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fdsqrtx", two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fsubb", two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"fsubb", two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsubd", two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fsubd", two(0xF000, 0x5428), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"fsubd", two(0xF000, 0x5428), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fsubl", two(0xF000, 0x4028), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"fsubl", two(0xF000, 0x4028), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsubp", two(0xF000, 0x4C28), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"fsubs", two(0xF000, 0x4428), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"fsubs", two(0xF000, 0x4428), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsubw", two(0xF000, 0x5028), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"fsubw", two(0xF000, 0x5028), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fsubx", two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"fsubx", two(0xF000, 0x4828), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"fsubx", two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"fssubb", two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssubb", two(0xF000, 0x5868), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fssubd", two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fssubd", two(0xF000, 0x5468), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fssubd", two(0xF000, 0x5468), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fssubl", two(0xF000, 0x4068), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fssubl", two(0xF000, 0x4068), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssubp", two(0xF000, 0x4C68), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fssubs", two(0xF000, 0x4468), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fssubs", two(0xF000, 0x4468), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssubw", two(0xF000, 0x5068), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fssubw", two(0xF000, 0x5068), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fssubx", two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fssubx", two(0xF000, 0x4868), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fssubx", two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"fdsubb", two(0xF000, 0x586A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsubb", two(0xF000, 0x586c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
-{"fdsubd", two(0xF000, 0x006A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
-{"fdsubd", two(0xF000, 0x546A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
-{"fdsubd", two(0xF000, 0x546c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
-{"fdsubl", two(0xF000, 0x406A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsubl", two(0xF000, 0x406c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
-{"fdsubp", two(0xF000, 0x4C6c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
-{"fdsubs", two(0xF000, 0x446A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsubs", two(0xF000, 0x446c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
-{"fdsubw", two(0xF000, 0x506A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
-{"fdsubw", two(0xF000, 0x506c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
-{"fdsubx", two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
-{"fdsubx", two(0xF000, 0x486c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
-{"fdsubx", two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiFt", m68040up },
-
-{"ftanb", two(0xF000, 0x580F), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"ftand", two(0xF000, 0x540F), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"ftanl", two(0xF000, 0x400F), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"ftanp", two(0xF000, 0x4C0F), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"ftans", two(0xF000, 0x440F), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"ftanw", two(0xF000, 0x500F), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"ftanx", two(0xF000, 0x000F), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"ftanx", two(0xF000, 0x480F), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"ftanx", two(0xF000, 0x000F), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"ftanhb", two(0xF000, 0x5809), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"ftanhd", two(0xF000, 0x5409), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"ftanhl", two(0xF000, 0x4009), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"ftanhp", two(0xF000, 0x4C09), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"ftanhs", two(0xF000, 0x4409), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"ftanhw", two(0xF000, 0x5009), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"ftanhx", two(0xF000, 0x0009), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"ftanhx", two(0xF000, 0x4809), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"ftanhx", two(0xF000, 0x0009), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"ftentoxb", two(0xF000, 0x5812), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"ftentoxd", two(0xF000, 0x5412), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"ftentoxl", two(0xF000, 0x4012), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"ftentoxp", two(0xF000, 0x4C12), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"ftentoxs", two(0xF000, 0x4412), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"ftentoxw", two(0xF000, 0x5012), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"ftentoxx", two(0xF000, 0x0012), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"ftentoxx", two(0xF000, 0x4812), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"ftentoxx", two(0xF000, 0x0012), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"ftrapeq", two(0xF07C, 0x0001), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapf", two(0xF07C, 0x0000), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapge", two(0xF07C, 0x0013), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapgl", two(0xF07C, 0x0016), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapgle", two(0xF07C, 0x0017), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapgt", two(0xF07C, 0x0012), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftraple", two(0xF07C, 0x0015), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftraplt", two(0xF07C, 0x0014), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapne", two(0xF07C, 0x000E), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapnge", two(0xF07C, 0x001C), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapngl", two(0xF07C, 0x0019), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapngle", two(0xF07C, 0x0018), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapngt", two(0xF07C, 0x001D), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapnle", two(0xF07C, 0x001A), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapnlt", two(0xF07C, 0x001B), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapoge", two(0xF07C, 0x0003), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapogl", two(0xF07C, 0x0006), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapogt", two(0xF07C, 0x0002), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapole", two(0xF07C, 0x0005), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapolt", two(0xF07C, 0x0004), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapor", two(0xF07C, 0x0007), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapseq", two(0xF07C, 0x0011), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapsf", two(0xF07C, 0x0010), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapsne", two(0xF07C, 0x001E), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapst", two(0xF07C, 0x001F), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapt", two(0xF07C, 0x000F), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapueq", two(0xF07C, 0x0009), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapuge", two(0xF07C, 0x000B), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapugt", two(0xF07C, 0x000A), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapule", two(0xF07C, 0x000D), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapult", two(0xF07C, 0x000C), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-{"ftrapun", two(0xF07C, 0x0008), two(0xF1FF, 0xFFFF), "Ii", mfloat },
-
-{"ftrapeqw", two(0xF07A, 0x0001), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapfw", two(0xF07A, 0x0000), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapgew", two(0xF07A, 0x0013), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapglw", two(0xF07A, 0x0016), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapglew", two(0xF07A, 0x0017), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapgtw", two(0xF07A, 0x0012), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftraplew", two(0xF07A, 0x0015), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapltw", two(0xF07A, 0x0014), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapnew", two(0xF07A, 0x000E), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapngew", two(0xF07A, 0x001C), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapnglw", two(0xF07A, 0x0019), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapnglew", two(0xF07A, 0x0018), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapngtw", two(0xF07A, 0x001D), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapnlew", two(0xF07A, 0x001A), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapnltw", two(0xF07A, 0x001B), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapogew", two(0xF07A, 0x0003), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapoglw", two(0xF07A, 0x0006), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapogtw", two(0xF07A, 0x0002), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapolew", two(0xF07A, 0x0005), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapoltw", two(0xF07A, 0x0004), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftraporw", two(0xF07A, 0x0007), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapseqw", two(0xF07A, 0x0011), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapsfw", two(0xF07A, 0x0010), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapsnew", two(0xF07A, 0x001E), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapstw", two(0xF07A, 0x001F), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftraptw", two(0xF07A, 0x000F), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapueqw", two(0xF07A, 0x0009), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapugew", two(0xF07A, 0x000B), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapugtw", two(0xF07A, 0x000A), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapulew", two(0xF07A, 0x000D), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapultw", two(0xF07A, 0x000C), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-{"ftrapunw", two(0xF07A, 0x0008), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
-
-{"ftrapeql", two(0xF07B, 0x0001), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapfl", two(0xF07B, 0x0000), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapgel", two(0xF07B, 0x0013), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapgll", two(0xF07B, 0x0016), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapglel", two(0xF07B, 0x0017), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapgtl", two(0xF07B, 0x0012), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftraplel", two(0xF07B, 0x0015), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapltl", two(0xF07B, 0x0014), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapnel", two(0xF07B, 0x000E), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapngel", two(0xF07B, 0x001C), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapngll", two(0xF07B, 0x0019), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapnglel", two(0xF07B, 0x0018), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapngtl", two(0xF07B, 0x001D), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapnlel", two(0xF07B, 0x001A), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapnltl", two(0xF07B, 0x001B), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapogel", two(0xF07B, 0x0003), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapogll", two(0xF07B, 0x0006), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapogtl", two(0xF07B, 0x0002), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapolel", two(0xF07B, 0x0005), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapoltl", two(0xF07B, 0x0004), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftraporl", two(0xF07B, 0x0007), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapseql", two(0xF07B, 0x0011), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapsfl", two(0xF07B, 0x0010), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapsnel", two(0xF07B, 0x001E), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapstl", two(0xF07B, 0x001F), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftraptl", two(0xF07B, 0x000F), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapueql", two(0xF07B, 0x0009), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapugel", two(0xF07B, 0x000B), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapugtl", two(0xF07B, 0x000A), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapulel", two(0xF07B, 0x000D), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapultl", two(0xF07B, 0x000C), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-{"ftrapunl", two(0xF07B, 0x0008), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
-
-{"ftstb", two(0xF000, 0x583A), two(0xF1C0, 0xFC7F), "Ii;b", mfloat },
-{"ftstb", two(0xF000, 0x583A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
-{"ftstd", two(0xF000, 0x003A), two(0xF1C0, 0xE07F), "IiF8", cfloat },
-{"ftstd", two(0xF000, 0x543A), two(0xF1C0, 0xFC7F), "Ii;F", mfloat },
-{"ftstd", two(0xF000, 0x543A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
-{"ftstl", two(0xF000, 0x403A), two(0xF1C0, 0xFC7F), "Ii;l", mfloat },
-{"ftstl", two(0xF000, 0x403A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
-{"ftstp", two(0xF000, 0x4C3A), two(0xF1C0, 0xFC7F), "Ii;p", mfloat },
-{"ftsts", two(0xF000, 0x443A), two(0xF1C0, 0xFC7F), "Ii;f", mfloat },
-{"ftsts", two(0xF000, 0x443A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
-{"ftstw", two(0xF000, 0x503A), two(0xF1C0, 0xFC7F), "Ii;w", mfloat },
-{"ftstw", two(0xF000, 0x503A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
-{"ftstx", two(0xF000, 0x003A), two(0xF1C0, 0xE07F), "IiF8", mfloat },
-{"ftstx", two(0xF000, 0x483A), two(0xF1C0, 0xFC7F), "Ii;x", mfloat },
-
-{"ftwotoxb", two(0xF000, 0x5811), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
-{"ftwotoxd", two(0xF000, 0x5411), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
-{"ftwotoxl", two(0xF000, 0x4011), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
-{"ftwotoxp", two(0xF000, 0x4C11), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
-{"ftwotoxs", two(0xF000, 0x4411), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
-{"ftwotoxw", two(0xF000, 0x5011), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
-{"ftwotoxx", two(0xF000, 0x0011), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
-{"ftwotoxx", two(0xF000, 0x4811), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
-{"ftwotoxx", two(0xF000, 0x0011), two(0xF1C0, 0xE07F), "IiFt", mfloat },
-
-{"halt", one(0045310), one(0177777), "", m68060 | mcf },
-
-{"illegal", one(0045374), one(0177777), "", m68000up | mcf },
-{"intouch", one(0xf428), one(0xfff8), "As", mcfv4eup },
-
-{"jmp", one(0047300), one(0177700), "!s", m68000up | mcf },
-
-{"jra", one(0060000), one(0177400), "Bg", m68000up | mcf },
-{"jra", one(0047300), one(0177700), "!s", m68000up | mcf },
-
-{"jsr", one(0047200), one(0177700), "!s", m68000up | mcf },
-
-{"jbsr", one(0060400), one(0177400), "Bg", m68000up | mcf },
-{"jbsr", one(0047200), one(0177700), "!s", m68000up | mcf },
-
-{"lea", one(0040700), one(0170700), "!sAd", m68000up | mcf },
-
-{"lpstop", two(0174000,0000700),two(0177777,0177777),"#w", cpu32|m68060 },
-
-{"linkw", one(0047120), one(0177770), "As#w", m68000up | mcf },
-{"linkl", one(0044010), one(0177770), "As#l", m68020up | cpu32 },
-{"link", one(0047120), one(0177770), "As#W", m68000up | mcf },
-{"link", one(0044010), one(0177770), "As#l", m68020up | cpu32 },
-
-{"lslb", one(0160410), one(0170770), "QdDs", m68000up },
-{"lslb", one(0160450), one(0170770), "DdDs", m68000up },
-{"lslw", one(0160510), one(0170770), "QdDs", m68000up },
-{"lslw", one(0160550), one(0170770), "DdDs", m68000up },
-{"lslw", one(0161700), one(0177700), "~s", m68000up },
-{"lsll", one(0160610), one(0170770), "QdDs", m68000up | mcf },
-{"lsll", one(0160650), one(0170770), "DdDs", m68000up | mcf },
-
-{"lsrb", one(0160010), one(0170770), "QdDs", m68000up },
-{"lsrb", one(0160050), one(0170770), "DdDs", m68000up },
-{"lsrw", one(0160110), one(0170770), "QdDs", m68000up },
-{"lsrw", one(0160150), one(0170770), "DdDs", m68000up },
-{"lsrw", one(0161300), one(0177700), "~s", m68000up },
-{"lsrl", one(0160210), one(0170770), "QdDs", m68000up | mcf },
-{"lsrl", one(0160250), one(0170770), "DdDs", m68000up | mcf },
-
- /* FIXME: add MAM mode (`&' after <ea> operand) / remove MACM */
-{"macw", two(0120000, 0000000), two(0170660, 0005400), "uMum", mcf5206eup },
-{"macw", two(0120000, 0001000), two(0170660, 0005400), "uMumMh",mcf5206eup },
-{"macw", two(0120220, 0000000), two(0170670, 0005460), "uNuoasRn", mcf5206eup },
-{"macw", two(0120230, 0000000), two(0170670, 0005460), "uNuo+sRn", mcf5206eup },
-{"macw", two(0120240, 0000000), two(0170670, 0005460), "uNuo-sRn", mcf5206eup },
-{"macw", two(0120250, 0000000), two(0170670, 0005460), "uNuodsRn", mcf5206eup },
-{"macw", two(0120220, 0001000), two(0170670, 0005460), "uNuoMhasRn", mcf5206eup },
-{"macw", two(0120230, 0001000), two(0170670, 0005460), "uNuoMh+sRn", mcf5206eup },
-{"macw", two(0120240, 0001000), two(0170670, 0005460), "uNuoMh-sRn", mcf5206eup },
-{"macw", two(0120250, 0001000), two(0170670, 0005460), "uNuoMhdsRn", mcf5206eup },
-{"macmw", two(0120220, 0000040), two(0170670, 0005460), "uNuoasRn", mcf5206eup },
-{"macmw", two(0120230, 0000040), two(0170670, 0005460), "uNuo+sRn", mcf5206eup },
-{"macmw", two(0120240, 0000040), two(0170670, 0005460), "uNuo-sRn", mcf5206eup },
-{"macmw", two(0120250, 0000040), two(0170670, 0005460), "uNuodsRn", mcf5206eup },
-{"macmw", two(0120220, 0001040), two(0170670, 0005460), "uNuoMhasRn", mcf5206eup },
-{"macmw", two(0120230, 0001040), two(0170670, 0005460), "uNuoMh+sRn", mcf5206eup },
-{"macmw", two(0120240, 0001040), two(0170670, 0005460), "uNuoMh-sRn", mcf5206eup },
-{"macmw", two(0120250, 0001040), two(0170670, 0005460), "uNuoMhdsRn", mcf5206eup },
-
-{"macl", two(0120000, 0004000), two(0170660, 0005400), "RsRm", mcf5206eup },
-{"macl", two(0120000, 0005000), two(0170660, 0005400), "RsRmMh", mcf5206eup },
-{"macl", two(0120220, 0004000), two(0170670, 0005460), "R3R1asRn", mcf5206eup },
-{"macl", two(0120230, 0004000), two(0170670, 0005460), "R3R1+sRn", mcf5206eup },
-{"macl", two(0120240, 0004000), two(0170670, 0005460), "R3R1-sRn", mcf5206eup },
-{"macl", two(0120250, 0004000), two(0170670, 0005460), "R3R1dsRn", mcf5206eup },
-{"macl", two(0120220, 0005000), two(0170670, 0005460), "R3R1MhasRn", mcf5206eup },
-{"macl", two(0120230, 0005000), two(0170670, 0005460), "R3R1Mh+sRn", mcf5206eup },
-{"macl", two(0120240, 0005000), two(0170670, 0005460), "R3R1Mh-sRn", mcf5206eup },
-{"macl", two(0120250, 0005000), two(0170670, 0005460), "R3R1MhdsRn", mcf5206eup },
-{"macml", two(0120220, 0004040), two(0170670, 0005460), "R3R1asRn", mcf5206eup },
-{"macml", two(0120230, 0004040), two(0170670, 0005460), "R3R1+sRn", mcf5206eup },
-{"macml", two(0120240, 0004040), two(0170670, 0005460), "R3R1-sRn", mcf5206eup },
-{"macml", two(0120250, 0004040), two(0170670, 0005460), "R3R1dsRn", mcf5206eup },
-{"macml", two(0120220, 0005040), two(0170670, 0005460), "R3R1MhasRn", mcf5206eup },
-{"macml", two(0120230, 0005040), two(0170670, 0005460), "R3R1Mh+sRn", mcf5206eup },
-{"macml", two(0120240, 0005040), two(0170670, 0005460), "R3R1Mh-sRn", mcf5206eup },
-{"macml", two(0120250, 0005040), two(0170670, 0005460), "R3R1MhdsRn", mcf5206eup },
+{"fseq", 4, two(0xF040, 0x0001), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsf", 4, two(0xF040, 0x0000), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsge", 4, two(0xF040, 0x0013), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsgl", 4, two(0xF040, 0x0016), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsgle", 4, two(0xF040, 0x0017), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsgt", 4, two(0xF040, 0x0012), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsle", 4, two(0xF040, 0x0015), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fslt", 4, two(0xF040, 0x0014), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsne", 4, two(0xF040, 0x000E), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsnge", 4, two(0xF040, 0x001C), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsngl", 4, two(0xF040, 0x0019), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsngle", 4, two(0xF040, 0x0018), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsngt", 4, two(0xF040, 0x001D), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsnle", 4, two(0xF040, 0x001A), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsnlt", 4, two(0xF040, 0x001B), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsoge", 4, two(0xF040, 0x0003), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsogl", 4, two(0xF040, 0x0006), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsogt", 4, two(0xF040, 0x0002), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsole", 4, two(0xF040, 0x0005), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsolt", 4, two(0xF040, 0x0004), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsor", 4, two(0xF040, 0x0007), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsseq", 4, two(0xF040, 0x0011), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fssf", 4, two(0xF040, 0x0010), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fssne", 4, two(0xF040, 0x001E), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsst", 4, two(0xF040, 0x001F), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fst", 4, two(0xF040, 0x000F), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsueq", 4, two(0xF040, 0x0009), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsuge", 4, two(0xF040, 0x000B), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsugt", 4, two(0xF040, 0x000A), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsule", 4, two(0xF040, 0x000D), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsult", 4, two(0xF040, 0x000C), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+{"fsun", 4, two(0xF040, 0x0008), two(0xF1C0, 0xFFFF), "Ii$s", mfloat },
+
+{"fsgldivb", 4, two(0xF000, 0x5824), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsgldivd", 4, two(0xF000, 0x5424), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsgldivl", 4, two(0xF000, 0x4024), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsgldivp", 4, two(0xF000, 0x4C24), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsgldivs", 4, two(0xF000, 0x4424), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsgldivw", 4, two(0xF000, 0x5024), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsgldivx", 4, two(0xF000, 0x0024), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsgldivx", 4, two(0xF000, 0x4824), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsgldivx", 4, two(0xF000, 0x0024), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsglmulb", 4, two(0xF000, 0x5827), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsglmuld", 4, two(0xF000, 0x5427), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsglmull", 4, two(0xF000, 0x4027), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsglmulp", 4, two(0xF000, 0x4C27), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsglmuls", 4, two(0xF000, 0x4427), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsglmulw", 4, two(0xF000, 0x5027), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsglmulx", 4, two(0xF000, 0x0027), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsglmulx", 4, two(0xF000, 0x4827), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsglmulx", 4, two(0xF000, 0x0027), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsinb", 4, two(0xF000, 0x580E), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsind", 4, two(0xF000, 0x540E), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsinl", 4, two(0xF000, 0x400E), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsinp", 4, two(0xF000, 0x4C0E), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsins", 4, two(0xF000, 0x440E), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsinw", 4, two(0xF000, 0x500E), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsinx", 4, two(0xF000, 0x000E), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsinx", 4, two(0xF000, 0x480E), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsinx", 4, two(0xF000, 0x000E), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsincosb", 4, two(0xF000, 0x5830), two(0xF1C0, 0xFC78), "Ii;bF3F7", mfloat },
+{"fsincosd", 4, two(0xF000, 0x5430), two(0xF1C0, 0xFC78), "Ii;FF3F7", mfloat },
+{"fsincosl", 4, two(0xF000, 0x4030), two(0xF1C0, 0xFC78), "Ii;lF3F7", mfloat },
+{"fsincosp", 4, two(0xF000, 0x4C30), two(0xF1C0, 0xFC78), "Ii;pF3F7", mfloat },
+{"fsincoss", 4, two(0xF000, 0x4430), two(0xF1C0, 0xFC78), "Ii;fF3F7", mfloat },
+{"fsincosw", 4, two(0xF000, 0x5030), two(0xF1C0, 0xFC78), "Ii;wF3F7", mfloat },
+{"fsincosx", 4, two(0xF000, 0x0030), two(0xF1C0, 0xE078), "IiF8F3F7", mfloat },
+{"fsincosx", 4, two(0xF000, 0x4830), two(0xF1C0, 0xFC78), "Ii;xF3F7", mfloat },
+
+{"fsinhb", 4, two(0xF000, 0x5802), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsinhd", 4, two(0xF000, 0x5402), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsinhl", 4, two(0xF000, 0x4002), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsinhp", 4, two(0xF000, 0x4C02), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsinhs", 4, two(0xF000, 0x4402), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsinhw", 4, two(0xF000, 0x5002), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsinhx", 4, two(0xF000, 0x0002), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsinhx", 4, two(0xF000, 0x4802), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsinhx", 4, two(0xF000, 0x0002), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fsqrtb", 4, two(0xF000, 0x5804), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsqrtb", 4, two(0xF000, 0x5804), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsqrtd", 4, two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsqrtd", 4, two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fsqrtd", 4, two(0xF000, 0x5404), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsqrtd", 4, two(0xF000, 0x5404), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsqrtl", 4, two(0xF000, 0x4004), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsqrtl", 4, two(0xF000, 0x4004), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsqrtp", 4, two(0xF000, 0x4C04), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsqrts", 4, two(0xF000, 0x4404), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsqrts", 4, two(0xF000, 0x4404), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsqrtw", 4, two(0xF000, 0x5004), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsqrtw", 4, two(0xF000, 0x5004), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsqrtx", 4, two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsqrtx", 4, two(0xF000, 0x4804), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsqrtx", 4, two(0xF000, 0x0004), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fssqrtb", 4, two(0xF000, 0x5841), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fssqrtb", 4, two(0xF000, 0x5841), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssqrtd", 4, two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fssqrtd", 4, two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fssqrtd", 4, two(0xF000, 0x5441), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fssqrtd", 4, two(0xF000, 0x5441), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fssqrtl", 4, two(0xF000, 0x4041), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fssqrtl", 4, two(0xF000, 0x4041), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssqrtp", 4, two(0xF000, 0x4C41), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fssqrts", 4, two(0xF000, 0x4441), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fssqrts", 4, two(0xF000, 0x4441), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssqrtw", 4, two(0xF000, 0x5041), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fssqrtw", 4, two(0xF000, 0x5041), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssqrtx", 4, two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fssqrtx", 4, two(0xF000, 0x4841), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fssqrtx", 4, two(0xF000, 0x0041), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fdsqrtb", 4, two(0xF000, 0x5845), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdsqrtb", 4, two(0xF000, 0x5845), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsqrtd", 4, two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdsqrtd", 4, two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiFt", cfloat },
+{"fdsqrtd", 4, two(0xF000, 0x5445), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdsqrtl", 4, two(0xF000, 0x4045), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdsqrtl", 4, two(0xF000, 0x4045), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsqrtp", 4, two(0xF000, 0x4C45), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fdsqrts", 4, two(0xF000, 0x4445), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdsqrts", 4, two(0xF000, 0x4445), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsqrtw", 4, two(0xF000, 0x5045), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdsqrtw", 4, two(0xF000, 0x5045), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsqrtx", 4, two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdsqrtx", 4, two(0xF000, 0x4845), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fdsqrtx", 4, two(0xF000, 0x0045), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fsubb", 4, two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"fsubb", 4, two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsubd", 4, two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fsubd", 4, two(0xF000, 0x5428), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"fsubd", 4, two(0xF000, 0x5428), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fsubl", 4, two(0xF000, 0x4028), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"fsubl", 4, two(0xF000, 0x4028), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsubp", 4, two(0xF000, 0x4C28), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"fsubs", 4, two(0xF000, 0x4428), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"fsubs", 4, two(0xF000, 0x4428), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsubw", 4, two(0xF000, 0x5028), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"fsubw", 4, two(0xF000, 0x5028), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fsubx", 4, two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"fsubx", 4, two(0xF000, 0x4828), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"fsubx", 4, two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"fssubb", 4, two(0xF000, 0x5828), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssubb", 4, two(0xF000, 0x5868), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fssubd", 4, two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fssubd", 4, two(0xF000, 0x5468), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fssubd", 4, two(0xF000, 0x5468), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fssubl", 4, two(0xF000, 0x4068), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fssubl", 4, two(0xF000, 0x4068), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssubp", 4, two(0xF000, 0x4C68), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fssubs", 4, two(0xF000, 0x4468), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fssubs", 4, two(0xF000, 0x4468), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssubw", 4, two(0xF000, 0x5068), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fssubw", 4, two(0xF000, 0x5068), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fssubx", 4, two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fssubx", 4, two(0xF000, 0x4868), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fssubx", 4, two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"fdsubb", 4, two(0xF000, 0x586A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsubb", 4, two(0xF000, 0x586c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040up },
+{"fdsubd", 4, two(0xF000, 0x006A), two(0xF1C0, 0xE07F), "IiF8F7", cfloat },
+{"fdsubd", 4, two(0xF000, 0x546A), two(0xF1C0, 0xFC7F), "IiwsF7", cfloat },
+{"fdsubd", 4, two(0xF000, 0x546c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040up },
+{"fdsubl", 4, two(0xF000, 0x406A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsubl", 4, two(0xF000, 0x406c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040up },
+{"fdsubp", 4, two(0xF000, 0x4C6c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040up },
+{"fdsubs", 4, two(0xF000, 0x446A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsubs", 4, two(0xF000, 0x446c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040up },
+{"fdsubw", 4, two(0xF000, 0x506A), two(0xF1C0, 0xFC7F), "IibsF7", cfloat },
+{"fdsubw", 4, two(0xF000, 0x506c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040up },
+{"fdsubx", 4, two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiF8F7", m68040up },
+{"fdsubx", 4, two(0xF000, 0x486c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040up },
+{"fdsubx", 4, two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiFt", m68040up },
+
+{"ftanb", 4, two(0xF000, 0x580F), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"ftand", 4, two(0xF000, 0x540F), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"ftanl", 4, two(0xF000, 0x400F), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"ftanp", 4, two(0xF000, 0x4C0F), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"ftans", 4, two(0xF000, 0x440F), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"ftanw", 4, two(0xF000, 0x500F), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"ftanx", 4, two(0xF000, 0x000F), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"ftanx", 4, two(0xF000, 0x480F), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"ftanx", 4, two(0xF000, 0x000F), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"ftanhb", 4, two(0xF000, 0x5809), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"ftanhd", 4, two(0xF000, 0x5409), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"ftanhl", 4, two(0xF000, 0x4009), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"ftanhp", 4, two(0xF000, 0x4C09), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"ftanhs", 4, two(0xF000, 0x4409), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"ftanhw", 4, two(0xF000, 0x5009), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"ftanhx", 4, two(0xF000, 0x0009), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"ftanhx", 4, two(0xF000, 0x4809), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"ftanhx", 4, two(0xF000, 0x0009), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"ftentoxb", 4, two(0xF000, 0x5812), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"ftentoxd", 4, two(0xF000, 0x5412), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"ftentoxl", 4, two(0xF000, 0x4012), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"ftentoxp", 4, two(0xF000, 0x4C12), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"ftentoxs", 4, two(0xF000, 0x4412), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"ftentoxw", 4, two(0xF000, 0x5012), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"ftentoxx", 4, two(0xF000, 0x0012), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"ftentoxx", 4, two(0xF000, 0x4812), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"ftentoxx", 4, two(0xF000, 0x0012), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"ftrapeq", 4, two(0xF07C, 0x0001), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapf", 4, two(0xF07C, 0x0000), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapge", 4, two(0xF07C, 0x0013), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapgl", 4, two(0xF07C, 0x0016), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapgle", 4, two(0xF07C, 0x0017), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapgt", 4, two(0xF07C, 0x0012), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftraple", 4, two(0xF07C, 0x0015), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftraplt", 4, two(0xF07C, 0x0014), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapne", 4, two(0xF07C, 0x000E), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapnge", 4, two(0xF07C, 0x001C), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapngl", 4, two(0xF07C, 0x0019), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapngle", 4,two(0xF07C, 0x0018), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapngt", 4, two(0xF07C, 0x001D), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapnle", 4, two(0xF07C, 0x001A), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapnlt", 4, two(0xF07C, 0x001B), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapoge", 4, two(0xF07C, 0x0003), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapogl", 4, two(0xF07C, 0x0006), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapogt", 4, two(0xF07C, 0x0002), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapole", 4, two(0xF07C, 0x0005), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapolt", 4, two(0xF07C, 0x0004), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapor", 4, two(0xF07C, 0x0007), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapseq", 4, two(0xF07C, 0x0011), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapsf", 4, two(0xF07C, 0x0010), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapsne", 4, two(0xF07C, 0x001E), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapst", 4, two(0xF07C, 0x001F), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapt", 4, two(0xF07C, 0x000F), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapueq", 4, two(0xF07C, 0x0009), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapuge", 4, two(0xF07C, 0x000B), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapugt", 4, two(0xF07C, 0x000A), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapule", 4, two(0xF07C, 0x000D), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapult", 4, two(0xF07C, 0x000C), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+{"ftrapun", 4, two(0xF07C, 0x0008), two(0xF1FF, 0xFFFF), "Ii", mfloat },
+
+{"ftrapeqw", 4, two(0xF07A, 0x0001), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapfw", 4, two(0xF07A, 0x0000), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapgew", 4, two(0xF07A, 0x0013), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapglw", 4, two(0xF07A, 0x0016), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapglew", 4,two(0xF07A, 0x0017), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapgtw", 4, two(0xF07A, 0x0012), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftraplew", 4, two(0xF07A, 0x0015), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapltw", 4, two(0xF07A, 0x0014), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapnew", 4, two(0xF07A, 0x000E), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapngew", 4,two(0xF07A, 0x001C), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapnglw", 4,two(0xF07A, 0x0019), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapnglew", 4,two(0xF07A, 0x0018), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapngtw", 4,two(0xF07A, 0x001D), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapnlew", 4,two(0xF07A, 0x001A), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapnltw", 4,two(0xF07A, 0x001B), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapogew", 4,two(0xF07A, 0x0003), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapoglw", 4,two(0xF07A, 0x0006), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapogtw", 4,two(0xF07A, 0x0002), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapolew", 4,two(0xF07A, 0x0005), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapoltw", 4,two(0xF07A, 0x0004), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftraporw", 4, two(0xF07A, 0x0007), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapseqw", 4,two(0xF07A, 0x0011), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapsfw", 4, two(0xF07A, 0x0010), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapsnew", 4,two(0xF07A, 0x001E), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapstw", 4, two(0xF07A, 0x001F), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftraptw", 4, two(0xF07A, 0x000F), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapueqw", 4,two(0xF07A, 0x0009), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapugew", 4,two(0xF07A, 0x000B), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapugtw", 4,two(0xF07A, 0x000A), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapulew", 4,two(0xF07A, 0x000D), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapultw", 4,two(0xF07A, 0x000C), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+{"ftrapunw", 4, two(0xF07A, 0x0008), two(0xF1FF, 0xFFFF), "Ii^w", mfloat },
+
+{"ftrapeql", 4, two(0xF07B, 0x0001), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapfl", 4, two(0xF07B, 0x0000), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapgel", 4, two(0xF07B, 0x0013), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapgll", 4, two(0xF07B, 0x0016), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapglel", 4,two(0xF07B, 0x0017), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapgtl", 4, two(0xF07B, 0x0012), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftraplel", 4, two(0xF07B, 0x0015), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapltl", 4, two(0xF07B, 0x0014), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapnel", 4, two(0xF07B, 0x000E), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapngel", 4,two(0xF07B, 0x001C), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapngll", 4,two(0xF07B, 0x0019), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapnglel", 4,two(0xF07B, 0x0018), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapngtl", 4,two(0xF07B, 0x001D), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapnlel", 4,two(0xF07B, 0x001A), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapnltl", 4,two(0xF07B, 0x001B), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapogel", 4,two(0xF07B, 0x0003), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapogll", 4,two(0xF07B, 0x0006), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapogtl", 4,two(0xF07B, 0x0002), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapolel", 4,two(0xF07B, 0x0005), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapoltl", 4,two(0xF07B, 0x0004), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftraporl", 4, two(0xF07B, 0x0007), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapseql", 4,two(0xF07B, 0x0011), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapsfl", 4, two(0xF07B, 0x0010), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapsnel", 4,two(0xF07B, 0x001E), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapstl", 4, two(0xF07B, 0x001F), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftraptl", 4, two(0xF07B, 0x000F), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapueql", 4,two(0xF07B, 0x0009), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapugel", 4,two(0xF07B, 0x000B), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapugtl", 4,two(0xF07B, 0x000A), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapulel", 4,two(0xF07B, 0x000D), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapultl", 4,two(0xF07B, 0x000C), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+{"ftrapunl", 4, two(0xF07B, 0x0008), two(0xF1FF, 0xFFFF), "Ii^l", mfloat },
+
+{"ftstb", 4, two(0xF000, 0x583A), two(0xF1C0, 0xFC7F), "Ii;b", mfloat },
+{"ftstb", 4, two(0xF000, 0x583A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
+{"ftstd", 4, two(0xF000, 0x003A), two(0xF1C0, 0xE07F), "IiF8", cfloat },
+{"ftstd", 4, two(0xF000, 0x543A), two(0xF1C0, 0xFC7F), "Ii;F", mfloat },
+{"ftstd", 4, two(0xF000, 0x543A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
+{"ftstl", 4, two(0xF000, 0x403A), two(0xF1C0, 0xFC7F), "Ii;l", mfloat },
+{"ftstl", 4, two(0xF000, 0x403A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
+{"ftstp", 4, two(0xF000, 0x4C3A), two(0xF1C0, 0xFC7F), "Ii;p", mfloat },
+{"ftsts", 4, two(0xF000, 0x443A), two(0xF1C0, 0xFC7F), "Ii;f", mfloat },
+{"ftsts", 4, two(0xF000, 0x443A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
+{"ftstw", 4, two(0xF000, 0x503A), two(0xF1C0, 0xFC7F), "Ii;w", mfloat },
+{"ftstw", 4, two(0xF000, 0x503A), two(0xF1C0, 0xFC7F), "Iibs", cfloat },
+{"ftstx", 4, two(0xF000, 0x003A), two(0xF1C0, 0xE07F), "IiF8", mfloat },
+{"ftstx", 4, two(0xF000, 0x483A), two(0xF1C0, 0xFC7F), "Ii;x", mfloat },
+
+{"ftwotoxb", 4, two(0xF000, 0x5811), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
+{"ftwotoxd", 4, two(0xF000, 0x5411), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
+{"ftwotoxl", 4, two(0xF000, 0x4011), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat },
+{"ftwotoxp", 4, two(0xF000, 0x4C11), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat },
+{"ftwotoxs", 4, two(0xF000, 0x4411), two(0xF1C0, 0xFC7F), "Ii;fF7", mfloat },
+{"ftwotoxw", 4, two(0xF000, 0x5011), two(0xF1C0, 0xFC7F), "Ii;wF7", mfloat },
+{"ftwotoxx", 4, two(0xF000, 0x0011), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
+{"ftwotoxx", 4, two(0xF000, 0x4811), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
+{"ftwotoxx", 4, two(0xF000, 0x0011), two(0xF1C0, 0xE07F), "IiFt", mfloat },
+
+{"halt", 2, one(0045310), one(0177777), "", m68060 | mcfisa_a },
+
+{"illegal", 2, one(0045374), one(0177777), "", m68000up | mcfisa_a },
+{"intouch", 2, one(0xf428), one(0xfff8), "As", mcfisa_b },
+
+{"jmp", 2, one(0047300), one(0177700), "!s", m68000up | mcfisa_a },
+
+{"jra", 2, one(0060000), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jra", 2, one(0047300), one(0177700), "!s", m68000up | mcfisa_a },
+
+{"jsr", 2, one(0047200), one(0177700), "!s", m68000up | mcfisa_a },
+
+{"jbsr", 2, one(0060400), one(0177400), "Bg", m68000up | mcfisa_a },
+{"jbsr", 2, one(0047200), one(0177700), "!s", m68000up | mcfisa_a },
+
+{"lea", 2, one(0040700), one(0170700), "!sAd", m68000up | mcfisa_a },
+
+{"lpstop", 6, two(0174000,0000700),two(0177777,0177777),"#w", cpu32|m68060 },
+
+{"linkw", 4, one(0047120), one(0177770), "As#w", m68000up | mcfisa_a },
+{"linkl", 6, one(0044010), one(0177770), "As#l", m68020up | cpu32 },
+{"link", 4, one(0047120), one(0177770), "As#W", m68000up | mcfisa_a },
+{"link", 6, one(0044010), one(0177770), "As#l", m68020up | cpu32 },
+
+{"lslb", 2, one(0160410), one(0170770), "QdDs", m68000up },
+{"lslb", 2, one(0160450), one(0170770), "DdDs", m68000up },
+{"lslw", 2, one(0160510), one(0170770), "QdDs", m68000up },
+{"lslw", 2, one(0160550), one(0170770), "DdDs", m68000up },
+{"lslw", 2, one(0161700), one(0177700), "~s", m68000up },
+{"lsll", 2, one(0160610), one(0170770), "QdDs", m68000up | mcfisa_a },
+{"lsll", 2, one(0160650), one(0170770), "DdDs", m68000up | mcfisa_a },
+
+{"lsrb", 2, one(0160010), one(0170770), "QdDs", m68000up },
+{"lsrb", 2, one(0160050), one(0170770), "DdDs", m68000up },
+{"lsrw", 2, one(0160110), one(0170770), "QdDs", m68000up },
+{"lsrw", 2, one(0160150), one(0170770), "DdDs", m68000up },
+{"lsrw", 2, one(0161300), one(0177700), "~s", m68000up },
+{"lsrl", 2, one(0160210), one(0170770), "QdDs", m68000up | mcfisa_a },
+{"lsrl", 2, one(0160250), one(0170770), "DdDs", m68000up | mcfisa_a },
+
+{"macw", 4, two(0xa080, 0x0000), two(0xf180, 0x0910), "uNuoiI4/Rn", mcfmac },
+{"macw", 4, two(0xa080, 0x0200), two(0xf180, 0x0910), "uNuoMh4/Rn", mcfmac },
+{"macw", 4, two(0xa080, 0x0000), two(0xf180, 0x0f10), "uNuo4/Rn", mcfmac },
+{"macw", 4, two(0xa000, 0x0000), two(0xf1b0, 0x0900), "uMumiI", mcfmac },
+{"macw", 4, two(0xa000, 0x0200), two(0xf1b0, 0x0900), "uMumMh", mcfmac },
+{"macw", 4, two(0xa000, 0x0000), two(0xf1b0, 0x0f00), "uMum", mcfmac },
+
+{"macw", 4, two(0xa000, 0x0000), two(0xf100, 0x0900), "uNuoiI4/RneG", mcfemac },/* Ry,Rx,SF,<ea>,accX. */
+{"macw", 4, two(0xa000, 0x0200), two(0xf100, 0x0900), "uNuoMh4/RneG", mcfemac },/* Ry,Rx,+1/-1,<ea>,accX. */
+{"macw", 4, two(0xa000, 0x0000), two(0xf100, 0x0f00), "uNuo4/RneG", mcfemac },/* Ry,Rx,<ea>,accX. */
+{"macw", 4, two(0xa000, 0x0000), two(0xf130, 0x0900), "uMumiIeH", mcfemac },/* Ry,Rx,SF,accX. */
+{"macw", 4, two(0xa000, 0x0200), two(0xf130, 0x0900), "uMumMheH", mcfemac },/* Ry,Rx,+1/-1,accX. */
+{"macw", 4, two(0xa000, 0x0000), two(0xf130, 0x0f00), "uMumeH", mcfemac }, /* Ry,Rx,accX. */
+
+{"macl", 4, two(0xa080, 0x0800), two(0xf180, 0x0910), "RNRoiI4/Rn", mcfmac },
+{"macl", 4, two(0xa080, 0x0a00), two(0xf180, 0x0910), "RNRoMh4/Rn", mcfmac },
+{"macl", 4, two(0xa080, 0x0800), two(0xf180, 0x0f10), "RNRo4/Rn", mcfmac },
+{"macl", 4, two(0xa000, 0x0800), two(0xf1b0, 0x0b00), "RMRmiI", mcfmac },
+{"macl", 4, two(0xa000, 0x0a00), two(0xf1b0, 0x0b00), "RMRmMh", mcfmac },
+{"macl", 4, two(0xa000, 0x0800), two(0xf1b0, 0x0800), "RMRm", mcfmac },
+
+{"macl", 4, two(0xa000, 0x0800), two(0xf100, 0x0900), "R3R1iI4/RneG", mcfemac },
+{"macl", 4, two(0xa000, 0x0a00), two(0xf100, 0x0900), "R3R1Mh4/RneG", mcfemac },
+{"macl", 4, two(0xa000, 0x0800), two(0xf100, 0x0f00), "R3R14/RneG", mcfemac },
+{"macl", 4, two(0xa000, 0x0800), two(0xf130, 0x0900), "RMRmiIeH", mcfemac },
+{"macl", 4, two(0xa000, 0x0a00), two(0xf130, 0x0900), "RMRmMheH", mcfemac },
+{"macl", 4, two(0xa000, 0x0800), two(0xf130, 0x0f00), "RMRmeH", mcfemac },
/* NOTE: The mcf5200 family programmer's reference manual does not
indicate the byte form of the movea instruction is invalid (as it
@@ -1512,571 +1501,576 @@ const struct m68k_opcode m68k_opcodes[] =
which replied that other coldfire assemblers reject movea.b. For
this reason I've decided to not allow moveab.
- jtc@cygnus.com - 97/01/24
- */
-
-{"moveal", one(0020100), one(0170700), "*lAd", m68000up | mcf },
-{"moveaw", one(0030100), one(0170700), "*wAd", m68000up | mcf },
-
-{"movec", one(0047173), one(0177777), "R1Jj", m68010up | mcf },
-{"movec", one(0047173), one(0177777), "R1#j", m68010up | mcf },
-{"movec", one(0047172), one(0177777), "JjR1", m68010up },
-{"movec", one(0047172), one(0177777), "#jR1", m68010up },
-
-{"movemw", one(0044200), one(0177700), "Lw&s", m68000up },
-{"movemw", one(0044240), one(0177770), "lw-s", m68000up },
-{"movemw", one(0044200), one(0177700), "#w>s", m68000up },
-{"movemw", one(0046200), one(0177700), "<sLw", m68000up },
-{"movemw", one(0046200), one(0177700), "<s#w", m68000up },
-{"moveml", one(0044300), one(0177700), "Lw&s", m68000up },
-{"moveml", one(0044340), one(0177770), "lw-s", m68000up },
-{"moveml", one(0044300), one(0177700), "#w>s", m68000up },
-{"moveml", one(0046300), one(0177700), "<sLw", m68000up },
-{"moveml", one(0046300), one(0177700), "<s#w", m68000up },
-/* FIXME: need specifier for mode 2 and 5 to simplify below insn patterns */
-{"moveml", one(0044320), one(0177770), "Lwas", mcf },
-{"moveml", one(0044320), one(0177770), "#was", mcf },
-{"moveml", one(0044350), one(0177770), "Lwds", mcf },
-{"moveml", one(0044350), one(0177770), "#wds", mcf },
-{"moveml", one(0046320), one(0177770), "asLw", mcf },
-{"moveml", one(0046320), one(0177770), "as#w", mcf },
-{"moveml", one(0046350), one(0177770), "dsLw", mcf },
-{"moveml", one(0046350), one(0177770), "ds#w", mcf },
-
-{"movepw", one(0000410), one(0170770), "dsDd", m68000up },
-{"movepw", one(0000610), one(0170770), "Ddds", m68000up },
-{"movepl", one(0000510), one(0170770), "dsDd", m68000up },
-{"movepl", one(0000710), one(0170770), "Ddds", m68000up },
-
-{"moveq", one(0070000), one(0170400), "MsDd", m68000up | mcf },
-{"moveq", one(0070000), one(0170400), "#BDd", m68000up | mcf },
+ jtc@cygnus.com - 97/01/24. */
+
+{"moveal", 2, one(0020100), one(0170700), "*lAd", m68000up | mcfisa_a },
+{"moveaw", 2, one(0030100), one(0170700), "*wAd", m68000up | mcfisa_a },
+
+{"movclrl", 2, one(0xA1C0), one(0xf9f0), "eFRs", mcfemac },
+
+{"movec", 4, one(0047173), one(0177777), "R1Jj", m68010up | mcfisa_a },
+{"movec", 4, one(0047173), one(0177777), "R1#j", m68010up | mcfisa_a },
+{"movec", 4, one(0047172), one(0177777), "JjR1", m68010up },
+{"movec", 4, one(0047172), one(0177777), "#jR1", m68010up },
+
+{"movemw", 4, one(0044200), one(0177700), "Lw&s", m68000up },
+{"movemw", 4, one(0044240), one(0177770), "lw-s", m68000up },
+{"movemw", 4, one(0044200), one(0177700), "#w>s", m68000up },
+{"movemw", 4, one(0046200), one(0177700), "<sLw", m68000up },
+{"movemw", 4, one(0046200), one(0177700), "<s#w", m68000up },
+{"moveml", 4, one(0044300), one(0177700), "Lw&s", m68000up },
+{"moveml", 4, one(0044340), one(0177770), "lw-s", m68000up },
+{"moveml", 4, one(0044300), one(0177700), "#w>s", m68000up },
+{"moveml", 4, one(0046300), one(0177700), "<sLw", m68000up },
+{"moveml", 4, one(0046300), one(0177700), "<s#w", m68000up },
+/* FIXME: need specifier for mode 2 and 5 to simplify below insn patterns. */
+{"moveml", 4, one(0044320), one(0177770), "Lwas", mcfisa_a },
+{"moveml", 4, one(0044320), one(0177770), "#was", mcfisa_a },
+{"moveml", 4, one(0044350), one(0177770), "Lwds", mcfisa_a },
+{"moveml", 4, one(0044350), one(0177770), "#wds", mcfisa_a },
+{"moveml", 4, one(0046320), one(0177770), "asLw", mcfisa_a },
+{"moveml", 4, one(0046320), one(0177770), "as#w", mcfisa_a },
+{"moveml", 4, one(0046350), one(0177770), "dsLw", mcfisa_a },
+{"moveml", 4, one(0046350), one(0177770), "ds#w", mcfisa_a },
+
+{"movepw", 2, one(0000410), one(0170770), "dsDd", m68000up },
+{"movepw", 2, one(0000610), one(0170770), "Ddds", m68000up },
+{"movepl", 2, one(0000510), one(0170770), "dsDd", m68000up },
+{"movepl", 2, one(0000710), one(0170770), "Ddds", m68000up },
+
+{"moveq", 2, one(0070000), one(0170400), "MsDd", m68000up | mcfisa_a },
+{"moveq", 2, one(0070000), one(0170400), "#BDd", m68000up | mcfisa_a },
/* The move opcode can generate the movea and moveq instructions. */
-{"moveb", one(0010000), one(0170000), ";b$d", m68000up },
-{"moveb", one(0010000), one(0170070), "Ds$d", mcf },
-{"moveb", one(0010020), one(0170070), "as$d", mcf },
-{"moveb", one(0010030), one(0170070), "+s$d", mcf },
-{"moveb", one(0010040), one(0170070), "-s$d", mcf },
-{"moveb", one(0010000), one(0170000), "nsqd", mcf },
-{"moveb", one(0010000), one(0170700), "obDd", mcf },
-{"moveb", one(0010200), one(0170700), "obad", mcf },
-{"moveb", one(0010300), one(0170700), "ob+d", mcf },
-{"moveb", one(0010400), one(0170700), "ob-d", mcf },
-{"moveb", one(0010000), one(0170000), "obnd", mcfv4up },
-
-{"movew", one(0030000), one(0170000), "*w%d", m68000up },
-{"movew", one(0030000), one(0170000), "ms%d", mcf },
-{"movew", one(0030000), one(0170000), "nspd", mcf },
-{"movew", one(0030000), one(0170000), "owmd", mcf },
-{"movew", one(0030000), one(0170000), "ownd", mcfv4up },
-{"movew", one(0040300), one(0177700), "Ss$s", m68000up },
-{"movew", one(0040300), one(0177770), "SsDs", mcf },
-{"movew", one(0041300), one(0177700), "Cs$s", m68010up },
-{"movew", one(0041300), one(0177770), "CsDs", mcf },
-{"movew", one(0042300), one(0177700), ";wCd", m68000up },
-{"movew", one(0042300), one(0177700), "DsCd", mcf },
-{"movew", one(0042374), one(0177777), "#wCd", mcf },
-{"movew", one(0043300), one(0177700), ";wSd", m68000up },
-{"movew", one(0043300), one(0177700), "DsSd", mcf },
-{"movew", one(0043374), one(0177777), "#wSd", mcf },
-
-{"movel", one(0070000), one(0170400), "MsDd", m68000up | mcf },
-{"movel", one(0020000), one(0170000), "*l%d", m68000up },
-{"movel", one(0020000), one(0170000), "ms%d", mcf },
-{"movel", one(0020000), one(0170000), "nspd", mcf },
-{"movel", one(0020000), one(0170000), "olmd", mcf },
-{"movel", one(0020000), one(0170000), "olnd", mcfv4up },
-{"movel", one(0047140), one(0177770), "AsUd", m68000up | mcfv4e },
-{"movel", one(0047150), one(0177770), "UdAs", m68000up | mcfv4e },
-{"movel", one(0120600), one(0177760), "EsRs", mcf5206eup },
-{"movel", one(0120400), one(0177760), "RsEs", mcf5206eup },
-{"movel", one(0120474), one(0177777), "#lEs", mcf5206eup },
-{"movel", one(0124600), one(0177760), "GsRs", mcf5206eup },
-{"movel", one(0124400), one(0177760), "RsGs", mcf5206eup },
-{"movel", one(0124474), one(0177777), "#lGs", mcf5206eup },
-{"movel", one(0126600), one(0177760), "HsRs", mcf5206eup },
-{"movel", one(0126400), one(0177760), "RsHs", mcf5206eup },
-{"movel", one(0126474), one(0177777), "#lHs", mcf5206eup },
-{"movel", one(0124700), one(0177777), "GsCs", mcf5206eup },
-
-{"move", one(0030000), one(0170000), "*w%d", m68000up },
-{"move", one(0030000), one(0170000), "ms%d", mcf },
-{"move", one(0030000), one(0170000), "nspd", mcf },
-{"move", one(0030000), one(0170000), "owmd", mcf },
-{"move", one(0030000), one(0170000), "ownd", mcfv4up },
-{"move", one(0040300), one(0177700), "Ss$s", m68000up },
-{"move", one(0040300), one(0177770), "SsDs", mcf },
-{"move", one(0041300), one(0177700), "Cs$s", m68010up },
-{"move", one(0041300), one(0177770), "CsDs", mcf },
-{"move", one(0042300), one(0177700), ";wCd", m68000up },
-{"move", one(0042300), one(0177700), "DsCd", mcf },
-{"move", one(0042374), one(0177777), "#wCd", mcf },
-{"move", one(0043300), one(0177700), ";wSd", m68000up },
-{"move", one(0043300), one(0177700), "DsSd", mcf },
-{"move", one(0043374), one(0177777), "#wSd", mcf },
-
-{"move", one(0047140), one(0177770), "AsUd", m68000up },
-{"move", one(0047150), one(0177770), "UdAs", m68000up },
-
-{"mov3ql", one(0120500), one(0170700), "xd%s", mcfv4up },
-{"mvsb", one(0070400), one(0170700), "*bDd", mcfv4up },
-{"mvsw", one(0070500), one(0170700), "*wDd", mcfv4up },
-{"mvzb", one(0070600), one(0170700), "*bDd", mcfv4up },
-{"mvzw", one(0070700), one(0170700), "*wDd", mcfv4up },
-
-{"movesb", two(0007000, 0), two(0177700, 07777), "~sR1", m68010up },
-{"movesb", two(0007000, 04000), two(0177700, 07777), "R1~s", m68010up },
-{"movesw", two(0007100, 0), two(0177700, 07777), "~sR1", m68010up },
-{"movesw", two(0007100, 04000), two(0177700, 07777), "R1~s", m68010up },
-{"movesl", two(0007200, 0), two(0177700, 07777), "~sR1", m68010up },
-{"movesl", two(0007200, 04000), two(0177700, 07777), "R1~s", m68010up },
-
-{"move16", two(0xf620, 0x8000), two(0xfff8, 0x8fff), "+s+1", m68040up },
-{"move16", one(0xf600), one(0xfff8), "+s_L", m68040up },
-{"move16", one(0xf608), one(0xfff8), "_L+s", m68040up },
-{"move16", one(0xf610), one(0xfff8), "as_L", m68040up },
-{"move16", one(0xf618), one(0xfff8), "_Las", m68040up },
-
- /* FIXME: add MAM mode (`&' after <ea> operand) / remove MSACM */
-{"msacw", two(0120000, 0000400), two(0170660, 0005400), "uMum", mcf5206eup },
-{"msacw", two(0120000, 0001400), two(0170660, 0005400), "uMumMh", mcf5206eup },
-{"msacw", two(0120220, 0000400), two(0170670, 0005460), "uNuoasRn", mcf5206eup },
-{"msacw", two(0120230, 0000400), two(0170670, 0005460), "uNuo+sRn", mcf5206eup },
-{"msacw", two(0120240, 0000400), two(0170670, 0005460), "uNuo-sRn", mcf5206eup },
-{"msacw", two(0120250, 0000400), two(0170670, 0005460), "uNuodsRn", mcf5206eup },
-{"msacw", two(0120220, 0001400), two(0170670, 0005460), "uNuoMhasRn", mcf5206eup },
-{"msacw", two(0120230, 0001400), two(0170670, 0005460), "uNuoMh+sRn", mcf5206eup },
-{"msacw", two(0120240, 0001400), two(0170670, 0005460), "uNuoMh-sRn", mcf5206eup },
-{"msacw", two(0120250, 0001400), two(0170670, 0005460), "uNuoMhdsRn", mcf5206eup },
-{"msacmw", two(0120220, 0000440), two(0170670, 0005460), "uNuoasRn", mcf5206eup },
-{"msacmw", two(0120230, 0000440), two(0170670, 0005460), "uNuo+sRn", mcf5206eup },
-{"msacmw", two(0120240, 0000440), two(0170670, 0005460), "uNuo-sRn", mcf5206eup },
-{"msacmw", two(0120250, 0000440), two(0170670, 0005460), "uNuodsRn", mcf5206eup },
-{"msacmw", two(0120220, 0001440), two(0170670, 0005460), "uNuoMhasRn", mcf5206eup },
-{"msacmw", two(0120230, 0001440), two(0170670, 0005460), "uNuoMh+sRn", mcf5206eup },
-{"msacmw", two(0120240, 0001440), two(0170670, 0005460), "uNuoMh-sRn", mcf5206eup },
-{"msacmw", two(0120250, 0001440), two(0170670, 0005460), "uNuoMhdsRn", mcf5206eup },
-
-{"msacl", two(0120000, 0004400), two(0170660, 0005400), "RsRm", mcf5206eup },
-{"msacl", two(0120000, 0005400), two(0170660, 0005400), "RsRmMh", mcf5206eup },
-{"msacl", two(0120220, 0004400), two(0170670, 0005460), "R3R1asRn", mcf5206eup },
-{"msacl", two(0120230, 0004400), two(0170670, 0005460), "R3R1+sRn", mcf5206eup },
-{"msacl", two(0120240, 0004400), two(0170670, 0005460), "R3R1-sRn", mcf5206eup },
-{"msacl", two(0120250, 0004400), two(0170670, 0005460), "R3R1dsRn", mcf5206eup },
-{"msacl", two(0120220, 0005400), two(0170670, 0005460), "R3R1MhasRn", mcf5206eup },
-{"msacl", two(0120230, 0005400), two(0170670, 0005460), "R3R1Mh+sRn", mcf5206eup },
-{"msacl", two(0120240, 0005400), two(0170670, 0005460), "R3R1Mh-sRn", mcf5206eup },
-{"msacl", two(0120250, 0005400), two(0170670, 0005460), "R3R1MhdsRn", mcf5206eup },
-{"msacml", two(0120220, 0004440), two(0170670, 0005460), "R3R1asRn", mcf5206eup },
-{"msacml", two(0120230, 0004440), two(0170670, 0005460), "R3R1+sRn", mcf5206eup },
-{"msacml", two(0120240, 0004440), two(0170670, 0005460), "R3R1-sRn", mcf5206eup },
-{"msacml", two(0120250, 0004440), two(0170670, 0005460), "R3R1dsRn", mcf5206eup },
-{"msacml", two(0120220, 0005440), two(0170670, 0005460), "R3R1MhasRn", mcf5206eup },
-{"msacml", two(0120230, 0005440), two(0170670, 0005460), "R3R1Mh+sRn", mcf5206eup },
-{"msacml", two(0120240, 0005440), two(0170670, 0005460), "R3R1Mh-sRn", mcf5206eup },
-{"msacml", two(0120250, 0005440), two(0170670, 0005460), "R3R1MhdsRn", mcf5206eup },
-
-{"mulsw", one(0140700), one(0170700), ";wDd", m68000up|mcf },
-{"mulsl", two(0046000,004000), two(0177700,0107770), ";lD1", m68020up|cpu32 },
-{"mulsl", two(0046000,004000), two(0177700,0107770), "qsD1", mcf },
-{"mulsl", two(0046000,006000), two(0177700,0107770), ";lD3D1",m68020up|cpu32 },
-
-{"muluw", one(0140300), one(0170700), ";wDd", m68000up|mcf },
-{"mulul", two(0046000,000000), two(0177700,0107770), ";lD1", m68020up|cpu32 },
-{"mulul", two(0046000,000000), two(0177700,0107770), "qsD1", mcf },
-{"mulul", two(0046000,002000), two(0177700,0107770), ";lD3D1",m68020up|cpu32 },
-
-{"nbcd", one(0044000), one(0177700), "$s", m68000up },
-
-{"negb", one(0042000), one(0177700), "$s", m68000up },
-{"negw", one(0042100), one(0177700), "$s", m68000up },
-{"negl", one(0042200), one(0177700), "$s", m68000up },
-{"negl", one(0042200), one(0177700), "Ds", mcf},
-
-{"negxb", one(0040000), one(0177700), "$s", m68000up },
-{"negxw", one(0040100), one(0177700), "$s", m68000up },
-{"negxl", one(0040200), one(0177700), "$s", m68000up },
-{"negxl", one(0040200), one(0177700), "Ds", mcf},
-
-{"nop", one(0047161), one(0177777), "", m68000up | mcf},
-
-{"notb", one(0043000), one(0177700), "$s", m68000up },
-{"notw", one(0043100), one(0177700), "$s", m68000up },
-{"notl", one(0043200), one(0177700), "$s", m68000up },
-{"notl", one(0043200), one(0177700), "Ds", mcf},
-
-{"orib", one(0000000), one(0177700), "#b$s", m68000up },
-{"orib", one(0000074), one(0177777), "#bCs", m68000up },
-{"oriw", one(0000100), one(0177700), "#w$s", m68000up },
-{"oriw", one(0000174), one(0177777), "#wSs", m68000up },
-{"oril", one(0000200), one(0177700), "#l$s", m68000up },
-{"oril", one(0000200), one(0177700), "#lDs", mcf },
-{"ori", one(0000074), one(0177777), "#bCs", m68000up },
-{"ori", one(0000100), one(0177700), "#w$s", m68000up },
-{"ori", one(0000174), one(0177777), "#wSs", m68000up },
+{"moveb", 2, one(0010000), one(0170000), ";b$d", m68000up },
+{"moveb", 2, one(0010000), one(0170070), "Ds$d", mcfisa_a },
+{"moveb", 2, one(0010020), one(0170070), "as$d", mcfisa_a },
+{"moveb", 2, one(0010030), one(0170070), "+s$d", mcfisa_a },
+{"moveb", 2, one(0010040), one(0170070), "-s$d", mcfisa_a },
+{"moveb", 2, one(0010000), one(0170000), "nsqd", mcfisa_a },
+{"moveb", 2, one(0010000), one(0170700), "obDd", mcfisa_a },
+{"moveb", 2, one(0010200), one(0170700), "obad", mcfisa_a },
+{"moveb", 2, one(0010300), one(0170700), "ob+d", mcfisa_a },
+{"moveb", 2, one(0010400), one(0170700), "ob-d", mcfisa_a },
+{"moveb", 2, one(0010000), one(0170000), "obnd", mcfisa_b },
+
+{"movew", 2, one(0030000), one(0170000), "*w%d", m68000up },
+{"movew", 2, one(0030000), one(0170000), "ms%d", mcfisa_a },
+{"movew", 2, one(0030000), one(0170000), "nspd", mcfisa_a },
+{"movew", 2, one(0030000), one(0170000), "owmd", mcfisa_a },
+{"movew", 2, one(0030000), one(0170000), "ownd", mcfisa_b },
+{"movew", 2, one(0040300), one(0177700), "Ss$s", m68000up },
+{"movew", 2, one(0040300), one(0177770), "SsDs", mcfisa_a },
+{"movew", 2, one(0041300), one(0177700), "Cs$s", m68010up },
+{"movew", 2, one(0041300), one(0177770), "CsDs", mcfisa_a },
+{"movew", 2, one(0042300), one(0177700), ";wCd", m68000up },
+{"movew", 2, one(0042300), one(0177700), "DsCd", mcfisa_a },
+{"movew", 4, one(0042374), one(0177777), "#wCd", mcfisa_a },
+{"movew", 2, one(0043300), one(0177700), ";wSd", m68000up },
+{"movew", 2, one(0043300), one(0177700), "DsSd", mcfisa_a },
+{"movew", 4, one(0043374), one(0177777), "#wSd", mcfisa_a },
+
+{"movel", 2, one(0070000), one(0170400), "MsDd", m68000up | mcfisa_a },
+{"movel", 2, one(0020000), one(0170000), "*l%d", m68000up },
+{"movel", 2, one(0020000), one(0170000), "ms%d", mcfisa_a },
+{"movel", 2, one(0020000), one(0170000), "nspd", mcfisa_a },
+{"movel", 2, one(0020000), one(0170000), "olmd", mcfisa_a },
+{"movel", 2, one(0020000), one(0170000), "olnd", mcfisa_b },
+{"movel", 2, one(0047140), one(0177770), "AsUd", m68000up | mcfusp },
+{"movel", 2, one(0047150), one(0177770), "UdAs", m68000up | mcfusp },
+{"movel", 2, one(0120600), one(0177760), "EsRs", mcfmac },
+{"movel", 2, one(0120400), one(0177760), "RsEs", mcfmac },
+{"movel", 6, one(0120474), one(0177777), "#lEs", mcfmac },
+{"movel", 2, one(0124600), one(0177760), "GsRs", mcfmac },
+{"movel", 2, one(0124400), one(0177760), "RsGs", mcfmac },
+{"movel", 6, one(0124474), one(0177777), "#lGs", mcfmac },
+{"movel", 2, one(0126600), one(0177760), "HsRs", mcfmac },
+{"movel", 2, one(0126400), one(0177760), "RsHs", mcfmac },
+{"movel", 6, one(0126474), one(0177777), "#lHs", mcfmac },
+{"movel", 2, one(0124700), one(0177777), "GsCs", mcfmac },
+
+{"movel", 2, one(0xa180), one(0xf9f0), "eFRs", mcfemac }, /* ACCx,Rx. */
+{"movel", 2, one(0xab80), one(0xfbf0), "g]Rs", mcfemac }, /* ACCEXTx,Rx. */
+{"movel", 2, one(0xa980), one(0xfff0), "G-Rs", mcfemac }, /* macsr,Rx. */
+{"movel", 2, one(0xad80), one(0xfff0), "H-Rs", mcfemac }, /* mask,Rx. */
+{"movel", 2, one(0xa110), one(0xf9fc), "efeF", mcfemac }, /* ACCy,ACCx. */
+{"movel", 2, one(0xa9c0), one(0xffff), "G-C-", mcfemac }, /* macsr,ccr. */
+{"movel", 2, one(0xa100), one(0xf9f0), "RseF", mcfemac }, /* Rx,ACCx. */
+{"movel", 6, one(0xa13c), one(0xf9ff), "#leF", mcfemac }, /* #,ACCx. */
+{"movel", 2, one(0xab00), one(0xfbc0), "Rsg]", mcfemac }, /* Rx,ACCEXTx. */
+{"movel", 6, one(0xab3c), one(0xfbff), "#lg]", mcfemac }, /* #,ACCEXTx. */
+{"movel", 2, one(0xa900), one(0xffc0), "RsG-", mcfemac }, /* Rx,macsr. */
+{"movel", 6, one(0xa93c), one(0xffff), "#lG-", mcfemac }, /* #,macsr. */
+{"movel", 2, one(0xad00), one(0xffc0), "RsH-", mcfemac }, /* Rx,mask. */
+{"movel", 6, one(0xad3c), one(0xffff), "#lH-", mcfemac }, /* #,mask. */
+
+{"move", 2, one(0030000), one(0170000), "*w%d", m68000up },
+{"move", 2, one(0030000), one(0170000), "ms%d", mcfisa_a },
+{"move", 2, one(0030000), one(0170000), "nspd", mcfisa_a },
+{"move", 2, one(0030000), one(0170000), "owmd", mcfisa_a },
+{"move", 2, one(0030000), one(0170000), "ownd", mcfisa_b },
+{"move", 2, one(0040300), one(0177700), "Ss$s", m68000up },
+{"move", 2, one(0040300), one(0177770), "SsDs", mcfisa_a },
+{"move", 2, one(0041300), one(0177700), "Cs$s", m68010up },
+{"move", 2, one(0041300), one(0177770), "CsDs", mcfisa_a },
+{"move", 2, one(0042300), one(0177700), ";wCd", m68000up },
+{"move", 2, one(0042300), one(0177700), "DsCd", mcfisa_a },
+{"move", 4, one(0042374), one(0177777), "#wCd", mcfisa_a },
+{"move", 2, one(0043300), one(0177700), ";wSd", m68000up },
+{"move", 2, one(0043300), one(0177700), "DsSd", mcfisa_a },
+{"move", 4, one(0043374), one(0177777), "#wSd", mcfisa_a },
+
+{"move", 2, one(0047140), one(0177770), "AsUd", m68000up },
+{"move", 2, one(0047150), one(0177770), "UdAs", m68000up },
+
+{"mov3ql", 2, one(0120500), one(0170700), "xd%s", mcfisa_b },
+{"mvsb", 2, one(0070400), one(0170700), "*bDd", mcfisa_b },
+{"mvsw", 2, one(0070500), one(0170700), "*wDd", mcfisa_b },
+{"mvzb", 2, one(0070600), one(0170700), "*bDd", mcfisa_b },
+{"mvzw", 2, one(0070700), one(0170700), "*wDd", mcfisa_b },
+
+{"movesb", 4, two(0007000, 0), two(0177700, 07777), "~sR1", m68010up },
+{"movesb", 4, two(0007000, 04000), two(0177700, 07777), "R1~s", m68010up },
+{"movesw", 4, two(0007100, 0), two(0177700, 07777), "~sR1", m68010up },
+{"movesw", 4, two(0007100, 04000), two(0177700, 07777), "R1~s", m68010up },
+{"movesl", 4, two(0007200, 0), two(0177700, 07777), "~sR1", m68010up },
+{"movesl", 4, two(0007200, 04000), two(0177700, 07777), "R1~s", m68010up },
+
+{"move16", 4, two(0xf620, 0x8000), two(0xfff8, 0x8fff), "+s+1", m68040up },
+{"move16", 2, one(0xf600), one(0xfff8), "+s_L", m68040up },
+{"move16", 2, one(0xf608), one(0xfff8), "_L+s", m68040up },
+{"move16", 2, one(0xf610), one(0xfff8), "as_L", m68040up },
+{"move16", 2, one(0xf618), one(0xfff8), "_Las", m68040up },
+
+{"msacw", 4, two(0xa080, 0x0100), two(0xf180, 0x0910), "uNuoiI4/Rn", mcfmac },
+{"msacw", 4, two(0xa080, 0x0300), two(0xf180, 0x0910), "uNuoMh4/Rn", mcfmac },
+{"msacw", 4, two(0xa080, 0x0100), two(0xf180, 0x0f10), "uNuo4/Rn", mcfmac },
+{"msacw", 4, two(0xa000, 0x0100), two(0xf1b0, 0x0900), "uMumiI", mcfmac },
+{"msacw", 4, two(0xa000, 0x0300), two(0xf1b0, 0x0900), "uMumMh", mcfmac },
+{"msacw", 4, two(0xa000, 0x0100), two(0xf1b0, 0x0f00), "uMum", mcfmac },
+
+{"msacw", 4, two(0xa000, 0x0100), two(0xf100, 0x0900), "uMumiI4/RneG", mcfemac },/* Ry,Rx,SF,<ea>,accX. */
+{"msacw", 4, two(0xa000, 0x0300), two(0xf100, 0x0900), "uMumMh4/RneG", mcfemac },/* Ry,Rx,+1/-1,<ea>,accX. */
+{"msacw", 4, two(0xa000, 0x0100), two(0xf100, 0x0f00), "uMum4/RneG", mcfemac },/* Ry,Rx,<ea>,accX. */
+{"msacw", 4, two(0xa000, 0x0100), two(0xf130, 0x0900), "uMumiIeH", mcfemac },/* Ry,Rx,SF,accX. */
+{"msacw", 4, two(0xa000, 0x0300), two(0xf130, 0x0900), "uMumMheH", mcfemac },/* Ry,Rx,+1/-1,accX. */
+{"msacw", 4, two(0xa000, 0x0100), two(0xf130, 0x0f00), "uMumeH", mcfemac }, /* Ry,Rx,accX. */
+
+{"msacl", 4, two(0xa080, 0x0900), two(0xf180, 0x0910), "RNRoiI4/Rn", mcfmac },
+{"msacl", 4, two(0xa080, 0x0b00), two(0xf180, 0x0910), "RNRoMh4/Rn", mcfmac },
+{"msacl", 4, two(0xa080, 0x0900), two(0xf180, 0x0f10), "RNRo4/Rn", mcfmac },
+{"msacl", 4, two(0xa000, 0x0900), two(0xf1b0, 0x0b00), "RMRmiI", mcfmac },
+{"msacl", 4, two(0xa000, 0x0b00), two(0xf1b0, 0x0b00), "RMRmMh", mcfmac },
+{"msacl", 4, two(0xa000, 0x0900), two(0xf1b0, 0x0800), "RMRm", mcfmac },
+
+{"msacl", 4, two(0xa000, 0x0900), two(0xf100, 0x0900), "R3R1iI4/RneG", mcfemac },
+{"msacl", 4, two(0xa000, 0x0b00), two(0xf100, 0x0900), "R3R1Mh4/RneG", mcfemac },
+{"msacl", 4, two(0xa000, 0x0900), two(0xf100, 0x0f00), "R3R14/RneG", mcfemac },
+{"msacl", 4, two(0xa000, 0x0900), two(0xf130, 0x0900), "RMRmiIeH", mcfemac },
+{"msacl", 4, two(0xa000, 0x0b00), two(0xf130, 0x0900), "RMRmMheH", mcfemac },
+{"msacl", 4, two(0xa000, 0x0900), two(0xf130, 0x0f00), "RMRmeH", mcfemac },
+
+{"mulsw", 2, one(0140700), one(0170700), ";wDd", m68000up|mcfisa_a },
+{"mulsl", 4, two(0046000,004000), two(0177700,0107770), ";lD1", m68020up|cpu32 },
+{"mulsl", 4, two(0046000,004000), two(0177700,0107770), "qsD1", mcfisa_a },
+{"mulsl", 4, two(0046000,006000), two(0177700,0107770), ";lD3D1",m68020up|cpu32 },
+
+{"muluw", 2, one(0140300), one(0170700), ";wDd", m68000up|mcfisa_a },
+{"mulul", 4, two(0046000,000000), two(0177700,0107770), ";lD1", m68020up|cpu32 },
+{"mulul", 4, two(0046000,000000), two(0177700,0107770), "qsD1", mcfisa_a },
+{"mulul", 4, two(0046000,002000), two(0177700,0107770), ";lD3D1",m68020up|cpu32 },
+
+{"nbcd", 2, one(0044000), one(0177700), "$s", m68000up },
+
+{"negb", 2, one(0042000), one(0177700), "$s", m68000up },
+{"negw", 2, one(0042100), one(0177700), "$s", m68000up },
+{"negl", 2, one(0042200), one(0177700), "$s", m68000up },
+{"negl", 2, one(0042200), one(0177700), "Ds", mcfisa_a},
+
+{"negxb", 2, one(0040000), one(0177700), "$s", m68000up },
+{"negxw", 2, one(0040100), one(0177700), "$s", m68000up },
+{"negxl", 2, one(0040200), one(0177700), "$s", m68000up },
+{"negxl", 2, one(0040200), one(0177700), "Ds", mcfisa_a},
+
+{"nop", 2, one(0047161), one(0177777), "", m68000up | mcfisa_a},
+
+{"notb", 2, one(0043000), one(0177700), "$s", m68000up },
+{"notw", 2, one(0043100), one(0177700), "$s", m68000up },
+{"notl", 2, one(0043200), one(0177700), "$s", m68000up },
+{"notl", 2, one(0043200), one(0177700), "Ds", mcfisa_a},
+
+{"orib", 4, one(0000000), one(0177700), "#b$s", m68000up },
+{"orib", 4, one(0000074), one(0177777), "#bCs", m68000up },
+{"oriw", 4, one(0000100), one(0177700), "#w$s", m68000up },
+{"oriw", 4, one(0000174), one(0177777), "#wSs", m68000up },
+{"oril", 6, one(0000200), one(0177700), "#l$s", m68000up },
+{"oril", 6, one(0000200), one(0177700), "#lDs", mcfisa_a },
+{"ori", 4, one(0000074), one(0177777), "#bCs", m68000up },
+{"ori", 4, one(0000100), one(0177700), "#w$s", m68000up },
+{"ori", 4, one(0000174), one(0177777), "#wSs", m68000up },
/* The or opcode can generate the ori instruction. */
-{"orb", one(0000000), one(0177700), "#b$s", m68000up },
-{"orb", one(0000074), one(0177777), "#bCs", m68000up },
-{"orb", one(0100000), one(0170700), ";bDd", m68000up },
-{"orb", one(0100400), one(0170700), "Dd~s", m68000up },
-{"orw", one(0000100), one(0177700), "#w$s", m68000up },
-{"orw", one(0000174), one(0177777), "#wSs", m68000up },
-{"orw", one(0100100), one(0170700), ";wDd", m68000up },
-{"orw", one(0100500), one(0170700), "Dd~s", m68000up },
-{"orl", one(0000200), one(0177700), "#l$s", m68000up },
-{"orl", one(0000200), one(0177700), "#lDs", mcf },
-{"orl", one(0100200), one(0170700), ";lDd", m68000up | mcf },
-{"orl", one(0100600), one(0170700), "Dd~s", m68000up | mcf },
-{"or", one(0000074), one(0177777), "#bCs", m68000up },
-{"or", one(0000100), one(0177700), "#w$s", m68000up },
-{"or", one(0000174), one(0177777), "#wSs", m68000up },
-{"or", one(0100100), one(0170700), ";wDd", m68000up },
-{"or", one(0100500), one(0170700), "Dd~s", m68000up },
-
-{"pack", one(0100500), one(0170770), "DsDd#w", m68020up },
-{"pack", one(0100510), one(0170770), "-s-d#w", m68020up },
-
-{"pbac", one(0xf087), one(0xffbf), "Bc", m68851 },
-{"pbacw", one(0xf087), one(0xffff), "BW", m68851 },
-{"pbas", one(0xf086), one(0xffbf), "Bc", m68851 },
-{"pbasw", one(0xf086), one(0xffff), "BW", m68851 },
-{"pbbc", one(0xf081), one(0xffbf), "Bc", m68851 },
-{"pbbcw", one(0xf081), one(0xffff), "BW", m68851 },
-{"pbbs", one(0xf080), one(0xffbf), "Bc", m68851 },
-{"pbbsw", one(0xf080), one(0xffff), "BW", m68851 },
-{"pbcc", one(0xf08f), one(0xffbf), "Bc", m68851 },
-{"pbccw", one(0xf08f), one(0xffff), "BW", m68851 },
-{"pbcs", one(0xf08e), one(0xffbf), "Bc", m68851 },
-{"pbcsw", one(0xf08e), one(0xffff), "BW", m68851 },
-{"pbgc", one(0xf08d), one(0xffbf), "Bc", m68851 },
-{"pbgcw", one(0xf08d), one(0xffff), "BW", m68851 },
-{"pbgs", one(0xf08c), one(0xffbf), "Bc", m68851 },
-{"pbgsw", one(0xf08c), one(0xffff), "BW", m68851 },
-{"pbic", one(0xf08b), one(0xffbf), "Bc", m68851 },
-{"pbicw", one(0xf08b), one(0xffff), "BW", m68851 },
-{"pbis", one(0xf08a), one(0xffbf), "Bc", m68851 },
-{"pbisw", one(0xf08a), one(0xffff), "BW", m68851 },
-{"pblc", one(0xf083), one(0xffbf), "Bc", m68851 },
-{"pblcw", one(0xf083), one(0xffff), "BW", m68851 },
-{"pbls", one(0xf082), one(0xffbf), "Bc", m68851 },
-{"pblsw", one(0xf082), one(0xffff), "BW", m68851 },
-{"pbsc", one(0xf085), one(0xffbf), "Bc", m68851 },
-{"pbscw", one(0xf085), one(0xffff), "BW", m68851 },
-{"pbss", one(0xf084), one(0xffbf), "Bc", m68851 },
-{"pbssw", one(0xf084), one(0xffff), "BW", m68851 },
-{"pbwc", one(0xf089), one(0xffbf), "Bc", m68851 },
-{"pbwcw", one(0xf089), one(0xffff), "BW", m68851 },
-{"pbws", one(0xf088), one(0xffbf), "Bc", m68851 },
-{"pbwsw", one(0xf088), one(0xffff), "BW", m68851 },
-
-{"pdbac", two(0xf048, 0x0007), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbas", two(0xf048, 0x0006), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbbc", two(0xf048, 0x0001), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbbs", two(0xf048, 0x0000), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbcc", two(0xf048, 0x000f), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbcs", two(0xf048, 0x000e), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbgc", two(0xf048, 0x000d), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbgs", two(0xf048, 0x000c), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbic", two(0xf048, 0x000b), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbis", two(0xf048, 0x000a), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdblc", two(0xf048, 0x0003), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbls", two(0xf048, 0x0002), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbsc", two(0xf048, 0x0005), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbss", two(0xf048, 0x0004), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbwc", two(0xf048, 0x0009), two(0xfff8, 0xffff), "DsBw", m68851 },
-{"pdbws", two(0xf048, 0x0008), two(0xfff8, 0xffff), "DsBw", m68851 },
-
-{"pea", one(0044100), one(0177700), "!s", m68000up|mcf },
-
-{"pflusha", one(0xf518), one(0xfff8), "", m68040up },
-{"pflusha", two(0xf000,0x2400), two(0xffff,0xffff), "", m68030 | m68851 },
-
-{"pflush", two(0xf000,0x3010), two(0xffc0,0xfe10), "T3T9", m68030|m68851 },
-{"pflush", two(0xf000,0x3810), two(0xffc0,0xfe10), "T3T9&s", m68030|m68851 },
-{"pflush", two(0xf000,0x3008), two(0xffc0,0xfe18), "D3T9", m68030|m68851 },
-{"pflush", two(0xf000,0x3808), two(0xffc0,0xfe18), "D3T9&s", m68030|m68851 },
-{"pflush", two(0xf000,0x3000), two(0xffc0,0xfe1e), "f3T9", m68030|m68851 },
-{"pflush", two(0xf000,0x3800), two(0xffc0,0xfe1e), "f3T9&s", m68030|m68851 },
-{"pflush", one(0xf508), one(0xfff8), "as", m68040up },
-{"pflush", one(0xf508), one(0xfff8), "As", m68040up },
-
-{"pflushan", one(0xf510), one(0xfff8), "", m68040up },
-{"pflushn", one(0xf500), one(0xfff8), "as", m68040up },
-{"pflushn", one(0xf500), one(0xfff8), "As", m68040up },
-
-{"pflushr", two(0xf000, 0xa000), two(0xffc0, 0xffff), "|s", m68851 },
-
-{"pflushs", two(0xf000, 0x3410), two(0xfff8, 0xfe10), "T3T9", m68851 },
-{"pflushs", two(0xf000, 0x3c10), two(0xfff8, 0xfe10), "T3T9&s", m68851 },
-{"pflushs", two(0xf000, 0x3408), two(0xfff8, 0xfe18), "D3T9", m68851 },
-{"pflushs", two(0xf000, 0x3c08), two(0xfff8, 0xfe18), "D3T9&s", m68851 },
-{"pflushs", two(0xf000, 0x3400), two(0xfff8, 0xfe1e), "f3T9", m68851 },
-{"pflushs", two(0xf000, 0x3c00), two(0xfff8, 0xfe1e), "f3T9&s", m68851 },
-
-{"ploadr", two(0xf000,0x2210), two(0xffc0,0xfff0), "T3&s", m68030|m68851 },
-{"ploadr", two(0xf000,0x2208), two(0xffc0,0xfff8), "D3&s", m68030|m68851 },
-{"ploadr", two(0xf000,0x2200), two(0xffc0,0xfffe), "f3&s", m68030|m68851 },
-{"ploadw", two(0xf000,0x2010), two(0xffc0,0xfff0), "T3&s", m68030|m68851 },
-{"ploadw", two(0xf000,0x2008), two(0xffc0,0xfff8), "D3&s", m68030|m68851 },
-{"ploadw", two(0xf000,0x2000), two(0xffc0,0xfffe), "f3&s", m68030|m68851 },
-
-{"plpar", one(0xf5c8), one(0xfff8), "as", m68060 },
-{"plpaw", one(0xf588), one(0xfff8), "as", m68060 },
-
-{"pmove", two(0xf000,0x4000), two(0xffc0,0xffff), "*l08", m68030|m68851 },
-{"pmove", two(0xf000,0x5c00), two(0xffc0,0xffff), "*w18", m68851 },
-{"pmove", two(0xf000,0x4000), two(0xffc0,0xe3ff), "*b28", m68851 },
-{"pmove", two(0xf000,0x4200), two(0xffc0,0xffff), "08%s", m68030|m68851 },
-{"pmove", two(0xf000,0x5e00), two(0xffc0,0xffff), "18%s", m68851 },
-{"pmove", two(0xf000,0x4200), two(0xffc0,0xe3ff), "28%s", m68851 },
-{"pmove", two(0xf000,0x4000), two(0xffc0,0xe3ff), "|sW8", m68030|m68851 },
-{"pmove", two(0xf000,0x4200), two(0xffc0,0xe3ff), "W8~s", m68030|m68851 },
-{"pmove", two(0xf000,0x6200), two(0xffc0,0xe3e3), "*wX3", m68851 },
-{"pmove", two(0xf000,0x6000), two(0xffc0,0xe3e3), "X3%s", m68851 },
-{"pmove", two(0xf000,0x6000), two(0xffc0,0xffff), "*wY8", m68030|m68851 },
-{"pmove", two(0xf000,0x6200), two(0xffc0,0xffff), "Y8%s", m68030|m68851 },
-{"pmove", two(0xf000,0x6600), two(0xffc0,0xffff), "Z8%s", m68851 },
-{"pmove", two(0xf000,0x0800), two(0xffc0,0xfbff), "*l38", m68030 },
-{"pmove", two(0xf000,0x0a00), two(0xffc0,0xfbff), "38%s", m68030 },
-
-{"pmovefd", two(0xf000, 0x4100), two(0xffc0, 0xe3ff), "*l08", m68030 },
-{"pmovefd", two(0xf000, 0x4100), two(0xffc0, 0xe3ff), "|sW8", m68030 },
-{"pmovefd", two(0xf000, 0x0900), two(0xffc0, 0xfbff), "*l38", m68030 },
-
-{"prestore", one(0xf140), one(0xffc0), "<s", m68851 },
-
-{"psave", one(0xf100), one(0xffc0), ">s", m68851 },
-
-{"psac", two(0xf040, 0x0007), two(0xffc0, 0xffff), "$s", m68851 },
-{"psas", two(0xf040, 0x0006), two(0xffc0, 0xffff), "$s", m68851 },
-{"psbc", two(0xf040, 0x0001), two(0xffc0, 0xffff), "$s", m68851 },
-{"psbs", two(0xf040, 0x0000), two(0xffc0, 0xffff), "$s", m68851 },
-{"pscc", two(0xf040, 0x000f), two(0xffc0, 0xffff), "$s", m68851 },
-{"pscs", two(0xf040, 0x000e), two(0xffc0, 0xffff), "$s", m68851 },
-{"psgc", two(0xf040, 0x000d), two(0xffc0, 0xffff), "$s", m68851 },
-{"psgs", two(0xf040, 0x000c), two(0xffc0, 0xffff), "$s", m68851 },
-{"psic", two(0xf040, 0x000b), two(0xffc0, 0xffff), "$s", m68851 },
-{"psis", two(0xf040, 0x000a), two(0xffc0, 0xffff), "$s", m68851 },
-{"pslc", two(0xf040, 0x0003), two(0xffc0, 0xffff), "$s", m68851 },
-{"psls", two(0xf040, 0x0002), two(0xffc0, 0xffff), "$s", m68851 },
-{"pssc", two(0xf040, 0x0005), two(0xffc0, 0xffff), "$s", m68851 },
-{"psss", two(0xf040, 0x0004), two(0xffc0, 0xffff), "$s", m68851 },
-{"pswc", two(0xf040, 0x0009), two(0xffc0, 0xffff), "$s", m68851 },
-{"psws", two(0xf040, 0x0008), two(0xffc0, 0xffff), "$s", m68851 },
-
-{"ptestr", two(0xf000,0x8210), two(0xffc0, 0xe3f0), "T3&st8", m68030|m68851 },
-{"ptestr", two(0xf000,0x8310), two(0xffc0,0xe310), "T3&st8A9", m68030|m68851 },
-{"ptestr", two(0xf000,0x8208), two(0xffc0,0xe3f8), "D3&st8", m68030|m68851 },
-{"ptestr", two(0xf000,0x8308), two(0xffc0,0xe318), "D3&st8A9", m68030|m68851 },
-{"ptestr", two(0xf000,0x8200), two(0xffc0,0xe3fe), "f3&st8", m68030|m68851 },
-{"ptestr", two(0xf000,0x8300), two(0xffc0,0xe31e), "f3&st8A9", m68030|m68851 },
-{"ptestr", one(0xf568), one(0xfff8), "as", m68040 },
-
-{"ptestw", two(0xf000,0x8010), two(0xffc0,0xe3f0), "T3&st8", m68030|m68851 },
-{"ptestw", two(0xf000,0x8110), two(0xffc0,0xe310), "T3&st8A9", m68030|m68851 },
-{"ptestw", two(0xf000,0x8008), two(0xffc0,0xe3f8), "D3&st8", m68030|m68851 },
-{"ptestw", two(0xf000,0x8108), two(0xffc0,0xe318), "D3&st8A9", m68030|m68851 },
-{"ptestw", two(0xf000,0x8000), two(0xffc0,0xe3fe), "f3&st8", m68030|m68851 },
-{"ptestw", two(0xf000,0x8100), two(0xffc0,0xe31e), "f3&st8A9", m68030|m68851 },
-{"ptestw", one(0xf548), one(0xfff8), "as", m68040 },
-
-{"ptrapacw", two(0xf07a, 0x0007), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapacl", two(0xf07b, 0x0007), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapac", two(0xf07c, 0x0007), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapasw", two(0xf07a, 0x0006), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapasl", two(0xf07b, 0x0006), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapas", two(0xf07c, 0x0006), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapbcw", two(0xf07a, 0x0001), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapbcl", two(0xf07b, 0x0001), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapbc", two(0xf07c, 0x0001), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapbsw", two(0xf07a, 0x0000), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapbsl", two(0xf07b, 0x0000), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapbs", two(0xf07c, 0x0000), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapccw", two(0xf07a, 0x000f), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapccl", two(0xf07b, 0x000f), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapcc", two(0xf07c, 0x000f), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapcsw", two(0xf07a, 0x000e), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapcsl", two(0xf07b, 0x000e), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapcs", two(0xf07c, 0x000e), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapgcw", two(0xf07a, 0x000d), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapgcl", two(0xf07b, 0x000d), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapgc", two(0xf07c, 0x000d), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapgsw", two(0xf07a, 0x000c), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapgsl", two(0xf07b, 0x000c), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapgs", two(0xf07c, 0x000c), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapicw", two(0xf07a, 0x000b), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapicl", two(0xf07b, 0x000b), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapic", two(0xf07c, 0x000b), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapisw", two(0xf07a, 0x000a), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapisl", two(0xf07b, 0x000a), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapis", two(0xf07c, 0x000a), two(0xffff, 0xffff), "", m68851 },
-
-{"ptraplcw", two(0xf07a, 0x0003), two(0xffff, 0xffff), "#w", m68851 },
-{"ptraplcl", two(0xf07b, 0x0003), two(0xffff, 0xffff), "#l", m68851 },
-{"ptraplc", two(0xf07c, 0x0003), two(0xffff, 0xffff), "", m68851 },
-
-{"ptraplsw", two(0xf07a, 0x0002), two(0xffff, 0xffff), "#w", m68851 },
-{"ptraplsl", two(0xf07b, 0x0002), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapls", two(0xf07c, 0x0002), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapscw", two(0xf07a, 0x0005), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapscl", two(0xf07b, 0x0005), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapsc", two(0xf07c, 0x0005), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapssw", two(0xf07a, 0x0004), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapssl", two(0xf07b, 0x0004), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapss", two(0xf07c, 0x0004), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapwcw", two(0xf07a, 0x0009), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapwcl", two(0xf07b, 0x0009), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapwc", two(0xf07c, 0x0009), two(0xffff, 0xffff), "", m68851 },
-
-{"ptrapwsw", two(0xf07a, 0x0008), two(0xffff, 0xffff), "#w", m68851 },
-{"ptrapwsl", two(0xf07b, 0x0008), two(0xffff, 0xffff), "#l", m68851 },
-{"ptrapws", two(0xf07c, 0x0008), two(0xffff, 0xffff), "", m68851 },
-
-{"pulse", one(0045314), one(0177777), "", m68060 | mcf },
-
-{"pvalid", two(0xf000, 0x2800), two(0xffc0, 0xffff), "Vs&s", m68851 },
-{"pvalid", two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s", m68851 },
+{"orb", 4, one(0000000), one(0177700), "#b$s", m68000up },
+{"orb", 4, one(0000074), one(0177777), "#bCs", m68000up },
+{"orb", 2, one(0100000), one(0170700), ";bDd", m68000up },
+{"orb", 2, one(0100400), one(0170700), "Dd~s", m68000up },
+{"orw", 4, one(0000100), one(0177700), "#w$s", m68000up },
+{"orw", 4, one(0000174), one(0177777), "#wSs", m68000up },
+{"orw", 2, one(0100100), one(0170700), ";wDd", m68000up },
+{"orw", 2, one(0100500), one(0170700), "Dd~s", m68000up },
+{"orl", 6, one(0000200), one(0177700), "#l$s", m68000up },
+{"orl", 6, one(0000200), one(0177700), "#lDs", mcfisa_a },
+{"orl", 2, one(0100200), one(0170700), ";lDd", m68000up | mcfisa_a },
+{"orl", 2, one(0100600), one(0170700), "Dd~s", m68000up | mcfisa_a },
+{"or", 4, one(0000074), one(0177777), "#bCs", m68000up },
+{"or", 4, one(0000100), one(0177700), "#w$s", m68000up },
+{"or", 4, one(0000174), one(0177777), "#wSs", m68000up },
+{"or", 2, one(0100100), one(0170700), ";wDd", m68000up },
+{"or", 2, one(0100500), one(0170700), "Dd~s", m68000up },
+
+{"pack", 4, one(0100500), one(0170770), "DsDd#w", m68020up },
+{"pack", 4, one(0100510), one(0170770), "-s-d#w", m68020up },
+
+{"pbac", 2, one(0xf087), one(0xffbf), "Bc", m68851 },
+{"pbacw", 2, one(0xf087), one(0xffff), "BW", m68851 },
+{"pbas", 2, one(0xf086), one(0xffbf), "Bc", m68851 },
+{"pbasw", 2, one(0xf086), one(0xffff), "BW", m68851 },
+{"pbbc", 2, one(0xf081), one(0xffbf), "Bc", m68851 },
+{"pbbcw", 2, one(0xf081), one(0xffff), "BW", m68851 },
+{"pbbs", 2, one(0xf080), one(0xffbf), "Bc", m68851 },
+{"pbbsw", 2, one(0xf080), one(0xffff), "BW", m68851 },
+{"pbcc", 2, one(0xf08f), one(0xffbf), "Bc", m68851 },
+{"pbccw", 2, one(0xf08f), one(0xffff), "BW", m68851 },
+{"pbcs", 2, one(0xf08e), one(0xffbf), "Bc", m68851 },
+{"pbcsw", 2, one(0xf08e), one(0xffff), "BW", m68851 },
+{"pbgc", 2, one(0xf08d), one(0xffbf), "Bc", m68851 },
+{"pbgcw", 2, one(0xf08d), one(0xffff), "BW", m68851 },
+{"pbgs", 2, one(0xf08c), one(0xffbf), "Bc", m68851 },
+{"pbgsw", 2, one(0xf08c), one(0xffff), "BW", m68851 },
+{"pbic", 2, one(0xf08b), one(0xffbf), "Bc", m68851 },
+{"pbicw", 2, one(0xf08b), one(0xffff), "BW", m68851 },
+{"pbis", 2, one(0xf08a), one(0xffbf), "Bc", m68851 },
+{"pbisw", 2, one(0xf08a), one(0xffff), "BW", m68851 },
+{"pblc", 2, one(0xf083), one(0xffbf), "Bc", m68851 },
+{"pblcw", 2, one(0xf083), one(0xffff), "BW", m68851 },
+{"pbls", 2, one(0xf082), one(0xffbf), "Bc", m68851 },
+{"pblsw", 2, one(0xf082), one(0xffff), "BW", m68851 },
+{"pbsc", 2, one(0xf085), one(0xffbf), "Bc", m68851 },
+{"pbscw", 2, one(0xf085), one(0xffff), "BW", m68851 },
+{"pbss", 2, one(0xf084), one(0xffbf), "Bc", m68851 },
+{"pbssw", 2, one(0xf084), one(0xffff), "BW", m68851 },
+{"pbwc", 2, one(0xf089), one(0xffbf), "Bc", m68851 },
+{"pbwcw", 2, one(0xf089), one(0xffff), "BW", m68851 },
+{"pbws", 2, one(0xf088), one(0xffbf), "Bc", m68851 },
+{"pbwsw", 2, one(0xf088), one(0xffff), "BW", m68851 },
+
+{"pdbac", 4, two(0xf048, 0x0007), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbas", 4, two(0xf048, 0x0006), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbbc", 4, two(0xf048, 0x0001), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbbs", 4, two(0xf048, 0x0000), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbcc", 4, two(0xf048, 0x000f), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbcs", 4, two(0xf048, 0x000e), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbgc", 4, two(0xf048, 0x000d), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbgs", 4, two(0xf048, 0x000c), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbic", 4, two(0xf048, 0x000b), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbis", 4, two(0xf048, 0x000a), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdblc", 4, two(0xf048, 0x0003), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbls", 4, two(0xf048, 0x0002), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbsc", 4, two(0xf048, 0x0005), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbss", 4, two(0xf048, 0x0004), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbwc", 4, two(0xf048, 0x0009), two(0xfff8, 0xffff), "DsBw", m68851 },
+{"pdbws", 4, two(0xf048, 0x0008), two(0xfff8, 0xffff), "DsBw", m68851 },
+
+{"pea", 2, one(0044100), one(0177700), "!s", m68000up|mcfisa_a },
+
+{"pflusha", 2, one(0xf518), one(0xfff8), "", m68040up },
+{"pflusha", 4, two(0xf000,0x2400), two(0xffff,0xffff), "", m68030 | m68851 },
+
+{"pflush", 4, two(0xf000,0x3010), two(0xffc0,0xfe10), "T3T9", m68030|m68851 },
+{"pflush", 4, two(0xf000,0x3810), two(0xffc0,0xfe10), "T3T9&s", m68030|m68851 },
+{"pflush", 4, two(0xf000,0x3008), two(0xffc0,0xfe18), "D3T9", m68030|m68851 },
+{"pflush", 4, two(0xf000,0x3808), two(0xffc0,0xfe18), "D3T9&s", m68030|m68851 },
+{"pflush", 4, two(0xf000,0x3000), two(0xffc0,0xfe1e), "f3T9", m68030|m68851 },
+{"pflush", 4, two(0xf000,0x3800), two(0xffc0,0xfe1e), "f3T9&s", m68030|m68851 },
+{"pflush", 2, one(0xf508), one(0xfff8), "as", m68040up },
+{"pflush", 2, one(0xf508), one(0xfff8), "As", m68040up },
+
+{"pflushan", 2, one(0xf510), one(0xfff8), "", m68040up },
+{"pflushn", 2, one(0xf500), one(0xfff8), "as", m68040up },
+{"pflushn", 2, one(0xf500), one(0xfff8), "As", m68040up },
+
+{"pflushr", 4, two(0xf000, 0xa000), two(0xffc0, 0xffff), "|s", m68851 },
+
+{"pflushs", 4, two(0xf000, 0x3410), two(0xfff8, 0xfe10), "T3T9", m68851 },
+{"pflushs", 4, two(0xf000, 0x3c10), two(0xfff8, 0xfe10), "T3T9&s", m68851 },
+{"pflushs", 4, two(0xf000, 0x3408), two(0xfff8, 0xfe18), "D3T9", m68851 },
+{"pflushs", 4, two(0xf000, 0x3c08), two(0xfff8, 0xfe18), "D3T9&s", m68851 },
+{"pflushs", 4, two(0xf000, 0x3400), two(0xfff8, 0xfe1e), "f3T9", m68851 },
+{"pflushs", 4, two(0xf000, 0x3c00), two(0xfff8, 0xfe1e), "f3T9&s", m68851 },
+
+{"ploadr", 4, two(0xf000,0x2210), two(0xffc0,0xfff0), "T3&s", m68030|m68851 },
+{"ploadr", 4, two(0xf000,0x2208), two(0xffc0,0xfff8), "D3&s", m68030|m68851 },
+{"ploadr", 4, two(0xf000,0x2200), two(0xffc0,0xfffe), "f3&s", m68030|m68851 },
+{"ploadw", 4, two(0xf000,0x2010), two(0xffc0,0xfff0), "T3&s", m68030|m68851 },
+{"ploadw", 4, two(0xf000,0x2008), two(0xffc0,0xfff8), "D3&s", m68030|m68851 },
+{"ploadw", 4, two(0xf000,0x2000), two(0xffc0,0xfffe), "f3&s", m68030|m68851 },
+
+{"plpar", 2, one(0xf5c8), one(0xfff8), "as", m68060 },
+{"plpaw", 2, one(0xf588), one(0xfff8), "as", m68060 },
+
+{"pmove", 4, two(0xf000,0x4000), two(0xffc0,0xffff), "*l08", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x5c00), two(0xffc0,0xffff), "*w18", m68851 },
+{"pmove", 4, two(0xf000,0x4000), two(0xffc0,0xe3ff), "*b28", m68851 },
+{"pmove", 4, two(0xf000,0x4200), two(0xffc0,0xffff), "08%s", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x5e00), two(0xffc0,0xffff), "18%s", m68851 },
+{"pmove", 4, two(0xf000,0x4200), two(0xffc0,0xe3ff), "28%s", m68851 },
+{"pmove", 4, two(0xf000,0x4000), two(0xffc0,0xe3ff), "|sW8", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x4200), two(0xffc0,0xe3ff), "W8~s", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x6200), two(0xffc0,0xe3e3), "*wX3", m68851 },
+{"pmove", 4, two(0xf000,0x6000), two(0xffc0,0xe3e3), "X3%s", m68851 },
+{"pmove", 4, two(0xf000,0x6000), two(0xffc0,0xffff), "*wY8", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x6200), two(0xffc0,0xffff), "Y8%s", m68030|m68851 },
+{"pmove", 4, two(0xf000,0x6600), two(0xffc0,0xffff), "Z8%s", m68851 },
+{"pmove", 4, two(0xf000,0x0800), two(0xffc0,0xfbff), "*l38", m68030 },
+{"pmove", 4, two(0xf000,0x0a00), two(0xffc0,0xfbff), "38%s", m68030 },
+
+{"pmovefd", 4, two(0xf000, 0x4100), two(0xffc0, 0xe3ff), "*l08", m68030 },
+{"pmovefd", 4, two(0xf000, 0x4100), two(0xffc0, 0xe3ff), "|sW8", m68030 },
+{"pmovefd", 4, two(0xf000, 0x0900), two(0xffc0, 0xfbff), "*l38", m68030 },
+
+{"prestore", 2, one(0xf140), one(0xffc0), "<s", m68851 },
+
+{"psave", 2, one(0xf100), one(0xffc0), ">s", m68851 },
+
+{"psac", 4, two(0xf040, 0x0007), two(0xffc0, 0xffff), "$s", m68851 },
+{"psas", 4, two(0xf040, 0x0006), two(0xffc0, 0xffff), "$s", m68851 },
+{"psbc", 4, two(0xf040, 0x0001), two(0xffc0, 0xffff), "$s", m68851 },
+{"psbs", 4, two(0xf040, 0x0000), two(0xffc0, 0xffff), "$s", m68851 },
+{"pscc", 4, two(0xf040, 0x000f), two(0xffc0, 0xffff), "$s", m68851 },
+{"pscs", 4, two(0xf040, 0x000e), two(0xffc0, 0xffff), "$s", m68851 },
+{"psgc", 4, two(0xf040, 0x000d), two(0xffc0, 0xffff), "$s", m68851 },
+{"psgs", 4, two(0xf040, 0x000c), two(0xffc0, 0xffff), "$s", m68851 },
+{"psic", 4, two(0xf040, 0x000b), two(0xffc0, 0xffff), "$s", m68851 },
+{"psis", 4, two(0xf040, 0x000a), two(0xffc0, 0xffff), "$s", m68851 },
+{"pslc", 4, two(0xf040, 0x0003), two(0xffc0, 0xffff), "$s", m68851 },
+{"psls", 4, two(0xf040, 0x0002), two(0xffc0, 0xffff), "$s", m68851 },
+{"pssc", 4, two(0xf040, 0x0005), two(0xffc0, 0xffff), "$s", m68851 },
+{"psss", 4, two(0xf040, 0x0004), two(0xffc0, 0xffff), "$s", m68851 },
+{"pswc", 4, two(0xf040, 0x0009), two(0xffc0, 0xffff), "$s", m68851 },
+{"psws", 4, two(0xf040, 0x0008), two(0xffc0, 0xffff), "$s", m68851 },
+
+{"ptestr", 4, two(0xf000,0x8210), two(0xffc0, 0xe3f0), "T3&st8", m68030|m68851 },
+{"ptestr", 4, two(0xf000,0x8310), two(0xffc0,0xe310), "T3&st8A9", m68030|m68851 },
+{"ptestr", 4, two(0xf000,0x8208), two(0xffc0,0xe3f8), "D3&st8", m68030|m68851 },
+{"ptestr", 4, two(0xf000,0x8308), two(0xffc0,0xe318), "D3&st8A9", m68030|m68851 },
+{"ptestr", 4, two(0xf000,0x8200), two(0xffc0,0xe3fe), "f3&st8", m68030|m68851 },
+{"ptestr", 4, two(0xf000,0x8300), two(0xffc0,0xe31e), "f3&st8A9", m68030|m68851 },
+{"ptestr", 2, one(0xf568), one(0xfff8), "as", m68040 },
+
+{"ptestw", 4, two(0xf000,0x8010), two(0xffc0,0xe3f0), "T3&st8", m68030|m68851 },
+{"ptestw", 4, two(0xf000,0x8110), two(0xffc0,0xe310), "T3&st8A9", m68030|m68851 },
+{"ptestw", 4, two(0xf000,0x8008), two(0xffc0,0xe3f8), "D3&st8", m68030|m68851 },
+{"ptestw", 4, two(0xf000,0x8108), two(0xffc0,0xe318), "D3&st8A9", m68030|m68851 },
+{"ptestw", 4, two(0xf000,0x8000), two(0xffc0,0xe3fe), "f3&st8", m68030|m68851 },
+{"ptestw", 4, two(0xf000,0x8100), two(0xffc0,0xe31e), "f3&st8A9", m68030|m68851 },
+{"ptestw", 2, one(0xf548), one(0xfff8), "as", m68040 },
+
+{"ptrapacw", 6, two(0xf07a, 0x0007), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapacl", 6, two(0xf07b, 0x0007), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapac", 4, two(0xf07c, 0x0007), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapasw", 6, two(0xf07a, 0x0006), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapasl", 6, two(0xf07b, 0x0006), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapas", 4, two(0xf07c, 0x0006), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapbcw", 6, two(0xf07a, 0x0001), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapbcl", 6, two(0xf07b, 0x0001), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapbc", 4, two(0xf07c, 0x0001), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapbsw", 6, two(0xf07a, 0x0000), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapbsl", 6, two(0xf07b, 0x0000), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapbs", 4, two(0xf07c, 0x0000), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapccw", 6, two(0xf07a, 0x000f), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapccl", 6, two(0xf07b, 0x000f), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapcc", 4, two(0xf07c, 0x000f), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapcsw", 6, two(0xf07a, 0x000e), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapcsl", 6, two(0xf07b, 0x000e), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapcs", 4, two(0xf07c, 0x000e), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapgcw", 6, two(0xf07a, 0x000d), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapgcl", 6, two(0xf07b, 0x000d), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapgc", 4, two(0xf07c, 0x000d), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapgsw", 6, two(0xf07a, 0x000c), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapgsl", 6, two(0xf07b, 0x000c), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapgs", 4, two(0xf07c, 0x000c), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapicw", 6, two(0xf07a, 0x000b), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapicl", 6, two(0xf07b, 0x000b), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapic", 4, two(0xf07c, 0x000b), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapisw", 6, two(0xf07a, 0x000a), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapisl", 6, two(0xf07b, 0x000a), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapis", 4, two(0xf07c, 0x000a), two(0xffff, 0xffff), "", m68851 },
+
+{"ptraplcw", 6, two(0xf07a, 0x0003), two(0xffff, 0xffff), "#w", m68851 },
+{"ptraplcl", 6, two(0xf07b, 0x0003), two(0xffff, 0xffff), "#l", m68851 },
+{"ptraplc", 4, two(0xf07c, 0x0003), two(0xffff, 0xffff), "", m68851 },
+
+{"ptraplsw", 6, two(0xf07a, 0x0002), two(0xffff, 0xffff), "#w", m68851 },
+{"ptraplsl", 6, two(0xf07b, 0x0002), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapls", 4, two(0xf07c, 0x0002), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapscw", 6, two(0xf07a, 0x0005), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapscl", 6, two(0xf07b, 0x0005), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapsc", 4, two(0xf07c, 0x0005), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapssw", 6, two(0xf07a, 0x0004), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapssl", 6, two(0xf07b, 0x0004), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapss", 4, two(0xf07c, 0x0004), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapwcw", 6, two(0xf07a, 0x0009), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapwcl", 6, two(0xf07b, 0x0009), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapwc", 4, two(0xf07c, 0x0009), two(0xffff, 0xffff), "", m68851 },
+
+{"ptrapwsw", 6, two(0xf07a, 0x0008), two(0xffff, 0xffff), "#w", m68851 },
+{"ptrapwsl", 6, two(0xf07b, 0x0008), two(0xffff, 0xffff), "#l", m68851 },
+{"ptrapws", 4, two(0xf07c, 0x0008), two(0xffff, 0xffff), "", m68851 },
+
+{"pulse", 2, one(0045314), one(0177777), "", m68060 | mcfisa_a },
+
+{"pvalid", 4, two(0xf000, 0x2800), two(0xffc0, 0xffff), "Vs&s", m68851 },
+{"pvalid", 4, two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s", m68851 },
/* FIXME: don't allow Dw==Dx. */
-{"remsl", two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "qsD3D1", mcf5206eup },
-{"remul", two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "qsD3D1", mcf5206eup },
-
-{"reset", one(0047160), one(0177777), "", m68000up },
-
-{"rolb", one(0160430), one(0170770), "QdDs", m68000up },
-{"rolb", one(0160470), one(0170770), "DdDs", m68000up },
-{"rolw", one(0160530), one(0170770), "QdDs", m68000up },
-{"rolw", one(0160570), one(0170770), "DdDs", m68000up },
-{"rolw", one(0163700), one(0177700), "~s", m68000up },
-{"roll", one(0160630), one(0170770), "QdDs", m68000up },
-{"roll", one(0160670), one(0170770), "DdDs", m68000up },
-
-{"rorb", one(0160030), one(0170770), "QdDs", m68000up },
-{"rorb", one(0160070), one(0170770), "DdDs", m68000up },
-{"rorw", one(0160130), one(0170770), "QdDs", m68000up },
-{"rorw", one(0160170), one(0170770), "DdDs", m68000up },
-{"rorw", one(0163300), one(0177700), "~s", m68000up },
-{"rorl", one(0160230), one(0170770), "QdDs", m68000up },
-{"rorl", one(0160270), one(0170770), "DdDs", m68000up },
-
-{"roxlb", one(0160420), one(0170770), "QdDs", m68000up },
-{"roxlb", one(0160460), one(0170770), "DdDs", m68000up },
-{"roxlw", one(0160520), one(0170770), "QdDs", m68000up },
-{"roxlw", one(0160560), one(0170770), "DdDs", m68000up },
-{"roxlw", one(0162700), one(0177700), "~s", m68000up },
-{"roxll", one(0160620), one(0170770), "QdDs", m68000up },
-{"roxll", one(0160660), one(0170770), "DdDs", m68000up },
-
-{"roxrb", one(0160020), one(0170770), "QdDs", m68000up },
-{"roxrb", one(0160060), one(0170770), "DdDs", m68000up },
-{"roxrw", one(0160120), one(0170770), "QdDs", m68000up },
-{"roxrw", one(0160160), one(0170770), "DdDs", m68000up },
-{"roxrw", one(0162300), one(0177700), "~s", m68000up },
-{"roxrl", one(0160220), one(0170770), "QdDs", m68000up },
-{"roxrl", one(0160260), one(0170770), "DdDs", m68000up },
-
-{"rtd", one(0047164), one(0177777), "#w", m68010up },
-
-{"rte", one(0047163), one(0177777), "", m68000up | mcf },
-
-{"rtm", one(0003300), one(0177760), "Rs", m68020 },
-
-{"rtr", one(0047167), one(0177777), "", m68000up },
-
-{"rts", one(0047165), one(0177777), "", m68000up | mcf },
-
-{"satsl", one(0046200), one(0177770), "Ds", mcfv4up },
-
-{"sbcd", one(0100400), one(0170770), "DsDd", m68000up },
-{"sbcd", one(0100410), one(0170770), "-s-d", m68000up },
-
-{"scc", one(0052300), one(0177700), "$s", m68000up },
-{"scc", one(0052300), one(0177700), "Ds", mcf },
-{"scs", one(0052700), one(0177700), "$s", m68000up },
-{"scs", one(0052700), one(0177700), "Ds", mcf },
-{"seq", one(0053700), one(0177700), "$s", m68000up },
-{"seq", one(0053700), one(0177700), "Ds", mcf },
-{"sf", one(0050700), one(0177700), "$s", m68000up },
-{"sf", one(0050700), one(0177700), "Ds", mcf },
-{"sge", one(0056300), one(0177700), "$s", m68000up },
-{"sge", one(0056300), one(0177700), "Ds", mcf },
-{"sgt", one(0057300), one(0177700), "$s", m68000up },
-{"sgt", one(0057300), one(0177700), "Ds", mcf },
-{"shi", one(0051300), one(0177700), "$s", m68000up },
-{"shi", one(0051300), one(0177700), "Ds", mcf },
-{"sle", one(0057700), one(0177700), "$s", m68000up },
-{"sle", one(0057700), one(0177700), "Ds", mcf },
-{"sls", one(0051700), one(0177700), "$s", m68000up },
-{"sls", one(0051700), one(0177700), "Ds", mcf },
-{"slt", one(0056700), one(0177700), "$s", m68000up },
-{"slt", one(0056700), one(0177700), "Ds", mcf },
-{"smi", one(0055700), one(0177700), "$s", m68000up },
-{"smi", one(0055700), one(0177700), "Ds", mcf },
-{"sne", one(0053300), one(0177700), "$s", m68000up },
-{"sne", one(0053300), one(0177700), "Ds", mcf },
-{"spl", one(0055300), one(0177700), "$s", m68000up },
-{"spl", one(0055300), one(0177700), "Ds", mcf },
-{"st", one(0050300), one(0177700), "$s", m68000up },
-{"st", one(0050300), one(0177700), "Ds", mcf },
-{"svc", one(0054300), one(0177700), "$s", m68000up },
-{"svc", one(0054300), one(0177700), "Ds", mcf },
-{"svs", one(0054700), one(0177700), "$s", m68000up },
-{"svs", one(0054700), one(0177700), "Ds", mcf },
-
-{"stop", one(0047162), one(0177777), "#w", m68000up | mcf },
-
-{"strldsr", two(0040347,0043374), two(0177777,0177777), "#w", mcf528x},
-
-{"subal", one(0110700), one(0170700), "*lAd", m68000up | mcf },
-{"subaw", one(0110300), one(0170700), "*wAd", m68000up },
-
-{"subib", one(0002000), one(0177700), "#b$s", m68000up },
-{"subiw", one(0002100), one(0177700), "#w$s", m68000up },
-{"subil", one(0002200), one(0177700), "#l$s", m68000up },
-{"subil", one(0002200), one(0177700), "#lDs", mcf },
-
-{"subqb", one(0050400), one(0170700), "Qd%s", m68000up },
-{"subqw", one(0050500), one(0170700), "Qd%s", m68000up },
-{"subql", one(0050600), one(0170700), "Qd%s", m68000up | mcf },
+{"remsl", 4, two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "qsD3D1", mcfhwdiv },
+{"remul", 4, two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "qsD3D1", mcfhwdiv },
+
+{"reset", 2, one(0047160), one(0177777), "", m68000up },
+
+{"rolb", 2, one(0160430), one(0170770), "QdDs", m68000up },
+{"rolb", 2, one(0160470), one(0170770), "DdDs", m68000up },
+{"rolw", 2, one(0160530), one(0170770), "QdDs", m68000up },
+{"rolw", 2, one(0160570), one(0170770), "DdDs", m68000up },
+{"rolw", 2, one(0163700), one(0177700), "~s", m68000up },
+{"roll", 2, one(0160630), one(0170770), "QdDs", m68000up },
+{"roll", 2, one(0160670), one(0170770), "DdDs", m68000up },
+
+{"rorb", 2, one(0160030), one(0170770), "QdDs", m68000up },
+{"rorb", 2, one(0160070), one(0170770), "DdDs", m68000up },
+{"rorw", 2, one(0160130), one(0170770), "QdDs", m68000up },
+{"rorw", 2, one(0160170), one(0170770), "DdDs", m68000up },
+{"rorw", 2, one(0163300), one(0177700), "~s", m68000up },
+{"rorl", 2, one(0160230), one(0170770), "QdDs", m68000up },
+{"rorl", 2, one(0160270), one(0170770), "DdDs", m68000up },
+
+{"roxlb", 2, one(0160420), one(0170770), "QdDs", m68000up },
+{"roxlb", 2, one(0160460), one(0170770), "DdDs", m68000up },
+{"roxlw", 2, one(0160520), one(0170770), "QdDs", m68000up },
+{"roxlw", 2, one(0160560), one(0170770), "DdDs", m68000up },
+{"roxlw", 2, one(0162700), one(0177700), "~s", m68000up },
+{"roxll", 2, one(0160620), one(0170770), "QdDs", m68000up },
+{"roxll", 2, one(0160660), one(0170770), "DdDs", m68000up },
+
+{"roxrb", 2, one(0160020), one(0170770), "QdDs", m68000up },
+{"roxrb", 2, one(0160060), one(0170770), "DdDs", m68000up },
+{"roxrw", 2, one(0160120), one(0170770), "QdDs", m68000up },
+{"roxrw", 2, one(0160160), one(0170770), "DdDs", m68000up },
+{"roxrw", 2, one(0162300), one(0177700), "~s", m68000up },
+{"roxrl", 2, one(0160220), one(0170770), "QdDs", m68000up },
+{"roxrl", 2, one(0160260), one(0170770), "DdDs", m68000up },
+
+{"rtd", 4, one(0047164), one(0177777), "#w", m68010up },
+
+{"rte", 2, one(0047163), one(0177777), "", m68000up | mcfisa_a },
+
+{"rtm", 2, one(0003300), one(0177760), "Rs", m68020 },
+
+{"rtr", 2, one(0047167), one(0177777), "", m68000up },
+
+{"rts", 2, one(0047165), one(0177777), "", m68000up | mcfisa_a },
+
+{"satsl", 2, one(0046200), one(0177770), "Ds", mcfisa_b },
+
+{"sbcd", 2, one(0100400), one(0170770), "DsDd", m68000up },
+{"sbcd", 2, one(0100410), one(0170770), "-s-d", m68000up },
+
+{"scc", 2, one(0052300), one(0177700), "$s", m68000up },
+{"scc", 2, one(0052300), one(0177700), "Ds", mcfisa_a },
+{"scs", 2, one(0052700), one(0177700), "$s", m68000up },
+{"scs", 2, one(0052700), one(0177700), "Ds", mcfisa_a },
+{"seq", 2, one(0053700), one(0177700), "$s", m68000up },
+{"seq", 2, one(0053700), one(0177700), "Ds", mcfisa_a },
+{"sf", 2, one(0050700), one(0177700), "$s", m68000up },
+{"sf", 2, one(0050700), one(0177700), "Ds", mcfisa_a },
+{"sge", 2, one(0056300), one(0177700), "$s", m68000up },
+{"sge", 2, one(0056300), one(0177700), "Ds", mcfisa_a },
+{"sgt", 2, one(0057300), one(0177700), "$s", m68000up },
+{"sgt", 2, one(0057300), one(0177700), "Ds", mcfisa_a },
+{"shi", 2, one(0051300), one(0177700), "$s", m68000up },
+{"shi", 2, one(0051300), one(0177700), "Ds", mcfisa_a },
+{"sle", 2, one(0057700), one(0177700), "$s", m68000up },
+{"sle", 2, one(0057700), one(0177700), "Ds", mcfisa_a },
+{"sls", 2, one(0051700), one(0177700), "$s", m68000up },
+{"sls", 2, one(0051700), one(0177700), "Ds", mcfisa_a },
+{"slt", 2, one(0056700), one(0177700), "$s", m68000up },
+{"slt", 2, one(0056700), one(0177700), "Ds", mcfisa_a },
+{"smi", 2, one(0055700), one(0177700), "$s", m68000up },
+{"smi", 2, one(0055700), one(0177700), "Ds", mcfisa_a },
+{"sne", 2, one(0053300), one(0177700), "$s", m68000up },
+{"sne", 2, one(0053300), one(0177700), "Ds", mcfisa_a },
+{"spl", 2, one(0055300), one(0177700), "$s", m68000up },
+{"spl", 2, one(0055300), one(0177700), "Ds", mcfisa_a },
+{"st", 2, one(0050300), one(0177700), "$s", m68000up },
+{"st", 2, one(0050300), one(0177700), "Ds", mcfisa_a },
+{"svc", 2, one(0054300), one(0177700), "$s", m68000up },
+{"svc", 2, one(0054300), one(0177700), "Ds", mcfisa_a },
+{"svs", 2, one(0054700), one(0177700), "$s", m68000up },
+{"svs", 2, one(0054700), one(0177700), "Ds", mcfisa_a },
+
+{"stop", 4, one(0047162), one(0177777), "#w", m68000up | mcfisa_a },
+
+{"strldsr", 4, two(0040347,0043374), two(0177777,0177777), "#w", mcfisa_aa},
+
+{"subal", 2, one(0110700), one(0170700), "*lAd", m68000up | mcfisa_a },
+{"subaw", 2, one(0110300), one(0170700), "*wAd", m68000up },
+
+{"subib", 4, one(0002000), one(0177700), "#b$s", m68000up },
+{"subiw", 4, one(0002100), one(0177700), "#w$s", m68000up },
+{"subil", 6, one(0002200), one(0177700), "#l$s", m68000up },
+{"subil", 6, one(0002200), one(0177700), "#lDs", mcfisa_a },
+
+{"subqb", 2, one(0050400), one(0170700), "Qd%s", m68000up },
+{"subqw", 2, one(0050500), one(0170700), "Qd%s", m68000up },
+{"subql", 2, one(0050600), one(0170700), "Qd%s", m68000up | mcfisa_a },
/* The sub opcode can generate the suba, subi, and subq instructions. */
-{"subb", one(0050400), one(0170700), "Qd%s", m68000up },
-{"subb", one(0002000), one(0177700), "#b$s", m68000up },
-{"subb", one(0110000), one(0170700), ";bDd", m68000up },
-{"subb", one(0110400), one(0170700), "Dd~s", m68000up },
-{"subw", one(0050500), one(0170700), "Qd%s", m68000up },
-{"subw", one(0002100), one(0177700), "#w$s", m68000up },
-{"subw", one(0110300), one(0170700), "*wAd", m68000up },
-{"subw", one(0110100), one(0170700), "*wDd", m68000up },
-{"subw", one(0110500), one(0170700), "Dd~s", m68000up },
-{"subl", one(0050600), one(0170700), "Qd%s", m68000up | mcf },
-{"subl", one(0002200), one(0177700), "#l$s", m68000up },
-{"subl", one(0002200), one(0177700), "#lDs", mcf },
-{"subl", one(0110700), one(0170700), "*lAd", m68000up | mcf },
-{"subl", one(0110200), one(0170700), "*lDd", m68000up | mcf },
-{"subl", one(0110600), one(0170700), "Dd~s", m68000up | mcf },
-
-{"subxb", one(0110400), one(0170770), "DsDd", m68000up },
-{"subxb", one(0110410), one(0170770), "-s-d", m68000up },
-{"subxw", one(0110500), one(0170770), "DsDd", m68000up },
-{"subxw", one(0110510), one(0170770), "-s-d", m68000up },
-{"subxl", one(0110600), one(0170770), "DsDd", m68000up | mcf },
-{"subxl", one(0110610), one(0170770), "-s-d", m68000up },
-
-{"swap", one(0044100), one(0177770), "Ds", m68000up | mcf },
+{"subb", 2, one(0050400), one(0170700), "Qd%s", m68000up },
+{"subb", 4, one(0002000), one(0177700), "#b$s", m68000up },
+{"subb", 2, one(0110000), one(0170700), ";bDd", m68000up },
+{"subb", 2, one(0110400), one(0170700), "Dd~s", m68000up },
+{"subw", 2, one(0050500), one(0170700), "Qd%s", m68000up },
+{"subw", 4, one(0002100), one(0177700), "#w$s", m68000up },
+{"subw", 2, one(0110300), one(0170700), "*wAd", m68000up },
+{"subw", 2, one(0110100), one(0170700), "*wDd", m68000up },
+{"subw", 2, one(0110500), one(0170700), "Dd~s", m68000up },
+{"subl", 2, one(0050600), one(0170700), "Qd%s", m68000up | mcfisa_a },
+{"subl", 6, one(0002200), one(0177700), "#l$s", m68000up },
+{"subl", 6, one(0002200), one(0177700), "#lDs", mcfisa_a },
+{"subl", 2, one(0110700), one(0170700), "*lAd", m68000up | mcfisa_a },
+{"subl", 2, one(0110200), one(0170700), "*lDd", m68000up | mcfisa_a },
+{"subl", 2, one(0110600), one(0170700), "Dd~s", m68000up | mcfisa_a },
+
+{"subxb", 2, one(0110400), one(0170770), "DsDd", m68000up },
+{"subxb", 2, one(0110410), one(0170770), "-s-d", m68000up },
+{"subxw", 2, one(0110500), one(0170770), "DsDd", m68000up },
+{"subxw", 2, one(0110510), one(0170770), "-s-d", m68000up },
+{"subxl", 2, one(0110600), one(0170770), "DsDd", m68000up | mcfisa_a },
+{"subxl", 2, one(0110610), one(0170770), "-s-d", m68000up },
+
+{"swap", 2, one(0044100), one(0177770), "Ds", m68000up | mcfisa_a },
/* swbeg and swbegl are magic constants used on sysV68. The compiler
generates them before a switch table. They tell the debugger and
@@ -2084,96 +2078,96 @@ const struct m68k_opcode m68k_opcodes[] =
number of elements in the table. swbeg means that the entries in
the table are word (2 byte) sized, and swbegl means that the
entries in the table are longword (4 byte) sized. */
-{"swbeg", one(0045374), one(0177777), "#w", m68000up | mcf },
-{"swbegl", one(0045375), one(0177777), "#l", m68000up | mcf },
+{"swbeg", 4, one(0045374), one(0177777), "#w", m68000up | mcfisa_a },
+{"swbegl", 6, one(0045375), one(0177777), "#l", m68000up | mcfisa_a },
-{"tas", one(0045300), one(0177700), "$s", m68000up | mcfv4up},
+{"tas", 2, one(0045300), one(0177700), "$s", m68000up | mcfisa_b},
-#define TBL1(name,signed,round,size) \
- {name, two(0174000, (signed<<11)|(!round<<10)|(size<<6)|0000400), \
+#define TBL1(name,insn_size,signed,round,size) \
+ {name, insn_size, two(0174000, (signed<<11)|(!round<<10)|(size<<6)|0000400), \
two(0177700,0107777), "!sD1", cpu32 }, \
- {name, two(0174000, (signed<<11)|(!round<<10)|(size<<6)), \
+ {name, insn_size, two(0174000, (signed<<11)|(!round<<10)|(size<<6)), \
two(0177770,0107770), "DsD3D1", cpu32 }
#define TBL(name1, name2, name3, s, r) \
- TBL1(name1, s, r, 0), TBL1(name2, s, r, 1), TBL1(name3, s, r, 2)
-TBL("tblsb", "tblsw", "tblsl", 1, 1),
-TBL("tblsnb", "tblsnw", "tblsnl", 1, 0),
+ TBL1(name1, 4, s, r, 0), TBL1(name2, 4, s, r, 1), TBL1(name3, 4, s, r, 2)
+TBL("tblsb", "tblsw", "tblsl", 2, 1),
+TBL("tblsnb", "tblsnw", "tblsnl", 2, 0),
TBL("tblub", "tbluw", "tblul", 0, 1),
TBL("tblunb", "tblunw", "tblunl", 0, 0),
-{"trap", one(0047100), one(0177760), "Ts", m68000up | mcf },
-
-{"trapcc", one(0052374), one(0177777), "", m68020up | cpu32 },
-{"trapcs", one(0052774), one(0177777), "", m68020up | cpu32 },
-{"trapeq", one(0053774), one(0177777), "", m68020up | cpu32 },
-{"trapf", one(0050774), one(0177777), "", m68020up | cpu32 | mcf },
-{"trapge", one(0056374), one(0177777), "", m68020up | cpu32 },
-{"trapgt", one(0057374), one(0177777), "", m68020up | cpu32 },
-{"traphi", one(0051374), one(0177777), "", m68020up | cpu32 },
-{"traple", one(0057774), one(0177777), "", m68020up | cpu32 },
-{"trapls", one(0051774), one(0177777), "", m68020up | cpu32 },
-{"traplt", one(0056774), one(0177777), "", m68020up | cpu32 },
-{"trapmi", one(0055774), one(0177777), "", m68020up | cpu32 },
-{"trapne", one(0053374), one(0177777), "", m68020up | cpu32 },
-{"trappl", one(0055374), one(0177777), "", m68020up | cpu32 },
-{"trapt", one(0050374), one(0177777), "", m68020up | cpu32 },
-{"trapvc", one(0054374), one(0177777), "", m68020up | cpu32 },
-{"trapvs", one(0054774), one(0177777), "", m68020up | cpu32 },
-
-{"trapccw", one(0052372), one(0177777), "#w", m68020up|cpu32 },
-{"trapcsw", one(0052772), one(0177777), "#w", m68020up|cpu32 },
-{"trapeqw", one(0053772), one(0177777), "#w", m68020up|cpu32 },
-{"trapfw", one(0050772), one(0177777), "#w", m68020up|cpu32|mcf},
-{"trapgew", one(0056372), one(0177777), "#w", m68020up|cpu32 },
-{"trapgtw", one(0057372), one(0177777), "#w", m68020up|cpu32 },
-{"traphiw", one(0051372), one(0177777), "#w", m68020up|cpu32 },
-{"traplew", one(0057772), one(0177777), "#w", m68020up|cpu32 },
-{"traplsw", one(0051772), one(0177777), "#w", m68020up|cpu32 },
-{"trapltw", one(0056772), one(0177777), "#w", m68020up|cpu32 },
-{"trapmiw", one(0055772), one(0177777), "#w", m68020up|cpu32 },
-{"trapnew", one(0053372), one(0177777), "#w", m68020up|cpu32 },
-{"trapplw", one(0055372), one(0177777), "#w", m68020up|cpu32 },
-{"traptw", one(0050372), one(0177777), "#w", m68020up|cpu32 },
-{"trapvcw", one(0054372), one(0177777), "#w", m68020up|cpu32 },
-{"trapvsw", one(0054772), one(0177777), "#w", m68020up|cpu32 },
-
-{"trapccl", one(0052373), one(0177777), "#l", m68020up|cpu32 },
-{"trapcsl", one(0052773), one(0177777), "#l", m68020up|cpu32 },
-{"trapeql", one(0053773), one(0177777), "#l", m68020up|cpu32 },
-{"trapfl", one(0050773), one(0177777), "#l", m68020up|cpu32|mcf},
-{"trapgel", one(0056373), one(0177777), "#l", m68020up|cpu32 },
-{"trapgtl", one(0057373), one(0177777), "#l", m68020up|cpu32 },
-{"traphil", one(0051373), one(0177777), "#l", m68020up|cpu32 },
-{"traplel", one(0057773), one(0177777), "#l", m68020up|cpu32 },
-{"traplsl", one(0051773), one(0177777), "#l", m68020up|cpu32 },
-{"trapltl", one(0056773), one(0177777), "#l", m68020up|cpu32 },
-{"trapmil", one(0055773), one(0177777), "#l", m68020up|cpu32 },
-{"trapnel", one(0053373), one(0177777), "#l", m68020up|cpu32 },
-{"trappll", one(0055373), one(0177777), "#l", m68020up|cpu32 },
-{"traptl", one(0050373), one(0177777), "#l", m68020up|cpu32 },
-{"trapvcl", one(0054373), one(0177777), "#l", m68020up|cpu32 },
-{"trapvsl", one(0054773), one(0177777), "#l", m68020up|cpu32 },
-
-{"trapv", one(0047166), one(0177777), "", m68000up },
-
-{"tstb", one(0045000), one(0177700), ";b", m68020up|cpu32|mcf },
-{"tstb", one(0045000), one(0177700), "$b", m68000up },
-{"tstw", one(0045100), one(0177700), "*w", m68020up|cpu32|mcf },
-{"tstw", one(0045100), one(0177700), "$w", m68000up },
-{"tstl", one(0045200), one(0177700), "*l", m68020up|cpu32|mcf },
-{"tstl", one(0045200), one(0177700), "$l", m68000up },
-
-{"unlk", one(0047130), one(0177770), "As", m68000up | mcf },
-
-{"unpk", one(0100600), one(0170770), "DsDd#w", m68020up },
-{"unpk", one(0100610), one(0170770), "-s-d#w", m68020up },
-
-{"wddatab", one(0175400), one(0177700), "~s", mcf },
-{"wddataw", one(0175500), one(0177700), "~s", mcf },
-{"wddatal", one(0175600), one(0177700), "~s", mcf },
-
-{"wdebug", two(0175720, 03), two(0177770, 0xffff), "as", mcf },
-{"wdebug", two(0175750, 03), two(0177770, 0xffff), "ds", mcf },
+{"trap", 2, one(0047100), one(0177760), "Ts", m68000up | mcfisa_a },
+
+{"trapcc", 2, one(0052374), one(0177777), "", m68020up | cpu32 },
+{"trapcs", 2, one(0052774), one(0177777), "", m68020up | cpu32 },
+{"trapeq", 2, one(0053774), one(0177777), "", m68020up | cpu32 },
+{"trapf", 2, one(0050774), one(0177777), "", m68020up | cpu32 | mcfisa_a },
+{"trapge", 2, one(0056374), one(0177777), "", m68020up | cpu32 },
+{"trapgt", 2, one(0057374), one(0177777), "", m68020up | cpu32 },
+{"traphi", 2, one(0051374), one(0177777), "", m68020up | cpu32 },
+{"traple", 2, one(0057774), one(0177777), "", m68020up | cpu32 },
+{"trapls", 2, one(0051774), one(0177777), "", m68020up | cpu32 },
+{"traplt", 2, one(0056774), one(0177777), "", m68020up | cpu32 },
+{"trapmi", 2, one(0055774), one(0177777), "", m68020up | cpu32 },
+{"trapne", 2, one(0053374), one(0177777), "", m68020up | cpu32 },
+{"trappl", 2, one(0055374), one(0177777), "", m68020up | cpu32 },
+{"trapt", 2, one(0050374), one(0177777), "", m68020up | cpu32 },
+{"trapvc", 2, one(0054374), one(0177777), "", m68020up | cpu32 },
+{"trapvs", 2, one(0054774), one(0177777), "", m68020up | cpu32 },
+
+{"trapccw", 4, one(0052372), one(0177777), "#w", m68020up|cpu32 },
+{"trapcsw", 4, one(0052772), one(0177777), "#w", m68020up|cpu32 },
+{"trapeqw", 4, one(0053772), one(0177777), "#w", m68020up|cpu32 },
+{"trapfw", 4, one(0050772), one(0177777), "#w", m68020up|cpu32|mcfisa_a},
+{"trapgew", 4, one(0056372), one(0177777), "#w", m68020up|cpu32 },
+{"trapgtw", 4, one(0057372), one(0177777), "#w", m68020up|cpu32 },
+{"traphiw", 4, one(0051372), one(0177777), "#w", m68020up|cpu32 },
+{"traplew", 4, one(0057772), one(0177777), "#w", m68020up|cpu32 },
+{"traplsw", 4, one(0051772), one(0177777), "#w", m68020up|cpu32 },
+{"trapltw", 4, one(0056772), one(0177777), "#w", m68020up|cpu32 },
+{"trapmiw", 4, one(0055772), one(0177777), "#w", m68020up|cpu32 },
+{"trapnew", 4, one(0053372), one(0177777), "#w", m68020up|cpu32 },
+{"trapplw", 4, one(0055372), one(0177777), "#w", m68020up|cpu32 },
+{"traptw", 4, one(0050372), one(0177777), "#w", m68020up|cpu32 },
+{"trapvcw", 4, one(0054372), one(0177777), "#w", m68020up|cpu32 },
+{"trapvsw", 4, one(0054772), one(0177777), "#w", m68020up|cpu32 },
+
+{"trapccl", 6, one(0052373), one(0177777), "#l", m68020up|cpu32 },
+{"trapcsl", 6, one(0052773), one(0177777), "#l", m68020up|cpu32 },
+{"trapeql", 6, one(0053773), one(0177777), "#l", m68020up|cpu32 },
+{"trapfl", 6, one(0050773), one(0177777), "#l", m68020up|cpu32|mcfisa_a},
+{"trapgel", 6, one(0056373), one(0177777), "#l", m68020up|cpu32 },
+{"trapgtl", 6, one(0057373), one(0177777), "#l", m68020up|cpu32 },
+{"traphil", 6, one(0051373), one(0177777), "#l", m68020up|cpu32 },
+{"traplel", 6, one(0057773), one(0177777), "#l", m68020up|cpu32 },
+{"traplsl", 6, one(0051773), one(0177777), "#l", m68020up|cpu32 },
+{"trapltl", 6, one(0056773), one(0177777), "#l", m68020up|cpu32 },
+{"trapmil", 6, one(0055773), one(0177777), "#l", m68020up|cpu32 },
+{"trapnel", 6, one(0053373), one(0177777), "#l", m68020up|cpu32 },
+{"trappll", 6, one(0055373), one(0177777), "#l", m68020up|cpu32 },
+{"traptl", 6, one(0050373), one(0177777), "#l", m68020up|cpu32 },
+{"trapvcl", 6, one(0054373), one(0177777), "#l", m68020up|cpu32 },
+{"trapvsl", 6, one(0054773), one(0177777), "#l", m68020up|cpu32 },
+
+{"trapv", 2, one(0047166), one(0177777), "", m68000up },
+
+{"tstb", 2, one(0045000), one(0177700), ";b", m68020up|cpu32|mcfisa_a },
+{"tstb", 2, one(0045000), one(0177700), "$b", m68000up },
+{"tstw", 2, one(0045100), one(0177700), "*w", m68020up|cpu32|mcfisa_a },
+{"tstw", 2, one(0045100), one(0177700), "$w", m68000up },
+{"tstl", 2, one(0045200), one(0177700), "*l", m68020up|cpu32|mcfisa_a },
+{"tstl", 2, one(0045200), one(0177700), "$l", m68000up },
+
+{"unlk", 2, one(0047130), one(0177770), "As", m68000up | mcfisa_a },
+
+{"unpk", 4, one(0100600), one(0170770), "DsDd#w", m68020up },
+{"unpk", 4, one(0100610), one(0170770), "-s-d#w", m68020up },
+
+{"wddatab", 2, one(0175400), one(0177700), "~s", mcfisa_a },
+{"wddataw", 2, one(0175500), one(0177700), "~s", mcfisa_a },
+{"wddatal", 2, one(0175600), one(0177700), "~s", mcfisa_a },
+
+{"wdebug", 4, two(0175720, 03), two(0177770, 0xffff), "as", mcfisa_a },
+{"wdebug", 4, two(0175750, 03), two(0177770, 0xffff), "ds", mcfisa_a },
};
const int m68k_numopcodes = sizeof m68k_opcodes / sizeof m68k_opcodes[0];
@@ -2241,9 +2235,9 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "brb", "bras", },
{ "brw", "braw", },
{ "brl", "bral", },
- { "jfnlt", "bcc", }, /* apparently a sun alias */
- { "jfngt", "ble", }, /* apparently a sun alias */
- { "jfeq", "beqs", }, /* apparently a sun alias */
+ { "jfnlt", "bcc", }, /* Apparently a sun alias. */
+ { "jfngt", "ble", }, /* Apparently a sun alias. */
+ { "jfeq", "beqs", }, /* Apparently a sun alias. */
{ "bchgb", "bchg", },
{ "bchgl", "bchg", },
{ "bclrb", "bclr", },
@@ -2392,7 +2386,7 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "movsw", "movesw", },
{ "mov3q", "mov3ql", },
- { "tdivul", "divul", }, /* for m68k-svr4 */
+ { "tdivul", "divul", }, /* For m68k-svr4. */
{ "fmovb", "fmoveb", },
{ "fsmovb", "fsmoveb", },
{ "fdmovb", "fdmoveb", },
@@ -2423,7 +2417,7 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "ftestw", "ftstw", },
{ "ftestx", "ftstx", },
- { "bitrevl", "bitrev", }, /* for mcf528x only */
+ { "bitrevl", "bitrev", },
{ "byterevl", "byterev", },
{ "ff1l", "ff1", },
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 9a80e53d43d..523aef06aab 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -209,10 +209,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"bc1t", "N,p", 0x45010000, 0xffe30000, CBD|RD_CC|FP_S, I4|I32 },
{"bc1tl", "p", 0x45030000, 0xffff0000, CBL|RD_CC|FP_S, I2|T3 },
{"bc1tl", "N,p", 0x45030000, 0xffe30000, CBL|RD_CC|FP_S, I4|I32 },
-{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc2fl", "p", 0x49020000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc2t", "p", 0x49010000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc2tl", "p", 0x49030000, 0xffff0000, CBL|RD_CC, I2|T3 },
+/* bc2* are at the bottom of the table. */
{"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, I1 },
{"bc3fl", "p", 0x4d020000, 0xffff0000, CBL|RD_CC, I2|T3 },
{"bc3t", "p", 0x4d010000, 0xffff0000, CBD|RD_CC, I1 },
@@ -274,7 +271,6 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, I2|T3 },
{"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, I2|T3 },
{"break", "", 0x0000000d, 0xffffffff, TRAP, I1 },
-{"break", "B", 0x0000000d, 0xfc00003f, TRAP, I32 },
{"break", "c", 0x0000000d, 0xfc00ffff, TRAP, I1 },
{"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, I1 },
{"c.f.d", "S,T", 0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
@@ -444,14 +440,14 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"cfc0", "t,G", 0x40400000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
{"cfc1", "t,G", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, I1 },
{"cfc1", "t,S", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, I1 },
-{"cfc2", "t,G", 0x48400000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
+/* cfc2 is at the bottom of the table. */
{"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s, I32|N55 },
{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s, I32|N55 },
{"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, I1 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, I1 },
-{"ctc2", "t,G", 0x48c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
+/* ctc2 is at the bottom of the table. */
{"ctc3", "t,G", 0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
{"cvt.d.l", "D,S", 0x46a00021, 0xffff003f, WR_D|RD_S|FP_D, I3 },
{"cvt.d.s", "D,S", 0x46000021, 0xffff003f, WR_D|RD_S|FP_D|FP_S, I1 },
@@ -540,10 +536,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmfc1", "t,G", 0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
{"dmtc1", "t,S", 0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I3 },
{"dmtc1", "t,G", 0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I3 },
-{"dmfc2", "t,G", 0x48200000, 0xffe007ff, LCD|WR_t|RD_C2, I3 },
-{"dmfc2", "t,G,H", 0x48200000, 0xffe007f8, LCD|WR_t|RD_C2, I64 },
-{"dmtc2", "t,G", 0x48a00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I3 },
-{"dmtc2", "t,G,H", 0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I64 },
+/* dmfc2 is at the bottom of the table. */
+/* dmtc2 is at the bottom of the table. */
{"dmfc3", "t,G", 0x4c200000, 0xffe007ff, LCD|WR_t|RD_C3, I3 },
{"dmfc3", "t,G,H", 0x4c200000, 0xffe007f8, LCD|WR_t|RD_C3, I64 },
{"dmtc3", "t,G", 0x4ca00000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, I3 },
@@ -741,9 +735,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mfc1", "t,G", 0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I1 },
{"mfhc1", "t,S", 0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I33 },
{"mfhc1", "t,G", 0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I33 },
-{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
-{"mfc2", "t,G,H", 0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, I32 },
-{"mfhc2", "t,i", 0x48600000, 0xffe00000, LCD|WR_t|RD_C2, I33 },
+/* mfc2 is at the bottom of the table. */
+/* mfhc2 is at the bottom of the table. */
{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, I32 },
{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, N5 },
@@ -805,9 +798,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mtc1", "t,G", 0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I1 },
{"mthc1", "t,S", 0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I33 },
{"mthc1", "t,G", 0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I33 },
-{"mtc2", "t,G", 0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I1 },
-{"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I32 },
-{"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, I33 },
+/* mtc2 is at the bottom of the table. */
+/* mthc2 is at the bottom of the table. */
{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, I1 },
{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, I32 },
{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, N5 },
@@ -1187,6 +1179,25 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"xor.qh", "X,Y,Q", 0x7820000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, I1 },
+/* Coprocessor 2 move/branch operations overlap with VR5400 .ob format
+ instructions so they are here for the latters to take precedence. */
+{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc2fl", "p", 0x49020000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc2t", "p", 0x49010000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc2tl", "p", 0x49030000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"cfc2", "t,G", 0x48400000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
+{"ctc2", "t,G", 0x48c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
+{"dmfc2", "t,G", 0x48200000, 0xffe007ff, LCD|WR_t|RD_C2, I3 },
+{"dmfc2", "t,G,H", 0x48200000, 0xffe007f8, LCD|WR_t|RD_C2, I64 },
+{"dmtc2", "t,G", 0x48a00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I3 },
+{"dmtc2", "t,G,H", 0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I64 },
+{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
+{"mfc2", "t,G,H", 0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, I32 },
+{"mfhc2", "t,i", 0x48600000, 0xffe00000, LCD|WR_t|RD_C2, I33 },
+{"mtc2", "t,G", 0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I1 },
+{"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I32 },
+{"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, I33 },
+
/* No hazard protection on coprocessor instructions--they shouldn't
change the state of the processor and if they do it's up to the
user to put in nops as necessary. These are at the end so that the
diff --git a/opcodes/po/fr.po b/opcodes/po/fr.po
index 7ec06af1903..ac645226b82 100644
--- a/opcodes/po/fr.po
+++ b/opcodes/po/fr.po
@@ -1,17 +1,18 @@
# Messages français pour opcodes.
-# Copyright © 1996 Free Software Foundation, Inc.
+# Copyright © 2004 Free Software Foundation, Inc.
# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
#
msgid ""
msgstr ""
"Project-Id-Version: opcodes 2.14rel030712\n"
"POT-Creation-Date: 2003-07-11 13:56+0930\n"
-"PO-Revision-Date: 2003-08-05 08:00-0500\n"
+"PO-Revision-Date: 2004-05-10 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: alpha-opc.c:335
msgid "branch operand unaligned"
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 36fe454e254..af70ae6ac2a 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -194,8 +194,11 @@ const struct powerpc_operand powerpc_operands[] =
#define BOE BO + 1
{ 5, 21, insert_boe, extract_boe, 0 },
+#define BH BOE + 1
+ { 2, 11, 0, 0, PPC_OPERAND_OPTIONAL },
+
/* The BT field in an X or XL form instruction. */
-#define BT BOE + 1
+#define BT BH + 1
{ 5, 21, 0, 0, PPC_OPERAND_CR },
/* The condition register number portion of the BI field in a B form
@@ -297,7 +300,7 @@ const struct powerpc_operand powerpc_operands[] =
/* The L field in a D or X form instruction. */
#define L FXM4 + 1
- { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 1, 21, 0, 0, 0 },
/* The LEV field in a POWER SC form instruction. */
#define LEV L + 1
@@ -995,17 +998,33 @@ insert_fxm (unsigned long insn,
int dialect,
const char **errmsg)
{
+ /* If we're handling the mfocrf and mtocrf insns ensure that exactly
+ one bit of the mask field is set. */
+ if ((insn & (1 << 20)) != 0)
+ {
+ if (value == 0 || (value & -value) != value)
+ {
+ *errmsg = _("invalid mask field");
+ value = 0;
+ }
+ }
+
/* If the optional field on mfcr is missing that means we want to use
the old form of the instruction that moves the whole cr. In that
case we'll have VALUE zero. There doesn't seem to be a way to
distinguish this from the case where someone writes mfcr %r3,0. */
- if (value == 0)
+ else if (value == 0)
;
/* If only one bit of the FXM field is set, we can use the new form
of the instruction, which is faster. Unlike the Power4 branch hint
- encoding, this is not backward compatible. */
- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
+ encoding, this is not backward compatible. Do not generate the
+ new form unless -mpower4 has been given, or -many and the two
+ operand form of mfcr was used. */
+ else if ((value & -value) == value
+ && ((dialect & PPC_OPCODE_POWER4) != 0
+ || ((dialect & PPC_OPCODE_ANY) != 0
+ && (insn & (0x3ff << 1)) == 19 << 1)))
insn |= 1 << 20;
/* Any other value on mfcr is an error. */
@@ -1020,7 +1039,7 @@ insert_fxm (unsigned long insn,
static long
extract_fxm (unsigned long insn,
- int dialect,
+ int dialect ATTRIBUTE_UNUSED,
int *invalid)
{
long mask = (insn >> 12) & 0xff;
@@ -1028,14 +1047,9 @@ extract_fxm (unsigned long insn,
/* Is this a Power4 insn? */
if ((insn & (1 << 20)) != 0)
{
- if ((dialect & PPC_OPCODE_POWER4) == 0)
+ /* Exactly one bit of MASK should be set. */
+ if (mask == 0 || (mask & -mask) != mask)
*invalid = 1;
- else
- {
- /* Exactly one bit of MASK should be set. */
- if (mask == 0 || (mask & -mask) != mask)
- *invalid = 1;
- }
}
/* Check that non-power4 form of mfcr has a zero MASK. */
@@ -1585,8 +1599,8 @@ extract_tbr (unsigned long insn,
/* An XRTRA_MASK, but with L bit clear. */
#define XRTLRA_MASK (XRTRA_MASK & ~((unsigned long) 1 << 21))
-/* An X form comparison instruction. */
-#define XCMPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
+/* An X form instruction with the L bit specified. */
+#define XOPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
/* The mask for an X form comparison instruction. */
#define XCMP_MASK (X_MASK | (((unsigned long)1) << 22))
@@ -1651,6 +1665,9 @@ extract_tbr (unsigned long insn,
#define XLYBB_MASK (XLYLK_MASK | BB_MASK)
#define XLBOCBBB_MASK (XLOCB_MASK | BB_MASK)
+/* A mask for branch instructions using the BH field. */
+#define XLBH_MASK (XL_MASK | (0x1c << 11))
+
/* An XL_MASK with the BO and BB fields fixed. */
#define XLBOBB_MASK (XL_MASK | BO_MASK | BB_MASK)
@@ -1670,11 +1687,12 @@ extract_tbr (unsigned long insn,
#define XS_MASK XS (0x3f, 0x1ff, 1)
/* A mask for the FXM version of an XFX form instruction. */
-#define XFXFXM_MASK (X_MASK | (1 << 11))
+#define XFXFXM_MASK (X_MASK | (1 << 11) | (1 << 20))
/* An XFX form instruction with the FXM field filled in. */
-#define XFXM(op, xop, fxm) \
- (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12))
+#define XFXM(op, xop, fxm, p4) \
+ (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12) \
+ | ((unsigned long)(p4) << 20))
/* An XFX form instruction with the SPR field filled in. */
#define XSPR(op, xop, spr) \
@@ -1764,7 +1782,7 @@ extract_tbr (unsigned long insn,
#define PPC440 PPC_OPCODE_440
#define PPC750 PPC
#define PPC860 PPC
-#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_PPC
+#define PPCVEC PPC_OPCODE_ALTIVEC
#define POWER PPC_OPCODE_POWER
#define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2
#define PPCPWR2 PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2
@@ -2878,12 +2896,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bclr", XLLK(19,16,0), XLYBB_MASK, PPCCOM, { BO, BI } },
-{ "bclrl", XLLK(19,16,1), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bclr+", XLYLK(19,16,1,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclrl+", XLYLK(19,16,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclr-", XLYLK(19,16,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
+{ "bclr", XLLK(19,16,0), XLBH_MASK, PPCCOM, { BO, BI, BH } },
+{ "bclrl", XLLK(19,16,1), XLBH_MASK, PPCCOM, { BO, BI, BH } },
{ "bcr", XLLK(19,16,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bcrl", XLLK(19,16,1), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bclre", XLLK(19,17,0), XLBB_MASK, BOOKE64, { BO, BI } },
@@ -3062,12 +3080,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bfctrl-", XLO(19,BOFM4,528,1), XLBOBB_MASK, POWER4, { BI } },
{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctrl+", XLO(19,BOFP4,528,1), XLBOBB_MASK, POWER4, { BI } },
-{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
-{ "bcctrl", XLLK(19,528,1), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctrl-", XLYLK(19,528,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
+{ "bcctr", XLLK(19,528,0), XLBH_MASK, PPCCOM, { BO, BI, BH } },
+{ "bcctrl", XLLK(19,528,1), XLBH_MASK, PPCCOM, { BO, BI, BH } },
{ "bcc", XLLK(19,528,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bccl", XLLK(19,528,1), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bcctre", XLLK(19,529,0), XLYBB_MASK, BOOKE64, { BO, BI } },
@@ -3146,8 +3164,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rldcr", MDS(30,9,0), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
{ "rldcr.", MDS(30,9,1), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
-{ "cmpw", XCMPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
-{ "cmpd", XCMPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmpw", XOPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpd", XOPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
{ "cmp", X(31,0), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmp", X(31,0), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
@@ -3216,6 +3234,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "iseleq", X(31,79), X_MASK, PPCISEL, { RT, RA, RB } },
{ "isel", XISEL(31,15), XISEL_MASK, PPCISEL, { RT, RA, RB, CRB } },
+{ "mfocrf", XFXM(31,19,0,1), XFXFXM_MASK, COM, { RT, FXM } },
{ "mfcr", X(31,19), XRARB_MASK, NOPOWER4, { RT } },
{ "mfcr", X(31,19), XFXFXM_MASK, POWER4, { RT, FXM4 } },
@@ -3252,8 +3271,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwzxe", X(31,31), X_MASK, BOOKE64, { RT, RA0, RB } },
-{ "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
-{ "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmplw", XOPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpld", XOPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
{ "cmpl", X(31,32), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmpl", X(31,32), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
@@ -3371,7 +3390,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dcbtstlse",X(31,142),X_MASK, PPCCHLK64, { CT, RA, RB }},
-{ "mtcr", XFXM(31,144,0xff), XRARB_MASK, COM, { RS }},
+{ "mtocrf", XFXM(31,144,0,1), XFXFXM_MASK, COM, { FXM, RS } },
+{ "mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, { RS }},
{ "mtcrf", X(31,144), XFXFXM_MASK, COM, { FXM, RS } },
{ "mtmsr", X(31,146), XRARB_MASK, COM, { RS } },
@@ -4303,6 +4323,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbli", X(31,1010), XRTRA_MASK, PPC, { RB } },
+{ "dcbzl", XOPL(31,1014,1), XRT_MASK,POWER4, { RA, RB } },
{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index be08c829dd7..960a4ccefbf 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -726,8 +726,8 @@ e3000000001a algf RXY_RRRD "add logical with long offset 64<32" z990 zarch
e3000000001b slgf RXY_RRRD "subtract logical with long offset 64<32" z990 zarch
e3000000001c msgf RXY_RRRD "multiply single with long offset 64<32" z990 zarch
e3000000001d dsgf RXY_RRRD "divide single 64<32" z990 zarch
-e3000000001e lrv RXY_RRRD "load reversed 32" z990 zarch
-e3000000001f lrvh RXY_RRRD "load reversed 16" z990 zarch
+e3000000001e lrv RXY_RRRD "load reversed 32" z990 esa,zarch
+e3000000001f lrvh RXY_RRRD "load reversed 16" z990 esa,zarch
e30000000020 cg RXY_RRRD "compare with long offset 64" z990 zarch
e30000000021 clg RXY_RRRD "compare logical with long offset 64" z990 zarch
e30000000024 stg RXY_RRRD "store with long offset 64" z990 zarch
@@ -735,7 +735,7 @@ e3000000002e cvdg RXY_RRRD "convert to decimal with long offset 64" z990 zarch
e3000000002f strvg RXY_RRRD "store reversed 64" z990 zarch
e30000000030 cgf RXY_RRRD "compare with long offset 64<32" z990 zarch
e30000000031 clgf RXY_RRRD "compare logical with long offset 64<32" z990 zarch
-e3000000003e strv RXY_RRRD "store reversed 32" z990 zarch
+e3000000003e strv RXY_RRRD "store reversed 32" z990 esa,zarch
e3000000003f strvh RXY_RRRD "store reversed 64" z990 zarch
e30000000046 bctg RXY_RRRD "branch on count 64" z990 zarch
e30000000080 ng RXY_RRRD "and with long offset 64" z990 zarch
@@ -749,10 +749,10 @@ e3000000008e stpq RXY_RRRD "store pair to quadword" z990 zarch
e3000000008f lpq RXY_RRRD "load pair from quadword" z990 zarch
e30000000090 llgc RXY_RRRD "load logical character" z990 zarch
e30000000091 llgh RXY_RRRD "load logical halfword" z990 zarch
-e30000000096 ml RXY_RRRD "multiply logical 32" z990 zarch
-e30000000097 dl RXY_RRRD "divide logical 32" z990 zarch
-e30000000098 alc RXY_RRRD "add logical with carry 32" z990 zarch
-e30000000099 slb RXY_RRRD "subtract logical with borrow 32" z990 zarch
+e30000000096 ml RXY_RRRD "multiply logical 32" z990 esa,zarch
+e30000000097 dl RXY_RRRD "divide logical 32" z990 esa,zarch
+e30000000098 alc RXY_RRRD "add logical with carry 32" z990 esa,zarch
+e30000000099 slb RXY_RRRD "subtract logical with borrow 32" z990 esa,zarch
eb0000000004 lmg RSY_RRRD "load multiple with long offset 64" z990 zarch
eb000000000a srag RSY_RRRD "shift right single 64" z990 zarch
eb000000000b slag RSY_RRRD "shift left single 64" z990 zarch
@@ -760,7 +760,7 @@ eb000000000c srlg RSY_RRRD "shift right single logical 64" z990 zarch
eb000000000d sllg RSY_RRRD "shift left single logical 64" z990 zarch
eb000000000f tracg RSY_RRRD "trace 64" z990 zarch
eb000000001c rllg RSY_RRRD "rotate left single logical 64" z990 zarch
-eb000000001d rll RSY_RRRD "rotate left single logical 32" z990 zarch
+eb000000001d rll RSY_RRRD "rotate left single logical 32" z990 esa,zarch
eb0000000020 clmh RSY_RURD "compare logical characters under mask high with long offset" z990 zarch
eb0000000024 stmg RSY_RRRD "store multiple with long offset 64" z990 zarch
eb0000000025 stctg RSY_RRRD "store control 64" z990 zarch
@@ -772,7 +772,7 @@ eb000000003e cdsg RSY_RRRD "compare double and swap with long offset 64" z990 za
eb0000000044 bxhg RSY_RRRD "branch on index high 64" z990 zarch
eb0000000045 bxleg RSY_RRRD "branch on index low or equal 64" z990 zarch
eb0000000080 icmh RSY_RURD "insert characters under mask high with long offset" z990 zarch
-eb000000008e mvclu RSY_RRRD "move long unicode" z990 zarch
+eb000000008e mvclu RSY_RRRD "move long unicode" z990 esa,zarch
eb000000008f clclu RSY_RRRD "compare logical long unicode with long offset" z990 zarch
eb0000000096 lmh RSY_RRRD "load multiple high" z990 zarch
# new z990 instructions
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 840823e0206..34e84d2940a 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -390,6 +390,8 @@ print_insn_ppi (field_b, info)
fprintf_fn (stream, ".word 0x%x", field_b);
}
+/* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff
+ (ie. the upper nibble is missing). */
int
print_insn_sh (memaddr, info)
bfd_vma memaddr;
@@ -398,11 +400,12 @@ print_insn_sh (memaddr, info)
fprintf_ftype fprintf_fn = info->fprintf_func;
void *stream = info->stream;
unsigned char insn[4];
- unsigned char nibs[4];
+ unsigned char nibs[8];
int status;
bfd_vma relmask = ~(bfd_vma) 0;
const sh_opcode_info *op;
- int target_arch;
+ unsigned int target_arch;
+ int allow_op32;
switch (info->mach)
{
@@ -415,40 +418,6 @@ print_insn_sh (memaddr, info)
&& bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
target_arch = arch_sh4;
break;
- case bfd_mach_sh2:
- target_arch = arch_sh2;
- break;
- case bfd_mach_sh2e:
- target_arch = arch_sh2e;
- break;
- case bfd_mach_sh_dsp:
- target_arch = arch_sh_dsp;
- break;
- case bfd_mach_sh3:
- target_arch = arch_sh3;
- break;
- case bfd_mach_sh3_dsp:
- target_arch = arch_sh3_dsp;
- break;
- case bfd_mach_sh3e:
- target_arch = arch_sh3e;
- break;
- case bfd_mach_sh4_nofpu:
- target_arch = arch_sh4_nofpu;
- break;
- case bfd_mach_sh4:
- target_arch = arch_sh4;
- break;
- case bfd_mach_sh4a:
- case bfd_mach_sh4a_nofpu:
- target_arch = arch_sh4a;
- break;
- case bfd_mach_sh4al_dsp:
- target_arch = arch_sh4al_dsp;
- break;
- case bfd_mach_sh4_nommu_nofpu:
- target_arch = arch_sh4_nommu_nofpu;
- break;
case bfd_mach_sh5:
#ifdef INCLUDE_SHMEDIA
status = print_insn_sh64 (memaddr, info);
@@ -460,7 +429,7 @@ print_insn_sh (memaddr, info)
target_arch = arch_sh4;
break;
default:
- abort ();
+ target_arch = sh_get_arch_from_bfd_mach (info->mach);
}
status = info->read_memory_func (memaddr, insn, 2, info);
@@ -487,8 +456,33 @@ print_insn_sh (memaddr, info)
nibs[2] = (insn[1] >> 4) & 0xf;
nibs[3] = insn[1] & 0xf;
}
+ status = info->read_memory_func (memaddr + 2, insn + 2, 2, info);
+ if (status != 0)
+ allow_op32 = 0;
+ else
+ {
+ allow_op32 = 1;
+
+ if (info->endian == BFD_ENDIAN_LITTLE)
+ {
+ nibs[4] = (insn[3] >> 4) & 0xf;
+ nibs[5] = insn[3] & 0xf;
- if (nibs[0] == 0xf && (nibs[1] & 4) == 0 && target_arch & arch_sh_dsp_up)
+ nibs[6] = (insn[2] >> 4) & 0xf;
+ nibs[7] = insn[2] & 0xf;
+ }
+ else
+ {
+ nibs[4] = (insn[2] >> 4) & 0xf;
+ nibs[5] = insn[2] & 0xf;
+
+ nibs[6] = (insn[3] >> 4) & 0xf;
+ nibs[7] = insn[3] & 0xf;
+ }
+ }
+
+ if (nibs[0] == 0xf && (nibs[1] & 4) == 0
+ && SH_MERGE_ARCH_SET_VALID (target_arch, arch_sh_dsp_up))
{
if (nibs[1] & 8)
{
@@ -523,10 +517,17 @@ print_insn_sh (memaddr, info)
int rb = 0;
int disp_pc;
bfd_vma disp_pc_addr = 0;
+ int disp = 0;
+ int has_disp = 0;
+ int max_n = SH_MERGE_ARCH_SET (op->arch, arch_op32) ? 8 : 4;
+
+ if (!allow_op32
+ && SH_MERGE_ARCH_SET (op->arch, arch_op32))
+ goto fail;
- if ((op->arch & target_arch) == 0)
+ if (!SH_MERGE_ARCH_SET_VALID (op->arch, target_arch))
goto fail;
- for (n = 0; n < 4; n++)
+ for (n = 0; n < max_n; n++)
{
int i = op->nibbles[n];
@@ -550,6 +551,64 @@ print_insn_sh (memaddr, info)
imm |= ~0xfff;
imm = imm * 2 + 4;
goto ok;
+ case IMM0_3c:
+ if (nibs[3] & 0x8)
+ goto fail;
+ imm = nibs[3] & 0x7;
+ break;
+ case IMM0_3s:
+ if (!(nibs[3] & 0x8))
+ goto fail;
+ imm = nibs[3] & 0x7;
+ break;
+ case IMM0_3Uc:
+ if (nibs[2] & 0x8)
+ goto fail;
+ imm = nibs[2] & 0x7;
+ break;
+ case IMM0_3Us:
+ if (!(nibs[2] & 0x8))
+ goto fail;
+ imm = nibs[2] & 0x7;
+ break;
+ case DISP0_12:
+ case DISP1_12:
+ disp = (nibs[5] << 8) | (nibs[6] << 4) | nibs[7];
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY2:
+ case DISP1_12BY2:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 1;
+ relmask = ~(bfd_vma) 1;
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY4:
+ case DISP1_12BY4:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 2;
+ relmask = ~(bfd_vma) 3;
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY8:
+ case DISP1_12BY8:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 3;
+ relmask = ~(bfd_vma) 7;
+ has_disp = 1;
+ goto ok;
+ case IMM0_20_4:
+ break;
+ case IMM0_20:
+ imm = ((nibs[2] << 16) | (nibs[4] << 12) | (nibs[5] << 8)
+ | (nibs[6] << 4) | nibs[7]);
+ if (imm & 0x80000)
+ imm -= 0x100000;
+ goto ok;
+ case IMM0_20BY8:
+ imm = ((nibs[2] << 16) | (nibs[4] << 12) | (nibs[5] << 8)
+ | (nibs[6] << 4) | nibs[7]);
+ imm <<= 8;
+ if (imm & 0x8000000)
+ imm -= 0x10000000;
+ goto ok;
case IMM0_4:
case IMM1_4:
imm = nibs[3];
@@ -565,6 +624,10 @@ print_insn_sh (memaddr, info)
case IMM0_8:
case IMM1_8:
imm = (nibs[2] << 4) | nibs[3];
+ disp = imm;
+ has_disp = 1;
+ if (imm & 0x80)
+ imm -= 0x100;
goto ok;
case PCRELIMM_8BY2:
imm = ((nibs[2] << 4) | nibs[3]) << 1;
@@ -621,6 +684,14 @@ print_insn_sh (memaddr, info)
}
ok:
+ /* sh2a has D_REG but not X_REG. We don't know the pattern
+ doesn't match unless we check the output args to see if they
+ make sense. */
+ if (target_arch == arch_sh2a
+ && ((op->arg[0] == DX_REG_M && (rm & 1) != 0)
+ || (op->arg[1] == DX_REG_N && (rn & 1) != 0)))
+ goto fail;
+
fprintf_fn (stream, "%s\t", op->name);
disp_pc = 0;
for (n = 0; n < 3 && op->arg[n] != A_END; n++)
@@ -630,7 +701,7 @@ print_insn_sh (memaddr, info)
switch (op->arg[n])
{
case A_IMM:
- fprintf_fn (stream, "#%d", (char) (imm));
+ fprintf_fn (stream, "#%d", imm);
break;
case A_R0:
fprintf_fn (stream, "r0");
@@ -651,7 +722,7 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@r%d", rn);
break;
case A_DISP_REG_N:
- fprintf_fn (stream, "@(%d,r%d)", imm, rn);
+ fprintf_fn (stream, "@(%d,r%d)", has_disp?disp:imm, rn);
break;
case AS_PMOD_N:
fprintf_fn (stream, "@r%d+r8", rn);
@@ -669,7 +740,7 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@r%d", rm);
break;
case A_DISP_REG_M:
- fprintf_fn (stream, "@(%d,r%d)", imm, rm);
+ fprintf_fn (stream, "@(%d,r%d)", has_disp?disp:imm, rm);
break;
case A_REG_B:
fprintf_fn (stream, "r%d_bank", rb);
@@ -686,7 +757,19 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@(r0,r%d)", rm);
break;
case A_DISP_GBR:
- fprintf_fn (stream, "@(%d,gbr)", imm);
+ fprintf_fn (stream, "@(%d,gbr)", has_disp?disp:imm);
+ break;
+ case A_TBR:
+ fprintf_fn (stream, "tbr");
+ break;
+ case A_DISP2_TBR:
+ fprintf_fn (stream, "@@(%d,tbr)", has_disp?disp:imm);
+ break;
+ case A_INC_R15:
+ fprintf_fn (stream, "@r15+");
+ break;
+ case A_DEC_R15:
+ fprintf_fn (stream, "@-r15");
break;
case A_R0_GBR:
fprintf_fn (stream, "@(r0,gbr)");
@@ -855,11 +938,17 @@ print_insn_sh (memaddr, info)
else
val = bfd_getb32 (bytes);
}
- fprintf_fn (stream, "\t! 0x%x", val);
+ if ((*info->symbol_at_address_func) (val, info))
+ {
+ fprintf_fn (stream, "\t! 0x");
+ (*info->print_address_func) (val, info);
+ }
+ else
+ fprintf_fn (stream, "\t! 0x%x", val);
}
}
- return 2;
+ return SH_MERGE_ARCH_SET (op->arch, arch_op32) ? 4 : 2;
fail:
;
diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h
index a1877b33ae7..99fb9dca108 100644
--- a/opcodes/sh-opc.h
+++ b/opcodes/sh-opc.h
@@ -16,6 +16,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include "bfd.h"
+
typedef enum
{
HEX_0,
@@ -72,7 +74,22 @@ typedef enum
PPI3NC,
PDC,
PPIC,
- REPEAT
+ REPEAT,
+ IMM0_3c, /* xxxx 0iii */
+ IMM0_3s, /* xxxx 1iii */
+ IMM0_3Uc, /* 0iii xxxx */
+ IMM0_3Us, /* 1iii xxxx */
+ IMM0_20_4,
+ IMM0_20, /* follows IMM0_20_4 */
+ IMM0_20BY8, /* follows IMM0_20_4 */
+ DISP0_12,
+ DISP0_12BY2,
+ DISP0_12BY4,
+ DISP0_12BY8,
+ DISP1_12,
+ DISP1_12BY2,
+ DISP1_12BY4,
+ DISP1_12BY8
}
sh_nibble_type;
@@ -107,6 +124,11 @@ typedef enum
A_REG_B,
A_SR,
A_VBR,
+ A_TBR,
+ A_DISP_TBR,
+ A_DISP2_TBR,
+ A_DEC_R15,
+ A_INC_R15,
A_MOD,
A_RE,
A_RS,
@@ -176,47 +198,134 @@ typedef enum
}
sh_dsp_reg_nums;
-#define arch_sh1 0x0001
-#define arch_sh2 0x0002
-#define arch_sh3 0x0004
-#define arch_sh3e 0x0008
-#define arch_sh4 0x0010
-#define arch_sh2e 0x0020
-#define arch_sh4a 0x0040
-#define arch_sh_dsp 0x0100
-#define arch_sh3_dsp 0x0200
-#define arch_sh4al_dsp 0x0400
-#define arch_sh4_nofpu 0x1000
-#define arch_sh4a_nofpu 0x2000
-#define arch_sh4_nommu_nofpu 0x4000 /* no mmu nor fpu */
-
-#define arch_sh1_up (arch_sh1 | arch_sh2_up)
-#define arch_sh2_up (arch_sh2 | arch_sh2e_up | arch_sh3_up | arch_sh_dsp)
-#define arch_sh2e_up (arch_sh2e | arch_sh3e_up)
-#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp_up \
- | arch_sh4_nommu_nofpu_up)
+#define arch_sh1_base 0x0001
+#define arch_sh2_base 0x0002
+#define arch_sh3_base 0x0004
+#define arch_sh4_base 0x0008
+#define arch_sh4a_base 0x0010
+#define arch_sh2a_base 0x0020
+
+/* This is an annotation on instruction types, but we abuse the arch
+ field in instructions to denote it. */
+#define arch_op32 0x00100000 /* This is a 32-bit opcode. */
+
+#define arch_sh_no_mmu 0x04000000
+#define arch_sh_has_mmu 0x08000000
+#define arch_sh_no_co 0x10000000 /* neither FPU nor DSP co-processor */
+#define arch_sh_sp_fpu 0x20000000 /* single precision FPU */
+#define arch_sh_dp_fpu 0x40000000 /* double precision FPU */
+#define arch_sh_has_dsp 0x80000000
+
+
+#define arch_sh_base_mask 0x0000003f
+#define arch_opann_mask 0x00100000
+#define arch_sh_mmu_mask 0x0c000000
+#define arch_sh_co_mask 0xf0000000
+
+
+#define arch_sh1 (arch_sh1_base|arch_sh_no_mmu|arch_sh_no_co)
+#define arch_sh2 (arch_sh2_base|arch_sh_no_mmu|arch_sh_no_co)
+#define arch_sh2a (arch_sh2a_base|arch_sh_no_mmu|arch_sh_dp_fpu)
+#define arch_sh2a_nofpu (arch_sh2a_base|arch_sh_no_mmu|arch_sh_no_co)
+#define arch_sh2e (arch_sh2_base|arch_sh2a_base|arch_sh_no_mmu|arch_sh_sp_fpu)
+#define arch_sh_dsp (arch_sh2_base|arch_sh_no_mmu|arch_sh_has_dsp)
+#define arch_sh3_nommu (arch_sh3_base|arch_sh_no_mmu|arch_sh_no_co)
+#define arch_sh3 (arch_sh3_base|arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh3e (arch_sh3_base|arch_sh_has_mmu|arch_sh_sp_fpu)
+#define arch_sh3_dsp (arch_sh3_base|arch_sh_has_mmu|arch_sh_has_dsp)
+#define arch_sh4 (arch_sh4_base|arch_sh_has_mmu|arch_sh_dp_fpu)
+#define arch_sh4a (arch_sh4a_base|arch_sh_has_mmu|arch_sh_dp_fpu)
+#define arch_sh4al_dsp (arch_sh4a_base|arch_sh_has_mmu|arch_sh_has_dsp)
+#define arch_sh4_nofpu (arch_sh4_base|arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh4a_nofpu (arch_sh4a_base|arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh4_nommu_nofpu (arch_sh4_base|arch_sh_no_mmu|arch_sh_no_co)
+
+#define SH_MERGE_ARCH_SET(SET1, SET2) ((SET1) & (SET2))
+#define SH_VALID_BASE_ARCH_SET(SET) (((SET) & arch_sh_base_mask) != 0)
+#define SH_VALID_MMU_ARCH_SET(SET) (((SET) & arch_sh_mmu_mask) != 0)
+#define SH_VALID_CO_ARCH_SET(SET) (((SET) & arch_sh_co_mask) != 0)
+#define SH_VALID_ARCH_SET(SET) \
+ (SH_VALID_BASE_ARCH_SET (SET) \
+ && SH_VALID_MMU_ARCH_SET (SET) \
+ && SH_VALID_CO_ARCH_SET (SET))
+#define SH_MERGE_ARCH_SET_VALID(SET1, SET2) \
+ SH_VALID_ARCH_SET (SH_MERGE_ARCH_SET (SET1, SET2))
+
+#define SH_ARCH_SET_HAS_FPU(SET) \
+ (((SET) & (arch_sh_sp_fpu | arch_sh_dp_fpu)) != 0)
+#define SH_ARCH_SET_HAS_DSP(SET) \
+ (((SET) & arch_sh_has_dsp) != 0)
+
+/* This is returned from the functions below when an error occurs
+ (in addition to a call to BFD_FAIL). The value should allow
+ the tools to continue to function in most cases - there may
+ be some confusion between DSP and FPU etc. */
+#define SH_ARCH_UNKNOWN_ARCH 0xffffffff
+
+/* These are defined in bfd/cpu-sh.c . */
+unsigned int sh_get_arch_from_bfd_mach (unsigned long mach);
+unsigned int sh_get_arch_up_from_bfd_mach (unsigned long mach);
+unsigned long sh_get_bfd_mach_from_arch_set (unsigned int arch_set);
+bfd_boolean sh_merge_bfd_arch (bfd *ibfd, bfd *obfd);
+
+/* Below are the 'architecture sets'.
+ They describe the following inheritance graph:
+
+ SH1
+ |
+ SH2
+ .------------'|`--------------------.
+ / | \
+SH-DSP SH3-nommu SH2E
+ | |`--------. |
+ | | \ |
+ | SH3 SH4-nommu-nofpu |
+ | | | |
+ | .------------'|`----------+---------. |
+ |/ / \|
+ | | .-------' |
+ | |/ |
+SH3-dsp SH4-nofpu SH3E
+ | |`--------------------. |
+ | | \|
+ | SH4A-nofpu SH4
+ | .------------' `--------------------. |
+ |/ \|
+SH4AL-dsp SH4A
+
+*/
+
+/* Central branches */
+#define arch_sh1_up (arch_sh1 | arch_sh2_up)
+#define arch_sh2_up (arch_sh2 | arch_sh2e_up | arch_sh2a_nofpu_up | arch_sh3_nommu_up | arch_sh_dsp_up)
+#define arch_sh3_nommu_up (arch_sh3_nommu | arch_sh3_up | arch_sh4_nommu_nofpu_up)
+#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp_up | arch_sh4_nofp_up)
+#define arch_sh4_nommu_nofpu_up (arch_sh4_nommu_nofpu | arch_sh4_nofp_up)
+#define arch_sh4_nofp_up (arch_sh4_nofpu | arch_sh4_up | arch_sh4a_nofp_up)
+#define arch_sh4a_nofp_up (arch_sh4a_nofpu | arch_sh4a_up | arch_sh4al_dsp_up)
+
+/* Right branch */
+#define arch_sh2e_up (arch_sh2e | arch_sh2a_up | arch_sh3e_up)
#define arch_sh3e_up (arch_sh3e | arch_sh4_up)
#define arch_sh4_up (arch_sh4 | arch_sh4a_up)
#define arch_sh4a_up (arch_sh4a)
-#define arch_sh_dsp_up (arch_sh_dsp | arch_sh3_dsp_up)
-#define arch_sh3_dsp_up (arch_sh3_dsp | arch_sh4al_dsp_up)
+/* Left branch */
+#define arch_sh_dsp_up (arch_sh_dsp | arch_sh3_dsp_up)
+#define arch_sh3_dsp_up (arch_sh3_dsp | arch_sh4al_dsp_up)
#define arch_sh4al_dsp_up (arch_sh4al_dsp)
-#define arch_sh4_nommu_nofpu_up (arch_sh4_nommu_nofpu | arch_sh4_nofp_up)
-
-#define arch_sh4_nofp_up (arch_sh4_nofpu | arch_sh4_up | arch_sh4a_nofp_up)
-#define arch_sh4a_nofp_up (arch_sh4a_nofpu | arch_sh4a_up | arch_sh4al_dsp_up)
+/* SH 2a branched off SH2e, adding a lot but not all of SH4 and SH4a. */
+#define arch_sh2a_up (arch_sh2a)
+#define arch_sh2a_nofpu_up (arch_sh2a_nofpu | arch_sh2a_up)
-#define arch_sh_any_with_mmu (arch_sh3 | arch_sh3e_up | arch_sh3_dsp_up \
- | arch_sh4_nofp_up) /* arch _sh3_up omitting arch_sh4_nommu_nofpu */
typedef struct
{
char *name;
sh_arg_type arg[4];
- sh_nibble_type nibbles[5];
- int arch;
+ sh_nibble_type nibbles[9];
+ unsigned int arch;
} sh_opcode_info;
#ifdef DEFINE_TABLE
@@ -305,6 +414,8 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn00111010 ldc <REG_N>,SGR */{"ldc",{A_REG_N,A_SGR},{HEX_4,REG_N,HEX_3,HEX_A}, arch_sh4_nommu_nofpu_up},
+/* 0100mmmm01001010 ldc <REG_M>,TBR */{"ldc",{A_REG_M,A_TBR},{HEX_4,REG_M,HEX_4,HEX_A}, arch_sh2a_nofpu_up},
+
/* 0100nnnn00101110 ldc <REG_N>,VBR */{"ldc",{A_REG_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_E}, arch_sh1_up},
/* 0100nnnn01011110 ldc <REG_N>,MOD */{"ldc",{A_REG_N,A_MOD},{HEX_4,REG_N,HEX_5,HEX_E}, arch_sh_dsp_up},
@@ -313,13 +424,13 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01101110 ldc <REG_N>,RS */{"ldc",{A_REG_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_E}, arch_sh_dsp_up},
-/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}, arch_sh3_up},
+/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}, arch_sh3_nommu_up},
-/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}, arch_sh3_up},
+/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}, arch_sh3_nommu_up},
/* 0100nnnn11111010 ldc <REG_N>,DBR */{"ldc",{A_REG_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}, arch_sh3_up},
+/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}, arch_sh3_nommu_up},
/* 0100nnnn00000111 ldc.l @<REG_N>+,SR */{"ldc.l",{A_INC_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_7}, arch_sh1_up},
@@ -335,13 +446,13 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100111 ldc.l @<REG_N>+,RS */{"ldc.l",{A_INC_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_7}, arch_sh_dsp_up},
-/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}, arch_sh3_up},
+/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}, arch_sh3_nommu_up},
-/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}, arch_sh3_up},
+/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}, arch_sh3_nommu_up},
/* 0100nnnn11110110 ldc.l @<REG_N>+,DBR */{"ldc.l",{A_INC_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_6}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_up},
+/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_nommu_up},
/* 0100mmmm00110100 ldrc <REG_M> */{"ldrc",{A_REG_M},{HEX_4,REG_M,HEX_3,HEX_4}, arch_sh4al_dsp_up},
/* 10001010i8*1.... ldrc #<imm> */{"ldrc",{A_IMM},{HEX_8,HEX_A,IMM0_8}, arch_sh4al_dsp_up},
@@ -394,7 +505,7 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}, arch_sh2e_up},
-/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}, arch_sh_any_with_mmu},
+/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}, arch_sh3_up},
/* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}, arch_sh1_up},
@@ -422,6 +533,12 @@ const sh_opcode_info sh_table[] =
/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM1_8}, arch_sh1_up},
+/* 0100nnnn10001011 mov.b R0,@<REG_N>+ */{"mov.b",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_8,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11001011 mov.b @-<REG_M>,R0 */{"mov.b",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_C,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0000dddddddddddd mov.b <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.b",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_0,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0100dddddddddddd mov.b @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.b",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_4,DISP0_12}, arch_sh2a_nofpu_up | arch_op32},
/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM1_4BY4}, arch_sh1_up},
/* 0000nnnnmmmm0110 mov.l <REG_M>,@(R0,<REG_N>)*/{"mov.l",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_6}, arch_sh1_up},
@@ -444,6 +561,12 @@ const sh_opcode_info sh_table[] =
/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM1_8BY4}, arch_sh1_up},
+/* 0100nnnn10101011 mov.l R0,@<REG_N>+ */{"mov.l",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_A,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11001011 mov.l @-<REG_M>,R0 */{"mov.l",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0010dddddddddddd mov.l <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.l",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_2,DISP1_12BY4}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0110dddddddddddd mov.l @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_6,DISP0_12BY4}, arch_sh2a_nofpu_up | arch_op32},
/* 0000nnnnmmmm0101 mov.w <REG_M>,@(R0,<REG_N>)*/{"mov.w",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_5}, arch_sh1_up},
/* 0010nnnnmmmm0101 mov.w <REG_M>,@-<REG_N>*/{"mov.w",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_5}, arch_sh1_up},
@@ -466,6 +589,12 @@ const sh_opcode_info sh_table[] =
/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM1_8BY2}, arch_sh1_up},
+/* 0100nnnn10011011 mov.w R0,@<REG_N>+ */{"mov.w",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_9,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11011011 mov.w @-<REG_M>,R0 */{"mov.w",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_D,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0001dddddddddddd mov.w <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.w",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_1,DISP1_12BY2}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0101dddddddddddd mov.w @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.w",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_5,DISP0_12BY2}, arch_sh2a_nofpu_up | arch_op32},
/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}, arch_sh1_up},
/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}, arch_sh4_nommu_nofpu_up},
@@ -505,7 +634,7 @@ const sh_opcode_info sh_table[] =
/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM0_8}, arch_sh1_up},
-/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh4_nommu_nofpu_up},
+/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh4_nommu_nofpu_up | arch_sh2a_nofpu_up},
/* 0000nnnn11010011 prefi @<REG_N> */{"prefi",{A_IND_N},{HEX_0,REG_N,HEX_D,HEX_3}, arch_sh4a_nofp_up},
@@ -535,9 +664,9 @@ const sh_opcode_info sh_table[] =
/* repeat start end #<imm> */{"repeat",{A_DISP_PC,A_DISP_PC,A_IMM},{REPEAT,HEX_2,IMM0_8,HEX_8}, arch_sh_dsp_up},
-/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}, arch_sh3_up},
+/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}, arch_sh3_nommu_up | arch_sh2a_nofpu_up},
-/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}, arch_sh3_up},
+/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}, arch_sh3_nommu_up | arch_sh2a_nofpu_up},
/* 0100nnnn00100000 shal <REG_N> */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}, arch_sh1_up},
@@ -573,15 +702,17 @@ const sh_opcode_info sh_table[] =
/* 0000nnnn01100010 stc RS,<REG_N> */{"stc",{A_RS,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}, arch_sh3_up},
+/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}, arch_sh3_nommu_up},
-/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}, arch_sh3_up},
+/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}, arch_sh3_nommu_up},
/* 0000nnnn00111010 stc SGR,<REG_N> */{"stc",{A_SGR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_A}, arch_sh4_nommu_nofpu_up},
/* 0000nnnn11111010 stc DBR,<REG_N> */{"stc",{A_DBR,A_REG_N},{HEX_0,REG_N,HEX_F,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn1xxx0010 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}, arch_sh3_up},
+/* 0000nnnn1xxx0010 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}, arch_sh3_nommu_up},
+
+/* 0000nnnn01001010 stc TBR,<REG_N> */ {"stc",{A_TBR,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_A}, arch_sh2a_nofpu_up},
/* 0100nnnn00000011 stc.l SR,@-<REG_N> */{"stc.l",{A_SR,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_3}, arch_sh1_up},
@@ -593,9 +724,9 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100011 stc.l RS,@-<REG_N> */{"stc.l",{A_RS,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_3}, arch_sh_dsp_up},
-/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}, arch_sh3_up},
+/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}, arch_sh3_nommu_up},
-/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_up},
+/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_nommu_up},
/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}, arch_sh1_up},
@@ -603,7 +734,7 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn11110010 stc.l DBR,@-<REG_N> */{"stc.l",{A_DBR,A_DEC_N},{HEX_4,REG_N,HEX_F,HEX_2}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn1xxx0011 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}, arch_sh3_up},
+/* 0100nnnn1xxx0011 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}, arch_sh3_nommu_up},
/* 0000nnnn00001010 sts MACH,<REG_N> */{"sts",{A_MACH,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_A}, arch_sh1_up},
@@ -854,23 +985,23 @@ const sh_opcode_info sh_table[] =
{"pswap", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_D,HEX_4}, arch_sh4al_dsp_up},
/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh2e_up},
-/* 1111nnn001011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh4_up},
+/* 1111nnn001011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh2e_up},
-/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh4_up},
+/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh2e_up},
-/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh4_up},
+/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh2e_up},
-/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh4_up},
+/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N_D,HEX_B,HEX_D}, arch_sh4_up},
+/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N_D,HEX_B,HEX_D}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_A,HEX_D}, arch_sh4_up},
+/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_A,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh2e_up},
-/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh4_up},
+/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh4_up | arch_sh2a_up},
/* 1111nnmm11101101 fipr <V_REG_M>,<V_REG_N>*/{"fipr",{V_REG_M,V_REG_N},{HEX_F,REG_NM,HEX_E,HEX_D}, arch_sh4_up},
@@ -881,42 +1012,46 @@ const sh_opcode_info sh_table[] =
/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}, arch_sh2e_up},
/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh2e_up},
-/* 1111nnn000101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh4_up},
+/* 1111nnn000101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}, arch_sh2e_up},
/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh2e_up},
-/* 1111nnn1mmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh4_up},
+/* 1111nnn1mmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
-/* 1111nnn1mmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
+/* 1111nnn1mmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2e_up},
-/* 1111nnnnmmm11010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
+/* 1111nnnnmmm11010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2e_up},
-/* 1111nnn1mmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
+/* 1111nnn1mmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2e_up},
-/* 1111nnnnmmm11011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
+/* 1111nnnnmmm11011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
-/* 1111nnn1mmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
+/* 1111nnn1mmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
-/* 1111nnnnmmm10111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
+/* 1111nnnnmmm10111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnn1mmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
+/* 1111nnn1mmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnnnmmm11010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
+/* 1111nnnnmmm11010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnn1mmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
+/* 1111nnn1mmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnnnmmm11011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
+/* 1111nnnnmmm11011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnn1mmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
+/* 1111nnn1mmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnnnmmm10111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
+/* 1111nnnnmmm10111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up | arch_sh2a_up},
+/* 0011nnnnmmmm0001 0011dddddddddddd fmov.d <F_REG_M>,@(<DISP12>,<REG_N>) */
+{"fmov.d",{DX_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_3,DISP1_12BY8}, arch_sh2a_up | arch_op32},
+/* 0011nnnnmmmm0001 0111dddddddddddd fmov.d @(<DISP12>,<REG_M>),F_REG_N */
+{"fmov.d",{A_DISP_REG_M,DX_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_7,DISP0_12BY8}, arch_sh2a_up | arch_op32},
/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
@@ -929,12 +1064,16 @@ const sh_opcode_info sh_table[] =
/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
+/* 0011nnnnmmmm0001 0011dddddddddddd fmov.s <F_REG_M>,@(<DISP12>,<REG_N>) */
+{"fmov.s",{F_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_3,DISP1_12BY4}, arch_sh2a_up | arch_op32},
+/* 0011nnnnmmmm0001 0111dddddddddddd fmov.s @(<DISP12>,<REG_M>),F_REG_N */
+{"fmov.s",{A_DISP_REG_M,F_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_7,DISP0_12BY4}, arch_sh2a_up | arch_op32},
/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh2e_up},
-/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh4_up},
+/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnn01001101 fneg <F_REG_N> */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh2e_up},
-/* 1111nnn001001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh4_up},
+/* 1111nnn001001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111011111111101 fpchg */{"fpchg",{0},{HEX_F,HEX_7,HEX_F,HEX_D}, arch_sh4a_up},
@@ -942,23 +1081,77 @@ const sh_opcode_info sh_table[] =
/* 1111nnn011111101 fsca FPUL,<D_REG_N> */{"fsca",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_F,HEX_D}, arch_sh4_up},
-/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}, arch_sh4_up},
+/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}, arch_sh4_up | arch_sh2a_up},
-/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh3e_up},
-/* 1111nnn001101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh4_up},
+/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh3e_up | arch_sh2a_up},
+/* 1111nnn001101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnn01111101 fsrra <F_REG_N> */{"fsrra",{F_REG_N},{HEX_F,REG_N,HEX_7,HEX_D}, arch_sh4_up},
/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}, arch_sh2e_up},
/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh2e_up},
-/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh4_up},
+/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh4_up | arch_sh2a_up},
/* 1111nnnn00111101 ftrc <F_REG_N>,FPUL*/{"ftrc",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh2e_up},
-/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh4_up},
+/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh4_up | arch_sh2a_up},
/* 1111nn0111111101 ftrv XMTRX_M4,<V_REG_n>*/{"ftrv",{XMTRX_M4,V_REG_N},{HEX_F,REG_N_B01,HEX_F,HEX_D}, arch_sh4_up},
+ /* 10000110nnnn0iii bclr #<imm>, <REG_N> */ {"bclr",{A_IMM, A_REG_N},{HEX_8,HEX_6,REG_N,IMM0_3c}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0000dddddddddddd bclr.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bclr.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_0,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000111nnnn1iii bld #<imm>, <REG_N> */ {"bld",{A_IMM, A_REG_N},{HEX_8,HEX_7,REG_N,IMM0_3s}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0011dddddddddddd bld.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bld.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_3,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000110nnnn1iii bset #<imm>, <REG_N> */ {"bset",{A_IMM, A_REG_N},{HEX_8,HEX_6,REG_N,IMM0_3s}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0001dddddddddddd bset.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bset.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_1,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000111nnnn0iii bst #<imm>, <REG_N> */ {"bst",{A_IMM, A_REG_N},{HEX_8,HEX_7,REG_N,IMM0_3c}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0010dddddddddddd bst.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bst.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_2,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 0100nnnn10010001 clips.b <REG_N> */ {"clips.b",{A_REG_N},{HEX_4,REG_N,HEX_9,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10010101 clips.w <REG_N> */ {"clips.w",{A_REG_N},{HEX_4,REG_N,HEX_9,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000001 clipu.b <REG_N> */ {"clipu.b",{A_REG_N},{HEX_4,REG_N,HEX_8,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000101 clipu.w <REG_N> */ {"clipu.w",{A_REG_N},{HEX_4,REG_N,HEX_8,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10010100 divs R0,<REG_N> */ {"divs",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_9,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000100 divu R0,<REG_N> */ {"divu",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_8,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0100mmmm01001011 jsr/n @<REG_M> */ {"jsr/n",{A_IND_M},{HEX_4,REG_M,HEX_4,HEX_B}, arch_sh2a_nofpu_up},
+ /* 10000011dddddddd jsr/n @@(<disp>,TBR) */ {"jsr/n",{A_DISP2_TBR},{HEX_8,HEX_3,IMM0_8BY4}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11100101 ldbank @<REG_M>,R0 */ {"ldbank",{A_IND_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110001 movml.l <REG_M>,@-R15 */ {"movml.l",{A_REG_M,A_DEC_R15},{HEX_4,REG_M,HEX_F,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110101 movml.l @R15+,<REG_M> */ {"movml.l",{A_INC_R15,A_REG_M},{HEX_4,REG_M,HEX_F,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110000 movml.l <REG_M>,@-R15 */ {"movmu.l",{A_REG_M,A_DEC_R15},{HEX_4,REG_M,HEX_F,HEX_0}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110100 movml.l @R15+,<REG_M> */ {"movmu.l",{A_INC_R15,A_REG_M},{HEX_4,REG_M,HEX_F,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0000nnnn00111001 movrt <REG_N> */ {"movrt",{A_REG_N},{HEX_0,REG_N,HEX_3,HEX_9}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000000 mulr R0,<REG_N> */ {"mulr",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_8,HEX_0}, arch_sh2a_nofpu_up},
+ /* 0000000001101000 nott */ {"nott",{A_END},{HEX_0,HEX_0,HEX_6,HEX_8}, arch_sh2a_nofpu_up},
+ /* 0000000001011011 resbank */ {"resbank",{A_END},{HEX_0,HEX_0,HEX_5,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0000000001101011 rts/n */ {"rts/n",{A_END},{HEX_0,HEX_0,HEX_6,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0000mmmm01111011 rtv/n <REG_M>*/ {"rtv/n",{A_REG_M},{HEX_0,REG_M,HEX_7,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0100nnnn11100001 stbank R0,@<REG_N>*/ {"stbank",{A_R0,A_IND_N},{HEX_4,REG_N,HEX_E,HEX_1}, arch_sh2a_nofpu_up},
+
+/* 0011nnnn0iii1001 0100dddddddddddd band.b #<imm>,@(<DISP12>,<REG_N>) */
+{"band.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_4,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1100dddddddddddd bandnot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bandnot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_C,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1011dddddddddddd bldnot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bldnot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_B,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 0101dddddddddddd bor.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bor.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_5,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1101dddddddddddd bornot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bornot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_D,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 0110dddddddddddd bxor.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bxor.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_6,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0000nnnniiii0000 iiiiiiiiiiiiiiii movi20 #<imm>,<REG_N> */
+{"movi20",{A_IMM,A_REG_N},{HEX_0,REG_N,IMM0_20_4,HEX_0,IMM0_20}, arch_sh2a_nofpu_up | arch_op32},
+/* 0000nnnniiii0001 iiiiiiiiiiiiiiii movi20s #<imm>,<REG_N> */
+{"movi20s",{A_IMM,A_REG_N},{HEX_0,REG_N,IMM0_20_4,HEX_1,IMM0_20BY8}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 1000dddddddddddd movu.b @(<DISP12>,<REG_M>),<REG_N> */
+{"movu.b",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_8,DISP0_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 1001dddddddddddd movu.w @(<DISP12>,<REG_M>),<REG_N> */
+{"movu.w",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_9,DISP0_12BY2}, arch_sh2a_nofpu_up | arch_op32},
+
{ 0, {0}, {0}, 0 }
};
diff --git a/opcodes/sparc-opc.c b/opcodes/sparc-opc.c
index 22f18fadb5d..94708988eaf 100644
--- a/opcodes/sparc-opc.c
+++ b/opcodes/sparc-opc.c
@@ -1273,110 +1273,72 @@ cond ("bz", "tz", CONDZ, F_CONDBR|F_ALIAS), /* for e */
#define FM_DF 2 /* v9 */
#define FM_QF 3 /* v9 */
-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags, v9 }
+#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags, v9 }
-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
+#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
/* FIXME: use fmovicc/fmovfcc? */ /* v9 */
-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
-
-/* v9 */ fmovcc ("fmovda", FM_DF, CONDA, FCONDA, 0),
-/* v9 */ fmovcc ("fmovqa", FM_QF, CONDA, FCONDA, 0),
-/* v9 */ fmovcc ("fmovsa", FM_SF, CONDA, FCONDA, 0),
-/* v9 */ fmovicc ("fmovdcc", FM_DF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovqcc", FM_QF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovscc", FM_SF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovdcs", FM_DF, CONDCS, 0),
-/* v9 */ fmovicc ("fmovqcs", FM_QF, CONDCS, 0),
-/* v9 */ fmovicc ("fmovscs", FM_SF, CONDCS, 0),
-/* v9 */ fmovcc ("fmovde", FM_DF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovqe", FM_QF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovse", FM_SF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovdg", FM_DF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovqg", FM_QF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovsg", FM_SF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovdge", FM_DF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovcc ("fmovqge", FM_QF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovcc ("fmovsge", FM_SF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovicc ("fmovdgeu", FM_DF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovqgeu", FM_QF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovsgeu", FM_SF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovdgu", FM_DF, CONDGU, 0),
-/* v9 */ fmovicc ("fmovqgu", FM_QF, CONDGU, 0),
-/* v9 */ fmovicc ("fmovsgu", FM_SF, CONDGU, 0),
-/* v9 */ fmovcc ("fmovdl", FM_DF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovql", FM_QF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovsl", FM_SF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovdle", FM_DF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovcc ("fmovqle", FM_QF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovcc ("fmovsle", FM_SF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovicc ("fmovdleu", FM_DF, CONDLEU, 0),
-/* v9 */ fmovicc ("fmovqleu", FM_QF, CONDLEU, 0),
-/* v9 */ fmovicc ("fmovsleu", FM_SF, CONDLEU, 0),
-/* v9 */ fmovfcc ("fmovdlg", FM_DF, FCONDLG, 0),
-/* v9 */ fmovfcc ("fmovqlg", FM_QF, FCONDLG, 0),
-/* v9 */ fmovfcc ("fmovslg", FM_SF, FCONDLG, 0),
-/* v9 */ fmovicc ("fmovdlu", FM_DF, CONDLU, F_ALIAS),
-/* v9 */ fmovicc ("fmovqlu", FM_QF, CONDLU, F_ALIAS),
-/* v9 */ fmovicc ("fmovslu", FM_SF, CONDLU, F_ALIAS),
-/* v9 */ fmovcc ("fmovdn", FM_DF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovqn", FM_QF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovsn", FM_SF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovdne", FM_DF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovcc ("fmovqne", FM_QF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovcc ("fmovsne", FM_SF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovicc ("fmovdneg", FM_DF, CONDNEG, 0),
-/* v9 */ fmovicc ("fmovqneg", FM_QF, CONDNEG, 0),
-/* v9 */ fmovicc ("fmovsneg", FM_SF, CONDNEG, 0),
-/* v9 */ fmovcc ("fmovdnz", FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovqnz", FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovsnz", FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovfcc ("fmovdo", FM_DF, FCONDO, 0),
-/* v9 */ fmovfcc ("fmovqo", FM_QF, FCONDO, 0),
-/* v9 */ fmovfcc ("fmovso", FM_SF, FCONDO, 0),
-/* v9 */ fmovicc ("fmovdpos", FM_DF, CONDPOS, 0),
-/* v9 */ fmovicc ("fmovqpos", FM_QF, CONDPOS, 0),
-/* v9 */ fmovicc ("fmovspos", FM_SF, CONDPOS, 0),
-/* v9 */ fmovfcc ("fmovdu", FM_DF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovqu", FM_QF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovsu", FM_SF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovdue", FM_DF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovque", FM_QF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovsue", FM_SF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovdug", FM_DF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovqug", FM_QF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovsug", FM_SF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovduge", FM_DF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovquge", FM_QF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovsuge", FM_SF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovdul", FM_DF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovqul", FM_QF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovsul", FM_SF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovdule", FM_DF, FCONDULE, 0),
-/* v9 */ fmovfcc ("fmovqule", FM_QF, FCONDULE, 0),
-/* v9 */ fmovfcc ("fmovsule", FM_SF, FCONDULE, 0),
-/* v9 */ fmovicc ("fmovdvc", FM_DF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovqvc", FM_QF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovsvc", FM_SF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovdvs", FM_DF, CONDVS, 0),
-/* v9 */ fmovicc ("fmovqvs", FM_QF, CONDVS, 0),
-/* v9 */ fmovicc ("fmovsvs", FM_SF, CONDVS, 0),
-/* v9 */ fmovcc ("fmovdz", FM_DF, CONDZ, FCONDZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovqz", FM_QF, CONDZ, FCONDZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovsz", FM_SF, CONDZ, FCONDZ, F_ALIAS),
-
+#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
+
+#define fmovicc(suffix, cond, flags) /* v9 */ \
+fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags), \
+fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags), \
+fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
+
+#define fmovfcc(suffix, fcond, flags) /* v9 */ \
+fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags), \
+fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags), \
+fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
+
+#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
+fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags), \
+fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags), \
+fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
+
+/* v9 */ fmovcc ("a", CONDA, FCONDA, 0),
+/* v9 */ fmovicc ("cc", CONDCC, 0),
+/* v9 */ fmovicc ("cs", CONDCS, 0),
+/* v9 */ fmovcc ("e", CONDE, FCONDE, 0),
+/* v9 */ fmovcc ("g", CONDG, FCONDG, 0),
+/* v9 */ fmovcc ("ge", CONDGE, FCONDGE, 0),
+/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
+/* v9 */ fmovicc ("gu", CONDGU, 0),
+/* v9 */ fmovcc ("l", CONDL, FCONDL, 0),
+/* v9 */ fmovcc ("le", CONDLE, FCONDLE, 0),
+/* v9 */ fmovicc ("leu", CONDLEU, 0),
+/* v9 */ fmovfcc ("lg", FCONDLG, 0),
+/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
+/* v9 */ fmovcc ("n", CONDN, FCONDN, 0),
+/* v9 */ fmovcc ("ne", CONDNE, FCONDNE, 0),
+/* v9 */ fmovicc ("neg", CONDNEG, 0),
+/* v9 */ fmovcc ("nz", CONDNZ, FCONDNZ, F_ALIAS),
+/* v9 */ fmovfcc ("o", FCONDO, 0),
+/* v9 */ fmovicc ("pos", CONDPOS, 0),
+/* v9 */ fmovfcc ("u", FCONDU, 0),
+/* v9 */ fmovfcc ("ue", FCONDUE, 0),
+/* v9 */ fmovfcc ("ug", FCONDUG, 0),
+/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
+/* v9 */ fmovfcc ("ul", FCONDUL, 0),
+/* v9 */ fmovfcc ("ule", FCONDULE, 0),
+/* v9 */ fmovicc ("vc", CONDVC, 0),
+/* v9 */ fmovicc ("vs", CONDVS, 0),
+/* v9 */ fmovcc ("z", CONDZ, FCONDZ, F_ALIAS),
+
+#undef fmoviccx /* v9 */
+#undef fmovfccx /* v9 */
+#undef fmovccx /* v9 */
#undef fmovicc /* v9 */
#undef fmovfcc /* v9 */
#undef fmovcc /* v9 */
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 6447e219679..6dc94a512a0 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * armemu.c: Rename ui_loop_hook to deprecated_ui_loop_hook.
+
2003-12-29 Mark Mitchell <mark@codesourcery.com>
* armos.c (fcntl.h): Do not include it.
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c
index d12ad10e41c..b484be49084 100644
--- a/sim/arm/armemu.c
+++ b/sim/arm/armemu.c
@@ -56,7 +56,7 @@ static void Handle_Store_Double (ARMul_State *, ARMword);
static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
/* Actual hook to call to run through gdb's gui event loop. */
-extern int (*ui_loop_hook) (int);
+extern int (*deprecated_ui_loop_hook) (int);
#endif /* NEED_UI_LOOP_HOOK */
extern int stop_simulator;
@@ -3564,10 +3564,10 @@ check_PMUintr:
#endif
#ifdef NEED_UI_LOOP_HOOK
- if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
+ if (deprecated_ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
{
ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
- ui_loop_hook (0);
+ deprecated_ui_loop_hook (0);
}
#endif /* NEED_UI_LOOP_HOOK */
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index d287cdfe245..0099da089e5 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,54 @@
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ Problem from Olaf Hering <olh@suse.de>.
+ * Makefile.in (install-man, installdirs): Add DESTDIR prefix.
+
+2004-07-10 Ben Elliston <bje@au.ibm.com>
+
+ * hw-tree.c (parse_integer_property): Typo fix in comments.
+ * sim-options.c (sim_args_command): Likewise.
+
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * run.c: Rename ui_loop_hook to deprecated_ui_loop_hook.
+
+2004-06-27 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * callback.c (os_shutdown): Fix bug in last change: actually
+ mark file descriptors as available on startup.
+
+2004-06-25 J"orn Rennecke <joern.rennecke@superh.com>
+
+ [ include/gdb: * callback.h (host_callback_struct): Replace
+ members fdopen and alwaysopen with fd_buddy. ]
+ * callback.c: Changed all users.
+
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * sim-load.c (sim_load_file): Use bfd_get_section_size
+ instead of bfd_get_section_size_before_reloc.
+
+2004-05-18 Daniel Jacobowitz <dan@debian.org>
+
+ * dv-glue.c (hw_glue_finish): Cast result of sizeof to long before
+ passing it to printf.
+
+2004-05-10 Daniel Jacobowitz <dan@debian.org>
+
+ * callback.c: Update copyright dates.
+ * run.c: Likewise.
+ * sim-basics.h: Likewise.
+ * sim-load.c: Likewise.
+ * syscall.c: Likewise.
+
+2004-05-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * callback.c: Include cconfig.h instead of config.h.
+ * run.c: Likewise.
+ * sim-basics.h: Likewise.
+ * sim-load.c: Likewise.
+ * syscall.c: Likewise.
+
2004-01-16 Ben Elliston <bje@wasabisystems.com>
* Makefile.in (clean): Remove rm -f $(ALL), as $(ALL) is empty.
diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
index 915598c9c43..37c185077b6 100644
--- a/sim/common/Makefile.in
+++ b/sim/common/Makefile.in
@@ -119,10 +119,10 @@ install: install-man
install-man: installdirs
n=`echo run | sed '$(program_transform_name)'`; \
- $(INSTALL_DATA) $(srcdir)/run.1 $(man1dir)/$$n.1
+ $(INSTALL_DATA) $(srcdir)/run.1 $(DESTDIR)$(man1dir)/$$n.1
installdirs:
- $(SHELL) $(srcdir)/../../mkinstalldirs $(man1dir)
+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir)
Makefile: Makefile.in config.status
$(SHELL) ./config.status
diff --git a/sim/common/callback.c b/sim/common/callback.c
index aa2cf076bd3..ca707fc18cd 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -1,5 +1,6 @@
/* Remote target callback routines.
- Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GDB.
@@ -22,7 +23,7 @@
level. */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "cconfig.h"
#endif
#include "ansidecl.h"
#ifdef ANSI_PROTOTYPES
@@ -109,7 +110,7 @@ fdbad (p, fd)
host_callback *p;
int fd;
{
- if (fd < 0 || fd > MAX_CALLBACK_FDS || !p->fdopen[fd])
+ if (fd < 0 || fd > MAX_CALLBACK_FDS || p->fd_buddy[fd] < 0)
{
p->last_errno = EINVAL;
return -1;
@@ -131,13 +132,20 @@ os_close (p, fd)
int fd;
{
int result;
+ int i, next;
result = fdbad (p, fd);
if (result)
return result;
- result = wrap (p, close (fdmap (p, fd)));
- if (result == 0 && !p->alwaysopen[fd])
- p->fdopen[fd] = 0;
+ /* If this file descripter has one or more buddies (originals /
+ duplicates from a dup), just remove it from the circular list. */
+ for (i = fd; (next = p->fd_buddy[i]) != fd; )
+ i = next;
+ if (fd != i)
+ p->fd_buddy[i] = p->fd_buddy[fd];
+ else
+ result = wrap (p, close (fdmap (p, fd)));
+ p->fd_buddy[fd] = -1;
return result;
}
@@ -233,7 +241,7 @@ os_open (p, name, flags)
int i;
for (i = 0; i < MAX_CALLBACK_FDS; i++)
{
- if (!p->fdopen[i])
+ if (p->fd_buddy[i] < 0)
{
int f = open (name, cb_target_to_host_open (p, flags), 0644);
if (f < 0)
@@ -241,7 +249,7 @@ os_open (p, name, flags)
p->last_errno = errno;
return f;
}
- p->fdopen[i] = 1;
+ p->fd_buddy[i] = i;
p->fdmap[i] = f;
return i;
}
@@ -427,13 +435,32 @@ static int
os_shutdown (p)
host_callback *p;
{
- int i;
+ int i, next, j;
for (i = 0; i < MAX_CALLBACK_FDS; i++)
{
- if (p->fdopen[i] && !p->alwaysopen[i]) {
+ int do_close = 1;
+
+ next = p->fd_buddy[i];
+ if (next < 0)
+ continue;
+ do
+ {
+ j = next;
+ if (j == MAX_CALLBACK_FDS)
+ do_close = 0;
+ next = p->fd_buddy[j];
+ p->fd_buddy[j] = -1;
+ /* At the initial call of os_init, we got -1, 0, 0, 0, ... */
+ if (next < 0)
+ {
+ p->fd_buddy[i] = -1;
+ do_close = 0;
+ break;
+ }
+ }
+ while (j != i);
+ if (do_close)
close (p->fdmap[i]);
- p->fdopen[i] = 0;
- }
}
return 1;
}
@@ -448,9 +475,10 @@ os_init (p)
for (i = 0; i < 3; i++)
{
p->fdmap[i] = i;
- p->fdopen[i] = 1;
- p->alwaysopen[i] = 1;
+ p->fd_buddy[i] = i - 1;
}
+ p->fd_buddy[0] = MAX_CALLBACK_FDS;
+ p->fd_buddy[MAX_CALLBACK_FDS] = 2;
p->syscall_map = cb_init_syscall_map;
p->errno_map = cb_init_errno_map;
@@ -579,8 +607,7 @@ host_callback default_callback =
0, /* last errno */
{ 0, }, /* fdmap */
- { 0, }, /* fdopen */
- { 0, }, /* alwaysopen */
+ { -1, }, /* fd_buddy */
0, /* syscall_map */
0, /* errno_map */
diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
index ab04fe737b2..1a94ae6c162 100644
--- a/sim/common/dv-glue.c
+++ b/sim/common/dv-glue.c
@@ -222,7 +222,7 @@ hw_glue_finish (struct hw *me)
hw_abort (me, "at least one reg property size must be nonzero");
if (glue->sizeof_output % sizeof (unsigned_word) != 0)
hw_abort (me, "reg property size must be %ld aligned",
- sizeof (unsigned_word));
+ (long) sizeof (unsigned_word));
/* and the address */
hw_unit_address_to_attach_address (hw_parent (me),
&unit.address,
@@ -231,7 +231,7 @@ hw_glue_finish (struct hw *me)
me);
if (glue->address % (sizeof (unsigned_word) * max_nr_ports) != 0)
hw_abort (me, "reg property address must be %ld aligned",
- sizeof (unsigned_word) * max_nr_ports);
+ (long) (sizeof (unsigned_word) * max_nr_ports));
glue->nr_outputs = glue->sizeof_output / sizeof (unsigned_word);
glue->output = hw_zalloc (me, glue->sizeof_output);
}
diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
index 99303564542..f228c69edec 100644
--- a/sim/common/hw-tree.c
+++ b/sim/common/hw-tree.c
@@ -638,7 +638,7 @@ parse_integer_property (struct hw *current,
{
H2BE (words[i]);
}
- /* perhaphs integer array property is better */
+ /* perhaps integer array property is better */
hw_add_array_property (current, property_name, words,
sizeof(words[0]) * nr_entries);
}
diff --git a/sim/common/run.c b/sim/common/run.c
index 79642007618..a88e404a581 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -1,5 +1,6 @@
/* run front end support for all the simulators.
- Copyright (C) 1992, 93-96, 1997, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004 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
@@ -18,8 +19,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* Steve Chamberlain sac@cygnus.com,
and others at Cygnus. */
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include "cconfig.h"
#include "tconfig.h"
+#endif
#include <signal.h>
#include <stdio.h>
@@ -60,7 +63,7 @@ extern int getopt ();
#ifdef NEED_UI_LOOP_HOOK
/* Gdb foolery. This is only needed for gdb using a gui. */
-int (*ui_loop_hook) PARAMS ((int signo));
+int (*deprecated_ui_loop_hook) PARAMS ((int signo));
#endif
static SIM_DESC sd;
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index be6cb9e90ac..b140566e2bf 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -1,6 +1,6 @@
/* The common simulator framework for GDB, the GNU Debugger.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Andrew Cagney and Red Hat.
@@ -29,7 +29,7 @@
/* Basic configuration */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "cconfig.h"
#endif
/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index 314d2dd173c..5fc4c986c67 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -1,5 +1,5 @@
/* Utility to load a file into the simulator.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2001, 2002, 2004 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
@@ -19,7 +19,9 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
as it is used by simulators that don't use it [though that doesn't mean
to suggest that they shouldn't :-)]. */
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include "cconfig.h"
+#endif
#include "ansidecl.h"
#include <stdio.h> /* for NULL */
#ifdef ANSI_PROTOTYPES
@@ -110,7 +112,7 @@ sim_load_file (sd, myname, callback, prog, prog_bfd, verbose_p, lma_p, do_write)
{
bfd_size_type size;
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
if (size > 0)
{
char *buffer;
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index 94d0de4bd7d..789ec2a6b32 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -898,7 +898,7 @@ sim_args_command (SIM_DESC sd, char *cmd)
{
/* something to do? */
if (cmd == NULL)
- return SIM_RC_OK; /* FIXME - perhaphs help would be better */
+ return SIM_RC_OK; /* FIXME - perhaps help would be better */
if (cmd [0] == '-')
{
@@ -916,7 +916,7 @@ sim_args_command (SIM_DESC sd, char *cmd)
sim_cpu *cpu;
if (argv [0] == NULL)
- return SIM_RC_OK; /* FIXME - perhaphs help would be better */
+ return SIM_RC_OK; /* FIXME - perhaps help would be better */
/* First check for a cpu selector. */
{
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 75121cf2fc4..04dc71e8971 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -1,5 +1,5 @@
/* Remote target system call support.
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GDB.
@@ -25,7 +25,7 @@
supported. */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "cconfig.h"
#endif
#include "ansidecl.h"
#include "libiberty.h"
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index e5aff561989..514acd2146b 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * interp.c (sim_resume): Rename ui_loop_hook to
+ deprecated_ui_loop_hook.
+
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 284a4e144c4..e4bae222eee 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -49,7 +49,7 @@ static INLINE uint8 *map_memory (unsigned phys_addr);
static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
/* Actual hook to call to run through gdb's gui event loop */
-extern int (*ui_loop_hook) PARAMS ((int signo));
+extern int (*deprecated_ui_loop_hook) PARAMS ((int signo));
#endif /* NEED_UI_LOOP_HOOK */
#ifndef INLINE
@@ -1061,10 +1061,10 @@ sim_resume (sd, step, siggnal)
SLOT_FLUSH ();
#ifdef NEED_UI_LOOP_HOOK
- if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
+ if (deprecated_ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
{
ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
- ui_loop_hook (0);
+ deprecated_ui_loop_hook (0);
}
#endif /* NEED_UI_LOOP_HOOK */
}
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 5c7c51ddd5a..2274ca5ef82 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-27 Richard Sandiford <rsandifo@redhat.com>
+
+ * cpu.[ch], arch.[ch], decode.[ch]: Regenerated.
+ * cpuall.h, model.c, sem.c: Regenerated.
+
2004-03-01 Richard Sandiford <rsandifo@redhat.com>
* Makefile.in (SIM_OBJS): Add profile-fr450.o.
diff --git a/sim/frv/arch.c b/sim/frv/arch.c
index de377bd5ac3..a8fc4e9b4db 100644
--- a/sim/frv/arch.c
+++ b/sim/frv/arch.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/arch.h b/sim/frv/arch.h
index 1d8820193a3..685496ba37e 100644
--- a/sim/frv/arch.h
+++ b/sim/frv/arch.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/cpu.c b/sim/frv/cpu.c
index 1b4b4a1ced2..111ec333b60 100644
--- a/sim/frv/cpu.c
+++ b/sim/frv/cpu.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/cpu.h b/sim/frv/cpu.h
index 62572673656..006bb135789 100644
--- a/sim/frv/cpu.h
+++ b/sim/frv/cpu.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/cpuall.h b/sim/frv/cpuall.h
index 44b52b315a7..7923b4a2e05 100644
--- a/sim/frv/cpuall.h
+++ b/sim/frv/cpuall.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/decode.c b/sim/frv/decode.c
index 620cbdfc766..60c27eb836e 100644
--- a/sim/frv/decode.c
+++ b/sim/frv/decode.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/decode.h b/sim/frv/decode.h
index e1f1cd4bea3..cb1e80d639b 100644
--- a/sim/frv/decode.h
+++ b/sim/frv/decode.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/model.c b/sim/frv/model.c
index 17dae3132b3..86f8020d740 100644
--- a/sim/frv/model.c
+++ b/sim/frv/model.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/frv/sem.c b/sim/frv/sem.c
index 0fb30c31837..f609fdf7371 100644
--- a/sim/frv/sem.c
+++ b/sim/frv/sem.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 1996-2004 Free Software Foundation, Inc.
This file is part of the GNU simulators.
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 9938196d7b6..d1a4fa09c8f 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,19 @@
+2004-06-28 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-07-23 Richard Sandiford <rsandifo@redhat.com>
+ * compile.c (sim_resume): Make sure that dst.reg refers to the
+ right register byte in mova/sz.l @(dd,RnL),ERn.
+ 2003-07-21 Richard Sandiford <rsandifo@redhat.com>
+ * compile.c (sim_resume): Zero-extend immediate to muls, mulsu,
+ mulxs, divs and divxs.
+
+ * compile.c (sim_load): Update sd->memory_size.
+
+2004-06-10 Michael Snyder <msnyder@redhat.com>
+
+ Patch submitted by Nitin Yewale <NitinY@KPITCummins.com>.
+ * compile.c (sim_resume): Corrected ANDC operation on EXR for H8S.
+
2004-01-05 Michael Snyder <msnyder@redhat.com>
* compile.c (sim_load): Don't pass a type to bfd_openr.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index ec5f974c7b3..3c11e8263d2 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -2037,7 +2037,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
code->op3.literal = 0;
if (OP_KIND (code->src.type) == OP_INDEXB)
- code->dst.type = X (OP_REG, SB);
+ {
+ code->dst.type = X (OP_REG, SB);
+ code->dst.reg = code->op3.reg + 8;
+ }
else
code->dst.type = X (OP_REG, SW);
}
@@ -2566,7 +2569,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
{
if (h8300smode)
h8_set_exr (sd, (trace << 7) | intMask);
- res = h8_get_exr (sd);
+ rd = h8_get_exr (sd);
}
else
goto illegal;
@@ -3886,13 +3889,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
-
+ ea = SEXTSHORT (ea);
res = SEXTSHORT (ea * SEXTSHORT (rd));
n = res & 0x8000;
@@ -3907,11 +3904,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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;
@@ -3925,11 +3917,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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;
@@ -3985,13 +3972,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
-
+ ea = SEXTCHAR (ea);
res = ea * SEXTCHAR (rd);
n = res & 0x8000;
@@ -4006,13 +3987,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
-
+ ea = SEXTSHORT (ea);
res = ea * SEXTSHORT (rd & 0xffff);
n = res & 0x80000000;
@@ -4103,11 +4078,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
@@ -4129,11 +4099,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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;
@@ -4205,13 +4170,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
+ ea = SEXTCHAR (ea);
if (ea)
{
@@ -4236,12 +4195,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
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);
+ ea = SEXTSHORT (ea);
if (ea)
{
@@ -5096,6 +5050,7 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
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));
/* `msize' must be a power of two. */
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 7c2294cd8c6..8d3db71a114 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,7 @@
+2004-05-18 Daniel Jacobowitz <dan@debian.org>
+
+ * Makefile.in (stamp-xmloop, stamp-2mloop): Use -outfile-suffix.
+
2004-02-04 Andrew Cagney <cagney@redhat.com>
Committed by Andrew Cagney.
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index eb29ab188b9..e2dc82f5a8f 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -1,5 +1,6 @@
# Makefile template for Configure for the m32r simulator
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2004
+# Free Software Foundation, Inc.
# Contributed by Cygnus Support.
#
# This file is part of GDB, the GNU debugger.
@@ -107,9 +108,10 @@ mloopx.c engx.h: stamp-xmloop
stamp-xmloop: $(srcdir)/../common/genmloop.sh mloopx.in Makefile
$(SHELL) $(srccom)/genmloop.sh \
-mono -no-fast -pbb -parallel-write -switch semx-switch.c \
- -cpu m32rxf -infile $(srcdir)/mloopx.in
- $(SHELL) $(srcroot)/move-if-change eng.hin engx.h
- $(SHELL) $(srcroot)/move-if-change mloop.cin mloopx.c
+ -cpu m32rxf -infile $(srcdir)/mloopx.in \
+ -outfile-suffix x
+ $(SHELL) $(srcroot)/move-if-change engx.hin engx.h
+ $(SHELL) $(srcroot)/move-if-change mloopx.cin mloopx.c
touch stamp-xmloop
mloopx.o: mloopx.c semx-switch.c $(M32RXF_INCLUDE_DEPS)
@@ -131,9 +133,10 @@ mloop2.c eng2.h: stamp-2mloop
stamp-2mloop: $(srcdir)/../common/genmloop.sh mloop2.in Makefile
$(SHELL) $(srccom)/genmloop.sh \
-mono -no-fast -pbb -parallel-write -switch sem2-switch.c \
- -cpu m32r2f -infile $(srcdir)/mloop2.in
- $(SHELL) $(srcroot)/move-if-change eng.hin eng2.h
- $(SHELL) $(srcroot)/move-if-change mloop.cin mloop2.c
+ -cpu m32r2f -infile $(srcdir)/mloop2.in \
+ -outfile-suffix 2
+ $(SHELL) $(srcroot)/move-if-change eng2.hin eng2.h
+ $(SHELL) $(srcroot)/move-if-change mloop2.cin mloop2.c
touch stamp-2mloop
mloop2.o: mloop2.c sem2-switch.c $(M32R2F_INCLUDE_DEPS)
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 3d019d76589..341f0af5e7b 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * interp.c (sim_prepare_for_program): Use bfd_get_section_size
+ instead of bfd_get_section_size_before_reloc.
+
2003-08-08 Stephane Carrez <stcarrez@nerim.fr>
* dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index b80bc940089..eed2d2c4ddc 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -1,5 +1,6 @@
/* interp.c -- Simulator for Motorola 68HC11/68HC12
- Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GDB, the GNU debugger.
@@ -386,7 +387,7 @@ sim_prepare_for_program (SIM_DESC sd, bfd* abfd)
{
bfd_size_type size;
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
if (size > 0)
{
bfd_vma lma;
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index be4ce2ac24a..7cf73145549 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,42 @@
+2004-08-18 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in (mipsisa64sb1*-*-*): Add mips3d to sim_igen_machine.
+ * configure: Regenerate.
+
+2004-06-25 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in (sim_m16_machine): Include mipsIII.
+ * configure: Regenerate.
+
+2004-05-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * mips/interp.c (decode_coproc): Sign-extend the address retrieved
+ from COP0_BADVADDR.
+ * mips/sim-main.h (COP0_BADVADDR): Remove a cast.
+
+2004-04-10 Chris Demetriou <cgd@broadcom.com>
+
+ * sb1.igen (DIV.PS, RECIP.PS, RSQRT.PS, SQRT.PS): New.
+
+2004-04-09 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (check_fmt): Remove.
+ (ABS.fmt, ADD.fmt, C.cond.fmta, C.cond.fmtb, CEIL.L.fmt, CEIL.W)
+ (CVT.D.fmt, CVT.L.fmt, CVT.S.fmt, CVT.W.fmt, DIV.fmt, FLOOR.L.fmt)
+ (FLOOR.W.fmt, MADD.fmt, MOV.fmt, MOVtf.fmt, MOVN.fmt, MOVZ.fmt)
+ (MSUB.fmt, MUL.fmt, NEG.fmt, NMADD.fmt, NMSUB.fmt, RECIP.fmt)
+ (ROUND.L.fmt, ROUND.W.fmt, RSQRT.fmt, SQRT.fmt, SUB.fmt)
+ (TRUNC.L.fmt, TRUNC.W): Explicitly specify allowed FPU formats.
+ (check_fmt_p, CEIL.L.fmt, CEIL.W, DIV.fmt, FLOOR.L.fmt)
+ (FLOOR.W.fmt, RECIP.fmt, ROUND.L.fmt, ROUND.W.fmt, RSQRT.fmt)
+ (SQRT.fmt, TRUNC.L.fmt, TRUNC.W): Remove all uses of check_fmt.
+ (C.cnd.fmta): Remove incorrect call to check_fmt_p.
+
+2004-04-09 Chris Demetriou <cgd@broadcom.com>
+
+ * sb1.igen (check_sbx): New function.
+ (PABSDIFF.fmt, PABSDIFC.fmt, PAVG.fmt): Use check_sbx.
+
2004-03-29 Chris Demetriou <cgd@broadcom.com>
Richard Sandiford <rsandifo@redhat.com>
diff --git a/sim/mips/configure b/sim/mips/configure
index a0471b3c752..c5a0bf2cd1c 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -4061,7 +4061,7 @@ fi
#
sim_gen=IGEN
sim_igen_machine="-M mipsIV"
-sim_m16_machine="-M mips16"
+sim_m16_machine="-M mips16,mipsIII"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
sim_mach_default="mips8000"
@@ -4109,7 +4109,7 @@ case "${target}" in
sim_mach_default="mipsisa32"
;;
mipsisa64sb1*-*-*) sim_gen=IGEN
- sim_igen_machine="-M mips64,sb1"
+ sim_igen_machine="-M mips64,mips3d,sb1"
sim_igen_filter="32,64,f"
sim_mach_default="mips_sb1"
;;
diff --git a/sim/mips/configure.in b/sim/mips/configure.in
index 1ea4901f87c..9184b4a0f6f 100644
--- a/sim/mips/configure.in
+++ b/sim/mips/configure.in
@@ -99,7 +99,7 @@ SIM_AC_OPTION_SMP($mips_smp)
#
sim_gen=IGEN
sim_igen_machine="-M mipsIV"
-sim_m16_machine="-M mips16"
+sim_m16_machine="-M mips16,mipsIII"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
sim_mach_default="mips8000"
@@ -147,7 +147,7 @@ case "${target}" in
sim_mach_default="mipsisa32"
;;
mipsisa64sb1*-*-*) sim_gen=IGEN
- sim_igen_machine="-M mips64,sb1"
+ sim_igen_machine="-M mips64,mips3d,sb1"
sim_igen_filter="32,64,f"
sim_mach_default="mips_sb1"
;;
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index f8c14c89ca9..043d76d10d3 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -2102,7 +2102,7 @@ decode_coproc (SIM_DESC sd,
case 8:
/* 8 = BadVAddr R4000 VR4100 VR4300 */
if (code == 0x00)
- GPR[rt] = COP0_BADVADDR;
+ GPR[rt] = (signed_word) (signed_address) COP0_BADVADDR;
else
COP0_BADVADDR = GPR[rt];
break;
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 95ec575c26f..b6a40857f58 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -3643,23 +3643,6 @@
// ReservedInstruction exception if not.
//
-// check_fmt checks that the format is single or double.
-:function:::void:check_fmt:int fmt, instruction_word insn
-*mipsI:
-*mipsII:
-*mipsIII:
-*mipsIV:
-*mipsV:
-*mips32:
-*mips64:
-*vr4100:
-*vr5000:
-*r3900:
-{
- if ((fmt != fmt_single) && (fmt != fmt_double))
- SignalException (ReservedInstruction, insn);
-}
-
// check_fmt_p checks that the format is single, double, or paired single.
:function:::void:check_fmt_p:int fmt, instruction_word insn
*mipsI:
@@ -3673,7 +3656,8 @@
{
/* None of these ISAs support Paired Single, so just fall back to
the single/double check. */
- check_fmt (SD_, fmt, insn);
+ if ((fmt != fmt_single) && (fmt != fmt_double))
+ SignalException (ReservedInstruction, insn);
}
:function:::void:check_fmt_p:int fmt, instruction_word insn
@@ -3780,7 +3764,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,000101:COP1:32,f::ABS.fmt
+010001,10,3.FMT!2!3!4!5!7,00000,5.FS,5.FD,000101:COP1:32,f::ABS.fmt
"abs.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -3801,7 +3785,7 @@
-010001,10,3.FMT,5.FT,5.FS,5.FD,000000:COP1:32,f::ADD.fmt
+010001,10,3.FMT!2!3!4!5!7,5.FT,5.FS,5.FD,000000:COP1:32,f::ADD.fmt
"add.%s<FMT> f<FD>, f<FS>, f<FT>"
*mipsI:
*mipsII:
@@ -3902,7 +3886,7 @@
}
-010001,10,3.FMT,5.FT,5.FS,3.0,00,11,4.COND:COP1:32,f::C.cond.fmta
+010001,10,3.FMT!2!3!4!5!6!7,5.FT,5.FS,3.0,00,11,4.COND:COP1:32,f::C.cond.fmta
"c.%s<COND>.%s<FMT> f<FS>, f<FT>"
*mipsI:
*mipsII:
@@ -3910,12 +3894,11 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt_p (SD_, fmt, instruction_0);
Compare (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt, COND, 0);
TRACE_ALU_RESULT (ValueFCR (31));
}
-010001,10,3.FMT,5.FT,5.FS,3.CC,00,11,4.COND:COP1:32,f::C.cond.fmtb
+010001,10,3.FMT!2!3!4!5!7,5.FT,5.FS,3.CC,00,11,4.COND:COP1:32,f::C.cond.fmtb
"c.%s<COND>.%s<FMT> f<FS>, f<FT>":CC == 0
"c.%s<COND>.%s<FMT> <CC>, f<FS>, f<FT>"
*mipsIV:
@@ -3934,7 +3917,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,001010:COP1:64,f::CEIL.L.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001010:COP1:64,f::CEIL.L.fmt
"ceil.l.%s<FMT> f<FD>, f<FS>"
*mipsIII:
*mipsIV:
@@ -3946,13 +3929,12 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_long, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
fmt_long));
}
-010001,10,3.FMT,00000,5.FS,5.FD,001110:COP1:32,f::CEIL.W
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001110:COP1:32,f::CEIL.W
"ceil.w.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
@@ -3966,7 +3948,6 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_word, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
fmt_word));
}
@@ -4064,7 +4045,7 @@
//
// FIXME: Does not correctly differentiate between mips*
//
-010001,10,3.FMT,00000,5.FS,5.FD,100001:COP1:32,f::CVT.D.fmt
+010001,10,3.FMT!1!2!3!6!7,00000,5.FS,5.FD,100001:COP1:32,f::CVT.D.fmt
"cvt.d.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -4086,7 +4067,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,100101:COP1:64,f::CVT.L.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,100101:COP1:64,f::CVT.L.fmt
"cvt.l.%s<FMT> f<FD>, f<FS>"
*mipsIII:
*mipsIV:
@@ -4120,7 +4101,7 @@
//
// FIXME: Does not correctly differentiate between mips*
//
-010001,10,3.FMT!6,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
+010001,10,3.FMT!0!2!3!6!7,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
"cvt.s.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -4164,7 +4145,7 @@
}
-010001,10,3.FMT!6,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
"cvt.w.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -4186,7 +4167,7 @@
}
-010001,10,3.FMT,5.FT,5.FS,5.FD,000011:COP1:32,f::DIV.fmt
+010001,10,3.FMT!2!3!4!5!6!7,5.FT,5.FS,5.FD,000011:COP1:32,f::DIV.fmt
"div.%s<FMT> f<FD>, f<FS>, f<FT>"
*mipsI:
*mipsII:
@@ -4201,7 +4182,6 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt, Divide (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
}
@@ -4283,7 +4263,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,001011:COP1:64,f::FLOOR.L.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001011:COP1:64,f::FLOOR.L.fmt
"floor.l.%s<FMT> f<FD>, f<FS>"
*mipsIII:
*mipsIV:
@@ -4295,13 +4275,12 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_long, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
fmt_long));
}
-010001,10,3.FMT,00000,5.FS,5.FD,001111:COP1:32,f::FLOOR.W.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001111:COP1:32,f::FLOOR.W.fmt
"floor.w.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
@@ -4315,7 +4294,6 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_word, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
fmt_word));
}
@@ -4408,7 +4386,7 @@
-010011,5.FR,5.FT,5.FS,5.FD,100,3.FMT:COP1X:64,f::MADD.fmt
+010011,5.FR,5.FT,5.FS,5.FD,100,3.FMT!2!3!4!5!7:COP1X:64,f::MADD.fmt
"madd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
@@ -4453,7 +4431,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,000110:COP1:32,f::MOV.fmt
+010001,10,3.FMT!2!3!4!5!7,00000,5.FS,5.FD,000110:COP1:32,f::MOV.fmt
"mov.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -4491,7 +4469,7 @@
// MOVF.fmt
// MOVT.fmt
-010001,10,3.FMT,3.CC,0,1.TF,5.FS,5.FD,010001:COP1:32,f::MOVtf.fmt
+010001,10,3.FMT!2!3!4!5!7,3.CC,0,1.TF,5.FS,5.FD,010001:COP1:32,f::MOVtf.fmt
"mov%s<TF>.%s<FMT> f<FD>, f<FS>, <CC>"
*mipsIV:
*mipsV:
@@ -4520,7 +4498,7 @@
}
-010001,10,3.FMT,5.RT,5.FS,5.FD,010011:COP1:32,f::MOVN.fmt
+010001,10,3.FMT!2!3!4!5!7,5.RT,5.FS,5.FD,010011:COP1:32,f::MOVN.fmt
"movn.%s<FMT> f<FD>, f<FS>, r<RT>"
*mipsIV:
*mipsV:
@@ -4543,7 +4521,7 @@
-010001,10,3.FMT,5.RT,5.FS,5.FD,010010:COP1:32,f::MOVZ.fmt
+010001,10,3.FMT!2!3!4!5!7,5.RT,5.FS,5.FD,010010:COP1:32,f::MOVZ.fmt
"movz.%s<FMT> f<FD>, f<FS>, r<RT>"
*mipsIV:
*mipsV:
@@ -4559,7 +4537,7 @@
}
-010011,5.FR,5.FT,5.FS,5.FD,101,3.FMT:COP1X:64,f::MSUB.fmt
+010011,5.FR,5.FT,5.FS,5.FD,101,3.FMT!2!3!4!5!7:COP1X:64,f::MSUB.fmt
"msub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
@@ -4604,7 +4582,7 @@
}
-010001,10,3.FMT,5.FT,5.FS,5.FD,000010:COP1:32,f::MUL.fmt
+010001,10,3.FMT!2!3!4!5!7,5.FT,5.FS,5.FD,000010:COP1:32,f::MUL.fmt
"mul.%s<FMT> f<FD>, f<FS>, f<FT>"
*mipsI:
*mipsII:
@@ -4624,7 +4602,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,000111:COP1:32,f::NEG.fmt
+010001,10,3.FMT!2!3!4!5!7,00000,5.FS,5.FD,000111:COP1:32,f::NEG.fmt
"neg.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
@@ -4644,7 +4622,7 @@
}
-010011,5.FR,5.FT,5.FS,5.FD,110,3.FMT:COP1X:64,f::NMADD.fmt
+010011,5.FR,5.FT,5.FS,5.FD,110,3.FMT!2!3!4!5!7:COP1X:64,f::NMADD.fmt
"nmadd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
@@ -4660,7 +4638,7 @@
}
-010011,5.FR,5.FT,5.FS,5.FD,111,3.FMT:COP1X:64,f::NMSUB.fmt
+010011,5.FR,5.FT,5.FS,5.FD,111,3.FMT!2!3!4!5!7:COP1X:64,f::NMSUB.fmt
"nmsub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
@@ -4743,7 +4721,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,010101:COP1:32,f::RECIP.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,010101:COP1:32,f::RECIP.fmt
"recip.%s<FMT> f<FD>, f<FS>"
*mipsIV:
*mipsV:
@@ -4752,12 +4730,11 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt, Recip (ValueFPR (FS, fmt), fmt));
}
-010001,10,3.FMT,00000,5.FS,5.FD,001000:COP1:64,f::ROUND.L.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001000:COP1:64,f::ROUND.L.fmt
"round.l.%s<FMT> f<FD>, f<FS>"
*mipsIII:
*mipsIV:
@@ -4769,13 +4746,12 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_long, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
fmt_long));
}
-010001,10,3.FMT,00000,5.FS,5.FD,001100:COP1:32,f::ROUND.W.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001100:COP1:32,f::ROUND.W.fmt
"round.w.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
@@ -4789,13 +4765,12 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_word, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
fmt_word));
}
-010001,10,3.FMT,00000,5.FS,5.FD,010110:COP1:32,f::RSQRT.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,010110:COP1:32,f::RSQRT.fmt
"rsqrt.%s<FMT> f<FD>, f<FS>"
*mipsIV:
*mipsV:
@@ -4804,7 +4779,6 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt, RSquareRoot (ValueFPR (FS, fmt), fmt));
}
@@ -4865,7 +4839,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,000100:COP1:32,f::SQRT.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,000100:COP1:32,f::SQRT.fmt
"sqrt.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
@@ -4879,12 +4853,11 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt, (SquareRoot (ValueFPR (FS, fmt), fmt)));
}
-010001,10,3.FMT,5.FT,5.FS,5.FD,000001:COP1:32,f::SUB.fmt
+010001,10,3.FMT!2!3!4!5!7,5.FT,5.FS,5.FD,000001:COP1:32,f::SUB.fmt
"sub.%s<FMT> f<FD>, f<FS>, f<FT>"
*mipsI:
*mipsII:
@@ -4989,7 +4962,7 @@
}
-010001,10,3.FMT,00000,5.FS,5.FD,001001:COP1:64,f::TRUNC.L.fmt
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001001:COP1:64,f::TRUNC.L.fmt
"trunc.l.%s<FMT> f<FD>, f<FS>"
*mipsIII:
*mipsIV:
@@ -5001,13 +4974,12 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_long, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
fmt_long));
}
-010001,10,3.FMT,00000,5.FS,5.FD,001101:COP1:32,f::TRUNC.W
+010001,10,3.FMT!2!3!4!5!6!7,00000,5.FS,5.FD,001101:COP1:32,f::TRUNC.W
"trunc.w.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
@@ -5021,7 +4993,6 @@
{
int fmt = FMT;
check_fpu (SD_);
- check_fmt (SD_, fmt, instruction_0);
StoreFPR (FD, fmt_word, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
fmt_word));
}
diff --git a/sim/mips/sb1.igen b/sim/mips/sb1.igen
index 33c5141e776..b6534cb9bcd 100644
--- a/sim/mips/sb1.igen
+++ b/sim/mips/sb1.igen
@@ -22,6 +22,20 @@
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// Helper:
+//
+// Check that the SB-1 extension instruction can currently be used, and
+// signal a ReservedInstruction exception if not.
+//
+
+:function:::void:check_sbx:instruction_word insn
+*sb1:
+{
+ if ((SR & status_SBX) == 0)
+ SignalException(ReservedInstruction, insn);
+}
+
+
// MDMX ASE Instructions
// ---------------------
//
@@ -152,13 +166,9 @@
*sb1:
{
check_mdmx (SD_, instruction_0);
- if (SR & status_SBX)
- {
- check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
- StoreFPR(VD,fmt_mdmx,MX_AbsDiff(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
- }
- else
- SignalException(ReservedInstruction, instruction_0);
+ check_sbx (SD_, instruction_0);
+ check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
+ StoreFPR(VD,fmt_mdmx,MX_AbsDiff(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
}
@@ -167,13 +177,9 @@
*sb1:
{
check_mdmx (SD_, instruction_0);
- if (SR & status_SBX)
- {
- check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
- MX_AbsDiffC(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
- }
- else
- SignalException(ReservedInstruction, instruction_0);
+ check_sbx (SD_, instruction_0);
+ check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
+ MX_AbsDiffC(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
}
@@ -182,11 +188,57 @@
*sb1:
{
check_mdmx (SD_, instruction_0);
- if (SR & status_SBX)
- {
- check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
- StoreFPR(VD,fmt_mdmx,MX_Avg(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
- }
- else
- SignalException(ReservedInstruction, instruction_0);
+ check_sbx (SD_, instruction_0);
+ check_mdmx_fmtsel (SD_, instruction_0, FMTSEL);
+ StoreFPR(VD,fmt_mdmx,MX_Avg(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
+}
+
+
+// Paired-Single Extension Instructions
+// ------------------------------------
+//
+// The SB-1 implements several .PS format instructions that are
+// extensions to the MIPS64 architecture.
+
+010001,10,3.FMT=6,5.FT,5.FS,5.FD,000011:COP1:32,f::DIV.PS
+"div.%s<FMT> f<FD>, f<FS>, f<FT>"
+*sb1:
+{
+ int fmt = FMT;
+ check_fpu (SD_);
+ check_sbx (SD_, instruction_0);
+ StoreFPR (FD, fmt, Divide (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
+}
+
+
+010001,10,3.FMT=6,00000,5.FS,5.FD,010101:COP1:32,f::RECIP.PS
+"recip.%s<FMT> f<FD>, f<FS>"
+*sb1:
+{
+ int fmt = FMT;
+ check_fpu (SD_);
+ check_sbx (SD_, instruction_0);
+ StoreFPR (FD, fmt, Recip (ValueFPR (FS, fmt), fmt));
+}
+
+
+010001,10,3.FMT=6,00000,5.FS,5.FD,010110:COP1:32,f::RSQRT.PS
+"rsqrt.%s<FMT> f<FD>, f<FS>"
+*sb1:
+{
+ int fmt = FMT;
+ check_fpu (SD_);
+ check_sbx (SD_, instruction_0);
+ StoreFPR (FD, fmt, RSquareRoot (ValueFPR (FS, fmt), fmt));
+}
+
+
+010001,10,3.FMT=6,00000,5.FS,5.FD,000100:COP1:32,f::SQRT.PS
+"sqrt.%s<FMT> f<FD>, f<FS>"
+*sb1:
+{
+ int fmt = FMT;
+ check_fpu (SD_);
+ check_sbx (SD_, instruction_0);
+ StoreFPR (FD, fmt, (SquareRoot (ValueFPR (FS, fmt), fmt)));
}
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 96a86e9c549..10ddbf24528 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -383,7 +383,7 @@ struct _sim_cpu {
#define NR_COP0_GPR 32
unsigned_word cop0_gpr[NR_COP0_GPR];
#define COP0_GPR ((CPU)->cop0_gpr)
-#define COP0_BADVADDR ((unsigned32)(COP0_GPR[8]))
+#define COP0_BADVADDR (COP0_GPR[8])
/* While space is allocated for the floating point registers in the
main registers array, they are stored separatly. This is because
diff --git a/sim/mn10200/ChangeLog b/sim/mn10200/ChangeLog
index 090b05c18b4..ea930dcf794 100644
--- a/sim/mn10200/ChangeLog
+++ b/sim/mn10200/ChangeLog
@@ -1,3 +1,7 @@
+2004-06-28 Andrew Cagney <cagney@gnu.org>
+
+ * interp.c: Rename ui_loop_hook to deprecated_ui_loop_hook.
+
2003-02-27 Andrew Cagney <cagney@redhat.com>
* interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
diff --git a/sim/mn10200/interp.c b/sim/mn10200/interp.c
index ea4e04f7e47..90529c89887 100644
--- a/sim/mn10200/interp.c
+++ b/sim/mn10200/interp.c
@@ -12,7 +12,7 @@
static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
/* Actual hook to call to run through gdb's gui event loop */
-extern int (*ui_loop_hook) (int);
+extern int (*deprecated_ui_loop_hook) (int);
#endif /* NEED_UI_LOOP_HOOK */
host_callback *mn10200_callback;
@@ -326,10 +326,10 @@ sim_resume (sd, step, siggnal)
unsigned long insn, extension;
#ifdef NEED_UI_LOOP_HOOK
- if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
+ if (deprecated_ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
{
ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
- ui_loop_hook (0);
+ deprecated_ui_loop_hook (0);
}
#endif /* NEED_UI_LOOP_HOOK */
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 5602ce8fe95..0ef7ba3c2f4 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,92 @@
+2004-06-26 Alexandre Oliva <aoliva@redhat.com>
+
+ 2000-08-07 Graham Stott <grahams@cygnus.co.uk>
+ * am33-2.igen (fmadd, fmsub, fmnadd, fmnsub): Correct typo.
+ 2000-05-29 Alexandre Oliva <aoliva@cygnus.com>
+ * interp.c (fpu_disabled_exception, fpu_unimp_exception,
+ fpu_check_signal_exception): Take additional state arguments.
+ Print exception type and call program_interrupt. Adjust callers.
+ (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
+ fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Take additional
+ arguments.
+ * mn10300_sim.h (fpu_disabled_exception, fpu_unimp_exception,
+ fpu_check_signal_exception): Adjust prototypes.
+ (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
+ fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Likewise.
+ * am33-2.igen: Adjust calls.
+ 2000-05-19 Alexandre Oliva <aoliva@cygnus.com>
+ * op_utils.c (cmp2fcc): Moved...
+ * interp.c: ... here.
+ 2000-05-18 Alexandre Oliva <aoliva@cygnus.com>
+ * am33-2.igen: Use `unsigned32', `signed32', `unsigned64' or
+ `signed64' where type width is relevant.
+ 2000-05-15 Alexandre Oliva <aoliva@cygnus.com>
+ * mn10300_sim.h: Include sim-fpu.h.
+ (FD2FPU, FPU2FD): Enclose the FD argument in parentheses.
+ (fpu_check_signal_exception): Declare.
+ (struct fp_prec_t, fp_single_prec, fp_double_prec): Likewise.
+ (FP_SINGLE, FP_DOUBLE): Shorthands for fp_*_prec.
+ (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
+ fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Declare.
+ * interp.c (fpu_disabled_exception): Document.
+ (fpu_unimp_exception): Likewise.
+ (fpu_check_signal_exception): Define.
+ (reg2val_32, round_32, val2reg_32, fp_single_prec): Likewise.
+ (reg2val_64, round_64, val2reg_64, fp_double_prec): Likewise.
+ (REG2VAL, ROUND, VAL2REG): Define shorthands.
+ (fpu_status_ok): Define.
+ (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
+ fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Define.
+ * am33-2.igen (frsqrt, fcmp, fadd, fsub, fmul, fdiv,
+ fmadd, fmsub, fnmadd, fnmsub): Use new functions.
+ 2000-04-27 Alexandre Oliva <aoliva@cygnus.com>
+ * interp.c (sim_create_inferior): Set PSW bit to enable FP insns
+ if architecture is AM33/2.0.
+ * am33.igen: Include am33-2.igen.
+ 2000-04-23 Alexandre Oliva <aoliva@cygnus.com>
+ * mn10300.igen (movm, call, ret, retf): Check for am33_2 too.
+ * am33.igen (movm): Likewise.
+ 2000-04-19 Alexandre Oliva <aoliva@cygnus.com>
+ * am33.igen: Added `*am33_2' to some instructions that were
+ missing it.
+ 2000-04-07 Alexandre Oliva <aoliva@cygnus.com>
+ * am33-2.igen: New file. All insns implemented, but FP flags are
+ only set for fcmp, exceptional conditions are not handled yet.
+ * Makefile.in (IGEN_INSN): Added am33-2.igen.
+ (tmp-igen): Added -M am33_2.
+ * mn10300.igen, am33.igen: Added `*am33_2' to all insns.
+ * gencode.c: Support FMT_D3.
+ * mn10300_sim.h (dword): New type.
+ (struct _state): Added fpregs.
+ (REG_FPCR, FPCR): New define. All assorted bitmaps.
+ (XS2FS, AS2FS, Xf2FD): New macros.
+ (FS2FPU, FD2FPU, FPU2FS, FPU2FD): Likewise.
+ (load_dword, store_dword): New functions or macros.
+ (u642dw, dw2u64): New functions.
+ (fpu_disabled_exception, fpu_unimp_exception): Declared.
+ * interp.c (fpu_disabled_exception): Defined; no actual
+ implementation.
+ (fpu_unimp_exception): Likewise.
+ * op_utils.c (cmp2fcc): New function.
+
+ * interp.c, mn10300_sim.h, op_utils.c: Convert function prototypes
+ and definitions to ISO C.
+
+ * gencode.c, simops.c: Delete.
+ * Makefile.in: Remove non-COMMON dependencies and commands.
+
+ * configure.in: Use common simulator always. Don't subst sim_gen
+ nor mn10300_common.
+ * configure: Rebuilt.
+ * Makefile.in (WITHOUT_COMMON_OBJS, WITHOUT_COMMON_INTERP_DEP,
+ WITHOUT_COMMON_RUN_OBJS): Remove.
+ (WITH_COMMON_OBJS): Rename to MN10300_OBJS.
+ (WITH_COMMON_INTERP_DEP): Rename to MN10300_INTERP_DEP.
+ (WITH_COMMON_RUN_OBJS): Rename to SIM_RUN_OBJS.
+ (SIM_EXTRA_CFLAGS): Don't use @sim_gen@.
+ * interp.c: Remove non-common bits.
+ * mn10300_sim.h: Likewise.
+
2003-08-28 Andrew Cagney <cagney@redhat.com>
* dv-mn103ser.c (do_polling_event): Change type of "serial_reg" to
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index fc055529ba0..53192f4e15f 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -1,5 +1,5 @@
# Makefile template for Configure for the mn10300 sim library.
-# Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2004 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@
## COMMON_PRE_CONFIG_FRAG
-WITHOUT_COMMON_OBJS = table.o simops.o sim-load.o
-WITHOUT_COMMON_INTERP_DEP = table.c
-WITH_COMMON_OBJS = \
+MN10300_OBJS = \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
$(SIM_NEW_COMMON_OBJS) \
op_utils.o \
@@ -31,19 +29,13 @@ WITH_COMMON_OBJS = \
sim-reason.o \
sim-stop.o \
dv-sockser.o
-WITH_COMMON_INTERP_DEP =
-
-MN10300_OBJS = $(@mn10300_common@_COMMON_OBJS)
-MN10300_INTERP_DEP = $(@mn10300_common@_COMMON_INTERP_DEP)
SIM_OBJS = $(MN10300_OBJS) interp.o
# List of main object files for `run'.
-WITHOUT_COMMON_RUN_OBJS = run.o
-WITH_COMMON_RUN_OBJS = nrun.o
-SIM_RUN_OBJS = $(@mn10300_common@_COMMON_RUN_OBJS)
+SIM_RUN_OBJS = nrun.o
-SIM_EXTRA_CLEAN = clean-extra
+SIM_EXTRA_CLEAN = clean-igen
# Extra dependencies for "sim-main.h"
SIM_EXTRA_DEPS = mn10300_sim.h itable.h idecode.h
@@ -53,32 +45,11 @@ NL_TARGET = -DNL_TARGET_mn10300
INCLUDE = mn10300_sim.h $(srcdir)/../../include/gdb/callback.h
# List of extra flags to always pass to $(CC).
-SIM_EXTRA_CFLAGS = @sim_gen@ -DPOLL_QUIT_INTERVAL=0x20
+SIM_EXTRA_CFLAGS = -DPOLL_QUIT_INTERVAL=0x20
## COMMON_POST_CONFIG_FRAG
-
-#
-# Old generator (default)
-#
-
-simops.h: gencode
- ./gencode -h >$@
-
-table.c: gencode simops.h
- ./gencode >$@
-
-gencode.o: gencode.c $(INCLUDE)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gencode.c
-
-m10300-opc.o: $(srcdir)/../../opcodes/m10300-opc.c
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/../../opcodes/m10300-opc.c
-
-gencode: gencode.o m10300-opc.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o gencode gencode.o m10300-opc.o $(BUILD_LIB)
-
-idecode.o op_utils.o semantics.o simops.o: targ-vals.h
-
+idecode.o op_utils.o semantics.o: targ-vals.h
BUILT_SRC_FROM_IGEN = \
icache.h \
@@ -108,7 +79,7 @@ clean-igen:
cd ../igen && $(MAKE)
IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
-IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen
+IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
IGEN_DC=$(srcdir)/mn10300.dc
tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
cd ../igen && $(MAKE)
@@ -116,6 +87,7 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
$(IGEN_TRACE) \
-G gen-direct-access \
-M mn10300,am33 -G gen-multi-sim=am33 \
+ -M am33_2 \
-I $(srcdir) \
-i $(IGEN_INSN) \
-o $(IGEN_DC) \
@@ -152,10 +124,4 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
$(SHELL) $(srcdir)/../../move-if-change tmp-irun.c irun.c
touch tmp-igen
-
-interp.o: interp.c $(MN10300_INTERP_DEP) $(INCLUDE)
-simops.o: simops.c simops.h $(INCLUDE)
-table.o: table.c
-
-clean-extra: clean-igen
- rm -f table.c simops.h gencode
+interp.o: interp.c $(INCLUDE)
diff --git a/sim/mn10300/am33-2.igen b/sim/mn10300/am33-2.igen
new file mode 100644
index 00000000000..bcf68b46e2b
--- /dev/null
+++ b/sim/mn10300/am33-2.igen
@@ -0,0 +1,2285 @@
+// data cache pre-fetch:
+
+// 1111 1001 1010 0110 Rm.. 0000; dcpf (Rm)
+8.0xf9+8.0xa6+4.RN2,4.0000:D1a:::dcpf
+"dcpf"
+*am33_2
+{
+ int srcreg;
+
+ PC = cia;
+
+ srcreg = translate_rreg (SD_, RN2);
+ load_word (State.regs[srcreg]);
+}
+
+// 1111 1001 1010 0111 0000 0000; dcpf (sp)
+8.0xf9+8.0xa7+8.0x00:D1b:::dcpf
+"dcpf"
+*am33_2
+{
+ PC = cia;
+
+ load_word (SP);
+}
+
+// 1111 1011 1010 0110 Ri.. Rm.. 0000 0000; dcpf (Ri,Rm)
+8.0xfb+8.0xa6+4.RN2,4.RN0+8.0x00:D2a:::dcpf
+"dcpf"
+*am33_2
+{
+ int srci, srcm;
+
+ PC = cia;
+
+ srci = translate_rreg (SD_, RN2);
+ srcm = translate_rreg (SD_, RN0);
+
+ load_word (State.regs[srci] + State.regs[srcm]);
+}
+
+// 1111 1011 1010 0111 Rm.. 0000 IMM8; dcpf (d8,Rm)
+8.0xfb+8.0xa7+4.RN2,4.0000+8.IMM8:D2b:::dcpf
+"dcpf"
+*am33_2
+{
+ int srcreg;
+
+ PC = cia;
+
+ srcreg = translate_rreg (SD_, RN2);
+
+ load_word (State.regs[srcreg] + EXTEND8 (IMM8));
+}
+
+// 1111 1101 1010 0111 Rm.. 0000 IMM24; dcpf (d24,Rm)
+8.0xfd+8.0xa7+4.RN2,4.0000+8.IMM24A+8.IMM24B+8.IMM24C:D4a:::dcpf
+"dcpf"
+*am33_2
+{
+ int srcreg;
+
+ PC = cia;
+
+ srcreg = translate_rreg (SD_, RN2);
+
+ load_word (State.regs[srcreg] + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)));
+}
+
+// 1111 1110 0100 0110 Rm.. 0000 IMM32; dcpf (d32,Rm)
+8.0xfe+8.0x46+4.RN2,4.0000+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5a:::dcpf
+"dcpf"
+*am33_2
+{
+ int srcreg;
+
+ PC = cia;
+
+ srcreg = translate_rreg (SD_, RN2);
+
+ load_word (State.regs[srcreg]
+ + FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D));
+}
+
+// bit operations with imm8,(abs16) addressing mode:
+
+// 1111 1110 1000 0010 ABS16 IMM8; btst imm8,(abs16)
+8.0xfe+8.0x82+8.IMM16A+8.IMM16B+8.IMM8:D3:::btst
+"btst"
+*am33_2
+{
+ PC = cia;
+ genericBtst (IMM8, FETCH16 (IMM16A, IMM16B));
+}
+
+// 1111 1110 1000 0000 ABS16 IMM8; bset imm8,(abs16)
+8.0xfe+8.0x80+8.IMM16A+8.IMM16B+8.IMM8:D3:::bset
+"bset"
+*am33_2
+{
+ unsigned32 temp;
+ int z;
+
+ PC = cia;
+ temp = load_byte (FETCH16 (IMM16A, IMM16B));
+ z = (temp & IMM8) == 0;
+ temp |= IMM8;
+ store_byte (FETCH16 (IMM16A, IMM16B), temp);
+ PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
+ PSW |= (z ? PSW_Z : 0);
+}
+
+// 1111 1110 1000 0001 ABS16 IMM8; bclr imm8,(abs16)
+8.0xfe+8.0x81+8.IMM16A+8.IMM16B+8.IMM8:D3:::bclr
+"bclr"
+*am33_2
+{
+ unsigned32 temp;
+ int z;
+
+ PC = cia;
+ temp = load_byte (FETCH16 (IMM16A, IMM16B));
+ z = (temp & IMM8) == 0;
+ temp = temp & ~(IMM8);
+ store_byte (FETCH16 (IMM16A, IMM16B), temp);
+ PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
+ PSW |= (z ? PSW_Z : 0);
+}
+
+// single precision fmov:
+
+// 1111 1001 0010 000X Rm.. Sn..; fmov (Rm),FSn
+8.0xf9+4.2,3.0,1.X+4.Rm,4.Sn:D1a:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X,Sn) = load_word (State.regs[reg]);
+ }
+}
+
+// 1111 1001 0010 001X Rm.. Sn..; fmov (Rm+),FSn
+8.0xf9+4.2,3.1,1.X+4.Rm,4.Sn:D1b:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X,Sn) = load_word (State.regs[reg]);
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1001 0010 010X ---- Sn..; fmov (SP),FSn
+8.0xf9+4.2,3.2,1.X+4.0,4.Sn:D1c:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ XS2FS (X,Sn) = load_word (State.regs[reg]);
+ }
+}
+
+// 1111 1001 0010 011X Rm.. Sn..; fmov Rm,FSn
+8.0xf9+4.2,3.3,1.X+4.Rm,4.Sn:D1d:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X,Sn) = State.regs[reg];
+ }
+}
+
+// 1111 1001 0011 00Y0 Sm.. Rn..; fmov FSm,(Rn)
+8.0xf9+4.3,2.0,1.Y,1.0+4.Sm,4.Rn:D1e:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg], XS2FS (Y,Sm));
+ }
+}
+
+// 1111 1001 0011 00Y1 Sm.. Rn..; fmov FSm,(Rn+)
+8.0xf9+4.3,2.0,1.Y,1.1+4.Sm,4.Rn:D1f:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg], XS2FS (Y,Sm));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1001 0011 01Y0 Sm.. ----; fmov FSm,(SP)
+8.0xf9+4.3,2.1,1.Y,1.0+4.Sm,4.0:D1g:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_word (State.regs[reg], XS2FS (Y,Sm));
+ }
+}
+
+// 1111 1001 0011 01Y1 Sm.. Rn..; fmov FSm,Rn
+8.0xf9+4.3,2.1,1.Y,1.1+4.Sm,4.Rn:D1h:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ State.regs[reg] = XS2FS (Y,Sm);
+ }
+}
+
+// 1111 1001 0100 00YX Sm.. Sn..; fmov FSm,FSn
+8.0xf9+4.4,2.0,1.Y,1.X+4.Sm,4.Sn:D1i:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ XS2FS (X,Sn) = XS2FS (Y,Sm);
+}
+
+// 1111 1011 0010 000X Rm.. Sn.. d8; fmov (d8,Rm),FSn
+8.0xfb+4.2,3.0,1.X+4.Rm,4.Sn+8.IMM8:D2a:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg] + EXTEND8 (IMM8));
+ }
+}
+
+// 1111 1011 0010 001X Rm.. Sn.. d8; fmov (Rm+,imm8),FSn
+8.0xfb+4.2,3.1,1.X+4.Rm,4.Sn+8.IMM8:D2b:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg] + EXTEND8 (IMM8));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1011 0010 010X ---- Sn.. d8; fmov (d8,SP),FSn
+8.0xfb+4.2,3.2,1.X+4.0,4.Sn+8.IMM8:D2c:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ XS2FS (X, Sn) = load_word (State.regs[reg] + IMM8);
+ }
+}
+
+// 1111 1011 0010 0111 Ri.. Rm.. Sn.. --Z-; fmov (Ri,Rm),FSn
+8.0xfb+8.0x27+4.Ri,4.Rm+4.Sn,2.0,1.Z,1.0:D2d:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int ri = translate_rreg (SD_, Ri);
+ int rm = translate_rreg (SD_, Rm);
+ XS2FS (Z, Sn) = load_word (State.regs[ri] + State.regs[rm]);
+ }
+}
+
+// 1111 1011 0011 00Y0 Sm.. Rn.. d8; fmov FSm,(d8,Rn)
+8.0xfb+4.3,2.0,1.Y,1.0+4.Sm,4.Rn+8.IMM8:D2e:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg] + EXTEND8 (IMM8), XS2FS (Y, Sm));
+ }
+}
+
+// 1111 1011 0011 00Y1 Sm.. Rn.. d8; fmov FSm,(Rn+,d8)
+8.0xfb+4.3,2.0,1.Y,1.1+4.Sm,4.Rn+8.IMM8:D2f:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg] + EXTEND8 (IMM8), XS2FS (Y, Sm));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1011 0011 01Y0 Sm.. ---- d8; fmov FSm,(d8,SP)
+8.0xfb+4.3,2.1,1.Y,1.0+4.Sm,4.0+8.IMM8:D2g:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_word (State.regs[reg] + IMM8, XS2FS (Y, Sm));
+ }
+}
+
+// 1111 1011 0011 0111 Ri.. Rm.. Sm.. --Z-; fmov FSm,(Ri,Rm)
+8.0xfb+8.0x37+4.Ri,4.Rm+4.Sm,2.0,1.Z,1.0:D2h:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int ri = translate_rreg (SD_, Ri);
+ int rm = translate_rreg (SD_, Rm);
+ store_word (State.regs[ri] + State.regs[rm], XS2FS (Z, Sm));
+ }
+}
+
+// 1111 1101 0010 000X Rm.. Sn.. d24; fmov (d24,Rm),FSn
+8.0xfd+4.2,3.0,1.X+4.Rm,4.Sn+8.IMM24A+8.IMM24B+8.IMM24C:D4a:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)));
+ }
+}
+
+// 1111 1101 0010 001X Rm.. Sn.. d24; fmov (Rm+,imm24),FSn
+8.0xfd+4.2,3.1,1.X+4.Rm,4.Sn+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1101 0010 010X ---- Sn.. d24; fmov (d24,SP),FSn
+8.0xfd+4.2,3.2,1.X+4.0,4.Sn+8.IMM24A+8.IMM24B+8.IMM24C:D4c:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ XS2FS (X, Sn) = load_word (State.regs[reg] + FETCH24 (IMM24A,
+ IMM24B, IMM24C));
+ }
+}
+
+// 1111 1101 0011 00Y0 Sm.. Rn.. d24; fmov FSm,(d24,Rn)
+8.0xfd+4.3,2.0,1.Y,1.0+4.Sm,4.Rn+8.IMM24A+8.IMM24B+8.IMM24C:D4e:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)), XS2FS (Y, Sm));
+ }
+}
+
+// 1111 1101 0011 00Y1 Sm.. Rn.. d24; fmov FSm,(Rn+,d24)
+8.0xfd+4.3,2.0,1.Y,1.1+4.Sm,4.Rn+8.IMM24A+8.IMM24B+8.IMM24C:D4f:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)), XS2FS (Y, Sm));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1101 0011 01Y0 Sm.. ---- d24; fmov FSm,(d24,SP)
+8.0xfd+4.3,2.1,1.Y,1.0+4.Sm,4.0+8.IMM24A+8.IMM24B+8.IMM24C:D4g:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_word (State.regs[reg]
+ + FETCH24 (IMM24A,
+ IMM24B, IMM24C), XS2FS (Y, Sm));
+ }
+}
+
+// 1111 1110 0010 000X Rm.. Sn.. d32; fmov (d32,Rm),FSn
+8.0xfe+4.2,3.0,1.X+4.Rm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5a:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)));
+ }
+}
+
+// 1111 1110 0010 001X Rm.. Sn.. d32; fmov (Rm+,imm32),FSn
+8.0xfe+4.2,3.1,1.X+4.Rm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5b:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ XS2FS (X, Sn) = load_word (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1110 0010 010X ---- Sn.. d32; fmov (d32,SP),FSn
+8.0xfe+4.2,3.2,1.X+4.0,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5c:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ XS2FS (X, Sn) = load_word (State.regs[reg]
+ + FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D));
+ }
+}
+
+// 1111 1110 0010 011X ---- Sn.. d32; fmov imm32,FSn
+8.0xfe+4.2,3.3,1.X+4.0,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5d:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ XS2FS (X, Sn) = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+}
+
+// 1111 1110 0011 00Y0 Sm.. Rn.. d32; fmov FSm,(d32,Rn)
+8.0xfe+4.3,2.0,1.Y,1.0+4.Sm,4.Rn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5e:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)), XS2FS (Y, Sm));
+ }
+}
+
+// 1111 1110 0011 00Y1 Sm.. Rn.. d32; fmov FSm,(Rn+,d32)
+8.0xfe+4.3,2.0,1.Y,1.1+4.Sm,4.Rn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5f:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_word (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)), XS2FS (Y, Sm));
+ State.regs[reg] += 4;
+ }
+}
+
+// 1111 1110 0011 01Y0 Sm.. ---- d32; fmov FSm,(d32,SP)
+8.0xfe+4.3,2.1,1.Y,1.0+4.Sm,4.0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5g:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_word (State.regs[reg]
+ + FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D), XS2FS (Y, Sm));
+ }
+}
+
+// double precision fmov:
+
+// 1111 1001 1010 000X Rm.. fn.-; fmov (Rm),FDn
+8.0xf9+4.0xa,3.0,1.X+4.Rm,3.fn,1.0:D1j:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X,fn) = load_dword (State.regs[reg]);
+ }
+}
+
+// 1111 1001 1010 001X Rm.. fn.-; fmov (Rm+),FDn
+8.0xf9+4.0xa,3.1,1.X+4.Rm,3.fn,1.0:D1k:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X,fn) = load_dword (State.regs[reg]);
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1001 1010 010X ---- fn.-; fmov (SP),FDn
+8.0xf9+4.0xa,3.2,1.X+4.0,3.fn,1.0:D1l:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ Xf2FD (X,fn) = load_dword (State.regs[reg]);
+ }
+}
+
+// 1111 1001 1011 00Y0 fm.- Rn..; fmov FDm,(Rn)
+8.0xf9+4.0xb,2.0,1.Y,1.0+3.fm,1.0,4.Rn:D1m:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg], Xf2FD (Y,fm));
+ }
+}
+
+// 1111 1001 1011 00Y1 fm.- Rn..; fmov FDm,(Rn+)
+8.0xf9+4.0xb,2.0,1.Y,1.1+3.fm,1.0,4.Rn:D1n:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg], Xf2FD (Y,fm));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1001 1011 01Y0 fm.- ----; fmov FDm,(SP)
+8.0xf9+4.0xb,2.1,1.Y,1.0+3.fm,1.0,4.0:D1o:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_dword (State.regs[reg], Xf2FD (Y,fm));
+ }
+}
+
+// 1111 1001 1100 00YX fm.- fn.-; fmov FDm,FDn
+8.0xf9+4.0xc,2.0,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1p:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0100 0111 Ri.. Rm.. fn.- --Z-; fmov (Ri,Rm),FDn
+8.0xfb+8.0x47+4.Ri,4.Rm+3.fn,1.0,2.0,1.Z,1.0:D2i:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int ri = translate_rreg (SD_, Ri);
+ int rm = translate_rreg (SD_, Rm);
+ Xf2FD (Z,fn) = load_dword (State.regs[ri] + State.regs[rm]);
+ }
+}
+
+// 1111 1011 0101 0111 Ri.. Rn.. fm.- --Z-; fmov FDm,(Ri,Rn)
+8.0xfb+8.0x57+4.Ri,4.Rn+3.fm,1.0,2.0,1.Z,1.0:D2j:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int ri = translate_rreg (SD_, Ri);
+ int rn = translate_rreg (SD_, Rn);
+ store_dword (State.regs[ri] + State.regs[rn], Xf2FD (Z,fm));
+ }
+}
+
+// 1111 1011 1010 000X Rm.. fn.- d8; fmov (d8,Rm),FDn
+8.0xfb+4.0xa,3.0,1.X+4.Rm,4.fn+8.IMM8:D2k:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg] + EXTEND8 (IMM8));
+ }
+}
+
+// 1111 1011 1010 001X Rm.. fn.- d8; fmov (Rm+,imm8),FDn
+8.0xfb+4.0xa,3.1,1.X+4.Rm,4.fn+8.IMM8:D2l:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg] + EXTEND8 (IMM8));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1011 1010 010X ---- fn.- d8; fmov (d8,SP),FDn
+8.0xfb+4.0xa,3.2,1.X+4.0,4.fn+8.IMM8:D2m:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ Xf2FD (X, fn) = load_dword (State.regs[reg] + IMM8);
+ }
+}
+
+// 1111 1011 1011 00Y0 fm.- Rn.. d8; fmov FDm,(d8,Rn)
+8.0xfb+4.0xb,2.0,1.Y,1.0+4.fm,4.Rn+8.IMM8:D2n:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg] + EXTEND8 (IMM8), Xf2FD (Y, fm));
+ }
+}
+
+// 1111 1011 1011 00Y1 fm.- Rn.. d8; fmov FDm,(Rn+,d8)
+8.0xfb+4.0xb,2.0,1.Y,1.1+4.fm,4.Rn+8.IMM8:D2o:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg] + EXTEND8 (IMM8), Xf2FD (Y, fm));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1011 1011 01Y0 fm.- ---- d8; fmov FDm,(d8,SP)
+8.0xfb+4.0xb,2.1,1.Y,1.0+4.fm,4.0+8.IMM8:D2p:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_dword (State.regs[reg] + IMM8, Xf2FD (Y, fm));
+ }
+}
+
+// 1111 1101 1010 000X Rm.. fn.- d24; fmov (d24,Rm),FDn
+8.0xfd+4.0xa,3.0,1.X+4.Rm,4.fn+8.IMM24A+8.IMM24B+8.IMM24C:D4k:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)));
+ }
+}
+
+// 1111 1101 1010 001X Rm.. fn.- d24; fmov (Rm+,imm24),FDn
+8.0xfd+4.0xa,3.1,1.X+4.Rm,4.fn+8.IMM24A+8.IMM24B+8.IMM24C:D4l:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1101 1010 010X ---- fn.- d24; fmov (d24,SP),FDn
+8.0xfd+4.0xa,3.2,1.X+4.0,4.fn+8.IMM24A+8.IMM24B+8.IMM24C:D4m:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + FETCH24 (IMM24A,
+ IMM24B, IMM24C));
+ }
+}
+
+// 1111 1101 1011 00Y0 fm.- Rn.. d24; fmov FDm,(d24,Rn)
+8.0xfd+4.0xb,2.0,1.Y,1.0+4.fm,4.Rn+8.IMM24A+8.IMM24B+8.IMM24C:D4n:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)), Xf2FD (Y, fm));
+ }
+}
+
+// 1111 1101 1011 00Y1 fm.- Rn.. d24; fmov FDm,(Rn+,d24)
+8.0xfd+4.0xb,2.0,1.Y,1.1+4.fm,4.Rn+8.IMM24A+8.IMM24B+8.IMM24C:D4o:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg]
+ + EXTEND24 (FETCH24 (IMM24A,
+ IMM24B, IMM24C)), Xf2FD (Y, fm));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1101 1011 01Y0 fm.- ---- d24; fmov FDm,(d24,SP)
+8.0xfd+4.0xb,2.1,1.Y,1.0+4.fm,4.0+8.IMM24A+8.IMM24B+8.IMM24C:D4p:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_dword (State.regs[reg] + FETCH24 (IMM24A,
+ IMM24B, IMM24C), Xf2FD (Y, fm));
+ }
+}
+
+// 1111 1110 1010 000X Rm.. fn.- d32; fmov (d32,Rm),FDn
+8.0xfe+4.0xa,3.0,1.X+4.Rm,4.fn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5k:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)));
+ }
+}
+
+// 1111 1110 1010 001X Rm.. fn.- d32; fmov (Rm+,imm32),FDn
+8.0xfe+4.0xa,3.1,1.X+4.Rm,4.fn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5l:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1110 1010 010X ---- fn.- d32; fmov (d32,SP),FDn
+8.0xfe+4.0xa,3.2,1.X+4.0,4.fn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5m:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ Xf2FD (X, fn) = load_dword (State.regs[reg]
+ + FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D));
+ }
+}
+
+// 1111 1110 1011 00Y0 fm.- Rn.. d32; fmov FDm,(d32,Rn)
+8.0xfe+4.0xb,2.0,1.Y,1.0+4.fm,4.Rn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5n:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)), Xf2FD (Y, fm));
+ }
+}
+
+// 1111 1110 1011 00Y1 fm.- Rn.. d32; fmov FDm,(Rn+,d32)
+8.0xfe+4.0xb,2.0,1.Y,1.1+4.fm,4.Rn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5o:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ store_dword (State.regs[reg]
+ + EXTEND32 (FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D)), Xf2FD (Y, fm));
+ State.regs[reg] += 8;
+ }
+}
+
+// 1111 1110 1011 01Y0 fm.- ---- d32; fmov FDm,(d32,SP)
+8.0xfe+4.0xb,2.1,1.Y,1.0+4.fm,4.0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5p:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = REG_SP;
+ store_dword (State.regs[reg]
+ + FETCH32 (IMM32A, IMM32B,
+ IMM32C, IMM32D), Xf2FD (Y, fm));
+ }
+}
+
+// FPCR fmov:
+
+// 1111 1001 1011 0101 Rm.. ----; fmov Rm,FPCR
+8.0xf9+8.0xb5+4.Rm,4.0:D1q:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rm);
+ unsigned32 val = State.regs[reg];
+ FPCR = (val & (EC_MASK | EE_MASK | FCC_MASK))
+ | ((FPCR & ~val) & EF_MASK);
+ }
+}
+
+// 1111 1001 1011 0111 ---- Rn..; fmov FPCR,Rn
+8.0xf9+8.0xb7+4.0,4.Rn:D1r:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ int reg = translate_rreg (SD_, Rn);
+ State.regs[reg] = FPCR & FPCR_MASK;
+ }
+}
+
+// 1111 1101 1011 0101 imm32; fmov imm32,FPCR
+8.0xfd+8.0xb5+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fmov
+"fmov"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ unsigned32 val = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+ FPCR = (val & (EC_MASK | EE_MASK | FCC_MASK))
+ | ((FPCR & ~val) & EF_MASK);
+ }
+}
+
+// fabs:
+
+// 1111 1001 0100 010X ---- Sn..; fabs FSn
+8.0xf9+4.4,3.2,1.X+4.0,4.Sn:D1a:::fabs
+"fabs"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ sim_fpu in, out;
+
+ FS2FPU (XS2FS (X,Sn), in);
+ sim_fpu_abs (&out, &in);
+ FPU2FS (out, XS2FS (X,Sn));
+ }
+}
+
+// 1111 1001 1100 010X ---- Sn..; fabs FDn
+8.0xf9+4.0xc,3.2,1.X+4.0,3.fn,1.0:D1b:::fabs
+"fabs"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0100 0100 Sm.. ---- Sn.. X-Z-; fabs FSm,FSn
+8.0xfb+8.0x44+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2a:::fabs
+"fabs"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ sim_fpu in, out;
+
+ FS2FPU (XS2FS (X,Sm), in);
+ sim_fpu_abs (&out, &in);
+ FPU2FS (out, XS2FS (Z,Sn));
+ }
+}
+
+// 1111 1011 1100 0100 fm.- ---- fn.- X-Z-; fabs FDm,FDn
+8.0xfb+8.0xc4+3.fm,1.0,4.0+3.fn,1.0,1.X,1.0,1.Z,1.0:D2b:::fabs
+"fabs"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1001 0100 011X ---- Sn..; fneg FSn
+8.0xf9+4.4,3.3,1.X+4.0,4.Sn:D1a:::fneg
+"fneg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ sim_fpu in, out;
+
+ FS2FPU (XS2FS (X,Sn), in);
+ sim_fpu_neg (&out, &in);
+ FPU2FS (out, XS2FS (X,Sn));
+ }
+}
+
+// 1111 1001 1100 011X ---- Sn..; fneg FDn
+8.0xf9+4.0xc,3.3,1.X+4.0,3.fn,1.0:D1b:::fneg
+"fneg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0100 0110 Sm.. ---- Sn.. X-Z-; fneg FSm,FSn
+8.0xfb+8.0x46+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2a:::fneg
+"fneg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ sim_fpu in, out;
+
+ FS2FPU (XS2FS (X,Sm), in);
+ sim_fpu_neg (&out, &in);
+ FPU2FS (out, XS2FS (Z,Sn));
+ }
+}
+
+// 1111 1011 1100 0110 fm.- ---- fn.- X-Z-; fneg FDm,FDn
+8.0xfb+8.0xc6+3.fm,1.0,4.0+3.fn,1.0,1.X,1.0,1.Z,1.0:D2b:::fneg
+"fneg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1001 0101 000X ---- Sn..; frsqrt FSn
+8.0xf9+4.5,3.0,1.X+4.0,4.Sn:D1a:::frsqrt
+"frsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_rsqrt (SD, CPU, cia, &XS2FS (X,Sn), &XS2FS (X,Sn), FP_SINGLE);
+}
+
+// 1111 1001 1101 000X ---- fn.-; frsqrt FDn
+8.0xf9+4.0xd,3.0,1.X+4.0,3.fn,1.0:D1b:::frsqrt
+"frsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0101 0000 Sm.. ---- Sn.. X-Z-; frsqrt FSm,FSn
+8.0xfb+8.0x50+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2a:::frsqrt
+"frsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_rsqrt (SD, CPU, cia, &XS2FS (X,Sm), &XS2FS (Z,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1101 0000 fm.- ---- fn.- X-Z-; frsqrt FDm,FDn
+8.0xfb+8.0xd0+3.fm,1.0,4.0+3.fn,1.0,1.X,1.0,1.Z,1.0:D2b:::frsqrt
+"frsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1001 0101 001X ---- Sn..; fsqrt FSn
+8.0xf9+4.5,3.1,1.X+4.0,4.Sn:D1a:::fsqrt
+"fsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1001 1101 001X ---- fn.-; fsqrt FDn
+8.0xf9+4.0xd,3.1,1.X+4.0,3.fn,1.0:D1b:::fsqrt
+"fsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0101 0100 Sm.. ---- Sn.. X-Z-; fsqrt FSm,FSn
+8.0xfb+8.0x54+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2a:::fsqrt
+"fsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 1101 0100 fm.- ---- fn.- X-Z-; fsqrt FDm,FDn
+8.0xfb+8.0xd4+3.fm,1.0,4.0+3.fn,1.0,1.X,1.0,1.Z,1.0:D2b:::fsqrt
+"fsqrt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1001 0101 01YX Sm.. Sn..; fcmp FSm, FSn
+8.0xf9+4.5,2.1,1.Y,1.X+4.Sm,4.Sn:D1a:::fcmp
+"fcmp"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_cmp (SD, CPU, cia, &XS2FS (X,Sn), &XS2FS (Y,Sm), FP_SINGLE);
+}
+
+// 1111 1001 1101 01YX fm.- fn.-; fcmp FDm, FDn
+8.0xf9+4.0xd,2.1,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1b:::fcmp
+"fcmp"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1110 0011 01Y1 Sm.. ---- IMM32; fcmp imm32, FSm
+8.0xfe+4.3,2.1,1.Y,1.1+4.Sm,4.0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fcmp
+"fcmp"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ uint32 imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+
+ fpu_cmp (SD, CPU, cia, &XS2FS (Y,Sm), &imm, FP_SINGLE);
+ }
+}
+
+// 1111 1001 0110 00YX Sm.. Sn..; fadd FSm, FSn
+8.0xf9+4.6,2.0,1.Y,1.X+4.Sm,4.Sn:D1a:::fadd
+"fadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_add (SD, CPU, cia,
+ &XS2FS (Y,Sm), &XS2FS (X,Sn), &XS2FS (X,Sn), FP_SINGLE);
+}
+
+// 1111 1001 1110 00YX fm.- fn.-; fadd FDm, FDn
+8.0xf9+4.0xe,2.0,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1b:::fadd
+"fadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0110 0000 Sm1. Sm2. Sn.. XYZ-; fadd FSm1, FSm2, FSn
+8.0xfb+8.0x60+4.Sm1,4.Sm2+4.Sn,1.X,1.Y,1.Z,1.0:D2a:::fadd
+"fadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_add (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1110 0000 fm1- fm2- fn.- XYZ-; fadd FDm1, FDm2, FDn
+8.0xfb+8.0xe0+3.fm1,1.0,3.fm2,1.0+3.fn,1.0,1.X,1.Y,1.Z,1.0:D2b:::fadd
+"fadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+
+// 1111 1110 0110 00YX Sm.. Sn.. IMM32; fadd imm32, FSm, FSn
+8.0xfe+4.6,2.0,1.Y,1.X+4.Sm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fadd
+"fadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ uint32 imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+
+ fpu_add (SD, CPU, cia,
+ &XS2FS (Y,Sm), &imm, &XS2FS (X,Sn), FP_SINGLE);
+ }
+}
+
+// 1111 1001 0110 01YX Sm.. Sn..; fsub FSm, FSn
+8.0xf9+4.6,2.1,1.Y,1.X+4.Sm,4.Sn:D1a:::fsub
+"fsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_sub (SD, CPU, cia,
+ &XS2FS (X,Sn), &XS2FS (Y,Sm), &XS2FS (X,Sn), FP_SINGLE);
+}
+
+// 1111 1001 1110 01YX fm.- fn.-; fsub FDm, FDn
+8.0xf9+4.0xe,2.1,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1b:::fsub
+"fsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0110 0100 Sm1. Sm2. Sn.. XYZ-; fsub FSm1, FSm2, FSn
+8.0xfb+8.0x64+4.Sm1,4.Sm2+4.Sn,1.X,1.Y,1.Z,1.0:D2a:::fsub
+"fsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_sub (SD, CPU, cia,
+ &XS2FS (Y,Sm2), &XS2FS (X,Sm1), &XS2FS (Z,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1110 0100 fm1- fm2- fn.- XYZ-; fsub FDm1, FDm2, FDn
+8.0xfb+8.0xe4+3.fm1,1.0,3.fm2,1.0+3.fn,1.0,1.X,1.Y,1.Z,1.0:D2b:::fsub
+"fsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+
+// 1111 1110 0110 01YX Sm.. Sn.. IMM32; fsub imm32, FSm, FSn
+8.0xfe+4.6,2.1,1.Y,1.X+4.Sm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fsub
+"fsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ uint32 imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+
+ fpu_sub (SD, CPU, cia,
+ &XS2FS (Y,Sm), &imm, &XS2FS (X,Sn), FP_SINGLE);
+ }
+}
+
+// 1111 1001 0111 00YX Sm.. Sn..; fmul FSm, FSn
+8.0xf9+4.7,2.0,1.Y,1.X+4.Sm,4.Sn:D1a:::fmul
+"fmul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_mul (SD, CPU, cia,
+ &XS2FS (Y,Sm), &XS2FS (X,Sn), &XS2FS (X,Sn), FP_SINGLE);
+}
+
+// 1111 1001 1111 00YX fm.- fn.-; fmul FDm, FDn
+8.0xf9+4.0xf,2.0,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1b:::fmul
+"fmul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0111 0000 Sm1. Sm2. Sn.. XYZ-; fmul FSm1, FSm2, FSn
+8.0xfb+8.0x70+4.Sm1,4.Sm2+4.Sn,1.X,1.Y,1.Z,1.0:D2a:::fmul
+"fmul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_mul (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1111 0000 fm1- fm2- fn.- XYZ-; fmul FDm1, FDm2, FDn
+8.0xfb+8.0xf0+3.fm1,1.0,3.fm2,1.0+3.fn,1.0,1.X,1.Y,1.Z,1.0:D2b:::fmul
+"fmul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+
+// 1111 1110 0111 00YX Sm.. Sn.. IMM32; fmul imm32, FSm, FSn
+8.0xfe+4.7,2.0,1.Y,1.X+4.Sm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fmul
+"fmul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ uint32 imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+
+ fpu_mul (SD, CPU, cia,
+ &imm, &XS2FS (Y,Sm), &XS2FS (X,Sn), FP_SINGLE);
+ }
+}
+
+// 1111 1001 0111 01YX Sm.. Sn..; fdiv FSm, FSn
+8.0xf9+4.7,2.1,1.Y,1.X+4.Sm,4.Sn:D1a:::fdiv
+"fdiv"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_div (SD, CPU, cia,
+ &XS2FS (X,Sn), &XS2FS (Y,Sm), &XS2FS (X,Sn), FP_SINGLE);
+}
+
+// 1111 1001 1111 01YX fm.- fn.-; fdiv FDm, FDn
+8.0xf9+4.0xf,2.1,1.Y,1.X+3.fm,1.0,3.fn,1.0:D1b:::fdiv
+"fdiv"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0111 0100 Sm1. Sm2. Sn.. XYZ-; fdiv FSm1, FSm2, FSn
+8.0xfb+8.0x74+4.Sm1,4.Sm2+4.Sn,1.X,1.Y,1.Z,1.0:D2a:::fdiv
+"fdiv"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_div (SD, CPU, cia,
+ &XS2FS (Y,Sm2), &XS2FS (X,Sm1), &XS2FS (Z,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1111 0100 fm1- fm2- fn.- XYZ-; fdiv FDm1, FDm2, FDn
+8.0xfb+8.0xf4+3.fm1,1.0,3.fm2,1.0+3.fn,1.0,1.X,1.Y,1.Z,1.0:D2b:::fdiv
+"fdiv"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+
+// 1111 1110 0111 01YX Sm.. Sn.. IMM32; fdiv imm32, FSm, FSn
+8.0xfe+4.7,2.1,1.Y,1.X+4.Sm,4.Sn+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::fdiv
+"fdiv"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ {
+ uint32 imm = FETCH32 (IMM32A, IMM32B, IMM32C, IMM32D);
+
+ fpu_div (SD, CPU, cia,
+ &XS2FS (Y,Sm), &imm, &XS2FS (X,Sn), FP_SINGLE);
+ }
+}
+
+// 1111 1011 1000 00Sn Sm1. Sm2. Sm3. XYZA; fmadd FSm1, FSm2, FSm3, FSn
+8.0xfb+4.8,2.0,2.Sn+4.Sm1,4.Sm2+4.Sm3,1.X,1.Y,1.Z,1.A:D2:::fmadd
+"fmadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_fmadd (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sm3),
+ &AS2FS (A,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1000 01Sn Sm1. Sm2. Sm3. XYZA; fmsub FSm1, FSm2, FSm3, FSn
+8.0xfb+4.8,2.1,2.Sn+4.Sm1,4.Sm2+4.Sm3,1.X,1.Y,1.Z,1.A:D2:::fmsub
+"fmsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_fmsub (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sm3),
+ &AS2FS (A,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1001 00Sn Sm1. Sm2. Sm3. XYZA; fnmadd FSm1, FSm2, FSm3, FSn
+8.0xfb+4.9,2.0,2.Sn+4.Sm1,4.Sm2+4.Sm3,1.X,1.Y,1.Z,1.A:D2:::fnmadd
+"fnmadd"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_fnmadd (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sm3),
+ &AS2FS (A,Sn), FP_SINGLE);
+}
+
+// 1111 1011 1001 01Sn Sm1. Sm2. Sm3. XYZA; fnmsub FSm1, FSm2, FSm3, FSn
+8.0xfb+4.9,2.1,2.Sn+4.Sm1,4.Sm2+4.Sm3,1.X,1.Y,1.Z,1.A:D2:::fnmsub
+"fnmsub"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_fnmsub (SD, CPU, cia,
+ &XS2FS (X,Sm1), &XS2FS (Y,Sm2), &XS2FS (Z,Sm3),
+ &AS2FS (A,Sn), FP_SINGLE);
+}
+
+// conversion:
+
+// 1111 1011 0100 0000 Sm.. ---- Sn.. X-Z-; ftoi FSm,FSn
+8.0xfb+8.0x40+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2:::ftoi
+"ftoi"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0100 0010 Sm.. ---- Sn.. X-Z-; itof FSm,FSn
+8.0xfb+8.0x42+4.Sm,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2:::itof
+"itof"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0101 0010 Sm.. ---- fn.- X-Z-; ftod FSm,FDn
+8.0xfb+8.0x52+4.Sm,4.0+3.fn,1.0,1.X,1.0,1.Z,1.0:D2:::ftod
+"ftod"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// 1111 1011 0101 0110 fm.- ---- Sn.. X-Z-; dtof FDm,FSn
+8.0xfb+8.0x56+3.fm,1.0,4.0+4.Sn,1.X,1.0,1.Z,1.0:D2:::dtof
+"dtof"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else
+ fpu_unimp_exception (SD, CPU, cia);
+}
+
+// branching:
+
+// 1111 1000 1101 0000 d8; fbeq (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd0+8.D8:D1:::fbeq
+"fbeq"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_E))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0001 d8; fbne (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd1+8.D8:D1:::fbne
+"fbne"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L | FCC_G)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0010 d8; fbgt (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd2+8.D8:D1:::fbgt
+"fbgt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_G))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0011 d8; fbge (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd3+8.D8:D1:::fbge
+"fbge"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_G | FCC_E)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0100 d8; fblt (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd4+8.D8:D1:::fblt
+"fblt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_L))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0101 d8; fble (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd5+8.D8:D1:::fble
+"fble"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_E)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0110 d8; fbuo (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd6+8.D8:D1:::fbuo
+"fbuo"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_U))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 0111 d8; fblg (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd7+8.D8:D1:::fblg
+"fblg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_G)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+// 1111 1000 1101 1000 d8; fbleg (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd8+8.D8:D1:::fbleg
+"fbleg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_E | FCC_G)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 1001 d8; fbug (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xd9+8.D8:D1:::fbug
+"fbug"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_G)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 1010 d8; fbuge (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xda+8.D8:D1:::fbuge
+"fbuge"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_G | FCC_E)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 1011 d8; fbul (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xdb+8.D8:D1:::fbul
+"fbul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 1100 d8; fbule (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xdc+8.D8:D1:::fbule
+"fbule"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L | FCC_E)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 1000 1101 1101 d8; fbue (d8,PC) (d8 is sign-extended)
+8.0xf8+8.0xdd+8.D8:D1:::fbue
+"fbue"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_E)))
+ {
+ State.regs[REG_PC] += EXTEND8 (D8);
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0000; fleq
+8.0xf0+8.0xd0:D0:::fleq
+"fleq"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_E))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0001; flne
+8.0xf0+8.0xd1:D0:::flne
+"flne"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L | FCC_G)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0010; flgt
+8.0xf0+8.0xd2:D0:::flgt
+"flgt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_G))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0011; flge
+8.0xf0+8.0xd3:D0:::flge
+"flge"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_G | FCC_E)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0100; fllt
+8.0xf0+8.0xd4:D0:::fllt
+"fllt"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_L))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0101; flle
+8.0xf0+8.0xd5:D0:::flle
+"flle"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_E)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0110; fluo
+8.0xf0+8.0xd6:D0:::fluo
+"fluo"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & FCC_U))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 0111; fllg
+8.0xf0+8.0xd7:D0:::fllg
+"fllg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_G)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+// 1111 0000 1101 1000; flleg
+8.0xf0+8.0xd8:D0:::flleg
+"flleg"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_L | FCC_E | FCC_G)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 1001; flug
+8.0xf0+8.0xd9:D0:::flug
+"flug"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_G)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 1010; fluge
+8.0xf0+8.0xda:D0:::fluge
+"fluge"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_G | FCC_E)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 1011; flul
+8.0xf0+8.0xdb:D0:::flul
+"flul"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 1100; flule
+8.0xf0+8.0xdc:D0:::flule
+"flule"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_L | FCC_E)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
+
+// 1111 0000 1101 1101; flue
+8.0xf0+8.0xdd:D0:::flue
+"flue"
+*am33_2
+{
+ PC = cia;
+
+ if (FPU_DISABLED)
+ fpu_disabled_exception (SD, CPU, cia);
+ else if ((FPCR & (FCC_U | FCC_E)))
+ {
+ State.regs[REG_PC] = State.regs[REG_LAR] - 4;
+ nia = PC;
+ }
+}
diff --git a/sim/mn10300/am33.igen b/sim/mn10300/am33.igen
index db41889e747..f17283cfb4e 100644
--- a/sim/mn10300/am33.igen
+++ b/sim/mn10300/am33.igen
@@ -42,6 +42,7 @@
8.0xf0+4.0x2,00,2.AN0:D0m:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_A0 + AN0] = State.regs[REG_USP];
@@ -52,6 +53,7 @@
8.0xf0+4.0x2,01,2.AN0:D0n:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_A0 + AN0] = State.regs[REG_SSP];
@@ -62,6 +64,7 @@
8.0xf0+4.0x2,10,2.AN0:D0o:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_A0 + AN0] = State.regs[REG_MSP];
@@ -72,6 +75,7 @@
8.0xf0+4.0x2,11,2.AN0:D0p:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_A0 + AN0] = PC;
@@ -82,6 +86,7 @@
8.0xf0+4.0x3,2.AM1,00:D0q:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_USP] = State.regs[REG_A0 + AM1];
@@ -91,6 +96,7 @@
8.0xf0+4.0x3,2.AM1,01:D0r:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_SSP] = State.regs[REG_A0 + AM1];
@@ -100,6 +106,7 @@
8.0xf0+4.0x3,2.AM1,10:D0s:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_MSP] = State.regs[REG_A0 + AM1];
@@ -110,6 +117,7 @@
8.0xf0+4.0xe,IMM4:D0t:::syscall
"syscall"
*am33
+*am33_2
{
unsigned32 sp, next_pc;
@@ -127,6 +135,7 @@
8.0xf2+4.0xe,11,2.DN0:D0u:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
State.regs[REG_D0 + DN0] = PSW;
@@ -137,6 +146,7 @@
8.0xf2+4.0xf,2.DM1,01:D0v:::mov
"mov"
*am33
+*am33_2
{
PC = cia;
PSW = State.regs[REG_D0 + DM1];
@@ -146,6 +156,7 @@
8.0xf5+00,2.AM1,4.RN0:D0w:::mov
"mov"
*am33
+*am33_2
{
int destreg = translate_rreg (SD_, RN0);
@@ -157,6 +168,7 @@
8.0xf5+01,2.DM1,4.RN0:D0x:::mov
"mov"
*am33
+*am33_2
{
int destreg = translate_rreg (SD_, RN0);
@@ -168,6 +180,7 @@
8.0xf5+10,4.RM1,2.AN0:D0y:::mov
"mov"
*am33
+*am33_2
{
int destreg = translate_rreg (SD_, RM1);
@@ -179,6 +192,7 @@
8.0xf5+11,4.RM1,2.DN0:D0z:::mov
"mov"
*am33
+*am33_2
{
int destreg = translate_rreg (SD_, RM1);
@@ -191,6 +205,7 @@
8.0xf8+8.0xce+8.REGS:D1a:::movm
"movm"
*am33
+*am33_2
{
unsigned32 usp = State.regs[REG_USP];
unsigned32 mask;
@@ -242,6 +257,7 @@
}
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x1)
@@ -283,6 +299,7 @@
8.0xf8+8.0xcf+8.REGS:D1b:::movm
"movm"
*am33
+*am33_2
{
unsigned32 usp = State.regs[REG_USP];
unsigned32 mask;
@@ -291,6 +308,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x4)
@@ -375,6 +393,7 @@
8.0xfc+8.0xfc+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:4a:::and
"and"
*am33
+*am33_2
{
PC = cia;
PSW &= FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
@@ -384,6 +403,7 @@
8.0xfc+8.0xfd+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::or
"or"
*am33
+*am33_2
{
PC = cia;
PSW |= FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
@@ -393,6 +413,7 @@
8.0xf9+8.0x08+4.RM2,4.RN0!RM2:D1g:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -407,6 +428,7 @@
8.0xf9+8.0x18+4.RN0,4.RN2=RN0:D1:::ext
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -422,6 +444,7 @@
8.0xf9+8.0x28+4.RM2,4.RN0!RM2:D1:::extb
"extb"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -435,6 +458,7 @@
8.0xf9+8.0x38+4.RM2,4.RN0!RM2:D1:::extbu
"extbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -448,6 +472,7 @@
8.0xf9+8.0x48+4.RM2,4.RN0!RM2:D1:::exth
"exth"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -461,6 +486,7 @@
8.0xf9+8.0x58+4.RM2,4.RN0!RM2:D1:::exthu
"exthu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -474,6 +500,7 @@
8.0xf9+8.0x68+4.RM2,4.RN0=RM2:D1:::clr
"clr"
*am33
+*am33_2
{
int dstreg;
@@ -488,6 +515,7 @@
8.0xf9+8.0x78+4.RM2,4.RN0:D1b:::add
"add"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -501,6 +529,7 @@
8.0xf9+8.0x88+4.RM2,4.RN0:D1b:::addc
"addc"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, c, n, v;
@@ -530,6 +559,7 @@
8.0xf9+8.0x98+4.RM2,4.RN0:D1b:::sub
"sub"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -543,6 +573,7 @@
8.0xf9+8.0xa8+4.RM2,4.RN0:D1b:::subc
"subc"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, c, n, v;
@@ -572,6 +603,7 @@
8.0xf9+8.0xb8+4.RN0,4.RN2=RN0:D1:::inc
"inc"
*am33
+*am33_2
{
int dstreg;
@@ -584,6 +616,7 @@
8.0xf9+8.0xc8+4.RN0,4.RN2=RN0:D1:::inc4
"inc4"
*am33
+*am33_2
{
int dstreg;
@@ -596,6 +629,7 @@
8.0xf9+8.0xd8+4.RM2,4.RN0:D1:::cmp
"cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2;
@@ -609,6 +643,7 @@
8.0xf9+8.0xe8+4.XRM2,4.RN0:D1l:::mov
"mov"
*am33
+*am33_2
{
int dstreg, srcreg;
@@ -623,6 +658,7 @@
8.0xf9+8.0xf8+4.RM2,4.XRN0:D1m:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -637,6 +673,7 @@
8.0xf9+8.0x09+4.RM2,4.RN0:D1a:::and
"and"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, n;
@@ -657,6 +694,7 @@
8.0xf9+8.0x19+4.RM2,4.RN0:D1a:::or
"or"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, n;
@@ -676,6 +714,7 @@
8.0xf9+8.0x29+4.RM2,4.RN0:D1a:::xor
"xor"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, n;
@@ -695,6 +734,7 @@
8.0xf9+8.0x39+4.RM2,4.RN0=RM2:D1:::not
"not"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -713,6 +753,7 @@
8.0xf9+8.0x49+4.RM2,4.RN0:D1a:::asr
"asr"
*am33
+*am33_2
{
int srcreg, dstreg;
signed32 temp;
@@ -736,6 +777,7 @@
8.0xf9+8.0x59+4.RM2,4.RN0:D1a:::lsr
"lsr"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, n, c;
@@ -757,6 +799,7 @@
8.0xf9+8.0x69+4.RM2,4.RN0:D1a:::asl
"asl"
*am33
+*am33_2
{
int srcreg, dstreg;
int z, n;
@@ -776,6 +819,7 @@
8.0xf9+8.0x79+4.RM2,4.RN0=RM2:D1:::asl2
"asl2"
*am33
+*am33_2
{
int dstreg;
int n, z;
@@ -794,6 +838,7 @@
8.0xf9+8.0x89+4.RM2,4.RN0=RM2:D1:::ror
"ror"
*am33
+*am33_2
{
int dstreg;
int c, n, z;
@@ -818,6 +863,7 @@
8.0xf9+8.0x99+4.RM2,4.RN0=RM2:D1:::rol
"rol"
*am33
+*am33_2
{
int dstreg;
int c, n, z;
@@ -842,6 +888,7 @@
8.0xf9+8.0xa9+4.RM2,4.RN0:D1b:::mul
"mul"
*am33
+*am33_2
{
int srcreg, dstreg;
unsigned64 temp;
@@ -865,6 +912,7 @@
8.0xf9+8.0xb9+4.RM2,4.RN0:D1b:::mulu
"mulu"
*am33
+*am33_2
{
int srcreg, dstreg;
unsigned64 temp;
@@ -888,6 +936,7 @@
8.0xf9+8.0xc9+4.RM2,4.RN0:D1b:::div
"div"
*am33
+*am33_2
{
int srcreg, dstreg;
signed64 temp;
@@ -913,6 +962,7 @@
8.0xf9+8.0xd9+4.RM2,4.RN0:D1b:::divu
"divu"
*am33
+*am33_2
{
int srcreg, dstreg;
unsigned64 temp;
@@ -939,6 +989,7 @@
8.0xf9+8.0x0a+4.RN2,4.RM0:D1h:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -952,6 +1003,7 @@
8.0xf9+8.0x1a+4.RM2,4.RN0:D1i:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -965,6 +1017,7 @@
8.0xf9+8.0x2a+4.RN2,4.RM0:D1g:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -978,6 +1031,7 @@
8.0xf9+8.0x3a+4.RM2,4.RN0:D1i:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -991,6 +1045,7 @@
8.0xf9+8.0x4a+4.RN2,4.RM0:D1g:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1004,6 +1059,7 @@
8.0xf9+8.0x5a+4.RM2,4.RN0:D1i:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1017,6 +1073,7 @@
8.0xf9+8.0x6a+4.RN2,4.RM0!RN2:D1y:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1031,6 +1088,7 @@
8.0xf9+8.0x7a+4.RM2,4.RN0:D1z:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1045,6 +1103,7 @@
8.0xf9+8.0x8a+4.RN2,4.0000:D1j:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -1057,6 +1116,7 @@
8.0xf9+8.0x9a+4.RM2,4.0000:D1k:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -1069,6 +1129,7 @@
8.0xf9+8.0xaa+4.RN2,4.0000:D1j:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -1081,6 +1142,7 @@
8.0xf9+8.0xba+4.RM2,4.0000:D1k:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -1093,6 +1155,7 @@
8.0xf9+8.0xca+4.RN2,4.0000:D1j:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -1105,6 +1168,7 @@
8.0xf9+8.0xda+4.RM2,4.0000:D1k:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -1117,6 +1181,7 @@
8.0xf9+8.0xea+4.RN2,4.RM0!RN2:D1y:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1131,6 +1196,7 @@
8.0xf9+8.0xfa+4.RM2,4.RN0:D1z:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1146,6 +1212,7 @@
8.0xf9+8.0x0b+4.RM2,4.RN0:D1:::mac
"mac"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed64 temp, sum;
@@ -1174,6 +1241,7 @@
8.0xf9+8.0x1b+4.RM2,4.RN0:D1:::macu
"macu"
*am33
+*am33_2
{
int srcreg1, srcreg2;
unsigned64 temp, sum;
@@ -1202,6 +1270,7 @@
8.0xf9+8.0x2b+4.RM2,4.RN0:D1:::macb
"macb"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed32 temp, sum;
@@ -1225,6 +1294,7 @@
8.0xf9+8.0x3b+4.RM2,4.RN0:D1:::macbu
"macbu"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed64 temp, sum;
@@ -1248,6 +1318,7 @@
8.0xf9+8.0x4b+4.RM2,4.RN0:D1:::mach
"mach"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed64 temp, sum;
@@ -1276,6 +1347,7 @@
8.0xf9+8.0x5b+4.RM2,4.RN0:D1:::machu
"machu"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed64 temp, sum;
@@ -1304,6 +1376,7 @@
8.0xf9+8.0x6b+4.RM2,4.RN0:D1:::dmach
"dmach"
*am33
+*am33_2
{
int srcreg1, srcreg2;
signed32 temp, temp2, sum;
@@ -1329,6 +1402,7 @@
8.0xf9+8.0x7b+4.RM2,4.RN0:D1:::dmachu
"dmachu"
*am33
+*am33_2
{
int srcreg1, srcreg2;
unsigned32 temp, temp2, sum;
@@ -1354,6 +1428,7 @@
8.0xf9+8.0x8b+4.RM2,4.RN0:D1:::dmulh
"dmulh"
*am33
+*am33_2
{
int srcreg, dstreg;
signed32 temp;
@@ -1374,6 +1449,7 @@
8.0xf9+8.0x9b+4.RM2,4.RN0:D1:::dumachu
"dmachu"
*am33
+*am33_2
{
int srcreg, dstreg;
unsigned32 temp;
@@ -1394,6 +1470,7 @@
8.0xf9+8.0xab+4.RM2,4.RN0:D1:::sat16
"sat16"
*am33
+*am33_2
{
int srcreg, dstreg;
int value, z, n;
@@ -1421,6 +1498,7 @@
8.0xf9+8.0xbb+4.RM2,4.RN0:D1:::mcste
"mcste"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1518,6 +1596,7 @@
8.0xf9+8.0xcb+4.RM2,4.RN0:D1:::swap
"swap"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1535,6 +1614,7 @@
8.0xf9+8.0xdb+4.RM2,4.RN0:D1:::swaph
"swaph"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1552,6 +1632,7 @@
8.0xf9+8.0xeb+4.RM2,4.RN0:D1:::swhw
"swhw"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1567,6 +1648,7 @@
8.0xf9+8.0xfb+4.RM2,4.RN0:D1:::bsch
"bsch"
*am33
+*am33_2
{
int temp, c, i;
int srcreg, dstreg;
@@ -1606,6 +1688,7 @@
8.0xfb+8.0x08+4.RM2,4.RN0=RM2+8.IMM8:D2j:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -1618,6 +1701,7 @@
8.0xfb+8.0x18+4.RM2,4.RN0=RM2+8.IMM8:D2:::movu
"movu"
*am33
+*am33_2
{
int dstreg;
@@ -1630,6 +1714,7 @@
8.0xfb+8.0x78+4.RM2,4.RN0=RM2+8.IMM8:D2d:::add
"add"
*am33
+*am33_2
{
int dstreg;
@@ -1642,6 +1727,7 @@
8.0xfb+8.0x88+4.RM2,4.RN0=RM2+8.IMM8:D2d:::addc
"addc"
*am33
+*am33_2
{
int dstreg, imm;
int z, c, n, v;
@@ -1670,6 +1756,7 @@
8.0xfb+8.0x98+4.RM2,4.RN0=RM2+8.IMM8:D2d:::sub
"sub"
*am33
+*am33_2
{
int dstreg;
@@ -1683,6 +1770,7 @@
8.0xfb+8.0xa8+4.RM2,4.RN0=RM2+8.IMM8:D2d:::subc
"subc"
*am33
+*am33_2
{
int imm, dstreg;
int z, c, n, v;
@@ -1711,6 +1799,7 @@
8.0xfb+8.0xd8+4.RM2,4.RN0=RM2+8.IMM8:D2b:::cmp
"cmp"
*am33
+*am33_2
{
int srcreg;
@@ -1723,6 +1812,7 @@
8.0xfb+8.0xf8+4.XRM2,4.XRN0=XRM2+8.IMM8:D2k:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -1736,6 +1826,7 @@
8.0xfb+8.0x09+4.RM2,4.RN0=RM2+8.IMM8:D2d:::and
"and"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -1754,6 +1845,7 @@
8.0xfb+8.0x19+4.RM2,4.RN0=RM2+8.IMM8:D2d:::or
"or"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -1772,6 +1864,7 @@
8.0xfb+8.0x29+4.RM2,4.RN0=RM2+8.IMM8:D2d:::xor
"xor"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -1790,6 +1883,7 @@
8.0xfb+8.0x49+4.RM2,4.RN0=RM2+8.IMM8:D2a:::asr
"asr"
*am33
+*am33_2
{
int dstreg;
signed32 temp;
@@ -1812,6 +1906,7 @@
8.0xfb+8.0x59+4.RM2,4.RN0=RM2+8.IMM8:D2a:::lsr
"lsr"
*am33
+*am33_2
{
int dstreg;
int z, n, c;
@@ -1831,6 +1926,7 @@
8.0xfb+8.0x69+4.RM2,4.RN0=RM2+8.IMM8:D2a:::asl
"asl"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -1849,6 +1945,7 @@
8.0xfb+8.0xa9+4.RM2,4.RN0=RM2+8.IMM8:D2a:::mul
"mul"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -1871,6 +1968,7 @@
8.0xfb+8.0xb9+4.RM2,4.RN0=RM2+8.IMM8:D2a:::mulu
"mulu"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -1893,6 +1991,7 @@
8.0xfb+8.0xe9+4.RN2,4.RM0=RN2+8.IMM8:D2l:::btst
"btst"
*am33
+*am33_2
{
int srcreg;
@@ -1905,6 +2004,7 @@
8.0xfb+8.0x0a+4.RN2,4.RM0+8.IMM8:D2l:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1918,6 +2018,7 @@
8.0xfb+8.0x1a+4.RM2,4.RN0+8.IMM8:D2m:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1931,6 +2032,7 @@
8.0xfb+8.0x2a+4.RN2,4.RM0+8.IMM8:D2l:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1944,6 +2046,7 @@
8.0xfb+8.0x3a+4.RM2,4.RN0+8.IMM8:D2m:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1957,6 +2060,7 @@
8.0xfb+8.0x4a+4.RN2,4.RM0+8.IMM8:D2l:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1970,6 +2074,7 @@
8.0xfb+8.0x5a+4.RM2,4.RN0+8.IMM8:D2m:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1983,6 +2088,7 @@
8.0xfb+8.0x6a+4.RN2,4.RM0!RN2+8.IMM8:D2y:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -1997,6 +2103,7 @@
8.0xfb+8.0x7a+4.RM2,4.RN0+8.IMM8:D2z:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -2012,6 +2119,7 @@
8.0xfb+8.0x8a+4.RN2,4.0x0+8.IMM8:D2n:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -2024,6 +2132,7 @@
8.0xfb+8.0x9a+4.RM2,4.0x0+8.IMM8:D2o:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -2036,6 +2145,7 @@
8.0xfb+8.0xaa+4.RN2,4.0x0+8.IMM8:D2n:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -2048,6 +2158,7 @@
8.0xfb+8.0xba+4.RM2,4.0x0+8.IMM8:D2o:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -2060,6 +2171,7 @@
8.0xfb+8.0xca+4.RN2,4.0x0+8.IMM8:D2n:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -2072,6 +2184,7 @@
8.0xfb+8.0xda+4.RM2,4.0x0+8.IMM8:D2o:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -2084,6 +2197,7 @@
8.0xfb+8.0xea+4.RN2,4.RM0!RN2+8.IMM8:D2y:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -2098,6 +2212,7 @@
8.0xfb+8.0xfa+4.RM2,4.RN0+8.IMM8:D2z:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -2113,6 +2228,7 @@
8.0xfb+8.0x0b+4.RN2,4.RN0=RN2+8.IMM8:D2:::mac
"mac"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2140,6 +2256,7 @@
8.0xfb+8.0x1b+4.RN2,4.RN0=RN2+8.IMM8:D2:::macu
"macu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2167,6 +2284,7 @@
8.0xfb+8.0x2b+4.RN2,4.RN0=RN2+8.IMM8:D2:::macb
"macb"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2194,6 +2312,7 @@
8.0xfb+8.0x3b+4.RN2,4.RN0=RN2+8.IMM8:D2:::macbu
"macbu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2221,6 +2340,7 @@
8.0xfb+8.0x4b+4.RN2,4.RN0=RN2+8.IMM8:D2:::mach
"mach"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2248,6 +2368,7 @@
8.0xfb+8.0x5b+4.RN2,4.RN0=RN2+8.IMM8:D2:::machu
"machu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -2275,6 +2396,7 @@
8.0xfb+8.0xbb+4.RN2,4.RN0=RN2+8.IMM8:D2:::mcste
"mcste"
*am33
+*am33_2
{
int dstreg;
@@ -2371,6 +2493,7 @@
8.0xfb+8.0x7c+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::add
"add"
*am33
+*am33_2
{
int z, c, n, v;
unsigned32 sum, source1, source2;
@@ -2401,6 +2524,7 @@
8.0xfb+8.0x8c+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::addc
"addc"
*am33
+*am33_2
{
int z, c, n, v;
unsigned32 sum, source1, source2;
@@ -2431,6 +2555,7 @@
8.0xfb+8.0x9c+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::sub
"sub"
*am33
+*am33_2
{
int z, c, n, v;
unsigned32 difference, source1, source2;
@@ -2461,6 +2586,7 @@
8.0xfb+8.0xac+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::subc
"subc"
*am33
+*am33_2
{
int z, c, n, v;
unsigned32 difference, source1, source2;
@@ -2491,6 +2617,7 @@
8.0xfb+8.0x0d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::and
"and"
*am33
+*am33_2
{
int z, n;
int srcreg1, srcreg2, dstreg;
@@ -2513,6 +2640,7 @@
8.0xfb+8.0x1d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::or
"or"
*am33
+*am33_2
{
int z, n;
int srcreg1, srcreg2, dstreg;
@@ -2535,6 +2663,7 @@
8.0xfb+8.0x2d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::xor
"xor"
*am33
+*am33_2
{
int z, n;
int srcreg1, srcreg2, dstreg;
@@ -2557,6 +2686,7 @@
8.0xfb+8.0x4d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::asr
"asr"
*am33
+*am33_2
{
int z, c, n;
signed32 temp;
@@ -2583,6 +2713,7 @@
8.0xfb+8.0x5d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::lsr
"lsr"
*am33
+*am33_2
{
int z, c, n;
int srcreg1, srcreg2, dstreg;
@@ -2606,6 +2737,7 @@
8.0xfb+8.0x6d+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::asl
"asl"
*am33
+*am33_2
{
int z, n;
int srcreg1, srcreg2, dstreg;
@@ -2628,6 +2760,7 @@
8.0xfb+8.0xad+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::mul
"mul"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -2655,6 +2788,7 @@
8.0xfb+8.0xbd+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::mulu
"mulu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -2682,6 +2816,7 @@
8.0xfb+8.0x0e+4.RN2,4.0x0+8.IMM8:D2p:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -2694,6 +2829,7 @@
8.0xfb+8.0x1e+4.RM2,4.0x0+8.IMM8:D2q:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -2706,6 +2842,7 @@
8.0xfb+8.0x2e+4.RN2,4.0x0+8.IMM8:D2p:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -2718,6 +2855,7 @@
8.0xfb+8.0x3e+4.RM2,4.0x0+8.IMM8:D2q:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -2730,6 +2868,7 @@
8.0xfb+8.0x4e+4.RN2,4.0x0+8.IMM8:D2p:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -2742,6 +2881,7 @@
8.0xfb+8.0x5e+4.RM2,4.0x0+8.IMM8:D2q:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -2754,6 +2894,7 @@
8.0xfb+8.0x8e+4.RI0,4.RM0+4.RN0,4.0x0:D2r:::mov
"mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
@@ -2768,6 +2909,7 @@
8.0xfb+8.0x9e+4.RI0,4.RN0+4.RM0,4.0x0:D2s:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg1, dstreg2;
@@ -2782,6 +2924,7 @@
8.0xfb+8.0xae+4.RI0,4.RM0+4.RN0,4.0x0:D2r:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
@@ -2796,6 +2939,7 @@
8.0xfb+8.0xbe+4.RI0,4.RN0+4.RM0,4.0x0:D2s:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg1, dstreg2;
@@ -2810,6 +2954,7 @@
8.0xfb+8.0xce+4.RI0,4.RM0+4.RN0,4.0x0:D2r:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
@@ -2824,6 +2969,7 @@
8.0xfb+8.0xde+4.RI0,4.RN0+4.RM0,4.0x0:D2s:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg1, dstreg2;
@@ -2838,6 +2984,7 @@
8.0xfb+8.0x0f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::mac
"mac"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -2874,6 +3021,7 @@
8.0xfb+8.0x1f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::macu
"macu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -2910,6 +3058,7 @@
8.0xfb+8.0x2f+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::macb
"macb"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
signed32 temp, sum;
@@ -2938,6 +3087,7 @@
8.0xfb+8.0x3f+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::macbu
"macbu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
signed32 temp, sum;
@@ -2966,6 +3116,7 @@
8.0xfb+8.0x4f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::mach
"mach"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp, sum;
@@ -2996,6 +3147,7 @@
8.0xfb+8.0x5f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::machu
"machu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp, sum;
@@ -3026,6 +3178,7 @@
8.0xfb+8.0x6f+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::dmach
"dmach"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
signed32 temp, temp2, sum;
@@ -3056,6 +3209,7 @@
8.0xfb+8.0x7f+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::dmachu
"dmachu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg;
signed32 temp, temp2, sum;
@@ -3086,6 +3240,7 @@
8.0xfb+8.0x8f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::dmulh
"dmulh"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -3108,6 +3263,7 @@
8.0xfb+8.0x9f+4.RM2,4.RN0+4.RD0,4.RD2!RD0:D2c:::dmulhu
"dmulhu"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed64 temp;
@@ -3130,6 +3286,7 @@
8.0xfb+8.0xaf+4.RM2,4.RN0+8.0x0:D2:::sat24
"sat24"
*am33
+*am33_2
{
int srcreg, dstreg;
int value, n, z;
@@ -3157,6 +3314,7 @@
8.0xfb+8.0xff+4.RM2,4.RN0+4.RD0,4.0x0:D2c:::bsch
"bsch"
*am33
+*am33_2
{
int temp, c, i;
int srcreg1, srcreg2, dstreg;
@@ -3196,6 +3354,7 @@
8.0xfd+8.0x08+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4t:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -3208,6 +3367,7 @@
8.0xfd+8.0x18+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4k:::movu
"movu"
*am33
+*am33_2
{
int dstreg;
@@ -3220,6 +3380,7 @@
8.0xfd+8.0x78+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4c:::add
"add"
*am33
+*am33_2
{
int dstreg;
@@ -3232,6 +3393,7 @@
8.0xfd+8.0x88+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::addc
"addc"
*am33
+*am33_2
{
int dstreg, z, n, c, v;
unsigned32 sum, imm, reg2;
@@ -3259,6 +3421,7 @@
8.0xfd+8.0x98+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::sub
"sub"
*am33
+*am33_2
{
int dstreg;
@@ -3271,6 +3434,7 @@
8.0xfd+8.0xa8+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::subc
"subc"
*am33
+*am33_2
{
int dstreg, z, n, c, v;
unsigned32 difference, imm, reg2;
@@ -3298,6 +3462,7 @@
8.0xfd+8.0xd8+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::cmp
"cmp"
*am33
+*am33_2
{
int srcreg;
@@ -3310,6 +3475,7 @@
8.0xfd+8.0xf8+4.XRM2,4.XRN0=XRM2+8.IMM24A+8.IMM24B+8.IMM24C:D4o:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -3323,6 +3489,7 @@
8.0xfd+8.0x09+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::and
"and"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -3341,6 +3508,7 @@
8.0xfd+8.0x19+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::or
"or"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -3359,6 +3527,7 @@
8.0xfd+8.0x29+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::xor
"xor"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -3377,6 +3546,7 @@
8.0xfd+8.0x49+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::asr
"asr"
*am33
+*am33_2
{
int dstreg;
signed32 temp;
@@ -3400,6 +3570,7 @@
8.0xfd+8.0x59+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::lsr
"lsr"
*am33
+*am33_2
{
int dstreg;
int z, n, c;
@@ -3419,6 +3590,7 @@
8.0xfd+8.0x69+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::asl
"asl"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -3437,6 +3609,7 @@
8.0xfd+8.0xa9+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::mul
"mul"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -3459,6 +3632,7 @@
8.0xfd+8.0xb9+4.RM2,4.RN0=RM2+8.IMM24A+8.IMM24B+8.IMM24C:D4b:::mulu
"mulu"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -3481,6 +3655,7 @@
8.0xfd+8.0xe9+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4p:::btst
"btst"
*am33
+*am33_2
{
int srcreg;
@@ -3493,6 +3668,7 @@
8.0xfd+8.0x0a+4.RN2,4.RM0+8.IMM24A+8.IMM24B+8.IMM24C:D4p:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3508,6 +3684,7 @@
8.0xfd+8.0x1a+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4q:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3522,6 +3699,7 @@
8.0xfd+8.0x2a+4.RN2,4.RM0+8.IMM24A+8.IMM24B+8.IMM24C:D4p:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3537,6 +3715,7 @@
8.0xfd+8.0x3a+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4q:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3551,6 +3730,7 @@
8.0xfd+8.0x4a+4.RN2,4.RM0+8.IMM24A+8.IMM24B+8.IMM24C:D4p:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3566,6 +3746,7 @@
8.0xfd+8.0x5a+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4q:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3580,6 +3761,7 @@
8.0xfd+8.0x6a+4.RN2,4.RM0!RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4y:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3594,6 +3776,7 @@
8.0xfd+8.0x7a+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3609,6 +3792,7 @@
8.0xfd+8.0x8a+4.RN2,4.0x0+IMM24A+8.IMM24B+8.IMM24C:D4r:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -3622,6 +3806,7 @@
8.0xfd+8.0x9a+4.RM2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4s:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -3635,6 +3820,7 @@
8.0xfd+8.0xaa+4.RN2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4r:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -3648,6 +3834,7 @@
8.0xfd+8.0xba+4.RM2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4s:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -3661,6 +3848,7 @@
8.0xfd+8.0xca+4.RN2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4r:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -3674,6 +3862,7 @@
8.0xfd+8.0xda+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4s:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -3687,6 +3876,7 @@
8.0xfd+8.0xea+4.RN2,4.RM0!RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4y:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3701,6 +3891,7 @@
8.0xfd+8.0xfa+4.RM2,4.RN0+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -3715,6 +3906,7 @@
8.0xfd+8.0x0b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::mac
"mac"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3742,6 +3934,7 @@
8.0xfd+8.0x1b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::macu
"macu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3769,6 +3962,7 @@
8.0xfd+8.0x2b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::macb
"macb"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3796,6 +3990,7 @@
8.0xfd+8.0x3b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::macbu
"macbu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3823,6 +4018,7 @@
8.0xfd+8.0x4b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::mach
"mach"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3850,6 +4046,7 @@
8.0xfd+8.0x5b+4.RN2,4.RN0=RN2+8.IMM24A+8.IMM24B+8.IMM24C:D4z:::machu
"machu"
*am33
+*am33_2
{
int srcreg;
signed64 temp, sum;
@@ -3877,6 +4074,7 @@
8.0xfd+8.0x0e+4.RN2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4u:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -3889,6 +4087,7 @@
8.0xfd+8.0x1e+4.RM2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4v:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -3902,6 +4101,7 @@
8.0xfd+8.0x2e+4.RN2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4t:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -3914,6 +4114,7 @@
8.0xfd+8.0x3e+4.RM2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4u:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -3927,6 +4128,7 @@
8.0xfd+8.0x4e+4.RN2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4t:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -3939,6 +4141,7 @@
8.0xfd+8.0x5e+4.RM2,4.0x0+8.IMM24A+8.IMM24B+8.IMM24C:D4u:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -3952,6 +4155,7 @@
8.0xfe+8.0x08+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -3964,6 +4168,7 @@
8.0xfe+8.0x18+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::movu
"movu"
*am33
+*am33_2
{
int dstreg;
@@ -3976,6 +4181,7 @@
8.0xfe+8.0x78+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::add
"add"
*am33
+*am33_2
{
int dstreg;
@@ -3988,6 +4194,7 @@
8.0xfe+8.0x88+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::addc
"addc"
*am33
+*am33_2
{
int dstreg;
unsigned32 imm, reg2, sum;
@@ -4016,6 +4223,7 @@
8.0xfe+8.0x98+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::sub
"sub"
*am33
+*am33_2
{
int dstreg;
@@ -4028,6 +4236,7 @@
8.0xfe+8.0xa8+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::subc
"subc"
*am33
+*am33_2
{
int dstreg;
unsigned32 imm, reg2, difference;
@@ -4056,6 +4265,7 @@
8.0xfe+8.0xd8+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::cmp
"cmp"
*am33
+*am33_2
{
int srcreg;
@@ -4068,6 +4278,7 @@
8.0xfe+8.0xf8+4.XRM2,4.XRN0=XRM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5b:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -4081,6 +4292,7 @@
8.0xfe+8.0x09+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::and
"and"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -4099,6 +4311,7 @@
8.0xfe+8.0x19+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::or
"or"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -4117,6 +4330,7 @@
8.0xfe+8.0x29+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::xor
"xor"
*am33
+*am33_2
{
int dstreg;
int z,n;
@@ -4135,6 +4349,7 @@
8.0xfe+8.0x49+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::asr
"asr"
*am33
+*am33_2
{
int dstreg;
signed32 temp;
@@ -4157,6 +4372,7 @@
8.0xfe+8.0x59+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::lsr
"lsr"
*am33
+*am33_2
{
int dstreg;
int z, n, c;
@@ -4176,6 +4392,7 @@
8.0xfe+8.0x69+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::asl
"asl"
*am33
+*am33_2
{
int dstreg;
int z, n;
@@ -4194,6 +4411,7 @@
8.0xfe+8.0xa9+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::mul
"mul"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -4216,6 +4434,7 @@
8.0xfe+8.0xb9+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::mulu
"mulu"
*am33
+*am33_2
{
int dstreg;
unsigned64 temp;
@@ -4238,6 +4457,7 @@
8.0xfe+8.0xe9+4.RM2,4.RN0=RM2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5a:::btst
"btst"
*am33
+*am33_2
{
int srcreg;
@@ -4250,6 +4470,7 @@
8.0xfe+8.0x0a+4.RN2,4.RM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5f:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4264,6 +4485,7 @@
8.0xfe+8.0x1a+4.RM2,4.RN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5g:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4278,6 +4500,7 @@
8.0xfe+8.0x2a+4.RN2,4.RM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4292,6 +4515,7 @@
8.0xfe+8.0x3a+4.RM2,4.RN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5b:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4306,6 +4530,7 @@
8.0xfe+8.0x4a+4.RN2,4.RM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4320,6 +4545,7 @@
8.0xfe+8.0x5a+4.RM2,4.RN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5b:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4334,6 +4560,7 @@
8.0xfe+8.0x6a+4.RN2,4.RM0!RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5y:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4348,6 +4575,7 @@
8.0xfe+8.0x7a+4.RM2,4.RN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5z:::mov
"mov"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4363,6 +4591,7 @@
8.0xfe+8.0x8a+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5c:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -4376,6 +4605,7 @@
8.0xfe+8.0x9a+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5d:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -4389,6 +4619,7 @@
8.0xfe+8.0xaa+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5c:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -4402,6 +4633,7 @@
8.0xfe+8.0xba+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5d:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -4415,6 +4647,7 @@
8.0xfe+8.0xca+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5c:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -4428,6 +4661,7 @@
8.0xfe+8.0xda+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5d:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -4442,6 +4676,7 @@
8.0xfe+8.0xea+4.RN2,4.RM0!RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5y:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4456,6 +4691,7 @@
8.0xfe+8.0xfa+4.RM2,4.RN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5f:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -4471,6 +4707,7 @@
8.0xfe+8.0x0b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::mac
"mac"
*am33
+*am33_2
{
int srcreg, imm;
signed64 temp, sum;
@@ -4499,6 +4736,7 @@
8.0xfe+8.0x1b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::macu
"macu"
*am33
+*am33_2
{
int srcreg, imm;
signed64 temp, sum;
@@ -4527,6 +4765,7 @@
8.0xfe+8.0x2b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::macb
"macb"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, sum;
@@ -4550,6 +4789,7 @@
8.0xfe+8.0x3b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::macbu
"macbu"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, sum;
@@ -4573,6 +4813,7 @@
8.0xfe+8.0x4b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::mach
"mach"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, sum;
@@ -4596,6 +4837,7 @@
8.0xfe+8.0x5b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::machu
"machu"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, sum;
@@ -4619,6 +4861,7 @@
8.0xfe+8.0x6b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::dmach
"dmach"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, temp2, sum;
@@ -4644,6 +4887,7 @@
8.0xfe+8.0x7b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::dmachu
"dmachu"
*am33
+*am33_2
{
int srcreg, imm;
signed32 temp, temp2, sum;
@@ -4669,6 +4913,7 @@
8.0xfe+8.0x8b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::dmulh
"dmulh"
*am33
+*am33_2
{
int imm, dstreg;
signed32 temp;
@@ -4689,6 +4934,7 @@
8.0xfe+8.0x9b+4.RN2,4.RN0=RN2+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5:::dmulhu
"dmulhu"
*am33
+*am33_2
{
int imm, dstreg;
signed32 temp;
@@ -4709,6 +4955,7 @@
8.0xfe+8.0x0e+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5h:::mov
"mov"
*am33
+*am33_2
{
int dstreg;
@@ -4721,6 +4968,7 @@
8.0xfe+8.0x1e+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5e:::mov
"mov"
*am33
+*am33_2
{
int srcreg;
@@ -4733,6 +4981,7 @@
8.0xfe+8.0x2e+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5i:::movbu
"movbu"
*am33
+*am33_2
{
int dstreg;
@@ -4745,6 +4994,7 @@
8.0xfe+8.0x3e+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5e:::movbu
"movbu"
*am33
+*am33_2
{
int srcreg;
@@ -4757,6 +5007,7 @@
8.0xfe+8.0x4e+4.RN2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5j:::movhu
"movhu"
*am33
+*am33_2
{
int dstreg;
@@ -4769,6 +5020,7 @@
8.0xfe+8.0x5e+4.RM2,4.0x0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D5e:::movhu
"movhu"
*am33
+*am33_2
{
int srcreg;
@@ -4781,6 +5033,7 @@
8.0xf7+8.0x00+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_add
"add_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -4800,6 +5053,7 @@
8.0xf7+8.0x10+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_add
"add_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -4818,6 +5072,7 @@
8.0xf7+8.0x20+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_sub
"add_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -4837,6 +5092,7 @@
8.0xf7+8.0x30+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_sub
"add_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -4855,6 +5111,7 @@
8.0xf7+8.0x40+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_cmp
"add_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -4872,6 +5129,7 @@
8.0xf7+8.0x50+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_cmp
"add_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -4888,6 +5146,7 @@
8.0xf7+8.0x60+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_mov
"add_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -4907,6 +5166,7 @@
8.0xf7+8.0x70+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_mov
"add_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -4925,6 +5185,7 @@
8.0xf7+8.0x80+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_asr
"add_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -4947,6 +5208,7 @@
8.0xf7+8.0x90+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_asr
"add_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -4968,6 +5230,7 @@
8.0xf7+8.0xa0+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_lsr
"add_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -4987,6 +5250,7 @@
8.0xf7+8.0xb0+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_lsr
"add_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5006,6 +5270,7 @@
8.0xf7+8.0xc0+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::add_asl
"add_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5025,6 +5290,7 @@
8.0xf7+8.0xd0+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::add_asl
"add_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5043,6 +5309,7 @@
8.0xf7+8.0x01+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_add
"cmp_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5060,6 +5327,7 @@
8.0xf7+8.0x11+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_add
"cmp_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5076,6 +5344,7 @@
8.0xf7+8.0x21+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_sub
"cmp_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5093,6 +5362,7 @@
8.0xf7+8.0x31+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_sub
"cmp_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5109,6 +5379,7 @@
8.0xf7+8.0x61+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_mov
"cmp_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5126,6 +5397,7 @@
8.0xf7+8.0x71+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_mov
"cmp_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5142,6 +5414,7 @@
8.0xf7+8.0x81+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_asr
"cmp_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed int temp;
@@ -5162,6 +5435,7 @@
8.0xf7+8.0x91+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_asr
"cmp_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed int temp;
@@ -5181,6 +5455,7 @@
8.0xf7+8.0xa1+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_lsr
"cmp_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5198,6 +5473,7 @@
8.0xf7+8.0xb1+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_lsr
"cmp_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5215,6 +5491,7 @@
8.0xf7+8.0xc1+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::cmp_asl
"cmp_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5232,6 +5509,7 @@
8.0xf7+8.0xd1+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::cmp_asl
"cmp_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5248,6 +5526,7 @@
8.0xf7+8.0x02+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_add
"sub_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5267,6 +5546,7 @@
8.0xf7+8.0x12+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_add
"sub_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5285,6 +5565,7 @@
8.0xf7+8.0x22+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_sub
"sub_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5304,6 +5585,7 @@
8.0xf7+8.0x32+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_sub
"sub_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5322,6 +5604,7 @@
8.0xf7+8.0x42+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_cmp
"sub_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5339,6 +5622,7 @@
8.0xf7+8.0x52+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_cmp
"sub_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5355,6 +5639,7 @@
8.0xf7+8.0x62+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_mov
"sub_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5374,6 +5659,7 @@
8.0xf7+8.0x72+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_mov
"sub_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5392,6 +5678,7 @@
8.0xf7+8.0x82+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_asr
"sub_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5414,6 +5701,7 @@
8.0xf7+8.0x92+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_asr
"sub_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5435,6 +5723,7 @@
8.0xf7+8.0xa2+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_lsr
"sub_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5454,6 +5743,7 @@
8.0xf7+8.0xb2+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_lsr
"sub_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5473,6 +5763,7 @@
8.0xf7+8.0xc2+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sub_asl
"sub_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5492,6 +5783,7 @@
8.0xf7+8.0xd2+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sub_asl
"sub_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5510,6 +5802,7 @@
8.0xf7+8.0x03+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_add
"mov_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5529,6 +5822,7 @@
8.0xf7+8.0x13+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_add
"mov_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5547,6 +5841,7 @@
8.0xf7+8.0x23+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_sub
"mov_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5566,6 +5861,7 @@
8.0xf7+8.0x33+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_sub
"mov_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5584,6 +5880,7 @@
8.0xf7+8.0x43+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_cmp
"mov_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -5601,6 +5898,7 @@
8.0xf7+8.0x53+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_cmp
"mov_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -5617,6 +5915,7 @@
8.0xf7+8.0x63+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_mov
"mov_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5636,6 +5935,7 @@
8.0xf7+8.0x73+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_mov
"mov_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5654,6 +5954,7 @@
8.0xf7+8.0x83+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_asr
"mov_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5676,6 +5977,7 @@
8.0xf7+8.0x93+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_asr
"mov_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5697,6 +5999,7 @@
8.0xf7+8.0xa3+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_lsr
"mov_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5716,6 +6019,7 @@
8.0xf7+8.0xb3+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_lsr
"mov_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5735,6 +6039,7 @@
8.0xf7+8.0xc3+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::mov_asl
"mov_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -5754,6 +6059,7 @@
8.0xf7+8.0xd3+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::mov_asl
"mov_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -5772,6 +6078,7 @@
8.0xf7+8.0x04+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_add
"add_add"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -5790,6 +6097,7 @@
8.0xf7+8.0x14+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_add
"add_add"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -5807,6 +6115,7 @@
8.0xf7+8.0x24+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_sub
"add_sub"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -5825,6 +6134,7 @@
8.0xf7+8.0x34+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_sub
"add_sub"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -5842,6 +6152,7 @@
8.0xf7+8.0x44+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_cmp
"add_cmp"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -5858,6 +6169,7 @@
8.0xf7+8.0x54+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_cmp
"add_cmp"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -5873,6 +6185,7 @@
8.0xf7+8.0x64+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_mov
"add_mov"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -5891,6 +6204,7 @@
8.0xf7+8.0x74+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_mov
"add_mov"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -5908,6 +6222,7 @@
8.0xf7+8.0x84+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_asr
"add_asr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -5929,6 +6244,7 @@
8.0xf7+8.0x94+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_asr
"add_asr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -5949,6 +6265,7 @@
8.0xf7+8.0xa4+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_lsr
"add_lsr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -5967,6 +6284,7 @@
8.0xf7+8.0xb4+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_lsr
"add_lsr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -5985,6 +6303,7 @@
8.0xf7+8.0xc4+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::add_asl
"add_asl"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6003,6 +6322,7 @@
8.0xf7+8.0xd4+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::add_asl
"add_asl"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6020,6 +6340,7 @@
8.0xf7+8.0x05+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_add
"cmp_add"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6036,6 +6357,7 @@
8.0xf7+8.0x15+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_add
"cmp_add"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6051,6 +6373,7 @@
8.0xf7+8.0x25+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_sub
"cmp_sub"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6067,6 +6390,7 @@
8.0xf7+8.0x35+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_sub
"cmp_sub"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6082,6 +6406,7 @@
8.0xf7+8.0x65+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_mov
"cmp_mov"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6098,6 +6423,7 @@
8.0xf7+8.0x75+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_mov
"cmp_mov"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6113,6 +6439,7 @@
8.0xf7+8.0x85+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_asr
"cmp_asr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
signed int temp;
@@ -6132,6 +6459,7 @@
8.0xf7+8.0x95+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_asr
"cmp_asr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
signed int temp;
@@ -6150,6 +6478,7 @@
8.0xf7+8.0xa5+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_lsr
"cmp_lsr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6166,6 +6495,7 @@
8.0xf7+8.0xb5+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_lsr
"cmp_lsr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6182,6 +6512,7 @@
8.0xf7+8.0xc5+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::cmp_asl
"cmp_asl"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6198,6 +6529,7 @@
8.0xf7+8.0xd5+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::cmp_asl
"cmp_asl"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6213,6 +6545,7 @@
8.0xf7+8.0x06+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_add
"sub_add"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6231,6 +6564,7 @@
8.0xf7+8.0x16+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_add
"sub_add"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6248,6 +6582,7 @@
8.0xf7+8.0x26+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_sub
"sub_sub"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6266,6 +6601,7 @@
8.0xf7+8.0x36+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_sub
"sub_sub"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6283,6 +6619,7 @@
8.0xf7+8.0x46+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_cmp
"sub_cmp"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6299,6 +6636,7 @@
8.0xf7+8.0x56+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_cmp
"sub_cmp"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6314,6 +6652,7 @@
8.0xf7+8.0x66+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_mov
"sub_mov"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6332,6 +6671,7 @@
8.0xf7+8.0x76+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_mov
"sub_mov"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6349,6 +6689,7 @@
8.0xf7+8.0x86+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_asr
"sub_asr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6370,6 +6711,7 @@
8.0xf7+8.0x96+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_asr
"sub_asr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6390,6 +6732,7 @@
8.0xf7+8.0xa6+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_lsr
"sub_lsr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6408,6 +6751,7 @@
8.0xf7+8.0xb6+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_lsr
"sub_lsr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6426,6 +6770,7 @@
8.0xf7+8.0xc6+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::sub_asl
"sub_asl"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6444,6 +6789,7 @@
8.0xf7+8.0xd6+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::sub_asl
"sub_asl"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6461,6 +6807,7 @@
8.0xf7+8.0x07+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_add
"mov_add"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6479,6 +6826,7 @@
8.0xf7+8.0x17+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_add
"mov_add"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6496,6 +6844,7 @@
8.0xf7+8.0x27+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_sub
"mov_sub"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6514,6 +6863,7 @@
8.0xf7+8.0x37+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_sub
"mov_sub"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6531,6 +6881,7 @@
8.0xf7+8.0x47+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_cmp
"mov_cmp"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
@@ -6547,6 +6898,7 @@
8.0xf7+8.0x57+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_cmp
"mov_cmp"
*am33
+*am33_2
{
int dstreg1, dstreg2;
@@ -6562,6 +6914,7 @@
8.0xf7+8.0x67+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_mov
"mov_mov"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6580,6 +6933,7 @@
8.0xf7+8.0x77+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_mov
"mov_mov"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6597,6 +6951,7 @@
8.0xf7+8.0x87+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_asr
"mov_asr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6618,6 +6973,7 @@
8.0xf7+8.0x97+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_asr
"mov_asr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6638,6 +6994,7 @@
8.0xf7+8.0xa7+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_lsr
"mov_lsr"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6656,6 +7013,7 @@
8.0xf7+8.0xb7+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_lsr
"mov_lsr"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6674,6 +7032,7 @@
8.0xf7+8.0xc7+4.IMM4A,4.RN1+4.RM2,4.RN2!RN1:D2c:::mov_asl
"mov_asl"
*am33
+*am33_2
{
int srcreg2, dstreg1, dstreg2;
int result1;
@@ -6692,6 +7051,7 @@
8.0xf7+8.0xd7+4.IMM4A,4.RN1+4.IMM4,4.RN2!RN1:D2d:::mov_asl
"mov_asl"
*am33
+*am33_2
{
int dstreg1, dstreg2;
int result1;
@@ -6709,6 +7069,7 @@
8.0xf7+8.0x08+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_add
"and_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6728,6 +7089,7 @@
8.0xf7+8.0x18+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_add
"and_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6746,6 +7108,7 @@
8.0xf7+8.0x28+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_sub
"and_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6765,6 +7128,7 @@
8.0xf7+8.0x38+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_sub
"and_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6783,6 +7147,7 @@
8.0xf7+8.0x48+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_cmp
"and_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -6800,6 +7165,7 @@
8.0xf7+8.0x58+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_cmp
"and_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -6816,6 +7182,7 @@
8.0xf7+8.0x68+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_mov
"and_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6835,6 +7202,7 @@
8.0xf7+8.0x78+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_mov
"and_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6853,6 +7221,7 @@
8.0xf7+8.0x88+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_asr
"and_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6875,6 +7244,7 @@
8.0xf7+8.0x98+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_asr
"and_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6896,6 +7266,7 @@
8.0xf7+8.0xa8+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_lsr
"and_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6915,6 +7286,7 @@
8.0xf7+8.0xb8+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_lsr
"and_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6934,6 +7306,7 @@
8.0xf7+8.0xc8+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::and_asl
"and_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -6953,6 +7326,7 @@
8.0xf7+8.0xd8+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::and_asl
"and_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -6971,6 +7345,7 @@
8.0xf7+8.0x09+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_add
"dmach_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -6995,6 +7370,7 @@
8.0xf7+8.0x19+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_add
"dmach_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7018,6 +7394,7 @@
8.0xf7+8.0x29+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_sub
"dmach_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7042,6 +7419,7 @@
8.0xf7+8.0x39+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_sub
"dmach_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7065,6 +7443,7 @@
8.0xf7+8.0x49+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_cmp
"dmach_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7089,6 +7468,7 @@
8.0xf7+8.0x59+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_cmp
"dmach_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7112,6 +7492,7 @@
8.0xf7+8.0x69+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_mov
"dmach_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7136,6 +7517,7 @@
8.0xf7+8.0x79+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_mov
"dmach_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7159,6 +7541,7 @@
8.0xf7+8.0x89+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_asr
"dmach_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7185,6 +7568,7 @@
8.0xf7+8.0x99+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_asr
"dmach_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7210,6 +7594,7 @@
8.0xf7+8.0xa9+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_lsr
"dmach_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7234,6 +7619,7 @@
8.0xf7+8.0xb9+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_lsr
"dmach_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7258,6 +7644,7 @@
8.0xf7+8.0xc9+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::dmach_asl
"dmach_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7282,6 +7669,7 @@
8.0xf7+8.0xd9+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::dmach_asl
"dmach_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
signed32 temp, temp2, sum;
@@ -7305,6 +7693,7 @@
8.0xf7+8.0x0a+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_add
"xor_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7324,6 +7713,7 @@
8.0xf7+8.0x1a+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_add
"xor_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7342,6 +7732,7 @@
8.0xf7+8.0x2a+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_sub
"xor_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7361,6 +7752,7 @@
8.0xf7+8.0x3a+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_sub
"xor_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7379,6 +7771,7 @@
8.0xf7+8.0x4a+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_cmp
"xor_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -7396,6 +7789,7 @@
8.0xf7+8.0x5a+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_cmp
"xor_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -7412,6 +7806,7 @@
8.0xf7+8.0x6a+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_mov
"xor_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7431,6 +7826,7 @@
8.0xf7+8.0x7a+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_mov
"xor_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7449,6 +7845,7 @@
8.0xf7+8.0x8a+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_asr
"xor_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7471,6 +7868,7 @@
8.0xf7+8.0x9a+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_asr
"xor_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7492,6 +7890,7 @@
8.0xf7+8.0xaa+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_lsr
"xor_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7511,6 +7910,7 @@
8.0xf7+8.0xba+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_lsr
"xor_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7530,6 +7930,7 @@
8.0xf7+8.0xca+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::xor_asl
"xor_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7549,6 +7950,7 @@
8.0xf7+8.0xda+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::xor_asl
"xor_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7567,6 +7969,7 @@
8.0xf7+8.0x0b+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_add
"swhw_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7586,6 +7989,7 @@
8.0xf7+8.0x1b+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_add
"swhw_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7605,6 +8009,7 @@
8.0xf7+8.0x2b+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_sub
"swhw_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7625,6 +8030,7 @@
8.0xf7+8.0x3b+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_sub
"swhw_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7644,6 +8050,7 @@
8.0xf7+8.0x4b+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_cmp
"swhw_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -7662,6 +8069,7 @@
8.0xf7+8.0x5b+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_cmp
"swhw_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -7679,6 +8087,7 @@
8.0xf7+8.0x6b+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_mov
"swhw_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7699,6 +8108,7 @@
8.0xf7+8.0x7b+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_mov
"swhw_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7718,6 +8128,7 @@
8.0xf7+8.0x8b+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_asr
"swhw_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7741,6 +8152,7 @@
8.0xf7+8.0x9b+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_asr
"swhw_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7763,6 +8175,7 @@
8.0xf7+8.0xab+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_lsr
"swhw_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7783,6 +8196,7 @@
8.0xf7+8.0xbb+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_lsr
"swhw_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7803,6 +8217,7 @@
8.0xf7+8.0xcb+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::swhw_asl
"swhw_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7823,6 +8238,7 @@
8.0xf7+8.0xdb+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::swhw_asl
"swhw_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7842,6 +8258,7 @@
8.0xf7+8.0x0c+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_add
"or_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7861,6 +8278,7 @@
8.0xf7+8.0x1c+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_add
"or_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7879,6 +8297,7 @@
8.0xf7+8.0x2c+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_sub
"or_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7898,6 +8317,7 @@
8.0xf7+8.0x3c+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_sub
"or_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7916,6 +8336,7 @@
8.0xf7+8.0x4c+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_cmp
"or_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -7933,6 +8354,7 @@
8.0xf7+8.0x5c+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_cmp
"or_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -7949,6 +8371,7 @@
8.0xf7+8.0x6c+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_mov
"or_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -7968,6 +8391,7 @@
8.0xf7+8.0x7c+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_mov
"or_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -7986,6 +8410,7 @@
8.0xf7+8.0x8c+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_asr
"or_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8008,6 +8433,7 @@
8.0xf7+8.0x9c+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_asr
"or_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8029,6 +8455,7 @@
8.0xf7+8.0xac+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_lsr
"or_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8048,6 +8475,7 @@
8.0xf7+8.0xbc+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_lsr
"or_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8067,6 +8495,7 @@
8.0xf7+8.0xcc+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::or_asl
"or_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8086,6 +8515,7 @@
8.0xf7+8.0xdc+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::or_asl
"or_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8104,6 +8534,7 @@
8.0xf7+8.0x0d+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_add
"sat16_add"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8129,6 +8560,7 @@
8.0xf7+8.0x1d+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_add
"sat16_add"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8153,6 +8585,7 @@
8.0xf7+8.0x2d+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_sub
"sat16_sub"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8178,6 +8611,7 @@
8.0xf7+8.0x3d+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_sub
"sat16_sub"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8202,6 +8636,7 @@
8.0xf7+8.0x4d+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_cmp
"sat16_cmp"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
@@ -8224,6 +8659,7 @@
8.0xf7+8.0x5d+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_cmp
"sat16_cmp"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
@@ -8245,6 +8681,7 @@
8.0xf7+8.0x6d+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_mov
"sat16_mov"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8270,6 +8707,7 @@
8.0xf7+8.0x7d+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_mov
"sat16_mov"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8294,6 +8732,7 @@
8.0xf7+8.0x8d+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_asr
"sat16_asr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8322,6 +8761,7 @@
8.0xf7+8.0x9d+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_asr
"sat16_asr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8349,6 +8789,7 @@
8.0xf7+8.0xad+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_lsr
"sat16_lsr"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8374,6 +8815,7 @@
8.0xf7+8.0xbd+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_lsr
"sat16_lsr"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8399,6 +8841,7 @@
8.0xf7+8.0xcd+4.RM1,4.RN1+4.RM2,4.RN2!RN1:D2:::sat16_asl
"sat16_asl"
*am33
+*am33_2
{
int srcreg1, srcreg2, dstreg1, dstreg2;
int result1;
@@ -8424,6 +8867,7 @@
8.0xf7+8.0xdd+4.RM1,4.RN1+4.IMM4,4.RN2!RN1:D2b:::sat16_asl
"sat16_asl"
*am33
+*am33_2
{
int srcreg1, dstreg1, dstreg2;
int result1;
@@ -8448,6 +8892,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x0:D2:::mov_llt
"mov_llt"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8469,6 +8914,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x1:D2:::mov_lgt
"mov_lgt"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8491,6 +8937,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x2:D2:::mov_lge
"mov_lge"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8512,6 +8959,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x3:D2:::mov_lle
"mov_lle"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8534,6 +8982,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x4:D2:::mov_lcs
"mov_lcs"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8555,6 +9004,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x5:D2:::mov_lhi
"mov_lhi"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8576,6 +9026,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x6:D2:::mov_lcc
"mov_lcc"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8597,6 +9048,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x7:D2:::mov_lls
"mov_lls"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8618,6 +9070,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x8:D2:::mov_leq
"mov_leq"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8639,6 +9092,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0x9:D2:::mov_lne
"mov_lne"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8660,6 +9114,7 @@
8.0xf7+8.0xe0+4.RN,4.RM!RN+4.IMM4,4.0xa:D2:::mov_lra
"mov_lra"
*am33
+*am33_2
{
int srcreg, dstreg;
@@ -8674,3 +9129,4 @@
nia = PC;
}
+:include::am33_2:am33-2.igen
diff --git a/sim/mn10300/configure.in b/sim/mn10300/configure.in
index 8160609d690..aa6e3b13d7a 100644
--- a/sim/mn10300/configure.in
+++ b/sim/mn10300/configure.in
@@ -18,20 +18,4 @@ SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop)
AC_CHECK_FUNCS(time chmod utime fork execve execv chown)
AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h utime.h time.h)
-#
-# Enable common
-#
-AC_ARG_ENABLE(sim-common,
-[ --enable-sim-common Enable common simulator],
-[case "${enableval}" in
- yes) sim_gen="-DWITH_COMMON=1"; mn10300_common="WITH";;
- no) sim_gen="-DWITH_COMMON=0"; mn10300_common="WITHOUT";;
- *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-common"); sim_gen="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_gen" != x""; then
- echo "Setting sim_common = $sim_common" 6>&1
-fi],[sim_gen="-DWITH_COMMON=1"; mn10300_common="WITH"])dnl
-AC_SUBST(sim_gen)
-AC_SUBST(mn10300_common)
-
SIM_AC_OUTPUT
diff --git a/sim/mn10300/gencode.c b/sim/mn10300/gencode.c
deleted file mode 100644
index bef312c0e83..00000000000
--- a/sim/mn10300/gencode.c
+++ /dev/null
@@ -1,163 +0,0 @@
-#include "mn10300_sim.h"
-
-static void write_header PARAMS ((void));
-static void write_opcodes PARAMS ((void));
-static void write_template PARAMS ((void));
-
-long Opcodes[512];
-static int curop=0;
-
-int
-main (argc, argv)
- int argc;
- char *argv[];
-{
- if ((argc > 1) && (strcmp (argv[1], "-h") == 0))
- write_header();
- else if ((argc > 1) && (strcmp (argv[1], "-t") == 0))
- write_template ();
- else
- write_opcodes();
- return 0;
-}
-
-
-static void
-write_header ()
-{
- struct mn10300_opcode *opcode;
-
- for (opcode = (struct mn10300_opcode *)mn10300_opcodes; opcode->name; opcode++)
- printf("void OP_%X PARAMS ((unsigned long, unsigned long));\t\t/* %s */\n",
- opcode->opcode, opcode->name);
-}
-
-
-/* write_template creates a file all required functions, ready */
-/* to be filled out */
-
-static void
-write_template ()
-{
- struct mn10300_opcode *opcode;
- int i,j;
-
- printf ("#include \"mn10300_sim.h\"\n");
- printf ("#include \"simops.h\"\n");
-
- for (opcode = (struct mn10300_opcode *)mn10300_opcodes; opcode->name; opcode++)
- {
- printf("/* %s */\nvoid\nOP_%X (insn, extension)\n unsigned long insn, extension;\n{\n", opcode->name, opcode->opcode);
-
- /* count operands */
- j = 0;
- for (i = 0; i < 6; i++)
- {
- int flags = mn10300_operands[opcode->operands[i]].flags;
-
- if (flags)
- j++;
- }
- switch (j)
- {
- case 0:
- printf ("printf(\" %s\\n\");\n", opcode->name);
- break;
- case 1:
- printf ("printf(\" %s\\t%%x\\n\", OP[0]);\n", opcode->name);
- break;
- case 2:
- printf ("printf(\" %s\\t%%x,%%x\\n\",OP[0],OP[1]);\n",
- opcode->name);
- break;
- case 3:
- printf ("printf(\" %s\\t%%x,%%x,%%x\\n\",OP[0],OP[1],OP[2]);\n",
- opcode->name);
- break;
- default:
- fprintf (stderr,"Too many operands: %d\n", j);
- }
- printf ("}\n\n");
- }
-}
-
-static void
-write_opcodes ()
-{
- struct mn10300_opcode *opcode;
- int i, j;
- int numops;
-
- /* write out opcode table */
- printf ("#include \"mn10300_sim.h\"\n");
- printf ("#include \"simops.h\"\n\n");
- printf ("struct simops Simops[] = {\n");
-
- for (opcode = (struct mn10300_opcode *)mn10300_opcodes; opcode->name; opcode++)
- {
- int size;
-
- if (opcode->format == FMT_S0)
- size = 1;
- else if (opcode->format == FMT_S1
- || opcode->format == FMT_D0)
- size = 2;
- else if (opcode->format == FMT_S2
- || opcode->format == FMT_D1)
- size = 3;
- else if (opcode->format == FMT_S4)
- size = 5;
- else if (opcode->format == FMT_D2)
- size = 4;
- else if (opcode->format == FMT_D4)
- size = 6;
- else
- size = 7;
-
- printf (" { 0x%x,0x%x,OP_%X,%d,%d,",
- opcode->opcode, opcode->mask, opcode->opcode,
- size, opcode->format);
-
- Opcodes[curop++] = opcode->opcode;
-
- /* count operands */
- j = 0;
- for (i = 0; i < 6; i++)
- {
- int flags = mn10300_operands[opcode->operands[i]].flags;
-
- if (flags)
- j++;
- }
- printf ("%d,{",j);
-
- j = 0;
- numops = 0;
- for (i = 0; i < 6; i++)
- {
- int flags = mn10300_operands[opcode->operands[i]].flags;
- int shift = mn10300_operands[opcode->operands[i]].shift;
-
- if (flags)
- {
- if (j)
- printf (", ");
- printf ("%d,%d,%d", shift,
- mn10300_operands[opcode->operands[i]].bits,flags);
- j = 1;
- numops++;
- }
- }
-
- switch (numops)
- {
- case 0:
- printf ("0,0,0");
- case 1:
- printf (",0,0,0");
- }
-
- printf ("}},\n");
- }
- printf ("{ 0,0,NULL,0,0,0,{0,0,0,0,0,0}},\n};\n");
-}
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index fd93b6dabb6..6beac4802f9 100644
--- a/sim/mn10300/interp.c
+++ b/sim/mn10300/interp.c
@@ -1,12 +1,8 @@
#include <signal.h>
-#if WITH_COMMON
#include "sim-main.h"
#include "sim-options.h"
#include "sim-hw.h"
-#else
-#include "mn10300_sim.h"
-#endif
#include "sysdep.h"
#include "bfd.h"
@@ -51,12 +47,11 @@ enum {
};
static SIM_RC
-mn10300_option_handler (sd, cpu, opt, arg, is_command)
- SIM_DESC sd;
- sim_cpu *cpu;
- int opt;
- char *arg;
- int is_command;
+mn10300_option_handler (SIM_DESC sd,
+ sim_cpu *cpu,
+ int opt,
+ char *arg,
+ int is_command)
{
int cpu_nr;
switch (opt)
@@ -86,868 +81,16 @@ static const OPTION mn10300_options[] =
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL }
};
-#if WITH_COMMON
-#else
-static void dispatch PARAMS ((uint32, uint32, int));
-static long hash PARAMS ((long));
-static void init_system PARAMS ((void));
-
-static SIM_OPEN_KIND sim_kind;
-static char *myname;
-#define MAX_HASH 127
-
-struct hash_entry
-{
- struct hash_entry *next;
- long opcode;
- long mask;
- struct simops *ops;
-#ifdef HASH_STAT
- unsigned long count;
-#endif
-};
-
-static int max_mem = 0;
-struct hash_entry hash_table[MAX_HASH+1];
-
-
-/* This probably doesn't do a very good job at bucket filling, but
- it's simple... */
-static INLINE long
-hash(insn)
- long insn;
-{
- /* These are one byte insns, we special case these since, in theory,
- they should be the most heavily used. */
- if ((insn & 0xffffff00) == 0)
- {
- switch (insn & 0xf0)
- {
- case 0x00:
- return 0x70;
-
- case 0x40:
- return 0x71;
-
- case 0x10:
- return 0x72;
-
- case 0x30:
- return 0x73;
-
- case 0x50:
- return 0x74;
-
- case 0x60:
- return 0x75;
-
- case 0x70:
- return 0x76;
-
- case 0x80:
- return 0x77;
-
- case 0x90:
- return 0x78;
-
- case 0xa0:
- return 0x79;
-
- case 0xb0:
- return 0x7a;
-
- case 0xe0:
- return 0x7b;
-
- default:
- return 0x7c;
- }
- }
-
- /* These are two byte insns */
- if ((insn & 0xffff0000) == 0)
- {
- if ((insn & 0xf000) == 0x2000
- || (insn & 0xf000) == 0x5000)
- return ((insn & 0xfc00) >> 8) & 0x7f;
-
- if ((insn & 0xf000) == 0x4000)
- return ((insn & 0xf300) >> 8) & 0x7f;
-
- if ((insn & 0xf000) == 0x8000
- || (insn & 0xf000) == 0x9000
- || (insn & 0xf000) == 0xa000
- || (insn & 0xf000) == 0xb000)
- return ((insn & 0xf000) >> 8) & 0x7f;
-
- if ((insn & 0xff00) == 0xf000
- || (insn & 0xff00) == 0xf100
- || (insn & 0xff00) == 0xf200
- || (insn & 0xff00) == 0xf500
- || (insn & 0xff00) == 0xf600)
- return ((insn & 0xfff0) >> 4) & 0x7f;
-
- if ((insn & 0xf000) == 0xc000)
- return ((insn & 0xff00) >> 8) & 0x7f;
-
- return ((insn & 0xffc0) >> 6) & 0x7f;
- }
-
- /* These are three byte insns. */
- if ((insn & 0xff000000) == 0)
- {
- if ((insn & 0xf00000) == 0x000000)
- return ((insn & 0xf30000) >> 16) & 0x7f;
-
- if ((insn & 0xf00000) == 0x200000
- || (insn & 0xf00000) == 0x300000)
- return ((insn & 0xfc0000) >> 16) & 0x7f;
-
- if ((insn & 0xff0000) == 0xf80000)
- return ((insn & 0xfff000) >> 12) & 0x7f;
-
- if ((insn & 0xff0000) == 0xf90000)
- return ((insn & 0xfffc00) >> 10) & 0x7f;
-
- return ((insn & 0xff0000) >> 16) & 0x7f;
- }
-
- /* These are four byte or larger insns. */
- if ((insn & 0xf0000000) == 0xf0000000)
- return ((insn & 0xfff00000) >> 20) & 0x7f;
-
- return ((insn & 0xff000000) >> 24) & 0x7f;
-}
-
-static INLINE void
-dispatch (insn, extension, length)
- uint32 insn;
- uint32 extension;
- int length;
-{
- struct hash_entry *h;
-
- h = &hash_table[hash(insn)];
-
- while ((insn & h->mask) != h->opcode
- || (length != h->ops->length))
- {
- if (!h->next)
- {
- (*mn10300_callback->printf_filtered) (mn10300_callback,
- "ERROR looking up hash for 0x%x, PC=0x%x\n", insn, PC);
- exit(1);
- }
- h = h->next;
- }
-
-
-#ifdef HASH_STAT
- h->count++;
-#endif
-
- /* Now call the right function. */
- (h->ops->func)(insn, extension);
- PC += length;
-}
-
-void
-sim_size (power)
- int power;
-
-{
- if (State.mem)
- free (State.mem);
-
- max_mem = 1 << power;
- State.mem = (uint8 *) calloc (1, 1 << power);
- if (!State.mem)
- {
- (*mn10300_callback->printf_filtered) (mn10300_callback, "Allocation of main memory failed.\n");
- exit (1);
- }
-}
-
-static void
-init_system ()
-{
- if (!State.mem)
- sim_size(19);
-}
-
-int
-sim_write (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
-{
- int i;
-
- init_system ();
-
- for (i = 0; i < size; i++)
- store_byte (addr + i, buffer[i]);
-
- return size;
-}
-
-/* Compare two opcode table entries for qsort. */
-static int
-compare_simops (arg1, arg2)
- const PTR arg1;
- const PTR arg2;
-{
- unsigned long code1 = ((struct simops *)arg1)->opcode;
- unsigned long code2 = ((struct simops *)arg2)->opcode;
-
- if (code1 < code2)
- return -1;
- if (code2 < code1)
- return 1;
- return 0;
-}
-
-SIM_DESC
-sim_open (kind, cb, abfd, argv)
- SIM_OPEN_KIND kind;
- host_callback *cb;
- struct bfd *abfd;
- char **argv;
-{
- struct simops *s;
- struct hash_entry *h;
- char **p;
- int i;
-
- mn10300_callback = cb;
-
- /* Sort the opcode array from smallest opcode to largest.
- This will generally improve simulator performance as the smaller
- opcodes are generally preferred to the larger opcodes. */
- for (i = 0, s = Simops; s->func; s++, i++)
- ;
- qsort (Simops, i, sizeof (Simops[0]), compare_simops);
-
- sim_kind = kind;
- myname = argv[0];
-
- for (p = argv + 1; *p; ++p)
- {
- if (strcmp (*p, "-E") == 0)
- ++p; /* ignore endian spec */
- else
-#ifdef DEBUG
- if (strcmp (*p, "-t") == 0)
- mn10300_debug = DEBUG;
- else
-#endif
- (*mn10300_callback->printf_filtered) (mn10300_callback, "ERROR: unsupported option(s): %s\n",*p);
- }
-
- /* put all the opcodes in the hash table */
- for (s = Simops; s->func; s++)
- {
- h = &hash_table[hash(s->opcode)];
-
- /* go to the last entry in the chain */
- while (h->next)
- {
- /* Don't insert the same opcode more than once. */
- if (h->opcode == s->opcode
- && h->mask == s->mask
- && h->ops == s)
- break;
- else
- h = h->next;
- }
-
- /* Don't insert the same opcode more than once. */
- if (h->opcode == s->opcode
- && h->mask == s->mask
- && h->ops == s)
- continue;
-
- if (h->ops)
- {
- h->next = calloc(1,sizeof(struct hash_entry));
- h = h->next;
- }
- h->ops = s;
- h->mask = s->mask;
- h->opcode = s->opcode;
-#if HASH_STAT
- h->count = 0;
-#endif
- }
-
-
- /* fudge our descriptor for now */
- return (SIM_DESC) 1;
-}
-
-
-void
-sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
-{
- /* nothing to do */
-}
-
-void
-sim_set_profile (n)
- int n;
-{
- (*mn10300_callback->printf_filtered) (mn10300_callback, "sim_set_profile %d\n", n);
-}
-
-void
-sim_set_profile_size (n)
- int n;
-{
- (*mn10300_callback->printf_filtered) (mn10300_callback, "sim_set_profile_size %d\n", n);
-}
-
-int
-sim_stop (sd)
- SIM_DESC sd;
-{
- return 0;
-}
-
-void
-sim_resume (sd, step, siggnal)
- SIM_DESC sd;
- int step, siggnal;
-{
- uint32 inst;
- reg_t oldpc;
- struct hash_entry *h;
-
- if (step)
- State.exception = SIGTRAP;
- else
- State.exception = 0;
-
- State.exited = 0;
-
- do
- {
- unsigned long insn, extension;
-
- /* Fetch the current instruction. */
- inst = load_mem_big (PC, 2);
- oldpc = PC;
-
- /* Using a giant case statement may seem like a waste because of the
- code/rodata size the table itself will consume. However, using
- a giant case statement speeds up the simulator by 10-15% by avoiding
- cascading if/else statements or cascading case statements. */
-
- switch ((inst >> 8) & 0xff)
- {
- /* All the single byte insns except 0x80, 0x90, 0xa0, 0xb0
- which must be handled specially. */
- case 0x00:
- case 0x04:
- case 0x08:
- case 0x0c:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- case 0x19:
- case 0x1a:
- case 0x1b:
- case 0x1c:
- case 0x1d:
- case 0x1e:
- case 0x1f:
- case 0x3c:
- case 0x3d:
- case 0x3e:
- case 0x3f:
- case 0x40:
- case 0x41:
- case 0x44:
- case 0x45:
- case 0x48:
- case 0x49:
- case 0x4c:
- case 0x4d:
- case 0x50:
- case 0x51:
- case 0x52:
- case 0x53:
- case 0x54:
- case 0x55:
- case 0x56:
- case 0x57:
- case 0x60:
- case 0x61:
- case 0x62:
- case 0x63:
- case 0x64:
- case 0x65:
- case 0x66:
- case 0x67:
- case 0x68:
- case 0x69:
- case 0x6a:
- case 0x6b:
- case 0x6c:
- case 0x6d:
- case 0x6e:
- case 0x6f:
- case 0x70:
- case 0x71:
- case 0x72:
- case 0x73:
- case 0x74:
- case 0x75:
- case 0x76:
- case 0x77:
- case 0x78:
- case 0x79:
- case 0x7a:
- case 0x7b:
- case 0x7c:
- case 0x7d:
- case 0x7e:
- case 0x7f:
- case 0xcb:
- case 0xd0:
- case 0xd1:
- case 0xd2:
- case 0xd3:
- case 0xd4:
- case 0xd5:
- case 0xd6:
- case 0xd7:
- case 0xd8:
- case 0xd9:
- case 0xda:
- case 0xdb:
- case 0xe0:
- case 0xe1:
- case 0xe2:
- case 0xe3:
- case 0xe4:
- case 0xe5:
- case 0xe6:
- case 0xe7:
- case 0xe8:
- case 0xe9:
- case 0xea:
- case 0xeb:
- case 0xec:
- case 0xed:
- case 0xee:
- case 0xef:
- case 0xff:
- insn = (inst >> 8) & 0xff;
- extension = 0;
- dispatch (insn, extension, 1);
- break;
-
- /* Special cases where dm == dn is used to encode a different
- instruction. */
- case 0x80:
- case 0x85:
- case 0x8a:
- case 0x8f:
- case 0x90:
- case 0x95:
- case 0x9a:
- case 0x9f:
- case 0xa0:
- case 0xa5:
- case 0xaa:
- case 0xaf:
- case 0xb0:
- case 0xb5:
- case 0xba:
- case 0xbf:
- insn = inst;
- extension = 0;
- dispatch (insn, extension, 2);
- break;
-
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8b:
- case 0x8c:
- case 0x8d:
- case 0x8e:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9b:
- case 0x9c:
- case 0x9d:
- case 0x9e:
- case 0xa1:
- case 0xa2:
- case 0xa3:
- case 0xa4:
- case 0xa6:
- case 0xa7:
- case 0xa8:
- case 0xa9:
- case 0xab:
- case 0xac:
- case 0xad:
- case 0xae:
- case 0xb1:
- case 0xb2:
- case 0xb3:
- case 0xb4:
- case 0xb6:
- case 0xb7:
- case 0xb8:
- case 0xb9:
- case 0xbb:
- case 0xbc:
- case 0xbd:
- case 0xbe:
- insn = (inst >> 8) & 0xff;
- extension = 0;
- dispatch (insn, extension, 1);
- break;
-
- /* The two byte instructions. */
- case 0x20:
- case 0x21:
- case 0x22:
- case 0x23:
- case 0x28:
- case 0x29:
- case 0x2a:
- case 0x2b:
- case 0x42:
- case 0x43:
- case 0x46:
- case 0x47:
- case 0x4a:
- case 0x4b:
- case 0x4e:
- case 0x4f:
- case 0x58:
- case 0x59:
- case 0x5a:
- case 0x5b:
- case 0x5c:
- case 0x5d:
- case 0x5e:
- case 0x5f:
- case 0xc0:
- case 0xc1:
- case 0xc2:
- case 0xc3:
- case 0xc4:
- case 0xc5:
- case 0xc6:
- case 0xc7:
- case 0xc8:
- case 0xc9:
- case 0xca:
- case 0xce:
- case 0xcf:
- case 0xf0:
- case 0xf1:
- case 0xf2:
- case 0xf3:
- case 0xf4:
- case 0xf5:
- case 0xf6:
- insn = inst;
- extension = 0;
- dispatch (insn, extension, 2);
- break;
-
- /* The three byte insns with a 16bit operand in little endian
- format. */
- case 0x01:
- case 0x02:
- case 0x03:
- case 0x05:
- case 0x06:
- case 0x07:
- case 0x09:
- case 0x0a:
- case 0x0b:
- case 0x0d:
- case 0x0e:
- case 0x0f:
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
- case 0x2c:
- case 0x2d:
- case 0x2e:
- case 0x2f:
- case 0x30:
- case 0x31:
- case 0x32:
- case 0x33:
- case 0x34:
- case 0x35:
- case 0x36:
- case 0x37:
- case 0x38:
- case 0x39:
- case 0x3a:
- case 0x3b:
- case 0xcc:
- insn = load_byte (PC);
- insn <<= 16;
- insn |= load_half (PC + 1);
- extension = 0;
- dispatch (insn, extension, 3);
- break;
-
- /* The three byte insns without 16bit operand. */
- case 0xde:
- case 0xdf:
- case 0xf8:
- case 0xf9:
- insn = load_mem_big (PC, 3);
- extension = 0;
- dispatch (insn, extension, 3);
- break;
-
- /* Four byte insns. */
- case 0xfa:
- case 0xfb:
- if ((inst & 0xfffc) == 0xfaf0
- || (inst & 0xfffc) == 0xfaf4
- || (inst & 0xfffc) == 0xfaf8)
- insn = load_mem_big (PC, 4);
- else
- {
- insn = inst;
- insn <<= 16;
- insn |= load_half (PC + 2);
- extension = 0;
- }
- dispatch (insn, extension, 4);
- break;
-
- /* Five byte insns. */
- case 0xcd:
- insn = load_byte (PC);
- insn <<= 24;
- insn |= (load_half (PC + 1) << 8);
- insn |= load_byte (PC + 3);
- extension = load_byte (PC + 4);
- dispatch (insn, extension, 5);
- break;
-
- case 0xdc:
- insn = load_byte (PC);
- insn <<= 24;
- extension = load_word (PC + 1);
- insn |= (extension & 0xffffff00) >> 8;
- extension &= 0xff;
- dispatch (insn, extension, 5);
- break;
-
- /* Six byte insns. */
- case 0xfc:
- case 0xfd:
- insn = (inst << 16);
- extension = load_word (PC + 2);
- insn |= ((extension & 0xffff0000) >> 16);
- extension &= 0xffff;
- dispatch (insn, extension, 6);
- break;
-
- case 0xdd:
- insn = load_byte (PC) << 24;
- extension = load_word (PC + 1);
- insn |= ((extension >> 8) & 0xffffff);
- extension = (extension & 0xff) << 16;
- extension |= load_byte (PC + 5) << 8;
- extension |= load_byte (PC + 6);
- dispatch (insn, extension, 7);
- break;
-
- case 0xfe:
- insn = inst << 16;
- extension = load_word (PC + 2);
- insn |= ((extension >> 16) & 0xffff);
- extension <<= 8;
- extension &= 0xffff00;
- extension |= load_byte (PC + 6);
- dispatch (insn, extension, 7);
- break;
-
- default:
- abort ();
- }
- }
- while (!State.exception);
-
-#ifdef HASH_STAT
- {
- int i;
- for (i = 0; i < MAX_HASH; i++)
- {
- struct hash_entry *h;
- h = &hash_table[i];
-
- printf("hash 0x%x:\n", i);
-
- while (h)
- {
- printf("h->opcode = 0x%x, count = 0x%x\n", h->opcode, h->count);
- h = h->next;
- }
-
- printf("\n\n");
- }
- fflush (stdout);
- }
-#endif
-
-}
-
-int
-sim_trace (sd)
- SIM_DESC sd;
-{
-#ifdef DEBUG
- mn10300_debug = DEBUG;
-#endif
- sim_resume (sd, 0, 0);
- return 1;
-}
-
-void
-sim_info (sd, verbose)
- SIM_DESC sd;
- int verbose;
-{
- (*mn10300_callback->printf_filtered) (mn10300_callback, "sim_info\n");
-}
-
-SIM_RC
-sim_create_inferior (sd, abfd, argv, env)
- SIM_DESC sd;
- struct bfd *abfd;
- char **argv;
- char **env;
-{
- if (abfd != NULL)
- PC = bfd_get_start_address (abfd);
- else
- PC = 0;
- return SIM_RC_OK;
-}
-
-void
-sim_set_callbacks (p)
- host_callback *p;
-{
- mn10300_callback = p;
-}
-
-/* All the code for exiting, signals, etc needs to be revamped.
-
- This is enough to get c-torture limping though. */
-
-void
-sim_stop_reason (sd, reason, sigrc)
- SIM_DESC sd;
- enum sim_stop *reason;
- int *sigrc;
-{
- if (State.exited)
- *reason = sim_exited;
- else
- *reason = sim_stopped;
-
- if (State.exception == SIGQUIT)
- *sigrc = 0;
- else
- *sigrc = State.exception;
-}
-
-int
-sim_read (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
-{
- int i;
- for (i = 0; i < size; i++)
- buffer[i] = load_byte (addr + i);
-
- return size;
-}
-
-void
-sim_do_command (sd, cmd)
- SIM_DESC sd;
- char *cmd;
-{
- (*mn10300_callback->printf_filtered) (mn10300_callback, "\"%s\" is not a valid mn10300 simulator command.\n", cmd);
-}
-
-SIM_RC
-sim_load (sd, prog, abfd, from_tty)
- SIM_DESC sd;
- char *prog;
- bfd *abfd;
- int from_tty;
-{
- extern bfd *sim_load_file (); /* ??? Don't know where this should live. */
- bfd *prog_bfd;
-
- prog_bfd = sim_load_file (sd, myname, mn10300_callback, prog, abfd,
- sim_kind == SIM_OPEN_DEBUG,
- 0, sim_write);
- if (prog_bfd == NULL)
- return SIM_RC_FAIL;
- if (abfd == NULL)
- bfd_close (prog_bfd);
- return SIM_RC_OK;
-}
-#endif /* not WITH_COMMON */
-
-
-#if WITH_COMMON
-
/* For compatibility */
SIM_DESC simulator;
/* These default values correspond to expected usage for the chip. */
SIM_DESC
-sim_open (kind, cb, abfd, argv)
- SIM_OPEN_KIND kind;
- host_callback *cb;
- struct bfd *abfd;
- char **argv;
+sim_open (SIM_OPEN_KIND kind,
+ host_callback *cb,
+ struct bfd *abfd,
+ char **argv)
{
SIM_DESC sd = sim_state_alloc (kind, cb);
mn10300_callback = cb;
@@ -1159,20 +302,17 @@ sim_open (kind, cb, abfd, argv)
void
-sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
+sim_close (SIM_DESC sd, int quitting)
{
sim_module_uninstall (sd);
}
SIM_RC
-sim_create_inferior (sd, prog_bfd, argv, env)
- SIM_DESC sd;
- struct bfd *prog_bfd;
- char **argv;
- char **env;
+sim_create_inferior (SIM_DESC sd,
+ struct bfd *prog_bfd,
+ char **argv,
+ char **env)
{
memset (&State, 0, sizeof (State));
if (prog_bfd != NULL) {
@@ -1182,13 +322,14 @@ sim_create_inferior (sd, prog_bfd, argv, env)
}
CIA_SET (STATE_CPU (sd, 0), (unsigned64) PC);
+ if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2)
+ PSW |= PSW_FE;
+
return SIM_RC_OK;
}
void
-sim_do_command (sd, cmd)
- SIM_DESC sd;
- char *cmd;
+sim_do_command (SIM_DESC sd, char *cmd)
{
char *mm_cmd = "memory-map";
char *int_cmd = "interrupt";
@@ -1203,47 +344,39 @@ sim_do_command (sd, cmd)
sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
}
}
-#endif /* WITH_COMMON */
/* FIXME These would more efficient to use than load_mem/store_mem,
but need to be changed to use the memory map. */
uint8
-get_byte (x)
- uint8 *x;
+get_byte (uint8 *x)
{
return *x;
}
uint16
-get_half (x)
- uint8 *x;
+get_half (uint8 *x)
{
uint8 *a = x;
return (a[1] << 8) + (a[0]);
}
uint32
-get_word (x)
- uint8 *x;
+get_word (uint8 *x)
{
uint8 *a = x;
return (a[3]<<24) + (a[2]<<16) + (a[1]<<8) + (a[0]);
}
void
-put_byte (addr, data)
- uint8 *addr;
- uint8 data;
+put_byte (uint8 *addr, uint8 data)
{
uint8 *a = addr;
a[0] = data;
}
void
-put_half (addr, data)
- uint8 *addr;
- uint16 data;
+put_half (uint8 *addr, uint16 data)
{
uint8 *a = addr;
a[0] = data & 0xff;
@@ -1251,9 +384,7 @@ put_half (addr, data)
}
void
-put_word (addr, data)
- uint8 *addr;
- uint32 data;
+put_word (uint8 *addr, uint32 data)
{
uint8 *a = addr;
a[0] = data & 0xff;
@@ -1263,22 +394,20 @@ put_word (addr, data)
}
int
-sim_fetch_register (sd, rn, memory, length)
- SIM_DESC sd;
- int rn;
- unsigned char *memory;
- int length;
+sim_fetch_register (SIM_DESC sd,
+ int rn,
+ unsigned char *memory,
+ int length)
{
put_word (memory, State.regs[rn]);
return -1;
}
int
-sim_store_register (sd, rn, memory, length)
- SIM_DESC sd;
- int rn;
- unsigned char *memory;
- int length;
+sim_store_register (SIM_DESC sd,
+ int rn,
+ unsigned char *memory,
+ int length)
{
State.regs[rn] = get_word (memory);
return -1;
@@ -1287,13 +416,13 @@ sim_store_register (sd, rn, memory, length)
void
mn10300_core_signal (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- unsigned map,
- int nr_bytes,
- address_word addr,
- transfer_type transfer,
- sim_core_signals sig)
+ sim_cpu *cpu,
+ sim_cia cia,
+ unsigned map,
+ int nr_bytes,
+ address_word addr,
+ transfer_type transfer,
+ sim_core_signals sig)
{
const char *copy = (transfer == read_transfer ? "read" : "write");
address_word ip = CIA_ADDR (cia);
@@ -1420,3 +549,569 @@ mn10300_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception)
}
State.exc_suspended = 0;
}
+
+/* This is called when an FP instruction is issued when the FP unit is
+ disabled, i.e., the FE bit of PSW is zero. It raises interrupt
+ code 0x1c0. */
+void
+fpu_disabled_exception (SIM_DESC sd, sim_cpu *cpu, sim_cia cia)
+{
+ sim_io_eprintf(sd, "FPU disabled exception\n");
+ program_interrupt (sd, cpu, cia, SIM_SIGFPE);
+}
+
+/* This is called when the FP unit is enabled but one of the
+ unimplemented insns is issued. It raises interrupt code 0x1c8. */
+void
+fpu_unimp_exception (SIM_DESC sd, sim_cpu *cpu, sim_cia cia)
+{
+ sim_io_eprintf(sd, "Unimplemented FPU instruction exception\n");
+ program_interrupt (sd, cpu, cia, SIM_SIGFPE);
+}
+
+/* This is called at the end of any FP insns that may have triggered
+ FP exceptions. If no exception is enabled, it returns immediately.
+ Otherwise, it raises an exception code 0x1d0. */
+void
+fpu_check_signal_exception (SIM_DESC sd, sim_cpu *cpu, sim_cia cia)
+{
+ if ((FPCR & EC_MASK) == 0)
+ return;
+
+ sim_io_eprintf(sd, "FPU %s%s%s%s%s exception\n",
+ (FPCR & EC_V) ? "V" : "",
+ (FPCR & EC_Z) ? "Z" : "",
+ (FPCR & EC_O) ? "O" : "",
+ (FPCR & EC_U) ? "U" : "",
+ (FPCR & EC_I) ? "I" : "");
+ program_interrupt (sd, cpu, cia, SIM_SIGFPE);
+}
+
+/* Convert a 32-bit single-precision FP value in the target platform
+ format to a sim_fpu value. */
+static void
+reg2val_32 (const void *reg, sim_fpu *val)
+{
+ FS2FPU (*(reg_t *)reg, *val);
+}
+
+/* Round the given sim_fpu value to single precision, following the
+ target platform rounding and denormalization conventions. On
+ AM33/2.0, round_near is the only rounding mode. */
+static int
+round_32 (sim_fpu *val)
+{
+ return sim_fpu_round_32 (val, sim_fpu_round_near, sim_fpu_denorm_zero);
+}
+
+/* Convert a sim_fpu value to the 32-bit single-precision target
+ representation. */
+static void
+val2reg_32 (const sim_fpu *val, void *reg)
+{
+ FPU2FS (*val, *(reg_t *)reg);
+}
+
+/* Define the 32-bit single-precision conversion and rounding uniform
+ interface. */
+const struct fp_prec_t
+fp_single_prec = {
+ reg2val_32, round_32, val2reg_32
+};
+
+/* Convert a 64-bit double-precision FP value in the target platform
+ format to a sim_fpu value. */
+static void
+reg2val_64 (const void *reg, sim_fpu *val)
+{
+ FD2FPU (*(dword *)reg, *val);
+}
+
+/* Round the given sim_fpu value to double precision, following the
+ target platform rounding and denormalization conventions. On
+ AM33/2.0, round_near is the only rounding mode. */
+int
+round_64 (sim_fpu *val)
+{
+ return sim_fpu_round_64 (val, sim_fpu_round_near, sim_fpu_denorm_zero);
+}
+
+/* Convert a sim_fpu value to the 64-bit double-precision target
+ representation. */
+static void
+val2reg_64 (const sim_fpu *val, void *reg)
+{
+ FPU2FD (*val, *(dword *)reg);
+}
+
+/* Define the 64-bit single-precision conversion and rounding uniform
+ interface. */
+const struct fp_prec_t
+fp_double_prec = {
+ reg2val_64, round_64, val2reg_64
+};
+
+/* Define shortcuts to the uniform interface operations. */
+#define REG2VAL(reg,val) (*ops->reg2val) (reg,val)
+#define ROUND(val) (*ops->round) (val)
+#define VAL2REG(val,reg) (*ops->val2reg) (val,reg)
+
+/* Check whether overflow, underflow or inexact exceptions should be
+ raised. */
+int
+fpu_status_ok (sim_fpu_status stat)
+{
+ if ((stat & sim_fpu_status_overflow)
+ && (FPCR & EE_O))
+ FPCR |= EC_O;
+ else if ((stat & (sim_fpu_status_underflow | sim_fpu_status_denorm))
+ && (FPCR & EE_U))
+ FPCR |= EC_U;
+ else if ((stat & (sim_fpu_status_inexact | sim_fpu_status_rounded))
+ && (FPCR & EE_I))
+ FPCR |= EC_I;
+ else if (stat & ~ (sim_fpu_status_overflow
+ | sim_fpu_status_underflow
+ | sim_fpu_status_denorm
+ | sim_fpu_status_inexact
+ | sim_fpu_status_rounded))
+ abort ();
+ else
+ return 1;
+ return 0;
+}
+
+/* Implement a 32/64 bit reciprocal square root, signaling FP
+ exceptions when appropriate. */
+void
+fpu_rsqrt (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in, void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu in, med, out;
+
+ REG2VAL (reg_in, &in);
+ ROUND (&in);
+ FPCR &= ~ EC_MASK;
+ switch (sim_fpu_is (&in))
+ {
+ case SIM_FPU_IS_SNAN:
+ case SIM_FPU_IS_NNUMBER:
+ case SIM_FPU_IS_NINF:
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ break;
+
+ case SIM_FPU_IS_QNAN:
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ break;
+
+ case SIM_FPU_IS_PINF:
+ VAL2REG (&sim_fpu_zero, reg_out);
+ break;
+
+ case SIM_FPU_IS_PNUMBER:
+ {
+ /* Since we don't have a function to compute rsqrt directly,
+ use sqrt and inv. */
+ sim_fpu_status stat = 0;
+ stat |= sim_fpu_sqrt (&med, &in);
+ stat |= sim_fpu_inv (&out, &med);
+ stat |= ROUND (&out);
+ if (fpu_status_ok (stat))
+ VAL2REG (&out, reg_out);
+ }
+ break;
+
+ case SIM_FPU_IS_NZERO:
+ case SIM_FPU_IS_PZERO:
+ if (FPCR & EE_Z)
+ FPCR |= EC_Z;
+ else
+ {
+ /* Generate an INF with the same sign. */
+ sim_fpu_inv (&out, &in);
+ VAL2REG (&out, reg_out);
+ }
+ break;
+
+ default:
+ abort ();
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+static inline reg_t
+cmp2fcc (int res)
+{
+ switch (res)
+ {
+ case SIM_FPU_IS_SNAN:
+ case SIM_FPU_IS_QNAN:
+ return FCC_U;
+
+ case SIM_FPU_IS_NINF:
+ case SIM_FPU_IS_NNUMBER:
+ case SIM_FPU_IS_NDENORM:
+ return FCC_L;
+
+ case SIM_FPU_IS_PINF:
+ case SIM_FPU_IS_PNUMBER:
+ case SIM_FPU_IS_PDENORM:
+ return FCC_G;
+
+ case SIM_FPU_IS_NZERO:
+ case SIM_FPU_IS_PZERO:
+ return FCC_E;
+
+ default:
+ abort ();
+ }
+}
+
+/* Implement a 32/64 bit FP compare, setting the FPCR status and/or
+ exception bits as specified. */
+void
+fpu_cmp (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2,
+ const struct fp_prec_t *ops)
+{
+ sim_fpu m, n;
+
+ REG2VAL (reg_in1, &m);
+ REG2VAL (reg_in2, &n);
+ FPCR &= ~ EC_MASK;
+ FPCR &= ~ FCC_MASK;
+ ROUND (&m);
+ ROUND (&n);
+ if (sim_fpu_is_snan (&m) || sim_fpu_is_snan (&n))
+ {
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ FPCR |= FCC_U;
+ }
+ else
+ FPCR |= cmp2fcc (sim_fpu_cmp (&m, &n));
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP add, setting FP exception bits when
+ appropriate. */
+void
+fpu_add (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m, n, r;
+
+ REG2VAL (reg_in1, &m);
+ REG2VAL (reg_in2, &n);
+ ROUND (&m);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is (&m) == SIM_FPU_IS_PINF
+ && sim_fpu_is (&n) == SIM_FPU_IS_NINF)
+ || (sim_fpu_is (&m) == SIM_FPU_IS_NINF
+ && sim_fpu_is (&n) == SIM_FPU_IS_PINF))
+ {
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_add (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP sub, setting FP exception bits when
+ appropriate. */
+void
+fpu_sub (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m, n, r;
+
+ REG2VAL (reg_in1, &m);
+ REG2VAL (reg_in2, &n);
+ ROUND (&m);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is (&m) == SIM_FPU_IS_PINF
+ && sim_fpu_is (&n) == SIM_FPU_IS_PINF)
+ || (sim_fpu_is (&m) == SIM_FPU_IS_NINF
+ && sim_fpu_is (&n) == SIM_FPU_IS_NINF))
+ {
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_sub (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP mul, setting FP exception bits when
+ appropriate. */
+void
+fpu_mul (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m, n, r;
+
+ REG2VAL (reg_in1, &m);
+ REG2VAL (reg_in2, &n);
+ ROUND (&m);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m) && sim_fpu_is_zero (&n))
+ || (sim_fpu_is_zero (&m) && sim_fpu_is_infinity (&n)))
+ {
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_mul (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP div, setting FP exception bits when
+ appropriate. */
+void
+fpu_div (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m, n, r;
+
+ REG2VAL (reg_in1, &m);
+ REG2VAL (reg_in2, &n);
+ ROUND (&m);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m) && sim_fpu_is_infinity (&n))
+ || (sim_fpu_is_zero (&m) && sim_fpu_is_zero (&n)))
+ {
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else if (sim_fpu_is_number (&m) && sim_fpu_is_zero (&n)
+ && (FPCR & EE_Z))
+ FPCR |= EC_Z;
+ else
+ {
+ sim_fpu_status stat = sim_fpu_div (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP madd, setting FP exception bits when
+ appropriate. */
+void
+fpu_fmadd (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2, const void *reg_in3,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m1, m2, m, n, r;
+
+ REG2VAL (reg_in1, &m1);
+ REG2VAL (reg_in2, &m2);
+ REG2VAL (reg_in3, &n);
+ ROUND (&m1);
+ ROUND (&m2);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m1) || sim_fpu_is_snan (&m2) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m1) && sim_fpu_is_zero (&m2))
+ || (sim_fpu_is_zero (&m1) && sim_fpu_is_infinity (&m2)))
+ {
+ invalid_operands:
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_mul (&m, &m1, &m2);
+
+ if (sim_fpu_is_infinity (&m) && sim_fpu_is_infinity (&n)
+ && sim_fpu_sign (&m) != sim_fpu_sign (&n))
+ goto invalid_operands;
+
+ stat |= sim_fpu_add (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP msub, setting FP exception bits when
+ appropriate. */
+void
+fpu_fmsub (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2, const void *reg_in3,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m1, m2, m, n, r;
+
+ REG2VAL (reg_in1, &m1);
+ REG2VAL (reg_in2, &m2);
+ REG2VAL (reg_in3, &n);
+ ROUND (&m1);
+ ROUND (&m2);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m1) || sim_fpu_is_snan (&m2) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m1) && sim_fpu_is_zero (&m2))
+ || (sim_fpu_is_zero (&m1) && sim_fpu_is_infinity (&m2)))
+ {
+ invalid_operands:
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_mul (&m, &m1, &m2);
+
+ if (sim_fpu_is_infinity (&m) && sim_fpu_is_infinity (&n)
+ && sim_fpu_sign (&m) == sim_fpu_sign (&n))
+ goto invalid_operands;
+
+ stat |= sim_fpu_sub (&r, &m, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP nmadd, setting FP exception bits when
+ appropriate. */
+void
+fpu_fnmadd (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2, const void *reg_in3,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m1, m2, m, mm, n, r;
+
+ REG2VAL (reg_in1, &m1);
+ REG2VAL (reg_in2, &m2);
+ REG2VAL (reg_in3, &n);
+ ROUND (&m1);
+ ROUND (&m2);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m1) || sim_fpu_is_snan (&m2) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m1) && sim_fpu_is_zero (&m2))
+ || (sim_fpu_is_zero (&m1) && sim_fpu_is_infinity (&m2)))
+ {
+ invalid_operands:
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_mul (&m, &m1, &m2);
+
+ if (sim_fpu_is_infinity (&m) && sim_fpu_is_infinity (&n)
+ && sim_fpu_sign (&m) == sim_fpu_sign (&n))
+ goto invalid_operands;
+
+ stat |= sim_fpu_neg (&mm, &m);
+ stat |= sim_fpu_add (&r, &mm, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
+
+/* Implement a 32/64 bit FP nmsub, setting FP exception bits when
+ appropriate. */
+void
+fpu_fnmsub (SIM_DESC sd, sim_cpu *cpu, sim_cia cia,
+ const void *reg_in1, const void *reg_in2, const void *reg_in3,
+ void *reg_out, const struct fp_prec_t *ops)
+{
+ sim_fpu m1, m2, m, mm, n, r;
+
+ REG2VAL (reg_in1, &m1);
+ REG2VAL (reg_in2, &m2);
+ REG2VAL (reg_in3, &n);
+ ROUND (&m1);
+ ROUND (&m2);
+ ROUND (&n);
+ FPCR &= ~ EC_MASK;
+ if (sim_fpu_is_snan (&m1) || sim_fpu_is_snan (&m2) || sim_fpu_is_snan (&n)
+ || (sim_fpu_is_infinity (&m1) && sim_fpu_is_zero (&m2))
+ || (sim_fpu_is_zero (&m1) && sim_fpu_is_infinity (&m2)))
+ {
+ invalid_operands:
+ if (FPCR & EE_V)
+ FPCR |= EC_V;
+ else
+ VAL2REG (&sim_fpu_qnan, reg_out);
+ }
+ else
+ {
+ sim_fpu_status stat = sim_fpu_mul (&m, &m1, &m2);
+
+ if (sim_fpu_is_infinity (&m) && sim_fpu_is_infinity (&n)
+ && sim_fpu_sign (&m) != sim_fpu_sign (&n))
+ goto invalid_operands;
+
+ stat |= sim_fpu_neg (&mm, &m);
+ stat |= sim_fpu_sub (&r, &mm, &n);
+ stat |= ROUND (&r);
+ if (fpu_status_ok (stat))
+ VAL2REG (&r, reg_out);
+ }
+
+ fpu_check_signal_exception (sd, cpu, cia);
+}
diff --git a/sim/mn10300/mn10300.igen b/sim/mn10300/mn10300.igen
index b0ab89fba64..c7b83ed141f 100644
--- a/sim/mn10300/mn10300.igen
+++ b/sim/mn10300/mn10300.igen
@@ -4,6 +4,7 @@
:option:::hi-bit-nr:7
:model:::mn10300:mn10300:
:model:::am33:am33:
+:model:::am33_2:am33_2:
// What do we do with an illegal instruction?
:internal::::illegal:
@@ -17,6 +18,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_8000 (); */
signed32 immed = EXTEND8 (IMM8);
@@ -29,6 +31,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
PC = cia;
/* OP_80 (); */
@@ -41,6 +44,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F1E0 (); */
PC = cia;
@@ -53,6 +57,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F1D0 (); */
PC = cia;
@@ -65,6 +70,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
PC = cia;
/* OP_9000 (); */
@@ -77,6 +83,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
PC = cia;
/* OP_90 (); */
@@ -89,6 +96,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_3C (); */
PC = cia;
@@ -101,6 +109,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F2F0 (); */
PC = cia;
@@ -113,6 +122,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F2E4 (); */
PC = cia;
@@ -125,6 +135,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F2F3 (); */
PC = cia;
@@ -137,6 +148,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F2E0 (); */
PC = cia;
@@ -149,6 +161,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F2F2 (); */
PC = cia;
@@ -161,6 +174,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_70 (); */
PC = cia;
@@ -173,6 +187,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F80000 (); */
PC = cia;
@@ -186,6 +201,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FA000000 (); */
PC = cia;
@@ -199,6 +215,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC000000 (); */
PC = cia;
@@ -213,6 +230,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_5800 (); */
PC = cia;
@@ -225,6 +243,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FAB40000 (); */
PC = cia;
@@ -238,6 +257,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FCB40000 (); */
PC = cia;
@@ -251,6 +271,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F300 (); */
PC = cia;
@@ -264,6 +285,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_300000 (); */
PC = cia;
@@ -275,6 +297,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FCA40000 (); */
PC = cia;
@@ -287,6 +310,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F000 (); */
PC = cia;
@@ -299,6 +323,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F82000 (); */
PC = cia;
@@ -312,6 +337,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FA200000 (); */
PC = cia;
@@ -326,6 +352,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC200000 (); */
PC = cia;
@@ -340,6 +367,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_5C00 (); */
PC = cia;
@@ -353,6 +381,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FAB00000 (); */
PC = cia;
@@ -366,6 +395,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FCB00000 (); */
PC = cia;
@@ -380,6 +410,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F380 (); */
PC = cia;
@@ -394,6 +425,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FAA00000 (); */
PC = cia;
@@ -406,6 +438,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FCA00000 (); */
PC = cia;
@@ -419,6 +452,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F8F000 (); */
PC = cia;
@@ -432,6 +466,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_60 (); */
PC = cia;
@@ -444,6 +479,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F81000 (); */
PC = cia;
@@ -457,6 +493,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FA100000 (); */
PC = cia;
@@ -470,6 +507,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC100000 (); */
PC = cia;
@@ -484,6 +522,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_4200 (); */
PC = cia;
@@ -496,6 +535,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FA910000 (); */
PC = cia;
@@ -509,6 +549,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC910000 (); */
PC = cia;
@@ -522,6 +563,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F340 (); */
PC = cia;
@@ -535,6 +577,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_10000 (); */
PC = cia;
@@ -547,6 +590,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC810000 (); */
PC = cia;
@@ -560,6 +604,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F010 (); */
PC = cia;
@@ -572,6 +617,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_F83000 (); */
PC = cia;
@@ -585,6 +631,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FA300000 (); */
PC = cia;
@@ -598,6 +645,7 @@
"mov"
*mn10300
*am33
+*am33_2
{
/* OP_FC300000 (); */
PC = cia;
@@ -613,6 +661,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_4300 (); */
@@ -627,6 +676,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA900000 (); */
@@ -642,6 +692,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC900000 (); */
@@ -657,6 +708,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F3C0 (); */
@@ -672,6 +724,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA800000 (); */
@@ -687,6 +740,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC800000 (); */
@@ -702,6 +756,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8F400 (); */
@@ -717,6 +772,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_2C0000 (); */
@@ -734,6 +790,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCCC0000 (); */
@@ -751,6 +808,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_240000 (); */
@@ -768,6 +826,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCDC0000 (); */
@@ -782,6 +841,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F040 (); */
@@ -797,6 +857,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F84000 (); */
@@ -812,6 +873,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA400000 (); */
@@ -828,6 +890,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC400000 (); */
@@ -844,6 +907,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8B800 (); */
@@ -859,6 +923,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAB80000 (); */
@@ -875,6 +940,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCB80000 (); */
@@ -891,6 +957,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F400 (); */
@@ -907,6 +974,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_340000 (); */
@@ -921,6 +989,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCA80000 (); */
@@ -936,6 +1005,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F050 (); */
@@ -950,6 +1020,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F85000 (); */
@@ -965,6 +1036,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA500000 (); */
@@ -980,6 +1052,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC500000 (); */
@@ -996,6 +1069,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F89200 (); */
@@ -1010,6 +1084,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA920000 (); */
@@ -1025,6 +1100,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC920000 (); */
@@ -1040,6 +1116,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F440 (); */
@@ -1055,6 +1132,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_20000 (); */
@@ -1070,6 +1148,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC820000 (); */
@@ -1085,6 +1164,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F060 (); */
@@ -1100,6 +1180,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F86000 (); */
@@ -1115,6 +1196,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA600000 (); */
@@ -1131,6 +1213,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC600000 (); */
@@ -1147,6 +1230,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8BC00 (); */
@@ -1162,6 +1246,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FABC0000 (); */
@@ -1177,6 +1262,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCBC0000 (); */
@@ -1192,6 +1278,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F480 (); */
@@ -1207,6 +1294,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_380000 (); */
@@ -1221,6 +1309,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCAC0000 (); */
@@ -1236,6 +1325,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F070 (); */
@@ -1251,6 +1341,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F87000 (); */
@@ -1266,6 +1357,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA700000 (); */
@@ -1281,6 +1373,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC700000 (); */
@@ -1297,6 +1390,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F89300 (); */
@@ -1312,6 +1406,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FA930000 (); */
@@ -1327,6 +1422,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC930000 (); */
@@ -1342,6 +1438,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F4C0 (); */
@@ -1357,6 +1454,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_30000 (); */
@@ -1371,6 +1469,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FC830000 (); */
@@ -1386,6 +1485,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F2D0 (); */
@@ -1403,6 +1503,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_10 (); */
@@ -1417,6 +1518,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_14 (); */
@@ -1431,6 +1533,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_18 (); */
@@ -1445,6 +1548,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_1C (); */
@@ -1459,6 +1563,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_0 (); */
@@ -1476,6 +1581,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_E0 (); */
@@ -1489,6 +1595,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F160 (); */
@@ -1503,6 +1610,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F150 (); */
@@ -1517,6 +1625,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F170 (); */
@@ -1531,6 +1640,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_2800 (); */
@@ -1545,6 +1655,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAC00000 (); */
@@ -1559,6 +1670,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCC00000 (); */
@@ -1573,6 +1685,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_2000 (); */
@@ -1587,6 +1700,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAD00000 (); */
@@ -1601,6 +1715,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCD00000 (); */
@@ -1615,6 +1730,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8FE00 (); */
@@ -1633,6 +1749,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAFE0000 (); */
@@ -1651,6 +1768,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCFE0000 (); */
@@ -1669,6 +1787,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F140 (); */
@@ -1699,6 +1818,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F100 (); */
@@ -1712,6 +1832,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F120 (); */
@@ -1726,6 +1847,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F110 (); */
@@ -1740,6 +1862,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F130 (); */
@@ -1754,6 +1877,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCC40000 (); */
@@ -1768,6 +1892,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCD40000 (); */
@@ -1782,6 +1907,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F180 (); */
@@ -1812,6 +1938,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F240 (); */
@@ -1836,6 +1963,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F250 (); */
@@ -1860,6 +1988,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F260 (); */
@@ -1897,6 +2026,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F270 (); */
@@ -1933,6 +2063,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_40 (); */
@@ -1950,6 +2081,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_41 (); */
@@ -1964,6 +2096,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_50 (); */
@@ -1978,6 +2111,7 @@
*mn10300
*am33
+*am33_2
{
PC = cia;
@@ -1992,6 +2126,7 @@
*mn10300
*am33
+*am33_2
{
PC = cia;
@@ -2006,6 +2141,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F1A0 (); */
@@ -2020,6 +2156,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F190 (); */
@@ -2034,6 +2171,7 @@
*mn10300
*am33
+*am33_2
{
PC = cia;
@@ -2049,6 +2187,7 @@
*mn10300
*am33
+*am33_2
{
PC = cia;
@@ -2063,6 +2202,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAC80000 (); */
@@ -2078,6 +2218,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCC80000 (); */
@@ -2093,6 +2234,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAD80000 (); */
@@ -2108,6 +2250,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCD80000 (); */
@@ -2123,6 +2266,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F200 (); */
@@ -2143,6 +2287,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8E000 (); */
@@ -2163,6 +2308,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAE00000 (); */
@@ -2183,6 +2329,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCE00000 (); */
@@ -2204,6 +2351,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAFC0000 (); */
@@ -2219,6 +2367,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F210 (); */
@@ -2233,6 +2382,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8E400 (); */
@@ -2247,6 +2397,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAE40000 (); */
@@ -2261,6 +2412,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCE40000 (); */
@@ -2275,6 +2427,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAFD0000 (); */
@@ -2289,6 +2442,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F220 (); */
@@ -2303,6 +2457,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAE80000 (); */
@@ -2317,6 +2472,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCE80000 (); */
@@ -2331,6 +2487,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F230 (); */
@@ -2351,6 +2508,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8EC00 (); */
@@ -2365,6 +2523,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAEC0000 (); */
@@ -2379,6 +2538,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCEC0000 (); */
@@ -2394,6 +2554,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FE020000 (); */
@@ -2410,6 +2571,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAF80000 (); */
@@ -2425,6 +2587,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F080 (); */
@@ -2448,6 +2611,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FE000000 (); */
@@ -2471,6 +2635,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAF00000 (); */
@@ -2493,6 +2658,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F090 (); */
@@ -2516,6 +2682,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FE010000 (); */
@@ -2539,6 +2706,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAF40000 (); */
@@ -2561,6 +2729,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F2B0 (); */
@@ -2585,6 +2754,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8C800 (); */
@@ -2609,6 +2779,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F2A0 (); */
@@ -2631,6 +2802,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8C400 (); */
@@ -2652,6 +2824,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F290 (); */
@@ -2673,6 +2846,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8C000 (); */
@@ -2693,6 +2867,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_54 (); */
@@ -2713,6 +2888,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F284 (); */
@@ -2739,6 +2915,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F280 (); */
@@ -2765,6 +2942,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C800 (); */
@@ -2783,6 +2961,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C900 (); */
@@ -2801,6 +2980,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C100 (); */
@@ -2820,6 +3000,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C200 (); */
@@ -2838,6 +3019,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C300 (); */
@@ -2857,6 +3039,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C000 (); */
@@ -2875,6 +3058,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C500 (); */
@@ -2893,6 +3077,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C600 (); */
@@ -2911,6 +3096,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C700 (); */
@@ -2929,6 +3115,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_C400 (); */
@@ -2947,6 +3134,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8E800 (); */
@@ -2965,6 +3153,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8E900 (); */
@@ -2983,6 +3172,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8EA00 (); */
@@ -3001,6 +3191,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F8EB00 (); */
@@ -3019,6 +3210,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CA00 (); */
@@ -3034,6 +3226,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D8 (); */
@@ -3052,6 +3245,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D9 (); */
@@ -3070,6 +3264,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D1 (); */
@@ -3089,6 +3284,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D2 (); */
@@ -3107,6 +3303,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D3 (); */
@@ -3126,6 +3323,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D0 (); */
@@ -3144,6 +3342,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D5 (); */
@@ -3162,6 +3361,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D6 (); */
@@ -3180,6 +3380,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D7 (); */
@@ -3198,6 +3399,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_D4 (); */
@@ -3216,6 +3418,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DA (); */
@@ -3231,6 +3434,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DB (); */
@@ -3246,6 +3450,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0F4 (); */
@@ -3260,6 +3465,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CC0000 (); */
@@ -3274,6 +3480,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DC000000 (); */
@@ -3288,6 +3495,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0F0 (); */
@@ -3309,6 +3517,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FAFF0000 (); */
@@ -3330,6 +3539,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FCFF0000 (); */
@@ -3351,6 +3561,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0FC (); */
@@ -3368,6 +3579,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0FD (); */
@@ -3387,6 +3599,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0FE (); */
@@ -3406,6 +3619,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0FF (); */
@@ -3420,6 +3634,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CB (); */
@@ -3444,6 +3659,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F6F0 (); */
@@ -3465,6 +3681,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F600 (); */
@@ -3489,6 +3706,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F90000 (); */
@@ -3513,6 +3731,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FB000000 (); */
@@ -3537,6 +3756,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FD000000 (); */
@@ -3561,6 +3781,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F610 (); */
@@ -3585,6 +3806,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F91400 (); */
@@ -3609,6 +3831,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FB140000 (); */
@@ -3633,6 +3856,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FD140000 (); */
@@ -3657,6 +3881,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F640 (); */
@@ -3676,6 +3901,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F650 (); */
@@ -3695,6 +3921,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F670 (); */
@@ -3715,6 +3942,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_F0C0 (); */
@@ -3729,6 +3957,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_FF (); */
@@ -3742,6 +3971,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CE00 (); */
@@ -3795,6 +4025,7 @@
}
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x1)
@@ -3839,6 +4070,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CF00 (); */
@@ -3849,6 +4081,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x4)
@@ -3936,6 +4169,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_CD000000 (); */
@@ -3950,6 +4184,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x4)
@@ -4043,6 +4278,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DD000000 (); */
@@ -4058,6 +4294,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
if (mask & 0x4)
@@ -4150,6 +4387,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DF0000 (); */
@@ -4164,6 +4402,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
@@ -4253,6 +4492,7 @@
*mn10300
*am33
+*am33_2
{
/* OP_DE0000 (); */
@@ -4268,6 +4508,7 @@
mask = REGS;
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33
+ || STATE_ARCHITECTURE (sd)->mach == bfd_mach_am33_2
)
{
diff --git a/sim/mn10300/mn10300_sim.h b/sim/mn10300/mn10300_sim.h
index 6a2c5715583..4ea5d3ec0a1 100644
--- a/sim/mn10300/mn10300_sim.h
+++ b/sim/mn10300/mn10300_sim.h
@@ -6,6 +6,7 @@
#include <limits.h>
#include "gdb/remote-sim.h"
#include "bfd.h"
+#include "sim-fpu.h"
#ifndef INLINE
#ifdef __GNUC__
@@ -53,6 +54,10 @@ typedef signed long int32;
# endif
#endif
+typedef struct
+{
+ uint32 low, high;
+} dword;
typedef uint32 reg_t;
struct simops
@@ -73,6 +78,11 @@ struct _state
reg_t regs[32]; /* registers, d0-d3, a0-a3, sp, pc, mdr, psw,
lir, lar, mdrq, plus some room for processor
specific regs. */
+ union
+ {
+ reg_t fs[32]; /* FS0-31 */
+ dword fd[16]; /* FD0,2,...,30 */
+ } fpregs;
uint8 *mem; /* main memory */
int exception;
int exited;
@@ -123,42 +133,57 @@ extern struct simops Simops[];
#define REG_MCRL 27
#define REG_MCVF 28
-#if WITH_COMMON
-/* These definitions conflict with similar macros in common. */
-#else
-#define SEXT3(x) ((((x)&0x7)^(~0x3))+0x4)
+#define REG_FPCR 29
+
+#define FPCR (State.regs[REG_FPCR])
-/* sign-extend a 4-bit number */
-#define SEXT4(x) ((((x)&0xf)^(~0x7))+0x8)
+#define FCC_MASK LSMASK (21, 18)
+#define RM_MASK LSMASK (17, 16) /* Must always be zero. */
+#define EC_MASK LSMASK (14, 10)
+#define EE_MASK LSMASK ( 9, 5)
+#define EF_MASK LSMASK ( 4, 0)
+#define FPCR_MASK (FCC_MASK | EC_MASK | EE_MASK | EF_MASK)
-/* sign-extend a 5-bit number */
-#define SEXT5(x) ((((x)&0x1f)^(~0xf))+0x10)
+#define FCC_L LSBIT (21)
+#define FCC_G LSBIT (20)
+#define FCC_E LSBIT (19)
+#define FCC_U LSBIT (18)
-/* sign-extend an 8-bit number */
-#define SEXT8(x) ((((x)&0xff)^(~0x7f))+0x80)
+#define EC_V LSBIT (14)
+#define EC_Z LSBIT (13)
+#define EC_O LSBIT (12)
+#define EC_U LSBIT (11)
+#define EC_I LSBIT (10)
-/* sign-extend a 9-bit number */
-#define SEXT9(x) ((((x)&0x1ff)^(~0xff))+0x100)
+#define EE_V LSBIT (9)
+#define EE_Z LSBIT (8)
+#define EE_O LSBIT (7)
+#define EE_U LSBIT (6)
+#define EE_I LSBIT (5)
-/* sign-extend a 16-bit number */
-#define SEXT16(x) ((((x)&0xffff)^(~0x7fff))+0x8000)
+#define EF_V LSBIT (4)
+#define EF_Z LSBIT (3)
+#define EF_O LSBIT (2)
+#define EF_U LSBIT (1)
+#define EF_I LSBIT (0)
-/* sign-extend a 22-bit number */
-#define SEXT22(x) ((((x)&0x3fffff)^(~0x1fffff))+0x200000)
+#define PSW_FE LSBIT(20)
+#define FPU_DISABLED !(PSW & PSW_FE)
-#define MAX32 0x7fffffffLL
-#define MIN32 0xff80000000LL
-#define MASK32 0xffffffffLL
-#define MASK40 0xffffffffffLL
-#endif /* not WITH_COMMON */
+#define XS2FS(X,S) State.fpregs.fs[((X<<4)|(S))]
+#define AS2FS(A,S) State.fpregs.fs[((A<<2)|(S))]
+#define Xf2FD(X,f) State.fpregs.fd[((X<<3)|(f))]
+
+#define FS2FPU(FS,F) sim_fpu_32to (&(F), (FS))
+#define FD2FPU(FD,F) sim_fpu_232to (&(F), ((FD).high), ((FD).low))
+#define FPU2FS(F,FS) sim_fpu_to32 (&(FS), &(F))
+#define FPU2FD(F,FD) sim_fpu_to232 (&((FD).high), &((FD).low), &(F))
#ifdef _WIN32
#define SIGTRAP 5
#define SIGQUIT 3
#endif
-#if WITH_COMMON
-
#define FETCH32(a,b,c,d) \
((a)+((b)<<8)+((c)<<16)+((d)<<24))
@@ -176,6 +201,20 @@ sim_core_read_unaligned_2 (STATE_CPU (simulator, 0), PC, read_map, (ADDR))
#define load_word(ADDR) \
sim_core_read_unaligned_4 (STATE_CPU (simulator, 0), PC, read_map, (ADDR))
+#define load_dword(ADDR) \
+u642dw (sim_core_read_unaligned_8 (STATE_CPU (simulator, 0), \
+ PC, read_map, (ADDR)))
+
+static INLINE dword
+u642dw (unsigned64 dw)
+{
+ dword r;
+
+ r.low = (unsigned32)dw;
+ r.high = (unsigned32)(dw >> 32);
+ return r;
+}
+
#define store_byte(ADDR, DATA) \
sim_core_write_unaligned_1 (STATE_CPU (simulator, 0), \
PC, write_map, (ADDR), (DATA))
@@ -189,202 +228,72 @@ sim_core_write_unaligned_2 (STATE_CPU (simulator, 0), \
#define store_word(ADDR, DATA) \
sim_core_write_unaligned_4 (STATE_CPU (simulator, 0), \
PC, write_map, (ADDR), (DATA))
-#endif /* WITH_COMMON */
+#define store_dword(ADDR, DATA) \
+sim_core_write_unaligned_8 (STATE_CPU (simulator, 0), \
+ PC, write_map, (ADDR), dw2u64 (DATA))
-#if WITH_COMMON
-#else
-#define load_mem_big(addr,len) \
- (len == 1 ? *((addr) + State.mem) : \
- len == 2 ? ((*((addr) + State.mem) << 8) \
- | *(((addr) + 1) + State.mem)) : \
- len == 3 ? ((*((addr) + State.mem) << 16) \
- | (*(((addr) + 1) + State.mem) << 8) \
- | *(((addr) + 2) + State.mem)) : \
- ((*((addr) + State.mem) << 24) \
- | (*(((addr) + 1) + State.mem) << 16) \
- | (*(((addr) + 2) + State.mem) << 8) \
- | *(((addr) + 3) + State.mem)))
-
-static INLINE uint32
-load_byte (addr)
- SIM_ADDR addr;
+static INLINE unsigned64
+dw2u64 (dword data)
{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- return p[0];
+ return data.low | (((unsigned64)data.high) << 32);
}
-static INLINE uint32
-load_half (addr)
- SIM_ADDR addr;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- return p[1] << 8 | p[0];
-}
-
-static INLINE uint32
-load_3_byte (addr)
- SIM_ADDR addr;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- return p[2] << 16 | p[1] << 8 | p[0];
-}
-
-static INLINE uint32
-load_word (addr)
- SIM_ADDR addr;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- return p[3] << 24 | p[2] << 16 | p[1] << 8 | p[0];
-}
-
-static INLINE uint32
-load_mem (addr, len)
- SIM_ADDR addr;
- int len;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- switch (len)
- {
- case 1:
- return p[0];
- case 2:
- return p[1] << 8 | p[0];
- case 3:
- return p[2] << 16 | p[1] << 8 | p[0];
- case 4:
- return p[3] << 24 | p[2] << 16 | p[1] << 8 | p[0];
- default:
- abort ();
- }
-}
-
-static INLINE void
-store_byte (addr, data)
- SIM_ADDR addr;
- uint32 data;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- p[0] = data;
-}
-
-static INLINE void
-store_half (addr, data)
- SIM_ADDR addr;
- uint32 data;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- p[0] = data;
- p[1] = data >> 8;
-}
-
-static INLINE void
-store_3_byte (addr, data)
- SIM_ADDR addr;
- uint32 data;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- p[0] = data;
- p[1] = data >> 8;
- p[2] = data >> 16;
-}
-
-static INLINE void
-store_word (addr, data)
- SIM_ADDR addr;
- uint32 data;
-{
- uint8 *p = (addr & 0xffffff) + State.mem;
-
-#ifdef CHECK_ADDR
- if ((addr & 0xffffff) > max_mem)
- abort ();
-#endif
-
- p[0] = data;
- p[1] = data >> 8;
- p[2] = data >> 16;
- p[3] = data >> 24;
-}
-#endif /* not WITH_COMMON */
-
/* Function declarations. */
-uint32 get_word PARAMS ((uint8 *));
-uint16 get_half PARAMS ((uint8 *));
-uint8 get_byte PARAMS ((uint8 *));
-void put_word PARAMS ((uint8 *, uint32));
-void put_half PARAMS ((uint8 *, uint16));
-void put_byte PARAMS ((uint8 *, uint8));
-
-extern uint8 *map PARAMS ((SIM_ADDR addr));
-
-INLINE_SIM_MAIN (void) genericAdd PARAMS ((unsigned32 source, unsigned32 destReg));
-INLINE_SIM_MAIN (void) genericSub PARAMS ((unsigned32 source, unsigned32 destReg));
-INLINE_SIM_MAIN (void) genericCmp PARAMS ((unsigned32 leftOpnd, unsigned32 rightOpnd));
-INLINE_SIM_MAIN (void) genericOr PARAMS ((unsigned32 source, unsigned32 destReg));
-INLINE_SIM_MAIN (void) genericXor PARAMS ((unsigned32 source, unsigned32 destReg));
-INLINE_SIM_MAIN (void) genericBtst PARAMS ((unsigned32 leftOpnd, unsigned32 rightOpnd));
-INLINE_SIM_MAIN (int) syscall_read_mem PARAMS ((host_callback *cb,
- struct cb_syscall *sc,
- unsigned long taddr,
- char *buf,
- int bytes));
-INLINE_SIM_MAIN (int) syscall_write_mem PARAMS ((host_callback *cb,
- struct cb_syscall *sc,
- unsigned long taddr,
- const char *buf,
- int bytes));
-INLINE_SIM_MAIN (void) do_syscall PARAMS ((void));
+uint32 get_word (uint8 *);
+uint16 get_half (uint8 *);
+uint8 get_byte (uint8 *);
+void put_word (uint8 *, uint32);
+void put_half (uint8 *, uint16);
+void put_byte (uint8 *, uint8);
+
+extern uint8 *map (SIM_ADDR addr);
+
+INLINE_SIM_MAIN (void) genericAdd (unsigned32 source, unsigned32 destReg);
+INLINE_SIM_MAIN (void) genericSub (unsigned32 source, unsigned32 destReg);
+INLINE_SIM_MAIN (void) genericCmp (unsigned32 leftOpnd, unsigned32 rightOpnd);
+INLINE_SIM_MAIN (void) genericOr (unsigned32 source, unsigned32 destReg);
+INLINE_SIM_MAIN (void) genericXor (unsigned32 source, unsigned32 destReg);
+INLINE_SIM_MAIN (void) genericBtst (unsigned32 leftOpnd, unsigned32 rightOpnd);
+INLINE_SIM_MAIN (int) syscall_read_mem (host_callback *cb,
+ struct cb_syscall *sc,
+ unsigned long taddr,
+ char *buf,
+ int bytes);
+INLINE_SIM_MAIN (int) syscall_write_mem (host_callback *cb,
+ struct cb_syscall *sc,
+ unsigned long taddr,
+ const char *buf,
+ int bytes);
+INLINE_SIM_MAIN (void) do_syscall (void);
void program_interrupt (SIM_DESC sd, sim_cpu *cpu, sim_cia cia, SIM_SIGNAL sig);
void mn10300_cpu_exception_trigger(SIM_DESC sd, sim_cpu* cpu, address_word pc);
void mn10300_cpu_exception_suspend(SIM_DESC sd, sim_cpu* cpu, int exception);
void mn10300_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception);
+
+void fpu_disabled_exception (SIM_DESC, sim_cpu *, address_word);
+void fpu_unimp_exception (SIM_DESC, sim_cpu *, address_word);
+void fpu_check_signal_exception (SIM_DESC, sim_cpu *, address_word);
+
+extern const struct fp_prec_t
+{
+ void (* reg2val) (const void *, sim_fpu *);
+ int (* round) (sim_fpu *);
+ void (* val2reg) (const sim_fpu *, void *);
+} fp_single_prec, fp_double_prec;
+
+#define FP_SINGLE (&fp_single_prec)
+#define FP_DOUBLE (&fp_double_prec)
+
+void fpu_rsqrt (SIM_DESC, sim_cpu *, address_word, const void *, void *, const struct fp_prec_t *);
+void fpu_sqrt (SIM_DESC, sim_cpu *, address_word, const void *, void *, const struct fp_prec_t *);
+void fpu_cmp (SIM_DESC, sim_cpu *, address_word, const void *, const void *, const struct fp_prec_t *);
+void fpu_add (SIM_DESC, sim_cpu *, address_word, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_sub (SIM_DESC, sim_cpu *, address_word, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_mul (SIM_DESC, sim_cpu *, address_word, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_div (SIM_DESC, sim_cpu *, address_word, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_fmadd (SIM_DESC, sim_cpu *, address_word, const void *, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_fmsub (SIM_DESC, sim_cpu *, address_word, const void *, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_fnmadd (SIM_DESC, sim_cpu *, address_word, const void *, const void *, const void *, void *, const struct fp_prec_t *);
+void fpu_fnmsub (SIM_DESC, sim_cpu *, address_word, const void *, const void *, const void *, void *, const struct fp_prec_t *);
diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index b46210f6b40..36f387c9bd3 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -164,7 +164,7 @@ syscall_write_mem (host_callback *cb, struct cb_syscall *sc,
/* syscall */
INLINE_SIM_MAIN (void)
-do_syscall ()
+do_syscall (void)
{
/* We use this for simulated system calls; we may need to change
diff --git a/sim/mn10300/simops.c b/sim/mn10300/simops.c
deleted file mode 100644
index 7a190566bcb..00000000000
--- a/sim/mn10300/simops.c
+++ /dev/null
@@ -1,3239 +0,0 @@
-#include "config.h"
-
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include "mn10300_sim.h"
-#include "simops.h"
-#include "sim-types.h"
-#include "targ-vals.h"
-#include "bfd.h"
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/times.h>
-#include <sys/time.h>
-
-#define REG0(X) ((X) & 0x3)
-#define REG1(X) (((X) & 0xc) >> 2)
-#define REG0_4(X) (((X) & 0x30) >> 4)
-#define REG0_8(X) (((X) & 0x300) >> 8)
-#define REG1_8(X) (((X) & 0xc00) >> 10)
-#define REG0_16(X) (((X) & 0x30000) >> 16)
-#define REG1_16(X) (((X) & 0xc0000) >> 18)
-
-/* mov imm8, dn */
-void OP_8000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_8 (insn)] = SEXT8 (insn & 0xff);
-}
-
-/* mov dm, dn */
-void OP_80 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] = State.regs[REG_D0 + REG1 (insn)];
-}
-
-/* mov dm, an */
-void OP_F1E0 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0 (insn)] = State.regs[REG_D0 + REG1 (insn)];
-}
-
-/* mov am, dn */
-void OP_F1D0 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] = State.regs[REG_A0 + REG1 (insn)];
-}
-
-/* mov imm8, an */
-void OP_9000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_8 (insn)] = insn & 0xff;
-}
-
-/* mov am, an */
-void OP_90 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0 (insn)] = State.regs[REG_A0 + REG1 (insn)];
-}
-
-/* mov sp, an */
-void OP_3C (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0 (insn)] = State.regs[REG_SP];
-}
-
-/* mov am, sp */
-void OP_F2F0 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_SP] = State.regs[REG_A0 + REG1 (insn)];
-}
-
-/* mov psw, dn */
-void OP_F2E4 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] = PSW;
-}
-
-/* mov dm, psw */
-void OP_F2F3 (insn, extension)
- unsigned long insn, extension;
-{
- PSW = State.regs[REG_D0 + REG1 (insn)];
-}
-
-/* mov mdr, dn */
-void OP_F2E0 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] = State.regs[REG_MDR];
-}
-
-/* mov dm, mdr */
-void OP_F2F2 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_MDR] = State.regs[REG_D0 + REG1 (insn)];
-}
-
-/* mov (am), dn */
-void OP_70 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1 (insn)]
- = load_word (State.regs[REG_A0 + REG0 (insn)]);
-}
-
-/* mov (d8,am), dn */
-void OP_F80000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_8 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff)));
-}
-
-/* mov (d16,am), dn */
-void OP_FA000000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT16 (insn & 0xffff)));
-}
-
-/* mov (d32,am), dn */
-void OP_FC000000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (d8,sp), dn */
-void OP_5800 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_8 (insn)]
- = load_word (State.regs[REG_SP] + (insn & 0xff));
-}
-
-/* mov (d16,sp), dn */
-void OP_FAB40000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_word (State.regs[REG_SP] + (insn & 0xffff));
-}
-
-/* mov (d32,sp), dn */
-void OP_FCB40000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_word (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (di,am), dn */
-void OP_F300 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_4 (insn)]
- = load_word ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]));
-}
-
-/* mov (abs16), dn */
-void OP_300000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)] = load_word ((insn & 0xffff));
-}
-
-/* mov (abs32), dn */
-void OP_FCA40000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_word ((((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (am), an */
-void OP_F000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG1 (insn)]
- = load_word (State.regs[REG_A0 + REG0 (insn)]);
-}
-
-/* mov (d8,am), an */
-void OP_F82000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG1_8 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_8 (insn)]
- + SEXT8 (insn & 0xff)));
-}
-
-/* mov (d16,am), an */
-void OP_FA200000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG1_16 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT16 (insn & 0xffff)));
-}
-
-/* mov (d32,am), an */
-void OP_FC200000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG1_16 (insn)]
- = load_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (d8,sp), an */
-void OP_5C00 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_8 (insn)]
- = load_word (State.regs[REG_SP] + (insn & 0xff));
-}
-
-/* mov (d16,sp), an */
-void OP_FAB00000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_16 (insn)]
- = load_word (State.regs[REG_SP] + (insn & 0xffff));
-}
-
-/* mov (d32,sp), an */
-void OP_FCB00000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_16 (insn)]
- = load_word (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (di,am), an */
-void OP_F380 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_4 (insn)]
- = load_word ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]));
-}
-
-/* mov (abs16), an */
-void OP_FAA00000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_16 (insn)] = load_word ((insn & 0xffff));
-}
-
-/* mov (abs32), an */
-void OP_FCA00000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0_16 (insn)]
- = load_word ((((insn & 0xffff) << 16) + extension));
-}
-
-/* mov (d8,am), sp */
-void OP_F8F000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_SP]
- = load_word ((State.regs[REG_A0 + REG0_8 (insn)]
- + SEXT8 (insn & 0xff)));
-}
-
-/* mov dm, (an) */
-void OP_60 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_A0 + REG0 (insn)],
- State.regs[REG_D0 + REG1 (insn)]);
-}
-
-/* mov dm, (d8,an) */
-void OP_F81000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff)),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* mov dm (d16,an) */
-void OP_FA100000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_16 (insn)] + SEXT16 (insn & 0xffff)),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov dm (d32,an) */
-void OP_FC100000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov dm, (d8,sp) */
-void OP_4200 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (insn & 0xff),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* mov dm, (d16,sp) */
-void OP_FA910000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (insn & 0xffff),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov dm, (d32,sp) */
-void OP_FC910000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov dm, (di,an) */
-void OP_F340 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]),
- State.regs[REG_D0 + REG0_4 (insn)]);
-}
-
-/* mov dm, (abs16) */
-void OP_10000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((insn & 0xffff), State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov dm, (abs32) */
-void OP_FC810000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* mov am, (an) */
-void OP_F010 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_A0 + REG0 (insn)],
- State.regs[REG_A0 + REG1 (insn)]);
-}
-
-/* mov am, (d8,an) */
-void OP_F83000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff)),
- State.regs[REG_A0 + REG1_8 (insn)]);
-}
-
-/* mov am, (d16,an) */
-void OP_FA300000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_16 (insn)] + SEXT16 (insn & 0xffff)),
- State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov am, (d32,an) */
-void OP_FC300000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension),
- State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov am, (d8,sp) */
-void OP_4300 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (insn & 0xff),
- State.regs[REG_A0 + REG1_8 (insn)]);
-}
-
-/* mov am, (d16,sp) */
-void OP_FA900000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (insn & 0xffff),
- State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov am, (d32,sp) */
-void OP_FC900000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension),
- State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov am, (di,an) */
-void OP_F3C0 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]),
- State.regs[REG_A0 + REG0_4 (insn)]);
-}
-
-/* mov am, (abs16) */
-void OP_FA800000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((insn & 0xffff), State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov am, (abs32) */
-void OP_FC800000 (insn, extension)
- unsigned long insn, extension;
-{
- store_word ((((insn & 0xffff) << 16) + extension), State.regs[REG_A0 + REG1_16 (insn)]);
-}
-
-/* mov sp, (d8,an) */
-void OP_F8F400 (insn, extension)
- unsigned long insn, extension;
-{
- store_word (State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff),
- State.regs[REG_SP]);
-}
-
-/* mov imm16, dn */
-void OP_2C0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
-
- value = SEXT16 (insn & 0xffff);
- State.regs[REG_D0 + REG0_16 (insn)] = value;
-}
-
-/* mov imm32,dn */
-void OP_FCCC0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
-
- value = ((insn & 0xffff) << 16) + extension;
- State.regs[REG_D0 + REG0_16 (insn)] = value;
-}
-
-/* mov imm16, an */
-void OP_240000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
-
- value = insn & 0xffff;
- State.regs[REG_A0 + REG0_16 (insn)] = value;
-}
-
-/* mov imm32, an */
-void OP_FCDC0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
-
- value = ((insn & 0xffff) << 16) + extension;
- State.regs[REG_A0 + REG0_16 (insn)] = value;
-}
-
-/* movbu (am), dn */
-void OP_F040 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1 (insn)]
- = load_byte (State.regs[REG_A0 + REG0 (insn)]);
-}
-
-/* movbu (d8,am), dn */
-void OP_F84000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_8 (insn)]
- = load_byte ((State.regs[REG_A0 + REG0_8 (insn)]
- + SEXT8 (insn & 0xff)));
-}
-
-/* movbu (d16,am), dn */
-void OP_FA400000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT16 (insn & 0xffff)));
-}
-
-/* movbu (d32,am), dn */
-void OP_FC400000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension));
-}
-
-/* movbu (d8,sp), dn */
-void OP_F8B800 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_8 (insn)]
- = load_byte ((State.regs[REG_SP] + (insn & 0xff)));
-}
-
-/* movbu (d16,sp), dn */
-void OP_FAB80000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_byte ((State.regs[REG_SP] + (insn & 0xffff)));
-}
-
-/* movbu (d32,sp), dn */
-void OP_FCB80000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_byte (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension));
-}
-
-/* movbu (di,am), dn */
-void OP_F400 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_4 (insn)]
- = load_byte ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]));
-}
-
-/* movbu (abs16), dn */
-void OP_340000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)] = load_byte ((insn & 0xffff));
-}
-
-/* movbu (abs32), dn */
-void OP_FCA80000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_byte ((((insn & 0xffff) << 16) + extension));
-}
-
-/* movbu dm, (an) */
-void OP_F050 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte (State.regs[REG_A0 + REG0 (insn)],
- State.regs[REG_D0 + REG1 (insn)]);
-}
-
-/* movbu dm, (d8,an) */
-void OP_F85000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff)),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* movbu dm, (d16,an) */
-void OP_FA500000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((State.regs[REG_A0 + REG0_16 (insn)] + SEXT16 (insn & 0xffff)),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movbu dm, (d32,an) */
-void OP_FC500000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movbu dm, (d8,sp) */
-void OP_F89200 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte (State.regs[REG_SP] + (insn & 0xff),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* movbu dm, (d16,sp) */
-void OP_FA920000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte (State.regs[REG_SP] + (insn & 0xffff),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movbu dm (d32,sp) */
-void OP_FC920000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movbu dm, (di,an) */
-void OP_F440 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]),
- State.regs[REG_D0 + REG0_4 (insn)]);
-}
-
-/* movbu dm, (abs16) */
-void OP_20000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((insn & 0xffff), State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movbu dm, (abs32) */
-void OP_FC820000 (insn, extension)
- unsigned long insn, extension;
-{
- store_byte ((((insn & 0xffff) << 16) + extension), State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu (am), dn */
-void OP_F060 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1 (insn)]
- = load_half (State.regs[REG_A0 + REG0 (insn)]);
-}
-
-/* movhu (d8,am), dn */
-void OP_F86000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_8 (insn)]
- = load_half ((State.regs[REG_A0 + REG0_8 (insn)]
- + SEXT8 (insn & 0xff)));
-}
-
-/* movhu (d16,am), dn */
-void OP_FA600000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_half ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT16 (insn & 0xffff)));
-}
-
-/* movhu (d32,am), dn */
-void OP_FC600000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1_16 (insn)]
- = load_half ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension));
-}
-
-/* movhu (d8,sp) dn */
-void OP_F8BC00 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_8 (insn)]
- = load_half ((State.regs[REG_SP] + (insn & 0xff)));
-}
-
-/* movhu (d16,sp), dn */
-void OP_FABC0000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_half ((State.regs[REG_SP] + (insn & 0xffff)));
-}
-
-/* movhu (d32,sp), dn */
-void OP_FCBC0000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_half (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension));
-}
-
-/* movhu (di,am), dn */
-void OP_F480 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_4 (insn)]
- = load_half ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]));
-}
-
-/* movhu (abs16), dn */
-void OP_380000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)] = load_half ((insn & 0xffff));
-}
-
-/* movhu (abs32), dn */
-void OP_FCAC0000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0_16 (insn)]
- = load_half ((((insn & 0xffff) << 16) + extension));
-}
-
-/* movhu dm, (an) */
-void OP_F070 (insn, extension)
- unsigned long insn, extension;
-{
- store_half (State.regs[REG_A0 + REG0 (insn)],
- State.regs[REG_D0 + REG1 (insn)]);
-}
-
-/* movhu dm, (d8,an) */
-void OP_F87000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((State.regs[REG_A0 + REG0_8 (insn)] + SEXT8 (insn & 0xff)),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* movhu dm, (d16,an) */
-void OP_FA700000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((State.regs[REG_A0 + REG0_16 (insn)] + SEXT16 (insn & 0xffff)),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu dm, (d32,an) */
-void OP_FC700000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((State.regs[REG_A0 + REG0_16 (insn)]
- + ((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu dm,(d8,sp) */
-void OP_F89300 (insn, extension)
- unsigned long insn, extension;
-{
- store_half (State.regs[REG_SP] + (insn & 0xff),
- State.regs[REG_D0 + REG1_8 (insn)]);
-}
-
-/* movhu dm,(d16,sp) */
-void OP_FA930000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half (State.regs[REG_SP] + (insn & 0xffff),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu dm,(d32,sp) */
-void OP_FC930000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half (State.regs[REG_SP] + (((insn & 0xffff) << 16) + extension),
- State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu dm, (di,an) */
-void OP_F4C0 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((State.regs[REG_A0 + REG0 (insn)]
- + State.regs[REG_D0 + REG1 (insn)]),
- State.regs[REG_D0 + REG0_4 (insn)]);
-}
-
-/* movhu dm, (abs16) */
-void OP_30000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((insn & 0xffff), State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* movhu dm, (abs32) */
-void OP_FC830000 (insn, extension)
- unsigned long insn, extension;
-{
- store_half ((((insn & 0xffff) << 16) + extension), State.regs[REG_D0 + REG1_16 (insn)]);
-}
-
-/* ext dn */
-void OP_F2D0 (insn, extension)
- unsigned long insn, extension;
-{
- if (State.regs[REG_D0 + REG0 (insn)] & 0x80000000)
- State.regs[REG_MDR] = -1;
- else
- State.regs[REG_MDR] = 0;
-}
-
-/* extb dn */
-void OP_10 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] = SEXT8 (State.regs[REG_D0 + REG0 (insn)]);
-}
-
-/* extbu dn */
-void OP_14 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] &= 0xff;
-}
-
-/* exth dn */
-void OP_18 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)]
- = SEXT16 (State.regs[REG_D0 + REG0 (insn)]);
-}
-
-/* exthu dn */
-void OP_1C (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG0 (insn)] &= 0xffff;
-}
-
-/* movm (sp), reg_list */
-void OP_CE00 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long sp = State.regs[REG_SP];
- unsigned long mask;
-
- mask = insn & 0xff;
-
- if (mask & 0x8)
- {
- sp += 4;
- State.regs[REG_LAR] = load_word (sp);
- sp += 4;
- State.regs[REG_LIR] = load_word (sp);
- sp += 4;
- State.regs[REG_MDR] = load_word (sp);
- sp += 4;
- State.regs[REG_A0 + 1] = load_word (sp);
- sp += 4;
- State.regs[REG_A0] = load_word (sp);
- sp += 4;
- State.regs[REG_D0 + 1] = load_word (sp);
- sp += 4;
- State.regs[REG_D0] = load_word (sp);
- sp += 4;
- }
-
- if (mask & 0x10)
- {
- State.regs[REG_A0 + 3] = load_word (sp);
- sp += 4;
- }
-
- if (mask & 0x20)
- {
- State.regs[REG_A0 + 2] = load_word (sp);
- sp += 4;
- }
-
- if (mask & 0x40)
- {
- State.regs[REG_D0 + 3] = load_word (sp);
- sp += 4;
- }
-
- if (mask & 0x80)
- {
- State.regs[REG_D0 + 2] = load_word (sp);
- sp += 4;
- }
-
- /* And make sure to update the stack pointer. */
- State.regs[REG_SP] = sp;
-}
-
-/* movm reg_list, (sp) */
-void OP_CF00 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long sp = State.regs[REG_SP];
- unsigned long mask;
-
- mask = insn & 0xff;
-
- if (mask & 0x80)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 2]);
- }
-
- if (mask & 0x40)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 3]);
- }
-
- if (mask & 0x20)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 2]);
- }
-
- if (mask & 0x10)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 3]);
- }
-
- if (mask & 0x8)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0]);
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_MDR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LIR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LAR]);
- sp -= 4;
- }
-
- /* And make sure to update the stack pointer. */
- State.regs[REG_SP] = sp;
-}
-
-/* clr dn */
-void OP_0 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_D0 + REG1 (insn)] = 0;
-
- PSW |= PSW_Z;
- PSW &= ~(PSW_V | PSW_C | PSW_N);
-}
-
-/* add dm,dn */
-void OP_E0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg1 + reg2;
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < reg2);
- v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add dm, an */
-void OP_F160 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg1 + reg2;
- State.regs[REG_A0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < reg2);
- v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add am, dn */
-void OP_F150 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg1 + reg2;
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < reg2);
- v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add am,an */
-void OP_F170 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg1 + reg2;
- State.regs[REG_A0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < reg2);
- v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm8, dn */
-void OP_2800 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_8 (insn)];
- imm = SEXT8 (insn & 0xff);
- value = reg1 + imm;
- State.regs[REG_D0 + REG0_8 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm16, dn */
-void OP_FAC00000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_16 (insn)];
- imm = SEXT16 (insn & 0xffff);
- value = reg1 + imm;
- State.regs[REG_D0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm32,dn */
-void OP_FCC00000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 + imm;
- State.regs[REG_D0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm8, an */
-void OP_2000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_8 (insn)];
- imm = SEXT8 (insn & 0xff);
- value = reg1 + imm;
- State.regs[REG_A0 + REG0_8 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm16, an */
-void OP_FAD00000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_16 (insn)];
- imm = SEXT16 (insn & 0xffff);
- value = reg1 + imm;
- State.regs[REG_A0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm32, an */
-void OP_FCD00000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 + imm;
- State.regs[REG_A0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* add imm8, sp */
-void OP_F8FE00 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_SP];
- imm = SEXT8 (insn & 0xff);
- value = reg1 + imm;
- State.regs[REG_SP] = value;
-}
-
-/* add imm16,sp */
-void OP_FAFE0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_SP];
- imm = SEXT16 (insn & 0xffff);
- value = reg1 + imm;
- State.regs[REG_SP] = value;
-}
-
-/* add imm32, sp */
-void OP_FCFE0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_SP];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 + imm;
- State.regs[REG_SP] = value;
-}
-
-/* addc dm,dn */
-void OP_F140 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg1 + reg2 + ((PSW & PSW_C) != 0);
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < reg1) || (value < reg2);
- v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub dm, dn */
-void OP_F100 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg2 - reg1;
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub dm, an */
-void OP_F120 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg2 - reg1;
- State.regs[REG_A0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub am, dn */
-void OP_F110 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg2 - reg1;
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub am, an */
-void OP_F130 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg2 - reg1;
- State.regs[REG_A0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub imm32, dn */
-void OP_FCC40000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 - imm;
- State.regs[REG_D0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* sub imm32, an */
-void OP_FCD40000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 - imm;
- State.regs[REG_A0 + REG0_16 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* subc dm, dn */
-void OP_F180 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg2 - reg1 - ((PSW & PSW_C) != 0);
- State.regs[REG_D0 + REG0 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* mul dm, dn */
-void OP_F240 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((signed64)(signed32)State.regs[REG_D0 + REG0 (insn)]
- * (signed64)(signed32)State.regs[REG_D0 + REG1 (insn)]);
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulu dm, dn */
-void OP_F250 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((unsigned64)State.regs[REG_D0 + REG0 (insn)]
- * (unsigned64)State.regs[REG_D0 + REG1 (insn)]);
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* div dm, dn */
-void OP_F260 (insn, extension)
- unsigned long insn, extension;
-{
- long long temp;
- int n, z;
-
- temp = State.regs[REG_MDR];
- temp <<= 32;
- temp |= State.regs[REG_D0 + REG0 (insn)];
- State.regs[REG_MDR] = temp % (long)State.regs[REG_D0 + REG1 (insn)];
- temp /= (long)State.regs[REG_D0 + REG1 (insn)];
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* divu dm, dn */
-void OP_F270 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = State.regs[REG_MDR];
- temp <<= 32;
- temp |= State.regs[REG_D0 + REG0 (insn)];
- State.regs[REG_MDR] = temp % State.regs[REG_D0 + REG1 (insn)];
- temp /= State.regs[REG_D0 + REG1 (insn)];
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* inc dn */
-void OP_40 (insn, extension)
- unsigned long insn, extension;
-{
- int z,n,c,v;
- unsigned int value, imm, reg1;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- imm = 1;
- value = reg1 + imm;
- State.regs[REG_D0 + REG1 (insn)] = value;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (value < imm);
- v = ((reg1 & 0x80000000) == (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* inc an */
-void OP_41 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG1 (insn)] += 1;
-}
-
-/* inc4 an */
-void OP_50 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_A0 + REG0 (insn)] += 4;
-}
-
-/* cmp imm8, dn */
-void OP_A000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_8 (insn)];
- imm = SEXT8 (insn & 0xff);
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp dm, dn */
-void OP_A0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg2 - reg1;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp dm, an */
-void OP_F1A0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_D0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg2 - reg1;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp am, dn */
-void OP_F190 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_D0 + REG0 (insn)];
- value = reg2 - reg1;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp imm8, an */
-void OP_B000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_8 (insn)];
- imm = insn & 0xff;
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp am, an */
-void OP_B0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, reg2, value;
-
- reg1 = State.regs[REG_A0 + REG1 (insn)];
- reg2 = State.regs[REG_A0 + REG0 (insn)];
- value = reg2 - reg1;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 > reg2);
- v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
- && (reg2 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp imm16, dn */
-void OP_FAC80000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_16 (insn)];
- imm = SEXT16 (insn & 0xffff);
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp imm32, dn */
-void OP_FCC80000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_D0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp imm16, an */
-void OP_FAD80000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_16 (insn)];
- imm = insn & 0xffff;
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* cmp imm32, an */
-void OP_FCD80000 (insn, extension)
- unsigned long insn, extension;
-{
- int z, c, n, v;
- unsigned long reg1, imm, value;
-
- reg1 = State.regs[REG_A0 + REG0_16 (insn)];
- imm = ((insn & 0xffff) << 16) + extension;
- value = reg1 - imm;
-
- z = (value == 0);
- n = (value & 0x80000000);
- c = (reg1 < imm);
- v = ((reg1 & 0x80000000) != (imm & 0x80000000)
- && (reg1 & 0x80000000) != (value & 0x80000000));
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
- | (c ? PSW_C : 0) | (v ? PSW_V : 0));
-}
-
-/* and dm, dn */
-void OP_F200 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)] &= State.regs[REG_D0 + REG1 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* and imm8, dn */
-void OP_F8E000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_8 (insn)] &= (insn & 0xff);
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* and imm16, dn */
-void OP_FAE00000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)] &= (insn & 0xffff);
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* and imm32, dn */
-void OP_FCE00000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)]
- &= ((insn & 0xffff) << 16) + extension;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* and imm16, psw */
-void OP_FAFC0000 (insn, extension)
- unsigned long insn, extension;
-{
- PSW &= (insn & 0xffff);
-}
-
-/* or dm, dn*/
-void OP_F210 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)] |= State.regs[REG_D0 + REG1 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* or imm8, dn */
-void OP_F8E400 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_8 (insn)] |= insn & 0xff;
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* or imm16, dn*/
-void OP_FAE40000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)] |= insn & 0xffff;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* or imm32, dn */
-void OP_FCE40000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)]
- |= ((insn & 0xffff) << 16) + extension;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* or imm16,psw */
-void OP_FAFD0000 (insn, extension)
- unsigned long insn, extension;
-{
- PSW |= (insn & 0xffff);
-}
-
-/* xor dm, dn */
-void OP_F220 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)] ^= State.regs[REG_D0 + REG1 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* xor imm16, dn */
-void OP_FAE80000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)] ^= insn & 0xffff;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* xor imm32, dn */
-void OP_FCE80000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_16 (insn)]
- ^= ((insn & 0xffff) << 16) + extension;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* not dn */
-void OP_F230 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)] = ~State.regs[REG_D0 + REG0 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* btst imm8, dn */
-void OP_F8EC00 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z, n;
-
- temp = State.regs[REG_D0 + REG0_8 (insn)];
- temp &= (insn & 0xff);
- n = (temp & 0x80000000) != 0;
- z = (temp == 0);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* btst imm16, dn */
-void OP_FAEC0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z, n;
-
- temp = State.regs[REG_D0 + REG0_16 (insn)];
- temp &= (insn & 0xffff);
- n = (temp & 0x80000000) != 0;
- z = (temp == 0);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* btst imm32, dn */
-void OP_FCEC0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z, n;
-
- temp = State.regs[REG_D0 + REG0_16 (insn)];
- temp &= ((insn & 0xffff) << 16) + extension;
- n = (temp & 0x80000000) != 0;
- z = (temp == 0);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* btst imm8,(abs32) */
-void OP_FE020000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int n, z;
-
- temp = load_byte (((insn & 0xffff) << 16) | (extension >> 8));
- temp &= (extension & 0xff);
- n = (temp & 0x80000000) != 0;
- z = (temp == 0);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* btst imm8,(d8,an) */
-void OP_FAF80000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int n, z;
-
- temp = load_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT8 ((insn & 0xff00) >> 8)));
- temp &= (insn & 0xff);
- n = (temp & 0x80000000) != 0;
- z = (temp == 0);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* bset dm, (an) */
-void OP_F080 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte (State.regs[REG_A0 + REG0 (insn)]);
- z = (temp & State.regs[REG_D0 + REG1 (insn)]) == 0;
- temp |= State.regs[REG_D0 + REG1 (insn)];
- store_byte (State.regs[REG_A0 + REG0 (insn)], temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* bset imm8, (abs32) */
-void OP_FE000000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte (((insn & 0xffff) << 16 | (extension >> 8)));
- z = (temp & (extension & 0xff)) == 0;
- temp |= (extension & 0xff);
- store_byte ((((insn & 0xffff) << 16) | (extension >> 8)), temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* bset imm8,(d8,an) */
-void OP_FAF00000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT8 ((insn & 0xff00) >> 8)));
- z = (temp & (insn & 0xff)) == 0;
- temp |= (insn & 0xff);
- store_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT8 ((insn & 0xff00) >> 8)), temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* bclr dm, (an) */
-void OP_F090 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte (State.regs[REG_A0 + REG0 (insn)]);
- z = (temp & State.regs[REG_D0 + REG1 (insn)]) == 0;
- temp = temp & ~State.regs[REG_D0 + REG1 (insn)];
- store_byte (State.regs[REG_A0 + REG0 (insn)], temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* bclr imm8, (abs32) */
-void OP_FE010000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte (((insn & 0xffff) << 16) | (extension >> 8));
- z = (temp & (extension & 0xff)) == 0;
- temp = temp & ~(extension & 0xff);
- store_byte (((insn & 0xffff) << 16) | (extension >> 8), temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* bclr imm8,(d8,an) */
-void OP_FAF40000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long temp;
- int z;
-
- temp = load_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT8 ((insn & 0xff00) >> 8)));
- z = (temp & (insn & 0xff)) == 0;
- temp = temp & ~(insn & 0xff);
- store_byte ((State.regs[REG_A0 + REG0_16 (insn)]
- + SEXT8 ((insn & 0xff00) >> 8)), temp);
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0);
-}
-
-/* asr dm, dn */
-void OP_F2B0 (insn, extension)
- unsigned long insn, extension;
-{
- long temp;
- int z, n, c;
-
- temp = State.regs[REG_D0 + REG0 (insn)];
- c = temp & 1;
- temp >>= State.regs[REG_D0 + REG1 (insn)];
- State.regs[REG_D0 + REG0 (insn)] = temp;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* asr imm8, dn */
-void OP_F8C800 (insn, extension)
- unsigned long insn, extension;
-{
- long temp;
- int z, n, c;
-
- temp = State.regs[REG_D0 + REG0_8 (insn)];
- c = temp & 1;
- temp >>= (insn & 0xff);
- State.regs[REG_D0 + REG0_8 (insn)] = temp;
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* lsr dm, dn */
-void OP_F2A0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, n, c;
-
- c = State.regs[REG_D0 + REG0 (insn)] & 1;
- State.regs[REG_D0 + REG0 (insn)]
- >>= State.regs[REG_D0 + REG1 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* lsr imm8, dn */
-void OP_F8C400 (insn, extension)
- unsigned long insn, extension;
-{
- int z, n, c;
-
- c = State.regs[REG_D0 + REG0_8 (insn)] & 1;
- State.regs[REG_D0 + REG0_8 (insn)] >>= (insn & 0xff);
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* asl dm, dn */
-void OP_F290 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)]
- <<= State.regs[REG_D0 + REG1 (insn)];
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* asl imm8, dn */
-void OP_F8C000 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0_8 (insn)] <<= (insn & 0xff);
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* asl2 dn */
-void OP_54 (insn, extension)
- unsigned long insn, extension;
-{
- int n, z;
-
- State.regs[REG_D0 + REG0 (insn)] <<= 2;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* ror dn */
-void OP_F284 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
- int c,n,z;
-
- value = State.regs[REG_D0 + REG0 (insn)];
- c = (value & 0x1);
-
- value >>= 1;
- value |= ((PSW & PSW_C) != 0) ? 0x80000000 : 0;
- State.regs[REG_D0 + REG0 (insn)] = value;
- z = (value == 0);
- n = (value & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* rol dn */
-void OP_F280 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long value;
- int c,n,z;
-
- value = State.regs[REG_D0 + REG0 (insn)];
- c = (value & 0x80000000) ? 1 : 0;
-
- value <<= 1;
- value |= ((PSW & PSW_C) != 0);
- State.regs[REG_D0 + REG0 (insn)] = value;
- z = (value == 0);
- n = (value & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
-}
-
-/* beq label:8 */
-void OP_C800 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (PSW & PSW_Z)
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bne label:8 */
-void OP_C900 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (!(PSW & PSW_Z))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bgt label:8 */
-void OP_C100 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (!((PSW & PSW_Z)
- || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bge label:8 */
-void OP_C200 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (!(((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* ble label:8 */
-void OP_C300 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if ((PSW & PSW_Z)
- || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* blt label:8 */
-void OP_C000 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bhi label:8 */
-void OP_C500 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (!(((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bcc label:8 */
-void OP_C600 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (!(PSW & PSW_C))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bls label:8 */
-void OP_C700 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0)
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bcs label:8 */
-void OP_C400 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- if (PSW & PSW_C)
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* bvc label:8 */
-void OP_F8E800 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 3 after we return, so
- we subtract two here to make things right. */
- if (!(PSW & PSW_V))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 3;
-}
-
-/* bvs label:8 */
-void OP_F8E900 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 3 after we return, so
- we subtract two here to make things right. */
- if (PSW & PSW_V)
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 3;
-}
-
-/* bnc label:8 */
-void OP_F8EA00 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 3 after we return, so
- we subtract two here to make things right. */
- if (!(PSW & PSW_N))
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 3;
-}
-
-/* bns label:8 */
-void OP_F8EB00 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 3 after we return, so
- we subtract two here to make things right. */
- if (PSW & PSW_N)
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 3;
-}
-
-/* bra label:8 */
-void OP_CA00 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 2 after we return, so
- we subtract two here to make things right. */
- State.regs[REG_PC] += SEXT8 (insn & 0xff) - 2;
-}
-
-/* leq */
-void OP_D8 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (PSW & PSW_Z)
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lne */
-void OP_D9 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (!(PSW & PSW_Z))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lgt */
-void OP_D1 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (!((PSW & PSW_Z)
- || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lge */
-void OP_D2 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (!(((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lle */
-void OP_D3 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if ((PSW & PSW_Z)
- || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* llt */
-void OP_D0 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lhi */
-void OP_D5 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (!(((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lcc */
-void OP_D6 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (!(PSW & PSW_C))
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lls */
-void OP_D7 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0)
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lcs */
-void OP_D4 (insn, extension)
- unsigned long insn, extension;
-{
- /* The dispatching code will add 1 after we return, so
- we subtract one here to make things right. */
- if (PSW & PSW_C)
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* lra */
-void OP_DA (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_PC] = State.regs[REG_LAR] - 4 - 1;
-}
-
-/* setlb */
-void OP_DB (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_LIR] = load_mem_big (State.regs[REG_PC] + 1, 4);
- State.regs[REG_LAR] = State.regs[REG_PC] + 5;
-}
-
-/* jmp (an) */
-void OP_F0F4 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_PC] = State.regs[REG_A0 + REG0 (insn)] - 2;
-}
-
-/* jmp label:16 */
-void OP_CC0000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_PC] += SEXT16 (insn & 0xffff) - 3;
-}
-
-/* jmp label:32 */
-void OP_DC000000 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_PC] += (((insn & 0xffffff) << 8) + extension) - 5;
-}
-
-/* call label:16,reg_list,imm8 */
-void OP_CD000000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int next_pc, sp;
- unsigned long mask;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 5;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
-
- mask = insn & 0xff;
-
- if (mask & 0x80)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 2]);
- }
-
- if (mask & 0x40)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 3]);
- }
-
- if (mask & 0x20)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 2]);
- }
-
- if (mask & 0x10)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 3]);
- }
-
- if (mask & 0x8)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0]);
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_MDR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LIR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LAR]);
- sp -= 4;
- }
-
- /* Update the stack pointer, note that the register saves to do not
- modify SP. The SP adjustment is derived totally from the imm8
- field. */
- State.regs[REG_SP] -= extension;
- State.regs[REG_MDR] = next_pc;
- State.regs[REG_PC] += SEXT16 ((insn & 0xffff00) >> 8) - 5;
-}
-
-/* call label:32,reg_list,imm8*/
-void OP_DD000000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int next_pc, sp, adjust;
- unsigned long mask;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 7;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
-
- mask = (extension & 0xff00) >> 8;
-
- if (mask & 0x80)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 2]);
- }
-
- if (mask & 0x40)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 3]);
- }
-
- if (mask & 0x20)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 2]);
- }
-
- if (mask & 0x10)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 3]);
- }
-
- if (mask & 0x8)
- {
- sp -= 4;
- store_word (sp, State.regs[REG_D0]);
- sp -= 4;
- store_word (sp, State.regs[REG_D0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0]);
- sp -= 4;
- store_word (sp, State.regs[REG_A0 + 1]);
- sp -= 4;
- store_word (sp, State.regs[REG_MDR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LIR]);
- sp -= 4;
- store_word (sp, State.regs[REG_LAR]);
- sp -= 4;
- }
-
- /* Update the stack pointer, note that the register saves to do not
- modify SP. The SP adjustment is derived totally from the imm8
- field. */
- State.regs[REG_SP] -= (extension & 0xff);
- State.regs[REG_MDR] = next_pc;
- State.regs[REG_PC] += (((insn & 0xffffff) << 8) | ((extension & 0xff0000) >> 16)) - 7;
-}
-
-/* calls (an) */
-void OP_F0F0 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int next_pc, sp;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 2;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
- State.regs[REG_MDR] = next_pc;
- State.regs[REG_PC] = State.regs[REG_A0 + REG0 (insn)] - 2;
-}
-
-/* calls label:16 */
-void OP_FAFF0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int next_pc, sp;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 4;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
- State.regs[REG_MDR] = next_pc;
- State.regs[REG_PC] += SEXT16 (insn & 0xffff) - 4;
-}
-
-/* calls label:32 */
-void OP_FCFF0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int next_pc, sp;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 6;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
- State.regs[REG_MDR] = next_pc;
- State.regs[REG_PC] += (((insn & 0xffff) << 16) + extension) - 6;
-}
-
-/* ret reg_list, imm8 */
-void OP_DF0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int sp, offset;
- unsigned long mask;
-
- State.regs[REG_SP] += insn & 0xff;
- sp = State.regs[REG_SP];
-
- offset = -4;
- mask = (insn & 0xff00) >> 8;
-
- if (mask & 0x80)
- {
- State.regs[REG_D0 + 2] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x40)
- {
- State.regs[REG_D0 + 3] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x20)
- {
- State.regs[REG_A0 + 2] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x10)
- {
- State.regs[REG_A0 + 3] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x8)
- {
- State.regs[REG_D0] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_D0 + 1] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_A0] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_A0 + 1] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_MDR] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_LIR] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_LAR] = load_word (sp + offset);
- offset -= 4;
- }
-
- /* Restore the PC value. */
- State.regs[REG_PC] = (State.mem[sp] | (State.mem[sp+1] << 8)
- | (State.mem[sp+2] << 16) | (State.mem[sp+3] << 24));
- State.regs[REG_PC] -= 3;
-}
-
-/* retf reg_list,imm8 */
-void OP_DE0000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int sp, offset;
- unsigned long mask;
-
- State.regs[REG_SP] += (insn & 0xff);
- sp = State.regs[REG_SP];
- State.regs[REG_PC] = State.regs[REG_MDR] - 3;
-
- offset = -4;
- mask = (insn & 0xff00) >> 8;
-
- if (mask & 0x80)
- {
- State.regs[REG_D0 + 2] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x40)
- {
- State.regs[REG_D0 + 3] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x20)
- {
- State.regs[REG_A0 + 2] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x10)
- {
- State.regs[REG_A0 + 3] = load_word (sp + offset);
- offset -= 4;
- }
-
- if (mask & 0x8)
- {
- State.regs[REG_D0] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_D0 + 1] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_A0] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_A0 + 1] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_MDR] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_LIR] = load_word (sp + offset);
- offset -= 4;
- State.regs[REG_LAR] = load_word (sp + offset);
- offset -= 4;
- }
-}
-
-/* rets */
-void OP_F0FC (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int sp;
-
- sp = State.regs[REG_SP];
- State.regs[REG_PC] = (State.mem[sp] | (State.mem[sp+1] << 8)
- | (State.mem[sp+2] << 16) | (State.mem[sp+3] << 24));
- State.regs[REG_PC] -= 2;
-}
-
-/* rti */
-void OP_F0FD (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int sp, next_pc;
-
- sp = State.regs[REG_SP];
- PSW = State.mem[sp] | (State.mem[sp + 1] << 8);
- State.regs[REG_PC] = (State.mem[sp+4] | (State.mem[sp+5] << 8)
- | (State.mem[sp+6] << 16) | (State.mem[sp+7] << 24));
- State.regs[REG_SP] += 8;
-}
-
-/* trap */
-void OP_F0FE (insn, extension)
- unsigned long insn, extension;
-{
- unsigned int sp, next_pc;
-
- sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 2;
- State.mem[sp] = next_pc & 0xff;
- State.mem[sp+1] = (next_pc & 0xff00) >> 8;
- State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
- State.mem[sp+3] = (next_pc & 0xff000000) >> 24;
- State.regs[REG_PC] = 0x40000010 - 2;
-}
-
-/* syscall */
-void OP_F0C0 (insn, extension)
- unsigned long insn, extension;
-{
- /* We use this for simulated system calls; we may need to change
- it to a reserved instruction if we conflict with uses at
- Matsushita. */
- int save_errno = errno;
- errno = 0;
-
-/* Registers passed to trap 0 */
-
-/* Function number. */
-#define FUNC (State.regs[0])
-
-/* Parameters. */
-#define PARM1 (State.regs[1])
-#define PARM2 (load_word (State.regs[REG_SP] + 12))
-#define PARM3 (load_word (State.regs[REG_SP] + 16))
-
-/* Registers set by trap 0 */
-
-#define RETVAL State.regs[0] /* return value */
-#define RETERR State.regs[1] /* return error code */
-
-/* Turn a pointer in a register into a pointer into real memory. */
-
-#define MEMPTR(x) (State.mem + x)
-
- switch (FUNC)
- {
-#if !defined(__GO32__) && !defined(_WIN32)
-#ifdef TARGET_SYS_fork
- case TARGET_SYS_fork:
- RETVAL = fork ();
- break;
-#endif
-#ifdef TARGET_SYS_execve
- case TARGET_SYS_execve:
- RETVAL = execve (MEMPTR (PARM1), (char **) MEMPTR (PARM2),
- (char **)MEMPTR (PARM3));
- break;
-#endif
-#ifdef TARGET_SYS_execv
- case TARGET_SYS_execv:
- RETVAL = execve (MEMPTR (PARM1), (char **) MEMPTR (PARM2), NULL);
- break;
-#endif
-#endif /* ! GO32 and ! WIN32 */
-
- case TARGET_SYS_read:
- RETVAL = mn10300_callback->read (mn10300_callback, PARM1,
- MEMPTR (PARM2), PARM3);
- break;
- case TARGET_SYS_write:
- RETVAL = (int)mn10300_callback->write (mn10300_callback, PARM1,
- MEMPTR (PARM2), PARM3);
- break;
- case TARGET_SYS_lseek:
- RETVAL = mn10300_callback->lseek (mn10300_callback, PARM1, PARM2, PARM3);
- break;
- case TARGET_SYS_close:
- RETVAL = mn10300_callback->close (mn10300_callback, PARM1);
- break;
- case TARGET_SYS_open:
- RETVAL = mn10300_callback->open (mn10300_callback, MEMPTR (PARM1), PARM2);
- break;
- case TARGET_SYS_exit:
- /* EXIT - caller can look in PARM1 to work out the
- reason */
- if (PARM1 == 0xdead)
- State.exception = SIGABRT;
- else
- State.exception = SIGQUIT;
- State.exited = 1;
- break;
-
- case TARGET_SYS_stat: /* added at hmsi */
- /* stat system call */
- {
- struct stat host_stat;
- reg_t buf;
-
- RETVAL = stat (MEMPTR (PARM1), &host_stat);
-
- buf = PARM2;
-
- /* Just wild-assed guesses. */
- store_half (buf, host_stat.st_dev);
- store_half (buf + 2, host_stat.st_ino);
- store_word (buf + 4, host_stat.st_mode);
- store_half (buf + 8, host_stat.st_nlink);
- store_half (buf + 10, host_stat.st_uid);
- store_half (buf + 12, host_stat.st_gid);
- store_half (buf + 14, host_stat.st_rdev);
- store_word (buf + 16, host_stat.st_size);
- store_word (buf + 20, host_stat.st_atime);
- store_word (buf + 28, host_stat.st_mtime);
- store_word (buf + 36, host_stat.st_ctime);
- }
- break;
-
-#ifdef TARGET_SYS_chown
- case TARGET_SYS_chown:
- RETVAL = chown (MEMPTR (PARM1), PARM2, PARM3);
- break;
-#endif
- case TARGET_SYS_chmod:
- RETVAL = chmod (MEMPTR (PARM1), PARM2);
- break;
-#ifdef TARGET_SYS_time
- case TARGET_SYS_time:
- RETVAL = time ((void*) MEMPTR (PARM1));
- break;
-#endif
-#ifdef TARGET_SYS_times
- case TARGET_SYS_times:
- {
- struct tms tms;
- RETVAL = times (&tms);
- store_word (PARM1, tms.tms_utime);
- store_word (PARM1 + 4, tms.tms_stime);
- store_word (PARM1 + 8, tms.tms_cutime);
- store_word (PARM1 + 12, tms.tms_cstime);
- break;
- }
-#endif
-#ifdef TARGET_SYS_gettimeofday
- case TARGET_SYS_gettimeofday:
- {
- struct timeval t;
- struct timezone tz;
- RETVAL = gettimeofday (&t, &tz);
- store_word (PARM1, t.tv_sec);
- store_word (PARM1 + 4, t.tv_usec);
- store_word (PARM2, tz.tz_minuteswest);
- store_word (PARM2 + 4, tz.tz_dsttime);
- break;
- }
-#endif
-#ifdef TARGET_SYS_utime
- case TARGET_SYS_utime:
- /* Cast the second argument to void *, to avoid type mismatch
- if a prototype is present. */
- RETVAL = utime (MEMPTR (PARM1), (void *) MEMPTR (PARM2));
- break;
-#endif
- default:
- abort ();
- }
- RETERR = errno;
- errno = save_errno;
-}
-
-/* rtm */
-void OP_F0FF (insn, extension)
- unsigned long insn, extension;
-{
- abort ();
-}
-
-/* nop */
-void OP_CB (insn, extension)
- unsigned long insn, extension;
-{
-}
-
-/* putx dm,dm */
-void OP_F500 (insn, extension)
- unsigned long insn, extension;
-{
- State.regs[REG_MDRQ] = State.regs[REG_D0 + REG0 (insn)];
-}
-
-/* getx dm,dm */
-void OP_F6F0 (insn, extension)
- unsigned long insn, extension;
-{
- int z, n;
- z = (State.regs[REG_MDRQ] == 0);
- n = ((State.regs[REG_MDRQ] & 0x80000000) != 0);
- State.regs[REG_D0 + REG0 (insn)] = State.regs[REG_MDRQ];
-
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
-}
-
-/* mulq dm,dn */
-void OP_F600 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((signed64)(signed32)State.regs[REG_D0 + REG0 (insn)]
- * (signed64)(signed32)State.regs[REG_D0 + REG1 (insn)]);
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulq imm8,dn */
-void OP_F90000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((signed64)(signed32)State.regs[REG_D0 + REG0_8 (insn)]
- * (signed64)(signed32)SEXT8 (insn & 0xff));
- State.regs[REG_D0 + REG0_8 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulq imm16,dn */
-void OP_FB000000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((signed64)(signed32)State.regs[REG_D0 + REG0_16 (insn)]
- * (signed64)(signed32)SEXT16 (insn & 0xffff));
- State.regs[REG_D0 + REG0_16 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulq imm32,dn */
-void OP_FD000000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((signed64)(signed32)State.regs[REG_D0 + REG0_16 (insn)]
- * (signed64)(signed32)(((insn & 0xffff) << 16) + extension));
- State.regs[REG_D0 + REG0_16 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulqu dm,dn */
-void OP_F610 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((unsigned64) State.regs[REG_D0 + REG0 (insn)]
- * (unsigned64) State.regs[REG_D0 + REG1 (insn)]);
- State.regs[REG_D0 + REG0 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulqu imm8,dn */
-void OP_F91400 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((unsigned64)State.regs[REG_D0 + REG0_8 (insn)]
- * (unsigned64)SEXT8 (insn & 0xff));
- State.regs[REG_D0 + REG0_8 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_8 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_8 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulqu imm16,dn */
-void OP_FB140000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((unsigned64)State.regs[REG_D0 + REG0_16 (insn)]
- * (unsigned64) SEXT16 (insn & 0xffff));
- State.regs[REG_D0 + REG0_16 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* mulqu imm32,dn */
-void OP_FD140000 (insn, extension)
- unsigned long insn, extension;
-{
- unsigned long long temp;
- int n, z;
-
- temp = ((unsigned64)State.regs[REG_D0 + REG0_16 (insn)]
- * (unsigned64)(((insn & 0xffff) << 16) + extension));
- State.regs[REG_D0 + REG0_16 (insn)] = temp & 0xffffffff;
- State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
- z = (State.regs[REG_D0 + REG0_16 (insn)] == 0);
- n = (State.regs[REG_D0 + REG0_16 (insn)] & 0x80000000) != 0;
- PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
- PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
-}
-
-/* sat16 dm,dn */
-void OP_F640 (insn, extension)
- unsigned long insn, extension;
-{
- int temp;
-
- temp = State.regs[REG_D0 + REG1 (insn)];
- temp = (temp > 0x7fff ? 0x7fff : temp);
- temp = (temp < -0x8000 ? -0x8000 : temp);
- State.regs[REG_D0 + REG0 (insn)] = temp;
-}
-
-/* sat24 dm,dn */
-void OP_F650 (insn, extension)
- unsigned long insn, extension;
-{
- int temp;
-
- temp = State.regs[REG_D0 + REG1 (insn)];
- temp = (temp > 0x7fffff ? 0x7fffff : temp);
- temp = (temp < -0x800000 ? -0x800000 : temp);
- State.regs[REG_D0 + REG0 (insn)] = temp;
-}
-
-/* bsch dm,dn */
-void OP_F670 (insn, extension)
- unsigned long insn, extension;
-{
- int temp, c;
-
- temp = State.regs[REG_D0 + REG1 (insn)];
- temp <<= (State.regs[REG_D0 + REG0 (insn)] & 0x1f);
- c = (temp != 0 ? 1 : 0);
- PSW &= ~(PSW_C);
- PSW |= (c ? PSW_C : 0);
-}
-
-/* breakpoint */
-void
-OP_FF (insn, extension)
- unsigned long insn, extension;
-{
- State.exception = SIGTRAP;
- PC -= 1;
-}
-
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index d4f94c37802..4d5567990d6 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,98 @@
+2004-08-05 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.in (GDB_INCLUDES): Remove bogus reference to mmalloc.
+
+2004-08-04 Andrew Cagney <cagney@gnu.org>
+ Jim Blandy <jimb@redhat.com>
+
+ * sim_callbacks.h (simulator): Declare.
+ * Makefile.in (gdb-sim.o): New rule.
+ (MAIN_SRC, GDB_OBJ): Add gdb-sim.o, gdb-sim.c.
+ (DEFS_H): Delete.
+ (GDB_SIM_PPC_H): Define.
+ * gdb-sim.c: New file.
+ * sim_calls.c: Do not include "defs.h".
+ (simulator): Drop static.
+ (sim_store_register, sim_fetch_register): Delete.
+
+2004-08-04 Andrew Cagney <cagney@gnu.org>
+
+ * Back out accidently committed change.
+
+2004-08-04 Jim Blandy <jimb@redhat.com>
+
+ Use a fixed register numbering when communicating with the PowerPC
+ simulator.
+ * sim_calls.c: #include "registers.h" and "gdb/sim-ppc.h"; do not
+ include GDB's "defs.h".
+ (gdb_register_name_table): New variable.
+ (gdb_register_name_table_size): New enum constant.
+ (gdb_register_name): New function.
+ (sim_fetch_register, sim_store_register): Use gdb_register_name,
+ instead of calling gdbarch_register_name.
+ * Makefile.in (GDB_SIM_PPC_H): New variable.
+ (DEFS_H): Delete variable.
+ (sim_calls.o): Update dependencies.
+
+2004-07-26 Andrew Cagney <cagney@gnu.org>
+
+ Problem from Olaf Hering <olh@suse.de>.
+ * Makefile.in (install, installdirs): Add DESTDIR.
+
+2004-07-10 Ben Elliston <bje@au.ibm.com>
+
+ * tree.c (parse_integer_property): Comment typo fix.
+
+2004-07-06 Jim Blandy <jimb@redhat.com>
+
+ * Makefile.in: Update all dependency information.
+ (BASICS_H, CPU_H, IDECODE_H, PSIM_H, REGISTERS_H, DEVICE_TABLE_H)
+ (EMUL_GENERIC_H): Values updated.
+ (ACCONFIG_H, ALTIVEC_EXPRESSION_H, ALTIVEC_REGISTERS_H)
+ (ANSIDECL_H, BFD_H, BITS_H, CAP_H, COMMON_SIM_BASE_H)
+ (COMMON_SIM_BASICS_H, COMMON_SIM_FPU_H, COMMON_SIM_INLINE_H)
+ (COMMON_SIM_SIGNAL_H, CONFIG_H, COREFILE_H, COREFILE_N_H, DEBUG_H)
+ (DEFINES_H, DEFS_H, DEVICE_H, E500_EXPRESSION_H, E500_REGISTERS_H)
+ (EMUL_BUGAPI_H, EMUL_CHIRP_H, EMUL_NETBSD_H, EMUL_UNIX_H, EVENTS_H)
+ (FILTER_FILENAME_H, FILTER_H, GDB_CALLBACK_H, GDB_REMOTE_SIM_H)
+ (GEN_ICACHE_H, GEN_IDECODE_H, GEN_ITABLE_H, GEN_MODEL_H)
+ (GEN_SEMANTICS_H, GEN_SUPPORT_H, HW_CPU_H, HW_H, HW_PHB_H)
+ (ICACHE_H, IDECODE_BRANCH_H, IDECODE_EXPRESSION_H)
+ (IDECODE_FIELDS_H, IGEN_H, INLINE_H, INTERRUPTS_H, ITABLE_H)
+ (LD_CACHE_H, LD_DECODE_H, LD_INSN_H, LF_H, MISC_H, MODEL_H, MON_H)
+ (OPTIONS_H, OS_EMUL_H, PK_H, PPC_CONFIG_H, SEMANTICS_H)
+ (SIM_CALLBACKS_H, SIM_ENDIAN_H, SIM_ENDIAN_N_H, SIM_MAIN_H)
+ (SPREG_H, STD_CONFIG_H, SUPPORT_H, TABLE_H, TARG_VALS_H, TCONFIG_H)
+ (TREE_H, VM_H, VM_N_H, WORDS_H): New variables.
+ (callback.o, cap.o, corefile.o, debug.o, device.o, device_table.o)
+ (dgen.o, emul_bugapi.o, emul_chirp.o, emul_netbsd.o, emul_unix.o)
+ (events.o, filter.o, filter_filename.o, filter_host.o)
+ (gen-icache.o, gen-idecode.o, gen-itable.o, gen-model.o)
+ (gen-semantics.o, gen-support.o, hw_core.o, hw_cpu.o, hw_disk.o)
+ (hw_htab.o, hw_init.o, hw_phb.o, hw_register.o, icache.o)
+ (idecode.o, igen.o, interrupts.o, itable.o, ld-cache.o)
+ (ld-decode.o, ld-insn.o, lf.o, main.o, misc.o, model.o, mon.o)
+ (options.o, os_emul.o, pk_disklabel.o, psim.o, registers.o)
+ (semantics.o, sim-endian.o, sim-fpu.o, sim_calls.o, spreg.o)
+ (support.o, table.o, targ-map.o, tree.o, vm.o): Update dependencies.
+
+2004-06-28 Jim Blandy <jimb@redhat.com>
+
+ * e500_registers.h (EVR): Cast the 32-bit value of the GPR to an
+ unsigned type before or-ing it with a 64-bit value.
+
+2004-06-15 Alan Modra <amodra@bigpond.net.au>
+
+ * hw_htab.c (htab_sum_binary(bfd): Use bfd_get_section_size
+ instead of bfd_get_section_size_before_reloc.
+ (htab_dma_binary(bfd): Likewise.
+ * hw_init.c (update_for_binary_section(bfd): Likewise.
+
+2004-05-10 Daniel Jacobowitz <dan@debian.org>
+
+ * configure.in (sim_fpu_cflags): Add -I../common.
+ * configure: Regenerated.
+
2004-01-27 Andrew Cagney <cagney@redhat.com>
* ppc-instructions: Update copyright.
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 335a8b436e3..6b393ad63b2 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -147,7 +147,7 @@ MAKEOVERRIDES=
LIB_INCLUDES = -I$(srcdir)/../../include
BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
-GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
+GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
@@ -169,64 +169,282 @@ all: run $(TARGETLIB) $(GDB_OBJ)
$(CC) -c $(STD_CFLAGS) $<
+# Headers outside sim/ppc.
+ANSIDECL_H = $(srcroot)/include/ansidecl.h
+BFD_H = ../../bfd/bfd.h
+GDB_CALLBACK_H = $(srcroot)/include/gdb/callback.h
+GDB_REMOTE_SIM_H = $(srcroot)/include/gdb/remote-sim.h
+GDB_SIM_PPC_H = $(srcroot)/include/gdb/sim-ppc.h
+COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h
+COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h
+COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h
+COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
+COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
+
+# Headers in sim/ppc.
+ACCONFIG_H = \
+ acconfig.h
+
+ALTIVEC_EXPRESSION_H = \
+ altivec_expression.h
+
+ALTIVEC_REGISTERS_H = \
+ altivec_registers.h
BASICS_H = \
basics.h \
- config.h \
- ppc-config.h \
- inline.h \
- sim_callbacks.h \
- debug.h filter_filename.h \
- words.h \
+ $(CONFIG_H) \
+ $(PPC_CONFIG_H) \
+ $(INLINE_H) \
+ $(SIM_CALLBACKS_H) \
+ $(DEBUG_H) \
+ $(WORDS_H) \
+ $(BITS_H) \
+ $(SIM_ENDIAN_H)
+
+BITS_H = \
bits.h \
- sim-endian.h
+ bits.c
-PSIM_H = \
- psim.h \
+CAP_H = \
+ cap.h \
$(BASICS_H)
-IDECODE_H = \
- idecode.h \
- idecode_expression.h e500_expression.h altivec_expression.h \
- idecode_branch.h \
- idecode_fields.h \
- icache.h
+COREFILE_H = \
+ corefile.h
-REGISTERS_H = \
- registers.h \
- e500_registers.h \
- altivec_registers.h \
- spreg.h
+COREFILE_N_H = \
+ corefile-n.h
CPU_H = \
cpu.h \
$(BASICS_H) \
$(REGISTERS_H) \
+ $(DEVICE_H) \
+ $(COREFILE_H) \
+ $(VM_H) \
+ $(EVENTS_H) \
+ $(INTERRUPTS_H) \
+ $(PSIM_H) \
$(IDECODE_H) \
- device.h \
- corefile.h \
- vm.h \
- events.h \
- interrupts.h \
- psim.h \
- itable.h \
- mon.h \
- model.h
+ $(ITABLE_H) \
+ $(OS_EMUL_H) \
+ $(MON_H) \
+ $(MODEL_H) \
+ cpu.c
+
+DEBUG_H = \
+ debug.h \
+ $(FILTER_FILENAME_H)
+
+DEVICE_H = \
+ device.h
DEVICE_TABLE_H = \
- $(BASICS_H) \
device_table.h \
- device.h \
- tree.h \
- hw.h
+ $(BASICS_H) \
+ $(DEVICE_H) \
+ $(TREE_H) \
+ $(HW_H)
+
+E500_EXPRESSION_H = \
+ e500_expression.h
+
+E500_REGISTERS_H = \
+ e500_registers.h
+
+EMUL_BUGAPI_H = \
+ emul_bugapi.h
+
+EMUL_CHIRP_H = \
+ emul_chirp.h
EMUL_GENERIC_H = \
+ emul_generic.h \
$(CPU_H) \
$(IDECODE_H) \
- emul_generic.h \
- tree.h \
+ $(OS_EMUL_H) \
+ $(TREE_H) \
+ $(BFD_H)
+
+EMUL_NETBSD_H = \
+ emul_netbsd.h
+
+EMUL_UNIX_H = \
+ emul_unix.h
+
+EVENTS_H = \
+ events.h
+
+FILTER_FILENAME_H = \
+ filter_filename.h
+
+FILTER_H = \
+ filter.h
+
+GEN_ICACHE_H = \
+ gen-icache.h
+
+GEN_IDECODE_H = \
+ gen-idecode.h
+
+GEN_ITABLE_H = \
+ gen-itable.h
+
+GEN_MODEL_H = \
+ gen-model.h
+
+GEN_SEMANTICS_H = \
+ gen-semantics.h
+
+GEN_SUPPORT_H = \
+ gen-support.h
+
+HW_CPU_H = \
+ hw_cpu.h
+
+HW_PHB_H = \
+ hw_phb.h
+
+IDECODE_BRANCH_H = \
+ idecode_branch.h
+
+IDECODE_EXPRESSION_H = \
+ idecode_expression.h \
+ $(ALTIVEC_EXPRESSION_H) \
+ $(E500_EXPRESSION_H)
+
+IDECODE_FIELDS_H = \
+ idecode_fields.h
+
+IGEN_H = \
+ igen.h
+
+INLINE_H = \
+ inline.h
+
+INTERRUPTS_H = \
+ interrupts.h
+
+LD_CACHE_H = \
+ ld-cache.h
+
+LD_DECODE_H = \
+ ld-decode.h
+
+LD_INSN_H = \
+ ld-insn.h
+
+LF_H = \
+ lf.h
+
+MISC_H = \
+ misc.h \
+ $(CONFIG_H) \
+ $(FILTER_FILENAME_H)
+
+MON_H = \
+ mon.h \
+ $(BASICS_H) \
+ $(ITABLE_H)
+
+OPTIONS_H = \
+ options.h
+
+OS_EMUL_H = \
os_emul.h
+PSIM_H = \
+ psim.h \
+ $(BASICS_H)
+
+REGISTERS_H = \
+ registers.h \
+ $(E500_REGISTERS_H) \
+ $(ALTIVEC_REGISTERS_H) \
+ $(SPREG_H)
+
+SIM_CALLBACKS_H = \
+ sim_callbacks.h
+
+SIM_ENDIAN_H = \
+ sim-endian.h \
+ sim-endian.c
+
+SIM_ENDIAN_N_H = \
+ sim-endian-n.h
+
+SIM_MAIN_H = \
+ sim-main.h \
+ $(COMMON_SIM_BASICS_H) \
+ $(COMMON_SIM_SIGNAL_H) \
+ $(COMMON_SIM_BASE_H)
+
+STD_CONFIG_H = \
+ std-config.h
+
+TABLE_H = \
+ table.h
+
+TREE_H = \
+ tree.h
+
+VM_H = \
+ vm.h
+
+VM_N_H = \
+ vm_n.h
+
+WORDS_H = \
+ words.h
+
+
+# Generated headers.
+CONFIG_H = \
+ config.h
+
+DEFINES_H = \
+ defines.h
+
+HW_H = \
+ hw.h
+
+ICACHE_H = \
+ icache.h
+
+IDECODE_H = \
+ idecode.h \
+ $(IDECODE_EXPRESSION_H) \
+ $(IDECODE_FIELDS_H) \
+ $(IDECODE_BRANCH_H)
+
+ITABLE_H = \
+ itable.h
+
+MODEL_H = \
+ model.h
+
+PK_H = \
+ pk.h
+
+PPC_CONFIG_H = \
+ ppc-config.h
+
+SEMANTICS_H = \
+ semantics.h
+
+SPREG_H = \
+ spreg.h
+
+SUPPORT_H = \
+ support.h \
+ support.c
+
+TARG_VALS_H = \
+ targ-vals.h
+
+TCONFIG_H = \
+ tconfig.h
INLINE = \
inline.h \
@@ -280,6 +498,7 @@ LIB_SRC = \
MAIN_SRC = \
main.c \
+ gdb-sim.c \
sim_calls.c
@@ -321,7 +540,7 @@ LIB_OBJ = \
options.o
-GDB_OBJ = sim_calls.o @sim_callback@
+GDB_OBJ = gdb-sim.o sim_calls.o @sim_callback@
HW_SRC = @sim_hw_src@
HW_OBJ = @sim_hw_obj@
@@ -342,66 +561,68 @@ $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
-psim.o: psim.c psim.h tree.h $(CPU_H) $(IDECODE_H)
+psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
bits.o: bits.c $(BASICS_H)
-debug.o: debug.c $(BASICS_H)
-filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h
+debug.o: debug.c $(CONFIG_H) $(BASICS_H)
+filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
-sim-endian.o: sim-endian.c sim-endian-n.h $(BASICS_H)
+sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
-os_emul.o: os_emul.c emul_netbsd.h emul_unix.h emul_chirp.h emul_bugapi.h $(EMUL_GENERIC_H)
+os_emul.o: os_emul.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) $(EMUL_UNIX_H) $(EMUL_CHIRP_H) $(EMUL_BUGAPI_H)
emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
-emul_bugapi.o: emul_bugapi.c emul_bugapi.h $(EMUL_GENERIC_H)
-emul_chirp.o: emul_chirp.c emul_chirp.h $(EMUL_GENERIC_H)
-emul_netbsd.o: emul_netbsd.c emul_netbsd.h $(EMUL_GENERIC_H)
-emul_unix.o: emul_unix.c emul_unix.h $(EMUL_GENERIC_H)
+emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H)
+emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H)
+emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H)
+emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H)
-registers.o: registers.c $(REGISTERS_H) $(BASICS_H)
+registers.o: registers.c $(BASICS_H) $(REGISTERS_H)
cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
-interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
+interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H)
# Given that inlines are turned on now, rebuild idecode whenever
# anything changes.
-idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h $(LIB_INLINE_SRC) $(BUILT_SRC)
+idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC)
# double.o: double.c dp-bit.c
-vm.o: vm.c vm.h vm_n.h $(CPU_H)
+vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H)
+
+corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H)
-corefile.o: corefile.c corefile.h corefile-n.h $(BASICS_H) $(DEVICE_TABLE_H)
+model.o: model.c $(CPU_H) $(MON_H)
-model.o: model.c $(CPU_H)
+events.o: events.c $(BASICS_H) $(EVENTS_H)
-events.o: events.c events.h $(BASICS_H)
+sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
-sim_calls.o: sim_calls.c $(PSIM_H) itable.h options.h
+gdb-sim.o: gdb-sim.c $(PSIM_H) $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H) $(GDB_SIM_PPC_H) $(SIM_CALLBACK_H)
-spreg.o: spreg.c spreg.h spreg.c $(BASICS_H)
+spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
-main.o: main.c $(PSIM_H) itable.h options.h
+main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
-device.o: device.c $(DEVICE_TABLE_H) cap.h
+device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
-tree.o: tree.c tree.h device.h $(DEVICE_TABLE_H)
+tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
-device_table.o: device_table.c $(DEVICE_TABLE_H) events.h hw.c
+device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c
-cap.o: cap.c cap.h $(BASICS_H)
+cap.o: cap.c $(CAP_H)
-semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
+semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
+icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-support.o: support.c support.h $(IDECODE_H) $(CPU_H)
+support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-itable.o: itable.c itable.h
+itable.o: itable.c $(ITABLE_H)
-mon.o: mon.c $(CPU_H)
+mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
# GDB after 4.16 expects the default_callback structure to be setup.
# As a kludge, build the common stuff here for now.
@@ -423,12 +644,12 @@ targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
./gentmap -c > tmp-map.c
$(SHELL) $(srcdir)/../../move-if-change tmp-map.c targ-map.c
-callback.o: ../common/callback.c targ-vals.h config.h
+callback.o: ../common/callback.c $(TARG_VALS_H) $(CONFIG_H)
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
-targ-map.o: targ-map.c targ-vals.h
+targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H)
-sim-fpu.o: $(srcdir)/../common/sim-fpu.c config.h tconfig.h
+sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) $(TCONFIG_H)
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
tconfig.h:
@@ -436,7 +657,7 @@ tconfig.h:
echo > tconfig.h
# Rebuild options whenever something changes so the date/time is up to date.
-options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
+options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
$(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
tmp-defines: config.h Makefile
@@ -507,60 +728,60 @@ igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o l
filter_host.c: filter_filename.c
cat $(srcdir)/filter_filename.c > filter_host.c
-filter_host.o: filter_host.c filter_filename.h config.h ppc-config.h
+filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
-table.o: table.c misc.h filter_filename.h lf.h table.h
+table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
-lf.o: lf.c misc.h filter_filename.h lf.h
+lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
-filter.o: filter.c misc.h lf.h table.h filter.h
+filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
-tmp-filter: filter.c misc.h misc.o
+tmp-filter: filter.c $(MISC_H) misc.o
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
-ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h
+ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
-ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h
+ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
-ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
+ld-insn.o: ld-insn.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
-gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h ld-cache.h
+gen-model.o: gen-model.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(GEN_MODEL_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
-gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h ld-cache.h
+gen-itable.o: gen-itable.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_ITABLE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
-gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
+gen-icache.o: gen-icache.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
-gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h igen.h ld-insn.h
+gen-semantics.o: gen-semantics.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_ICACHE_H) $(GEN_IDECODE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
-gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h igen.h ld-insn.h
+gen-idecode.o: gen-idecode.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H) $(GEN_SEMANTICS_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
-gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h igen.h ld-insn.h
+gen-support.o: gen-support.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
-dgen.o: dgen.c misc.h filter_filename.h lf.h table.h
+dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
-igen.o: igen.c misc.h filter_filename.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-semantics.h gen-support.h igen.h
+igen.o: igen.c $(MISC_H) $(LF_H) $(TABLE_H) $(CONFIG_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_MODEL_H) $(GEN_ICACHE_H) $(GEN_ITABLE_H) $(GEN_IDECODE_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
-misc.o: misc.c misc.h filter_filename.h
+misc.o: misc.c $(CONFIG_H) $(MISC_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
@@ -596,20 +817,20 @@ tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
$(SHELL) $(srcdir)/../../move-if-change tmp-hw.c hw.c
touch tmp-hw
-hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(CPU_H)
-hw_core.o: hw_core.c $(DEVICE_TABLE_H)
-hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) pk.h
+hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H)
+hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H)
+hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H)
hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
-hw_htab.o: hw_htab.c $(DEVICE_TABLE_H)
+hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H)
hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
-hw_init.o: hw_init.c $(DEVICE_TABLE_H)
+hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H)
hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H)
-hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) hw_phb.h
-hw_register.o: hw_register.c $(DEVICE_TABLE_H)
+hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H)
+hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H)
hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H)
# ignore this line, it stops make from getting confused
@@ -634,7 +855,7 @@ tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
$(SHELL) $(srcdir)/../../move-if-change tmp-pk.h pk.h
touch tmp-pk
-pk_disklabel.o: pk.h $(DEVICE_TABLE_H)
+pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H)
# ignore this line, it stops make from getting confused
@@ -665,7 +886,7 @@ config.status: configure
install: installdirs
n=`echo run | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
installdirs:
- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
diff --git a/sim/ppc/configure b/sim/ppc/configure
index a48a8310911..51f50c522dc 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -4675,7 +4675,7 @@ echo $ac_n "checking for common simulator directory fpu implementation""... $ac_
echo "configure:4676: checking for common simulator directory fpu implementation" >&5
if test -f "${srcdir}/../common/sim-fpu.c"; then
echo "$ac_t""yes" 1>&6
- sim_fpu_cflags="-DHAVE_COMMON_FPU -I${srcdir}/../common"
+ sim_fpu_cflags="-DHAVE_COMMON_FPU -I../common -I${srcdir}/../common"
sim_fpu="sim-fpu.o"
else
echo "$ac_t""no" 1>&6
diff --git a/sim/ppc/configure.in b/sim/ppc/configure.in
index 0d7a0940e29..1f0693c25b6 100644
--- a/sim/ppc/configure.in
+++ b/sim/ppc/configure.in
@@ -700,7 +700,7 @@ fi
AC_MSG_CHECKING(for common simulator directory fpu implementation)
if test -f "${srcdir}/../common/sim-fpu.c"; then
AC_MSG_RESULT(yes)
- sim_fpu_cflags="-DHAVE_COMMON_FPU -I${srcdir}/../common"
+ sim_fpu_cflags="-DHAVE_COMMON_FPU -I../common -I${srcdir}/../common"
sim_fpu="sim-fpu.o"
else
AC_MSG_RESULT(no)
diff --git a/sim/ppc/e500_registers.h b/sim/ppc/e500_registers.h
index cd12ab5ec27..ccf5e0f88c0 100644
--- a/sim/ppc/e500_registers.h
+++ b/sim/ppc/e500_registers.h
@@ -79,5 +79,8 @@ struct e500_regs {
/* e500 register high bits */
#define GPRH(N) cpu_registers(processor)->e500.gprh[N]
-/* e500 unified vector register */
-#define EVR(N) ((((unsigned64)GPRH(N)) << 32) | GPR(N))
+/* e500 unified vector register
+ We need to cast the gpr value to an unsigned type so that it
+ doesn't get sign-extended when it's or-ed with a 64-bit value; that
+ would wipe out the upper 32 bits of the register's value. */
+#define EVR(N) ((((unsigned64)GPRH(N)) << 32) | (unsigned32) GPR(N))
diff --git a/sim/ppc/gdb-sim.c b/sim/ppc/gdb-sim.c
new file mode 100644
index 00000000000..648d8ef1285
--- /dev/null
+++ b/sim/ppc/gdb-sim.c
@@ -0,0 +1,1295 @@
+/* This file is part of GDB.
+
+ Copyright 2004 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.
+
+ */
+
+
+#include "psim.h"
+#include "options.h"
+#include "registers.h"
+
+#include "ansidecl.h"
+#include "sim_callbacks.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
+#include "gdb/sim-ppc.h"
+
+/* Return the name of the register whose number is REGNUM, or zero if
+ REGNUM is an invalid register number. */
+
+static const char *
+regnum2spr (int spr)
+{
+ if (spr_is_valid (spr))
+ return spr_name (spr);
+ else
+ return NULL;
+}
+
+static const char *
+regnum2name (int regnum)
+{
+ switch (regnum)
+ {
+ case sim_ppc_r0_regnum: return "r0";
+ case sim_ppc_r1_regnum: return "r1";
+ case sim_ppc_r2_regnum: return "r2";
+ case sim_ppc_r3_regnum: return "r3";
+ case sim_ppc_r4_regnum: return "r4";
+ case sim_ppc_r5_regnum: return "r5";
+ case sim_ppc_r6_regnum: return "r6";
+ case sim_ppc_r7_regnum: return "r7";
+ case sim_ppc_r8_regnum: return "r8";
+ case sim_ppc_r9_regnum: return "r9";
+ case sim_ppc_r10_regnum: return "r10";
+ case sim_ppc_r11_regnum: return "r11";
+ case sim_ppc_r12_regnum: return "r12";
+ case sim_ppc_r13_regnum: return "r13";
+ case sim_ppc_r14_regnum: return "r14";
+ case sim_ppc_r15_regnum: return "r15";
+ case sim_ppc_r16_regnum: return "r16";
+ case sim_ppc_r17_regnum: return "r17";
+ case sim_ppc_r18_regnum: return "r18";
+ case sim_ppc_r19_regnum: return "r19";
+ case sim_ppc_r20_regnum: return "r20";
+ case sim_ppc_r21_regnum: return "r21";
+ case sim_ppc_r22_regnum: return "r22";
+ case sim_ppc_r23_regnum: return "r23";
+ case sim_ppc_r24_regnum: return "r24";
+ case sim_ppc_r25_regnum: return "r25";
+ case sim_ppc_r26_regnum: return "r26";
+ case sim_ppc_r27_regnum: return "r27";
+ case sim_ppc_r28_regnum: return "r28";
+ case sim_ppc_r29_regnum: return "r29";
+ case sim_ppc_r30_regnum: return "r30";
+ case sim_ppc_r31_regnum: return "r31";
+
+ case sim_ppc_f0_regnum: return "f0";
+ case sim_ppc_f1_regnum: return "f1";
+ case sim_ppc_f2_regnum: return "f2";
+ case sim_ppc_f3_regnum: return "f3";
+ case sim_ppc_f4_regnum: return "f4";
+ case sim_ppc_f5_regnum: return "f5";
+ case sim_ppc_f6_regnum: return "f6";
+ case sim_ppc_f7_regnum: return "f7";
+ case sim_ppc_f8_regnum: return "f8";
+ case sim_ppc_f9_regnum: return "f9";
+ case sim_ppc_f10_regnum: return "f10";
+ case sim_ppc_f11_regnum: return "f11";
+ case sim_ppc_f12_regnum: return "f12";
+ case sim_ppc_f13_regnum: return "f13";
+ case sim_ppc_f14_regnum: return "f14";
+ case sim_ppc_f15_regnum: return "f15";
+ case sim_ppc_f16_regnum: return "f16";
+ case sim_ppc_f17_regnum: return "f17";
+ case sim_ppc_f18_regnum: return "f18";
+ case sim_ppc_f19_regnum: return "f19";
+ case sim_ppc_f20_regnum: return "f20";
+ case sim_ppc_f21_regnum: return "f21";
+ case sim_ppc_f22_regnum: return "f22";
+ case sim_ppc_f23_regnum: return "f23";
+ case sim_ppc_f24_regnum: return "f24";
+ case sim_ppc_f25_regnum: return "f25";
+ case sim_ppc_f26_regnum: return "f26";
+ case sim_ppc_f27_regnum: return "f27";
+ case sim_ppc_f28_regnum: return "f28";
+ case sim_ppc_f29_regnum: return "f29";
+ case sim_ppc_f30_regnum: return "f30";
+ case sim_ppc_f31_regnum: return "f31";
+
+ case sim_ppc_vr0_regnum: return "vr0";
+ case sim_ppc_vr1_regnum: return "vr1";
+ case sim_ppc_vr2_regnum: return "vr2";
+ case sim_ppc_vr3_regnum: return "vr3";
+ case sim_ppc_vr4_regnum: return "vr4";
+ case sim_ppc_vr5_regnum: return "vr5";
+ case sim_ppc_vr6_regnum: return "vr6";
+ case sim_ppc_vr7_regnum: return "vr7";
+ case sim_ppc_vr8_regnum: return "vr8";
+ case sim_ppc_vr9_regnum: return "vr9";
+ case sim_ppc_vr10_regnum: return "vr10";
+ case sim_ppc_vr11_regnum: return "vr11";
+ case sim_ppc_vr12_regnum: return "vr12";
+ case sim_ppc_vr13_regnum: return "vr13";
+ case sim_ppc_vr14_regnum: return "vr14";
+ case sim_ppc_vr15_regnum: return "vr15";
+ case sim_ppc_vr16_regnum: return "vr16";
+ case sim_ppc_vr17_regnum: return "vr17";
+ case sim_ppc_vr18_regnum: return "vr18";
+ case sim_ppc_vr19_regnum: return "vr19";
+ case sim_ppc_vr20_regnum: return "vr20";
+ case sim_ppc_vr21_regnum: return "vr21";
+ case sim_ppc_vr22_regnum: return "vr22";
+ case sim_ppc_vr23_regnum: return "vr23";
+ case sim_ppc_vr24_regnum: return "vr24";
+ case sim_ppc_vr25_regnum: return "vr25";
+ case sim_ppc_vr26_regnum: return "vr26";
+ case sim_ppc_vr27_regnum: return "vr27";
+ case sim_ppc_vr28_regnum: return "vr28";
+ case sim_ppc_vr29_regnum: return "vr29";
+ case sim_ppc_vr30_regnum: return "vr30";
+ case sim_ppc_vr31_regnum: return "vr31";
+ case sim_ppc_rh0_regnum: return "rh0";
+ case sim_ppc_rh1_regnum: return "rh1";
+ case sim_ppc_rh2_regnum: return "rh2";
+ case sim_ppc_rh3_regnum: return "rh3";
+ case sim_ppc_rh4_regnum: return "rh4";
+ case sim_ppc_rh5_regnum: return "rh5";
+ case sim_ppc_rh6_regnum: return "rh6";
+ case sim_ppc_rh7_regnum: return "rh7";
+ case sim_ppc_rh8_regnum: return "rh8";
+ case sim_ppc_rh9_regnum: return "rh9";
+ case sim_ppc_rh10_regnum: return "rh10";
+ case sim_ppc_rh11_regnum: return "rh11";
+ case sim_ppc_rh12_regnum: return "rh12";
+ case sim_ppc_rh13_regnum: return "rh13";
+ case sim_ppc_rh14_regnum: return "rh14";
+ case sim_ppc_rh15_regnum: return "rh15";
+ case sim_ppc_rh16_regnum: return "rh16";
+ case sim_ppc_rh17_regnum: return "rh17";
+ case sim_ppc_rh18_regnum: return "rh18";
+ case sim_ppc_rh19_regnum: return "rh19";
+ case sim_ppc_rh20_regnum: return "rh20";
+ case sim_ppc_rh21_regnum: return "rh21";
+ case sim_ppc_rh22_regnum: return "rh22";
+ case sim_ppc_rh23_regnum: return "rh23";
+ case sim_ppc_rh24_regnum: return "rh24";
+ case sim_ppc_rh25_regnum: return "rh25";
+ case sim_ppc_rh26_regnum: return "rh26";
+ case sim_ppc_rh27_regnum: return "rh27";
+ case sim_ppc_rh28_regnum: return "rh28";
+ case sim_ppc_rh29_regnum: return "rh29";
+ case sim_ppc_rh30_regnum: return "rh30";
+ case sim_ppc_rh31_regnum: return "rh31";
+
+ case sim_ppc_ev0_regnum: return "ev0";
+ case sim_ppc_ev1_regnum: return "ev1";
+ case sim_ppc_ev2_regnum: return "ev2";
+ case sim_ppc_ev3_regnum: return "ev3";
+ case sim_ppc_ev4_regnum: return "ev4";
+ case sim_ppc_ev5_regnum: return "ev5";
+ case sim_ppc_ev6_regnum: return "ev6";
+ case sim_ppc_ev7_regnum: return "ev7";
+ case sim_ppc_ev8_regnum: return "ev8";
+ case sim_ppc_ev9_regnum: return "ev9";
+ case sim_ppc_ev10_regnum: return "ev10";
+ case sim_ppc_ev11_regnum: return "ev11";
+ case sim_ppc_ev12_regnum: return "ev12";
+ case sim_ppc_ev13_regnum: return "ev13";
+ case sim_ppc_ev14_regnum: return "ev14";
+ case sim_ppc_ev15_regnum: return "ev15";
+ case sim_ppc_ev16_regnum: return "ev16";
+ case sim_ppc_ev17_regnum: return "ev17";
+ case sim_ppc_ev18_regnum: return "ev18";
+ case sim_ppc_ev19_regnum: return "ev19";
+ case sim_ppc_ev20_regnum: return "ev20";
+ case sim_ppc_ev21_regnum: return "ev21";
+ case sim_ppc_ev22_regnum: return "ev22";
+ case sim_ppc_ev23_regnum: return "ev23";
+ case sim_ppc_ev24_regnum: return "ev24";
+ case sim_ppc_ev25_regnum: return "ev25";
+ case sim_ppc_ev26_regnum: return "ev26";
+ case sim_ppc_ev27_regnum: return "ev27";
+ case sim_ppc_ev28_regnum: return "ev28";
+ case sim_ppc_ev29_regnum: return "ev29";
+ case sim_ppc_ev30_regnum: return "ev30";
+ case sim_ppc_ev31_regnum: return "ev31";
+
+ case sim_ppc_sr0_regnum: return "sr0";
+ case sim_ppc_sr1_regnum: return "sr1";
+ case sim_ppc_sr2_regnum: return "sr2";
+ case sim_ppc_sr3_regnum: return "sr3";
+ case sim_ppc_sr4_regnum: return "sr4";
+ case sim_ppc_sr5_regnum: return "sr5";
+ case sim_ppc_sr6_regnum: return "sr6";
+ case sim_ppc_sr7_regnum: return "sr7";
+ case sim_ppc_sr8_regnum: return "sr8";
+ case sim_ppc_sr9_regnum: return "sr9";
+ case sim_ppc_sr10_regnum: return "sr10";
+ case sim_ppc_sr11_regnum: return "sr11";
+ case sim_ppc_sr12_regnum: return "sr12";
+ case sim_ppc_sr13_regnum: return "sr13";
+ case sim_ppc_sr14_regnum: return "sr14";
+ case sim_ppc_sr15_regnum: return "sr15";
+
+ case sim_ppc_pc_regnum: return "pc";
+ case sim_ppc_ps_regnum: return "ps";
+ case sim_ppc_cr_regnum: return "cr";
+ case sim_ppc_fpscr_regnum: return "fpscr";
+ case sim_ppc_acc_regnum: return "acc";
+ case sim_ppc_vscr_regnum: return "vscr";
+
+ case sim_ppc_spr0_regnum: return regnum2spr (0);
+ case sim_ppc_spr1_regnum: return regnum2spr (1);
+ case sim_ppc_spr2_regnum: return regnum2spr (2);
+ case sim_ppc_spr3_regnum: return regnum2spr (3);
+ case sim_ppc_spr4_regnum: return regnum2spr (4);
+ case sim_ppc_spr5_regnum: return regnum2spr (5);
+ case sim_ppc_spr6_regnum: return regnum2spr (6);
+ case sim_ppc_spr7_regnum: return regnum2spr (7);
+ case sim_ppc_spr8_regnum: return regnum2spr (8);
+ case sim_ppc_spr9_regnum: return regnum2spr (9);
+ case sim_ppc_spr10_regnum: return regnum2spr (10);
+ case sim_ppc_spr11_regnum: return regnum2spr (11);
+ case sim_ppc_spr12_regnum: return regnum2spr (12);
+ case sim_ppc_spr13_regnum: return regnum2spr (13);
+ case sim_ppc_spr14_regnum: return regnum2spr (14);
+ case sim_ppc_spr15_regnum: return regnum2spr (15);
+ case sim_ppc_spr16_regnum: return regnum2spr (16);
+ case sim_ppc_spr17_regnum: return regnum2spr (17);
+ case sim_ppc_spr18_regnum: return regnum2spr (18);
+ case sim_ppc_spr19_regnum: return regnum2spr (19);
+ case sim_ppc_spr20_regnum: return regnum2spr (20);
+ case sim_ppc_spr21_regnum: return regnum2spr (21);
+ case sim_ppc_spr22_regnum: return regnum2spr (22);
+ case sim_ppc_spr23_regnum: return regnum2spr (23);
+ case sim_ppc_spr24_regnum: return regnum2spr (24);
+ case sim_ppc_spr25_regnum: return regnum2spr (25);
+ case sim_ppc_spr26_regnum: return regnum2spr (26);
+ case sim_ppc_spr27_regnum: return regnum2spr (27);
+ case sim_ppc_spr28_regnum: return regnum2spr (28);
+ case sim_ppc_spr29_regnum: return regnum2spr (29);
+ case sim_ppc_spr30_regnum: return regnum2spr (30);
+ case sim_ppc_spr31_regnum: return regnum2spr (31);
+ case sim_ppc_spr32_regnum: return regnum2spr (32);
+ case sim_ppc_spr33_regnum: return regnum2spr (33);
+ case sim_ppc_spr34_regnum: return regnum2spr (34);
+ case sim_ppc_spr35_regnum: return regnum2spr (35);
+ case sim_ppc_spr36_regnum: return regnum2spr (36);
+ case sim_ppc_spr37_regnum: return regnum2spr (37);
+ case sim_ppc_spr38_regnum: return regnum2spr (38);
+ case sim_ppc_spr39_regnum: return regnum2spr (39);
+ case sim_ppc_spr40_regnum: return regnum2spr (40);
+ case sim_ppc_spr41_regnum: return regnum2spr (41);
+ case sim_ppc_spr42_regnum: return regnum2spr (42);
+ case sim_ppc_spr43_regnum: return regnum2spr (43);
+ case sim_ppc_spr44_regnum: return regnum2spr (44);
+ case sim_ppc_spr45_regnum: return regnum2spr (45);
+ case sim_ppc_spr46_regnum: return regnum2spr (46);
+ case sim_ppc_spr47_regnum: return regnum2spr (47);
+ case sim_ppc_spr48_regnum: return regnum2spr (48);
+ case sim_ppc_spr49_regnum: return regnum2spr (49);
+ case sim_ppc_spr50_regnum: return regnum2spr (50);
+ case sim_ppc_spr51_regnum: return regnum2spr (51);
+ case sim_ppc_spr52_regnum: return regnum2spr (52);
+ case sim_ppc_spr53_regnum: return regnum2spr (53);
+ case sim_ppc_spr54_regnum: return regnum2spr (54);
+ case sim_ppc_spr55_regnum: return regnum2spr (55);
+ case sim_ppc_spr56_regnum: return regnum2spr (56);
+ case sim_ppc_spr57_regnum: return regnum2spr (57);
+ case sim_ppc_spr58_regnum: return regnum2spr (58);
+ case sim_ppc_spr59_regnum: return regnum2spr (59);
+ case sim_ppc_spr60_regnum: return regnum2spr (60);
+ case sim_ppc_spr61_regnum: return regnum2spr (61);
+ case sim_ppc_spr62_regnum: return regnum2spr (62);
+ case sim_ppc_spr63_regnum: return regnum2spr (63);
+ case sim_ppc_spr64_regnum: return regnum2spr (64);
+ case sim_ppc_spr65_regnum: return regnum2spr (65);
+ case sim_ppc_spr66_regnum: return regnum2spr (66);
+ case sim_ppc_spr67_regnum: return regnum2spr (67);
+ case sim_ppc_spr68_regnum: return regnum2spr (68);
+ case sim_ppc_spr69_regnum: return regnum2spr (69);
+ case sim_ppc_spr70_regnum: return regnum2spr (70);
+ case sim_ppc_spr71_regnum: return regnum2spr (71);
+ case sim_ppc_spr72_regnum: return regnum2spr (72);
+ case sim_ppc_spr73_regnum: return regnum2spr (73);
+ case sim_ppc_spr74_regnum: return regnum2spr (74);
+ case sim_ppc_spr75_regnum: return regnum2spr (75);
+ case sim_ppc_spr76_regnum: return regnum2spr (76);
+ case sim_ppc_spr77_regnum: return regnum2spr (77);
+ case sim_ppc_spr78_regnum: return regnum2spr (78);
+ case sim_ppc_spr79_regnum: return regnum2spr (79);
+ case sim_ppc_spr80_regnum: return regnum2spr (80);
+ case sim_ppc_spr81_regnum: return regnum2spr (81);
+ case sim_ppc_spr82_regnum: return regnum2spr (82);
+ case sim_ppc_spr83_regnum: return regnum2spr (83);
+ case sim_ppc_spr84_regnum: return regnum2spr (84);
+ case sim_ppc_spr85_regnum: return regnum2spr (85);
+ case sim_ppc_spr86_regnum: return regnum2spr (86);
+ case sim_ppc_spr87_regnum: return regnum2spr (87);
+ case sim_ppc_spr88_regnum: return regnum2spr (88);
+ case sim_ppc_spr89_regnum: return regnum2spr (89);
+ case sim_ppc_spr90_regnum: return regnum2spr (90);
+ case sim_ppc_spr91_regnum: return regnum2spr (91);
+ case sim_ppc_spr92_regnum: return regnum2spr (92);
+ case sim_ppc_spr93_regnum: return regnum2spr (93);
+ case sim_ppc_spr94_regnum: return regnum2spr (94);
+ case sim_ppc_spr95_regnum: return regnum2spr (95);
+ case sim_ppc_spr96_regnum: return regnum2spr (96);
+ case sim_ppc_spr97_regnum: return regnum2spr (97);
+ case sim_ppc_spr98_regnum: return regnum2spr (98);
+ case sim_ppc_spr99_regnum: return regnum2spr (99);
+ case sim_ppc_spr100_regnum: return regnum2spr (100);
+ case sim_ppc_spr101_regnum: return regnum2spr (101);
+ case sim_ppc_spr102_regnum: return regnum2spr (102);
+ case sim_ppc_spr103_regnum: return regnum2spr (103);
+ case sim_ppc_spr104_regnum: return regnum2spr (104);
+ case sim_ppc_spr105_regnum: return regnum2spr (105);
+ case sim_ppc_spr106_regnum: return regnum2spr (106);
+ case sim_ppc_spr107_regnum: return regnum2spr (107);
+ case sim_ppc_spr108_regnum: return regnum2spr (108);
+ case sim_ppc_spr109_regnum: return regnum2spr (109);
+ case sim_ppc_spr110_regnum: return regnum2spr (110);
+ case sim_ppc_spr111_regnum: return regnum2spr (111);
+ case sim_ppc_spr112_regnum: return regnum2spr (112);
+ case sim_ppc_spr113_regnum: return regnum2spr (113);
+ case sim_ppc_spr114_regnum: return regnum2spr (114);
+ case sim_ppc_spr115_regnum: return regnum2spr (115);
+ case sim_ppc_spr116_regnum: return regnum2spr (116);
+ case sim_ppc_spr117_regnum: return regnum2spr (117);
+ case sim_ppc_spr118_regnum: return regnum2spr (118);
+ case sim_ppc_spr119_regnum: return regnum2spr (119);
+ case sim_ppc_spr120_regnum: return regnum2spr (120);
+ case sim_ppc_spr121_regnum: return regnum2spr (121);
+ case sim_ppc_spr122_regnum: return regnum2spr (122);
+ case sim_ppc_spr123_regnum: return regnum2spr (123);
+ case sim_ppc_spr124_regnum: return regnum2spr (124);
+ case sim_ppc_spr125_regnum: return regnum2spr (125);
+ case sim_ppc_spr126_regnum: return regnum2spr (126);
+ case sim_ppc_spr127_regnum: return regnum2spr (127);
+ case sim_ppc_spr128_regnum: return regnum2spr (128);
+ case sim_ppc_spr129_regnum: return regnum2spr (129);
+ case sim_ppc_spr130_regnum: return regnum2spr (130);
+ case sim_ppc_spr131_regnum: return regnum2spr (131);
+ case sim_ppc_spr132_regnum: return regnum2spr (132);
+ case sim_ppc_spr133_regnum: return regnum2spr (133);
+ case sim_ppc_spr134_regnum: return regnum2spr (134);
+ case sim_ppc_spr135_regnum: return regnum2spr (135);
+ case sim_ppc_spr136_regnum: return regnum2spr (136);
+ case sim_ppc_spr137_regnum: return regnum2spr (137);
+ case sim_ppc_spr138_regnum: return regnum2spr (138);
+ case sim_ppc_spr139_regnum: return regnum2spr (139);
+ case sim_ppc_spr140_regnum: return regnum2spr (140);
+ case sim_ppc_spr141_regnum: return regnum2spr (141);
+ case sim_ppc_spr142_regnum: return regnum2spr (142);
+ case sim_ppc_spr143_regnum: return regnum2spr (143);
+ case sim_ppc_spr144_regnum: return regnum2spr (144);
+ case sim_ppc_spr145_regnum: return regnum2spr (145);
+ case sim_ppc_spr146_regnum: return regnum2spr (146);
+ case sim_ppc_spr147_regnum: return regnum2spr (147);
+ case sim_ppc_spr148_regnum: return regnum2spr (148);
+ case sim_ppc_spr149_regnum: return regnum2spr (149);
+ case sim_ppc_spr150_regnum: return regnum2spr (150);
+ case sim_ppc_spr151_regnum: return regnum2spr (151);
+ case sim_ppc_spr152_regnum: return regnum2spr (152);
+ case sim_ppc_spr153_regnum: return regnum2spr (153);
+ case sim_ppc_spr154_regnum: return regnum2spr (154);
+ case sim_ppc_spr155_regnum: return regnum2spr (155);
+ case sim_ppc_spr156_regnum: return regnum2spr (156);
+ case sim_ppc_spr157_regnum: return regnum2spr (157);
+ case sim_ppc_spr158_regnum: return regnum2spr (158);
+ case sim_ppc_spr159_regnum: return regnum2spr (159);
+ case sim_ppc_spr160_regnum: return regnum2spr (160);
+ case sim_ppc_spr161_regnum: return regnum2spr (161);
+ case sim_ppc_spr162_regnum: return regnum2spr (162);
+ case sim_ppc_spr163_regnum: return regnum2spr (163);
+ case sim_ppc_spr164_regnum: return regnum2spr (164);
+ case sim_ppc_spr165_regnum: return regnum2spr (165);
+ case sim_ppc_spr166_regnum: return regnum2spr (166);
+ case sim_ppc_spr167_regnum: return regnum2spr (167);
+ case sim_ppc_spr168_regnum: return regnum2spr (168);
+ case sim_ppc_spr169_regnum: return regnum2spr (169);
+ case sim_ppc_spr170_regnum: return regnum2spr (170);
+ case sim_ppc_spr171_regnum: return regnum2spr (171);
+ case sim_ppc_spr172_regnum: return regnum2spr (172);
+ case sim_ppc_spr173_regnum: return regnum2spr (173);
+ case sim_ppc_spr174_regnum: return regnum2spr (174);
+ case sim_ppc_spr175_regnum: return regnum2spr (175);
+ case sim_ppc_spr176_regnum: return regnum2spr (176);
+ case sim_ppc_spr177_regnum: return regnum2spr (177);
+ case sim_ppc_spr178_regnum: return regnum2spr (178);
+ case sim_ppc_spr179_regnum: return regnum2spr (179);
+ case sim_ppc_spr180_regnum: return regnum2spr (180);
+ case sim_ppc_spr181_regnum: return regnum2spr (181);
+ case sim_ppc_spr182_regnum: return regnum2spr (182);
+ case sim_ppc_spr183_regnum: return regnum2spr (183);
+ case sim_ppc_spr184_regnum: return regnum2spr (184);
+ case sim_ppc_spr185_regnum: return regnum2spr (185);
+ case sim_ppc_spr186_regnum: return regnum2spr (186);
+ case sim_ppc_spr187_regnum: return regnum2spr (187);
+ case sim_ppc_spr188_regnum: return regnum2spr (188);
+ case sim_ppc_spr189_regnum: return regnum2spr (189);
+ case sim_ppc_spr190_regnum: return regnum2spr (190);
+ case sim_ppc_spr191_regnum: return regnum2spr (191);
+ case sim_ppc_spr192_regnum: return regnum2spr (192);
+ case sim_ppc_spr193_regnum: return regnum2spr (193);
+ case sim_ppc_spr194_regnum: return regnum2spr (194);
+ case sim_ppc_spr195_regnum: return regnum2spr (195);
+ case sim_ppc_spr196_regnum: return regnum2spr (196);
+ case sim_ppc_spr197_regnum: return regnum2spr (197);
+ case sim_ppc_spr198_regnum: return regnum2spr (198);
+ case sim_ppc_spr199_regnum: return regnum2spr (199);
+ case sim_ppc_spr200_regnum: return regnum2spr (200);
+ case sim_ppc_spr201_regnum: return regnum2spr (201);
+ case sim_ppc_spr202_regnum: return regnum2spr (202);
+ case sim_ppc_spr203_regnum: return regnum2spr (203);
+ case sim_ppc_spr204_regnum: return regnum2spr (204);
+ case sim_ppc_spr205_regnum: return regnum2spr (205);
+ case sim_ppc_spr206_regnum: return regnum2spr (206);
+ case sim_ppc_spr207_regnum: return regnum2spr (207);
+ case sim_ppc_spr208_regnum: return regnum2spr (208);
+ case sim_ppc_spr209_regnum: return regnum2spr (209);
+ case sim_ppc_spr210_regnum: return regnum2spr (210);
+ case sim_ppc_spr211_regnum: return regnum2spr (211);
+ case sim_ppc_spr212_regnum: return regnum2spr (212);
+ case sim_ppc_spr213_regnum: return regnum2spr (213);
+ case sim_ppc_spr214_regnum: return regnum2spr (214);
+ case sim_ppc_spr215_regnum: return regnum2spr (215);
+ case sim_ppc_spr216_regnum: return regnum2spr (216);
+ case sim_ppc_spr217_regnum: return regnum2spr (217);
+ case sim_ppc_spr218_regnum: return regnum2spr (218);
+ case sim_ppc_spr219_regnum: return regnum2spr (219);
+ case sim_ppc_spr220_regnum: return regnum2spr (220);
+ case sim_ppc_spr221_regnum: return regnum2spr (221);
+ case sim_ppc_spr222_regnum: return regnum2spr (222);
+ case sim_ppc_spr223_regnum: return regnum2spr (223);
+ case sim_ppc_spr224_regnum: return regnum2spr (224);
+ case sim_ppc_spr225_regnum: return regnum2spr (225);
+ case sim_ppc_spr226_regnum: return regnum2spr (226);
+ case sim_ppc_spr227_regnum: return regnum2spr (227);
+ case sim_ppc_spr228_regnum: return regnum2spr (228);
+ case sim_ppc_spr229_regnum: return regnum2spr (229);
+ case sim_ppc_spr230_regnum: return regnum2spr (230);
+ case sim_ppc_spr231_regnum: return regnum2spr (231);
+ case sim_ppc_spr232_regnum: return regnum2spr (232);
+ case sim_ppc_spr233_regnum: return regnum2spr (233);
+ case sim_ppc_spr234_regnum: return regnum2spr (234);
+ case sim_ppc_spr235_regnum: return regnum2spr (235);
+ case sim_ppc_spr236_regnum: return regnum2spr (236);
+ case sim_ppc_spr237_regnum: return regnum2spr (237);
+ case sim_ppc_spr238_regnum: return regnum2spr (238);
+ case sim_ppc_spr239_regnum: return regnum2spr (239);
+ case sim_ppc_spr240_regnum: return regnum2spr (240);
+ case sim_ppc_spr241_regnum: return regnum2spr (241);
+ case sim_ppc_spr242_regnum: return regnum2spr (242);
+ case sim_ppc_spr243_regnum: return regnum2spr (243);
+ case sim_ppc_spr244_regnum: return regnum2spr (244);
+ case sim_ppc_spr245_regnum: return regnum2spr (245);
+ case sim_ppc_spr246_regnum: return regnum2spr (246);
+ case sim_ppc_spr247_regnum: return regnum2spr (247);
+ case sim_ppc_spr248_regnum: return regnum2spr (248);
+ case sim_ppc_spr249_regnum: return regnum2spr (249);
+ case sim_ppc_spr250_regnum: return regnum2spr (250);
+ case sim_ppc_spr251_regnum: return regnum2spr (251);
+ case sim_ppc_spr252_regnum: return regnum2spr (252);
+ case sim_ppc_spr253_regnum: return regnum2spr (253);
+ case sim_ppc_spr254_regnum: return regnum2spr (254);
+ case sim_ppc_spr255_regnum: return regnum2spr (255);
+ case sim_ppc_spr256_regnum: return regnum2spr (256);
+ case sim_ppc_spr257_regnum: return regnum2spr (257);
+ case sim_ppc_spr258_regnum: return regnum2spr (258);
+ case sim_ppc_spr259_regnum: return regnum2spr (259);
+ case sim_ppc_spr260_regnum: return regnum2spr (260);
+ case sim_ppc_spr261_regnum: return regnum2spr (261);
+ case sim_ppc_spr262_regnum: return regnum2spr (262);
+ case sim_ppc_spr263_regnum: return regnum2spr (263);
+ case sim_ppc_spr264_regnum: return regnum2spr (264);
+ case sim_ppc_spr265_regnum: return regnum2spr (265);
+ case sim_ppc_spr266_regnum: return regnum2spr (266);
+ case sim_ppc_spr267_regnum: return regnum2spr (267);
+ case sim_ppc_spr268_regnum: return regnum2spr (268);
+ case sim_ppc_spr269_regnum: return regnum2spr (269);
+ case sim_ppc_spr270_regnum: return regnum2spr (270);
+ case sim_ppc_spr271_regnum: return regnum2spr (271);
+ case sim_ppc_spr272_regnum: return regnum2spr (272);
+ case sim_ppc_spr273_regnum: return regnum2spr (273);
+ case sim_ppc_spr274_regnum: return regnum2spr (274);
+ case sim_ppc_spr275_regnum: return regnum2spr (275);
+ case sim_ppc_spr276_regnum: return regnum2spr (276);
+ case sim_ppc_spr277_regnum: return regnum2spr (277);
+ case sim_ppc_spr278_regnum: return regnum2spr (278);
+ case sim_ppc_spr279_regnum: return regnum2spr (279);
+ case sim_ppc_spr280_regnum: return regnum2spr (280);
+ case sim_ppc_spr281_regnum: return regnum2spr (281);
+ case sim_ppc_spr282_regnum: return regnum2spr (282);
+ case sim_ppc_spr283_regnum: return regnum2spr (283);
+ case sim_ppc_spr284_regnum: return regnum2spr (284);
+ case sim_ppc_spr285_regnum: return regnum2spr (285);
+ case sim_ppc_spr286_regnum: return regnum2spr (286);
+ case sim_ppc_spr287_regnum: return regnum2spr (287);
+ case sim_ppc_spr288_regnum: return regnum2spr (288);
+ case sim_ppc_spr289_regnum: return regnum2spr (289);
+ case sim_ppc_spr290_regnum: return regnum2spr (290);
+ case sim_ppc_spr291_regnum: return regnum2spr (291);
+ case sim_ppc_spr292_regnum: return regnum2spr (292);
+ case sim_ppc_spr293_regnum: return regnum2spr (293);
+ case sim_ppc_spr294_regnum: return regnum2spr (294);
+ case sim_ppc_spr295_regnum: return regnum2spr (295);
+ case sim_ppc_spr296_regnum: return regnum2spr (296);
+ case sim_ppc_spr297_regnum: return regnum2spr (297);
+ case sim_ppc_spr298_regnum: return regnum2spr (298);
+ case sim_ppc_spr299_regnum: return regnum2spr (299);
+ case sim_ppc_spr300_regnum: return regnum2spr (300);
+ case sim_ppc_spr301_regnum: return regnum2spr (301);
+ case sim_ppc_spr302_regnum: return regnum2spr (302);
+ case sim_ppc_spr303_regnum: return regnum2spr (303);
+ case sim_ppc_spr304_regnum: return regnum2spr (304);
+ case sim_ppc_spr305_regnum: return regnum2spr (305);
+ case sim_ppc_spr306_regnum: return regnum2spr (306);
+ case sim_ppc_spr307_regnum: return regnum2spr (307);
+ case sim_ppc_spr308_regnum: return regnum2spr (308);
+ case sim_ppc_spr309_regnum: return regnum2spr (309);
+ case sim_ppc_spr310_regnum: return regnum2spr (310);
+ case sim_ppc_spr311_regnum: return regnum2spr (311);
+ case sim_ppc_spr312_regnum: return regnum2spr (312);
+ case sim_ppc_spr313_regnum: return regnum2spr (313);
+ case sim_ppc_spr314_regnum: return regnum2spr (314);
+ case sim_ppc_spr315_regnum: return regnum2spr (315);
+ case sim_ppc_spr316_regnum: return regnum2spr (316);
+ case sim_ppc_spr317_regnum: return regnum2spr (317);
+ case sim_ppc_spr318_regnum: return regnum2spr (318);
+ case sim_ppc_spr319_regnum: return regnum2spr (319);
+ case sim_ppc_spr320_regnum: return regnum2spr (320);
+ case sim_ppc_spr321_regnum: return regnum2spr (321);
+ case sim_ppc_spr322_regnum: return regnum2spr (322);
+ case sim_ppc_spr323_regnum: return regnum2spr (323);
+ case sim_ppc_spr324_regnum: return regnum2spr (324);
+ case sim_ppc_spr325_regnum: return regnum2spr (325);
+ case sim_ppc_spr326_regnum: return regnum2spr (326);
+ case sim_ppc_spr327_regnum: return regnum2spr (327);
+ case sim_ppc_spr328_regnum: return regnum2spr (328);
+ case sim_ppc_spr329_regnum: return regnum2spr (329);
+ case sim_ppc_spr330_regnum: return regnum2spr (330);
+ case sim_ppc_spr331_regnum: return regnum2spr (331);
+ case sim_ppc_spr332_regnum: return regnum2spr (332);
+ case sim_ppc_spr333_regnum: return regnum2spr (333);
+ case sim_ppc_spr334_regnum: return regnum2spr (334);
+ case sim_ppc_spr335_regnum: return regnum2spr (335);
+ case sim_ppc_spr336_regnum: return regnum2spr (336);
+ case sim_ppc_spr337_regnum: return regnum2spr (337);
+ case sim_ppc_spr338_regnum: return regnum2spr (338);
+ case sim_ppc_spr339_regnum: return regnum2spr (339);
+ case sim_ppc_spr340_regnum: return regnum2spr (340);
+ case sim_ppc_spr341_regnum: return regnum2spr (341);
+ case sim_ppc_spr342_regnum: return regnum2spr (342);
+ case sim_ppc_spr343_regnum: return regnum2spr (343);
+ case sim_ppc_spr344_regnum: return regnum2spr (344);
+ case sim_ppc_spr345_regnum: return regnum2spr (345);
+ case sim_ppc_spr346_regnum: return regnum2spr (346);
+ case sim_ppc_spr347_regnum: return regnum2spr (347);
+ case sim_ppc_spr348_regnum: return regnum2spr (348);
+ case sim_ppc_spr349_regnum: return regnum2spr (349);
+ case sim_ppc_spr350_regnum: return regnum2spr (350);
+ case sim_ppc_spr351_regnum: return regnum2spr (351);
+ case sim_ppc_spr352_regnum: return regnum2spr (352);
+ case sim_ppc_spr353_regnum: return regnum2spr (353);
+ case sim_ppc_spr354_regnum: return regnum2spr (354);
+ case sim_ppc_spr355_regnum: return regnum2spr (355);
+ case sim_ppc_spr356_regnum: return regnum2spr (356);
+ case sim_ppc_spr357_regnum: return regnum2spr (357);
+ case sim_ppc_spr358_regnum: return regnum2spr (358);
+ case sim_ppc_spr359_regnum: return regnum2spr (359);
+ case sim_ppc_spr360_regnum: return regnum2spr (360);
+ case sim_ppc_spr361_regnum: return regnum2spr (361);
+ case sim_ppc_spr362_regnum: return regnum2spr (362);
+ case sim_ppc_spr363_regnum: return regnum2spr (363);
+ case sim_ppc_spr364_regnum: return regnum2spr (364);
+ case sim_ppc_spr365_regnum: return regnum2spr (365);
+ case sim_ppc_spr366_regnum: return regnum2spr (366);
+ case sim_ppc_spr367_regnum: return regnum2spr (367);
+ case sim_ppc_spr368_regnum: return regnum2spr (368);
+ case sim_ppc_spr369_regnum: return regnum2spr (369);
+ case sim_ppc_spr370_regnum: return regnum2spr (370);
+ case sim_ppc_spr371_regnum: return regnum2spr (371);
+ case sim_ppc_spr372_regnum: return regnum2spr (372);
+ case sim_ppc_spr373_regnum: return regnum2spr (373);
+ case sim_ppc_spr374_regnum: return regnum2spr (374);
+ case sim_ppc_spr375_regnum: return regnum2spr (375);
+ case sim_ppc_spr376_regnum: return regnum2spr (376);
+ case sim_ppc_spr377_regnum: return regnum2spr (377);
+ case sim_ppc_spr378_regnum: return regnum2spr (378);
+ case sim_ppc_spr379_regnum: return regnum2spr (379);
+ case sim_ppc_spr380_regnum: return regnum2spr (380);
+ case sim_ppc_spr381_regnum: return regnum2spr (381);
+ case sim_ppc_spr382_regnum: return regnum2spr (382);
+ case sim_ppc_spr383_regnum: return regnum2spr (383);
+ case sim_ppc_spr384_regnum: return regnum2spr (384);
+ case sim_ppc_spr385_regnum: return regnum2spr (385);
+ case sim_ppc_spr386_regnum: return regnum2spr (386);
+ case sim_ppc_spr387_regnum: return regnum2spr (387);
+ case sim_ppc_spr388_regnum: return regnum2spr (388);
+ case sim_ppc_spr389_regnum: return regnum2spr (389);
+ case sim_ppc_spr390_regnum: return regnum2spr (390);
+ case sim_ppc_spr391_regnum: return regnum2spr (391);
+ case sim_ppc_spr392_regnum: return regnum2spr (392);
+ case sim_ppc_spr393_regnum: return regnum2spr (393);
+ case sim_ppc_spr394_regnum: return regnum2spr (394);
+ case sim_ppc_spr395_regnum: return regnum2spr (395);
+ case sim_ppc_spr396_regnum: return regnum2spr (396);
+ case sim_ppc_spr397_regnum: return regnum2spr (397);
+ case sim_ppc_spr398_regnum: return regnum2spr (398);
+ case sim_ppc_spr399_regnum: return regnum2spr (399);
+ case sim_ppc_spr400_regnum: return regnum2spr (400);
+ case sim_ppc_spr401_regnum: return regnum2spr (401);
+ case sim_ppc_spr402_regnum: return regnum2spr (402);
+ case sim_ppc_spr403_regnum: return regnum2spr (403);
+ case sim_ppc_spr404_regnum: return regnum2spr (404);
+ case sim_ppc_spr405_regnum: return regnum2spr (405);
+ case sim_ppc_spr406_regnum: return regnum2spr (406);
+ case sim_ppc_spr407_regnum: return regnum2spr (407);
+ case sim_ppc_spr408_regnum: return regnum2spr (408);
+ case sim_ppc_spr409_regnum: return regnum2spr (409);
+ case sim_ppc_spr410_regnum: return regnum2spr (410);
+ case sim_ppc_spr411_regnum: return regnum2spr (411);
+ case sim_ppc_spr412_regnum: return regnum2spr (412);
+ case sim_ppc_spr413_regnum: return regnum2spr (413);
+ case sim_ppc_spr414_regnum: return regnum2spr (414);
+ case sim_ppc_spr415_regnum: return regnum2spr (415);
+ case sim_ppc_spr416_regnum: return regnum2spr (416);
+ case sim_ppc_spr417_regnum: return regnum2spr (417);
+ case sim_ppc_spr418_regnum: return regnum2spr (418);
+ case sim_ppc_spr419_regnum: return regnum2spr (419);
+ case sim_ppc_spr420_regnum: return regnum2spr (420);
+ case sim_ppc_spr421_regnum: return regnum2spr (421);
+ case sim_ppc_spr422_regnum: return regnum2spr (422);
+ case sim_ppc_spr423_regnum: return regnum2spr (423);
+ case sim_ppc_spr424_regnum: return regnum2spr (424);
+ case sim_ppc_spr425_regnum: return regnum2spr (425);
+ case sim_ppc_spr426_regnum: return regnum2spr (426);
+ case sim_ppc_spr427_regnum: return regnum2spr (427);
+ case sim_ppc_spr428_regnum: return regnum2spr (428);
+ case sim_ppc_spr429_regnum: return regnum2spr (429);
+ case sim_ppc_spr430_regnum: return regnum2spr (430);
+ case sim_ppc_spr431_regnum: return regnum2spr (431);
+ case sim_ppc_spr432_regnum: return regnum2spr (432);
+ case sim_ppc_spr433_regnum: return regnum2spr (433);
+ case sim_ppc_spr434_regnum: return regnum2spr (434);
+ case sim_ppc_spr435_regnum: return regnum2spr (435);
+ case sim_ppc_spr436_regnum: return regnum2spr (436);
+ case sim_ppc_spr437_regnum: return regnum2spr (437);
+ case sim_ppc_spr438_regnum: return regnum2spr (438);
+ case sim_ppc_spr439_regnum: return regnum2spr (439);
+ case sim_ppc_spr440_regnum: return regnum2spr (440);
+ case sim_ppc_spr441_regnum: return regnum2spr (441);
+ case sim_ppc_spr442_regnum: return regnum2spr (442);
+ case sim_ppc_spr443_regnum: return regnum2spr (443);
+ case sim_ppc_spr444_regnum: return regnum2spr (444);
+ case sim_ppc_spr445_regnum: return regnum2spr (445);
+ case sim_ppc_spr446_regnum: return regnum2spr (446);
+ case sim_ppc_spr447_regnum: return regnum2spr (447);
+ case sim_ppc_spr448_regnum: return regnum2spr (448);
+ case sim_ppc_spr449_regnum: return regnum2spr (449);
+ case sim_ppc_spr450_regnum: return regnum2spr (450);
+ case sim_ppc_spr451_regnum: return regnum2spr (451);
+ case sim_ppc_spr452_regnum: return regnum2spr (452);
+ case sim_ppc_spr453_regnum: return regnum2spr (453);
+ case sim_ppc_spr454_regnum: return regnum2spr (454);
+ case sim_ppc_spr455_regnum: return regnum2spr (455);
+ case sim_ppc_spr456_regnum: return regnum2spr (456);
+ case sim_ppc_spr457_regnum: return regnum2spr (457);
+ case sim_ppc_spr458_regnum: return regnum2spr (458);
+ case sim_ppc_spr459_regnum: return regnum2spr (459);
+ case sim_ppc_spr460_regnum: return regnum2spr (460);
+ case sim_ppc_spr461_regnum: return regnum2spr (461);
+ case sim_ppc_spr462_regnum: return regnum2spr (462);
+ case sim_ppc_spr463_regnum: return regnum2spr (463);
+ case sim_ppc_spr464_regnum: return regnum2spr (464);
+ case sim_ppc_spr465_regnum: return regnum2spr (465);
+ case sim_ppc_spr466_regnum: return regnum2spr (466);
+ case sim_ppc_spr467_regnum: return regnum2spr (467);
+ case sim_ppc_spr468_regnum: return regnum2spr (468);
+ case sim_ppc_spr469_regnum: return regnum2spr (469);
+ case sim_ppc_spr470_regnum: return regnum2spr (470);
+ case sim_ppc_spr471_regnum: return regnum2spr (471);
+ case sim_ppc_spr472_regnum: return regnum2spr (472);
+ case sim_ppc_spr473_regnum: return regnum2spr (473);
+ case sim_ppc_spr474_regnum: return regnum2spr (474);
+ case sim_ppc_spr475_regnum: return regnum2spr (475);
+ case sim_ppc_spr476_regnum: return regnum2spr (476);
+ case sim_ppc_spr477_regnum: return regnum2spr (477);
+ case sim_ppc_spr478_regnum: return regnum2spr (478);
+ case sim_ppc_spr479_regnum: return regnum2spr (479);
+ case sim_ppc_spr480_regnum: return regnum2spr (480);
+ case sim_ppc_spr481_regnum: return regnum2spr (481);
+ case sim_ppc_spr482_regnum: return regnum2spr (482);
+ case sim_ppc_spr483_regnum: return regnum2spr (483);
+ case sim_ppc_spr484_regnum: return regnum2spr (484);
+ case sim_ppc_spr485_regnum: return regnum2spr (485);
+ case sim_ppc_spr486_regnum: return regnum2spr (486);
+ case sim_ppc_spr487_regnum: return regnum2spr (487);
+ case sim_ppc_spr488_regnum: return regnum2spr (488);
+ case sim_ppc_spr489_regnum: return regnum2spr (489);
+ case sim_ppc_spr490_regnum: return regnum2spr (490);
+ case sim_ppc_spr491_regnum: return regnum2spr (491);
+ case sim_ppc_spr492_regnum: return regnum2spr (492);
+ case sim_ppc_spr493_regnum: return regnum2spr (493);
+ case sim_ppc_spr494_regnum: return regnum2spr (494);
+ case sim_ppc_spr495_regnum: return regnum2spr (495);
+ case sim_ppc_spr496_regnum: return regnum2spr (496);
+ case sim_ppc_spr497_regnum: return regnum2spr (497);
+ case sim_ppc_spr498_regnum: return regnum2spr (498);
+ case sim_ppc_spr499_regnum: return regnum2spr (499);
+ case sim_ppc_spr500_regnum: return regnum2spr (500);
+ case sim_ppc_spr501_regnum: return regnum2spr (501);
+ case sim_ppc_spr502_regnum: return regnum2spr (502);
+ case sim_ppc_spr503_regnum: return regnum2spr (503);
+ case sim_ppc_spr504_regnum: return regnum2spr (504);
+ case sim_ppc_spr505_regnum: return regnum2spr (505);
+ case sim_ppc_spr506_regnum: return regnum2spr (506);
+ case sim_ppc_spr507_regnum: return regnum2spr (507);
+ case sim_ppc_spr508_regnum: return regnum2spr (508);
+ case sim_ppc_spr509_regnum: return regnum2spr (509);
+ case sim_ppc_spr510_regnum: return regnum2spr (510);
+ case sim_ppc_spr511_regnum: return regnum2spr (511);
+ case sim_ppc_spr512_regnum: return regnum2spr (512);
+ case sim_ppc_spr513_regnum: return regnum2spr (513);
+ case sim_ppc_spr514_regnum: return regnum2spr (514);
+ case sim_ppc_spr515_regnum: return regnum2spr (515);
+ case sim_ppc_spr516_regnum: return regnum2spr (516);
+ case sim_ppc_spr517_regnum: return regnum2spr (517);
+ case sim_ppc_spr518_regnum: return regnum2spr (518);
+ case sim_ppc_spr519_regnum: return regnum2spr (519);
+ case sim_ppc_spr520_regnum: return regnum2spr (520);
+ case sim_ppc_spr521_regnum: return regnum2spr (521);
+ case sim_ppc_spr522_regnum: return regnum2spr (522);
+ case sim_ppc_spr523_regnum: return regnum2spr (523);
+ case sim_ppc_spr524_regnum: return regnum2spr (524);
+ case sim_ppc_spr525_regnum: return regnum2spr (525);
+ case sim_ppc_spr526_regnum: return regnum2spr (526);
+ case sim_ppc_spr527_regnum: return regnum2spr (527);
+ case sim_ppc_spr528_regnum: return regnum2spr (528);
+ case sim_ppc_spr529_regnum: return regnum2spr (529);
+ case sim_ppc_spr530_regnum: return regnum2spr (530);
+ case sim_ppc_spr531_regnum: return regnum2spr (531);
+ case sim_ppc_spr532_regnum: return regnum2spr (532);
+ case sim_ppc_spr533_regnum: return regnum2spr (533);
+ case sim_ppc_spr534_regnum: return regnum2spr (534);
+ case sim_ppc_spr535_regnum: return regnum2spr (535);
+ case sim_ppc_spr536_regnum: return regnum2spr (536);
+ case sim_ppc_spr537_regnum: return regnum2spr (537);
+ case sim_ppc_spr538_regnum: return regnum2spr (538);
+ case sim_ppc_spr539_regnum: return regnum2spr (539);
+ case sim_ppc_spr540_regnum: return regnum2spr (540);
+ case sim_ppc_spr541_regnum: return regnum2spr (541);
+ case sim_ppc_spr542_regnum: return regnum2spr (542);
+ case sim_ppc_spr543_regnum: return regnum2spr (543);
+ case sim_ppc_spr544_regnum: return regnum2spr (544);
+ case sim_ppc_spr545_regnum: return regnum2spr (545);
+ case sim_ppc_spr546_regnum: return regnum2spr (546);
+ case sim_ppc_spr547_regnum: return regnum2spr (547);
+ case sim_ppc_spr548_regnum: return regnum2spr (548);
+ case sim_ppc_spr549_regnum: return regnum2spr (549);
+ case sim_ppc_spr550_regnum: return regnum2spr (550);
+ case sim_ppc_spr551_regnum: return regnum2spr (551);
+ case sim_ppc_spr552_regnum: return regnum2spr (552);
+ case sim_ppc_spr553_regnum: return regnum2spr (553);
+ case sim_ppc_spr554_regnum: return regnum2spr (554);
+ case sim_ppc_spr555_regnum: return regnum2spr (555);
+ case sim_ppc_spr556_regnum: return regnum2spr (556);
+ case sim_ppc_spr557_regnum: return regnum2spr (557);
+ case sim_ppc_spr558_regnum: return regnum2spr (558);
+ case sim_ppc_spr559_regnum: return regnum2spr (559);
+ case sim_ppc_spr560_regnum: return regnum2spr (560);
+ case sim_ppc_spr561_regnum: return regnum2spr (561);
+ case sim_ppc_spr562_regnum: return regnum2spr (562);
+ case sim_ppc_spr563_regnum: return regnum2spr (563);
+ case sim_ppc_spr564_regnum: return regnum2spr (564);
+ case sim_ppc_spr565_regnum: return regnum2spr (565);
+ case sim_ppc_spr566_regnum: return regnum2spr (566);
+ case sim_ppc_spr567_regnum: return regnum2spr (567);
+ case sim_ppc_spr568_regnum: return regnum2spr (568);
+ case sim_ppc_spr569_regnum: return regnum2spr (569);
+ case sim_ppc_spr570_regnum: return regnum2spr (570);
+ case sim_ppc_spr571_regnum: return regnum2spr (571);
+ case sim_ppc_spr572_regnum: return regnum2spr (572);
+ case sim_ppc_spr573_regnum: return regnum2spr (573);
+ case sim_ppc_spr574_regnum: return regnum2spr (574);
+ case sim_ppc_spr575_regnum: return regnum2spr (575);
+ case sim_ppc_spr576_regnum: return regnum2spr (576);
+ case sim_ppc_spr577_regnum: return regnum2spr (577);
+ case sim_ppc_spr578_regnum: return regnum2spr (578);
+ case sim_ppc_spr579_regnum: return regnum2spr (579);
+ case sim_ppc_spr580_regnum: return regnum2spr (580);
+ case sim_ppc_spr581_regnum: return regnum2spr (581);
+ case sim_ppc_spr582_regnum: return regnum2spr (582);
+ case sim_ppc_spr583_regnum: return regnum2spr (583);
+ case sim_ppc_spr584_regnum: return regnum2spr (584);
+ case sim_ppc_spr585_regnum: return regnum2spr (585);
+ case sim_ppc_spr586_regnum: return regnum2spr (586);
+ case sim_ppc_spr587_regnum: return regnum2spr (587);
+ case sim_ppc_spr588_regnum: return regnum2spr (588);
+ case sim_ppc_spr589_regnum: return regnum2spr (589);
+ case sim_ppc_spr590_regnum: return regnum2spr (590);
+ case sim_ppc_spr591_regnum: return regnum2spr (591);
+ case sim_ppc_spr592_regnum: return regnum2spr (592);
+ case sim_ppc_spr593_regnum: return regnum2spr (593);
+ case sim_ppc_spr594_regnum: return regnum2spr (594);
+ case sim_ppc_spr595_regnum: return regnum2spr (595);
+ case sim_ppc_spr596_regnum: return regnum2spr (596);
+ case sim_ppc_spr597_regnum: return regnum2spr (597);
+ case sim_ppc_spr598_regnum: return regnum2spr (598);
+ case sim_ppc_spr599_regnum: return regnum2spr (599);
+ case sim_ppc_spr600_regnum: return regnum2spr (600);
+ case sim_ppc_spr601_regnum: return regnum2spr (601);
+ case sim_ppc_spr602_regnum: return regnum2spr (602);
+ case sim_ppc_spr603_regnum: return regnum2spr (603);
+ case sim_ppc_spr604_regnum: return regnum2spr (604);
+ case sim_ppc_spr605_regnum: return regnum2spr (605);
+ case sim_ppc_spr606_regnum: return regnum2spr (606);
+ case sim_ppc_spr607_regnum: return regnum2spr (607);
+ case sim_ppc_spr608_regnum: return regnum2spr (608);
+ case sim_ppc_spr609_regnum: return regnum2spr (609);
+ case sim_ppc_spr610_regnum: return regnum2spr (610);
+ case sim_ppc_spr611_regnum: return regnum2spr (611);
+ case sim_ppc_spr612_regnum: return regnum2spr (612);
+ case sim_ppc_spr613_regnum: return regnum2spr (613);
+ case sim_ppc_spr614_regnum: return regnum2spr (614);
+ case sim_ppc_spr615_regnum: return regnum2spr (615);
+ case sim_ppc_spr616_regnum: return regnum2spr (616);
+ case sim_ppc_spr617_regnum: return regnum2spr (617);
+ case sim_ppc_spr618_regnum: return regnum2spr (618);
+ case sim_ppc_spr619_regnum: return regnum2spr (619);
+ case sim_ppc_spr620_regnum: return regnum2spr (620);
+ case sim_ppc_spr621_regnum: return regnum2spr (621);
+ case sim_ppc_spr622_regnum: return regnum2spr (622);
+ case sim_ppc_spr623_regnum: return regnum2spr (623);
+ case sim_ppc_spr624_regnum: return regnum2spr (624);
+ case sim_ppc_spr625_regnum: return regnum2spr (625);
+ case sim_ppc_spr626_regnum: return regnum2spr (626);
+ case sim_ppc_spr627_regnum: return regnum2spr (627);
+ case sim_ppc_spr628_regnum: return regnum2spr (628);
+ case sim_ppc_spr629_regnum: return regnum2spr (629);
+ case sim_ppc_spr630_regnum: return regnum2spr (630);
+ case sim_ppc_spr631_regnum: return regnum2spr (631);
+ case sim_ppc_spr632_regnum: return regnum2spr (632);
+ case sim_ppc_spr633_regnum: return regnum2spr (633);
+ case sim_ppc_spr634_regnum: return regnum2spr (634);
+ case sim_ppc_spr635_regnum: return regnum2spr (635);
+ case sim_ppc_spr636_regnum: return regnum2spr (636);
+ case sim_ppc_spr637_regnum: return regnum2spr (637);
+ case sim_ppc_spr638_regnum: return regnum2spr (638);
+ case sim_ppc_spr639_regnum: return regnum2spr (639);
+ case sim_ppc_spr640_regnum: return regnum2spr (640);
+ case sim_ppc_spr641_regnum: return regnum2spr (641);
+ case sim_ppc_spr642_regnum: return regnum2spr (642);
+ case sim_ppc_spr643_regnum: return regnum2spr (643);
+ case sim_ppc_spr644_regnum: return regnum2spr (644);
+ case sim_ppc_spr645_regnum: return regnum2spr (645);
+ case sim_ppc_spr646_regnum: return regnum2spr (646);
+ case sim_ppc_spr647_regnum: return regnum2spr (647);
+ case sim_ppc_spr648_regnum: return regnum2spr (648);
+ case sim_ppc_spr649_regnum: return regnum2spr (649);
+ case sim_ppc_spr650_regnum: return regnum2spr (650);
+ case sim_ppc_spr651_regnum: return regnum2spr (651);
+ case sim_ppc_spr652_regnum: return regnum2spr (652);
+ case sim_ppc_spr653_regnum: return regnum2spr (653);
+ case sim_ppc_spr654_regnum: return regnum2spr (654);
+ case sim_ppc_spr655_regnum: return regnum2spr (655);
+ case sim_ppc_spr656_regnum: return regnum2spr (656);
+ case sim_ppc_spr657_regnum: return regnum2spr (657);
+ case sim_ppc_spr658_regnum: return regnum2spr (658);
+ case sim_ppc_spr659_regnum: return regnum2spr (659);
+ case sim_ppc_spr660_regnum: return regnum2spr (660);
+ case sim_ppc_spr661_regnum: return regnum2spr (661);
+ case sim_ppc_spr662_regnum: return regnum2spr (662);
+ case sim_ppc_spr663_regnum: return regnum2spr (663);
+ case sim_ppc_spr664_regnum: return regnum2spr (664);
+ case sim_ppc_spr665_regnum: return regnum2spr (665);
+ case sim_ppc_spr666_regnum: return regnum2spr (666);
+ case sim_ppc_spr667_regnum: return regnum2spr (667);
+ case sim_ppc_spr668_regnum: return regnum2spr (668);
+ case sim_ppc_spr669_regnum: return regnum2spr (669);
+ case sim_ppc_spr670_regnum: return regnum2spr (670);
+ case sim_ppc_spr671_regnum: return regnum2spr (671);
+ case sim_ppc_spr672_regnum: return regnum2spr (672);
+ case sim_ppc_spr673_regnum: return regnum2spr (673);
+ case sim_ppc_spr674_regnum: return regnum2spr (674);
+ case sim_ppc_spr675_regnum: return regnum2spr (675);
+ case sim_ppc_spr676_regnum: return regnum2spr (676);
+ case sim_ppc_spr677_regnum: return regnum2spr (677);
+ case sim_ppc_spr678_regnum: return regnum2spr (678);
+ case sim_ppc_spr679_regnum: return regnum2spr (679);
+ case sim_ppc_spr680_regnum: return regnum2spr (680);
+ case sim_ppc_spr681_regnum: return regnum2spr (681);
+ case sim_ppc_spr682_regnum: return regnum2spr (682);
+ case sim_ppc_spr683_regnum: return regnum2spr (683);
+ case sim_ppc_spr684_regnum: return regnum2spr (684);
+ case sim_ppc_spr685_regnum: return regnum2spr (685);
+ case sim_ppc_spr686_regnum: return regnum2spr (686);
+ case sim_ppc_spr687_regnum: return regnum2spr (687);
+ case sim_ppc_spr688_regnum: return regnum2spr (688);
+ case sim_ppc_spr689_regnum: return regnum2spr (689);
+ case sim_ppc_spr690_regnum: return regnum2spr (690);
+ case sim_ppc_spr691_regnum: return regnum2spr (691);
+ case sim_ppc_spr692_regnum: return regnum2spr (692);
+ case sim_ppc_spr693_regnum: return regnum2spr (693);
+ case sim_ppc_spr694_regnum: return regnum2spr (694);
+ case sim_ppc_spr695_regnum: return regnum2spr (695);
+ case sim_ppc_spr696_regnum: return regnum2spr (696);
+ case sim_ppc_spr697_regnum: return regnum2spr (697);
+ case sim_ppc_spr698_regnum: return regnum2spr (698);
+ case sim_ppc_spr699_regnum: return regnum2spr (699);
+ case sim_ppc_spr700_regnum: return regnum2spr (700);
+ case sim_ppc_spr701_regnum: return regnum2spr (701);
+ case sim_ppc_spr702_regnum: return regnum2spr (702);
+ case sim_ppc_spr703_regnum: return regnum2spr (703);
+ case sim_ppc_spr704_regnum: return regnum2spr (704);
+ case sim_ppc_spr705_regnum: return regnum2spr (705);
+ case sim_ppc_spr706_regnum: return regnum2spr (706);
+ case sim_ppc_spr707_regnum: return regnum2spr (707);
+ case sim_ppc_spr708_regnum: return regnum2spr (708);
+ case sim_ppc_spr709_regnum: return regnum2spr (709);
+ case sim_ppc_spr710_regnum: return regnum2spr (710);
+ case sim_ppc_spr711_regnum: return regnum2spr (711);
+ case sim_ppc_spr712_regnum: return regnum2spr (712);
+ case sim_ppc_spr713_regnum: return regnum2spr (713);
+ case sim_ppc_spr714_regnum: return regnum2spr (714);
+ case sim_ppc_spr715_regnum: return regnum2spr (715);
+ case sim_ppc_spr716_regnum: return regnum2spr (716);
+ case sim_ppc_spr717_regnum: return regnum2spr (717);
+ case sim_ppc_spr718_regnum: return regnum2spr (718);
+ case sim_ppc_spr719_regnum: return regnum2spr (719);
+ case sim_ppc_spr720_regnum: return regnum2spr (720);
+ case sim_ppc_spr721_regnum: return regnum2spr (721);
+ case sim_ppc_spr722_regnum: return regnum2spr (722);
+ case sim_ppc_spr723_regnum: return regnum2spr (723);
+ case sim_ppc_spr724_regnum: return regnum2spr (724);
+ case sim_ppc_spr725_regnum: return regnum2spr (725);
+ case sim_ppc_spr726_regnum: return regnum2spr (726);
+ case sim_ppc_spr727_regnum: return regnum2spr (727);
+ case sim_ppc_spr728_regnum: return regnum2spr (728);
+ case sim_ppc_spr729_regnum: return regnum2spr (729);
+ case sim_ppc_spr730_regnum: return regnum2spr (730);
+ case sim_ppc_spr731_regnum: return regnum2spr (731);
+ case sim_ppc_spr732_regnum: return regnum2spr (732);
+ case sim_ppc_spr733_regnum: return regnum2spr (733);
+ case sim_ppc_spr734_regnum: return regnum2spr (734);
+ case sim_ppc_spr735_regnum: return regnum2spr (735);
+ case sim_ppc_spr736_regnum: return regnum2spr (736);
+ case sim_ppc_spr737_regnum: return regnum2spr (737);
+ case sim_ppc_spr738_regnum: return regnum2spr (738);
+ case sim_ppc_spr739_regnum: return regnum2spr (739);
+ case sim_ppc_spr740_regnum: return regnum2spr (740);
+ case sim_ppc_spr741_regnum: return regnum2spr (741);
+ case sim_ppc_spr742_regnum: return regnum2spr (742);
+ case sim_ppc_spr743_regnum: return regnum2spr (743);
+ case sim_ppc_spr744_regnum: return regnum2spr (744);
+ case sim_ppc_spr745_regnum: return regnum2spr (745);
+ case sim_ppc_spr746_regnum: return regnum2spr (746);
+ case sim_ppc_spr747_regnum: return regnum2spr (747);
+ case sim_ppc_spr748_regnum: return regnum2spr (748);
+ case sim_ppc_spr749_regnum: return regnum2spr (749);
+ case sim_ppc_spr750_regnum: return regnum2spr (750);
+ case sim_ppc_spr751_regnum: return regnum2spr (751);
+ case sim_ppc_spr752_regnum: return regnum2spr (752);
+ case sim_ppc_spr753_regnum: return regnum2spr (753);
+ case sim_ppc_spr754_regnum: return regnum2spr (754);
+ case sim_ppc_spr755_regnum: return regnum2spr (755);
+ case sim_ppc_spr756_regnum: return regnum2spr (756);
+ case sim_ppc_spr757_regnum: return regnum2spr (757);
+ case sim_ppc_spr758_regnum: return regnum2spr (758);
+ case sim_ppc_spr759_regnum: return regnum2spr (759);
+ case sim_ppc_spr760_regnum: return regnum2spr (760);
+ case sim_ppc_spr761_regnum: return regnum2spr (761);
+ case sim_ppc_spr762_regnum: return regnum2spr (762);
+ case sim_ppc_spr763_regnum: return regnum2spr (763);
+ case sim_ppc_spr764_regnum: return regnum2spr (764);
+ case sim_ppc_spr765_regnum: return regnum2spr (765);
+ case sim_ppc_spr766_regnum: return regnum2spr (766);
+ case sim_ppc_spr767_regnum: return regnum2spr (767);
+ case sim_ppc_spr768_regnum: return regnum2spr (768);
+ case sim_ppc_spr769_regnum: return regnum2spr (769);
+ case sim_ppc_spr770_regnum: return regnum2spr (770);
+ case sim_ppc_spr771_regnum: return regnum2spr (771);
+ case sim_ppc_spr772_regnum: return regnum2spr (772);
+ case sim_ppc_spr773_regnum: return regnum2spr (773);
+ case sim_ppc_spr774_regnum: return regnum2spr (774);
+ case sim_ppc_spr775_regnum: return regnum2spr (775);
+ case sim_ppc_spr776_regnum: return regnum2spr (776);
+ case sim_ppc_spr777_regnum: return regnum2spr (777);
+ case sim_ppc_spr778_regnum: return regnum2spr (778);
+ case sim_ppc_spr779_regnum: return regnum2spr (779);
+ case sim_ppc_spr780_regnum: return regnum2spr (780);
+ case sim_ppc_spr781_regnum: return regnum2spr (781);
+ case sim_ppc_spr782_regnum: return regnum2spr (782);
+ case sim_ppc_spr783_regnum: return regnum2spr (783);
+ case sim_ppc_spr784_regnum: return regnum2spr (784);
+ case sim_ppc_spr785_regnum: return regnum2spr (785);
+ case sim_ppc_spr786_regnum: return regnum2spr (786);
+ case sim_ppc_spr787_regnum: return regnum2spr (787);
+ case sim_ppc_spr788_regnum: return regnum2spr (788);
+ case sim_ppc_spr789_regnum: return regnum2spr (789);
+ case sim_ppc_spr790_regnum: return regnum2spr (790);
+ case sim_ppc_spr791_regnum: return regnum2spr (791);
+ case sim_ppc_spr792_regnum: return regnum2spr (792);
+ case sim_ppc_spr793_regnum: return regnum2spr (793);
+ case sim_ppc_spr794_regnum: return regnum2spr (794);
+ case sim_ppc_spr795_regnum: return regnum2spr (795);
+ case sim_ppc_spr796_regnum: return regnum2spr (796);
+ case sim_ppc_spr797_regnum: return regnum2spr (797);
+ case sim_ppc_spr798_regnum: return regnum2spr (798);
+ case sim_ppc_spr799_regnum: return regnum2spr (799);
+ case sim_ppc_spr800_regnum: return regnum2spr (800);
+ case sim_ppc_spr801_regnum: return regnum2spr (801);
+ case sim_ppc_spr802_regnum: return regnum2spr (802);
+ case sim_ppc_spr803_regnum: return regnum2spr (803);
+ case sim_ppc_spr804_regnum: return regnum2spr (804);
+ case sim_ppc_spr805_regnum: return regnum2spr (805);
+ case sim_ppc_spr806_regnum: return regnum2spr (806);
+ case sim_ppc_spr807_regnum: return regnum2spr (807);
+ case sim_ppc_spr808_regnum: return regnum2spr (808);
+ case sim_ppc_spr809_regnum: return regnum2spr (809);
+ case sim_ppc_spr810_regnum: return regnum2spr (810);
+ case sim_ppc_spr811_regnum: return regnum2spr (811);
+ case sim_ppc_spr812_regnum: return regnum2spr (812);
+ case sim_ppc_spr813_regnum: return regnum2spr (813);
+ case sim_ppc_spr814_regnum: return regnum2spr (814);
+ case sim_ppc_spr815_regnum: return regnum2spr (815);
+ case sim_ppc_spr816_regnum: return regnum2spr (816);
+ case sim_ppc_spr817_regnum: return regnum2spr (817);
+ case sim_ppc_spr818_regnum: return regnum2spr (818);
+ case sim_ppc_spr819_regnum: return regnum2spr (819);
+ case sim_ppc_spr820_regnum: return regnum2spr (820);
+ case sim_ppc_spr821_regnum: return regnum2spr (821);
+ case sim_ppc_spr822_regnum: return regnum2spr (822);
+ case sim_ppc_spr823_regnum: return regnum2spr (823);
+ case sim_ppc_spr824_regnum: return regnum2spr (824);
+ case sim_ppc_spr825_regnum: return regnum2spr (825);
+ case sim_ppc_spr826_regnum: return regnum2spr (826);
+ case sim_ppc_spr827_regnum: return regnum2spr (827);
+ case sim_ppc_spr828_regnum: return regnum2spr (828);
+ case sim_ppc_spr829_regnum: return regnum2spr (829);
+ case sim_ppc_spr830_regnum: return regnum2spr (830);
+ case sim_ppc_spr831_regnum: return regnum2spr (831);
+ case sim_ppc_spr832_regnum: return regnum2spr (832);
+ case sim_ppc_spr833_regnum: return regnum2spr (833);
+ case sim_ppc_spr834_regnum: return regnum2spr (834);
+ case sim_ppc_spr835_regnum: return regnum2spr (835);
+ case sim_ppc_spr836_regnum: return regnum2spr (836);
+ case sim_ppc_spr837_regnum: return regnum2spr (837);
+ case sim_ppc_spr838_regnum: return regnum2spr (838);
+ case sim_ppc_spr839_regnum: return regnum2spr (839);
+ case sim_ppc_spr840_regnum: return regnum2spr (840);
+ case sim_ppc_spr841_regnum: return regnum2spr (841);
+ case sim_ppc_spr842_regnum: return regnum2spr (842);
+ case sim_ppc_spr843_regnum: return regnum2spr (843);
+ case sim_ppc_spr844_regnum: return regnum2spr (844);
+ case sim_ppc_spr845_regnum: return regnum2spr (845);
+ case sim_ppc_spr846_regnum: return regnum2spr (846);
+ case sim_ppc_spr847_regnum: return regnum2spr (847);
+ case sim_ppc_spr848_regnum: return regnum2spr (848);
+ case sim_ppc_spr849_regnum: return regnum2spr (849);
+ case sim_ppc_spr850_regnum: return regnum2spr (850);
+ case sim_ppc_spr851_regnum: return regnum2spr (851);
+ case sim_ppc_spr852_regnum: return regnum2spr (852);
+ case sim_ppc_spr853_regnum: return regnum2spr (853);
+ case sim_ppc_spr854_regnum: return regnum2spr (854);
+ case sim_ppc_spr855_regnum: return regnum2spr (855);
+ case sim_ppc_spr856_regnum: return regnum2spr (856);
+ case sim_ppc_spr857_regnum: return regnum2spr (857);
+ case sim_ppc_spr858_regnum: return regnum2spr (858);
+ case sim_ppc_spr859_regnum: return regnum2spr (859);
+ case sim_ppc_spr860_regnum: return regnum2spr (860);
+ case sim_ppc_spr861_regnum: return regnum2spr (861);
+ case sim_ppc_spr862_regnum: return regnum2spr (862);
+ case sim_ppc_spr863_regnum: return regnum2spr (863);
+ case sim_ppc_spr864_regnum: return regnum2spr (864);
+ case sim_ppc_spr865_regnum: return regnum2spr (865);
+ case sim_ppc_spr866_regnum: return regnum2spr (866);
+ case sim_ppc_spr867_regnum: return regnum2spr (867);
+ case sim_ppc_spr868_regnum: return regnum2spr (868);
+ case sim_ppc_spr869_regnum: return regnum2spr (869);
+ case sim_ppc_spr870_regnum: return regnum2spr (870);
+ case sim_ppc_spr871_regnum: return regnum2spr (871);
+ case sim_ppc_spr872_regnum: return regnum2spr (872);
+ case sim_ppc_spr873_regnum: return regnum2spr (873);
+ case sim_ppc_spr874_regnum: return regnum2spr (874);
+ case sim_ppc_spr875_regnum: return regnum2spr (875);
+ case sim_ppc_spr876_regnum: return regnum2spr (876);
+ case sim_ppc_spr877_regnum: return regnum2spr (877);
+ case sim_ppc_spr878_regnum: return regnum2spr (878);
+ case sim_ppc_spr879_regnum: return regnum2spr (879);
+ case sim_ppc_spr880_regnum: return regnum2spr (880);
+ case sim_ppc_spr881_regnum: return regnum2spr (881);
+ case sim_ppc_spr882_regnum: return regnum2spr (882);
+ case sim_ppc_spr883_regnum: return regnum2spr (883);
+ case sim_ppc_spr884_regnum: return regnum2spr (884);
+ case sim_ppc_spr885_regnum: return regnum2spr (885);
+ case sim_ppc_spr886_regnum: return regnum2spr (886);
+ case sim_ppc_spr887_regnum: return regnum2spr (887);
+ case sim_ppc_spr888_regnum: return regnum2spr (888);
+ case sim_ppc_spr889_regnum: return regnum2spr (889);
+ case sim_ppc_spr890_regnum: return regnum2spr (890);
+ case sim_ppc_spr891_regnum: return regnum2spr (891);
+ case sim_ppc_spr892_regnum: return regnum2spr (892);
+ case sim_ppc_spr893_regnum: return regnum2spr (893);
+ case sim_ppc_spr894_regnum: return regnum2spr (894);
+ case sim_ppc_spr895_regnum: return regnum2spr (895);
+ case sim_ppc_spr896_regnum: return regnum2spr (896);
+ case sim_ppc_spr897_regnum: return regnum2spr (897);
+ case sim_ppc_spr898_regnum: return regnum2spr (898);
+ case sim_ppc_spr899_regnum: return regnum2spr (899);
+ case sim_ppc_spr900_regnum: return regnum2spr (900);
+ case sim_ppc_spr901_regnum: return regnum2spr (901);
+ case sim_ppc_spr902_regnum: return regnum2spr (902);
+ case sim_ppc_spr903_regnum: return regnum2spr (903);
+ case sim_ppc_spr904_regnum: return regnum2spr (904);
+ case sim_ppc_spr905_regnum: return regnum2spr (905);
+ case sim_ppc_spr906_regnum: return regnum2spr (906);
+ case sim_ppc_spr907_regnum: return regnum2spr (907);
+ case sim_ppc_spr908_regnum: return regnum2spr (908);
+ case sim_ppc_spr909_regnum: return regnum2spr (909);
+ case sim_ppc_spr910_regnum: return regnum2spr (910);
+ case sim_ppc_spr911_regnum: return regnum2spr (911);
+ case sim_ppc_spr912_regnum: return regnum2spr (912);
+ case sim_ppc_spr913_regnum: return regnum2spr (913);
+ case sim_ppc_spr914_regnum: return regnum2spr (914);
+ case sim_ppc_spr915_regnum: return regnum2spr (915);
+ case sim_ppc_spr916_regnum: return regnum2spr (916);
+ case sim_ppc_spr917_regnum: return regnum2spr (917);
+ case sim_ppc_spr918_regnum: return regnum2spr (918);
+ case sim_ppc_spr919_regnum: return regnum2spr (919);
+ case sim_ppc_spr920_regnum: return regnum2spr (920);
+ case sim_ppc_spr921_regnum: return regnum2spr (921);
+ case sim_ppc_spr922_regnum: return regnum2spr (922);
+ case sim_ppc_spr923_regnum: return regnum2spr (923);
+ case sim_ppc_spr924_regnum: return regnum2spr (924);
+ case sim_ppc_spr925_regnum: return regnum2spr (925);
+ case sim_ppc_spr926_regnum: return regnum2spr (926);
+ case sim_ppc_spr927_regnum: return regnum2spr (927);
+ case sim_ppc_spr928_regnum: return regnum2spr (928);
+ case sim_ppc_spr929_regnum: return regnum2spr (929);
+ case sim_ppc_spr930_regnum: return regnum2spr (930);
+ case sim_ppc_spr931_regnum: return regnum2spr (931);
+ case sim_ppc_spr932_regnum: return regnum2spr (932);
+ case sim_ppc_spr933_regnum: return regnum2spr (933);
+ case sim_ppc_spr934_regnum: return regnum2spr (934);
+ case sim_ppc_spr935_regnum: return regnum2spr (935);
+ case sim_ppc_spr936_regnum: return regnum2spr (936);
+ case sim_ppc_spr937_regnum: return regnum2spr (937);
+ case sim_ppc_spr938_regnum: return regnum2spr (938);
+ case sim_ppc_spr939_regnum: return regnum2spr (939);
+ case sim_ppc_spr940_regnum: return regnum2spr (940);
+ case sim_ppc_spr941_regnum: return regnum2spr (941);
+ case sim_ppc_spr942_regnum: return regnum2spr (942);
+ case sim_ppc_spr943_regnum: return regnum2spr (943);
+ case sim_ppc_spr944_regnum: return regnum2spr (944);
+ case sim_ppc_spr945_regnum: return regnum2spr (945);
+ case sim_ppc_spr946_regnum: return regnum2spr (946);
+ case sim_ppc_spr947_regnum: return regnum2spr (947);
+ case sim_ppc_spr948_regnum: return regnum2spr (948);
+ case sim_ppc_spr949_regnum: return regnum2spr (949);
+ case sim_ppc_spr950_regnum: return regnum2spr (950);
+ case sim_ppc_spr951_regnum: return regnum2spr (951);
+ case sim_ppc_spr952_regnum: return regnum2spr (952);
+ case sim_ppc_spr953_regnum: return regnum2spr (953);
+ case sim_ppc_spr954_regnum: return regnum2spr (954);
+ case sim_ppc_spr955_regnum: return regnum2spr (955);
+ case sim_ppc_spr956_regnum: return regnum2spr (956);
+ case sim_ppc_spr957_regnum: return regnum2spr (957);
+ case sim_ppc_spr958_regnum: return regnum2spr (958);
+ case sim_ppc_spr959_regnum: return regnum2spr (959);
+ case sim_ppc_spr960_regnum: return regnum2spr (960);
+ case sim_ppc_spr961_regnum: return regnum2spr (961);
+ case sim_ppc_spr962_regnum: return regnum2spr (962);
+ case sim_ppc_spr963_regnum: return regnum2spr (963);
+ case sim_ppc_spr964_regnum: return regnum2spr (964);
+ case sim_ppc_spr965_regnum: return regnum2spr (965);
+ case sim_ppc_spr966_regnum: return regnum2spr (966);
+ case sim_ppc_spr967_regnum: return regnum2spr (967);
+ case sim_ppc_spr968_regnum: return regnum2spr (968);
+ case sim_ppc_spr969_regnum: return regnum2spr (969);
+ case sim_ppc_spr970_regnum: return regnum2spr (970);
+ case sim_ppc_spr971_regnum: return regnum2spr (971);
+ case sim_ppc_spr972_regnum: return regnum2spr (972);
+ case sim_ppc_spr973_regnum: return regnum2spr (973);
+ case sim_ppc_spr974_regnum: return regnum2spr (974);
+ case sim_ppc_spr975_regnum: return regnum2spr (975);
+ case sim_ppc_spr976_regnum: return regnum2spr (976);
+ case sim_ppc_spr977_regnum: return regnum2spr (977);
+ case sim_ppc_spr978_regnum: return regnum2spr (978);
+ case sim_ppc_spr979_regnum: return regnum2spr (979);
+ case sim_ppc_spr980_regnum: return regnum2spr (980);
+ case sim_ppc_spr981_regnum: return regnum2spr (981);
+ case sim_ppc_spr982_regnum: return regnum2spr (982);
+ case sim_ppc_spr983_regnum: return regnum2spr (983);
+ case sim_ppc_spr984_regnum: return regnum2spr (984);
+ case sim_ppc_spr985_regnum: return regnum2spr (985);
+ case sim_ppc_spr986_regnum: return regnum2spr (986);
+ case sim_ppc_spr987_regnum: return regnum2spr (987);
+ case sim_ppc_spr988_regnum: return regnum2spr (988);
+ case sim_ppc_spr989_regnum: return regnum2spr (989);
+ case sim_ppc_spr990_regnum: return regnum2spr (990);
+ case sim_ppc_spr991_regnum: return regnum2spr (991);
+ case sim_ppc_spr992_regnum: return regnum2spr (992);
+ case sim_ppc_spr993_regnum: return regnum2spr (993);
+ case sim_ppc_spr994_regnum: return regnum2spr (994);
+ case sim_ppc_spr995_regnum: return regnum2spr (995);
+ case sim_ppc_spr996_regnum: return regnum2spr (996);
+ case sim_ppc_spr997_regnum: return regnum2spr (997);
+ case sim_ppc_spr998_regnum: return regnum2spr (998);
+ case sim_ppc_spr999_regnum: return regnum2spr (999);
+ case sim_ppc_spr1000_regnum: return regnum2spr (1000);
+ case sim_ppc_spr1001_regnum: return regnum2spr (1001);
+ case sim_ppc_spr1002_regnum: return regnum2spr (1002);
+ case sim_ppc_spr1003_regnum: return regnum2spr (1003);
+ case sim_ppc_spr1004_regnum: return regnum2spr (1004);
+ case sim_ppc_spr1005_regnum: return regnum2spr (1005);
+ case sim_ppc_spr1006_regnum: return regnum2spr (1006);
+ case sim_ppc_spr1007_regnum: return regnum2spr (1007);
+ case sim_ppc_spr1008_regnum: return regnum2spr (1008);
+ case sim_ppc_spr1009_regnum: return regnum2spr (1009);
+ case sim_ppc_spr1010_regnum: return regnum2spr (1010);
+ case sim_ppc_spr1011_regnum: return regnum2spr (1011);
+ case sim_ppc_spr1012_regnum: return regnum2spr (1012);
+ case sim_ppc_spr1013_regnum: return regnum2spr (1013);
+ case sim_ppc_spr1014_regnum: return regnum2spr (1014);
+ case sim_ppc_spr1015_regnum: return regnum2spr (1015);
+ case sim_ppc_spr1016_regnum: return regnum2spr (1016);
+ case sim_ppc_spr1017_regnum: return regnum2spr (1017);
+ case sim_ppc_spr1018_regnum: return regnum2spr (1018);
+ case sim_ppc_spr1019_regnum: return regnum2spr (1019);
+ case sim_ppc_spr1020_regnum: return regnum2spr (1020);
+ case sim_ppc_spr1021_regnum: return regnum2spr (1021);
+ case sim_ppc_spr1022_regnum: return regnum2spr (1022);
+ case sim_ppc_spr1023_regnum: return regnum2spr (1023);
+ default:
+ /* Not a valid register number at all. */
+ return NULL;
+ }
+}
+
+
+int
+sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
+{
+ const char *regname = regnum2name (regno);
+
+ if (simulator == NULL || regname == NULL)
+ return -1;
+
+ TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n",
+ regno, regname, (long)buf));
+ return psim_read_register(simulator, MAX_NR_PROCESSORS,
+ buf, regname, raw_transfer);
+}
+
+
+int
+sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
+{
+ const char *regname = regnum2name (regno);
+
+ if (simulator == NULL || regname == NULL)
+ return -1;
+
+ TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",
+ regno, regname, (long)buf));
+ return psim_write_register(simulator, MAX_NR_PROCESSORS,
+ buf, regname, raw_transfer);
+}
diff --git a/sim/ppc/hw_htab.c b/sim/ppc/hw_htab.c
index d5360686b45..d9b280a5ea6 100644
--- a/sim/ppc/hw_htab.c
+++ b/sim/ppc/hw_htab.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright 1994, 1995, 1996, 2003 Andrew Cagney
+ Copyright 1994, 1995, 1996, 2003, 2004 Andrew Cagney
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
@@ -391,7 +391,7 @@ htab_sum_binary(bfd *abfd,
PTR data)
{
htab_binary_sizes *sizes = (htab_binary_sizes*)data;
- unsigned_word size = bfd_get_section_size_before_reloc (sec);
+ unsigned_word size = bfd_get_section_size (sec);
unsigned_word vma = bfd_get_section_vma (abfd, sec);
#define bfd_get_section_lma(abfd, sec) ((sec)->lma + 0)
unsigned_word ra = bfd_get_section_lma (abfd, sec);
@@ -437,7 +437,7 @@ htab_dma_binary(bfd *abfd,
return;
/* check/ignore any sections of size zero */
- section_size = bfd_get_section_size_before_reloc(sec);
+ section_size = bfd_get_section_size (sec);
if (section_size == 0)
return;
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c
index 253ef7c5323..1ac5434c142 100644
--- a/sim/ppc/hw_init.c
+++ b/sim/ppc/hw_init.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright 1994, 1997, 2003 Andrew Cagney
+ Copyright 1994, 1997, 2003, 2004 Andrew Cagney
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
@@ -329,7 +329,7 @@ update_for_binary_section(bfd *abfd,
return;
/* check/ignore any sections of size zero */
- section_size = bfd_get_section_size_before_reloc(the_section);
+ section_size = bfd_get_section_size (the_section);
if (section_size == 0)
return;
diff --git a/sim/ppc/sim_callbacks.h b/sim/ppc/sim_callbacks.h
index 322af9de8a1..9fb815b4682 100644
--- a/sim/ppc/sim_callbacks.h
+++ b/sim/ppc/sim_callbacks.h
@@ -103,6 +103,10 @@ void sim_io_flush_stdoutput
(void);
+/* Simulator instance. */
+extern psim *simulator;
+
+
/* Memory management with an allocator that clears memory before use. */
void *zalloc
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 040ce833202..ae74593dd69 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -40,7 +40,6 @@
#endif
#endif
-#include "defs.h"
#include "bfd.h"
#include "gdb/callback.h"
#include "gdb/remote-sim.h"
@@ -55,33 +54,10 @@ static int poll_quit_count = POLL_QUIT_INTERVAL;
/* Structures used by the simulator, for gdb just have static structures */
-static psim *simulator;
+psim *simulator;
static device *root_device;
static host_callback *callbacks;
-/* We use GDB's gdbarch_register_name function to map GDB register
- numbers onto names, which we can then look up in the register
- table. Since the `set architecture' command can select a new
- processor variant at run-time, the meanings of the register numbers
- can change, so we need to make sure the sim uses the same
- name/number mapping that GDB uses.
-
- (We don't use the REGISTER_NAME macro, which is a wrapper for
- gdbarch_register_name. We #include GDB's "defs.h", which tries to
- #include GDB's "config.h", but gets ours instead, and REGISTER_NAME
- ends up not getting defined. Simpler to just use
- gdbarch_register_name directly.)
-
- We used to just use the REGISTER_NAMES macro from GDB's
- target-dependent header files, which expanded into an initializer
- for an array of strings. That was kind of nice, because it meant
- that libsim.a had only a compile-time dependency on GDB; using
- gdbarch_register_name directly means that there are now link-time
- and run-time dependencies too.
-
- Perhaps the host_callback structure could provide a function for
- retrieving register names; that would be cleaner. */
-
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback *callback,
@@ -176,54 +152,6 @@ sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
return result;
}
-
-int
-sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
-{
- const char *regname;
-
- if (simulator == NULL) {
- return 0;
- }
-
- /* GDB will sometimes ask for the contents of a register named "";
- we ignore such requests, and leave garbage in *BUF. In GDB
- terms, the empty string means "the register with this number is
- not present in the currently selected architecture variant."
- That's following the kludge we're using for the MIPS processors.
- But there are loops that just walk through the entire list of
- names and try to get everything. */
- regname = gdbarch_register_name (current_gdbarch, regno);
- if (! regname || regname[0] == '\0')
- return -1;
-
- TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n",
- regno, regname, (long)buf));
- return psim_read_register(simulator, MAX_NR_PROCESSORS,
- buf, regname, raw_transfer);
-}
-
-
-int
-sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
-{
- const char *regname;
-
- if (simulator == NULL)
- return 0;
-
- /* See comments in sim_fetch_register, above. */
- regname = gdbarch_register_name (current_gdbarch, regno);
- if (! regname || regname[0] == '\0')
- return -1;
-
- TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",
- regno, regname, (long)buf));
- return psim_write_register(simulator, MAX_NR_PROCESSORS,
- buf, regname, raw_transfer);
-}
-
-
void
sim_info (SIM_DESC sd, int verbose)
{
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index c5106f47f3f..220c62c6e0c 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -619,7 +619,7 @@ parse_integer_property(device *current,
for (i = 0; i < nr_entries; i++) {
H2BE(words[i]);
}
- /* perhaphs integer array property is better */
+ /* perhaps integer array property is better */
device_add_array_property(current, property_name, words,
sizeof(words[0]) * nr_entries);
}
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 549e49976ba..381e1de4ec8 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,46 @@
+2004-09-08 DJ Delorie <dj@redhat.com>
+
+ Commited by Corinna Vinschen <vinschen@redhat.com>
+ * gencode.c (movua.l): Compensate for endianness.
+
+2004-09-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * interp.c (RAISE_EXCEPTION_IF_IN_DELAY_SLOT): New macro.
+ (in_delay_slot): New flag variable.
+ (Delay_Slot): Set in_delay_slot.
+ (sim_resume): Reset in_delay_slot after leaving code switch.
+ * gencode.c (op tab): Call RAISE_EXCEPTION_IF_IN_DELAY_SLOT for all
+ instructions not allowed in delay slots.
+
+2004-09-08 Michael Snyder <msnyder@redhat.com>
+
+ Commited by Corinna Vinschen <vinschen@redhat.com>
+ Introduce SH2a support.
+ * interp.c: Change type of jump table to short. Add various macros.
+ (sim_load): Save the bfd machine code.
+ (sim_create_inferior): Ditto.
+ (union saved_state_type): Add tbr, ibnr and ibcr registers.
+ Move bfd_mach to end of struct. Add regstack pointer.
+ (init_dsp): Don't swap contents of sh_dsp_table any more. Instead
+ use it directly in its own switch statement. Allocate space for 512
+ register banks.
+ (do_long_move_insn): New function.
+ (do_blog_insn): Ditto.
+ (trap): Use trap #13 and trap #14 to set ibnr and ibcr.
+ * gencode.c: Move movx/movy insns into separate switch statement.
+ (op tab): Add sh2a insns. Reject instructions that are disabled
+ on that chip.
+ (gensim_caselist): Generate default case here instead of in caller.
+ (gensim): Generate two separate switch statements. Call
+ gensim_caselist once for each (for movsxy_tab and for tab).
+ Add tokens for r15 and multiple regs.
+ (conflict_warn, warn_conflicts): Add for debugging.
+
+2004-08-18 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * gencode.c (tab): For shad snd shld, fix result for
+ (op1 < 0 && shift_amount == 0).
+
2004-02-02 Michael Snyder <msnyder@redhat.com>
* gencode.c (movua.l): Set thislock to 0, not n.
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 33475918704..f03ba4e341e 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -84,6 +84,7 @@ op tab[] =
},
{ "", "", "bf <bdisp8>", "10001011i8p1....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"if (!T) {",
" SET_NIP (PC + 4 + (SEXT (i) * 2));",
" cycles += 2;",
@@ -91,6 +92,7 @@ op tab[] =
},
{ "", "", "bf.s <bdisp8>", "10001111i8p1....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"if (!T) {",
" SET_NIP (PC + 4 + (SEXT (i) * 2));",
" cycles += 2;",
@@ -98,19 +100,35 @@ op tab[] =
"}",
},
+ { "", "n", "bit32 #imm3,@(disp12,<REG_N>)", "0011nnnni8*11001",
+ "/* 32-bit logical bit-manipulation instructions. */",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "int word2 = RIAT (nip);",
+ "i >>= 4; /* BOGUS: Using only three bits of 'i'. */",
+ "/* MSB of 'i' must be zero. */",
+ "if (i > 7)",
+ " RAISE_EXCEPTION (SIGILL);",
+ "MA (1);",
+ "do_blog_insn (1 << i, (word2 & 0xfff) + R[n], ",
+ " (word2 >> 12) & 0xf, memory, maskb);",
+ "SET_NIP (nip + 2); /* Consume 2 more bytes. */",
+ },
{ "", "", "bra <bdisp12>", "1010i12.........",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_NIP (PC + 4 + (SEXT12 (i) * 2));",
"cycles += 2;",
"Delay_Slot (PC + 2);",
},
{ "", "n", "braf <REG_N>", "0000nnnn00100011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_NIP (PC + 4 + R[n]);",
"cycles += 2;",
"Delay_Slot (PC + 2);",
},
{ "", "", "bsr <bdisp12>", "1011i12.........",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"PR = PH2T (PC + 4);",
"SET_NIP (PC + 4 + (SEXT12 (i) * 2));",
"cycles += 2;",
@@ -118,6 +136,7 @@ op tab[] =
},
{ "", "n", "bsrf <REG_N>", "0000nnnn00000011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"PR = PH2T (PC) + 4;",
"SET_NIP (PC + 4 + R[n]);",
"cycles += 2;",
@@ -125,13 +144,187 @@ op tab[] =
},
{ "", "", "bt <bdisp8>", "10001001i8p1....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"if (T) {",
" SET_NIP (PC + 4 + (SEXT (i) * 2));",
" cycles += 2;",
"}",
},
+
+ { "", "m", "bld/st #<imm>, <REG_M>", "10000111mmmmi4*1",
+ "/* MSB of 'i' is true for load, false for store. */",
+ "if (i <= 7)",
+ " if (T)",
+ " R[m] |= (1 << i);",
+ " else",
+ " R[m] &= ~(1 << i);",
+ "else",
+ " SET_SR_T ((R[m] & (1 << (i - 8))) != 0);",
+ },
+ { "m", "m", "bset/clr #<imm>, <REG_M>", "10000110mmmmi4*1",
+ "/* MSB of 'i' is true for set, false for clear. */",
+ "if (i <= 7)",
+ " R[m] &= ~(1 << i);",
+ "else",
+ " R[m] |= (1 << (i - 8));",
+ },
+ { "n", "n", "clips.b <REG_N>", "0100nnnn10010001",
+ "if (R[n] < -128 || R[n] > 127) {",
+ " L (n);",
+ " SET_SR_CS (1);",
+ " if (R[n] > 127)",
+ " R[n] = 127;",
+ " else if (R[n] < -128)",
+ " R[n] = -128;",
+ "}",
+ },
+ { "n", "n", "clips.w <REG_N>", "0100nnnn10010101",
+ "if (R[n] < -32768 || R[n] > 32767) {",
+ " L (n);",
+ " SET_SR_CS (1);",
+ " if (R[n] > 32767)",
+ " R[n] = 32767;",
+ " else if (R[n] < -32768)",
+ " R[n] = -32768;",
+ "}",
+ },
+ { "n", "n", "clipu.b <REG_N>", "0100nnnn10000001",
+ "if (R[n] < -256 || R[n] > 255) {",
+ " L (n);",
+ " SET_SR_CS (1);",
+ " R[n] = 255;",
+ "}",
+ },
+ { "n", "n", "clipu.w <REG_N>", "0100nnnn10000101",
+ "if (R[n] < -65536 || R[n] > 65535) {",
+ " L (n);",
+ " SET_SR_CS (1);",
+ " R[n] = 65535;",
+ "}",
+ },
+ { "n", "0n", "divs R0,<REG_N>", "0100nnnn10010100",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "if (R0 == 0)",
+ " R[n] = 0x7fffffff;",
+ "else if (R0 == -1 && R[n] == 0x80000000)",
+ " R[n] = 0x7fffffff;",
+ "else R[n] /= R0;",
+ "L (n);",
+ },
+ { "n", "0n", "divu R0,<REG_N>", "0100nnnn10000100",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "if (R0 == 0)",
+ " R[n] = 0xffffffff;",
+ "else (unsigned int) R[n] = (unsigned int) R[n] / (unsigned int) R0;",
+ "L (n);",
+ },
+ { "n", "0n", "mulr R0,<REG_N>", "0100nnnn10000000",
+ "R[n] = (R[n] * R0) & 0xffffffff;",
+ "L (n);",
+ },
+ { "0", "n", "ldbank @<REG_N>,R0", "0100nnnn11100101",
+ "int regn = (R[n] >> 2) & 0x1f;",
+ "int bankn = (R[n] >> 7) & 0x1ff;",
+ "if (regn > 19)",
+ " regn = 19; /* FIXME what should happen? */",
+ "R0 = saved_state.asregs.regstack[bankn].regs[regn];",
+ "L (0);",
+ },
+ { "", "0n", "stbank R0,@<REG_N>", "0100nnnn11100001",
+ "int regn = (R[n] >> 2) & 0x1f;",
+ "int bankn = (R[n] >> 7) & 0x1ff;",
+ "if (regn > 19)",
+ " regn = 19; /* FIXME what should happen? */",
+ "saved_state.asregs.regstack[bankn].regs[regn] = R0;",
+ },
+ { "", "", "resbank", "0000000001011011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ /* FIXME: cdef all */
+ "int i;",
+ "if (BO) { /* Bank Overflow */",
+ /* FIXME: how do we know when to reset BO? */
+ " for (i = 0; i <= 14; i++) {",
+ " R[i] = RLAT (R[15]);",
+ " MA (1);",
+ " R[15] += 4;",
+ " }",
+ " PR = RLAT (R[15]);",
+ " R[15] += 4;",
+ " MA (1);",
+ " GBR = RLAT (R[15]);",
+ " R[15] += 4;",
+ " MA (1);",
+ " MACH = RLAT (R[15]);",
+ " R[15] += 4;",
+ " MA (1);",
+ " MACL = RLAT (R[15]);",
+ " R[15] += 4;",
+ " MA (1);",
+ "}",
+ "else if (BANKN == 0) /* Bank Underflow */",
+ " RAISE_EXCEPTION (SIGILL);", /* FIXME: what exception? */
+ "else {",
+ " SET_BANKN (BANKN - 1);",
+ " for (i = 0; i <= 14; i++)",
+ " R[i] = saved_state.asregs.regstack[BANKN].regs[i];",
+ " MACH = saved_state.asregs.regstack[BANKN].regs[15];",
+ " PR = saved_state.asregs.regstack[BANKN].regs[17];",
+ " GBR = saved_state.asregs.regstack[BANKN].regs[18];",
+ " MACL = saved_state.asregs.regstack[BANKN].regs[19];",
+ "}",
+ },
+ { "f", "f-", "movml.l <REG_N>,@-R15", "0100nnnn11110001",
+ "/* Push Rn...R0 (if n==15, push pr and R14...R0). */",
+ "do {",
+ " MA (1);",
+ " R[15] -= 4;",
+ " if (n == 15)",
+ " WLAT (R[15], PR);",
+ " else",
+ " WLAT (R[15], R[n]);",
+ "} while (n-- > 0);",
+ },
+ { "f", "f+", "movml.l @R15+,<REG_N>", "0100nnnn11110101",
+ "/* Pop R0...Rn (if n==15, pop R0...R14 and pr). */",
+ "int i = 0;\n",
+ "do {",
+ " MA (1);",
+ " if (i == 15)",
+ " PR = RLAT (R[15]);",
+ " else",
+ " R[i] = RLAT (R[15]);",
+ " R[15] += 4;",
+ "} while (i++ < n);",
+ },
+ { "f", "f-", "movmu.l <REG_N>,@-R15", "0100nnnn11110000",
+ "/* Push pr, R14...Rn (if n==15, push pr). */", /* FIXME */
+ "int i = 15;\n",
+ "do {",
+ " MA (1);",
+ " R[15] -= 4;",
+ " if (i == 15)",
+ " WLAT (R[15], PR);",
+ " else",
+ " WLAT (R[15], R[i]);",
+ "} while (i-- > n);",
+ },
+ { "f", "f+", "movmu.l @R15+,<REG_N>", "0100nnnn11110100",
+ "/* Pop Rn...R14, pr (if n==15, pop pr). */", /* FIXME */
+ "do {",
+ " MA (1);",
+ " if (n == 15)",
+ " PR = RLAT (R[15]);",
+ " else",
+ " R[n] = RLAT (R[15]);",
+ " R[15] += 4;",
+ "} while (n++ < 15);",
+ },
+ { "", "", "nott", "0000000001101000",
+ "SET_SR_T (T == 0);",
+ },
{ "", "", "bt.s <bdisp8>", "10001101i8p1....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"if (T) {",
" SET_NIP (PC + 4 + (SEXT (i) * 2));",
" cycles += 2;",
@@ -297,6 +490,8 @@ op tab[] =
"else",
"{",
" double fsum = 0;",
+ " if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)",
+ " RAISE_EXCEPTION (SIGILL);",
" /* FIXME: check for nans and infinities. */",
" fsum += FR (v1+0) * FR (v2+0);",
" fsum += FR (v1+1) * FR (v2+1);",
@@ -386,6 +581,18 @@ op tab[] =
" SET_FI (n, RLAT (R[m]));",
"}",
},
+ /* sh2a */
+ { "", "n", "fmov.s @(disp12,<REG_N>), <FREG_M>", "0011nnnnmmmm0001",
+ "/* and fmov.s <FREG_N>, @(disp12,<FREG_M>)",
+ " and mov.bwl <REG_N>, @(disp12,<REG_M>)",
+ " and mov.bwl @(disp12,<REG_N>),<REG_M>",
+ " and movu.bw @(disp12,<REG_N>),<REG_M>. */",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "int word2 = RIAT (nip);",
+ "SET_NIP (nip + 2); /* Consume 2 more bytes. */",
+ "MA (1);",
+ "do_long_move_insn (word2 & 0xf000, word2 & 0x0fff, m, n, &thislock);",
+ },
/* sh2e */
{ "m", "m", "fmov.s @<REG_M>+,<FREG_N>", "1111nnnnmmmm1001",
/* sh4 */
@@ -465,6 +672,8 @@ op tab[] =
{ "", "", "frchg", "1111101111111101",
"if (FPSCR_PR)",
" RAISE_EXCEPTION (SIGILL);",
+ "else if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)",
+ " RAISE_EXCEPTION (SIGILL);",
"else",
" SET_FPSCR (GET_FPSCR () ^ FPSCR_MASK_FR);",
},
@@ -473,6 +682,8 @@ op tab[] =
{ "", "", "fsca", "1111eeee11111101",
"if (FPSCR_PR)",
" RAISE_EXCEPTION (SIGILL);",
+ "else if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)",
+ " RAISE_EXCEPTION (SIGILL);",
"else",
" {",
" SET_FR (n, fsca_s (FPUL, &sin));",
@@ -494,6 +705,8 @@ op tab[] =
{ "", "", "fsrra <FREG_N>", "1111nnnn01111101",
"if (FPSCR_PR)",
" RAISE_EXCEPTION (SIGILL);",
+ "else if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)",
+ " RAISE_EXCEPTION (SIGILL);",
"else",
" SET_FR (n, fsrra_s (FR (n)));",
},
@@ -525,6 +738,8 @@ op tab[] =
" RAISE_EXCEPTION (SIGILL);",
"else",
"{",
+ " if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)",
+ " RAISE_EXCEPTION (SIGILL);",
" /* FIXME not implemented. */",
" printf (\"ftrv xmtrx, FV%d\\n\", v1);",
"}",
@@ -542,12 +757,14 @@ op tab[] =
},
{ "", "n", "jmp @<REG_N>", "0100nnnn00101011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_NIP (PT2H (R[n]));",
"cycles += 2;",
"Delay_Slot (PC + 2);",
},
{ "", "n", "jsr @<REG_N>", "0100nnnn00001011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"PR = PH2T (PC + 4);",
"if (~doprofile)",
" gotcall (PR, R[n]);",
@@ -555,6 +772,20 @@ op tab[] =
"cycles += 2;",
"Delay_Slot (PC + 2);",
},
+ { "", "n", "jsr/n @<REG_N>", "0100nnnn01001011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "PR = PH2T (PC + 2);",
+ "if (~doprofile)",
+ " gotcall (PR, R[n]);",
+ "SET_NIP (PT2H (R[n]));",
+ },
+ { "", "", "jsr/n @@(<disp>,TBR)", "10000011i8p4....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "PR = PH2T (PC + 2);",
+ "if (~doprofile)",
+ " gotcall (PR, i + TBR);",
+ "SET_NIP (PT2H (i + TBR));",
+ },
{ "", "n", "ldc <REG_N>,<CREG_M>", "0100nnnnmmmm1110",
"CREG (m) = R[n];",
@@ -579,6 +810,12 @@ op tab[] =
"else",
" RAISE_EXCEPTION (SIGILL); /* user mode */",
},
+ { "", "n", "ldc <REG_N>,TBR", "0100nnnn01001010",
+ "if (SR_MD)", /* FIXME? */
+ " TBR = R[n]; /* priv mode */",
+ "else",
+ " RAISE_EXCEPTION (SIGILL); /* user mode */",
+ },
{ "n", "n", "ldc.l @<REG_N>+,<CREG_M>", "0100nnnnmmmm0111",
"MA (1);",
"CREG (m) = RLAT (R[n]);",
@@ -673,6 +910,16 @@ op tab[] =
{ "n", "", "mov #<imm>,<REG_N>", "1110nnnni8*1....",
"R[n] = SEXT (i);",
},
+ { "n", "", "movi20 #<imm20>,<REG_N>", "0000nnnni8*10000",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "R[n] = ((i << 24) >> 12) | RIAT (nip);",
+ "SET_NIP (nip + 2); /* Consume 2 more bytes. */",
+ },
+ { "n", "", "movi20s #<imm20>,<REG_N>", "0000nnnni8*10001",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "R[n] = ((((i & 0xf0) << 24) >> 12) | RIAT (nip)) << 8;",
+ "SET_NIP (nip + 2); /* Consume 2 more bytes. */",
+ },
{ "n", "m", "mov <REG_M>,<REG_N>", "0110nnnnmmmm0011",
"R[n] = R[m];",
},
@@ -698,6 +945,12 @@ op tab[] =
"R[m] += 1;",
"L (n);",
},
+ { "0n", "n", "mov.b @-<REG_N>,R0", "0100nnnn11001011",
+ "MA (1);",
+ "R[n] -= 1;",
+ "R0 = RSBAT (R[n]);",
+ "L (0);",
+ },
{ "", "mn", "mov.b <REG_M>,@<REG_N>", "0010nnnnmmmm0000",
"MA (1);",
"WBAT (R[n], R[m]);",
@@ -719,6 +972,11 @@ op tab[] =
"R[n] -= 1;",
"WBAT (R[n], R[m]);",
},
+ { "n", "n0", "mov.b R0,@<REG_N>+", "0100nnnn10001011",
+ "MA (1);",
+ "WBAT (R[n], R0);",
+ "R[n] += 1;",
+ },
{ "n", "m", "mov.b @<REG_M>,<REG_N>", "0110nnnnmmmm0000",
"MA (1);",
"R[n] = RSBAT (R[m]);",
@@ -751,6 +1009,12 @@ op tab[] =
"R[m] += 4;",
"L (n);",
},
+ { "0n", "n", "mov.l @-<REG_N>,R0", "0100nnnn11101011",
+ "MA (1);",
+ "R[n] -= 4;",
+ "R0 = RLAT (R[n]);",
+ "L (0);",
+ },
{ "n", "m", "mov.l @<REG_M>,<REG_N>", "0110nnnnmmmm0010",
"MA (1);",
"R[n] = RLAT (R[m]);",
@@ -773,6 +1037,11 @@ op tab[] =
"R[n] -= 4;",
"WLAT (R[n], R[m]);",
},
+ { "n", "n0", "mov.l R0,@<REG_N>+", "0100nnnn10101011",
+ "MA (1) ;",
+ "WLAT (R[n], R0);",
+ "R[n] += 4;",
+ },
{ "", "nm", "mov.l <REG_M>,@<REG_N>", "0010nnnnmmmm0010",
"MA (1);",
"WLAT (R[n], R[m]);",
@@ -804,6 +1073,12 @@ op tab[] =
"R[m] += 2;",
"L (n);",
},
+ { "0n", "n", "mov.w @-<REG_N>,R0", "0100nnnn11011011",
+ "MA (1);",
+ "R[n] -= 2;",
+ "R0 = RSWAT (R[n]);",
+ "L (0);",
+ },
{ "n", "m", "mov.w @<REG_M>,<REG_N>", "0110nnnnmmmm0001",
"MA (1);",
"R[n] = RSWAT (R[m]);",
@@ -826,6 +1101,11 @@ op tab[] =
"R[n] -= 2;",
"WWAT (R[n], R[m]);",
},
+ { "n", "0n", "mov.w R0,@<REG_N>+", "0100nnnn10011011",
+ "MA (1);",
+ "WWAT (R[n], R0);",
+ "R[n] += 2;",
+ },
{ "", "nm", "mov.w <REG_M>,@<REG_N>", "0010nnnnmmmm0001",
"MA (1);",
"WWAT (R[n], R[m]);",
@@ -863,19 +1143,23 @@ op tab[] =
{ "n", "", "movt <REG_N>", "0000nnnn00101001",
"R[n] = T;",
},
-
+ { "", "", "movrt <REG_N>", "0000nnnn00111001",
+ "R[n] = (T == 0);",
+ },
{ "0", "n", "movua.l @<REG_N>,R0", "0100nnnn10101001",
"int regn = R[n];",
+ "int e = target_little_endian ? 3 : 0;",
"MA (1);",
- "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ",
- " (RBAT (regn + 2) << 8) + RBAT (regn + 3);",
+ "R[0] = (RBAT (regn + (0^e)) << 24) + (RBAT (regn + (1^e)) << 16) + ",
+ " (RBAT (regn + (2^e)) << 8) + RBAT (regn + (3^e));",
"L (0);",
},
{ "0n", "n", "movua.l @<REG_N>+,R0", "0100nnnn11101001",
"int regn = R[n];",
+ "int e = target_little_endian ? 3 : 0;",
"MA (1);",
- "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ",
- " (RBAT (regn + 2) << 8) + RBAT (regn + 3);",
+ "R[0] = (RBAT (regn + (0^e)) << 24) + (RBAT (regn + (1^e)) << 16) + ",
+ " (RBAT (regn + (2^e)) << 8) + RBAT (regn + (3^e));",
"R[n] += 4;",
"L (0);",
},
@@ -1002,6 +1286,7 @@ op tab[] =
"R[15] += 4;",
"Delay_Slot (PC + 2);",
#else
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_SR (SSR);",
"SET_NIP (PT2H (SPC));",
"cycles += 2;",
@@ -1010,10 +1295,21 @@ op tab[] =
},
{ "", "", "rts", "0000000000001011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_NIP (PT2H (PR));",
"cycles += 2;",
"Delay_Slot (PC + 2);",
},
+ { "", "", "rts/n", "0000000001101011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "SET_NIP (PT2H (PR));",
+ },
+ { "0", "n", "rtv/n <REG_N>", "0000nnnn01111011",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
+ "R0 = R[n];",
+ "L (0);",
+ "SET_NIP (PT2H (PR));",
+ },
/* sh4a */
{ "", "", "setdmx", "0000000010011000",
@@ -1054,7 +1350,7 @@ op tab[] =
},
{ "n", "mn", "shad <REG_M>,<REG_N>", "0100nnnnmmmm1100",
- "R[n] = (R[m] < 0) ? (R[n] >> ((-R[m])&0x1f)) : (R[n] << (R[m] & 0x1f));",
+ "R[n] = (R[m] < 0) ? (R[m]&0x1f ? R[n] >> ((-R[m])&0x1f) : R[n] >> 31) : (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shal <REG_N>", "0100nnnn00100000",
@@ -1068,7 +1364,7 @@ op tab[] =
},
{ "n", "mn", "shld <REG_M>,<REG_N>", "0100nnnnmmmm1101",
- "R[n] = (R[m] < 0) ? (UR[n] >> ((-R[m])&0x1f)): (R[n] << (R[m] & 0x1f));",
+ "R[n] = (R[m] < 0) ? (R[m]&0x1f ? UR[n] >> ((-R[m])&0x1f) : 0): (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shll <REG_N>", "0100nnnn00000000",
@@ -1121,6 +1417,12 @@ op tab[] =
"else",
" RAISE_EXCEPTION (SIGILL); /* user mode */",
},
+ { "n", "", "stc TBR,<REG_N>", "0000nnnn01001010",
+ "if (SR_MD)", /* FIXME? */
+ " R[n] = TBR; /* priv mode */",
+ "else",
+ " RAISE_EXCEPTION (SIGILL); /* user mode */",
+ },
{ "n", "n", "stc.l <CREG_M>,@-<REG_N>", "0100nnnnmmmm0011",
"MA (1);",
"R[n] -= 4;",
@@ -1191,6 +1493,7 @@ op tab[] =
},
{ "0", "", "trapa #<imm>", "11000011i8*1....",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"long imm = 0xff & i;",
"if (i < 20 || i == 33 || i == 34 || i == 0xc3)",
" nip += trap (i, &R0, PC, memory, maskl, maskw, endianw);",
@@ -1515,8 +1818,9 @@ op movsxy_tab[] =
"/* nop */",
},
{ "", "", "ppi", "1111100000000000",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"ppi_insn (RIAT (nip));",
- "nip += 2;",
+ "SET_NIP (nip + 2);",
"iword &= 0xf7ff; goto top;",
},
#endif
@@ -2267,6 +2571,58 @@ gengastab ()
static unsigned short table[1 << 16];
+static int warn_conflicts = 0;
+
+static void
+conflict_warn (val, i)
+ int val;
+ int i;
+{
+ int ix, key;
+ int j = table[val];
+
+ fprintf (stderr, "Warning: opcode table conflict: 0x%04x (idx %d && %d)\n",
+ val, i, table[val]);
+
+ for (ix = sizeof (tab) / sizeof (tab[0]); ix >= 0; ix--)
+ if (tab[ix].index == i || tab[ix].index == j)
+ {
+ key = ((tab[ix].code[0] - '0') << 3) +
+ ((tab[ix].code[1] - '0') << 2) +
+ ((tab[ix].code[2] - '0') << 1) +
+ ((tab[ix].code[3] - '0'));
+
+ if (val >> 12 == key)
+ fprintf (stderr, " %s -- %s\n", tab[ix].code, tab[ix].name);
+ }
+
+ for (ix = sizeof (movsxy_tab) / sizeof (movsxy_tab[0]); ix >= 0; ix--)
+ if (movsxy_tab[ix].index == i || movsxy_tab[ix].index == j)
+ {
+ key = ((movsxy_tab[ix].code[0] - '0') << 3) +
+ ((movsxy_tab[ix].code[1] - '0') << 2) +
+ ((movsxy_tab[ix].code[2] - '0') << 1) +
+ ((movsxy_tab[ix].code[3] - '0'));
+
+ if (val >> 12 == key)
+ fprintf (stderr, " %s -- %s\n",
+ movsxy_tab[ix].code, movsxy_tab[ix].name);
+ }
+
+ for (ix = sizeof (ppi_tab) / sizeof (ppi_tab[0]); ix >= 0; ix--)
+ if (ppi_tab[ix].index == i || ppi_tab[ix].index == j)
+ {
+ key = ((ppi_tab[ix].code[0] - '0') << 3) +
+ ((ppi_tab[ix].code[1] - '0') << 2) +
+ ((ppi_tab[ix].code[2] - '0') << 1) +
+ ((ppi_tab[ix].code[3] - '0'));
+
+ if (val >> 12 == key)
+ fprintf (stderr, " %s -- %s\n",
+ ppi_tab[ix].code, ppi_tab[ix].name);
+ }
+}
+
/* Take an opcode, expand all varying fields in it out and fill all the
right entries in 'table' with the opcode index. */
@@ -2278,6 +2634,8 @@ expand_opcode (val, i, s)
{
if (*s == 0)
{
+ if (warn_conflicts && table[val] != 0)
+ conflict_warn (val, i);
table[val] = i;
}
else
@@ -2599,6 +2957,12 @@ gensim_caselist (p)
switch (s[1])
{
+ default:
+ fprintf (stderr,
+ "gensim_caselist: Unknown char '%c' in %s\n",
+ s[1], s);
+ exit (1);
+ break;
case '4':
printf ("f");
break;
@@ -2607,7 +2971,6 @@ gensim_caselist (p)
break;
case '1':
sextbit = 12;
-
printf ("fff");
break;
}
@@ -2615,6 +2978,14 @@ gensim_caselist (p)
switch (s[3])
{
+ default:
+ fprintf (stderr,
+ "gensim_caselist: Unknown char '%c' in %s\n",
+ s[3], s);
+ exit (1);
+ break;
+ case '.': /* eg. "i12." */
+ break;
case '1':
break;
case '2':
@@ -2646,6 +3017,25 @@ gensim_caselist (p)
char *r;
for (r = p->refs; *r; r++)
{
+ if (*r == 'f') printf (" CREF (15);\n");
+ if (*r == '-')
+ {
+ printf (" {\n");
+ printf (" int i = n;\n");
+ printf (" do {\n");
+ printf (" CREF (i);\n");
+ printf (" } while (i-- > 0);\n");
+ printf (" }\n");
+ }
+ if (*r == '+')
+ {
+ printf (" {\n");
+ printf (" int i = n;\n");
+ printf (" do {\n");
+ printf (" CREF (i);\n");
+ printf (" } while (i++ < 14);\n");
+ printf (" }\n");
+ }
if (*r == '0') printf (" CREF (0);\n");
if (*r == '8') printf (" CREF (8);\n");
if (*r == '9') printf (" CREF (9);\n");
@@ -2669,9 +3059,28 @@ gensim_caselist (p)
char *r;
for (r = p->defs; *r; r++)
{
- if (*r == '0') printf(" CDEF (0);\n");
- if (*r == 'n') printf(" CDEF (n);\n");
- if (*r == 'm') printf(" CDEF (m);\n");
+ if (*r == 'f') printf (" CDEF (15);\n");
+ if (*r == '-')
+ {
+ printf (" {\n");
+ printf (" int i = n;\n");
+ printf (" do {\n");
+ printf (" CDEF (i);\n");
+ printf (" } while (i-- > 0);\n");
+ printf (" }\n");
+ }
+ if (*r == '+')
+ {
+ printf (" {\n");
+ printf (" int i = n;\n");
+ printf (" do {\n");
+ printf (" CDEF (i);\n");
+ printf (" } while (i++ < 14);\n");
+ printf (" }\n");
+ }
+ if (*r == '0') printf (" CDEF (0);\n");
+ if (*r == 'n') printf (" CDEF (n);\n");
+ if (*r == 'm') printf (" CDEF (m);\n");
}
}
@@ -2757,6 +3166,9 @@ expand_ppi_code (val, i, s)
break;
case 'g':
case 'z':
+ if (warn_conflicts && table[val] != 0)
+ conflict_warn (val, i);
+
/* The last four bits are disregarded for the switch table. */
table[val] = i;
return;
@@ -2992,6 +3404,10 @@ main (ac, av)
/* Now generate the requested data. */
if (ac > 1)
{
+ if (ac > 2 && strcmp (av[2], "-w") == 0)
+ {
+ warn_conflicts = 1;
+ }
if (strcmp (av[1], "-t") == 0)
{
gengastab ();
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index b7c77799447..5d4a4f558ae 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -65,6 +65,11 @@ int sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size);
for a quit. */
#define POLL_QUIT_INTERVAL 0x60000
+typedef struct
+{
+ int regs[20];
+} regstacktype;
+
typedef union
{
@@ -123,6 +128,9 @@ typedef union
int dbr; /* debug base register */
int sgr; /* saved gr15 */
int ldst; /* load/store flag (boolean) */
+ int tbr;
+ int ibcr; /* sh2a bank control register */
+ int ibnr; /* sh2a bank number register */
} named;
int i[16];
} cregs;
@@ -152,6 +160,8 @@ typedef union
unsigned char *ymem;
unsigned char *xmem_offset;
unsigned char *ymem_offset;
+ unsigned long bfd_mach;
+ regstacktype *regstack;
}
asregs;
int asints[40];
@@ -175,6 +185,7 @@ static int maskl = 0;
static SIM_OPEN_KIND sim_kind;
static char *myname;
+static int tracing = 0;
/* Short hand definitions of the registers */
@@ -191,6 +202,11 @@ static char *myname;
#define GBR saved_state.asregs.cregs.named.gbr
#define VBR saved_state.asregs.cregs.named.vbr
#define DBR saved_state.asregs.cregs.named.dbr
+#define TBR saved_state.asregs.cregs.named.tbr
+#define IBCR saved_state.asregs.cregs.named.ibcr
+#define IBNR saved_state.asregs.cregs.named.ibnr
+#define BANKN (saved_state.asregs.cregs.named.ibnr & 0x1ff)
+#define ME ((saved_state.asregs.cregs.named.ibnr >> 14) & 0x3)
#define SSR saved_state.asregs.cregs.named.ssr
#define SPC saved_state.asregs.cregs.named.spc
#define SGR saved_state.asregs.cregs.named.sgr
@@ -213,6 +229,8 @@ static char *myname;
/* Manipulate SR */
+#define SR_MASK_BO (1 << 14)
+#define SR_MASK_CS (1 << 13)
#define SR_MASK_DMY (1 << 11)
#define SR_MASK_DMX (1 << 10)
#define SR_MASK_M (1 << 9)
@@ -227,6 +245,8 @@ static char *myname;
#define SR_MASK_RC 0x0fff0000
#define SR_RC_INCREMENT -0x00010000
+#define BO ((saved_state.asregs.cregs.named.sr & SR_MASK_BO) != 0)
+#define CS ((saved_state.asregs.cregs.named.sr & SR_MASK_CS) != 0)
#define M ((saved_state.asregs.cregs.named.sr & SR_MASK_M) != 0)
#define Q ((saved_state.asregs.cregs.named.sr & SR_MASK_Q) != 0)
#define S ((saved_state.asregs.cregs.named.sr & SR_MASK_S) != 0)
@@ -249,6 +269,16 @@ do { \
saved_state.asregs.cregs.named.sr &= ~(BIT); \
} while (0)
+#define SET_SR_BO(EXP) SET_SR_BIT ((EXP), SR_MASK_BO)
+#define SET_SR_CS(EXP) SET_SR_BIT ((EXP), SR_MASK_CS)
+#define SET_BANKN(EXP) \
+do { \
+ IBNR = (IBNR & 0xfe00) | (EXP & 0x1f); \
+} while (0)
+#define SET_ME(EXP) \
+do { \
+ IBNR = (IBNR & 0x3fff) | ((EXP & 0x3) << 14); \
+} while (0)
#define SET_SR_M(EXP) SET_SR_BIT ((EXP), SR_MASK_M)
#define SET_SR_Q(EXP) SET_SR_BIT ((EXP), SR_MASK_Q)
#define SET_SR_S(EXP) SET_SR_BIT ((EXP), SR_MASK_S)
@@ -323,6 +353,9 @@ fail ()
#define RAISE_EXCEPTION(x) \
(saved_state.asregs.exception = x, saved_state.asregs.insn_end = 0)
+#define RAISE_EXCEPTION_IF_IN_DELAY_SLOT() \
+ if (in_delay_slot) RAISE_EXCEPTION (SIGILL)
+
/* This function exists mainly for the purpose of setting a breakpoint to
catch simulated bus errors when running the simulator under GDB. */
@@ -780,7 +813,8 @@ process_rbat_addr (addr)
#define SET_NIP(x) nip = (x); CHECK_INSN_PTR (nip);
-#define Delay_Slot(TEMPPC) iword = RIAT (TEMPPC); goto top;
+static int in_delay_slot = 0;
+#define Delay_Slot(TEMPPC) iword = RIAT (TEMPPC); in_delay_slot = 1; goto top;
#define CHECK_INSN_PTR(p) \
do { \
@@ -1181,6 +1215,12 @@ trap (i, regs, insn_ptr, memory, maskl, maskw, endianw)
}
break;
+ case 13: /* Set IBNR */
+ IBNR = regs[0] & 0xffff;
+ break;
+ case 14: /* Set IBCR */
+ IBCR = regs[0] & 0xffff;
+ break;
case 0xc3:
case 255:
raise_exception (SIGTRAP);
@@ -1419,32 +1459,140 @@ macl (regs, memory, n, m)
MACH = mach;
}
-
-/* GET_LOOP_BOUNDS {EXTENDED}
- These two functions compute the actual starting and ending point
- of the repeat loop, based on the RS and RE registers (repeat start,
- repeat stop). The extended version is called for LDRC, and the
- regular version is called for SETRC. The difference is that for
- LDRC, the loop start and end instructions are literally the ones
- pointed to by RS and RE -- for SETRC, they're not (see docs). */
-
-static struct loop_bounds
-get_loop_bounds_ext (rs, re, memory, mem_end, maskw, endianw)
- int rs, re;
- unsigned char *memory, *mem_end;
- int maskw, endianw;
+enum {
+ B_BCLR = 0,
+ B_BSET = 1,
+ B_BST = 2,
+ B_BLD = 3,
+ B_BAND = 4,
+ B_BOR = 5,
+ B_BXOR = 6,
+ B_BLDNOT = 11,
+ B_BANDNOT = 12,
+ B_BORNOT = 13,
+
+ MOVB_RM = 0x0000,
+ MOVW_RM = 0x1000,
+ MOVL_RM = 0x2000,
+ FMOV_RM = 0x3000,
+ MOVB_MR = 0x4000,
+ MOVW_MR = 0x5000,
+ MOVL_MR = 0x6000,
+ FMOV_MR = 0x7000,
+ MOVU_BMR = 0x8000,
+ MOVU_WMR = 0x9000,
+};
+
+/* Do extended displacement move instructions. */
+void
+do_long_move_insn (int op, int disp12, int m, int n, int *thatlock)
{
- struct loop_bounds loop;
-
- /* FIXME: should I verify RS < RE? */
- loop.start = PT2H (RS); /* FIXME not using the params? */
- loop.end = PT2H (RE & ~1); /* Ignore bit 0 of RE. */
- SKIP_INSN (loop.end);
- if (loop.end >= mem_end)
- loop.end = PT2H (0);
- return loop;
+ int memstalls = 0;
+ int thislock = *thatlock;
+ int endianw = global_endianw;
+ int *R = &(saved_state.asregs.regs[0]);
+ unsigned char *memory = saved_state.asregs.memory;
+ int maskb = ~((saved_state.asregs.msize - 1) & ~0);
+ unsigned char *insn_ptr = PT2H (saved_state.asregs.pc);
+
+ switch (op) {
+ case MOVB_RM: /* signed */
+ WBAT (disp12 * 1 + R[n], R[m]);
+ break;
+ case MOVW_RM:
+ WWAT (disp12 * 2 + R[n], R[m]);
+ break;
+ case MOVL_RM:
+ WLAT (disp12 * 4 + R[n], R[m]);
+ break;
+ case FMOV_RM: /* floating point */
+ if (FPSCR_SZ)
+ {
+ MA (1);
+ WDAT (R[n] + 8 * disp12, m);
+ }
+ else
+ WLAT (R[n] + 4 * disp12, FI (m));
+ break;
+ case MOVB_MR:
+ R[n] = RSBAT (disp12 * 1 + R[m]);
+ L (n);
+ break;
+ case MOVW_MR:
+ R[n] = RSWAT (disp12 * 2 + R[m]);
+ L (n);
+ break;
+ case MOVL_MR:
+ R[n] = RLAT (disp12 * 4 + R[m]);
+ L (n);
+ break;
+ case FMOV_MR:
+ if (FPSCR_SZ) {
+ MA (1);
+ RDAT (R[m] + 8 * disp12, n);
+ }
+ else
+ SET_FI (n, RLAT (R[m] + 4 * disp12));
+ break;
+ case MOVU_BMR: /* unsigned */
+ R[n] = RBAT (disp12 * 1 + R[m]);
+ L (n);
+ break;
+ case MOVU_WMR:
+ R[n] = RWAT (disp12 * 2 + R[m]);
+ L (n);
+ break;
+ default:
+ RAISE_EXCEPTION (SIGINT);
+ exit (1);
+ }
+ saved_state.asregs.memstalls += memstalls;
+ *thatlock = thislock;
}
+/* Do binary logical bit-manipulation insns. */
+void
+do_blog_insn (int imm, int addr, int binop,
+ unsigned char *memory, int maskb)
+{
+ int oldval = RBAT (addr);
+
+ switch (binop) {
+ case B_BCLR: /* bclr.b */
+ WBAT (addr, oldval & ~imm);
+ break;
+ case B_BSET: /* bset.b */
+ WBAT (addr, oldval | imm);
+ break;
+ case B_BST: /* bst.b */
+ if (T)
+ WBAT (addr, oldval | imm);
+ else
+ WBAT (addr, oldval & ~imm);
+ break;
+ case B_BLD: /* bld.b */
+ SET_SR_T ((oldval & imm) != 0);
+ break;
+ case B_BAND: /* band.b */
+ SET_SR_T (T && ((oldval & imm) != 0));
+ break;
+ case B_BOR: /* bor.b */
+ SET_SR_T (T || ((oldval & imm) != 0));
+ break;
+ case B_BXOR: /* bxor.b */
+ SET_SR_T (T ^ ((oldval & imm) != 0));
+ break;
+ case B_BLDNOT: /* bldnot.b */
+ SET_SR_T ((oldval & imm) == 0);
+ break;
+ case B_BANDNOT: /* bandnot.b */
+ SET_SR_T (T && ((oldval & imm) == 0));
+ break;
+ case B_BORNOT: /* bornot.b */
+ SET_SR_T (T || ((oldval & imm) == 0));
+ break;
+ }
+}
float
fsca_s (int in, double (*f) (double))
{
@@ -1494,6 +1642,32 @@ fsrra_s (float in)
return upper - result >= result - lower ? upper : lower;
}
+
+/* GET_LOOP_BOUNDS {EXTENDED}
+ These two functions compute the actual starting and ending point
+ of the repeat loop, based on the RS and RE registers (repeat start,
+ repeat stop). The extended version is called for LDRC, and the
+ regular version is called for SETRC. The difference is that for
+ LDRC, the loop start and end instructions are literally the ones
+ pointed to by RS and RE -- for SETRC, they're not (see docs). */
+
+static struct loop_bounds
+get_loop_bounds_ext (rs, re, memory, mem_end, maskw, endianw)
+ int rs, re;
+ unsigned char *memory, *mem_end;
+ int maskw, endianw;
+{
+ struct loop_bounds loop;
+
+ /* FIXME: should I verify RS < RE? */
+ loop.start = PT2H (RS); /* FIXME not using the params? */
+ loop.end = PT2H (RE & ~1); /* Ignore bit 0 of RE. */
+ SKIP_INSN (loop.end);
+ if (loop.end >= mem_end)
+ loop.end = PT2H (0);
+ return loop;
+}
+
static struct loop_bounds
get_loop_bounds (rs, re, memory, mem_end, maskw, endianw)
int rs, re;
@@ -1607,8 +1781,10 @@ init_dsp (abfd)
saved_state.asregs.xyram_select = new_select;
free (saved_state.asregs.xmem);
free (saved_state.asregs.ymem);
- saved_state.asregs.xmem = (unsigned char *) calloc (1, ram_area_size);
- saved_state.asregs.ymem = (unsigned char *) calloc (1, ram_area_size);
+ saved_state.asregs.xmem =
+ (unsigned char *) calloc (1, ram_area_size);
+ saved_state.asregs.ymem =
+ (unsigned char *) calloc (1, ram_area_size);
/* Disable use of X / Y mmeory if not allocated. */
if (! saved_state.asregs.xmem || ! saved_state.asregs.ymem)
@@ -1642,6 +1818,10 @@ init_dsp (abfd)
saved_state.asregs.yram_start = 1;
}
+ if (saved_state.asregs.regstack == NULL)
+ saved_state.asregs.regstack =
+ calloc (512, sizeof *saved_state.asregs.regstack);
+
if (target_dsp != was_dsp)
{
int i, tmp;
@@ -1741,7 +1921,11 @@ sim_resume (sd, step, siggnal)
register int memstalls = 0;
register int insts = 0;
register int prevlock;
+#if 1
+ int thislock;
+#else
register int thislock;
+#endif
register unsigned int doprofile;
register int pollcount = 0;
/* endianw is used for every insn fetch, hence it makes sense to cache it.
@@ -1820,10 +2004,13 @@ sim_resume (sd, step, siggnal)
insts++;
#endif
top:
+ if (tracing)
+ fprintf (stderr, "PC: %08x, insn: %04x\n", PH2T (insn_ptr), iword);
#include "code.c"
+ in_delay_slot = 0;
insn_ptr = nip;
if (--pollcount < 0)
@@ -1940,6 +2127,15 @@ sim_read (sd, addr, buffer, size)
return size;
}
+static int gdb_bank_number;
+enum {
+ REGBANK_MACH = 15,
+ REGBANK_IVN = 16,
+ REGBANK_PR = 17,
+ REGBANK_GBR = 18,
+ REGBANK_MACL = 19
+};
+
int
sim_store_register (sd, rn, memory, length)
SIM_DESC sd;
@@ -2050,6 +2246,12 @@ sim_store_register (sd, rn, memory, length)
case SIM_SH_R2_BANK0_REGNUM: case SIM_SH_R3_BANK0_REGNUM:
case SIM_SH_R4_BANK0_REGNUM: case SIM_SH_R5_BANK0_REGNUM:
case SIM_SH_R6_BANK0_REGNUM: case SIM_SH_R7_BANK0_REGNUM:
+ if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)
+ {
+ rn -= SIM_SH_R0_BANK0_REGNUM;
+ saved_state.asregs.regstack[gdb_bank_number].regs[rn] = val;
+ }
+ else
if (SR_MD && SR_RB)
Rn_BANK (rn - SIM_SH_R0_BANK0_REGNUM) = val;
else
@@ -2059,6 +2261,12 @@ sim_store_register (sd, rn, memory, length)
case SIM_SH_R2_BANK1_REGNUM: case SIM_SH_R3_BANK1_REGNUM:
case SIM_SH_R4_BANK1_REGNUM: case SIM_SH_R5_BANK1_REGNUM:
case SIM_SH_R6_BANK1_REGNUM: case SIM_SH_R7_BANK1_REGNUM:
+ if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)
+ {
+ rn -= SIM_SH_R0_BANK1_REGNUM;
+ saved_state.asregs.regstack[gdb_bank_number].regs[rn + 8] = val;
+ }
+ else
if (SR_MD && SR_RB)
saved_state.asregs.regs[rn - SIM_SH_R0_BANK1_REGNUM] = val;
else
@@ -2070,6 +2278,35 @@ sim_store_register (sd, rn, memory, length)
case SIM_SH_R6_BANK_REGNUM: case SIM_SH_R7_BANK_REGNUM:
SET_Rn_BANK (rn - SIM_SH_R0_BANK_REGNUM, val);
break;
+ case SIM_SH_TBR_REGNUM:
+ TBR = val;
+ break;
+ case SIM_SH_IBNR_REGNUM:
+ IBNR = val;
+ break;
+ case SIM_SH_IBCR_REGNUM:
+ IBCR = val;
+ break;
+ case SIM_SH_BANK_REGNUM:
+ /* This is a pseudo-register maintained just for gdb.
+ It tells us what register bank gdb would like to read/write. */
+ gdb_bank_number = val;
+ break;
+ case SIM_SH_BANK_MACL_REGNUM:
+ saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_MACL] = val;
+ break;
+ case SIM_SH_BANK_GBR_REGNUM:
+ saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_GBR] = val;
+ break;
+ case SIM_SH_BANK_PR_REGNUM:
+ saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_PR] = val;
+ break;
+ case SIM_SH_BANK_IVN_REGNUM:
+ saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_IVN] = val;
+ break;
+ case SIM_SH_BANK_MACH_REGNUM:
+ saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_MACH] = val;
+ break;
default:
return 0;
}
@@ -2185,6 +2422,12 @@ sim_fetch_register (sd, rn, memory, length)
case SIM_SH_R2_BANK0_REGNUM: case SIM_SH_R3_BANK0_REGNUM:
case SIM_SH_R4_BANK0_REGNUM: case SIM_SH_R5_BANK0_REGNUM:
case SIM_SH_R6_BANK0_REGNUM: case SIM_SH_R7_BANK0_REGNUM:
+ if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)
+ {
+ rn -= SIM_SH_R0_BANK0_REGNUM;
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[rn];
+ }
+ else
val = (SR_MD && SR_RB
? Rn_BANK (rn - SIM_SH_R0_BANK0_REGNUM)
: saved_state.asregs.regs[rn - SIM_SH_R0_BANK0_REGNUM]);
@@ -2193,6 +2436,12 @@ sim_fetch_register (sd, rn, memory, length)
case SIM_SH_R2_BANK1_REGNUM: case SIM_SH_R3_BANK1_REGNUM:
case SIM_SH_R4_BANK1_REGNUM: case SIM_SH_R5_BANK1_REGNUM:
case SIM_SH_R6_BANK1_REGNUM: case SIM_SH_R7_BANK1_REGNUM:
+ if (saved_state.asregs.bfd_mach == bfd_mach_sh2a)
+ {
+ rn -= SIM_SH_R0_BANK1_REGNUM;
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[rn + 8];
+ }
+ else
val = (! SR_MD || ! SR_RB
? Rn_BANK (rn - SIM_SH_R0_BANK1_REGNUM)
: saved_state.asregs.regs[rn - SIM_SH_R0_BANK1_REGNUM]);
@@ -2203,6 +2452,35 @@ sim_fetch_register (sd, rn, memory, length)
case SIM_SH_R6_BANK_REGNUM: case SIM_SH_R7_BANK_REGNUM:
val = Rn_BANK (rn - SIM_SH_R0_BANK_REGNUM);
break;
+ case SIM_SH_TBR_REGNUM:
+ val = TBR;
+ break;
+ case SIM_SH_IBNR_REGNUM:
+ val = IBNR;
+ break;
+ case SIM_SH_IBCR_REGNUM:
+ val = IBCR;
+ break;
+ case SIM_SH_BANK_REGNUM:
+ /* This is a pseudo-register maintained just for gdb.
+ It tells us what register bank gdb would like to read/write. */
+ val = gdb_bank_number;
+ break;
+ case SIM_SH_BANK_MACL_REGNUM:
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_MACL];
+ break;
+ case SIM_SH_BANK_GBR_REGNUM:
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_GBR];
+ break;
+ case SIM_SH_BANK_PR_REGNUM:
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_PR];
+ break;
+ case SIM_SH_BANK_IVN_REGNUM:
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_IVN];
+ break;
+ case SIM_SH_BANK_MACH_REGNUM:
+ val = saved_state.asregs.regstack[gdb_bank_number].regs[REGBANK_MACH];
+ break;
default:
return 0;
}
@@ -2214,7 +2492,10 @@ int
sim_trace (sd)
SIM_DESC sd;
{
- return 0;
+ tracing = 1;
+ sim_resume (sd, 0, 0);
+ tracing = 0;
+ return 1;
}
void
@@ -2381,6 +2662,15 @@ sim_load (sd, prog, abfd, from_tty)
prog_bfd = sim_load_file (sd, myname, callback, prog, abfd,
sim_kind == SIM_OPEN_DEBUG,
0, sim_write);
+
+ /* Set the bfd machine type. */
+ if (prog_bfd)
+ saved_state.asregs.bfd_mach = bfd_get_mach (prog_bfd);
+ else if (abfd)
+ saved_state.asregs.bfd_mach = bfd_get_mach (abfd);
+ else
+ saved_state.asregs.bfd_mach = 0;
+
if (prog_bfd == NULL)
return SIM_RC_FAIL;
if (abfd == NULL)
@@ -2403,6 +2693,10 @@ sim_create_inferior (sd, prog_bfd, argv, env)
if (prog_bfd != NULL)
saved_state.asregs.pc = bfd_get_start_address (prog_bfd);
+ /* Set the bfd machine type. */
+ if (prog_bfd != NULL)
+ saved_state.asregs.bfd_mach = bfd_get_mach (prog_bfd);
+
/* Record the program's arguments. */
prog_argv = argv;
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index d41671f8ac5..7200d39fbed 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,11 +1,12 @@
-2004-03-29 Richard Sandiford <rsandifo@redhat.com>
-
- * sim/mips/hilo-hazard-[123].s: New files.
- * sim/mips/basic.exp (run_hilo_test): New procedure.
- (models): Only list models that are included in the configuration.
- (submodels): New variable, set to submodels of the above.
- (mips64vr-*-elf, mips64vrel-*-elf): New configuration stanza.
- Run hilo-hazard-[123].s.
+2004-09-13 DJ Delorie <dj@redhat.com>
+
+ * lib/sim-defs.exp (run_sim_test): Add global_as_options,
+ global_ld_options, and global_sim_options to all test cases, if
+ defined.
+
+2004-05-12 Ben Elliston <bje@au.ibm.com>
+
+ * lib/sim-defs.exp: Remove stray semicolons.
2004-03-01 Richard Sandiford <rsandifo@redhat.com>
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index e75571760ad..6a88b9c510f 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -93,7 +93,7 @@ proc sim_run { prog sim_opts prog_opts redir options } {
set prog [remote_download host $prog]
if { $prog == "" } {
error "download failed"
- return -1;
+ return -1
}
}
@@ -165,6 +165,9 @@ proc run_sim_test { name requested_machs } {
global SIMFLAGS
global opts
global cpu_option
+ global global_as_options
+ global global_ld_options
+ global global_sim_options
if [string match "*/*" $name] {
set file $name
@@ -187,6 +190,16 @@ proc run_sim_test { name requested_machs } {
set opts(timeout) ""
set opts(xerror) "no"
+ if ![info exists global_as_options] {
+ set global_as_options ""
+ }
+ if ![info exists global_ld_options] {
+ set global_ld_options ""
+ }
+ if ![info exists global_sim_options] {
+ set global_sim_options ""
+ }
+
# Clear any machine specific options specified in a previous test case
foreach m $requested_machs {
if [info exists opts(as,$m)] {
@@ -250,7 +263,7 @@ proc run_sim_test { name requested_machs } {
if [info exists cpu_option] {
set as_options "$as_options $cpu_option=$mach"
}
- set comp_output [target_assemble $sourcefile ${name}.o "$as_options"]
+ set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
@@ -262,7 +275,7 @@ proc run_sim_test { name requested_machs } {
set opts(ld,$mach) $opts(ld)
}
- set comp_output [target_link ${name}.o ${name}.x "$opts(ld,$mach)"]
+ set comp_output [target_link ${name}.o ${name}.x "$opts(ld,$mach) $global_ld_options"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
@@ -281,7 +294,7 @@ proc run_sim_test { name requested_machs } {
set options "$options timeout=$opts(timeout)"
}
- set result [sim_run ${name}.x "$opts(sim,$mach)" "" "" "$options"]
+ set result [sim_run ${name}.x "$opts(sim,$mach) $global_sim_options" "" "" "$options"]
set status [lindex $result 0]
set output [lindex $result 1]
diff --git a/sim/testsuite/sim/h8300/ChangeLog b/sim/testsuite/sim/h8300/ChangeLog
index 4dc65595ebe..21c02663820 100644
--- a/sim/testsuite/sim/h8300/ChangeLog
+++ b/sim/testsuite/sim/h8300/ChangeLog
@@ -1,3 +1,16 @@
+2004-06-28 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-07-22 Michael Snyder <msnyder@redhat.com>
+ * mul.s: Don't try to use negative immediate (it's always
+ unsigned).
+ * div.s: Ditto.
+
+2004-06-24 Alexandre Oliva <aoliva@redhat.com>
+
+ 2004-06-17 Alexandre Oliva <aoliva@redhat.com>
+ * band.s, biand.s: imm3_abs16 is not available on h8300h.
+ * bset.s: Likewise. Ditto for rn_abs32.
+
2003-07-22 Michael Snyder <msnyder@redhat.com>
* cmpw.s: Add test for less-than-zero immediate.
diff --git a/sim/testsuite/sim/h8300/band.s b/sim/testsuite/sim/h8300/band.s
index f3455ad4cb8..3c7e5a3aa4e 100644
--- a/sim/testsuite/sim/h8300/band.s
+++ b/sim/testsuite/sim/h8300/band.s
@@ -104,7 +104,7 @@ band_imm3_abs8:
test_grs_a5a5 ; general registers should not be changed.
-.if (sim_cpu) ; non-zero means not h8300
+.if (sim_cpu > h8300h)
band_imm3_abs16:
set_grs_a5a5
set_ccr_zero
@@ -314,7 +314,7 @@ bld_imm3_abs8:
test_grs_a5a5 ; general registers should not be changed.
-.if (sim_cpu) ; non-zero means not h8300
+.if (sim_cpu > h8300h)
bld_imm3_abs16:
set_grs_a5a5
set_ccr_zero
@@ -491,7 +491,7 @@ btst_imm3_abs8:
test_grs_a5a5 ; general registers should not be changed.
-.if (sim_cpu) ; non-zero means not h8300
+.if (sim_cpu > h8300h)
btst_imm3_abs16:
set_grs_a5a5
set_ccr_zero
diff --git a/sim/testsuite/sim/h8300/biand.s b/sim/testsuite/sim/h8300/biand.s
index 07d3ecfe044..c4cf285dbd0 100644
--- a/sim/testsuite/sim/h8300/biand.s
+++ b/sim/testsuite/sim/h8300/biand.s
@@ -104,7 +104,7 @@ biand_imm3_abs8:
test_grs_a5a5 ; general registers should not be changed.
-.if (sim_cpu) ; non-zero means not h8300
+.if (sim_cpu > h8300h)
biand_imm3_abs16:
set_grs_a5a5
set_ccr_zero
@@ -314,7 +314,7 @@ bild_imm3_abs8:
test_grs_a5a5 ; general registers should not be changed.
-.if (sim_cpu) ; non-zero means not h8300
+.if (sim_cpu > h8300h)
bild_imm3_abs16:
set_grs_a5a5
set_ccr_zero
diff --git a/sim/testsuite/sim/h8300/bset.s b/sim/testsuite/sim/h8300/bset.s
index a94e916b26c..0e16fc1f9d2 100644
--- a/sim/testsuite/sim/h8300/bset.s
+++ b/sim/testsuite/sim/h8300/bset.s
@@ -263,6 +263,7 @@ bclr_imm3_ind:
test_gr_a5a5 6
test_gr_a5a5 7
+.if (sim_cpu > h8300h)
bset_imm3_abs16:
set_grs_a5a5 ; Fill all general regs with a fixed pattern
@@ -383,6 +384,7 @@ bclr_imm3_abs16:
test_gr_a5a5 6
test_gr_a5a5 7
.endif
+.endif
bset_rs8_rd8:
set_grs_a5a5 ; Fill all general regs with a fixed pattern
@@ -644,6 +646,7 @@ bclr_rs8_ind:
test_gr_a5a5 6
test_gr_a5a5 7
+.if (sim_cpu > h8300h)
bset_rs8_abs32:
set_grs_a5a5 ; Fill all general regs with a fixed pattern
@@ -780,6 +783,7 @@ bclr_rs8_abs32:
test_gr_a5a5 6
test_gr_a5a5 7
.endif
+.endif
.if (sim_cpu == h8sx)
bset_eq_imm3_abs16:
diff --git a/sim/testsuite/sim/h8300/div.s b/sim/testsuite/sim/h8300/div.s
index 518b62f9523..fd53bafa62c 100644
--- a/sim/testsuite/sim/h8300/div.s
+++ b/sim/testsuite/sim/h8300/div.s
@@ -41,9 +41,9 @@ divs_w_imm4_reg:
set_grs_a5a5
;; divs.w xx:4, rd
- mov.w #32, r1
+ mov.w #-32, r1
set_ccr_zero
- divs.w #-2:4, r1
+ divs.w #2:4, r1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
@@ -88,9 +88,9 @@ divs_l_imm4_reg:
set_grs_a5a5
;; divs.l xx:4, rd
- mov.l #320000, er1
+ mov.l #-320000, er1
set_ccr_zero
- divs.l #-2:4, er1
+ divs.l #2:4, er1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
@@ -221,9 +221,9 @@ divxs_b_imm4_reg:
set_grs_a5a5
;; divxs.b xx:4, rd
- mov.w #32, r1
+ mov.w #-32, r1
set_ccr_zero
- divxs.b #-2:4, r1
+ divxs.b #2:4, r1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
diff --git a/sim/testsuite/sim/h8300/mul.s b/sim/testsuite/sim/h8300/mul.s
index 70ab7ec1208..02b9e9f846d 100644
--- a/sim/testsuite/sim/h8300/mul.s
+++ b/sim/testsuite/sim/h8300/mul.s
@@ -41,9 +41,9 @@ muls_w_imm4_reg:
set_grs_a5a5
;; muls.w xx:4, rd
- mov.w #32, r1
+ mov.w #-32, r1
set_ccr_zero
- muls.w #-2:4, r1
+ muls.w #2:4, r1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
@@ -88,9 +88,9 @@ muls_l_imm4_reg:
set_grs_a5a5
;; muls.l xx:4, rd
- mov.l #320000, er1
+ mov.l #-320000, er1
set_ccr_zero
- muls.l #-2:4, er1
+ muls.l #2:4, er1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
@@ -308,9 +308,9 @@ mulxs_b_imm4_reg:
set_grs_a5a5
;; mulxs.b xx:4, rd
- mov.w #32, r1
+ mov.w #-32, r1
set_ccr_zero
- mulxs.b #-2:4, r1
+ mulxs.b #2:4, r1
;; test ccr ; H=0 N=1 Z=0 V=0 C=0
test_neg_set
@@ -408,9 +408,9 @@ mulxu_b_imm4_reg:
set_grs_a5a5
;; mulxu.b xx:4, rd
- mov.b #32, r1l
+ mov.b #-32, r1l
set_ccr_zero
- mulxu.b #-2:4, r1
+ mulxu.b #2:4, r1
;; test ccr ; H=0 N=0 Z=0 V=0 C=0
test_cc_clear
diff --git a/sim/testsuite/sim/mips/ChangeLog b/sim/testsuite/sim/mips/ChangeLog
index 67e7bfa2fe2..7d756619a66 100644
--- a/sim/testsuite/sim/mips/ChangeLog
+++ b/sim/testsuite/sim/mips/ChangeLog
@@ -1,3 +1,38 @@
+2004-04-11 Chris Demetriou <cgd@broadcom.com>
+
+ * utils-fpu.inc (enable_fpu, ckm_fp_cc): New macros.
+ (clrset_fp_cc): Fix mask used for upper 7 condition codes.
+ * utils-mdmx.inc: Include utils-fpu.inc.
+ (enable_mdmx): Use enable_fpu.
+
+2004-04-10 Chris Demetriou <cgd@broadcom.com>
+
+ * utils-fpu.inc: New file.
+ * utils-mdmx.inc: New file.
+ * mdmx-ob.s: New file.
+ * mdmx-ob-sb1.s: New file.
+ * basic.exp: Run new mdmx-ob and mdmx-ob-sb1 tests.
+
+2004-04-10 Chris Demetriou <cgd@broadcom.com>
+
+ * fpu64-ps-sb1.s: New file.
+ * basic.exp: Recognize mipsisa64sb1 targets, and run fpu64-ps-sb1.s
+ if appropriate.
+
+2004-04-10 Chris Demetriou <cgd@broadcom.com>
+
+ * fpu64-ps.s: New file.
+ * basic.exp: Run fpu64-ps.s.
+
+2004-03-29 Richard Sandiford <rsandifo@redhat.com>
+
+ * hilo-hazard-[123].s: New files.
+ * basic.exp (run_hilo_test): New procedure.
+ (models): Only list models that are included in the configuration.
+ (submodels): New variable, set to submodels of the above.
+ (mips64vr-*-elf, mips64vrel-*-elf): New configuration stanza.
+ Run hilo-hazard-[123].s.
+
2004-01-26 Chris Demetriou <cgd@broadcom.com>
* basic.exp: New file.
diff --git a/sim/testsuite/sim/mips/basic.exp b/sim/testsuite/sim/mips/basic.exp
index 4014f3065b5..b7cb0576ac0 100644
--- a/sim/testsuite/sim/mips/basic.exp
+++ b/sim/testsuite/sim/mips/basic.exp
@@ -36,7 +36,10 @@ proc run_hilo_test {testfile models nops} {
# board really is a simulator (sim tests don't work on real HW).
if {[istarget mips*-elf] && [board_info target exists is_simulator]} {
- if {[istarget mipsisa64*-elf]} {
+ if {[istarget mipsisa64sb1*-elf]} {
+ set models "sb1"
+ set submodels "mips1 mips2 mips3 mips4 mips32 mips64"
+ } elseif {[istarget mipsisa64*-elf]} {
set models "mips32 mips64"
set submodels "mips1 mips2 mips3 mips4"
} elseif {[istarget mipsisa32*-elf]} {
@@ -62,4 +65,10 @@ if {[istarget mips*-elf] && [board_info target exists is_simulator]} {
run_hilo_test hilo-hazard-2.s $models $nops
}
run_hilo_test hilo-hazard-3.s $models 2
+
+ run_sim_test fpu64-ps.s $submodels
+ run_sim_test fpu64-ps-sb1.s $submodels
+
+ run_sim_test mdmx-ob.s $submodels
+ run_sim_test mdmx-ob-sb1.s $submodels
}
diff --git a/sim/testsuite/sim/mips/fpu64-ps-sb1.s b/sim/testsuite/sim/mips/fpu64-ps-sb1.s
new file mode 100644
index 00000000000..a39d0799c0d
--- /dev/null
+++ b/sim/testsuite/sim/mips/fpu64-ps-sb1.s
@@ -0,0 +1,72 @@
+# mips test sanity, expected to pass.
+# mach: sb1
+# as: -mabi=eabi
+# ld: -N -Ttext=0x80010000
+# output: *\\npass\\n
+
+ .include "testutils.inc"
+
+ .macro check_ps psval, upperval, lowerval
+ .set push
+ .set noreorder
+ cvt.s.pu $f0, \psval # upper
+ cvt.s.pl $f2, \psval # lower
+ li.s $f4, \upperval
+ li.s $f6, \lowerval
+ c.eq.s $fcc0, $f0, $f4
+ bc1f $fcc0, _fail
+ c.eq.s $fcc0, $f2, $f6
+ bc1f $fcc0, _fail
+ nop
+ .set pop
+ .endm
+
+ setup
+
+ .set noreorder
+
+ .ent DIAG
+DIAG:
+
+ # make sure that Status.FR, .CU1, and .SBX are set.
+ mfc0 $2, $12
+ or $2, $2, (1 << 26) | (1 << 29) | (1 << 16)
+ mtc0 $2, $12
+
+
+ li.s $f10, 4.0
+ li.s $f12, 16.0
+ cvt.ps.s $f20, $f10, $f12 # $f20: u=4.0, l=16.0
+
+ li.s $f10, -1.0
+ li.s $f12, 2.0
+ cvt.ps.s $f22, $f10, $f12 # $f22: u=-1.0, l=2.0
+
+
+ writemsg "div.ps"
+
+ div.ps $f8, $f20, $f22
+ check_ps $f8, -4.0, 8.0
+
+
+ writemsg "recip.ps"
+
+ recip.ps $f8, $f20
+ check_ps $f8, 0.25, 0.0625
+
+
+ writemsg "rsqrt.ps"
+
+ rsqrt.ps $f8, $f20
+ check_ps $f8, 0.5, 0.25
+
+
+ writemsg "sqrt.ps"
+
+ sqrt.ps $f8, $f20
+ check_ps $f8, 2.0, 4.0
+
+
+ pass
+
+ .end DIAG
diff --git a/sim/testsuite/sim/mips/fpu64-ps.s b/sim/testsuite/sim/mips/fpu64-ps.s
new file mode 100644
index 00000000000..ad493b8ac31
--- /dev/null
+++ b/sim/testsuite/sim/mips/fpu64-ps.s
@@ -0,0 +1,367 @@
+# mips test sanity, expected to pass.
+# mach: mips64 sb1
+# as: -mabi=eabi
+# ld: -N -Ttext=0x80010000
+# output: *\\npass\\n
+
+ .include "testutils.inc"
+
+ .macro check_ps psval, upperval, lowerval
+ .set push
+ .set noreorder
+ cvt.s.pu $f0, \psval # upper
+ cvt.s.pl $f2, \psval # lower
+ li.s $f4, \upperval
+ li.s $f6, \lowerval
+ c.eq.s $fcc0, $f0, $f4
+ bc1f $fcc0, _fail
+ c.eq.s $fcc0, $f2, $f6
+ bc1f $fcc0, _fail
+ nop
+ .set pop
+ .endm
+
+ setup
+
+ .set noreorder
+
+ .ent DIAG
+DIAG:
+
+ # make sure that Status.FR and .CU1 are set.
+ mfc0 $2, $12
+ or $2, $2, (1 << 26) | (1 << 29)
+ mtc0 $2, $12
+
+
+ writemsg "ldc1"
+
+ .data
+1: .dword 0xc1a8000042200000 # -21.0, 40.0
+ .text
+ la $2, 1b
+ ldc1 $f8, 0($2)
+ check_ps $f8, -21.0, 40.0
+
+
+ writemsg "cvt.ps.s"
+
+ li.s $f10, 1.0
+ li.s $f12, 3.0
+ cvt.ps.s $f8, $f10, $f12 # upper, lower
+ check_ps $f8, 1.0, 3.0
+
+
+ writemsg "cvt.ps.s, sdc1, copy, ldc1"
+
+ .data
+1: .dword 0
+ .dword 0
+ .text
+ la $2, 1b
+ li.s $f12, -4.0
+ li.s $f14, 32.0
+ cvt.ps.s $f10, $f12, $f14 # upper, lower
+ sdc1 $f10, 8($2)
+ lw $3, 8($2)
+ lw $4, 12($2)
+ sw $3, 0($2)
+ sw $4, 4($2)
+ ldc1 $f8, 0($2)
+ check_ps $f8, -4.0, 32.0
+
+
+ # Load some constants for later use
+
+ li.s $f10, 4.0
+ li.s $f12, 16.0
+ cvt.ps.s $f20, $f10, $f12 # $f20: u=4.0, l=16.0
+
+ li.s $f10, -1.0
+ li.s $f12, 2.0
+ cvt.ps.s $f22, $f10, $f12 # $f22: u=-1.0, l=2.0
+
+ li.s $f10, 17.0
+ li.s $f12, -8.0
+ cvt.ps.s $f24, $f10, $f12 # $f24: u=17.0, l=-8.0
+
+
+ writemsg "pll.ps"
+
+ pll.ps $f8, $f20, $f22
+ check_ps $f8, 16.0, 2.0
+
+
+ writemsg "plu.ps"
+
+ plu.ps $f8, $f20, $f22
+ check_ps $f8, 16.0, -1.0
+
+
+ writemsg "pul.ps"
+
+ pul.ps $f8, $f20, $f22
+ check_ps $f8, 4.0, 2.0
+
+
+ writemsg "puu.ps"
+
+ puu.ps $f8, $f20, $f22
+ check_ps $f8, 4.0, -1.0
+
+
+ writemsg "abs.ps"
+
+ abs.ps $f8, $f22
+ check_ps $f8, 1.0, 2.0
+
+
+ writemsg "mov.ps"
+
+ mov.ps $f8, $f22
+ check_ps $f8, -1.0, 2.0
+
+
+ writemsg "neg.ps"
+
+ neg.ps $f8, $f22
+ check_ps $f8, 1.0, -2.0
+
+
+ writemsg "add.ps"
+
+ add.ps $f8, $f20, $f22
+ check_ps $f8, 3.0, 18.0
+
+
+ writemsg "mul.ps"
+
+ mul.ps $f8, $f20, $f22
+ check_ps $f8, -4.0, 32.0
+
+
+ writemsg "sub.ps"
+
+ sub.ps $f8, $f20, $f22
+ check_ps $f8, 5.0, 14.0
+
+
+ writemsg "madd.ps"
+
+ madd.ps $f8, $f24, $f20, $f22
+ check_ps $f8, 13.0, 24.0
+
+
+ writemsg "msub.ps"
+
+ msub.ps $f8, $f24, $f20, $f22
+ check_ps $f8, -21.0, 40.0
+
+
+ writemsg "nmadd.ps"
+
+ nmadd.ps $f8, $f24, $f20, $f22
+ check_ps $f8, -13.0, -24.0
+
+
+ writemsg "nmsub.ps"
+
+ nmsub.ps $f8, $f24, $f20, $f22
+ check_ps $f8, 21.0, -40.0
+
+
+ writemsg "movn.ps (n)"
+
+ li $2, 0
+ mov.ps $f8, $f20
+ movn.ps $f8, $f22, $2 # doesn't move
+ check_ps $f8, 4.0, 16.0
+
+
+ writemsg "movn.ps (y)"
+
+ li $2, 1
+ mov.ps $f8, $f20
+ movn.ps $f8, $f22, $2 # does move
+ check_ps $f8, -1.0, 2.0
+
+
+ writemsg "movz.ps (y)"
+
+ li $2, 0
+ mov.ps $f8, $f20
+ movz.ps $f8, $f22, $2 # does move
+ check_ps $f8, -1.0, 2.0
+
+
+ writemsg "movz.ps (n)"
+
+ li $2, 1
+ mov.ps $f8, $f20
+ movz.ps $f8, $f22, $2 # doesn't move
+ check_ps $f8, 4.0, 16.0
+
+
+ writemsg "movf.ps (y,y)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (1 << 23) | (1 << 25)
+ ctc1 $2, $31 # clear fcc0, clear fcc1
+ mov.ps $f8, $f20
+ movf.ps $f8, $f22, $fcc0 # moves both halves
+ check_ps $f8, -1.0, 2.0
+
+
+ writemsg "movf.ps (y,n)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (0 << 23) | (1 << 25)
+ ctc1 $2, $31 # set fcc0, clear fcc1
+ mov.ps $f8, $f20
+ movf.ps $f8, $f22, $fcc0 # moves upper half only
+ check_ps $f8, -1.0, 16.0
+
+
+ writemsg "movf.ps (n,y)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (1 << 23) | (0 << 25)
+ ctc1 $2, $31 # clear fcc0, set fcc1
+ mov.ps $f8, $f20
+ movf.ps $f8, $f22, $fcc0 # moves lower half only
+ check_ps $f8, 4.0, 2.0
+
+
+ writemsg "movf.ps (n,n)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (0 << 23) | (0 << 25)
+ ctc1 $2, $31 # set fcc0, set fcc1
+ mov.ps $f8, $f20
+ movf.ps $f8, $f22, $fcc0 # doesn't move either half
+ check_ps $f8, 4.0, 16.0
+
+
+ writemsg "movt.ps (n,n)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (1 << 23) | (1 << 25)
+ ctc1 $2, $31 # clear fcc0, clear fcc1
+ mov.ps $f8, $f20
+ movt.ps $f8, $f22, $fcc0 # doesn't move either half
+ check_ps $f8, 4.0, 16.0
+
+
+ writemsg "movt.ps (n,y)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (0 << 23) | (1 << 25)
+ ctc1 $2, $31 # set fcc0, clear fcc1
+ mov.ps $f8, $f20
+ movt.ps $f8, $f22, $fcc0 # moves lower half only
+ check_ps $f8, 4.0, 2.0
+
+
+ writemsg "movt.ps (y,n)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (1 << 23) | (0 << 25)
+ ctc1 $2, $31 # clear fcc0, set fcc1
+ mov.ps $f8, $f20
+ movt.ps $f8, $f22, $fcc0 # moves upper half only
+ check_ps $f8, -1.0, 16.0
+
+
+ writemsg "movt.ps (y,y)"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (1 << 25)
+ xor $2, $2, (0 << 23) | (0 << 25)
+ ctc1 $2, $31 # set fcc0, set fcc1
+ mov.ps $f8, $f20
+ movt.ps $f8, $f22, $fcc0 # moves both halves
+ check_ps $f8, -1.0, 2.0
+
+
+ writemsg "alnv.ps (aligned)"
+
+ .data
+1: .dword 0xc1a8000042200000 # -21.0, 40.0
+ .dword 0xc228000041a00000 # -42.0, 20.0
+ .text
+ la $2, 1b
+ li $3, 0
+ addu $4, $3, 8
+ luxc1 $f10, $3($2)
+ luxc1 $f12, $4($2)
+ alnv.ps $f8, $f10, $f12, $3
+ check_ps $f8, -21.0, 40.0
+
+
+ writemsg "alnv.ps (unaligned)"
+
+ .data
+1: .dword 0xc1a8000042200000 # -21.0, 40.0
+ .dword 0xc228000041a00000 # -42.0, 20.0
+ .hword 0x0001
+ .text
+ la $2, 1b
+ li $3, 4
+ addu $4, $3, 8
+ luxc1 $f10, $3($2)
+ luxc1 $f12, $4($2)
+ alnv.ps $f8, $f10, $f12, $3
+
+ lb $5, 16($2)
+ bnez $5, 2f # little endian
+ nop
+
+ # big endian
+ check_ps $f8, 40.0, -42.0
+ b 3f
+ nop
+2:
+ # little endian
+ check_ps $f8, 20.0, -21.0
+3:
+
+
+ # We test c.cond.ps only lightly, just to make sure it modifies
+ # two bits and compares the halves separately. Perhaps it should
+ # be tested more thoroughly.
+
+ writemsg "c.f.ps"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (0x7f << 25)
+ ctc1 $2, $31 # set all fcc bits
+ c.f.ps $fcc0, $f8, $f8 # -> f, f
+ bc1t $fcc0, _fail
+ nop
+ bc1t $fcc1, _fail
+ nop
+
+
+ writemsg "c.olt.ps"
+
+ cfc1 $2, $31
+ or $2, $2, (1 << 23) | (0x7f << 25)
+ xor $2, $2, (1 << 23) | (0x7f << 25)
+ ctc1 $2, $31 # clear all fcc bits
+ c.lt.ps $fcc0, $f22, $f24 # -> f, t
+ bc1t $fcc0, _fail
+ nop
+ bc1f $fcc1, _fail
+ nop
+
+
+ pass
+
+ .end DIAG
diff --git a/sim/testsuite/sim/mips/mdmx-ob-sb1.s b/sim/testsuite/sim/mips/mdmx-ob-sb1.s
new file mode 100644
index 00000000000..c8409fc0b42
--- /dev/null
+++ b/sim/testsuite/sim/mips/mdmx-ob-sb1.s
@@ -0,0 +1,102 @@
+# MDMX .OB op tests.
+# mach: sb1
+# as: -mabi=eabi
+# ld: -N -Ttext=0x80010000
+# output: *\\npass\\n
+
+ .include "testutils.inc"
+ .include "utils-mdmx.inc"
+
+ setup
+
+ .set noreorder
+
+ .ent DIAG
+DIAG:
+
+ enable_mdmx
+
+ # set Status.SBX to enable SB-1 extensions.
+ mfc0 $2, $12
+ or $2, $2, (1 << 16)
+ mtc0 $2, $12
+
+
+ ###
+ ### SB-1 Non-accumulator .ob format ops.
+ ###
+ ### Key: v = vector
+ ### ev = vector of single element
+ ### cv = vector of constant.
+ ###
+
+
+ writemsg "pavg.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pavg.ob $f10, $f8, $f9
+ ck_ob $f10, 0x3c4d5e6f8091a2b3
+
+ writemsg "pavg.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pavg.ob $f10, $f8, $f9[6]
+ ck_ob $f10, 0x444d555e666f7780
+
+ writemsg "pavg.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ pavg.ob $f10, $f8, 0x10
+ ck_ob $f10, 0x1119222a333b444c
+
+
+ writemsg "pabsdiff.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pabsdiff.ob $f10, $f8, $f9
+ ck_ob $f10, 0x5555555555555555
+
+ writemsg "pabsdiff.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pabsdiff.ob $f10, $f8, $f9[7]
+ ck_ob $f10, 0x5544332211001122
+
+ writemsg "pabsdiff.ob (cv)"
+ ld_ob $f8, 0x0001020304050607
+ pabsdiff.ob $f10, $f8, 0x04
+ ck_ob $f10, 0x0403020100010203
+
+
+ ###
+ ### SB-1 Accumulator .ob format ops
+ ###
+ ### Key: v = vector
+ ### ev = vector of single element
+ ### cv = vector of constant.
+ ###
+
+
+ writemsg "pabsdiffc.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pabsdiffc.ob $f8, $f9
+ ck_acc_ob 0x0001020304050607, 0x0000000000000000, 0x5555555555555555
+
+ writemsg "pabsdiffc.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ pabsdiffc.ob $f8, $f9[7]
+ ck_acc_ob 0x0001020304050607, 0x0000000000000000, 0x5544332211001122
+
+ writemsg "pabsdiffc.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x0001020304050607
+ pabsdiffc.ob $f8, 0x04
+ ck_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0403020100010203
+
+
+ pass
+
+ .end DIAG
diff --git a/sim/testsuite/sim/mips/mdmx-ob.s b/sim/testsuite/sim/mips/mdmx-ob.s
new file mode 100644
index 00000000000..ad9bbda3cae
--- /dev/null
+++ b/sim/testsuite/sim/mips/mdmx-ob.s
@@ -0,0 +1,631 @@
+# MDMX .OB op tests.
+# mach: mips64 sb1
+# as: -mabi=eabi
+# as(mips64): -mabi=eabi -mdmx
+# ld: -N -Ttext=0x80010000
+# output: *\\npass\\n
+
+ .include "testutils.inc"
+ .include "utils-fpu.inc"
+ .include "utils-mdmx.inc"
+
+ setup
+
+ .set noreorder
+
+ .ent DIAG
+DIAG:
+
+ enable_mdmx
+
+
+ ###
+ ### Non-accumulator, non-CC-using .ob format ops.
+ ###
+ ### Key: v = vector
+ ### ev = vector of single element
+ ### cv = vector of constant.
+ ###
+
+
+ writemsg "add.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ add.ob $f10, $f8, $f9
+ ck_ob $f10, 0x7799bbddffffffff
+
+ writemsg "add.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ add.ob $f10, $f8, $f9[6]
+ ck_ob $f10, 0x8899aabbccddeeff
+
+ writemsg "add.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ add.ob $f10, $f8, 0x10
+ ck_ob $f10, 0x2132435465768798
+
+
+ writemsg "alni.ob"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ alni.ob $f10, $f8, $f9, 3
+ ck_ob $f10, 0x4455667788667788
+
+
+ writemsg "alnv.ob"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ li $4, 5
+ alnv.ob $f10, $f8, $f9, $4
+ ck_ob $f10, 0x66778866778899aa
+
+
+ writemsg "and.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ and.ob $f10, $f8, $f9
+ ck_ob $f10, 0x0022000000224488
+
+ writemsg "and.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ and.ob $f10, $f8, $f9[4]
+ ck_ob $f10, 0x1100110011001188
+
+ writemsg "and.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ and.ob $f10, $f8, 0x1e
+ ck_ob $f10, 0x1002120414061608
+
+
+ writemsg "max.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ max.ob $f10, $f8, $f9
+ ck_ob $f10, 0x66778899aabbccdd
+
+ writemsg "max.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ max.ob $f10, $f8, $f9[7]
+ ck_ob $f10, 0x6666666666667788
+
+ writemsg "max.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ max.ob $f10, $f8, 0x15
+ ck_ob $f10, 0x1522334455667788
+
+
+ writemsg "min.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ min.ob $f10, $f8, $f9
+ ck_ob $f10, 0x1122334455667788
+
+ writemsg "min.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ min.ob $f10, $f8, $f9[7]
+ ck_ob $f10, 0x1122334455666666
+
+ writemsg "min.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ min.ob $f10, $f8, 0x15
+ ck_ob $f10, 0x1115151515151515
+
+
+ writemsg "mul.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ mul.ob $f10, $f8, $f9
+ ck_ob $f10, 0x002266ccffffffff
+
+ writemsg "mul.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ mul.ob $f10, $f8, $f9[4]
+ ck_ob $f10, 0x336699ccffffffff
+
+ writemsg "mul.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ mul.ob $f10, $f8, 2
+ ck_ob $f10, 0x22446688aacceeff
+
+
+ writemsg "nor.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ nor.ob $f10, $f8, $f9
+ ck_ob $f10, 0x8888442200000022
+
+ writemsg "nor.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ nor.ob $f10, $f8, $f9[6]
+ ck_ob $f10, 0x8888888888888800
+
+ writemsg "nor.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ nor.ob $f10, $f8, 0x08
+ ck_ob $f10, 0xe6d5c4b3a2918077
+
+
+ writemsg "or.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ or.ob $f10, $f8, $f9
+ ck_ob $f10, 0x7777bbddffffffdd
+
+ writemsg "or.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ or.ob $f10, $f8, $f9[6]
+ ck_ob $f10, 0x77777777777777ff
+
+ writemsg "or.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ or.ob $f10, $f8, 0x08
+ ck_ob $f10, 0x192a3b4c5d6e7f88
+
+
+ writemsg "shfl.mixh.ob"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ shfl.mixh.ob $f10, $f8, $f9
+ ck_ob $f10, 0x1166227733884499
+
+
+ writemsg "shfl.mixl.ob"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ shfl.mixl.ob $f10, $f8, $f9
+ ck_ob $f10, 0x55aa66bb77cc88dd
+
+
+ writemsg "shfl.pach.ob"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ shfl.pach.ob $f10, $f8, $f9
+ ck_ob $f10, 0x113355776688aacc
+
+
+ writemsg "shfl.upsl.ob"
+ ld_ob $f8, 0x1122334455667788
+ shfl.upsl.ob $f10, $f8, $f8
+ ck_ob $f10, 0x005500660077ff88
+
+
+ writemsg "sll.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ sll.ob $f10, $f8, $f9
+ ck_ob $f10, 0x1144cc2050c0c000
+
+ writemsg "sll.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ sll.ob $f10, $f8, $f9[3]
+ ck_ob $f10, 0x1020304050607080
+
+ writemsg "sll.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ sll.ob $f10, $f8, 1
+ ck_ob $f10, 0x22446688aaccee10
+
+
+ writemsg "srl.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ srl.ob $f10, $f8, $f9
+ ck_ob $f10, 0x11110c0805030101
+
+ writemsg "srl.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ srl.ob $f10, $f8, $f9[3]
+ ck_ob $f10, 0x0102030405060708
+
+ writemsg "srl.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ srl.ob $f10, $f8, 1
+ ck_ob $f10, 0x081119222a333b44
+
+
+ writemsg "sub.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x0001020304050607
+ sub.ob $f10, $f8, $f9
+ ck_ob $f10, 0x1121314151617181
+
+ writemsg "sub.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ sub.ob $f10, $f8, $f9[7]
+ ck_ob $f10, 0x0000000000001122
+
+ writemsg "sub.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ sub.ob $f10, $f8, 0x10
+ ck_ob $f10, 0x0112233445566778
+
+
+ writemsg "xor.ob (v)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ xor.ob $f10, $f8, $f9
+ ck_ob $f10, 0x7755bbddffddbb55
+
+ writemsg "xor.ob (ev)"
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ xor.ob $f10, $f8, $f9[6]
+ ck_ob $f10, 0x66554433221100ff
+
+ writemsg "xor.ob (cv)"
+ ld_ob $f8, 0x1122334455667788
+ xor.ob $f10, $f8, 0x08
+ ck_ob $f10, 0x192a3b4c5d6e7f80
+
+
+ ###
+ ### Accumulator .ob format ops (in order: rd/wr, math, scale/round)
+ ###
+ ### Key: v = vector
+ ### ev = vector of single element
+ ### cv = vector of constant.
+ ###
+
+
+ writemsg "wacl.ob / rac[hml].ob"
+ ld_ob $f8, 0x8001028304850687
+ ld_ob $f9, 0x1011121314151617
+ wacl.ob $f8, $f9
+ ck_acc_ob 0xff0000ff00ff00ff, 0x8001028304850687, 0x1011121314151617
+
+ # Note: relies on data left in accumulator by previous test.
+ writemsg "wach.ob / rac[hml].ob"
+ ld_ob $f8, 0x2021222324252627
+ wach.ob $f8
+ ck_acc_ob 0x2021222324252627, 0x8001028304850687, 0x1011121314151617
+
+
+ writemsg "adda.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ adda.ob $f8, $f9
+ ck_acc_ob 0x0001020304050607, 0x0000000000010101, 0x7799bbddff214365
+
+ writemsg "adda.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ adda.ob $f8, $f9[2]
+ ck_acc_ob 0x0001020304050607, 0x0000000001010101, 0xccddeeff10213243
+
+ writemsg "adda.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ adda.ob $f8, 0x1f
+ ck_acc_ob 0x0001020304050607, 0x0000000000000000, 0x30415263748596a7
+
+
+ writemsg "addl.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ addl.ob $f8, $f9
+ ck_acc_ob 0x0000000000000000, 0x0000000000010101, 0x7799bbddff214365
+
+ writemsg "addl.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ addl.ob $f8, $f9[2]
+ ck_acc_ob 0x0000000000000000, 0x0000000001010101, 0xccddeeff10213243
+
+ writemsg "addl.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ addl.ob $f8, 0x1f
+ ck_acc_ob 0x0000000000000000, 0x0000000000000000, 0x30415263748596a7
+
+
+ writemsg "mula.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mula.ob $f8, $f9
+ ck_acc_ob 0x0001020304050607, 0x060f1b28384a5e75, 0xc6ce18a47282d468
+
+ writemsg "mula.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mula.ob $f8, $f9[2]
+ ck_acc_ob 0x0001020304050607, 0x0c1825313e4a5663, 0x6bd641ac1782ed58
+
+ writemsg "mula.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ mula.ob $f8, 0x1f
+ ck_acc_ob 0x0001020304050607, 0x020406080a0c0e10, 0x0f1e2d3c4b5a6978
+
+
+ writemsg "mull.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mull.ob $f8, $f9
+ ck_acc_ob 0x0000000000000000, 0x060f1b28384a5e75, 0xc6ce18a47282d468
+
+ writemsg "mull.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mull.ob $f8, $f9[2]
+ ck_acc_ob 0x0000000000000000, 0x0c1825313e4a5663, 0x6bd641ac1782ed58
+
+ writemsg "mull.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ mull.ob $f8, 0x1f
+ ck_acc_ob 0x0000000000000000, 0x020406080a0c0e10, 0x0f1e2d3c4b5a6978
+
+
+ writemsg "muls.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ muls.ob $f8, $f9
+ ck_acc_ob 0xff00010203040506, 0xf9f0e4d7c7b5a18a, 0x3a32e85c8e7e2c98
+
+ writemsg "muls.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ muls.ob $f8, $f9[2]
+ ck_acc_ob 0xff00010203040506, 0xf3e7dacec1b5a99c, 0x952abf54e97e13a8
+
+ writemsg "muls.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ muls.ob $f8, 0x1f
+ ck_acc_ob 0xff00010203040506, 0xfdfbf9f7f5f3f1ef, 0xf1e2d3c4b5a69788
+
+
+ writemsg "mulsl.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mulsl.ob $f8, $f9
+ ck_acc_ob 0xffffffffffffffff, 0xf9f0e4d7c7b5a18a, 0x3a32e85c8e7e2c98
+
+ writemsg "mulsl.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ mulsl.ob $f8, $f9[2]
+ ck_acc_ob 0xffffffffffffffff, 0xf3e7dacec1b5a99c, 0x952abf54e97e13a8
+
+ writemsg "mulsl.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ mulsl.ob $f8, 0x1f
+ ck_acc_ob 0xffffffffffffffff, 0xfdfbf9f7f5f3f1ef, 0xf1e2d3c4b5a69788
+
+
+ writemsg "suba.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ suba.ob $f8, $f9
+ ck_acc_ob 0xff00010203040506, 0xffffffffffffffff, 0xabababababababab
+
+ writemsg "suba.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ suba.ob $f8, $f9[2]
+ ck_acc_ob 0xff00010203040506, 0xffffffffffffffff, 0x566778899aabbccd
+
+ writemsg "suba.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ suba.ob $f8, 0x1f
+ ck_acc_ob 0xff01020304050607, 0xff00000000000000, 0xf203142536475869
+
+
+ writemsg "subl.ob (v)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ subl.ob $f8, $f9
+ ck_acc_ob 0xffffffffffffffff, 0xffffffffffffffff, 0xabababababababab
+
+ writemsg "subl.ob (ev)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ ld_ob $f9, 0x66778899aabbccdd
+ subl.ob $f8, $f9[2]
+ ck_acc_ob 0xffffffffffffffff, 0xffffffffffffffff, 0x566778899aabbccd
+
+ writemsg "subl.ob (cv)"
+ ld_acc_ob 0x0001020304050607, 0x0000000000000000, 0x0000000000000000
+ ld_ob $f8, 0x1122334455667788
+ subl.ob $f8, 0x1f
+ ck_acc_ob 0xff00000000000000, 0xff00000000000000, 0xf203142536475869
+
+
+ writemsg "rnau.ob (v)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rnau.ob $f9, $f8
+ ck_ob $f9, 0x4021110940201008
+
+ writemsg "rnau.ob (ev)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rnau.ob $f9, $f8[4]
+ ck_ob $f9, 0x080809097f7f8080
+
+ writemsg "rnau.ob (cv)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ rnau.ob $f9, 2
+ ck_ob $f9, 0x10111112feffffff
+
+
+ writemsg "rneu.ob (v)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rneu.ob $f9, $f8
+ ck_ob $f9, 0x4021110940201008
+
+ writemsg "rneu.ob (ev)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rneu.ob $f9, $f8[4]
+ ck_ob $f9, 0x080808097f7f8080
+
+ writemsg "rneu.ob (cv)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ rneu.ob $f9, 2
+ ck_ob $f9, 0x10101112fefeffff
+
+
+ writemsg "rzu.ob (v)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rzu.ob $f9, $f8
+ ck_ob $f9, 0x402111083f1f0f07
+
+ writemsg "rzu.ob (ev)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ ld_ob $f8, 0x0001020304050607
+ rzu.ob $f9, $f8[4]
+ ck_ob $f9, 0x080808087f7f7f7f
+
+ writemsg "rzu.ob (cv)"
+ ld_acc_ob 0x0000000000000000, 0x0000000003030303, 0x40424446f8fafcfe
+ rzu.ob $f9, 2
+ ck_ob $f9, 0x10101111fefeffff
+
+
+ ###
+ ### CC-using .ob format ops.
+ ###
+ ### Key: v = vector
+ ### ev = vector of single element
+ ### cv = vector of constant.
+ ###
+
+
+ writemsg "c.eq.ob (v)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.eq.ob $f8, $f9
+ ck_fp_cc 0x55
+
+ writemsg "c.eq.ob (ev)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.eq.ob $f8, $f9[5]
+ ck_fp_cc 0x18
+
+ writemsg "c.eq.ob (cv)"
+ ld_ob $f8, 0x0001010202030304
+ clr_fp_cc 0xff
+ c.eq.ob $f8, 0x03
+ ck_fp_cc 0x06
+
+
+ writemsg "c.le.ob (v)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.le.ob $f8, $f9
+ ck_fp_cc 0xff
+
+ writemsg "c.le.ob (ev)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.le.ob $f8, $f9[5]
+ ck_fp_cc 0xf8
+
+ writemsg "c.le.ob (cv)"
+ ld_ob $f8, 0x0001010202030304
+ clr_fp_cc 0xff
+ c.le.ob $f8, 0x03
+ ck_fp_cc 0xfe
+
+
+ writemsg "c.lt.ob (v)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.lt.ob $f8, $f9
+ ck_fp_cc 0xaa
+
+ writemsg "c.lt.ob (ev)"
+ ld_ob $f8, 0x0001010202030304
+ ld_ob $f9, 0x0101020203030404
+ clr_fp_cc 0xff
+ c.lt.ob $f8, $f9[5]
+ ck_fp_cc 0xe0
+
+ writemsg "c.lt.ob (cv)"
+ ld_ob $f8, 0x0001010202030304
+ clr_fp_cc 0xff
+ c.lt.ob $f8, 0x03
+ ck_fp_cc 0xf8
+
+
+ writemsg "pickf.ob (v)"
+ ld_ob $f8, 0x0001020304050607
+ ld_ob $f9, 0x08090a0b0c0d0e0f
+ clrset_fp_cc 0xff, 0xaa
+ pickf.ob $f10, $f8, $f9
+ ck_ob $f10, 0x08010a030c050e07
+
+ writemsg "pickf.ob (ev)"
+ ld_ob $f8, 0x0001020304050607
+ ld_ob $f9, 0x08090a0b0c0d0e0f
+ clrset_fp_cc 0xff, 0xaa
+ pickf.ob $f10, $f8, $f9[4]
+ ck_ob $f10, 0x0b010b030b050b07
+
+ writemsg "pickf.ob (cv)"
+ ld_ob $f8, 0x0001020304050607
+ clrset_fp_cc 0xff, 0xaa
+ pickf.ob $f10, $f8, 0x10
+ ck_ob $f10, 0x1001100310051007
+
+
+ writemsg "pickt.ob (v)"
+ ld_ob $f8, 0x0001020304050607
+ ld_ob $f9, 0x08090a0b0c0d0e0f
+ clrset_fp_cc 0xff, 0xaa
+ pickt.ob $f10, $f8, $f9
+ ck_ob $f10, 0x0009020b040d060f
+
+ writemsg "pickt.ob (ev)"
+ ld_ob $f8, 0x0001020304050607
+ ld_ob $f9, 0x08090a0b0c0d0e0f
+ clrset_fp_cc 0xff, 0xaa
+ pickt.ob $f10, $f8, $f9[5]
+ ck_ob $f10, 0x000a020a040a060a
+
+ writemsg "pickt.ob (cv)"
+ ld_ob $f8, 0x0001020304050607
+ clrset_fp_cc 0xff, 0xaa
+ pickt.ob $f10, $f8, 0x10
+ ck_ob $f10, 0x0010021004100610
+
+
+ pass
+
+ .end DIAG
diff --git a/sim/testsuite/sim/mips/utils-fpu.inc b/sim/testsuite/sim/mips/utils-fpu.inc
new file mode 100644
index 00000000000..82feb61ce9d
--- /dev/null
+++ b/sim/testsuite/sim/mips/utils-fpu.inc
@@ -0,0 +1,105 @@
+# MIPS simulator testsuite FPU utility functions.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Contributed by Chris Demetriou of Broadcom Corporation.
+#
+# This file is part of the GNU simulators.
+#
+# 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, 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. */
+
+ .macro enable_fpu fr
+ mfc0 $20, $12
+ or $20, $20, (1 << 29) | (\fr << 26)
+ mtc0 $20, $20
+ .endm
+
+ ###
+ ### Data movement macros
+ ###
+
+ .macro ld_fp_df r, v
+ .data
+1: .double \v
+ .previous
+ ldc1 \r, 1b
+ .endm
+
+ .macro ld_fp_di r, v
+ .data
+1: .dword \v
+ .previous
+ ldc1 \r, 1b
+ .endm
+
+ .macro ld_fp_sf r, v
+ .data
+1: .float \v
+ .previous
+ lwc1 \r, 1b
+ .endm
+
+ .macro ld_fp_si r, v
+ .data
+1: .word \v
+ .previous
+ lwc1 \r, 1b
+ .endm
+
+
+ ###
+ ### FP condition code manipulation macros
+ ###
+
+ .macro clrset_fp_cc clr, set
+ cfc1 $20, $31
+ or $20, $20, (((\clr & 0xfe) << 24) | ((\clr & 0x01) << 23))
+ xor $20, $20, (((\clr & 0xfe) << 24) | ((\clr & 0x01) << 23))
+ or $20, $20, (((\set & 0xfe) << 24) | ((\set & 0x01) << 23))
+ ctc1 $20, $31
+ .endm
+
+ .macro clr_fp_cc clr
+ clrset_fp_cc \clr, 0
+ .endm
+
+ .macro set_fp_cc set
+ clrset_fp_cc 0, \set
+ .endm
+
+ .macro get_fp_cc r
+ .set push
+ .set noat
+ cfc1 $1, $31
+ srl $1, $1, 23
+ andi \r, $1, 0x1fc
+ andi $1, $1, 0x1
+ srl \r, \r, 1
+ or \r, \r, $1
+ .set pop
+ .endm
+
+ .macro ck_fp_cc v
+ get_fp_cc $20
+ xori $20, $20, \v
+ bnez $20, _fail
+ nop
+ .endm
+
+ .macro ckm_fp_cc v, mask
+ get_fp_cc $20
+ xori $20, $20, \v
+ andi $20, $20, \mask
+ bnez $20, _fail
+ nop
+ .endm
diff --git a/sim/testsuite/sim/mips/utils-mdmx.inc b/sim/testsuite/sim/mips/utils-mdmx.inc
new file mode 100644
index 00000000000..cda6550dc8c
--- /dev/null
+++ b/sim/testsuite/sim/mips/utils-mdmx.inc
@@ -0,0 +1,72 @@
+# MIPS simulator testsuite MDMX utility functions.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Contributed by Chris Demetriou of Broadcom Corporation.
+#
+# This file is part of the GNU simulators.
+#
+# 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, 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 "utils-fpu.inc"
+
+ ###
+ ### Shared macros
+ ###
+
+ # Enable MDMX: enable the FPU w/ FR=1, then set Status.MX
+ .macro enable_mdmx
+ enable_fpu 1
+ mfc0 $20, $12
+ or $20, $20, (1 << 24)
+ mtc0 $20, $12
+ .endm
+
+
+ ###
+ ### .OB-format macros
+ ###
+
+ .macro ld_ob r, v
+ .data
+1: .dword \v
+ .previous
+ ldc1 \r, 1b
+ .endm
+
+ .macro ck_ob r, v
+ .data
+1: .dword \v
+ .previous
+ dmfc1 $20, \r
+ ld $21, 1b
+ bne $20, $21, _fail
+ nop
+ .endm
+
+ .macro ld_acc_ob h, m, l
+ ld_ob $f20, \m
+ ld_ob $f21, \l
+ wacl.ob $f20, $f21
+ ld_ob $f20, \h
+ wach.ob $f20
+ .endm
+
+ .macro ck_acc_ob h, m, l
+ rach.ob $f20
+ ck_ob $f20, \h
+ racm.ob $f20
+ ck_ob $f20, \m
+ racl.ob $f20
+ ck_ob $f20, \l
+ .endm
diff --git a/sim/testsuite/sim/sh/ChangeLog b/sim/testsuite/sim/sh/ChangeLog
index e3fecbd3a15..33938feb0a3 100644
--- a/sim/testsuite/sim/sh/ChangeLog
+++ b/sim/testsuite/sim/sh/ChangeLog
@@ -1,3 +1,33 @@
+2004-09-13 DJ Delorie <dj@redhat.com>
+
+ * sim/sh/allinsn.exp: Set global_as_options and
+ global_ld_options appropriately for little endian builds.
+ * sim/sh/movua.s: Support little endian.
+
+2004-09-08 Michael Snyder <msnyder@redhat.com>
+
+ Commited by Corinna Vinschen <vinschen@redhat.com>
+ * allinsn.exp: Add new tests.
+ * bandor.s: New file.
+ * bandornot.s: New file.
+ * bclr.s: New file.
+ * bld.s: New file.
+ * bldnot.s: New file.
+ * bset.s: New file.
+ * bst.s: New file.
+ * bxor.s: New file.
+ * clip.s: New file.
+ * div.s: New file.
+ * fail.s: New file, make sure fail works.
+ * fsca.s: New file.
+ * fsrra.s: New file.
+ * mov.s: New file.
+ * mulr.s: New file.
+ * pass.s: New file, make sure pass works.
+ * pushpop.s: New file.
+ * resbank.s: New file.
+ * testutils.inc (bf8k, bt8k, assertmem): New macros.
+
2004-02-12 Michael Snyder <msnyder@redhat.com>
* and.s, movi.s, sett.s: New files.
diff --git a/sim/testsuite/sim/sh/allinsn.exp b/sim/testsuite/sim/sh/allinsn.exp
index 0ec39f580a8..40d13929942 100644
--- a/sim/testsuite/sim/sh/allinsn.exp
+++ b/sim/testsuite/sim/sh/allinsn.exp
@@ -2,9 +2,29 @@
set all "sh shdsp"
+set global_as_options ""
+set global_ld_options ""
+
+foreach opt $board_variant_list {
+ switch "x$opt" {
+ x-ml { set global_as_options "-little --defsym LITTLE=1"
+ set global_ld_options "-EL" }
+ }
+}
+
if [istarget sh-*elf] {
run_sim_test add.s $all
run_sim_test and.s $all
+ run_sim_test bandor.s sh
+ run_sim_test bandornot.s sh
+ run_sim_test bclr.s sh
+ run_sim_test bld.s sh
+ run_sim_test bldnot.s sh
+ run_sim_test bset.s sh
+ run_sim_test bst.s sh
+ run_sim_test bxor.s sh
+ run_sim_test clip.s sh
+ run_sim_test div.s sh
run_sim_test dmxy.s shdsp
run_sim_test fabs.s sh
run_sim_test fadd.s sh
@@ -32,10 +52,12 @@ if [istarget sh-*elf] {
run_sim_test loop.s shdsp
run_sim_test macl.s sh
run_sim_test macw.s sh
+ run_sim_test mov.s $all
run_sim_test movi.s $all
run_sim_test movli.s $all
run_sim_test movua.s $all
run_sim_test movxy.s shdsp
+ run_sim_test mulr.s sh
run_sim_test pabs.s shdsp
run_sim_test paddc.s shdsp
run_sim_test padd.s shdsp
@@ -52,7 +74,9 @@ if [istarget sh-*elf] {
run_sim_test pshlr.s shdsp
run_sim_test psub.s shdsp
run_sim_test pswap.s shdsp
- run_sim_test sett.s $all
+ run_sim_test pushpop.s sh
+ run_sim_test resbank.s sh
+ run_sim_test sett.s sh
run_sim_test shll.s $all
run_sim_test shll2.s $all
run_sim_test shll8.s $all
diff --git a/sim/testsuite/sim/sh/bandor.s b/sim/testsuite/sim/sh/bandor.s
new file mode 100644
index 00000000000..9ada4850696
--- /dev/null
+++ b/sim/testsuite/sim/sh/bandor.s
@@ -0,0 +1,120 @@
+# sh testcase for band, bor
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xa5a5a5a5
+
+ start
+
+bandor_b_imm_disp12_reg:
+ set_grs_a5a5
+ # Make sure T is true to start.
+ sett
+
+ mov.l x, r1
+
+ band.b #0, @(3, r1)
+ bf8k mfail
+ bor.b #1, @(3, r1)
+ bf8k mfail
+ band.b #2, @(3, r1)
+ bf8k mfail
+ bor.b #3, @(3, r1)
+ bf8k mfail
+
+ bor.b #4, @(3, r1)
+ bf8k mfail
+ band.b #5, @(3, r1)
+ bf8k mfail
+ bor.b #6, @(3, r1)
+ bf8k mfail
+ band.b #7, @(3, r1)
+ bf8k mfail
+
+ band.b #0, @(2, r1)
+ bf8k mfail
+ bor.b #1, @(2, r1)
+ bf8k mfail
+ band.b #2, @(2, r1)
+ bf8k mfail
+ bor.b #3, @(2, r1)
+ bf8k mfail
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+
+.L2:
+ bor.b #4, @(2, r1)
+ bf8k mfail
+ band.b #5, @(2, r1)
+ bf8k mfail
+ bor.b #6, @(2, r1)
+ bf8k mfail
+ band.b #7, @(2, r1)
+ bf8k mfail
+
+ band.b #0, @(1, r1)
+ bf8k mfail
+ bor.b #1, @(1, r1)
+ bf8k mfail
+ band.b #2, @(1, r1)
+ bf8k mfail
+ bor.b #3, @(1, r1)
+ bf8k mfail
+
+ bor.b #4, @(1, r1)
+ bf8k mfail
+ band.b #5, @(1, r1)
+ bf8k mfail
+ bor.b #6, @(1, r1)
+ bf8k mfail
+ band.b #7, @(1, r1)
+ bf8k mfail
+
+ band.b #0, @(0, r1)
+ bf8k mfail
+ bor.b #1, @(0, r1)
+ bf8k mfail
+ band.b #2, @(0, r1)
+ bf8k mfail
+ bor.b #3, @(0, r1)
+ bf8k mfail
+
+ bor.b #4, @(0, r1)
+ bf8k mfail
+ band.b #5, @(0, r1)
+ bf8k mfail
+ bor.b #6, @(0, r1)
+ bf8k mfail
+ band.b #7, @(0, r1)
+ bf8k mfail
+
+ assertreg _x, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/bandornot.s b/sim/testsuite/sim/sh/bandornot.s
new file mode 100644
index 00000000000..1787d0d92fb
--- /dev/null
+++ b/sim/testsuite/sim/sh/bandornot.s
@@ -0,0 +1,120 @@
+# sh testcase for bandnot, bornot
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xa5a5a5a5
+
+ start
+
+bandor_b_imm_disp12_reg:
+ set_grs_a5a5
+ # Make sure T is true to start.
+ sett
+
+ mov.l x, r1
+
+ bandnot.b #0, @(3, r1)
+ bt8k mfail
+ bornot.b #1, @(3, r1)
+ bf8k mfail
+ bandnot.b #2, @(3, r1)
+ bt8k mfail
+ bornot.b #3, @(3, r1)
+ bf8k mfail
+
+ bornot.b #4, @(3, r1)
+ bf8k mfail
+ bandnot.b #5, @(3, r1)
+ bt8k mfail
+ bornot.b #6, @(3, r1)
+ bf8k mfail
+ bandnot.b #7, @(3, r1)
+ bt8k mfail
+
+ bandnot.b #0, @(2, r1)
+ bt8k mfail
+ bornot.b #1, @(2, r1)
+ bf8k mfail
+ bandnot.b #2, @(2, r1)
+ bt8k mfail
+ bornot.b #3, @(2, r1)
+ bf8k mfail
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+
+.L2:
+ bornot.b #4, @(2, r1)
+ bf8k mfail
+ bandnot.b #5, @(2, r1)
+ bt8k mfail
+ bornot.b #6, @(2, r1)
+ bf8k mfail
+ bandnot.b #7, @(2, r1)
+ bt8k mfail
+
+ bandnot.b #0, @(1, r1)
+ bt8k mfail
+ bornot.b #1, @(1, r1)
+ bf8k mfail
+ bandnot.b #2, @(1, r1)
+ bt8k mfail
+ bornot.b #3, @(1, r1)
+ bf8k mfail
+
+ bornot.b #4, @(1, r1)
+ bf8k mfail
+ bandnot.b #5, @(1, r1)
+ bt8k mfail
+ bornot.b #6, @(1, r1)
+ bf8k mfail
+ bandnot.b #7, @(1, r1)
+ bt8k mfail
+
+ bandnot.b #0, @(0, r1)
+ bt8k mfail
+ bornot.b #1, @(0, r1)
+ bf8k mfail
+ bandnot.b #2, @(0, r1)
+ bt8k mfail
+ bornot.b #3, @(0, r1)
+ bf8k mfail
+
+ bornot.b #4, @(0, r1)
+ bf8k mfail
+ bandnot.b #5, @(0, r1)
+ bt8k mfail
+ bornot.b #6, @(0, r1)
+ bf8k mfail
+ bandnot.b #7, @(0, r1)
+ bt8k mfail
+
+ assertreg _x, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/bclr.s b/sim/testsuite/sim/sh/bclr.s
new file mode 100644
index 00000000000..cbe1c7e618d
--- /dev/null
+++ b/sim/testsuite/sim/sh/bclr.s
@@ -0,0 +1,139 @@
+# sh testcase for bclr
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xffffffff
+_y: .long 0x55555555
+
+ start
+
+bclr_b_imm_disp12_reg:
+ set_grs_a5a5
+ mov.l x, r1
+
+ bclr.b #0, @(3, r1)
+ assertmem _x, 0xfffffffe
+ bclr.b #1, @(3, r1)
+ assertmem _x, 0xfffffffc
+ bclr.b #2, @(3, r1)
+ assertmem _x, 0xfffffff8
+ bclr.b #3, @(3, r1)
+ assertmem _x, 0xfffffff0
+
+ bclr.b #4, @(3, r1)
+ assertmem _x, 0xffffffe0
+ bclr.b #5, @(3, r1)
+ assertmem _x, 0xffffffc0
+ bclr.b #6, @(3, r1)
+ assertmem _x, 0xffffff80
+ bclr.b #7, @(3, r1)
+ assertmem _x, 0xffffff00
+
+ bclr.b #0, @(2, r1)
+ assertmem _x, 0xfffffe00
+ bclr.b #1, @(2, r1)
+ assertmem _x, 0xfffffc00
+ bclr.b #2, @(2, r1)
+ assertmem _x, 0xfffff800
+ bclr.b #3, @(2, r1)
+ assertmem _x, 0xfffff000
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+y: .long _y
+
+.L2:
+ bclr.b #4, @(2, r1)
+ assertmem _x, 0xffffe000
+ bclr.b #5, @(2, r1)
+ assertmem _x, 0xffffc000
+ bclr.b #6, @(2, r1)
+ assertmem _x, 0xffff8000
+ bclr.b #7, @(2, r1)
+ assertmem _x, 0xffff0000
+
+ bclr.b #0, @(1, r1)
+ assertmem _x, 0xfffe0000
+ bclr.b #1, @(1, r1)
+ assertmem _x, 0xfffc0000
+ bclr.b #2, @(1, r1)
+ assertmem _x, 0xfff80000
+ bclr.b #3, @(1, r1)
+ assertmem _x, 0xfff00000
+
+ bclr.b #4, @(1, r1)
+ assertmem _x, 0xffe00000
+ bclr.b #5, @(1, r1)
+ assertmem _x, 0xffc00000
+ bclr.b #6, @(1, r1)
+ assertmem _x, 0xff800000
+ bclr.b #7, @(1, r1)
+ assertmem _x, 0xff000000
+
+ bclr.b #0, @(0, r1)
+ assertmem _x, 0xfe000000
+ bclr.b #1, @(0, r1)
+ assertmem _x, 0xfc000000
+ bclr.b #2, @(0, r1)
+ assertmem _x, 0xf8000000
+ bclr.b #3, @(0, r1)
+ assertmem _x, 0xf0000000
+
+ bclr.b #4, @(0, r1)
+ assertmem _x, 0xe0000000
+ bclr.b #5, @(0, r1)
+ assertmem _x, 0xc0000000
+ bclr.b #6, @(0, r1)
+ assertmem _x, 0x80000000
+ bclr.b #7, @(0, r1)
+ assertmem _x, 0x00000000
+
+ assertreg _x, r1
+
+bclr_imm_reg:
+ set_greg 0xff, r1
+ bclr #0, r1
+ assertreg 0xfe, r1
+ bclr #1, r1
+ assertreg 0xfc, r1
+ bclr #2, r1
+ assertreg 0xf8, r1
+ bclr #3, r1
+ assertreg 0xf0, r1
+
+ bclr #4, r1
+ assertreg 0xe0, r1
+ bclr #5, r1
+ assertreg 0xc0, r1
+ bclr #6, r1
+ assertreg 0x80, r1
+ bclr #7, r1
+ assertreg 0x00, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/bld.s b/sim/testsuite/sim/sh/bld.s
new file mode 100644
index 00000000000..172718df676
--- /dev/null
+++ b/sim/testsuite/sim/sh/bld.s
@@ -0,0 +1,121 @@
+# sh testcase for bld
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xa5a5a5a5
+_y: .long 0x55555555
+
+ start
+
+bld_b_imm_disp12_reg:
+ set_grs_a5a5
+ mov.l x, r1
+
+ bld.b #0, @(0, r1)
+ bf8k mfail
+ bld.b #1, @(0, r1)
+ bt8k mfail
+ bld.b #2, @(0, r1)
+ bf8k mfail
+ bld.b #3, @(0, r1)
+ bt8k mfail
+
+ bld.b #4, @(0, r1)
+ bt8k mfail
+ bld.b #5, @(0, r1)
+ bf8k mfail
+ bld.b #6, @(0, r1)
+ bt8k mfail
+ bld.b #7, @(0, r1)
+ bf8k mfail
+
+ bld.b #0, @(1, r1)
+ bf8k mfail
+ bld.b #1, @(1, r1)
+ bt8k mfail
+ bld.b #2, @(1, r1)
+ bf8k mfail
+ bld.b #3, @(1, r1)
+ bt8k mfail
+
+ bld.b #4, @(1, r1)
+ bt8k mfail
+ bld.b #5, @(1, r1)
+ bf8k mfail
+ bld.b #6, @(1, r1)
+ bt8k mfail
+ bld.b #7, @(1, r1)
+ bf8k mfail
+
+ bld.b #0, @(2, r1)
+ bf8k mfail
+ bld.b #1, @(2, r1)
+ bt8k mfail
+ bld.b #2, @(2, r1)
+ bf8k mfail
+ bld.b #3, @(2, r1)
+ bt8k mfail
+
+ bld.b #4, @(2, r1)
+ bt8k mfail
+ bld.b #5, @(2, r1)
+ bf8k mfail
+ bld.b #6, @(2, r1)
+ bt8k mfail
+ bld.b #7, @(2, r1)
+ bf8k mfail
+
+ bld.b #0, @(3, r1)
+ bf8k mfail
+ bld.b #1, @(3, r1)
+ bt8k mfail
+ bld.b #2, @(3, r1)
+ bf8k mfail
+ bld.b #3, @(3, r1)
+ bt8k mfail
+
+ bld.b #4, @(3, r1)
+ bt8k mfail
+ bld.b #5, @(3, r1)
+ bf8k mfail
+ bld.b #6, @(3, r1)
+ bt8k mfail
+ bld.b #7, @(3, r1)
+ bf8k mfail
+
+ assertreg _x, r1
+
+bld_imm_reg:
+ set_greg 0xa5a5a5a5, r1
+ bld #0, r1
+ bf8k mfail
+ bld #1, r1
+ bt8k mfail
+ bld #2, r1
+ bf8k mfail
+ bld #3, r1
+ bt8k mfail
+
+ bld #4, r1
+ bt8k mfail
+ bld #5, r1
+ bf8k mfail
+ bld #6, r1
+ bt8k mfail
+ bld #7, r1
+ bf8k mfail
+
+ test_grs_a5a5
+
+ pass
+
+ exit 0
+
+ .align 2
+x: .long _x
+y: .long _y
+
diff --git a/sim/testsuite/sim/sh/bldnot.s b/sim/testsuite/sim/sh/bldnot.s
new file mode 100644
index 00000000000..eda87def9c2
--- /dev/null
+++ b/sim/testsuite/sim/sh/bldnot.s
@@ -0,0 +1,102 @@
+# sh testcase for bldnot
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xa5a5a5a5
+_y: .long 0x55555555
+
+ start
+
+bldnot_b_imm_disp12_reg:
+ set_grs_a5a5
+ mov.l x, r1
+
+ bldnot.b #0, @(0, r1)
+ bt8k mfail
+ bldnot.b #1, @(0, r1)
+ bf8k mfail
+ bldnot.b #2, @(0, r1)
+ bt8k mfail
+ bldnot.b #3, @(0, r1)
+ bf8k mfail
+
+ bldnot.b #4, @(0, r1)
+ bf8k mfail
+ bldnot.b #5, @(0, r1)
+ bt8k mfail
+ bldnot.b #6, @(0, r1)
+ bf8k mfail
+ bldnot.b #7, @(0, r1)
+ bt8k mfail
+
+ bldnot.b #0, @(1, r1)
+ bt8k mfail
+ bldnot.b #1, @(1, r1)
+ bf8k mfail
+ bldnot.b #2, @(1, r1)
+ bt8k mfail
+ bldnot.b #3, @(1, r1)
+ bf8k mfail
+
+ bldnot.b #4, @(1, r1)
+ bf8k mfail
+ bldnot.b #5, @(1, r1)
+ bt8k mfail
+ bldnot.b #6, @(1, r1)
+ bf8k mfail
+ bldnot.b #7, @(1, r1)
+ bt8k mfail
+
+ bldnot.b #0, @(2, r1)
+ bt8k mfail
+ bldnot.b #1, @(2, r1)
+ bf8k mfail
+ bldnot.b #2, @(2, r1)
+ bt8k mfail
+ bldnot.b #3, @(2, r1)
+ bf8k mfail
+
+ bldnot.b #4, @(2, r1)
+ bf8k mfail
+ bldnot.b #5, @(2, r1)
+ bt8k mfail
+ bldnot.b #6, @(2, r1)
+ bf8k mfail
+ bldnot.b #7, @(2, r1)
+ bt8k mfail
+
+ bldnot.b #0, @(3, r1)
+ bt8k mfail
+ bldnot.b #1, @(3, r1)
+ bf8k mfail
+ bldnot.b #2, @(3, r1)
+ bt8k mfail
+ bldnot.b #3, @(3, r1)
+ bf8k mfail
+
+ bldnot.b #4, @(3, r1)
+ bf8k mfail
+ bldnot.b #5, @(3, r1)
+ bt8k mfail
+ bldnot.b #6, @(3, r1)
+ bf8k mfail
+ bldnot.b #7, @(3, r1)
+ bt8k mfail
+
+ assertreg _x, r1
+ set_greg 0xa5a5a5a5, r1
+
+ test_grs_a5a5
+
+ pass
+
+ exit 0
+
+ .align 2
+x: .long _x
+y: .long _y
+
diff --git a/sim/testsuite/sim/sh/bset.s b/sim/testsuite/sim/sh/bset.s
new file mode 100644
index 00000000000..13ae246e39c
--- /dev/null
+++ b/sim/testsuite/sim/sh/bset.s
@@ -0,0 +1,139 @@
+# sh testcase for bset
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0
+_y: .long 0x55555555
+
+ start
+
+bset_b_imm_disp12_reg:
+ set_grs_a5a5
+ mov.l x, r1
+
+ bset.b #0, @(3, r1)
+ assertmem _x, 0x1
+ bset.b #1, @(3, r1)
+ assertmem _x, 0x3
+ bset.b #2, @(3, r1)
+ assertmem _x, 0x7
+ bset.b #3, @(3, r1)
+ assertmem _x, 0xf
+
+ bset.b #4, @(3, r1)
+ assertmem _x, 0x1f
+ bset.b #5, @(3, r1)
+ assertmem _x, 0x3f
+ bset.b #6, @(3, r1)
+ assertmem _x, 0x7f
+ bset.b #7, @(3, r1)
+ assertmem _x, 0xff
+
+ bset.b #0, @(2, r1)
+ assertmem _x, 0x1ff
+ bset.b #1, @(2, r1)
+ assertmem _x, 0x3ff
+ bset.b #2, @(2, r1)
+ assertmem _x, 0x7ff
+ bset.b #3, @(2, r1)
+ assertmem _x, 0xfff
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+y: .long _y
+
+.L2:
+ bset.b #4, @(2, r1)
+ assertmem _x, 0x1fff
+ bset.b #5, @(2, r1)
+ assertmem _x, 0x3fff
+ bset.b #6, @(2, r1)
+ assertmem _x, 0x7fff
+ bset.b #7, @(2, r1)
+ assertmem _x, 0xffff
+
+ bset.b #0, @(1, r1)
+ assertmem _x, 0x1ffff
+ bset.b #1, @(1, r1)
+ assertmem _x, 0x3ffff
+ bset.b #2, @(1, r1)
+ assertmem _x, 0x7ffff
+ bset.b #3, @(1, r1)
+ assertmem _x, 0xfffff
+
+ bset.b #4, @(1, r1)
+ assertmem _x, 0x1fffff
+ bset.b #5, @(1, r1)
+ assertmem _x, 0x3fffff
+ bset.b #6, @(1, r1)
+ assertmem _x, 0x7fffff
+ bset.b #7, @(1, r1)
+ assertmem _x, 0xffffff
+
+ bset.b #0, @(0, r1)
+ assertmem _x, 0x1ffffff
+ bset.b #1, @(0, r1)
+ assertmem _x, 0x3ffffff
+ bset.b #2, @(0, r1)
+ assertmem _x, 0x7ffffff
+ bset.b #3, @(0, r1)
+ assertmem _x, 0xfffffff
+
+ bset.b #4, @(0, r1)
+ assertmem _x, 0x1fffffff
+ bset.b #5, @(0, r1)
+ assertmem _x, 0x3fffffff
+ bset.b #6, @(0, r1)
+ assertmem _x, 0x7fffffff
+ bset.b #7, @(0, r1)
+ assertmem _x, 0xffffffff
+
+ assertreg _x, r1
+
+bset_imm_reg:
+ set_greg 0, r1
+ bset #0, r1
+ assertreg 0x1, r1
+ bset #1, r1
+ assertreg 0x3, r1
+ bset #2, r1
+ assertreg 0x7, r1
+ bset #3, r1
+ assertreg 0xf, r1
+
+ bset #4, r1
+ assertreg 0x1f, r1
+ bset #5, r1
+ assertreg 0x3f, r1
+ bset #6, r1
+ assertreg 0x7f, r1
+ bset #7, r1
+ assertreg 0xff, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/bst.s b/sim/testsuite/sim/sh/bst.s
new file mode 100644
index 00000000000..e8b6d656ec3
--- /dev/null
+++ b/sim/testsuite/sim/sh/bst.s
@@ -0,0 +1,142 @@
+# sh testcase for bst
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0
+_y: .long 0x55555555
+
+ start
+
+bst_b_imm_disp12_reg:
+ set_grs_a5a5
+ # Make sure T is true to start.
+ sett
+
+ mov.l x, r1
+
+ bst.b #0, @(3, r1)
+ assertmem _x, 0x1
+ bst.b #1, @(3, r1)
+ assertmem _x, 0x3
+ bst.b #2, @(3, r1)
+ assertmem _x, 0x7
+ bst.b #3, @(3, r1)
+ assertmem _x, 0xf
+
+ bst.b #4, @(3, r1)
+ assertmem _x, 0x1f
+ bst.b #5, @(3, r1)
+ assertmem _x, 0x3f
+ bst.b #6, @(3, r1)
+ assertmem _x, 0x7f
+ bst.b #7, @(3, r1)
+ assertmem _x, 0xff
+
+ bst.b #0, @(2, r1)
+ assertmem _x, 0x1ff
+ bst.b #1, @(2, r1)
+ assertmem _x, 0x3ff
+ bst.b #2, @(2, r1)
+ assertmem _x, 0x7ff
+ bst.b #3, @(2, r1)
+ assertmem _x, 0xfff
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+y: .long _y
+
+.L2:
+ bst.b #4, @(2, r1)
+ assertmem _x, 0x1fff
+ bst.b #5, @(2, r1)
+ assertmem _x, 0x3fff
+ bst.b #6, @(2, r1)
+ assertmem _x, 0x7fff
+ bst.b #7, @(2, r1)
+ assertmem _x, 0xffff
+
+ bst.b #0, @(1, r1)
+ assertmem _x, 0x1ffff
+ bst.b #1, @(1, r1)
+ assertmem _x, 0x3ffff
+ bst.b #2, @(1, r1)
+ assertmem _x, 0x7ffff
+ bst.b #3, @(1, r1)
+ assertmem _x, 0xfffff
+
+ bst.b #4, @(1, r1)
+ assertmem _x, 0x1fffff
+ bst.b #5, @(1, r1)
+ assertmem _x, 0x3fffff
+ bst.b #6, @(1, r1)
+ assertmem _x, 0x7fffff
+ bst.b #7, @(1, r1)
+ assertmem _x, 0xffffff
+
+ bst.b #0, @(0, r1)
+ assertmem _x, 0x1ffffff
+ bst.b #1, @(0, r1)
+ assertmem _x, 0x3ffffff
+ bst.b #2, @(0, r1)
+ assertmem _x, 0x7ffffff
+ bst.b #3, @(0, r1)
+ assertmem _x, 0xfffffff
+
+ bst.b #4, @(0, r1)
+ assertmem _x, 0x1fffffff
+ bst.b #5, @(0, r1)
+ assertmem _x, 0x3fffffff
+ bst.b #6, @(0, r1)
+ assertmem _x, 0x7fffffff
+ bst.b #7, @(0, r1)
+ assertmem _x, 0xffffffff
+
+ assertreg _x, r1
+
+bst_imm_reg:
+ set_greg 0, r1
+ bst #0, r1
+ assertreg 0x1, r1
+ bst #1, r1
+ assertreg 0x3, r1
+ bst #2, r1
+ assertreg 0x7, r1
+ bst #3, r1
+ assertreg 0xf, r1
+
+ bst #4, r1
+ assertreg 0x1f, r1
+ bst #5, r1
+ assertreg 0x3f, r1
+ bst #6, r1
+ assertreg 0x7f, r1
+ bst #7, r1
+ assertreg 0xff, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/bxor.s b/sim/testsuite/sim/sh/bxor.s
new file mode 100644
index 00000000000..abedd38eb09
--- /dev/null
+++ b/sim/testsuite/sim/sh/bxor.s
@@ -0,0 +1,120 @@
+# sh testcase for bxor
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .align 2
+_x: .long 0xa5a5a5a5
+
+ start
+
+bxor_b_imm_disp12_reg:
+ set_grs_a5a5
+ # Make sure T is true to start.
+ sett
+
+ mov.l x, r1
+
+ bxor.b #0, @(3, r1)
+ bt8k mfail
+ bxor.b #1, @(3, r1)
+ bt8k mfail
+ bxor.b #2, @(3, r1)
+ bf8k mfail
+ bxor.b #3, @(3, r1)
+ bf8k mfail
+
+ bxor.b #4, @(3, r1)
+ bf8k mfail
+ bxor.b #5, @(3, r1)
+ bt8k mfail
+ bxor.b #6, @(3, r1)
+ bt8k mfail
+ bxor.b #7, @(3, r1)
+ bf8k mfail
+
+ bxor.b #0, @(2, r1)
+ bt8k mfail
+ bxor.b #1, @(2, r1)
+ bt8k mfail
+ bxor.b #2, @(2, r1)
+ bf8k mfail
+ bxor.b #3, @(2, r1)
+ bf8k mfail
+
+ bra .L2
+ nop
+
+ .align 2
+x: .long _x
+
+.L2:
+ bxor.b #4, @(2, r1)
+ bf8k mfail
+ bxor.b #5, @(2, r1)
+ bt8k mfail
+ bxor.b #6, @(2, r1)
+ bt8k mfail
+ bxor.b #7, @(2, r1)
+ bf8k mfail
+
+ bxor.b #0, @(1, r1)
+ bt8k mfail
+ bxor.b #1, @(1, r1)
+ bt8k mfail
+ bxor.b #2, @(1, r1)
+ bf8k mfail
+ bxor.b #3, @(1, r1)
+ bf8k mfail
+
+ bxor.b #4, @(1, r1)
+ bf8k mfail
+ bxor.b #5, @(1, r1)
+ bt8k mfail
+ bxor.b #6, @(1, r1)
+ bt8k mfail
+ bxor.b #7, @(1, r1)
+ bf8k mfail
+
+ bxor.b #0, @(0, r1)
+ bt8k mfail
+ bxor.b #1, @(0, r1)
+ bt8k mfail
+ bxor.b #2, @(0, r1)
+ bf8k mfail
+ bxor.b #3, @(0, r1)
+ bf8k mfail
+
+ bxor.b #4, @(0, r1)
+ bf8k mfail
+ bxor.b #5, @(0, r1)
+ bt8k mfail
+ bxor.b #6, @(0, r1)
+ bt8k mfail
+ bxor.b #7, @(0, r1)
+ bf8k mfail
+
+ assertreg _x, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+
diff --git a/sim/testsuite/sim/sh/clip.s b/sim/testsuite/sim/sh/clip.s
new file mode 100644
index 00000000000..12770c381db
--- /dev/null
+++ b/sim/testsuite/sim/sh/clip.s
@@ -0,0 +1,89 @@
+# sh testcase for clips, clipu
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+
+clips_b:
+ set_grs_a5a5
+ clips.b r1
+ test_gr0_a5a5
+ assertreg 0xffffff80 r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+clipu_b:
+ set_grs_a5a5
+ clipu.b r1
+ test_gr0_a5a5
+ assertreg 0xff r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+clips_w:
+ set_grs_a5a5
+ clips.w r1
+ test_gr0_a5a5
+ assertreg 0xffff8000 r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+clipu_w:
+ set_grs_a5a5
+ clipu.w r1
+ test_gr0_a5a5
+ assertreg 0xffff r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
diff --git a/sim/testsuite/sim/sh/div.s b/sim/testsuite/sim/sh/div.s
new file mode 100644
index 00000000000..8293c2117f1
--- /dev/null
+++ b/sim/testsuite/sim/sh/div.s
@@ -0,0 +1,199 @@
+# sh testcase for divs and divu
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+
+divs_1: ! divide by one
+ set_grs_a5a5
+ mov #1, r0
+ divs r0, r1
+ assertreg0 1
+ test_gr_a5a5 r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divs_2: ! divide by two
+ set_grs_a5a5
+ mov #2, r0
+ divs r0, r1
+ assertreg0 2
+ assertreg 0xd2d2d2d3, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divs_3: ! divide by three
+ set_grs_a5a5
+ mov #3, r0
+ divs r0, r1
+ assertreg0 3
+ assertreg 0xe1e1e1e2, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divs_0: ! divide by zero
+ set_grs_a5a5
+ mov #0, r0
+ divs r0, r1
+ assertreg0 0
+ assertreg 0x7fffffff, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divs_o: ! divide signed overflow
+ set_grs_a5a5
+ mov #16, r0
+ movi20 #0x8000, r1
+ shad r0, r1 ! r1 == 0x80000000
+ mov #-1, r0
+ divs r0, r1
+ assertreg0 -1
+ assertreg 0x7fffffff, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+
+divu_1: ! divide by one, unsigned
+ set_grs_a5a5
+ mov #1, r0
+ divu r0, r1
+ assertreg0 1
+ test_gr_a5a5 r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divu_2: ! divide by two, unsigned
+ set_grs_a5a5
+ mov #2, r0
+ divu r0, r1
+ assertreg0 2
+ assertreg 0x52d2d2d2, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divu_3: ! divide by three, unsigned
+ set_grs_a5a5
+ mov #3, r0
+ divu r0, r1
+ assertreg0 3
+ assertreg 0x37373737, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+divu_0: ! divide by zero, unsigned
+ set_grs_a5a5
+ mov #0, r0
+ divu r0, r1
+ assertreg0 0
+ assertreg 0xffffffff, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+
+ pass
+
+ exit 0
+
+ \ No newline at end of file
diff --git a/sim/testsuite/sim/sh/fail.s b/sim/testsuite/sim/sh/fail.s
new file mode 100644
index 00000000000..0ffb0b2a6ff
--- /dev/null
+++ b/sim/testsuite/sim/sh/fail.s
@@ -0,0 +1,13 @@
+# sh testcase, fail
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+
+ fail
+
+ exit 0
+
diff --git a/sim/testsuite/sim/sh/fsca.s b/sim/testsuite/sim/sh/fsca.s
new file mode 100644
index 00000000000..90df6c97680
--- /dev/null
+++ b/sim/testsuite/sim/sh/fsca.s
@@ -0,0 +1,97 @@
+# sh testcase for fsca
+# mach: sh
+# as(sh): -defsym sim_cpu=0
+
+ .include "testutils.inc"
+
+ start
+fsca:
+ set_grs_a5a5
+ set_fprs_a5a5
+ # Start with angle zero
+ mov.l zero, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 0, fr2
+ assert_fpreg_i 1, fr3
+
+ mov.l plus_90, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 1, fr2
+ assert_fpreg_i 0, fr3
+
+ mov.l plus_180, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 0, fr2
+ assert_fpreg_i -1, fr3
+
+ mov.l plus_270, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i -1, fr2
+ assert_fpreg_i 0, fr3
+
+ mov.l plus_360, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 0, fr2
+ assert_fpreg_i 1, fr3
+
+ mov.l minus_90, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i -1, fr2
+ assert_fpreg_i 0, fr3
+
+ mov.l minus_180, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 0, fr2
+ assert_fpreg_i -1, fr3
+
+ mov.l minus_270, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 1, fr2
+ assert_fpreg_i 0, fr3
+
+ mov.l minus_360, r0
+ lds r0, fpul
+ fsca fpul, dr2
+ assert_fpreg_i 0, fr2
+ assert_fpreg_i 1, fr3
+
+ assertreg0 0xffff0000
+ set_greg 0xa5a5a5a5, r0
+ test_grs_a5a5
+ test_fpr_a5a5 fr0
+ test_fpr_a5a5 fr1
+ test_fpr_a5a5 fr4
+ test_fpr_a5a5 fr5
+ test_fpr_a5a5 fr6
+ test_fpr_a5a5 fr7
+ test_fpr_a5a5 fr8
+ test_fpr_a5a5 fr9
+ test_fpr_a5a5 fr10
+ test_fpr_a5a5 fr11
+ test_fpr_a5a5 fr12
+ test_fpr_a5a5 fr13
+ test_fpr_a5a5 fr14
+ test_fpr_a5a5 fr15
+ pass
+ exit 0
+
+ .align 2
+zero: .long 0
+one_bitty: .long 1
+plus_90: .long 0x04000
+plus_180: .long 0x08000
+plus_270: .long 0x0c000
+plus_360: .long 0x10000
+minus_90: .long 0xffffc000
+minus_180: .long 0xffff8000
+minus_270: .long 0xffff4000
+minus_360: .long 0xffff0000
+minus_1_bitty: .long 0xffffffff
diff --git a/sim/testsuite/sim/sh/fsrra.s b/sim/testsuite/sim/sh/fsrra.s
new file mode 100644
index 00000000000..fdd22356d66
--- /dev/null
+++ b/sim/testsuite/sim/sh/fsrra.s
@@ -0,0 +1,62 @@
+# sh testcase for fsrra
+# mach: sh
+# as(sh): -defsym sim_cpu=0
+
+ .include "testutils.inc"
+
+ start
+fsrra_single:
+ set_grs_a5a5
+ set_fprs_a5a5
+ # 1/sqrt(0.0) = +infinity.
+ fldi0 fr0
+ fsrra fr0
+ assert_fpreg_x 0x7f800000, fr0
+
+ # 1/sqrt(1.0) = 1.0.
+ fldi1 fr0
+ fsrra fr0
+ assert_fpreg_i 1, fr0
+
+ # 1/sqrt(4.0) = 1/2.0
+ fldi1 fr0
+ # Double it.
+ fadd fr0, fr0
+ # Double it again.
+ fadd fr0, fr0
+ fsrra fr0
+ fldi1 fr2
+ # Double it.
+ fadd fr2, fr2
+ fldi1 fr1
+ # Divide
+ fdiv fr2, fr1
+ fcmp/eq fr0, fr1
+ bt .L2
+ fail
+.L2:
+ # Double-check (pun intended)
+ fadd fr0, fr0
+ assert_fpreg_i 1, fr0
+ fadd fr1, fr1
+ assert_fpreg_i 1, fr1
+
+ # And make sure the rest of the regs are un-affected.
+ assert_fpreg_i 2, fr2
+ test_fpr_a5a5 fr3
+ test_fpr_a5a5 fr4
+ test_fpr_a5a5 fr5
+ test_fpr_a5a5 fr6
+ test_fpr_a5a5 fr7
+ test_fpr_a5a5 fr8
+ test_fpr_a5a5 fr9
+ test_fpr_a5a5 fr10
+ test_fpr_a5a5 fr11
+ test_fpr_a5a5 fr12
+ test_fpr_a5a5 fr13
+ test_fpr_a5a5 fr14
+ test_fpr_a5a5 fr15
+ test_grs_a5a5
+
+ pass
+ exit 0
diff --git a/sim/testsuite/sim/sh/mov.s b/sim/testsuite/sim/sh/mov.s
new file mode 100644
index 00000000000..37fef514401
--- /dev/null
+++ b/sim/testsuite/sim/sh/mov.s
@@ -0,0 +1,118 @@
+# sh testcase for all mov.[bwl] instructions
+# mach: sh
+# as(sh): -defsym sim_cpu=0
+
+ .include "testutils.inc"
+
+ .align 2
+_lsrc: .long 0x55555555
+_wsrc: .long 0x55550000
+_bsrc: .long 0x55000000
+
+ .align 2
+_ldst: .long 0
+_wdst: .long 0
+_bdst: .long 0
+
+
+ start
+
+movb_disp12_reg: # Test 8-bit @(disp12,gr) -> gr
+ set_grs_a5a5
+ mov.l bsrc, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.b @(444,r1), r2
+
+ assertreg _bsrc-444, r1
+ assertreg 0x55, r2
+
+movb_reg_disp12: # Test 8-bit gr -> @(disp12,gr)
+ set_grs_a5a5
+ mov.l bdst, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.b r2, @(444,r1)
+
+ assertreg _bdst-444, r1
+ assertmem _bdst, 0xa5000000
+
+movw_disp12_reg: # Test 16-bit @(disp12,gr) -> gr
+ set_grs_a5a5
+ mov.l wsrc, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.w @(444,r1), r2
+
+ assertreg _wsrc-444, r1
+ assertreg 0x5555, r2
+
+movw_reg_disp12: # Test 16-bit gr -> @(disp12,gr)
+ set_grs_a5a5
+ mov.l wdst, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.w r2, @(444,r1)
+
+ assertreg _wdst-444, r1
+ assertmem _wdst, 0xa5a50000
+
+movl_disp12_reg: # Test 32-bit @(disp12,gr) -> gr
+ set_grs_a5a5
+ mov.l lsrc, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.l @(444,r1), r2
+
+ assertreg _lsrc-444, r1
+ assertreg 0x55555555, r2
+
+movl_reg_disp12: # Test 32-bit gr -> @(disp12,gr)
+ set_grs_a5a5
+ mov.l ldst, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ add #-111, r1
+ mov.l r2, @(444,r1)
+
+ assertreg _ldst-444, r1
+ assertmem _ldst, 0xa5a5a5a5
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ pass
+
+ exit 0
+
+lsrc: .long _lsrc
+wsrc: .long _wsrc
+bsrc: .long _bsrc
+
+ldst: .long _ldst
+wdst: .long _wdst
+bdst: .long _bdst
+
diff --git a/sim/testsuite/sim/sh/movi.s b/sim/testsuite/sim/sh/movi.s
index b79f8d2131a..e54f4f6597a 100644
--- a/sim/testsuite/sim/sh/movi.s
+++ b/sim/testsuite/sim/sh/movi.s
@@ -1,7 +1,6 @@
-# sh testcase for mov <#imm>
-# mach: all
+# sh testcase for all mov <#imm> instructions
+# mach: sh
# as(sh): -defsym sim_cpu=0
-# as(shdsp): -defsym sim_cpu=1 -dsp
.include "testutils.inc"
@@ -28,6 +27,48 @@ mov_i_reg: # Test <imm8>
test_gr_a5a5 r13
test_gr_a5a5 r14
+movi20_reg: # Test <imm20>
+ set_grs_a5a5
+ movi20 #-0x55555,r1
+
+ assertreg 0xfffaaaab, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+movi20s_reg: # Test <imm20> << 8
+ set_grs_a5a5
+ movi20s #-0x5555500,r1
+
+ assertreg 0xfaaaab00, r1
+
+ test_gr_a5a5 r0
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
pass
exit 0
diff --git a/sim/testsuite/sim/sh/movua.s b/sim/testsuite/sim/sh/movua.s
index e8620f0b429..fa12fe53f8c 100644
--- a/sim/testsuite/sim/sh/movua.s
+++ b/sim/testsuite/sim/sh/movua.s
@@ -10,55 +10,107 @@ movua_1:
set_grs_a5a5
mov.l srcp, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x03020100
+.else
assertreg0 0x00010203
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x04030201
+.else
assertreg0 0x01020304
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x05040302
+.else
assertreg0 0x02030405
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x06050403
+.else
assertreg0 0x03040506
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x07060504
+.else
assertreg0 0x04050607
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x08070605
+.else
assertreg0 0x05060708
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x09080706
+.else
assertreg0 0x06070809
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0a090807
+.else
assertreg0 0x0708090a
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0b0a0908
+.else
assertreg0 0x08090a0b
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0c0b0a09
+.else
assertreg0 0x090a0b0c
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0d0c0b0a
+.else
assertreg0 0x0a0b0c0d
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0e0d0c0b
+.else
assertreg0 0x0b0c0d0e
+.endif
add #1, r1
movua.l @r1, r0
+.ifdef LITTLE
+ assertreg0 0x0f0e0d0c
+.else
assertreg0 0x0c0d0e0f
+.endif
assertreg src+12, r1
test_gr_a5a5 r2
@@ -87,25 +139,41 @@ movua_4:
set_grs_a5a5
mov.l srcp2, r1
movua.l @r1+, r0
+.ifdef LITTLE
+ assertreg0 0x03020100
+.else
assertreg0 0x00010203
+.endif
assertreg src+4, r1
mov.l srcp2, r1
add #1, r1
movua.l @r1+, r0
+.ifdef LITTLE
+ assertreg0 0x04030201
+.else
assertreg0 0x01020304
+.endif
assertreg src+5, r1
mov.l srcp2, r1
add #2, r1
movua.l @r1+, r0
+.ifdef LITTLE
+ assertreg0 0x05040302
+.else
assertreg0 0x02030405
+.endif
assertreg src+6, r1
mov.l srcp2, r1
add #3, r1
movua.l @r1+, r0
+.ifdef LITTLE
+ assertreg0 0x06050403
+.else
assertreg0 0x03040506
+.endif
assertreg src+7, r1
test_gr_a5a5 r2
diff --git a/sim/testsuite/sim/sh/mulr.s b/sim/testsuite/sim/sh/mulr.s
new file mode 100644
index 00000000000..1e755ab2de7
--- /dev/null
+++ b/sim/testsuite/sim/sh/mulr.s
@@ -0,0 +1,162 @@
+# sh testcase for mulr
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+
+mulr_1: ! multiply by one
+ set_grs_a5a5
+ mov #1, r0
+ mulr r0, r1
+ assertreg0 1
+ test_gr_a5a5 r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+mulr_2: ! multiply by two
+ set_grs_a5a5
+ mov #2, r0
+ mov #12, r1
+ mulr r0, r1
+ assertreg0 2
+ assertreg 24, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+mulr_3: ! multiply five by five
+ set_grs_a5a5
+ mov #5, r0
+ mov #5, r1
+ mulr r0, r1
+ assertreg0 5
+ assertreg 25, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+
+mulr_4: ! multiply 127 by 127
+ set_grs_a5a5
+ mov #127, r0
+ mov #127, r1
+ mulr r0, r1
+ assertreg0 127
+ assertreg 0x3f01, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+mulr_5: ! multiply -1 by -1
+ set_grs_a5a5
+ mov #-1, r0
+ mov #-1, r1
+ mulr r0, r1
+ assertreg0 -1
+ assertreg 1, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+mulr_6: ! multiply 46340 by 46340
+ set_grs_a5a5
+ movi20 #46340, r0
+ movi20 #46340, r1
+ mulr r0, r1
+ assertreg0 46340
+ assertreg 0x7ffea810, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+mulr_7: ! multiply 7ffff by 7ffff (overflow)
+ set_grs_a5a5
+ movi20 #0x7ffff, r0
+ movi20 #0x7ffff, r1
+ mulr r0, r1
+ assertreg0 0x7ffff
+ assertreg 0xfff00001, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+
+ pass
+
+ exit 0
+
+ \ No newline at end of file
diff --git a/sim/testsuite/sim/sh/pass.s b/sim/testsuite/sim/sh/pass.s
new file mode 100644
index 00000000000..cc3bbccd740
--- /dev/null
+++ b/sim/testsuite/sim/sh/pass.s
@@ -0,0 +1,14 @@
+# sh testcase, pass
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+ set_grs_a5a5
+ test_grs_a5a5
+ pass
+
+ exit 0
+
diff --git a/sim/testsuite/sim/sh/pushpop.s b/sim/testsuite/sim/sh/pushpop.s
new file mode 100644
index 00000000000..9ee5bfd6888
--- /dev/null
+++ b/sim/testsuite/sim/sh/pushpop.s
@@ -0,0 +1,146 @@
+# sh testcase for push/pop (mov,movml,movmu...) insns.
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ start
+movml_1:
+ set_greg 0, r0
+ set_greg 1, r1
+ set_greg 2, r2
+ set_greg 3, r3
+ set_greg 4, r4
+ set_greg 5, r5
+ set_greg 6, r6
+ set_greg 7, r7
+ set_greg 8, r8
+ set_greg 9, r9
+ set_greg 10, r10
+ set_greg 11, r11
+ set_greg 12, r12
+ set_greg 13, r13
+ set_greg 14, r14
+ set_sreg 15, pr
+
+ movml.l r15,@-r15
+
+ assertmem stackt-4, 15
+ assertmem stackt-8, 14
+ assertmem stackt-12, 13
+ assertmem stackt-16, 12
+ assertmem stackt-20, 11
+ assertmem stackt-24, 10
+ assertmem stackt-28, 9
+ assertmem stackt-32, 8
+ assertmem stackt-36, 7
+ assertmem stackt-40, 6
+ assertmem stackt-44, 5
+ assertmem stackt-48, 4
+ assertmem stackt-52, 3
+ assertmem stackt-56, 2
+ assertmem stackt-60, 1
+ assertmem stackt-64, 0
+
+ assertreg0 0
+ assertreg 1, r1
+ assertreg 2, r2
+ assertreg 3, r3
+ assertreg 4, r4
+ assertreg 5, r5
+ assertreg 6, r6
+ assertreg 7, r7
+ assertreg 8, r8
+ assertreg 9, r9
+ assertreg 10, r10
+ assertreg 11, r11
+ assertreg 12, r12
+ assertreg 13, r13
+ assertreg 14, r14
+ mov r15, r0
+ assertreg0 stackt-64
+
+movml_2:
+ set_grs_a5a5
+ movml.l @r15+, r15
+ assert_sreg 15, pr
+ assertreg0 0
+ assertreg 1, r1
+ assertreg 2, r2
+ assertreg 3, r3
+ assertreg 4, r4
+ assertreg 5, r5
+ assertreg 6, r6
+ assertreg 7, r7
+ assertreg 8, r8
+ assertreg 9, r9
+ assertreg 10, r10
+ assertreg 11, r11
+ assertreg 12, r12
+ assertreg 13, r13
+ assertreg 14, r14
+ mov r15, r0
+ assertreg0 stackt
+
+movmu_1:
+ set_grs_a5a5
+ add #1,r14
+ add #2,r13
+ add #3,r12
+ set_sreg 0xa5a5,pr
+
+ movmu.l r12,@-r15
+
+ assert_sreg 0xa5a5,pr
+ assertreg 0xa5a5a5a6, r14
+ assertreg 0xa5a5a5a7, r13
+ assertreg 0xa5a5a5a8, r12
+ test_gr_a5a5 r11
+ test_gr_a5a5 r10
+ test_gr_a5a5 r9
+ test_gr_a5a5 r8
+ test_gr_a5a5 r7
+ test_gr_a5a5 r6
+ test_gr_a5a5 r5
+ test_gr_a5a5 r4
+ test_gr_a5a5 r3
+ test_gr_a5a5 r2
+ test_gr_a5a5 r1
+ test_gr_a5a5 r0
+ mov r15, r0
+ assertreg stackt-16, r0
+
+ assertmem stackt-4, 0xa5a5
+ assertmem stackt-8, 0xa5a5a5a6
+ assertmem stackt-12, 0xa5a5a5a7
+ assertmem stackt-16, 0xa5a5a5a8
+
+movmu_2:
+ set_grs_a5a5
+ movmu.l @r15+,r12
+
+ assert_sreg 0xa5a5, pr
+ assertreg 0xa5a5a5a6, r14
+ assertreg 0xa5a5a5a7, r13
+ assertreg 0xa5a5a5a8, r12
+ test_gr_a5a5 r11
+ test_gr_a5a5 r10
+ test_gr_a5a5 r9
+ test_gr_a5a5 r8
+ test_gr_a5a5 r7
+ test_gr_a5a5 r6
+ test_gr_a5a5 r5
+ test_gr_a5a5 r4
+ test_gr_a5a5 r3
+ test_gr_a5a5 r2
+ test_gr_a5a5 r1
+ test_gr_a5a5 r0
+ mov r15, r0
+ assertreg stackt, r0
+
+ pass
+
+ exit 0
+
+ \ No newline at end of file
diff --git a/sim/testsuite/sim/sh/resbank.s b/sim/testsuite/sim/sh/resbank.s
new file mode 100644
index 00000000000..33801b86586
--- /dev/null
+++ b/sim/testsuite/sim/sh/resbank.s
@@ -0,0 +1,268 @@
+# sh testcase for ldbank stbank resbank
+# mach: all
+# as(sh): -defsym sim_cpu=0
+# as(shdsp): -defsym sim_cpu=1 -dsp
+
+ .include "testutils.inc"
+
+ .macro SEND reg bankno regno
+ set_greg ((\bankno << 7) + (\regno << 2)), \reg
+ .endm
+
+ start
+
+stbank_1:
+ set_grs_a5a5
+ mov #0, r0
+ SEND r1, 0, 0
+ stbank r0, @r1
+ mov #1, r0
+ SEND r1, 0, 1
+ stbank r0, @r1
+ mov #2, r0
+ SEND r1, 0, 2
+ stbank r0, @r1
+ mov #3, r0
+ SEND r1, 0, 3
+ stbank r0, @r1
+ mov #4, r0
+ SEND r1, 0, 4
+ stbank r0, @r1
+ mov #5, r0
+ SEND r1, 0, 5
+ stbank r0, @r1
+ mov #6, r0
+ SEND r1, 0, 6
+ stbank r0, @r1
+ mov #7, r0
+ SEND r1, 0, 7
+ stbank r0, @r1
+ mov #8, r0
+ SEND r1, 0, 8
+ stbank r0, @r1
+ mov #9, r0
+ SEND r1, 0, 9
+ stbank r0, @r1
+ mov #10, r0
+ SEND r1, 0, 10
+ stbank r0, @r1
+ mov #11, r0
+ SEND r1, 0, 11
+ stbank r0, @r1
+ mov #12, r0
+ SEND r1, 0, 12
+ stbank r0, @r1
+ mov #13, r0
+ SEND r1, 0, 13
+ stbank r0, @r1
+ mov #14, r0
+ SEND r1, 0, 14
+ stbank r0, @r1
+ mov #15, r0
+ SEND r1, 0, 15
+ stbank r0, @r1
+ mov #16, r0
+ SEND r1, 0, 16
+ stbank r0, @r1
+ mov #17, r0
+ SEND r1, 0, 17
+ stbank r0, @r1
+ mov #18, r0
+ SEND r1, 0, 18
+ stbank r0, @r1
+ mov #19, r0
+ SEND r1, 0, 19
+ stbank r0, @r1
+
+ assertreg0 19
+ assertreg 19 << 2, r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+ldbank_1:
+ set_grs_a5a5
+ SEND r1, 0, 0
+ ldbank @r1, r0
+ assertreg0 0
+ SEND r1, 0, 1
+ ldbank @r1, r0
+ assertreg0 1
+ SEND r1, 0, 2
+ ldbank @r1, r0
+ assertreg0 2
+ SEND r1, 0, 3
+ ldbank @r1, r0
+ assertreg0 3
+ SEND r1, 0, 4
+ ldbank @r1, r0
+ assertreg0 4
+ SEND r1, 0, 5
+ ldbank @r1, r0
+ assertreg0 5
+ SEND r1, 0, 6
+ ldbank @r1, r0
+ assertreg0 6
+ SEND r1, 0, 7
+ ldbank @r1, r0
+ assertreg0 7
+ SEND r1, 0, 8
+ ldbank @r1, r0
+ assertreg0 8
+ SEND r1, 0, 9
+ ldbank @r1, r0
+ assertreg0 9
+ SEND r1, 0, 10
+ ldbank @r1, r0
+ assertreg0 10
+ SEND r1, 0, 11
+ ldbank @r1, r0
+ assertreg0 11
+ SEND r1, 0, 12
+ ldbank @r1, r0
+ assertreg0 12
+ SEND r1, 0, 13
+ ldbank @r1, r0
+ assertreg0 13
+ SEND r1, 0, 14
+ ldbank @r1, r0
+ assertreg0 14
+ SEND r1, 0, 15
+ ldbank @r1, r0
+ assertreg0 15
+ SEND r1, 0, 16
+ ldbank @r1, r0
+ assertreg0 16
+ SEND r1, 0, 17
+ ldbank @r1, r0
+ assertreg0 17
+ SEND r1, 0, 18
+ ldbank @r1, r0
+ assertreg0 18
+ SEND r1, 0, 19
+ ldbank @r1, r0
+ assertreg0 19
+
+ assertreg (19 << 2), r1
+ test_gr_a5a5 r2
+ test_gr_a5a5 r3
+ test_gr_a5a5 r4
+ test_gr_a5a5 r5
+ test_gr_a5a5 r6
+ test_gr_a5a5 r7
+ test_gr_a5a5 r8
+ test_gr_a5a5 r9
+ test_gr_a5a5 r10
+ test_gr_a5a5 r11
+ test_gr_a5a5 r12
+ test_gr_a5a5 r13
+ test_gr_a5a5 r14
+
+resbank_1:
+ set_grs_a5a5
+ mov #1, r0
+ trapa #13 ! magic trap, sets ibnr
+
+ resbank
+
+ assertreg0 0
+ assertreg 1, r1
+ assertreg 2, r2
+ assertreg 3, r3
+ assertreg 4, r4
+ assertreg 5, r5
+ assertreg 6, r6
+ assertreg 7, r7
+ assertreg 8, r8
+ assertreg 9, r9
+ assertreg 10, r10
+ assertreg 11, r11
+ assertreg 12, r12
+ assertreg 13, r13
+ assertreg 14, r14
+ assert_sreg 15, mach
+ assert_sreg 17, pr
+ assert_creg 18, gbr
+ assert_sreg 19, macl
+
+resbank_2:
+ set_grs_a5a5
+ movi20 #555, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+ add #-1, r0
+ mov.l r0, @-r15
+
+ set_sr_bit (1 << 14) ! set BO
+
+ resbank
+
+ assert_sreg 555, macl
+ assert_sreg 554, mach
+ assert_creg 553, gbr
+ assert_sreg 552, pr
+ assertreg 551, r14
+ assertreg 550, r13
+ assertreg 549, r12
+ assertreg 548, r11
+ assertreg 547, r10
+ assertreg 546, r9
+ assertreg 545, r8
+ assertreg 544, r7
+ assertreg 543, r6
+ assertreg 542, r5
+ assertreg 541, r4
+ assertreg 540, r3
+ assertreg 539, r2
+ assertreg 538, r1
+ assertreg0 537
+
+ mov r15, r0
+ assertreg0 stackt
+
+ pass
+
+ exit 0
diff --git a/sim/testsuite/sim/sh/testutils.inc b/sim/testsuite/sim/sh/testutils.inc
index 8d3895e2581..c9644b40f8c 100644
--- a/sim/testsuite/sim/sh/testutils.inc
+++ b/sim/testsuite/sim/sh/testutils.inc
@@ -205,6 +205,19 @@ main:
bra mfail
nop
.endm
+ # Branch if false -- 8k range
+ .macro bf8k label
+ bt .Lbf8k\@
+ bra \label
+.Lbf8k\@:
+ .endm
+
+ # Branch if true -- 8k range
+ .macro bt8k label
+ bf .Lbt8k\@
+ bra \label
+.Lbt8k\@:
+ .endm
# Assert value of register (any general register but r0)
# Preserves r0 on stack, restores it on success.
@@ -589,3 +602,16 @@ set_greg\@:
lds r0, dsr
pop r0
.endm
+
+ .macro assertmem addr val
+ push r0
+ mov.l .Laddr\@, r0
+ mov.l @r0, r0
+ assertreg0 \val
+ bra .Lam\@
+ nop
+ .align 2
+.Laddr\@:
+ .long \addr
+.Lam\@: pop r0
+ .endm
diff --git a/src-release b/src-release
index 42d5c205ee3..f012d9df88a 100644
--- a/src-release
+++ b/src-release
@@ -273,7 +273,7 @@ gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
.PHONY: gdb.tar.bz2
-GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
+GDB_SUPPORT_DIRS= bfd include libiberty opcodes readline sim utils intl
gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
$(MAKE) -f $(SELF) gdb-taz TOOL=gdb \
MD5PROG="$(MD5PROG)" \
@@ -309,7 +309,7 @@ gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
.PHONY: insight.tar.bz2
-INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
+INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl libgui
insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
$(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=insight \
MD5PROG="$(MD5PROG)" \